I have this following xml code,
with the following design. my problem is the blue area is an imageview, i want to keep its aspect ratio its 500 x 500. because of the weight its width is getting smaller,... like on the picture.. lets say to 450... but then its looks like 450x500 instead of 450x450 - How to change code to reach that aim?
http://s2.postimg.org/ctlsxajzd/image.jpg
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:weightSum="10"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#000000"
android:gravity="top"
android:layout_weight="1"
android:orientation="horizontal" >
<ImageView
android:id="@+id/ImageView01"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:background="@drawable/alert_logo"
android:gravity="top"
android:scaleType="centerInside" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#000000"
android:layout_weight="9" >
</LinearLayout>
</LinearLayout>
</ScrollView
>