我正在制作一个Android应用程序,我正在使用ImageView.My图像在普通手机屏幕 上完美显示,但在大屏幕设备(如Tabs)上,它变得越来越小,在左侧屏幕。那么什么是最适合相同的解决方案?Android Imageview越来越小
这是我的XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/rl"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#550e8c" >
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#550e8c"
android:text=""
android:textColor="#e2ffff" />
<Button
android:id="@+id/help"
android:layout_width="52dp"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/textView2"
android:layout_alignParentTop="true"
android:layout_alignRight="@+id/textView2"
android:background="#550e8c"
android:drawableLeft="@drawable/help1" />
</RelativeLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/rl"
android:background="#E5E3E4"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/home"
android:adjustViewBounds="true"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="5dp"
android:orientation="vertical" >
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="52dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#781a8f"
android:drawableLeft="@drawable/earthnew1"
android:drawablePadding="30dp"
android:gravity="left|center_vertical"
android:paddingLeft="10dp"
android:text="@string/aware_patient"
android:textColor="#e2ffff"
android:textStyle="bold" />
<Button
android:id="@+id/btnCardiology_updates"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="6dp"
android:background="#781a8f"
android:drawableLeft="@drawable/updates1"
android:drawablePadding="30dp"
android:gravity="left|center_vertical"
android:paddingLeft="10dp"
android:text="@string/Cardiology_updates"
android:textColor="#e2ffff"
android:textStyle="bold" />
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="6dp"
android:background="#781a8f"
android:drawableLeft="@drawable/linknew1"
android:drawablePadding="30dp"
android:gravity="left|center_vertical"
android:paddingLeft="10dp"
android:text="@string/useful_links"
android:textColor="#e2ffff"
android:textStyle="bold" />
<Button
android:id="@+id/button4"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="6dp"
android:background="#781a8f"
android:drawableLeft="@drawable/linknew1"
android:drawablePadding="30dp"
android:gravity="left|center_vertical"
android:paddingLeft="10dp"
android:text="@string/Useful_journlas"
android:textColor="#e2ffff"
android:textStyle="bold" >
</Button>
</LinearLayout>
</RelativeLayout>
乌尔使用图像HIGHT和宽度WRAP_CONTENT所以硫杂联树脂使用HIGHT和宽度固定像50dp 50dp – 2014-10-28 05:36:18
我认为你必须为7和10制作图像的图像,并放在各自的可绘制文件夹,如sw600和sw720。 – 2014-10-28 05:37:09
问题可能与解决方案有关。使用高分辨率图像并放置在xhdpi和xxhdpi可绘制文件夹中。 – Akhil 2014-10-28 05:38:20