-4

enter image description here

How to change the size of my app, so that it will fit to every smartphone? Android studio

I don't know how to ask the question correctly. I just installed Android studio today.

Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
HATEOUS
  • 1
  • 1
  • never set hard width/height's ie. your 90dp you have set and use match_parent – tyczj Jan 04 '18 at 17:31
  • you need to make sure you width and height of the area isnt fixed. For example 100dp. You want to make sure you use match_parent. This will extend the background out. Can you show us your XML code? – letsCode Jan 04 '18 at 17:37

2 Answers2

0

First off, Size doesn't decide whether it'll fit for an Android phone or not . It's decided by the API versions you use to compile and the way you've made your app suitable for being run on different devices.

If you're looking for dividing your app as different apks try https://mindorks.com/blog/how-to-create-multiple-apk-files-for-android-application

entangled
  • 83
  • 1
  • 9
0

You should not be using fixed height/width , because different phones have different sizes.

You can use either Linear Layout and set the attribute layout weight https://developer.android.com/guide/topics/ui/layout/linear.html

Or you can use Relative Layout to position views https://developer.android.com/guide/topics/ui/layout/relative.html

Tiny
  • 1
  • 3