| | |
| | | import com.application.zhangshi_app_android.databinding.ActivityPropertyBinding; |
| | | import com.application.zhangshi_app_android.ui.DLBaseActivity; |
| | | import com.github.gzuliyujiang.wheelpicker.DatePicker; |
| | | import com.github.gzuliyujiang.wheelpicker.OptionPicker; |
| | | import com.github.gzuliyujiang.wheelpicker.contract.OnDatePickedListener; |
| | | import com.github.gzuliyujiang.wheelpicker.contract.OnOptionPickedListener; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Ljj |
| | |
| | | mOperatePopupWindow = initPopUpWindow(View.inflate(this,R.layout.pop_operate,null)); |
| | | mOperatePopupWindow.getContentView().findViewById(R.id.layout_add).setVisibility(View.GONE); |
| | | mOperatePopupWindow.getContentView().findViewById(R.id.layout_select).setVisibility(View.GONE); |
| | | mOperatePopupWindow.getContentView().findViewById(R.id.layout_own_top).setVisibility(View.GONE); |
| | | mOperatePopupWindow.getContentView().findViewById(R.id.tv_from_new_to_old).setOnClickListener(v -> { |
| | | viewModel.sortDataList(0); |
| | | mOperatePopupWindow.dismiss(); |
| | |
| | | binding.etStartTime.setText(""); |
| | | binding.etEndTime.setText(""); |
| | | }); |
| | | binding.etIsChange.setOnClickListener(v -> { |
| | | List<String> list = new ArrayList<>(); |
| | | list.add("变更"); |
| | | list.add("注销"); |
| | | OptionPicker picker = getOptionPicker(list); |
| | | picker.setTitle("变更或注销"); |
| | | picker.setOnOptionPickedListener(new OnOptionPickedListener() { |
| | | @Override |
| | | public void onOptionPicked(int position, Object item) { |
| | | binding.etIsChange.setText(item.toString()); |
| | | } |
| | | }); |
| | | picker.show(); |
| | | }); |
| | | binding.etIsLogout.setOnClickListener(v -> { |
| | | List<String> list = new ArrayList<>(); |
| | | list.add("是"); |
| | | list.add("否"); |
| | | OptionPicker picker = getOptionPicker(list); |
| | | picker.setTitle("是否注销"); |
| | | picker.setOnOptionPickedListener(new OnOptionPickedListener() { |
| | | @Override |
| | | public void onOptionPicked(int position, Object item) { |
| | | binding.etIsLogout.setText(item.toString()); |
| | | } |
| | | }); |
| | | picker.show(); |
| | | }); |
| | | } |
| | | @Override |
| | | public boolean dispatchTouchEvent(MotionEvent event) { |