diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java index 2a5c34d46..1fd66d732 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java @@ -9,6 +9,7 @@ import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Button; +import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; @@ -81,6 +82,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements private LiveNewGuardBuyItemsAdapter buyItemsAdapter; private GuardRightAdapter mGuardRightAdapter; private boolean isEmpty; + private ImageView mBack; @Override @@ -132,12 +134,14 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements buy1 = mRootView.findViewById(R.id.buy1); buy2 = mRootView.findViewById(R.id.buy2); guard_tips = mRootView.findViewById(R.id.guard_textView2); + mBack = mRootView.findViewById(R.id.guard_back); //iconCover.setImageResource(R.drawable.guardian_img_wings); mBtnBuy.setOnClickListener(this); submit.setOnClickListener(this); guardBuy.setOnClickListener(this); + mBack.setOnClickListener(this); mRights.setHasFixedSize(true); mRights.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false)); mBuys.setHasFixedSize(true); @@ -208,6 +212,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements userIconOne.setVisibility(View.GONE); userIconTwo.setVisibility(View.GONE); }else{ + mBack.setVisibility(View.VISIBLE); ImgLoader.display(mContext, mAncherIcon, userIconOne); ImgLoader.display(mContext, mUserIcon, userIconTwo); userIconOne.setVisibility(View.VISIBLE); @@ -220,6 +225,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements buy1.setVisibility(View.VISIBLE); buy2.setVisibility(View.GONE); } else { + mBack.setVisibility(View.VISIBLE); buy2.setVisibility(View.VISIBLE); buy1.setVisibility(View.GONE); userIconOne.setVisibility(View.VISIBLE); @@ -273,8 +279,14 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements } else if (i == R.id.guard_buy) { forwardMyCoin(); + }else if (i==R.id.guard_back){ + gotoBack(); } } + private void gotoBack(){ + dismiss(); + ((LiveActivity)mContext).openNewGuardListWindow(); + } /** * 跳转到我的钻石 diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index faab3c2ac..5bb6cac90 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -413,19 +413,26 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { } else if (i == R.id.lt_trickery) { showTrickeryDialog(); }else if (i==R.id.live_new_people){ - Bundle bundle=new Bundle(); - String url= newPeopleUrl+"&g=Appapi&m=Turntable&a=tricky"; - url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" - + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; - bundle.putString("url", url); - bundle.putInt("show_type", 0); - LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment(); - liveHDDialogFragment.setArguments(bundle); - liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + openNewPeopleDialog(); } } + /** + * 打开新人特惠对话框 + */ + private void openNewPeopleDialog(){ + Bundle bundle=new Bundle(); + String url= newPeopleUrl+"&g=Appapi&m=Turntable&a=tricky"; + url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; + bundle.putString("url", url); + bundle.putInt("show_type", 0); + LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment(); + liveHDDialogFragment.setArguments(bundle); + liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + } + /** * 观众打开主播的整蛊惑单窗口 */ diff --git a/live/src/main/res/drawable/icon_return.png b/live/src/main/res/drawable/icon_return.png new file mode 100644 index 000000000..5b70dec5d Binary files /dev/null and b/live/src/main/res/drawable/icon_return.png differ diff --git a/live/src/main/res/layout/dialog_new_guard_buy.xml b/live/src/main/res/layout/dialog_new_guard_buy.xml index f206a8a67..5820fb6ba 100644 --- a/live/src/main/res/layout/dialog_new_guard_buy.xml +++ b/live/src/main/res/layout/dialog_new_guard_buy.xml @@ -18,6 +18,17 @@ app:layout_constraintStart_toStartOf="parent"> + +