private OptionsPickerView pvOptions;
..............
pvOptions =new OptionsPickerBuilder(AddressAddActivity.this,new OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1,int options2,int options3 ,View v) {
//返回的分别是三个级别的选中位置
String addresss =mProvinces.get(options1).getName() +" "
+mCities.get(options1).get(options2)+" "
+mDistricts.get(options1).get(options2).get(options3);
mTxtAddress.setText(addresss);
}
})
.setTitleText("选择城市")
.setCyclic(false,false,false)
.setCancelText("Cancel")//取消按钮文字
.setSubmitText("Sure")//确认按钮文字
.setContentTextSize(18)//滚轮文字大小
.setTitleSize(20)//标题文字大小
.setLabels("省","市","区")//设置选择的三级单位
.build();
pvOptions.setPicker((ArrayList)mProvinces,mCities,mDistricts);
pvOptions.show();