![Maven](https://camo.githubusercontent.com/52f8458daedb93452c173dc66a135d488b343c2d6dffac999aa33475ea95e46d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a63656e7465722d416e64726f69642d2d4c696e6b65642d2d566965772d677265656e2e7376673f7374796c653d74727565)
buildscript {
repositories {
jcenter()
}
}
dependencies {
implementation "cn.wzbos.android.widget:linkedview:1.0.1"
}
linkedView.setOnPickedListener(new ILinked.OnPickedListener(){
@Override
public void onPicked(ILinked linkView,PickerResult result){
Toast.makeText(MainActivity.this,result.toString(),Toast.LENGTH_SHORT).show();
}
});
linkedView.setData(data);
Json data format
![](https://raw.githubusercontent.com/KempLi/Android-Linked-View/master/screenshot/sc1.png)
linkedView.setOnCreatePickerViewListener(new ILinked.OnCreatePickerViewListener() {
@Override
public void onCreatePickerView(PickerView prevView, int prevPosition, PickerView nextView, int nextPosition) {
}
});
linkedView.setOnPickerViewItemClickedListener(new ILinked.OnPickerViewItemClickedListener() {
@Override
public void onPickerViewItemClicked(PickerView pickerView, int position, IPickerData data) {
}
});
linkedView.setOnPickedListener(new ILinked.OnPickedListener() {
@Override
public void onPicked(ILinked linkView, PickerResult result) {
Toast.makeText(MainActivity.this, result.toString(), Toast.LENGTH_SHORT).show();
}
});
linkedView.setData(data);
LinkedPopupWindow
![](https://raw.githubusercontent.com/KempLi/Android-Linked-View/master/screenshot/sc4.png)
LinkedPopupWindow popupWindow = new LinkedPopupWindow(this);
popupWindow.setDivider(true);
popupWindow.addPickerView(new PickerView(this)
.setWidth(200)
.setShowDivider(true)
.setStateBackground(R.drawable.bg_item_pop)
.setTxtAlignment(View.TEXT_ALIGNMENT_CENTER)
.setData(getPickerData()));
popupWindow.addPickerView(new PickerView(this)
.setData(getPickerData())
.setShowDivider(true)
.setTxtAlignment(View.TEXT_ALIGNMENT_CENTER)
.setStateBackground(R.drawable.bg_item_pop));
popupWindow.setOnPickedListener((linkView, result) -> Toast.makeText(MainActivity.this, result.toString(), Toast.LENGTH_SHORT).show());
popupWindow.showAtBottom(view);