update 粉丝团
This commit is contained in:
parent
9a8bc0505d
commit
fae0d01dc2
@ -547,4 +547,19 @@ public class JavascriptInterfaceUtils {
|
|||||||
Bus.get().post(new JavascriptInterfaceEvent()
|
Bus.get().post(new JavascriptInterfaceEvent()
|
||||||
.setMethod("clickLogOffAccount"));
|
.setMethod("clickLogOffAccount"));
|
||||||
}
|
}
|
||||||
|
@JavascriptInterface
|
||||||
|
public void androidFansGroupBuy(String id){
|
||||||
|
Bus.get().post(new JavascriptInterfaceEvent()
|
||||||
|
.setMethod("androidFansGroupBuy").setUserId(id));
|
||||||
|
}
|
||||||
|
@JavascriptInterface
|
||||||
|
public void androidFansGroupPack(){
|
||||||
|
Bus.get().post(new JavascriptInterfaceEvent()
|
||||||
|
.setMethod("androidFansGroupPack"));
|
||||||
|
}
|
||||||
|
@JavascriptInterface
|
||||||
|
public void androidFansGroupInfo(){
|
||||||
|
Bus.get().post(new JavascriptInterfaceEvent()
|
||||||
|
.setMethod("androidFansGroupInfo"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.yunbao.live.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.live.R;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LiveFansGroupBuyAdapter extends RecyclerView.Adapter<LiveFansGroupBuyAdapter.ViewHolder> {
|
||||||
|
Context mContext;
|
||||||
|
List<?> list=new ArrayList<>();
|
||||||
|
|
||||||
|
public LiveFansGroupBuyAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<?> list) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
return new ViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_fans_group_buy_list, parent, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private ImageView giftIcon;
|
||||||
|
private TextView day;
|
||||||
|
private TextView title;
|
||||||
|
private TextView introduce;
|
||||||
|
private ImageView diamondIcon;
|
||||||
|
|
||||||
|
public ViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
giftIcon=itemView.findViewById(R.id.giftIcon);
|
||||||
|
day=itemView.findViewById(R.id.day);
|
||||||
|
title=itemView.findViewById(R.id.title);
|
||||||
|
introduce=itemView.findViewById(R.id.introduce);
|
||||||
|
diamondIcon=itemView.findViewById(R.id.diamondIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.yunbao.live.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.live.R;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LiveFansGroupSendGiftAdapter extends RecyclerView.Adapter<LiveFansGroupSendGiftAdapter.ViewHolder> {
|
||||||
|
Context mContext;
|
||||||
|
List<?> list=new ArrayList<>();
|
||||||
|
|
||||||
|
public LiveFansGroupSendGiftAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<?> list) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public LiveFansGroupSendGiftAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
return new LiveFansGroupSendGiftAdapter.ViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_fans_group_package_list, parent, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull LiveFansGroupSendGiftAdapter.ViewHolder holder, int position) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private ImageView giftIcon;
|
||||||
|
private TextView day;
|
||||||
|
private TextView title;
|
||||||
|
private TextView send;
|
||||||
|
|
||||||
|
public ViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
giftIcon=itemView.findViewById(R.id.giftIcon);
|
||||||
|
day=itemView.findViewById(R.id.day);
|
||||||
|
title=itemView.findViewById(R.id.title);
|
||||||
|
send=itemView.findViewById(R.id.send);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -131,6 +131,13 @@ public class LiveFansFragment extends AbsDialogFragment {
|
|||||||
//点击 开通粉丝勋章,打开礼物列表送礼物
|
//点击 开通粉丝勋章,打开礼物列表送礼物
|
||||||
((LiveAudienceActivity) mContext).openGiftWindow(event.getLiveId(), "0");
|
((LiveAudienceActivity) mContext).openGiftWindow(event.getLiveId(), "0");
|
||||||
dismiss();
|
dismiss();
|
||||||
|
} else if (TextUtils.equals(event.getMethod(), "androidFansGroupBuy")) {
|
||||||
|
String id = event.getUserId();
|
||||||
|
new LiveFansGroupBuyDialog(mContext).setGiftId(id).showDialog();
|
||||||
|
} else if (TextUtils.equals(event.getMethod(), "androidFansGroupPack")) {
|
||||||
|
new LiveFansGroupSendGiftDialog(mContext).showDialog();
|
||||||
|
} else if (TextUtils.equals(event.getMethod(), "androidFansGroupInfo")) {
|
||||||
|
new LiveFansGroupInfoDialog(mContext).showDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,18 +1,32 @@
|
|||||||
package com.yunbao.live.dialog;
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.live.adapter.LiveFansGroupBuyAdapter;
|
||||||
|
|
||||||
public class LiveFansGroupBuyDialog extends AbsDialogPopupWindow {
|
public class LiveFansGroupBuyDialog extends AbsDialogPopupWindow {
|
||||||
|
private TextView anchorName;
|
||||||
|
private TextView buy;
|
||||||
|
private RecyclerView recyclerView;
|
||||||
|
private LiveFansGroupBuyAdapter adapter;
|
||||||
|
private String id;
|
||||||
|
|
||||||
public LiveFansGroupBuyDialog(@NonNull Context context) {
|
public LiveFansGroupBuyDialog(@NonNull Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LiveFansGroupBuyDialog setGiftId(String id) {
|
||||||
|
this.id=id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void buildDialog(XPopup.Builder builder) {
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
|
|
||||||
@ -22,4 +36,20 @@ public class LiveFansGroupBuyDialog extends AbsDialogPopupWindow {
|
|||||||
public int bindLayoutId() {
|
public int bindLayoutId() {
|
||||||
return R.layout.dialog_fans_group_buy;
|
return R.layout.dialog_fans_group_buy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
anchorName = findViewById(R.id.anchorName);
|
||||||
|
buy = findViewById(R.id.buy);
|
||||||
|
recyclerView = findViewById(R.id.giftList);
|
||||||
|
adapter = new LiveFansGroupBuyAdapter(mContext);
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
|
buy.setOnClickListener(v -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,4 +22,10 @@ public class LiveFansGroupInfoDialog extends AbsDialogPopupWindow {
|
|||||||
public int bindLayoutId() {
|
public int bindLayoutId() {
|
||||||
return R.layout.dialog_fans_group_info;
|
return R.layout.dialog_fans_group_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
findViewById(R.id.colse).setOnClickListener(v -> dismiss());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,17 @@ package com.yunbao.live.dialog;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
|
import com.yunbao.live.adapter.LiveFansGroupSendGiftAdapter;
|
||||||
|
|
||||||
public class LiveFansGroupSendGiftDialog extends AbsDialogPopupWindow {
|
public class LiveFansGroupSendGiftDialog extends AbsDialogPopupWindow {
|
||||||
|
private RecyclerView recyclerView;
|
||||||
|
private LiveFansGroupSendGiftAdapter adapter;
|
||||||
|
|
||||||
public LiveFansGroupSendGiftDialog(@NonNull Context context) {
|
public LiveFansGroupSendGiftDialog(@NonNull Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
}
|
}
|
||||||
@ -22,4 +27,12 @@ public class LiveFansGroupSendGiftDialog extends AbsDialogPopupWindow {
|
|||||||
public int bindLayoutId() {
|
public int bindLayoutId() {
|
||||||
return R.layout.dialog_fans_group_send;
|
return R.layout.dialog_fans_group_send;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
recyclerView = findViewById(R.id.giftList);
|
||||||
|
adapter = new LiveFansGroupSendGiftAdapter(mContext);
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="主播昵稱的" />
|
tools:text="主播昵稱" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/giftName"
|
android:id="@+id/giftName"
|
||||||
@ -44,7 +44,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/anchorName"
|
app:layout_constraintTop_toBottomOf="@+id/anchorName"
|
||||||
tools:text="臻愛禮包" />
|
android:text="@string/live_fans_group_buy_title" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/giftInfo"
|
android:id="@+id/giftInfo"
|
||||||
@ -56,7 +56,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/giftName"
|
app:layout_constraintTop_toBottomOf="@+id/giftName"
|
||||||
tools:text="購買可獲得5200鑽特定禮物,同時可獲得限定資源" />
|
android:text="@string/live_fans_group_buy_info" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/giftList"
|
android:id="@+id/giftList"
|
||||||
@ -89,6 +89,6 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/giftList"
|
app:layout_constraintTop_toBottomOf="@+id/giftList"
|
||||||
tools:text="5200鑽購買" />
|
android:text="@string/live_fans_group_buy_buy" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -73,4 +73,14 @@
|
|||||||
android:text="@string/live_fans_group_info2_text2" />
|
android:text="@string/live_fans_group_info2_text2" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/colse"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:src="@mipmap/ic_live_fans_group_info_colse"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -29,7 +29,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="當前可送出" />
|
android:text="@string/live_fans_group_send_title" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/giftList"
|
android:id="@+id/giftList"
|
||||||
|
@ -56,7 +56,23 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView12"
|
android:id="@+id/day"
|
||||||
|
android:layout_width="27dp"
|
||||||
|
android:layout_height="12dp"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:background="@mipmap/icon_fans_group_buy_dialog_day"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="#7059BB"
|
||||||
|
android:textSize="8sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="1天"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/send"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="7dp"
|
android:layout_marginTop="7dp"
|
||||||
@ -65,12 +81,12 @@
|
|||||||
android:paddingTop="4dp"
|
android:paddingTop="4dp"
|
||||||
android:paddingEnd="13dp"
|
android:paddingEnd="13dp"
|
||||||
android:paddingBottom="4dp"
|
android:paddingBottom="4dp"
|
||||||
tools:text="贈送"
|
|
||||||
android:textColor="#E6FFFFFF"
|
android:textColor="#E6FFFFFF"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout4" />
|
app:layout_constraintTop_toBottomOf="@+id/constraintLayout4"
|
||||||
|
android:text="@string/live_fans_group_send_sub" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
BIN
live/src/main/res/mipmap-xhdpi/ic_live_fans_group_info_colse.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/ic_live_fans_group_info_colse.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -108,4 +108,9 @@
|
|||||||
<string name="live_fans_group_info_title">Introduction</string>
|
<string name="live_fans_group_info_title">Introduction</string>
|
||||||
<string name="live_fans_group_info2_title">Rules</string>
|
<string name="live_fans_group_info2_title">Rules</string>
|
||||||
<string name="live_fans_follow_toast">Join the fan group and unlock exclusive gifts</string>
|
<string name="live_fans_follow_toast">Join the fan group and unlock exclusive gifts</string>
|
||||||
|
<string name="live_fans_group_send_sub">Gift</string>
|
||||||
|
<string name="live_fans_group_send_title">Currently Available To Send</string>
|
||||||
|
<string name="live_fans_group_buy_title">The Perfect GiftPack</string>
|
||||||
|
<string name="live_fans_group_buy_info">Purchase a %s Diamond Specific Gift And Receive ALimited Resource</string>
|
||||||
|
<string name="live_fans_group_buy_buy">Diamond Purchase</string>
|
||||||
</resources>
|
</resources>
|
@ -106,4 +106,9 @@
|
|||||||
<string name="live_fans_group_info_title">禮包介紹</string>
|
<string name="live_fans_group_info_title">禮包介紹</string>
|
||||||
<string name="live_fans_group_info2_title">購買規則</string>
|
<string name="live_fans_group_info2_title">購買規則</string>
|
||||||
<string name="live_fans_follow_toast">加入粉絲團,解鎖專屬禮物</string>
|
<string name="live_fans_follow_toast">加入粉絲團,解鎖專屬禮物</string>
|
||||||
|
<string name="live_fans_group_send_sub">赠送</string>
|
||||||
|
<string name="live_fans_group_send_title">當前可送出</string>
|
||||||
|
<string name="live_fans_group_buy_title">的臻愛禮包</string>
|
||||||
|
<string name="live_fans_group_buy_info">購買可獲得%s鑽特定禮物,同時可獲得限定資源</string>
|
||||||
|
<string name="live_fans_group_buy_buy">%s鑽購買</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user