Android-PickerView icon indicating copy to clipboard operation
Android-PickerView copied to clipboard

setPicker的泛型不能改成? extends T吗,现在3个类型必须一样

Open kanshenmekan opened this issue 5 years ago • 1 comments

kanshenmekan avatar Jul 31 '20 02:07 kanshenmekan

我也遇到了 3 个类型不同的使用场景。采用的适配方案如下:

按顺序建立原始集合到新集合的映射,保证每一项和原始项位置一致。 List<A> -> List<String> List<List<B>> -> List<List<String>> List<List<List<C>>> -> List<List<List<String>>>

onOptionsSelect(int,int,int,View) 方法获取的是选中项的索引,也就是原始项的索引。

但愿对后来者有所帮助。

XuMeng-0 avatar Sep 27 '22 10:09 XuMeng-0