开发者

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"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜