Commit f1b324e6 by konghaorui

首页资源重命名

parent a0726ba8
......@@ -2,6 +2,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'resTools' // 资源重命名插件
// 配置资源重命名插件
resConfig {
new_prefix = 'home_' // 资源前缀
old_prefix = '' // 老前缀,可为''空字符串
}
kapt {
arguments {
......@@ -50,12 +57,7 @@ android {
sourceSets {
main {
res.srcDirs = [
'src/main/res',
'src/main/res/layouts',
'src/main/res/layouts/ydlhome', //壹点零用户版首页fragment所在xml
'src/main/res/layouts/ydlhome/holder', //壹点零用户版首页fragment中列表ViewHolder所在xml
]
res.srcDirs = ['src/main/res']
}
}
......
......@@ -185,7 +185,7 @@ open class HomeBaseImpl : IHomeBaseEvent {
return
}
var doctorName =
if (text != mContext?.resources?.getString(R.string.search_hint) && text != mContext?.resources?.getString(
if (text != mContext?.resources?.getString(R.string.home_search_hint) && text != mContext?.resources?.getString(
R.string.platform_search
)
) text else ""
......
<resources>
<string name="app_name">m-home</string>
<string name="search_hint">搜索话题、咨询师姓名</string>
</resources>
<resources>
<string name="home_app_name">m-home</string>
<string name="home_search_hint">搜索话题、咨询师姓名</string>
</resources>
......@@ -131,7 +131,7 @@ class YdlHomeAdapter(private val mContext: Context,
}
//底部提示语模块
else -> {
val view = mInflater.inflate(R.layout.home_module_footer_view, parent, false)
val view = mInflater.inflate(R.layout.home_footer_view, parent, false)
return FooterViewViewHolder(view)
}
}
......
......@@ -8,7 +8,7 @@ import com.ydl.webview.NewH5Activity
import com.yidianling.home.R
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydl_router.manager.YDLRouterManager
import kotlinx.android.synthetic.xlzx.dialog_activity.*
import kotlinx.android.synthetic.xlzx.home_dialog_activity.*
import java.lang.ref.WeakReference
/**
......@@ -33,7 +33,7 @@ class ActivityDialog : Dialog{
window.setBackgroundDrawableResource(android.R.color.transparent)
setContentView(R.layout.dialog_activity)
setContentView(R.layout.home_dialog_activity)
initView()
}
......
......@@ -7,7 +7,7 @@ import android.view.Window
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.utils.DisplayUtils
import com.yidianling.home.R
import kotlinx.android.synthetic.xlzx.dialog_guide_activity.*
import kotlinx.android.synthetic.xlzx.home_dialog_guide_activity.*
import java.util.*
/**
......@@ -32,7 +32,7 @@ class ActivityGuideDialog : Dialog{
requestWindowFeature(Window.FEATURE_NO_TITLE)
window.setBackgroundDrawableResource(android.R.color.transparent)
setContentView(R.layout.dialog_guide_activity)
setContentView(R.layout.home_dialog_guide_activity)
initView()
}
......
......@@ -33,11 +33,11 @@ import com.yidianling.home.presenter.HomePresenterImpl
import com.yidianling.home.ui.utils.Double11ActivityManagerUtils
import com.yidianling.home.ui.view.CouponDialog
import com.yidianling.user.api.service.IUserService
import kotlinx.android.synthetic.xlzx.fragment_home_module.*
import kotlinx.android.synthetic.xlzx.layout_home_module_content.*
import kotlinx.android.synthetic.xlzx.layout_home_module_head_bg.*
import kotlinx.android.synthetic.xlzx.layout_home_module_input.*
import kotlinx.android.synthetic.xlzx.layout_home_module_toolbar.*
import kotlinx.android.synthetic.xlzx.home_fragment_home_module.*
import kotlinx.android.synthetic.xlzx.home_layout_home_module_content.*
import kotlinx.android.synthetic.xlzx.home_layout_home_module_head_bg.*
import kotlinx.android.synthetic.xlzx.home_layout_home_module_input.*
import kotlinx.android.synthetic.xlzx.home_layout_home_module_toolbar.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -73,7 +73,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
private var scrollListner: HomeConfideRecyleSuspendListener? = null
override fun layoutResId(): Int {
return R.layout.fragment_home_module
return R.layout.home_fragment_home_module
}
override fun initDataAndEvent() {
......@@ -142,7 +142,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {//4.4以下不支持状态栏变色
val statusBarHeight = StatusBarUtils.getStatusBarHeight(activity)
var homeTitleBarHeight = resources.getDimension(R.dimen.home_title_bar_height)
var homeTitleBarHeight = resources.getDimension(R.dimen.home_home_title_bar_height)
val lp1 = view_search_toolbar_bg.layoutParams as RelativeLayout.LayoutParams
lp1.height = (homeTitleBarHeight + statusBarHeight).toInt()
view_search_toolbar_bg.layoutParams = lp1
......@@ -281,7 +281,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
for (item in cacheList) {
imageViews.add(item.imageUrl!!)
}
banner_search.setImageLoader(GlideImageLoader(R.drawable.home_module_image_default_back))
banner_search.setImageLoader(GlideImageLoader(R.drawable.home_image_default_back))
.setImages(imageViews).start()
banner_search.setOnBannerListener {
homeEvent?.bannerClick(cacheList!![it])
......
......@@ -7,7 +7,7 @@ import android.os.Bundle
import android.text.TextUtils
import com.yidianling.home.R
import com.yidianling.home.model.bean.CouponBean
import kotlinx.android.synthetic.xlzx.dialog_coupon.*
import kotlinx.android.synthetic.xlzx.home_dialog_coupon.*
/**
* @author jiucheng
......@@ -43,7 +43,7 @@ class CouponDialog : Dialog {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.dialog_coupon)
setContentView(R.layout.home_dialog_coupon)
setCanceledOnTouchOutside(false)
window.setBackgroundDrawable(ColorDrawable())
if (couponBean != null) {
......@@ -86,7 +86,7 @@ class CouponDialog : Dialog {
title = "获得新优惠券"
}
ensureText = "立即领取"
iamge = R.drawable.coupon_receiver
iamge = R.drawable.home_coupon_receiver
}
STATUS_GET -> {
if (list!!.size > 1) {
......@@ -95,7 +95,7 @@ class CouponDialog : Dialog {
title = "恭喜您,领取成功"
}
ensureText = "查看我的卡券"
iamge = R.drawable.coupon_success
iamge = R.drawable.home_coupon_success
}
}
iv_title.setImageResource(iamge)
......
......@@ -9,7 +9,7 @@ import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeArticleBean
import kotlinx.android.synthetic.xlzx.home_module_article_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_article_item_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -31,7 +31,7 @@ class HomeArticleItemView(private val mContext: Context, private var homeEvent:
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_article_item_view, this)
View.inflate(mContext, R.layout.home_article_item_view, this)
}
fun updateData(bean: HomeArticleBean.Bean?) {
......
......@@ -8,7 +8,7 @@ import android.widget.LinearLayout
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeArticleBean
import kotlinx.android.synthetic.xlzx.home_module_article_view.view.*
import kotlinx.android.synthetic.xlzx.home_article_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -33,7 +33,7 @@ class HomeArticleView(private val mContext: Context, private var homeEvent: IHom
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_article_view, this)
View.inflate(mContext, R.layout.home_article_view, this)
homeModuleArticleViewHomeCommonTitleView.setTitle("文章·阅读")
homeModuleArticleViewHomeCommonTitleView.setOnClickListener {
homeEvent?.articleMoreClick()
......
......@@ -8,9 +8,9 @@ import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import kotlinx.android.synthetic.xlzx.home_module_assuage_grief_image_more_five_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_module_assuage_grief_image_under_four_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_module_assuage_grief_image_under_two_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_assuage_grief_image_more_five_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_assuage_grief_image_under_four_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_assuage_grief_image_under_two_item_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -44,7 +44,7 @@ class HomeAssuageGriefImageItemView(
layoutParams = params
View.inflate(
mContext,
R.layout.home_module_assuage_grief_image_under_two_item_view,
R.layout.home_assuage_grief_image_under_two_item_view,
this
)
......@@ -61,7 +61,7 @@ class HomeAssuageGriefImageItemView(
layoutParams = params
View.inflate(
mContext,
R.layout.home_module_assuage_grief_image_under_four_item_view,
R.layout.home_assuage_grief_image_under_four_item_view,
this
)
......@@ -90,7 +90,7 @@ class HomeAssuageGriefImageItemView(
layoutParams = params
View.inflate(
mContext,
R.layout.home_module_assuage_grief_image_more_five_item_view,
R.layout.home_assuage_grief_image_more_five_item_view,
this
)
......
......@@ -22,7 +22,7 @@ import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeAskBean
import com.yidianling.user.api.service.IUserService
import kotlinx.android.synthetic.xlzx.home_module_assuage_grief_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_assuage_grief_item_view.view.*
/**
......@@ -56,7 +56,7 @@ class HomeAssuageGriefItemView(
, (16 * RxDeviceTool.getScreenDensity(mContext)).toInt()
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_assuage_grief_item_view, this)
View.inflate(mContext, R.layout.home_assuage_grief_item_view, this)
}
......@@ -91,9 +91,9 @@ class HomeAssuageGriefItemView(
}
bean.isZan = if (bean.isZan == 1) 0 else 1
if (bean.isZan == 1) {
homeModuleAssuageGriefViewZanState.setImageResource(R.drawable.home_module_assuage_grief_item_view_tab_warm_has_zan)
homeModuleAssuageGriefViewZanState.setImageResource(R.drawable.home_assuage_grief_item_view_tab_warm_has_zan)
} else {
homeModuleAssuageGriefViewZanState.setImageResource(R.drawable.home_module_assuage_grief_item_view_tab_warm)
homeModuleAssuageGriefViewZanState.setImageResource(R.drawable.home_assuage_grief_item_view_tab_warm)
}
bean.zanCount = if (bean.isZan == 1) bean.zanCount + 1 else bean.zanCount - 1
homeModuleAssuageGriefViewZanCount.text = bean?.zanCount.toString()
......@@ -148,9 +148,9 @@ class HomeAssuageGriefItemView(
* 点赞
*/
if (bean?.isZan == 1) {
homeModuleAssuageGriefViewZanState.setImageResource(R.drawable.home_module_assuage_grief_item_view_tab_warm_has_zan)
homeModuleAssuageGriefViewZanState.setImageResource(R.drawable.home_assuage_grief_item_view_tab_warm_has_zan)
} else {
homeModuleAssuageGriefViewZanState.setImageResource(R.drawable.home_module_assuage_grief_item_view_tab_warm)
homeModuleAssuageGriefViewZanState.setImageResource(R.drawable.home_assuage_grief_item_view_tab_warm)
}
/**
......@@ -206,7 +206,7 @@ class HomeAssuageGriefItemView(
if (commentBean.userType == 2) {
setImage(
mContext, homeModuleAssuageGriefViewHotViewComment, "vip",
R.drawable.home_module_assuage_grief_item_user_type_v,
R.drawable.home_assuage_grief_item_user_type_v,
RxImageTool.dp2px(13f),
RxImageTool.dp2px(13f)
)
......
......@@ -7,7 +7,7 @@ import android.widget.LinearLayout
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeAskBean
import kotlinx.android.synthetic.xlzx.home_module_assuage_grief_view.view.*
import kotlinx.android.synthetic.xlzx.home_assuage_grief_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -32,7 +32,7 @@ class HomeAssuageGriefView(private val mContext: Context, private var homeEvent:
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_assuage_grief_view, this)
View.inflate(mContext, R.layout.home_assuage_grief_view, this)
homeModuleAssuageGriefViewHomeCommonTitleView.setTitle("解忧·问答")
homeModuleAssuageGriefViewHomeCommonTitleView.setOnClickListener {
homeEvent?.askMoreClick()
......
......@@ -10,7 +10,7 @@ import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeHeaderBean
import kotlinx.android.synthetic.xlzx.home_module_button_banner_view.view.*
import kotlinx.android.synthetic.xlzx.home_button_banner_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -52,7 +52,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_button_banner_view, this)
View.inflate(mContext, R.layout.home_button_banner_view, this)
// initButtonView()
......@@ -101,7 +101,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
lineParam.leftMargin = dp15
lineParam.rightMargin = dp15
lineView = View(context)
lineView!!.setBackgroundColor(resources.getColor(R.color.home_module_category_view_test_line))
lineView!!.setBackgroundColor(resources.getColor(R.color.home_category_view_test_line))
lineView!!.layoutParams = lineParam
}
......@@ -122,7 +122,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
)
cutOffParams.height = RxImageTool.dip2px(10f)
val cutOffView = View(context)
cutOffView.setBackgroundColor(resources.getColor(R.color.colorBg))
cutOffView.setBackgroundColor(resources.getColor(R.color.home_colorBg))
cutOffView.layoutParams = cutOffParams
ll_home_module_button.addView(cutOffView)
......
......@@ -5,7 +5,7 @@ import android.support.constraint.ConstraintLayout
import android.util.AttributeSet
import android.view.View
import com.yidianling.home.R
import kotlinx.android.synthetic.xlzx.home_module_common_title_view.view.*
import kotlinx.android.synthetic.xlzx.home_common_title_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -21,7 +21,7 @@ class HomeCommonTitleView(private val mContext: Context, private val attributeSe
}
private fun initView() {
View.inflate(mContext, R.layout.home_module_common_title_view, this)
View.inflate(mContext, R.layout.home_common_title_view, this)
}
fun setTitle(title: String) {
......
......@@ -15,7 +15,7 @@ import com.yidianling.home.event.HomeImpl
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.event.IHomeEvent
import com.yidianling.home.model.bean.HomeConfideBean
import kotlinx.android.synthetic.xlzx.home_module_confide_expert_info_view.view.*
import kotlinx.android.synthetic.xlzx.home_confide_expert_info_view.view.*
/**
......@@ -43,7 +43,7 @@ class HomeConfideExpertInfoView(
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(context, R.layout.home_module_confide_expert_info_view, this)
View.inflate(context, R.layout.home_confide_expert_info_view, this)
}
fun setData(bean: HomeConfideBean.BodyBean?, position: Int, isLast: Boolean) {
......@@ -131,16 +131,16 @@ class HomeConfideExpertInfoView(
private fun setConfideButton(bodyBean: HomeConfideBean.BodyBean) {
when (bodyBean.confideLine) {//1在线 2离线 3通话中 4继续倾诉
1 -> {
tv_confide.setBackgroundResource(R.drawable.home_module_confide_line_1)
tv_confide.setBackgroundResource(R.drawable.home_confide_line_1)
}
2 -> {
tv_confide.setBackgroundResource(R.drawable.home_module_confide_line_2)
tv_confide.setBackgroundResource(R.drawable.home_confide_line_2)
}
3 -> {
tv_confide.setBackgroundResource(R.drawable.home_module_confide_line_3)
tv_confide.setBackgroundResource(R.drawable.home_confide_line_3)
}
4 -> {
tv_confide.setBackgroundResource(R.drawable.home_module_confide_line_4)
tv_confide.setBackgroundResource(R.drawable.home_confide_line_4)
}
}
tv_confide.setOnClickListener {
......
......@@ -16,7 +16,7 @@ import com.yidianling.home.event.HomeImpl
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeConfideBean
import com.yidianling.home.model.bean.HomeHeaderBean
import kotlinx.android.synthetic.xlzx.home_module_confide_view.view.*
import kotlinx.android.synthetic.xlzx.home_confide_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -48,7 +48,7 @@ class HomeConfideView(private val mContext: Context, private var homeEvent: Home
)
layoutParams = params
orientation = VERTICAL
View.inflate(mContext, R.layout.home_module_confide_view, this)
View.inflate(mContext, R.layout.home_confide_view, this)
homeModuleConfideViewHomeCommonTitleView.setTitle("倾诉·排解")
homeModuleConfideViewHomeCommonTitleView.setOnClickListener {
homeEvent?.confideMoreClick()
......
......@@ -13,7 +13,7 @@ import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeConsultBean
import kotlinx.android.synthetic.xlzx.home_module_consult_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_consult_item_view.view.*
/**
* @author jiucheng
......@@ -38,7 +38,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(context, R.layout.home_module_consult_item_view, this)
View.inflate(context, R.layout.home_consult_item_view, this)
}
fun setData(bean: HomeConsultBean.ListBean?, position: Int, isLast: Boolean, cateId: String?) {
......@@ -121,7 +121,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
)
)
tv_consult_chat.background =
ContextCompat.getDrawable(context, R.drawable.home_module_consult_chat_bg)
ContextCompat.getDrawable(context, R.drawable.home_consult_chat_bg)
} else {
tv_consult_chat.text = bodyBean.chatBtnText
tv_consult_chat.setTextColor(
......@@ -131,7 +131,7 @@ class HomeConsultItemView(private var mContext: Context, private var homeEvent:
)
)
tv_consult_chat.background =
ContextCompat.getDrawable(context, R.drawable.home_module_consult_chat_rest_bg)
ContextCompat.getDrawable(context, R.drawable.home_consult_chat_rest_bg)
}
tv_consult_chat.setOnClickListener {
homeEvent!!.consultChatClick(bodyBean.doctorUid.toString())
......
......@@ -15,7 +15,7 @@ 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 kotlinx.android.synthetic.xlzx.home_module_confide_view.view.*
import kotlinx.android.synthetic.xlzx.home_confide_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -47,7 +47,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
)
layoutParams = params
orientation = VERTICAL
View.inflate(mContext, R.layout.home_module_confide_view, this)
View.inflate(mContext, R.layout.home_confide_view, this)
homeModuleConfideViewHomeCommonTitleView.setTitle("咨询·理解")
homeModuleConfideViewHomeCommonTitleView.setOnClickListener {
homeEvent?.consultMoreClick()
......
......@@ -8,7 +8,7 @@ import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeCourseBean
import kotlinx.android.synthetic.xlzx.home_module_course_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_course_item_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -30,7 +30,7 @@ class HomeCourseItemView(private val mContext: Context, private var homeEvent: I
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_course_item_view, this)
View.inflate(mContext, R.layout.home_course_item_view, this)
}
/**
......
......@@ -7,7 +7,7 @@ import android.widget.LinearLayout
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeCourseBean
import kotlinx.android.synthetic.xlzx.home_module_course_view.view.*
import kotlinx.android.synthetic.xlzx.home_course_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -32,7 +32,7 @@ class HomeCourseView(private val mContext: Context, private var homeEvent: IHome
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_course_view, this)
View.inflate(mContext, R.layout.home_course_view, this)
homeModuleCourseViewHomeCommonTitleView.setTitle("课程·成长")
homeModuleCourseViewHomeCommonTitleView.setOnClickListener {
homeEvent?.courseMreClick()
......
......@@ -8,7 +8,7 @@ import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeFMBean
import kotlinx.android.synthetic.xlzx.home_module_intelligent_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_intelligent_item_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -35,7 +35,7 @@ class HomeIntelligentItemView(
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_intelligent_item_view, this)
View.inflate(mContext, R.layout.home_intelligent_item_view, this)
}
......
......@@ -9,7 +9,7 @@ import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeFMBean
import kotlinx.android.synthetic.xlzx.home_module_intelligent_top_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_intelligent_top_item_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -35,7 +35,7 @@ class HomeIntelligentTopItemView(
var viewHeight = viewWidth * 143 / 345
val params = LinearLayout.LayoutParams(viewWidth, viewHeight)
layoutParams = params
View.inflate(mContext, R.layout.home_module_intelligent_top_item_view, this)
View.inflate(mContext, R.layout.home_intelligent_top_item_view, this)
}
......
......@@ -7,7 +7,7 @@ import android.widget.LinearLayout
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeFMBean
import kotlinx.android.synthetic.xlzx.home_module_intelligent_view.view.*
import kotlinx.android.synthetic.xlzx.home_intelligent_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -32,7 +32,7 @@ class HomeIntelligentView(private val mContext: Context, private var homeEvent:
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_intelligent_view, this)
View.inflate(mContext, R.layout.home_intelligent_view, this)
homeModuleIntelligentViewHomeCommonTitleView.setTitle("心灵·电台")
homeModuleIntelligentViewHomeCommonTitleView.setOnClickListener {
homeEvent?.fmMoreClick()
......
......@@ -16,7 +16,7 @@ import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.event.IHomeEvent
import com.yidianling.home.model.bean.HomeHeaderBean
import kotlinx.android.synthetic.xlzx.home_module_pager_banner_category_view.view.*
import kotlinx.android.synthetic.xlzx.home_pager_banner_category_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -89,7 +89,7 @@ class HomePagerBannerCategoryView(mContext: Context, homeEvent: IHomeBaseEvent)
* 界面初始化
*/
private fun initView() {
View.inflate(context, R.layout.home_module_pager_banner_category_view, this)
View.inflate(context, R.layout.home_pager_banner_category_view, this)
val params = FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.WRAP_CONTENT
......@@ -277,7 +277,7 @@ class HomePagerBannerCategoryView(mContext: Context, homeEvent: IHomeBaseEvent)
lineParam.rightMargin = dp15
lineParam.topMargin = multiple * (imageViewWidth + dp8 + textViewHeight) + dp8
lineView = View(context)
lineView!!.setBackgroundColor(resources.getColor(R.color.home_module_category_view_test_line))
lineView!!.setBackgroundColor(resources.getColor(R.color.home_category_view_test_line))
lineView!!.layoutParams = lineParam
}
......
......@@ -13,9 +13,9 @@ import android.widget.LinearLayout
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeHeaderBean
import kotlinx.android.synthetic.xlzx.home_module_real_view_in.view.*
import kotlinx.android.synthetic.xlzx.home_module_real_view_left.view.*
import kotlinx.android.synthetic.xlzx.home_module_real_view_out.view.*
import kotlinx.android.synthetic.xlzx.home_real_view_in.view.*
import kotlinx.android.synthetic.xlzx.home_real_view_left.view.*
import kotlinx.android.synthetic.xlzx.home_real_view_out.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -76,9 +76,9 @@ class HomePagerBannerRealView(mContext: Context, homeEvent: IHomeBaseEvent) :
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
)
View.inflate(context, R.layout.home_module_real_view_left, this)
view_out = View.inflate(context, R.layout.home_module_real_view_out, null)
view_in = View.inflate(context, R.layout.home_module_real_view_in, null)
View.inflate(context, R.layout.home_real_view_left, this)
view_out = View.inflate(context, R.layout.home_real_view_out, null)
view_in = View.inflate(context, R.layout.home_real_view_in, null)
homeModuleRealViewLeftFrameLayout.addView(view_out)
homeModuleRealViewLeftFrameLayout.addView(view_in)
layoutParams = params
......@@ -187,7 +187,7 @@ class HomePagerBannerRealView(mContext: Context, homeEvent: IHomeBaseEvent) :
nameBuffer.append(bean?.contentBefore)
nameBuffer.append(" ")
nameBuffer.append(bean?.nickName)
nameBuffer.append(resources.getString(R.string.home_module_real_appoint))
nameBuffer.append(resources.getString(R.string.home_real_appoint))
return nameBuffer.toString()
}
......
......@@ -9,7 +9,7 @@ import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeHeaderBean
import kotlinx.android.synthetic.xlzx.home_module_pager_banner_view.view.*
import kotlinx.android.synthetic.xlzx.home_pager_banner_view.view.*
/**
......@@ -36,7 +36,7 @@ class HomePagerBannerView(private val mContext: Context, private var homeEvent:
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_pager_banner_view, this)
View.inflate(mContext, R.layout.home_pager_banner_view, this)
initBannerLayout()
// val addLayoutParams = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
......@@ -92,7 +92,7 @@ class HomePagerBannerView(private val mContext: Context, private var homeEvent:
mImageViews.add(item.imageUrl!!)
}
}
homeModulePagerBannerViewBanner.setImageLoader(GlideImageLoader(R.drawable.home_module_image_default_back))
homeModulePagerBannerViewBanner.setImageLoader(GlideImageLoader(R.drawable.home_image_default_back))
.setImages(mImageViews).start()
homeModulePagerBannerViewBanner.setOnBannerListener {
......
......@@ -9,7 +9,7 @@ import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeTestItemBean
import kotlinx.android.synthetic.xlzx.home_module_test_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_test_item_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -34,7 +34,7 @@ class HomeTestItemView(private val mContext: Context, private var homeEvent: IHo
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_module_test_item_view, this)
View.inflate(mContext, R.layout.home_test_item_view, this)
}
......
......@@ -11,7 +11,7 @@ import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeTestItemBean
import kotlinx.android.synthetic.xlzx.home_module_test_top_item_view.view.*
import kotlinx.android.synthetic.xlzx.home_test_top_item_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -35,7 +35,7 @@ class HomeTestTopItemView(private val mContext: Context, private var homeEvent:
var viewHeight = viewWidth * 143 / 345
val params = LinearLayout.LayoutParams(viewWidth, viewHeight)
layoutParams = params
View.inflate(mContext, R.layout.home_module_test_top_item_view, this)
View.inflate(mContext, R.layout.home_test_top_item_view, this)
}
......
......@@ -8,7 +8,7 @@ import com.yidianling.home.R
import com.yidianling.home.event.HomeImpl
import com.yidianling.home.event.IHomeEvent
import com.yidianling.home.model.bean.HomeTestItemBean
import kotlinx.android.synthetic.xlzx.home_module_test_view.view.*
import kotlinx.android.synthetic.xlzx.home_test_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -29,7 +29,7 @@ class HomeTestView(private val mContext: Context, private var homeEvent: HomeImp
orientation = VERTICAL
val params = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
layoutParams = params
View.inflate(mContext, R.layout.home_module_test_view, this)
View.inflate(mContext, R.layout.home_test_view, this)
homeModuleIntelligentViewHomeCommonTitleView.setTitle("测试·分析")
homeModuleIntelligentViewHomeCommonTitleView.setOnClickListener {
homeEvent?.testMoreClick()
......
......@@ -16,7 +16,7 @@ import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeHeaderBean
import com.yidianling.home.ui.view.HomePagerBannerRealView
import kotlinx.android.synthetic.xlzx.home_module_pager_banner_category_view.view.*
import kotlinx.android.synthetic.xlzx.home_pager_banner_category_view.view.*
/**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
......@@ -81,7 +81,7 @@ class HomeModuleCategoryView : FrameLayout {
* 界面初始化
*/
private fun initView() {
View.inflate(context, R.layout.home_module_pager_banner_category_view, this)
View.inflate(context, R.layout.home_pager_banner_category_view, this)
val params = FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.WRAP_CONTENT
......
<?xml version="1.0" encoding="utf-8"?>
<animation-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false"
>
<item
android:drawable="@drawable/confide_play_state_3"
android:duration="0"/>
<item
android:drawable="@drawable/confide_play_state_1"
android:duration="300"/>
<item
android:drawable="@drawable/confide_play_state_2"
android:duration="300"/>
<item
android:drawable="@drawable/confide_play_state_3"
android:duration="300"/>
</animation-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<animation-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false"
>
<item
android:drawable="@drawable/home_confide_play_state_3"
android:duration="0"/>
<item
android:drawable="@drawable/home_confide_play_state_1"
android:duration="300"/>
<item
android:drawable="@drawable/home_confide_play_state_2"
android:duration="300"/>
<item
android:drawable="@drawable/home_confide_play_state_3"
android:duration="300"/>
</animation-list>
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