问题描述
我可以使用哪种布局的Nexus 4和Galaxy Nexus的?
Which Layout Can I used for Nexus 4 and Galaxy Nexus?
有作为连接中(720×1280)的Nexus 7(800×1280)和Galaxy Nexus的之间的冲突
截图:
There is conflict between Nexus 7(800 x 1280) and Galaxy Nexus(720 x 1280) as attached in screenshot :
歌Nexus S
的Galaxy Nexus
修改
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帮助将AP preciated。
Please guide me on this.Any help will be appreciated.
推荐答案
TabHost是德precated 并建议大家使用的 来代替。
TabHost is deprecated and it is recommended you use Fragments instead.
试用。
ActionBarSherlock是旨在促进在Android的所有版本中使用的动作条设计模式与单一的API支持库的扩展。
该库将适当的时候自动使用本机操作栏,或将自动环绕你的布局,自定义实现。这使您可以轻松地开发出从2.x和Android的最高的每一个版本的操作栏中的应用程序。
The library will automatically use the native action bar when appropriate or will automatically wrap a custom implementation around your layouts. This allows you to easily develop an application with an action bar for every version of Android from 2.x and up.
教程:
,<一个href=\"http://xrigau.word$p$pss.com/2012/03/15/using-an-actionbar-in-your-application-with-actionbarsherlock/\"相对=nofollow>教程2 ,
如果你真的想用TabHost,也许别人可以提供帮助。我没有与太多的经验。祝你好运!
If you really want to use TabHost, maybe someone else can help. I don't have much experience with that. Good luck!
这篇关于它的布局是用于Galaxy Nexus的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!