Giter Club home page Giter Club logo

addresspickerlib's Introduction

AddressPickerLib

仿京东地址选择器

依赖方法

在project的build.gradle里面这么写

maven { url 'https://jitpack.io' }

然后在app 的build.gradle

compile 'com.github.ywp0919:AddressPickerLib:1.0.1'  

看图片效果可以前往博客地址看是不是朋友需要的效果再决定要不要使用。

http://blog.csdn.net/qianniyoushouzuo/article/details/78714847.

使用方法

不管是用在popwindow上还是在activity或者fragment里面,都只要直接就在xml文件里面这么用就行了

<com.ywp.addresspickerlib.AddressPickerView

   android:id="@+id/apvAddress"

   app:layout_constraintBottom_toBottomOf="parent"

   android:layout_width="match_parent"

   android:layout_height="wrap_content">

</com.ywp.addresspickerlib.AddressPickerView>

然后再设置一下回调就行了,如下

addressView.setOnAddressPickerSure(new AddressPickerView.OnAddressPickerSureListener() {

   @Override
   public void onSureClick(String address, String provinceCode, String cityCode, String districtCode) {

       mTvAddress.setText(address);
    
   }

});

addresspickerlib's People

Contributors

ywp0919 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.