开发者

Getting Screensize to measure content

开发者 https://www.devze.com 2023-03-23 22:35 出处:网络
I\'m writing a new book app. I\'d like it to run on several devices. The problem I have is screenSizes. Is it possible to adjust the amount of text I push into a textview to fill up the screen开发者_开

I'm writing a new book app. I'd like it to run on several devices. The problem I have is screenSizes. Is it possible to adjust the amount of text I push into a textview to fill up the screen开发者_开发问答?

So for example, if I have a page on a normal phone, I don't even get 30% filled on a tablet.

I know I can use android folders to determine which screen to use for different sizes, but then I'd have to write 5 extra xml's with different stringsizes in the assetfolder.

Does anyone know if this is possible? Or is there a better approach?


I am not sure if I am understanding your question correctly, but it seems to me like you want to use the android:width="fill_parent" and android:height="fill_parent" feature to make the textview fill the entire screen of the device.

0

精彩评论

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