【发布时间】:2017-01-18 21:32:45
【问题描述】:
我在 ImageView 中使用缩放效果,所以我需要使用 scaletype=matrix。现在,我想将中心位置设置为 ImageView,但我无法设置它。
请帮助我解决这个问题。
layout.xml :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/imgImage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:contentDescription="@string/imgdesc"
android:scaleType="matrix"
android:src="@drawable/ic_answer" />
</RelativeLayout>
【问题讨论】:
-
您有什么解决方案吗?请与我们分享
标签: android xml android-layout scale