admin管理员组

文章数量:1531688

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

*/

本文标签: 滑动代码效果选中置顶