Commit 1b107bf5 by konghaorui

HomeFragment配置化

parent dd070370
ext {
kotlin_version = "1.3.21"
dev_mode = false
dev_mode = true
ydl_app = [
appName : "心理咨询壹点灵",
......@@ -69,7 +69,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.39.11",
"ydl-platform" : "0.0.39.17",
//第二步 若干
"ydl-webview" : "0.0.38.13",
......
......@@ -29,7 +29,7 @@ android {
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
flavorDimensions "versionCode"
vectorDrawables.useSupportLibrary = true
}
lintOptions {
......@@ -60,7 +60,6 @@ android {
res.srcDirs = ['src/main/res']
}
}
}
dependencies {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -24,13 +24,14 @@ import com.ydl.ydlcommon.bean.ShareData
import com.ydl.ydlcommon.data.PlatformRamImpl
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.R
import com.yidianling.home.api.event.HomeModuleTabEvent
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.constract.IHomeContract
import com.yidianling.home.model.bean.*
import com.yidianling.im.api.bean.IMRequestCallback
......@@ -135,7 +136,7 @@ open class HomeBaseImpl : IHomeBaseEvent {
per = 1f
}
val alpha = (per * 255).toInt()
// Log.e("Tag", "alpha=$alpha--per=$per")
LogUtil.i("Tag", "alpha=$alpha--per=$per")
view_rl_top_bg.background.mutate().alpha = alpha
}
}
......
......@@ -2,9 +2,7 @@ package com.yidianling.home.event
import android.support.v7.widget.RecyclerView
import android.view.View
import android.widget.ImageView
import com.yidianling.home.model.bean.*
import com.yidianling.home.ui.view.CouponDialog
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......
......@@ -66,7 +66,7 @@ class HomePagerDataBean() {
*/
var headerBean: HomeHeaderBean? = null
/**
* 模块分类 @see [com.yidianling.home.constract.YdlHomeViewHolderConstract]
* 模块分类 @see [com.yidianling.home.constract.HomeViewConfig]
*/
var type: Int?= 0
}
......
......@@ -4,8 +4,8 @@ package com.yidianling.home.model.bean
* Created by xj on 2019/9/29.
*/
class HomeTestBean: HomeItemBaseBean {
constructor():super(false)
constructor(isRealEmpty:Boolean):super(isRealEmpty)
constructor() : super(false)
constructor(isRealEmpty: Boolean) : super(isRealEmpty)
/**
* 分类数据
......
......@@ -9,8 +9,6 @@ import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.mvp.base.IModel
import com.ydl.ydlcommon.mvp.base.IView
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.YDLAsyncUtils
import com.yidianling.common.tools.RxAppTool
......@@ -19,10 +17,8 @@ import com.yidianling.home.model.bean.HomeAskBean
import com.yidianling.home.model.bean.HomeItemBaseBean
import com.yidianling.home.model.bean.HomePagerDataBean
import com.yidianling.home.utils.HomeFileUtils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers
abstract class BaseHomePresenterImpl< V : IHomeBaseContract.View,M : IHomeBaseContract.Model>:
BasePresenter< V, M>(), IHomeBaseContract.Presenter<V> {
......@@ -80,25 +76,22 @@ abstract class BaseHomePresenterImpl< V : IHomeBaseContract.View,M : IHomeBaseC
var cacheHomeData: String
//是否为新的数据结构
val isNewPageData = SharedPreferencesEditor.getString(IS_NEW_CACHE_HOME_PAGER_DATA)
val homeCacheVersion =
SharedPreferencesEditor.getString(HOME_PAGER_DATA_CACHE_VERISON)
val appVersionCode = RxAppTool.getAppVersionCode(BaseApp.getApp())
//版本更新后不使用上个版本的首页缓存
cacheHomeData = if (isNewPageData.isEmpty() || (!TextUtils.isEmpty(homeCacheVersion) && appVersionCode > homeCacheVersion.toInt())) {
cacheHomeData = if ((!TextUtils.isEmpty(homeCacheVersion) && appVersionCode > homeCacheVersion.toInt())) {
""
} else {
//上次首页缓存数据
SharedPreferencesEditor.getString(CACHE_HOME_PAGER_DATA)
}
if (cacheHomeData.isEmpty()) {
//第一次安装使用本地临时数据
cacheHomeData =
String(HomeFileUtils.getAssertsFile(context, fileName)!!)
}
return cacheHomeData
}
......
package com.yidianling.home.adapter
import android.content.Context
import android.graphics.Color
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.yidianling.home.R
import com.yidianling.home.constract.YdlHomeViewHolderConstract
import com.yidianling.home.constract.HomeViewConfig
import com.yidianling.home.event.HomeImpl
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.event.IHomeEvent
import com.yidianling.home.model.bean.*
import com.yidianling.home.ui.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
* @描述: 壹点零首页适配器
......@@ -105,7 +105,7 @@ class YdlHomeAdapter(private val mContext: Context,
if (position < list.size) {
return list[position].type!!
} else {
return YdlHomeViewHolderConstract.FOOTER_VIEW
return -1
}
}
......@@ -113,49 +113,57 @@ class YdlHomeAdapter(private val mContext: Context,
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): RecyclerView.ViewHolder {
when (viewType) {
//顶部ViewPager与分类模块
YdlHomeViewHolderConstract.PAGER_BANNER_VIEW -> {
return HomePagerBannerViewHolder(HomePagerBannerView(mContext, homeEvent))
HomeViewConfig.getOrder().bannerIndex -> {
if (viewType == -1){
//空布局
val view = View(mContext)
val layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,1)
view.layoutParams = layoutParams
view.visibility = View.GONE
return HomePagerBannerViewHolder(view,viewType)
}
return HomePagerBannerViewHolder(HomePagerBannerView(mContext, homeEvent),viewType)
}
//咨询模块
YdlHomeViewHolderConstract.CONSULT_VIEW -> {
return HomeConsultViewHolder(HomeConsultView(mContext, homeEvent))
HomeViewConfig.getOrder().consultIndex -> {
return HomeConsultViewHolder(HomeConsultView(mContext, homeEvent),viewType)
}
//顶部预约专家,即时倾诉,心理测试按钮模块
YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW -> {
return HomeButtonBannerViewHolder(HomeButtonBannerView(mContext, homeEvent))
HomeViewConfig.getOrder().buttonIndex -> {
return HomeButtonBannerViewHolder(HomeButtonBannerView(mContext, homeEvent),viewType)
}
//倾诉*排解模块
YdlHomeViewHolderConstract.CONFIDE_VIEW -> {
return HomeConfideViewHolder(HomeConfideView(mContext, homeEvent))
HomeViewConfig.getOrder().confideIndex -> {
return HomeConfideViewHolder(HomeConfideView(mContext, homeEvent),viewType)
}
//课程*成长模块
YdlHomeViewHolderConstract.COURSE_VIEW -> {
return HomeCourseViewHolder(HomeCourseView(mContext, homeEvent))
HomeViewConfig.getOrder().courseIndex -> {
return HomeCourseViewHolder(HomeCourseView(mContext, homeEvent),viewType)
}
//解忧*问答模块
YdlHomeViewHolderConstract.ASSUAGE_GRIEF_VIEW -> {
return HomeAssuageGriefViewHolder(HomeAssuageGriefView(mContext, homeEvent))
HomeViewConfig.getOrder().dynamicIndex -> {
return HomeAssuageGriefViewHolder(HomeAssuageGriefView(mContext, homeEvent),viewType)
}
//测试模块
YdlHomeViewHolderConstract.TEST_VIEW -> {
return HomeTestViewHolder(HomeTestView(mContext, homeEvent))
HomeViewConfig.getOrder().testIndex -> {
return HomeTestViewHolder(HomeTestView(mContext, homeEvent),viewType)
}
//心灵*电台模块
YdlHomeViewHolderConstract.INTELLIGENT_VIEW -> {
return HomeIntelligentViewHolder(HomeIntelligentView(mContext, homeEvent))
HomeViewConfig.getOrder().fmIndex -> {
return HomeIntelligentViewHolder(HomeIntelligentView(mContext, homeEvent),viewType)
}
//文章*阅读模块
YdlHomeViewHolderConstract.ARTICLE_VIEW -> {
return HomeArticleViewHolder(HomeArticleView(mContext, homeEvent))
HomeViewConfig.getOrder().articleIndex -> {
return HomeArticleViewHolder(HomeArticleView(mContext, homeEvent),viewType)
}
//壹点*冥想模块
YdlHomeViewHolderConstract.MUSE_VIEW -> {
return HomeMuseViewHolder(HomeMuseView(mContext, homeEvent))
HomeViewConfig.getOrder().museIndex -> {
return HomeMuseViewHolder(HomeMuseView(mContext, homeEvent),viewType)
}
//底部提示语模块
else -> {
val view = mInflater.inflate(R.layout.home_footer_view, parent, false)
return FooterViewViewHolder(view)
return FooterViewViewHolder(view,viewType)
}
}
}
......@@ -164,10 +172,15 @@ class YdlHomeAdapter(private val mContext: Context,
when (holder) {
//顶部ViewPager与分类模块
is HomePagerBannerViewHolder -> {
var headerBean = list[position].headerBean;
var tempIndex = if (holder.viewType==-1) 0 else holder.viewType
var headerBean = list[tempIndex].headerBean;
this.consultCategoryData = headerBean?.consultCategoryData
this.listenCategoryDate = headerBean?.listenCategoryDate
holder.pagerBannerView.initData(headerBean)
if (holder.viewType !=-1){
holder.pagerBannerView as HomePagerBannerView
holder.pagerBannerView.initData(headerBean)
}
}
//顶部预约专家,即时倾诉,心理课堂,心理测试按钮模块
is HomeButtonBannerViewHolder -> {
......@@ -175,38 +188,38 @@ class YdlHomeAdapter(private val mContext: Context,
//咨询模块
is HomeConsultViewHolder -> {
holder.consultView.setTitle(this.consultCategoryData, consultSelectPosition)
holder.consultView.setConsultInfoView(list[position].consultBean?.list,this.consultCategoryData?.get(consultSelectPosition))
holder.consultView.setConsultInfoView(list[holder.viewType].consultBean?.list,this.consultCategoryData?.get(consultSelectPosition))
consultPosition = position
}
//倾诉*排解模块
is HomeConfideViewHolder -> {
holder.confideViewView.setTitle(this.listenCategoryDate, confideSelectPosition)
holder.confideViewView.setConfideExpertInfoView(list[position].confideBean?.body)
holder.confideViewView.setConfideExpertInfoView(list[holder.viewType].confideBean?.body)
confidePosition = position
}
//课程*成长模块
is HomeCourseViewHolder -> {
holder.courseViewView.initData(list[position].courseBean?.list)
holder.courseViewView.initData(list[holder.viewType].courseBean?.list)
}
//解忧*问答模块
is HomeAssuageGriefViewHolder -> {
holder.assuageGriefViewView.initData(position,list[position].askBean?.data)
holder.assuageGriefViewView.initData(position,list[holder.viewType].askBean?.data)
}
//壹点*冥想模块
is HomeMuseViewHolder -> {
holder.museViewView.initData(list[position].museBean)
holder.museViewView.initData(list[holder.viewType].museBean)
}
//心灵*电台模块
is HomeIntelligentViewHolder -> {
holder.intelligentViewView.initData(list[position].fmBean?.list)
holder.intelligentViewView.initData(list[holder.viewType].fmBean?.list)
}
//文章*阅读模块
is HomeArticleViewHolder -> {
holder.articleViewView.initData(list[position].articleBean?.list)
holder.articleViewView.initData(list[holder.viewType].articleBean?.list)
}
//测试模块
is HomeTestViewHolder -> {
holder.testView.initData(list[position].testListBean)
holder.testView.initData(list[holder.viewType].testListBean)
}
}
}
......@@ -218,55 +231,55 @@ class YdlHomeAdapter(private val mContext: Context,
/**
* 顶部ViewPager与分类模块 ViewHolder
*/
inner class HomePagerBannerViewHolder(val pagerBannerView: HomePagerBannerView) : RecyclerView.ViewHolder(pagerBannerView)
inner class HomePagerBannerViewHolder(val pagerBannerView: View,val viewType:Int) : RecyclerView.ViewHolder(pagerBannerView)
/**
* 顶部预约专家,即时倾诉,心理测试按钮模块 ViewHolder
*/
inner class HomeButtonBannerViewHolder(val buttonBannerView: HomeButtonBannerView) : RecyclerView.ViewHolder(buttonBannerView)
inner class HomeButtonBannerViewHolder(val buttonBannerView: HomeButtonBannerView,val viewType:Int) : RecyclerView.ViewHolder(buttonBannerView)
/**
* 咨询模块 ViewHolder
*/
inner class HomeConsultViewHolder(val consultView: HomeConsultView) : RecyclerView.ViewHolder(consultView)
inner class HomeConsultViewHolder(val consultView: HomeConsultView,val viewType:Int) : RecyclerView.ViewHolder(consultView)
/**
* 倾诉*排解模块 ViewHolder
*/
inner class HomeConfideViewHolder(val confideViewView: HomeConfideView) : RecyclerView.ViewHolder(confideViewView)
inner class HomeConfideViewHolder(val confideViewView: HomeConfideView,val viewType:Int) : RecyclerView.ViewHolder(confideViewView)
/**
* 课程*成长模块 ViewHolder
*/
inner class HomeCourseViewHolder(val courseViewView: HomeCourseView) : RecyclerView.ViewHolder(courseViewView)
inner class HomeCourseViewHolder(val courseViewView: HomeCourseView,val viewType:Int) : RecyclerView.ViewHolder(courseViewView)
/**
* 测试模块 ViewHolder
*/
inner class HomeTestViewHolder(val testView: HomeTestView) : RecyclerView.ViewHolder(testView)
inner class HomeTestViewHolder(val testView: HomeTestView,val viewType:Int) : RecyclerView.ViewHolder(testView)
/**
* 解忧*问答模块 ViewHolder
*/
inner class HomeAssuageGriefViewHolder(val assuageGriefViewView: HomeAssuageGriefView) : RecyclerView.ViewHolder(assuageGriefViewView)
inner class HomeAssuageGriefViewHolder(val assuageGriefViewView: HomeAssuageGriefView,val viewType:Int) : RecyclerView.ViewHolder(assuageGriefViewView)
/**
* 心灵*电台模块 ViewHolder
*/
inner class HomeIntelligentViewHolder(val intelligentViewView: HomeIntelligentView) : RecyclerView.ViewHolder(intelligentViewView)
inner class HomeIntelligentViewHolder(val intelligentViewView: HomeIntelligentView,val viewType:Int) : RecyclerView.ViewHolder(intelligentViewView)
/**
* 文章*阅读模块 ViewHolder
*/
inner class HomeMuseViewHolder(val museViewView: HomeMuseView) : RecyclerView.ViewHolder(museViewView)
inner class HomeMuseViewHolder(val museViewView: HomeMuseView,val viewType:Int) : RecyclerView.ViewHolder(museViewView)
/**
* 文章*阅读模块 ViewHolder
*/
inner class HomeArticleViewHolder(val articleViewView: HomeArticleView) : RecyclerView.ViewHolder(articleViewView)
inner class HomeArticleViewHolder(val articleViewView: HomeArticleView,val viewType:Int) : RecyclerView.ViewHolder(articleViewView)
/**
* 底部提示语模块 ViewHolder
*/
inner class FooterViewViewHolder(val footerView: View) : RecyclerView.ViewHolder(footerView)
inner class FooterViewViewHolder(val footerView: View,val viewType:Int) : RecyclerView.ViewHolder(footerView)
}
\ No newline at end of file
......@@ -7,52 +7,64 @@ package com.yidianling.home.constract
* @Company 壹点灵
* @date 2019/02/13
*/
class YdlHomeViewHolderConstract {
class HomeViewConfig {
companion object {
private var homeViewOrder = HomeViewOrder()
fun getOrder():HomeViewOrder{
return homeViewOrder
}
fun setOrder(order:HomeViewOrder){
this.homeViewOrder = order
}
}
class HomeViewOrder{
/**
* 顶部ViewPager与分类模块
* 顶部viewpager与分类模块
*/
val PAGER_BANNER_VIEW = 10001
var bannerIndex :Int? = 0
/**
* 顶部预约专家,即时倾诉,心理测试按钮模块
*/
val BUTTON_BANNER_VIEW = 10002
var buttonIndex :Int? = 1
/**
* 咨询模块
*/
val CONSULT_VIEW = 10003
var consultIndex :Int? = 2
/**
* 课程*成长模块
*/
val COURSE_VIEW = 10004
var courseIndex :Int? = 3
/**
* 倾诉*排解模块
*/
val CONFIDE_VIEW = 10005
var confideIndex :Int? = 4
/**
* 测试模块
*/
val TEST_VIEW = 10006
var testIndex :Int? = 5
/**
* 解忧*问答模块
*/
val ASSUAGE_GRIEF_VIEW = 10007
var dynamicIndex :Int?= 6
/**
* 壹点*冥想模块
*/
val MUSE_VIEW = 10008
var museIndex :Int?= 7
/**
* 心灵*电台模块
*/
val INTELLIGENT_VIEW = 10009
var fmIndex :Int?= 8
/**
* 文章*阅读模块
*/
val ARTICLE_VIEW = 10010
var articleIndex :Int? = 9
/**
* 底部提示语模块
*/
val FOOTER_VIEW = 10011
var footerIndex :Int? = 10
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ import com.yidianling.home.constract.IHomeContract
* @Company 壹点灵
* @date 2019/02/13
*/
class HomeImpl(context: Context, homeView: IHomeContract.View) : HomeBaseImpl(context, homeView), IHomeEvent {
open class HomeImpl(context: Context, homeView: IHomeContract.View) : HomeBaseImpl(context, homeView), IHomeEvent {
override fun museMoreClick(dataJson: String) {
if (Utils.isFastClick()) {
//防止连击
......
......@@ -12,8 +12,8 @@ import android.widget.LinearLayout
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.adapter.YdlHomeAdapter
import com.yidianling.home.constract.HomeViewConfig
import com.yidianling.home.constract.IHomeContract
import com.yidianling.home.constract.YdlHomeViewHolderConstract
/**
* @author yuanwai
......@@ -104,7 +104,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
if (mCurrentPosition != manager.findFirstVisibleItemPosition() && manager.findFirstVisibleItemPosition() != -1) {
mCurrentPosition = manager.findFirstVisibleItemPosition()
}
if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.CONFIDE_VIEW) {
if (adapter!!.getItemViewType(mCurrentPosition) == HomeViewConfig.getOrder().confideIndex) {
val view = manager.findViewByPosition(mCurrentPosition)
if (view != null) {
if (view is ViewGroup) {
......@@ -127,7 +127,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
confideFilterView!!.visibility = View.INVISIBLE
}
}
} else if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.CONSULT_VIEW) {
} else if (adapter!!.getItemViewType(mCurrentPosition) == HomeViewConfig.getOrder().consultIndex) {
val view = manager.findViewByPosition(mCurrentPosition)
if (view != null) {
if (view is ViewGroup) {
......@@ -150,7 +150,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
consultFilterView!!.visibility = View.INVISIBLE
}
}
} else if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW) {
} else if (adapter!!.getItemViewType(mCurrentPosition) == HomeViewConfig.getOrder().buttonIndex) {
if (excuteStartAnim) {
mHomeView?.startAnim()
excuteStartAnim = false
......@@ -158,7 +158,7 @@ class HomeConfideRecyleSuspendListener : RecyclerView.OnScrollListener() {
}
confideFilterView?.visibility = View.INVISIBLE
consultFilterView?.visibility = View.INVISIBLE
} else if (adapter!!.getItemViewType(mCurrentPosition) == YdlHomeViewHolderConstract.PAGER_BANNER_VIEW) {
} else if (adapter!!.getItemViewType(mCurrentPosition) == HomeViewConfig.getOrder().bannerIndex) {
if (excuteEndAnim) {
mHomeView?.endAnim()
excuteEndAnim = false
......
......@@ -7,11 +7,12 @@ import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.ThreadUtils
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxAppTool
import com.yidianling.consultant.api.IConsultantService
import com.yidianling.home.constract.HomeViewConfig
import com.yidianling.home.constract.IHomeContract
import com.yidianling.home.constract.YdlHomeViewHolderConstract
import com.yidianling.home.model.HomeModelImpl
import com.yidianling.home.model.bean.*
import com.yidianling.home.utils.HomeLogPrinter
......@@ -20,7 +21,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Action
import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers
import java.util.concurrent.TimeUnit
import java.util.*
/**
......@@ -43,16 +44,10 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
disposeHome()
val homeList: MutableList<HomePagerDataBean> = mutableListOf()
LogUtil.d("mConsultType-loadHomeData:$mConsultType")
mHomeDisposable = Observable.mergeArray(
mModel.headerRequest()
.compose(RxUtils.applySchedulers(mView)).map { it ->
//首页头部数据 分类 & Banner
homeList.add(
getHomeItemFromTempData(
it,
YdlHomeViewHolderConstract.PAGER_BANNER_VIEW
)
)
val headerObservable = mModel.headerRequest()
.compose(RxUtils.applySchedulers(mView)).map { it ->
mView.homeHeadResponse(it)
//获取咨询分类后,再次请求咨询模块数据,防止出现默认分类为空,数据不对
if (it.consultCategoryData != null && it.consultCategoryData!!.isNotEmpty()) {
......@@ -61,102 +56,147 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
getConsultData("${it.consultCategoryData!![0].id}", 0, false)
}
}
homeList.add(HomePagerDataBean(YdlHomeViewHolderConstract.BUTTON_BANNER_VIEW))
//保存热门搜索列表
it.keywordData?.let {
ModularServiceManager.provide(IConsultantService::class.java).setHotSearch(it)
}
},
mModel.consultRequest(mConsultType)
.compose(RxUtils.applySchedulers(mView)).map {
//首页头部数据 分类 & Banner
homeList.add(
getHomeItemFromTempData(
it,
HomeViewConfig.getOrder().bannerIndex!!
)
)
}
val consultObservable = mModel.consultRequest(mConsultType)
.compose(RxUtils.applySchedulers(mView)).map {
//首页咨询数据
homeList.add(getHomeItemFromTempData(it, YdlHomeViewHolderConstract.CONSULT_VIEW))
},
//GoodType为空 获取默认类型
mModel.confideRequest(mConfideType)
.compose(RxUtils.applySchedulers(mView)).map {
homeList.add(getHomeItemFromTempData(it, HomeViewConfig.getOrder().consultIndex!!))
}
//GoodType为空 获取默认类型
val confideObservable = mModel.confideRequest(mConfideType)
.compose(RxUtils.applySchedulers(mView)).map {
//首页倾述数据
homeList.add(getHomeItemFromTempData(it, YdlHomeViewHolderConstract.CONFIDE_VIEW))
},
mModel.courseRequest()
.compose(RxUtils.applySchedulers(mView)).map {
homeList.add(getHomeItemFromTempData(it, HomeViewConfig.getOrder().confideIndex!!))
}
val courseObservable = mModel.courseRequest()
.compose(RxUtils.applySchedulers(mView)).map {
//首页课程数据
homeList.add(getHomeItemFromTempData(it, YdlHomeViewHolderConstract.COURSE_VIEW))
},
mModel.testRequest()
.compose(RxUtils.applySchedulers(mView)).map {
homeList.add(getHomeItemFromTempData(it, HomeViewConfig.getOrder().courseIndex!!))
}
val testObservable = mModel.testRequest()
.compose(RxUtils.applySchedulers(mView)).map {
//首页测试数据
val homeTestBean = HomeTestBean()
homeTestBean.testItemList = it.data
homeList.add(
getHomeItemFromTempData(
homeTestBean,
YdlHomeViewHolderConstract.TEST_VIEW
HomeViewConfig.getOrder().testIndex!!
)
)
},
mModel.askRequest()
.compose(RxUtils.applySchedulers(mView)).map {
}
val askObservable = mModel.askRequest()
.compose(RxUtils.applySchedulers(mView)).map {
//首页问答数据
homeList.add(
getHomeItemFromTempData(
it,
YdlHomeViewHolderConstract.ASSUAGE_GRIEF_VIEW
HomeViewConfig.getOrder().dynamicIndex!!
)
)
},
mModel.museRequest()
.compose(RxUtils.applySchedulers(mView)).map {
}
val museObservable = mModel.museRequest()
.compose(RxUtils.applySchedulers(mView)).map {
//首页冥想数据
homeList.add(getHomeItemFromTempData(it, YdlHomeViewHolderConstract.MUSE_VIEW))
},
mModel.fmRequest()
.compose(RxUtils.applySchedulers(mView)).map {
homeList.add(getHomeItemFromTempData(it, HomeViewConfig.getOrder().museIndex!!))
}
val fmObservable = mModel.fmRequest()
.compose(RxUtils.applySchedulers(mView)).map {
//首页电台数据
homeList.add(
getHomeItemFromTempData(
it,
YdlHomeViewHolderConstract.INTELLIGENT_VIEW
HomeViewConfig.getOrder().fmIndex!!
)
)
},
mModel.articleRequest()
.compose(RxUtils.applySchedulers(mView)).map {
}
val articleObservable = mModel.articleRequest()
.compose(RxUtils.applySchedulers(mView)).map {
//首页文章数据
homeList.add(getHomeItemFromTempData(it, YdlHomeViewHolderConstract.ARTICLE_VIEW))
homeList.add(HomePagerDataBean(YdlHomeViewHolderConstract.FOOTER_VIEW))
})
homeList.add(getHomeItemFromTempData(it, HomeViewConfig.getOrder().articleIndex!!))
}
//动态添加各业务模块请求
val mergeArrays:ArrayList<Observable<Boolean?>> = arrayListOf()
if (HomeViewConfig.getOrder().bannerIndex!=null){
mergeArrays.add(headerObservable)
}
if (HomeViewConfig.getOrder().consultIndex!=null){
mergeArrays.add(consultObservable)
}
if (HomeViewConfig.getOrder().courseIndex!=null){
mergeArrays.add(courseObservable)
}
if (HomeViewConfig.getOrder().confideIndex!=null){
mergeArrays.add(confideObservable)
}
if (HomeViewConfig.getOrder().testIndex!=null){
mergeArrays.add(testObservable)
}
if (HomeViewConfig.getOrder().dynamicIndex!=null){
mergeArrays.add(askObservable)
}
if (HomeViewConfig.getOrder().museIndex!=null){
mergeArrays.add(museObservable)
}
if (HomeViewConfig.getOrder().fmIndex!=null){
mergeArrays.add(fmObservable)
}
if (HomeViewConfig.getOrder().articleIndex!=null){
mergeArrays.add(articleObservable)
}
//将集合转化为数组
Observable.mergeArray(*mergeArrays.toTypedArray())
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.doOnComplete {
ThreadUtils.doOnThread(object : ThreadUtils.ThreadTask{
override fun doOnThread() {
SharedPreferencesEditor.putString(CACHE_HOME_PAGER_DATA, Gson().toJson(homeList))
SharedPreferencesEditor.putString(
HOME_PAGER_DATA_CACHE_VERISON,
RxAppTool.getAppVersionCode(BaseApp.getApp()).toString()
)
}
})
}
.subscribe(Consumer {}, object : ThrowableConsumer() {
override fun accept(msg: String) {
mView.homeDataFail(msg)
mHomeDisposable?.dispose()
}
}, Action {
if (homeList.size!=11){
mView.homeDataFail("")
return@Action
if (HomeViewConfig.getOrder().buttonIndex != null){
homeList.add(HomePagerDataBean(HomeViewConfig.getOrder().buttonIndex!!))
}
if (HomeViewConfig.getOrder().footerIndex!=null){
homeList.add(HomePagerDataBean(HomeViewConfig.getOrder().footerIndex!!))
}
homeList.sortWith(compareBy { it.type })
//更新本地缓存数据
Observable.interval(5000, TimeUnit.SECONDS)
.compose(RxUtils.applySchedulers(mView))
.subscribe {
SharedPreferencesEditor.putString(CACHE_HOME_PAGER_DATA, Gson().toJson(homeList))
SharedPreferencesEditor.putString(IS_NEW_CACHE_HOME_PAGER_DATA, true.toString())
SharedPreferencesEditor.putString(
HOME_PAGER_DATA_CACHE_VERISON,
RxAppTool.getAppVersionCode(BaseApp.getApp()).toString()
)
}
mView.homeDataResponse(homeList)
//更新本地缓存数据
//更新本地缓存数据
HomeLogPrinter.printLongLog(
HomePresenterImpl::class.java.simpleName,
Gson().toJson(homeList)
......@@ -167,7 +207,7 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
override fun refreshHomeData() {
val homeItemFromTempData = getHomeItemFromTempData(
HomeHeaderBean(true),
YdlHomeViewHolderConstract.PAGER_BANNER_VIEW
HomeViewConfig.getOrder().bannerIndex!!
)
mConsultType =
......@@ -187,36 +227,36 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
val homeBean = HomePagerDataBean()
for (dataBean in list) {
when (dataBean.type) {
YdlHomeViewHolderConstract.PAGER_BANNER_VIEW -> {
HomeViewConfig.getOrder().bannerIndex -> {
homeBean.headerBean = dataBean.headerBean
dataBean.headerBean?.keywordData?.let {
ModularServiceManager.provide(IConsultantService::class.java)
.setHotSearch(it)
}
}
YdlHomeViewHolderConstract.CONSULT_VIEW -> {
HomeViewConfig.getOrder().consultIndex -> {
homeBean.consultBean = dataBean.consultBean
}
YdlHomeViewHolderConstract.CONFIDE_VIEW -> {
HomeViewConfig.getOrder().confideIndex -> {
homeBean.confideBean = dataBean.confideBean
}
YdlHomeViewHolderConstract.COURSE_VIEW -> {
HomeViewConfig.getOrder().courseIndex -> {
homeBean.courseBean = dataBean.courseBean
}
YdlHomeViewHolderConstract.TEST_VIEW -> {
HomeViewConfig.getOrder().testIndex -> {
homeBean.testListBean = dataBean.testListBean
}
YdlHomeViewHolderConstract.ASSUAGE_GRIEF_VIEW -> {
HomeViewConfig.getOrder().dynamicIndex -> {
mHomeAskBean = dataBean.askBean
homeBean.askBean = dataBean.askBean
}
YdlHomeViewHolderConstract.MUSE_VIEW -> {
HomeViewConfig.getOrder().museIndex -> {
homeBean.museBean = dataBean.museBean
}
YdlHomeViewHolderConstract.INTELLIGENT_VIEW -> {
HomeViewConfig.getOrder().fmIndex -> {
homeBean.fmBean = dataBean.fmBean
}
YdlHomeViewHolderConstract.ARTICLE_VIEW -> {
HomeViewConfig.getOrder().articleIndex -> {
homeBean.articleBean = dataBean.articleBean
}
}
......@@ -232,40 +272,40 @@ class HomePresenterImpl: BaseHomePresenterImpl<IHomeContract.View, IHomeContract
val item = HomePagerDataBean(type)
when (type) {
YdlHomeViewHolderConstract.PAGER_BANNER_VIEW -> {
HomeViewConfig.getOrder().bannerIndex -> {
item.headerBean =
if (dataBean.isRealEmpty || dataBean !is HomeHeaderBean) homeTempData.headerBean else dataBean
}
YdlHomeViewHolderConstract.CONSULT_VIEW -> {
HomeViewConfig.getOrder().consultIndex -> {
item.consultBean =
if (dataBean.isRealEmpty || dataBean !is HomeConsultBean) homeTempData.consultBean else dataBean
}
YdlHomeViewHolderConstract.CONFIDE_VIEW -> {
HomeViewConfig.getOrder().confideIndex -> {
item.confideBean =
if (dataBean.isRealEmpty || dataBean !is HomeConfideBean) homeTempData.confideBean else dataBean
}
YdlHomeViewHolderConstract.COURSE_VIEW -> {
HomeViewConfig.getOrder().courseIndex -> {
item.courseBean =
if (dataBean.isRealEmpty || dataBean !is HomeCourseBean) homeTempData.courseBean else dataBean
}
YdlHomeViewHolderConstract.TEST_VIEW -> {
HomeViewConfig.getOrder().testIndex -> {
item.testListBean =
if (dataBean.isRealEmpty || dataBean !is HomeTestBean) homeTempData.testListBean else dataBean.testItemList
}
YdlHomeViewHolderConstract.ASSUAGE_GRIEF_VIEW -> {
HomeViewConfig.getOrder().dynamicIndex -> {
item.askBean =
if (dataBean.isRealEmpty || dataBean !is HomeAskBean) homeTempData.askBean else dataBean
mHomeAskBean = item.askBean
}
YdlHomeViewHolderConstract.MUSE_VIEW -> {
HomeViewConfig.getOrder().museIndex -> {
item.museBean =
if (dataBean.isRealEmpty || dataBean !is MuseModuleBean) homeTempData.museBean else dataBean
}
YdlHomeViewHolderConstract.INTELLIGENT_VIEW -> {
HomeViewConfig.getOrder().fmIndex -> {
item.fmBean =
if (dataBean.isRealEmpty || dataBean !is HomeFMBean) homeTempData.fmBean else dataBean
}
YdlHomeViewHolderConstract.ARTICLE_VIEW -> {
HomeViewConfig.getOrder().articleIndex -> {
item.articleBean =
if (dataBean.isRealEmpty || dataBean !is HomeArticleBean) homeTempData.articleBean else dataBean
}
......
......@@ -9,10 +9,11 @@ import android.support.v4.widget.SwipeRefreshLayout
import android.support.v7.widget.LinearLayoutManager
import android.text.TextUtils
import android.view.View
import android.widget.FrameLayout
import android.widget.LinearLayout
import android.widget.RelativeLayout
import com.alibaba.android.arouter.facade.annotation.Route
import android.widget.TextView
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.module.GlideApp
......@@ -24,20 +25,18 @@ import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.api.IConsultantService
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.R
import com.yidianling.home.adapter.YdlHomeAdapter
import com.yidianling.home.constants.HomeBIConstants
import com.yidianling.home.constract.HomeViewConfig
import com.yidianling.home.constract.IHomeContract
import com.yidianling.home.constract.YdlHomeViewHolderConstract
import com.yidianling.home.dialog.ActivityDialog
import com.yidianling.home.dialog.ActivityGuideDialog
import com.yidianling.home.event.HomeImpl
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.listener.HomeConfideRecyleSuspendListener
import com.yidianling.home.model.bean.*
import com.yidianling.home.presenter.HomePresenterImpl
import com.yidianling.home.ui.view.CouponDialog
import com.yidianling.home.ui.utils.Double11ActivityManagerUtils
import com.yidianling.home.utils.HomeAnimUtils
import com.yidianling.user.api.service.IUserService
import kotlinx.android.synthetic.ydl.home_fragment.*
......@@ -55,12 +54,11 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
IHomeContract.View,
SwipeRefreshLayout.OnRefreshListener {
private var adapter: YdlHomeAdapter? = null
private var homeEvent: HomeImpl? = null
private var dialog: CouponDialog? = null
//双11活动弹窗
open var adapter: YdlHomeAdapter? = null
open var homeEvent: HomeImpl? = null
open var dialog: CouponDialog? = null
//双11活动弹窗
private var aa: Dialog? = null
open var aa: Dialog? = null
/**
......@@ -81,11 +79,12 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
/**
* 悬浮tablayout监听事件
*/
private var scrollListner: HomeConfideRecyleSuspendListener? = null
open var scrollListner: HomeConfideRecyleSuspendListener? = null
//咨询模块数据缓存
private var consultCategoryDate: MutableList<HomeHeaderBean.ConsultCategoryDateBean>? = null
private var searchContent: String = "搜索话题、咨询师姓名"
open var searchText: String = ""
open var doctorName: String = ""
/**
* 如果是第一次加载,则调用所有接口进行刷新,否则,只调用咨询和倾诉接口
......@@ -97,70 +96,81 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
}
override fun initDataAndEvent() {
homeEvent = HomeImpl(activity, this)
initView()
initTopButtonBanner()
initAdapter()
}
val homeViewOrder = HomeViewConfig.HomeViewOrder()
override fun startAnim() {
HomeAnimUtils.startAnim(context, rl_top, rl_search, home_service_call, home_tv)
HomeAnimUtils.startSearchShow(ll_top_function, view_search_input_bg, home_tv, iv_search_icon, img_ad)
}
homeViewOrder.bannerIndex = -1
homeViewOrder.testIndex = 1
homeViewOrder.consultIndex = 2
homeViewOrder.footerIndex = 3
override fun endAnim() {
HomeAnimUtils.endAnim(context, rl_top, rl_search, home_tv, home_service_call, this)
HomeAnimUtils.startSearchHide(ll_top_function, view_search_input_bg, home_tv, iv_search_icon, img_ad)
}
homeViewOrder.fmIndex = null
homeViewOrder.articleIndex = null
homeViewOrder.dynamicIndex = null
homeViewOrder.museIndex = null
homeViewOrder.confideIndex = null
homeViewOrder.courseIndex = null
homeViewOrder.buttonIndex = null
override fun getSearchContent(): String {
return if (TextUtils.isEmpty(searchContent)) "搜索话题、咨询师姓名" else searchContent
}
HomeViewConfig.setOrder(homeViewOrder)
/**
* 设置顶部导航栏 功能点击事件
*/
private fun initTopButtonBanner() {
initHomeEvent()
initView()
initTopButtonBanner()
initAdapter()
}
tv_consult.setOnClickListener {
homeEvent?.reservationExpertsClick()
}
tv_confide.setOnClickListener {
homeEvent?.nowConfideClick()
}
tv_course.setOnClickListener {
homeEvent?.psychologyClassClick()
}
tv_test.setOnClickListener {
homeEvent?.psychologyTestClick()
}
rl_backTop.setOnClickListener {
home_module_fragment_recycler.scrollToPosition(0)
}
open fun initHomeEvent() {
homeEvent = HomeImpl(activity, this)
}
private fun initAdapter() {
mPresenter?.localHomeData(this.context, "home_data.json")
// mPresenter?.localHomeData(this.context, "home_data.json")
adapter = YdlHomeAdapter(context, homeEvent!!, ArrayList())
val layoutManager = LinearLayoutManager(context)
home_module_fragment_recycler.layoutManager = layoutManager
home_module_fragment_recycler.adapter = adapter
initRvListener()
}
open fun initRvListener() {
// home_module_fragment_recycler.addOnScrollListener(homeEvent?.onPageScroll(view_rl_top_bg))
scrollListner = HomeConfideRecyleSuspendListener()
home_module_fragment_recycler.addOnScrollListener(scrollListner)
setSuspendListener()
}
private fun initView() {
if(HomeViewConfig.getOrder().bannerIndex==null||HomeViewConfig.getOrder().bannerIndex==-1){
var marginTop = this.resources.getDimension(R.dimen.home_home_title_bar_height)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {//4.4以下不支持状态栏变色
val statusBarHeight = StatusBarUtils.getStatusBarHeight(activity)
marginTop += statusBarHeight
}
val lp = home_swipe_refresh_layout.layoutParams as FrameLayout.LayoutParams
lp.topMargin = marginTop.toInt()
home_swipe_refresh_layout.layoutParams = lp
}
searchText = this.resources.getText(R.string.home_search_hint).toString()
home_swipe_refresh_layout?.setOnRefreshListener(this)
home_swipe_refresh_layout?.setColorSchemeColors(ContextCompat.getColor(context, R.color.platform_main_theme))
home_swipe_refresh_layout?.setProgressViewOffset(false, 0, 200)
home_module_fragment_recycler.addOnScrollListener(homeEvent?.onPageScroll(view_rl_top_bg))
home_service_call.setOnClickListener { homeEvent?.serviceCallClick() }
home_tv.setOnClickListener { homeEvent?.searchTvClick(searchContent) }
initSearchBar()
initStatus()
}
open fun initSearchBar() {
if(!TextUtils.isEmpty(doctorName)){
searchText = doctorName
}
home_tv.setOnClickListener { homeEvent?.searchTvClick(searchText) }
home_tv.text = searchText
}
/**
* 初始化状态栏位置
*/
......@@ -180,6 +190,40 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
override fun initDataAndEventLazy() {
}
/**
* 设置顶部导航栏 功能点击事件
*/
private fun initTopButtonBanner() {
tv_consult.setOnClickListener {
homeEvent?.reservationExpertsClick()
}
tv_confide.setOnClickListener {
homeEvent?.nowConfideClick()
}
tv_course.setOnClickListener {
homeEvent?.psychologyClassClick()
}
tv_test.setOnClickListener {
homeEvent?.psychologyTestClick()
}
rl_backTop.setOnClickListener {
home_module_fragment_recycler.scrollToPosition(0)
}
}
override fun startAnim() {
HomeAnimUtils.startAnim(context, rl_top, rl_search, home_service_call, home_tv)
HomeAnimUtils.startSearchShow(ll_top_function, view_search_input_bg, home_tv, iv_search_icon, img_ad)
}
override fun endAnim() {
HomeAnimUtils.endAnim(context, rl_top, rl_search, home_tv, home_service_call, this)
HomeAnimUtils.startSearchHide(ll_top_function, view_search_input_bg, home_tv, iv_search_icon, img_ad)
}
override fun getSearchContent(): String {
return searchText
}
override fun createPresenter(): HomePresenterImpl {
return HomePresenterImpl()
......@@ -263,9 +307,6 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
//未登录不显示
return
}
if (Double11ActivityManagerUtils.notShowDouble11Activity) {
return
}
if (!TextUtils.isEmpty(act.imageBanner)) {
//展示弹窗
if (aa == null) {
......@@ -277,7 +318,6 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
ActivityGuideDialog(activity, act.imageUrl, act.title).show()
}
}
Double11ActivityManagerUtils.notShowDouble11Activity = false
}
//仅展示一次,以后不再展示
SharedPreferencesEditor.putString(act.imageBanner, "yes")
......@@ -291,8 +331,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
adapter?.updateItems(list)
if (!TextUtils.isEmpty(list[0].headerBean?.doctorName)) {
searchContent = list[0].headerBean?.doctorName!!
home_tv.text = searchContent
doctorName = list[0].headerBean?.doctorName!!
initSearchBar()
}
//每次全局更新后重置下标位
......@@ -301,7 +341,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
//初始化fragment中的tablayout布局,悬停效果使用
for (bean in list) {
//咨询模块
if (bean.type == YdlHomeViewHolderConstract.PAGER_BANNER_VIEW) {
if (bean.type == HomeViewConfig.getOrder().bannerIndex) {
initTabLayout(bean.headerBean!!.listenCategoryDate)
initConsultTabLayout(bean.headerBean!!.consultCategoryData)
consultLastSelectType = bean.headerBean!!.consultCategoryData!![0].id.toString()
......
......@@ -10,11 +10,11 @@ import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView
import com.yidianling.common.tools.LogUtil
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeConsultBean
import com.yidianling.home.model.bean.HomeHeaderBean
import com.yidianling.common.tools.LogUtil
import kotlinx.android.synthetic.ydl.home_confide_view.view.*
/**
......@@ -117,10 +117,10 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
ll_content.removeAllViews()
cacheInfoViewList?.clear()
for (index in 0 until list!!.size) {
if (index > 2) {
//只取前三条数据
break
}
// if (index > 2) {
// //只取前三条数据
// break
// }
//数据大于缓存view数量,创建view
if (index > cacheInfoViewList!!.size - 1) {
val homeConsultItemView = createConsultInfoView()
......
......@@ -5,7 +5,7 @@
<item android:state_enabled="true">
<shape>
<corners android:radius="0dp"></corners>
<gradient android:endColor="#05cbfc" android:startColor="#3484da" />
<gradient android:endColor="@color/platform_main_gradient_end_color" android:startColor="@color/platform_main_gradient_start_color" />
<stroke android:width="0dp" android:color="#bebebe" />
</shape>
</item>
......
......@@ -3,7 +3,7 @@
android:shape="rectangle">
<gradient
android:startColor="#1DA1F2"
android:endColor="#5CC8F7"/>
android:startColor="@color/platform_main_gradient_start_color"
android:endColor="@color/platform_main_gradient_end_color"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/platform_main_theme" />
<size
android:width="132dp"
android:height="132dp" />
</shape>
</item>
<item>
<bitmap
android:antialias="true"
android:gravity="center"
android:src="@drawable/home_consult_chat_ic"
android:tileMode="disabled" >
</bitmap>
</item>
</layer-list>
\ 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="@color/platform_color_F7F7F7"/>
<corners android:radius="12dp" />
</shape>
<vector android:height="14dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="14dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/platform_main_theme" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/platform_main_theme"
android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z"
tools:ignore="VectorRaster" />
</vector>
......@@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#FFDD33" />
<solid android:color="@color/platform_specific_bg_color" />
<corners android:topRightRadius="6dp"
android:bottomLeftRadius="6dp" />
......
......@@ -4,7 +4,7 @@
android:shape="rectangle">
<solid
android:color="#FFDD33"/>
android:color="@color/platform_specific_bg_color"/>
<corners android:radius="12dp" />
</shape>
......@@ -4,16 +4,16 @@
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:paddingLeft="@@dimen/platform_dp_15"
android:paddingRight="@@dimen/platform_dp_15"
android:paddingTop="@@dimen/platform_dp_15">
android:paddingLeft="@dimen/platform_dp_15"
android:paddingRight="@dimen/platform_dp_15"
android:paddingTop="@dimen/platform_dp_15">
<android.support.v7.widget.CardView
android:id="@+id/homeModuleArticleItemViewCardImg"
android:layout_width="@@dimen/platform_dp_127"
android:layout_height="@@dimen/platform_dp_88"
android:layout_width="@dimen/platform_dp_127"
android:layout_height="@dimen/platform_dp_88"
android:layout_alignParentRight="true"
app:cardCornerRadius="@@dimen/platform_dp_6"
app:cardCornerRadius="@dimen/platform_dp_6"
app:cardElevation="0dp">
<ImageView
android:layout_width="match_parent"
......@@ -29,16 +29,16 @@
android:layout_height="wrap_content"
android:maxLines="2"
android:ellipsize="end"
android:textSize="@@dimen/platform_dp_18"
android:textSize="@dimen/platform_dp_18"
android:textStyle="bold"
android:layout_marginTop="-2dp"
android:textColor="@color/platform_color_222222"
android:layout_alignParentTop="true"
android:lineSpacingExtra="@@dimen/platform_dp_1"
android:lineSpacingExtra="@dimen/platform_dp_1"
tools:text="喧嚣的世界中,你的重要何以而来?喧嚣的世界中,你的重要何以而来?"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg"
android:layout_marginRight="@@dimen/platform_dp_20"/>
android:layout_marginRight="@dimen/platform_dp_20"/>
<TextView
android:id="@+id/homeModuleArticleItemViewContent"
......@@ -46,15 +46,15 @@
android:layout_height="wrap_content"
android:maxLines="2"
android:ellipsize="end"
android:textSize="@@dimen/platform_dp_13"
android:layout_marginTop="@@dimen/platform_dp_4"
android:textSize="@dimen/platform_dp_13"
android:layout_marginTop="@dimen/platform_dp_4"
android:textColor="@color/platform_color_666666"
android:layout_alignParentLeft="true"
android:layout_below="@+id/homeModuleArticleItemViewTitle"
android:lineSpacingExtra="@@dimen/platform_dp_3"
android:lineSpacingExtra="@dimen/platform_dp_3"
tools:text="喧嚣的世界中,你的重要何以而来?当我伫立在我所伫立之处..."
android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg"
android:layout_marginRight="@@dimen/platform_dp_20"/>
android:layout_marginRight="@dimen/platform_dp_20"/>
<LinearLayout
android:id="@+id/homeModuleArticleItemViewBottomLayout"
......@@ -62,12 +62,12 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_below="@+id/homeModuleArticleItemViewCardImg"
android:layout_marginTop="@@dimen/platform_dp_16">
android:layout_marginTop="@dimen/platform_dp_16">
<ImageView
android:id="@+id/homeModuleArticleItemViewIcon"
android:layout_width="@@dimen/platform_dp_12"
android:layout_height="@@dimen/platform_dp_12"
android:layout_width="@dimen/platform_dp_12"
android:layout_height="@dimen/platform_dp_12"
android:src="@drawable/home_article_item_icon"
android:layout_alignParentLeft="true"/>
......@@ -76,9 +76,9 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textSize="@@dimen/platform_dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_242424"
android:layout_marginLeft="@@dimen/platform_dp_3"
android:layout_marginLeft="@dimen/platform_dp_3"
android:textStyle="bold"
tools:text="赵秀英"/>
......@@ -87,15 +87,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="3327"
android:textSize="@@dimen/platform_dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_242424"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点赞"
android:textSize="@@dimen/platform_dp_11"
android:layout_marginRight="@@dimen/platform_dp_12"
android:textSize="@dimen/platform_dp_11"
android:layout_marginRight="@dimen/platform_dp_12"
android:textColor="@color/platform_color_666666"/>
<TextView
......@@ -103,14 +103,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="2656"
android:textSize="@@dimen/platform_dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_242424"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="浏览"
android:textSize="@@dimen/platform_dp_11"
android:textSize="@dimen/platform_dp_11"
android:textColor="@color/platform_color_666666"/>
</LinearLayout>
......@@ -122,6 +122,6 @@
android:background="@color/platform_color_EBEBEB"
android:layout_centerInParent="true"
android:layout_below="@+id/homeModuleArticleItemViewBottomLayout"
android:layout_marginTop="@@dimen/platform_dp_16"/>
android:layout_marginTop="@dimen/platform_dp_16"/>
</RelativeLayout>
......@@ -92,13 +92,13 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="@@dimen/platform_dp_5"
android:layout_marginRight="@@dimen/platform_dp_5"
android:layout_marginBottom="@dimen/platform_dp_5"
android:layout_marginRight="@dimen/platform_dp_5"
android:background="@drawable/home_assuage_grief_item_view_image_num_back"
android:gravity="center"
tools:text="9图"
android:textColor="@color/platform_color_242424"
android:textSize="@@dimen/platform_dp_10" />
android:textSize="@dimen/platform_dp_10" />
</RelativeLayout>
</LinearLayout>
......
......@@ -54,13 +54,13 @@
android:layout_height="14dp"
android:gravity="center"
tools:text="9图"
android:textSize="@@dimen/platform_dp_10"
android:textSize="@dimen/platform_dp_10"
android:textColor="@color/platform_color_242424"
android:background="@drawable/home_assuage_grief_item_view_image_num_back"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="@@dimen/platform_dp_5"
android:layout_marginBottom="@@dimen/platform_dp_5"/>
android:layout_marginRight="@dimen/platform_dp_5"
android:layout_marginBottom="@dimen/platform_dp_5"/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
......
<?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:id="@+id/homeModuleAssuageGriefViewChildLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@@dimen/platform_dp_20"
android:paddingTop="@@dimen/platform_dp_18"
android:paddingLeft="@@dimen/platform_dp_15"
android:paddingRight="@@dimen/platform_dp_15"
android:background="@drawable/home_card_view_stroke">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/homeModuleAssuageGriefViewChildLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/home_card_view_stroke"
android:orientation="vertical"
android:paddingLeft="@dimen/platform_dp_15"
android:paddingTop="@dimen/platform_dp_18"
android:paddingRight="@dimen/platform_dp_15"
android:paddingBottom="@dimen/platform_dp_20">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@@dimen/platform_dp_18">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/platform_dp_18">
<RelativeLayout
android:id="@+id/homeModuleAssuageGriefViewPersonCardView"
android:layout_width="38dp"
android:layout_height="38dp"
android:background="@drawable/home_assuage_grief_stroke_line">
android:id="@+id/homeModuleAssuageGriefViewPersonCardView"
android:layout_width="38dp"
android:layout_height="38dp"
android:background="@drawable/home_assuage_grief_stroke_line">
<android.support.v7.widget.CardView
android:layout_width="@@dimen/platform_dp_36"
android:layout_height="@@dimen/platform_dp_36"
app:cardCornerRadius="@@dimen/platform_dp_18"
app:cardElevation="0dp"
android:layout_centerInParent="true">
android:layout_width="@dimen/platform_dp_36"
android:layout_height="@dimen/platform_dp_36"
android:layout_centerInParent="true"
app:cardCornerRadius="@dimen/platform_dp_18"
app:cardElevation="0dp">
<ImageView
android:id="@+id/homeModuleAssuageGriefViewPersonImg"
android:layout_width="@@dimen/platform_dp_36"
android:layout_height="@@dimen/platform_dp_36"
android:src="@drawable/platform_head_place_hold_pic"
android:scaleType="centerCrop"/>
android:id="@+id/homeModuleAssuageGriefViewPersonImg"
android:layout_width="@dimen/platform_dp_36"
android:layout_height="@dimen/platform_dp_36"
android:scaleType="centerCrop"
android:src="@drawable/platform_head_place_hold_pic" />
</android.support.v7.widget.CardView>
</RelativeLayout>
<TextView
android:id="@+id/homeModuleAssuageGriefViewPersonName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Zoe Miller"
android:textSize="@@dimen/platform_dp_14"
android:layout_alignTop="@+id/homeModuleAssuageGriefViewPersonCardView"
android:textColor="@color/platform_color_242424"
android:textStyle="bold"
android:gravity="center_vertical"
android:layout_alignBottom="@+id/homeModuleAssuageGriefViewPersonCardView"
android:layout_toRightOf="@+id/homeModuleAssuageGriefViewPersonCardView"
android:layout_marginLeft="@@dimen/platform_dp_8"
/>
android:id="@+id/homeModuleAssuageGriefViewPersonName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/homeModuleAssuageGriefViewPersonCardView"
android:layout_alignBottom="@+id/homeModuleAssuageGriefViewPersonCardView"
android:layout_marginLeft="@dimen/platform_dp_8"
android:layout_toRightOf="@+id/homeModuleAssuageGriefViewPersonCardView"
android:gravity="center_vertical"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_14"
android:textStyle="bold"
tools:text="Zoe Miller" />
<TextView
android:id="@+id/homeModuleAssuageGriefViewTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="今天 15:05"
android:textSize="@@dimen/platform_dp_12"
android:textColor="@color/platform_color_999999"
android:layout_toRightOf="@+id/homeModuleAssuageGriefViewPersonCardView"
android:layout_alignBottom="@+id/homeModuleAssuageGriefViewPersonCardView"
android:layout_marginLeft="@@dimen/platform_dp_8"
android:layout_marginBottom="0.5dp"
android:visibility="gone"/>
<RelativeLayout
android:id="@+id/homeModuleAssuageGriefItemViewIsFollow"
android:layout_width="@@dimen/platform_dp_60"
android:layout_height="@@dimen/platform_dp_24"
android:layout_centerVertical="true"
android:layout_alignParentRight="true">
<ImageView
android:id="@+id/homeModuleAssuageGriefItemViewFollow"
android:id="@+id/homeModuleAssuageGriefViewTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/homeModuleAssuageGriefViewPersonCardView"
android:layout_marginLeft="@dimen/platform_dp_8"
android:layout_marginBottom="0.5dp"
android:layout_toRightOf="@+id/homeModuleAssuageGriefViewPersonCardView"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/home_assuage_grief_item_view_follow"
android:layout_centerInParent="true"/>
tools:text="今天 15:05" />
<RelativeLayout
android:id="@+id/homeModuleAssuageGriefItemViewIsFollow"
android:layout_width="@dimen/platform_dp_60"
android:layout_height="@dimen/platform_dp_24"
android:layout_alignParentRight="true"
android:layout_centerVertical="true">
<ImageView
android:id="@+id/homeModuleAssuageGriefItemViewUnFollow"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/home_assuage_grief_item_view_unfollow"
android:layout_centerInParent="true"/>
android:id="@+id/homeModuleAssuageGriefItemViewFollow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@drawable/home_dynamic_item_focus_bg"
android:src="@drawable/home_ic_done"
android:visibility="gone"
tools:visibility="gone" />
<TextView
android:paddingLeft="6dp"
android:id="@+id/homeModuleAssuageGriefItemViewUnFollow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@drawable/home_dynamic_item_focus_bg"
android:drawableLeft="@drawable/home_ic_add"
android:text="关注"
android:gravity="center_vertical"
android:textSize="@dimen/platform_sp_14"
android:textColor="@color/platform_main_theme"
android:visibility="gone"
tools:visibility="visible" />
</RelativeLayout>
</RelativeLayout>
<!-- 标题,默认隐藏-->
<TextView
android:id="@+id/homeModuleAssuageGriefViewTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:maxLines="1"
android:ellipsize="end"
android:textColor="@color/platform_color_242424"
android:textSize="@@dimen/platform_dp_18"
android:layout_marginBottom="@@dimen/platform_dp_6"
android:textStyle="bold"
tools:text="可是除了你,没人能左右我的情绪可是除了你,没人能左右我的情绪"/>
android:id="@+id/homeModuleAssuageGriefViewTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/platform_dp_6"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_18"
android:textStyle="bold"
android:visibility="gone"
tools:text="可是除了你,没人能左右我的情绪可是除了你,没人能左右我的情绪" />
<TextView
android:id="@+id/homeModuleAssuageGriefViewContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="3"
android:ellipsize="end"
android:lineSpacingExtra="@@dimen/platform_dp_5"
tools:text="在我空闲的时间里,我想起了许久没有联系的露娜,给她打了一通电话。我没有说很多,可她还是感觉出了我的不对劲,竟然不顾雪夜寒冷与路途遥远,一个多钟在我空闲的时间里,我想起了许久没有联系的露娜,给她打了一通电话。我没有说很多,可她还是感觉出了我的不对劲,竟然不顾雪夜寒冷与路途遥远,一个多钟..."
android:textSize="@@dimen/platform_dp_13"
android:textColor="@color/platform_color_666666"/>
android:id="@+id/homeModuleAssuageGriefViewContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lineSpacingExtra="@dimen/platform_dp_5"
android:maxLines="3"
android:textColor="@color/platform_color_666666"
android:textSize="@dimen/platform_dp_13"
tools:text="在我空闲的时间里,我想起了许久没有联系的露娜,给她打了一通电话。我没有说很多,可她还是感觉出了我的不对劲,竟然不顾雪夜寒冷与路途遥远,一个多钟在我空闲的时间里,我想起了许久没有联系的露娜,给她打了一通电话。我没有说很多,可她还是感觉出了我的不对劲,竟然不顾雪夜寒冷与路途遥远,一个多钟..." />
<!-- 评论内容,默认隐藏-->
<RelativeLayout
android:id="@+id/homeModuleAssuageGriefViewComment"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@@dimen/platform_dp_12"
android:layout_marginTop="@@dimen/platform_dp_16"
android:background="@drawable/home_assuage_grief_item_view_tab_back">
android:id="@+id/homeModuleAssuageGriefViewComment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_16"
android:background="@drawable/home_assuage_grief_item_view_tab_back"
android:paddingBottom="@dimen/platform_dp_12"
android:visibility="gone">
<ImageView
android:id="@+id/homeModuleAssuageGriefViewHotView"
android:layout_height="@@dimen/platform_dp_14"
android:layout_width="@@dimen/platform_dp_28"
android:src="@drawable/home_comment_hot_icon"/>
android:id="@+id/homeModuleAssuageGriefViewHotView"
android:layout_width="@dimen/platform_dp_28"
android:layout_height="@dimen/platform_dp_14"
android:src="@drawable/home_comment_hot_icon" />
<TextView
android:id="@+id/homeModuleAssuageGriefViewHotViewComment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@@dimen/platform_dp_15"
android:layout_marginLeft="@@dimen/platform_dp_15"
tools:text="劳蘸酱:"
android:textStyle="bold"
android:textSize="@@dimen/platform_dp_13"
android:textColor="@color/platform_color_444444"
android:maxLines="2"
android:ellipsize="end"
android:layout_below="@+id/homeModuleAssuageGriefViewHotView"
android:layout_marginTop="@@dimen/platform_dp_5"
/>
android:id="@+id/homeModuleAssuageGriefViewHotViewComment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/homeModuleAssuageGriefViewHotView"
android:layout_marginLeft="@dimen/platform_dp_15"
android:layout_marginTop="@dimen/platform_dp_5"
android:layout_marginRight="@dimen/platform_dp_15"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/platform_color_444444"
android:textSize="@dimen/platform_dp_13"
android:textStyle="bold"
tools:text="劳蘸酱:" />
<TextView
android:id="@+id/homeModuleAssuageGriefViewHotViewCommentContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@@dimen/platform_dp_15"
android:layout_marginLeft="@@dimen/platform_dp_15"
android:lineSpacingExtra="@@dimen/platform_dp_4"
tools:text="劳蘸酱:人生的旅途中,我们总是在不断的相遇和告别中前行。生活总会让我们经历着或多或少我们总是在不断的相遇和告别中前行我们总是在不断的相遇和告别中前行"
android:textSize="@@dimen/platform_dp_13"
android:textColor="@color/platform_color_444444"
android:maxLines="2"
android:ellipsize="end"
android:layout_below="@+id/homeModuleAssuageGriefViewHotView"
android:layout_marginTop="@@dimen/platform_dp_5"
/>
android:id="@+id/homeModuleAssuageGriefViewHotViewCommentContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/homeModuleAssuageGriefViewHotView"
android:layout_marginLeft="@dimen/platform_dp_15"
android:layout_marginTop="@dimen/platform_dp_5"
android:layout_marginRight="@dimen/platform_dp_15"
android:ellipsize="end"
android:lineSpacingExtra="@dimen/platform_dp_4"
android:maxLines="2"
android:textColor="@color/platform_color_444444"
android:textSize="@dimen/platform_dp_13"
tools:text="劳蘸酱:人生的旅途中,我们总是在不断的相遇和告别中前行。生活总会让我们经历着或多或少我们总是在不断的相遇和告别中前行我们总是在不断的相遇和告别中前行" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@@dimen/platform_dp_20">
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@@dimen/platform_dp_7"
android:paddingRight="@@dimen/platform_dp_7"
android:paddingTop="@@dimen/platform_dp_4"
android:paddingBottom="@@dimen/platform_dp_4"
android:gravity="center_vertical"
android:background="@drawable/home_assuage_grief_item_view_tab_back">
<ImageView
android:layout_width="11.36dp"
android:layout_height="10.72dp"
android:src="@drawable/home_assuage_grief_item_view_tab_icon"/>
<TextView
android:id="@+id/homeModuleAssuageGriefViewTag"
android:layout_marginTop="@dimen/platform_dp_20"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="情感倾诉"
android:textColor="@color/platform_color_242424"
android:textSize="@@dimen/platform_dp_12"
android:layout_marginLeft="@@dimen/platform_dp_3"/>
android:background="@drawable/home_assuage_grief_item_view_tab_back"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="@dimen/platform_dp_7"
android:paddingTop="@dimen/platform_dp_4"
android:paddingRight="@dimen/platform_dp_7"
android:paddingBottom="@dimen/platform_dp_4">
<ImageView
android:layout_width="11.36dp"
android:layout_height="10.72dp"
android:src="@drawable/home_assuage_grief_item_view_tab_icon" />
<TextView
android:id="@+id/homeModuleAssuageGriefViewTag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_3"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_12"
tools:text="情感倾诉" />
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="0dp"/>
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<ImageView
android:layout_width="@@dimen/platform_dp_18"
android:layout_height="@@dimen/platform_dp_18"
android:src="@drawable/home_assuage_grief_item_view_tab_comment"/>
android:layout_width="@dimen/platform_dp_18"
android:layout_height="@dimen/platform_dp_18"
android:src="@drawable/home_assuage_grief_item_view_tab_comment" />
<TextView
android:id="@+id/homeModuleAssuageGriefViewCommentsCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="68"
android:textSize="@@dimen/platform_dp_14"
android:textColor="@color/platform_color_242424"
android:layout_marginRight="@@dimen/platform_dp_22"
android:layout_marginLeft="@@dimen/platform_dp_5"/>
android:id="@+id/homeModuleAssuageGriefViewCommentsCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_5"
android:layout_marginRight="@dimen/platform_dp_22"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_14"
tools:text="68" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="@+id/ll_zan"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:id="@+id/ll_zan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/homeModuleAssuageGriefViewIsNotZan"
android:layout_width="@@dimen/platform_dp_18"
android:layout_height="@@dimen/platform_dp_18"
android:src="@drawable/home_assuage_grief_item_view_tab_warm"/>
android:id="@+id/homeModuleAssuageGriefViewIsNotZan"
android:layout_width="@dimen/platform_dp_18"
android:layout_height="@dimen/platform_dp_18"
android:src="@drawable/home_assuage_grief_item_view_tab_warm" />
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/homeModuleAssuageGriefViewIsZan"
android:layout_width="@@dimen/platform_dp_18"
android:layout_height="@@dimen/platform_dp_18"
app:lottie_imageAssetsFolder="images"
app:lottie_fileName="hug.json"
android:visibility="gone"
android:scaleType="centerCrop"/>
android:id="@+id/homeModuleAssuageGriefViewIsZan"
android:layout_width="@dimen/platform_dp_18"
android:layout_height="@dimen/platform_dp_18"
android:scaleType="centerCrop"
android:visibility="gone"
app:lottie_fileName="hug.json"
app:lottie_imageAssetsFolder="images" />
<TextView
android:id="@+id/homeModuleAssuageGriefViewZanCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="987"
android:textSize="@@dimen/platform_dp_14"
android:textColor="@color/platform_color_242424"
android:layout_marginLeft="@@dimen/platform_dp_5"/>
android:id="@+id/homeModuleAssuageGriefViewZanCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_5"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_14"
tools:text="987" />
</LinearLayout>
</LinearLayout>
......
......@@ -21,7 +21,7 @@
android:layout_alignTop="@+id/img_consult_head"
android:layout_marginTop="@dimen/platform_dp_13"
android:layout_marginEnd="@dimen/platform_dp_15"
android:background="@drawable/home_consult_chat"
android:background="@drawable/home_consult_chat_bg"
android:gravity="center" />
<LinearLayout
......
......@@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:cube_ptr="http://schemas.android.com/tools"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/platform_white"
......@@ -29,13 +30,13 @@
<View
android:id="@+id/view_rl_top_bg"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_height="@dimen/platform_action_bar_height"
android:background="@drawable/home_background_home_pager_top" />
<RelativeLayout
android:id="@+id/rl_top"
android:layout_width="match_parent"
android:layout_height="48dp">
android:layout_height="@dimen/platform_action_bar_height">
<LinearLayout
android:id="@+id/ll_top_function"
......@@ -165,7 +166,7 @@
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/home_search_hint"
tools:text="@string/home_search_hint"
android:textColor="#999999"
android:textSize="@dimen/platform_default_text_size_small"
android:textStyle="normal"
......
......@@ -87,7 +87,7 @@
android:gravity="center"
android:text="去测试"
android:textSize="12dp"
android:textColor="@color/platform_color_222222"
android:textColor="@color/platform_but_text_color_specific"
android:textStyle="bold"/>
</LinearLayout>
......
......@@ -105,7 +105,7 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="每日一测"
android:textColor="@color/platform_color_242424"
android:textColor="@color/platform_but_text_color_specific"
android:textSize="@dimen/platform_dp_12"
android:textStyle="bold"/>
</RelativeLayout>
......
......@@ -37,7 +37,7 @@ class PlatformRamImpl private constructor(): IPlatformRam {
return@lazy channel!!
}
channel = "$appFrom$channel"
channel = appFrom+"_"+channel
channel ?: "android"
}
......
......@@ -105,6 +105,9 @@
<color name="platform_main_gradient_start_color">#1DA1F2</color>
<color name="platform_main_gradient_end_color">#23B2FA</color>
<!--次级按钮背景,和背景冲突时使用,黄色基本不变-->
<color name="platform_specific_bg_color">#FFDD33</color>
<!-- ============ 文字颜色 ============ -->
<!-- 一级类目,标题、点缀文字颜色-->
<color name="platform_text_dark_color">#242424</color>
......@@ -122,8 +125,7 @@
<color name="platform_but_text_color_unselected">#242424</color>
<color name="platform_but_text_color_selected">#1da1f2</color>
<color name="consultant_confirm_text_color">#242424</color>
<color name="consultant_filter_content_text_color_un">#555555</color>
<color name="consultant_filter_content_text_color_en">#242424</color>
<!--次级按钮字体颜色,和背景冲突时使用,黑色基本不变-->
<color name="platform_but_text_color_specific">#222222</color>
</resources>
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