Vote count:
0
m making an android applcation in which im using imageview.My image is getting displayed perfectly on devices like on Normal phone screen. But when it is getting displayed on big screen devies like Tab,Nexus 7,Nexus 10 it is getting smaller and on the left side of the screen..what is the solution for it??
Here is my layout code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
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>
asked 48 secs ago
Android Imageview is getting small
Aucun commentaire:
Enregistrer un commentaire