我正在开发一款专门针对三星 Galaxy S 的应用程序(我不是在这里做出决定的人),他们希望其布局达到像素精度。
我可以只使用普通的 2.1 AVD 吗?
所以我尝试创建 WQVGA432 但它看起来像这样。我不知道为什么 LinearLayout 不填满屏幕,而只使用韩语的大图像(我无法缩小,但这是不同的问题)。
这是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>
是的,将屏幕分辨率设置为 wqvga (800 * 432)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)