2013-02-25 52 views
1

我的设计采用的是Android 2.1罚款和罚款Android 4.0的正常分辨率的设备,但是当我跑我的平板电脑应用程序的设计完全改变了,帮我设计是不正确的高分辨率设备

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" 
android:background="@drawable/bowlbackground" > 

<LinearLayout 
    android:id="@+id/hkk" 
    android:layout_width="match_parent" 
    android:layout_height="54dp" 
    android:layout_marginLeft="18dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginTop="05dp" > 

</LinearLayout> 
<LinearLayout 
    android:id="@+id/hll" 
    android:layout_width="match_parent" 
    android:layout_height="54dp" 
    android:layout_marginLeft="18dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginTop="143dp" > 

</LinearLayout> 

<LinearLayout 
    android:id="@+id/hll2" 
    android:layout_width="match_parent" 
    android:layout_height="54dp" 
    android:layout_marginLeft="18dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginTop="0dp" > 

     </LinearLayout> 

</LinearLayout> 

回答

1

使用本

res/layout/my_layout.xml    // layout for normal screen size ("default") 
res/layout-small/my_layout.xml  // layout for small screen size 
res/layout-large/my_layout.xml  // layout for large screen size 
res/layout-xlarge/my_layout.xml  // layout for extra large screen size 
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation 

res/drawable-mdpi/my_icon.png  // bitmap for medium density 
res/drawable-hdpi/my_icon.png  // bitmap for high density 
res/drawable-xhdpi/my_icon.png  // bitmap for extra high density 
2
  1. 手机和平板电脑的设计有所不同。
  2. 避免使用固定的宽度和高度尺寸的意见(除非它真的 不可避免的)。 See this欲了解更多信息
  3. 请参阅文档supporting multiple screens。它有助于设计平板电脑。
+1

只是添加到,请确保您使用[片段](http://developer.android.com/guide/components/fragments.html),这样就可以更好使用从大屏幕获得的额外房地产。 – ebarrenechea 2013-02-25 05:53:44

+0

嗨@RKN我已经使用你给定的链接,现在我正在使用layout-xlarge和layout-xlarge-land,现在我只需将余量设置为左上角的所有内容,但同样不会像我定义的那样 – kamal 2013-02-25 06:43:04

相关问题