修改测试问题,新增直播列表页面的神龙送财的图标
This commit is contained in:
parent
4fabf3aba3
commit
0317b339f8
@ -56,6 +56,18 @@ public class LiveBean implements Parcelable {
|
|||||||
private int redPacketStatus;
|
private int redPacketStatus;
|
||||||
@SerializedName("giftId")
|
@SerializedName("giftId")
|
||||||
private String giftId;
|
private String giftId;
|
||||||
|
@SerializedName("sendMoneyLongStatus ")
|
||||||
|
private int sendMoneyLongStatus ;
|
||||||
|
|
||||||
|
public int getSendMoneyLongStatus() {
|
||||||
|
return sendMoneyLongStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveBean setSendMoneyLongStatus(int sendMoneyLongStatus) {
|
||||||
|
this.sendMoneyLongStatus = sendMoneyLongStatus;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||||
|
|
||||||
public String getRecommendCardIconSizeTwo() {
|
public String getRecommendCardIconSizeTwo() {
|
||||||
|
@ -34,7 +34,7 @@ public class GuardBuyTipsDialog {
|
|||||||
dialog.setContentView(R.layout.dialog_guard_buy_tips);
|
dialog.setContentView(R.layout.dialog_guard_buy_tips);
|
||||||
dialog.setCancelable(true);
|
dialog.setCancelable(true);
|
||||||
dialog.setCanceledOnTouchOutside(true);
|
dialog.setCanceledOnTouchOutside(true);
|
||||||
Button btn_confirm = dialog.findViewById(R.id.btn_confirm);
|
TextView btn_confirm = dialog.findViewById(R.id.btn_confirm);
|
||||||
TextView content1 = dialog.findViewById(R.id.content1);
|
TextView content1 = dialog.findViewById(R.id.content1);
|
||||||
TextView content2 = dialog.findViewById(R.id.content2);
|
TextView content2 = dialog.findViewById(R.id.content2);
|
||||||
TextView contentTextView = dialog.findViewById(R.id.content);
|
TextView contentTextView = dialog.findViewById(R.id.content);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="250dp"
|
android:layout_height="230dp"
|
||||||
android:background="@drawable/guard_buy_tips_bg">
|
android:background="@drawable/guard_buy_tips_bg">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -95,10 +95,14 @@
|
|||||||
android:textSize="17dp" />
|
android:textSize="17dp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/btn_confirm"
|
android:id="@+id/btn_confirm"
|
||||||
android:layout_width="130dp"
|
android:layout_width="130dp"
|
||||||
|
android:gravity="center"
|
||||||
android:layout_height="38dp"
|
android:layout_height="38dp"
|
||||||
|
android:textColor="#893D0D"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textStyle="bold"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:background="@drawable/guard_buy_tips_sure_bg"
|
android:background="@drawable/guard_buy_tips_sure_bg"
|
||||||
|
@ -66,7 +66,7 @@ public class DragonSendsMoneyPopup extends CenterPopupView {
|
|||||||
String dragonMoney = dragon_money.getText().toString().trim();
|
String dragonMoney = dragon_money.getText().toString().trim();
|
||||||
if (!TextUtils.isEmpty(dragonMoney)) {
|
if (!TextUtils.isEmpty(dragonMoney)) {
|
||||||
long money = Long.parseLong(dragonMoney);
|
long money = Long.parseLong(dragonMoney);
|
||||||
if (goldMoney > money) {
|
if (goldMoney >= money) {
|
||||||
if (money >= 1000) {
|
if (money >= 1000) {
|
||||||
LiveNetManager.get(getContext())
|
LiveNetManager.get(getContext())
|
||||||
.sendMoneyLong(mLiveUid, String.valueOf(money), new com.yunbao.common.http.base.HttpCallback<String>() {
|
.sendMoneyLong(mLiveUid, String.valueOf(money), new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 36 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 47 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 44 KiB |
@ -32,7 +32,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
|||||||
private ImageView mCover, liveType, mLiveIco, mType, pkico, drPkIco, pkAvatar, viewBg;
|
private ImageView mCover, liveType, mLiveIco, mType, pkico, drPkIco, pkAvatar, viewBg;
|
||||||
private ImageView bgs;
|
private ImageView bgs;
|
||||||
private View views;
|
private View views;
|
||||||
private View redPacket;
|
private View redPacket, dragon_money;
|
||||||
private TextView mLiveState, mTitle, mName, mNum;
|
private TextView mLiveState, mTitle, mName, mNum;
|
||||||
|
|
||||||
public MainHomeLiveItemViewHolder(@NonNull View itemView) {
|
public MainHomeLiveItemViewHolder(@NonNull View itemView) {
|
||||||
@ -42,6 +42,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
|||||||
itemView.findViewById(R.id.lt_week_list).setVisibility(View.GONE);
|
itemView.findViewById(R.id.lt_week_list).setVisibility(View.GONE);
|
||||||
mCover = itemView.findViewById(R.id.cover);
|
mCover = itemView.findViewById(R.id.cover);
|
||||||
redPacket = itemView.findViewById(R.id.red_packet);
|
redPacket = itemView.findViewById(R.id.red_packet);
|
||||||
|
dragon_money = itemView.findViewById(R.id.dragon_money);
|
||||||
bgs = itemView.findViewById(R.id.bgs);
|
bgs = itemView.findViewById(R.id.bgs);
|
||||||
liveType = itemView.findViewById(R.id.live_type);
|
liveType = itemView.findViewById(R.id.live_type);
|
||||||
views = itemView.findViewById(R.id.views);
|
views = itemView.findViewById(R.id.views);
|
||||||
@ -64,6 +65,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
|||||||
* @param position 下标
|
* @param position 下标
|
||||||
*/
|
*/
|
||||||
public void loadViewDate(LiveBean bean, int position, int height, OnItemClickListener listener) {
|
public void loadViewDate(LiveBean bean, int position, int height, OnItemClickListener listener) {
|
||||||
|
dragon_money.setVisibility(View.GONE);
|
||||||
Context mContext = itemView.getContext();
|
Context mContext = itemView.getContext();
|
||||||
itemView.setTag(position);
|
itemView.setTag(position);
|
||||||
liveType.setImageDrawable(null);
|
liveType.setImageDrawable(null);
|
||||||
@ -153,7 +155,13 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
|||||||
redPacket.setVisibility(View.VISIBLE);
|
redPacket.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
redPacket.setVisibility(View.GONE);
|
redPacket.setVisibility(View.GONE);
|
||||||
|
if (bean.getSendMoneyLongStatus() == 1) {
|
||||||
|
dragon_money.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
dragon_money.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RxView.clicks(itemView)
|
RxView.clicks(itemView)
|
||||||
.throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件
|
.throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件
|
||||||
.subscribe(new Observer<Unit>() {
|
.subscribe(new Observer<Unit>() {
|
||||||
|
@ -298,6 +298,17 @@
|
|||||||
app:srcCompat="@mipmap/icon_red_packet"
|
app:srcCompat="@mipmap/icon_red_packet"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/dragon_money"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="39dp"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="25dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:srcCompat="@mipmap/icon_live_dragon_money"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user