riku
2021-02-25 e102578ebfc95c27aeb13dce13fb82af53a2bead
app/src/main/java/cn/flightfeather/thirdapp/business/widgettype2/HomeFragment_comptent.java
@@ -2,11 +2,13 @@
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.constraint.ConstraintLayout;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
@@ -43,14 +45,15 @@
import java.util.List;
import java.util.Map;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import cn.flightfeather.thirdapp.CommonApplication;
import cn.flightfeather.thirdapp.R;
import cn.flightfeather.thirdapp.adapter.AllListViewAdapter;
import cn.flightfeather.thirdapp.bean.Domainitem;
import cn.flightfeather.thirdapp.bean.Subtask;
import cn.flightfeather.thirdapp.bean.TaskPack;
import cn.flightfeather.thirdapp.bean.entity.Domainitem;
import cn.flightfeather.thirdapp.bean.entity.Subtask;
import cn.flightfeather.thirdapp.bean.vo.TaskPack;
import cn.flightfeather.thirdapp.bean.vo.AreaVo;
import cn.flightfeather.thirdapp.bean.vo.ChargeInfoVo;
import cn.flightfeather.thirdapp.bean.vo.InspectionVo;
@@ -58,6 +61,7 @@
import cn.flightfeather.thirdapp.bean.vo.TaskVo;
import cn.flightfeather.thirdapp.httpservice.ProblemListService;
import cn.flightfeather.thirdapp.httpservice.TaskService;
import cn.flightfeather.thirdapp.module.nightwork.NightWorkManageActivity;
import cn.flightfeather.thirdapp.util.ChartGenerator;
import cn.flightfeather.thirdapp.util.CommonUtils;
import cn.flightfeather.thirdapp.util.Constant;
@@ -324,6 +328,7 @@
        viewHolder1.initViewHolder1();
        viewHolder2.initViewholder2();
        viewHolder3.initViewHolder3();
        viewHolder5.initViewHolder5();
    }
@@ -1186,38 +1191,21 @@
        }
    }
    @BindView(R.id.cl_night_work)
    ConstraintLayout cl_night_work;
    public class ViewHolder5  {
//        ImageView task1,task2;
//        TextView task1date, task1name,task2date, task2name;
        ViewHolder5(Bundle savedInstanceState, View itemView) {
//            task2 = (ImageView) itemView.findViewById(R.id.iv_tody_task2);
//            task1date = (TextView) itemView.findViewById(R.id.tv_tody_task1date);
//            task1name = (TextView) itemView.findViewById(R.id.tv_tody_task1name);
//            task2date = (TextView) itemView.findViewById(R.id.tv_tody_task2date);
//            task2name = (TextView) itemView.findViewById(R.id.tv_tody_task2name);
            itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
//                    mRecyclerViewAdapter.addData(0);
                }
            });
            itemView.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View view) {
//                    mRecyclerViewAdapter.addData(0);
                    return true;
                }
            });
        }
        void refreshView() {
//            task1.setBackgroundResource(R.drawable.icon_tody_task_1);
//            task2.setBackgroundResource(R.drawable.icon_tody_task_2);
//            task1date.setTitle(new Date().toString());
//            task2date.setTitle(new Date().toString());
//            task1name.setTitle("任务名称任务名称任务名称");
//            task2name.setTitle("任务名称任务名称任务名称");
            initViewHolder5();
        }
        private void initViewHolder5() {
            cl_night_work.setOnClickListener(v -> startActivity(new Intent(getContext(), NightWorkManageActivity.class)));
        }
    }