我正在使用以下 xml 布局以正常布局进行渲染。但是当我尝试在像华硕变压器(蜂窝或冰淇淋三明治)这样的超大屏幕上运行时,图像按钮的图像从 drawable-mdpi 资源文件夹中获取图像。甚至尝试更改布局和大屏幕按钮的更大图像,但呈现相同的 mdpi 图像。
任何人都可以给我一些关于如何解决这个问题的指示。谢谢。
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@drawable/white"
android:fillViewport="true"
android:tileMode="repeat" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_alignParentTop="true"
android:layout_width="fill_parent"
android:layout_height="30dip"
android:background="#000000"
android:tileMode="repeat"
android:weightSum="3">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<TextView
android:text=""
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:textSize="18sp"
android:textColor="#000000"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<ImageView
android:src="@drawable/logo1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<ImageButton
android:id="@+id/buttonMainBackClosetheApp"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:tileMode="repeat"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_marginTop="30dip"
android:layout_marginBottom="30dip"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="3"
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:weightSum="3"
android:orientation="horizontal"
android:layout_marginTop="15px">
<LinearLayout
android:id="@+id/linearLayoutBtnFindUs"
android:layout_width="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center"
android:layout_height="fill_parent">
<ImageButton
android:id="@+id/btnFindUs"
android:src="@drawable/findus_icon"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white" />
<TextView
android:text="Find Us"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center"
android:layout_height="fill_parent">
<ImageButton
android:id="@+id/btnCatalog"
android:src="@drawable/catalog_icon"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white"/>
<TextView
android:text="Catalog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btnMyContact"
android:src="@drawable/mycontact_icon"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white"/>
<TextView
android:text="My"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"/>
<TextView
android:text="Contacts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:weightSum="3"
android:orientation="horizontal">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btnPhoto"
android:src="@drawable/photo_icon"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white"/>
<TextView
android:text="Photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:src="@drawable/myaccount_icon"
android:id="@+id/btnMyAccount"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white"/>
<TextView
android:text="My Account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btnFeedback"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white"
android:src="@drawable/feedback_icon" />
<TextView
android:text="Feedback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_marginBottom="20px"
android:weightSum="3"
android:orientation="horizontal">
<!-- dont change the above value of 45px in
android:layout_marginBottom="45px"-->
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btnPromotions"
android:src="@drawable/promotion_icon"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white" />
<TextView
android:text="Promotions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center"
android:layout_height="fill_parent" >
<ImageButton
android:id="@+id/btnTradeTools"
android:src="@drawable/tradetools_icon"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white" />
<TextView
android:text="Trade Tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btnClientInfo"
android:src="@drawable/clientinfo_icon"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/white"/>
<TextView
android:text="About"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_alignParentBottom="true"
android:layout_width="fill_parent"
android:layout_height="30dip"
android:layout_weight="1"
android:weightSum="5"
android:orientation="horizontal"
android:background="#e4e4e4"
android:tileMode="repeat">
<include layout="@layout/footer_include_layout"/>
</LinearLayout>