| | |
| | | |
| | | import android.content.Context; |
| | | import android.graphics.drawable.Drawable; |
| | | import android.view.Gravity; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.enums.DebugStatus; |
| | | import com.hdl.photovoltaic.enums.DeliverStatus; |
| | | import com.hdl.photovoltaic.enums.PowerStationStatus; |
| | |
| | | |
| | | HouseIdBean houseIdBean = this.mList.get(position); |
| | | holder.homeNameTv.setText(houseIdBean.getHomeName().trim()); |
| | | |
| | | //组串容量(创建电站时输入的组串容量) |
| | | holder.pv_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getInstalledCapacity(), UnitType.kWp)); |
| | | holder.pv_kw_unit.setText(HdlCommonLogic.convertKWPUnit(houseIdBean.getInstalledCapacity())); |
| | |
| | | } |
| | | }); |
| | | holder.home_del_ll.setVisibility(View.GONE); |
| | | if (houseIdBean.getDeliverStatus().equals(DeliverStatus.UNDELIVERED)) { |
| | | |
| | | if (houseIdBean.getDebugStatus().equals(DebugStatus.Debugging)) { |
| | | //未交付完要显示删除按钮 |
| | | holder.home_del_ll.setVisibility(View.VISIBLE); |
| | | holder.del_home_iv.setImageResource(R.drawable.del_home); |
| | | } |
| | | if (houseIdBean.getDebugStatus().equals(DebugStatus.WAIT_DELIVERED)) { |
| | | //更改成回滚图标 |
| | | holder.home_del_ll.setVisibility(View.VISIBLE); |
| | | holder.del_home_iv.setImageResource(R.drawable.roll_back); |
| | | } |
| | | |
| | | //删除电站 |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | if (UserConfigManage.getInstance().isTourist_mode()) { |
| | | holder.home_del_ll.setVisibility(View.GONE); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | public RelativeLayout item_parent_rl;//条目父容器 |
| | | public LinearLayout home_move_ll;//移动电站位置 |
| | | public LinearLayout home_del_ll;//删除电站 |
| | | public ImageView del_home_iv; |
| | | public TextView home_location_tv;//电站地址 |
| | | public SwipeLayout item_parent_swipeLayout;//父容器 |
| | | |
| | |
| | | item_parent_rl = itemView.findViewById(R.id.item_parent_rl); |
| | | home_move_ll = itemView.findViewById(R.id.move_ll); |
| | | home_del_ll = itemView.findViewById(R.id.del_ll); |
| | | del_home_iv = itemView.findViewById(R.id.del_home_iv); |
| | | home_location_tv = itemView.findViewById(R.id.home_location_tv); |
| | | item_parent_swipeLayout = itemView.findViewById(R.id.item_parent_swipeLayout); |
| | | } |