礼物墙-修复bug
This commit is contained in:
@@ -58,23 +58,27 @@ public class GiftWallAchieveAdapter extends RecyclerView.Adapter {
|
||||
private TextView achieveName;
|
||||
private ImageView achieveImg;
|
||||
|
||||
private ImageView achieveImgLock;
|
||||
|
||||
public GiftWallAchieveViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if(onItemClickListener!=null){
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(getAdapterPosition());
|
||||
}
|
||||
}
|
||||
});
|
||||
achieveName = itemView.findViewById(R.id.achieveName);
|
||||
achieveImg = itemView.findViewById(R.id.achieve_img);
|
||||
achieveImgLock = itemView.findViewById(R.id.achieve_img_lock);
|
||||
}
|
||||
|
||||
public void showData(UserMedalListModel quantityModel) {
|
||||
achieveName.setText(quantityModel.getDressName());
|
||||
ImgLoader.display(mContext,quantityModel.getDisplaySrc(),achieveImg);
|
||||
ImgLoader.display(mContext, quantityModel.getDisplaySrc(), achieveImg);
|
||||
achieveImgLock.setVisibility(quantityModel.getDressStatus().equals("1") ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.stx.xhb.androidx.transformers.Transformer;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.UserMedalModel;
|
||||
import com.yunbao.common.custom.LiveGuardScalePageTransformer;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@@ -105,6 +106,9 @@ public class GiftWallAchieveWearDialog extends AbsDialogPopupWindow {
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
ToastUtil.show(data.getMsg());
|
||||
if (data.getCode() == 0) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
u.setMedal_no_display_src(achieveWearModels.get(selectPosition).getDisplaySrc());
|
||||
CommonAppConfig.getInstance().setUserBean(u);
|
||||
if(userUseDressSuccess!=null){
|
||||
userUseDressSuccess.onSuccess();
|
||||
}
|
||||
|
||||
@@ -1,23 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_height="120dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="110dp">
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/achieve_img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="90dp"/>
|
||||
android:layout_height="90dp"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/achieve_img_lock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="90dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:src="@mipmap/achieve_img_lock" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/achieveName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="26dp"
|
||||
android:layout_below="@+id/achieve_img"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
BIN
common/src/main/res/mipmap-mdpi/achieve_img_lock.png
Normal file
BIN
common/src/main/res/mipmap-mdpi/achieve_img_lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
Reference in New Issue
Block a user