aitsuki / swipemenurecyclerview Goto Github PK
View Code? Open in Web Editor NEWSwipe menu for recyclerView. Android 侧滑菜单,可轻松定制各种样式的菜单。
License: MIT License
Swipe menu for recyclerView. Android 侧滑菜单,可轻松定制各种样式的菜单。
License: MIT License
如题
采用shape的方式自定义的background,如果设置给content,则menu的拖拽效果会失效,会变成突然出现的样子
openRigthMenu(false) : 长按显示 menu 后, menu 的位置是空白,再左滑一点位置会出现,可能是openRigthMenu里面调用invalite() 之前,需要requestLayout();手动修改添加 requestLayout() 显示以后,手指ACTION_UP 时,menu 又会自动关闭;
openRigthMenu(true):长按不会完全显示menu。
How to hide divided line?
Hi :
Thank you for your library,it's really helpful to me !
I wanna how to cancel the SwipeItemLayout‘s sliding function?Can you add the api ?
红米note3手机左右滑动,还没点击删除操作自动又返回原样
I want to open all items but when i open second item the first item close automatically..
I have set app:autoClose="false" But its not working . Please look it. Thanks
大佬好,有一个需求,当侧滑菜单展开时,点击菜单内的View会自动关闭菜单,希望能增加一个是否自动关闭可以让用户控制的开关,如果设置成不自动关闭,用户可以自行在点击事件里调用关闭菜单
比如从现在RecycleView中,第5条rightMenu处于open状态,执行notifyDatasetChange,这个时候,第5条的状态会变为初始关闭状态,而第1条或2条的rightMenu处于open状态,能修复一下吗?
原因可能是RecycleView复用导致的
当我在ViewPager2中使用Fragment,并且在Fragment添加SwipeMenuRecyclerView ,会出现下面视频那样的错误。并且只有在ViewPager2的currentItem大于2时才会出现
。
README.md里增加Layout的height、width吧
当布局切换成 RTL
以后,LEFT 和 RIGHT 会调换位置,所以在布局上已经没什么问题,但实际上此时 rightMenu 在左侧,leftMenu在右侧,故:openXXXMenu() 和 closeXXXMenu() 操作的是相反的 menu, 只需要添加一行判断,如果是 RTL
布局就判断 activeMenu 是否是相反的 menu 即可
private val isRtl by lazy {
TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == ViewCompat.LAYOUT_DIRECTION_RTL
}
fun openLeftMenu(animate: Boolean = true) {
activeMenu = if(isRtl) rightMenu else leftMenu
openActiveMenu(animate)
}
同理:
fun isLeftMenuOpened(): Boolean {
val activeMenu = activeMenu ?: return false
return activeMenu == (if(isRtl) rightMenu else leftMenu) && openState and FLAG_IS_OPENED == FLAG_IS_OPENED
}
fun isRightMenuOpened(): Boolean {
val activeMenu = activeMenu ?: return false
return activeMenu == (if(isRtl) leftMenu else rightMenu) && openState and FLAG_IS_OPENED == FLAG_IS_OPENED
}
怎么混合使用?左边LongMenu, 右边Parallax,左边LongMenu的时候,如果距离小,显示Classic,如果距离大的时候,是LongMenu。可以实现这种效果吗
https://github.com/otifik/Pictures/blob/main/30784966277074024279978955371.gif
这是出现bug时的录屏
机型为小米10安卓12,在小米6安卓9上也是这样
RecyclerView父控件是SwipeRefreshLayout时,侧滑时会出现下拉刷新,请问一下这该怎么解决?
Hello, thank you for a great job.
Sometimes I have faced with the android:foreground="?attr/selectableItemBackground"
I got stuck in the selected mode when playing ripple effect and then scrolling. Do you have any ideas on how to solve that?
自定义FrameLayout监听不到ACTION_MOVE事件
我在使用SwipeRecyclerView的时候,用协程和retrofit从服务端数据库读取数据并更新UI,但在刷新过程中发现滑出来的Menu会在刷新UI的时候上移4~6位,即原来打开的是15的item的菜单,会突然变成11的item打开菜单。请问这是该如何进行调整才能避免在adapter中使用notifyDataSetChanged()时不会出现这个问题?
How to set app:preview programatically instead of in xml file . how we did that ?
Thanks
Hi,xml配置过menu后,如果使用代码动态控制menu的隐藏和显示
When we swipe View how to identify which menu currently open .
如题。
How can I disable only one direction swipe (left or right)?
When running Proguard/R8 Designer
subclasses are minified/obfuscated and it creates crash in parseDesigner
method. Adding
-keep class com.aitsuki.swipe.SwipeLayout$ClassicDesigner
-keep class com.aitsuki.swipe.SwipeLayout$OverlayDesigner
-keep class com.aitsuki.swipe.SwipeLayout$ParallaxDesigner
to proguard-rules.pro
will solve it so you should probably add this to readme.
你好,有幸用到你的库,可以帮忙看看目前遇到的一个现象,demo没问题,SwipeMenuRecyclerView中使用问题描述如下:
1.仅右侧菜单,滑动打开菜单,然后滑动关闭,checkCanDrag函数当前openState为0,不进入isTouchContent,所以没有关闭,且滑动其他地方都不会关。demo中的openState=1开始,所以关闭了。
如果第一次滑动打开,然后滑动其他的item会关闭,只是滑动当前打开的item,关闭不了。
2.仅左侧菜单,无问题
3.左右菜单都有,右侧有问题
menu使用LinearLayout
content 使用ConstraintLayout会导致无法滑动
content 换成LinearLayout 没有问题
希望作者能看一下
I declared all dependencies, but got compile error:
What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.github.aitsuki:SwipeMenuRecyclerView:2.0.2.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/github/aitsuki/SwipeMenuRecyclerView/2.0.2/SwipeMenuRecyclerView-2.0.2.pom
- https://repo.maven.apache.org/maven2/com/github/aitsuki/SwipeMenuRecyclerView/2.0.2/SwipeMenuRecyclerView-2.0.2.pom
- https://jcenter.bintray.com/com/github/aitsuki/SwipeMenuRecyclerView/2.0.2/SwipeMenuRecyclerView-2.0.2.pom
Required by:
project :app
Use Android Studio 2020.3.1. On https://jcenter.bintray.com/com/github/aitsuki/SwipeMenuRecyclerView/2.0.2/SwipeMenuRecyclerView-2.0.2.pom got "403 Forbidden" error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.