| | |
| | | |
| | | import cn.flightfeather.thirdapp.R; |
| | | import cn.flightfeather.thirdapp.activity.MOVMapActivity; |
| | | import cn.flightfeather.thirdapp.bean.Scense; |
| | | import cn.flightfeather.thirdapp.bean.entity.Scense; |
| | | |
| | | /** |
| | | * Created by linli on 2018/1/25. |
| | |
| | | |
| | | @Override |
| | | public void onBindViewHolder(final ScenseListViewHolder holder, final int position) { |
| | | final Scense info = mDataList.get(position); |
| | | int pos = holder.getAdapterPosition(); |
| | | final Scense info = mDataList.get(pos); |
| | | holder.tv_scenseName.setText(info.getName()); |
| | | holder.tv_no.setText(String.valueOf(info.getDisplayID())); |
| | | if (context.getmCurrentMode() == MOVMapActivity.MODE_ADD_SUBTASK) { |
| | |
| | | public void onClick(View v) { |
| | | int monitorNum = info.getMonitorNum() - 1; |
| | | if (monitorNum == 0) { |
| | | context.setmCurrentPosition(position); |
| | | context.updateMarkers(context.getmMarkerList().get(position), info); |
| | | context.setmCurrentPosition(pos); |
| | | context.updateMarkers(context.getmMarkerList().get(pos), info); |
| | | } else { |
| | | info.setMonitorNum(monitorNum); |
| | | context.updateScenseDesc(); |
| | |
| | | public void onClick(View v) { |
| | | int num = info.getMonitorNum(); |
| | | if (num == 0) { |
| | | context.setmCurrentPosition(position); |
| | | context.updateMarkers(context.getmMarkerList().get(position), info); |
| | | context.setmCurrentPosition(pos); |
| | | context.updateMarkers(context.getmMarkerList().get(pos), info); |
| | | } else { |
| | | info.setMonitorNum(num + 1); |
| | | context.updateScenseDesc(); |