地址联动控件AddressPicker

项目地址:https://github.com/Callanna/CustomView

地址联动控件AddressPicker

  • AddressPicker
地址联动控件AddressPicker_第1张图片
demo5
 

    

in code:

AddressPicker addressPicker =  ((AddressPicker)findViewById(R.id.address));

//地址变化监听回调
 addressPicker.setOnAddressPickListener(new AddressPicker.OnAddressPickListener() {
            @Override
            public void onAddressPicked(final String province, final String city, final String county) {
                Log.d("duanyl", "onAddressPicked: "+province+city+county);
                //TODO 
              }   
            }
        });
  //设置地址 
  addressPicker.setProvince("浙江");
  addressPicker.setCity("杭州");
  addressPicker.setRegion(“西湖区”);

  //获取当前地址信息
  addressPicker.getCurrentAddress()
...

你可能感兴趣的:(地址联动控件AddressPicker)