Comments (7)
https://github.com/otifik/Pictures/blob/main/30784966277074024279978955371.gif 这是出现bug时的录屏 机型为小米10安卓12,在小米6安卓9上也是这样
好的,我排查下问题,是通过代码动态设置可以滑动的方向是吗。
from swipemenurecyclerview.
我是在布局文件中添加的左侧菜单
from swipemenurecyclerview.
是的,2.1.0
感谢反馈
from swipemenurecyclerview.
@otifik 能把相关布局文件发一下吗,我这边无法复现。只能猜测是左菜单的布局层级可能在content之上,所以看起来没有动画。
from swipemenurecyclerview.
<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.
<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.
@otifik 找到原因了,你可以先给content设置下background暂时解决这个问题。
你可以试试overlay这个designer,如果content不设置背景,都会出现没有过渡动画的问题。这是因为overlay的菜单本质上一直重叠在content下面,只是Invisible了,在开启菜单的时候会变为visible。如果content没有背景的话,就直接看到菜单了。
而这个issue中使用的designer是parallax,菜单是布局在content外面的,没有重叠,所以即使content是透明的也不会看到菜单。而左菜单有问题这个确实是个bug,我没处理好parallax的左菜单滑动,这个bug我会尽快修复😄
from swipemenurecyclerview.
Related Issues (20)
- xml配置过menu后,如果使用代码动态控制menu的隐藏和显示 HOT 1
- end使用LinearLayout content 使用ConstraintLayout会导致无法滑动 HOT 2
- 长按 RecyclerView 的 Item 显示menu问题 HOT 13
- RTL 支持 HOT 4
- 怎么混合使用?左边LongMenu, 右边Parallax HOT 1
- Auto Close property not working HOT 3
- How to identify which menuView currently open ? e.g LeftMenu,Right etc HOT 1
- 侧滑监听
- How to set app:preview programatically HOT 1
- Selectable Stuck selected some times. HOT 2
- README.md里增加Layout的height、width吧 HOT 1
- problem with divided line
- parallax设置margin无效
- 当侧滑菜单展开时,点击菜单内的View会自动关闭菜单,希望是否自动关闭可以让用户自己控制 HOT 2
- 上下滑动时可以不自动关闭菜单的吗 HOT 1
- viewHoder的根部局的点击事件失效了
- 根部局的点击事件失效了 HOT 1
- 偶现删除按钮点击事件失效
- 轮询数据对RecyclerView刷新时,openMenu错位 HOT 3
- 菜单展开的时候,执行notifyDatasetChange,状态会错位 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swipemenurecyclerview.