diff --git a/common/src/main/java/com/yunbao/common/custom/CommonRefreshView.java b/common/src/main/java/com/yunbao/common/custom/CommonRefreshView.java index 4c9f024bb..5cd4d58da 100644 --- a/common/src/main/java/com/yunbao/common/custom/CommonRefreshView.java +++ b/common/src/main/java/com/yunbao/common/custom/CommonRefreshView.java @@ -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; @@ -295,7 +304,7 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen * 手动设置没有更多数据 * 因为日榜/周榜接口没有分页参数,会导致一直读取重复数据 */ - public void setNotLoadMore(){ + public void setNotLoadMore() { mSmartRefreshLayout.finishLoadMoreWithNoMoreData(); } diff --git a/common/src/main/java/com/yunbao/common/utils/WordUtil.java b/common/src/main/java/com/yunbao/common/utils/WordUtil.java index cfe6c9075..5977b54ac 100644 --- a/common/src/main/java/com/yunbao/common/utils/WordUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/WordUtil.java @@ -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"); + } } diff --git a/common/src/main/res/layout/item_sidebar_lives.xml b/common/src/main/res/layout/item_sidebar_lives.xml index 2d6a3bc40..48875a68d 100644 --- a/common/src/main/res/layout/item_sidebar_lives.xml +++ b/common/src/main/res/layout/item_sidebar_lives.xml @@ -21,12 +21,17 @@ + + completing mission - ApplyMic Cancel Mic Quit Mic @@ -172,7 +171,7 @@ Only one can be given away~ Guard Contribution this week - Become the girst Guard of he/she + anchor are waiting at your guard! Let\'s open up a guard for our favorite anchor You are the current anchor\'s monthly guard \ n the guard date expires You are the current anchor\'s annual guardian \ n the guardian date expires @@ -286,7 +285,7 @@ Tricky MultiplayerPK LianmaiVoice - ZhouXingbang + Start LeaveTemporarily ResumeLive Flash lamp @@ -306,7 +305,7 @@ Harvest Number of visitors Guan Zhong - Tell you something + Let\'s have a chat~ Open the barrage, strip Please enter the room password @@ -372,7 +371,7 @@ Please select a channel Focus on the anchor Are you sure to report? - Interaction between wheat and wheat + Interaction End Lian Mai Allowed even wheat Ban Lian Mai @@ -861,5 +860,13 @@ Limited ride And limited avatar frame anchor More Wonderful live - recommended for you + More + Fun Games + Value-added benefits + Fan Club + Activity + Basic tools + Effect settings + Shield gift effect + Shield car effect diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 6824fd2ec..749000e2d 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -123,7 +123,7 @@ 守護 本周貢獻 - 主播正在等待您成為TA的守護,為TA保駕護航! + 主播正在等待您的守護! 快去為喜歡的主播開通守護吧 您是當前主播的月守護\n守護日期截止到 您是當前主播的年守護\n守護日期截止到 @@ -243,7 +243,7 @@ 收穫 觀看人數 關播中 - 和大家說點什麼… + 一起来聊聊天吧~ 開啟彈幕, 請輸入房間密碼 @@ -875,11 +875,11 @@ 精彩直播 為您推薦 趣味游戏 - 增值权益 + 增值權益 粉絲團 活動中心 - 基础工具 + 基礎工具 特效設置 - 屏蔽礼物特效 - 屏蔽坐骑特效 + 屏蔽禮物特效 + 屏蔽座駕特效 diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index 6b8e03168..4b77b27b8 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -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; @@ -276,9 +278,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL mLiveLinkMicPresenter.onAudienceLeaveRoom(bean); } try { - if (mLiveRoomViewHolder!=null) { + if (mLiveRoomViewHolder != null) { if (!"".equals(bean.getHot_num()) && !"0".equals(bean.getHot_num())) { - // mLiveRoomViewHolder.room_hot.setText(formatBigNum.formatBigNum(bean.getHot_num())); + // mLiveRoomViewHolder.room_hot.setText(formatBigNum.formatBigNum(bean.getHot_num())); mLiveRoomViewHolder.setHotData(formatBigNum.formatBigNum(bean.getHot_num())); } } @@ -331,7 +333,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL } - @Override public void onBuyLiangName(LiveReceiveGiftBean bean) { if (mLiveRoomViewHolder != null) { @@ -503,8 +504,8 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL } @Override - public void onHourRank(LiveChatBean bean,JSONObject ranks) { - if(mLiveRoomViewHolder!=null){ + public void onHourRank(LiveChatBean bean, JSONObject ranks) { + if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.setHourRankData(ranks.getInteger(mLiveUid)); } } @@ -1261,17 +1262,30 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment"); } + /** * 守护列表弹窗 */ public void openNewGuardListWindow() { - LiveNewGuardListDialogFragment fragment = new LiveNewGuardListDialogFragment(); - fragment.setLiveGuardInfo(mLiveGuardInfo); - Bundle bundle = new Bundle(); - bundle.putString(Constants.LIVE_UID, mLiveUid); - bundle.putBoolean(Constants.ANCHOR, mIsAnchor); - fragment.setArguments(bundle); - fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment"); + LiveHttpUtil.getGuardList(mLiveUid, 1, new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + List 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); + bundle.putBoolean(Constants.ANCHOR, mIsAnchor); + fragment.setArguments(bundle); + fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment"); + } + } + }); + } /** @@ -1337,11 +1351,12 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL bundle.putString(Constants.LIVE_UID, mLiveUid); bundle.putString(Constants.LIVE_ANCHER_NAME, mAncherName); bundle.putString(Constants.STREAM, mStream); - bundle.putString(Constants.LIVE_ANCHER_ICON,mAncherIcon); - bundle.putString(Constants.USER_ICON,CommonAppConfig.getInstance().getUserBean().getAvatar()); + bundle.putString(Constants.LIVE_ANCHER_ICON, mAncherIcon); + bundle.putString(Constants.USER_ICON, CommonAppConfig.getInstance().getUserBean().getAvatar()); fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment"); } + /** * 打开购买守护的弹窗 */ diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index fdcda64ed..a6a2bb6f4 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -109,6 +109,8 @@ public class LiveAudienceActivity extends LiveActivity { private ViewGroup mViewGroup; private int liveBg = 0; + //直播间进入房间队列 + private Handler liveHandler = new Handler(); @Override @@ -246,14 +248,36 @@ public class LiveAudienceActivity extends LiveActivity { private void loadData(ViewGroup viewGroup, int currentItem) { mViewGroup = viewGroup; - AnchorRecommendItemModel data = itemModelList.get(mCurrentPage); - - //获取直播间状态 - LiveHttpUtil.getLiveInfo(data.getUid(), liveInfo); 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); + + } + }; + /** * 获取直播间状态 */ @@ -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"; diff --git a/live/src/main/java/com/yunbao/live/bean/OpenParametersModel.java b/live/src/main/java/com/yunbao/live/bean/OpenParametersModel.java index c2f2c738b..6bb497239 100644 --- a/live/src/main/java/com/yunbao/live/bean/OpenParametersModel.java +++ b/live/src/main/java/com/yunbao/live/bean/OpenParametersModel.java @@ -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; diff --git a/live/src/main/java/com/yunbao/live/custom/RightGradual.java b/live/src/main/java/com/yunbao/live/custom/RightGradual.java index 01b6ef5e1..4c25d1257 100644 --- a/live/src/main/java/com/yunbao/live/custom/RightGradual.java +++ b/live/src/main/java/com/yunbao/live/custom/RightGradual.java @@ -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); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java index 99ba043ce..b53d052ee 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java @@ -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); + } + } + }); } /** diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java index 39161f02e..0529ccb11 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardBuyDialogFragment.java @@ -239,10 +239,12 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements bean.setChecked(false); } for (int i : guardBuyBean.getPrivilege()) { - mRightList.get(i).setChecked(true); + if(i= guardBuyBean.getCoin()); + // mBtnBuy.setEnabled(mCoinVal >= guardBuyBean.getCoin()); } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java index e8dc83c1b..43da6edc3 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewGuardListDialogFragment.java @@ -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 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() { @Override public RefreshAdapter getAdapter() { @@ -129,36 +134,9 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements @Override public List processData(String[] info) { List list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class); - if (list.isEmpty()) { - userLayout.setVisibility(View.INVISIBLE); - }else { - GuardUserBean bean = list.get(0); - giftSvga.setImageResource(R.drawable.guardian_img_wings_p); - ImgLoader.display(mContext, bean.getAvatar(), guardIcon); - guardIcon.setVisibility(View.VISIBLE); - userName.setText(bean.getUserNiceName()); - String guardString = WordUtil.getString(R.string.guard_week_con); - userGuard.setText(guardString + " " + bean.getContribute()); - userSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex())); - LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel()); - if (levelBean != null) { - ImgLoader.display(mContext, levelBean.getThumb(), userLevel); - } - } - if (mLiveGuardInfo != null) { - int guardType = mLiveGuardInfo.getMyGuardType(); - if (guardType == Constants.GUARD_TYPE_NONE) { - tip1.setText(R.string.guard_tip_0); - } else if (guardType == Constants.GUARD_TYPE_DAY) { - tip1.setText(WordUtil.getString(R.string.guard_tip_day) + mLiveGuardInfo.getMyGuardEndTime()); - mBtnBuy.setText(R.string.guard_buy_3); - } else if (guardType == Constants.GUARD_TYPE_MONTH) { - tip1.setText(WordUtil.getString(R.string.guard_tip_1) + mLiveGuardInfo.getMyGuardEndTime()); - mBtnBuy.setText(R.string.guard_buy_3); - } else if (guardType == Constants.GUARD_TYPE_YEAR) { - tip1.setText(WordUtil.getString(R.string.guard_tip_2) + mLiveGuardInfo.getMyGuardEndTime()); - mBtnBuy.setText(R.string.guard_buy_3); - } + if(!list.isEmpty()){ + LiveNewGuardListDialogFragment.this.list=list; + setAdapterData(); } return list; } @@ -183,7 +161,8 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements } }); - mRefreshView.initData(); + mRefreshView.setRecyclerViewAdapter(mGuardAdapter); + mGuardAdapter.notifyDataSetChanged(); } @Override @@ -198,4 +177,40 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements initView(); return show; } + private void setAdapterData(){ + if (list.isEmpty()) { + userLayout.setVisibility(View.INVISIBLE); + }else { + GuardUserBean bean = list.get(0); + giftSvga.setImageResource(R.drawable.guardian_img_wings_p); + ImgLoader.display(mContext, bean.getAvatar(), guardIcon); + guardIcon.setVisibility(View.VISIBLE); + userName.setText(bean.getUserNiceName()); + String guardString = WordUtil.getString(R.string.guard_week_con); + userGuard.setText(guardString + " " + bean.getContribute()); + userSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex())); + LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel()); + if (levelBean != null) { + ImgLoader.display(mContext, levelBean.getThumb(), userLevel); + } + } + if (mLiveGuardInfo != null) { + int guardType = mLiveGuardInfo.getMyGuardType(); + if (guardType == Constants.GUARD_TYPE_NONE) { + tip1.setText(R.string.guard_tip_0); + } else if (guardType == Constants.GUARD_TYPE_DAY) { + tip1.setText(WordUtil.getString(R.string.guard_tip_day) + mLiveGuardInfo.getMyGuardEndTime()); + mBtnBuy.setText(R.string.guard_buy_3); + } else if (guardType == Constants.GUARD_TYPE_MONTH) { + tip1.setText(WordUtil.getString(R.string.guard_tip_1) + mLiveGuardInfo.getMyGuardEndTime()); + mBtnBuy.setText(R.string.guard_buy_3); + } else if (guardType == Constants.GUARD_TYPE_YEAR) { + tip1.setText(WordUtil.getString(R.string.guard_tip_2) + mLiveGuardInfo.getMyGuardEndTime()); + mBtnBuy.setText(R.string.guard_buy_3); + } + } + } + public void setList(List list) { + this.list=list; + } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java index cd3755697..0d8a630d0 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java @@ -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 processRankData(JSONObject json){ JSONArray rank=Integer.parseInt(Tips)==4?json.getJSONArray("listDay"):json.getJSONArray("listWeek"); List 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); } diff --git a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java index bd87ea77c..bc0fa38ac 100644 --- a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java +++ b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java @@ -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 diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java index d8d428d34..45e206f10 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java @@ -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()) diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index 3f5a15c81..07dc54aed 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -140,6 +140,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { Log.e("errqs", "errl"); } }, null); + } private void svga_new_user_double() { @@ -376,13 +377,10 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { NewPeopleInfo peopleInfo = stringResponseModel.getData().getInfo(); if (peopleInfo.getIsShow()) { liveNewPeople.setVisibility(View.VISIBLE); - if(peopleInfo.getLink().startsWith("http")){ - newPeopleUrl = peopleInfo.getLink(); - if(!newPeopleUrl.contains("?")){ - newPeopleUrl+="?"; - } + if (peopleInfo.getLink().startsWith("http")){ + newPeopleUrl=peopleInfo.getLink()+"?"; }else { - newPeopleUrl = CommonAppConfig.HOST + peopleInfo.getLink(); + newPeopleUrl = CommonAppConfig.HOST + "/" + peopleInfo.getLink(); } } }, Throwable::printStackTrace).isDisposed(); diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 7466b5055..01b0c7d4c 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -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,8 +867,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis //点击的消息发送出去 ((LiveActivity) mContext).sendChatMessage(msg); fastMsgRecyclerView.setVisibility(View.GONE); + params1.bottomMargin = 0; + mChatRecyclerView.setLayoutParams(params1); }); - // fastMsgRecyclerView.setItemAnimator(new DefaultItemAnimator()); + + mBanner2.setVisibility(View.GONE); + if (fastMsgRecyclerView.getVisibility() == View.GONE) { + params1.bottomMargin = 0; + mChatRecyclerView.setLayoutParams(params1); + } + // fastMsgRecyclerView.setItemAnimator(new DefaultItemAnimator()); } private void showBanner2() { @@ -1067,45 +1075,52 @@ 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)); + 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()) .subscribe(listResponseModel -> { List info = listResponseModel.getData().getInfo(); - if(!info.isEmpty()){ - View hotView=LayoutInflater.from(mContext).inflate(R.layout.view_wish_list,null); - View hourView=LayoutInflater.from(mContext).inflate(R.layout.view_wish_list,null); + if (!info.isEmpty()) { + View hotView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); + View hourView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); ImageView hotPic = hotView.findViewById(R.id.wish_pic); 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 = hotView.findViewById(R.id.wish_index); + mHourRank = hourView.findViewById(R.id.wish_index); + 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); flipper.addView(hourView); flipper.setOnClickListener(view -> { - Bundle bundle=new Bundle(); - String path=info.get(0).getUrl(); - if(!path.startsWith("/")){ - path="/"+path; + Bundle bundle = new Bundle(); + String path = info.get(0).getUrl(); + if (!path.startsWith("/")) { + path = "/" + path; } - String url=CommonAppConfig.HOST+path; + 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,38 +1133,46 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis /** * 星光值转带k的字符 + * * @param val 值 * @retur 字符串 */ - private String starlightValToString(long val){ - if(val>1000) { - double tmp =(double)val / 1000; + private String starlightValToString(long val) { + if (val > 1000) { + double tmp = (double) val / 1000; return tmp + "k"; - }else{ - return val+""; + } else { + return val + ""; } } /** * 设置小时榜 + * * @param rank 小时榜 */ - public void setHourRankData(int rank){ - if(mHourRank!=null) { - mHourRank.setText(formatBigNum.formatBigNum(rank + "")); + public void setHourRankData(long rank) { + if (mHourRank != null) { + 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) { + public void setHotData(String hot) { + 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 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); } @@ -1599,7 +1626,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } else if (i == R.id.ft_hot_add) { ((LiveActivity) mContext).openHotListWindow(1); } else if (i == R.id.user_guard) { - // ((LiveActivity) mContext).openUserMoreListWindow(2, true); + // ((LiveActivity) mContext).openUserMoreListWindow(2, true); ((LiveActivity) mContext).openNewGuardListWindow(); } @@ -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 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); + } + } } diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index c9232a10b..1c428538e 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -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 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); } @@ -918,7 +925,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe @Override public void onHourRank(LiveChatBean bean, JSONObject ranks) { - if(mLiveRoomViewHolder!=null){ + if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.setHourRankData(ranks.getInteger(liveID)); } } @@ -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 } } + } diff --git a/live/src/main/res/drawable/bg_fast_meg.xml b/live/src/main/res/drawable/bg_fast_meg.xml index 4b8c2a6db..b3dbc1af6 100644 --- a/live/src/main/res/drawable/bg_fast_meg.xml +++ b/live/src/main/res/drawable/bg_fast_meg.xml @@ -2,7 +2,7 @@ - + diff --git a/live/src/main/res/drawable/bg_guard_btn_buy.xml b/live/src/main/res/drawable/bg_guard_btn_buy.xml index 16efaee29..e1e59a76e 100644 --- a/live/src/main/res/drawable/bg_guard_btn_buy.xml +++ b/live/src/main/res/drawable/bg_guard_btn_buy.xml @@ -1,15 +1,9 @@ - - - - - - - - - - + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_live_chat.xml b/live/src/main/res/drawable/bg_live_chat.xml index e67fc5b4b..6517e298a 100644 --- a/live/src/main/res/drawable/bg_live_chat.xml +++ b/live/src/main/res/drawable/bg_live_chat.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_live_ico.xml b/live/src/main/res/drawable/bg_live_ico.xml index 1d16682ec..183d53890 100644 --- a/live/src/main/res/drawable/bg_live_ico.xml +++ b/live/src/main/res/drawable/bg_live_ico.xml @@ -1,6 +1,5 @@ - - + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_live_item.xml b/live/src/main/res/drawable/bg_live_item.xml index be2c4525e..0d9ba5ac0 100644 --- a/live/src/main/res/drawable/bg_live_item.xml +++ b/live/src/main/res/drawable/bg_live_item.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_live_item_right.xml b/live/src/main/res/drawable/bg_live_item_right.xml index bf6218738..7e282cf3d 100644 --- a/live/src/main/res/drawable/bg_live_item_right.xml +++ b/live/src/main/res/drawable/bg_live_item_right.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/live/src/main/res/drawable/live_tags_hot_en.png b/live/src/main/res/drawable/live_tags_hot_en.png new file mode 100644 index 000000000..15c8ed111 Binary files /dev/null and b/live/src/main/res/drawable/live_tags_hot_en.png differ diff --git a/live/src/main/res/drawable/live_tags_hour_list_en.png b/live/src/main/res/drawable/live_tags_hour_list_en.png new file mode 100644 index 000000000..6e134060c Binary files /dev/null and b/live/src/main/res/drawable/live_tags_hour_list_en.png differ diff --git a/live/src/main/res/drawable/loading_00000.png b/live/src/main/res/drawable/loading_00000.png index e54a417e2..a4194ef19 100644 Binary files a/live/src/main/res/drawable/loading_00000.png and b/live/src/main/res/drawable/loading_00000.png differ diff --git a/live/src/main/res/drawable/loading_00001.png b/live/src/main/res/drawable/loading_00001.png index 6e1023d84..de386eadf 100644 Binary files a/live/src/main/res/drawable/loading_00001.png and b/live/src/main/res/drawable/loading_00001.png differ diff --git a/live/src/main/res/drawable/loading_00002.png b/live/src/main/res/drawable/loading_00002.png index 88e175b08..b87debd2c 100644 Binary files a/live/src/main/res/drawable/loading_00002.png and b/live/src/main/res/drawable/loading_00002.png differ diff --git a/live/src/main/res/drawable/loading_00003.png b/live/src/main/res/drawable/loading_00003.png index f4733ef60..f674b91e4 100644 Binary files a/live/src/main/res/drawable/loading_00003.png and b/live/src/main/res/drawable/loading_00003.png differ diff --git a/live/src/main/res/drawable/loading_00004.png b/live/src/main/res/drawable/loading_00004.png index 4fbd57ebc..f68234e17 100644 Binary files a/live/src/main/res/drawable/loading_00004.png and b/live/src/main/res/drawable/loading_00004.png differ diff --git a/live/src/main/res/drawable/loading_00005.png b/live/src/main/res/drawable/loading_00005.png index 229bdc2aa..31dae640d 100644 Binary files a/live/src/main/res/drawable/loading_00005.png and b/live/src/main/res/drawable/loading_00005.png differ diff --git a/live/src/main/res/drawable/loading_00006.png b/live/src/main/res/drawable/loading_00006.png index 651a8e94d..1ed29ed06 100644 Binary files a/live/src/main/res/drawable/loading_00006.png and b/live/src/main/res/drawable/loading_00006.png differ diff --git a/live/src/main/res/drawable/loading_00007.png b/live/src/main/res/drawable/loading_00007.png index e972df8ee..8bc295a3d 100644 Binary files a/live/src/main/res/drawable/loading_00007.png and b/live/src/main/res/drawable/loading_00007.png differ diff --git a/live/src/main/res/drawable/loading_00008.png b/live/src/main/res/drawable/loading_00008.png index bbb7a49af..1a9f045c9 100644 Binary files a/live/src/main/res/drawable/loading_00008.png and b/live/src/main/res/drawable/loading_00008.png differ diff --git a/live/src/main/res/drawable/loading_00009.png b/live/src/main/res/drawable/loading_00009.png index a04be6772..6cf735eb8 100644 Binary files a/live/src/main/res/drawable/loading_00009.png and b/live/src/main/res/drawable/loading_00009.png differ diff --git a/live/src/main/res/drawable/loading_00010.png b/live/src/main/res/drawable/loading_00010.png index 1fbbc70a6..1a461a8ed 100644 Binary files a/live/src/main/res/drawable/loading_00010.png and b/live/src/main/res/drawable/loading_00010.png differ diff --git a/live/src/main/res/drawable/loading_00011.png b/live/src/main/res/drawable/loading_00011.png index f3e14f0fb..2b531ed19 100644 Binary files a/live/src/main/res/drawable/loading_00011.png and b/live/src/main/res/drawable/loading_00011.png differ diff --git a/live/src/main/res/drawable/loading_00012.png b/live/src/main/res/drawable/loading_00012.png index 668f158b7..124e3f864 100644 Binary files a/live/src/main/res/drawable/loading_00012.png and b/live/src/main/res/drawable/loading_00012.png differ diff --git a/live/src/main/res/drawable/loading_00013.png b/live/src/main/res/drawable/loading_00013.png index f40771758..5e2bec355 100644 Binary files a/live/src/main/res/drawable/loading_00013.png and b/live/src/main/res/drawable/loading_00013.png differ diff --git a/live/src/main/res/drawable/loading_00014.png b/live/src/main/res/drawable/loading_00014.png index b1c0e4685..4e2d1d897 100644 Binary files a/live/src/main/res/drawable/loading_00014.png and b/live/src/main/res/drawable/loading_00014.png differ diff --git a/live/src/main/res/drawable/loading_00015.png b/live/src/main/res/drawable/loading_00015.png index 8bc567693..db877dca6 100644 Binary files a/live/src/main/res/drawable/loading_00015.png and b/live/src/main/res/drawable/loading_00015.png differ diff --git a/live/src/main/res/layout/dialog_live_gift.xml b/live/src/main/res/layout/dialog_live_gift.xml index 9258f09d8..916515558 100644 --- a/live/src/main/res/layout/dialog_live_gift.xml +++ b/live/src/main/res/layout/dialog_live_gift.xml @@ -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"/> + tools:visibility="visible"> - + android:visibility="gone"> + + + + + + diff --git a/live/src/main/res/layout/item_live_user.xml b/live/src/main/res/layout/item_live_user.xml index 72108b54c..0b359dcdd 100644 --- a/live/src/main/res/layout/item_live_user.xml +++ b/live/src/main/res/layout/item_live_user.xml @@ -1,19 +1,19 @@ - + android:layout_marginEnd="5dp" + android:layout_height="38dp"> - - - - - - - - + + + + + + + + + android:src="@drawable/m_chu_xia" + app:riv_oval="true" /> + app:autoPlay="true" /> @@ -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:visibility="gone"/> + android:layout_alignParentBottom="true" + android:visibility="gone" /> + android:layout_alignParentBottom="true" + android:visibility="gone" /> \ No newline at end of file diff --git a/live/src/main/res/layout/view_live_audience.xml b/live/src/main/res/layout/view_live_audience.xml index a87799079..50220642e 100644 --- a/live/src/main/res/layout/view_live_audience.xml +++ b/live/src/main/res/layout/view_live_audience.xml @@ -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" /> @@ -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" /> diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 4935bc40d..dac81761b 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -88,8 +88,8 @@ - + android:visibility="visible" /> + + + + + + + + + - - - - - - - - - + - + + android:src="@mipmap/live_icon_wishlist" + android:visibility="gone" /> + android:outAnimation="@anim/anim_marquee_out" /> + @@ -287,18 +283,18 @@ + android:paddingRight="5dp" + android:visibility="gone"> @@ -853,6 +848,7 @@ @@ -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" /> diff --git a/live/src/main/res/layout/view_wish_list.xml b/live/src/main/res/layout/view_wish_list.xml index 70dacdddc..5cb81637d 100644 --- a/live/src/main/res/layout/view_wish_list.xml +++ b/live/src/main/res/layout/view_wish_list.xml @@ -21,7 +21,6 @@ android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:singleLine="true" - android:text="0" android:textColor="#FFFFFFFF" android:textSize="10sp" /> diff --git a/live/src/main/res/mipmap-mdpi/icon_live_close_3.png b/live/src/main/res/mipmap-mdpi/icon_live_close_3.png index 2026df284..2da0a5cfe 100644 Binary files a/live/src/main/res/mipmap-mdpi/icon_live_close_3.png and b/live/src/main/res/mipmap-mdpi/icon_live_close_3.png differ diff --git a/live/src/main/res/mipmap-mdpi/messagesss.png b/live/src/main/res/mipmap-mdpi/messagesss.png deleted file mode 100644 index 6ca311f03..000000000 Binary files a/live/src/main/res/mipmap-mdpi/messagesss.png and /dev/null differ diff --git a/live/src/main/res/mipmap-xxxhdpi/live_icon_focus.png b/live/src/main/res/mipmap-xxxhdpi/live_icon_focus.png new file mode 100644 index 000000000..0126cf0b5 Binary files /dev/null and b/live/src/main/res/mipmap-xxxhdpi/live_icon_focus.png differ diff --git a/live/src/main/res/mipmap-xxxhdpi/messagesss.png b/live/src/main/res/mipmap-xxxhdpi/messagesss.png new file mode 100644 index 000000000..f195cd9ca Binary files /dev/null and b/live/src/main/res/mipmap-xxxhdpi/messagesss.png differ diff --git a/live/src/main/res/values-en/strings.xml b/live/src/main/res/values-en/strings.xml new file mode 100644 index 000000000..4b3c198dc --- /dev/null +++ b/live/src/main/res/values-en/strings.xml @@ -0,0 +1,13 @@ + + + No one is on the list at the moment + anchor are waiting at your guard! + Not on the list + No.%s + Not listed + Day + Weekly + Viewers + Guard + Fans + \ No newline at end of file diff --git a/live/src/main/res/values/strings.xml b/live/src/main/res/values/strings.xml index 491888253..e9cb69fef 100644 --- a/live/src/main/res/values/strings.xml +++ b/live/src/main/res/values/strings.xml @@ -1,4 +1,14 @@ 成爲TA的守護,爲TA保駕護航! 返還 + 暫時無人上榜,快來成為第一位上榜的人吧! + 主播正在等待您的守護! + 未上榜 + 第%s名 + 未上榜 + 日榜 + 周榜 + 观众 + 观众 + 粉丝 diff --git a/main/src/main/java/com/yunbao/main/adapter/MainHomeLiveAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainHomeLiveAdapter.java index 8b6744437..74bd1d236 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainHomeLiveAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainHomeLiveAdapter.java @@ -57,7 +57,7 @@ public class MainHomeLiveAdapter extends RefreshAdapter { 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() { diff --git a/main/src/main/res/layout/item_main_home_live_head.xml b/main/src/main/res/layout/item_main_home_live_head.xml index 348ef45bd..c1c032c7f 100644 --- a/main/src/main/res/layout/item_main_home_live_head.xml +++ b/main/src/main/res/layout/item_main_home_live_head.xml @@ -14,7 +14,7 @@