HI,
I want to stretch my image to the layout width, how can i do this using xml layouts ?
<LinearLayout android:layout_width="700dp"
android:layout_height="310dp" android:orientation="vertical">
<TextView android:id="@+id/widget37" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="Welcome Ramesh Kumar,"
android:paddingTop="5dp" android:textSize="10dp" android:textColor="#02284D"
android:gravity="left">
</TextView>
<TextView android:id="@+id/widget37" android:layout_width="fill_parent"
android:layout_height="w开发者_如何转开发rap_content" android:text="Employee Id: 152490"
android:textSize="10dp" android:textColor="#02284D" android:gravity="left">
</TextView>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="150dp" android:layout_x="10dp">
<ImageView android:id="@+id/bannert30"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:src="@drawable/front_screen" android:scaleType="fitEnd"
android:layout_alignParentLeft="true">
</ImageView>
</RelativeLayout>
This is my code please help ?
You can use android:scaleType="fitXY"
for the ImageView and another alternative is to set the image as the background of the layout.
精彩评论