private void initiWheelView() {

    province = getResources().getStringArray(R.array.province);

    areaWheelView.setAdapter(
        new ArrayWheelAdapter<String>(getResources().getStringArray(citytoarea[18][2])));
    areaWheelView.setVisibleItems(5);
    areaWheelView.setCurrentItem(0);

    cityWheelView.setAdapter(
        new ArrayWheelAdapter<String>(getResources().getStringArray(city[18])));
    cityWheelView.setVisibleItems(5);
    cityWheelView.setCurrentItem(2);

    provinceWheelView.setAdapter(new ArrayWheelAdapter<String>(province));
    provinceWheelView.setVisibleItems(5);
    provinceWheelView.setCurrentItem(18);
    OnWheelChangedListener wheelListener =
        new OnWheelChangedListener() {
          @Override
          public void onChanged(WheelView wheel, int oldValue, int newValue) {
            System.out.println("wheel-->" + wheel.getId());
            System.out.println("oldValue-->" + oldValue);
            System.out.println("newValue-->" + newValue);
          }
        };
    provinceWheelView.addChangingListener(wheelListener);
    cityWheelView.addChangingListener(wheelListener);
    OnWheelScrollListener scrollListener =
        new OnWheelScrollListener() {

          @Override
          public void onScrollingStarted(WheelView wheel) {
            // TODO Auto-generated method stub

          }

          @Override
          public void onScrollingFinished(WheelView wheel) {
            System.out.println("wheel-->" + wheel.getId());
            System.out.println("wheel-->" + wheel.getCurrentItem());
            switch (wheel.getId()) {
              case 2131099651:
                setCity(wheel.getCurrentItem());
                provinceId = wheel.getCurrentItem();
                setArea(provinceId, 0);
                break;
              case 2131099652:
                setArea(provinceId, wheel.getCurrentItem());
                break;
            }
          }
        };
    provinceWheelView.addScrollingListener(scrollListener);
    cityWheelView.addScrollingListener(scrollListener);
  }
  public void setArea(int provinceId, int cityId) {

    Log.i("setArea", "provinceId=" + provinceId + "   cityId=" + cityId);
    int length = citytoarea[provinceId].length;

    Log.i("setArea", "citytoarea[provinceId].length=" + length);

    areaWheelView.setAdapter(
        new ArrayWheelAdapter<String>(
            getResources().getStringArray(citytoarea[provinceId][cityId])));
    areaWheelView.setVisibleItems(5);
    areaWheelView.setCurrentItem(0);
  }
 public void setCity(int provinceId) {
   cityWheelView.setAdapter(
       new ArrayWheelAdapter<String>(getResources().getStringArray(city[provinceId])));
   cityWheelView.setVisibleItems(5);
   cityWheelView.setCurrentItem(0);
 }
  @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.setViewAdapter(cityAdapter);
    wvCitys.setCurrentItem(getCityItem(strCity));

    wvProvince.addChangingListener(
        new OnWheelChangedListener() {

          @Override
          public void onChanged(WheelView wheel, int oldValue, int newValue) {
            // TODO Auto-generated method stub
            String currentText = (String) provinceAdapter.getItemText(wheel.getCurrentItem());
            strProvince = currentText;
            setTextviewSize(currentText, provinceAdapter);
            String[] citys = mCitisDatasMap.get(currentText);
            initCitys(citys);
            cityAdapter = new AddressTextAdapter(context, arrCitys, 0, maxsize, minsize);
            wvCitys.setVisibleItems(5);
            wvCitys.setViewAdapter(cityAdapter);
            wvCitys.setCurrentItem(0);
          }
        });

    wvProvince.addScrollingListener(
        new OnWheelScrollListener() {

          @Override
          public void onScrollingStarted(WheelView wheel) {
            // TODO Auto-generated method stub

          }

          @Override
          public void onScrollingFinished(WheelView wheel) {
            // TODO Auto-generated method stub
            String currentText = (String) provinceAdapter.getItemText(wheel.getCurrentItem());
            setTextviewSize(currentText, provinceAdapter);
          }
        });

    wvCitys.addChangingListener(
        new OnWheelChangedListener() {

          @Override
          public void onChanged(WheelView wheel, int oldValue, int newValue) {
            // TODO Auto-generated method stub
            String currentText = (String) cityAdapter.getItemText(wheel.getCurrentItem());
            strCity = currentText;
            setTextviewSize(currentText, cityAdapter);
          }
        });

    wvCitys.addScrollingListener(
        new OnWheelScrollListener() {

          @Override
          public void onScrollingStarted(WheelView wheel) {
            // TODO Auto-generated method stub

          }

          @Override
          public void onScrollingFinished(WheelView wheel) {
            // TODO Auto-generated method stub
            String currentText = (String) cityAdapter.getItemText(wheel.getCurrentItem());
            setTextviewSize(currentText, cityAdapter);
          }
        });
  }