android - How to set imageview fit to sreen? -



android - How to set imageview fit to sreen? -

i have utilize android studio , set image view fit screen using relative background image give layout top margin , set image view fit 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 next imageview tag in parent layout.

<imageview android:layout_width="match_parent" android:layout_height="match_parent" android:scaletype="fitxy" android:background="@drawable/blacksquare" />

and can remove paddings parent layout tag fit image view in screen without padding..

android android-layout imageview

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -