add[直播数据-送礼列表]
This commit is contained in:
parent
af8ac39e9c
commit
06bbca07a1
@ -14,11 +14,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.LiveDataHistoryBean;
|
||||
import com.yunbao.common.bean.LiveDataHistoryBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -30,12 +25,12 @@ import java.util.List;
|
||||
public class LiveDataHistoryAdapter extends RecyclerView.Adapter<LiveDataHistoryAdapter.Vh> {
|
||||
|
||||
private Context mContext;
|
||||
private List<LiveDataHistoryBean> mList;
|
||||
private List<LiveDataHistoryBean> mList= new ArrayList<>();
|
||||
private LayoutInflater mInflater;
|
||||
|
||||
public LiveDataHistoryAdapter(Context context, List<LiveDataHistoryBean> list) {
|
||||
mContext = context;
|
||||
mInflater = LayoutInflater.from(context);
|
||||
mInflater = LayoutInflater.from(mContext);
|
||||
mList = list;
|
||||
}
|
||||
|
||||
@ -59,7 +54,7 @@ public class LiveDataHistoryAdapter extends RecyclerView.Adapter<LiveDataHistory
|
||||
return;
|
||||
}
|
||||
holder.time.setText(mList.get(position).getAddtime().substring(0,9)+"\n"+mList.get(position).getAddtime().substring(10));
|
||||
holder.giftTypeName.setText(mList.get(position).getAction());
|
||||
holder.giftTypeName.setText(mList.get(position).getCateName());
|
||||
holder.giftName.setText(mList.get(position).getGiftname());
|
||||
holder.income.setText(String.valueOf(mList.get(position).getAnchor_profit_coin()));
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
/**
|
||||
* 直播数据
|
||||
*/
|
||||
@ -8,7 +10,9 @@ public class LiveDataHistoryBean extends BaseModel {
|
||||
private String anchor_profit_coin;
|
||||
private String addtime;
|
||||
private String giftname;
|
||||
private String action;
|
||||
private String cate_name;
|
||||
private String english_cate_name;
|
||||
|
||||
|
||||
public String getGiftid() {
|
||||
return giftid;
|
||||
@ -42,11 +46,19 @@ public class LiveDataHistoryBean extends BaseModel {
|
||||
this.giftname = giftname;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
public String getCateName() {
|
||||
return WordUtil.isNewZh()?cate_name:english_cate_name;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
public void setCate_name(String cate_name) {
|
||||
this.cate_name = cate_name;
|
||||
}
|
||||
|
||||
public String getEnglish_cate_name() {
|
||||
return english_cate_name;
|
||||
}
|
||||
|
||||
public void setEnglish_cate_name(String english_cate_name) {
|
||||
this.english_cate_name = english_cate_name;
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,12 @@ import android.os.Bundle;
|
||||
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.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
@ -18,6 +22,7 @@ import com.yunbao.common.bean.LiveDataHistoryBean;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.ViewUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -28,80 +33,78 @@ import io.rong.imkit.widget.refresh.listener.OnLoadMoreListener;
|
||||
import io.rong.imkit.widget.refresh.listener.OnRefreshListener;
|
||||
import io.rong.imkit.widget.refresh.wrapper.RongRefreshHeader;
|
||||
|
||||
public class LiveDataHistoryFragment extends BaseFragment {
|
||||
SmartRefreshLayout mRefreshLayout;
|
||||
RecyclerView mList;
|
||||
Context mContext;
|
||||
LiveDataHistoryAdapter adapter;
|
||||
List<LiveDataHistoryBean> list = new ArrayList<>();
|
||||
int mPageCount = 1;//页数
|
||||
public class LiveDataHistoryFragment extends Fragment {
|
||||
|
||||
protected SmartRefreshLayout mRefreshLayout;
|
||||
protected RecyclerView mList;
|
||||
private LiveDataHistoryAdapter mAdapter;
|
||||
List<LiveDataHistoryBean> list = new ArrayList<>();
|
||||
private View emptyView;
|
||||
private Context mContext;
|
||||
private String mStream;
|
||||
private int mPageCount = 1;//页数
|
||||
|
||||
public LiveDataHistoryFragment(Context context,String stream) {
|
||||
this.mContext =context;
|
||||
this.mStream = stream;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
emptyView = inflater.inflate(R.layout.view_layout_msg,container, false);
|
||||
ViewUtils.findViewById(emptyView,R.id.imageView, ImageView.class).setImageResource(R.mipmap.ic_addressbook_not_search);
|
||||
ViewUtils.findViewById(emptyView,R.id.textView, TextView.class).setText(R.string.not_data_message_address_book_list);
|
||||
return inflater.inflate(R.layout.live_data_history_list_fragment, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
initView(contentView);
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
mAdapter = new LiveDataHistoryAdapter(mContext,list);
|
||||
this.mList = (RecyclerView) view.findViewById(R.id.rc_conversation_list);
|
||||
this.mRefreshLayout = (SmartRefreshLayout) view.findViewById(R.id.rc_refresh);
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(this.getActivity());
|
||||
this.mList.setLayoutManager(layoutManager);
|
||||
mList.setAdapter(mAdapter);
|
||||
initRefreshView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
initData();
|
||||
}
|
||||
|
||||
public LiveDataHistoryFragment(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
private void initView(View view) {
|
||||
mRefreshLayout = view.findViewById(R.id.rc_refresh);
|
||||
mList = view.findViewById(R.id.rc_conversation_list);
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(this.getActivity());
|
||||
mList.setLayoutManager(layoutManager);
|
||||
mList.setItemViewCacheSize(0);
|
||||
}
|
||||
|
||||
protected void initRefreshView() {
|
||||
mRefreshLayout.setNestedScrollingEnabled(false);
|
||||
mRefreshLayout.setRefreshHeader(new RongRefreshHeader(getContext()));
|
||||
mRefreshLayout.setRefreshFooter(new RongRefreshHeader(getContext()));
|
||||
mRefreshLayout.setEnableLoadMore(false);
|
||||
mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
|
||||
this.mRefreshLayout.setNestedScrollingEnabled(false);
|
||||
this.mRefreshLayout.setRefreshHeader(new RongRefreshHeader(this.getContext()));
|
||||
this.mRefreshLayout.setRefreshFooter(new RongRefreshHeader(this.getContext()));
|
||||
this.mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
mPageCount = 1;
|
||||
initData();
|
||||
}
|
||||
});
|
||||
mRefreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
|
||||
this.mRefreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
mPageCount++;
|
||||
initData();
|
||||
}
|
||||
});
|
||||
adapter = new LiveDataHistoryAdapter(mContext,list);
|
||||
mList.setAdapter(adapter);
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
CommonHttpUtil.getLiveDataHistoryList("","",new HttpCallback() {
|
||||
CommonHttpUtil.getLiveDataHistoryList(mStream, String.valueOf(mPageCount),new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info != null) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
if(){
|
||||
|
||||
List<LiveDataHistoryBean> tempList = JSON.parseArray(obj.getString("data"), LiveDataHistoryBean.class);
|
||||
if(mPageCount==1){
|
||||
list = tempList;
|
||||
mAdapter.setDataCollection(list);
|
||||
mRefreshLayout.finishRefresh(true);
|
||||
}else{
|
||||
list.addAll(tempList);
|
||||
mAdapter.setDataCollection(list);
|
||||
mRefreshLayout.finishLoadMore(true);
|
||||
}
|
||||
list = JSON.parseArray(obj.getString("data"), LiveDataHistoryBean.class);
|
||||
adapter.setDataCollection(list);
|
||||
mRefreshLayout.finishRefresh(true);
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/rc_conversation_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
@ -7,63 +7,64 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/titleLayout"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingEnd="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:text="時間"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14dp" />
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="#FFFFFF"
|
||||
android:text="@string/live_data_history_time"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/giftTypeName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14dp"
|
||||
tools:text="分類" />
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12dp"
|
||||
android:text="@string/live_data_history_type"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/giftName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14dp"
|
||||
tools:text="禮物" />
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12dp"
|
||||
android:text="@string/live_data_history_name"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/income"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="0.7"
|
||||
android:gravity="end|center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14dp"
|
||||
tools:text="10000" />
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="0.7"
|
||||
android:ellipsize="end"
|
||||
android:gravity="end|center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12dp"
|
||||
android:text="@string/live_data_history_gain" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_below="@+id/titleLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:background="#525252"
|
||||
@ -73,10 +74,8 @@
|
||||
|
||||
<io.rong.imkit.widget.refresh.SmartRefreshLayout
|
||||
android:id="@+id/rc_refresh"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_below="@+id/line"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="9dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
@ -1479,6 +1479,10 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="live_interaction_Interaction">Interaction</string>
|
||||
<string name="live_interaction_broadcaster_rights">Broadcaster Rights</string>
|
||||
<string name="live_interaction_tools">Live streaming tools</string>
|
||||
<string name="live_data_now_data">本場數據</string>
|
||||
<string name="live_data_gift_history">禮物記錄</string>
|
||||
<string name="live_data_now_data">This data</string>
|
||||
<string name="live_data_gift_history">Gift Record</string>
|
||||
<string name="live_data_history_time">time</string>
|
||||
<string name="live_data_history_type">type</string>
|
||||
<string name="live_data_history_name">name</string>
|
||||
<string name="live_data_history_gain">gain</string>
|
||||
</resources>
|
||||
|
@ -1611,5 +1611,9 @@
|
||||
<string name="live_interaction_tools">直播工具</string>
|
||||
<string name="live_data_now_data">本場數據</string>
|
||||
<string name="live_data_gift_history">禮物記錄</string>
|
||||
<string name="live_data_history_time">時間</string>
|
||||
<string name="live_data_history_type">分類</string>
|
||||
<string name="live_data_history_name">名稱</string>
|
||||
<string name="live_data_history_gain">收益</string>
|
||||
|
||||
</resources>
|
||||
|
@ -1417,7 +1417,11 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="live_interaction_Interaction">Interaction</string>
|
||||
<string name="live_interaction_broadcaster_rights">Broadcaster Rights</string>
|
||||
<string name="live_interaction_tools">Live streaming tools</string>
|
||||
<string name="live_data_now_data">本場數據</string>
|
||||
<string name="live_data_gift_history">禮物記錄</string>
|
||||
<string name="live_data_now_data">This data</string>
|
||||
<string name="live_data_gift_history">Gift Record</string>
|
||||
<string name="live_data_history_time">tory_time</string>
|
||||
<string name="live_data_history_type">type</string>
|
||||
<string name="live_data_history_name">name</string>
|
||||
<string name="live_data_history_gain">gain</string>
|
||||
|
||||
</resources>
|
||||
|
@ -735,6 +735,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
bundle.putBoolean(Constants.HAS_GAME, hasGame);
|
||||
bundle.putInt("leave", leave);
|
||||
bundle.putString("liveUid", mLiveUid);
|
||||
bundle.putString("stream", mStream);
|
||||
bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking());
|
||||
bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen());
|
||||
bundle.putBoolean("isShowZgRed",mLiveAnchorViewHolder.isShowMenuRed());
|
||||
|
@ -2,20 +2,9 @@ package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextPaint;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
import android.text.style.ImageSpan;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -24,10 +13,7 @@ import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.fragment.AbsMainMessageChatListFragment;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.common.fragment.LiveDataHistoryFragment;
|
||||
import com.yunbao.common.fragment.MainMessageChatListFragment;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
@ -56,23 +42,21 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||
private RecyclerView recyclerView;
|
||||
private LiveDataInfoRecyclerAdapter adapter;
|
||||
private List<LiveDataInfoModel> list;
|
||||
private String liveUid;
|
||||
private String mStream;
|
||||
private String mLiveUid;
|
||||
|
||||
private ViewPager2 viewPager;
|
||||
private MagicIndicator mIndicator;
|
||||
private List<BaseFragment> fragmentList = new ArrayList<>();
|
||||
private List<Fragment> fragmentList = new ArrayList<>();
|
||||
|
||||
public LiveDataInfoDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LiveDataInfoDialog(@NonNull Context context, String liveUid) {
|
||||
public LiveDataInfoDialog(@NonNull Context context, String liveUid, String mStream) {
|
||||
super(context);
|
||||
this.liveUid = liveUid;
|
||||
}
|
||||
|
||||
public void setLiveUid(String liveUid) {
|
||||
this.liveUid = liveUid;
|
||||
this.mLiveUid = liveUid;
|
||||
this.mStream = mStream;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -88,14 +72,13 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
final String[] titles = new String[]{WordUtil.getNewString(R.string.live_data_now_data), WordUtil.getNewString(R.string.live_data_gift_history)};
|
||||
fragmentList.add(new LiveDataHistoryFragment(mContext));
|
||||
fragmentList.add(new LiveDataHistoryFragment(mContext));
|
||||
fragmentList.add(new LiveDataHistoryFragment( mContext,mStream));
|
||||
fragmentList.add(new LiveDataHistoryFragment( mContext,mStream));
|
||||
|
||||
mIndicator = findViewById(R.id.indicator);
|
||||
viewPager = findViewById(R.id.viewPager);
|
||||
|
||||
viewPager.setAdapter(new FragmentStateAdapter((FragmentActivity) AppManager.getInstance().getMainActivity()) {
|
||||
|
||||
viewPager.setAdapter(new FragmentStateAdapter((FragmentActivity) mContext) {
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return fragmentList.size();
|
||||
@ -107,9 +90,20 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||
return fragmentList.get(i);
|
||||
}
|
||||
});
|
||||
viewPager.setCurrentItem(1);
|
||||
viewPager.setCurrentItem(0);
|
||||
viewPager.setUserInputEnabled(false);
|
||||
|
||||
CommonNavigator commonNavigator = getCommonNavigator(titles);
|
||||
mIndicator.setNavigator(commonNavigator);
|
||||
ViewPageIndicatorUtils.bind(mIndicator, viewPager, null);
|
||||
|
||||
recyclerView = findViewById(R.id.live_data_list);
|
||||
adapter = new LiveDataInfoRecyclerAdapter(getContext());
|
||||
recyclerView.setAdapter(adapter);
|
||||
initData();
|
||||
}
|
||||
|
||||
private @NonNull CommonNavigator getCommonNavigator(String[] titles) {
|
||||
CommonNavigator commonNavigator = new CommonNavigator(mContext);
|
||||
commonNavigator.setAdjustMode(true);
|
||||
commonNavigator.setAdapter(new CommonNavigatorAdapter() {
|
||||
@ -121,13 +115,13 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||
|
||||
@Override
|
||||
public IPagerTitleView getTitleView(Context context, final int index) {
|
||||
SimplePagerTitleView simplePagerTitleView = new ColorTransitionPagerTitleView(context);
|
||||
simplePagerTitleView.setNormalColor(Color.parseColor("#777777"));
|
||||
simplePagerTitleView.setSelectedColor(Color.parseColor("#333333"));
|
||||
SimplePagerTitleView simplePagerTitleView = new ColorTransitionPagerTitleView(mContext);
|
||||
simplePagerTitleView.setNormalColor(Color.parseColor("#C3C3C3"));
|
||||
simplePagerTitleView.setSelectedColor(Color.parseColor("#FFFFFF"));
|
||||
simplePagerTitleView.setText(titles[index]);
|
||||
simplePagerTitleView.setTextSize(15);
|
||||
simplePagerTitleView.getPaint().setFakeBoldText(true);
|
||||
simplePagerTitleView.setOnClickListener(new View.OnClickListener() {
|
||||
simplePagerTitleView.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (viewPager != null) {
|
||||
@ -141,25 +135,15 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
LinePagerIndicator linePagerIndicator = new LinePagerIndicator(context);
|
||||
linePagerIndicator.setMode(LinePagerIndicator.MODE_WRAP_CONTENT);
|
||||
linePagerIndicator.setXOffset(DpUtil.dp2px(5));
|
||||
linePagerIndicator.setRoundRadius(DpUtil.dp2px(2));
|
||||
linePagerIndicator.setColors(Color.parseColor("#EB6FFF"), Color.parseColor("#FF83C6"));
|
||||
linePagerIndicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||
linePagerIndicator.setLineWidth(DpUtil.dp2px(14));
|
||||
linePagerIndicator.setLineHeight(DpUtil.dp2px(2));
|
||||
linePagerIndicator.setRoundRadius(DpUtil.dp2px(1));
|
||||
linePagerIndicator.setColors(Color.parseColor("#FFFFFF"), Color.parseColor("#FFFFFF"));
|
||||
return linePagerIndicator;
|
||||
}
|
||||
});
|
||||
mIndicator.setNavigator(commonNavigator);
|
||||
ViewPageIndicatorUtils.bind(mIndicator, viewPager, new ViewPager2.OnPageChangeCallback() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
super.onPageScrolled(position, positionOffset, positionOffsetPixels);
|
||||
}
|
||||
});
|
||||
|
||||
recyclerView = findViewById(R.id.live_data_list);
|
||||
adapter = new LiveDataInfoRecyclerAdapter(getContext());
|
||||
recyclerView.setAdapter(adapter);
|
||||
initData();
|
||||
return commonNavigator;
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
@ -174,7 +158,7 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||
list.add(new LiveDataInfoModel(getContext().getString(R.string.live_data_fan_group_rate), getContext().getString(R.string.live_data_loading)));
|
||||
adapter.setList(list);
|
||||
LiveNetManager.get(getContext())
|
||||
.getLiveData(liveUid, new HttpCallback<com.yunbao.common.bean.LiveDataInfoModel>() {
|
||||
.getLiveData(mLiveUid, new HttpCallback<com.yunbao.common.bean.LiveDataInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
||||
list.clear();
|
||||
|
@ -53,6 +53,7 @@ public class LiveInteractionDialogFragment extends AbsDialogFragment implements
|
||||
|
||||
private String liveUid;
|
||||
private boolean isInteraction;
|
||||
private String mStream;
|
||||
|
||||
// boolean isRy = false;
|
||||
private boolean isShowRed;
|
||||
@ -98,6 +99,7 @@ public class LiveInteractionDialogFragment extends AbsDialogFragment implements
|
||||
liveUid = bundle.getString("liveUid");
|
||||
isShowRed = bundle.getBoolean("isShowZgRed");
|
||||
isInteraction = bundle.getBoolean("isInteraction",false);
|
||||
mStream= bundle.getString("stream");
|
||||
}
|
||||
equityLayout= (LinearLayout) findViewById(R.id.equityLayout);
|
||||
interactionLayout= (LinearLayout) findViewById(R.id.interactionLayout);
|
||||
@ -178,7 +180,7 @@ public class LiveInteractionDialogFragment extends AbsDialogFragment implements
|
||||
mFunctionClickListener.onClick(LIVE_FUNC_MIC);
|
||||
}else if(id == R.id.live_tool_live_data) {
|
||||
//主播数据
|
||||
new LiveDataInfoDialog(mContext, liveUid).showDialog();
|
||||
new LiveDataInfoDialog(mContext,liveUid,mStream).showDialog();
|
||||
dismiss();
|
||||
}else if (id == R.id.live_tool_robot) {
|
||||
mFunctionClickListener.onClick(LIVE_ROBOT);
|
||||
@ -188,7 +190,7 @@ public class LiveInteractionDialogFragment extends AbsDialogFragment implements
|
||||
dismiss();
|
||||
} else if (id == R.id.broadcast_data) {
|
||||
//主播数据
|
||||
new LiveDataInfoDialog(mContext, liveUid).showDialog();
|
||||
new LiveDataInfoDialog(mContext,liveUid, mStream).showDialog();
|
||||
dismiss();
|
||||
} else if (id == R.id.anchor_task) {
|
||||
//主播任务
|
||||
@ -262,8 +264,6 @@ public class LiveInteractionDialogFragment extends AbsDialogFragment implements
|
||||
|
||||
case WHAT_ANCHOR_LIVE_TIME:
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
||||
dismiss();
|
||||
} else if (id == R.id.broadcast_data) {
|
||||
//主播数据
|
||||
new LiveDataInfoDialog(mContext, liveUid).showDialog();
|
||||
new LiveDataInfoDialog(mContext, liveUid,"").showDialog();
|
||||
dismiss();
|
||||
} else if (id == R.id.anchor_task) {
|
||||
//主播任务
|
||||
@ -212,7 +212,6 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
||||
taskDialog.setLiveUid(liveUid);
|
||||
taskDialog.updateLiveTimer(mAnchorLiveTime);
|
||||
taskDialog.showDialog();
|
||||
|
||||
} else if (id == R.id.live_tool_call_me) {
|
||||
new LiveAnchorEditCallMeDialog(mContext).setLiveUid(liveUid).showDialog();
|
||||
} else if (id == R.id.live_tool_anchor_say) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="500dp"
|
||||
android:background="#000002">
|
||||
|
||||
<LinearLayout
|
||||
@ -36,6 +36,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:visibility="gone"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@ -76,6 +77,7 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/live_data_list"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
|
Loading…
Reference in New Issue
Block a user