I have a problem with supporting different screen sizes. My application has different drawables for mdpi (320x480), hdpi (480x800) or ldpi (240x432). I also have different layout for small, normal-notlong, normal-long. Every size scaling or placement features are done in dp. However my problem is that I need to precisely place an element on the screen so it will perfectly fit to the background. One example here is an image that I download and show inside a frame that is part of the background. Or I also draw a circle (using drawArc) on the top of an imageview object and need to place it precisely to fit a 'black hole' that is on that image. Because the position is dependent on the background I place the elements with parent margins. As I wrote I am using dp for that. However If I fit my setting for a 320x480 3" screen and then change to 3.1" the elements are slightly misplaced and don't fit the background. The same if I have 480x800 3.5" device but change to 3.6" - the elements are misplaced slightly but that is enaught to look poorly in the design. What can I do about it? I am sure there has to be a way to achieve this on any screen size - i.e. games must use some kind of that mechanism and they work on any screen size. Can any one help?
0条回答
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker