简体   繁体   中英

Fixing Android apps size

Im just made my first little app on android.

I've been using the Android Studio for developing which is quite good but the problem is that the app I designed fits only a 5.5" display. On other devices its just very small or larger. I don't know how to make it autosize according to the size of the device.

Is there any way to fix it or is there any way to make different Apks for different mobiles (according to the display sizes)

PS: there isn't any picture in the app. Just writing and calculations. Kind of Calculator for beginners(ME). :)

If you dont have any images on your app, set your layouts and views width (when needed) to 'match_parent' instead of 'wrap_content' or a fixed size.

Set the parent layouts height to 'match_parent' and if you have a background that fits all the screen, set this too.

Check this for reference of LayoutParams values: http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html

If you want to add images Go to http://developer.android.com/guide/practices/screens_support.html and try to understand all the concepts of densities independence and supporting multiple devices.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM