Nine patch drawable not working in tabhost landscape orientation
So I created my image as nine patch drawable as tab widget for tabhost. It looks right when in portrait mode but when in landscape mode, the nine patch drawable didn't expand. It has just the same size just like in the portrait mode. Can anyone 开发者_如何学Gohelp me? Thanks.
Found out the answer. Instead of setting the nine patch drawable as source like this
android:src="@drawable/tab_one"
I tried to change it to background. Now, the nine patch drawable fits the sreen whether in portrait or landscape mode.
android:background="@drawable/tab_one"
精彩评论