im调整
This commit is contained in:
Binary file not shown.
@@ -20,7 +20,7 @@ public class ConstUrl {
|
||||
"http://pre-api.jindashengkj.cn/";
|
||||
//public static final String WEBSOCKTURL = "saws://192.168.32.106:11119/acc1";
|
||||
public static final String WEBSOCKTURL = "ws://red.nndongqing.cn/acc1";
|
||||
public static final String SOCKET_USERSTATIS_DEBUG = "wss://pre.ws.ncaicai.tech?user_id=";
|
||||
public static final String SOCKET_USERSTATIS_DEBUG = "wss://pre.ws.whnuanbeinikj.cn?user_id=";
|
||||
public static final String SOCKET_USERSTATIS = "wss://ws.whnuanbeinikj.cn?user_id=";
|
||||
public static final String SOCKET_SPEED_DATE = DEBUG ? (DEBUG1 ? "wss://pre.ws.whnuanbeinikj.cn/speed?token=" : "wss://ws.whnuanbeinikj.cn/speed?token=") :
|
||||
"wss://ws.whnuanbeinikj.cn/speed?token=";
|
||||
|
||||
@@ -92,7 +92,8 @@ public class UIKitOptions {
|
||||
* IM 接收到的消息时,内容区域背景的drawable id
|
||||
*/
|
||||
// public int messageLeftBackground = R.drawable.nim_message_item_left_selector;
|
||||
public int messageLeftBackground = R.drawable.ic_message_alice;
|
||||
// public int messageLeftBackground = R.drawable.ic_message_alice;
|
||||
public int messageLeftBackground = R.drawable.nim_message_item_left;
|
||||
public int messageLeftBackgroundVip = R.drawable.ic_message_alice_vip;
|
||||
public int messageLeftBackgroundVipMan = R.drawable.ic_message_alice_vip_man;
|
||||
|
||||
@@ -101,7 +102,8 @@ public class UIKitOptions {
|
||||
*/
|
||||
// public int messageRightBackground = R.drawable.nim_message_item_right_selector;
|
||||
// public int messageRightBackground = R.drawable.ic_message_me;
|
||||
public int messageRightBackground = R.drawable.ic_huang;
|
||||
// public int messageRightBackground = R.drawable.ic_huang;
|
||||
public int messageRightBackground = R.drawable.nim_message_item_right;
|
||||
public int messageRightBackgroundVIP = R.drawable.ic_huang_vip;
|
||||
public int messageRightBackgroundVIPMan = R.drawable.ic_huang_vip_man;
|
||||
|
||||
|
||||
@@ -212,6 +212,7 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
|
||||
private String title;
|
||||
private String avatar;
|
||||
private RelativeLayout mRl_title_coin_tip;
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
@@ -265,7 +266,6 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
rootView = inflater.inflate(R.layout.nim_message_fragment, container, false);
|
||||
// getTipData();
|
||||
EventBus.getDefault().register(this);
|
||||
rl_message_root = rootView.findViewById(R.id.rl_message_root);
|
||||
rl_guard = rootView.findViewById(R.id.rl_guard);
|
||||
@@ -296,6 +296,7 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
iv_album3 = rootView.findViewById(R.id.iv_album3);
|
||||
iv_album4 = rootView.findViewById(R.id.iv_album4);
|
||||
rv_call_list = rootView.findViewById(R.id.rv_call_list);
|
||||
mRl_title_coin_tip = rootView.findViewById(R.id.rl_title_coin_tip);
|
||||
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false);
|
||||
rv_call_list.setLayoutManager(layoutManager);
|
||||
@@ -316,8 +317,8 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
ic_guard_close.setOnClickListener(this);
|
||||
mSvgaDialog = new SvgaDialog(getContext());
|
||||
iv_back.setOnClickListener(this);
|
||||
tv_user_name.setOnClickListener(this);
|
||||
iv_interactive.setOnClickListener(this);
|
||||
// tv_user_name.setOnClickListener(this);
|
||||
// iv_interactive.setOnClickListener(this);
|
||||
iv_user_info.setOnClickListener(this);
|
||||
cl_info_card.setOnClickListener(this);
|
||||
tv_msg_like.setOnClickListener(this);
|
||||
@@ -397,6 +398,7 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
NewsManager.getChatTip((BaseActivity) getActivity(), new HttpUiCallBack<ChatTipBean>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, ChatTipBean result, String message) {
|
||||
|
||||
if (null != result) {
|
||||
if (!TextUtils.isEmpty(result.getTip())) {
|
||||
warmAnimator(result.getTip());
|
||||
@@ -427,48 +429,49 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
private ObjectAnimator fadeOut;
|
||||
|
||||
private void showUserInfoCard(boolean show, int i) {
|
||||
if (show) {
|
||||
if (fadeOut != null) {
|
||||
fadeOut.cancel();
|
||||
}
|
||||
iv_interactive.setImageResource(R.drawable.icon_arrow_down);
|
||||
isInteractiveShow = true;
|
||||
ObjectAnimator.ofFloat(cl_info_card, "translationY", 0F, -537F).setDuration(0).start();
|
||||
cl_info_card.setVisibility(View.VISIBLE);
|
||||
ObjectAnimator fadeIn = ObjectAnimator.ofFloat(cl_info_card, "translationY", -537F, 0);
|
||||
fadeIn.setDuration(1000).start();
|
||||
ObjectAnimator alphaIn = ObjectAnimator.ofFloat(cl_info_card, View.ALPHA, 1f);
|
||||
alphaIn.setDuration(1000); // 设置动画持续时间为1000毫秒
|
||||
alphaIn.start(); // 启动动画
|
||||
} else {
|
||||
iv_interactive.setImageResource(R.drawable.icon_arrow_up);
|
||||
isInteractiveShow = false;
|
||||
ObjectAnimator.ofFloat(cl_info_card, "translationY", 0F, -537F).setDuration(1000).start();
|
||||
fadeOut = ObjectAnimator.ofFloat(cl_info_card, View.ALPHA, 0f);
|
||||
fadeOut.setDuration(500); // 设置动画持续时间为1000毫秒
|
||||
fadeOut.addListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
cl_info_card.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
|
||||
}
|
||||
});
|
||||
fadeOut.start(); // 启动动画
|
||||
}
|
||||
isInteractiveShow = false;
|
||||
// if (show) {
|
||||
// if (fadeOut != null) {
|
||||
// fadeOut.cancel();
|
||||
// }
|
||||
// iv_interactive.setImageResource(R.drawable.icon_arrow_down);
|
||||
// isInteractiveShow = true;
|
||||
// ObjectAnimator.ofFloat(cl_info_card, "translationY", 0F, -537F).setDuration(0).start();
|
||||
// cl_info_card.setVisibility(View.VISIBLE);
|
||||
// ObjectAnimator fadeIn = ObjectAnimator.ofFloat(cl_info_card, "translationY", -537F, 0);
|
||||
// fadeIn.setDuration(1000).start();
|
||||
// ObjectAnimator alphaIn = ObjectAnimator.ofFloat(cl_info_card, View.ALPHA, 1f);
|
||||
// alphaIn.setDuration(1000); // 设置动画持续时间为1000毫秒
|
||||
// alphaIn.start(); // 启动动画
|
||||
// } else {
|
||||
// iv_interactive.setImageResource(R.drawable.icon_arrow_up);
|
||||
// isInteractiveShow = false;
|
||||
// ObjectAnimator.ofFloat(cl_info_card, "translationY", 0F, -537F).setDuration(1000).start();
|
||||
// fadeOut = ObjectAnimator.ofFloat(cl_info_card, View.ALPHA, 0f);
|
||||
// fadeOut.setDuration(500); // 设置动画持续时间为1000毫秒
|
||||
// fadeOut.addListener(new Animator.AnimatorListener() {
|
||||
// @Override
|
||||
// public void onAnimationStart(Animator animation) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAnimationEnd(Animator animation) {
|
||||
// cl_info_card.setVisibility(View.GONE);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAnimationCancel(Animator animation) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onAnimationRepeat(Animator animation) {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// fadeOut.start(); // 启动动画
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -492,6 +495,28 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
ObjectAnimator fadeOut = ObjectAnimator.ofFloat(mRlTextWarm, View.ALPHA, 0f);
|
||||
fadeOut.setDuration(2000); // 设置动画持续时间为500毫秒
|
||||
fadeOut.start(); // 启动动画
|
||||
|
||||
fadeOut.addListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animator) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animator) {
|
||||
mRlTextWarm.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animator) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animator) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 4000);
|
||||
}
|
||||
@@ -593,22 +618,22 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
tv_user_name.setTextColor(ContextCompat.getColor(getContext(), R.color.one_text));
|
||||
iv_interactive.setVisibility(View.GONE);
|
||||
iv_user_info.setVisibility(View.INVISIBLE);
|
||||
iv_back.setImageResource(R.drawable.sand_icon_back);
|
||||
if ("11".equals(sessionId)) {
|
||||
rl_message_root.setBackgroundResource(R.color.white);
|
||||
if (SPUtils.getInt(getContext(), ConsUser.DYNAMICS_TYPE) == 0) {
|
||||
lin_msg_dynamic.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
if (SPUtils.getInt(getContext(), ConsUser.DYNAMICS_TYPE) == 24) {
|
||||
tv_user_name.setText("新增点赞");
|
||||
} else if (SPUtils.getInt(getContext(), ConsUser.DYNAMICS_TYPE) == 26) {
|
||||
tv_user_name.setText("新增评论");
|
||||
} else if (SPUtils.getInt(getContext(), ConsUser.DYNAMICS_TYPE) == 16) {
|
||||
tv_user_name.setText("新增关注");
|
||||
}
|
||||
lin_msg_dynamic.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
// iv_back.setImageResource(R.drawable.sand_icon_back);
|
||||
// if ("11".equals(sessionId)) {
|
||||
// rl_message_root.setBackgroundResource(R.color.white);
|
||||
// if (SPUtils.getInt(getContext(), ConsUser.DYNAMICS_TYPE) == 0) {
|
||||
// lin_msg_dynamic.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// if (SPUtils.getInt(getContext(), ConsUser.DYNAMICS_TYPE) == 24) {
|
||||
// tv_user_name.setText("新增点赞");
|
||||
// } else if (SPUtils.getInt(getContext(), ConsUser.DYNAMICS_TYPE) == 26) {
|
||||
// tv_user_name.setText("新增评论");
|
||||
// } else if (SPUtils.getInt(getContext(), ConsUser.DYNAMICS_TYPE) == 16) {
|
||||
// tv_user_name.setText("新增关注");
|
||||
// }
|
||||
// lin_msg_dynamic.setVisibility(View.GONE);
|
||||
// }
|
||||
// }
|
||||
} else if ("4".equals(sessionId)) { //如果是客服,不显示礼物和视频按钮
|
||||
isShowGiftAndVideo = true;
|
||||
getMainPageData(Integer.parseInt(sessionId));
|
||||
@@ -617,8 +642,24 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
} else {
|
||||
getMainPageData(Integer.parseInt(sessionId));
|
||||
}
|
||||
|
||||
if (!"2".equals(sessionId) && !"4".equals(sessionId) && !"11".equals(sessionId) && !"3".equals(sessionId) && !"5".equals(sessionId)
|
||||
&& !"6".equals(sessionId) && !"7".equals(sessionId) && !"8".equals(sessionId) && !"9".equals(sessionId) && !"10".equals(sessionId)) {
|
||||
|
||||
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
|
||||
if (SPUtils.getInt(getActivity(), ConsUser.IS_ANCHOR) == 1) {
|
||||
mRl_title_coin_tip.setVisibility(View.GONE);
|
||||
}else {
|
||||
mRl_title_coin_tip.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}else {
|
||||
mRl_title_coin_tip.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}else {
|
||||
mRl_title_coin_tip.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
// getTipData(); //展示提示信息
|
||||
getTipData(); //展示提示信息
|
||||
|
||||
if (inputPanel == null) {
|
||||
inputPanel = new InputPanel(container, rootView, getActionList(), isShowEditBar, isShowGiftAndVideo, getActivity());
|
||||
@@ -1080,95 +1121,95 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
* @param message
|
||||
*/
|
||||
private void imCost(final int type, String id, final String content, final IMMessage message, String is_greet) {
|
||||
if (isInteractiveShow) {
|
||||
showUserInfoCard(false, 2);
|
||||
}
|
||||
// if (isInteractiveShow) {
|
||||
// showUserInfoCard(false, 2);
|
||||
// }
|
||||
NewsManager.sendIMCost((BaseActivity) getActivity(), type,
|
||||
id, content, is_greet, new HttpUiCallBack<IMCostBean>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, IMCostBean result, String tips) {
|
||||
|
||||
final AlertDialog builder = new AlertDialog.Builder(getActivity()).create();
|
||||
|
||||
builder.setCancelable(false);
|
||||
|
||||
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 2) { //男生
|
||||
builder.setMessage("一条私信扣" + result.getCut_coin() + "金币,成为会员享免费特权!");
|
||||
|
||||
builder.setButton(DialogInterface.BUTTON_NEUTRAL, "不再提醒", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
builder.dismiss();
|
||||
StorageManager.getInstance(getActivity())
|
||||
.putInt("isDynamicNoticeCanceled", 1);
|
||||
}
|
||||
});
|
||||
|
||||
builder.setButton(DialogInterface.BUTTON_POSITIVE, "成为VIP", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
builder.dismiss();
|
||||
Intent intent = new Intent(getActivity(), MemberActivity.class);
|
||||
getActivity().startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
builder.setButton(DialogInterface.BUTTON_NEGATIVE, "知道了", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
builder.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
if (result.getChat_card() != null) {
|
||||
if (TextUtils.equals("1", result.getChat_card().getIs_pop_up())) {
|
||||
ChatCardRedPacketDialog dialog = new ChatCardRedPacketDialog(getContext(), result.getChat_card());
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
} else if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) { //女生
|
||||
builder.setMessage("本条消息扣除" + result.getCut_coin()
|
||||
+ "金币,还剩" + result.getCoin() + "金币,通过真人认证私信免费哦!");
|
||||
|
||||
builder.setButton(DialogInterface.BUTTON_NEUTRAL, "不再提醒", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
builder.dismiss();
|
||||
StorageManager.getInstance(getActivity())
|
||||
.putInt("isDynamicNoticeCanceled", 1);
|
||||
}
|
||||
});
|
||||
|
||||
builder.setButton(DialogInterface.BUTTON_POSITIVE, "真人认证", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
builder.dismiss();
|
||||
Intent intentApplyBigCast = new Intent(getActivity(), CertificationActivity.class);
|
||||
getActivity().startActivity(intentApplyBigCast);
|
||||
}
|
||||
});
|
||||
builder.setButton(DialogInterface.BUTTON_NEGATIVE, "知道了", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
builder.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (result.getIs_cut() == 1
|
||||
&& 1 != StorageManager.getInstance(getActivity()).getInt("isDynamicNoticeCanceled") && !SPUtils.getBoolean(getActivity(), ConsUser.USER_VIP, false)) {
|
||||
builder.show();
|
||||
|
||||
Button buttonNue = builder.getButton(DialogInterface.BUTTON_NEUTRAL);
|
||||
buttonNue.setTextColor(getActivity().getResources().getColor(R.color.black));
|
||||
|
||||
Button buttonPos = builder.getButton(DialogInterface.BUTTON_POSITIVE);
|
||||
buttonPos.setTextColor(getActivity().getResources().getColor(R.color.black));
|
||||
|
||||
Button buttonNeg = builder.getButton(DialogInterface.BUTTON_NEGATIVE);
|
||||
buttonNeg.setTextColor(getActivity().getResources().getColor(R.color.black));
|
||||
}
|
||||
// final AlertDialog builder = new AlertDialog.Builder(getActivity()).create();
|
||||
//
|
||||
// builder.setCancelable(false);
|
||||
//
|
||||
// if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 2) { //男生
|
||||
// builder.setMessage("一条私信扣" + result.getCut_coin() + "金币,成为会员享免费特权!");
|
||||
//
|
||||
// builder.setButton(DialogInterface.BUTTON_NEUTRAL, "不再提醒", new DialogInterface.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// builder.dismiss();
|
||||
// StorageManager.getInstance(getActivity())
|
||||
// .putInt("isDynamicNoticeCanceled", 1);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// builder.setButton(DialogInterface.BUTTON_POSITIVE, "成为VIP", new DialogInterface.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// builder.dismiss();
|
||||
// Intent intent = new Intent(getActivity(), MemberActivity.class);
|
||||
// getActivity().startActivity(intent);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// builder.setButton(DialogInterface.BUTTON_NEGATIVE, "知道了", new DialogInterface.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// builder.dismiss();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// if (result.getChat_card() != null) {
|
||||
// if (TextUtils.equals("1", result.getChat_card().getIs_pop_up())) {
|
||||
// ChatCardRedPacketDialog dialog = new ChatCardRedPacketDialog(getContext(), result.getChat_card());
|
||||
// dialog.show();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// } else if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) { //女生
|
||||
// builder.setMessage("本条消息扣除" + result.getCut_coin()
|
||||
// + "金币,还剩" + result.getCoin() + "金币,通过真人认证私信免费哦!");
|
||||
//
|
||||
// builder.setButton(DialogInterface.BUTTON_NEUTRAL, "不再提醒", new DialogInterface.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// builder.dismiss();
|
||||
// StorageManager.getInstance(getActivity())
|
||||
// .putInt("isDynamicNoticeCanceled", 1);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// builder.setButton(DialogInterface.BUTTON_POSITIVE, "真人认证", new DialogInterface.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// builder.dismiss();
|
||||
// Intent intentApplyBigCast = new Intent(getActivity(), CertificationActivity.class);
|
||||
// getActivity().startActivity(intentApplyBigCast);
|
||||
// }
|
||||
// });
|
||||
// builder.setButton(DialogInterface.BUTTON_NEGATIVE, "知道了", new DialogInterface.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// builder.dismiss();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// if (result.getIs_cut() == 1
|
||||
// && 1 != StorageManager.getInstance(getActivity()).getInt("isDynamicNoticeCanceled") && !SPUtils.getBoolean(getActivity(), ConsUser.USER_VIP, false)) {
|
||||
// builder.show();
|
||||
//
|
||||
// Button buttonNue = builder.getButton(DialogInterface.BUTTON_NEUTRAL);
|
||||
// buttonNue.setTextColor(getActivity().getResources().getColor(R.color.black));
|
||||
//
|
||||
// Button buttonPos = builder.getButton(DialogInterface.BUTTON_POSITIVE);
|
||||
// buttonPos.setTextColor(getActivity().getResources().getColor(R.color.black));
|
||||
//
|
||||
// Button buttonNeg = builder.getButton(DialogInterface.BUTTON_NEGATIVE);
|
||||
// buttonNeg.setTextColor(getActivity().getResources().getColor(R.color.black));
|
||||
// }
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("is_cut", result.getIs_cut());
|
||||
@@ -1651,7 +1692,8 @@ public class MessageFragment extends TFragment implements ModuleProxy, SelectTyp
|
||||
});
|
||||
}
|
||||
|
||||
private boolean isInteractiveShow = true;
|
||||
// private boolean isInteractiveShow = true;
|
||||
private boolean isInteractiveShow = false;
|
||||
|
||||
/**
|
||||
* 获取文字招呼列表
|
||||
|
||||
@@ -872,9 +872,9 @@ public class MainActivity extends BaseActivity implements DemoHelper.AppIdsUpdat
|
||||
mBottomTab.setOnTabClickListener(new BottomTab.TabClickListener() {
|
||||
@Override
|
||||
public void onClick(int position, int currentPosition) {
|
||||
if ((UserManager.getUserInfo().getIs_anchor() != 1 || UserManager.getUserInfo().getIs_face_status() != 1) && UserManager.getUserInfo().isWomen()) {
|
||||
new GirlAuthDialog(MainActivity.this).show();
|
||||
}
|
||||
// if ((UserManager.getUserInfo().getIs_anchor() != 1 || UserManager.getUserInfo().getIs_face_status() != 1) && UserManager.getUserInfo().isWomen()) {
|
||||
// new GirlAuthDialog(MainActivity.this).show();
|
||||
// }
|
||||
if (position == currentPosition) { //第二次点击
|
||||
if (position == 0) {
|
||||
if (isOne) {
|
||||
|
||||
@@ -887,8 +887,6 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
||||
}
|
||||
}
|
||||
|
||||
Log.d("nail", "initView: ");
|
||||
|
||||
List<String> personal_info = mMainPageBean.getPersonal_info();
|
||||
if (null != personal_info && personal_info.size() > 0) {
|
||||
mRl_personal_info.setVisibility(View.VISIBLE);
|
||||
|
||||
@@ -97,39 +97,39 @@ public class MainMessageFragment extends Fragment implements View.OnClickListene
|
||||
if (!hidden) {
|
||||
initTitle();
|
||||
viewPagerChange(mIndex);
|
||||
if (UserManager.getUserInfo().getGender() == 2) {
|
||||
if (isSignIn) {
|
||||
isSignIn = false;
|
||||
signData();
|
||||
}
|
||||
} else {
|
||||
lin_msg_sign.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
// if (UserManager.getUserInfo().getGender() == 2) {
|
||||
// if (isSignIn) {
|
||||
// isSignIn = false;
|
||||
// signData();
|
||||
// }
|
||||
// } else {
|
||||
// lin_msg_sign.setVisibility(View.INVISIBLE);
|
||||
// }
|
||||
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
if (UserManager.getUserInfo().getGender() == 2 && !SPUtils.getBoolean(getContext(), ConsUser.USER_VIP, false)) {
|
||||
if (mVipCountDownTimer != null) {
|
||||
mVipCountDownTimer.cancel();
|
||||
}
|
||||
mVipCountDownTimer = new CountDownTimer(60_000 * 10, 1000) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
tv_msg_vip_time.setText(TimeUtils.millis2String(millisUntilFinished, "mm:ss"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
lin_msg_vip.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
};
|
||||
lin_msg_vip.setVisibility(View.VISIBLE);
|
||||
mVipCountDownTimer.start();
|
||||
} else {
|
||||
lin_msg_vip.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
// if (isFirst) {
|
||||
// isFirst = false;
|
||||
// if (UserManager.getUserInfo().getGender() == 2 && !SPUtils.getBoolean(getContext(), ConsUser.USER_VIP, false)) {
|
||||
// if (mVipCountDownTimer != null) {
|
||||
// mVipCountDownTimer.cancel();
|
||||
// }
|
||||
// mVipCountDownTimer = new CountDownTimer(60_000 * 10, 1000) {
|
||||
// @Override
|
||||
// public void onTick(long millisUntilFinished) {
|
||||
// tv_msg_vip_time.setText(TimeUtils.millis2String(millisUntilFinished, "mm:ss"));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFinish() {
|
||||
// lin_msg_vip.setVisibility(View.GONE);
|
||||
// }
|
||||
//
|
||||
// };
|
||||
// lin_msg_vip.setVisibility(View.VISIBLE);
|
||||
// mVipCountDownTimer.start();
|
||||
// } else {
|
||||
// lin_msg_vip.setVisibility(View.GONE);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -679,10 +679,12 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
||||
mLogo.setImageResource(R.drawable.ic_my_guide);
|
||||
mName.setText("用户指南");
|
||||
view.setOnClickListener(view14 -> {
|
||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
Intent intent = new Intent(getActivity(), UseCentreActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
// if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
// Intent intent = new Intent(getActivity(), UseCentreActivity.class);
|
||||
// startActivity(intent);
|
||||
// }
|
||||
Intent intent = new Intent(getActivity(), UseCentreActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
break;
|
||||
|
||||
@@ -694,11 +696,14 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
||||
}
|
||||
mName.setText("账单明细");
|
||||
view.setOnClickListener(view16 -> {
|
||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
Intent intent = new Intent(getActivity(), BillActivity.class);
|
||||
intent.putExtra("type", 0);
|
||||
startActivity(intent);
|
||||
}
|
||||
// if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
// Intent intent = new Intent(getActivity(), BillActivity.class);
|
||||
// intent.putExtra("type", 0);
|
||||
// startActivity(intent);
|
||||
// }
|
||||
Intent intent = new Intent(getActivity(), BillActivity.class);
|
||||
intent.putExtra("type", 0);
|
||||
startActivity(intent);
|
||||
});
|
||||
break;
|
||||
case GODDESSPRIVILEGE:
|
||||
@@ -707,11 +712,12 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
||||
tv_option_hint2.setVisibility(View.GONE);
|
||||
mArrow.setVisibility(View.VISIBLE);
|
||||
mLogo.setImageResource(R.mipmap.ic_my_ntequan);
|
||||
mName.setText("up主认证");
|
||||
mName.setText("女神特权");
|
||||
view.setOnClickListener(view19 -> {
|
||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
startActivity(new Intent(getActivity(), GoddessPrivilegeActivity.class));
|
||||
}
|
||||
// if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
// startActivity(new Intent(getActivity(), GoddessPrivilegeActivity.class));
|
||||
// }
|
||||
startActivity(new Intent(getActivity(), GoddessPrivilegeActivity.class));
|
||||
});
|
||||
break;
|
||||
case VIOLATION:
|
||||
@@ -722,11 +728,14 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
||||
mLogo.setImageResource(R.mipmap.ic_wd_weigui);
|
||||
mName.setText("违规公布");
|
||||
view.setOnClickListener(view110 -> {
|
||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
Intent intent = new Intent(getActivity(), BaseWebViewActivity.class);
|
||||
intent.putExtra("ClickUrl", ConstUrl.FORBID_LIST);
|
||||
startActivity(intent);
|
||||
}
|
||||
// if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
// Intent intent = new Intent(getActivity(), BaseWebViewActivity.class);
|
||||
// intent.putExtra("ClickUrl", ConstUrl.FORBID_LIST);
|
||||
// startActivity(intent);
|
||||
// }
|
||||
Intent intent = new Intent(getActivity(), BaseWebViewActivity.class);
|
||||
intent.putExtra("ClickUrl", ConstUrl.FORBID_LIST);
|
||||
startActivity(intent);
|
||||
});
|
||||
break;
|
||||
case ADDWECHAT:
|
||||
@@ -737,10 +746,12 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
||||
mLogo.setImageResource(R.mipmap.ic_wd_addwechat);
|
||||
mName.setText("微信设置");
|
||||
view.setOnClickListener(view111 -> {
|
||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
Intent intent = new Intent(getActivity(), WXAccountActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
// if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
// Intent intent = new Intent(getActivity(), WXAccountActivity.class);
|
||||
// startActivity(intent);
|
||||
// }
|
||||
Intent intent = new Intent(getActivity(), WXAccountActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
break;
|
||||
case HELLOW:
|
||||
@@ -751,9 +762,10 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
||||
mLogo.setImageResource(R.mipmap.ic_wd_hellow_set);
|
||||
mName.setText("招呼设置");
|
||||
view.setOnClickListener(view112 -> {
|
||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
startActivity(new Intent(getActivity(), GreetingSettingActivity.class));
|
||||
}
|
||||
// if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
// startActivity(new Intent(getActivity(), GreetingSettingActivity.class));
|
||||
// }
|
||||
startActivity(new Intent(getActivity(), GreetingSettingActivity.class));
|
||||
});
|
||||
break;
|
||||
case ITEMS:
|
||||
@@ -764,9 +776,10 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
||||
mLogo.setImageResource(R.mipmap.ic_wd_items1);
|
||||
mName.setText("红包卡券");
|
||||
view.setOnClickListener(view113 -> {
|
||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
startActivity(new Intent(getActivity(), MyItemsActivity.class));
|
||||
}
|
||||
// if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
// startActivity(new Intent(getActivity(), MyItemsActivity.class));
|
||||
// }
|
||||
startActivity(new Intent(getActivity(), MyItemsActivity.class));
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.xuebiping.bolizhuzi.databinding.DialogGirlauthBinding
|
||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity
|
||||
import com.xuebiping.bolizhuzi.view.base.BaseApplication
|
||||
import com.xuebiping.bolizhuzi.view.settings.CertificationActivity
|
||||
import com.xuebiping.bolizhuzi.view.settings.UpPrivilegeActivity
|
||||
|
||||
class GirlAuthDialog(context: Context) : Dialog(context, R.style.CommonDialog) {
|
||||
var owner = context as BaseActivity
|
||||
@@ -32,8 +33,10 @@ class GirlAuthDialog(context: Context) : Dialog(context, R.style.CommonDialog) {
|
||||
dismiss()
|
||||
BaseApplication.getInstance().topActivity.startActivity(
|
||||
Intent(
|
||||
// BaseApplication.getInstance().topActivity,
|
||||
// CertificationActivity::class.java
|
||||
BaseApplication.getInstance().topActivity,
|
||||
CertificationActivity::class.java
|
||||
UpPrivilegeActivity::class.java
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
9
app/src/main/res/drawable/nim_message_item_left.xml
Normal file
9
app/src/main/res/drawable/nim_message_item_left.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/white"/>
|
||||
|
||||
<corners android:topRightRadius="12dp" android:bottomLeftRadius="12dp" android:bottomRightRadius="12dp"/>
|
||||
|
||||
</shape>
|
||||
12
app/src/main/res/drawable/nim_message_item_right.xml
Normal file
12
app/src/main/res/drawable/nim_message_item_right.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- <solid android:color="#2aafed"/>-->
|
||||
<gradient android:angle="270"
|
||||
android:startColor="#249CF8"
|
||||
android:endColor="#30E5F6"/>
|
||||
|
||||
<corners android:topLeftRadius="12dp" android:bottomLeftRadius="12dp" android:bottomRightRadius="12dp"/>
|
||||
|
||||
</shape>
|
||||
@@ -12,6 +12,7 @@
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/lin_msg_vip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -41,6 +42,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/lin_msg_sign"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -21,12 +21,14 @@
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/iv_msg_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<com.xuebiping.bolizhuzi.utils.MaskImageView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/iv_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -43,9 +45,11 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:background="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="44dp">
|
||||
android:paddingTop="44dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
@@ -54,25 +58,39 @@
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:src="@drawable/ic_return_white"
|
||||
android:src="@mipmap/ic_black_back"
|
||||
fresco:layout_constraintBottom_toBottomOf="parent"
|
||||
fresco:layout_constraintStart_toStartOf="parent"
|
||||
fresco:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_user_name"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:textColor="@color/black"-->
|
||||
<!-- android:textSize="17dp"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- fresco:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- fresco:layout_constraintEnd_toStartOf="@+id/iv_user_info"-->
|
||||
<!-- fresco:layout_constraintStart_toEndOf="@+id/iv_back"-->
|
||||
<!-- fresco:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:text="123131" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="17dp"
|
||||
android:textStyle="bold"
|
||||
fresco:layout_constraintBottom_toBottomOf="parent"
|
||||
fresco:layout_constraintEnd_toStartOf="@+id/iv_user_info"
|
||||
fresco:layout_constraintStart_toEndOf="@+id/iv_back"
|
||||
fresco:layout_constraintStart_toStartOf="parent"
|
||||
fresco:layout_constraintEnd_toEndOf="parent"
|
||||
fresco:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="123131" />
|
||||
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/iv_interactive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -96,6 +114,36 @@
|
||||
fresco:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_title_coin_tip"
|
||||
android:background="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title_coin_tip"
|
||||
android:drawablePadding="4dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@mipmap/ic_message_risk_tip"
|
||||
android:text="私信2金币/条"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_text_warm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:alpha="0"
|
||||
android:background="#fee6e0"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/dp16"
|
||||
android:textColor="#f94f2e"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.flyco.roundview.RoundLinearLayout
|
||||
android:id="@+id/wxContainer"
|
||||
android:layout_width="match_parent"
|
||||
@@ -209,6 +257,7 @@
|
||||
android:layout_weight="1" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/rv_call_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
@@ -218,17 +267,7 @@
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@color/transparent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_text_warm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:alpha="0"
|
||||
android:background="#fee6e0"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/dp16"
|
||||
android:textColor="#f94f2e"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
@@ -267,6 +306,7 @@
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/rl_guard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
@@ -299,4 +339,5 @@
|
||||
|
||||
<include layout="@layout/nim_message_activity_bottom_layout" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
BIN
app/src/main/res/mipmap-xhdpi/ic_message_risk_tip.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/ic_message_risk_tip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 677 B |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB |
Reference in New Issue
Block a user