Commit 3746722c by 徐健

Merge branch 'dev' into feature/userinfo_collect

# Conflicts:
#	config.gradle
parents f1cb71bc ad1e5e44
......@@ -181,13 +181,13 @@ dependencies {
implementation project(':m-user')
implementation modularPublication('com.ydl:m-user-api')
api project(':m-tests')
api project(':m-consultant')
// api project(':m-consultant')
implementation modularPublication('com.ydl:m-consultant-api')
// implementation project(':m-confide')
api project(':m-home')
api project(':m-confide')
// api project(':m-confide')
// api "com.ydl:m-consultant-api:0.0.2"
// api 'com.ydl:m-consultant-module-ydl:0.0.18@aar'
......
......@@ -18,7 +18,7 @@ import com.umeng.analytics.MobclickAgent
import com.ydl.component.music.FragmentContainerActivity
import com.ydl.component.mvp.DemoContract
import com.ydl.component.mvp.DemoPresenter
import com.ydl.confide.home.ConfideHomeActivity
//import com.ydl.confide.home.ConfideHomeActivity
import com.ydl.media.audio.PlayService
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
......@@ -27,7 +27,7 @@ import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.common.tools.ToastUtil
//import com.yidianling.consultant.ExpertSearchActivity.Companion.HOT_SEARCH_DOCTOR_NAME
import com.yidianling.consultant.api.IConsultantService
//import com.yidianling.consultant.api.IConsultantService
import com.yidianling.fm.api.service.IFMService
import com.yidianling.tests.home.NewTestHomeActivity
import com.yidianling.user.ui.collect.CollectSexAndBirthActivity
......@@ -114,7 +114,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
bt_to_confide.setOnClickListener {
// YDLavManager.instances.login("1193016")
startActivity(Intent(this, ConfideHomeActivity::class.java))
// startActivity(Intent(this, ConfideHomeActivity::class.java))
}
bt_to_muse.setOnClickListener {
......@@ -235,14 +235,15 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
super.onResume()
MobclickAgent.onResume(this)
ModularServiceManager.provide(IConsultantService::class.java)
.showConsultAssistantDialog(this)
// ModularServiceManager.provide(IConsultantService::class.java)
// .
// (this)
}
override fun onPause() {
super.onPause()
ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog()
// ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog()
}
......
......@@ -7,7 +7,7 @@ import com.ydl.component.mvp.DemoContract
import com.ydl.component.mvp.DemoPresenter
import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import com.yidianling.consultant.ExpertSearchFragment
//import com.yidianling.consultant.ExpertSearchFragment
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
import com.yidianling.home.ui.fragment.YdlHomeFragment
//import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
......@@ -70,9 +70,9 @@ class FragmentContainerActivity : BaseLceActivity<DemoContract.View, DemoContra
if ("YdlHomeFragment" == fragmentName) {
return YdlHomeFragment()
}
if ("ExpertSearchFragment" == fragmentName) {
return ExpertSearchFragment()
}
// if ("ExpertSearchFragment" == fragmentName) {
// return ExpertSearchFragment()
// }
return PlayFragment()
}
}
......@@ -42,17 +42,17 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.48.3",
"m-confide" : "0.0.48.6",
"m-consultant" : "0.0.57.4",
"m-fm" : "0.0.28",
"m-fm" : "0.0.29.3",
"m-user" : "0.0.59.6",
"m-home" : "0.0.19.1",
"m-im" : "0.0.14.1",
"m-im" : "0.0.15.6",
"m-dynamic" : "0.0.6.1",
"m-muse" : "0.0.27",
"m-tests" : "0.0.21",
"m-course" : "0.0.40.1",
"m-muse" : "0.0.28.9",
"m-tests" : "0.0.24.0",
"m-course" : "0.0.42.0",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.5",
......@@ -75,8 +75,8 @@ ext {
"ydl-webview" : "0.0.38.5",
"ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17",
"m-audioim" : "0.0.47.7",
"ydl-flutter-base": "0.0.10",
"m-audioim" : "0.0.48.1",
"ydl-flutter-base": "0.0.10.9",
//以下 几乎不会动
"router" : "0.0.1",
......@@ -121,8 +121,8 @@ ext {
"ydl-webview" : "0.0.38.5",
"ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17",
"m-audioim" : "0.0.47.7",
"ydl-flutter-base": "0.0.10",
"m-audioim" : "0.0.48.1",
"ydl-flutter-base": "0.0.10.9",
//以下 几乎不会动
"router" : "0.0.1",
......@@ -270,7 +270,7 @@ ext {
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base" : "com.ydl:ydl-flutter-base:${ydlCompileVersion["ydl-flutter-base"]}", //组件化项目中的flutter base模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.16.9@aar", //flutter aar
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.18.0@aar", //flutter aar
"ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
......
......@@ -320,7 +320,7 @@ public class BrowsePicturesActivity extends BaseActivity implements ViewPager.On
Uri uri = FileUtils.INSTANCE.getUriByPath(container.getContext(), mImages.get(position).getImage_url());
GlideApp.with(mContext)
.load(uri)
.load(mImages.get(position).getImage_url())
.error(R.drawable.dynamic_default_img)
.into(mDatas.get(position));
mDatas.get(position).setOnPhotoTapListener((imageView, v, v1) -> finish());
......
......@@ -86,9 +86,6 @@ public class IMUtil {
GetExpert cmd = new GetExpert(Integer.parseInt(toUid), canTalk);
if (isFromMessageList) {
//先根据uid判断用户类型:专家调一个接口,非专家调另外的接口
ImRetrofitApi.Companion.getImJavaApi().getUserType(toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
......@@ -101,13 +98,11 @@ public class IMUtil {
ChatStatusCacheHelper.setStatusCache("collectEvent", res.data.getCollectEvent());
}
if (TextUtils.equals(res.data.getUserType(), "2")) {//专家 java 接口
//如果是从消息列表点击进来的,那么专家还是专家,助理还是助理,不走其他所有逻辑(比如销售代运营)
if (TextUtils.equals(res.data.getUserType(), "2")) {//专家
if (isFromMessageList) {
startExpertChat(context, toUid, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
return;
}
//在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊
ImRetrofitApi.Companion.getImJavaApi().getChatUid((toUid))
.subscribeOn(Schedulers.io())
......@@ -115,42 +110,6 @@ public class IMUtil {
.subscribe(resp -> {
DoctorAssistantRespDtoBean bean = resp.data;
if (bean.getRole() == 1) {
//接口返回值是专家,java接口
startExpertChat(context, bean.getChatUid(), dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
} else {
GetExpert cmd1 = new GetExpert(Integer.parseInt(bean.getChatUid()), canTalk);
//接口返回值是助理,php接口
startAssistantChat(context, bean.getChatUid(), cmd1, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
}
}, t -> {
HttpErrorUtils.Companion.handleError(context, t);
});
} else {//非专家 php接口
startAssistantChat(context, toUid, cmd, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
}
} else {
if (dialog.isVisible()) {
dialog.dismissAllowingStateLoss();
}
ToastUtil.toastShort(res.msg);
}
}, throwable -> {
if (dialog.isVisible()) {
dialog.dismissAllowingStateLoss();
}
HttpErrorUtils.Companion.handleError(context, throwable);
});
} else {
ImRetrofitApi.Companion.getImJavaApi().getChatUid(toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getChatUidResp -> {
DoctorAssistantRespDtoBean bean = getChatUidResp.data;
ImRetrofitApi.Companion.getImJavaApi().getUserType(bean.chatUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
......@@ -187,64 +146,24 @@ public class IMUtil {
});
}, t -> {
HttpErrorUtils.Companion.handleError(context, t);
});
} else {
startAssistantChat(context, toUid, cmd, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
}
} else {
if (dialog.isVisible()) {
dialog.dismissAllowingStateLoss();
}
HttpErrorUtils.Companion.handleError(context, t);
});
ToastUtil.toastShort(res.msg);
}
// //先根据uid判断用户类型:专家调一个接口,非专家调另外的接口
// Disposable disposable = ImRetrofitApi.Companion.getImJavaApi().getUserType(toUid)
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(res -> {
// if (res.code == 200) {
// if (TextUtils.equals(res.data, "2")) {//专家 java 接口
//
// //如果是从消息列表点击进来的,那么专家还是专家,助理还是助理,不走其他所有逻辑(比如销售代运营)
// if (isFromMessageList) {
// startExpertChat(context, toUid, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// return ;
// }
//
// //在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊
// Disposable disposa = ImRetrofitApi.Companion.getImJavaApi().getChatUid((toUid))
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(resp -> {
//
// DoctorAssistantRespDtoBean bean = resp.data;
// if (bean.getRole() == 1) {
// //接口返回值是专家,java接口
// startExpertChat(context, bean.getChatUid(), dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// }else {
//
// GetExpert cmd1 = new GetExpert(Integer.parseInt(bean.getChatUid()), canTalk);
// //接口返回值是助理,php接口
// startAssistantChat(context, bean.getChatUid(), cmd1, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// }
//
// },t->{
// HttpErrorUtils.Companion.handleError(context, t);
// });
// } else {//非专家 php接口
// startAssistantChat(context, toUid, cmd, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// }
// } else {
// if (dialog.isVisible()) {
// dialog.dismissAllowingStateLoss();
// }
// ToastUtil.toastShort(res.msg);
// }
// }, throwable -> {
// if (dialog.isVisible()) {
// dialog.dismissAllowingStateLoss();
// }
// HttpErrorUtils.Companion.handleError(context, throwable);
// });
}, throwable -> {
if (dialog.isVisible()) {
dialog.dismissAllowingStateLoss();
}
HttpErrorUtils.Companion.handleError(context, throwable);
});
}
/**
......
package com.yidianling.uikit.business.session.fragment;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.Intent;
......@@ -82,8 +83,6 @@ import com.yidianling.user.api.service.IUserService;
import org.jetbrains.annotations.NotNull;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
......@@ -113,6 +112,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
//快捷菜单
protected RelativeLayout lin_actions;
protected RelativeLayout rl_doctor_name;
private LinearLayout ll_actions_yi;
......@@ -159,13 +159,17 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private ImRedStarGradeView good_num_icons;
private TextView im_focus_btn;
private TextView tv_from;
private TextView tv_doctor_name;
private LinearLayout top_view_container;
private LinearLayout constraint_ll;
private LinearLayout ll_info_detail;
private RelativeLayout rela_zixun;
private ValueAnimator anim_out;
private ObjectAnimator sourceLayoutAnim;
private ValueAnimator anim_in;
private Boolean expertInfoViewIsIn = true;
private Boolean expertInfoViewIsAnimating = false;
......@@ -219,6 +223,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
im_focus_btn = rootView.findViewById(R.id.im_focus_btn);
good_num_icons = rootView.findViewById(R.id.good_num_icons);
rela_zixun = rootView.findViewById(R.id.rela_zixun);
rl_doctor_name = rootView.findViewById(R.id.rl_doctor_name);
tv_from = rootView.findViewById(R.id.tv_from);
ll_info_detail = rootView.findViewById(R.id.ll_info_detail);
tv_doctor_name = rootView.findViewById(R.id.tv_doctor_name);
//和助理私聊时的常用语逻辑
rl_common_question_enter = rootView.findViewById(R.id.rl_common_question);
......@@ -239,7 +247,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} else {
try {
YdlBuryPointUtil.sendPv("common_question_pager");
}catch (Exception e){
} catch (Exception e) {
}
getCommonQuestionListData();
......@@ -268,14 +276,13 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if (!getActivity().isFinishing()) {
try {
YdlBuryPointUtil.sendPv("user_collect_pager");
}catch (Exception e){
} catch (Exception e) {
}
collectInfoPopupWindow.show(top_expert_info_cl);
}
}
ChatStatusCacheHelper.clearDataByKey("collectEvent");
}
......@@ -359,6 +366,22 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
}, throwable -> {
});
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 1 && ModularServiceManager.INSTANCE.provide(IUserService.class).getUserInfo().getUser_type() == 3) {
ServiceImpl.Companion.getInstance().getSourceDoctor(ActionHandlerStorage.getL(sessionId).getInfo().toUid, ModularServiceManager.INSTANCE.provide(IUserService.class).getUserInfo().getUid())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> {
if (TextUtils.equals(res.code, "200") && res.data != null && !TextUtils.isEmpty(res.data.name)) {
addSourceLayoutScrollListener();
rl_doctor_name.setVisibility(View.VISIBLE);
tv_doctor_name.setText(res.data.name);
} else {
rl_doctor_name.setVisibility(View.GONE);
}
}, throwable -> {
rl_doctor_name.setVisibility(View.GONE);
});
}
}
private void addScrollListener() {
......@@ -372,7 +395,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
if (dy < 0 && Math.abs(dy) > 15) {
hasUpScroll = true;
// 下滑
......@@ -393,6 +415,26 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
});
}
private void addSourceLayoutScrollListener() {
messageListView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
sourceDoctorLayoutIn();
} else {
sourceDoctorLayoutOut();
}
}
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
}
});
}
private void initTopViewHeight() {
top_expert_info_ll.getViewTreeObserver().addOnGlobalLayoutListener(() -> expertInfoViewHeight = top_expert_info_ll.getHeight());
......@@ -473,6 +515,27 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
return anim;
}
private void sourceDoctorLayoutIn() {
if (rl_doctor_name.getVisibility() == View.VISIBLE) {
if (sourceLayoutAnim == null) {
sourceLayoutAnim = ObjectAnimator.ofFloat(ll_info_detail, "translationX", 0.0f, -tv_from.getMeasuredWidth());
sourceLayoutAnim.setDuration(250);
}
sourceLayoutAnim.reverse();
}
}
private void sourceDoctorLayoutOut() {
if (rl_doctor_name.getVisibility() == View.VISIBLE) {
if (sourceLayoutAnim == null) {
sourceLayoutAnim = ObjectAnimator.ofFloat(ll_info_detail, "translationX", 0.0f, -tv_from.getMeasuredWidth());
sourceLayoutAnim.setDuration(250);
}
sourceLayoutAnim.start();
}
}
/**
* 初始化顶部专家信息栏
*/
......
......@@ -3,7 +3,6 @@ package com.yidianling.uikit.custom.http
import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.data.http.BaseResponse
import com.yidianling.uikit.custom.http.response.*
import io.reactivex.Observable
import okhttp3.RequestBody
......@@ -12,7 +11,7 @@ import retrofit2.http.*
/**
* Created by xj on 2019/6/26.
*/
interface ServiceApi{
interface ServiceApi {
//获取专家状态信息
@GET("chat/status")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
......@@ -27,7 +26,11 @@ interface ServiceApi{
//获取推荐专家列表信息
@GET("doctor/recommendSimilarListeners")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getRecommendExpertList(@Query("doctorUid") doctorUid: Long, @Query("catName") catName: String, @Query("limit") limit: Int): Observable<BaseAPIResponse<ArrayList<RecommendExpertBean>>>
fun getRecommendExpertList(
@Query("doctorUid") doctorUid: Long, @Query("catName") catName: String, @Query(
"limit"
) limit: Int
): Observable<BaseAPIResponse<ArrayList<RecommendExpertBean>>>
//获取常用语
@POST("phrase/list")
......@@ -64,4 +67,12 @@ interface ServiceApi{
@GET("systemconfig/get-chat-view-config")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getChatViewConfig(): Observable<BaseAPIResponse<SystemInfoBean>>
//获取代运营关联的专家的信息
@GET("chat/get-source-doctor")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
//注意:这个接口返回的还有很多字段,但是暂时不需要,就先取这两个字段
fun getSourceDoctor(@Query("scene") scene: Int,@Query("userUid") userUid: String,@Query("assistantUid") assistantUid: String): Observable<BaseAPIResponse<SourceDoctorInfoBean>>
}
\ No newline at end of file
......@@ -94,4 +94,13 @@ class ServiceImpl private constructor() {
fun getChatViewConfig(): Observable<BaseAPIResponse<SystemInfoBean>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).getChatViewConfig()
}
/**
* 获取代运营关联的专家的信息
*/
fun getSourceDoctor(userUid: String, assistantUid: String): Observable<BaseAPIResponse<SourceDoctorInfoBean>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).getSourceDoctor(1, userUid, assistantUid)
}
}
\ No newline at end of file
package com.yidianling.uikit.custom.http.response;
/**
* @author jiucheng
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/2/21
*/
public class SourceDoctorInfoBean {
//注意:这个接口返回的还有很多字段,但是暂时不需要,就先取这两个字段
public String name;//专家name
public String uid;//专家uid
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@android:integer/config_shortAnimTime">
<corners
android:bottomRightRadius="17dp"
android:topRightRadius="17dp" />
<solid android:color="@color/white" />
</shape>
\ No newline at end of file
......@@ -154,8 +154,8 @@
android:id="@+id/good_num_icons"
android:layout_width="wrap_content"
android:layout_height="11dp"
android:layout_marginBottom="1.5dp"
android:layout_alignParentBottom="true" />
android:layout_alignParentBottom="true"
android:layout_marginBottom="1.5dp" />
<ImageView
android:layout_width="10dp"
......@@ -248,19 +248,19 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:lines="1"
android:text="评价"
android:textColor="#1DA1F2"
android:textSize="12dp"
android:text="评价" />
android:textSize="12dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="1dp"
android:lines="1"
android:text="("
android:textColor="#1DA1F2"
android:textSize="12dp"
android:layout_marginBottom="1dp"
android:text="(" />
android:textSize="12dp" />
<TextView
android:id="@+id/tv_all_comment_desc"
......@@ -276,11 +276,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="1dp"
android:lines="1"
android:text=")"
android:textColor="#1DA1F2"
android:textSize="12dp"
android:layout_marginBottom="1dp"
android:text=")" />
android:textSize="12dp" />
<ImageView
android:id="@+id/tv_all_comment_go"
......@@ -406,9 +406,7 @@
android:id="@+id/rl_contain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout_height="50dp">
</RelativeLayout>
tools:layout_height="50dp" />
<android.support.v7.widget.RecyclerView
android:id="@+id/messageListView"
......@@ -433,37 +431,6 @@
android:layout_marginTop="14dp"
android:visibility="visible">
<!-- <RelativeLayout-->
<!-- android:id="@+id/rela_qingsu"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="36dp"-->
<!-- android:background="@drawable/im_bg_im_confide_action"-->
<!-- android:gravity="center"-->
<!-- android:paddingLeft="14dp"-->
<!-- android:paddingRight="17dp">-->
<!-- <ImageView-->
<!-- android:id="@+id/action_qingshu_img"-->
<!-- android:layout_width="12dp"-->
<!-- android:layout_height="12dp"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:src="@mipmap/im_chat_ico_call" />-->
<!-- <TextView-->
<!-- android:id="@+id/action_qingshu"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_toRightOf="@+id/action_qingshu_img"-->
<!-- android:gravity="center"-->
<!-- android:paddingLeft="5dp"-->
<!-- android:text="即时倾诉"-->
<!-- android:textColor="@color/platform_google_blue"-->
<!-- android:textSize="12dp"-->
<!-- android:textStyle="bold" />-->
<!-- </RelativeLayout>-->
<RelativeLayout
android:id="@+id/rela_zixun"
android:layout_width="wrap_content"
......@@ -488,6 +455,56 @@
</RelativeLayout>
<!--和助理聊天时,显示关联的咨询师的信息-->
<RelativeLayout
android:id="@+id/rl_doctor_name"
android:layout_width="wrap_content"
android:layout_height="34dp"
android:layout_marginTop="15dp"
android:gravity="center_vertical"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
android:id="@+id/ll_info_detail"
android:layout_width="wrap_content"
android:layout_height="34dp"
android:layout_toRightOf="@+id/view_empty"
android:background="@drawable/im_background_chat_assistant_to_doctor_name"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingRight="12dp">
<TextView
android:id="@+id/tv_from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingRight="3dp"
android:text="来自"
android:textColor="@color/platform_color_242424"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_doctor_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/im_main_theme"
android:textSize="12sp"
tools:text="雷水寿" />
</LinearLayout>
<View
android:id="@+id/view_empty"
android:layout_width="12dp"
android:layout_height="34dp"
android:background="@color/white" />
</RelativeLayout>
</RelativeLayout>
......
package com.ydl.ydlcommon.utils
import android.annotation.SuppressLint
import android.app.Activity
import android.app.Dialog
import android.os.Bundle
......@@ -36,22 +37,24 @@ class ApkUpdateDialog : Dialog{
this.activity = activity
}
@SuppressLint("SetTextI18n")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.platform_dialog_update_layout)
tv_update_content.text = updateData?.title
tv_update_content.setMovementMethod(ScrollingMovementMethod.getInstance());
tv_update_content.movementMethod = ScrollingMovementMethod.getInstance();
text_version.text = "v${updateData?.ver}"
text_desc.text = updateData?.content
text_desc.setMovementMethod(ScrollingMovementMethod.getInstance());
text_desc.movementMethod = ScrollingMovementMethod.getInstance();
v_downpress.setSize(28,14,6,9,4)
v_downpress.setTextSize(10)
// v_downpress.setProgress(0)
listener = object : ApkInstallTool.UpdateProgressListener {
@SuppressLint("CheckResult")
override fun startLoad() {
Observable.just(1)
.observeOn(AndroidSchedulers.mainThread())
......@@ -66,6 +69,7 @@ class ApkUpdateDialog : Dialog{
},{})
}
@SuppressLint("CheckResult")
override fun progress(progress: Int) {
Observable.just(1)
.observeOn(AndroidSchedulers.mainThread())
......
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