开发者

how to solve this image scaling problem in android?

How to design a layout that should support all screen size. See the Images below..

How can i make all screen looks properly with same images?

Edit:here larger sc开发者_运维问答reen [WXGA] displays in proper way. becoz i used image button there to change alphabets(Eg A,B,....)

how to solve this image scaling problem in android?

how to solve this image scaling problem in android?


Yes I am totally agree with Farray's answer. You should create separate layout files and put inside the particular folder like layout-land, layout-large-land, layout-large, etc. and create different drawables for the different densities and put those drawables inside the suitable folder like drawable, drawable-hdpi, drawable-ldpi, drawable-mdpi, etc.

For example:

how to solve this image scaling problem in android?

Update:

As you want to put buttons for all the alphabets, in that case you should use GridView and define your custom adapter with ImageButton and set the same adapter inside the GridView, I am sure this will looks perfect as per your requirement. For your reference, I would like to suggest you to go through this: http://www.firstdroid.com/2011/02/06/android-tutorial-gridview-with-icon-and-text/


Unfortunately it's not as simple as scaling the images larger. That will produce very poor results on larger screen formats.

The proper way to support multiple screens is to include different resources for different size categories. At the very least you should create separate layout files for small and large screens and include different drawables for the screen densities you want to support.

There's a lot of information at http://developer.android.com/guide/practices/screens_support.html Maybe give that a read and then post additional questions if you have them?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜