I have use the android studio and set the image view fit to screen using relative background image i give layout top margin and i set image view fit to screen below part
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:background="@drawable/backgroud">
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="500dp"
android:background="@drawable/blacksquare"
android:alpha=".33"
/>
Write the Following ImageView Tag in your Parent Layout.
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:background="@drawable/blacksquare"
/>
and you can also remove the Paddings from your parent Layout Tag to get fit the Image View in screen without padding..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With