| | |
| | | |
| | | |
| | | 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; |
| | |
| | | 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.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; |
| | |
| | | viewHolder1.initViewHolder1(); |
| | | viewHolder2.initViewholder2(); |
| | | viewHolder3.initViewHolder3(); |
| | | viewHolder5.initViewHolder5(); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @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))); |
| | | } |
| | | } |
| | | |