Commit ef30999e by 严久程

Merge branch 'feature/im_update' into dev

# Conflicts:
#	config.gradle
parents 49a2cf66 4e797f3e
......@@ -180,8 +180,8 @@ dependencies {
implementation fileTree(dir: 'aars', include: ['*.aar'])
implementation project(':m-user')
implementation modularPublication('com.ydl:m-user-api')
implementation project(':m-tests')
implementation project(':m-consultant')
api project(':m-tests')
api project(':m-consultant')
implementation modularPublication('com.ydl:m-consultant-api')
// implementation project(':m-confide')
......@@ -202,7 +202,7 @@ dependencies {
implementation project(':m-muse')
// implementation project(':m-muse')
implementation project(':m-im')
implementation project(':m-dynamic')
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.ydl.component">
xmlns:tools="http://schemas.android.com/tools"
package="com.ydl.component">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
......@@ -12,24 +12,25 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:name="com.ydl.ydlcommon.base.BaseApp"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_config"
android:theme="@style/platform_CommonTheme"
tools:ignore="GoogleAppIndexingWarning"
tools:replace="android:allowBackup, android:icon, android:label">
<activity android:name=".music.FragmentContainerActivity"
android:theme="@style/platform_NoTitleTheme" />
android:name="com.ydl.ydlcommon.base.BaseApp"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/platform_CommonTheme"
tools:ignore="GoogleAppIndexingWarning"
tools:replace="android:allowBackup, android:icon, android:label">
<activity
android:name=".music.FragmentContainerActivity"
android:theme="@style/platform_NoTitleTheme" />
<!-- <activity android:name="com.yidianling.user.ui.login.RegisterAndLoginActivity" -->
<!-- <activity android:name=".MainActivity"/> -->
<activity
android:name=".MainActivity"
android:launchMode="singleTask"
android:theme="@style/platform_NoTitleTheme">
android:name=".MainActivity"
android:launchMode="singleTask"
android:theme="@style/platform_NoTitleTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
......@@ -37,18 +38,18 @@
<intent-filter>
<action android:name="com.ydl.media.ACTION_MUSIC_CLICK" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.ydl.component.base.DemoGlobalConfig"
android:value="ModuleConfig" />
android:name="com.ydl.component.base.DemoGlobalConfig"
android:value="ModuleConfig" />
<activity
android:name="com.tencent.tauth.AuthActivity"
android:launchMode="singleTask"
android:noHistory="true">
android:name="com.tencent.tauth.AuthActivity"
android:launchMode="singleTask"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
......@@ -59,11 +60,11 @@
</intent-filter>
</activity>
<activity android:name=".TestAppActivity" />
<activity
android:name=".home.HomeActivity"
android:launchMode="singleTask"
android:noHistory="true">
</activity>
android:noHistory="true"></activity>
</application>
</manifest>
\ No newline at end of file
......@@ -25,7 +25,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager
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.ExpertSearchActivity.Companion.HOT_SEARCH_DOCTOR_NAME
import com.yidianling.consultant.api.IConsultantService
import com.yidianling.fm.api.service.IFMService
import com.yidianling.tests.home.NewTestHomeActivity
......@@ -84,22 +84,23 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
.navigation()
}
bt_to_consultant.setOnClickListener {
ARouter.getInstance()
.build("/consult/hot_search")
.withString(
HOT_SEARCH_DOCTOR_NAME,
this.resources?.getString(R.string.platform_search_hint)
)
.navigation()
// ARouter.getInstance()
// .build("/consult/hot_search")
// .withString(
// HOT_SEARCH_DOCTOR_NAME,
// this.resources?.getString(R.string.platform_search_hint)
// )
// .navigation()
FragmentContainerActivity.start(this, "ExpertSearchFragment")
}
bt_to_music.setOnClickListener {
FragmentContainerActivity.start(this)
}
bt_to_im.setOnClickListener {
FragmentContainerActivity.start(this,"NewMultiMessageFragment")
FragmentContainerActivity.start(this, "NewMultiMessageFragment")
}
bt_to_dynamic.setOnClickListener {
FragmentContainerActivity.start(this,"TrendsHomeFragment")
FragmentContainerActivity.start(this, "TrendsHomeFragment")
}
bt_to_tests.setOnClickListener {
startActivity(Intent(this, NewTestHomeActivity::class.java))
......@@ -109,25 +110,32 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// startActivity(Intent(this, ConfideHomeActivity::class.java))
// }
bt_to_muse.setOnClickListener {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_MUSE,
YDLRouterParams().putExtra(IYDLRouterConstant.MUSIC_URL, "http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3")
.putExtra(IYDLRouterConstant.DATA_JSON, "{\n" +
" \"muses\": [{\n" +
" \"id\": 6,\n" +
" \"name\": \"冥想基础介绍-1-什么是冥想?\",\n" +
" \"audioUrl\":\n" +
" \"http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3\",\n" +
" \"backgroundUrl\":\n" +
" \"https://img.yidianling.com/file/2019/06/10/i4qdax82ok2aizq3.png\",\n" +
" \"effectCode\": 1,\n" +
" \"category\": 2,\n" +
" \"playCount\": 929,\n" +
" \"sort\": 255,\n" +
" \"isDelete\": 1,\n" +
" \"createTime\": \"May 30, 2019 4:45:17 PM\",\n" +
" \"updateTime\": \"Jun 10, 2019 7:14:23 PM\"\n" +
" }]\n" +
" }"))
YDLRouterManager.router(
IYDLRouterConstant.ROUTER_MUSE,
YDLRouterParams().putExtra(
IYDLRouterConstant.MUSIC_URL,
"http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3"
)
.putExtra(
IYDLRouterConstant.DATA_JSON, "{\n" +
" \"muses\": [{\n" +
" \"id\": 6,\n" +
" \"name\": \"冥想基础介绍-1-什么是冥想?\",\n" +
" \"audioUrl\":\n" +
" \"http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3\",\n" +
" \"backgroundUrl\":\n" +
" \"https://img.yidianling.com/file/2019/06/10/i4qdax82ok2aizq3.png\",\n" +
" \"effectCode\": 1,\n" +
" \"category\": 2,\n" +
" \"playCount\": 929,\n" +
" \"sort\": 255,\n" +
" \"isDelete\": 1,\n" +
" \"createTime\": \"May 30, 2019 4:45:17 PM\",\n" +
" \"updateTime\": \"Jun 10, 2019 7:14:23 PM\"\n" +
" }]\n" +
" }"
)
)
}
bt_to_fm.setOnClickListener {
......@@ -135,12 +143,13 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// YDLRouterManager.router(IYDLRouterConstant.ROUTER_FM_LIST)
}
bt_to_course.setOnClickListener{
bt_to_course.setOnClickListener {
ARouter.getInstance().build("/course/home")
.navigation()
}
bt_to_home.setOnClickListener {
FragmentContainerActivity.start(this,"YdlHomeFragment")
// FragmentContainerActivity.start(this, "YdlHomeFragment")
startActivity(Intent(this, TestAppActivity::class.java))
}
}
......@@ -186,7 +195,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
super.onResume()
MobclickAgent.onResume(this)
ModularServiceManager.provide(IConsultantService::class.java).showConsultAssistantDialog(this)
ModularServiceManager.provide(IConsultantService::class.java)
.showConsultAssistantDialog(this)
}
override fun onPause() {
......
package com.ydl.component
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentPagerAdapter
import android.support.v7.app.AppCompatActivity
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
import com.yidianling.home.ui.fragment.YdlHomeFragment
import kotlinx.android.synthetic.main.activity_test_app.*
import java.util.*
/**
* @author jiucheng
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/1/14
*/
class TestAppActivity : AppCompatActivity() {
private var fragments: ArrayList<Fragment> =
ArrayList()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_test_app)
fragments.add(YdlHomeFragment())
fragments.add(TrendsHomeFragment().setTab("trend_tap"))
val adapter: FragmentPagerAdapter =
object : FragmentPagerAdapter(supportFragmentManager) {
override fun getItem(position: Int): Fragment {
return fragments.get(position)
}
override fun getCount(): Int {
return fragments.size
}
}
view_page.adapter = adapter
view_page.offscreenPageLimit = 2
}
}
\ No newline at end of file
......@@ -20,8 +20,8 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_PROD;
// public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_PROD;
@Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......
......@@ -7,8 +7,11 @@ 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.dynamic.trendsHome.TrendsHomeFragment
import com.yidianling.home.ui.fragment.YdlHomeFragment
//import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
//import com.yidianling.home.ui.fragment.YdlHomeFragment
import com.yidianling.im.ui.page.NewMultiMessageFragment
......@@ -67,6 +70,9 @@ class FragmentContainerActivity : BaseLceActivity<DemoContract.View, DemoContra
if ("YdlHomeFragment" == fragmentName) {
return YdlHomeFragment()
}
if ("ExpertSearchFragment" == fragmentName) {
return ExpertSearchFragment()
}
return PlayFragment()
}
}
......@@ -2,8 +2,11 @@ package com.ydl.component.service.web;
import android.app.Activity;
import com.ydl.webview.H5JsBean;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.yidianling.common.tools.LogUtil;
/**
* webview 点击事件监听 抽象类
......@@ -19,7 +22,11 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public void openH5(H5JsBean.H5JsCmd.Params jsData) {
LogUtil.d("openH5 params: " + jsData.toString());
H5Params h5Params = new H5Params(jsData.getUrl(), null);
h5Params.setShareData(jsData.getShare());
h5Params.setShowMenu(jsData.getDot_flag());
NewH5Activity.start(mContext, h5Params);
}
@Override
......@@ -386,7 +393,9 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public void openShareMenu(H5JsBean.H5JsCmd.Params params) {
if (mContext instanceof NewH5Activity) {
((NewH5Activity) mContext).openShareMenu(params);
}
}
@Override
......@@ -413,4 +422,22 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
}
@Override
public void shouldShowTitleBar(boolean isShowTitleBar) {
if (mContext instanceof NewH5Activity) {
if (isShowTitleBar) {
((NewH5Activity) mContext).showTitleBar();
} else {
((NewH5Activity) mContext).hideJavaTitleBar();
}
}
}
@Override
public void setSelfPageType(int selfType) {
if (mContext instanceof NewH5Activity) {
((NewH5Activity) mContext).setSelfPageType(selfType);
}
}
}
......@@ -9,6 +9,7 @@ import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.log.LogHelper
import com.yidianling.common.tools.LogUtil
import com.yidianling.user.UserHelper
/**
* update by harvie on 2017/7/04
......@@ -48,9 +49,10 @@ class WebJavascriptHandler : IJavascriptHandler{
if (jsData.url.equals("http")) {
if (jsData.cmd?.params?.toUid != 0) {
wvEnventPro?.chat(ModularServiceManager.getPlatformUserService()?.getUser()?.userId?.toInt()?:0, jsData.cmd?.params?.toUid
?: 0, 0, ModularServiceManager.getPlatformUserService()?.getUser()?.token, jsData.cmd?.params?.isFromQingShu
wvEnventPro?.chat(
UserHelper.getUserInfo()?.uid?.toInt()
?: 0, jsData.cmd?.params?.toUid
?: 0, 0, UserHelper.getUserInfo()?.accessToken, jsData.cmd?.params?.isFromQingShu
?: 0)
} else {
wvEnventPro?.openH5(jsData.cmd?.params)
......@@ -367,6 +369,16 @@ class WebJavascriptHandler : IJavascriptHandler{
"chatUnread" -> {
wvEnventPro?.sendUnReadNum(jsData.cmd!!.params?.callBack, jsData.cmd!!.params?.uid.toString())
}
"showTitleBar" -> {
jsData.cmd!!.params?.let {
wvEnventPro?.shouldShowTitleBar(it.isShowTitleBar!!)
}
}
"setSelfPageType" -> {
jsData.cmd!!.params?.let {
wvEnventPro?.setSelfPageType(it.selfPageType)
}
}
}
}
}
......@@ -175,4 +175,11 @@ public interface WebViewClientClickListener {
// void storePic();
void sendUnReadNum(String callbackFuncName, String uid);
//是否展示标题栏
void shouldShowTitleBar(boolean isShowTitleBar);
//设置当前页面类型
void setSelfPageType(int selfType);
}
<?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="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/view_page"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
\ No newline at end of file
......@@ -42,18 +42,17 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.46",
"m-consultant" : "0.0.55",
"m-fm" : "0.0.27",
"m-user" : "0.0.45",
"m-home" : "0.0.17",
"m-im" : "0.0.10",
"m-dynamic" : "0.0.4",
"m-confide" : "0.0.47",
"m-consultant" : "0.0.56.1",
"m-fm" : "0.0.28",
"m-user" : "0.0.56",
"m-home" : "0.0.19",
"m-im" : "0.0.11",
"m-dynamic" : "0.0.5.1",
//flutter升级会涉及到以下三个
"m-muse" : "0.0.25",
"m-tests" : "0.0.20",
"m-course" : "0.0.39",
"m-muse" : "0.0.26",
"m-tests" : "0.0.21",
"m-course" : "0.0.40.1",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.5",
......@@ -65,19 +64,19 @@ ext {
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.9",
"m-home-api" : "0.0.3",
"m-im-api" : "0.0.7",
"m-im-api" : "0.0.8",
"m-dynamic-api" : "0.0.1",
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.36",
"ydl-platform" : "0.0.37",
//第二步 若干
"ydl-webview" : "0.0.35.1",
"ydl-media" : "0.0.19",
"ydl-pay" : "0.0.16",
"m-audioim" : "0.0.45",
"ydl-flutter-base": "0.0.9",
"ydl-webview" : "0.0.37.1",
"ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17",
"m-audioim" : "0.0.46",
"ydl-flutter-base": "0.0.10",
//以下 几乎不会动
"router" : "0.0.1",
......@@ -99,7 +98,7 @@ ext {
"m-dynamic" : "0.0.1.7",
"m-muse" : "0.0.20.7",
"m-tests" : "0.0.15.7",
"m-tests" : "0.0.18.1",
"m-course" : "0.0.34.10",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.5",
......@@ -111,19 +110,19 @@ ext {
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.9",
"m-home-api" : "0.0.3",
"m-im-api" : "0.0.7",
"m-im-api" : "0.0.8",
"m-dynamic-api" : "0.0.1",
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.36",
"ydl-platform" : "0.0.37",
//第二步 若干
"ydl-webview" : "0.0.35.1",
"ydl-media" : "0.0.19",
"ydl-pay" : "0.0.16",
"m-audioim" : "0.0.45",
"ydl-flutter-base": "0.0.9",
"ydl-webview" : "0.0.37.1",
"ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17",
"m-audioim" : "0.0.46",
"ydl-flutter-base": "0.0.10",
//以下 几乎不会动
"router" : "0.0.1",
......
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-consultant-api"
//开发时注释掉版本号,发布api时打开
// version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import android.text.TextUtils
import com.google.gson.Gson
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.lifecycle.IActivityLifecycleable
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.mvp.base.SimplePresenter
......@@ -12,7 +11,6 @@ import com.ydl.ydlcommon.utils.RxLifecycleUtils
import com.ydl.ydlcommon.utils.YDLAsyncUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.yidianling.common.tools.ToastUtil
import com.yidianling.consultant.http.ExpertSearchDataManager
import com.yidianling.consultant.model.SearchApi
import com.yidianling.consultant.model.bean.AllFilter
......@@ -134,10 +132,10 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
if (allFilter.others.isNotEmpty()) {
sb.append("&others=").append(allFilter.others.map { it.key }.joinToString(","))
}
if (allFilter.showType.key != null) {
showType = allFilter.showType.key!!
sb.append("&showType=").append(allFilter.showType.key!!)
}
// if (allFilter.showType.key != null) {
// showType = allFilter.showType.key!!
// sb.append("&showType=").append(allFilter.showType.key!!)
// }
if(allFilter.title.isNotEmpty()){
sb.append("&title=").append(allFilter.title.map { it.key }.joinToString(","))
}
......@@ -153,11 +151,12 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
if (null != it.list && !it.list!!.isEmpty()) {
if (showType == 0) {
mView.onDoctorListFetched(it.list!!, page, it.pages)
} else {
mView.onServiceListFetched(it.list!!, page, it.pages)
}
// if (showType == 0) {
// mView.onDoctorListFetched(it.list!!, page, it.pages)
// } else {
// mView.onServiceListFetched(it.list!!, page, it.pages)
// }
mView.onDoctorListFetched(it.list!!, page, it.pages)
//更新缓存 只更新第一页的缓存
if (page == 1){
updateCache(showType,it)
......
......@@ -133,7 +133,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
private fun reset() {
tempFilter.showType = filterData.showType[1]
tempFilter.showType = filterData.showType[0]
tempFilter.ages.clear()
tempFilter.enquiries.clear()
tempFilter.others.clear()
......
......@@ -18,6 +18,8 @@ import android.widget.AdapterView
import android.widget.LinearLayout
import android.widget.TextView
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.media.audio.AudioPlayer
import com.ydl.media.view.PlayerFloatHelper
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.BaseActivity
......@@ -730,6 +732,15 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler
getData(false)
}
override fun onDestroy() {
super.onDestroy()
if (!PlayerFloatHelper.isCanClick) {
PlayerFloatHelper.hide()
PlayerFloatHelper.removeView(this)
AudioPlayer.get().stopPlayer()
}
}
override fun onResume() {
super.onResume()
......
......@@ -141,7 +141,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
@Override
public void initDataAndEventLazy() {
initDatas();
// initDatas();
}
private void initViews() {
......
......@@ -101,11 +101,12 @@ public class TrendsContentListFragment extends BaseFragment implements ITrendsLi
public void initDataAndEvent() {
initDatas();
initViews();
onRefresh();
}
@Override
public void initDataAndEventLazy() {
onRefresh();
}
private void initViews() {
......
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-home-api"
//开发时注释掉版本号,发布api时打开
// version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -126,9 +126,22 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
docInfo.tag1 = expert.shareData.tag1;
docInfo.doctorBriefInfoFeedbackRate = expert.doctorBriefInfo.feedbackRate;
docInfo.doctorBriefInfoFeedbackRateForShow = expert.doctorBriefInfo.feedbackRateForShow;
docInfo.doctorBriefInfoHelpLong = expert.doctorBriefInfo.helpLong;
docInfo.doctorBriefInfoOrderNum = expert.doctorBriefInfo.orderNum;
docInfo.doctorBriefInfoSmallImage = expert.doctorBriefInfo.smallImage;
docInfo.isFollowed = expert.shareData.isFollowed;
docInfo.commentCounter = expert.commentCounter;
docInfo.commentCounterUrl = expert.commentCounterUrl;
if (docInfo.commentList == null) {
docInfo.commentList = new ArrayList();
}
docInfo.commentList.clear();
if (expert.commentList != null) {
docInfo.commentList.addAll(expert.commentList);
}
}
public P2PCustomActionHandlerImpl(String toChatUsername,
......
......@@ -13,6 +13,7 @@ import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlcommon.base.BaseApp;
import com.ydl.ydlcommon.base.config.YDLConstants;
import com.ydl.ydlcommon.utils.YDLCacheUtils;
import com.yidianling.im.BuildConfig;
import com.yidianling.im.R;
import com.yidianling.im.config.constants.UserPreferences;
import com.yidianling.im.config.provider.CustomUserInfoProvider;
......@@ -43,8 +44,10 @@ class NimSDKOptionConfig {
String appEnv = BaseApp.Companion.getInstance().getGlobalConfig().getAppEnv();
//debug包根据url判断使用正式或者测试key
if (!TextUtils.isEmpty(YDLCacheUtils.Companion.getCacheApi())) {
if (YDLConstants.ENV_TEST.equals(appEnv)) {
String cacheAppEnv = YDLCacheUtils.Companion.getCacheApi();
//这边不能加BuildConfig.DEBUG,因为发布了aar之后,必定为release,导致切换云信的环境失败
if (!TextUtils.isEmpty(cacheAppEnv)) {
if (YDLConstants.ENV_TEST.equals(cacheAppEnv)) {
options.appKey = "9a8cefe97b7690537fc1334091af9208";
} else {
options.appKey = "4e258ba5cdf489fa188274ebf0fb5669";
......
package com.yidianling.uikit.business.session.activity;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.WindowManager;
......@@ -26,9 +28,13 @@ import com.yidianling.uikit.api.NimUIKit;
import com.yidianling.uikit.business.session.fragment.YDLMessageFragment;
import com.yidianling.uikit.custom.bridge.ActionHandlerStorage;
import com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler;
import com.yidianling.uikit.custom.http.ServiceImpl;
import java.util.List;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
/**
* 点对点聊天界面
* <p/>
......
package com.yidianling.uikit.business.session.fragment;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.StateListDrawable;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.constraint.ConstraintLayout;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
......@@ -36,8 +37,11 @@ import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.netease.nimlib.sdk.msg.model.MemberPushOption;
import com.netease.nimlib.sdk.msg.model.MessageReceipt;
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.YdlBuryPointUtil;
import com.ydl.ydlcommon.utils.log.LogHelper;
......@@ -63,6 +67,8 @@ import com.yidianling.uikit.business.session.module.list.MessageListPanelEx;
import com.yidianling.uikit.business.session.view.ChatPrivateTips;
import com.yidianling.uikit.business.session.view.CollectInfoPopupWindow;
import com.yidianling.uikit.business.session.view.CommonQuestionView;
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.IP2PCustomActionHandler;
import com.yidianling.uikit.custom.http.ServiceImpl;
......@@ -70,13 +76,14 @@ import com.yidianling.uikit.custom.http.response.CommonQuestionBean;
import com.yidianling.uikit.custom.http.response.SubmitUserInfoBean;
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean;
import com.yidianling.uikit.custom.widget.ConfideOrderInfoView;
import com.yidianling.uikit.custom.widget.HalfCircleDrawable;
import com.yidianling.uikit.custom.widget.ExpertInfoDialog;
import com.yidianling.uikit.custom.widget.expertConsultService.view.ExpertConsultServiceListDialog;
import com.yidianling.user.api.service.IUserService;
import org.jetbrains.annotations.NotNull;
import org.json.JSONException;
import org.json.JSONObject;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
......@@ -136,16 +143,44 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private TextView server_num_tv; //服务时长
private TextView good_num_tv; //好评率
private TextView qingshu; //即时倾诉
private Boolean canConsultBtnClick = true; //即时倾诉按钮是否可点击
private ImageView qingshuImg; //预约咨询
private LinearLayout top_expert_info_ll;
private int expertInfoViewHeight = 0; // 专家信息栏高度
private RecyclerView messageListView;
private ConstraintLayout top_expert_info_cl;
private RelativeLayout rl_common_question_enter;
private FrameLayout fl_question_content;
private List<CommonQuestionBean> commonQuestionBeanList;
private LinearLayout comment_banner_view_ll;
private TextView tv_all_comment_desc;
private ImageView tv_all_comment_go;
private ImCommentBannerView comment_banner_view;
private ImRedStarGradeView good_num_icons;
private TextView im_focus_btn;
private LinearLayout top_view_container;
private LinearLayout constraint_ll;
private RelativeLayout rela_zixun;
private ValueAnimator anim_out;
private ValueAnimator anim_in;
private Boolean expertInfoViewIsIn = true;
private Boolean expertInfoViewIsAnimating = false;
private ExpertInfoDialog expertInfoDialog;
private ExpertConsultServiceListDialog expertConsultServiceListDialog;
private int IN_OUT_DURATION = 400;
private Boolean hasUpScroll = false;
private String help_num;// 帮助人数
private String server_num;// 服务时长
private String good_num;// 好评率
@SuppressLint("HandlerLeak")
private Handler mHandler = new Handler() {
@Override
......@@ -172,9 +207,18 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
help_num_tv = rootView.findViewById(R.id.help_num_tv);
server_num_tv = rootView.findViewById(R.id.server_num_tv);
good_num_tv = rootView.findViewById(R.id.good_num_tv);
top_expert_info_ll = rootView.findViewById(R.id.top_expert_info_ll);
top_expert_info_cl = rootView.findViewById(R.id.top_expert_info_cl);
qingshu = rootView.findViewById(R.id.action_qingshu);
qingshuImg = rootView.findViewById(R.id.action_qingshu_img);
comment_banner_view_ll = rootView.findViewById(R.id.comment_banner_view_ll);
tv_all_comment_desc = rootView.findViewById(R.id.tv_all_comment_desc);
tv_all_comment_go = rootView.findViewById(R.id.tv_all_comment_go);
comment_banner_view = rootView.findViewById(R.id.comment_banner_view);
messageListView = rootView.findViewById(R.id.messageListView); // 消息列表
top_view_container = rootView.findViewById(R.id.top_view_container); // 消息列表
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);
rela_zixun = rootView.findViewById(R.id.rela_zixun);
//和助理私聊时的常用语逻辑
rl_common_question_enter = rootView.findViewById(R.id.rl_common_question);
......@@ -241,6 +285,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 2) {
top_expert_info_cl.setVisibility(View.VISIBLE);
initTopCustomBar();
comment_banner_view_ll.setVisibility(View.VISIBLE);
initCommentBanner();
initAnimation(); // 初始化顶部布局的动画
initTopViewHeight(); //设置顶部专家信息栏高度
addScrollListener();
}
if (ActionHandlerStorage.getL(sessionId) != null) {
......@@ -263,13 +312,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
// 监听消息发送状态的变化通知
NIMClient.getService(MsgServiceObserve.class).observeMsgStatus(
new Observer<IMMessage>() {
@Override
public void onEvent(IMMessage imMessage) {
// 参数为有状态发生改变的消息对象,其 msgStatus 和 attachStatus 均为最新状态。
// 发送消息和接收消息的状态监听均可以通过此接口完成。
Log.e("hzs", "接收到消息状态变化-------MessageFragment");
}
(Observer<IMMessage>) imMessage -> {
// 参数为有状态发生改变的消息对象,其 msgStatus 和 attachStatus 均为最新状态。
// 发送消息和接收消息的状态监听均可以通过此接口完成。
Log.e("hzs", "接收到消息状态变化-------MessageFragment");
}, true);
......@@ -288,6 +334,143 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
isFirst = false;
ActionHandlerStorage.getL(sessionId).isNeedSendMsg(true);
}
//初始化私聊页面配置
initDefaultConfig();
}
@SuppressLint("CheckResult")
private void initDefaultConfig() {
ServiceImpl.Companion.getInstance().getChatViewConfig()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> {
if ("200".equals(res.code) && res.data != null && !TextUtils.isEmpty(res.data.getInputBoxReminder())) {
if (getInputPanel().getInputContent() == null || getInputPanel().getInputContent().equals("")) {
getInputPanel().setInputHintContent(res.data.getInputBoxReminder());
}
}
if ("200".equals(res.code) && res.data != null) {
if (res.data.getStatus() == 0) {
if (null != getActivity() && null != rela_zixun) {
rela_zixun.setVisibility(View.GONE);
}
}
}
}, throwable -> {
});
}
private void addScrollListener() {
messageListView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
}
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
if (dy < 0 && Math.abs(dy) > 15) {
hasUpScroll = true;
// 下滑
if (!expertInfoViewIsIn && !expertInfoViewIsAnimating) {
expertInfoViewIsAnimating = true;
anim_in.start();
}
} else if (dy > 0 && Math.abs(dy) > 15) {
if (expertInfoViewIsIn && !expertInfoViewIsAnimating && hasUpScroll) {
expertInfoViewIsAnimating = true;
anim_out.start();
}
}
}
});
}
private void initTopViewHeight() {
top_expert_info_ll.getViewTreeObserver().addOnGlobalLayoutListener(() -> expertInfoViewHeight = top_expert_info_ll.getHeight());
}
private void initAnimation() {
anim_out = newAnimation(0f, 1f);
anim_out.setDuration(IN_OUT_DURATION);
anim_in = newAnimation(1f, 0f);
anim_in.setDuration(IN_OUT_DURATION);
anim_in.addUpdateListener(animation -> {
if (expertInfoViewHeight != 0 && constraint_ll != null) {
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) constraint_ll.getLayoutParams();
params.topMargin = (int) (-expertInfoViewHeight * Float.valueOf(animation.getAnimatedValue().toString()));
constraint_ll.setLayoutParams(params);
}
});
anim_in.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
expertInfoViewIsIn = true;
expertInfoViewIsAnimating = false;
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
anim_out.addUpdateListener(animation -> {
if (expertInfoViewHeight != 0 && constraint_ll != null) {
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) constraint_ll.getLayoutParams();
params.topMargin = (int) (-expertInfoViewHeight * Float.valueOf(animation.getAnimatedValue().toString()));
constraint_ll.setLayoutParams(params);
}
});
anim_out.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
expertInfoViewIsIn = false;
expertInfoViewIsAnimating = false;
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
}
private ValueAnimator newAnimation(float fromYValue, float toYValue) {
ValueAnimator anim = ValueAnimator.ofFloat(fromYValue, toYValue);
return anim;
}
/**
......@@ -298,19 +481,40 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
String headUrl = ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoSmallImage;
if (!TextUtils.isEmpty(headUrl)) {
GlideApp.with(getActivity()).load(headUrl).into(small_head_img);
small_head_img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (ActionHandlerStorage.getL(sessionId) != null) {//
int userType = ActionHandlerStorage.getL(sessionId).getUserType();//1普通用户2专家3助理
if (userType == 1 || userType == 3) {
//跳转用户主页
ActionHandlerStorage.getL(sessionId).showUserHome();
} else if (userType == 2) {
//跳转专家主页
ActionHandlerStorage.getL(sessionId).showZhuanjPage();
}
}
}
});
}
// 帮助人数
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";
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";
server_num_tv.setText(server_num);
// 好评率
String good_num = String.format("%.2f", ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoFeedbackRate * 20);
if (TextUtils.isEmpty(good_num)) good_num = "0.00";
good_num_tv.setText(good_num + "%");
good_num = ActionHandlerStorage.getL(sessionId).getInfo().doctorBriefInfoFeedbackRateForShow;
if (TextUtils.isEmpty(good_num)) good_num = "0.0";
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)) {
IP2PCustomActionHandler.DocInfo info = ActionHandlerStorage.getL(sessionId).getInfo();
......@@ -321,6 +525,79 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
}
}
top_expert_info_cl.setOnClickListener(v -> {
if (null != getActivity()) {
if (expertInfoDialog == null) {
expertInfoDialog = new ExpertInfoDialog(getActivity(), help_num, server_num, good_num);
}
expertInfoDialog.show();
}
});
}
/**
* 初始化顶部专家信息栏下面的评论view
*/
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;
tv_all_comment_desc.setText(String.valueOf(commentCounter));
H5Params params = new H5Params(ActionHandlerStorage.getL(sessionId).getInfo().commentCounterUrl, "");
View.OnClickListener onClickListener = v -> NewH5Activity.start(getActivity(), params);
tv_all_comment_desc.setOnClickListener(onClickListener);
tv_all_comment_go.setOnClickListener(onClickListener);
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(ActionHandlerStorage.getL(sessionId).getInfo().doctorId, "1")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> {
if ("200".equals(res.code) && null != getActivity()) {
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 -> {
if (null != getActivity()) {
ActionHandlerStorage.getL(sessionId).getInfo().isFollowed = false;
// ToastUtil.toastShort(throwable.toString());
}
});
}
}
}
private void showTips() {
......@@ -328,98 +605,99 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
//初始化聊天顶部快捷菜单
@SuppressLint("CheckResult")
private void initMenu() {
View rela_zixun = rootView.findViewById(R.id.rela_zixun);
StateListDrawable consultDrawable = new StateListDrawable();
consultDrawable.addState(new int[]{android.R.attr.state_pressed}, new HalfCircleDrawable(getContext(), false, ContextCompat.getColor(getContext(), R.color.platform_color_F7F7F7)));
consultDrawable.addState(new int[]{}, new HalfCircleDrawable(getContext(), false, Color.WHITE));
rela_zixun.setBackground(consultDrawable);
TextView yuyue = (TextView) rootView.findViewById(R.id.action_yuyue);
rela_zixun.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
LogHelper.Companion.getInstance().writeLogSync("聊天界面点击预约");
if (ActionHandlerStorage.getL(sessionId) != null) {
try {
JSONObject jsb = new JSONObject();
jsb.put("button_name", "预约");
ActionHandlerStorage.getL(sessionId).buryPoint("messageClick", jsb);
} catch (Exception e) {
e.printStackTrace();
}
ActionHandlerStorage.getL(sessionId).showZhuanjPage();
rela_zixun.setOnClickListener(view -> {
if (sessionId != null && ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) {
if (expertConsultServiceListDialog == null) {
ServiceImpl.Companion.getInstance().serviceList(ActionHandlerStorage.getL(sessionId).getInfo().doctorId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> {
if (res.data != null && res.data.size() > 0) {
if (getActivity() != null && expertConsultServiceListDialog == null) {
expertConsultServiceListDialog = new ExpertConsultServiceListDialog(getActivity(), res.data);
expertConsultServiceListDialog.show();
}
} else {
ToastUtil.toastShort("咨询师暂未发布服务");
}
}, throwable -> {
});
} else {
ToastUtil.toastShort("请退出聊天重试");
expertConsultServiceListDialog.show();
}
}
});
//倾诉
RelativeLayout rela_qingsu = rootView.findViewById(R.id.rela_qingsu);
StateListDrawable confideDrawable = new StateListDrawable();
confideDrawable.addState(new int[]{android.R.attr.state_pressed}, new HalfCircleDrawable(getContext(), true, ContextCompat.getColor(getContext(), R.color.platform_color_F7F7F7)));
confideDrawable.addState(new int[]{}, new HalfCircleDrawable(getContext(), true, Color.WHITE));
rela_qingsu.setBackground(confideDrawable);
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo().listenerIsOpen == 1) {//开通倾诉
int status = ActionHandlerStorage.getL(sessionId).getInfo().isChatOnline;
if (status == 5) {
qingshu.setText("倾诉通话中...");
qingshu.setTextColor(Color.parseColor("#BFBFBF"));
qingshuImg.setImageResource(R.mipmap.im_chat_ico_calling);
canConsultBtnClick = false;
} else if (status == 3 || status == 4 || status == 6) {
qingshu.setText("即时倾诉");
qingshu.setTextColor(Color.parseColor("#BFBFBF"));
qingshuImg.setImageResource(R.mipmap.im_chat_ico_calling);
canConsultBtnClick = false;
} else {
qingshu.setText("即时倾诉");
qingshu.setTextColor(Color.parseColor("#242424"));
qingshuImg.setImageResource(R.mipmap.im_chat_ico_can_call);
canConsultBtnClick = true;
}
if (ActionHandlerStorage.getL(sessionId).getInfo().hasAvailableListenOrder == 2) {//有未完成订单
qingshu.setText("继续倾诉");
qingshu.setTextColor(Color.parseColor("#242424"));
qingshuImg.setImageResource(R.mipmap.im_chat_ico_calling);
canConsultBtnClick = true;
}
} else {
qingshu.setText("即时倾诉");
qingshu.setTextColor(Color.parseColor("#242424"));
qingshuImg.setImageResource(R.mipmap.im_chat_ico_can_call);
canConsultBtnClick = true;
}
rela_qingsu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (canConsultBtnClick) {
LogHelper.Companion.getInstance().writeLogSync("聊天界面点击电话倾诉");
if (ActionHandlerStorage.getL(sessionId) != null) {
try {
JSONObject jsb = new JSONObject();
jsb.put("button_name", "电话倾诉");
ActionHandlerStorage.getL(sessionId).buryPoint("messageClick", jsb);
JSONObject jsonObject = new JSONObject();
jsonObject.put("expert_id", ActionHandlerStorage.getL(sessionId).getInfo().doctorId);
jsonObject.put("expert_name", ActionHandlerStorage.getL(sessionId).getInfo().name);
jsonObject.put("listen_entrance", "私聊窗口");
ActionHandlerStorage.getL(sessionId).buryPoint("Listen_expert", jsonObject);
} catch (JSONException e) {
e.printStackTrace();
}
ActionHandlerStorage.getL(sessionId).confide();
} else {
ToastUtil.toastShort("请退出聊天重试");
}
}
ToastUtil.toastShort("请退出聊天重试");
}
});
//倾诉,不确定是否还要使用,暂留
// RelativeLayout rela_qingsu = rootView.findViewById(R.id.rela_qingsu);
// StateListDrawable confideDrawable = new StateListDrawable();
// confideDrawable.addState(new int[]{android.R.attr.state_pressed}, new HalfCircleDrawable(getContext(), true, ContextCompat.getColor(getContext(), R.color.platform_color_F7F7F7)));
// confideDrawable.addState(new int[]{}, new HalfCircleDrawable(getContext(), true, Color.WHITE));
// rela_qingsu.setBackground(confideDrawable);
//
// if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo().listenerIsOpen == 1) {//开通倾诉
// int status = ActionHandlerStorage.getL(sessionId).getInfo().isChatOnline;
// if (status == 5) {
// qingshu.setText("倾诉通话中...");
// qingshu.setTextColor(Color.parseColor("#BFBFBF"));
// qingshuImg.setImageResource(R.mipmap.im_chat_ico_calling);
// canConsultBtnClick = false;
// } else if (status == 3 || status == 4 || status == 6) {
// qingshu.setText("即时倾诉");
// qingshu.setTextColor(Color.parseColor("#BFBFBF"));
// qingshuImg.setImageResource(R.mipmap.im_chat_ico_calling);
// canConsultBtnClick = false;
// } else {
// qingshu.setText("即时倾诉");
// qingshu.setTextColor(Color.parseColor("#242424"));
// qingshuImg.setImageResource(R.mipmap.im_chat_ico_can_call);
// canConsultBtnClick = true;
// }
// if (ActionHandlerStorage.getL(sessionId).getInfo().hasAvailableListenOrder == 2) {//有未完成订单
// qingshu.setText("继续倾诉");
// qingshu.setTextColor(Color.parseColor("#242424"));
// qingshuImg.setImageResource(R.mipmap.im_chat_ico_calling);
// canConsultBtnClick = true;
// }
// } else {
// qingshu.setText("即时倾诉");
// qingshu.setTextColor(Color.parseColor("#242424"));
// qingshuImg.setImageResource(R.mipmap.im_chat_ico_can_call);
// canConsultBtnClick = true;
// }
//
//
// rela_qingsu.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// if (canConsultBtnClick) {
// LogHelper.Companion.getInstance().writeLogSync("聊天界面点击电话倾诉");
// if (ActionHandlerStorage.getL(sessionId) != null) {
// try {
// JSONObject jsb = new JSONObject();
// jsb.put("button_name", "电话倾诉");
// ActionHandlerStorage.getL(sessionId).buryPoint("messageClick", jsb);
//
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("expert_id", ActionHandlerStorage.getL(sessionId).getInfo().doctorId);
// jsonObject.put("expert_name", ActionHandlerStorage.getL(sessionId).getInfo().name);
// jsonObject.put("listen_entrance", "私聊窗口");
// ActionHandlerStorage.getL(sessionId).buryPoint("Listen_expert", jsonObject);
// } catch (JSONException e) {
// e.printStackTrace();
// }
// ActionHandlerStorage.getL(sessionId).confide();
// } else {
// ToastUtil.toastShort("请退出聊天重试");
// }
// }
// }
// });
}
private void initYiMenu() {
......@@ -487,6 +765,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@Override
public void onDestroy() {
comment_banner_view.onDestory();
super.onDestroy();
messageListPanel.onDestroy();
registerObservers(false);
......
......@@ -137,6 +137,11 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
messageEditText.setText(content == null ? "" : content);
}
//设置输入框hint内容
public void setInputHintContent(String content) {
messageEditText.setHint(content == null ? "" : content);
}
//获取当前聊天输入框内容
public String getInputContent() {
return messageEditText.getText().toString();
......@@ -296,7 +301,6 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
@Override
public void onFocusChange(View v, boolean hasFocus) {
messageEditText.setHint("");
checkSendButtonEnable(messageEditText);
}
});
......
package com.yidianling.uikit.business.session.view
import android.content.Context
import android.os.Handler
import android.os.Looper
import android.os.Message
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
import android.view.animation.Animation
import android.view.animation.DecelerateInterpolator
import android.view.animation.TranslateAnimation
import android.widget.LinearLayout
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.yidianling.im.R
import com.yidianling.im.api.bean.ImCommendDetailBean
import kotlinx.android.synthetic.main.im_real_view_in.view.*
import kotlinx.android.synthetic.main.im_real_view_left.view.*
import kotlinx.android.synthetic.main.im_real_view_out.view.*
class ImCommentBannerView : 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 val STATUS_IN = 0
private val STATUS_OUT = 1
private var curTipIndex = 0
private var lastTimeMillis: Long = 0
private val ANIM_DELAYED_MILLIONS = 3 * 1000
/**
* 动画持续时长
*/
private val ANIM_DURATION = 500
/**
* 进、出 两个view (主要用于做动画,其实是两个相同的布局文件)
*/
private var view_out: View? = null
private var view_in: View? = null
/**
* 进、出 两个View 的动画
*/
private var anim_out: Animation? = null
private var anim_in: Animation? = null
/**
* 数据缓存
*/
private var mDataList: ArrayList<ImCommendDetailBean>? = null
private val mHandler: Handler = object : Handler(Looper.getMainLooper()) {
override fun handleMessage(msg: Message?) {
super.handleMessage(msg)
updateTipAndPlayAnimation()
sendMessageDelayed(Message(), ANIM_DELAYED_MILLIONS.toLong())
}
}
private fun initViews() {
initView()
initAnimation()
}
/**
* 界面初始化
*/
private fun initView() {
orientation = HORIZONTAL
var params = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
)
View.inflate(mContext, R.layout.im_real_view_left, this)
view_out = View.inflate(mContext, R.layout.im_real_view_out, null)
view_in = View.inflate(mContext, R.layout.im_real_view_in, null)
imRealViewLeftFrameLayout.addView(view_out)
imRealViewLeftFrameLayout.addView(view_in)
layoutParams = params
}
private fun initAnimation() {
anim_out = newAnimation(0f, -1f)
anim_in = newAnimation(1f, 0f)
anim_in?.setAnimationListener(object : Animation.AnimationListener {
override fun onAnimationStart(animation: Animation) {
}
override fun onAnimationRepeat(animation: Animation) {
}
override fun onAnimationEnd(animation: Animation) {
updateViewVisibility()
}
})
}
/**
* 设置数据
*/
fun initData(list: ArrayList<ImCommendDetailBean>?) {
mHandler.removeCallbacksAndMessages(null)
if (null == list || list.isEmpty() || list.size == 0) {
visibility = View.INVISIBLE
return
}
visibility = View.VISIBLE
if (null == mDataList) {
mDataList = ArrayList()
} else {
(mDataList as ArrayList).clear()
}
(mDataList as ArrayList).addAll(list)
curTipIndex = 0
updateTip(STATUS_OUT)
updateTipAndPlayAnimation()
mHandler.sendMessageDelayed(Message(), ANIM_DELAYED_MILLIONS.toLong())
}
private fun updateViewVisibility() {
if (curTipIndex % 2 == 0) {
view_out?.visibility = View.INVISIBLE
} else {
view_in?.visibility = View.INVISIBLE
}
}
private fun newAnimation(fromYValue: Float, toYValue: Float): Animation {
val anim = TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f,
Animation.RELATIVE_TO_SELF, fromYValue, Animation.RELATIVE_TO_SELF, toYValue
)
anim.duration = ANIM_DURATION.toLong()
anim.interpolator = DecelerateInterpolator()
return anim
}
private fun updateTipAndPlayAnimation() {
view_in?.visibility = View.VISIBLE
view_out?.visibility = View.VISIBLE
if (curTipIndex % 2 == 0) {
updateTip(STATUS_OUT)
view_in?.startAnimation(anim_out)
view_out?.startAnimation(anim_in)
this.bringChildToFront(view_in)
} else {
updateTip(STATUS_IN)
view_out?.startAnimation(anim_out)
view_in?.startAnimation(anim_in)
this.bringChildToFront(view_out)
}
}
private fun updateTip(status: Int) {
val bodyBean = getNextTip() ?: return
mContext?.let {
when (status) {
STATUS_IN -> {
tv_in_comment_desc.text = bodyBean.commentContent
tv_in_content_before.text = getName(bodyBean.nickName)
view_in?.setOnClickListener {
val params: H5Params = H5Params(bodyBean.commentUrl, "")
mContext?.let {
NewH5Activity.start(mContext, params)
}
}
}
STATUS_OUT -> {
tv_out_comment_desc.text = bodyBean.commentContent
tv_out_content_before.text = getName(bodyBean.nickName)
view_out?.setOnClickListener {
val params: H5Params = H5Params(bodyBean.commentUrl, "")
mContext?.let {
NewH5Activity.start(mContext, params)
}
}
}
else -> {}
}
}
}
//获取经过加密的名字 : 徐**
private fun getName(name: String?): String {
var nameBuffer = StringBuffer()
name?.let {
nameBuffer.append(name[0])
nameBuffer.append("**:")
}
return nameBuffer.toString()
}
private fun getNextTip(): ImCommendDetailBean? {
if (null == mDataList || mDataList?.isEmpty()!!) {
return null
}
return mDataList!![curTipIndex++ % mDataList!!.size!!]
}
fun onDestory() {
mHandler.removeCallbacksAndMessages(null)
}
}
\ No newline at end of file
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
......@@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.Context;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.yidianling.im.api.bean.ImCommendDetailBean;
import com.yidianling.uikit.custom.http.response.RecommendExpertBean;
import org.json.JSONObject;
......@@ -144,10 +145,17 @@ public interface IP2PCustomActionHandler {
public int busyTotal = 0; //专家当前在与多少人聊天
public String tag1 = ""; //用与获取推荐专家列表接口的参数catName
public double doctorBriefInfoFeedbackRate = 0.000; //好评率 需要*100
public double doctorBriefInfoFeedbackRate = 0.000; //好评分
public String doctorBriefInfoFeedbackRateForShow = "";
public int doctorBriefInfoOrderNum = 0; //帮助人数
public int doctorBriefInfoHelpLong = 0; //服务时长
public String doctorBriefInfoSmallImage = ""; //小头像
public Boolean isFollowed = false; // 是否关注
public int commentCounter = 0;
public String commentCounterUrl = "";
public ArrayList<ImCommendDetailBean> commentList;
}
//消息中有11位数字,提示是否要隐藏中间5位 相关
......
......@@ -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_JAVA
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.yidianling.uikit.custom.http.response.ChatStatusBean
import com.yidianling.uikit.custom.http.response.CommonQuestionBean
import com.yidianling.uikit.custom.http.response.RecommendExpertBean
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean
import com.ydl.ydlcommon.data.http.BaseResponse
import com.yidianling.uikit.custom.http.response.*
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.*
......@@ -51,4 +49,19 @@ interface ServiceApi{
@POST("user/collect/submit")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun submitUserCollect(@Body body: RequestBody): Observable<BaseAPIResponse<Any>>
//关注
@GET("consult/expert-page/toggle-follow")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun focus(@Query("doctorId") doctorId: String, @Query("status") status: String): Observable<BaseAPIResponse<Any>>
//服务列表
@GET("consult/expert-page/products")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun serviceList(@Query("doctorId") doctorId: String): Observable<BaseAPIResponse<List<ServiceItemBean>>>
//获取输入框的hint内容
@GET("systemconfig/get-chat-view-config")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getChatViewConfig(): Observable<BaseAPIResponse<SystemInfoBean>>
}
\ No newline at end of file
......@@ -2,10 +2,7 @@ package com.yidianling.uikit.custom.http
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.uikit.custom.http.response.ChatStatusBean
import com.yidianling.uikit.custom.http.response.CommonQuestionBean
import com.yidianling.uikit.custom.http.response.RecommendExpertBean
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean
import com.yidianling.uikit.custom.http.response.*
import io.reactivex.Observable
import okhttp3.MediaType
import okhttp3.RequestBody
......@@ -13,7 +10,7 @@ import okhttp3.RequestBody
/**
* Created by xj on 2019/6/26.
*/
class ServiceImpl private constructor(){
class ServiceImpl private constructor() {
companion object {
val instance by lazy { ServiceImpl() }
......@@ -36,8 +33,13 @@ class ServiceImpl private constructor(){
/**
* 获取推荐专家列表
*/
fun getRecommendExpertList(doctorUid: Long, catName: String, limit: Int): Observable<BaseAPIResponse<ArrayList<RecommendExpertBean>>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).getRecommendExpertList(doctorUid, catName, limit)
fun getRecommendExpertList(
doctorUid: Long,
catName: String,
limit: Int
): Observable<BaseAPIResponse<ArrayList<RecommendExpertBean>>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java)
.getRecommendExpertList(doctorUid, catName, limit)
}
/**
......@@ -65,7 +67,31 @@ class ServiceImpl private constructor(){
* 上传采集的问题
*/
fun submitUserCollect(params: String): Observable<BaseAPIResponse<Any>> {
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)
}
/**
* 关注用户
*/
fun focus(doctorId: String, status: String): Observable<BaseAPIResponse<Any>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).focus(doctorId, status)
}
/**
* 服务列表
*/
fun serviceList(doctorId: String): Observable<BaseAPIResponse<List<ServiceItemBean>>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).serviceList(doctorId)
}
/**
* 获取输入框的hint内容
*/
fun getChatViewConfig(): Observable<BaseAPIResponse<SystemInfoBean>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).getChatViewConfig()
}
}
\ No newline at end of file
package com.yidianling.uikit.custom.http.response;
import java.util.List;
public class ServiceItemBean {
/**
* cateName : 亲子教育
* cateId : 23
* products : [{"productDto":{"id":91170418024616,"desc":"咨询师基本功训练及亲子咨疗。\r\nY值1868 \r\n好评率99%\r\n本服务仅为咨询师提供督导服务,非咨询师请勿购买本服务。","shortDesc":"心理学硕士、副教授、硕士生导师、壹点灵首席心理咨询专家,从业10年。","uid":2,"name":"督导咨询","originPrice":0,"productPrice":500,"packagePrice":1500,"isPackage":1,"periodNum":0,"packageNum":1,"dayFreeTimes":0,"activityType":1,"activityStartTime":null,"activityEndTime":null,"expiryDate":0,"totalServiceTime":0,"status":3,"auditStatus":3,"checkFailedReason":"","offShelfReason":"","serviceType":1,"isDelete":2,"sortOrder":27683,"createTime":"Apr 18, 2017 10:10:22 PM","updateTime":"Nov 7, 2019 11:36:55 AM","feedbackRate":5,"saleoutAmount":32,"expireDays":0,"aimEffect":"","advantage":"","extRemark":""},"productCategoryDto":{"id":233469,"categoryId1":23,"categoryId2":65,"categoryId3":0,"categoryName1":"亲子教育","categoryName2":"厌学","categoryName3":"心理咨询服务"},"productSpecDtos":[{"id":666956,"spec1":"1","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500},{"id":666957,"spec1":"2","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500},{"id":666958,"spec1":"4","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500},{"id":666959,"spec1":"3","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500},{"id":666960,"spec1":"5","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500}],"isPushToBg":0}]
*/
private String cateName;
private int cateId;
private List<ProductsBean> products;
public String getCateName() {
return cateName;
}
public void setCateName(String cateName) {
this.cateName = cateName;
}
public int getCateId() {
return cateId;
}
public void setCateId(int cateId) {
this.cateId = cateId;
}
public List<ProductsBean> getProducts() {
return products;
}
public void setProducts(List<ProductsBean> products) {
this.products = products;
}
public static class ProductsBean {
/**
* productDto : {"id":91170418024616,"desc":"咨询师基本功训练及亲子咨疗。\r\nY值1868 \r\n好评率99%\r\n本服务仅为咨询师提供督导服务,非咨询师请勿购买本服务。","shortDesc":"心理学硕士、副教授、硕士生导师、壹点灵首席心理咨询专家,从业10年。","uid":2,"name":"督导咨询","originPrice":0,"productPrice":500,"packagePrice":1500,"isPackage":1,"periodNum":0,"packageNum":1,"dayFreeTimes":0,"activityType":1,"activityStartTime":null,"activityEndTime":null,"expiryDate":0,"totalServiceTime":0,"status":3,"auditStatus":3,"checkFailedReason":"","offShelfReason":"","serviceType":1,"isDelete":2,"sortOrder":27683,"createTime":"Apr 18, 2017 10:10:22 PM","updateTime":"Nov 7, 2019 11:36:55 AM","feedbackRate":5,"saleoutAmount":32,"expireDays":0,"aimEffect":"","advantage":"","extRemark":""}
* productCategoryDto : {"id":233469,"categoryId1":23,"categoryId2":65,"categoryId3":0,"categoryName1":"亲子教育","categoryName2":"厌学","categoryName3":"心理咨询服务"}
* productSpecDtos : [{"id":666956,"spec1":"1","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500},{"id":666957,"spec1":"2","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500},{"id":666958,"spec1":"4","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500},{"id":666959,"spec1":"3","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500},{"id":666960,"spec1":"5","spec1Name":"服务方式","spec2":"60","spec2Name":"服务时长","price":500}]
* isPushToBg : 0
*/
private ProductDtoBean productDto;
private ProductCategoryDtoBean productCategoryDto;
private int isPushToBg;
private List<ProductSpecDtosBean> productSpecDtos;
public ProductDtoBean getProductDto() {
return productDto;
}
public void setProductDto(ProductDtoBean productDto) {
this.productDto = productDto;
}
public ProductCategoryDtoBean getProductCategoryDto() {
return productCategoryDto;
}
public void setProductCategoryDto(ProductCategoryDtoBean productCategoryDto) {
this.productCategoryDto = productCategoryDto;
}
public int getIsPushToBg() {
return isPushToBg;
}
public void setIsPushToBg(int isPushToBg) {
this.isPushToBg = isPushToBg;
}
public List<ProductSpecDtosBean> getProductSpecDtos() {
return productSpecDtos;
}
public void setProductSpecDtos(List<ProductSpecDtosBean> productSpecDtos) {
this.productSpecDtos = productSpecDtos;
}
public static class ProductDtoBean {
/**
* id : 91170418024616
* desc : 咨询师基本功训练及亲子咨疗。
Y值1868
好评率99%
本服务仅为咨询师提供督导服务,非咨询师请勿购买本服务。
* shortDesc : 心理学硕士、副教授、硕士生导师、壹点灵首席心理咨询专家,从业10年。
* uid : 2
* name : 督导咨询
* originPrice : 0.0
* productPrice : 500.0
* packagePrice : 1500.0
* isPackage : 1
* periodNum : 0
* packageNum : 1
* dayFreeTimes : 0
* activityType : 1
* activityStartTime : null
* activityEndTime : null
* expiryDate : 0
* totalServiceTime : 0
* status : 3
* auditStatus : 3
* checkFailedReason :
* offShelfReason :
* serviceType : 1
* isDelete : 2
* sortOrder : 27683
* createTime : Apr 18, 2017 10:10:22 PM
* updateTime : Nov 7, 2019 11:36:55 AM
* feedbackRate : 5.0
* saleoutAmount : 32
* expireDays : 0
* aimEffect :
* advantage :
* extRemark :
*/
private long id;
private String desc;
private String shortDesc;
private int uid;
private String name;
private double originPrice;
private double productPrice;
private double packagePrice;
private int isPackage; //2是套餐
private int periodNum;
private int packageNum;
private int dayFreeTimes;
private int activityType;
private Object activityStartTime;
private Object activityEndTime;
private int expiryDate;
private int totalServiceTime;
private int status;
private int auditStatus;
private String checkFailedReason;
private String offShelfReason;
private int serviceType;
private int isDelete;
private int sortOrder;
private String createTime;
private String updateTime;
private double feedbackRate;
private int saleoutAmount;
private int expireDays;
private String aimEffect;
private String advantage;
private String extRemark;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getShortDesc() {
return shortDesc;
}
public void setShortDesc(String shortDesc) {
this.shortDesc = shortDesc;
}
public int getUid() {
return uid;
}
public void setUid(int uid) {
this.uid = uid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getOriginPrice() {
return originPrice;
}
public void setOriginPrice(double originPrice) {
this.originPrice = originPrice;
}
public double getProductPrice() {
return productPrice;
}
public void setProductPrice(double productPrice) {
this.productPrice = productPrice;
}
public double getPackagePrice() {
return packagePrice;
}
public void setPackagePrice(double packagePrice) {
this.packagePrice = packagePrice;
}
public int getIsPackage() {
return isPackage;
}
public void setIsPackage(int isPackage) {
this.isPackage = isPackage;
}
public int getPeriodNum() {
return periodNum;
}
public void setPeriodNum(int periodNum) {
this.periodNum = periodNum;
}
public int getPackageNum() {
return packageNum;
}
public void setPackageNum(int packageNum) {
this.packageNum = packageNum;
}
public int getDayFreeTimes() {
return dayFreeTimes;
}
public void setDayFreeTimes(int dayFreeTimes) {
this.dayFreeTimes = dayFreeTimes;
}
public int getActivityType() {
return activityType;
}
public void setActivityType(int activityType) {
this.activityType = activityType;
}
public Object getActivityStartTime() {
return activityStartTime;
}
public void setActivityStartTime(Object activityStartTime) {
this.activityStartTime = activityStartTime;
}
public Object getActivityEndTime() {
return activityEndTime;
}
public void setActivityEndTime(Object activityEndTime) {
this.activityEndTime = activityEndTime;
}
public int getExpiryDate() {
return expiryDate;
}
public void setExpiryDate(int expiryDate) {
this.expiryDate = expiryDate;
}
public int getTotalServiceTime() {
return totalServiceTime;
}
public void setTotalServiceTime(int totalServiceTime) {
this.totalServiceTime = totalServiceTime;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public int getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(int auditStatus) {
this.auditStatus = auditStatus;
}
public String getCheckFailedReason() {
return checkFailedReason;
}
public void setCheckFailedReason(String checkFailedReason) {
this.checkFailedReason = checkFailedReason;
}
public String getOffShelfReason() {
return offShelfReason;
}
public void setOffShelfReason(String offShelfReason) {
this.offShelfReason = offShelfReason;
}
public int getServiceType() {
return serviceType;
}
public void setServiceType(int serviceType) {
this.serviceType = serviceType;
}
public int getIsDelete() {
return isDelete;
}
public void setIsDelete(int isDelete) {
this.isDelete = isDelete;
}
public int getSortOrder() {
return sortOrder;
}
public void setSortOrder(int sortOrder) {
this.sortOrder = sortOrder;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public double getFeedbackRate() {
return feedbackRate;
}
public void setFeedbackRate(double feedbackRate) {
this.feedbackRate = feedbackRate;
}
public int getSaleoutAmount() {
return saleoutAmount;
}
public void setSaleoutAmount(int saleoutAmount) {
this.saleoutAmount = saleoutAmount;
}
public int getExpireDays() {
return expireDays;
}
public void setExpireDays(int expireDays) {
this.expireDays = expireDays;
}
public String getAimEffect() {
return aimEffect;
}
public void setAimEffect(String aimEffect) {
this.aimEffect = aimEffect;
}
public String getAdvantage() {
return advantage;
}
public void setAdvantage(String advantage) {
this.advantage = advantage;
}
public String getExtRemark() {
return extRemark;
}
public void setExtRemark(String extRemark) {
this.extRemark = extRemark;
}
}
public static class ProductCategoryDtoBean {
/**
* id : 233469
* categoryId1 : 23
* categoryId2 : 65
* categoryId3 : 0
* categoryName1 : 亲子教育
* categoryName2 : 厌学
* categoryName3 : 心理咨询服务
*/
private int id;
private int categoryId1;
private int categoryId2;
private int categoryId3;
private String categoryName1;
private String categoryName2;
private String categoryName3;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getCategoryId1() {
return categoryId1;
}
public void setCategoryId1(int categoryId1) {
this.categoryId1 = categoryId1;
}
public int getCategoryId2() {
return categoryId2;
}
public void setCategoryId2(int categoryId2) {
this.categoryId2 = categoryId2;
}
public int getCategoryId3() {
return categoryId3;
}
public void setCategoryId3(int categoryId3) {
this.categoryId3 = categoryId3;
}
public String getCategoryName1() {
return categoryName1;
}
public void setCategoryName1(String categoryName1) {
this.categoryName1 = categoryName1;
}
public String getCategoryName2() {
return categoryName2;
}
public void setCategoryName2(String categoryName2) {
this.categoryName2 = categoryName2;
}
public String getCategoryName3() {
return categoryName3;
}
public void setCategoryName3(String categoryName3) {
this.categoryName3 = categoryName3;
}
}
public static class ProductSpecDtosBean {
/**
* id : 666956
* spec1 : 1
* spec1Name : 服务方式
* spec2 : 60
* spec2Name : 服务时长
* price : 500.0
*/
private int id;
private String spec1;
private String spec1Name;
private String spec2;
private String spec2Name;
private double price;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getSpec1() {
return spec1;
}
public void setSpec1(String spec1) {
this.spec1 = spec1;
}
public String getSpec1Name() {
return spec1Name;
}
public void setSpec1Name(String spec1Name) {
this.spec1Name = spec1Name;
}
public String getSpec2() {
return spec2;
}
public void setSpec2(String spec2) {
this.spec2 = spec2;
}
public String getSpec2Name() {
return spec2Name;
}
public void setSpec2Name(String spec2Name) {
this.spec2Name = spec2Name;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
}
}
}
package com.yidianling.uikit.custom.http.response
class SystemInfoBean(
val inputBoxReminder: String,
val status: Int
)
\ No newline at end of file
......@@ -56,6 +56,7 @@ public class ConfideOrderInfoView extends RelativeLayout {
LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
params.leftMargin = RxImageTool.dp2px(8f);
params.rightMargin = RxImageTool.dp2px(8f);
params.topMargin = RxImageTool.dp2px(10f);
setLayoutParams(params);
View.inflate(mContext, R.layout.im_nim_chat_confide_order_info_view, this);
setBackground(getResources().getDrawable(R.drawable.im_bg_im_confide_action));
......
package com.yidianling.uikit.custom.widget
import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.Gravity
import android.view.WindowManager
import com.yidianling.im.R
import kotlinx.android.synthetic.main.im_expert_info_dialog_layout.*
import kotlinx.android.synthetic.main.im_safe_help_remind_dialog_layout.*
/**
* 专家信息弹窗
* Created by xj on 2019/8/7.
*/
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?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.im_expert_info_dialog_layout)
val params = window.attributes
params.width = WindowManager.LayoutParams.MATCH_PARENT
params.height = WindowManager.LayoutParams.WRAP_CONTENT
window.setGravity(Gravity.CENTER)
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 {
if (null != mContext) {
dismiss()
}
}
}
}
\ No newline at end of file
package com.yidianling.uikit.custom.widget.expertConsultService.callback
import com.yidianling.uikit.custom.http.response.ServiceItemBean
interface ConsultServiceViewCallback {
fun onCloseClick() {}//关闭按钮点击
fun onBackClick() {}//返回列表点击
fun onItemClick(serviceId: ServiceItemBean.ProductsBean) {} //服务列表点击
}
\ No newline at end of file
package com.yidianling.uikit.custom.widget.expertConsultService.view
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.LinearLayout
import android.widget.RelativeLayout
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.config.GlobalConfig
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.bean.GlobalInfo
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.im.R
import com.yidianling.uikit.custom.http.response.ServiceItemBean
import com.yidianling.uikit.custom.widget.expertConsultService.callback.ConsultServiceViewCallback
import kotlinx.android.synthetic.main.im_expert_consult_service_detail_view.view.*
class ExpertConsultServiceDetailView : RelativeLayout {
constructor(context: Context, listener: ConsultServiceViewCallback) : super(context) {
mListener = listener
mContext = context
initView()
}
private var mListener: ConsultServiceViewCallback? = null
private var mContext: Context? = null
private fun initView() {
val mWidth: Int = RxDeviceTool.getScreenWidth(mContext)
val mHeight: Int = LayoutParams.MATCH_PARENT
val params = LayoutParams(
mWidth,
mHeight
)
params.height = mHeight
layoutParams = params
View.inflate(mContext, R.layout.im_expert_consult_service_detail_view, this)
im_expert_service_list_left_back_btn.setOnClickListener {
mListener?.onBackClick()
}
}
/**
* 设置数据
*/
fun updateData(bean: ServiceItemBean.ProductsBean) {
val mCompare: Comparator<ServiceItemBean.ProductsBean.ProductSpecDtosBean> = Comparator { o1, o2 ->
val res = o1.price.compareTo(o2.price)
when {
res == 0 -> 0
res > 0 -> -1
else -> 1
}
}
if (bean.productSpecDtos != null && bean.productSpecDtos.size > 0) {
val mBean: ServiceItemBean.ProductsBean.ProductSpecDtosBean = bean.productSpecDtos.sortedWith(mCompare).last()
//价格,取productSpecDtos数组最后一个价格,不保留小数
consult_service_service_price.text = String.format(
"%.0f",
mBean.price
)
if (bean.productDto.isPackage == 2) {
consult_service_price_right.text = "/${mBean.spec2}分钟" //例: 套餐展示"/60分钟"
}else {
consult_service_price_right.text = "/次"//例: 不是套餐展示"/次"
}
}
consult_service_title.text = bean.productDto.name ?: ""
consult_service_desc.text = bean.productDto.desc ?: ""
//是否是套餐
if (bean.productDto.isPackage == 2) {
consult_service_is_package.text = "套餐"
consult_service_times.text = "${bean.productDto.packageNum}次"
//起售次数展示
consult_service_low_buy_time.visibility = View.VISIBLE
consult_service_low_buy_time.text = "(${bean.productDto.packageNum}次起售)"
} else {
consult_service_is_package.text = "单次"
consult_service_times.text = "1次"
consult_service_low_buy_time.visibility = View.GONE
}
//可选时间类型
var timeStr = StringBuffer("")
var timeList: ArrayList<String> = ArrayList()
bean.productSpecDtos.forEach {
timeList.add(it.spec2)
}
//去重并按规则拼接
timeList.distinct().forEachIndexed { index, str ->
if (index == 0) {
timeStr.append("${str}分钟")
} else {
timeStr.append("/${str}分钟")
}
}
consult_service_once_time_type.text = timeStr.toString()
//可选服务类型
var serviceTypeStr = StringBuffer("")
var serviceTypeList: ArrayList<String> = ArrayList()
bean.productSpecDtos.forEach {
serviceTypeList.add(it.spec1)
}
//去重并按规则拼接
serviceTypeList.distinct().forEachIndexed { index, str ->
val typeStr = getServiceType(str)
if (typeStr != "未知") {
if (index == 0) {
serviceTypeStr.append("$typeStr")
} else {
serviceTypeStr.append("/$typeStr")
}
}
}
consult_service_service_type.text = serviceTypeStr.toString()
consult_service_btn.setOnClickListener {
NewH5Activity.start(mContext, H5Params(HttpConfig.MH5_URL + "consult/#/pages/DownOrder/DownOrder?product_id=" + bean.productDto.id, null))
}
}
private fun getServiceType(index: String): String {
return when (index) {
"1" -> {
"文字"
}
"2" -> {
"电话"
}
"3" -> {
"当面"
}
"4" -> {
"视频"
}
else -> {
"未知"
}
}
}
}
\ No newline at end of file
package com.yidianling.uikit.custom.widget.expertConsultService.view
import android.annotation.SuppressLint
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.LinearLayout
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.config.HttpConfig
import com.yidianling.im.R
import com.yidianling.uikit.custom.http.response.ServiceItemBean
import com.yidianling.uikit.custom.widget.expertConsultService.callback.ConsultServiceViewCallback
import kotlinx.android.synthetic.main.im_expert_consult_service_item_view.view.*
class ExpertConsultServiceItemView : LinearLayout {
constructor(context: Context, listener: ConsultServiceViewCallback?) : super(context) {
mListener = listener
mContext = context
initView()
}
private var mContext: Context? = null
private var mListener: ConsultServiceViewCallback? = null
private fun initView() {
val mWidth: Int = LayoutParams.MATCH_PARENT
val mHeight: Int = LayoutParams.WRAP_CONTENT
val params = LayoutParams(
mWidth,
mHeight
)
params.height = mHeight
layoutParams = params
orientation = HORIZONTAL
View.inflate(mContext, R.layout.im_expert_consult_service_item_view, this)
}
/**
* 设置数据
*/
@SuppressLint("SetTextI18n")
fun setData(bean: ServiceItemBean.ProductsBean) {
//是否是套餐
if (bean.productDto.isPackage == 2) {
//展示左上角套餐布局
service_item_package.visibility = View.VISIBLE
//服务名
service_item_title.text = " ${bean.productDto.name}"
//起售次数展示
service_item_low_buy_time.visibility = View.VISIBLE
service_item_low_buy_time.text = "(${bean.productDto.packageNum}次起售)"
} else {
//隐藏套餐布局
service_item_package.visibility = View.GONE
//服务名
service_item_title.text = bean.productDto.name ?: ""
//隐藏起售次数限制
service_item_low_buy_time.visibility = View.GONE
}
val mCompare: Comparator<ServiceItemBean.ProductsBean.ProductSpecDtosBean> = Comparator { o1, o2 ->
val res = o1.price.compareTo(o2.price)
when {
res == 0 -> 0
res > 0 -> -1
else -> 1
}
}
if (bean.productSpecDtos != null && bean.productSpecDtos.size > 0) {
val mBean: ServiceItemBean.ProductsBean.ProductSpecDtosBean = bean.productSpecDtos.sortedWith(mCompare).last()
//价格,取productSpecDtos数组最小价格,不保留小数
service_item_price.text = String.format(
"%.0f",
mBean.price
)
//时间,取productSpecDtos数组最后一个的时间
service_item_time.text = "/${mBean.spec2}分钟"
}
//好评率,*20后 保留1位小数
service_item_feddbackrate.text = String.format(
"%.1f",
(bean.productDto.feedbackRate) * 20f
) + "%"
//销量
service_item_saleout_num.text = "销量${bean.productDto.saleoutAmount}"
setOnClickListener {
mListener?.onItemClick(bean)
}
im_expert_service_list_btn.setOnClickListener {
NewH5Activity.start(mContext, H5Params(HttpConfig.MH5_URL + "consult/#/pages/DownOrder/DownOrder?product_id=" + bean.productDto.id, null))
}
}
}
\ No newline at end of file
package com.yidianling.uikit.custom.widget.expertConsultService.view
import android.animation.ObjectAnimator
import android.animation.ValueAnimator
import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.support.v4.view.PagerAdapter
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import android.view.animation.TranslateAnimation
import android.widget.LinearLayout
import android.widget.ScrollView
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.im.R
import com.yidianling.uikit.custom.http.response.ServiceItemBean
import com.yidianling.uikit.custom.widget.expertConsultService.callback.ConsultServiceViewCallback
import kotlinx.android.synthetic.main.im_expert_consult_service_list_dialog_layout.*
/**
* 专家咨询服务列表弹框
* Created by xj on 2019/8/7.
*/
class ExpertConsultServiceListDialog(val mContext: Context, val mList: List<ServiceItemBean>): Dialog(mContext, R.style.dialog_default_style) {
private var mConsultServiceListView: ExpertConsultServiceView? = null
private var mConsultServiceDetailView: ExpertConsultServiceDetailView? = null
private var mViewList: ArrayList<View> = ArrayList()
private var mSelectType: String = "全部"
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.im_expert_consult_service_list_dialog_layout)
val params = window.attributes
params.width = WindowManager.LayoutParams.MATCH_PARENT
params.height = RxDeviceTool.getScreenHeight(mContext) - RxImageTool.dp2px(100f)
params.gravity = Gravity.BOTTOM
window.setWindowAnimations(R.style.bottom_to_top_dialog_style)
window.attributes = params
var typeList:ArrayList<String> = ArrayList()
typeList.add(mSelectType)//默认选中
mList.forEach { item ->
typeList.add(item.cateName)
}
mConsultServiceListView =
ExpertConsultServiceView(
mContext
)
(mConsultServiceListView as ExpertConsultServiceView).setDataAndClick(typeList, mList, object : ConsultServiceViewCallback {
override fun onCloseClick() {
dismiss()
}
override fun onItemClick(serviceBean: ServiceItemBean.ProductsBean) {
if (mConsultServiceDetailView != null) {
mConsultServiceDetailView?.updateData(serviceBean)
dialog_bottom_scroll_view.currentItem = 1
}
}
})
mViewList.add(mConsultServiceListView as View)
mConsultServiceDetailView =
ExpertConsultServiceDetailView(
mContext, object : ConsultServiceViewCallback {
override fun onBackClick() {
dialog_bottom_scroll_view.currentItem = 0
}
})
mViewList.add(mConsultServiceDetailView as View)
dialog_bottom_scroll_view.adapter = ConsultServicePagerAdapter()
dialog_bottom_scroll_view.currentItem = 0
setCanceledOnTouchOutside(true)
}
internal inner class ConsultServicePagerAdapter : PagerAdapter() {
override fun getCount(): Int {
return mViewList.size
}
override fun isViewFromObject(view: View, `object`: Any): Boolean {
return view === `object`
}
override fun instantiateItem(container: ViewGroup, position: Int): Any {
val view = mViewList[position]
container.addView(view)
return view
}
override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
container.removeView(`object` as View)
}
}
}
\ No newline at end of file
package com.yidianling.uikit.custom.widget.expertConsultService.view
import android.content.Context
import android.graphics.Color
import android.graphics.Typeface
import android.util.AttributeSet
import android.view.View
import android.widget.LinearLayout
import com.yidianling.im.R
import kotlinx.android.synthetic.main.im_expert_consult_service_type_item_view.view.*
class ExpertConsultServiceTypeItemView : LinearLayout {
constructor(context: Context) : super(context) {
mContext = context
initView()
}
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
mContext = context
initView()
}
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(
context,
attrs,
defStyle
) {
mContext = context
initView()
}
private var mContext: Context? = null
private fun initView() {
val mWidth: Int = LayoutParams.WRAP_CONTENT
val mHeight: Int = LayoutParams.WRAP_CONTENT
val params = LayoutParams(
mWidth,
mHeight
)
params.height = mHeight
layoutParams = params
View.inflate(mContext, R.layout.im_expert_consult_service_type_item_view, this)
}
/**
* 设置数据
*/
fun setData(typeString: String, isSelected: Boolean) {
im_expert_info_dialog_type_item_text.text = typeString
if (isSelected) {
im_expert_info_dialog_type_item_text.setTextColor((Color.parseColor("#1DA1F2")))
im_expert_info_dialog_type_item_text.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
im_expert_info_dialog_type_item_text.setBackgroundResource(R.drawable.im_expert_info_dialog_type_item_selected_bg)
} else {
im_expert_info_dialog_type_item_text.setTextColor((Color.parseColor("#999999")))
im_expert_info_dialog_type_item_text.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
im_expert_info_dialog_type_item_text.setBackgroundResource(R.drawable.im_expert_info_dialog_type_item_unselected_bg)
}
}
/**
* 更新状态
*/
fun updateStatus(isSelected: Boolean) {
if (isSelected) {
im_expert_info_dialog_type_item_text.setTextColor((Color.parseColor("#1DA1F2")))
im_expert_info_dialog_type_item_text.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
im_expert_info_dialog_type_item_text.setBackgroundResource(R.drawable.im_expert_info_dialog_type_item_selected_bg)
} else {
im_expert_info_dialog_type_item_text.setTextColor((Color.parseColor("#999999")))
im_expert_info_dialog_type_item_text.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
im_expert_info_dialog_type_item_text.setBackgroundResource(R.drawable.im_expert_info_dialog_type_item_unselected_bg)
}
}
}
\ No newline at end of file
package com.yidianling.uikit.custom.widget.expertConsultService.view
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.LinearLayout
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.im.R
import com.yidianling.uikit.custom.http.response.ServiceItemBean
import com.yidianling.uikit.custom.widget.expertConsultService.callback.ConsultServiceViewCallback
import kotlinx.android.synthetic.main.im_expert_consult_service_view.view.*
class ExpertConsultServiceView : LinearLayout {
private var typeSelectedIndex: Int = 0
private var mTypeList: ArrayList<String> = ArrayList()
private var mServiceList: ArrayList<ServiceItemBean> = ArrayList()
private var mListener: ConsultServiceViewCallback? = null
val mCompare: Comparator<ServiceItemBean.ProductsBean> = Comparator { o1, o2 ->
val res = o1.productDto.sortOrder.compareTo(o2.productDto.sortOrder)
when {
res == 0 -> 0
res > 0 -> -1
else -> 1
}
}
constructor(context: Context) : super(context) {
mContext = context
initView()
}
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
mContext = context
initView()
}
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(
context,
attrs,
defStyle
) {
mContext = context
initView()
}
private var mContext: Context? = null
private fun initView() {
val mWidth: Int = RxDeviceTool.getScreenWidth(mContext)
val mHeight: Int = LayoutParams.MATCH_PARENT
val params = LayoutParams(
mWidth,
mHeight
)
params.height = mHeight
layoutParams = params
orientation = VERTICAL
View.inflate(mContext, R.layout.im_expert_consult_service_view, this)
}
/**
* typeList 类型列表
* serviceList 服务列表
*/
fun setDataAndClick(
typeList: ArrayList<String>,
allServiceList: List<ServiceItemBean>,
listener: ConsultServiceViewCallback?
) {
mListener = listener
consult_service_dialog_close.setOnClickListener {
mListener?.onCloseClick()
}
// 设置顶部滚动类型数据
if (typeList == null || typeList.size == 0) {
expert_consult_service_top_scroll.visibility = View.GONE
} else {
mTypeList.clear()
mTypeList.addAll(typeList)
mContext?.let {
mTypeList.forEachIndexed { index, str ->
val item =
ExpertConsultServiceTypeItemView(
mContext!!
)
item.setData(str, index == typeSelectedIndex)
item.setOnClickListener {
typeSelectedIndex = index
resetSelected()
selectTypeServiceList()
}
expert_consult_service_type_list.addView(item)
}
}
}
typeSelectedIndex = 0 // 初始化为全部选中
mServiceList.clear()
mServiceList.addAll(allServiceList)
// 设置服务列表数据
selectTypeServiceList()
}
/**
* 刷新服务列表数据
*/
private fun selectTypeServiceList() {
expert_consult_service_service_list.removeAllViews()
if (mServiceList.size != 0) {
val lastList: ArrayList<ServiceItemBean.ProductsBean> = ArrayList()
mServiceList.forEachIndexed { index, itemBean ->
//当选中String相同的时候,添加view,或者选中typeSelectedIndex==0的时候,展示全部
if (itemBean.cateName == mTypeList[typeSelectedIndex] || typeSelectedIndex == 0) {
itemBean.products.forEach {
lastList.add(it)
}
}
}
lastList.sortedWith(mCompare).forEach {
val item = ExpertConsultServiceItemView(mContext!!, mListener)
item.setData(it)
expert_consult_service_service_list.addView(item)
}
}
}
/**
* 刷新类型列表数据
*/
private fun resetSelected() {
for (index in 0 until expert_consult_service_type_list.childCount) {
var view = expert_consult_service_type_list.getChildAt(index)
if (view is ExpertConsultServiceTypeItemView) {
view.updateStatus(index == typeSelectedIndex)
}
}
}
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ package com.yidianling.im.api.bean;
public class IMDoctorBriefInfo {
public String smallImage = "";
public double feedbackRate = 0.000;
public String feedbackRateForShow = "";
public int orderNum = 0;
public int helpLong = 0;
}
package com.yidianling.im.api.bean;
import java.util.ArrayList;
import java.util.List;
/**
* Created by hgw on 2018/3/13.
*/
......@@ -10,5 +13,8 @@ public class IMExpertBuild {
public String tips; //禁言提示内容
public String url;//禁言帮助URL
public IMDoctorBriefInfo doctorBriefInfo = new IMDoctorBriefInfo();
public List<ImCommendDetailBean> commentList = new ArrayList(); //评论列表
public int commentCounter = 0; //评论总数
public String commentCounterUrl = ""; //评论总数url
}
\ No newline at end of file
......@@ -41,6 +41,7 @@ public class IMShareDataBuild {
public String order_url;
@SerializedName(value = "name", alternate = "doctorName")
public String doctorName;
public Boolean isFollowed = false; // 是否关注
/**
* 是否开启电话倾诉
* 1.开启 2.关闭
......
package com.yidianling.im.api.bean
/**
* 评论细节bean
*/
class ImCommendDetailBean {
var nickName: String = ""
var commentContent: String = ""
var commentUrl: String = ""
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="300"
android:fromYDelta="0"
android:toYDelta="50%p" />
<alpha
android:duration="300"
android:fromAlpha="1.0"
android:toAlpha="0.0" />
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="300"
android:fromYDelta="100%p"
android:toYDelta="0" />
<alpha
android:duration="300"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
</set>
\ 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="15dp"
android:topRightRadius="15dp" />
<solid android:color="#ffffff"/>
</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:radius="12dp" />
<solid android:color="#EBF7FF"/>
</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:radius="12dp" />
<solid android:color="#F7F7F7"/>
</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:radius="19dp" />
<gradient android:startColor="#FF7A5C"
android:endColor="#FF406C"/>
</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:radius="14dp" />
<gradient android:startColor="#FF7A5C"
android:endColor="#FF406C"/>
</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:radius="1dp"/>
<solid android:color="#FF9500"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:parentTag="android.widget.RelativeLayout">
<ImageView
android:id="@+id/im_expert_service_list_left_back_btn"
android:layout_width="36dp"
android:layout_height="36.5dp"
android:paddingTop="4.5dp"
android:paddingBottom="16dp"
android:paddingLeft="15dp"
android:paddingRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/im_expert_service_list_left_back" />
<LinearLayout
android:id="@+id/consult_service_title_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginLeft="36dp"
android:orientation="horizontal"
android:paddingRight="15dp">
<TextView
android:id="@+id/consult_service_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="调节孕期情绪烦躁,建立积极心态面"
android:textColor="#1A1A1A"
android:textSize="20dp"
android:textStyle="bold" />
</LinearLayout>
<View
android:id="@+id/consult_service_line_1"
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_below="@+id/consult_service_title_ll"
android:background="#F5F7F7" />
<ScrollView
android:layout_below="@+id/consult_service_line_1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/consult_service_desc_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:layout_marginBottom="10dp"
android:text="服务介绍"
android:textColor="#242424"
android:textSize="18dp"
android:textStyle="bold" />
<TextView
android:id="@+id/consult_service_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="15dp"
android:text="相互了解,初步建立咨访关系,解答你心中关于咨询本身的一切疑惑,解答你心中关于咨询本身的一切疑惑,解答你心中关于咨询本身的一切疑惑,为你的困扰解决明确咨询目标与方案。相互了解,初步建立咨访关系,解答你心中关于咨询本身的一切疑惑,为你的困扰解决明确咨询目标与方案。相互了解,初步建立咨访关系,解答你心中关于咨询"
android:textColor="#666666"
android:fontFamily="sans-serif-thin"
android:textSize="14dp"
android:textStyle="bold" />
<View
android:id="@+id/consult_service_line_2"
android:layout_width="match_parent"
android:layout_height="6dp"
android:background="#F5F7F7" />
<TextView
android:id="@+id/consult_service_shuoming_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:layout_marginBottom="8dp"
android:text="服务说明"
android:textColor="#242424"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/consult_service_shuoming_1l_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="类型:"
android:textColor="#999999"
android:textSize="12dp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="次数:"
android:textColor="#999999"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/consult_service_shuoming_1l_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="2dp"
android:orientation="horizontal">
<TextView
android:id="@+id/consult_service_is_package"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="单次"
android:textColor="#242424"
android:textSize="14dp" />
<TextView
android:id="@+id/consult_service_times"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="1次"
android:textColor="#242424"
android:textSize="14dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/consult_service_shuoming_1l_3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="单次可选时长:"
android:textColor="#999999"
android:textSize="12dp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="支持方式:"
android:textColor="#999999"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/consult_service_shuoming_1l_4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="2dp"
android:orientation="horizontal">
<TextView
android:id="@+id/consult_service_once_time_type"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="30分钟/60分钟"
android:textColor="#242424"
android:textSize="14dp" />
<TextView
android:id="@+id/consult_service_service_type"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="电话/文字/视频/面对面"
android:textColor="#242424"
android:textSize="14dp" />
</LinearLayout>
<View
android:id="@+id/consult_service_line_3"
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_marginTop="18dp"
android:background="#F5F7F7" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_marginBottom="8dp"
android:text="咨询流程说明"
android:textColor="#242424"
android:textSize="18dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginBottom="70dp">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/expert_consult_service_icon_xiadan"
android:scaleType="fitXY"
android:layout_marginBottom="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下单预约"
android:textColor="#242424"
android:textSize="14dp"/>
</LinearLayout>
<ImageView
android:layout_width="16dp"
android:layout_height="8dp"
android:layout_gravity="top"
android:layout_marginTop="20dp"
android:src="@drawable/im_expert_service_to_right_icon"/>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/expert_consult_service_icon_queren"
android:scaleType="fitXY"
android:layout_marginBottom="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="咨询师确认"
android:textColor="#242424"
android:textSize="14dp"/>
</LinearLayout>
<ImageView
android:layout_width="16dp"
android:layout_height="8dp"
android:layout_gravity="top"
android:layout_marginTop="20dp"
android:src="@drawable/im_expert_service_to_right_icon"/>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/expert_consult_service_icon_jieting"
android:scaleType="fitXY"
android:layout_marginBottom="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="接听电话"
android:textColor="#242424"
android:textSize="14dp"/>
</LinearLayout>
<ImageView
android:layout_width="16dp"
android:layout_height="8dp"
android:layout_gravity="top"
android:layout_marginTop="20dp"
android:src="@drawable/im_expert_service_to_right_icon"/>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/expert_consult_service_icon_zixun"
android:scaleType="fitXY"
android:layout_marginBottom="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="开始咨询"
android:textColor="#242424"
android:textSize="14dp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/detail_bottom_ll"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:background="#ffffff">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="¥"
android:textColor="#FF5040"
android:textSize="12dp"
android:textStyle="bold"
android:layout_marginTop="4dp"/>
<TextView
android:id="@+id/consult_service_service_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textColor="#FF5040"
android:textSize="20dp"
android:textStyle="bold" />
<TextView
android:id="@+id/consult_service_price_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/次"
android:textColor="#666666"
android:textSize="10dp" />
<TextView
android:id="@+id/consult_service_low_buy_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="(几次起售)"
android:visibility="gone"
android:textColor="#666666"
android:textSize="10dp" />
</LinearLayout>
<TextView
android:id="@+id/consult_service_btn"
android:layout_width="125dp"
android:layout_height="38dp"
android:background="@drawable/im_expert_service_detail_btn_bg"
android:gravity="center"
android:text="立即预约"
android:textColor="#ffffff"
android:textSize="16dp"
android:textStyle="bold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#EBEBEB"
android:layout_alignTop="@+id/detail_bottom_ll"/>
</merge>
\ 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="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:orientation="vertical"
android:paddingTop="10dp"
android:paddingBottom="18dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/service_item_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text=" 调节孕期情绪烦躁,建立积极心态面对新生活"
android:textColor="#1A1A1A"
android:textSize="16dp"
android:textStyle="bold" />
<TextView
android:id="@+id/service_item_package"
android:layout_width="24dp"
android:layout_height="14dp"
android:gravity="center"
android:text="套餐"
android:visibility="gone"
android:layout_marginTop="3dp"
android:textColor="#ffffff"
android:textSize="10dp"
android:background="@drawable/im_service_package_bg"/>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="top"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="¥"
android:textColor="#FF5040"
android:textSize="9dp"
android:textStyle="bold"
android:layout_marginTop="4dp"/>
<TextView
android:id="@+id/service_item_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textColor="#FF5040"
android:textSize="16dp"
android:textStyle="bold"
android:layout_marginBottom="1dp"/>
</LinearLayout>
<TextView
android:id="@+id/service_item_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/0分钟"
android:textColor="#999999"
android:textSize="12dp" />
<TextView
android:id="@+id/service_item_low_buy_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="(几次起售)"
android:visibility="gone"
android:textColor="#999999"
android:textSize="12dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="好评率"
android:layout_marginLeft="10dp"
android:textColor="#999999"
android:textSize="12dp" />
<TextView
android:id="@+id/service_item_feddbackrate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0%"
android:layout_marginLeft="1dp"
android:textColor="#1A1A1A"
android:textSize="12dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|center"
android:paddingLeft="31dp"
android:paddingRight="18dp"
android:orientation="vertical">
<TextView
android:id="@+id/im_expert_service_list_btn"
android:layout_width="68dp"
android:layout_height="27dp"
android:background="@drawable/im_expert_service_list_btn_bg"
android:gravity="center"
android:text="预约"
android:textColor="#ffffff"
android:textSize="14dp"
android:textStyle="bold" />
<TextView
android:id="@+id/service_item_saleout_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="销量0"
android:textColor="#999999"
android:textSize="10dp" />
</LinearLayout>
</LinearLayout>
\ 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="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="15dp"
android:background="@drawable/im_expert_conslt_service_list_top_bg" />
<com.ydl.ydlcommon.view.NoScrollViewPager
android:id="@+id/dialog_bottom_scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff">
</com.ydl.ydlcommon.view.NoScrollViewPager>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="6dp">
<TextView
android:id="@+id/im_expert_info_dialog_type_item_text"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:paddingLeft="14dp"
android:paddingRight="14dp"
android:gravity="center"
tools:text="婚姻家庭"
android:textColor="#999999"
android:textSize="12dp"
android:background="@drawable/im_expert_info_dialog_type_item_unselected_bg"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="24dp"
>
<ImageView
android:id="@+id/consult_service_dialog_close"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/im_expert_service_list_left_delete"
android:layout_marginLeft="14dp"
android:scaleType="centerCrop"
android:layout_centerVertical="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="咨询服务"
android:textColor="#242424"
android:textSize="18dp"
android:textStyle="bold"
android:layout_centerInParent="true"/>
</RelativeLayout>
<HorizontalScrollView
android:id="@+id/expert_consult_service_top_scroll"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="6dp"
android:paddingLeft="15dp"
android:clipToPadding="false"
android:scrollbars="none">
<LinearLayout
android:id="@+id/expert_consult_service_type_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center_vertical">
</LinearLayout>
</HorizontalScrollView>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#EBEBEB"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/expert_consult_service_service_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
</ScrollView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
<string name="im_app_name">云信 Demo</string>
<string name="im_network_is_not_available">网络连接失败,请检查你的网络设置</string>
<!-- session -->
<string name="im_input_panel_audio_call">语音通话</string>
<string name="im_input_panel_video_call">视频通话</string>
<string name="im_input_panel_help">帮 助</string>
<string name="im_input_panel_send_card">发送客服名片</string>
<string name="im_input_panel_make_collections">发起收款</string>
<!-- 云信SDK所需文案 -->
<string name="im_nim_status_bar_multi_messages_incoming">%1$d位联系人有新消息</string>
<string name="im_nim_status_bar_ticker_text">%1$s有新消息</string>
<string name="im_nim_status_bar_image_message">%1$s发来一条图片消息</string>
<string name="im_nim_status_bar_audio_message">%1$s发来一条语音消息</string>
<string name="im_nim_status_bar_video_message">%1$s发来一条视频消息</string>
<string name="im_nim_status_bar_file_message">%1$s发来一条文件消息</string>
<string name="im_nim_status_bar_location_message">%1$s分享了一个地理位置</string>
<string name="im_nim_status_bar_notification_message">%1$s: 通知消息</string>
<string name="im_nim_status_bar_custom_message">%1$s: 自定义消息</string>
<string name="im_nim_status_bar_unsupported_message">%1$s: 无法显示该内容</string>
<string name="im_nim_status_bar_hidden_msg_content">你收到一条新消息</string>
<string name="im_details">了解详情</string>
<string name="im_input_panel_order">查看订单</string>
<string name="im_input_redpacket_action_text">红包</string>
<string name="im_input_panel_video_h5">电话/视频</string>
<string name="im_push_confide_msg_unopened">咨询师未开通倾诉服务</string>
<string name="im_push_confide_msg_offline">咨询师离线中,请私聊喊他上线</string>
<string name="im_push_confide_msg_busy">咨询师无可约时段,请私聊他增加新时段</string>
<string name="im_push_confide_msg_calling">咨询师正在通话中,请稍后再试</string>
<string name="im_approval">知道了</string>
<!--====================RES_AVCHAT====================-->
<!--====================RES_AVCHAT====================-->
<!--====================RES_AVCHAT====================-->
<string name="im_cancel">取消</string>
<string name="im_ok">确定</string>
<string name="im_empty">""</string>
<string name="im_save">保存</string>
<string name="im_online">正在直播</string>
<string name="im_loading">正在加载中...</string>
<string name="im_load_failed">加载失败,请点我重试</string>
<string name="im_load_end">没有更多数据</string>w
<string name="im_avchat_hangup">结束通话</string>
<string name="im_avchat_switch_to_video">切换视频</string>
<string name="im_avchat_switch_to_audio">切换语音</string>
<string name="im_avchat_video_call_request">请求视频聊天…</string>
<string name="im_avchat_audio_call_wifi_unavailable_tip">当前非WiFi环境,每分钟将产生约0.5M的流量</string>
<string name="im_avchat_network_grade_0">网络通畅:</string>
<string name="im_avchat_network_grade_1">网络正常:</string>
<string name="im_avchat_network_grade_2">网络一般:</string>
<string name="im_avchat_network_grade_3">网络较差:</string>
<string name="im_avchat_refuse">拒绝</string>
<string name="im_avchat_receive">开启</string>
<string name="im_avchat_pickup">接听</string>
<string name="im_avchat_net_error_then_quit">网络异常,通话结束</string>
<string name="im_avchat_call_finish">通话结束</string>
<string name="im_avchat_call_reject">被对方拒绝</string>
<string name="im_avchat_peer_protocol_low_version">对方版本过低,请提示对方升级</string>
<string name="im_avchat_local_protocol_low_version">版本过低,请升级后使用</string>
<string name="im_avchat_invalid_channel_id">对方已挂断</string>
<string name="im_avchat_local_call_busy">本地通话中,无法使用易信进行通话。</string>
<string name="im_avchat_peer_busy">对方正在通话中,请稍后再拨。</string>
<string name="im_avchat_wait_recieve">等待对方接听…</string>
<string name="im_avchat_audio_call_request">请求通话</string>
<string name="im_avchat_connecting">连接中…</string>
<string name="im_avchat_network_unstable_notificaton">当前网络不稳定</string>
<string name="im_avchat_peer_close_camera">对方关闭了摄像头</string>
<string name="im_avchat_local_close_camera">你关闭了摄像头</string>
<string name="im_avchat_audio_to_video_wait">正在等待对方开启摄像头…</string>
<string name="im_avchat_no_pick_up">未接听</string>
<string name="im_avchat_has_hangup">已挂断</string>
<string name="im_avchat_switch_video_reject">对方不同意音频切换为视频!</string>
<string name="im_avchat_notification">正在与%1$s通话中,点击继续</string>
<string name="im_avchat_call">网络通话</string>
<string name="im_avchat_no_pickup_call">未接听</string>
<string name="im_avchat_call_failed">发起通话失败</string>
<string name="im_avchat_no_permission">暂无权限,请开通音视频服务</string>
<string name="im_avchat_in_switch">请耐心等待!</string>
<string name="im_t_avchat_not_start_with_less_member">无法发起,人数少于2人</string>
<string name="im_t_avchat_start">发起了视频聊天</string>
<string name="im_t_avchat_create_room_fail">创建房间失败</string>
<string name="im_t_avchat_push_content">"[网络通话]"</string>
<string name="im_t_avchat_join_fail_not_exist">"加入房间失败,房间不存在"</string>
<string name="im_nrtc_setting_vie_crop_ratio_key">nrtc_setting_vie_crop_ratio_key</string>
<string name="im_nrtc_setting_vie_quality_key">nrtc_setting_vie_quality_key</string>
<string name="im_nrtc_setting_other_device_default_rotation_key">nrtc_setting_other_device_default_rotation_key</string>
<string name="im_nrtc_setting_other_device_rotation_fixed_offset_key">nrtc_setting_other_device_rotation_fixed_offset_key</string>
<string name="im_nrtc_setting_vie_rotation_key">nrtc_setting_vie_rotation_key</string>
<string name="im_nrtc_setting_vie_hw_encoder_key">nrtc_setting_vie_hw_encoder_key</string>
<string name="im_nrtc_setting_vie_hw_decoder_key">nrtc_setting_vie_hw_decoder_key</string>
<string name="im_nrtc_setting_other_server_record_audio_key">nrtc_setting_other_server_record_audio_key</string>
<string name="im_nrtc_setting_other_server_record_video_key">nrtc_setting_other_server_record_video_key</string>
<string name="im_nrtc_setting_voe_call_proximity_key">nrtc_setting_voe_call_proximity_key</string>
<string name="im_nrtc_setting_vie_fps_reported_key">nrtc_setting_vie_fps_reported_key</string>
<string name="im_nrtc_setting_vie_max_bitrate_key">nrtc_setting_vie_max_bitrate_key</string>
<string name="im_nrtc_setting_voe_audio_aec_key">nrtc_setting_voe_audio_aec_key</string>
<string name="im_nrtc_setting_voe_audio_ns_key">nrtc_setting_voe_audio_ns_key</string>
<string name="im_nrtc_setting_voe_high_quality_key">nrtc_setting_voe_high_quality_key</string>
<!--====================RES_UIKIT====================-->
<!--====================RES_UIKIT====================-->
<!--====================RES_UIKIT====================-->
<string name="im_clear_empty">清空</string>
<string name="im_iknow">知道了</string>
<string name="im_search">搜索</string>
<string name="im_remove">移除</string>
<string name="im_add">添加</string>
<string name="im_create">新建</string>
<string name="im_without_content">暂无</string>
<string name="im_close">关闭</string>
<string name="im_menu">菜单</string>
<string name="im_now_allow_space">不能含有空格</string>
<string name="im_readed">已读</string>
<string name="im_input_panel_photo">图 片</string>
<string name="im_input_panel_video">视 频</string>
<string name="im_input_panel_take">拍 摄</string>
<string name="im_repeat_download_message">重新下载?</string>
<string name="im_repeat_send_has_blank">重 发</string>
<string name="im_repeat_send_message">重发消息?</string>
<string name="im_copy_has_blank">复 制</string>
<string name="im_delete_has_blank">删 除</string>
<string name="im_voice_to_text">转文字</string>
<string name="im_forward_to_person">转发到个人</string>
<string name="im_forward_to_team">转发到群组</string>
<string name="im_withdrawn_msg">撤 回</string>
<string name="im_save_to_device">保存到手机</string>
<string name="im_picture_save_fail">图片保存失败</string>
<string name="im_picture_save_to">图片已保存到手机</string>
<string name="im_trans_voice_failed">语音转化失败</string>
<string name="im_team_invalid_tip">您已退出该群</string>
<string name="im_normal_team_invalid_tip">您已退出该讨论组</string>
<string name="im_team_send_message_not_allow">您已不在该群,不能发送消息</string>
<string name="im_send">发送</string>
<string name="im_unsupport_title">无法显示该内容</string>
<string name="im_unsupport_desc">客户端版本不支持该内容</string>
<string name="im_revoke_failed">发送时间超过2分钟的消息,不能被撤回</string>
<string name="im_pic_and_video">图片和视频</string>
<string name="im_black_list_send_tip">消息已发送,但对方拒收</string>
<!-- 语音 -->
<string name="im_record_audio">按住 说话</string>
<string name="im_record_audio_end">松开 结束</string>
<string name="im_sdcard_not_exist_error">请插入SD卡</string>
<string name="im_recording_error">录音失败,请重试</string>
<string name="im_recording_cancel">手指上滑,取消发送</string>
<string name="im_timer_default">00:00</string>
<string name="im_recording_cancel_tip">松开手指,取消发送</string>
<string name="im_recording_max_time">录音达到最大时间,是否发送?</string>
<!-- 拍照视频 -->
<string name="im_gallery_invalid">你的手机没有图库程序</string>
<string name="im_sdcard_not_enough_head_error">SD卡被拔出或存储空间不足,无法保存头像</string>
<string name="im_sdcard_not_enough_error">存储空间不足,无法保存此次多媒体消息</string>
<string name="im_download_video">正在下载视频</string>
<string name="im_download_video_fail">视频下载失败,请重试</string>
<string name="im_look_video_fail">无法播放该视频</string>
<string name="im_look_video_fail_try_again">暂时无法播放视频,请重试</string>
<string name="im_video_record">视频录制</string>
<string name="im_connect_vedio_device_fail">无法连接视频设备 ,请稍候再试</string>
<string name="im_capture_video_size_in_kb">视频文件大小为: %1$dKB,</string>
<string name="im_capture_video_size_in_mb">视频文件大小为: %1$.2fMB,</string>
<string name="im_is_send_video">是否发送该视频?</string>
<string name="im_start_camera_to_record_failed">启动摄像头录制视频失败</string>
<string name="im_stop_fail_maybe_stopped">停止失败,可能已经停止</string>
<string name="im_video_exception">视频文件异常</string>
<string name="im_im_choose_video_file_size_too_large">视频文件过大,系统限制为20MB</string>
<string name="im_im_choose_video">请选择3GP MP4格式的视频文件</string>
<string name="im_video_record_short">录制视频太短</string>
<string name="im_download_progress_description">%1$s(%2$s/%3$s)</string>
<!-- 联系人选择器 -->
<string name="im_contact_selector">联系人选择器</string>
<!-- team -->
<string name="im_team_need_authentication">需要身份验证</string>
<string name="im_team_allow_anyone_join">允许任何人加入</string>
<string name="im_team_not_allow_anyone_join">不允许任何人申请加入</string>
<string name="im_team_admin_invite">管理员邀请</string>
<string name="im_team_everyone_invite">所有人邀请</string>
<string name="im_team_admin_update">管理员修改</string>
<string name="im_team_everyone_update">所有人修改</string>
<string name="im_team_invitee_need_authen">需要验证</string>
<string name="im_team_invitee_not_need_authen">不需要验证</string>
<string name="im_team_notify_mute">不提醒任何消息</string>
<string name="im_team_notify_all">提醒所有消息</string>
<string name="im_team_notify_manager">只提醒管理员消息</string>
<string name="im_team_nickname">群昵称</string>
<string name="im_team_nickname_none">未填写</string>
<string name="im_team_identity">身份</string>
<string name="im_remove_member">移出本群</string>
<string name="im_team_member_info">成员信息</string>
<string name="im_team_admin">管理员</string>
<string name="im_team_creator">群主</string>
<string name="im_team_member">群成员</string>
<string name="im_update_success">保存成功</string>
<string name="im_update_failed">保存失败, code:%d</string>
<string name="im_no_permission">没有权限</string>
<string name="im_set_team_admin">设为管理员</string>
<string name="im_cancel_team_admin">取消管理员</string>
<string name="im_team_member_remove_confirm">确定要将其移出群组么?</string>
<string name="im_team_annourcement">群公告</string>
<string name="im_invite_member">邀请成员</string>
<string name="im_team_name">群名称</string>
<string name="im_team_introduce">群介绍</string>
<string name="im_team_extension">扩展示例</string>
<string name="im_click_set">点击设置</string>
<string name="im_reach_team_member_capacity">成员数量不能超过%1$d</string>
<string name="im_team_authentication">身份验证</string>
<string name="im_team_invite">邀请他人权限</string>
<string name="im_team_info_update">群资料修改权限</string>
<string name="im_team_invitee_authentication">被邀请人身份验证</string>
<string name="im_team_announce_title">标题</string>
<string name="im_team_announce_content">公告内容</string>
<string name="im_team_announce_notice">请输入群公告标题</string>
<string name="im_my_team_card">我的群名片</string>
<string name="im_team_introduce_hint">点击填写群介绍</string>
<string name="im_team_extension_hint">点击修改扩展内容</string>
<string name="im_team_announce_hint">点击填写群公告</string>
<string name="im_team_notification_config">消息提醒</string>
<string name="im_team_transfer_without_member">没有可转移的群成员</string>
<string name="im_team_invite_members_success">群成员邀请已发出</string>
<string name="im_team_transfer_success">群转移成功</string>
<string name="im_team_transfer_failed">群转移失败</string>
<string name="im_quit_team_success">您已退群</string>
<string name="im_quit_team_failed">退群失败</string>
<string name="im_quit_normal_team_success">您已经退出讨论组</string>
<string name="im_quit_normal_team_failed">退出讨论组失败</string>
<string name="im_dismiss_team_success">群已解散</string>
<string name="im_dismiss_team_failed">解散群失败</string>
<string name="im_dismiss_team">解散本群</string>
<string name="im_transfer_team">转让群</string>
<string name="im_quit_team">退出群</string>
<string name="im_quit_normal_team">退出讨论组</string>
<string name="im_team_name_toast">群名称不能为空</string>
<string name="im_not_allow_empty">不能为空</string>
<string name="im_team_settings_name">设置名称</string>
<string name="im_normal_team_name">讨论组名称</string>
<string name="im_remove_member_success">移除成员成功</string>
<string name="im_remove_member_failed">移除成员失败</string>
<string name="im_invite_member_success">邀请成员成功</string>
<string name="im_invite_member_failed">邀请成员失败</string>
<string name="im_team_settings_set_name">取个名字吧</string>
<string name="im_team_not_exist">该群不存在</string>
<string name="im_normal_team_not_exist">该讨论组不存在</string>
<string name="im_mute_msg">设置禁言</string>
<string name="im_set_head_image">设置头像</string>
<string name="im_team_update_cancel">取消更新</string>
<string name="im_team_update_failed">群头像设置失败</string>
<string name="im_reach_capacity">人数已达上限</string>
<!-- image picker -->
<string name="im_picker_image_preview">预览</string>
<string name="im_picker_image_send">发送</string>
<string name="im_picker_image_folder">相册</string>
<string name="im_picker_image_album_loading">相册加载中…</string>
<string name="im_picker_image_album_empty">相册中没有图片!</string>
<string name="im_picker_image_folder_info">共%d张</string>
<string name="im_picker_image_exceed_max_image_select">最多选择%d张图片!</string>
<string name="im_picker_image_send_select">完成(%d)</string>
<string name="im_picker_image_preview_original">发送原图</string>
<string name="im_picker_image_preview_original_select">发送原图(%s)</string>
<string name="im_picker_image_error">获取图片出错</string>
<string name="im_image_compressed_size">该原始图片大小为: %1$s,</string>
<string name="im_unknow_size">未知大小</string>
<string name="im_is_send_image">是否发送该原始图片?</string>
<string name="im_multi_image_compressed_size">原始图片总大小为: %1$s,</string>
<string name="im_is_send_multi_image">是否发送这些原始图片?</string>
<string name="im_waitfor_image_local">正在打开相册,请稍候\u2026</string>
<string name="im_recapture">重拍</string>
<string name="im_image_show_error">图片显示异常</string>
<string name="im_memory_out">内存不足</string>
<string name="im_choose_from_photo_album">从手机相册选择</string>
<string name="im_choose">选取</string>
<string name="im_crop">裁剪</string>
<string name="im_download_picture_fail">图片下载失败</string>
<string name="im_chat_private_title">私聊须知</string>
<string name="im_chat_pivate_content">如系统检测到涉黄、涉爆、涉政等信息,可能会封号处理并追究法律责任!</string>
<string name="im_video_play">视频播放</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
<string name="im_app_name">云信 Demo</string>
<string name="im_network_is_not_available">网络连接失败,请检查你的网络设置</string>
<!-- session -->
<string name="im_input_panel_audio_call">语音通话</string>
<string name="im_input_panel_video_call">视频通话</string>
<string name="im_input_panel_help">帮 助</string>
<string name="im_input_panel_send_card">发送客服名片</string>
<string name="im_input_panel_make_collections">发起收款</string>
<!-- 云信SDK所需文案 -->
<string name="im_nim_status_bar_multi_messages_incoming">%1$d位联系人有新消息</string>
<string name="im_nim_status_bar_ticker_text">%1$s有新消息</string>
<string name="im_nim_status_bar_image_message">%1$s发来一条图片消息</string>
<string name="im_nim_status_bar_audio_message">%1$s发来一条语音消息</string>
<string name="im_nim_status_bar_video_message">%1$s发来一条视频消息</string>
<string name="im_nim_status_bar_file_message">%1$s发来一条文件消息</string>
<string name="im_nim_status_bar_location_message">%1$s分享了一个地理位置</string>
<string name="im_nim_status_bar_notification_message">%1$s: 通知消息</string>
<string name="im_nim_status_bar_custom_message">%1$s: 自定义消息</string>
<string name="im_nim_status_bar_unsupported_message">%1$s: 无法显示该内容</string>
<string name="im_nim_status_bar_hidden_msg_content">你收到一条新消息</string>
<string name="im_details">了解详情</string>
<string name="im_input_panel_order">查看订单</string>
<string name="im_input_redpacket_action_text">红包</string>
<string name="im_input_panel_video_h5">电话/视频</string>
<string name="im_push_confide_msg_unopened">咨询师未开通倾诉服务</string>
<string name="im_push_confide_msg_offline">咨询师离线中,请私聊喊他上线</string>
<string name="im_push_confide_msg_busy">咨询师无可约时段,请私聊他增加新时段</string>
<string name="im_push_confide_msg_calling">咨询师正在通话中,请稍后再试</string>
<string name="im_approval">知道了</string>
<!--====================RES_AVCHAT====================-->
<!--====================RES_AVCHAT====================-->
<!--====================RES_AVCHAT====================-->
<string name="im_cancel">取消</string>
<string name="im_ok">确定</string>
<string name="im_empty">""</string>
<string name="im_save">保存</string>
<string name="im_online">正在直播</string>
<string name="im_loading">正在加载中...</string>
<string name="im_load_failed">加载失败,请点我重试</string>
<string name="im_load_end">没有更多数据</string>w
<string name="im_avchat_hangup">结束通话</string>
<string name="im_avchat_switch_to_video">切换视频</string>
<string name="im_avchat_switch_to_audio">切换语音</string>
<string name="im_avchat_video_call_request">请求视频聊天…</string>
<string name="im_avchat_audio_call_wifi_unavailable_tip">当前非WiFi环境,每分钟将产生约0.5M的流量</string>
<string name="im_avchat_network_grade_0">网络通畅:</string>
<string name="im_avchat_network_grade_1">网络正常:</string>
<string name="im_avchat_network_grade_2">网络一般:</string>
<string name="im_avchat_network_grade_3">网络较差:</string>
<string name="im_avchat_refuse">拒绝</string>
<string name="im_avchat_receive">开启</string>
<string name="im_avchat_pickup">接听</string>
<string name="im_avchat_net_error_then_quit">网络异常,通话结束</string>
<string name="im_avchat_call_finish">通话结束</string>
<string name="im_avchat_call_reject">被对方拒绝</string>
<string name="im_avchat_peer_protocol_low_version">对方版本过低,请提示对方升级</string>
<string name="im_avchat_local_protocol_low_version">版本过低,请升级后使用</string>
<string name="im_avchat_invalid_channel_id">对方已挂断</string>
<string name="im_avchat_local_call_busy">本地通话中,无法使用易信进行通话。</string>
<string name="im_avchat_peer_busy">对方正在通话中,请稍后再拨。</string>
<string name="im_avchat_wait_recieve">等待对方接听…</string>
<string name="im_avchat_audio_call_request">请求通话</string>
<string name="im_avchat_connecting">连接中…</string>
<string name="im_avchat_network_unstable_notificaton">当前网络不稳定</string>
<string name="im_avchat_peer_close_camera">对方关闭了摄像头</string>
<string name="im_avchat_local_close_camera">你关闭了摄像头</string>
<string name="im_avchat_audio_to_video_wait">正在等待对方开启摄像头…</string>
<string name="im_avchat_no_pick_up">未接听</string>
<string name="im_avchat_has_hangup">已挂断</string>
<string name="im_avchat_switch_video_reject">对方不同意音频切换为视频!</string>
<string name="im_avchat_notification">正在与%1$s通话中,点击继续</string>
<string name="im_avchat_call">网络通话</string>
<string name="im_avchat_no_pickup_call">未接听</string>
<string name="im_avchat_call_failed">发起通话失败</string>
<string name="im_avchat_no_permission">暂无权限,请开通音视频服务</string>
<string name="im_avchat_in_switch">请耐心等待!</string>
<string name="im_t_avchat_not_start_with_less_member">无法发起,人数少于2人</string>
<string name="im_t_avchat_start">发起了视频聊天</string>
<string name="im_t_avchat_create_room_fail">创建房间失败</string>
<string name="im_t_avchat_push_content">"[网络通话]"</string>
<string name="im_t_avchat_join_fail_not_exist">"加入房间失败,房间不存在"</string>
<string name="im_nrtc_setting_vie_crop_ratio_key">nrtc_setting_vie_crop_ratio_key</string>
<string name="im_nrtc_setting_vie_quality_key">nrtc_setting_vie_quality_key</string>
<string name="im_nrtc_setting_other_device_default_rotation_key">nrtc_setting_other_device_default_rotation_key</string>
<string name="im_nrtc_setting_other_device_rotation_fixed_offset_key">nrtc_setting_other_device_rotation_fixed_offset_key</string>
<string name="im_nrtc_setting_vie_rotation_key">nrtc_setting_vie_rotation_key</string>
<string name="im_nrtc_setting_vie_hw_encoder_key">nrtc_setting_vie_hw_encoder_key</string>
<string name="im_nrtc_setting_vie_hw_decoder_key">nrtc_setting_vie_hw_decoder_key</string>
<string name="im_nrtc_setting_other_server_record_audio_key">nrtc_setting_other_server_record_audio_key</string>
<string name="im_nrtc_setting_other_server_record_video_key">nrtc_setting_other_server_record_video_key</string>
<string name="im_nrtc_setting_voe_call_proximity_key">nrtc_setting_voe_call_proximity_key</string>
<string name="im_nrtc_setting_vie_fps_reported_key">nrtc_setting_vie_fps_reported_key</string>
<string name="im_nrtc_setting_vie_max_bitrate_key">nrtc_setting_vie_max_bitrate_key</string>
<string name="im_nrtc_setting_voe_audio_aec_key">nrtc_setting_voe_audio_aec_key</string>
<string name="im_nrtc_setting_voe_audio_ns_key">nrtc_setting_voe_audio_ns_key</string>
<string name="im_nrtc_setting_voe_high_quality_key">nrtc_setting_voe_high_quality_key</string>
<!--====================RES_UIKIT====================-->
<!--====================RES_UIKIT====================-->
<!--====================RES_UIKIT====================-->
<string name="im_clear_empty">清空</string>
<string name="im_iknow">知道了</string>
<string name="im_search">搜索</string>
<string name="im_remove">移除</string>
<string name="im_add">添加</string>
<string name="im_create">新建</string>
<string name="im_without_content">暂无</string>
<string name="im_close">关闭</string>
<string name="im_menu">菜单</string>
<string name="im_now_allow_space">不能含有空格</string>
<string name="im_readed">已读</string>
<string name="im_input_panel_photo">图 片</string>
<string name="im_input_panel_video">视 频</string>
<string name="im_input_panel_take">拍 摄</string>
<string name="im_repeat_download_message">重新下载?</string>
<string name="im_repeat_send_has_blank">重 发</string>
<string name="im_repeat_send_message">重发消息?</string>
<string name="im_copy_has_blank">复 制</string>
<string name="im_delete_has_blank">删 除</string>
<string name="im_voice_to_text">转文字</string>
<string name="im_forward_to_person">转发到个人</string>
<string name="im_forward_to_team">转发到群组</string>
<string name="im_withdrawn_msg">撤 回</string>
<string name="im_save_to_device">保存到手机</string>
<string name="im_picture_save_fail">图片保存失败</string>
<string name="im_picture_save_to">图片已保存到手机</string>
<string name="im_trans_voice_failed">语音转化失败</string>
<string name="im_team_invalid_tip">您已退出该群</string>
<string name="im_normal_team_invalid_tip">您已退出该讨论组</string>
<string name="im_team_send_message_not_allow">您已不在该群,不能发送消息</string>
<string name="im_send">发送</string>
<string name="im_unsupport_title">无法显示该内容</string>
<string name="im_unsupport_desc">客户端版本不支持该内容</string>
<string name="im_revoke_failed">发送时间超过2分钟的消息,不能被撤回</string>
<string name="im_pic_and_video">图片和视频</string>
<string name="im_black_list_send_tip">消息已发送,但对方拒收</string>
<!-- 语音 -->
<string name="im_record_audio">按住 说话</string>
<string name="im_record_audio_end">松开 结束</string>
<string name="im_sdcard_not_exist_error">请插入SD卡</string>
<string name="im_recording_error">录音失败,请重试</string>
<string name="im_recording_cancel">手指上滑,取消发送</string>
<string name="im_timer_default">00:00</string>
<string name="im_recording_cancel_tip">松开手指,取消发送</string>
<string name="im_recording_max_time">录音达到最大时间,是否发送?</string>
<!-- 拍照视频 -->
<string name="im_gallery_invalid">你的手机没有图库程序</string>
<string name="im_sdcard_not_enough_head_error">SD卡被拔出或存储空间不足,无法保存头像</string>
<string name="im_sdcard_not_enough_error">存储空间不足,无法保存此次多媒体消息</string>
<string name="im_download_video">正在下载视频</string>
<string name="im_download_video_fail">视频下载失败,请重试</string>
<string name="im_look_video_fail">无法播放该视频</string>
<string name="im_look_video_fail_try_again">暂时无法播放视频,请重试</string>
<string name="im_video_record">视频录制</string>
<string name="im_connect_vedio_device_fail">无法连接视频设备 ,请稍候再试</string>
<string name="im_capture_video_size_in_kb">视频文件大小为: %1$dKB,</string>
<string name="im_capture_video_size_in_mb">视频文件大小为: %1$.2fMB,</string>
<string name="im_is_send_video">是否发送该视频?</string>
<string name="im_start_camera_to_record_failed">启动摄像头录制视频失败</string>
<string name="im_stop_fail_maybe_stopped">停止失败,可能已经停止</string>
<string name="im_video_exception">视频文件异常</string>
<string name="im_im_choose_video_file_size_too_large">视频文件过大,系统限制为20MB</string>
<string name="im_im_choose_video">请选择3GP MP4格式的视频文件</string>
<string name="im_video_record_short">录制视频太短</string>
<string name="im_download_progress_description">%1$s(%2$s/%3$s)</string>
<!-- 联系人选择器 -->
<string name="im_contact_selector">联系人选择器</string>
<!-- team -->
<string name="im_team_need_authentication">需要身份验证</string>
<string name="im_team_allow_anyone_join">允许任何人加入</string>
<string name="im_team_not_allow_anyone_join">不允许任何人申请加入</string>
<string name="im_team_admin_invite">管理员邀请</string>
<string name="im_team_everyone_invite">所有人邀请</string>
<string name="im_team_admin_update">管理员修改</string>
<string name="im_team_everyone_update">所有人修改</string>
<string name="im_team_invitee_need_authen">需要验证</string>
<string name="im_team_invitee_not_need_authen">不需要验证</string>
<string name="im_team_notify_mute">不提醒任何消息</string>
<string name="im_team_notify_all">提醒所有消息</string>
<string name="im_team_notify_manager">只提醒管理员消息</string>
<string name="im_team_nickname">群昵称</string>
<string name="im_team_nickname_none">未填写</string>
<string name="im_team_identity">身份</string>
<string name="im_remove_member">移出本群</string>
<string name="im_team_member_info">成员信息</string>
<string name="im_team_admin">管理员</string>
<string name="im_team_creator">群主</string>
<string name="im_team_member">群成员</string>
<string name="im_update_success">保存成功</string>
<string name="im_update_failed">保存失败, code:%d</string>
<string name="im_no_permission">没有权限</string>
<string name="im_set_team_admin">设为管理员</string>
<string name="im_cancel_team_admin">取消管理员</string>
<string name="im_team_member_remove_confirm">确定要将其移出群组么?</string>
<string name="im_team_annourcement">群公告</string>
<string name="im_invite_member">邀请成员</string>
<string name="im_team_name">群名称</string>
<string name="im_team_introduce">群介绍</string>
<string name="im_team_extension">扩展示例</string>
<string name="im_click_set">点击设置</string>
<string name="im_reach_team_member_capacity">成员数量不能超过%1$d</string>
<string name="im_team_authentication">身份验证</string>
<string name="im_team_invite">邀请他人权限</string>
<string name="im_team_info_update">群资料修改权限</string>
<string name="im_team_invitee_authentication">被邀请人身份验证</string>
<string name="im_team_announce_title">标题</string>
<string name="im_team_announce_content">公告内容</string>
<string name="im_team_announce_notice">请输入群公告标题</string>
<string name="im_my_team_card">我的群名片</string>
<string name="im_team_introduce_hint">点击填写群介绍</string>
<string name="im_team_extension_hint">点击修改扩展内容</string>
<string name="im_team_announce_hint">点击填写群公告</string>
<string name="im_team_notification_config">消息提醒</string>
<string name="im_team_transfer_without_member">没有可转移的群成员</string>
<string name="im_team_invite_members_success">群成员邀请已发出</string>
<string name="im_team_transfer_success">群转移成功</string>
<string name="im_team_transfer_failed">群转移失败</string>
<string name="im_quit_team_success">您已退群</string>
<string name="im_quit_team_failed">退群失败</string>
<string name="im_quit_normal_team_success">您已经退出讨论组</string>
<string name="im_quit_normal_team_failed">退出讨论组失败</string>
<string name="im_dismiss_team_success">群已解散</string>
<string name="im_dismiss_team_failed">解散群失败</string>
<string name="im_dismiss_team">解散本群</string>
<string name="im_transfer_team">转让群</string>
<string name="im_quit_team">退出群</string>
<string name="im_quit_normal_team">退出讨论组</string>
<string name="im_team_name_toast">群名称不能为空</string>
<string name="im_not_allow_empty">不能为空</string>
<string name="im_team_settings_name">设置名称</string>
<string name="im_normal_team_name">讨论组名称</string>
<string name="im_remove_member_success">移除成员成功</string>
<string name="im_remove_member_failed">移除成员失败</string>
<string name="im_invite_member_success">邀请成员成功</string>
<string name="im_invite_member_failed">邀请成员失败</string>
<string name="im_team_settings_set_name">取个名字吧</string>
<string name="im_team_not_exist">该群不存在</string>
<string name="im_normal_team_not_exist">该讨论组不存在</string>
<string name="im_mute_msg">设置禁言</string>
<string name="im_set_head_image">设置头像</string>
<string name="im_team_update_cancel">取消更新</string>
<string name="im_team_update_failed">群头像设置失败</string>
<string name="im_reach_capacity">人数已达上限</string>
<!-- image picker -->
<string name="im_picker_image_preview">预览</string>
<string name="im_picker_image_send">发送</string>
<string name="im_picker_image_folder">相册</string>
<string name="im_picker_image_album_loading">相册加载中…</string>
<string name="im_picker_image_album_empty">相册中没有图片!</string>
<string name="im_picker_image_folder_info">共%d张</string>
<string name="im_picker_image_exceed_max_image_select">最多选择%d张图片!</string>
<string name="im_picker_image_send_select">完成(%d)</string>
<string name="im_picker_image_preview_original">发送原图</string>
<string name="im_picker_image_preview_original_select">发送原图(%s)</string>
<string name="im_picker_image_error">获取图片出错</string>
<string name="im_image_compressed_size">该原始图片大小为: %1$s,</string>
<string name="im_unknow_size">未知大小</string>
<string name="im_is_send_image">是否发送该原始图片?</string>
<string name="im_multi_image_compressed_size">原始图片总大小为: %1$s,</string>
<string name="im_is_send_multi_image">是否发送这些原始图片?</string>
<string name="im_waitfor_image_local">正在打开相册,请稍候\u2026</string>
<string name="im_recapture">重拍</string>
<string name="im_image_show_error">图片显示异常</string>
<string name="im_memory_out">内存不足</string>
<string name="im_choose_from_photo_album">从手机相册选择</string>
<string name="im_choose">选取</string>
<string name="im_crop">裁剪</string>
<string name="im_download_picture_fail">图片下载失败</string>
<string name="im_chat_private_title">私聊须知</string>
<string name="im_chat_pivate_content">如系统检测到涉黄、涉爆、涉政等信息,可能会封号处理并追究法律责任!</string>
<string name="im_video_play">视频播放</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="dialog_button_text_style">
<item name="android:textSize">@dimen/im_big_text_size</item>
<item name="android:textColor">@color/im_black</item>
<item name="android:background">@drawable/im_nim_list_item_selector</item>
<item name="android:paddingTop">@dimen/im_custom_dialog_padding_vertical</item>
<item name="android:paddingBottom">@dimen/im_custom_dialog_padding_vertical</item>
</style>
<style name="custom_dialog_message_text_style">
<item name="android:textSize">@dimen/im_normal_text_size</item>
<item name="android:textColor">@color/im_color_black_333333</item>
<item name="android:paddingLeft">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingRight">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingTop">@dimen/im_custom_dialog_padding_vertical</item>
<item name="android:paddingBottom">@dimen/im_custom_dialog_padding_vertical</item>
<item name="android:background">@drawable/im_nim_list_item_selector</item>
</style>
<style name="easy_dialog_style" parent="@android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item>
<!-- 边框 -->
<item name="android:windowIsFloating">true</item>
<!-- 是否浮现在activity之上 -->
<item name="android:windowIsTranslucent">true</item>
<!-- 半透明 -->
<item name="android:windowNoTitle">true</item>
<!-- 无标题 -->
<item name="android:windowBackground">@color/im_transparent</item>
<!-- 背景透明 -->
<item name="android:backgroundDimEnabled">true</item>
<!-- 后面的activity变暗 -->
</style>
<style name="dialog_default_style" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@color/im_transparent</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
<style name="dialog_title_text_style">
<item name="android:textSize">@dimen/im_big_text_size</item>
<item name="android:textColor">@color/im_color_activity_blue_bg</item>
<item name="android:textStyle">bold</item>
<item name="android:paddingLeft">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingRight">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingTop">@dimen/im_dialog_padding_vertical</item>
<item name="android:paddingBottom">@dimen/im_dialog_padding_vertical</item>
</style>
<!-- view -->
<style name="dialog_message_text_style">
<item name="android:textSize">@dimen/im_normal_text_size</item>
<item name="android:textColor">@color/im_grey</item>
<item name="android:paddingLeft">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingRight">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingTop">@dimen/im_dialog_padding_vertical</item>
<item name="android:paddingBottom">@dimen/im_dialog_padding_vertical</item>
</style>
<style name="grid_view" parent="@android:style/Widget.GridView">
<item name="android:scrollbarThumbVertical">@drawable/im_nim_scrollbar_handle_holo_dark</item>
<item name="android:scrollbarThumbHorizontal">@drawable/im_nim_scrollbar_handle_holo_dark</item>
</style>
<style name="list_view" parent="@android:style/Widget.ListView">
<item name="android:scrollbarThumbVertical">@drawable/im_nim_scrollbar_handle_holo_dark</item>
<item name="android:scrollbarThumbHorizontal">@drawable/im_nim_scrollbar_handle_holo_dark</item>
</style>
<style name="scroll_view" parent="@android:style/Widget.ScrollView">
<item name="android:scrollbarThumbVertical">@drawable/im_nim_scrollbar_handle_holo_dark</item>
<item name="android:scrollbarThumbHorizontal">@drawable/im_nim_scrollbar_handle_holo_dark</item>
</style>
<style name="blue_bottom_line_edit_text_style" parent="@android:style/Widget.EditText">
<item name="android:background">@drawable/im_nim_blue_edit_text_bg</item>
<item name="android:paddingLeft">6dp</item>
<item name="android:paddingRight">6dp</item>
<item name="android:paddingBottom">6dp</item>
<item name="android:paddingTop">6dp</item>
<item name="android:includeFontPadding">false</item>
<item name="android:gravity">center_vertical</item>
</style>
<style name="horizontal_light_thin_divider">
<item name="android:layout_height">2px</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:background">@color/im_color_gray_d9d9d9</item>
</style>
<!--====================RES_AVCHAT====================-->
<!--====================RES_AVCHAT====================-->
<!--====================RES_AVCHAT====================-->
<!--====================RES_UIKIT====================-->
<!--====================RES_UIKIT====================-->
<!--====================RES_UIKIT====================-->
<style name="horizontal_deep_thick_divider">
<item name="android:layout_height">@dimen/im_split_one_dip</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:background">@color/im_color_gray_d9d9d9</item>
</style>
<declare-styleable name="TitleBarBottom">
<attr name="left_text" format="string"/>
<attr name="left_start_icon" format="reference" />
<attr name="left_end_icon" format="reference" />
<attr name="title_text" format="string" />
<attr name="title_color" format="color"/>
<attr name="right_text" format="string"/>
<attr name="right_start_icon" format="reference" />
<attr name="right_end_icon" format="reference" />
<attr name="side_text_color" format="color" />
<attr name="title_bar_text_color" format="color|reference" />
<attr name="title_bar_bg" format="color|reference" />
<attr name="right_iv" format="reference"/>
<attr name="show_bottom_title" format="boolean"/>
</declare-styleable>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="dialog_button_text_style">
<item name="android:textSize">@dimen/im_big_text_size</item>
<item name="android:textColor">@color/im_black</item>
<item name="android:background">@drawable/im_nim_list_item_selector</item>
<item name="android:paddingTop">@dimen/im_custom_dialog_padding_vertical</item>
<item name="android:paddingBottom">@dimen/im_custom_dialog_padding_vertical</item>
</style>
<style name="custom_dialog_message_text_style">
<item name="android:textSize">@dimen/im_normal_text_size</item>
<item name="android:textColor">@color/im_color_black_333333</item>
<item name="android:paddingLeft">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingRight">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingTop">@dimen/im_custom_dialog_padding_vertical</item>
<item name="android:paddingBottom">@dimen/im_custom_dialog_padding_vertical</item>
<item name="android:background">@drawable/im_nim_list_item_selector</item>
</style>
<style name="easy_dialog_style" parent="@android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item>
<!-- 边框 -->
<item name="android:windowIsFloating">true</item>
<!-- 是否浮现在activity之上 -->
<item name="android:windowIsTranslucent">true</item>
<!-- 半透明 -->
<item name="android:windowNoTitle">true</item>
<!-- 无标题 -->
<item name="android:windowBackground">@color/im_transparent</item>
<!-- 背景透明 -->
<item name="android:backgroundDimEnabled">true</item>
<!-- 后面的activity变暗 -->
</style>
<style name="dialog_default_style" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@color/im_transparent</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
<style name="dialog_title_text_style">
<item name="android:textSize">@dimen/im_big_text_size</item>
<item name="android:textColor">@color/im_color_activity_blue_bg</item>
<item name="android:textStyle">bold</item>
<item name="android:paddingLeft">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingRight">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingTop">@dimen/im_dialog_padding_vertical</item>
<item name="android:paddingBottom">@dimen/im_dialog_padding_vertical</item>
</style>
<!-- view -->
<style name="dialog_message_text_style">
<item name="android:textSize">@dimen/im_normal_text_size</item>
<item name="android:textColor">@color/im_grey</item>
<item name="android:paddingLeft">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingRight">@dimen/im_dialog_text_margin_horizontal</item>
<item name="android:paddingTop">@dimen/im_dialog_padding_vertical</item>
<item name="android:paddingBottom">@dimen/im_dialog_padding_vertical</item>
</style>
<style name="grid_view" parent="@android:style/Widget.GridView">
<item name="android:scrollbarThumbVertical">@drawable/im_nim_scrollbar_handle_holo_dark</item>
<item name="android:scrollbarThumbHorizontal">@drawable/im_nim_scrollbar_handle_holo_dark</item>
</style>
<style name="list_view" parent="@android:style/Widget.ListView">
<item name="android:scrollbarThumbVertical">@drawable/im_nim_scrollbar_handle_holo_dark</item>
<item name="android:scrollbarThumbHorizontal">@drawable/im_nim_scrollbar_handle_holo_dark</item>
</style>
<style name="scroll_view" parent="@android:style/Widget.ScrollView">
<item name="android:scrollbarThumbVertical">@drawable/im_nim_scrollbar_handle_holo_dark</item>
<item name="android:scrollbarThumbHorizontal">@drawable/im_nim_scrollbar_handle_holo_dark</item>
</style>
<style name="blue_bottom_line_edit_text_style" parent="@android:style/Widget.EditText">
<item name="android:background">@drawable/im_nim_blue_edit_text_bg</item>
<item name="android:paddingLeft">6dp</item>
<item name="android:paddingRight">6dp</item>
<item name="android:paddingBottom">6dp</item>
<item name="android:paddingTop">6dp</item>
<item name="android:includeFontPadding">false</item>
<item name="android:gravity">center_vertical</item>
</style>
<style name="horizontal_light_thin_divider">
<item name="android:layout_height">2px</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:background">@color/im_color_gray_d9d9d9</item>
</style>
<!--====================RES_AVCHAT====================-->
<!--====================RES_AVCHAT====================-->
<!--====================RES_AVCHAT====================-->
<!--====================RES_UIKIT====================-->
<!--====================RES_UIKIT====================-->
<!--====================RES_UIKIT====================-->
<style name="horizontal_deep_thick_divider">
<item name="android:layout_height">@dimen/im_split_one_dip</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:background">@color/im_color_gray_d9d9d9</item>
</style>
<declare-styleable name="TitleBarBottom">
<attr name="left_text" format="string"/>
<attr name="left_start_icon" format="reference" />
<attr name="left_end_icon" format="reference" />
<attr name="title_text" format="string" />
<attr name="title_color" format="color"/>
<attr name="right_text" format="string"/>
<attr name="right_start_icon" format="reference" />
<attr name="right_end_icon" format="reference" />
<attr name="side_text_color" format="color" />
<attr name="title_bar_text_color" format="color|reference" />
<attr name="title_bar_bg" format="color|reference" />
<attr name="right_iv" format="reference"/>
<attr name="show_bottom_title" format="boolean"/>
</declare-styleable>
<style name="bottom_to_top_dialog_style">
<item name="android:windowEnterAnimation">@anim/bottom_pop_show_anim</item>
<!-- 指定显示的动画xml -->
<item name="android:windowExitAnimation">@anim/bottom_pop_hidden_anim</item>
<!-- 指定消失的动画xml -->
</style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="6dp" />
<solid android:color="@color/im_white" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="6dp" />
<solid android:color="@color/white" />
</shape>
\ No newline at end of file
<?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="6dp"/>
</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="#E5F5FF"/>
<corners android:radius="10dp"/>
</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="#E5F5FF"/>
<corners android:radius="10dp"/>
</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:radius="3dp"></corners>
<gradient
android:angle="270"
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="#FFFFFF"/>
<corners android:radius="10dp"/>
<stroke android:width="0.5dp"
android:color="#CCCCCC"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp">
<RelativeLayout
android:id="@+id/dialog_expert_detail_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/im_expert_info_dialog_bg"
android:paddingBottom="30dp">
<View
android:layout_width="match_parent"
android:layout_height="174dp"
android:background="@drawable/im_expert_detail_dialog_top_bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="135dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="76dp"
android:layout_height="95dp"
android:layout_centerHorizontal="true"
android:scaleType="fitXY"
android:layout_marginTop="20dp"
android:src="@drawable/im_expert_info_dialog_top_bg" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="135dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_20"
android:layout_marginRight="@dimen/platform_dp_20"
android:text="数据更新于昨日24点,壹点灵通过严谨数据统计机制,对咨询师的数据进行持续的监督管理,确保提供真实有效的数据参考。"
android:textColor="@color/im_color_242424"
android:textSize="15dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:layout_marginRight="20dp"
android:background="@drawable/im_expert_detail_bottom_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="13dp"
android:paddingTop="8dp"
android:paddingRight="10dp"
android:paddingBottom="11dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="bottom"
android:orientation="horizontal">
<TextView
android:id="@+id/im_expert_detail_help_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2648"
android:textColor="#242424"
android:textSize="22dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:text="人"
android:textColor="#242424"
android:textSize="10dp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:text="帮助人数"
android:textColor="#1DA1F2"
android:textSize="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="平台内服务过的用户总数"
android:textColor="#99242424"
android:textSize="13dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:layout_marginRight="20dp"
android:background="@drawable/im_expert_detail_bottom_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="13dp"
android:paddingTop="8dp"
android:paddingRight="10dp"
android:paddingBottom="11dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="bottom"
android:orientation="horizontal">
<TextView
android:id="@+id/im_expert_detail_server_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1634"
android:textColor="#242424"
android:textSize="22dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:text="小时"
android:textColor="#242424"
android:textSize="10dp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:text="服务时长"
android:textColor="#1DA1F2"
android:textSize="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="平台内心理服务总时长"
android:textColor="#99242424"
android:textSize="13dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:layout_marginRight="20dp"
android:background="@drawable/im_expert_detail_bottom_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="13dp"
android:paddingTop="8dp"
android:paddingRight="10dp"
android:paddingBottom="11dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="bottom"
android:orientation="horizontal">
<TextView
android:id="@+id/im_expert_detail_good_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4.9"
android:textColor="#242424"
android:textSize="22dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:text="分"
android:textColor="#242424"
android:textSize="10dp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:text="综合评分"
android:textColor="#1DA1F2"
android:textSize="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全部用户评分的平均值"
android:textColor="#99242424"
android:textSize="13dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<ImageView
android:id="@+id/expert_info_close"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_below="@+id/dialog_expert_detail_bg"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:src="@drawable/im_expert_info_dialog_close_icon" />
</RelativeLayout>
<?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>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textMessageLayout"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/platform_color_F7F7F7"
android:gravity="center_vertical">
<!--android:paddingTop="@dimen/bottom_component_margin_vertical"-->
<!--android:paddingBottom="@dimen/bottom_component_margin_vertical"-->
<FrameLayout
android:id="@+id/switchLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp">
<ImageView
android:id="@+id/buttonAudioMessage"
android:layout_width="26dp"
android:layout_height="26dp"
android:background="@drawable/im_nim_message_input_voice_normal"
android:contentDescription="@string/im_empty" />
<ImageView
android:id="@+id/buttonTextMessage"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_gravity="center_vertical"
android:background="@drawable/im_nim_message_input_keyboard"
android:contentDescription="@string/im_empty" />
</FrameLayout>
<FrameLayout
android:id="@+id/audioTextSwitchLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="12dp"
android:layout_toLeftOf="@+id/emoji_button"
android:layout_toRightOf="@+id/switchLayout">
<Button
android:id="@+id/audioRecord"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@drawable/im_nim_chat_audio_record_button_background"
android:gravity="center"
android:text="@string/im_record_audio"
android:textColor="@color/color_3D3D3D"
android:textSize="15sp"
android:textStyle="bold"
style="?android:attr/borderlessButtonStyle"
android:visibility="gone" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_ed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="10dp"
android:layout_toLeftOf="@+id/emoji_button"
android:layout_toRightOf="@+id/switchLayout"
android:background="@drawable/im_nim_chat_input_edit_background">
<EditText
android:id="@+id/editTextMessage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_weight="1"
android:autoLink="all"
android:background="#ffffff"
android:hint="放心聊天,信息保密"
android:maxHeight="72dp"
android:maxLines="4"
android:textColorHint="#999999"
android:textSize="15sp" />
</LinearLayout>
<ImageView
android:id="@+id/emoji_button"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_centerVertical="true"
android:layout_marginRight="12dp"
android:layout_toLeftOf="@+id/sendLayout"
android:background="@drawable/im_nim_message_input_emotion"
android:contentDescription="@string/im_empty"
android:scaleType="center" />
<FrameLayout
android:id="@+id/sendLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/im_bottom_component_margin_horizontal">
<ImageView
android:id="@+id/buttonMoreFuntionInText"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_gravity="center"
android:background="@drawable/im_nim_message_input_plus"
android:contentDescription="@string/im_empty"
android:scaleType="center" />
<TextView
android:id="@+id/buttonSendMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/im_nim_message_button_bottom_send_selector"
android:contentDescription="@string/im_empty"
android:gravity="center"
android:padding="5dp"
android:text="@string/im_send"
android:textColor="@color/im_white"
android:textSize="14sp" />
</FrameLayout>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textMessageLayout"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/platform_color_F7F7F7"
android:gravity="center_vertical">
<!--android:paddingTop="@dimen/bottom_component_margin_vertical"-->
<!--android:paddingBottom="@dimen/bottom_component_margin_vertical"-->
<FrameLayout
android:id="@+id/switchLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp">
<ImageView
android:id="@+id/buttonAudioMessage"
android:layout_width="26dp"
android:layout_height="26dp"
android:background="@drawable/im_nim_message_input_voice_normal"
android:contentDescription="@string/im_empty" />
<ImageView
android:id="@+id/buttonTextMessage"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_gravity="center_vertical"
android:background="@drawable/im_nim_message_input_keyboard"
android:contentDescription="@string/im_empty" />
</FrameLayout>
<FrameLayout
android:id="@+id/audioTextSwitchLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="12dp"
android:layout_toLeftOf="@+id/emoji_button"
android:layout_toRightOf="@+id/switchLayout">
<Button
android:id="@+id/audioRecord"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@drawable/im_nim_chat_audio_record_button_background"
android:gravity="center"
android:text="@string/im_record_audio"
android:textColor="@color/color_3D3D3D"
android:textSize="15sp"
android:textStyle="bold"
style="?android:attr/borderlessButtonStyle"
android:visibility="gone" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_ed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="10dp"
android:layout_toLeftOf="@+id/emoji_button"
android:layout_toRightOf="@+id/switchLayout"
android:background="@drawable/im_nim_chat_input_edit_background">
<EditText
android:id="@+id/editTextMessage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_weight="1"
android:autoLink="all"
android:background="#ffffff"
android:maxHeight="72dp"
android:maxLines="4"
android:textColorHint="#CCCCCC"
android:textSize="15sp" />
</LinearLayout>
<ImageView
android:id="@+id/emoji_button"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_centerVertical="true"
android:layout_marginRight="12dp"
android:layout_toLeftOf="@+id/sendLayout"
android:background="@drawable/im_nim_message_input_emotion"
android:contentDescription="@string/im_empty"
android:scaleType="center" />
<FrameLayout
android:id="@+id/sendLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/im_bottom_component_margin_horizontal">
<ImageView
android:id="@+id/buttonMoreFuntionInText"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_gravity="center"
android:background="@drawable/im_nim_message_input_plus"
android:contentDescription="@string/im_empty"
android:scaleType="center" />
<TextView
android:id="@+id/buttonSendMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/im_nim_message_button_bottom_send_selector"
android:contentDescription="@string/im_empty"
android:gravity="center"
android:padding="5dp"
android:text="@string/im_send"
android:textColor="@color/im_white"
android:textSize="14sp" />
</FrameLayout>
</RelativeLayout>
<?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="wrap_content"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
xmlns:tools="http://schemas.android.com/tools">
<TextView
android:layout_gravity="center_vertical"
tools:text="姚**:"
android:layout_marginLeft="18dp"
android:id="@+id/tv_in_content_before"
android:textColor="#242424"
android:textStyle="bold"
android:textSize="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_marginRight="6dp"
tools:text="谢谢老师的疏导,相信以后的自相信以后的自相信以后的自…"
android:id="@+id/tv_in_comment_desc"
android:textSize="12dp"
android:textColor="#666666"
android:lines="1"
android:ellipsize="end"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" />
</LinearLayout>
\ 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="wrap_content"
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp"
>
<FrameLayout
android:id="@+id/imRealViewLeftFrameLayout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
</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="wrap_content"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
xmlns:tools="http://schemas.android.com/tools">
<TextView
android:layout_gravity="center_vertical"
tools:text="姚**:"
android:layout_marginLeft="18dp"
android:id="@+id/tv_out_content_before"
android:textColor="#242424"
android:textStyle="bold"
android:textSize="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_marginRight="6dp"
tools:text="谢谢老师的疏导,相信以后的自相信以后的自相信以后的自…"
android:id="@+id/tv_out_comment_desc"
android:textSize="12dp"
android:textColor="#666666"
android:lines="1"
android:ellipsize="end"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" />
</LinearLayout>
\ No newline at end of file
<?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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/platform_color_F0F0F0"
android:orientation="vertical">
......@@ -18,208 +18,297 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.CoordinatorLayout
<LinearLayout
android:id="@+id/constraint_ll"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
<LinearLayout
android:id="@+id/top_view_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:elevation="0dp">
<RelativeLayout
android:orientation="vertical"
app:layout_constraintTop_toTopOf="parent">
<!-- 专家信息 -->
<LinearLayout
android:id="@+id/top_expert_info_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways">
<RelativeLayout
android:orientation="vertical">
<android.support.constraint.ConstraintLayout
android:id="@+id/top_expert_info_cl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/line"
android:background="#ffffff"
android:layout_height="56dp"
android:background="@color/im_white"
android:paddingLeft="@dimen/platform_dp_10"
android:visibility="gone">
<com.yidianling.nimbase.common.ui.imageview.CircleImageView
android:id="@+id/info_head"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_margin="10dp" />
<com.ydl.ydlcommon.view.CircleImageView
android:id="@+id/small_head_img"
android:layout_width="@dimen/platform_dp_36"
android:layout_height="@dimen/platform_dp_36"
android:layout_marginTop="8dp"
android:layout_marginBottom="10dp"
android:background="@drawable/platform_head_place_hold_pic"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"></com.ydl.ydlcommon.view.CircleImageView>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginLeft="46dp"
android:layout_marginRight="10dp"
android:background="#F0F0F0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:id="@+id/info_name"
<View
android:layout_width="0.5dp"
android:layout_height="match_parent"
android:layout_marginLeft="46dp"
android:background="#F0F0F0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<RelativeLayout
android:id="@+id/rl_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_toRightOf="@+id/info_head"
android:text="预约咨询" />
android:layout_height="match_parent"
android:layout_marginLeft="37dp"
android:paddingTop="13dp"
android:paddingBottom="10dp"
app:layout_constraintLeft_toRightOf="@+id/small_head_img">
<TextView
android:id="@+id/info_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/info_name"
android:layout_toRightOf="@+id/info_head"
android:text="200"
android:textColor="#ff8800"
android:textSize="16sp" />
<TextView
android:id="@+id/help_num_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/platform_dp_16"
tools:text="2648" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/info_name"
android:layout_alignBaseline="@+id/info_money"
android:layout_toRightOf="@+id/info_money"
android:text="元/次"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/im_shape_green_bg"
android:padding="5dp"
android:text="立即预约"
android:textColor="#3fca69" />
<TextView
android:id="@+id/help_num_tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="帮助人数"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_10" />
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/info_head"
android:background="#EDEDED" />
</RelativeLayout>
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="12dp"
android:layout_marginBottom="1.5dp"
android:layout_toRightOf="@+id/help_num_tv_desc"
android:scaleType="fitXY"
android:src="@drawable/im_more_info_icon" />
<LinearLayout
android:id="@+id/top_expert_info_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.constraint.ConstraintLayout
android:id="@+id/top_expert_info_cl"
android:layout_width="match_parent"
android:layout_height="56dp"
android:paddingTop="@dimen/platform_dp_8"
android:paddingBottom="@dimen/platform_dp_10"
android:paddingLeft="@dimen/platform_dp_10"
android:background="@color/im_white"
android:visibility="gone">
<com.ydl.ydlcommon.view.CircleImageView
android:id="@+id/small_head_img"
android:layout_width="@dimen/platform_dp_36"
android:layout_height="@dimen/platform_dp_36"
android:background="@drawable/platform_head_place_hold_pic">
</com.ydl.ydlcommon.view.CircleImageView>
<RelativeLayout
android:id="@+id/rl_help"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:layout_constraintLeft_toRightOf="@+id/small_head_img"
android:layout_marginLeft="30dp">
<TextView
android:id="@+id/help_num_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="2648"
android:fontFamily="@font/platform_dincond_bold"
android:textColor="@color/im_color_242424"
android:layout_centerHorizontal="true"
android:textSize="@dimen/platform_dp_20"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="帮助人数"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_10"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_good"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="30dp"
android:paddingTop="13dp"
android:paddingBottom="10dp"
app:layout_constraintRight_toRightOf="parent">
<RelativeLayout
android:id="@+id/rl_good"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginRight="30dp">
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:orientation="horizontal">
<TextView
android:id="@+id/good_num_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="99.9%"
android:fontFamily="@font/platform_dincond_bold"
android:textColor="@color/im_color_242424"
android:layout_centerHorizontal="true"
android:textSize="@dimen/platform_dp_20"
/>
android:textColor="@color/im_color_242424"
android:textSize="@dimen/platform_dp_16"
tools:text="4.7" />
<TextView
android:id="@+id/good_num_tv_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="好评率"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_10"
/>
</RelativeLayout>
android:text="分"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/platform_dp_10" />
</LinearLayout>
<RelativeLayout
android:id="@+id/rl_server"
<com.yidianling.uikit.business.session.view.ImRedStarGradeView
android:id="@+id/good_num_icons"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:layout_constraintLeft_toRightOf="@+id/rl_help"
app:layout_constraintRight_toLeftOf="@+id/rl_good">
<TextView
android:id="@+id/server_num_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="1634"
android:fontFamily="@font/platform_dincond_bold"
android:textColor="@color/im_color_242424"
android:layout_centerHorizontal="true"
android:textSize="@dimen/platform_dp_20"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="服务时长 (小时)"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_10"
/>
</RelativeLayout>
android:layout_height="11dp"
android:layout_marginBottom="1.5dp"
android:layout_alignParentBottom="true" />
</android.support.constraint.ConstraintLayout>
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="2dp"
android:layout_marginBottom="1.5dp"
android:layout_toRightOf="@+id/good_num_icons"
android:scaleType="fitXY"
android:src="@drawable/im_more_info_icon" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_server"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingTop="13dp"
android:paddingBottom="10dp"
app:layout_constraintLeft_toRightOf="@+id/rl_help"
app:layout_constraintRight_toLeftOf="@+id/rl_good">
</LinearLayout>
</RelativeLayout>
<TextView
android:id="@+id/server_num_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/platform_dp_16"
tools:text="1634" />
</android.support.design.widget.AppBarLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<!--快捷按钮-->
<TextView
android:id="@+id/server_num_tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="服务时长 (小时)"
android:textSize="@dimen/platform_dp_10" />
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="12dp"
android:layout_marginBottom="1.5dp"
android:layout_toRightOf="@+id/server_num_tv_desc"
android:scaleType="fitXY"
android:src="@drawable/im_more_info_icon" />
</RelativeLayout>
</android.support.constraint.ConstraintLayout>
<!--用户评论banner-->
<LinearLayout
android:id="@+id/comment_banner_view_ll"
android:layout_width="match_parent"
android:layout_height="37dp"
android:background="#ffffff"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="10dp"
android:visibility="gone">
<TextView
android:id="@+id/im_focus_btn"
android:layout_width="46dp"
android:layout_height="20dp"
android:background="@drawable/im_focus_btn_bg"
android:gravity="center"
android:textColor="#1DA1F2"
android:textSize="12dp"
tools:text="关注" />
<View
android:layout_width="0.5dp"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:background="#F0F0F0" />
<com.yidianling.uikit.business.session.view.ImCommentBannerView
android:id="@+id/comment_banner_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"></com.yidianling.uikit.business.session.view.ImCommentBannerView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:lines="1"
android:textColor="#1DA1F2"
android:textSize="12dp"
android:text="评价" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:lines="1"
android:textColor="#1DA1F2"
android:textSize="12dp"
android:layout_marginBottom="1dp"
android:text="(" />
<TextView
android:id="@+id/tv_all_comment_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:lines="1"
android:textColor="#1DA1F2"
android:textSize="12dp"
tools:text="18714" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:lines="1"
android:textColor="#1DA1F2"
android:textSize="12dp"
android:layout_marginBottom="1dp"
android:text=")" />
<ImageView
android:id="@+id/tv_all_comment_go"
android:layout_width="6dp"
android:layout_height="39dp"
android:layout_gravity="center"
android:layout_marginLeft="8dp"
android:paddingTop="14.5dp"
android:paddingBottom="14.5dp"
android:scaleType="fitXY"
android:src="@drawable/im_comment_list_right_icon" />
</LinearLayout>
</LinearLayout>
<!-- 客服小壹 三个快捷按钮 -->
<FrameLayout
android:id="@+id/quick_fl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingTop="10dp"
android:paddingRight="10dp">
<LinearLayout
android:id="@+id/ll_actions_yi"
android:layout_width="match_parent"
android:layout_height="53dp"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:visibility="gone">
......@@ -306,12 +395,18 @@
</FrameLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 未支付订单提醒等 -->
<RelativeLayout
android:id="@+id/rl_contain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout_height="50dp"
android:layout_below="@+id/quick_fl">
android:id="@+id/rl_contain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout_height="50dp">
</RelativeLayout>
......@@ -320,98 +415,73 @@
style="@style/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/rl_contain"
android:cacheColorHint="@android:color/transparent"
android:divider="@null"
android:fadingEdge="none"
android:focusable="false"
android:layout_below="@+id/rl_contain"
android:listSelector="@android:color/transparent"
android:scrollbars="vertical"/>
android:scrollbars="vertical" />
<!--右边的两个快捷回复按钮-->
<RelativeLayout
android:id="@+id/lin_actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_below="@+id/rl_contain"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/messageListView"
android:layout_marginRight="@dimen/platform_dp_10"
android:layout_marginTop="10dp"
android:layout_gravity="right"
android:layout_marginTop="14dp"
android:visibility="visible">
<RelativeLayout
android:id="@+id/rela_qingsu"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:paddingLeft="14dp"
android:paddingRight="17dp"
android:gravity="center"
android:background="@drawable/im_bg_im_confide_action">
<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:gravity="center"
android:text="即时倾诉"
android:paddingLeft="5dp"
android:layout_toRightOf="@+id/action_qingshu_img"
android:textColor="@color/platform_google_blue"
android:textSize="12dp"
android:textStyle="bold" />
</RelativeLayout>
<!-- <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"
android:layout_height="36dp"
android:paddingLeft="17dp"
android:paddingRight="14dp"
android:layout_toRightOf="@+id/rela_qingsu"
android:layout_marginLeft="-4dp"
android:background="@drawable/im_bg_im_consult_action"
android:gravity="center"
android:background="@drawable/im_bg_im_confide_action">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/im_bg_im_confide_top_tips"
android:paddingLeft="5dp"
android:paddingTop="1dp"
android:paddingRight="5dp"
android:paddingBottom="1dp"
android:text="立减20元"
android:textColor="@color/im_white"
android:textSize="9sp"
android:visibility="gone" />
<ImageView
android:id="@+id/img_zixun"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_centerVertical="true"
android:src="@mipmap/im_chat_pre_zixun" />
android:paddingLeft="17dp"
android:paddingRight="11dp">
<TextView
android:id="@+id/action_yuyue"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="预约咨询"
android:paddingLeft="5dp"
android:layout_toRightOf="@+id/img_zixun"
android:textColor="@color/platform_google_green"
android:textSize="12dp"
android:text="立即咨询"
android:textColor="#ffffff"
android:textSize="14dp"
android:textStyle="bold" />
</RelativeLayout>
......@@ -420,7 +490,8 @@
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
</LinearLayout>
<FrameLayout
android:id="@+id/layoutPlayAudio"
......@@ -485,14 +556,14 @@
android:layout_marginTop="58dp"
android:visibility="gone" />
<!-- 快捷回复-->
<!-- 常见问题 快捷回复-->
<RelativeLayout
android:id="@+id/rl_common_question"
android:layout_width="wrap_content"
android:layout_height="42dp"
android:paddingRight="13dp"
android:layout_gravity="bottom"
android:background="@drawable/im_background_chat_common_question">
android:background="@drawable/im_background_chat_common_question"
android:paddingRight="13dp">
<TextView
android:id="@+id/tv_open_common_question"
......
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-muse-api"
//开发时注释掉版本号,发布api时打开
//version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-tests-api"
//开发时注释掉版本号,发布api时打开
// version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -84,6 +84,12 @@
android:exported="true"
android:launchMode="singleTop" />
<activity
android:name=".ui.login.SecretActivity"
android:theme="@style/platform_NoTitleTheme"
android:exported="true"
android:launchMode="singleTop" />
</application>
</manifest>
\ No newline at end of file
......@@ -173,4 +173,8 @@ interface UserApi {
@POST("user/unbind_third")
@Headers( YDL_DOMAIN+ YDL_DOMAIN_JAVA)
fun unBindThirdLogin(@Body body: RequestBody): Observable<BaseResponse<Any>>
//获取隐私政策数据
@GET("site/get-privacy-content")
fun getSecretData(): Observable<BaseResponse<SecretResponse>>
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ import com.yidianling.user.http.request.*
import com.yidianling.user.http.response.CheckPassword
import com.yidianling.user.http.response.CountryResponse
import com.yidianling.user.http.response.ExistResponse
import com.yidianling.user.http.response.SecretResponse
import io.reactivex.Observable
/**
......@@ -61,4 +62,6 @@ interface UserHttp {
fun umLogin(activity: Activity, media: SHARE_MEDIA): Observable<ThirdLoginParam>
fun unBindThirdLogin(param: UnBindThirdLoginParam): Observable<BaseResponse<Any>>
fun getSecretData(): Observable<BaseResponse<SecretResponse>>
}
\ No newline at end of file
......@@ -19,6 +19,7 @@ import com.yidianling.user.http.request.*
import com.yidianling.user.http.response.CheckPassword
import com.yidianling.user.http.response.CountryResponse
import com.yidianling.user.http.response.ExistResponse
import com.yidianling.user.http.response.SecretResponse
import com.yidianling.user.rxlogin.LoginObservable
import io.reactivex.Observable
import io.reactivex.schedulers.Schedulers
......@@ -190,6 +191,10 @@ class UserHttpImpl private constructor() : UserHttp {
return getUserApi().unBindThirdLogin(body)
}
override fun getSecretData(): Observable<BaseResponse<SecretResponse>> {
return getUserApi().getSecretData()
}
private object Holder {
val INSTANCE = UserHttpImpl()
......
package com.yidianling.user.http.response;
/**
* is_open 弹窗开关
* 返回值:1开启;2关闭
*
* data.content 隐私内容
*/
public class SecretResponse {
int is_open = 2;
String content = "";
public int getIs_open() {
return is_open;
}
public void setContent(String content) {
this.content = content;
}
public String getContent() {
return content;
}
public void setIs_open(int is_open) {
this.is_open = is_open;
}
}
package com.yidianling.user.ui.login
import android.Manifest
import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.graphics.Color
......@@ -25,9 +26,11 @@ import com.tbruyelle.rxpermissions2.RxPermissions
import com.umeng.socialize.UMShareAPI
import com.umeng.socialize.UMShareConfig
import com.umeng.socialize.bean.SHARE_MEDIA
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
......@@ -40,6 +43,7 @@ import com.yidianling.user.UserHelper
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.AliAuthBean
import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.UserHttpImpl
import com.yidianling.user.http.request.BindPhoneJavaParam
import com.yidianling.user.http.request.PhoneLoginAutoParam
import com.yidianling.user.http.response.ChcekPhoneResponeBean
......@@ -50,6 +54,8 @@ import com.yidianling.user.safePrivate.HandUnlockCheckActivity
import com.yidianling.user.ui.CountryListActivity
import com.yidianling.user.ui.login.contract.ILoginContract
import com.yidianling.user.ui.login.presenter.LoginPresenterImpl
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.user_activity_register_and_login.*
/**
......@@ -127,7 +133,6 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
setClickEvent()
}
private fun setWindowStatusBarColor() {
StatusBarUtils.Companion.setWindowStatusBarColor(this, R.color.platform_color_075b66)
}
......
package com.yidianling.user.ui.login
import android.app.Activity
import android.content.Intent
import android.os.Build
import android.text.Html
import android.view.KeyEvent
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.yidianling.common.tools.RxAppTool
import com.yidianling.user.R
import com.yidianling.user.UserHelper
import com.yidianling.user.widget.SecretDialog
import kotlinx.android.synthetic.main.user_activity_secret.*
/**
* 隐私界面
* author : Zhangwenchao
* e-mail : zhangwch@yidianling.com
* time : 2018/01/10
*/
class SecretActivity : BaseActivity() {
private var secretDialog: SecretDialog? = null
private var mSecretProtocolString: String = ""
companion object {
val SECRET_PROTOCOL: String = "secret_protocol"
val SECRET_PAGE_REQUEST_CODE: Int = 42
val SECRET_PAGE_REQUEST_OK_CODE: Int = 43
val SECRET_PAGE_REQUEST_FAILURE_CODE: Int = 44
fun startProtocol(context: Activity, secretProtocolString: String) {
val intent = Intent(context, SecretActivity::class.java)
intent.putExtra(SECRET_PROTOCOL, secretProtocolString)
context.startActivityForResult(intent, SECRET_PAGE_REQUEST_CODE)
}
}
override fun layoutResId(): Int {
return R.layout.user_activity_secret
}
override fun initDataAndEvent() {
getParam()
initView()
}
private fun getParam() {
mSecretProtocolString = intent.getStringExtra(SECRET_PROTOCOL) ?: ""
if (null != user_secret_desc) {
user_secret_desc.text = Html.fromHtml(mSecretProtocolString)
}
}
private fun initView() {
initStatus()
user_secret_no_agree.setOnClickListener {
if (null == secretDialog) {
secretDialog = SecretDialog(this, object : SecretDialog.OnSecretDialogListener {
override fun onCancel() {
setResult(SECRET_PAGE_REQUEST_FAILURE_CODE)
finish()
}
override fun onSure() {
agreeAction()
}
})
secretDialog?.show()
} else {
secretDialog?.show()
}
}
user_secret_agree.setOnClickListener {
agreeAction()
}
user_use_btn.setOnClickListener {
H5Activity.start(this@SecretActivity, false)
}
user_secret_protect_btn.setOnClickListener {
H5Activity.start(this@SecretActivity, true)
}
}
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK) {
return false
}
return super.onKeyDown(keyCode, event)
}
private fun initStatus() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {//4.4以下不支持状态栏变色
StatusBarUtils.setTransparentForImageView(this, null)
StatusBarUtils.statusBarLightMode(this)
}
}
private fun agreeAction() {
SharedPreferencesEditor.putString("hasAgreeSecret", "true")
setResult(SECRET_PAGE_REQUEST_OK_CODE)
finish()
}
}
\ No newline at end of file
package com.yidianling.user.widget
import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.Gravity
import android.view.WindowManager
import com.yidianling.user.R
import kotlinx.android.synthetic.main.user_secret_dialog_layout.*
class SecretDialog(context: Context, private val listener: OnSecretDialogListener?): Dialog(context, R.style.platform_dialog_default_style) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.user_secret_dialog_layout)
val params = window.attributes
params.width = WindowManager.LayoutParams.MATCH_PARENT
params.height = WindowManager.LayoutParams.WRAP_CONTENT
window.setGravity(Gravity.CENTER)
window.attributes = params
user_secret_dialog_agree.setOnClickListener {
listener?.onSure()
}
user_secret_dialog_no_agree.setOnClickListener {
listener?.onCancel()
}
}
interface OnSecretDialogListener {
fun onCancel()
fun onSure()
}
}
\ 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:radius="12dp"/>
<solid
android:color="#ffffff"/>
</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">
<stroke android:width="0.5dp" android:color="#999999"/>
<corners android:radius="22dp" />
</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:radius="22dp" />
<gradient
android:startColor="#22BFFF"
android:endColor="#159CEF"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="#ffffff">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/user_secret_top_bg" />
<RelativeLayout
android:id="@+id/user_top_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<TextView
android:id="@+id/secrey_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="40dp"
android:text="壹点灵"
android:textColor="#242424"
android:textSize="28dp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/secrey_title"
android:layout_marginLeft="25dp"
android:text="隐私政策概要"
android:textColor="#242424"
android:textSize="28dp"
android:textStyle="bold" />
</RelativeLayout>
<ScrollView
android:layout_below="@+id/user_top_rl"
android:layout_alignBottom="@+id/secret_bottom_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="42dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:orientation="vertical">
<TextView
android:id="@+id/user_secret_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:lineHeight="20dp"
tools:text="感谢您信任并使用壹点灵APP,\n
我们深知个人隐私的重要性,为了您更好的使用本APP,希望您着重关注:\n\n1. 为向您提供交易相关基本功能,我们会收集、使用必要的信息;\n
2. 基于您的明示授权,我们可能会获取您的位置(为您提供附近的咨询师等)、设备号信息(以保障您账号与交易安全)等信息,您有权拒绝或取消授权;\n
3. 我们会采业界先进的安全措施保护您的信息安全;\n
4. 未经您同意,我们不会从第三方处获取、共享或向其提供您的信息;\n
5. 您可以查询、更正、删除您的个人信息。"
android:textColor="#444444"
android:textSize="14dp" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/secret_bottom_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_marginBottom="185dp"
android:layout_marginLeft="@dimen/platform_dp_25">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="阅读完整版"
android:textColor="#444444"
android:textSize="14dp" />
<TextView
android:id="@+id/user_use_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="《用户使用协议》"
android:textColor="#159CEF"
android:textSize="14dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="、"
android:textColor="#444444"
android:textSize="14dp" />
<TextView
android:id="@+id/user_secret_protect_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="《隐私保护政策》"
android:textColor="#159CEF"
android:textSize="14dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:layout_marginBottom="40dp"
android:orientation="horizontal"
android:background="#ffffff">
<TextView
android:id="@+id/user_secret_no_agree"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginRight="5.5dp"
android:layout_weight="1"
android:background="@drawable/user_secret_left_btn_bg"
android:gravity="center"
android:text="不同意并退出"
android:textColor="#999999"
android:textSize="16dp" />
<TextView
android:id="@+id/user_secret_agree"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginLeft="5.5dp"
android:layout_weight="1"
android:background="@drawable/user_secret_right_btn_bg"
android:gravity="center"
android:text="同意并继续"
android:textColor="#FFFFFF"
android:textSize="16dp" />
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:orientation="vertical"
android:gravity="center_horizontal"
android:background="@drawable/user_secret_dialog_bg">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="您需要同意本隐私保护协议\n才能继续使用壹点灵"
android:textSize="18dp"
android:textStyle="bold"
android:textColor="#242424"
android:gravity="center"
android:layout_marginLeft="46dp"
android:layout_marginRight="46dp"
android:layout_marginTop="36dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="若您不同意隐私保护政策,您将无法正常使用相关附加功能或无法达到我们拟达到的功能效果。"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:textSize="14dp"
android:lineSpacingExtra="3dp"
android:textColor="#999999"
android:layout_marginTop="13dp"
android:layout_marginBottom="30dp"/>
<TextView
android:id="@+id/user_secret_dialog_agree"
android:layout_width="match_parent"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:layout_height="44dp"
android:gravity="center"
android:text="同意并继续"
android:textSize="16dp"
android:textColor="#ffffff"
android:background="@drawable/user_secret_right_btn_bg"/>
<TextView
android:id="@+id/user_secret_dialog_no_agree"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="仍不同意并退出"
android:textSize="13dp"
android:layout_marginTop="10dp"
android:textColor="#999999"
android:layout_marginBottom="24dp"/>
</LinearLayout>
</LinearLayout>
......@@ -5,9 +5,11 @@ import com.channel.ydl_flutter_base.base.BaseFlutterFragment
import com.ydl.burypointlib.BuryPointHelper
import com.ydl.burypointlib.MD5Util
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.config.YDLConstants
import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.yidianling.common.tools.RxDeviceTool
import io.flutter.app.FlutterActivity
......@@ -61,7 +63,17 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
val loginBean = ModularServiceManager.getPlatformUserService()?.getUser()
val mMap = mutableMapOf<String, Any>()
var uid = loginBean?.userId ?: ""
mMap["isDevelopment"] = false
val appEnv = BaseApp.instance.getGlobalConfig().appEnv
val cacheAppEnv = YDLCacheUtils.getCacheApi()
var isDevelopment: Boolean = false
if (!TextUtils.isEmpty(cacheAppEnv)) {
isDevelopment = YDLConstants.ENV_TEST == cacheAppEnv
} else {
isDevelopment = YDLConstants.ENV_TEST == appEnv || YDLConstants.ENV_AUTO_TEST == appEnv
}
mMap["isDevelopment"] = isDevelopment
mMap["uid"] = if (TextUtils.isEmpty(uid)) "0" else uid
mMap["accessToken"] = loginBean?.token ?: ""
?: ""
......
package com.ydl.ydlcommon.view.dialog
import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.Gravity
import android.view.WindowManager
import com.ydl.ydlcommon.R
import com.ydl.ydlcommon.router.YdlCommonOut
import kotlinx.android.synthetic.main.platform_ydl_common_dialog_layout.*
class YDLCommonDialog: Dialog {
private var mContext: Context? = null
private var mListener: OnYDLCommonDialogListener? = null
private var mTitle: String = ""
private var mDesc: String = ""
private var mLeftText: String = ""
private var mRightText: String = ""
constructor(context: Context, listener: OnYDLCommonDialogListener?): super(context, R.style.platform_dialog_default_style) {
mContext = context
mListener = listener
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.platform_ydl_common_dialog_layout)
val params = window.attributes
params.width = WindowManager.LayoutParams.MATCH_PARENT
params.height = WindowManager.LayoutParams.WRAP_CONTENT
window.setGravity(Gravity.CENTER)
window.attributes = params
ydl_common_dialog_title.text = mTitle
ydl_common_dialog_desc.text = mDesc
ydl_common_dialog_cancel.text = mLeftText
ydl_common_dialog_sure.text = mRightText
val packageName = YdlCommonOut.getApp().packageName
if (packageName == "com.cxzapp.yidianling") {
ydl_common_dialog_sure.setBackgroundResource(R.drawable.platform_ydl_common_dialog_sure_btn_ydl_bg)
}else if (packageName == "com.cxzapp.xinlizixun"){
ydl_common_dialog_sure.setBackgroundResource(R.drawable.platform_ydl_common_dialog_sure_btn_xlzx_bg)
}
ydl_common_dialog_cancel.setOnClickListener {
mListener?.onCancel()
}
ydl_common_dialog_sure.setOnClickListener {
mListener?.onSure()
}
}
/**
* 标题
*/
fun setTitle(title: String): YDLCommonDialog {
mTitle = title
return this
}
/**
* 内容
*/
fun setDesc(desc: String): YDLCommonDialog {
mDesc = desc
return this
}
/**
* 左侧按钮
*/
fun setCancelText(cancelText: String): YDLCommonDialog {
mLeftText = cancelText
return this
}
/**
* 右侧按钮
*/
fun setSureText(sureText: String): YDLCommonDialog {
mRightText = sureText
return this
}
interface OnYDLCommonDialogListener {
fun onCancel()
fun onSure()
}
}
\ 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:radius="8dp"/>
<solid
android:color="#ffffff"/>
</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">
<stroke android:width="0.5dp"
android:color="#D8D8D8" />
<corners android:bottomLeftRadius="8dp"/>
</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">
<gradient
android:endColor="#fdbd00"
android:startColor="#FFEC8C"/>
<corners android:bottomRightRadius="8dp" />
</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">
<gradient
android:endColor="#1DA1F2"
android:startColor="#23B2FA"/>
<corners android:bottomRightRadius="8dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:orientation="vertical"
android:gravity="center_horizontal"
android:background="@drawable/platform_ydl_common_dialog_bg">
<TextView
android:id="@+id/ydl_common_dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="全部消息设为已读"
android:textSize="16dp"
android:textStyle="bold"
android:textColor="#242424"
android:gravity="center"
android:layout_marginTop="34dp"/>
<TextView
android:id="@+id/ydl_common_dialog_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="本操作会将私聊、通知、互动中的所有未读消息设为已读"
android:layout_marginLeft="44dp"
android:layout_marginRight="44dp"
android:textSize="14dp"
android:gravity="center"
android:textColor="#242424"
android:layout_marginTop="8dp"
android:layout_marginBottom="34dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:orientation="horizontal">
<TextView
android:id="@+id/ydl_common_dialog_cancel"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="center"
tools:text="取消"
android:textSize="16dp"
android:textColor="#666666"
android:background="@drawable/platform_ydl_common_dialog_cancel_btn_bg"/>
<TextView
android:id="@+id/ydl_common_dialog_sure"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="center"
tools:text="全部已读"
android:textSize="16dp"
android:textColor="@color/white"
android:background="@drawable/platform_ydl_common_dialog_sure_btn_ydl_bg"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
......@@ -23,6 +23,14 @@
<!--四边边距都为0的dialog-->
<style name="platform_dialog_default_style" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@color/transparent</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
<!-- 仿ios普通对话框 -->
<style name="platform_normaldialog_style" parent="@android:style/Theme.Dialog">
......
......@@ -20,9 +20,11 @@ class H5JsBean {
class Params {
var callBack: String = "" // 用于回调的js方法名
var isShowTitleBar: Boolean = false //是否展示标题栏
var selfPageType: Int = -1 //当前h5页面
var user_url: String? = null // 修改预约时间用户网址
var doc_url: String? = null // 修改预约时间专家网址
var dsmId: Int = 0 // 修改预约时间参数
......
......@@ -48,6 +48,7 @@ import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.ydl.ydlcommon.utils.TemporaryUtils;
import com.ydl.ydlcommon.utils.URLUtils;
import com.ydl.ydlcommon.view.TitleBar;
import com.ydl.ydlcommon.view.dialog.YDLCommonDialog;
import com.ydl.ydlcommon.view.dialog.YDLShareDialog;
import com.yidianling.common.tools.RxDeviceTool;
import com.yidianling.common.tools.RxImageTool;
......@@ -98,6 +99,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private String rightText = "";
protected TitleBar tb_title;
protected View tb_title_cover_v;
protected ImageView backgroundView;
protected ProgressWebView wv_content;
protected PtrFrameLayout store_house_ptr_frame;
......@@ -151,6 +153,39 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
boolean firstVisitWXH5PayUrl = true;
private String WX_H5_PAY_HOST = "http://testnewm.ydl.com";
/**
* 当前页面类型
*/
private int selfPageType = -1;
private int TEST_QUESTIONS_PAGE_TYPE = 1000001; //测评题页面
private YDLCommonDialog testQuestionsPageReturnDialog = null;
private boolean isTitleBarCover = false; // 标题栏是否被覆盖隐藏
/**
* 设置当前h5页面类型
*
* @param pageType
*/
public void setSelfPageType(int pageType) {
selfPageType = pageType;
// 如果是测试题页面
if (selfPageType == TEST_QUESTIONS_PAGE_TYPE) {
if (null != tb_title) {
tb_title.setImageListener(v -> {
if (!isTitleBarCover) {
showTestQuestionPageReturnDialog();
}
});
tb_title.setOnLeftTextClick((view, isActive) -> {
if (!isTitleBarCover) {
showTestQuestionPageReturnDialog();
}
});
}
}
}
public static void start(Context context, H5Params h5Params1) {
if (null == context) {
......@@ -478,6 +513,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private void initView() {
tb_title = (TitleBar) findViewById(R.id.tb_title);
tb_title_cover_v = (View) findViewById(R.id.tb_title_cover_v);
tb_title.setPaddingLeft(10);
wv_content = (ProgressWebView) findViewById(R.id.wv_content);
backgroundView = findViewById(R.id.iv_background);
......@@ -493,18 +529,40 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
//js修改UI的操作需要放在UI线程中更新
public void hideJavaTitleBar() {
tb_title.setVisibility(View.GONE);
if (null != getStatusView()) {
getStatusView().setVisibility(View.GONE);
}
runOnUiThread(() -> {
tb_title.setVisibility(View.GONE);
if (null != getStatusView()) {
if (selfPageType == TEST_QUESTIONS_PAGE_TYPE) {
//测评题隐藏标题的时候,不隐藏状态栏
} else {
getStatusView().setVisibility(View.GONE);
}
}
});
}
public void showTitleBar() {
tb_title.setVisibility(VISIBLE);
runOnUiThread(() -> {
tb_title.setVisibility(VISIBLE);
if (null != getStatusView()) {
getStatusView().setVisibility(VISIBLE);
}
});
}
if (null != getStatusView()) {
getStatusView().setVisibility(VISIBLE);
}
//js修改UI的操作需要放在UI线程中更新,覆盖标题
public void coverJavaTitleBar() {
isTitleBarCover = true;
runOnUiThread(() -> {
tb_title_cover_v.setVisibility(VISIBLE);
});
}
public void notCoverTitleBar() {
isTitleBarCover = false;
runOnUiThread(() -> {
tb_title_cover_v.setVisibility(GONE);
});
}
public void closeWebKit() {
......@@ -533,7 +591,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(R.drawable.platform_common_back));
tb_title.setImage(getResources().getDrawable(R.drawable.web_common_back));
WebSettings setting = wv_content.getSettings();
setting.setJavaScriptEnabled(true);//支持js
......@@ -762,7 +820,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
tb_title.setImageVis(1);
}
} else {
tb_title.setImage(getResources().getDrawable(R.drawable.platform_common_back));
tb_title.setImage(getResources().getDrawable(R.drawable.web_common_back));
tb_title.setmLeftText("");
tb_title.setImageListener(v -> {
if (h5Params.getShowUrlTitle()) {
......@@ -906,7 +964,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
private void initShareMenu() {
tb_title.setRightIcon(getResources().getDrawable(R.drawable.platform_common_share));
tb_title.setRightIcon(getResources().getDrawable(R.drawable.web_common_share));
tb_title.setOnRightTextClick((view, isActive) -> {
share(null, null);
});
......@@ -1049,7 +1107,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
tb_title.setImageVis(1);
}
} else {
tb_title.setImage(getResources().getDrawable(R.drawable.platform_common_back));
tb_title.setImage(getResources().getDrawable(R.drawable.web_common_back));
tb_title.setmLeftText("");
if ("top".equals(type)) {
setTitle(wv_content.getTitle());
......@@ -1101,7 +1159,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
super.finish();
CookieSyncManager.createInstance(this);
CookieSyncManager.getInstance().startSync();
//CookieManager.getInstance().removeSessionCookie();
//CookieManager.getInstance().removeSessionCookie();
}
private void openImageChooserActivity() {
......@@ -1172,8 +1230,22 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
/**
* 判断是否是测评题页面,如果是,则走测评题页面的返回逻辑
*/
if (keyCode == KeyEvent.KEYCODE_BACK) {
/**
* 是否是测评题目页面
*/
if (selfPageType == TEST_QUESTIONS_PAGE_TYPE) {
showTestQuestionPageReturnDialog();
return false;
}
/**
* 增加逻辑:在高级题测试页面,按物理返回键直接finish当前页面,不走webview.goback()逻辑
*/
if (h5Params.isControlBack()) {
......@@ -1185,6 +1257,30 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
return super.onKeyDown(keyCode, event);
}
/**
* 测评题返回的时候,弹窗提示用户
*/
public void showTestQuestionPageReturnDialog() {
if (null == testQuestionsPageReturnDialog) {
testQuestionsPageReturnDialog = new YDLCommonDialog(this, new YDLCommonDialog.OnYDLCommonDialogListener() {
@Override
public void onCancel() {
finish();
}
@Override
public void onSure() {
coverJavaTitleBar();
testQuestionsPageReturnDialog.dismiss();
}
}).setTitle("你确定要退出测试吗?")
.setDesc("98%的人都说结果很有用哦")
.setCancelText("退出")
.setSureText("继续测试");
}
testQuestionsPageReturnDialog.show();
}
@Override
protected void onDestroy() {
cancelSendNetLossMessage();
......@@ -1204,9 +1300,9 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
if (h5Params.isShowMenu()) {
if (WebModularServiceUtils.Companion.getImService().isHasUnread()) {
tb_title.setImage_right(getResources().getDrawable(R.drawable.platform_common_notice_more_en));
tb_title.setImage_right(getResources().getDrawable(R.drawable.web_common_notice_more_en));
} else {
tb_title.setImage_right(getResources().getDrawable(R.drawable.platform_common_notice_more_un));
tb_title.setImage_right(getResources().getDrawable(R.drawable.web_common_notice_more_un));
}
}
if (backgroundView.getVisibility() == View.VISIBLE) {
......
......@@ -16,13 +16,25 @@
android:layout_height="match_parent"
android:orientation="vertical">
<com.ydl.ydlcommon.view.TitleBar
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:background="@color/platform_white"
app:pa_title_text="加载中" />
<View
android:id="@+id/tb_title_cover_v"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="#ffffff"
android:visibility="gone"></View>
</RelativeLayout>
<com.ydl.webview.SafeTipView
android:id="@+id/safe_tip_view"
android:layout_width="match_parent"
......
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