Commit c02935f5 by 霍志良

Merge remote-tracking branch 'origin/4.2.30' into 4.2.30

parents 1bc25a30 896520dc
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03",
"m-user" : "0.0.61.30",
"m-home" : "0.0.22.60",
"m-im" : "0.0.18.52",
"m-im" : "0.0.18.53",
"m-dynamic" : "0.0.7.21",
"m-article" : "0.0.0.8",
......@@ -37,7 +37,7 @@ ext {
//第二步 若干
"ydl-webview" : "0.0.38.44",
"ydl-media" : "0.0.21.8",
"ydl-media" : "0.0.21.9",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.37",
"ydl-flutter-base": "0.0.14.25",
......@@ -93,7 +93,7 @@ ext {
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.18",
"m-home" : "0.0.22.54",
"m-im" : "0.0.18.52",
"m-im" : "0.0.18.53",
"m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6",
......@@ -119,7 +119,7 @@ ext {
//第二步 若干
"ydl-webview" : "0.0.38.44",
"ydl-media" : "0.0.21.8",
"ydl-media" : "0.0.21.9",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.37",
"ydl-flutter-base": "0.0.14.25",
......@@ -220,7 +220,7 @@ ext {
"systembartint" : "com.readystatesoftware.systembartint:systembartint:1.0.3",
"cube" : "in.srain.cube:cube-sdk:1.0.44@aar",
"support-multidex" : 'androidx.multidex:multidex:2.0.0',
"ydl-ijkplayer-jjdxm" : "com.ydl:jjdxm-ijkplayer:0.0.4",
"ydl-ijkplayer-jjdxm" : "com.ydl:jjdxm-ijkplayer:0.0.5",
"robust" : "com.meituan.robust:robust:0.4.87",
"walle" : "com.meituan.android.walle:library:1.1.5",
"jpush" : "cn.jiguang.sdk:jpush:3.3.6",
......
......@@ -109,6 +109,7 @@ public abstract class YDLBaseMessageActivity extends UI {
//==================== ChatUI Override ====================
@Override
@SuppressLint("CheckResult")
public void setToolBar(int toolBarId) {
tb = findViewById(toolBarId);
......
......@@ -10,9 +10,6 @@ import android.media.AudioManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
......@@ -25,6 +22,10 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.fastjson.JSON;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.Observer;
......@@ -62,6 +63,7 @@ import com.yidianling.nimbase.api.UIKitOptions;
import com.yidianling.nimbase.api.model.main.CustomPushContentProvider;
import com.yidianling.nimbase.api.model.session.ModuleProxy;
import com.yidianling.nimbase.api.model.session.SessionCustomization;
import com.yidianling.nimbase.business.preference.UserPreferences;
import com.yidianling.nimbase.business.session.actions.BaseAction;
import com.yidianling.nimbase.business.session.constant.Extras;
import com.yidianling.nimbase.business.session.module.Container;
......@@ -226,6 +228,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
parseIntent();
TitleBarBottom titleBar = ((YDLBaseMessageActivity) getActivity()).getTitleBarBottom();
titleBar.setTitleLeftDraw(getResources().getDrawable(R.drawable.loading_01));
titleBar.setTitle("正在连接中...");
fl_container = rootView.findViewById(R.id.message_activity_list_view_container);
v_chattips = rootView.findViewById(R.id.v_chattips);
lin_actions = rootView.findViewById(R.id.lin_actions);
......@@ -346,7 +351,13 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
AnimUtils.Companion.slideToDown(rl_contain);
}
}
TitleBarBottom titleBar = ((YDLBaseMessageActivity) getActivity()).getTitleBarBottom();
if (!UserPreferences.isEarPhoneModeEnable()) {
titleBar.setTitleLeftDraw(null);
} else {
titleBar.setTitleRightDraw(getResources().getDrawable(R.drawable.im_erduoxiaolv));
}
titleBar.setTitle(ActionHandlerStorage.getL(sessionId).getInfo().name);
// 初始化顶部专家信息栏
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 2) {
top_expert_info_cl.setVisibility(View.VISIBLE);
......@@ -358,7 +369,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
initAnimation(); // 初始化顶部布局的动画
initTopViewHeight(); //设置顶部专家信息栏高度
addScrollListener();
TitleBarBottom titleBar = ((YDLBaseMessageActivity) getActivity()).getTitleBarBottom();
IMChatUtil.INSTANCE.initChatOnlineState(titleBar, getContext(), sessionId, this);
}
......
......@@ -28,7 +28,7 @@ public class TitleBarBottom extends RelativeLayout {
//非激活时候的图标
Drawable mLeftStartIcon, mLeftEndIcon, mRightStartIcon, mRightEndIcon;
//判断三者是否激活
boolean mIsLeftIconActive = false, mIsTitleIconActive = false, mIsRightIconActive = false,mShowBottomTitle = true;
boolean mIsLeftIconActive = false, mIsTitleIconActive = false, mIsRightIconActive = false, mShowBottomTitle = true;
//颜色默认系统黑色
int mTextColor, mTitleBg, mSideTextColor;
//文字内容
......@@ -233,7 +233,7 @@ public class TitleBarBottom extends RelativeLayout {
mTextColor = a.getColor(R.styleable.TitleBarBottom_title_bar_text_color, 0xff000000);
mSideTextColor = a.getColor(R.styleable.TitleBarBottom_side_text_color, 0xff000000);
mTitleBg = a.getColor(R.styleable.TitleBarBottom_title_bar_bg, getResources().getColor(R.color.im_theme_title_bar_color));
mShowBottomTitle = a.getBoolean(R.styleable.TitleBarBottom_show_bottom_title,true);
mShowBottomTitle = a.getBoolean(R.styleable.TitleBarBottom_show_bottom_title, true);
a.recycle();
setGravity(Gravity.CENTER_VERTICAL);
findView();
......@@ -258,7 +258,7 @@ public class TitleBarBottom extends RelativeLayout {
tv_right_text.setTextColor(mSideTextColor);
tv_right_text.setCompoundDrawablesWithIntrinsicBounds(mRightStartIcon, null, mRightEndIcon, null);
//下标题
tv_bottom_title.setVisibility(mShowBottomTitle?VISIBLE:GONE);
tv_bottom_title.setVisibility(mShowBottomTitle ? VISIBLE : GONE);
//背景色
......@@ -330,10 +330,22 @@ public class TitleBarBottom extends RelativeLayout {
image.setImageDrawable(image_);
}
/**
* 设置标题右边图标
* 注:设置右边会导致左边图标被去掉
*/
public void setTitleRightDraw(Drawable right) {
tv_center_title.setCompoundDrawablesWithIntrinsicBounds(null, null, right, null);
}
/**
* 设置标题左边图标
* 注:设置左边会导致右边图标被去掉
*/
public void setTitleLeftDraw(Drawable leftDraw) {
tv_center_title.setCompoundDrawablesWithIntrinsicBounds(leftDraw, null, null, null);
}
public void setImageVis(int vis) {
switch (vis) {
case 0:
......
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