Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么获得点击的item项 #2

Open
zhuminjunivan opened this issue Jul 21, 2017 · 7 comments
Open

怎么获得点击的item项 #2

zhuminjunivan opened this issue Jul 21, 2017 · 7 comments

Comments

@zhuminjunivan
Copy link

怎么根据省获取所对应的市,

@yu-guorong
Copy link

作者的没有联动

addressSelector.setOnItemClickListener(new OnItemClickListener() {
            @Override
            public void itemClick(AddressSelector addressSelector, CityInterface city, int tabPosition) {

            }
        });

把city 强转成你自己的实体类 自己拉数据

@Blincheng
Copy link
Owner

二楼正解,或者说大家喜欢用泛型的方式的话也可以拓展

@zhuminjunivan
Copy link
Author

嗯 已解决
public interface OnItemClickListener {
void itemClick(AddressSelector addressSelector,CityInterface city, int tabPosition,int position);
}
增加了position字段

@Blincheng
Copy link
Owner

其实city强转一下就是你要的东西了,没必要新增position

@wn0424
Copy link

wn0424 commented Jun 27, 2018

地址数据应该怎么设置?demo全是死的·······

@Blincheng
Copy link
Owner

https://blog.csdn.net/qq_25867141/article/details/71565953
参考一下setCities()

@wn0424
Copy link

wn0424 commented Jun 27, 2018

3级的地址数据是联动的啊,博主的数据都是写死的啊,要想实现联动的话怎么搞呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants