Nexus 4和Galaxy可以使用哪种布局?
Nexus 7(800 X 1280)和Galaxy Nexus(720 X 1280)之间存在冲突,如截图中所附:
Nexus S

Galaxy

编辑
home_screen.xml
<?xml version="1.0" encoding="utf-8"?>
<WebView
android:id="@+id/web_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<TabHost
android:id="@+id/tabHost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" >
<include layout="@layout/home_tab_list" />
</FrameLayout>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="@drawable/tab_bar_background" >
</TabWidget>
</LinearLayout>
</TabHost>
home_tab_list.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/tab_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:visibility="visible" >
<ImageView
android:id="@+id/glob"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="20dp"
android:contentDescription="@string/profile_picture_description"
android:src="@drawable/globe" />
<ImageView
android:id="@+id/createTrip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/pickMatches"
android:layout_alignLeft="@+id/glob"
android:layout_marginBottom="35dp"
android:layout_marginLeft="21dp"
android:contentDescription="@string/profile_picture_description"
android:src="@drawable/create_trip_background" />
<ImageView
android:id="@+id/pickMatches"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/glob"
android:layout_marginBottom="24dp"
android:layout_marginLeft="80.5dp"
android:contentDescription="@string/profile_picture_description"
android:src="@drawable/pick_matches_background" />
<ImageView
android:id="@+id/meetMatch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/createTrip"
android:layout_marginRight="12dp"
android:clickable="true"
android:contentDescription="@string/profile_picture_description"
android:src="@drawable/meet_match_background" />
</RelativeLayout>请指导我的this.Any帮助将不胜感激。
发布于 2013-09-17 13:31:31
TabHost是不推荐使用的,建议您使用片断。
试试ActionBarSherlock。
ActionBarSherlock是支持库的扩展,旨在通过一个API在所有版本的Android中方便使用动作条设计模式。 库将在适当时自动使用本机操作栏,或者在布局周围自动包装自定义实现。这使您可以轻松地为2.x和更高版本的Android的每个版本开发一个带有操作栏的应用程序。
教程:
教程1,教程2,教程3
如果您真的想使用TabHost,也许其他人可以帮助您。我在这方面经验不多。祝好运!
https://stackoverflow.com/questions/18850037
复制相似问题