【问题标题】:How to implement circular menu in android如何在android中实现圆形菜单
【发布时间】:2020-01-07 05:07:45
【问题描述】:

我开始在我的 android 应用程序上自定义圆形小部件。通过将回收站视图转换为弯曲形状,我得到了与我的要求相似的东西。但问题是多层相互重叠。如何使图层可独立点击。请帮帮我。提前致谢。

look at this This is how recycler views are overlapping each other

the expected design looks like this

【问题讨论】:

    标签: android android-layout android-recyclerview android-custom-view circular-dependency


    【解决方案1】:

    在您的可绘制文件中使用它。它会做出正确的曲线。

    <?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
        <solid android:color="@color/colorPrimary" />
        <corners android:topRightRadius="150dp" />
    </shape>
    

    【讨论】:

    • 感谢您的建议。我能够设置背景可绘制,这不是问题。当我尝试在角落滚动时,顶部的 recyclerview 正在滚动,而不是第二个。我只是想知道,我们如何才能阻止触发触摸事件。在那个区域。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-09
    • 2017-07-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多