i have attached image in android app when launch app small.please suggest how increase size in app visible.
below snippet code of activity_main.xml :
<imageview android:id="@+id/power_image" android:src="@mipmap/ic_launcher" android:layout_width="200dp" android:layout_height="200dp" android:layout_above="@+id/logbutton" android:scaletype="fitcenter" android:layout_alignparentright="true" android:layout_alignparentend="false" android:visibility="visible" />
change scaletype centercrop , worked. here full guide scaletype in imageview in android. following list of common types of scaletype:
center : displays image centered in view no scaling.
centercrop : scales image such both x , y dimensions greater or equal view, while maintaining image aspect ratio; centers image in view.
centerinside scales image fit inside view, while maintaining image aspect ratio. if image smaller view, same center.
fitcenter scales image fit inside view, while maintaining image aspect ratio. @ least 1 axis match view, , result centered inside view.
fitstart same fitcenter aligned top left of view.
fitend same fitcenter aligned bottom right of view.
fitxy scales x , y dimensions match view size; not maintain image aspect ratio.
matrix scales image using supplied matrix class. matrix can supplied using setimagematrix method. matrix class can used apply transformations such rotations image.
Comments
Post a Comment