[Modify]首充弹窗适配
This commit is contained in:
@@ -135,7 +135,7 @@ class FirstChargeDialog : BaseViewBindingActivity<DialogFirstChargeBinding>(),
|
||||
|
||||
rvDelegate = RVDelegate.Builder<FirstChargeReward>()
|
||||
.setAdapter(
|
||||
RewardAdapter((ScreenUtil.screenWidth * 0.66f / 3f).toInt())
|
||||
RewardAdapter((ScreenUtil.screenWidth * 0.66f / 2f).toInt())
|
||||
.also { rewardAdapter = it }
|
||||
)
|
||||
.setLayoutManager(FlexboxLayoutManager(context).apply {
|
||||
@@ -373,8 +373,10 @@ class FirstChargeDialog : BaseViewBindingActivity<DialogFirstChargeBinding>(),
|
||||
}
|
||||
|
||||
try {
|
||||
helpPopupWindow.showAsDropDown(binding.ivHelp,
|
||||
UIUtil.dip2px(context, 18.0), UIUtil.dip2px(context, -3.0), Gravity.END)
|
||||
helpPopupWindow.showAsDropDown(
|
||||
binding.ivHelp,
|
||||
UIUtil.dip2px(context, 18.0), UIUtil.dip2px(context, -3.0), Gravity.END
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
@@ -126,14 +126,14 @@ public class SearchDetailFragment extends BaseMvpFragment<ISearchView, SearchPre
|
||||
} else if (item.getHallBtnStatus() == 6) {
|
||||
NimP2PMessageActivity.start(mContext, String.valueOf(item.getHallMessageUid()));
|
||||
} else if (item.getHallBtnStatus() == 4) {
|
||||
showSureDialog(item.getUid() + "", item.getAvatar(), item.getNick());
|
||||
showSureDialog(item.getUid() + "", item.getAvatar(), item.getNick(), position);
|
||||
}
|
||||
}
|
||||
});
|
||||
recyclerView.setAdapter(searchAdapter);
|
||||
}
|
||||
|
||||
public void showSureDialog(String targetId, String avatar, String nick) {
|
||||
public void showSureDialog(String targetId, String avatar, String nick, int position) {
|
||||
if (fromType == AbstractSelectFriendAction.TYPE_MODULE_HALL) {
|
||||
if (nick == null) {
|
||||
nick = "";
|
||||
@@ -164,6 +164,8 @@ public class SearchDetailFragment extends BaseMvpFragment<ISearchView, SearchPre
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
searchAdapter.getData().get(position).setHallBtnStatus(5);
|
||||
searchAdapter.notifyItemChanged(position);
|
||||
toast(s);
|
||||
}
|
||||
});
|
||||
|
@@ -87,16 +87,23 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/layout_dialog_first_charge_01" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" >
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@@ -22,8 +22,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
|
@@ -3,10 +3,12 @@ package com.yizhuan.xchat_android_core.pay.bean;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FirstChargeReward implements Parcelable {
|
||||
public class FirstChargeReward implements Parcelable, MultiItemEntity {
|
||||
|
||||
public FirstChargeReward() {
|
||||
}
|
||||
@@ -14,6 +16,7 @@ public class FirstChargeReward implements Parcelable {
|
||||
private String showPir;
|
||||
private String showText;
|
||||
private String showTime;
|
||||
private int type;
|
||||
|
||||
protected FirstChargeReward(Parcel in) {
|
||||
showPir = in.readString();
|
||||
@@ -44,4 +47,13 @@ public class FirstChargeReward implements Parcelable {
|
||||
return new FirstChargeReward[size];
|
||||
}
|
||||
};
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user