Commit 31b740d3 by 徐健

顶部布局与接口基本完成(剩余立即咨询按钮里面的两个接口)

parent 4f7e47e8
...@@ -20,8 +20,8 @@ import java.util.List; ...@@ -20,8 +20,8 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule { public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/"; String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST; // public static String appEnv = YDLConstants.ENV_AUTO_TEST;
// public static String appEnv = YDLConstants.ENV_TEST; public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_PROD; // public static String appEnv = YDLConstants.ENV_PROD;
@Override @Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) { public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......
...@@ -131,13 +131,16 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler { ...@@ -131,13 +131,16 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
docInfo.doctorBriefInfoOrderNum = expert.doctorBriefInfo.orderNum; docInfo.doctorBriefInfoOrderNum = expert.doctorBriefInfo.orderNum;
docInfo.doctorBriefInfoSmallImage = expert.doctorBriefInfo.smallImage; docInfo.doctorBriefInfoSmallImage = expert.doctorBriefInfo.smallImage;
docInfo.isFollowed = expert.shareData.isFollowed;
docInfo.commentCounter = expert.commentCounter; docInfo.commentCounter = expert.commentCounter;
docInfo.commentCounterUrl = expert.commentCounterUrl; docInfo.commentCounterUrl = expert.commentCounterUrl;
if (docInfo.commentList == null) { if (docInfo.commentList == null) {
docInfo.commentList = new ArrayList(); docInfo.commentList = new ArrayList();
} }
docInfo.commentList.clear(); docInfo.commentList.clear();
docInfo.commentList.addAll(expert.commentList); if (expert.commentList != null) {
docInfo.commentList.addAll(expert.commentList);
}
} }
......
...@@ -4,6 +4,7 @@ import android.animation.Animator; ...@@ -4,6 +4,7 @@ import android.animation.Animator;
import android.animation.ValueAnimator; import android.animation.ValueAnimator;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Intent; import android.content.Intent;
import android.graphics.Color;
import android.media.AudioManager; import android.media.AudioManager;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
...@@ -40,10 +41,12 @@ import com.ydl.webview.H5Params; ...@@ -40,10 +41,12 @@ import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity; import com.ydl.webview.NewH5Activity;
import com.ydl.ydl_image.module.GlideApp; import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.modular.ModularServiceManager; import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor; import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.YdlBuryPointUtil; import com.ydl.ydlcommon.utils.YdlBuryPointUtil;
import com.ydl.ydlcommon.utils.log.LogHelper; import com.ydl.ydlcommon.utils.log.LogHelper;
import com.ydl.ydlcommon.view.CircleImageView; import com.ydl.ydlcommon.view.CircleImageView;
import com.yidianling.common.tools.RxImageTool;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.im.router.ImIn; import com.yidianling.im.router.ImIn;
...@@ -66,9 +69,11 @@ import com.yidianling.uikit.business.session.view.ChatPrivateTips; ...@@ -66,9 +69,11 @@ import com.yidianling.uikit.business.session.view.ChatPrivateTips;
import com.yidianling.uikit.business.session.view.CollectInfoPopupWindow; import com.yidianling.uikit.business.session.view.CollectInfoPopupWindow;
import com.yidianling.uikit.business.session.view.CommonQuestionView; import com.yidianling.uikit.business.session.view.CommonQuestionView;
import com.yidianling.uikit.business.session.view.ImCommentBannerView; import com.yidianling.uikit.business.session.view.ImCommentBannerView;
import com.yidianling.uikit.business.session.view.ImRedStarGradeView;
import com.yidianling.uikit.custom.bridge.ActionHandlerStorage; import com.yidianling.uikit.custom.bridge.ActionHandlerStorage;
import com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler; import com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler;
import com.yidianling.uikit.custom.http.ServiceImpl; import com.yidianling.uikit.custom.http.ServiceImpl;
import com.yidianling.uikit.custom.http.request.FocusParams;
import com.yidianling.uikit.custom.http.response.CommonQuestionBean; import com.yidianling.uikit.custom.http.response.CommonQuestionBean;
import com.yidianling.uikit.custom.http.response.SubmitUserInfoBean; import com.yidianling.uikit.custom.http.response.SubmitUserInfoBean;
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean; import com.yidianling.uikit.custom.http.response.UserQuestInfoBean;
...@@ -151,6 +156,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -151,6 +156,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private ImageView tv_all_comment_go; private ImageView tv_all_comment_go;
private ImCommentBannerView comment_banner_view; private ImCommentBannerView comment_banner_view;
private ImRedStarGradeView good_num_icons;
private TextView im_focus_btn;
private LinearLayout top_view_container; private LinearLayout top_view_container;
private LinearLayout constraint_ll; private LinearLayout constraint_ll;
...@@ -166,6 +175,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -166,6 +175,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private Boolean hasUpScroll = false; private Boolean hasUpScroll = false;
private String help_num;// 帮助人数
private String server_num;// 服务时长
private String good_num;// 好评率
@SuppressLint("HandlerLeak") @SuppressLint("HandlerLeak")
private Handler mHandler = new Handler() { private Handler mHandler = new Handler() {
@Override @Override
...@@ -201,6 +214,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -201,6 +214,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
messageListView = rootView.findViewById(R.id.messageListView); // 消息列表 messageListView = rootView.findViewById(R.id.messageListView); // 消息列表
top_view_container = rootView.findViewById(R.id.top_view_container); // 消息列表 top_view_container = rootView.findViewById(R.id.top_view_container); // 消息列表
constraint_ll = rootView.findViewById(R.id.constraint_ll); constraint_ll = rootView.findViewById(R.id.constraint_ll);
im_focus_btn = rootView.findViewById(R.id.im_focus_btn);
good_num_icons = rootView.findViewById(R.id.good_num_icons);
//和助理私聊时的常用语逻辑 //和助理私聊时的常用语逻辑
rl_common_question_enter = rootView.findViewById(R.id.rl_common_question); rl_common_question_enter = rootView.findViewById(R.id.rl_common_question);
...@@ -439,17 +454,23 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -439,17 +454,23 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
GlideApp.with(getActivity()).load(headUrl).into(small_head_img); GlideApp.with(getActivity()).load(headUrl).into(small_head_img);
} }
// 帮助人数 // 帮助人数
String help_num = String.valueOf(ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoOrderNum); help_num = String.valueOf(ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoOrderNum);
if (TextUtils.isEmpty(help_num)) help_num = "0"; if (TextUtils.isEmpty(help_num)) help_num = "0";
help_num_tv.setText(help_num); help_num_tv.setText(help_num);
// 服务时长 // 服务时长
String server_num = String.valueOf((int) Math.ceil((double) ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoHelpLong / 60.0)); server_num = String.valueOf((int) Math.ceil((double) ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoHelpLong / 60.0));
if (TextUtils.isEmpty(server_num)) server_num = "0"; if (TextUtils.isEmpty(server_num)) server_num = "0";
server_num_tv.setText(server_num); server_num_tv.setText(server_num);
// 好评率 // 好评率
String good_num = String.format("%.2f", ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoFeedbackRate * 20); good_num = String.format("%.1f", ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoFeedbackRate);
if (TextUtils.isEmpty(good_num)) good_num = "0.00"; if (TextUtils.isEmpty(good_num)) good_num = "0.0";
good_num_tv.setText(good_num + "%"); good_num_tv.setText(good_num);
try {
good_num_icons.setGrade(Float.parseFloat(good_num));
}catch (Exception e) {
LogUtil.i(e.toString());
}
if (!TextUtils.isEmpty(headUrl)) { if (!TextUtils.isEmpty(headUrl)) {
IP2PCustomActionHandler.DocInfo info = ActionHandlerStorage.getL(sessionId).getInfo(); IP2PCustomActionHandler.DocInfo info = ActionHandlerStorage.getL(sessionId).getInfo();
...@@ -462,10 +483,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -462,10 +483,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} }
top_expert_info_cl.setOnClickListener(v -> { top_expert_info_cl.setOnClickListener(v -> {
//todo show dialog
if (null != getActivity()) { if (null != getActivity()) {
if (expertInfoDialog == null) { if (expertInfoDialog == null) {
expertInfoDialog = new ExpertInfoDialog(getActivity()); expertInfoDialog = new ExpertInfoDialog(getActivity(), help_num, server_num, good_num);
} }
expertInfoDialog.show(); expertInfoDialog.show();
} }
...@@ -476,6 +496,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -476,6 +496,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
* 初始化顶部专家信息栏下面的评论view * 初始化顶部专家信息栏下面的评论view
*/ */
private void initCommentBanner() { private void initCommentBanner() {
if (ActionHandlerStorage.getL(sessionId).getInfo().commentList.size() == 0) {
comment_banner_view_ll.setVisibility(View.GONE);
return ;
}
int commentCounter = ActionHandlerStorage.getL(sessionId).getInfo().commentCounter; int commentCounter = ActionHandlerStorage.getL(sessionId).getInfo().commentCounter;
tv_all_comment_desc.setText("评论(" + String.valueOf(commentCounter) + ")"); tv_all_comment_desc.setText("评论(" + String.valueOf(commentCounter) + ")");
...@@ -486,6 +511,48 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -486,6 +511,48 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
tv_all_comment_go.setOnClickListener(onClickListener); tv_all_comment_go.setOnClickListener(onClickListener);
comment_banner_view.initData(ActionHandlerStorage.getL(sessionId).getInfo().commentList); comment_banner_view.initData(ActionHandlerStorage.getL(sessionId).getInfo().commentList);
if (ActionHandlerStorage.getL(sessionId).getInfo().isFollowed) {
im_focus_btn.setText("已关注");
im_focus_btn.setTextColor(Color.parseColor("#999999"));
im_focus_btn.setBackgroundResource(R.drawable.im_unfocus_btn_bg);
}else {
im_focus_btn.setText("关注");
im_focus_btn.setTextColor(Color.parseColor("#1DA1F2"));
im_focus_btn.setBackgroundResource(R.drawable.im_focus_btn_bg);
im_focus_btn.setOnClickListener(v -> {
focus();
});
}
}
//关注
@SuppressLint("CheckResult")
private void focus() {
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null)
// 未关注才能进行关注
if (ActionHandlerStorage.getL(sessionId).getInfo().isFollowed == false) {
ActionHandlerStorage.getL(sessionId).getInfo().isFollowed = true;
ServiceImpl.Companion.getInstance().focus(new FocusParams(ActionHandlerStorage.getL(sessionId).getInfo().toUid, "1"))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> {
if (res.code == 0) {
String status = String.valueOf(res.status);
if ("1".equals(status)) {
ToastUtil.toastShort("关注成功");
im_focus_btn.setText("已关注");
im_focus_btn.setTextColor(Color.parseColor("#999999"));
im_focus_btn.setBackgroundResource(R.drawable.im_unfocus_btn_bg);
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) {
ActionHandlerStorage.getL(sessionId).getInfo().isFollowed = true;
}
}
}
}, throwable -> {
ActionHandlerStorage.getL(sessionId).getInfo().isFollowed = false;
ToastUtil.toastShort(throwable.toString());});
}
} }
private void showTips() { private void showTips() {
...@@ -499,7 +566,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -499,7 +566,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
rela_zixun.setOnClickListener(view -> { rela_zixun.setOnClickListener(view -> {
if (ActionHandlerStorage.getL(sessionId) != null) { if (ActionHandlerStorage.getL(sessionId) != null) {
if (expertConsultServiceListDialog == null) { if (expertConsultServiceListDialog == null) {
if (getActivity()!= null) { if (getActivity() != null) {
expertConsultServiceListDialog = new ExpertConsultServiceListDialog(getActivity()); expertConsultServiceListDialog = new ExpertConsultServiceListDialog(getActivity());
} }
} }
......
...@@ -121,8 +121,8 @@ class ImCommentBannerView : LinearLayout { ...@@ -121,8 +121,8 @@ class ImCommentBannerView : LinearLayout {
*/ */
fun initData(list: ArrayList<ImCommendDetailBean>?) { fun initData(list: ArrayList<ImCommendDetailBean>?) {
mHandler.removeCallbacksAndMessages(null) mHandler.removeCallbacksAndMessages(null)
if (null == list || list.isEmpty()) { if (null == list || list.isEmpty() || list.size == 0) {
visibility = View.GONE visibility = View.INVISIBLE
return return
} }
visibility = View.VISIBLE visibility = View.VISIBLE
......
package com.yidianling.uikit.business.session.view
import android.content.Context
import android.util.AttributeSet
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import com.ydl.ydlcommon.utils.LogUtil
import com.yidianling.common.tools.RxImageTool
import com.yidianling.im.R
import kotlin.math.ceil
import kotlin.math.floor
class ImRedStarGradeView : LinearLayout {
constructor(context: Context) : super(context) {
mContext = context
initViews()
}
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
mContext = context
initViews()
}
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(
context,
attrs,
defStyle
) {
mContext = context
initViews()
}
private var mContext: Context? = null
private fun initViews() {
initView()
}
/**
* 界面初始化
*/
private fun initView() {
orientation = HORIZONTAL
var params = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
RxImageTool.dp2px(11f)
)
layoutParams = params
}
/**
* 设置分数
*/
fun setGrade(grade: Float) {
try {
val generateGrade = floor(grade.toDouble())
val generateNumberInt = if (generateGrade.toInt() > 5) 5 else generateGrade.toInt()
val dp_11 = RxImageTool.dp2px(11f)
for (i in 0 until generateNumberInt) {
val itemView = View.inflate(mContext, R.layout.im_good_icon_layout, null)
val params = LayoutParams(
dp_11, dp_11
)
itemView.layoutParams = params
addView(itemView)
}
if (grade > generateGrade) {
val lastRate = grade - generateGrade
//外部布局
val itemView = View.inflate(mContext, R.layout.im_good_icon_layout, null)
val params = LayoutParams(dp_11, dp_11)
itemView.layoutParams = params
//左侧红色icon布局
val redStarIconView = itemView.findViewById<LinearLayout>(R.id.im_red_star)
val redStarParams =
LayoutParams(RxImageTool.dp2px((lastRate * 11f).toFloat()), dp_11)
redStarIconView.layoutParams = redStarParams
val redStarIconImg = itemView.findViewById<ImageView>(R.id.im_red_star_icon)
val redStarIconImgParams = LayoutParams(dp_11, dp_11)
redStarIconImg.layoutParams = redStarIconImgParams
// 右侧灰色icon布局
val greyStarIconView = itemView.findViewById<LinearLayout>(R.id.im_grey_star)
val greyStarParams = LayoutParams(
RxImageTool.dp2px(((1.0f - lastRate) * 11f).toFloat()), dp_11
)
greyStarIconView.layoutParams = greyStarParams
val greyStarIconImg = itemView.findViewById<ImageView>(R.id.im_grey_star_icon)
val greyStarIconImgParams = LayoutParams(dp_11, dp_11)
greyStarIconImgParams.gravity = Gravity.RIGHT
greyStarIconImg.layoutParams = greyStarIconImgParams
addView(itemView)
}
//补全剩余的灰色icon
val ceilGradeInt = (ceil(grade.toDouble())).toInt()
for (i in ceilGradeInt until 5) {
val itemView = View.inflate(mContext, R.layout.im_good_grey_icon_layout, null)
val params = LayoutParams(
dp_11, dp_11
)
itemView.layoutParams = params
addView(itemView)
}
} catch (e: Exception) {
LogUtil.i(e.toString())
}
}
}
\ No newline at end of file
...@@ -145,11 +145,13 @@ public interface IP2PCustomActionHandler { ...@@ -145,11 +145,13 @@ public interface IP2PCustomActionHandler {
public int busyTotal = 0; //专家当前在与多少人聊天 public int busyTotal = 0; //专家当前在与多少人聊天
public String tag1 = ""; //用与获取推荐专家列表接口的参数catName public String tag1 = ""; //用与获取推荐专家列表接口的参数catName
public double doctorBriefInfoFeedbackRate = 0.000; //好评率 需要*100 public double doctorBriefInfoFeedbackRate = 0.000; //好评
public int doctorBriefInfoOrderNum = 0; //帮助人数 public int doctorBriefInfoOrderNum = 0; //帮助人数
public int doctorBriefInfoHelpLong = 0; //服务时长 public int doctorBriefInfoHelpLong = 0; //服务时长
public String doctorBriefInfoSmallImage = ""; //小头像 public String doctorBriefInfoSmallImage = ""; //小头像
public Boolean isFollowed = false; // 是否关注
public int commentCounter = 0; public int commentCounter = 0;
public String commentCounterUrl = ""; public String commentCounterUrl = "";
public ArrayList<ImCommendDetailBean> commentList; public ArrayList<ImCommendDetailBean> commentList;
......
...@@ -3,10 +3,8 @@ package com.yidianling.uikit.custom.http ...@@ -3,10 +3,8 @@ package com.yidianling.uikit.custom.http
import com.ydl.ydlcommon.base.config.YDL_DOMAIN import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.data.http.BaseAPIResponse import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.yidianling.uikit.custom.http.response.ChatStatusBean import com.ydl.ydlcommon.data.http.BaseResponse
import com.yidianling.uikit.custom.http.response.CommonQuestionBean import com.yidianling.uikit.custom.http.response.*
import com.yidianling.uikit.custom.http.response.RecommendExpertBean
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean
import io.reactivex.Observable import io.reactivex.Observable
import okhttp3.RequestBody import okhttp3.RequestBody
import retrofit2.http.* import retrofit2.http.*
...@@ -51,4 +49,9 @@ interface ServiceApi{ ...@@ -51,4 +49,9 @@ interface ServiceApi{
@POST("user/collect/submit") @POST("user/collect/submit")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun submitUserCollect(@Body body: RequestBody): Observable<BaseAPIResponse<Any>> fun submitUserCollect(@Body body: RequestBody): Observable<BaseAPIResponse<Any>>
//关注
@FormUrlEncoded
@POST("sq-active/focus")
fun focus(@FieldMap params: Map<String, String>): Observable<BaseResponse<FocusBean>>
} }
\ No newline at end of file
package com.yidianling.uikit.custom.http package com.yidianling.uikit.custom.http
import com.ydl.ydlcommon.data.http.BaseAPIResponse import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.data.http.BaseResponse
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlnet.YDLHttpUtils import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.uikit.custom.http.response.ChatStatusBean import com.yidianling.uikit.custom.http.request.FocusParams
import com.yidianling.uikit.custom.http.response.CommonQuestionBean import com.yidianling.uikit.custom.http.response.*
import com.yidianling.uikit.custom.http.response.RecommendExpertBean
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean
import io.reactivex.Observable import io.reactivex.Observable
import okhttp3.MediaType import okhttp3.MediaType
import okhttp3.RequestBody import okhttp3.RequestBody
...@@ -68,4 +68,12 @@ class ServiceImpl private constructor(){ ...@@ -68,4 +68,12 @@ class ServiceImpl private constructor(){
val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), params) as RequestBody val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), params) as RequestBody
return YDLHttpUtils.obtainApi(ServiceApi::class.java).submitUserCollect(body) return YDLHttpUtils.obtainApi(ServiceApi::class.java).submitUserCollect(body)
} }
/**
* 关注用户
*/
fun focus(param: FocusParams): Observable<BaseResponse<FocusBean>> {
return RxUtils.mapObservable(param)
.flatMap { YDLHttpUtils.obtainApi(ServiceApi::class.java).focus(it) }
}
} }
\ No newline at end of file
package com.yidianling.uikit.custom.http.request
class FocusParams(
val id: String, //话题id或用户uid
val type: String//业务类型:1关注用户,2关注话题
)
\ No newline at end of file
package com.yidianling.uikit.custom.http.response
class FocusBean (
val status: Int
)
\ No newline at end of file
...@@ -56,6 +56,7 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -56,6 +56,7 @@ public class ConfideOrderInfoView extends RelativeLayout {
LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
params.leftMargin = RxImageTool.dp2px(8f); params.leftMargin = RxImageTool.dp2px(8f);
params.rightMargin = RxImageTool.dp2px(8f); params.rightMargin = RxImageTool.dp2px(8f);
params.topMargin = RxImageTool.dp2px(10f);
setLayoutParams(params); setLayoutParams(params);
View.inflate(mContext, R.layout.im_nim_chat_confide_order_info_view, this); View.inflate(mContext, R.layout.im_nim_chat_confide_order_info_view, this);
setBackground(getResources().getDrawable(R.drawable.im_bg_im_confide_action)); setBackground(getResources().getDrawable(R.drawable.im_bg_im_confide_action));
......
...@@ -13,7 +13,7 @@ import kotlinx.android.synthetic.main.im_safe_help_remind_dialog_layout.* ...@@ -13,7 +13,7 @@ import kotlinx.android.synthetic.main.im_safe_help_remind_dialog_layout.*
* 专家信息弹窗 * 专家信息弹窗
* Created by xj on 2019/8/7. * Created by xj on 2019/8/7.
*/ */
class ExpertInfoDialog(val mContext: Context): Dialog(mContext, R.style.dialog_default_style) { class ExpertInfoDialog(val mContext: Context, val help_num: String, val server_num: String, val good_num: String): Dialog(mContext, R.style.dialog_default_style) {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
...@@ -26,6 +26,10 @@ class ExpertInfoDialog(val mContext: Context): Dialog(mContext, R.style.dialog_d ...@@ -26,6 +26,10 @@ class ExpertInfoDialog(val mContext: Context): Dialog(mContext, R.style.dialog_d
window.setGravity(Gravity.CENTER) window.setGravity(Gravity.CENTER)
window.attributes = params window.attributes = params
im_expert_detail_help_num.text = help_num
im_expert_detail_server_num.text = server_num
im_expert_detail_good_num.text = good_num
expert_info_close.setOnClickListener { expert_info_close.setOnClickListener {
if (null != mContext) { if (null != mContext) {
dismiss() dismiss()
......
...@@ -41,6 +41,7 @@ public class IMShareDataBuild { ...@@ -41,6 +41,7 @@ public class IMShareDataBuild {
public String order_url; public String order_url;
@SerializedName(value = "name", alternate = "doctorName") @SerializedName(value = "name", alternate = "doctorName")
public String doctorName; public String doctorName;
public Boolean isFollowed = false; // 是否关注
/** /**
* 是否开启电话倾诉 * 是否开启电话倾诉
* 1.开启 2.关闭 * 1.开启 2.关闭
......
...@@ -2,11 +2,7 @@ ...@@ -2,11 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:topLeftRadius="18dp" <corners android:radius="6dp" />
android:bottomLeftRadius="18dp"/>
<gradient <solid android:color="@color/white" />
android:angle="180" </shape>
android:startColor="#FF406C" \ No newline at end of file
android:endColor="#FF7A5C"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:topLeftRadius="18dp"
android:bottomLeftRadius="18dp"/>
<gradient
android:angle="180"
android:startColor="#FF406C"
android:endColor="#FF7A5C"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#F7F7F7"/>
<corners android:radius="4dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:topLeftRadius="6dp"
android:topRightRadius="6dp" />
<gradient
android:angle="270"
android:startColor="#2E27A5F2"
android:endColor="#001DA1F2"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#FFFFFF"/>
<corners android:radius="10dp"/>
<stroke android:width="1dp"
android:color="#CCCCCC"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/im_grey_star"
android:layout_width="11dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/im_grey_star_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="right"
android:src="@drawable/im_star_grey" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/im_red_star"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/im_red_star_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/im_star_red" />
</LinearLayout>
<LinearLayout
android:id="@+id/im_grey_star"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/im_grey_star_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="right"
android:src="@drawable/im_star_grey" />
</LinearLayout>
</LinearLayout>
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