Code Monkey home page Code Monkey logo

Comments (7)

aitsuki avatar aitsuki commented on September 23, 2024

https://github.com/otifik/Pictures/blob/main/30784966277074024279978955371.gif 这是出现bug时的录屏 机型为小米10安卓12,在小米6安卓9上也是这样

好的,我排查下问题,是通过代码动态设置可以滑动的方向是吗。

from swipemenurecyclerview.

otifik avatar otifik commented on September 23, 2024

我是在布局文件中添加的左侧菜单

from swipemenurecyclerview.

aitsuki avatar aitsuki commented on September 23, 2024

是的,2.1.0

感谢反馈

from swipemenurecyclerview.

aitsuki avatar aitsuki commented on September 23, 2024

@otifik 能把相关布局文件发一下吗,我这边无法复现。只能猜测是左菜单的布局层级可能在content之上,所以看起来没有动画。

from swipemenurecyclerview.

aitsuki avatar aitsuki commented on September 23, 2024
<com.aitsuki.swipe.SwipeLayout
    app:autoClose="true"
    app:designer="@string/classic_designer"
    app:preview="none">

    <!-- This is the left menu, because it specifies `layout_gravity=start` -->
    <TextView
        ...
        android:layout_gravity="start" />

    <!-- This is the right menu -->
    <TextView
        ...
        android:layout_gravity="end" />

    <!-- This is the content, because it dows not specify `layout_gravity` -->
    <TextView />

</com.aitsuki.swipe.SwipeLayout>

你看看是不是按照这种顺序设定的层级,content必须是最上层的View。

from swipemenurecyclerview.

otifik avatar otifik commented on September 23, 2024
<com.aitsuki.swipe.SwipeLayout
    app:autoClose="true"
    app:designer="@string/classic_designer"
    app:preview="none">

    <!-- This is the left menu, because it specifies `layout_gravity=start` -->
    <TextView
        ...
        android:layout_gravity="start" />

    <!-- This is the right menu -->
    <TextView
        ...
        android:layout_gravity="end" />

    <!-- This is the content, because it dows not specify `layout_gravity` -->
    <TextView />

</com.aitsuki.swipe.SwipeLayout>

你看看是不是按照这种顺序设定的层级,content必须是最上层的View。

https://github.com/otifik/NoTanking/blob/main/app/src/main/res/layout/item_todo_app.xml
这是我原来的布局,然后我在此基础上在SwipeLayout中又添加了

< LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start" >

    <TextView
        android:layout_width="100dp"
        android:layout_height="match_parent"
        android:textSize="15sp"
        android:text="标记"
        android:gravity="center"
        android:background="@color/blue_200"
        android:clickable="true"
        android:foreground="?attr/selectableItemBackground"/>

</LinearLayout>

然后就会突然出现了,
你可以把我这个app clone下来调试一下

from swipemenurecyclerview.

aitsuki avatar aitsuki commented on September 23, 2024

@otifik 找到原因了,你可以先给content设置下background暂时解决这个问题。

你可以试试overlay这个designer,如果content不设置背景,都会出现没有过渡动画的问题。这是因为overlay的菜单本质上一直重叠在content下面,只是Invisible了,在开启菜单的时候会变为visible。如果content没有背景的话,就直接看到菜单了。

而这个issue中使用的designer是parallax,菜单是布局在content外面的,没有重叠,所以即使content是透明的也不会看到菜单。而左菜单有问题这个确实是个bug,我没处理好parallax的左菜单滑动,这个bug我会尽快修复😄

from swipemenurecyclerview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.