Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/limxing/CityPickerWebView

省市县三级联动,JS实现
https://github.com/limxing/CityPickerWebView

Last synced: about 1 month ago
JSON representation

省市县三级联动,JS实现

Awesome Lists containing this project

README

        

# CityPickerWebView
省市县三级联动,JS实现

添加依赖
```
compile 'me.leefeng:citypicker:1.0'
```

使用方法:

onCreat()中:
```
cityPicker = new CityPicker(MainActivity.this, this);

```
打开选择器:
```
cityPicker.show();

```

监听方法回调:
```
@Override
public void getCity(final String name) {
textView.setText(name);
}
```

处理返回键:
```
@Override
public void onBackPressed() {
if (cityPicker.isShow()){
cityPicker.close();
return;
}
super.onBackPressed();
}
```

参考文献:mui