From d6e29e229c86b31004eff30093fca27c4ce3b3e7 Mon Sep 17 00:00:00 2001 From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674> Date: 星期五, 31 三月 2017 18:01:02 +0800 Subject: [PATCH] --- VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/dialog/CountrySelectionDialog.java | 27 ++++----------------------- 1 files changed, 4 insertions(+), 23 deletions(-) diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/dialog/CountrySelectionDialog.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/dialog/CountrySelectionDialog.java index 7993c4d..3e2b52e 100644 --- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/dialog/CountrySelectionDialog.java +++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/dialog/CountrySelectionDialog.java @@ -14,8 +14,7 @@ import com.bsk.zhangbo.demoforbsk.R; import cn.com.basic.face.adapter.MyWheelAdapter; -import cn.com.basic.face.listeners.OkButtonClickedListener; -import cn.com.basic.face.util.CountryPresenter; +import cn.com.basic.face.util.OkButtonClickedListener; import com.wx.wheelview.widget.WheelView; @@ -23,11 +22,8 @@ import java.util.HashMap; import java.util.List; -/** - * Created by Sinoe on 2017/2/28. - */ - public class CountrySelectionDialog extends PopupWindow implements View.OnClickListener, WheelView.OnWheelItemSelectedListener { + private Context mContext; private View view; private TextView mTvConfirm, mTvCancel; @@ -35,12 +31,10 @@ private HashMap<String, List<String>> countryData; private List<String> countryWordList; private List<String> countryList; - private CountryPresenter countryPresenter; public CountrySelectionDialog(Context context, String[] countryWordData, List<String> countryWordList, HashMap<String, List<String>> countryData) { this.mContext = context; - countryPresenter = new CountryPresenter(context); view = LayoutInflater.from(context).inflate(R.layout.dialog_country, null); mWheelViewTitle = (WheelView) view.findViewById(R.id.pop_country_title); mWheelViewTitle.setOnWheelItemSelectedListener(this); @@ -50,13 +44,9 @@ mTvConfirm = (TextView) view.findViewById(R.id.pop_country_confirm); mTvCancel.setOnClickListener(this); mTvConfirm.setOnClickListener(this); - - //String[] countryWordData = DictionaryMng.countryWordData; - this.countryWordList = countryWordList;//DictionaryMng.countryWordList; - this.countryData = countryData;//DictionaryMng.countryData; - + this.countryWordList = countryWordList; + this.countryData = countryData; countryList = countryData.get(countryWordList.get(mWheelViewTitle.getSelection())); - mWheelViewTitle.setWheelAdapter(new MyWheelAdapter(context)); mWheelViewTitle.setSkin(WheelView.Skin.Holo); mWheelViewTitle.setWheelSize(5); @@ -74,9 +64,7 @@ mWheelViewTitle.setStyle(style); mWheelViewName.setStyle(style); initData(); - //澶栭儴鍙偣鍑� setOutsideTouchable(true); - view.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { @@ -100,17 +88,10 @@ } }); - /* - 璁剧疆绐楀彛鐗瑰緛 - */ - //璁剧疆瑙嗗浘 this.setContentView(this.view); - //璁剧疆绐楀彛瀹介珮 this.setHeight(RelativeLayout.LayoutParams.MATCH_PARENT); this.setWidth(RelativeLayout.LayoutParams.MATCH_PARENT); - //璁剧疆寮瑰嚭绐楀彛鍙偣鍑� this.setFocusable(true); - //瀹炰緥鍖朇olor ColorDrawable colorDrawable = new ColorDrawable(0x7f000000); this.setBackgroundDrawable(colorDrawable); this.setAnimationStyle(R.style.PopupAnimation); -- Gitblit v1.8.0