资源简介

Android weelview自定义的时间、地区选择器

资源截图

代码片段和文件信息

package com.alex.pickaddress;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONobject;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.alex.pickaddress.wheel.widget.adapters.AbstractWheelTextAdapter;
import com.alex.pickaddress.wheel.widget.views.OnWheelChangedListener;
import com.alex.pickaddress.wheel.widget.views.OnWheelScrollListener;
import com.alex.pickaddress.wheel.widget.views.WheelView;

/**
 * 更改封面对话框
 * 
 * @author Alex
 *
 */
public class ChangeAddressDialog extends Dialog implements android.view.View.onclickListener {

private WheelView wvProvince;
private WheelView wvCitys;
private View lyChangeAddress;
private View lyChangeAddressChild;
private TextView btnSure;
private TextView btnCancel;

private Context context;
private JSONobject mJsonObj;
private String[] mProvinceDatas;
private Map mCitisDatasMap = new HashMap();

private ArrayList arrProvinces = new ArrayList();
private ArrayList arrCitys = new ArrayList();
private AddressTextAdapter provinceAdapter;
private AddressTextAdapter cityAdapter;

private String strProvince = “四川“;
private String strCity = “成都“;
private OnAddressCListener onAddressCListener;

private int maxsize = 24;
private int minsize = 14;

public ChangeAddressDialog(Context context) {
super(context R.style.ShareDialog);
this.context = context;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dialog_myinfo_changeaddress);

wvProvince = (WheelView) findViewById(R.id.wv_address_province);
wvCitys = (WheelView) findViewById(R.id.wv_address_city);
lyChangeAddress = findViewById(R.id.ly_myinfo_changeaddress);
lyChangeAddressChild = findViewById(R.id.ly_myinfo_changeaddress_child);
btnSure = (TextView) findViewById(R.id.btn_myinfo_sure);
btnCancel = (TextView) findViewById(R.id.btn_myinfo_cancel);

lyChangeAddress.setonclickListener(this);
lyChangeAddressChild.setonclickListener(this);
btnSure.setonclickListener(this);
btnCancel.setonclickListener(this);

initJsonData();
initDatas();
initProvinces();
provinceAdapter = new AddressTextAdapter(context arrProvinces getProvinceItem(strProvince) maxsize minsize);
wvProvince.setVisibleItems(5);
wvProvince.setViewAdapter(provinceAdapter);
wvProvince.setCurrentItem(getProvinceItem(strProvince));

initCitys(mCitisDatasMap.get(strProvince));
cityAdapter = new AddressTextAdapter(context arrCitys getCityItem(strCity) maxsize minsize);
wvCitys.setVisibleItems(5);
wvCitys.setViewAd

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-03-22 21:45  PickAddressAndDate\
     目录           0  2017-03-09 21:12  PickAddressAndDate\.gradle\
     目录           0  2017-03-09 21:12  PickAddressAndDate\.gradle\2.10\
     目录           0  2017-03-09 21:12  PickAddressAndDate\.gradle\2.10\taskArtifacts\
     文件          31  2017-03-09 21:12  PickAddressAndDate\.gradle\2.10\taskArtifacts\cache.properties
     文件          17  2017-03-24 15:38  PickAddressAndDate\.gradle\2.10\taskArtifacts\cache.properties.lock
     文件      175782  2017-03-24 15:38  PickAddressAndDate\.gradle\2.10\taskArtifacts\fileHashes.bin
     文件     1960497  2017-03-24 15:38  PickAddressAndDate\.gradle\2.10\taskArtifacts\fileSnapshots.bin
     文件       21752  2017-03-24 15:38  PickAddressAndDate\.gradle\2.10\taskArtifacts\outputFileStates.bin
     文件       98432  2017-03-24 15:38  PickAddressAndDate\.gradle\2.10\taskArtifacts\taskArtifacts.bin
     目录           0  2017-03-09 21:12  PickAddressAndDate\.gradle\2.10\tasks\
     目录           0  2017-03-09 21:12  PickAddressAndDate\.gradle\2.10\tasks\_app_compileDebugJavaWithJavac\
     目录           0  2017-03-09 21:12  PickAddressAndDate\.gradle\2.10\tasks\_app_compileDebugJavaWithJavac\localClassSetAnalysis\
     文件       33790  2017-03-24 15:32  PickAddressAndDate\.gradle\2.10\tasks\_app_compileDebugJavaWithJavac\localClassSetAnalysis\localClassSetAnalysis.bin
     文件          17  2017-03-24 15:32  PickAddressAndDate\.gradle\2.10\tasks\_app_compileDebugJavaWithJavac\localClassSetAnalysis\localClassSetAnalysis.lock
     目录           0  2017-03-09 21:12  PickAddressAndDate\.gradle\2.10\tasks\_app_compileDebugJavaWithJavac\localJarClasspathSnapshot\
     文件       19203  2017-03-24 15:32  PickAddressAndDate\.gradle\2.10\tasks\_app_compileDebugJavaWithJavac\localJarClasspathSnapshot\localJarClasspathSnapshot.bin
     文件          17  2017-03-24 15:32  PickAddressAndDate\.gradle\2.10\tasks\_app_compileDebugJavaWithJavac\localJarClasspathSnapshot\localJarClasspathSnapshot.lock
     目录           0  2017-03-24 15:42  PickAddressAndDate\.idea\
     文件          18  2017-03-22 21:48  PickAddressAndDate\.idea\.name
     文件         727  2017-03-22 21:48  PickAddressAndDate\.idea\compiler.xml
     目录           0  2017-03-22 21:48  PickAddressAndDate\.idea\copyright\
     文件          76  2017-03-22 21:48  PickAddressAndDate\.idea\copyright\profiles_settings.xml
     目录           0  2017-03-22 21:51  PickAddressAndDate\.idea\dictionaries\
     文件          85  2017-03-22 21:51  PickAddressAndDate\.idea\dictionaries\Alex.xml
     文件         200  2017-03-22 21:48  PickAddressAndDate\.idea\encodings.xml
     文件         739  2017-03-22 21:48  PickAddressAndDate\.idea\gradle.xml
     目录           0  2017-03-22 21:48  PickAddressAndDate\.idea\libraries\
     文件         426  2017-03-22 21:48  PickAddressAndDate\.idea\libraries\appcompat_v7_21_0_3.xml
     文件         577  2017-03-22 21:48  PickAddressAndDate\.idea\libraries\support_annotations_21_0_3.xml
     文件         770  2017-03-22 21:48  PickAddressAndDate\.idea\libraries\support_v4_21_0_3.xml
............此处省略77个文件信息

评论

共有 条评论