How to create an AVD that represents the Samsung Galaxy S in the Eclipse emulator?

I am working on an application specifically for the Samsung Galaxy S (I'm not the one who makes the decision here), and they want its layout to be accurate. Can I use regular AVD AV 2.1?

So I tried to create a WQVGA432, but it looks like this. I am not sure why LinearLayout does not fill the screen, but uses only large images with Korean (which I cannot reduce, but this is another question).

WQVGA432

This is main.xml:

<RelativeLayout android:id="@+id/ui_navBar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FF333333" <!-- This is navigation panel at the top of the page --> <!-- Top-Left Button, aka Back button --> <FrameLayout android:id="@+id/ui_topLeftBox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true"> </FrameLayout> 
  <!-- Screen name --> <FrameLayout android:id="@+id/ui_topBox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true"> </FrameLayout> <!-- Top-Right Button, aka Forward button --> <FrameLayout android:id="@+id/ui_topRightBox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true"> </FrameLayout> </RelativeLayout> <FrameLayout android:id="@+id/ui_contentView" android:layout_width="fill_parent" android:layout_height="0dip" android:paddingTop="0px" android:layout_weight="1"> <!-- Main View --> <RelativeLayout android:id="@+id/mainView" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLayout android:id="@+id/topBanner" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:background="#FFFFCC00" > <TextView android:textSize="20sp" android:textColor="#FF000000" android:text="EUR/USD" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" /> </RelativeLayout> <RelativeLayout android:id="@+id/view1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/topBanner" android:background="#FF444444"> <CheckBox android:id="@+id/cbx1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_alignParentLeft="true" /> <com.vg.library.NumericInput android:id="@+id/val1Nip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_toRightOf="@+id/cbx1" /> </RelativeLayout> <com.vg.library.NumericInput android:id="@+id/val2Nip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/view1" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Screen01" android:layout_below="@+id/val2Nip" android:layout_alignParentLeft="true" /> </RelativeLayout> </FrameLayout> <!-- ExpandBar --> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" > <ImageView android:id="@+id/ui_expandBar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/bar" android:background="#0000" /> <FrameLayout android:id="@+id/ui_drawerView" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingTop="0px" android:layout_weight="1" android:layout_below="@+id/ui_expandBar"> <RelativeLayout android:id="@+id/ui_drawerContent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FF550000" > <RelativeLayout android:id="@+id/m1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FF550000" > <CheckBox android:id="@+id/cbxB" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_alignParentLeft="true" /> <com.vg.library.NumericInput android:id="@+id/valBNip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_toRightOf="@+id/cbxB" /> </RelativeLayout> </RelativeLayout> </FrameLayout> </RelativeLayout> <RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FF333333" android:layout_weight="0" android:layout_gravity="bottom" > <!-- This is menu panel at the bottom of the page --> <com.vg.library.MenuBar android:id="@+id/ui_menuBar" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:background="#FFAAAA00" > <!-- All menu item should go here --> </com.vg.library.MenuBar> </RelativeLayout> 

+4
source share
3 answers

Yes, set the screen resolution to wqvga (800 * 432).

+3
source

Galaxy S has this display:

  • Super AMOLED Display (C-type)
  • WVGA (800 x 480) Sub-display Resolution
  • 4.0 "Subscreen Size
  • 16M Color Depth of Main Display

Additional Features http://developer.samsung.com/deviceSpecs/deviceView.do?menu=EN01030100&dvceId=47#

+1
source
 <RelativeLayout android:id="@+id/topBanner" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:background="#FFFFCC00" > 

for your application

0
source

Source: https://habr.com/ru/post/1316524/


All Articles