admin管理员组文章数量:1568307
2024年5月22日发(作者:)
}
View underView = null;
if (dy > 0) {
underView = ildViewUnder((), suredHeight() + 1);
} else {
underView = ildViewUnder((), 0);
}
if (underView != null && tentDescription() != null) {
int position = nt(tentDescription().toString());
ProductListEntity menu = uOfMenuByPosition(position);
if (leftClickType || !eName().equals(eName())) {
if (dy > 0 && nslationY() <= 1 && nslationY() >= -1 * suredHeight() * 4 / 5
&& !leftClickType) {// ()>9
int dealtY = () - suredHeight();
nslationY(dealtY);
} else if (dy < 0 && nslationY() <= 0 && !leftClickType) {
t(eName());
int dealtY = tom() - suredHeight();
nslationY(dealtY);
} else {
nslationY(0);
headMenu = menu;
t(eName());
for (int i = 0; i < (); i++) {
if ((i) == headMenu) {
ectedNum(i);
break;
}
}
if (leftClickType) leftClickType = false;
}
}
}
}
});
```
```
private void showHeadView() {
nslationY(0);
View underView = ildViewUnder((), 0);
if (underView != null && tentDescription() != null) {
int position = nt(tentDescription().toString());
ProductListEntity entity = uOfMenuByPosition(position + 1);
headMenu = entity;
t(eName());
for (int i = 0; i < (); i++) {
if ((i) == headMenu) {
ectedNum(i);
break;
}
}
}
}
```
以上代码就是两个列表滑动交互右侧的主要代码,以上实现的是右侧滑动分组置顶的效果
接下来就是
###右侧滑动,左侧选中
选中的主要代码是LeftProductTypeAdapter中的setSelectedNum();
```
/**
* 选中左侧区域
*
* @param selectedNum
*/
版权声明:本文标题:Android美团购物车效果 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1716374074a500195.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论