diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..e90b2736b Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/live/src/main/assets/double_click_tip.svga b/live/src/main/assets/double_click_tip.svga new file mode 100644 index 000000000..bb67f6bf8 Binary files /dev/null and b/live/src/main/assets/double_click_tip.svga differ diff --git a/live/src/main/assets/free_gift_tip.svga b/live/src/main/assets/free_gift_tip.svga new file mode 100644 index 000000000..7c5513011 Binary files /dev/null and b/live/src/main/assets/free_gift_tip.svga differ diff --git a/live/src/main/assets/live_follow_tip.svga b/live/src/main/assets/live_follow_tip.svga new file mode 100644 index 000000000..bba685b5c Binary files /dev/null and b/live/src/main/assets/live_follow_tip.svga differ diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java index e80ddd232..4967df389 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java @@ -5,10 +5,12 @@ import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Handler; import android.os.Message; + import androidx.core.content.ContextCompat; import androidx.viewpager.widget.ViewPager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; + import android.text.TextUtils; import android.util.Log; import android.view.Gravity; @@ -112,7 +114,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On private RecyclerView items; private GiftTopAdapter giftTopAdapter; public int type = 0; - private static String type_name = ""; + private static String type_name = "熱門"; JSONArray lsit; @Override @@ -273,6 +275,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On if (bundle != null) { mLiveUid = bundle.getString(Constants.LIVE_UID); mStream = bundle.getString(Constants.LIVE_STREAM); + ToastUtil.show("啊"+ bundle.getString(Constants.LIVE_WISH_GIFTID)); mWishGiftId = bundle.getString(Constants.LIVE_WISH_GIFTID); by = bundle.getString("by"); } @@ -424,9 +427,15 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On } private void showGiftList(List list) { - if( IMLoginManager.get(mContext).isNewUserGif() == false) { - mWishGiftId = ""+bean1.getId(); - list.add(0,bean1); + if (IMLoginManager.get(mContext).isNewUserGif() == false && type_name.equals("熱門")|| type_name.equals("Hot")) { + ToastUtil.show(IMLoginManager.get(mContext).isNewUserGif() +"aaaa"); + + list.add(0, bean1); + if(mWishGiftId==null) { + ToastUtil.show(12121+""); + + mWishGiftId = "" + bean1.getId(); + } } mGiftList = list; mLiveGiftPagerAdapter = new LiveGiftPagerAdapter(mContext, list); @@ -508,12 +517,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On public void onClick(View v) { int i = v.getId(); if (i == R.id.btn_send || i == R.id.btn_send_lian) { - if(ToolsButton.isFastDoubleClick() && mLiveGiftBean.getTag()!=null&&mCount.equals("1")){ - ToastUtil.show("手速太快了"); - } else if (ToolsButton.isFastDoubleClick() && mLiveGiftBean.getSwf().contains("svga")) { + if (ToolsButton.isFastDoubleClick() && mLiveGiftBean.getSwf().contains("svga")) { ToastUtil.show("手速太快了"); } else { - sendGift(); + sendGift(); } } else if (i == R.id.btn_choose) { showGiftCount(); @@ -663,9 +670,9 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On // } // } else { // if (mBtnChooseCount.getVisibility() != View.VISIBLE) { - mBtnChooseCount.setVisibility(View.VISIBLE); - mArrow.setVisibility(View.VISIBLE); - mBtnSend.setBackground(mDrawable1); + mBtnChooseCount.setVisibility(View.VISIBLE); + mArrow.setVisibility(View.VISIBLE); + mBtnSend.setBackground(mDrawable1); // } // } } @@ -675,8 +682,8 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On * 赠送礼物 */ public void sendGift() { - if(mLiveGiftBean.getTag()!=null){ - if(mCount.equals("1")) { + if (mLiveGiftBean.getTag() != null) { + if (mCount.equals("1")) { LiveHttpUtil.setFrontTask("sendgift", mLiveUid, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -688,10 +695,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On dismiss(); } }); - }else { + } else { ToastUtil.show(R.string.only_one); } - }else { + } else { if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGiftBean == null) { return; } 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 9f36a6372..3b3ad5861 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java @@ -159,7 +159,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener { } } } else if ("stop_new_user_gif".equals(str)) { - IMLoginManager.get(mContext).setNewUserGif(true); + IMLoginManager.get(mContext).setNewUserGif(false); mBannerList3.get(0).setLink("1"); mBanner3.update(mBannerList3); if(mBannerList3.get(0).getLink().equals("1")){ @@ -306,7 +306,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener { gold = reward_one.getString("gold"); experience = reward_one.getString("experience"); - bean1.setSwf("111"); + bean1.setSwf("111.svga"); bean1.setChecked(false); bean1.setIcon(obj1.getString("gifticon")); bean1.setId(obj1.getIntValue("id")); 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 adb9e41be..495a0c8e4 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -222,6 +222,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public WindowManager windowManager; public boolean isRy = false; + public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) { super(context, parentView); Contexts = context; @@ -1199,9 +1200,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis LiveHttpUtil.setFrontTask("attent", new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { - if(code == 0){ - EventBus.getDefault().post("stop_svga_new_user_follow1"); - } + if (code == 0) { + EventBus.getDefault().post("stop_svga_new_user_follow1"); + } } }); diff --git a/main/src/main/res/layout/activity_one_login.xml b/main/src/main/res/layout/activity_one_login.xml index 227294b10..9aca6ba29 100644 --- a/main/src/main/res/layout/activity_one_login.xml +++ b/main/src/main/res/layout/activity_one_login.xml @@ -72,6 +72,7 @@ android:gravity="left|center" android:hint="@string/edit_profile_name_empty" android:background="@null" + android:maxLines="10" android:maxLength="20" android:singleLine="true" android:textColor="#161616"