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);
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 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);