Comments (1)
可以是可以的。参见我fork后修改的版本:
https://github.com/luqiming666/SwipeRecyclerView
我增加了侧滑菜单展开/收起的回调通知:OnItemMenuStateListener,然后在收到菜单展开通知时这么处理:
public void onMenuState(RecyclerView.ViewHolder viewHolder, int menuState) {
MainAdapter.ViewHolder vh = (MainAdapter.ViewHolder) viewHolder;
if (menuState == OPEN) {
vh.setHiddenView(true);
// 尝试修改菜单项的状态
SwipeMenuLayout menuLayout = (SwipeMenuLayout) vh.itemView;
if (menuLayout.hasRightMenu()) {
SwipeMenuView rightMenuView = (SwipeMenuView) menuLayout.getChildAt(2);
View view1 = rightMenuView.getChildAt(0); // 第一个menu item
view1.setEnabled(false);
}
Toast.makeText(DefineActivity.this, "菜单已展开,位置:" + viewHolder.getAdapterPosition(), Toast.LENGTH_SHORT).show();
} else {
vh.setHiddenView(false);
Toast.makeText(DefineActivity.this, "菜单已收起,位置:" + viewHolder.getAdapterPosition(), Toast.LENGTH_SHORT).show();
}
}
from swiperecyclerview.
Related Issues (20)
- DefineActivity 自定义菜单 右菜单展开,向下滑动recyclerView会错乱
- 设置子条目高度无效
- 侧滑菜单和NestedScrollView滑动冲突 HOT 3
- AAPT: error: duplicate value for resource 'attr/contentViewId' with config ''.
- 多个viewtype没法拖动了
- 请问,停止维护了吗?
- 侧滑内容控制 HOT 2
- 迁移一下 mavenCentral()
- 散了散了 没维护了 listview拖动点进去就蹦
- 使用expandable模式一定会报错吧
- 还维护吗?遇到bug HOT 1
- fork了一个版本,我先维护着 HOT 2
- 侧滑打开关闭可否加一个监听回调呢、 HOT 1
- 不建议使用 HOT 1
- 不支持 settag() HOT 1
- 和BaseQuickAdapter 点击事件好用 但是侧滑按钮出现问题了 HOT 1
- GridSectionAverageGapItemDecoration 设置间距无效
- 有没有可以设置item之间的间距?这样左中右都保持一致 HOT 1
- 拖动展示列表跟实际数据列表不一致
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 swiperecyclerview.