enter image description here I am unable to implement the auto-layout concept in Android Studio as i used to do in in Xcode.
Here are the screenshots, one is on Nexus One screen and another one is on Nexus 7's big screen. View aren't getting adjusted automatically according to the screen size.
I haven't seen your code but there are a few things you can try:
drawables-hdpi
, drawables-xhdpi
and so on). .xml
file when defining your sizes use dp
instead of px
. dp
or display pixels will fill the screen according to how many pixels there are rather than assuming there are the same amount of pixels on each screen. android:layout_marginLeft="2dp"
) would mean that that item lets say a button will be 2 display pixels from the left margin of the phone.
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.