Commit 4c9868f1 by konghaorui

完善私聊模块

parent 777cc9ba
......@@ -44,10 +44,14 @@
<activity
android:name=".ui.activity.SystemMsgDetailActivity"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
/>
<activity
android:name=".ui.activity.OtherMsgDetailActivity"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
/>
<!-- 云信 集成配置 -->
<!-- 声明云信后台服务 -->
......
......@@ -92,6 +92,8 @@ public class NimApplication {
//options.buildNimUserCache = true;
options.shouldHandleReceipt = true;
options.toolBarOptions = new YDLToolBarOptions();
options.messageLeftBackground = R.drawable.im_nim_message_item_left_selector;
options.messageRightBackground = R.drawable.im_nim_message_item_right_selector;
return options;
}
......
......@@ -17,6 +17,7 @@ import com.yidianling.im.R;
import com.yidianling.im.config.constants.UserPreferences;
import com.yidianling.im.config.provider.CustomUserInfoProvider;
import com.yidianling.im.preference.IMCache;
import com.yidianling.uikit.api.NimUIKitImpl;
import com.yidianling.uikit.api.wrapper.MessageRevokeTip;
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderThumbBase;
......@@ -101,7 +102,6 @@ class NimSDKOptionConfig {
options.shouldConsiderRevokedMessageUnreadCount = true;
options.mixPushConfig = buildMixPushConfig();
return options;
}
......
......@@ -79,11 +79,12 @@ object ImIn {
}
fun membersIntent(activity: Activity, userId: String): Intent? {
// TODO: 2019-12-12 待替换 by:HaoRui
return RouterManager.getDynamicRouter()?.membersIntent(activity, userId)
}
fun replayInfoIntent(activity: Activity, replyId: String, aid: String): Intent? {
// TODO: 2019-12-12 待替换 by:HaoRui
return RouterManager.getDynamicRouter()?.replyInfoIntent(activity, replyId, aid)
}
......@@ -93,14 +94,17 @@ object ImIn {
}
fun trendsDetailIntent(activity: Activity, trendId: Int): Intent? {
// TODO: 2019-12-12 待替换 by:HaoRui
return RouterManager.getDynamicRouter()?.trendsDetailIntent(activity, trendId)
}
fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean): Intent? {
// TODO: 2019-12-12 待替换 by:HaoRui
return RouterManager.getDynamicRouter()?.trendsDetailIntent(activity, trendId, isScrollToZan)
}
fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean, lastId: Int): Intent? {
// TODO: 2019-12-12 待替换 by:HaoRui
return RouterManager.getDynamicRouter()?.trendsDetailIntent(activity, trendId, isScrollToZan, lastId)
}
......
......@@ -260,7 +260,7 @@ public class SessionHelper {
}
}
};
infoButton.iconId = R.drawable.im_more12x;
infoButton.iconId = R.drawable.platform_common_more;
buttons.add(infoButton);
p2pCustomization.buttons = buttons;
......
......@@ -6,6 +6,7 @@ import android.widget.ListView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.bean.StatusBarOptions;
import com.ydl.ydlcommon.data.http.RxUtils;
import com.ydl.ydlcommon.data.http.ThrowableConsumer;
import com.ydl.ydlcommon.utils.remind.ToastHelper;
......@@ -70,6 +71,11 @@ public class OtherMsgDetailActivity extends BaseActivity implements PtrHandler {
init();
}
@NotNull
@Override
public StatusBarOptions getStatusViewOptions() {
return new StatusBarOptions(true,true);
}
void init() {
if (title != null && !title.equals("")) {
......
......@@ -4,6 +4,7 @@ import android.view.View;
import android.widget.ListView;
import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.bean.StatusBarOptions;
import com.ydl.ydlcommon.data.http.RxUtils;
import com.ydl.ydlcommon.data.http.ThrowableConsumer;
import com.ydl.ydlcommon.utils.remind.ToastHelper;
......@@ -59,10 +60,14 @@ public class SystemMsgDetailActivity extends BaseActivity implements PtrHandler
titlebar = findViewById(R.id.title_bar);
type = getIntent().getIntExtra("type", 0);
title = getIntent().getStringExtra("title");
init();
}
@NotNull
@Override
public StatusBarOptions getStatusViewOptions() {
return new StatusBarOptions(true,true);
}
void init() {
titlebar.setTitle(title);
......
......@@ -305,13 +305,13 @@ class ChatFragment : BaseFragment(), XRecyclerView.LoadingListener {
chat_serviced_message.setTextColor(Color.parseColor("#666666"))
if (modelType == ChatModelType.ALL) {
chat_all_message.setTextColor(Color.parseColor("#1DA1F2"))
chat_all_message.setTextColor(resources.getColor(R.color.im_but_text_color))
chat_all_message.setBackgroundResource(R.drawable.im_chat_model_selected_bg)
} else if (modelType == ChatModelType.SERVICING) {
chat_servicing_message.setTextColor(Color.parseColor("#1DA1F2"))
chat_servicing_message.setTextColor(resources.getColor(R.color.im_but_text_color))
chat_servicing_message.setBackgroundResource(R.drawable.im_chat_model_selected_bg)
} else if (modelType == ChatModelType.SERVICED) {
chat_serviced_message.setTextColor(Color.parseColor("#1DA1F2"))
chat_serviced_message.setTextColor(resources.getColor(R.color.im_but_text_color))
chat_serviced_message.setBackgroundResource(R.drawable.im_chat_model_selected_bg)
}
}
......
......@@ -58,8 +58,7 @@ public class TitleBarBottom extends RelativeLayout {
tv_right_text = (TextView) root.findViewById(R.id.tv_right_text);
iv_title_divide = (ImageView) root.findViewById(R.id.iv_title_divide);
image = (ImageView) root.findViewById(R.id.image);
rightImage = (ImageView) root.findViewById(R.id.rightImage);
rightImage = (ImageView) root.findViewById(R.id.iv_right);
setupView();
}
......
......@@ -2,12 +2,12 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#E8F6FF"/>
<solid android:color="@color/im_main_theme_bright"/>
<corners android:radius="11dp"/>
<stroke
android:width="0.5dp"
android:color="#1DA1F2"/>
android:color="@color/im_main_theme"/>
</shape>
\ No newline at end of file
......@@ -3,8 +3,8 @@
android:shape="rectangle">
<gradient
android:endColor="#1DA1F2"
android:startColor="#23B2FA"/>
android:endColor="@color/im_main_theme"
android:startColor="@color/im_main_theme_light"/>
<corners android:radius="14dp" />
......
......@@ -3,7 +3,6 @@
android:shape="rectangle">
<gradient
android:startColor="#1DA1F2"
android:endColor="#5CC8F7"/>
android:startColor="@color/im_main_theme"
android:endColor="@color/im_main_theme_light"/>
</shape>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<solid android:color="@color/platform_color_D8D8D8" />
<gradient
android:endColor="#1DA1F2"
android:startColor="#23B2FA" />
android:endColor="@color/im_main_theme"
android:startColor="@color/im_main_theme_light" />
<corners android:bottomRightRadius="8dp" />
</shape>
......@@ -3,8 +3,8 @@
android:shape="rectangle">
<gradient
android:endColor="#1DA1F2"
android:startColor="#23B2FA"/>
android:endColor="@color/im_main_theme"
android:startColor="@color/im_main_theme_light"/>
<corners android:bottomRightRadius="8dp" />
......
......@@ -10,9 +10,10 @@
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/title_bar"
app:pa_title_text="消息"
app:pa_left_start_icon="@drawable/platform_toolbar_back"
app:pa_left_start_icon="@drawable/platform_common_back"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:background="@color/platform_white"
app:pa_right_text="全部已读" />
<in.srain.cube.views.ptr.PtrFrameLayout
......
......@@ -10,8 +10,9 @@
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:pa_left_start_icon="@drawable/platform_toolbar_back"
app:pa_title_text="@string/im_app_name" />
app:pa_left_start_icon="@drawable/platform_common_back"
android:background="@color/platform_white"
/>
<in.srain.cube.views.ptr.PtrFrameLayout
android:id="@+id/store_house_ptr_frame"
......
......@@ -29,8 +29,9 @@
android:paddingRight="22dp"
android:text="去咨询"
android:textSize="12dp"
android:textColor="#ffffff"
android:textColor="@color/im_but_text_color"
android:layout_marginTop="20dp"
android:background="@drawable/im_chat_unusual_view_btn_bg"/>
android:background="@drawable/im_chat_unusual_view_btn_bg"
/>
</LinearLayout>
......@@ -57,7 +57,7 @@
android:gravity="center"
android:text="全部已读"
android:textSize="16dp"
android:textColor="#ffffff"
android:textColor="@color/im_sel_but_text_color"
android:background="@drawable/im_message_chat_setting_sure_btn_bg"/>
</LinearLayout>
......
......@@ -4,24 +4,30 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@null"
android:gravity="center_vertical" />
<TextView
android:id="@+id/tv_left_text"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:drawablePadding="@dimen/im_default_dis_size_small"
android:layout_toEndOf="@id/image"
android:layout_toRightOf="@id/image"
android:background="?android:attr/selectableItemBackground"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:paddingLeft="@dimen/im_default_dis_size"
android:paddingRight="@dimen/im_default_dis_size"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:textColor="@android:color/white"
android:textSize="@dimen/im_default_text_size_big" />
android:textSize="@dimen/platform_default_text_size_big"
tools:text="关闭"
tools:textColor="@color/platform_black" />
<LinearLayout
android:layout_width="wrap_content"
......@@ -65,22 +71,34 @@
</LinearLayout>
<ImageView
android:id="@+id/rightImage"
android:id="@+id/iv_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toLeftOf="@+id/tv_right_text" />
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginEnd="8dp"
android:layout_marginRight="10dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@null"
android:gravity="center_vertical"
tools:src="@drawable/platform_more_green"/>
<TextView
android:id="@+id/tv_right_text"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:drawablePadding="@dimen/im_default_dis_size_small"
android:layout_toLeftOf="@id/iv_right"
android:layout_toStartOf="@id/iv_right"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:paddingLeft="@dimen/im_default_dis_size"
android:paddingRight="@dimen/im_default_dis_size"
android:textColor="@color/im_default_button_bg"
android:textSize="@dimen/im_default_text_size_big" />
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:textColor="@color/platform_default_button_bg"
android:textSize="@dimen/platform_default_text_size_big"
android:drawablePadding="5dp"
tools:drawableLeft="@drawable/platform_share"
tools:ignore="RelativeOverlap" />
<ImageView
android:id="@+id/iv_title_divide"
......
......@@ -10,6 +10,6 @@
android:id="@+id/chat_tb"
android:layout_width="match_parent"
android:layout_height="44dp"
app:left_start_icon="@drawable/im_titlebar_back" />
app:left_start_icon="@drawable/platform_common_back" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--主题色-->
<color name="im_main_theme">#fdbd00</color>
<!--主题浅色-->
<color name="im_main_theme_light">#FFEC8C</color>
<!--主题亮色-->
<color name="im_main_theme_bright">#fffae0</color>
<!--确认按钮背景颜色-->
<color name="im_confirm_bg_color">#FFDD33</color>
<!--按钮文字颜色-->
<color name="im_but_text_color">#242424</color>
<!--选择按钮文字颜色-->
<color name="im_sel_but_text_color">#242424</color>
<!--确认按钮提示字体颜色-->
<color name="im_confirm_text_hint_color">#666666</color>
<!--筛选条件选择框字体颜色-->
<color name="im_filter_content_text_color_en">#242424</color>
<color name="im_filter_content_text_color_un">#555555</color>
<!--私聊按钮背景颜色-->
<color name="im_chat_start_color">#ffd814</color>
<color name="im_chat_end_color">#ffdb26</color>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--主题色-->
<color name="im_main_theme">#1da1f2</color>
<!--主题浅色-->
<color name="im_main_theme_light">#60BDF5</color>
<!--主题亮色-->
<color name="im_main_theme_bright">#E8F6FF</color>
<!--确认按钮背景颜色-->
<color name="im_confirm_bg_color">#1da1f2</color>
<!--按钮文字颜色-->
<color name="im_but_text_color">#ffffff</color>
<!--选择按钮文字颜色-->
<color name="im_sel_but_text_color">#1da1f2</color>
<!--确认提示颜色-->
<color name="im_confirm_text_hint_color">#60ffffff</color>
<!--筛选条件选择框字体颜色-->
<color name="im_filter_content_text_color_en">#1da1f2</color>
<color name="im_filter_content_text_color_un">#242424</color>
<!--私聊按钮背景颜色-->
<color name="im_chat_start_color">#23B2FA</color>
<color name="im_chat_end_color">#1DA1F2</color>
</resources>
......@@ -9,9 +9,11 @@
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@null"
android:gravity="center_vertical" />
android:gravity="center_vertical"
/>
<TextView
android:id="@+id/tv_left_text"
......@@ -51,30 +53,30 @@
android:id="@+id/iv_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginEnd="8dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="@null"
android:gravity="center_vertical"
tools:src="@drawable/platform_more_green"/>
tools:src="@drawable/platform_common_notice_more_un" />
<TextView
android:id="@+id/tv_right_text"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toLeftOf="@id/iv_right"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_toStartOf="@id/iv_right"
android:layout_toLeftOf="@id/iv_right"
android:background="?android:attr/selectableItemBackground"
android:drawablePadding="5dp"
android:gravity="center_vertical"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:textColor="@color/platform_default_button_bg"
android:textSize="@dimen/platform_default_text_size_big"
android:drawablePadding="5dp"
tools:drawableLeft="@drawable/platform_share"
tools:drawableLeft="@drawable/platform_common_share"
tools:ignore="RelativeOverlap" />
<View
......
......@@ -477,7 +477,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private void initView() {
tb_title = (TitleBar) findViewById(R.id.tb_title);
tb_title.setPaddingLeft(20);
tb_title.setPaddingLeft(10);
wv_content = (ProgressWebView) findViewById(R.id.wv_content);
backgroundView = findViewById(R.id.iv_background);
store_house_ptr_frame = (PtrFrameLayout) findViewById(R.id.store_house_ptr_frame);
......@@ -532,7 +532,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
if (!TextUtils.isEmpty(h5Params.getTitle()) && !h5Params.getShowUrlTitle()) {
tb_title.setTitle(h5Params.getTitle());
}
tb_title.setImage(getResources().getDrawable(YDLConstants.FROM_YDL.equals(appFrom)?R.drawable.platform_toolbar_back :R.drawable.platform_toolbar_back_yellow));
tb_title.setImage(getResources().getDrawable(R.drawable.platform_common_back));
WebSettings setting = wv_content.getSettings();
setting.setJavaScriptEnabled(true);//支持js
......@@ -897,7 +897,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
private void initShareMenu() {
tb_title.setRightIcon(getResources().getDrawable(YDLConstants.FROM_YDL.equals(appFrom)?R.drawable.platform_share :R.drawable.platform_share_yellow));
tb_title.setRightIcon(getResources().getDrawable(R.drawable.platform_common_share));
tb_title.setOnRightTextClick((view, isActive) -> {
share(null, null);
});
......@@ -1040,7 +1040,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
tb_title.setImageVis(1);
}
} else {
tb_title.setImage(getResources().getDrawable(YDLConstants.FROM_YDL.equals(appFrom)?R.drawable.platform_toolbar_back :R.drawable.platform_toolbar_back_yellow));
tb_title.setImage(getResources().getDrawable(R.drawable.platform_common_back));
tb_title.setmLeftText("");
if ("top".equals(type)) {
setTitle(wv_content.getTitle());
......@@ -1195,9 +1195,9 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
if (h5Params.isShowMenu()) {
if (YdlCommonRouterManager.INSTANCE.getYdlCommonRoute().isHasUnread()) {
tb_title.setImage_right(getResources().getDrawable(YDLConstants.FROM_YDL.equals(appFrom)?R.drawable.platform_more12r :R.drawable.platform_more12r_yellow));
tb_title.setImage_right(getResources().getDrawable(R.drawable.platform_common_notice_more_en));
} else {
tb_title.setImage_right(getResources().getDrawable(YDLConstants.FROM_YDL.equals(appFrom)?R.drawable.platform_more12x :R.drawable.platform_more12x_yellow));
tb_title.setImage_right(getResources().getDrawable(R.drawable.platform_common_notice_more_un));
}
}
if (backgroundView.getVisibility() == View.VISIBLE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment