gpt4 book ai didi

android - 在旋转之前在屏幕外显示 ImageView 的一部分?

转载 作者:搜寻专家 更新时间:2023-11-01 09:06:05 25 4
gpt4 key购买 nike

我只想在屏幕上显示我的 ImageView 的一部分..现在它是右下角的相对布局..下面第一个屏幕截图中的蓝色圆圈..

蓝色圆圈将成为“可扩展”菜单按钮/抽屉。我想做的是只显示圆圈的左上象限,然后当有人触摸蓝色区域时旋转它,这将显示圆圈的另一半(我将在其上添加按钮)。

第一个屏幕截图是我现在拥有的,第二个屏幕截图显示了我想如何将大部分圆圈推离屏幕。

这是否受支持?

What I have now, but I want the center of the circle at the very bottom right pixel of my layout, not the corner of the circle.. I want most of the circle actually off screen at first.

enter image description here

最佳答案

Is this supported?

是的,你可以使用负边距:

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="-24dp"
android:layout_marginRight="-24dp"
android:src="@drawable/ic_launcher" />
</RelativeLayout>

关于android - 在旋转之前在屏幕外显示 ImageView 的一部分?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11816683/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com