gpt4 book ai didi

java - 在圆形/圆形布局内显示 map

转载 作者:行者123 更新时间:2023-11-29 19:20:50 24 4
gpt4 key购买 nike

我有这样的要求(下面的屏幕截图),我没有找到在堆栈溢出中构建此布局的特定解决方案。谁能帮我建立这个布局

map 将在圆圈/圆形 View 内,红色边框将用作计时器,随着时间的减少,红色边框也会减少。

最佳答案

Show map as a circle

我有一个......技巧解决方案给你:))

enter image description here

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true">

<fragment
android:id="@+id/map"
android:name="your map"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_centerInParent="true" />

<LinearLayout
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_centerInParent="true"
android:background="@drawable/bg"
android:gravity="center">

</LinearLayout>

</RelativeLayout>

神奇的是图像bg。周围的颜色必须与背景颜色相同

enter image description here

Red border will work as a timer, as time reduce, red border

您可以使用这个 lib显示你的圈子进度条

关于java - 在圆形/圆形布局内显示 map ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42528380/

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