image - android studio screen size not same on emulator -


helloo im making project on android studio.my workbench screen size not same working on emulator

in phone when trying

in android studio when developing

i got scroolview vertical ann got linear layout in scrollwiew.i want make same every phone.

my menu.xml

 <scrollview     android:layout_width="match_parent"     android:layout_height="match_parent"     android:id="@+id/scrollview" >     <linearlayout         android:orientation="vertical"         android:layout_width="fill_parent"         android:layout_height="fill_parent">           <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:textappearance="?android:attr/textappearancemedium"             android:text="chosse one!"             android:id="@+id/textview2"             android:layout_alignparenttop="true"             android:layout_centerhorizontal="true"             android:layout_gravity="center_horizontal" />          <imagebutton             android:id="@+id/imagebutton"             android:layout_width="match_parent"             android:layout_height="wrap_content"              android:background="@mipmap/love"             android:layout_below="@+id/textview2"             android:layout_alignparentleft="true"             android:layout_alignparentstart="true" />          <imagebutton             android:id="@+id/imagebutton2"             android:layout_width="match_parent"             android:layout_height="wrap_content"              android:background="@mipmap/krm"             android:layout_below="@+id/imagebutton"             android:layout_alignparentleft="true"             android:layout_alignparentstart="true" />          <imagebutton             android:id="@+id/imagebutton3"             android:layout_width="match_parent"             android:layout_height="wrap_content"              android:background="@mipmap/rak"             android:layout_below="@+id/imagebutton2"             android:layout_alignparentleft="true"             android:layout_alignparentstart="true" />          <imagebutton             android:id="@+id/imagebutton4"             android:layout_width="match_parent"             android:layout_height="wrap_content"              android:background="@mipmap/rght"             android:layout_below="@+id/imagebutton3"             android:layout_alignparentleft="true"             android:layout_alignparentstart="true" />          <imagebutton             android:id="@+id/imagebutton5"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:background="@mipmap/left"             android:layout_below="@+id/imagebutton4"             android:layout_alignparentleft="true"             android:layout_alignparentstart="true"            />      </linearlayout> </scrollview> 

this happening because devices have different densities , screen sizes. device test app on has lower density screen and/or smaller screen height, it's compressing layout. can design same layout several times work multiple densities hdpi, xhdpi, mdpi etc. more information can found there: http://developer.android.com/guide/practices/screens_support.html


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -