Merge remote-tracking branch 'origin/master'
@ -111,6 +111,15 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
|
||||
mFooter.setTextSizeTitle(14);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置头部字体颜色
|
||||
*
|
||||
* @param textColor
|
||||
*/
|
||||
public void setHeaderTextColor(int textColor) {
|
||||
mHeader.setAccentColor(textColor);
|
||||
}
|
||||
|
||||
private HttpCallback mRefreshCallback = new HttpCallback() {
|
||||
|
||||
private int mDataCount;
|
||||
|
@ -4,6 +4,8 @@ import android.content.res.Resources;
|
||||
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/10/10.
|
||||
* 获取string.xml中的字
|
||||
@ -20,4 +22,10 @@ public class WordUtil {
|
||||
public static String getString(int res) {
|
||||
return sResources.getString(res);
|
||||
}
|
||||
|
||||
public static boolean isZh() {
|
||||
Locale locale = sResources.getConfiguration().locale;
|
||||
String language = locale.getLanguage();
|
||||
return language.endsWith("zh");
|
||||
}
|
||||
}
|
||||
|
@ -21,12 +21,17 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/live_type"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:gravity="center" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@mipmap/bg_main_item_bottom" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
|
BIN
common/src/main/res/mipmap-xxhdpi/bg_main_item_bottom.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
@ -76,7 +76,6 @@
|
||||
<string name="completing_mission">completing mission</string>
|
||||
|
||||
|
||||
|
||||
<string name="apply_for_lianmai">ApplyMic</string>
|
||||
<string name="cancel_application">Cancel Mic</string>
|
||||
<string name="quit_mic">Quit Mic</string>
|
||||
@ -172,7 +171,7 @@
|
||||
<string name="only_one">Only one can be given away~</string>
|
||||
<string name="guard_guard">Guard</string>
|
||||
<string name="guard_week_con">Contribution this week</string>
|
||||
<string name="guard_no_data">Become the girst Guard of he/she</string>
|
||||
<string name="guard_no_data">anchor are waiting at your guard!</string>
|
||||
<string name="guard_tip_0">Let\'s open up a guard for our favorite anchor</string>
|
||||
<string name="guard_tip_1">You are the current anchor\'s monthly guard \ n the guard date expires</string>
|
||||
<string name="guard_tip_2">You are the current anchor\'s annual guardian \ n the guardian date expires</string>
|
||||
@ -286,7 +285,7 @@
|
||||
<string name="live_zg">Tricky</string>
|
||||
<string name="live_dr">MultiplayerPK</string>
|
||||
<string name="live_mic">LianmaiVoice</string>
|
||||
<string name="live_wks">ZhouXingbang</string>
|
||||
<string name="live_wks">Start</string>
|
||||
<string name="live_zslk">LeaveTemporarily</string>
|
||||
<string name="live_zslk1">ResumeLive</string>
|
||||
<string name="live_flash">Flash lamp</string>
|
||||
@ -306,7 +305,7 @@
|
||||
<string name="live_votes">Harvest</string>
|
||||
<string name="live_watch_num">Number of visitors</string>
|
||||
<string name="live_end_ing">Guan Zhong</string>
|
||||
<string name="live_say_something">Tell you something</string>
|
||||
<string name="live_say_something">Let\'s have a chat~</string>
|
||||
<string name="live_open_alba">Open the barrage,</string>
|
||||
<string name="live_tiao">strip</string>
|
||||
<string name="live_input_password">Please enter the room password</string>
|
||||
@ -372,7 +371,7 @@
|
||||
<string name="live_choose_live_class">Please select a channel</string>
|
||||
<string name="live_follow_anchor">Focus on the anchor</string>
|
||||
<string name="live_report">Are you sure to report?</string>
|
||||
<string name="live_link_mic_2">Interaction between wheat and wheat</string>
|
||||
<string name="live_link_mic_2">Interaction</string>
|
||||
<string name="live_link_mic_3">End Lian Mai</string>
|
||||
<string name="live_link_mic_4">Allowed even wheat</string>
|
||||
<string name="live_link_mic_5">Ban Lian Mai</string>
|
||||
@ -861,5 +860,13 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="anchor">anchor</string>
|
||||
<string name="anchor_more">More</string>
|
||||
<string name="wonderful_live">Wonderful live</string>
|
||||
<string name="recommended_for_you">recommended for you</string>
|
||||
<string name="recommended_for_you">More</string>
|
||||
<string name="fun_games">Fun Games</string>
|
||||
<string name="value_added_benefits">Value-added benefits</string>
|
||||
<string name="fan_club">Fan Club</string>
|
||||
<string name="activity_center">Activity</string>
|
||||
<string name="basic_tools">Basic tools</string>
|
||||
<string name="effects_settings">Effect settings</string>
|
||||
<string name="shield_gift_effect">Shield gift effect</string>
|
||||
<string name="shield_mount_effect">Shield car effect</string>
|
||||
</resources>
|
||||
|
@ -123,7 +123,7 @@
|
||||
|
||||
<string name="guard_guard">守護</string>
|
||||
<string name="guard_week_con">本周貢獻</string>
|
||||
<string name="guard_no_data">主播正在等待您成為TA的守護,為TA保駕護航!</string>
|
||||
<string name="guard_no_data">主播正在等待您的守護!</string>
|
||||
<string name="guard_tip_0">快去為喜歡的主播開通守護吧</string>
|
||||
<string name="guard_tip_1">您是當前主播的月守護\n守護日期截止到</string>
|
||||
<string name="guard_tip_2">您是當前主播的年守護\n守護日期截止到</string>
|
||||
@ -243,7 +243,7 @@
|
||||
<string name="live_votes">收穫</string>
|
||||
<string name="live_watch_num">觀看人數</string>
|
||||
<string name="live_end_ing">關播中</string>
|
||||
<string name="live_say_something">和大家說點什麼…</string>
|
||||
<string name="live_say_something">一起来聊聊天吧~</string>
|
||||
<string name="live_open_alba">開啟彈幕,</string>
|
||||
<string name="live_tiao">條</string>
|
||||
<string name="live_input_password">請輸入房間密碼</string>
|
||||
@ -875,11 +875,11 @@
|
||||
<string name="wonderful_live">精彩直播</string>
|
||||
<string name="recommended_for_you">為您推薦</string>
|
||||
<string name="fun_games">趣味游戏</string>
|
||||
<string name="value_added_benefits">增值权益</string>
|
||||
<string name="value_added_benefits">增值權益</string>
|
||||
<string name="fan_club">粉絲團</string>
|
||||
<string name="activity_center">活動中心</string>
|
||||
<string name="basic_tools">基础工具</string>
|
||||
<string name="basic_tools">基礎工具</string>
|
||||
<string name="effects_settings">特效設置</string>
|
||||
<string name="shield_gift_effect">屏蔽礼物特效</string>
|
||||
<string name="shield_mount_effect">屏蔽坐骑特效</string>
|
||||
<string name="shield_gift_effect">屏蔽禮物特效</string>
|
||||
<string name="shield_mount_effect">屏蔽座駕特效</string>
|
||||
</resources>
|
||||
|
@ -35,6 +35,7 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.GuardUserBean;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.bean.LiveBuyGuardMsgBean;
|
||||
import com.yunbao.live.bean.LiveChatBean;
|
||||
@ -86,6 +87,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
@ -331,7 +333,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onBuyLiangName(LiveReceiveGiftBean bean) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
@ -1261,11 +1262,20 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
}
|
||||
|
||||
/**
|
||||
* 守护列表弹窗
|
||||
*/
|
||||
public void openNewGuardListWindow() {
|
||||
LiveHttpUtil.getGuardList(mLiveUid, 1, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
|
||||
if(list.isEmpty()){
|
||||
openNewBuyGuardWindow();
|
||||
}else {
|
||||
LiveNewGuardListDialogFragment fragment = new LiveNewGuardListDialogFragment();
|
||||
fragment.setList(list);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
@ -1273,6 +1283,10 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 打開粉絲團
|
||||
@ -1342,6 +1356,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment");
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开购买守护的弹窗
|
||||
*/
|
||||
|
@ -109,6 +109,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
|
||||
private ViewGroup mViewGroup;
|
||||
private int liveBg = 0;
|
||||
//直播间进入房间队列
|
||||
private Handler liveHandler = new Handler();
|
||||
|
||||
|
||||
@Override
|
||||
@ -246,13 +248,35 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
|
||||
private void loadData(ViewGroup viewGroup, int currentItem) {
|
||||
mViewGroup = viewGroup;
|
||||
mLastPosition = currentItem;
|
||||
liveHandler.removeCallbacks(liveRunnable);
|
||||
if (mCurrentPage > 0) {
|
||||
liveHandler.postDelayed(liveRunnable, 800);
|
||||
} else {
|
||||
liveHandler.post(liveRunnable);
|
||||
}
|
||||
Log.e("收到socket--->", "mLiveUid--------------------------->" + mLiveUid);
|
||||
//加载当前页面数据
|
||||
View rootView = manager.getRootView();
|
||||
if (rootView.getParent() != null && rootView.getParent() instanceof ViewGroup) {
|
||||
((ViewGroup) (rootView.getParent())).removeView(rootView);
|
||||
manager.onRemove();
|
||||
}
|
||||
mViewGroup.addView(manager.getRootView());
|
||||
}
|
||||
|
||||
//获取直播间状态
|
||||
private Runnable liveRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
AnchorRecommendItemModel data = itemModelList.get(mCurrentPage);
|
||||
|
||||
//获取直播间状态
|
||||
LiveHttpUtil.getLiveInfo(data.getUid(), liveInfo);
|
||||
mLastPosition = currentItem;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取直播间状态
|
||||
@ -272,20 +296,13 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mLiveType = liveType;
|
||||
mLiveTypeVal = liveTypeVal;
|
||||
mLiveBean = liveBean1;
|
||||
mLiveUid = mLiveBean.getUid();
|
||||
mStream = mLiveBean.getStream();
|
||||
mAncherName = liveBean.getUserNiceName();
|
||||
mAncherIcon = liveBean.getAvatar();
|
||||
mLiveUid = liveBean1.getUid();
|
||||
mStream = liveBean1.getStream();
|
||||
mAncherName = liveBean1.getUserNiceName();
|
||||
mAncherIcon = liveBean1.getAvatar();
|
||||
|
||||
Log.e("收到socket--->", "mLiveUid--------------------------->" + mLiveUid);
|
||||
//加载当前页面数据
|
||||
View rootView = manager.getRootView();
|
||||
if (rootView.getParent() != null && rootView.getParent() instanceof ViewGroup) {
|
||||
((ViewGroup) (rootView.getParent())).removeView(rootView);
|
||||
manager.onRemove();
|
||||
}
|
||||
mViewGroup.addView(manager.getRootView());
|
||||
manager.onAdd(liveBean, liveType, liveTypeVal, liveSdk);
|
||||
|
||||
manager.onAdd(liveBean1, liveType, liveTypeVal, liveSdk);
|
||||
|
||||
});
|
||||
|
||||
@ -433,7 +450,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
* 退出直播间
|
||||
*/
|
||||
public void exitLiveRoom() {
|
||||
manager.exitLiveRoom();
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
|
||||
@ -602,8 +619,6 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
bundle.putInt("LiveBg", liveBg);
|
||||
sidebarLiveAudience.setArguments(bundle);
|
||||
sidebarLiveAudience.show(getSupportFragmentManager(), "SidebarLiveAudience");
|
||||
// manager.openDrawer();
|
||||
|
||||
break;
|
||||
case BOTTOM_COLLECTION:
|
||||
LiveTotalDialog liveTotalDialog = new LiveTotalDialog();
|
||||
@ -726,6 +741,10 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mLiveGuardInfo : event.getParametersModel().getmLiveGuardInfo();
|
||||
liveBg = TextUtils.equals(String.valueOf(liveBg), String.valueOf(event.getParametersModel().getLiveBg())) ?
|
||||
liveBg : event.getParametersModel().getLiveBg();
|
||||
is_fans = TextUtils.equals(String.valueOf(is_fans), String.valueOf(event.getParametersModel().getIs_fans())) ?
|
||||
is_fans : event.getParametersModel().getIs_fans();
|
||||
fansNum = TextUtils.equals(String.valueOf(fansNum), String.valueOf(event.getParametersModel().getFansNum())) ?
|
||||
fansNum : event.getParametersModel().getFansNum();
|
||||
break;
|
||||
case ACTIVITY_CENTER://活动中心
|
||||
String url = CommonAppConfig.HOST + "/h5/live/hallOfFame/index.html?g=Appapi&m=Turntable&a=tricky";
|
||||
|
@ -16,6 +16,26 @@ public class OpenParametersModel extends BaseModel {
|
||||
private int mLiveTypeVal = 0;
|
||||
private LiveGuardInfo mLiveGuardInfo = null;
|
||||
private int liveBg = 0;
|
||||
private int fansNum;
|
||||
private String is_fans;
|
||||
|
||||
public int getFansNum() {
|
||||
return fansNum;
|
||||
}
|
||||
|
||||
public OpenParametersModel setFansNum(int fansNum) {
|
||||
this.fansNum = fansNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIs_fans() {
|
||||
return is_fans;
|
||||
}
|
||||
|
||||
public OpenParametersModel setIs_fans(String is_fans) {
|
||||
this.is_fans = is_fans;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getLiveBg() {
|
||||
return liveBg;
|
||||
|
@ -37,7 +37,7 @@ public class RightGradual extends RecyclerView.ItemDecoration {
|
||||
float right=parent.getRight();
|
||||
float bottom=parent.getBottom();
|
||||
if(mLinearGradient==null){
|
||||
mLinearGradient=new LinearGradient(parent.getMeasuredWidth(), 0.0f, 0.0f, 0.0f, new int[]{0, Color.BLACK}, new float[]{0.0f,0.2f}, Shader.TileMode.CLAMP);
|
||||
mLinearGradient=new LinearGradient(parent.getMeasuredWidth(), 0.0f, 0.0f, 0.0f, new int[]{0, Color.BLACK}, new float[]{0.0f,0.4f}, Shader.TileMode.CLAMP);
|
||||
}
|
||||
mPaint.setXfermode(mXfermode);
|
||||
mPaint.setShader(mLinearGradient);
|
||||
|
@ -4,6 +4,7 @@ import static com.yunbao.common.CommonAppContext.logger;
|
||||
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@ -25,19 +26,28 @@ import android.widget.LinearLayout;
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.JsWishBean;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
|
||||
public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
|
||||
private WebView mWebView;
|
||||
private int showType = 0;
|
||||
private boolean isFullWindow=false;
|
||||
private String roomId;
|
||||
|
||||
public LiveHDDialogFragment() {
|
||||
|
||||
@ -136,6 +146,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
if (bundle == null) {
|
||||
return;
|
||||
}
|
||||
roomId=bundle.getString("roomId",null);
|
||||
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
@ -217,6 +228,56 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
public void androidGoBack(){
|
||||
dismiss();
|
||||
}
|
||||
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidMethodLookToLive(String liveId) {
|
||||
//看直播
|
||||
gotoLive(liveId);
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidClickToNewH5PageView(String url){
|
||||
url = CommonAppConfig.HOST + url;
|
||||
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken();
|
||||
Log.i("tag", url);
|
||||
Intent intent = new Intent(mContext, ZhuangBanActivity.class);
|
||||
intent.putExtra("url", url);
|
||||
intent.putExtra("isFull", false);
|
||||
mContext.startActivity(intent);
|
||||
|
||||
}
|
||||
}
|
||||
private LiveRoomCheckLivePresenter mCheckLivePresenter;
|
||||
private void gotoLive(final String live_id) {
|
||||
if(roomId!=null&&roomId.equals(live_id)){
|
||||
return;
|
||||
}
|
||||
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
LiveRoomCheckLivePresenter.isRoom = false;
|
||||
if (mCheckLivePresenter == null) {
|
||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
((LiveAudienceActivity) mContext).finish();
|
||||
LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk);
|
||||
}
|
||||
});
|
||||
}
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, live_id, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -239,10 +239,12 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
bean.setChecked(false);
|
||||
}
|
||||
for (int i : guardBuyBean.getPrivilege()) {
|
||||
if(i<mRightList.size()) {
|
||||
mRightList.get(i).setChecked(true);
|
||||
}
|
||||
}
|
||||
mGuardRightAdapter.notifyDataSetChanged();
|
||||
mBtnBuy.setEnabled(mCoinVal >= guardBuyBean.getCoin());
|
||||
// mBtnBuy.setEnabled(mCoinVal >= guardBuyBean.getCoin());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ import com.yunbao.live.bean.GuardUserBean;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@ -52,6 +53,7 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
||||
private LiveGuardInfo mLiveGuardInfo;
|
||||
private String mLiveUid;
|
||||
private boolean mIsAnchor;//是否是主播
|
||||
private List<GuardUserBean> list=new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@ -112,6 +114,9 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
||||
private void initView() {
|
||||
mRefreshView.setEmptyLayoutId(mIsAnchor ? R.layout.view_no_data_guard_anc : R.layout.view_no_data_guard_aud);
|
||||
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
mGuardAdapter = new GuardAdapter(mContext, true, false);
|
||||
mGuardAdapter.setList(list);
|
||||
setAdapterData();
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<GuardUserBean>() {
|
||||
@Override
|
||||
public RefreshAdapter<GuardUserBean> getAdapter() {
|
||||
@ -129,6 +134,50 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
||||
@Override
|
||||
public List<GuardUserBean> processData(String[] info) {
|
||||
List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
|
||||
if(!list.isEmpty()){
|
||||
LiveNewGuardListDialogFragment.this.list=list;
|
||||
setAdapterData();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<GuardUserBean> list, int listCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<GuardUserBean> loadItemList, int loadItemCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
mRefreshView.setRecyclerViewAdapter(mGuardAdapter);
|
||||
mGuardAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dismiss();
|
||||
((LiveActivity) mContext).openNewBuyGuardWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int show(@NonNull FragmentTransaction transaction, @Nullable String tag) {
|
||||
int show = super.show(transaction, tag);
|
||||
initView();
|
||||
return show;
|
||||
}
|
||||
private void setAdapterData(){
|
||||
if (list.isEmpty()) {
|
||||
userLayout.setVisibility(View.INVISIBLE);
|
||||
}else {
|
||||
@ -160,42 +209,8 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
||||
mBtnBuy.setText(R.string.guard_buy_3);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<GuardUserBean> list, int listCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<GuardUserBean> loadItemList, int loadItemCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
mRefreshView.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dismiss();
|
||||
((LiveActivity) mContext).openNewBuyGuardWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int show(@NonNull FragmentTransaction transaction, @Nullable String tag) {
|
||||
int show = super.show(transaction, tag);
|
||||
initView();
|
||||
return show;
|
||||
public void setList(List<GuardUserBean> list) {
|
||||
this.list=list;
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@ -58,6 +59,8 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
|
||||
public TextView audience_btn, guard_btn, fans_btn, tags, btn, gz_view, dayRank, weekRank,title;
|
||||
private LinearLayout tabs;
|
||||
private ConstraintLayout noMoreLayout;
|
||||
private TextView noMoreText;
|
||||
private RelativeLayout bottom_msg;//底部信息的布局,在榜单列表下不需要显示底部信息
|
||||
private String Tips = "1";
|
||||
private String type = "guanzhong";
|
||||
@ -135,6 +138,8 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
dayRank = mRootView.findViewById(R.id.day_rank_btn);//日榜
|
||||
weekRank = mRootView.findViewById(R.id.week_rank_btn);//周榜
|
||||
gz_view = mRootView.findViewById(R.id.gz_view);
|
||||
noMoreLayout = mRootView.findViewById(R.id.no_more_layout);
|
||||
noMoreText = mRootView.findViewById(R.id.no_more_text);
|
||||
btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@ -233,7 +238,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
LiveHttpUtil.getUserList(mLiveUid, stream, type, p, callback);
|
||||
pg = p;
|
||||
if (p == 1) {
|
||||
no_more.setVisibility(View.VISIBLE);
|
||||
noMoreLayout.setVisibility(View.VISIBLE);
|
||||
mRefreshView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@ -290,14 +295,14 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
userMoreInfoAdapter.num = nums;
|
||||
mRefreshView.mRecyclerView.getRecycledViewPool().setMaxRecycledViews(0, data.size());
|
||||
mRefreshView.setVisibility(View.VISIBLE);
|
||||
no_more.setVisibility(View.GONE);
|
||||
noMoreLayout.setVisibility(View.GONE);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
private List<LiveUserRankBean> processRankData(JSONObject json){
|
||||
JSONArray rank=Integer.parseInt(Tips)==4?json.getJSONArray("listDay"):json.getJSONArray("listWeek");
|
||||
List<LiveUserRankBean> data =new ArrayList<>();
|
||||
/**
|
||||
/*
|
||||
* 由于在线观众和粉丝列表实体结构与榜单结构不一致,做个兼容操作
|
||||
*/
|
||||
if(rank==null){
|
||||
@ -310,9 +315,10 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
data.add(bean);
|
||||
}
|
||||
if(data.size()==0){
|
||||
no_more.setVisibility(View.VISIBLE);
|
||||
noMoreLayout.setVisibility(View.VISIBLE);
|
||||
mRefreshView.setVisibility(View.GONE);
|
||||
}else{
|
||||
no_more.setVisibility(View.GONE);
|
||||
noMoreLayout.setVisibility(View.GONE);
|
||||
}
|
||||
mRefreshView.setNotLoadMore();
|
||||
return data;
|
||||
@ -340,7 +346,9 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
void Up() {
|
||||
userMoreInfoAdapter.clearData();
|
||||
bottom_msg.setVisibility(View.VISIBLE);
|
||||
mRefreshView.setVisibility(View.VISIBLE);
|
||||
title.setVisibility(View.GONE);
|
||||
noMoreText.setVisibility(View.GONE);
|
||||
LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mRefreshView.getLayoutParams();
|
||||
params.bottomMargin=DpUtil.dp2px(65);
|
||||
if (Tips.equals("1")) {
|
||||
@ -377,6 +385,8 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
setTextColor(dayRank,audience_btn,guard_btn,fans_btn,gz_view,weekRank);
|
||||
gz_view.setVisibility(View.GONE);
|
||||
no_more.setImageResource(R.drawable.img_rank_empty);
|
||||
noMoreText.setText(R.string.no_more_day_rank);
|
||||
noMoreText.setVisibility(View.VISIBLE);
|
||||
}else if (Tips.equals("5")){
|
||||
params.bottomMargin=DpUtil.dp2px(0);
|
||||
userMoreInfoAdapter.type = "5";
|
||||
@ -384,7 +394,9 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
type="weekRank";
|
||||
gz_view.setVisibility(View.GONE);
|
||||
no_more.setImageResource(R.drawable.img_rank_empty);
|
||||
noMoreText.setText(R.string.no_more_day_rank);
|
||||
setTextColor(weekRank,audience_btn,guard_btn,fans_btn,gz_view,dayRank);
|
||||
noMoreText.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mRefreshView.setLayoutParams(params);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Display;
|
||||
@ -94,6 +95,7 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
||||
|
||||
}
|
||||
sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList);
|
||||
// sidebarList.setHeaderTextColor(Color.parseColor("#50ffffff"));
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false);
|
||||
gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
|
||||
@Override
|
||||
|
@ -486,43 +486,6 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
mLiveLinkMicPushViewHolder.addToParent();
|
||||
mLiveLinkMicPushViewHolder.startPush(pushUrl);
|
||||
EventBus.getDefault().post(new LinkMicTxAccEvent(true));
|
||||
} else {
|
||||
// LiveHttpUtil.getLiveSdk(new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if (code == 0 && info.length > 0) {
|
||||
// LiveKsyConfigBean liveKsyConfigBean = null;
|
||||
// try {
|
||||
// JSONObject obj = JSON.parseObject(info[0]);
|
||||
// liveKsyConfigBean = JSON.parseObject(obj.getString("android"), LiveKsyConfigBean.class);
|
||||
// } catch (Exception e) {
|
||||
// liveKsyConfigBean = LiveConfig.getDefaultKsyConfig();
|
||||
// }
|
||||
// mLiveLinkMicPushViewHolder = new LiveLinkMicPushKsyViewHolder(mContext, mSmallContainer, liveKsyConfigBean);
|
||||
// mLiveLinkMicPushViewHolder.setLivePushListener(new LivePushListener() {
|
||||
// @Override
|
||||
// public void onPreviewStart() {
|
||||
// //预览成功的回调
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onPushStart() {//推流成功的回调
|
||||
// SocketLinkMicUtil.audienceSendLinkMicUrl(mSocketClient, playUrl);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onPushFailed() {//推流失败的回调
|
||||
// DialogUitl.showSimpleDialog(mContext, WordUtil.getString(R.string.link_mic_failed_2), null);
|
||||
// SocketLinkMicUtil.audienceCloseLinkMic(mSocketClient);
|
||||
// }
|
||||
// });
|
||||
// mLiveLinkMicPushViewHolder.addToParent();
|
||||
// mLiveLinkMicPushViewHolder.startPush(pushUrl);
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -804,32 +767,6 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
//获取活动
|
||||
private void getEvent() {
|
||||
if (btn_onecz_event != null) {
|
||||
// HttpClient.getInstance().get("Charge2.IsFirstChargeIcon", "Charge2.IsFirstChargeIcon")
|
||||
// .params("uid", CommonAppConfig.getInstance().getUid())
|
||||
// .params("token", CommonAppConfig.getInstance().getToken())
|
||||
// .execute(new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if (code == 200) {
|
||||
// JSONObject obj = JSON.parseObject(info[0]);
|
||||
// if (obj.getString("is_hidden").equals("1")) {
|
||||
// btn_onecz_event.setVisibility(View.GONE);
|
||||
// //首充值
|
||||
// BannerBean bannerBean1 = new BannerBean();
|
||||
// bannerBean1.setImageUrl("https://qny.shayucm.com/img/BTN_Firstcharge%20%282%29.png");
|
||||
// bannerBean1.setLink("sc");
|
||||
// mBannerList1.add(bannerBean1);
|
||||
//
|
||||
// } else {
|
||||
// btn_onecz_event.setVisibility(View.GONE);
|
||||
// }
|
||||
//
|
||||
// } else {
|
||||
// btn_onecz_event.setVisibility(View.GONE);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
HttpClient.getInstance().get("Charge2.isFirstChargeIcons", "Charge2.isFirstChargeIcons")
|
||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||
.params("token", CommonAppConfig.getInstance().getToken())
|
||||
|
@ -140,6 +140,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
Log.e("errqs", "errl");
|
||||
}
|
||||
}, null);
|
||||
|
||||
}
|
||||
|
||||
private void svga_new_user_double() {
|
||||
@ -377,12 +378,9 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
if (peopleInfo.getIsShow()) {
|
||||
liveNewPeople.setVisibility(View.VISIBLE);
|
||||
if (peopleInfo.getLink().startsWith("http")){
|
||||
newPeopleUrl = peopleInfo.getLink();
|
||||
if(!newPeopleUrl.contains("?")){
|
||||
newPeopleUrl+="?";
|
||||
}
|
||||
newPeopleUrl=peopleInfo.getLink()+"?";
|
||||
}else {
|
||||
newPeopleUrl = CommonAppConfig.HOST + peopleInfo.getLink();
|
||||
newPeopleUrl = CommonAppConfig.HOST + "/" + peopleInfo.getLink();
|
||||
}
|
||||
}
|
||||
}, Throwable::printStackTrace).isDisposed();
|
||||
|
@ -3,7 +3,6 @@ package com.yunbao.live.views;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Outline;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@ -11,6 +10,7 @@ import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -61,6 +61,7 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
@ -107,6 +108,8 @@ import com.yunbao.live.presenter.LiveGiftAnimPresenter;
|
||||
import com.yunbao.live.presenter.LiveLightAnimPresenter;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.net.MalformedURLException;
|
||||
@ -133,7 +136,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
LinearLayout gif_view;
|
||||
RelativeLayout chat_view;
|
||||
private ImageView mAvatar;
|
||||
private ImageView UserMore;
|
||||
private ImageView userMore;
|
||||
private RoundedImageView userGuard;
|
||||
private ImageView mLevelAnchor;
|
||||
public static TextView mName;
|
||||
@ -578,6 +581,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
EventBus.getDefault().register(this);
|
||||
btnEvent = findViewById(R.id.btn_event);
|
||||
imgEvent = (ImageView) findViewById(R.id.img_event);
|
||||
btn_event2 = (LinearLayout) findViewById(R.id.btn_event2);
|
||||
@ -662,7 +666,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mVotes = (TextView) findViewById(R.id.votes);
|
||||
mTvMedalRank = (TextView) findViewById(R.id.medal_rank_num);
|
||||
mGuardNum = (TextView) findViewById(R.id.guard_num);
|
||||
UserMore = (ImageView) findViewById(R.id.user_more);
|
||||
userMore = (ImageView) findViewById(R.id.user_more);
|
||||
userGuard = (RoundedImageView) findViewById(R.id.user_guard);
|
||||
gift_svga = (SVGAImageView) findViewById(R.id.gift_svga);
|
||||
tv_avatarOther_name = (TextView) findViewById(R.id.tv_avatarOther_name);
|
||||
@ -713,7 +717,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
params.topMargin = mScreenWdith * 720 / 960 + 210;
|
||||
chat_view.setLayoutParams(params);
|
||||
|
||||
|
||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
||||
mChatRecyclerView.getLayoutParams();
|
||||
params1.topMargin = 180;
|
||||
@ -755,7 +758,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
findViewById(R.id.btn_votes).setOnClickListener(this);
|
||||
findViewById(R.id.btn_medal_rank).setOnClickListener(this);
|
||||
findViewById(R.id.btn_noble).setOnClickListener(this);
|
||||
UserMore.setOnClickListener(this);
|
||||
userMore.setOnClickListener(this);
|
||||
userGuard.setOnClickListener(this);
|
||||
|
||||
findViewById(R.id.btn_guard).setOnClickListener(this);
|
||||
@ -855,9 +858,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
|
||||
}
|
||||
});
|
||||
loadWishlistData();
|
||||
//打开活动窗口
|
||||
ViewClicksAntiShake.clicksAntiShake(wishListLayout, () -> mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", "")));
|
||||
//打招呼消息
|
||||
fastMsgRecyclerView = (RecyclerView) findViewById(R.id.room_fast_msg);
|
||||
fastMsgRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
@ -867,7 +867,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
//点击的消息发送出去
|
||||
((LiveActivity) mContext).sendChatMessage(msg);
|
||||
fastMsgRecyclerView.setVisibility(View.GONE);
|
||||
params1.bottomMargin = 0;
|
||||
mChatRecyclerView.setLayoutParams(params1);
|
||||
});
|
||||
|
||||
mBanner2.setVisibility(View.GONE);
|
||||
if (fastMsgRecyclerView.getVisibility() == View.GONE) {
|
||||
params1.bottomMargin = 0;
|
||||
mChatRecyclerView.setLayoutParams(params1);
|
||||
}
|
||||
// fastMsgRecyclerView.setItemAnimator(new DefaultItemAnimator());
|
||||
}
|
||||
|
||||
@ -1067,12 +1075,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
wishListFlipper.startFlipping();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化小时榜
|
||||
*/
|
||||
protected void initHourRankList() {
|
||||
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.hour_rank_list);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(44), DpUtil.dp2px(16));
|
||||
LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
textParams.leftMargin = DpUtil.dp2px(5);
|
||||
API.get().pdLiveApi(mContext).getHourChartRank(mLiveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -1085,9 +1096,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
ImageView hourPic = hourView.findViewById(R.id.wish_pic);
|
||||
mHotText = hotView.findViewById(R.id.wish_index);
|
||||
mHourRank = hourView.findViewById(R.id.wish_index);
|
||||
|
||||
hotPic.setImageResource(R.drawable.live_tags_hot);
|
||||
hourPic.setImageResource(R.drawable.live_tags_hour_list);
|
||||
mHotText.setLayoutParams(textParams);
|
||||
mHourRank.setLayoutParams(textParams);
|
||||
mHotText.setGravity(Gravity.CENTER);
|
||||
mHourRank.setGravity(Gravity.CENTER);
|
||||
setHourRankData(info.get(0).getRank());
|
||||
hotPic.setImageResource(WordUtil.isZh()?R.drawable.live_tags_hot:R.drawable.live_tags_hot_en);
|
||||
hourPic.setImageResource(WordUtil.isZh()?R.drawable.live_tags_hour_list:R.drawable.live_tags_hour_list_en);
|
||||
hotPic.setLayoutParams(params);
|
||||
hourPic.setLayoutParams(params);
|
||||
flipper.addView(hotView);
|
||||
@ -1101,11 +1116,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
String url = CommonAppConfig.HOST + path;
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken() + "&liveuid=" + mLiveUid;
|
||||
|
||||
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
|
||||
bundle.putString("url", url);
|
||||
// bundle.putInt("height", DpUtil.dp2px(500));
|
||||
bundle.putInt("height", DpUtil.dp2px(500));
|
||||
bundle.putInt("show_type", 0);
|
||||
bundle.putString("roomId",mLiveUid);
|
||||
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
||||
liveHDDialogFragment.setArguments(bundle);
|
||||
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
@ -1118,6 +1133,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
/**
|
||||
* 星光值转带k的字符
|
||||
*
|
||||
* @param val 值
|
||||
* @retur 字符串
|
||||
*/
|
||||
@ -1132,24 +1148,31 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
/**
|
||||
* 设置小时榜
|
||||
*
|
||||
* @param rank 小时榜
|
||||
*/
|
||||
public void setHourRankData(int rank){
|
||||
public void setHourRankData(long rank) {
|
||||
if (mHourRank != null) {
|
||||
mHourRank.setText(formatBigNum.formatBigNum(rank + ""));
|
||||
if (rank == 0) {
|
||||
mHourRank.setText(R.string.no_rank_data);
|
||||
} else {
|
||||
mHourRank.setText(String.format(WordUtil.getString(R.string.hour_rank),formatBigNum.formatBigNum(rank + "")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置热度值
|
||||
*
|
||||
* @param hot 热度值
|
||||
*/
|
||||
public void setHotData(String hot) {
|
||||
if(mHotText!=null) {
|
||||
if (mHotText != null&&!TextUtils.isEmpty(hot)) {
|
||||
mHotText.setText(hot);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新心愿单进度
|
||||
*
|
||||
@ -1436,7 +1459,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
*/
|
||||
public void setUserList(List<LiveUserGiftBean> list) {
|
||||
if (mLiveUserAdapter != null) {
|
||||
resetUserListWidth(DpUtil.dp2px((Math.min(list.size(), 3)) * 38));
|
||||
//resetUserListWidth(DpUtil.dp2px((Math.min(list.size(), 3)) * 30));
|
||||
mLiveUserAdapter.refreshList(list);
|
||||
}
|
||||
}
|
||||
@ -1521,6 +1544,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private void setGuardIcon(LiveUserGiftBean guard) {
|
||||
if (guard != null) {
|
||||
nowGuardUser = guard;
|
||||
ViewGroup.LayoutParams params = userGuard.getLayoutParams();
|
||||
params.height = DpUtil.dp2px(30);
|
||||
params.width = DpUtil.dp2px(30);
|
||||
userGuard.setLayoutParams(params);
|
||||
ImgLoader.displayAvatar(mContext, guard.getAvatar(), userGuard);
|
||||
gift_svga.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -1716,43 +1743,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
((LiveRyAnchorActivity) mContext).onBackPressed();
|
||||
}
|
||||
}
|
||||
// if (isRy == false) {
|
||||
// if (forAct == 1) {
|
||||
// //是否关注0==没关注
|
||||
// if (isAttention == 0) {
|
||||
// if (isStayRoomfive) {
|
||||
// showFollowDialog(mNameText, mAvatarUrl, mContext);
|
||||
// } else {
|
||||
// ((LiveAudienceActivity) mContext).setBackIndex(1);
|
||||
// ((LiveAudienceActivity) mContext).onBackPressed();
|
||||
// }
|
||||
// } else {
|
||||
// ((LiveAudienceActivity) mContext).setBackIndex(1);
|
||||
// ((LiveAudienceActivity) mContext).onBackPressed();
|
||||
// }
|
||||
// } else {
|
||||
// ((LiveAudienceActivity) mContext).setBackIndex(1);
|
||||
// ((LiveAnchorActivity) mContext).onBackPressed();
|
||||
// }
|
||||
// } else {
|
||||
// if (forAct == 1) {
|
||||
// //是否关注0==没关注
|
||||
// if (isAttention == 0) {
|
||||
// if (isStayRoomfive) {
|
||||
// showFollowDialog(mNameText, mAvatarUrl, mContext);
|
||||
// } else {
|
||||
// LiveRyAnchorActivity.backIndex = 1;
|
||||
// ((LiveRyAnchorActivity) mContext).onBackPressed();
|
||||
// }
|
||||
// } else {
|
||||
// LiveRyAnchorActivity.backIndex = 1;
|
||||
// ((LiveRyAnchorActivity) mContext).onBackPressed();
|
||||
// }
|
||||
// } else {
|
||||
// LiveRyAnchorActivity.backIndex = 1;
|
||||
// ((LiveRyAnchorActivity) mContext).onBackPressed();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1978,7 +1968,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
public void showGiftMessage(LiveReceiveGiftBean bean) {
|
||||
mVotes.setText(bean.getVotes());
|
||||
room_hot.setText(formatBigNum.formatBigNum(bean.getHot_num()));
|
||||
setHotData(formatBigNum.formatBigNum(bean.getLiveChatBean().getHot_num()));
|
||||
setHotData(formatBigNum.formatBigNum(bean.getHot_num()));
|
||||
mTvMedalRank.setText(bean.getMedalRankNum());
|
||||
if (mLiveGiftAnimPresenter == null) {
|
||||
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
||||
@ -1992,7 +1982,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
public void showGiftMessage(LiveReceiveGiftBean bean, boolean isAncher) {
|
||||
mVotes.setText(bean.getVotes());
|
||||
room_hot.setText(formatBigNum.formatBigNum(bean.getHot_num()));
|
||||
setHotData(formatBigNum.formatBigNum(bean.getLiveChatBean().getHot_num()));
|
||||
setHotData(formatBigNum.formatBigNum(bean.getHot_num()));
|
||||
mTvMedalRank.setText(bean.getMedalRankNum());
|
||||
//开通粉丝勋章成功弹窗
|
||||
if (!isAncher && bean.getMedalFirstGet() != null && bean.getMedalFirstGet().equals("1")
|
||||
@ -2014,6 +2004,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
||||
}
|
||||
mLiveGiftAnimPresenter.showBuyGuardGiftAnim(bean);
|
||||
setHotData(bean.getHot_num());
|
||||
}
|
||||
|
||||
//全服通知 购买坐骑
|
||||
@ -2222,6 +2213,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
|
||||
public void release() {
|
||||
EventBus.getDefault().unregister(this);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.GET_USER_LIST);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.TIME_CHARGE);
|
||||
CommonHttpUtil.cancel(CommonHttpConsts.SET_ATTENTION);
|
||||
@ -2291,7 +2283,18 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
|
||||
public void setFastMessage(List<String> greetings) {
|
||||
fastMsgRecyclerView.setVisibility(View.VISIBLE);
|
||||
fastMessageRecyclerViewAdapter.setMessage(greetings);
|
||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
||||
mChatRecyclerView.getLayoutParams();
|
||||
if (greetings.size() > 0) {
|
||||
params1.bottomMargin = 100;
|
||||
} else {
|
||||
params1.bottomMargin = 0;
|
||||
}
|
||||
|
||||
|
||||
mChatRecyclerView.setLayoutParams(params1);
|
||||
}
|
||||
|
||||
private static class LiveRoomHandler extends Handler {
|
||||
@ -2348,5 +2351,21 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
CommonHttpUtil.cancel(CommonHttpConsts.SET_ATTENTION);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdata(String str) {
|
||||
if ("svga_new_user_gif".equals(str)) {
|
||||
if (fastMsgRecyclerView == null) return;
|
||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
||||
fastMsgRecyclerView.getLayoutParams();
|
||||
params1.rightMargin = DeviceUtils.getScreenWidth((Activity) mContext) / 3;
|
||||
fastMsgRecyclerView.setLayoutParams(params1);
|
||||
} else if ("stop_svga_new_user_gif".equals(str)) {
|
||||
if (fastMsgRecyclerView == null) return;
|
||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
||||
fastMsgRecyclerView.getLayoutParams();
|
||||
params1.rightMargin = 0;
|
||||
fastMsgRecyclerView.setLayoutParams(params1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -162,9 +162,11 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
private boolean mLighted;
|
||||
private boolean mCoinNotEnough;//余额不足
|
||||
private boolean mFirstConnectSocket;//是否是第一次连接成功socket
|
||||
private int liveBg;
|
||||
private int liveBg = -1;
|
||||
private LiveImDeletUtil liveImDeletUtil;
|
||||
private List<String> greetings = new ArrayList<>();
|
||||
private Handler liveHandler = new Handler();
|
||||
|
||||
|
||||
public PortraitLiveManager(Activity context, Intent intent) {
|
||||
this.mContext = context;
|
||||
@ -236,8 +238,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
|
||||
//直播间背景
|
||||
ImgLoader.display(mContext, R.mipmap.live_bg, liveBack);
|
||||
mask.setVisibility(View.GONE);
|
||||
ImgLoader.displayBlurLive(mContext, data.getAvatar(), liveBack);
|
||||
mask.setVisibility(View.VISIBLE);
|
||||
|
||||
mLivePlayViewHolder.setCover(data.getThumb());
|
||||
mLivePlayViewHolder.play(data.getPull());
|
||||
mLiveRoomViewHolder.setAvatar(data.getAvatar());
|
||||
@ -272,6 +275,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
@Override
|
||||
public void onRemove() {
|
||||
//子线程执行退出操作
|
||||
liveHandler.post(() -> exitLiveRoom());
|
||||
|
||||
|
||||
if (mLiveAudienceViewHolder != null) {
|
||||
mLiveAudienceViewHolder.removeFromParent();
|
||||
mLiveAudienceViewHolder.countDownTimerTrickery = null;
|
||||
@ -284,10 +291,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mSocketRyClient.disConnect();
|
||||
}
|
||||
mSocketRyClient = null;
|
||||
|
||||
|
||||
//结束播放
|
||||
if (mLivePlayViewHolder != null) {
|
||||
mLivePlayViewHolder.stopPlay();
|
||||
mLivePlayViewHolder.release();
|
||||
}
|
||||
mLivePlayViewHolder = null;
|
||||
@ -302,10 +308,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mSocketClient = null;
|
||||
|
||||
}
|
||||
if (mLivePlayViewHolder != null) {
|
||||
|
||||
mLivePlayViewHolder.stopPlay();
|
||||
}
|
||||
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.removeFromParent();
|
||||
@ -543,6 +545,11 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
@Override
|
||||
public void onChat(LiveChatBean bean, int index) {
|
||||
if (bean.getType() == 1) {
|
||||
if (!bean.getContent().contains(mLiveBean.getUserNiceName())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.insertChat(bean, index);
|
||||
}
|
||||
@ -974,15 +981,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mChatLevel = obj.getIntValue("speak_limit");
|
||||
mDanMuLevel = obj.getIntValue("barrage_limit");
|
||||
liveBg = obj.getIntValue("live_bg");
|
||||
|
||||
if (obj.containsKey("greetings")) {
|
||||
greetings = JSONArray.parseArray(obj.getJSONArray("greetings").toJSONString(), String.class);
|
||||
}
|
||||
if (obj.containsKey("live_bg")) {
|
||||
if (liveBg == 0) {
|
||||
|
||||
if (liveBg == 1) {
|
||||
//直播间背景
|
||||
ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack);
|
||||
mask.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display(mContext, R.mipmap.live_bg, liveBack);
|
||||
mask.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
//回传参数
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.OPEN_PARAMETERS)
|
||||
@ -1164,7 +1175,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.OPEN_PARAMETERS)
|
||||
.setParametersModel(new OpenParametersModel().setmLiveGuardInfo(mLiveGuardInfo)));
|
||||
.setParametersModel(new OpenParametersModel().setmLiveGuardInfo(mLiveGuardInfo)
|
||||
.setFansNum(fansNum)
|
||||
.setIs_fans(is_fans)));
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.setGuardNum(guardNum);
|
||||
mLiveRoomViewHolder.setFansNum(fansNum);
|
||||
@ -1281,20 +1294,14 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLivePlayViewHolder.release();
|
||||
}
|
||||
mLivePlayViewHolder = null;
|
||||
onRemove();
|
||||
}
|
||||
|
||||
public void end() {
|
||||
if (mLiveRoomViewHolder != null)
|
||||
mLiveRoomViewHolder.clearList();
|
||||
boolean canBackPressed = true;
|
||||
if (mContext instanceof LiveAudienceActivity) {
|
||||
canBackPressed = ((LiveAudienceActivity) mContext).canBackPressed();
|
||||
}
|
||||
|
||||
IMLoginManager.get(mContext).setisNewUserOne(false);
|
||||
if (!mEnd && !canBackPressed) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
countDownTimer = null;
|
||||
@ -1304,13 +1311,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
if (LiveRoomViewHolder.isAttention == 0) {
|
||||
if (isStayRoomfive) {
|
||||
LiveRoomViewHolder.showFollowDialog(LiveRoomViewHolder.mNameText, LiveRoomViewHolder.mAvatarUrl, mContext);
|
||||
} else {
|
||||
backIndex = 1;
|
||||
((LiveAudienceActivity) mContext).onBackPressed();
|
||||
}
|
||||
} else {
|
||||
backIndex = 1;
|
||||
((LiveAudienceActivity) mContext).onBackPressed();
|
||||
}
|
||||
} else {
|
||||
exitLiveRoom();
|
||||
@ -1361,8 +1362,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
Log.i("tx", "退出失败");
|
||||
}
|
||||
});
|
||||
endPlay();
|
||||
mContext.finish();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -1464,4 +1464,5 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="112dp" android:height="25dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#33000000" />
|
||||
<solid android:color="#33FFFFFF" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
@ -1,15 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="true">
|
||||
<shape>
|
||||
<corners android:radius="15dp"/>
|
||||
<gradient android:endColor="#FF7D2F" android:startColor="#FF5623" android:type="linear"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="false">
|
||||
<shape>
|
||||
<corners android:radius="15dp"/>
|
||||
<solid android:color="@color/gray3"/>
|
||||
<item android:width="102dp" android:height="34dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#ffa98cfd" android:endColor="#ff9d7afd" android:angle="90" />
|
||||
<corners android:radius="21dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="17dp"/>
|
||||
<solid android:color="#80000000"/>
|
||||
<solid android:color="#30000000"/>
|
||||
</shape>
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="60dp" />
|
||||
<stroke android:color="#FFBA41" android:width="1dp"/>
|
||||
<solid android:color="#80000000"/>
|
||||
<solid android:color="#4D000000"/>
|
||||
</shape>
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="10dp"/>
|
||||
<solid android:color="#80000000"/>
|
||||
<solid android:color="#30000000"/>
|
||||
</shape>
|
@ -3,5 +3,5 @@
|
||||
<corners
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:topLeftRadius="10dp" />
|
||||
<solid android:color="#80000000" />
|
||||
<solid android:color="#30000000" />
|
||||
</shape>
|
BIN
live/src/main/res/drawable/live_tags_hot_en.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
live/src/main/res/drawable/live_tags_hour_list_en.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 90 KiB |
@ -56,7 +56,7 @@
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="5dp"
|
||||
android:layout_toRightOf="@id/btn_fans"
|
||||
android:text="貴族"
|
||||
android:text="@string/noble"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"/>
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
|
@ -132,7 +132,7 @@
|
||||
android:layout_marginTop="25dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:visibility="gone">
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
<TextView
|
||||
@ -164,7 +164,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/bg_guard_btn_buy"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:text="@string/guard_buy"
|
||||
android:textColor="@color/white"
|
||||
@ -245,8 +244,8 @@
|
||||
android:id="@+id/guard_imageView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="58dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginStart="125dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/guardian_img_wings"
|
||||
android:visibility="invisible"
|
||||
@ -257,7 +256,7 @@
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginStart="-5dp"
|
||||
android:layout_marginStart="-6dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_toEndOf="@+id/guard_imageView"
|
||||
android:scaleType="centerCrop"
|
||||
@ -269,9 +268,9 @@
|
||||
android:id="@+id/guard_imageView_one"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_toStartOf="@id/guard_imageView"
|
||||
|
||||
android:layout_toStartOf="@id/guard_imageView_two"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/guardian_img_wings"
|
||||
android:visibility="invisible"
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_black"
|
||||
@ -103,12 +104,35 @@
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/no_more_layout"
|
||||
android:layout_width="333dp"
|
||||
android:layout_height="333dp"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/no_more"
|
||||
android:layout_width="233dp"
|
||||
android:layout_height="233dp"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone" />
|
||||
android:layout_marginBottom="32dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_more_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/no_more" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.yunbao.common.custom.CommonRefreshView
|
||||
android:id="@+id/refreshView"
|
||||
|
@ -3,6 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/room_fast_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_fast_meg">
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/live_user_root_layout"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_height="38dp">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/wrap"-->
|
||||
@ -25,12 +25,12 @@
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_oval="true"
|
||||
android:src="@drawable/m_chu_xia"/>
|
||||
android:src="@drawable/m_chu_xia"
|
||||
app:riv_oval="true" />
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
@ -46,15 +46,15 @@
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/guard_icon"
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
@ -66,7 +66,7 @@
|
||||
android:layout_height="90dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:layout_marginBottom="88dp"
|
||||
android:background="@mipmap/live_mission_box"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
@ -304,14 +304,16 @@
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/icon_live_msg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/et_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:alpha="0.5"
|
||||
android:gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:hint="@string/live_say_something"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/textColor"
|
||||
@ -336,8 +338,7 @@
|
||||
android:id="@+id/btn_msg"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:padding="5dp"
|
||||
android:src="@mipmap/messagesss" />
|
||||
|
||||
@ -399,11 +400,10 @@
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_toStartOf="@id/gift_image"
|
||||
android:padding="4dp"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/live_icon_newpeople_en" />
|
||||
android:src="@mipmap/live_icon_newpeople_en"
|
||||
android:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
@ -88,8 +88,8 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/group_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="33dp"
|
||||
android:layout_width="142dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/bg_live_ico"
|
||||
@ -118,7 +118,7 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
@ -148,19 +148,15 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
<ImageView
|
||||
android:id="@+id/btn_follow"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@drawable/bg_live_anchor_follow"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:src="@mipmap/live_icon_focus"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
android:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/view_medal"
|
||||
@ -174,29 +170,17 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@id/group_1"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_toRightOf="@id/group_1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="8dp"
|
||||
android:scaleType="centerCrop">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/user_guard"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/img_guardian_empty"
|
||||
@ -213,37 +197,51 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@id/group_1"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toRightOf="@id/group_1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="end|center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/user_recyclerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="end|center"
|
||||
android:layout_marginRight="-3dp"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_more"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/live_users_more" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignBottom="@id/lin"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:padding="3dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_live_close_3" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/hour_rank_layout"
|
||||
android:layout_width="wrap_content"
|
||||
@ -260,26 +258,24 @@
|
||||
<include
|
||||
layout="@layout/view_wish_list"
|
||||
android:layout_width="14dp"
|
||||
android:layout_weight="0.0"
|
||||
android:layout_height="14dp"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/live_icon_wishlist" />
|
||||
android:src="@mipmap/live_icon_wishlist"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ViewFlipper
|
||||
android:id="@+id/hour_rank_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:flipInterval="5000"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:inAnimation="@anim/anim_marquee_in"
|
||||
android:outAnimation="@anim/anim_marquee_out" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="4dp"
|
||||
android:layout_gravity="center"
|
||||
|
||||
android:layout_height="8dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/live_icon_right_more" />
|
||||
|
||||
|
||||
@ -287,18 +283,18 @@
|
||||
<!--贡献-->
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_votes"
|
||||
android:layout_toRightOf="@id/hour_rank_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_height="21dp"
|
||||
android:layout_below="@id/lin"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_toRightOf="@id/hour_rank_layout"
|
||||
android:background="@drawable/bg_live_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="5dp">
|
||||
android:paddingRight="5dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
@ -398,7 +394,7 @@
|
||||
<!--心愿单-->
|
||||
<LinearLayout
|
||||
android:id="@+id/wish_list_layout"
|
||||
android:layout_width="90dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="21dp"
|
||||
android:layout_alignTop="@id/hour_rank_layout"
|
||||
android:layout_marginStart="10dp"
|
||||
@ -505,7 +501,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/open_sidebar"
|
||||
android:layout_width="69dp"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignTop="@id/hour_rank_layout"
|
||||
android:layout_alignParentRight="true"
|
||||
@ -712,15 +708,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="80dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/chat_recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="430dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="370dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none" />
|
||||
|
||||
@ -853,6 +848,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:layout_below="@id/lin">
|
||||
@ -1868,7 +1864,9 @@
|
||||
android:id="@+id/room_fast_msg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentBottom="true" />
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
|
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.3 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/live_icon_focus.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/messagesss.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
13
live/src/main/res/values-en/strings.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="no_more_day_rank">No one is on the list at the moment</string>
|
||||
<string name="no_more_guard">anchor are waiting at your guard!</string>
|
||||
<string name="no_rank_data">Not on the list</string>
|
||||
<string name="hour_rank">No.%s</string>
|
||||
<string name="hour_rank_not">Not listed</string>
|
||||
<string name="day_rank">Day</string>
|
||||
<string name="week_rank">Weekly</string>
|
||||
<string name="views_rank">Viewers</string>
|
||||
<string name="gurad_rank">Guard</string>
|
||||
<string name="fans">Fans</string>
|
||||
</resources>
|
@ -1,4 +1,14 @@
|
||||
<resources>
|
||||
<string name="buy_guard_info" translatable="false">成爲TA的守護,爲TA保駕護航!</string>
|
||||
<string name="buy_guard_back_coin" translatable="false">返還</string>
|
||||
<string name="no_more_day_rank">暫時無人上榜,快來成為第一位上榜的人吧!</string>
|
||||
<string name="no_more_guard">主播正在等待您的守護!</string>
|
||||
<string name="no_rank_data">未上榜</string>
|
||||
<string name="hour_rank">第%s名</string>
|
||||
<string name="hour_rank_not">未上榜</string>
|
||||
<string name="day_rank">日榜</string>
|
||||
<string name="week_rank">周榜</string>
|
||||
<string name="views_rank">观众</string>
|
||||
<string name="gurad_rank">观众</string>
|
||||
<string name="fans">粉丝</string>
|
||||
</resources>
|
||||
|
@ -57,7 +57,7 @@ public class MainHomeLiveAdapter extends RefreshAdapter<LiveBean> {
|
||||
this.context = context;
|
||||
this.Height = h;
|
||||
mHeadView = mInflater.inflate(R.layout.item_main_home_live_head, null, false);
|
||||
mHeadView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, DpUtil.dp2px(140)));
|
||||
mHeadView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, DpUtil.dp2px(120)));
|
||||
}
|
||||
|
||||
public View getHeadView() {
|
||||
|
@ -14,7 +14,7 @@
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:delay_time="3000"
|
||||
|