【发布时间】:2016-09-09 01:27:39
【问题描述】:
图像 1 没有旋转,当我旋转 ImageView 时,我想要图像 3,但正在显示类似于图像 2 的东西。如何让ImageView 自动更改其尺寸?
我的猜测是,旋转后,ImageView 的宽度和高度被保留了,我不希望这样
附言我不想改变布局的方向
这是图片(矩形是电话,人是imageview)
这是我的 xml
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:id="@+id/page">
<ImageView
android:scaleType="centerInside"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/character"
android:rotation="90"
/>
</FrameLayout>
<!-- I tried all scaleTypes, and set height/width to fill_parent, wrap_content,and match_parent nothing worked-->
感谢任何帮助。谢谢!
【问题讨论】:
-
你找到解决办法了吗?