add 屏蔽push列表
update 修改搜索文案
This commit is contained in:
parent
1c74689e90
commit
c7ba98acb4
@ -241,6 +241,10 @@ public class AppContext extends CommonAppContext {
|
||||
RongConfigCenter.conversationConfig().addMessageProvider(new MessageChatTipsItemProvider(getApplicationContext()));
|
||||
RongConfigCenter.conversationConfig().addMessageProvider(new MessageChatCardItemProvider(getApplicationContext()));
|
||||
|
||||
//注册屏蔽push弹窗的类
|
||||
MessageChatNotifyManager.getInstance().addShieldClass(CompleteUserInfoActivity.class);
|
||||
MessageChatNotifyManager.getInstance().addShieldClass(PDLiveConversationActivity.class);
|
||||
|
||||
RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() {
|
||||
@Override
|
||||
public boolean onReceived(io.rong.imlib.model.Message message, int i, boolean b, boolean b1) {
|
||||
@ -277,7 +281,6 @@ public class AppContext extends CommonAppContext {
|
||||
if (AppManager.getInstance().getLastActivity() instanceof CompleteUserInfoActivity) {
|
||||
return false;
|
||||
}
|
||||
MessageChatNotifyManager.getInstance().setShieldClass(CompleteUserInfoActivity.class);
|
||||
MessageChatNotifyManager.getInstance().push(AppManager.getInstance().getLastActivity()
|
||||
, message.getTargetId(),
|
||||
content.getContent()
|
||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||
public class MessageChatNotifyManager {
|
||||
private static MessageChatNotifyManager instance;
|
||||
private List<MessageUserInfoBean> startListNotifyList = new ArrayList<>();
|
||||
Class<?> clazz;
|
||||
List<String> clazzList = new ArrayList<>();
|
||||
|
||||
public static MessageChatNotifyManager getInstance() {
|
||||
if (instance == null) {
|
||||
@ -22,8 +22,10 @@ public class MessageChatNotifyManager {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void setShieldClass(Class<?> clazz) {
|
||||
this.clazz = clazz;
|
||||
public void addShieldClass(Class<?> clazz) {
|
||||
if (!clazzList.contains(clazz.getSimpleName())) {
|
||||
clazzList.add(clazz.getSimpleName());
|
||||
}
|
||||
}
|
||||
|
||||
public void push(Context mContext, MessageUserInfoBean userInfo) {
|
||||
@ -36,7 +38,8 @@ public class MessageChatNotifyManager {
|
||||
}
|
||||
|
||||
private void notifyLiveFlot(Context mContext) {
|
||||
if (AppManager.getInstance().getLastActivity().getClass().getSimpleName().equals(clazz.getSimpleName())) {
|
||||
String simpleName = AppManager.getInstance().getLastActivity().getClass().getSimpleName();
|
||||
if (clazzList.contains(simpleName)) {
|
||||
ToastUtil.showDebug("屏蔽类,不展示");
|
||||
return;
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
|
||||
ViewUtils.findViewById(card, R.id.userStatusIcon, ImageView.class).setImageResource(R.mipmap.icon_green);
|
||||
} else {
|
||||
ViewUtils.findViewById(card, R.id.user_status, TextView.class).setText(R.string.activity_msg_chat_top_status_offline);
|
||||
ViewUtils.findViewById(card, R.id.userStatusIcon, ImageView.class).setImageResource(R.mipmap.icon_green);
|
||||
ViewUtils.findViewById(card, R.id.userStatusIcon, ImageView.class).setImageResource(R.mipmap.icon_gray);
|
||||
}
|
||||
showBanner();
|
||||
showTag();
|
||||
|
@ -19,7 +19,6 @@ public class MessageChatTopImageListAdapter extends RecyclerView.Adapter<com.yun
|
||||
List<String> urls = new ArrayList<>();
|
||||
|
||||
public void setUrls(List<String> urls) {
|
||||
ToastUtil.show("照片数量:"+urls.size());
|
||||
this.urls = urls;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
@ -1,24 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_activity_message"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="35dp">
|
||||
<!-- android:background="@mipmap/bg_activity_message" -->
|
||||
<!-- android:background="@mipmap/bg_activity_message" -->
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_noback"
|
||||
android:layout_width="wrap_content"
|
||||
@ -29,14 +31,14 @@
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
|
||||
android:src="@mipmap/icon_index"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="6.3dp"/>
|
||||
android:layout_height="6.3dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/icon_index" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -51,21 +53,22 @@
|
||||
android:drawableStart="@mipmap/ic_home_game_search"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:hint="@string/activity_msg_search_hint"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:padding="10dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/news_icon_contacts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="0.1"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_weight="0.1"
|
||||
android:src="@mipmap/ic_msg_contacts"
|
||||
android:visibility="visible" />
|
||||
|
||||
@ -78,9 +81,9 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_weight="0.1"
|
||||
tools:visibility="visible"
|
||||
android:src="@mipmap/btn_more_black"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@ -100,43 +103,43 @@
|
||||
android:id="@+id/img_news_notice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_alignBottom="@+id/tv_news_notice"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignBottom="@+id/tv_news_notice"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:src="@mipmap/ic_msg_notice" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_news_notice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#333333"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@string/activity_msg_news_notice"
|
||||
android:textColor="#333333"
|
||||
android:textSize="13sp"
|
||||
app:autoSizeMaxTextSize="13sp"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:text="@string/activity_msg_news_notice" />
|
||||
app:autoSizeTextType="uniform" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_news_notice"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
android:background="@drawable/background_system_message"
|
||||
android:gravity="center"
|
||||
android:text="7"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@ -150,27 +153,29 @@
|
||||
android:id="@+id/img_system_messages"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_alignBottom="@+id/tv_system_messages"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignBottom="@+id/tv_system_messages"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:src="@mipmap/ic_msg_interaction" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_system_messages"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#333333"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@string/activity_msg_system_message"
|
||||
android:textColor="#333333"
|
||||
android:textSize="13sp"
|
||||
app:autoSizeMaxTextSize="13sp"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:text="@string/activity_msg_system_message" />
|
||||
app:autoSizeTextType="uniform" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_system_messages"
|
||||
android:layout_width="20dp"
|
||||
@ -195,27 +200,29 @@
|
||||
android:id="@+id/img_news_interaction"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_alignBottom="@+id/tv_news_interaction"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignBottom="@+id/tv_news_interaction"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:src="@mipmap/ic_msg_message" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_news_interaction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#333333"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@string/activity_msg_newts_interaction"
|
||||
android:textColor="#333333"
|
||||
android:textSize="13sp"
|
||||
app:autoSizeMaxTextSize="13sp"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:text="@string/activity_msg_newts_interaction" />
|
||||
app:autoSizeTextType="uniform" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_news_interaction"
|
||||
android:layout_width="20dp"
|
||||
@ -240,28 +247,28 @@
|
||||
android:id="@+id/img_news_online"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_alignBottom="@+id/tv_news_online"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignBottom="@+id/tv_news_online"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:src="@mipmap/ic_msg_service" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_news_online"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#333333"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@string/activity_msg_news_online"
|
||||
android:textColor="#333333"
|
||||
android:textSize="13sp"
|
||||
app:autoSizeMaxTextSize="13sp"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:text="@string/activity_msg_news_online" />
|
||||
app:autoSizeTextType="uniform" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_news_online"
|
||||
@ -278,20 +285,21 @@
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="#FFE9F6"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"/>
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="#FFE9F6" />
|
||||
<!-- 此容器用于动态放置 fragment-->
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="50dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lt_nodata_msg"
|
||||
|
@ -26,7 +26,7 @@
|
||||
<string name="activity_msg_system_message">系統通知</string>
|
||||
<string name="activity_msg_newts_interaction">互動消息</string>
|
||||
<string name="activity_msg_news_online">在線客服</string>
|
||||
<string name="activity_msg_search_hint">搜索昵稱或聊天記錄</string>
|
||||
<string name="activity_msg_search_hint">搜索</string>
|
||||
<string name="activity_msg_list_include">包含:</string>
|
||||
<string name="activity_msg_list_title_contacts">聯繫人</string>
|
||||
<string name="activity_msg_list_title_chat_records">聊天記錄</string>
|
||||
|
Loading…
Reference in New Issue
Block a user