Select City Data
Add Bintray Repositories
allprojects { repositories { jcenter() maven { url "http://dl.bintray.com/eyyoung/maven" } } }
Add dependency
compile 'me.yytech.android.CitySelect:library:1.0.+@aar'
Provide two way to use
View In XML
<me.yytech.cityselect.library.CityListView
android:id="@+id/vCity"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Or Simple Activity
public void test(View view) { CitySelectActivity.startCitySelect(this, 0x1000); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode != RESULT_OK) { return; } String city = data.getStringExtra(CitySelectActivity.RESULT_CITY); Toast.makeText(this, city, Toast.LENGTH_LONG).show(); }