开发者

TextView in android

I am developing an application in which the layout is independent of screen resolution. Now my problem is that in TextView the textview layout does change itself when the resolution of screen changes but the size of text remain same.

I want that when 开发者_Go百科the resolution is high, according to that the text size should also adjust itself(i.e. text size should be changed). And simillarly when resolution is low the text size sholud also shrink.

But here when i reduce Y-AXIS to an extent the text vanishes.

I will really appriciate any answer.

Thank you.


You should be using sp for your android:textSize.


Make a values folder for each of the four densities and make a common dimension value for each density.

So at low density it is a certain value, medium density it is a certain value and so on.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜