我想在中心設置圖像,當我申請這樣的屬性。如何設置圖像視圖中心當我應用捏縮放它呢?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainContainerDialog"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/color_screen_bg" >
<Button
android:id="@+id/btnCancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/btn_login_selector"
android:padding="10dp"
android:text="@string/title_cancel"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/white" />
<ImageView
android:id="@+id/ivProductImageDisplay"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="matrix"
android:padding="10dp"
android:layout_above="@+id/btnCancel"
android:src="@drawable/ic_app_bg_logo" />
</RelativeLayout>
但我的圖像視圖總是像左下角一樣開始像下面的圖像。
我想在這個中心圖像視圖,然後在此圖像視圖應用捏變焦。
採用H ttps://github.com/MikeOrtiz/TouchImageView – 2014-09-03 06:18:28
http://stackoverflow.com/a/25606398/1318946 – 2014-09-03 06:19:22
'android:scaleType =「matrix」'將其更改爲android:scaleType =「center」'設置Image in the center – SilentKiller 2014-09-03 06:20:29