我在XML圖像視圖,我想嘗試設置圖像中心:圖像位置不能夠設置與規模型矩陣中心
我當前的代碼:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical"
>
<ImageView
android:id="@+id/imageview_fullscreen"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:adjustViewBounds="true"
android:scaleType="matrix"
android:src="@drawable/ic_launcher"
/>
</RelativeLayout>
我已經加入在縮放功能/縮小圖像視圖 -
http://stackoverflow.com/questions/15609845/add-limit-to-zoom-in-and-zoom-out-in-android
當我寫上面的代碼則圖像不能在中心設置有刻度型matrix
。圖像從上方代碼左上方設置。
如何將其設置爲刻度類型爲matrix
的中心。 ?
這是工作,但我已經在輸入/輸出從這個'http://stackoverflow.com/questions/15609845/add-limit-to-zoom-in-and-zoom-out-in-應用ZOON android'。所以當我放大/縮小時,它並不完美。 – deepak
你的問題是你想在中心設置圖像。你應該描述整個問題。 – DroidAks
我很抱歉。我有更新我的問題。 – deepak