diff --git a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java index 6bfaea32b..963dab50f 100644 --- a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java +++ b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java @@ -386,7 +386,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); imageView.setBackgroundColor(0xffffffff); mImageViewList.add(imageView); - ImgLoader.display(mContext, mAdList.get(i).getUrl(), imageView,480,960); + ImgLoader.display(mContext, mAdList.get(i).getUrl(), imageView); } for (int i = imgSize - 1; i >= 0; i--) { mContainer.addView(mImageViewList.get(i)); diff --git a/common/src/main/java/com/yunbao/common/utils/SVGAViewUtils.java b/common/src/main/java/com/yunbao/common/utils/SVGAViewUtils.java index e28e03ce9..40a2cbc05 100644 --- a/common/src/main/java/com/yunbao/common/utils/SVGAViewUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/SVGAViewUtils.java @@ -4,7 +4,7 @@ import com.opensource.svgaplayer.SVGACallback; import com.opensource.svgaplayer.SVGAImageView; public class SVGAViewUtils { - public static void playEndClear(SVGAImageView svga){ + public static void playEndClear(SVGAImageView svga,boolean isClear){ svga.setCallback(new SVGACallback() { @Override public void onPause() { @@ -14,7 +14,9 @@ public class SVGAViewUtils { @Override public void onFinished() { //动画结束后调用clear释放资源 - svga.clear(); + if(isClear) { + svga.clear(); + } } @Override @@ -29,4 +31,7 @@ public class SVGAViewUtils { }); svga.startAnimation(); } + public static void playEndClear(SVGAImageView svga){ + playEndClear(svga,true); + } } diff --git a/common/src/main/java/com/yunbao/common/views/CustomViewHolder.java b/common/src/main/java/com/yunbao/common/views/CustomViewHolder.java index b52810567..680deb36e 100644 --- a/common/src/main/java/com/yunbao/common/views/CustomViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/CustomViewHolder.java @@ -22,7 +22,7 @@ public class CustomViewHolder implements BannerViewHolder { imageView.setLayoutParams(params); imageView.setScaleType(ImageView.ScaleType.FIT_XY); //Glide.with(context).load(data.getImageUrl()).into(imageView); - ImgLoader.display(context,data.getImageUrl(),imageView,600,170); + ImgLoader.display(context,data.getImageUrl(),imageView); return imageView; } diff --git a/common/src/main/res/layout/dialog_live_new_function.xml b/common/src/main/res/layout/dialog_live_new_function.xml index 262c9c0d2..234b8cb67 100644 --- a/common/src/main/res/layout/dialog_live_new_function.xml +++ b/common/src/main/res/layout/dialog_live_new_function.xml @@ -104,7 +104,7 @@ android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="30dp" - android:text="@string/basic_tools" + android:text="@string/live_config" android:textColor="@color/white" android:textSize="14sp" /> @@ -196,7 +196,7 @@ android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="24dp" - android:text="@string/live_config" + android:text="@string/basic_tools" android:textColor="@color/white" android:textSize="14sp" /> @@ -264,7 +264,7 @@ android:layout_marginStart="23dp" android:gravity="center" android:orientation="vertical" - android:visibility="gone"> + android:visibility="visible"> 更換封面 直播標題 給直播寫個標題吧 - 頻道 + 選擇頻道 選擇直播頻道 注意選擇適合自己的頻道。 直播過程中,若運營人員發現選擇的頻道和直播內容不相符的情况,會調整您的直播頻道。 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 6260f2ce8..687e16250 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -1244,7 +1244,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL .getNobleRankHideUserList(new com.yunbao.common.http.base.HttpCallback() { @Override public void onSuccess(NobleRankHideUserListModel data) { - outRankHide = data.getOutRankHide(); + outRankHide = data.getInRankHide(); LiveUserMoreDialogFragment fragment = new LiveUserMoreDialogFragment(); fragment.setLiveGuardInfo(mLiveGuardInfo); Bundle bundle = new Bundle(); diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index 47696dae4..342a6393d 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -35,6 +35,7 @@ import com.tencent.trtc.TRTCCloudDef; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; +import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.UserBean; import com.yunbao.common.dialog.NotCancelableDialog; import com.yunbao.common.event.LoginInvalidEvent; @@ -43,6 +44,8 @@ import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.http.JsonBean; +import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DateFormatUtil; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; @@ -62,7 +65,9 @@ import com.yunbao.live.dialog.LiveLinkMicListDialogFragment; import com.yunbao.live.dialog.LiveMicUserDialogFragment; import com.yunbao.live.dialog.LiveNewFunctionDialogFragment; import com.yunbao.live.dialog.LiveNewWishListDialogFragment; +import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience; import com.yunbao.live.event.LinkMicTxMixStreamEvent; +import com.yunbao.live.event.LiveAudienceEvent; import com.yunbao.live.http.LiveHttpConsts; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.interfaces.LiveFunctionClickListener; @@ -147,6 +152,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl @Override protected void main() { super.main(); + Bus.getOn(this); Intent intent = getIntent(); mLiveSDK = intent.getIntExtra(Constants.LIVE_SDK, Constants.LIVE_SDK_KSY); mLiveKsyConfigBean = intent.getParcelableExtra(Constants.LIVE_KSY_CONFIG); @@ -223,6 +229,8 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl ToastUtil.show("開發中,敬請期待"); break; case Constants.LIVE_FUNC_MIC://語音 + ToastUtil.show("開發中,敬請期待"); + /* //连麦说是有问题,暂时隐藏 LiveMicUserDialogFragment fragment = new LiveMicUserDialogFragment(); Bundle bundle = new Bundle(); bundle.putString(Constants.LIVE_UID, mLiveUid); @@ -230,7 +238,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl bundle.putString("By", "1"); fragment.setArguments(bundle); fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveUserMoreDialogFragment"); - LiveMicUserDialogFragment.activity = ((LiveRyAnchorActivity) mContext); + LiveMicUserDialogFragment.activity = ((LiveRyAnchorActivity) mContext);*/ break; case Constants.LIVE_FUNC_DR://多人PK if (isDRPK != 1) { @@ -889,6 +897,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl mLiveReadyViewHolder=null; mLiveAnchorViewHolder=null; L.e("LiveAnchorActivity-------onDestroy------->"); + Bus.getOff(this); } @@ -1275,4 +1284,25 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl L.e(TAG, content); LogUtil.print(mLogFile, content); } + @Subscribe(threadMode = ThreadMode.MAIN) + public void onOpenDrawer(LiveAudienceEvent event) { + Bundle bundle = new Bundle(); + IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); + switch (event.getType()) { + case LIVE_WKS: + String weeklyStarUrl = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid=" + + userInfo.getId() + + "&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid; + ZhuangBanActivity.forward(mContext, weeklyStarUrl, false); + break; + case WISH_LIST: + LiveWishListDialogFragment4Audience fragment4Audience = new LiveWishListDialogFragment4Audience(); + bundle.putString(Constants.LIVE_UID, mLiveUid); + fragment4Audience.setArguments(bundle); + if (mContext instanceof LiveRyAnchorActivity) { + fragment4Audience.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveWishListDialogFragment4Audience"); + } + break; + } + } } diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveNewWishListAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveNewWishListAdapter.java index 40a6358bd..ca1d30d70 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveNewWishListAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveNewWishListAdapter.java @@ -106,7 +106,7 @@ public class LiveNewWishListAdapter extends RecyclerView.Adapter 1) { num--; mNum.setText("x"+num ); bean.setWishlist_num(num + ""); + tvProgress.setText(bean.getWishlist_progress() + "/" +num); } } catch (Exception e) { diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveUserAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveUserAdapter.java index aa12c832b..395e63200 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveUserAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveUserAdapter.java @@ -126,7 +126,7 @@ public class LiveUserAdapter extends RecyclerView.Adapter { public void onComplete(SVGAVideoEntity videoItem) { SVGADrawable drawable = new SVGADrawable(videoItem); gift_svga.setImageDrawable(drawable); - SVGAViewUtils.playEndClear(gift_svga); + SVGAViewUtils.playEndClear(gift_svga,false); } @Override diff --git a/live/src/main/java/com/yunbao/live/adapter/UserMoreInfoAdapter.java b/live/src/main/java/com/yunbao/live/adapter/UserMoreInfoAdapter.java index 3129f972e..e8c1cf9a7 100644 --- a/live/src/main/java/com/yunbao/live/adapter/UserMoreInfoAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/UserMoreInfoAdapter.java @@ -244,15 +244,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter { mRanksIcon.addView(rankImage, 0); } } - if (bean.isHide() && (type.equals("5") || type.equals("4"))) { - mName.setText(R.string.mystery_man); - ImgLoader.display(mContext, R.mipmap.hide, mAvatar); - itemView.findViewById(R.id.state).setVisibility(View.GONE); - } else { - ImgLoader.display(mContext, bean.getAvatar(), mAvatar); - mName.setText(bean.getUserNiceName()); - itemView.findViewById(R.id.state).setVisibility(View.VISIBLE); - } + if (bean.getDress() != null && bean.getDress().getAvatar_frame() != null) { gift_svga.setVisibility(View.VISIBLE); if (bean.getDress().getAvatar_frame().contains("svga")) { @@ -262,7 +254,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter { public void onComplete(SVGAVideoEntity videoItem) { SVGADrawable drawable = new SVGADrawable(videoItem); gift_svga.setImageDrawable(drawable); - SVGAViewUtils.playEndClear(gift_svga); + SVGAViewUtils.playEndClear(gift_svga,false); } @Override @@ -291,6 +283,17 @@ public class UserMoreInfoAdapter extends RefreshAdapter { if (levelBean != null) { ImgLoader.display(mContext, levelBean.getThumb(), mLevel); } + if (bean.isHide() && (type.equals("5") || type.equals("4"))) { + mName.setText(R.string.mystery_man); + ImgLoader.display(mContext, R.mipmap.hide, mAvatar); + itemView.findViewById(R.id.state).setVisibility(View.GONE); + gift_svga.setVisibility(View.GONE); + } else { + ImgLoader.display(mContext, bean.getAvatar(), mAvatar); + mName.setText(bean.getUserNiceName()); + itemView.findViewById(R.id.state).setVisibility(View.VISIBLE); + gift_svga.setVisibility(View.VISIBLE); + } } /** diff --git a/live/src/main/java/com/yunbao/live/bean/LiveBean.java b/live/src/main/java/com/yunbao/live/bean/LiveBean.java index 95e0e9c43..8eab993af 100644 --- a/live/src/main/java/com/yunbao/live/bean/LiveBean.java +++ b/live/src/main/java/com/yunbao/live/bean/LiveBean.java @@ -64,14 +64,14 @@ public class LiveBean implements Parcelable { } public String getRecommendCardIcon() { - if (TextUtils.isEmpty(recommendCardIconSizeTwo)) { - if (!TextUtils.isEmpty(recommendCardIconSizeThree)) { - return recommendCardIconSizeThree; + if (TextUtils.isEmpty(recommendCardIconSizeThree)) { + if (!TextUtils.isEmpty(recommendCardIconSizeTwo)) { + return recommendCardIconSizeTwo; } else { return null; } } else { - return recommendCardIconSizeTwo; + return recommendCardIconSizeThree; } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveBeautyDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveBeautyDialogFragment.java index 603d7f462..f60896f8a 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveBeautyDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveBeautyDialogFragment.java @@ -91,12 +91,12 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment { @Override protected int getDialogStyle() { - return R.style.dialog2; + return R.style.dialog4; } @Override protected boolean canCancel() { - return false; + return true; } @Override @@ -250,19 +250,7 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment { close_btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - Gson gson = new Gson(); - SharedPreferences.Editor editor = sharedPreferences.edit(); - editor.putString("face", gson.toJson(beautyFaceList)); - editor.putString("beautiful", gson.toJson(beautifulList)); - editor.putString("filter", gson.toJson(filterList)); - editor.commit(); - dismiss(); - if (LiveAnchorActivity.mLiveReadyViewHolder != null) { - LiveAnchorActivity.mLiveReadyViewHolder.show(); - } - if (LiveRyAnchorActivity.mLiveReadyViewHolder != null) { - LiveRyAnchorActivity.mLiveReadyViewHolder.show(); - } + close(); } }); LinearLayoutManager manager = new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false); @@ -584,4 +572,26 @@ public class LiveBeautyDialogFragment extends AbsDialogFragment { } + @Override + public void onDismiss(DialogInterface dialog) { + super.onDismiss(dialog); + close(); + } + + private void close(){ + Gson gson = new Gson(); + SharedPreferences.Editor editor = sharedPreferences.edit(); + editor.putString("face", gson.toJson(beautyFaceList)); + editor.putString("beautiful", gson.toJson(beautifulList)); + editor.putString("filter", gson.toJson(filterList)); + editor.commit(); + dismiss(); + if (LiveAnchorActivity.mLiveReadyViewHolder != null) { + LiveAnchorActivity.mLiveReadyViewHolder.show(); + } + if (LiveRyAnchorActivity.mLiveReadyViewHolder != null) { + LiveRyAnchorActivity.mLiveReadyViewHolder.show(); + } + } + } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomClassDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomClassDialogFragment.java index f0798a528..d44e0387c 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomClassDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomClassDialogFragment.java @@ -36,7 +36,7 @@ public class LiveNewRoomClassDialogFragment extends AbsDialogFragment implements @Override protected int getDialogStyle() { - return R.style.dialog2; + return R.style.dialog4; } @Override diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomTypeDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomTypeDialogFragment.java index 6de4ec229..7f853b10e 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomTypeDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewRoomTypeDialogFragment.java @@ -45,7 +45,7 @@ public class LiveNewRoomTypeDialogFragment extends AbsDialogFragment implements @Override protected int getDialogStyle() { - return R.style.dialog2; + return R.style.dialog4; } @Override diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewWishListDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewWishListDialogFragment.java index 38834624e..7984e4079 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewWishListDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewWishListDialogFragment.java @@ -14,6 +14,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.google.gson.Gson; import com.yunbao.common.bean.LiveGiftBean; +import com.yunbao.common.custom.CommonRefreshView; import com.yunbao.common.dialog.AbsDialogFragment; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.OnItemClickListener; @@ -41,7 +42,7 @@ import java.util.List; public class LiveNewWishListDialogFragment extends AbsDialogFragment implements OnItemClickListener { - private RecyclerView mRecyclerView; + private CommonRefreshView mRecyclerView; private ActionListener mActionListener; private boolean mNoLink; private View mrlAdd, tvDone; @@ -78,8 +79,7 @@ public class LiveNewWishListDialogFragment extends AbsDialogFragment implements @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); - mRecyclerView = (RecyclerView) mRootView.findViewById(R.id.recyclerView); - mRecyclerView.setHasFixedSize(true); + mRecyclerView = (CommonRefreshView) mRootView.findViewById(R.id.recyclerView); mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false)); mrlAdd = findViewById(R.id.rl_add); tvDone = findViewById(R.id.tvDone); @@ -145,7 +145,7 @@ public class LiveNewWishListDialogFragment extends AbsDialogFragment implements mWishlist = JSON.parseArray(giftJson, LiveWishlistBean.class); mAdapter = new LiveNewWishListAdapter(mContext, mNoLink); mAdapter.setData(mWishlist); - mRecyclerView.setAdapter(mAdapter); + mRecyclerView.mRecyclerView.setAdapter(mAdapter); mAdapter.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(LiveWishlistBean bean, int position) { diff --git a/live/src/main/res/layout/activity_pd_chat.xml b/live/src/main/res/layout/activity_pd_chat.xml index 55b68f9d4..a4c4b8c90 100644 --- a/live/src/main/res/layout/activity_pd_chat.xml +++ b/live/src/main/res/layout/activity_pd_chat.xml @@ -38,8 +38,11 @@ @@ -48,4 +51,5 @@ android:layout_height="wrap_content" android:src="@mipmap/img_no_new" /> + \ No newline at end of file diff --git a/live/src/main/res/layout/dialog_new_live_room_class.xml b/live/src/main/res/layout/dialog_new_live_room_class.xml index 9291aff61..90c572a97 100644 --- a/live/src/main/res/layout/dialog_new_live_room_class.xml +++ b/live/src/main/res/layout/dialog_new_live_room_class.xml @@ -22,7 +22,7 @@ android:id="@+id/textView2" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="30dp" + android:layout_marginStart="5dp" android:layout_marginTop="10dp" android:text="@string/live_class_tip_title" android:textColor="#F6F7FB" diff --git a/live/src/main/res/layout/dialog_new_live_room_type.xml b/live/src/main/res/layout/dialog_new_live_room_type.xml index 816e30a83..ac20d7ab3 100644 --- a/live/src/main/res/layout/dialog_new_live_room_type.xml +++ b/live/src/main/res/layout/dialog_new_live_room_type.xml @@ -5,7 +5,7 @@ android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="#b3000000"> + android:background="#000000"> - @@ -77,7 +77,7 @@ + android:textSize="10sp" /> @@ -655,7 +655,7 @@ android:id="@+id/goto_room_view" android:layout_width="wrap_content" android:layout_height="27dp" - android:layout_below="@id/lin" + android:layout_below="@id/open_sidebar" android:layout_alignParentRight="true" android:layout_marginTop="16dp" android:layout_marginRight="9dp" @@ -948,7 +948,7 @@ @@ -1135,7 +1135,7 @@ android:id="@+id/gif_gift_tip_group_buy_zuoji" android:layout_width="wrap_content" android:layout_height="30dp" - android:visibility="gone" + android:visibility="invisible" android:layout_marginLeft="10dp" android:layout_marginTop="100dp" android:translationX="500dp"> @@ -1187,7 +1187,7 @@ android:id="@+id/gif_gift_tip_group_buy_liang_name" android:layout_width="wrap_content" android:layout_height="30dp" - android:visibility="gone" + android:visibility="invisible" android:layout_marginLeft="10dp" android:layout_marginTop="135dp" android:translationX="500dp"> @@ -1238,7 +1238,7 @@ @@ -1981,7 +1981,7 @@ android:id="@+id/enter_room_svg" android:layout_width="match_parent" android:layout_height="match_parent" - android:scaleType="centerCrop" /> + android:scaleType="fitCenter" /> diff --git a/live/src/main/res/mipmap-xxxhdpi/emperor_rom.png b/live/src/main/res/mipmap-xxxhdpi/emperor_rom.png index 17828e06e..f17817553 100644 Binary files a/live/src/main/res/mipmap-xxxhdpi/emperor_rom.png and b/live/src/main/res/mipmap-xxxhdpi/emperor_rom.png differ diff --git a/live/src/main/res/mipmap-xxxhdpi/super_emperor_rom.png b/live/src/main/res/mipmap-xxxhdpi/super_emperor_rom.png index 16e64b374..9c185b921 100644 Binary files a/live/src/main/res/mipmap-xxxhdpi/super_emperor_rom.png and b/live/src/main/res/mipmap-xxxhdpi/super_emperor_rom.png differ diff --git a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java index 5fe07d6c3..64a6459b1 100644 --- a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java @@ -146,7 +146,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. public void onComplete(SVGAVideoEntity videoItem) { SVGADrawable drawable = new SVGADrawable(videoItem); guidSvga.setImageDrawable(drawable); - SVGAViewUtils.playEndClear(guidSvga); + SVGAViewUtils.playEndClear(guidSvga,false); } @Override diff --git a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java index 9150749eb..841d7ea18 100644 --- a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java @@ -302,6 +302,24 @@ public class ZhuangBanActivity extends AbsActivity { intent.putExtra("isFull", false); mContext.startActivity(intent); + } + /** + * 新跳转 + * + * @param url 跳转的url + * @param title 有标题的展示标题 + */ + @JavascriptInterface + public void androidClickToNewH5PageView(String url, String title) { + url = CommonAppConfig.HOST + url; + url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + + CommonAppConfig.getInstance().getToken(); + Log.i("tag", url); + Intent intent = new Intent(mContext, com.yunbao.live.activity.ZhuangBanActivity.class); + intent.putExtra("url", url); + intent.putExtra("title", title); + mContext.startActivity(intent); + } /** * 设置超皇字体颜色 diff --git a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java index 101073957..b21e2fb2d 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java @@ -288,7 +288,7 @@ public class MainListAdapter extends RefreshAdapter { public void onComplete(SVGAVideoEntity videoItem) { SVGADrawable drawable = new SVGADrawable(videoItem); svga1.setImageDrawable(drawable); - SVGAViewUtils.playEndClear(svga1); + SVGAViewUtils.playEndClear(svga1,false); } @Override @@ -311,10 +311,12 @@ public class MainListAdapter extends RefreshAdapter { mName1.setText(R.string.mystery_man); ImgLoader.display(mContext, R.mipmap.hide, mAvatar1); mSex1.setVisibility(View.GONE); + svga1.setVisibility(View.GONE); } else { ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar1); mName1.setText(bean.getUserNiceName()); mSex1.setVisibility(View.VISIBLE); + svga1.setVisibility(View.VISIBLE); } mVotes1.setText(bean.getTotalCoinFormat()); @@ -363,7 +365,7 @@ public class MainListAdapter extends RefreshAdapter { public void onComplete(SVGAVideoEntity videoItem) { SVGADrawable drawable = new SVGADrawable(videoItem); svga2.setImageDrawable(drawable); - SVGAViewUtils.playEndClear(svga2); + SVGAViewUtils.playEndClear(svga2,false); } @Override @@ -411,6 +413,7 @@ public class MainListAdapter extends RefreshAdapter { liveing2.setVisibility(View.INVISIBLE); } mBtnFollow2.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); + svga2.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); if (bean.getAttention() == 1) { mBtnFollow2.doChecked(true); mBtnFollow2.setText(mFollowing); @@ -438,7 +441,7 @@ public class MainListAdapter extends RefreshAdapter { public void onComplete(SVGAVideoEntity videoItem) { SVGADrawable drawable = new SVGADrawable(videoItem); svga3.setImageDrawable(drawable); - SVGAViewUtils.playEndClear(svga3); + SVGAViewUtils.playEndClear(svga3,false); } @Override @@ -486,6 +489,7 @@ public class MainListAdapter extends RefreshAdapter { liveing3.setVisibility(View.INVISIBLE); } mBtnFollow3.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); + svga3.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); if (bean.getAttention() == 1) { mBtnFollow3.doChecked(true); mBtnFollow3.setText(mFollowing); @@ -587,6 +591,7 @@ public class MainListAdapter extends RefreshAdapter { liveing.setVisibility(View.INVISIBLE); } mBtnFollow.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); + svga.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); mBtnFollow.setTag(position); if (bean.getAttention() == 1) { mBtnFollow.doChecked(true); diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java index d21ab7e8e..8dc874dd9 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java @@ -14,6 +14,7 @@ import com.squareup.picasso.Picasso; import com.yunbao.common.Constants; import com.yunbao.common.custom.RatioRoundImageView; import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.formatBigNum; import com.yunbao.live.bean.LiveBean; import com.yunbao.main.R; @@ -127,6 +128,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder { liveType.setVisibility(View.VISIBLE); Picasso.with(mContext) .load(bean.getRecommendCardIcon()) + .resize(DpUtil.dp2px(80),DpUtil.dp2px(33)) .into(liveType); } viewBg.setImageResource(R.mipmap.emperor_recommendation); @@ -136,7 +138,9 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder { if (!TextUtils.isEmpty(bean.getRecommendCardIcon())) { liveType.setVisibility(View.VISIBLE); Picasso.with(mContext) + .load(bean.getRecommendCardIcon()) + .resize(DpUtil.dp2px(80),DpUtil.dp2px(33)) .into(liveType); } viewBg.setImageResource(R.mipmap.superemperor_recommendation); diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index 36d4e899f..ed355aceb 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -211,7 +211,8 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement new_data = JSON.parseArray(Arrays.toString(info), LiveBean.class); } } - + // new_data.clear(); + // mBannerList.clear(); return new_data; } diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveWeekItemViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveWeekItemViewHolder.java index a60493099..0d3beb827 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveWeekItemViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveWeekItemViewHolder.java @@ -67,7 +67,7 @@ public class MainHomeLiveWeekItemViewHolder extends RecyclerView.ViewHolder { public void onComplete(SVGAVideoEntity videoItem) { SVGADrawable drawable = new SVGADrawable(videoItem); weekSvga.setImageDrawable(drawable); - SVGAViewUtils.playEndClear(weekSvga); + SVGAViewUtils.playEndClear(weekSvga,false); weekSvga.setClearsAfterStop(false); } diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index 35c9897c5..740285f63 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -313,7 +313,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi public void onComplete(SVGAVideoEntity videoItem) { SVGADrawable drawable = new SVGADrawable(videoItem); gift_svga.setImageDrawable(drawable); - SVGAViewUtils.playEndClear(gift_svga); + SVGAViewUtils.playEndClear(gift_svga,false); } @Override diff --git a/main/src/main/res/layout/view_main_home.xml b/main/src/main/res/layout/view_main_home.xml index cb46dc9d2..bb1b81f3f 100644 --- a/main/src/main/res/layout/view_main_home.xml +++ b/main/src/main/res/layout/view_main_home.xml @@ -42,13 +42,13 @@ android:id="@+id/img_trophy" android:layout_width="40dp" android:layout_height="40dp" - android:layout_alignParentBottom="true" - android:layout_marginBottom="2dp" - android:layout_marginRight="5dp" - android:onClick="mainClick" android:layout_alignParentRight="true" - android:padding="6dp" - android:contentDescription="TODO" /> + android:layout_alignParentBottom="true" + android:layout_marginRight="5dp" + android:layout_marginBottom="2dp" + android:contentDescription="TODO" + android:onClick="mainClick" + android:padding="6dp" />