feat: UI 走查
This commit is contained in:
@@ -259,6 +259,8 @@ public class App extends BaseApp {
|
||||
AuthModel.get().cleanLogInfo();
|
||||
}
|
||||
throw new ServerException(serviceResult.getMessage(), serviceResult.getCode());
|
||||
}else if (serviceResult.getCode() == ServiceResult.CODE_ROOM_MANAGER_LIMIT) {
|
||||
throw new ServerException(serviceResult.getMessage(), serviceResult.getCode());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@@ -7,6 +7,7 @@ import android.text.TextUtils;
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.UIHelper;
|
||||
import com.chwl.app.avroom.widget.ViewItem;
|
||||
import com.chwl.app.common.util.DialogCommonUtil;
|
||||
import com.chwl.app.common.widget.dialog.DialogManager;
|
||||
import com.chwl.app.room_chat.activity.RoomMsgActivity;
|
||||
import com.chwl.app.ui.im.avtivity.NimFriendModel;
|
||||
@@ -16,6 +17,7 @@ import com.chwl.app.ui.widget.GiftDialog;
|
||||
import com.chwl.app.vip.util.VipHelper;
|
||||
import com.chwl.core.auth.AuthModel;
|
||||
import com.chwl.core.bean.RoomQueueInfo;
|
||||
import com.chwl.core.bean.response.ServiceResult;
|
||||
import com.chwl.core.initial.InitialModel;
|
||||
import com.chwl.core.initial.bean.InitInfo;
|
||||
import com.chwl.core.kick.KickModel;
|
||||
@@ -30,6 +32,7 @@ import com.chwl.core.super_admin.util.SAdminOptUtil;
|
||||
import com.chwl.core.super_admin.util.SaAttachmentFactory;
|
||||
import com.chwl.core.super_admin.util.SuperAdminUtil;
|
||||
import com.chwl.core.user.bean.UserInfo;
|
||||
import com.chwl.library.net.rxnet.callback.CallBack;
|
||||
import com.chwl.library.utils.JavaUtil;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
import com.chwl.library.utils.SingleToastUtil;
|
||||
@@ -177,10 +180,10 @@ public class ButtonItemFactory {
|
||||
account, getNick(chatRoomMember, account)));
|
||||
}
|
||||
if (mark_manager) {
|
||||
buttonItems.add(createMarkManagerListItem(String.valueOf(currentRoom.getRoomId()), account, true));
|
||||
buttonItems.add(createMarkManagerListItem(context,String.valueOf(currentRoom.getRoomId()), account, true));
|
||||
}
|
||||
if (no_mark_manager) {
|
||||
buttonItems.add(createMarkManagerListItem(String.valueOf(currentRoom.getRoomId()), account, false));
|
||||
buttonItems.add(createMarkManagerListItem(context,String.valueOf(currentRoom.getRoomId()), account, false));
|
||||
}
|
||||
if (mart_black) {
|
||||
buttonItems.add(createMarkBlackListItem(
|
||||
@@ -341,7 +344,7 @@ public class ButtonItemFactory {
|
||||
}
|
||||
|
||||
//设置管理员
|
||||
public static ViewItem createMarkManagerListItem(final String roomId, final String account, final boolean mark) {
|
||||
public static ViewItem createMarkManagerListItem(final Context context,final String roomId, final String account, final boolean mark) {
|
||||
String title = BasicConfig.INSTANCE.getAppContext().getString(mark ? R.string.set_manager : R.string.remove_manager);
|
||||
int icon = mark ? R.drawable.icon_dialog_set_manager_ture : R.drawable.icon_dialog_set_manager_false;
|
||||
return new ViewItem(title, icon, () -> {
|
||||
@@ -349,8 +352,16 @@ public class ButtonItemFactory {
|
||||
if (AvRoomDataManager.get().isSuperAdmin()) {
|
||||
AvRoomModel.get().markManager(Long.parseLong(account), mark).subscribe();
|
||||
} else {
|
||||
IMNetEaseManager.get().markManagerListBySdk(roomId, account, mark, null);
|
||||
|
||||
IMNetEaseManager.get().markManagerListBySdk(roomId, account, mark, new CallBack<ChatRoomMember>() {
|
||||
@Override
|
||||
public void onSuccess(ChatRoomMember data) {}
|
||||
@Override
|
||||
public void onFail(int code, String error) {
|
||||
if (code == ServiceResult.CODE_ROOM_MANAGER_LIMIT) {
|
||||
DialogCommonUtil.showManagerLimit(context);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -8,19 +8,21 @@ import android.view.View;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomMember;
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.avroom.adapter.RoomNormalListAdapter;
|
||||
import com.chwl.app.avroom.presenter.RoomManagerPresenter;
|
||||
import com.chwl.app.avroom.view.IRoomManagerView;
|
||||
import com.chwl.app.base.BaseMvpActivity;
|
||||
import com.chwl.app.common.util.DialogCommonUtil;
|
||||
import com.chwl.app.common.widget.dialog.DialogManager;
|
||||
import com.chwl.core.bean.response.ServiceResult;
|
||||
import com.chwl.core.manager.AvRoomDataManager;
|
||||
import com.chwl.core.room.bean.RoomInfo;
|
||||
import com.chwl.library.base.factory.CreatePresenter;
|
||||
import com.chwl.library.utils.ListUtils;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomMember;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
@@ -140,7 +142,9 @@ public class RoomManagerListActivity extends BaseMvpActivity<IRoomManagerView, R
|
||||
|
||||
@Override
|
||||
public void markManagerListFail(int code, String error) {
|
||||
|
||||
if (code == ServiceResult.CODE_ROOM_MANAGER_LIMIT) {
|
||||
DialogCommonUtil.showManagerLimit(context);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -224,6 +224,16 @@ class RoomTypeSwitchActivity : BaseViewBindingActivity<RoomTypeSwitchActivityBin
|
||||
|
||||
private fun setListView(rvList: RecyclerView, adapter: RoomModeAdapter) {
|
||||
adapter.setOnItemClickListener { adapter, view, position ->
|
||||
|
||||
val clickData = adapter?.data?.get(position)
|
||||
if (clickData != null && clickData is RoomMicDress){
|
||||
if (mCurrentLevel < clickData.reachLevel) {
|
||||
R.string.roomLevelErrorTips.doToast()
|
||||
return@setOnItemClickListener
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
adapter?.data?.forEachIndexed { index, feData ->
|
||||
if (feData is RoomMicDress) {
|
||||
feData.isSelect = index == position
|
||||
|
@@ -1,15 +1,12 @@
|
||||
package com.chwl.app.common.dialog
|
||||
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.widget.TextView
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialogFragment
|
||||
import com.chwl.app.databinding.DialogCommonBinding
|
||||
import com.chwl.library.common.util.ClickUtils.click
|
||||
import com.example.lib_utils.ktx.dp
|
||||
import com.example.lib_utils.ktx.getColor
|
||||
import com.example.lib_utils.ktx.setPadding2
|
||||
|
||||
class DialogCommon : BaseDialogFragment<DialogCommonBinding>() {
|
||||
|
||||
@@ -21,24 +18,22 @@ class DialogCommon : BaseDialogFragment<DialogCommonBinding>() {
|
||||
|
||||
|
||||
var mTitle = ""
|
||||
var mContent = ""
|
||||
var mContentLayout : View? = null
|
||||
|
||||
|
||||
override fun init() {
|
||||
|
||||
if (mContentLayout == null) {
|
||||
mContentLayout = View(context)
|
||||
}
|
||||
|
||||
binding.btnOk.click {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
|
||||
binding.title.text = mTitle
|
||||
|
||||
val text = TextView(context)
|
||||
text.setTextColor(R.color.color_313131.getColor())
|
||||
text.textSize = 13f
|
||||
text.setPadding2(start = 23.dp, end = 23.dp, bottom = 16.dp)
|
||||
text.text = mContent
|
||||
binding.contentLayout.addView(text)
|
||||
|
||||
binding.contentLayout.addView(mContentLayout)
|
||||
}
|
||||
|
||||
|
||||
@@ -46,4 +41,5 @@ class DialogCommon : BaseDialogFragment<DialogCommonBinding>() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
package com.chwl.app.common.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.common.dialog.DialogCommon;
|
||||
import com.chwl.library.common.util.OtherExtKt;
|
||||
import com.example.lib_utils.ktx.ResourcesKtxKt;
|
||||
|
||||
public class DialogCommonUtil {
|
||||
|
||||
|
||||
public static void showManagerLimit(Context context) {
|
||||
DialogCommon dialogCommon = new DialogCommon();
|
||||
|
||||
LinearLayout layout = new LinearLayout(context);
|
||||
layout.setOrientation(LinearLayout.VERTICAL);
|
||||
|
||||
TextView textView = new TextView(context);
|
||||
textView.setTextColor(ResourcesKtxKt.getColor(R.color.color_313131));
|
||||
textView.setTextSize(13);
|
||||
textView.setText(ResourcesKtxKt.getString(R.string.roomManagerLimitErrorTips));
|
||||
textView.setPadding(OtherExtKt.toDP(25), 0, OtherExtKt.toDP(25), 0);
|
||||
layout.addView(textView);
|
||||
OtherExtKt.setViewWH(textView,LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT,false);
|
||||
|
||||
ImageView imageView = new ImageView(context);
|
||||
imageView.setImageResource(R.drawable.icon_manager_admin);
|
||||
layout.addView(imageView);
|
||||
OtherExtKt.setViewWH(imageView,LinearLayout.LayoutParams.MATCH_PARENT,OtherExtKt.toDP(258),false);
|
||||
OtherExtKt.setMargin(imageView,23,10,23,10,true);
|
||||
|
||||
dialogCommon.setMTitle(ResourcesKtxKt.getString(R.string.Tip));
|
||||
|
||||
dialogCommon.setMContentLayout(layout);
|
||||
dialogCommon.show(context);
|
||||
}
|
||||
}
|
@@ -9,14 +9,18 @@ import com.chwl.app.application.IReportConstants
|
||||
import com.chwl.app.application.ReportManager
|
||||
import com.chwl.app.avroom.adapter.CommonVPAdapter
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.util.DialogCommonUtil
|
||||
import com.chwl.app.databinding.FragmentHomeBinding
|
||||
import com.chwl.app.home.adapter.HomeIndicatorAdapter
|
||||
import com.chwl.app.ui.im.avtivity.NimP2PMessageActivity
|
||||
import com.chwl.app.ui.search.SearchActivity
|
||||
import com.chwl.app.ui.widget.magicindicator.ViewPagerHelper
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
||||
import com.chwl.app.utils.HomeUIManager
|
||||
import com.chwl.core.DemoCache
|
||||
import com.chwl.core.auth.AuthModel
|
||||
import com.netease.nim.uikit.impl.cache.NimUserInfoCache
|
||||
import com.netease.nimlib.sdk.RequestCallbackWrapper
|
||||
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo
|
||||
|
||||
/**
|
||||
首页
|
||||
@@ -43,9 +47,23 @@ class HomeFragment : BaseViewBindingFragment<FragmentHomeBinding>(), View.OnClic
|
||||
|
||||
|
||||
//自动登录
|
||||
AuthModel.get().autoLogin()
|
||||
.doOnError { throwable: Throwable? -> }
|
||||
.subscribe()
|
||||
// AuthModel.get().autoLogin()
|
||||
// .doOnError { throwable: Throwable? -> }
|
||||
// .subscribe()
|
||||
|
||||
// NimUserInfoCache.getInstance().getUserInfoFromRemote(
|
||||
// "3224",
|
||||
// object : RequestCallbackWrapper<NimUserInfo?>() {
|
||||
// override fun onResult(
|
||||
// code: Int,
|
||||
// result: NimUserInfo?,
|
||||
// exception: Throwable
|
||||
// ) {
|
||||
//
|
||||
// }
|
||||
// })
|
||||
|
||||
DialogCommonUtil.showManagerLimit(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -143,7 +143,7 @@ public class SplashActivity extends AppCompatActivity implements View.OnClickLis
|
||||
|
||||
animation();
|
||||
//todo do 看下有没有图片适配问题 mLocalSplashVo.getType()==3 是图片
|
||||
mBinding.ivActivity.setTextView(20f);
|
||||
mBinding.ivActivity.setTextView(25f);
|
||||
mBinding.ivActivity.load(mLocalSplashVo.getPict(),mLocalSplashVo.getFillVo().getImgMap(), mLocalSplashVo.getFillVo().getTextMap());
|
||||
|
||||
if (mLocalSplashVo.getType() != 0 && !TextUtils.isEmpty(mLocalSplashVo.getLink())) {
|
||||
|
@@ -7,6 +7,7 @@ import android.text.TextUtils
|
||||
import android.view.KeyEvent
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import android.widget.TextView.OnEditorActionListener
|
||||
import androidx.activity.viewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
@@ -32,7 +33,10 @@ import com.chwl.library.common.util.setViewWH
|
||||
import com.chwl.library.common.util.setVis
|
||||
import com.chwl.library.net.rxnet.RxNet
|
||||
import com.chwl.library.utils.ResUtil
|
||||
import com.example.lib_utils.ktx.dp
|
||||
import com.example.lib_utils.ktx.getColor
|
||||
import com.example.lib_utils.ktx.getString
|
||||
import com.example.lib_utils.ktx.setPadding2
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import io.reactivex.Single
|
||||
import retrofit2.http.GET
|
||||
@@ -125,17 +129,16 @@ class GiveGoldActivity : BaseViewBindingActivity<ActivityGiveGoldBinding>() {
|
||||
}
|
||||
|
||||
binding.more.click {
|
||||
// val dialog = DialogManager(context)
|
||||
// dialog.showOkCancelDialog(R.string.layout_layout_single_room_pk_board_view_01.getString()
|
||||
// ,R.string.giveGoldTips.getString(),
|
||||
// R.string.ok.getString(),"",true,object : DialogManager.AbsOkDialogListener() {
|
||||
// override fun onOk() {
|
||||
//
|
||||
// }
|
||||
// })
|
||||
|
||||
val dialog2 = DialogCommon()
|
||||
dialog2.mContent = R.string.giveGoldTips.getString()
|
||||
|
||||
val text = TextView(context)
|
||||
text.setTextColor(R.color.color_313131.getColor())
|
||||
text.textSize = 13f
|
||||
text.setPadding2(start = 23.dp, end = 23.dp, bottom = 16.dp)
|
||||
text.text = R.string.giveGoldTips.getString()
|
||||
|
||||
dialog2.mContentLayout = text
|
||||
dialog2.mTitle = R.string.layout_layout_single_room_pk_board_view_01.getString()
|
||||
dialog2.show(context)
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ import com.chwl.app.ui.utils.ImageLoadUtils;
|
||||
import com.chwl.app.ui.widget.NobleAvatarView;
|
||||
import com.chwl.app.vip.util.VipHelper;
|
||||
import com.chwl.core.user.bean.UserInfo;
|
||||
import com.chwl.core.utils.extension.StringExtensionKt;
|
||||
import com.chwl.library.common.util.OtherExtKt;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
|
||||
/**
|
||||
@@ -50,10 +50,12 @@ public class FriendListAdapter extends BaseQuickAdapter<UserInfo, BaseViewHolder
|
||||
protected void convert(BaseViewHolder helper, UserInfo item) {
|
||||
if (item == null) return;
|
||||
|
||||
helper.setText(R.id.tv_userName, StringExtensionKt.subAndReplaceDot(item.getNick(), 8))
|
||||
helper.setText(R.id.tv_userName, item.getNick())
|
||||
.setText(R.id.tv_user_desc, item.getUserDesc() != null ?
|
||||
item.getUserDesc()
|
||||
: helper.itemView.getContext().getResources().getString(R.string.msg_no_user_desc));
|
||||
|
||||
View vipIcon = helper.getView(R.id.iv_vip_icon);
|
||||
VipHelper.loadVipNameplate(helper.getView(R.id.iv_vip_icon), item.getUserVipInfoVO());
|
||||
VipHelper.loadVipNickColor(helper.getView(R.id.tv_userName), item.getUserVipInfoVO(), "#FF333333");
|
||||
NobleAvatarView nobleAvatarView = helper.getView(R.id.noble_avatar_view);
|
||||
@@ -165,6 +167,21 @@ public class FriendListAdapter extends BaseQuickAdapter<UserInfo, BaseViewHolder
|
||||
break;
|
||||
}
|
||||
|
||||
View view = helper.getView(R.id.userInfoLayout);
|
||||
if (view != null) {
|
||||
view.post(() -> {
|
||||
int iconNum = 0;
|
||||
if (vipIcon.getVisibility() == View.VISIBLE) iconNum++;
|
||||
if (ivUserLevel.getVisibility() == View.VISIBLE) iconNum++;
|
||||
if (ivCharmLevel.getVisibility() == View.VISIBLE) iconNum++;
|
||||
|
||||
int width = view.getWidth();
|
||||
int i = width - OtherExtKt.toDP(42) * iconNum;
|
||||
TextView textView = helper.getView(R.id.tv_userName);
|
||||
textView.setMaxWidth(i);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
|
@@ -13,6 +13,12 @@ import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.home.event.ContactTrashEvent;
|
||||
import com.chwl.app.ui.im.recent.adapter.RecentContactAdapter;
|
||||
import com.chwl.core.utils.CheckUtils;
|
||||
import com.chwl.core.utils.SystemUidUtil;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
import com.netease.nim.uikit.api.NimUIKit;
|
||||
import com.netease.nim.uikit.api.model.contact.ContactChangedObserver;
|
||||
import com.netease.nim.uikit.api.model.main.OnlineStateChangeObserver;
|
||||
@@ -31,7 +37,6 @@ import com.netease.nim.uikit.common.ui.recyclerview.listener.SimpleClickListener
|
||||
import com.netease.nim.uikit.impl.NimUIKitImpl;
|
||||
import com.netease.nimlib.sdk.NIMClient;
|
||||
import com.netease.nimlib.sdk.Observer;
|
||||
import com.netease.nimlib.sdk.RequestCallback;
|
||||
import com.netease.nimlib.sdk.RequestCallbackWrapper;
|
||||
import com.netease.nimlib.sdk.ResponseCode;
|
||||
import com.netease.nimlib.sdk.msg.MsgService;
|
||||
@@ -42,13 +47,6 @@ import com.netease.nimlib.sdk.msg.model.QueryDirectionEnum;
|
||||
import com.netease.nimlib.sdk.msg.model.RecentContact;
|
||||
import com.netease.nimlib.sdk.team.model.Team;
|
||||
import com.netease.nimlib.sdk.team.model.TeamMember;
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.home.event.ContactTrashEvent;
|
||||
import com.chwl.app.ui.im.recent.adapter.RecentContactAdapter;
|
||||
import com.chwl.core.utils.CheckUtils;
|
||||
import com.chwl.core.utils.SystemUidUtil;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
import com.chwl.library.utils.SingleToastUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -284,29 +282,29 @@ public class RecentContactsFragment extends TFragment {
|
||||
}
|
||||
});
|
||||
|
||||
alertDialog.addItem(ResUtil.getString(R.string.im_recent_recentcontactsfragment_02), new onSeparateItemClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
NIMClient.getService(MsgService.class)
|
||||
.deleteRoamingRecentContact(recent.getContactId(), recent.getSessionType())
|
||||
.setCallback(new RequestCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(Void param) {
|
||||
SingleToastUtil.showToastShort("delete success");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
SingleToastUtil.showToastShort("delete failed, code:" + code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(Throwable exception) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// alertDialog.addItem(ResUtil.getString(R.string.im_recent_recentcontactsfragment_02), new onSeparateItemClickListener() {
|
||||
// @Override
|
||||
// public void onClick() {
|
||||
// NIMClient.getService(MsgService.class)
|
||||
// .deleteRoamingRecentContact(recent.getContactId(), recent.getSessionType())
|
||||
// .setCallback(new RequestCallback<Void>() {
|
||||
// @Override
|
||||
// public void onSuccess(Void param) {
|
||||
// SingleToastUtil.showToastShort("delete success");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailed(int code) {
|
||||
// SingleToastUtil.showToastShort("delete failed, code:" + code);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onException(Throwable exception) {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
alertDialog.show();
|
||||
}
|
||||
|
||||
|
@@ -4,6 +4,7 @@ import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -78,10 +79,12 @@ public abstract class RecentViewHolder extends RecyclerViewHolder<BaseQuickAdapt
|
||||
|
||||
|
||||
protected void updateBackground(NIMBaseViewHolder holder, RecentContact recent, int position) {
|
||||
//todo do 聊天置顶背景
|
||||
View view = holder.getView(R.id.root);
|
||||
if ((recent.getTag() & RecentContactsFragment.RECENT_TAG_STICKY) == 0) {
|
||||
// holder.getConvertView().setBackgroundResource(R.drawable.shape_white_10dp_round);
|
||||
// view.setBackgroundResource(R.drawable.shape_white_10dp_round);
|
||||
} else {
|
||||
holder.getConvertView().setBackgroundResource(R.drawable.shape_white_10dp_round);
|
||||
// view.setBackgroundResource(R.drawable.shape_white_10dp_round);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,6 +2,7 @@ package com.chwl.app.ui.relation.adapter;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
|
||||
@@ -14,7 +15,7 @@ import com.chwl.app.ui.widget.NobleAvatarView;
|
||||
import com.chwl.app.vip.util.VipHelper;
|
||||
import com.chwl.core.Constants;
|
||||
import com.chwl.core.user.bean.AttentionInfo;
|
||||
import com.chwl.core.utils.extension.StringExtensionKt;
|
||||
import com.chwl.library.common.util.OtherExtKt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -38,9 +39,13 @@ public class AttentionListAdapter extends BaseQuickAdapter<AttentionInfo, BaseVi
|
||||
@Override
|
||||
protected void convert(BaseViewHolder baseViewHolder, final AttentionInfo attentionInfo) {
|
||||
if (attentionInfo == null) return;
|
||||
|
||||
|
||||
|
||||
|
||||
boolean isSend = (type == AbstractSelectFriendAction.TYPE_WEAR ||
|
||||
type == AbstractSelectFriendAction.TYPE_CAR);
|
||||
baseViewHolder.setText(R.id.tv_userName, StringExtensionKt.subAndReplaceDot(attentionInfo.getNick(),8))
|
||||
baseViewHolder.setText(R.id.tv_userName, attentionInfo.getNick())
|
||||
.setText(R.id.tv_user_desc, attentionInfo.getUserDesc() != null ?
|
||||
attentionInfo.getUserDesc()
|
||||
: baseViewHolder.itemView.getContext().getResources().getString(R.string.msg_no_user_desc))
|
||||
@@ -71,7 +76,7 @@ public class AttentionListAdapter extends BaseQuickAdapter<AttentionInfo, BaseVi
|
||||
// GenderAgeTextView tvGenderAge = baseViewHolder.getView(R.id.tv_gender_age);
|
||||
// tvGenderAge.setGender(attentionInfo.getGender());
|
||||
// tvGenderAge.setBirthDay(attentionInfo.getBirth());
|
||||
|
||||
View vipIcon = baseViewHolder.getView(R.id.iv_vip_icon);
|
||||
VipHelper.loadVipNameplate(baseViewHolder.getView(R.id.iv_vip_icon), attentionInfo.getUserVipInfoVO());
|
||||
VipHelper.loadVipNickColor(baseViewHolder.getView(R.id.tv_userName), attentionInfo.getUserVipInfoVO(), "#FF333333");
|
||||
|
||||
@@ -107,6 +112,24 @@ public class AttentionListAdapter extends BaseQuickAdapter<AttentionInfo, BaseVi
|
||||
ivCharmLevel.setVisibility(View.VISIBLE);
|
||||
ImageLoadUtils.loadImage(mContext, attentionInfo.userLevelVo.getCharmUrl(), ivCharmLevel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
View view = baseViewHolder.getView(R.id.userInfoLayout);
|
||||
if (view != null) {
|
||||
view.post(() -> {
|
||||
int iconNum = 0;
|
||||
if (vipIcon.getVisibility() == View.VISIBLE) iconNum++;
|
||||
if (ivUserLevel.getVisibility() == View.VISIBLE) iconNum++;
|
||||
if (ivCharmLevel.getVisibility() == View.VISIBLE) iconNum++;
|
||||
|
||||
int width = view.getWidth();
|
||||
int i = width - OtherExtKt.toDP(42) * iconNum;
|
||||
TextView textView = baseViewHolder.getView(R.id.tv_userName);
|
||||
textView.setMaxWidth(i);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setRylListener(onClickListener onClickListener) {
|
||||
|
@@ -15,7 +15,7 @@ import com.chwl.app.ui.widget.NobleAvatarView;
|
||||
import com.chwl.app.vip.util.VipHelper;
|
||||
import com.chwl.core.im.friend.IMFriendModel;
|
||||
import com.chwl.core.user.bean.FansInfo;
|
||||
import com.chwl.core.utils.extension.StringExtensionKt;
|
||||
import com.chwl.library.common.util.OtherExtKt;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
|
||||
import java.util.List;
|
||||
@@ -52,7 +52,7 @@ public class FansViewAdapter extends BaseQuickAdapter<FansInfo, BaseViewHolder>
|
||||
@Override
|
||||
protected void convert(BaseViewHolder baseViewHolder, final FansInfo fansInfo) {
|
||||
if (fansInfo == null) return;
|
||||
baseViewHolder.setText(R.id.tv_userName, StringExtensionKt.subAndReplaceDot(fansInfo.getNick(),8))
|
||||
baseViewHolder.setText(R.id.tv_userName, fansInfo.getNick())
|
||||
.setText(R.id.tv_user_desc, fansInfo.getUserDesc() != null ?
|
||||
fansInfo.getUserDesc()
|
||||
: baseViewHolder.itemView.getContext().getResources().getString(R.string.msg_no_user_desc))
|
||||
@@ -90,6 +90,7 @@ public class FansViewAdapter extends BaseQuickAdapter<FansInfo, BaseViewHolder>
|
||||
// tvGenderAge.setGender(fansInfo.getGender());
|
||||
// tvGenderAge.setBirthDay(fansInfo.getBirth());
|
||||
|
||||
View vipIcon = baseViewHolder.getView(R.id.iv_vip_icon);
|
||||
VipHelper.loadVipNameplate(baseViewHolder.getView(R.id.iv_vip_icon), fansInfo.getUserVipInfoVO());
|
||||
VipHelper.loadVipNickColor(baseViewHolder.getView(R.id.tv_userName), fansInfo.getUserVipInfoVO(), "#FF333333");
|
||||
|
||||
@@ -123,5 +124,20 @@ public class FansViewAdapter extends BaseQuickAdapter<FansInfo, BaseViewHolder>
|
||||
// NobleUtil.loadResource(badgeByLevel, ivBadge);
|
||||
// }
|
||||
// }
|
||||
|
||||
View view = baseViewHolder.getView(R.id.userInfoLayout);
|
||||
if (view != null) {
|
||||
view.post(() -> {
|
||||
int iconNum = 0;
|
||||
if (vipIcon.getVisibility() == View.VISIBLE) iconNum++;
|
||||
if (ivUserLevel.getVisibility() == View.VISIBLE) iconNum++;
|
||||
if (ivCharmLevel.getVisibility() == View.VISIBLE) iconNum++;
|
||||
|
||||
int width = view.getWidth();
|
||||
int i = width - OtherExtKt.toDP(42) * iconNum;
|
||||
TextView textView = baseViewHolder.getView(R.id.tv_userName);
|
||||
textView.setMaxWidth(i);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -785,8 +785,9 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
break;
|
||||
|
||||
case R.id.sendMsgLayout:
|
||||
if (userInfo == null) return;
|
||||
NimUserInfo nimUserInfo = NimUserInfoCache.getInstance().getUserInfo(String.valueOf(userId));
|
||||
if (nimUserInfo != null) {
|
||||
if (nimUserInfo != null && nimUserInfo.getName() != null && nimUserInfo.getName().equals(userInfo.getNick())) {
|
||||
NimP2PMessageActivity.start(this, String.valueOf(userId));
|
||||
} else {
|
||||
NimUserInfoCache.getInstance().getUserInfoFromRemote(String.valueOf(userId), new RequestCallbackWrapper<NimUserInfo>() {
|
||||
|
@@ -67,6 +67,8 @@ class EffectView : FrameLayout {
|
||||
private var mTextMap: HashMap<String, String>? = null
|
||||
|
||||
private var mTextSize = 14f
|
||||
|
||||
private var mNeedLog = false
|
||||
|
||||
private fun init(context: Context) {
|
||||
|
||||
@@ -82,7 +84,7 @@ class EffectView : FrameLayout {
|
||||
|
||||
|
||||
private fun loadUrl(url: String) {
|
||||
"EffectView loadUrl() url = $url".doLog()
|
||||
"EffectView loadUrl() url = $url".doLog(mNeedLog)
|
||||
mResourceUrl = url
|
||||
GlideUtils.instance().downloadFromUrl2(context,url,object : RequestListener<File?> {
|
||||
override fun onLoadFailed(
|
||||
@@ -91,7 +93,7 @@ class EffectView : FrameLayout {
|
||||
target: Target<File?>?,
|
||||
isFirstResource: Boolean
|
||||
): Boolean {
|
||||
"EffectView loadUrl() downloadFromUrl2 onLoadFailed e = ${e?.message}".doLog()
|
||||
"EffectView loadUrl() downloadFromUrl2 onLoadFailed e = ${e?.message}".doLog(mNeedLog)
|
||||
playCallBack(false)
|
||||
return true
|
||||
}
|
||||
@@ -103,7 +105,7 @@ class EffectView : FrameLayout {
|
||||
dataSource: DataSource?,
|
||||
isFirstResource: Boolean
|
||||
): Boolean {
|
||||
"EffectView loadUrl() downloadFromUrl2 onResourceReady name = ${resource?.name}".doLog()
|
||||
"EffectView loadUrl() downloadFromUrl2 onResourceReady name = ${resource?.name}".doLog(mNeedLog)
|
||||
if (resource != null) {
|
||||
val path = resource.path
|
||||
if (mResourceUrl == url) {
|
||||
@@ -128,7 +130,7 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
|
||||
private fun loadEffect(effectType: Int, resource: File) {
|
||||
"EffectView loadEffect() effectType = $effectType".doLog()
|
||||
"EffectView loadEffect() effectType = $effectType".doLog(mNeedLog)
|
||||
mEffectType = effectType
|
||||
this@EffectView.post{
|
||||
this@EffectView.removeAllViews()
|
||||
@@ -147,7 +149,7 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
|
||||
private fun loadImg(resource: File) {
|
||||
"EffectView loadImg() ".doLog()
|
||||
"EffectView loadImg() ".doLog(mNeedLog)
|
||||
try {
|
||||
this@EffectView.post {
|
||||
|
||||
@@ -178,7 +180,7 @@ class EffectView : FrameLayout {
|
||||
imageView.setImageBitmap(bitmap)
|
||||
}
|
||||
|
||||
"EffectView loadImg() start".doLog()
|
||||
"EffectView loadImg() start".doLog(mNeedLog)
|
||||
playCallBack(true)
|
||||
} else {
|
||||
imageView.setImageBitmap(bitmap)
|
||||
@@ -188,12 +190,12 @@ class EffectView : FrameLayout {
|
||||
|
||||
} catch (e: Exception) {
|
||||
playCallBack(false)
|
||||
"EffectView loadImg() false".doLog()
|
||||
"EffectView loadImg() false".doLog(mNeedLog)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadMp4(resource: File) {
|
||||
"EffectView loadMp4() ".doLog()
|
||||
"EffectView loadMp4() ".doLog(mNeedLog)
|
||||
try {
|
||||
val animView = AnimView(context)
|
||||
this@EffectView.addView(animView)
|
||||
@@ -203,19 +205,19 @@ class EffectView : FrameLayout {
|
||||
animView.setAnimListener(object : IAnimListener {
|
||||
override fun onFailed(errorType: Int, errorMsg: String?) {
|
||||
playCallBack(false)
|
||||
"EffectView loadMp4() onFailed ".doLog()
|
||||
"EffectView loadMp4() onFailed ".doLog(mNeedLog)
|
||||
}
|
||||
override fun onVideoComplete() {
|
||||
"EffectView loadMp4() onVideoComplete ".doLog()
|
||||
"EffectView loadMp4() onVideoComplete ".doLog(mNeedLog)
|
||||
}
|
||||
override fun onVideoDestroy() {
|
||||
"EffectView loadMp4() onVideoDestroy ".doLog()
|
||||
"EffectView loadMp4() onVideoDestroy ".doLog(mNeedLog)
|
||||
}
|
||||
override fun onVideoRender(frameIndex: Int, config: AnimConfig?) {
|
||||
}
|
||||
override fun onVideoStart() {
|
||||
playCallBack(true)
|
||||
"EffectView loadMp4() onVideoStart ".doLog()
|
||||
"EffectView loadMp4() onVideoStart ".doLog(mNeedLog)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -228,17 +230,17 @@ class EffectView : FrameLayout {
|
||||
}else if (!mImgUrlMap.isVerify() && !mImgUrlMap.isVerify()) {
|
||||
//不需要嵌入资源
|
||||
animView.startPlay(resource)
|
||||
"EffectView loadMp4() start".doLog()
|
||||
"EffectView loadMp4() start".doLog(mNeedLog)
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
"EffectView loadMp4() Exception = ${e?.message}".doLog()
|
||||
"EffectView loadMp4() Exception = ${e?.message}".doLog(mNeedLog)
|
||||
playCallBack(false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadMp4InImage(animView:AnimView,resource: File) {
|
||||
"EffectView loadMp4InImage() ".doLog()
|
||||
"EffectView loadMp4InImage() ".doLog(mNeedLog)
|
||||
try {
|
||||
var index = 0
|
||||
val bitmapMap = hashMapOf<String, Bitmap?>()
|
||||
@@ -247,14 +249,14 @@ class EffectView : FrameLayout {
|
||||
val imgUrl = mImgUrlMap?.get(key)?:""
|
||||
|
||||
if (!imgUrl.isVerify()){
|
||||
"EffectView loadMp4InImage() mImgUrlMap?.get(key)?.isVerify() == false 图片url 异常".doLog()
|
||||
"EffectView loadMp4InImage() mImgUrlMap?.get(key)?.isVerify() == false 图片url 异常".doLog(mNeedLog)
|
||||
playCallBack(false)
|
||||
return
|
||||
}
|
||||
|
||||
downLoadAvatar(imgUrl) { bitmap ->
|
||||
if (bitmap == null) {
|
||||
"EffectView loadMp4InImage() downLoadAvatar bitmap=null 下载图片失败 imgUrl=$imgUrl".doLog()
|
||||
"EffectView loadMp4InImage() downLoadAvatar bitmap=null 下载图片失败 imgUrl=$imgUrl".doLog(mNeedLog)
|
||||
playCallBack(false)
|
||||
} else {
|
||||
index++
|
||||
@@ -263,7 +265,7 @@ class EffectView : FrameLayout {
|
||||
|
||||
animView.setFetchResource(object : IFetchResource {
|
||||
override fun fetchImage(resource: Resource, result: (Bitmap?) -> Unit) {
|
||||
"EffectView loadMp4InImage() animView.setFetchResource fetchImage resource.tag = ${resource.tag}".doLog()
|
||||
"EffectView loadMp4InImage() animView.setFetchResource fetchImage resource.tag = ${resource.tag}".doLog(mNeedLog)
|
||||
if (bitmapMap.isEmpty()) {
|
||||
result(null)
|
||||
} else {
|
||||
@@ -289,7 +291,7 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
result(text)
|
||||
}
|
||||
"EffectView loadMp4InImage() animView.setFetchResource fetchText text.key = ${resource.tag} text.value = $text".doLog()
|
||||
"EffectView loadMp4InImage() animView.setFetchResource fetchText text.key = ${resource.tag} text.value = $text".doLog(mNeedLog)
|
||||
}
|
||||
|
||||
override fun releaseResource(resources: List<Resource>) {
|
||||
@@ -299,19 +301,19 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
})
|
||||
animView.startPlay(resource)
|
||||
"EffectView loadMp4InImage() start".doLog()
|
||||
"EffectView loadMp4InImage() start".doLog(mNeedLog)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
"EffectView loadMp4InImage() Exception = ${e?.message} ".doLog()
|
||||
"EffectView loadMp4InImage() Exception = ${e?.message} ".doLog(mNeedLog)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadMp4InText(animView:AnimView,resource: File) {
|
||||
"EffectView loadMp4InText() ".doLog()
|
||||
"EffectView loadMp4InText() ".doLog(mNeedLog)
|
||||
animView.setFetchResource(object : IFetchResource {
|
||||
override fun fetchImage(resource: Resource, result: (Bitmap?) -> Unit) {
|
||||
result(null)
|
||||
@@ -329,7 +331,7 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
result(text)
|
||||
}
|
||||
"EffectView loadMp4InImage() animView.setFetchResource fetchText text.key = ${resource.tag} text.value = $text".doLog()
|
||||
"EffectView loadMp4InImage() animView.setFetchResource fetchText text.key = ${resource.tag} text.value = $text".doLog(mNeedLog)
|
||||
}
|
||||
|
||||
override fun releaseResource(resources: List<Resource>) {
|
||||
@@ -339,11 +341,11 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
})
|
||||
animView.startPlay(resource)
|
||||
"EffectView loadMp4InText() start".doLog()
|
||||
"EffectView loadMp4InText() start".doLog(mNeedLog)
|
||||
}
|
||||
|
||||
private fun loadSvga(resource: File) {
|
||||
"EffectView loadSvga() ".doLog()
|
||||
"EffectView loadSvga() ".doLog(mNeedLog)
|
||||
try {
|
||||
val svgaView = SVGAView(context)
|
||||
this@EffectView.addView(svgaView)
|
||||
@@ -359,12 +361,12 @@ class EffectView : FrameLayout {
|
||||
svgaView.setImageDrawable(SVGADrawable(videoItem))
|
||||
svgaView.startAnimation()
|
||||
playCallBack(true)
|
||||
"EffectView loadSvga() true".doLog()
|
||||
"EffectView loadSvga() true".doLog(mNeedLog)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
"EffectView loadSvga() false".doLog()
|
||||
"EffectView loadSvga() false".doLog(mNeedLog)
|
||||
playCallBack(false)
|
||||
}
|
||||
},
|
||||
@@ -373,17 +375,17 @@ class EffectView : FrameLayout {
|
||||
null
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
"EffectView loadSvga() false".doLog()
|
||||
"EffectView loadSvga() false".doLog(mNeedLog)
|
||||
playCallBack(false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadSvga(videoItem: SVGAVideoEntity?) {
|
||||
"EffectView loadSvga() ".doLog()
|
||||
"EffectView loadSvga() ".doLog(mNeedLog)
|
||||
try {
|
||||
var mSvgaImageIndex = 0;
|
||||
if (videoItem == null) {
|
||||
"EffectView loadSvga() Exception videoItem=null".doLog()
|
||||
"EffectView loadSvga() Exception videoItem=null".doLog(mNeedLog)
|
||||
playCallBack(false)
|
||||
return
|
||||
}
|
||||
@@ -394,15 +396,15 @@ class EffectView : FrameLayout {
|
||||
svgaView.scaleType = ImageView.ScaleType.FIT_XY
|
||||
svgaView.callback = object : SVGACallback {
|
||||
override fun onPause() {
|
||||
"EffectView loadSvga() SVGACallback onPause()".doLog()
|
||||
"EffectView loadSvga() SVGACallback onPause()".doLog(mNeedLog)
|
||||
}
|
||||
|
||||
override fun onFinished() {
|
||||
"EffectView loadSvga() SVGACallback onFinished()".doLog()
|
||||
"EffectView loadSvga() SVGACallback onFinished()".doLog(mNeedLog)
|
||||
}
|
||||
|
||||
override fun onRepeat() {
|
||||
// "EffectView loadSvga() SVGACallback onRepeat()".doLog()
|
||||
// "EffectView loadSvga() SVGACallback onRepeat()".doLog(mNeedLog)
|
||||
}
|
||||
|
||||
override fun onStep(i: Int, v: Double) {
|
||||
@@ -410,25 +412,6 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
if (mImgUrlMap?.isNotEmpty() == true) {
|
||||
mImgUrlMap?.keys?.forEach { key ->
|
||||
val imgUrl = mImgUrlMap?.get(key)?:""
|
||||
if (imgUrl.isVerify()) {
|
||||
addDynamicImage(
|
||||
svgaView,
|
||||
dynamicEntity,
|
||||
imgUrl,
|
||||
key
|
||||
) { resource ->
|
||||
mSvgaImageIndex ++;
|
||||
dynamicEntity.setDynamicImage(resource,key)
|
||||
if (mSvgaImageIndex == mImgUrlMap?.count()) {
|
||||
playSvga(svgaView, videoItem, dynamicEntity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mTextMap?.isNotEmpty() == true) {
|
||||
mTextMap?.keys?.forEach { key ->
|
||||
@@ -454,6 +437,26 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
}
|
||||
|
||||
if (mImgUrlMap?.isNotEmpty() == true) {
|
||||
mImgUrlMap?.keys?.forEach { key ->
|
||||
val imgUrl = mImgUrlMap?.get(key)?:""
|
||||
if (imgUrl.isVerify()) {
|
||||
addDynamicImage(
|
||||
svgaView,
|
||||
dynamicEntity,
|
||||
imgUrl,
|
||||
key
|
||||
) { resource ->
|
||||
mSvgaImageIndex ++;
|
||||
dynamicEntity.setDynamicImage(resource,key)
|
||||
if (mSvgaImageIndex == mImgUrlMap?.count()) {
|
||||
playSvga(svgaView, videoItem, dynamicEntity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mImgUrlMap?.isNotEmpty() == true) {
|
||||
// 有图片, 等待下载完毕再播放svga
|
||||
} else {
|
||||
@@ -461,22 +464,22 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
"EffectView loadSvga() Exception = ${e?.message}".doLog()
|
||||
"EffectView loadSvga() Exception = ${e?.message}".doLog(mNeedLog)
|
||||
playCallBack(false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun playCallBack(isSuccess: Boolean,type: Int? = -1) {
|
||||
if (isSuccess) {
|
||||
"EffectView playCallBack() 加载成功 url = $mResourceUrl".doLog()
|
||||
"EffectView playCallBack() 加载成功 url = $mResourceUrl".doLog(mNeedLog)
|
||||
} else {
|
||||
"EffectView playCallBack() 加载失败 url = $mResourceUrl".doLog()
|
||||
"EffectView playCallBack() 加载失败 url = $mResourceUrl".doLog(mNeedLog)
|
||||
}
|
||||
mCallBack?.onPlay(isSuccess,type)
|
||||
}
|
||||
|
||||
private fun split(bitmap: Bitmap?): List<Drawable> {
|
||||
"EffectView split() ".doLog()
|
||||
"EffectView split() ".doLog(mNeedLog)
|
||||
val pieces: MutableList<Drawable> = ArrayList()
|
||||
try {
|
||||
if (bitmap!!.width == bitmap.height) {
|
||||
@@ -502,7 +505,7 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
}
|
||||
} catch (e: java.lang.Exception) {
|
||||
"EffectView split() Exception = ${e?.message}".doLog()
|
||||
"EffectView split() Exception = ${e?.message}".doLog(mNeedLog)
|
||||
}
|
||||
return pieces
|
||||
}
|
||||
@@ -520,7 +523,6 @@ class EffectView : FrameLayout {
|
||||
}
|
||||
GlideApp.with(App.instance())
|
||||
.asBitmap()
|
||||
.circleCrop()
|
||||
.load(url)
|
||||
.addListener(object : RequestListener<Bitmap?> {
|
||||
override fun onLoadFailed(
|
||||
@@ -555,7 +557,7 @@ class EffectView : FrameLayout {
|
||||
svgaView.setImageDrawable(drawable)
|
||||
svgaView.stepToFrame(0, true)
|
||||
playCallBack(true)
|
||||
"EffectView loadSvga() start".doLog()
|
||||
"EffectView loadSvga() start".doLog(mNeedLog)
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
app/src/main/res/drawable-xxhdpi/icon_manager_admin.webp
Normal file
BIN
app/src/main/res/drawable-xxhdpi/icon_manager_admin.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -38,24 +38,26 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/userInfoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_userName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="8"
|
||||
android:maxLines="1"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="15sp"
|
||||
tools:text="@string/layout_list_item_friend_new_01" />
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="11111" />
|
||||
|
||||
<!-- <com.chwl.app.view.GenderAgeTextView-->
|
||||
<!-- android:id="@+id/tv_gender_age"-->
|
||||
|
@@ -19,7 +19,8 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="title" />
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/contentLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@@ -38,6 +38,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/userInfoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
@@ -46,16 +47,15 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_userName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="8"
|
||||
android:maxLines="1"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="15sp"
|
||||
tools:text="@string/layout_list_item_friend_new_01" />
|
||||
tools:text="11" />
|
||||
|
||||
<!-- <com.chwl.app.view.GenderAgeTextView-->
|
||||
<!-- android:id="@+id/tv_gender_age"-->
|
||||
|
@@ -40,7 +40,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/main_bottom_bar_top_margin"
|
||||
android:background="@color/transparent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_title" />
|
||||
|
@@ -37,6 +37,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/userInfoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
@@ -45,16 +46,15 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_userName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="8"
|
||||
android:maxLines="1"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="15sp"
|
||||
tools:text="@string/layout_list_item_friend_new_01" />
|
||||
tools:text="111" />
|
||||
|
||||
<!-- <com.chwl.app.view.GenderAgeTextView-->
|
||||
<!-- android:id="@+id/tv_gender_age"-->
|
||||
|
@@ -11,6 +11,7 @@
|
||||
android:gravity="start|center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
@@ -62,6 +63,7 @@
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
@@ -72,14 +74,13 @@
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:layout_marginTop="2dp"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:textSize="15sp"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="12111111111111111" />
|
||||
tools:text="1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_badge"
|
||||
|
@@ -18,8 +18,8 @@
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/ic_cp_list_more"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_cp_list_more"
|
||||
android:padding="3dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/title_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/title_bar" />
|
||||
|
@@ -5375,7 +5375,9 @@
|
||||
<string name="Celebration">احتفال</string>
|
||||
<string name="Unique">فريد</string>
|
||||
<string name="roomLevelErrorTips">مستوى الغرفة ليس كافيا لاستخدام هذا الجلد.</string>
|
||||
<string name="roomManagerLimitErrorTips">عدد المسؤولين المقابلين لمستوى غرفتك الحالي ممتلئ، يرجى الترقية أولاً ثم الإضافة!</string>
|
||||
<string name="giveGoldTips"> ١. يمكنك الاتصال بخدمة العملاء الرسمية وتقديم الأدلة ذات الصلة لتحسين تصنيف النجوم\n٢. ينقسم تصنيف النجوم إلى 1 ~ 5 نجوم. 5 نجوم هي أفضل وكيل إعادة شحن\n٣. سيتم عرض تصنيف النجوم عندما يجد المستخدم وكيل إعادة الشحن\n٤ كلما ارتفع تصنيف النجوم، ارتفع الترتيب في قائمة النقل\n٥. جميع حقوق التفسير مملوكة للمسؤول ولا علاقة لها بـ قوقل أو ابل </string>
|
||||
<string name="Rules_">القواعد:</string>
|
||||
<string name="Tip">تلميح</string>
|
||||
<string name="roomBroadcast">يمكنك استخدام مكبر الصوت للتحدث مرة أخرى بعد %s~</string>
|
||||
</resources>
|
@@ -5170,7 +5170,9 @@ Toplam imza alın, ilgili ödülü alın
|
||||
<string name="Celebration">Kutlama</string>
|
||||
<string name="Unique">Benzersiz</string>
|
||||
<string name="roomLevelErrorTips">Bu skini kullanmak için oda seviyesi yeterli değil.</string>
|
||||
<string name="roomManagerLimitErrorTips">Mevcut oda seviyenize karşılık gelen yönetici sayısı doldu, lütfen önce yükseltin ve ardından ekleyin!</string>
|
||||
<string name="giveGoldTips">1. Yıldız derecelendirmesini artırmak için resmi müşteri hizmetleriyle iletişime geçebilir ve ilgili kanıtları sağlayabilirsiniz.\n 2. Yıldız derecelendirmesi 1~5 yıldıza bölünmüştür. 5 yıldız en iyi şarj aracıdır.\n 3. Yıldız derecelendirmesi, kullanıcı şarj aracısını bulduğunda görüntülenecektir.\n 4. Yıldız derecelendirmesi ne kadar yüksekse, transfer listesindeki sıralama da o kadar yüksek olur.\n 5. Tüm yorumlama hakları resmiyete aittir ve Google veya Apple ile hiçbir ilgisi yoktur.\n </string>
|
||||
<string name="Rules_">Kurallar:</string>
|
||||
<string name="Tip">İpucu</string>
|
||||
<string name="roomBroadcast">%s sonra tekrar megafon duyurusu yapabilirsiniz~</string>
|
||||
</resources>
|
||||
|
@@ -5318,8 +5318,10 @@
|
||||
<string name="Celebration">慶典</string>
|
||||
<string name="Unique">獨特的</string>
|
||||
<string name="roomLevelErrorTips">房間等級不足以使用此皮膚。</string>
|
||||
<string name="roomManagerLimitErrorTips">您目前房間等級對應的管理員人數已滿,請先升級再新增!</string>
|
||||
<string name="giveGoldTips">1.您可以聯絡官方客服並提供相關證據來提升星級。\n 2.星級分為1~5星。5星是最好的儲值代理。\n 3.用戶找到儲值代理商時會顯示星級。\n 4.星級越高,在轉職榜的排名越高。\n 5.所有解釋權歸官方所有,與Google或蘋果無關。\n </string>
|
||||
<string name="Rules_">規則:</string>
|
||||
<string name="Tip">提示</string>
|
||||
<string name="roomBroadcast">%s後可再次使用喇叭喊話</string>
|
||||
|
||||
</resources>
|
@@ -5393,8 +5393,10 @@ You cannot join again within 24 hours after leaving</string>
|
||||
<string name="Celebration">Celebration</string>
|
||||
<string name="Unique">Unique</string>
|
||||
<string name="roomLevelErrorTips">Room level is not enough to use this skin.</string>
|
||||
<string name="roomManagerLimitErrorTips">The number of admins corresponding to your current room level is full, please upgrade first and then add!</string>
|
||||
<string name="giveGoldTips">1. You can contact the official customer service and provide relevant evidence to improve the star rating.\n2. The star rating is divided into 1~5 stars.5 stars is the best recharge agent.\n3. The star rating will be displayed when the user found the recharge agent.\n4. The higher the star rating, the higher the ranking in the transfer list.\n5. All interpretation rights belong to the official and have nothing to do with Google or Apple.</string>
|
||||
<string name="Rules_">Rules:</string>
|
||||
<string name="Tip">Tip</string>
|
||||
|
||||
|
||||
|
||||
|
@@ -96,6 +96,8 @@ public class ServiceResult<T> implements Serializable {
|
||||
public static final int WEEKNOTWITHCASHTOWNUMS = 1600;//每周提现俩次
|
||||
public static final int CODE_NEED_COMPLETE_USER_INFO = 1415;//每周提现俩次
|
||||
|
||||
public static final int CODE_ROOM_MANAGER_LIMIT = 20504;//管理员超越上限
|
||||
|
||||
/** 没有网络 */
|
||||
public static final int NOT_NET = 50010;
|
||||
public static final int OTHER = 50011;
|
||||
|
@@ -43,6 +43,13 @@ public class BannerInfo implements Parcelable, Serializable, IRouterData {
|
||||
*/
|
||||
public final static transient int SKIP_TYP_H5_CUSTOM = 6;
|
||||
|
||||
/**
|
||||
* 百顺 baishun 游戏
|
||||
*/
|
||||
public final static transient int SKIP_TYPE_ROOM_BAI_SHUN = 7;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* routerhandler跳转规则
|
||||
*/
|
||||
@@ -53,10 +60,6 @@ public class BannerInfo implements Parcelable, Serializable, IRouterData {
|
||||
*/
|
||||
public final static transient int SKIP_TYPE_ROOM_USER_CARD = 66;
|
||||
|
||||
/**
|
||||
* 百顺 baishun 游戏
|
||||
*/
|
||||
public final static transient int SKIP_TYPE_ROOM_BAI_SHUN = 77;
|
||||
|
||||
/**
|
||||
* 无调整
|
||||
|
@@ -137,6 +137,7 @@ import com.chwl.core.utils.ExtensionUtils;
|
||||
import com.chwl.core.utils.LogUtils;
|
||||
import com.chwl.core.utils.SharedPreferenceUtils;
|
||||
import com.chwl.core.utils.net.DontWarnObserver;
|
||||
import com.chwl.core.utils.net.ServerException;
|
||||
import com.chwl.core.vip.VipBroadcastMsgEvent;
|
||||
import com.chwl.library.common.util.OtherExtKt;
|
||||
import com.chwl.library.net.rxnet.callback.CallBack;
|
||||
@@ -2547,7 +2548,11 @@ public final class IMNetEaseManager {
|
||||
.doOnError(throwable -> {
|
||||
OtherExtKt.doLog("开始设置管理员 - 请求接口 - 失败");
|
||||
if (throwable != null) {
|
||||
OtherExtKt.doToast(throwable.getMessage());
|
||||
if (throwable instanceof ServerException) {
|
||||
if (callBack != null) {
|
||||
callBack.onFail(((ServerException) throwable).code, throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}).subscribe();
|
||||
|
||||
|
@@ -56,6 +56,8 @@ class SVGAView : SVGAImageView, ILog {
|
||||
private var logTag: String? = null
|
||||
|
||||
|
||||
private var mNeedLog = false
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
|
||||
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
|
||||
@@ -313,6 +315,7 @@ class SVGAView : SVGAImageView, ILog {
|
||||
}
|
||||
|
||||
override fun logD(message: String, tag: String, filePrinter: Boolean) {
|
||||
if (!mNeedLog) return
|
||||
if (logTag != null) {
|
||||
super.logD("#$logTag# $message", tag, filePrinter)
|
||||
} else {
|
||||
|
@@ -154,6 +154,13 @@ fun String?.doLog() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun String?.doLog(doLog:Boolean) {
|
||||
if (doLog) {
|
||||
this.doLog()
|
||||
}
|
||||
}
|
||||
|
||||
fun String?.doLogW() {
|
||||
if (BuildConfig.DEBUG) {
|
||||
if (this.isVerify()) {
|
||||
|
@@ -51,7 +51,7 @@ public class BubbleView extends AppCompatTextView {
|
||||
GradientDrawable gradientDrawable = new GradientDrawable();
|
||||
gradientDrawable.setShape(GradientDrawable.RECTANGLE);
|
||||
// gradientDrawable.setShape(GradientDrawable.RECTANGLE);
|
||||
gradientDrawable.setCornerRadius(ScreenUtil.dip2px(20));
|
||||
gradientDrawable.setCornerRadius(ScreenUtil.dip2px(25));
|
||||
gradientDrawable.setColor(Color.parseColor("#FC5168"));
|
||||
setBackground(gradientDrawable);
|
||||
setPadding(ScreenUtil.dip2px(6), ScreenUtil.dip2px(2), ScreenUtil.dip2px(6), ScreenUtil.dip2px(2));
|
||||
|
Reference in New Issue
Block a user