app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/res/layout/swipe_right_layout.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java
@@ -6,6 +6,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; @@ -85,7 +86,7 @@ } }); //移动电站位置 holder.move_home_iv.setOnClickListener(new View.OnClickListener() { holder.move_home_ll.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { try { @@ -96,8 +97,13 @@ } } }); holder.del_home_ll.setVisibility(View.GONE); if (houseIdBean.getDeliverStatus().equals("UNDELIVERED")) { //未交付完要显示删除按钮 holder.del_home_ll.setVisibility(View.VISIBLE); } //删除电站 holder.del_home_iv.setOnClickListener(new View.OnClickListener() { holder.del_home_ll.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { try { @@ -214,8 +220,8 @@ public TextView month_value_tv;//当月发电量 public TextView stateTv;//电站状态(连接中,运行,离线,故障); public RelativeLayout item_parent_rl;//条目父容器 public ImageView move_home_iv;//移动电站位置 public ImageView del_home_iv;//删除电站 public LinearLayout move_home_ll;//移动电站位置 public LinearLayout del_home_ll;//删除电站 public TextView plant_details_location_tv;//电站地址 public SwipeLayout item_parent_swipeLayout;//父容器 @@ -229,8 +235,8 @@ month_value_tv = itemView.findViewById(R.id.month_value_tv); stateTv = itemView.findViewById(R.id.fragment_house_list_line_state_tv); item_parent_rl = itemView.findViewById(R.id.item_parent_rl); move_home_iv = itemView.findViewById(R.id.move_home_iv); del_home_iv = itemView.findViewById(R.id.del_home_iv); move_home_ll = itemView.findViewById(R.id.move_ll); del_home_ll = itemView.findViewById(R.id.del_ll); plant_details_location_tv = itemView.findViewById(R.id.plant_details_location_tv); item_parent_swipeLayout = itemView.findViewById(R.id.item_parent_swipeLayout); } app/src/main/res/layout/swipe_right_layout.xml
@@ -4,25 +4,39 @@ android:layout_height="148dp" android:orientation="vertical"> <View android:layout_width="wrap_content" android:layout_height="@dimen/dp_8" /> <LinearLayout android:id="@+id/move_ll" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center_vertical" android:orientation="vertical"> <ImageView android:id="@+id/move_home_iv" android:layout_width="@dimen/dp_50" android:layout_height="@dimen/dp_50" android:src="@drawable/move_house" /> <ImageView android:id="@+id/move_home_iv" android:layout_width="@dimen/dp_50" android:layout_height="@dimen/dp_50" android:src="@drawable/move_house" /> <View android:layout_width="wrap_content" android:layout_height="@dimen/dp_32" /> </LinearLayout> <ImageView android:id="@+id/del_home_iv" android:layout_width="@dimen/dp_50" android:layout_height="@dimen/dp_50" android:src="@drawable/del_home" /> <LinearLayout android:id="@+id/del_ll" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center_vertical" android:orientation="vertical"> <ImageView android:id="@+id/del_home_iv" android:layout_width="@dimen/dp_50" android:layout_height="@dimen/dp_50" android:src="@drawable/del_home" /> </LinearLayout> </LinearLayout>