旋转图像浏览而无需剪裁
我想动态地改变旋转,我面临的问题。我做了简单的我的问题示例,
“ https://i.sstatic.net/pzmb9.png”时,您可以看到父母切断了我的图像视图的片段。
xml非常简单
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<ImageView
android:id="@+id/image"
android:layout_width="100dp"
android:layout_height="100dp"
android:rotation="-10"
android:background="@color/teal_200"
android:src="@mipmap/ic_launcher" />
</LinearLayout>
实际上我希望我的图片扩展而不是超越imageview的边界 我试图找到解决方案,但所有这些都没有解决我的问题 映像我想如何看到它
I want to change rotation dynamically, bud i faced with the problem. I did simple code example of my problem
as you can see parent cuts off piece of my image view when i set rotate
click here to see emulator screen
xml very simple
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<ImageView
android:id="@+id/image"
android:layout_width="100dp"
android:layout_height="100dp"
android:rotation="-10"
android:background="@color/teal_200"
android:src="@mipmap/ic_launcher" />
</LinearLayout>
Actually I want my picture to scale and not go beyond the boundaries of the ImageView
I tried to find solution, but all of them didn't resolve my problem
image how i want to see it
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议将父级布局用于ImageView并设置背景:
希望它有帮助!
I suggest to use parent layout for ImageView and set background:
Hope it helps!