This commit is contained in:
18142669586 2022-07-27 17:08:00 +08:00
parent 754b8639ae
commit 966e8bbddb
8 changed files with 29 additions and 20 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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<LiveGiftBean> 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;
}

View File

@ -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"));

View File

@ -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");
}
}
});

View File

@ -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"