add:守护列表新增返回按钮

This commit is contained in:
zlzw 2022-09-01 17:09:52 +08:00
parent 73922b17a4
commit bb81bd380d
5 changed files with 41 additions and 11 deletions

View File

@ -9,6 +9,7 @@ import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
@ -81,6 +82,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
private LiveNewGuardBuyItemsAdapter buyItemsAdapter; private LiveNewGuardBuyItemsAdapter buyItemsAdapter;
private GuardRightAdapter mGuardRightAdapter; private GuardRightAdapter mGuardRightAdapter;
private boolean isEmpty; private boolean isEmpty;
private ImageView mBack;
@Override @Override
@ -132,12 +134,14 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
buy1 = mRootView.findViewById(R.id.buy1); buy1 = mRootView.findViewById(R.id.buy1);
buy2 = mRootView.findViewById(R.id.buy2); buy2 = mRootView.findViewById(R.id.buy2);
guard_tips = mRootView.findViewById(R.id.guard_textView2); guard_tips = mRootView.findViewById(R.id.guard_textView2);
mBack = mRootView.findViewById(R.id.guard_back);
//iconCover.setImageResource(R.drawable.guardian_img_wings); //iconCover.setImageResource(R.drawable.guardian_img_wings);
mBtnBuy.setOnClickListener(this); mBtnBuy.setOnClickListener(this);
submit.setOnClickListener(this); submit.setOnClickListener(this);
guardBuy.setOnClickListener(this); guardBuy.setOnClickListener(this);
mBack.setOnClickListener(this);
mRights.setHasFixedSize(true); mRights.setHasFixedSize(true);
mRights.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false)); mRights.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
mBuys.setHasFixedSize(true); mBuys.setHasFixedSize(true);
@ -208,6 +212,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
userIconOne.setVisibility(View.GONE); userIconOne.setVisibility(View.GONE);
userIconTwo.setVisibility(View.GONE); userIconTwo.setVisibility(View.GONE);
}else{ }else{
mBack.setVisibility(View.VISIBLE);
ImgLoader.display(mContext, mAncherIcon, userIconOne); ImgLoader.display(mContext, mAncherIcon, userIconOne);
ImgLoader.display(mContext, mUserIcon, userIconTwo); ImgLoader.display(mContext, mUserIcon, userIconTwo);
userIconOne.setVisibility(View.VISIBLE); userIconOne.setVisibility(View.VISIBLE);
@ -220,6 +225,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
buy1.setVisibility(View.VISIBLE); buy1.setVisibility(View.VISIBLE);
buy2.setVisibility(View.GONE); buy2.setVisibility(View.GONE);
} else { } else {
mBack.setVisibility(View.VISIBLE);
buy2.setVisibility(View.VISIBLE); buy2.setVisibility(View.VISIBLE);
buy1.setVisibility(View.GONE); buy1.setVisibility(View.GONE);
userIconOne.setVisibility(View.VISIBLE); userIconOne.setVisibility(View.VISIBLE);
@ -273,8 +279,14 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
} else if (i == R.id.guard_buy) { } else if (i == R.id.guard_buy) {
forwardMyCoin(); forwardMyCoin();
}else if (i==R.id.guard_back){
gotoBack();
} }
} }
private void gotoBack(){
dismiss();
((LiveActivity)mContext).openNewGuardListWindow();
}
/** /**
* 跳转到我的钻石 * 跳转到我的钻石

View File

@ -413,6 +413,15 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
} else if (i == R.id.lt_trickery) { } else if (i == R.id.lt_trickery) {
showTrickeryDialog(); showTrickeryDialog();
}else if (i==R.id.live_new_people){ }else if (i==R.id.live_new_people){
openNewPeopleDialog();
}
}
/**
* 打开新人特惠对话框
*/
private void openNewPeopleDialog(){
Bundle bundle=new Bundle(); Bundle bundle=new Bundle();
String url= newPeopleUrl+"&g=Appapi&m=Turntable&a=tricky"; String url= newPeopleUrl+"&g=Appapi&m=Turntable&a=tricky";
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
@ -424,8 +433,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
} }
}
/** /**
* 观众打开主播的整蛊惑单窗口 * 观众打开主播的整蛊惑单窗口
*/ */

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

View File

@ -18,6 +18,17 @@
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent">
<ImageView
android:id="@+id/guard_back"
android:layout_width="10dp"
android:layout_height="18dp"
android:layout_marginStart="21dp"
android:layout_marginTop="16dp"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/icon_return" />
<LinearLayout <LinearLayout
android:id="@+id/guard_linearLayout" android:id="@+id/guard_linearLayout"
android:layout_width="182dp" android:layout_width="182dp"
@ -74,8 +85,8 @@
android:layout_height="110dp" android:layout_height="110dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:gravity="center"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:overScrollMode="never" android:overScrollMode="never"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -20,7 +20,7 @@
<LinearLayout <LinearLayout
android:id="@+id/guard_linearLayout" android:id="@+id/guard_linearLayout"
android:layout_width="182dp" android:layout_width="0dp"
android:layout_height="42dp" android:layout_height="42dp"
android:layout_marginTop="52dp" android:layout_marginTop="52dp"
android:layout_marginBottom="21dp" android:layout_marginBottom="21dp"