android - Unintended margin for ImageView -
android - Unintended margin for ImageView -
so have parseimageview
subclass of imageview
, contained in container deed overlay. visibility of container statically set gone, changes visible when cropped version of image within scrollview clicked.
this works fine, expanded_image_view
has unwanted margins on left , right, crops chunk out of image, , can't seem figure out why happens. there i'm doing wrong?
<framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/post_data"> <scrollview android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/scrollview2" > <!-- linear layouts here--> </scrollview> <linearlayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/expanded_image_container" android:visibility="gone" android:background="@color/black" android:gravity="center_vertical|center_horizontal"> <com.parse.parseimageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/expanded_image_view" android:paddingtop="15dp" android:paddingbottom="15dp" android:scaletype="centerinside" android:adjustviewbounds="false" /> </linearlayout> </framelayout>
change android:scaletype
fitxy
. if utilize centerinside
, image forced in center , android cutting in center.
android parse.com
Comments
Post a Comment