Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddressPicker地址选择器, 能用什么方法在添加进去个不限 #258

Closed
harryhasai opened this issue Aug 6, 2021 · 2 comments
Closed

Comments

@harryhasai
Copy link

harryhasai commented Aug 6, 2021

如题, 业务需求需要有筛选功能, 目前的地址选择器里面只要选择了某个省市区就不可逆了, 能否添加个不限进去, 或者告诉我有啥方法可以自己手动添加数据进去

当前使用版本
implementation 'com.github.gzu-liyujiang.AndroidPicker:AddressPicker:3.1.0'

@liyujiang-gzu
Copy link
Member

如题, 业务需求需要有筛选功能, 目前的地址选择器里面只要选择了某个省市区就不可逆了, 能否添加个不限进去, 或者告诉我有啥方法可以自己手动添加数据进去

当前使用版本
implementation 'com.github.gzu-liyujiang.AndroidPicker:AddressPicker:3.1.0'

可以试试在你的app模块的assets目录下的放置china_address.json覆盖AddressPicker自带的:

[
  {
    "code": "0",
    "name": "不限",
    "cityList": [
      {
        "code": "0",
        "name": "不限",
        "areaList": [
          {
            "code": "0",
            "name": "不限"
          }
      }
   },
  {
    "code": "110000",
    "name": "北京市",
    "cityList": [
      {
        "code": "110000",
        "name": "北京市",
        "areaList": [
          {
            "code": "110101",
            "name": "东城区"
          },
          {
            "code": "110102",
            "name": "西城区"
          },
          {
            "code": "110105",
...

@harryhasai
Copy link
Author

按照大佬的方式果然解决了, 谢谢大佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants