diff --git a/common/src/main/java/com/yunbao/common/adapter/LiveBuyGuardSelectAdapter.java b/common/src/main/java/com/yunbao/common/adapter/LiveBuyGuardSelectAdapter.java index e241cf151..63175a6a2 100644 --- a/common/src/main/java/com/yunbao/common/adapter/LiveBuyGuardSelectAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/LiveBuyGuardSelectAdapter.java @@ -16,9 +16,11 @@ import java.util.List; public class LiveBuyGuardSelectAdapter extends RecyclerView.Adapter { List price = new ArrayList<>(); + GuardPriceModel model; - public LiveBuyGuardSelectAdapter(List price) { + public LiveBuyGuardSelectAdapter(List price, GuardPriceModel mModel) { this.price = price; + model = mModel; } @NonNull @@ -31,7 +33,7 @@ public class LiveBuyGuardSelectAdapter extends RecyclerView.Adapter { @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { LiveBuyGuardSelectViewHolder buyGuardSelectViewHolder = (LiveBuyGuardSelectViewHolder) holder; - buyGuardSelectViewHolder.setData(price.get(position), liveBuyGuardSelectClickListener); + buyGuardSelectViewHolder.setData(price.get(position), liveBuyGuardSelectClickListener,model); } @Override diff --git a/common/src/main/java/com/yunbao/common/dialog/LiveBuyGuardSelectPopup.java b/common/src/main/java/com/yunbao/common/dialog/LiveBuyGuardSelectPopup.java index 043790f29..d2dae98a5 100644 --- a/common/src/main/java/com/yunbao/common/dialog/LiveBuyGuardSelectPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/LiveBuyGuardSelectPopup.java @@ -24,10 +24,12 @@ public class LiveBuyGuardSelectPopup extends AttachPopupView { List price = new ArrayList<>(); LiveBuyGuardSelectAdapter liveBuyGuardSelectAdapter; RecyclerView live_buy_guard_list; + GuardPriceModel model; - public LiveBuyGuardSelectPopup(@NonNull Context context, List mPrice) { + public LiveBuyGuardSelectPopup(@NonNull Context context, List mPrice, GuardPriceModel mModel) { super(context); price = mPrice; + model = mModel; } protected int getImplLayoutId() { @@ -37,7 +39,7 @@ public class LiveBuyGuardSelectPopup extends AttachPopupView { @Override protected void onCreate() { live_buy_guard_list = findViewById(R.id.live_buy_guard_list); - liveBuyGuardSelectAdapter = new LiveBuyGuardSelectAdapter(price); + liveBuyGuardSelectAdapter = new LiveBuyGuardSelectAdapter(price,model); live_buy_guard_list.setAdapter(liveBuyGuardSelectAdapter); live_buy_guard_list.setLayoutManager(new LinearLayoutManager(getContext())); liveBuyGuardSelectAdapter.setLiveBuyGuardSelectClickListener(new LiveBuyGuardSelectViewHolder.LiveBuyGuardSelectClickListener() { @@ -101,6 +103,11 @@ public class LiveBuyGuardSelectPopup extends AttachPopupView { // } // }); + if (model == null) { + + } else { + + } } public LiveBuyGuardSelectPopup setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) { diff --git a/common/src/main/java/com/yunbao/common/views/LiveBuyGuardSelectViewHolder.java b/common/src/main/java/com/yunbao/common/views/LiveBuyGuardSelectViewHolder.java index d55edc933..6a2c8ddb5 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveBuyGuardSelectViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/LiveBuyGuardSelectViewHolder.java @@ -1,5 +1,6 @@ package com.yunbao.common.views; +import android.text.TextUtils; import android.view.View; import android.widget.TextView; @@ -11,27 +12,33 @@ import com.yunbao.common.bean.GuardPriceModel; public class LiveBuyGuardSelectViewHolder extends RecyclerView.ViewHolder { TextView opening_time, discount; + View layout; public LiveBuyGuardSelectViewHolder(@NonNull View itemView) { super(itemView); opening_time = itemView.findViewById(R.id.opening_time); discount = itemView.findViewById(R.id.discount); + layout = itemView.findViewById(R.id.layout); } - public void setData(GuardPriceModel guardPriceModel,LiveBuyGuardSelectClickListener liveBuyGuardSelectClickListener) { + public void setData(GuardPriceModel guardPriceModel, LiveBuyGuardSelectClickListener liveBuyGuardSelectClickListener, GuardPriceModel mModel) { + if (mModel != null && TextUtils.equals(String.valueOf(guardPriceModel.getPriceKey()), String.valueOf(mModel.getPriceKey()))) { + layout.setSelected(true); + } opening_time.setText(String.valueOf(guardPriceModel.getOpeningTime())); discount.setText(String.valueOf(guardPriceModel.getDiscount())); itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - if (liveBuyGuardSelectClickListener!=null){ + if (liveBuyGuardSelectClickListener != null) { liveBuyGuardSelectClickListener.onClickListener(guardPriceModel); } } }); } - public interface LiveBuyGuardSelectClickListener{ + + public interface LiveBuyGuardSelectClickListener { void onClickListener(GuardPriceModel guardPriceModel); } } diff --git a/common/src/main/res/drawable/background_live_buy_guard_slelect_item.xml b/common/src/main/res/drawable/background_live_buy_guard_slelect_item.xml new file mode 100644 index 000000000..02b5be79d --- /dev/null +++ b/common/src/main/res/drawable/background_live_buy_guard_slelect_item.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/background_live_buy_guard_slelect_item1.xml b/common/src/main/res/drawable/background_live_buy_guard_slelect_item1.xml new file mode 100644 index 000000000..c68437969 --- /dev/null +++ b/common/src/main/res/drawable/background_live_buy_guard_slelect_item1.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/background_live_buy_guard_slelect_item2.xml b/common/src/main/res/drawable/background_live_buy_guard_slelect_item2.xml new file mode 100644 index 000000000..955a92c9a --- /dev/null +++ b/common/src/main/res/drawable/background_live_buy_guard_slelect_item2.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/view_live_buy_guard_slelect.xml b/common/src/main/res/layout/view_live_buy_guard_slelect.xml index c22623956..b95c96332 100644 --- a/common/src/main/res/layout/view_live_buy_guard_slelect.xml +++ b/common/src/main/res/layout/view_live_buy_guard_slelect.xml @@ -2,15 +2,19 @@ \ No newline at end of file diff --git a/common/src/main/res/layout/view_live_buy_guard_slelect_item.xml b/common/src/main/res/layout/view_live_buy_guard_slelect_item.xml index 46ff3bc13..729ce00c9 100644 --- a/common/src/main/res/layout/view_live_buy_guard_slelect_item.xml +++ b/common/src/main/res/layout/view_live_buy_guard_slelect_item.xml @@ -1,7 +1,9 @@ diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index 1718923b3..a6bad0dc6 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1455,9 +1455,9 @@ Limited ride And limited avatar frame 【Star Guardian】 Guardianship privileges - Becoming the exclusive guardian of the anchor\n + Be the anchor‘s guardian Not opened - The anchor\'s guardian group + guardian group Activate King Guardian Activate Star Guardian Activate God Guardian diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index a87458cbf..325c7ac0d 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1454,9 +1454,9 @@ 【星之守护】 守護團特權 - 成爲TA的專屬守護 為TA保駕護航 + 成為TA的專屬守護 暫未開通 - TA的守護團 > + 守護團 > 開通王之守護 開通星之守護 開通神之守護 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index 3bf3b8c6f..480610b48 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1453,9 +1453,9 @@ 【星之守护】 守護團特權 - 成爲TA的專屬守護 為TA保駕護航 + 成為TA的專屬守護 暫未開通 - TA的守護團 > + 守護團 > 開通王之守護 開通星之守護 開通神之守護 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 89318d1f2..ce5b826d5 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1450,9 +1450,9 @@ 【星之守护】 守護團特權 - 成爲TA的專屬守護 為TA保駕護航 + 成為TA的專屬守護 暫未開通 - TA的守護團 > + 守護團 > 開通王之守護 開通星之守護 開通神之守護 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 781f9e1bd..b162887f7 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1458,9 +1458,9 @@ Limited ride And limited avatar frame 【Star Guardian】 Guardianship privileges - Becoming the exclusive guardian of the anchor\n + Be the anchor‘s guardian Not opened - The anchor\'s guardian group + guardian group Activate King Guardian Activate Star Guardian Activate God Guardian diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java index 0d67f83fd..ee76c9d37 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java @@ -286,7 +286,7 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow { .isDestroyOnDismiss(true) .isLightStatusBar(false) .popupPosition(PopupPosition.Top) - .asCustom(new LiveBuyGuardSelectPopup(getContext(), price) + .asCustom(new LiveBuyGuardSelectPopup(getContext(), price,guardPriceModel) .setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { diff --git a/live/src/main/res/layout/banner_item_buy_guard.xml b/live/src/main/res/layout/banner_item_buy_guard.xml index 3a96cd23e..bbf19952b 100644 --- a/live/src/main/res/layout/banner_item_buy_guard.xml +++ b/live/src/main/res/layout/banner_item_buy_guard.xml @@ -8,7 +8,7 @@ @@ -38,6 +38,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" + android:layout_marginBottom="10dp" android:orientation="horizontal"> @@ -55,8 +56,8 @@ diff --git a/live/src/main/res/layout/dialog_live_buy_guard.xml b/live/src/main/res/layout/dialog_live_buy_guard.xml index 282c37523..68a574337 100644 --- a/live/src/main/res/layout/dialog_live_buy_guard.xml +++ b/live/src/main/res/layout/dialog_live_buy_guard.xml @@ -20,12 +20,14 @@ @@ -169,6 +171,7 @@