开发者

How do I support different phone and screen sizes for background images that are relative to multiple layout Objects

开发者 https://www.devze.com 2023-03-06 08:31 出处:网络
So right now one of my layouts has a table image set as a background then I have TextView objects line up with the corresponding cells in the table that is my background.

So right now one of my layouts has a table image set as a background then I have TextView objects line up with the corresponding cells in the table that is my background. (开发者_JS百科I basically use spaces and padding to manipulate the TextView strings)

I test using an emulator and my Droid X and I notice that the background shifts sizes to fit the screen. Thats great and all, but makes it impossible to line up my TextView strings correctly to match the different screen sizes. (It can work on one, but not the other)

My questions to possible solutions:

  • Can I make this process more generic to fit different screen sizes?

  • Is there a way to keep the image in my background the same size no matter what device it is running on and have the empty spaces it doesn't fill be black?

  • Is there a way to easily create a table in android with color filled cells?


I suggest cutting up the background into several images, and then having the image that is meant to line up with the TextView, the background of the TextView. Just my 2c.

0

精彩评论

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