合并接口第五次次上传

This commit is contained in:
18401019693 2022-11-26 16:12:22 +08:00
parent 2843131151
commit 3bdee09402
4 changed files with 24 additions and 13 deletions

View File

@ -6,6 +6,7 @@ import android.util.Log;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.R;
import com.yunbao.common.bean.LiveGiftBean;
import com.yunbao.common.http.CommonHttpConsts;
import com.yunbao.common.interfaces.CommonCallback;
@ -59,7 +60,7 @@ public class GiftCacheUtil {
} else {
DownloadUtil downloadUtil = new DownloadUtil();
if (forwhat.equals("1")) {
ToastUtil.show("礼物正在获取中...");
ToastUtil.show(R.string.gift_way);
}
downloadUtil.download(CommonHttpConsts.DOWNLOAD_GIF, dir, fileName, url, new DownloadUtil.Callback() {
String TAG="下载";

View File

@ -964,4 +964,5 @@
<string name="image_quality_selection" translatable="false">畫質選擇</string>
<string name="more_settings" translatable="false">更多設置</string>
<string name="moer">查看更多</string>
<string name="gift_way">礼物正在获取中...</string>
</resources>

View File

@ -319,7 +319,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
//接口整合新加参数
private GuardUserModel guardUserModel;
private ViewFlipper flipper;
public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) {
super(context, parentView);
Contexts = context;
@ -694,7 +694,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mic_view = (RelativeLayout) findViewById(R.id.mic_view);
mic_view1 = (RelativeLayout) findViewById(R.id.mic_view1);
mic_view2 = (RelativeLayout) findViewById(R.id.mic_view2);
flipper = (ViewFlipper) findViewById(R.id.hour_rank_list);
mic_ico = (ImageView) findViewById(R.id.mic_ico);
newMessage = (ImageView) findViewById(R.id.new_message);
atMessage = (ImageView) findViewById(R.id.at_message);
@ -1488,7 +1488,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
public void initHourRank(RankHourModel model) {
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.hour_rank_list);
if (flipper.getChildCount()>0){
flipper.removeAllViews();
}
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);
@ -1534,7 +1536,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* 初始化小时榜
*/
public void initHourRankList() {
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.hour_rank_list);
if (flipper.getChildCount()>0){
flipper.removeAllViews();
}
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);
@ -2475,8 +2479,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* 刷新用户列表
*/
public void refreshUserList(JSONObject obj) {
List<LiveUserGiftBean> list = GsonUtils.fromJson(obj.getString("userlist"), new TypeToken<List<LiveUserGiftBean>>() {
}.getType());
List<LiveUserGiftBean> list = JSON.parseArray(obj.getString("userlist"), LiveUserGiftBean.class);
mLiveUserAdapter.refreshList(list);
}

View File

@ -154,12 +154,18 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
private MainStartChooseCallback mMainStartChooseCallback = new MainStartChooseCallback() {
@Override
public void onLiveClick() {
boolean isAnchor = IMLoginManager.get(mContext).getUserInfo().anchorUserType();
if (isAnchor) {
mProcessResultUtil.requestPermissions(new String[]{
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.CAMERA,
Manifest.permission.RECORD_AUDIO
}, mStartLiveRunnable);
} else {
ToastUtil.show(getString(R.string.only_open_anchor));
}
}
@Override