Commit 8ad4332f by 严久程

Merge branch 'feature/v3' into course_bug_fix

parents 87eb5150 8a935f45
......@@ -28,6 +28,7 @@
<!-- <activity android:name=".MainActivity"/> -->
<activity
android:name=".MainActivity"
android:launchMode="singleTask"
android:theme="@style/platform_NoTitleTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
package com.ydl.component
//import com.ydl.confide.home.ConfideHomeActivity
import android.Manifest
import android.annotation.SuppressLint
import android.content.ComponentName
......@@ -10,7 +11,7 @@ import android.net.Uri
import android.os.IBinder
import android.provider.Settings
import android.util.Log
import android.widget.LinearLayout
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.tbruyelle.rxpermissions2.RxPermissions
import com.umeng.analytics.MobclickAgent
......@@ -18,7 +19,6 @@ import com.ydl.component.home.HomeActivity
import com.ydl.component.music.FragmentContainerActivity
import com.ydl.component.mvp.DemoContract
import com.ydl.component.mvp.DemoPresenter
//import com.ydl.confide.home.ConfideHomeActivity
import com.ydl.media.audio.PlayService
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
......@@ -36,6 +36,7 @@ import kotlinx.android.synthetic.main.activity_main.*
* Created by haorui on 2019-09-01 .
* Des:
*/
@Route(path = "/main/main")
class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(),
DemoContract.View {
......
......@@ -21,7 +21,7 @@ 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_TEST;
public static String appEnv = YDLConstants.ENV_PROD;
@Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......@@ -31,7 +31,6 @@ public final class DemoGlobalConfig implements IConfigModule {
@Override
public void applyOptions(@NotNull Context context, @NotNull GlobalConfig.Builder builder) {
builder.setFrom("ydl".equals(BuildConfig.FLAVOR) ? YDLConstants.FROM_YDL : YDLConstants.FROM_XLZX)
.addUrl("github", APP_DOMAIN)
.setEnv(appEnv)
......
......@@ -379,7 +379,9 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public void openRightTopMenu() {
if (mContext instanceof NewH5Activity) {
((NewH5Activity) mContext).openRightTopMenu();
}
}
@Override
......@@ -403,7 +405,7 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
final StringBuffer sb = new StringBuffer();
sb.append(callbackFuncName);
sb.append("('");
sb.append("333");
sb.append("33,125");
sb.append("')");
if (mContext instanceof NewH5Activity) {
((NewH5Activity) mContext).callJSFunc(sb.toString());
......
......@@ -43,18 +43,17 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.41.2",
"m-consultant" : "0.0.51.11",
"m-fm" : "0.0.23.4",
"m-user" : "0.0.41.1",
"m-home" : "0.0.6.25",
"m-muse" : "0.0.20.4",
"m-tests" : "0.0.15.3",
"m-course" : "0.0.34.4",
"m-im" : "0.0.3.7",
"m-dynamic" : "0.0.1.3",
"m-confide" : "0.0.41.3",
"m-consultant" : "0.0.51.14",
"m-fm" : "0.0.23.5",
"m-user" : "0.0.41.3",
"m-home" : "0.0.6.26",
"m-im" : "0.0.3.10",
"m-dynamic" : "0.0.1.7",
"m-muse" : "0.0.20.8",
"m-tests" : "0.0.15.8",
"m-course" : "0.0.34.10",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.5",
......@@ -71,36 +70,37 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.29.3",
"ydl-platform" : "0.0.29.4",
//第二步 若干
"ydl-webview" : "0.0.28.11",
"ydl-media" : "0.0.14.4",
"ydl-pay" : "0.0.11.5",
"m-audioim" : "0.0.40.4",
"ydl-webview" : "0.0.28.14",
"ydl-media" : "0.0.14.5",
"ydl-pay" : "0.0.11.6",
"m-audioim" : "0.0.40.5",
//以下 几乎不会动
"router" : "0.0.1",
"ydl-net" : "0.0.3.1",
"ydl-utils" : "0.0.3",
"ydl-flutter-base": "0.0.5.17",
"ydl-flutter-base": "0.0.5.21",
]
ydlCompileVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.40",
"m-consultant" : "0.0.28",
"m-course" : "0.0.22",
"m-fm" : "0.0.15",
"m-user" : "0.0.25",
"m-home" : "0.0.3",
"m-im" : "0.0.1",
"m-dynamic" : "0.0.1",
// 以下为接入flutter的模块
"m-muse" : "0.0.7",
"m-tests" : "0.0.4",
"m-confide" : "0.0.41.3",
"m-consultant" : "0.0.51.13",
"m-fm" : "0.0.23.5",
"m-user" : "0.0.41.2",
"m-home" : "0.0.6.26",
"m-im" : "0.0.3.9",
"m-dynamic" : "0.0.1.7",
"m-muse" : "0.0.20.7",
"m-tests" : "0.0.15.7",
"m-course" : "0.0.34.7",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.5",
"m-confide-api" : "0.0.1.1",
......@@ -116,20 +116,20 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.29.3",
"ydl-platform" : "0.0.29.4",
//第二步 若干
"ydl-webview" : "0.0.28.9",
"ydl-webview" : "0.0.28.13",
"ydl-media" : "0.0.14.4",
"ydl-pay" : "0.0.11.5",
"m-audioim" : "0.0.40.4",
"ydl-pay" : "0.0.11.6",
"m-audioim" : "0.0.40.5",
//以下 几乎不会动
"router" : "0.0.1",
"ydl-net" : "0.0.3.1",
"ydl-utils" : "0.0.3",
"ydl-flutter-base": "0.0.5.17",
"ydl-flutter-base": "0.0.5.21",
]
dependencies = [
......@@ -267,7 +267,7 @@ ext {
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base" : "com.ydl:ydl-flutter-base:${ydlCompileVersion["ydl-flutter-base"]}", //组件化项目中的flutter base模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.16.4@aar", //flutter aar
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.16.8@aar", //flutter aar
"ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
......@@ -290,7 +290,7 @@ ext {
"ydl-m-consultant-api" : "com.ydl:m-consultant-api:${ydlCompileVersion["m-consultant-api"]}",
"ydl-m-dynamic-api" : "com.ydl:m-dynamic-api:${ydlCompileVersion["m-dynamic-api"]}",
"ydl-m-confide-api" : "com.ydl:m-confide-api:${ydlCompileVersion["m-confide-api"]}",
"ydl-m-course-api" : "com.ydl:m-course-api:${ydlCompileVersion["m-course-api"]}",
"ydl-m-course-api" : "com.ydl:m-course-api:${ydlCompileVersion["m-course-api"]}",
]
}
......@@ -215,9 +215,9 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch
holder.tvChat.setTextColor(ContextCompat.getColor(context,R.color.platform_color_999999))
holder.tvChat.background = ContextCompat.getDrawable(context,R.drawable.consultant_expert_search_chat_rest)
}
//月售时长
//服务时长
val durationStringBuffer = StringBuffer()
holder.tvSaleDurationForMonth.text = durationStringBuffer.append(itemBean.saleDurationForMonth.toInt()).append("").toString()
holder.tvSaleDurationForMonth.text = durationStringBuffer.append(itemBean.allSaleDuration.toInt()).append("").toString()
//价格
val sb = StringBuffer()
holder.tvPrice.text = sb.append("").append(itemBean.minBookingPrice).toString()
......@@ -308,7 +308,7 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch
val tvOrderNum = itemView.tvOrderNum!!
//帮助人数文案
val tvOrderNumContent = itemView.tvOrderNumContent
//月售时长
//服务时长
val tvSaleDurationForMonth = itemView.tvSaleDurationForMonth!!
//月售时长文案
val tvSaleDurationForMonthContent = itemView.tvSaleDurationForMonthContent
......
......@@ -10,116 +10,121 @@ import com.yidianling.consultant.bean.ExpertSearchTagsIconBean
* @Company 壹点灵
* @date 2018/12/11
*/
data class DoctorServiceItem(/**
* 专家ID
*/
val doctorId : String?,
/**
* 专家uid
*/
val uid : String?,
/**
* 专家名称
*/
val name : String?,
/**
* 跳转路由地址(正常为专家主页地址)
*/
val linkUrl : String?,
/**
* 专家头像地址
*/
val head : String?,
/**
* 专家是否在线 1.在线
*/
val isOnline : Int?,
/**
* 能力等级 1.实习 2.新手 3.精英
*/
val abilityLevel : Int?,
/**
* 有免费咨询:1.有,2.无
*/
val hasServiceFree : Int?,
/**
* 活动图标
*/
val activityImg:String?,
/**
* 是否参加活动
*/
val joinActivity: Boolean?,
/**
* 是否新入驻:true:是,false:否
*/
var isNewEnter : Boolean = false,
/**
* 好评率(倾诉+咨询)
*/
var feedbackRate : Float = 0f,
/**
* 评价数(咨询订单数)
*/
var zixunOrderNum : Int = 0,
/**
* 咨询最低价
*/
val minBookingPrice : String?,
/**
* 资质材料
*/
val teamCertifications : String?,
/**
* 标签分类
*/
val tags : String?,
/**
* 已帮助人数(咨询人数)
*/
val zixunOrderUser : String?,
/**
* 月售时长
*/
var saleDurationForMonth : Float = 0f,
/**
* 服务
*/
val products : MutableList<ExpertSearchProductsBean>?,
/**
* 标签图片
*/
val tagsIcon : ExpertSearchTagsIconBean?,
/**
* 今日是否可约
*/
val isTodayFree : Boolean?,
/**
* 是否咨询中
*/
var inConsult : Boolean = false,
/**
* 是否聆听中
*/
var isListening: Boolean = false,
/**
* 私聊人数
*/
var chatNum: Int = 0,
/**
* 个人铭言
*/
val famousRemark : String?,
/**
* 省
*/
val province : String?,
/**
* 市
*/
val city : String?,
/**
* 私聊按钮的文案(如果不为空则取这个字段的值,如果为空 则默认为:“私聊”)
*/
val chatBtnText : String?
data class DoctorServiceItem(
/**
* 专家ID
*/
val doctorId: String?,
/**
* 专家uid
*/
val uid: String?,
/**
* 专家名称
*/
val name: String?,
/**
* 跳转路由地址(正常为专家主页地址)
*/
val linkUrl: String?,
/**
* 专家头像地址
*/
val head: String?,
/**
* 专家是否在线 1.在线
*/
val isOnline: Int?,
/**
* 能力等级 1.实习 2.新手 3.精英
*/
val abilityLevel: Int?,
/**
* 有免费咨询:1.有,2.无
*/
val hasServiceFree: Int?,
/**
* 活动图标
*/
val activityImg: String?,
/**
* 是否参加活动
*/
val joinActivity: Boolean?,
/**
* 是否新入驻:true:是,false:否
*/
var isNewEnter: Boolean = false,
/**
* 好评率(倾诉+咨询)
*/
var feedbackRate: Float = 0f,
/**
* 评价数(咨询订单数)
*/
var zixunOrderNum: Int = 0,
/**
* 咨询最低价
*/
val minBookingPrice: String?,
/**
* 资质材料
*/
val teamCertifications: String?,
/**
* 标签分类
*/
val tags: String?,
/**
* 已帮助人数(咨询人数)
*/
val zixunOrderUser: String?,
/**
* 月售时长
*/
var saleDurationForMonth: Float = 0f,
/**
* 服务时长
*/
var allSaleDuration: Float = 0f,
/**
* 服务
*/
val products: MutableList<ExpertSearchProductsBean>?,
/**
* 标签图片
*/
val tagsIcon: ExpertSearchTagsIconBean?,
/**
* 今日是否可约
*/
val isTodayFree: Boolean?,
/**
* 是否咨询中
*/
var inConsult: Boolean = false,
/**
* 是否聆听中
*/
var isListening: Boolean = false,
/**
* 私聊人数
*/
var chatNum: Int = 0,
/**
* 个人铭言
*/
val famousRemark: String?,
/**
* 省
*/
val province: String?,
/**
* 市
*/
val city: String?,
/**
* 私聊按钮的文案(如果不为空则取这个字段的值,如果为空 则默认为:“私聊”)
*/
val chatBtnText: String?
)
\ No newline at end of file
......@@ -200,9 +200,10 @@ class RecommendListView : LinearLayout {
recommendViewPager.adapter = RecommendViewPagerAdapter()
recommendViewPager.currentItem = 0
if (mSceneSpecialTopicList.size < 4) {
if (mSceneSpecialTopicList.size <= 4) {
recommendViewPagerIndicator.visibility = View.GONE
} else {
recommendViewPagerIndicator.visibility = View.VISIBLE
setSelectedIndex(0) // 默认为左边选中
}
......
......@@ -10,7 +10,9 @@
<!--课程首页-->
<activity
android:name=".CourseActivity"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
/>
<activity
android:name=".CoursePosterActivity"
android:hardwareAccelerated="false"
......@@ -43,7 +45,9 @@
/>
<activity
android:name=".courseNew.mine.MyCourseActivity"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"
/>
<activity
android:name=".course_special_list.activity.CourseSpecialListActivity"
android:screenOrientation="portrait" />
......
package com.yidianling.course;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.utils.StatusBarUtils;
import org.jetbrains.annotations.Nullable;
/**
* 课程首页Activity(心理课程)
......@@ -11,6 +16,13 @@ import com.ydl.ydlcommon.base.BaseActivity;
public class CourseActivity extends BaseActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
StatusBarUtils.Companion.setTransparentForImageView(this, null);
StatusBarUtils.Companion.statusBarLightMode(this);
super.onCreate(savedInstanceState);
}
@Override
protected int layoutResId() {
return R.layout.activity_course;
}
......
......@@ -38,6 +38,7 @@ import java.util.*
*/
class FlutterCourseHomeFragment : BaseFlutterFragment() {
private var hasRequestCoupon = false
private var dialog: CourseCouponDialog? = null
......
......@@ -15,12 +15,15 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.bean.StatusBarOptions;
import com.ydl.ydlcommon.utils.DisplayUtils;
import com.yidianling.course.CourseListFragment;
import com.yidianling.course.R;
import com.yidianling.course.widget.CourseRedPacketView;
import com.yidianling.course.widget.SearchBarView;
import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Field;
/**
......@@ -36,6 +39,11 @@ public class MyCourseActivity extends BaseActivity {
private int tabIndex;
@NotNull
@Override
public StatusBarOptions getStatusViewOptions() {
return new StatusBarOptions(true,true);
}
public static void start(Context context) {
Intent i = new Intent(context, MyCourseActivity.class);
......
......@@ -13,7 +13,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="19dp"
android:src="@drawable/course_toolbar_back"
android:src="@drawable/platform_common_back"
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_title" />
......
......@@ -12,7 +12,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="15dp"
android:src="@drawable/course_toolbar_back"
android:src="@drawable/platform_common_back"
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_title" />
......
......@@ -10,7 +10,7 @@
android:layout_width="match_parent"
android:layout_height="50dp"
app:pa_title_text="课后笔记"
app:pa_left_start_icon="@drawable/course_toolbar_back"/>
app:pa_left_start_icon="@drawable/platform_common_back"/>
<android.support.v7.widget.RecyclerView
......
......@@ -19,7 +19,7 @@
android:id="@+id/activity_course_back_btn"
android:layout_width="13dp"
android:layout_height="22dp"
android:src="@drawable/course_toolbar_back"
android:src="@drawable/platform_common_back"
android:visibility="gone"/>
<com.yidianling.course.widget.SearchBarView
......
......@@ -12,7 +12,7 @@
android:layout_centerVertical="true"
android:paddingLeft="15dp"
android:paddingRight="10dp"
android:src="@drawable/course_toolbar_back" />
android:src="@drawable/platform_common_back" />
<TextView
android:id="@+id/tv_title"
......
......@@ -88,7 +88,6 @@ dependencies {
implementation 'com.github.ksoichiro:android-observablescrollview:1.6.0'
implementation 'com.pnikosis:materialish-progress:1.7'
implementation 'com.daimajia.numberprogressbar:library:1.4@aar'
implementation 'me.relex:circleindicator:1.2.2@aar'
implementation 'com.github.faruktoptas:FancyShowCaseView:0.1.1'
kapt rootProject.ext.dependencies["butterknife-compiler"]
api rootProject.ext.dependencies["butterknife"]
......
......@@ -7,7 +7,6 @@ import android.animation.ObjectAnimator
import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.support.design.widget.CoordinatorLayout
import android.support.v4.view.animation.FastOutLinearInInterpolator
import android.support.v4.widget.SwipeRefreshLayout
import android.support.v7.widget.LinearLayoutManager
......@@ -17,14 +16,12 @@ import android.view.LayoutInflater
import android.view.View
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.RelativeLayout
import android.widget.TextView
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager
import com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil
import com.yidianling.dynamic.DynamicConstants
......@@ -54,17 +51,6 @@ import java.util.*
class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
SwipeRefreshLayout.OnRefreshListener {
internal var trends_rcv: RecyclerView? = null
internal var trends_lastr_swl: MultiSwipeRefreshLayout? = null
internal var trend_list_no_datas_rel: RelativeLayout? = null
// @BindView(R2.id.trend_last_more_pro_lin)
// LinearLayout loadingDataLin;
internal var cdl: CoordinatorLayout? = null
private val REQUEST_CODE = 1001
private val eachPageDataNum = 20
......@@ -117,7 +103,8 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
//置顶帖Header View
private val recommendTopHeaderView: View
get() {
val view = LayoutInflater.from(activity).inflate(R.layout.dynamic_item_recommend_top, null)
val view =
LayoutInflater.from(activity).inflate(R.layout.dynamic_item_recommend_top, null)
val linearLayoutManager = LinearLayoutManager(activity)
mRecommendTopAdapter = RecommendTopAdapter<TrendsListBean.ExtData>(activity)
mRecommendTopRcv = view.findViewById<View>(R.id.recy_top) as RecyclerView
......@@ -141,7 +128,8 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
val view: View
if (trends_rcv != null) {
view =
LayoutInflater.from(activity).inflate(R.layout.dynamic_progress_item, trends_rcv, false)
LayoutInflater.from(activity)
.inflate(R.layout.dynamic_progress_item, trends_rcv, false)
} else {
view = LayoutInflater.from(activity).inflate(R.layout.dynamic_progress_item, null)
}
......@@ -152,9 +140,7 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
val isNeedLogin: Boolean
get() {
tab = arguments.getInt("tab")
return if (tab == 3) {
true
} else false
return tab == 3
}
private val lastId: Int
......@@ -173,7 +159,7 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
}
override fun afterViewCreated(savedInstanceState: Bundle) {
override fun afterViewCreated(savedInstanceState: Bundle?) {
isPrepared = true //View创建完成
lazyLoad()
}
......@@ -481,18 +467,18 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
}
fun initClick() {
recommend_trend_add_iv.setOnClickListener {
if (!DynamicIn.isLogin()) {
startActivity(DynamicIn.loginWayIntent(activity))
LogUtil.d("start ChooseLoginWayActivity")
} else {
val intent = Intent(activity.applicationContext, PublishTrendActivity::class.java)
val bundle = Bundle()
bundle.putString(DynamicConstants.PUBLISH_TYPE, "default_publish")
intent.putExtra("bundle", bundle)
startActivity(intent)
}
recommend_trend_add_iv.setOnClickListener {
if (!DynamicIn.isLogin()) {
startActivity(DynamicIn.loginWayIntent(activity))
LogUtil.d("start ChooseLoginWayActivity")
} else {
val intent = Intent(activity.applicationContext, PublishTrendActivity::class.java)
val bundle = Bundle()
bundle.putString(DynamicConstants.PUBLISH_TYPE, "default_publish")
intent.putExtra("bundle", bundle)
startActivity(intent)
}
}
image_scroll_top.setOnClickListener {
scrollToTop()
......
package com.yidianling.dynamic.trendsDetail;
import android.content.Context;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.Snackbar;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.View;
import java.util.List;
/**
* Created by haorui on 2019-12-23.
* Des:
*/
public class SnackbarBehavior extends CoordinatorLayout.Behavior<CircleIndicator> {
public SnackbarBehavior() {
}
public SnackbarBehavior(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override public boolean layoutDependsOn(CoordinatorLayout parent, CircleIndicator child,
View dependency) {
return dependency instanceof Snackbar.SnackbarLayout;
}
@Override public boolean onDependentViewChanged(CoordinatorLayout parent, CircleIndicator child,
View dependency) {
float translationY = getTranslationYForSnackbar(parent, child);
child.setTranslationY(translationY);
return true;
}
private float getTranslationYForSnackbar(CoordinatorLayout parent, CircleIndicator ci) {
float minOffset = 0;
final List<View> dependencies = parent.getDependencies(ci);
for (int i = 0, z = dependencies.size(); i < z; i++) {
final View view = dependencies.get(i);
if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(ci, view)) {
minOffset =
Math.min(minOffset, ViewCompat.getTranslationY(view) - view.getHeight());
}
}
return minOffset;
}
}
\ No newline at end of file
......@@ -100,7 +100,6 @@ import butterknife.OnClick;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import me.relex.circleindicator.CircleIndicator;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
......@@ -1136,7 +1135,6 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
} else if (v.getId() == R.id.image_back) {
if (isFromSplash) {
DynamicIn.INSTANCE.mainIntent(this);
finish();
}
setResultForActivity();
this.finish();
......
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@android:integer/config_shortAnimTime">
<objectAnimator
android:propertyName="alpha"
android:valueType="floatType"
android:valueFrom="0.5"
android:valueTo="1.0"/>
<objectAnimator
android:propertyName="scaleX"
android:valueType="floatType"
android:valueFrom="1.0"
android:valueTo="1.8"/>
<objectAnimator
android:propertyName="scaleY"
android:valueType="floatType"
android:valueFrom="1.0"
android:valueTo="1.8"/>
</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="oval">
<solid
android:color="@android:color/white"/>
</shape>
\ No newline at end of file
......@@ -43,7 +43,7 @@
android:gravity="center_vertical"
android:paddingRight="10dp"
android:visibility="gone"
android:src="@drawable/dynamic_more12x" />
android:src="@drawable/platform_common_more" />
</RelativeLayout>
......
......@@ -387,7 +387,7 @@
android:layout_height="wrap_content"
android:background="@color/dynamic_white" />
<me.relex.circleindicator.CircleIndicator
<com.yidianling.dynamic.trendsDetail.CircleIndicator
android:id="@+id/circle_indicator"
android:layout_width="match_parent"
android:layout_height="28dp"
......
......@@ -44,7 +44,7 @@
android:gravity="center_vertical"
android:paddingRight="10dp"
android:visibility="gone"
android:src="@drawable/dynamic_more12x" />
android:src="@drawable/platform_common_more" />
<ImageView
android:layout_width="match_parent"
......
......@@ -64,5 +64,40 @@
<item name="android:backgroundDimEnabled">true</item>
</style>
<declare-styleable name="CircleIndicator"><attr format="dimension" name="ci_width"/><attr format="dimension" name="ci_height"/><attr format="dimension" name="ci_margin"/><attr format="reference" name="ci_animator"/><attr format="reference" name="ci_animator_reverse"/><attr format="reference" name="ci_drawable"/><attr format="reference" name="ci_drawable_unselected"/><attr format="enum" name="ci_orientation">
<enum name="horizontal" value="0"/>
<enum name="vertical" value="1"/>
</attr><attr name="ci_gravity">
<flag name="top" value="0x30"/>
<flag name="bottom" value="0x50"/>
<flag name="left" value="0x03"/>
<flag name="right" value="0x05"/>
<flag name="center_vertical" value="0x10"/>
<flag name="fill_vertical" value="0x70"/>
<flag name="center_horizontal" value="0x01"/>
<flag name="fill_horizontal" value="0x07"/>
<flag name="center" value="0x11"/>
<flag name="fill" value="0x77"/>
<flag name="clip_vertical" value="0x80"/>
<flag name="clip_horizontal" value="0x08"/>
<flag name="start" value="0x00800003"/>
<flag name="end" value="0x00800005"/>
</attr></declare-styleable>
</resources>
......@@ -125,63 +125,64 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
ToastHelper.Companion.show(msg);
}
});
return;//如果是动态消息则到此结束,其它消息类型走下面流程
}
((BaseActivity) context).showProgressDialog("正在中转");
Disposable di = httpHelper.getMsgDetail(new MsgDetailParam(mDataList.get(position).id))
.compose(RxUtils.applySchedulers(lifecycleable))
.compose(RxUtils.resultData())
.subscribe(msgDetail -> {
mDataList.get(position).is_read = 2;
((BaseActivity) context).dismissProgressDialog();
EventBus.getDefault().post(new UpdateTabUnreadNumEvent());
switch (msgDetail.type) {
case 1:
case 2:
case 501:
case 502:
case 506:
//预约详情
H5Params h5Params = new H5Params(ImIn.INSTANCE.getReserveHost() + msgDetail.relation_id1, null);
NewH5Activity.start(context, h5Params);
break;
case 504:
case 505:
//微问诊列表
H5Params h5Paramswe = new H5Params(ImConstants.Companion.getMY_CHAT(), null);
NewH5Activity.start(context, h5Paramswe);
break;
case 507:
case 508:
case 509:
//预约评价 微问诊评价 倾诉评价
H5Params h5Paramspi = new H5Params(ImConstants.Companion.getYYPJ() + msgDetail.relation_id1, null);
NewH5Activity.start(context, h5Paramspi);
break;
case 510:
//免费体验详情
H5Params h5Paramsmi = new H5Params(ImConstants.Companion.getFREEDTAIL() + msgDetail.relation_id1, null);
NewH5Activity.start(context, h5Paramsmi);
break;
case 503:
case 1001:
case 1002:
case 1004://老板心事心事详情
break;
case 1003:
//如果是动态消息则到此结束,其它消息类型走下面流程
}else {
Disposable di = httpHelper.getMsgDetail(new MsgDetailParam(mDataList.get(position).id))
.compose(RxUtils.applySchedulers(lifecycleable))
.compose(RxUtils.resultData())
.subscribe(msgDetail -> {
mDataList.get(position).is_read = 2;
EventBus.getDefault().post(new UpdateTabUnreadNumEvent());
switch (msgDetail.type) {
case 1:
case 2:
case 501:
case 502:
case 506:
//预约详情
H5Params h5Params = new H5Params(ImIn.INSTANCE.getReserveHost() + msgDetail.relation_id1, null);
NewH5Activity.start(context, h5Params);
break;
case 504:
case 505:
//微问诊列表
H5Params h5Paramswe = new H5Params(ImConstants.Companion.getMY_CHAT(), null);
NewH5Activity.start(context, h5Paramswe);
break;
case 507:
case 508:
case 509:
//预约评价 微问诊评价 倾诉评价
H5Params h5Paramspi = new H5Params(ImConstants.Companion.getYYPJ() + msgDetail.relation_id1, null);
NewH5Activity.start(context, h5Paramspi);
break;
case 510:
//免费体验详情
H5Params h5Paramsmi = new H5Params(ImConstants.Companion.getFREEDTAIL() + msgDetail.relation_id1, null);
NewH5Activity.start(context, h5Paramsmi);
break;
case 503:
case 1001:
case 1002:
case 1004://老板心事心事详情
break;
case 1003:
// ImIn.INSTANCE.MyRedPackActivity(context,null);
ImIn.INSTANCE.myRedPockIntent(context);
break;
}
}, new ThrowableConsumer() {
@Override
public void accept(@NotNull String msg) {
((BaseActivity) context).dismissProgressDialog();
ToastHelper.Companion.show(msg);
}
});
ImIn.INSTANCE.myRedPockIntent(context);
break;
}
}, new ThrowableConsumer() {
@Override
public void accept(@NotNull String msg) {
((BaseActivity) context).dismissProgressDialog();
ToastHelper.Companion.show(msg);
}
});
}
}
});
return convertView;
......
......@@ -39,6 +39,7 @@ import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.YdlBuryPointUtil;
import com.ydl.ydlcommon.utils.log.LogHelper;
import com.ydl.ydlcommon.view.CircleImageView;
import com.yidianling.common.tools.ToastUtil;
......@@ -178,7 +179,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
//和助理私聊时的常用语逻辑
rl_common_question_enter = rootView.findViewById(R.id.rl_common_question);
fl_question_content = rootView.findViewById(R.id.fl_question_content);
rl_common_question_enter.setVisibility(ActionHandlerStorage.getL(sessionId).getUserType() == 3 ? View.VISIBLE : View.GONE);
rl_common_question_enter.setVisibility(ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 3 ? View.VISIBLE : View.GONE);
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 3) {
rl_common_question_enter.setOnClickListener(v -> {
......@@ -193,6 +194,12 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
rl_common_question_enter.postDelayed(() -> openOrCloseCommonQuestionLayout(true), 300);
} else {
getCommonQuestionListData();
try {
YdlBuryPointUtil.sendPv("快捷短语弹起");
}catch (Exception e){
}
}
ChatStatusCacheHelper.clearDataByKey("chatEvent");
}
......@@ -214,14 +221,23 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
});
getUserInfoCollect();
collectInfoPopupWindow.show(top_expert_info_cl);
if (!getActivity().isFinishing()) {
collectInfoPopupWindow.show(top_expert_info_cl);
}
try {
YdlBuryPointUtil.sendPv("用户信息收集页面");
}catch (Exception e){
}
}
ChatStatusCacheHelper.clearDataByKey("collectEvent");
}
}
// 初始化顶部专家信息栏
if (ActionHandlerStorage.getL(sessionId).getUserType() == 2) {
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 2) {
top_expert_info_cl.setVisibility(View.VISIBLE);
initTopCustomBar();
}
......@@ -506,7 +522,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if (TextUtils.equals(userChatStatus, "true")) {
messageListPanel = new MessageListPanelEx(container, rootView, anchor, false, true);
SharedPreferencesEditor.putString(chatStatusKey, "true");
}else {
} else {
messageListPanel = new MessageListPanelEx(container, rootView, anchor, false, false);
}
} else {
......@@ -849,4 +865,5 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
.subscribe(resp -> {
}, throwable -> {
});
}}
}
}
......@@ -4,6 +4,8 @@ import android.graphics.drawable.Drawable
import com.google.gson.Gson
import com.ydl.media.audio.AudioPlayer
import com.ydl.media.audio.model.Music
import com.ydl.media.view.PlayTypeEnum
import com.ydl.media.view.PlayerFloatHelper
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.view.dialog.YDLShareDialog
import com.yidianling.common.tools.ToastUtil
......@@ -77,6 +79,7 @@ class MusePlugin : MethodChannel.MethodCallHandler {
music.artist = ""
music.coverPath = ""
music.title = ""
PlayerFloatHelper.playingType = PlayTypeEnum.PLAY_TYPE_MUSE
AudioPlayer.get().singleCirclePlay(music)
}
}
......
......@@ -2,7 +2,6 @@ package com.yidianling.user.modular_service
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
......@@ -13,7 +12,9 @@ import com.yidianling.user.api.service.IAppService
class AppServiceImpl: IAppService {
override fun mainIntent(activity: Activity) {
ARouter.getInstance().build("/main/main").navigation()
ARouter.getInstance()
.build("/main/main")
.navigation()
}
override fun mainIntent(context: Context, selectTab: Int, animation: Boolean) {
......@@ -22,7 +23,6 @@ class AppServiceImpl: IAppService {
bundle.putBoolean("animation", animation)
ARouter.getInstance().build("/main/main")
.withFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
.withBundle("bundle",bundle)
.navigation()
}
......
......@@ -10,7 +10,8 @@
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:pa_left_start_icon="@drawable/user_toolbar_back"
android:background="@color/platform_white"
app:pa_left_start_icon="@drawable/platform_common_back"
app:pa_title_text="手机号" />
<TextView
......
......@@ -7,9 +7,10 @@
android:orientation="vertical">
<com.ydl.ydlcommon.view.TitleBar
android:background="@color/platform_white"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:pa_left_start_icon="@drawable/user_toolbar_back"
app:pa_left_start_icon="@drawable/platform_common_back"
app:pa_title_text="填写手机号"/>
<TextView
......
......@@ -9,7 +9,8 @@
<com.ydl.ydlcommon.view.TitleBar
android:layout_width="match_parent"
android:layout_height="50dp"
app:pa_left_start_icon="@drawable/user_toolbar_back"
android:background="@color/platform_white"
app:pa_left_start_icon="@drawable/platform_common_back"
app:pa_title_text="隐私安全">
</com.ydl.ydlcommon.view.TitleBar>
......
......@@ -266,7 +266,7 @@ public class TitleBar extends RelativeLayout {
if(mLeftStartIconColor != 0xffffff && mLeftStartIcon == null) {
//动态设置返回图标颜色
Resources resources = this.getResources();
Bitmap bmp = BitmapFactory.decodeResource(resources, R.drawable.platform_toolbar_back);
Bitmap bmp = BitmapFactory.decodeResource(resources, R.drawable.platform_common_back);
Bitmap colorBmp = BitmapUtils.tintBitmap(bmp, mLeftStartIconColor);
return new BitmapDrawable(resources, colorBmp);
}else {
......
......@@ -50,7 +50,11 @@ class MoreClickView @JvmOverloads constructor(private val mContext: Context, att
un_read_num.visibility = View.GONE
}
else {
un_read_num.text = unreadNum.toString()
if (unreadNum > 99) {
un_read_num.text = "${unreadNum}+"
} else {
un_read_num.text = unreadNum.toString()
}
}
}
......
......@@ -27,7 +27,6 @@ import com.alibaba.android.arouter.launcher.ARouter;
import com.tencent.smtt.export.external.interfaces.JsResult;
import com.tencent.smtt.export.external.interfaces.SslError;
import com.tencent.smtt.export.external.interfaces.SslErrorHandler;
import com.tencent.smtt.sdk.CookieManager;
import com.tencent.smtt.sdk.CookieSyncManager;
import com.tencent.smtt.sdk.WebChromeClient;
import com.tencent.smtt.sdk.WebSettings;
......@@ -763,7 +762,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
tb_title.setImageVis(1);
}
} else {
tb_title.setImage(getResources().getDrawable(YDLConstants.FROM_YDL.equals(appFrom) ? R.drawable.platform_toolbar_back : R.drawable.platform_toolbar_back_yellow));
tb_title.setImage(getResources().getDrawable(R.drawable.platform_common_back));
tb_title.setmLeftText("");
tb_title.setImageListener(v -> {
if (h5Params.getShowUrlTitle()) {
......@@ -1102,7 +1101,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() {
......
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