Commit 65b056bc by ydl

backup

parent 042875c0
ext {
kotlin_version = "1.3.21"
dev_mode = false
dev_mode = true
ydlPublishVersion = [
// -------------- 业务模块 --------------
......@@ -9,7 +9,7 @@ ext {
"m-consultant" : "0.0.59.20",
"m-fm" : "0.0.30.00",
"m-user" : "0.0.60.20",
"m-home" : "0.0.22.13",
"m-home" : "0.0.22.15",
"m-im" : "0.0.18.10",
"m-dynamic" : "0.0.7.70",
"m-article" : "0.0.0.6",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -30,25 +30,25 @@ class YdlHomeViewHolderConstract {
*/
val TEST_VIEW = 10004
/**
* 倾诉*排解模块
*/
val CONFIDE_VIEW = 10005
/**
* 课程*成长模块
*/
val COURSE_VIEW = 10006
val COURSE_VIEW = 10005
/**
* 解忧*问答模块
*/
val ASSUAGE_GRIEF_VIEW = 10007
val ASSUAGE_GRIEF_VIEW = 10006
/**
* 文章*阅读模块
*/
val ARTICLE_VIEW = 10008
val ARTICLE_VIEW = 10007
/**
* 底部提示语模块
*/
val FOOTER_VIEW = 10009
val FOOTER_VIEW = 10008
/**
* 倾诉*排解模块
*/
val CONFIDE_VIEW = 1000100
}
}
\ No newline at end of file
......@@ -40,7 +40,6 @@ class HomeAssuageGriefImageItemView(
if (urlList.size <= 2) {
var viewHeight = viewWidth * 178 / 315
params = LinearLayout.LayoutParams(viewWidth, viewHeight)
params.bottomMargin = (20 * RxDeviceTool.getScreenDensity(mContext)).toInt()
layoutParams = params
View.inflate(
mContext,
......
......@@ -35,6 +35,7 @@ class HomeAssuageGriefView(private val mContext: Context, private var homeEvent:
layoutParams = params
View.inflate(mContext, R.layout.home_assuage_grief_view, this)
homeModuleAssuageGriefViewHomeCommonTitleView.setTitle("人生答疑")
homeModuleAssuageGriefViewHomeCommonTitleView.setTopMargin(-10)
homeModuleAssuageGriefViewHomeCommonTitleView.setOnClickListener {
homeEvent?.askMoreClick()
}
......
......@@ -5,7 +5,10 @@ import android.support.constraint.ConstraintLayout
import android.text.TextUtils
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import kotlinx.android.synthetic.xlzx.home_common_title_view.view.*
......@@ -36,4 +39,10 @@ class HomeCommonTitleView(private val mContext: Context, private val attributeSe
homeModuleCommonTitleViewMorell.visibility = View.VISIBLE
homeModuleCommonTitleViewMoreText.text = text
}
fun setTopMargin(topMargin: Int) {
val params = layoutParams as MarginLayoutParams
params.topMargin = RxImageTool.dp2px(topMargin.toFloat())
layoutParams = params
}
}
\ No newline at end of file
......@@ -43,6 +43,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
private var listener: ConsultTabSelectedListener? = null
private var dp5: Int = 0
private var dp6: Int = 0
private var dp7: Int = 0
private var dp10: Int = 0
private var dp16: Int = 0
......@@ -53,6 +54,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
private fun initView() {
dp5 = RxImageTool.dp2px(5f)
dp6 = RxImageTool.dp2px(6f)
dp7 = RxImageTool.dp2px(7f)
dp10 = RxImageTool.dp2px(10f)
dp16 = RxImageTool.dp2px(16f)
......@@ -66,6 +68,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
View.inflate(mContext, R.layout.home_confide_view, this)
homeModuleConfideViewHomeCommonTitleView.setTitle("心理咨询")
homeModuleConfideViewHomeCommonTitleView.setMoreText("更多咨询")
homeModuleConfideViewHomeCommonTitleView.setTopMargin(-4)
homeModuleConfideViewHomeCommonTitleView.setOnClickListener {
homeEvent?.consultMoreClick()
}
......@@ -168,11 +171,11 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
}
fun getViewLayoutParams(index: Int): MarginLayoutParams {
var itemWidth: Int = (RxDeviceTool.getScreenWidth(mContext) - dp16 - dp16 - dp10) / 2
var itemWidth: Int = (RxDeviceTool.getScreenWidth(mContext) - dp10 - dp10) / 2
var itemHeight: Int = (itemWidth * 187) / 166
var topMargin = if (index == 2 || index == 3) itemHeight + dp10 else 0
var topMargin = if (index == 2 || index == 3) itemHeight else 0
val params = LayoutParams(itemWidth, itemHeight) as MarginLayoutParams
params.setMargins(dp16 + (itemWidth + dp10) * ((index) % 2),
params.setMargins(dp10 + (itemWidth) * ((index) % 2),
topMargin,
0,0
)
......
......@@ -32,6 +32,7 @@ class HomeTestView(private val mContext: Context, private var homeEvent: HomeImp
View.inflate(mContext, R.layout.home_test_view, this)
homeModuleIntelligentViewHomeCommonTitleView.setTitle("测试分析")
homeModuleIntelligentViewHomeCommonTitleView.setMoreText("更多测试")
homeModuleIntelligentViewHomeCommonTitleView.setTopMargin(-6)
homeModuleIntelligentViewHomeCommonTitleView.setOnClickListener {
homeEvent?.testMoreClick()
}
......
......@@ -66,6 +66,7 @@ class HomeModuleCategoryView : FrameLayout {
var dp1: Int = 0
var dp3: Int = 0
var dp6: Int = 0
var dp8: Int = 0
var dp12: Int = 0
var dp15: Int = 0
......@@ -112,6 +113,7 @@ class HomeModuleCategoryView : FrameLayout {
imageViewHeight = imageViewWidth * 52 / 107
dp1 = RxImageTool.dip2px(1f)
dp3 = RxImageTool.dip2px(3f)
dp6 = RxImageTool.dip2px(4f)
dp12 = RxImageTool.dip2px(12f)
categoryEightWidth = ScreenUtil.screenWidth - RxImageTool.dp2px(30f)
......@@ -242,10 +244,11 @@ class HomeModuleCategoryView : FrameLayout {
if (i > 3) {
multiple = 2
imageParams.topMargin =
imageEightViewWidth + dp8 + textViewHeight + dp8 + RxImageTool.dip2px(1f)
imageEightViewWidth + dp8 + textViewHeight + dp8 + RxImageTool.dip2px(1f) - dp3 - dp1 - dp1
imageParams.leftMargin = dp15 + margin * (i - 3) + (i - 4) * (imageEightViewWidth + margin)
} else {
multiple = 1
imageParams.topMargin = (dp8 + dp3 - dp6)
imageParams.leftMargin = dp15 + margin * (i + 1) + i * (imageEightViewWidth + margin)
}
imageView.layoutParams = imageParams
......@@ -257,17 +260,17 @@ class HomeModuleCategoryView : FrameLayout {
* 创建文本
*/
private fun createText(index: Int): TextView {
val textParams = FrameLayout.LayoutParams(textViewWidth, textViewHeight)
val textParams = FrameLayout.LayoutParams(textViewWidth, LayoutParams.WRAP_CONTENT)
val textView = TextView(context)
textView.setTextColor(Color.parseColor("#444444"))
textView.setTextColor(Color.parseColor("#666666"))
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12f)
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 11f)
textView.gravity = Gravity.CENTER_HORIZONTAL
if (index > 3) {
textParams.topMargin = 2 * (imageEightViewWidth + dp8) + textViewHeight + dp8
textParams.topMargin = 2 * (imageEightViewWidth + dp8) + textViewHeight + dp8 - dp3 - dp3 - dp1 - dp1
textParams.leftMargin = dp15 + textViewWidth * (index - 4)
} else {
textParams.topMargin = imageEightViewWidth + dp8
textParams.topMargin = imageEightViewWidth + (dp8 + dp3 - dp6) + dp8 - dp3
textParams.leftMargin = dp15 + textViewWidth * (index)
}
textView.layoutParams = textParams
......
......@@ -2,7 +2,25 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 阴影部分 -->
<item
<item
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp">
<shape android:shape="rectangle">
<gradient
android:angle="270"
android:endColor="#04f4f4f4"
android:startColor="#04f4f4f4"/>
<corners
android:radius="8dp"/>
</shape>
</item>
<!-- 阴影部分 -->
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
......@@ -11,21 +29,57 @@
<gradient
android:angle="270"
android:endColor="#10f4f4f4"
android:startColor="#10f4f4f4"/>
<corners
android:radius="8dp"/>
</shape>
</item>
<!-- 阴影部分 -->
<item
android:bottom="4dp"
android:left="4dp"
android:right="4dp"
android:top="4dp">
<shape android:shape="rectangle">
<gradient
android:angle="270"
android:endColor="#16f4f4f4"
android:startColor="#16f4f4f4"/>
<corners
android:radius="8dp"/>
</shape>
</item>
<!-- 阴影部分 -->
<item
android:bottom="6dp"
android:left="6dp"
android:right="6dp"
android:top="6dp">
<shape android:shape="rectangle">
<gradient
android:angle="270"
android:endColor="#32f4f4f4"
android:startColor="#32f4f4f4"/>
<corners
android:radius="10dp"/>
android:radius="8dp"/>
</shape>
</item>
<!-- 背景部分 -->
<item
android:bottom="3dp"
android:left="3dp"
android:right="3dp"
android:top="3dp">
android:bottom="8dp"
android:left="8dp"
android:right="8dp"
android:top="8dp">
<shape android:shape="rectangle">
......@@ -39,7 +93,7 @@
android:startColor="#FFFFFF"/>
<corners
android:radius="10dp"/>
android:radius="8dp"/>
</shape>
</item>
......
......@@ -36,7 +36,7 @@
android:ellipsize="end"
android:textSize="@dimen/platform_dp_17"
android:textStyle="bold"
android:lineHeight="19dp"
android:lineHeight="18dp"
android:layout_marginTop="-2dp"
android:textColor="@color/platform_color_242424"
android:layout_alignParentTop="true"
......@@ -118,6 +118,6 @@
android:background="@color/platform_color_EBEBEB"
android:layout_below="@+id/homeModuleArticleItemViewRl"
android:layout_marginTop="@dimen/platform_dp_15"
android:layout_marginRight="124dp"/>
android:layout_marginRight="147dp"/>
</RelativeLayout>
......@@ -113,7 +113,7 @@
android:textSize="@dimen/platform_dp_15"
android:textColor="@color/platform_color_666666"
android:maxLines="2"
android:lineHeight="17.5dp"
android:lineHeight="17dp"
android:ellipsize="end"
android:layout_marginTop="@dimen/platform_dp_6"
android:layout_below="@+id/homeModuleAssuageGriefViewHotViewHeaderCard"
......@@ -150,7 +150,7 @@
tools:text="情感倾诉"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_11"
android:layout_marginLeft="@dimen/platform_dp_3"/>
android:layout_marginLeft="@dimen/platform_dp_4"/>
</LinearLayout>
<View
android:layout_width="0dp"
......@@ -166,7 +166,8 @@
android:layout_height="wrap_content"
tools:text="68"
android:textSize="@dimen/platform_dp_14"
android:textColor="@color/platform_color_242424"
android:paddingBottom="1dp"
android:textColor="@color/platform_color_666666"
android:layout_marginRight="@dimen/platform_dp_22"
android:layout_marginLeft="@dimen/platform_dp_5"/>
......@@ -181,7 +182,8 @@
android:id="@+id/ll_zan"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:gravity="center_vertical">
<ImageView
android:id="@+id/homeModuleAssuageGriefViewZanState"
android:layout_width="@dimen/platform_dp_18"
......@@ -193,7 +195,8 @@
android:layout_height="wrap_content"
tools:text="987"
android:textSize="@dimen/platform_dp_14"
android:textColor="@color/platform_color_242424"
android:paddingBottom="1dp"
android:textColor="@color/platform_color_666666"
android:layout_marginLeft="@dimen/platform_dp_5"/>
</LinearLayout>
</LinearLayout>
......
......@@ -13,7 +13,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:clipChildren="false"
......@@ -21,7 +22,7 @@
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="wrap_content"
app:tabGravity="fill"
app:tabIndicatorHeight="0dp"
android:layout_marginLeft="12dp"
......@@ -38,7 +39,7 @@
<FrameLayout
android:id="@+id/ll_content"
android:layout_marginTop="10dp"
android:layout_marginTop="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
......
......@@ -24,7 +24,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/platform_head_place_hold_pic"/>
android:background="@color/platform_color_E0E0E0"/>
</android.support.v7.widget.CardView>
</RelativeLayout>
......@@ -87,7 +87,7 @@
<TextView
android:id="@+id/tv_consult_chat"
android:layout_width="80dp"
android:layout_width="74dp"
android:layout_height="28dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
......
......@@ -6,7 +6,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp">
android:layout_marginTop="10dp">
<android.support.v7.widget.CardView
android:id="@+id/homeModuleCourseItemViewImgCardView"
......@@ -19,7 +19,7 @@
android:layout_width="166dp"
android:layout_height="90.3dp"
android:scaleType="centerCrop"
android:src="@drawable/home_image_default_back"/>
android:background="@drawable/home_image_default_back"/>
</android.support.v7.widget.CardView>
......
......@@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_search"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_height="48dp"
android:paddingTop="2dp"
android:paddingLeft="16dp"
android:paddingRight="6dp"
android:focusable="true"
......
......@@ -12,8 +12,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="12dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:gravity="center_vertical"
android:orientation="horizontal"
>
......
......@@ -4,6 +4,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="92dp"
android:layout_marginTop="6dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/home_test_top_view_layout_back">
<TextView
......
......@@ -13,10 +13,10 @@
android:id="@+id/homeModuleIntelligentViewAddLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/platform_dp_15"
android:layout_marginRight="@dimen/platform_dp_15"
android:layout_marginTop="@dimen/platform_dp_2"
android:layout_marginLeft="@dimen/platform_dp_8"
android:layout_marginRight="@dimen/platform_dp_8"
android:layout_marginTop="@dimen/platform_dp_10"
android:orientation="vertical"
android:background="@drawable/home_test_module_bg"/>
android:background="@drawable/home_view_shadow_bg"/>
</merge>
\ No newline at end of file
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