guoshen
2024-06-29 5325e22a184b53aadcc5e9552cb1ec54f9c8ad81
app/src/main/java/com/application/zhangshi_app_android/ui/function/AnnualHealthStatusActivity.java
@@ -37,8 +37,7 @@
    private boolean isSearchLayoutVisible;
    private PopupWindow mOperatePopupWindow;
    @Override
    public int getLayoutId() {
        return R.layout.activity_annual_health_status;
    public int getLayoutId() {return R.layout.activity_annual_health_status;
    }
    @Override
@@ -69,12 +68,14 @@
        binding.recyclerView.addItemDecoration(itemDecoration);
        binding.recyclerView.setAdapter(adapter);
        //右上角操作弹窗
        mOperatePopupWindow = initPopUpWindow(View.inflate(this,R.layout.pop_operate,null));
        mOperatePopupWindow = initPopUpWindow(View.inflate(this, R.layout.pop_operate_exam_info, null));
        setOnClickListener(
                mOperatePopupWindow.getContentView().findViewById(R.id.tv_add),
                mOperatePopupWindow.getContentView().findViewById(R.id.tv_select),
                mOperatePopupWindow.getContentView().findViewById(R.id.tv_from_new_to_old),
                mOperatePopupWindow.getContentView().findViewById(R.id.tv_from_old_to_new)
                mOperatePopupWindow.getContentView().findViewById(R.id.tv_from_old_to_new),
                mOperatePopupWindow.getContentView().findViewById(R.id.tv_exam_info),
                mOperatePopupWindow.getContentView().findViewById(R.id.tv_health_care)
        );
        //点击放大镜按钮显示出搜索框
        binding.ivSearchDefault.setOnClickListener(v -> {
@@ -235,7 +236,7 @@
            if (integer == 0){
                binding.ivOperate.setBackgroundResource(R.drawable.ic_operate);
                binding.ivOperate.setOnClickListener(v -> {
                    mOperatePopupWindow.showAsDropDown(binding.ivOperate,-ScreenSizeUtils.dip2px(this,85) +binding.ivOperate.getWidth(),0);
                    mOperatePopupWindow.showAsDropDown(binding.ivOperate,-ScreenSizeUtils.dip2px(this,118) +binding.ivOperate.getWidth(),0);
                });
                adapter.setCheckable(false);
            }else if (integer == 1){
@@ -311,6 +312,12 @@
        } else if (id == R.id.tv_from_old_to_new) {
            viewModel.changeOrder(false);
            mOperatePopupWindow.dismiss();
        }else if (id == R.id.tv_health_care){
            AppManager.getAppManager().startActivity(HealthCareActivity.class);
            mOperatePopupWindow.dismiss();
        }else if (id == R.id.tv_exam_info){
            AppManager.getAppManager().startActivity(ExaminationInfoActivity.class);
            mOperatePopupWindow.dismiss();
        }
    }
@@ -336,8 +343,5 @@
        return super.dispatchTouchEvent(event);
    }
    @Override
    public void onLeftClick(TitleBar titleBar) {
        finish();
    }
}