Commit 2176c516 by 严久程

Merge branch 'dev' into 咨询加声网

# Conflicts:
#	config.gradle
#	m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
parents 92240540 9b4d4af0
...@@ -20,8 +20,8 @@ import java.util.List; ...@@ -20,8 +20,8 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule { public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/"; String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST; // public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public static String appEnv = YDLConstants.ENV_TEST; // public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_PROD; public static String appEnv = YDLConstants.ENV_PROD;
@Override @Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) { public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......
...@@ -15,12 +15,14 @@ import com.ydl.webview.NewH5Activity ...@@ -15,12 +15,14 @@ import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.config.SimpleImageOpConfiger import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.module.GlideApp import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.router.IYDLRouterConstant import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.URLUtils import com.ydl.ydlcommon.utils.URLUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.ExpertSearchActivity import com.yidianling.consultant.ExpertSearchActivity
import com.yidianling.consultant.IExpertSearchView import com.yidianling.consultant.IExpertSearchView
import com.yidianling.consultant.R import com.yidianling.consultant.R
...@@ -50,6 +52,8 @@ class ExpertSearchAdapter( ...@@ -50,6 +52,8 @@ class ExpertSearchAdapter(
const val EMPTY_VIEW = 2 const val EMPTY_VIEW = 2
} }
private val ffrom = PlatformDataManager.getRam().getChannelName()
//记录当前选择主题的id //记录当前选择主题的id
var cateId: String? = null var cateId: String? = null
...@@ -66,6 +70,10 @@ class ExpertSearchAdapter( ...@@ -66,6 +70,10 @@ class ExpertSearchAdapter(
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: RecyclerView.ViewHolder?, position: Int) { override fun onBindViewHolder(holder: RecyclerView.ViewHolder?, position: Int) {
if (holder is NormalViewHolder) { if (holder is NormalViewHolder) {
val isFromXinliZiXunHuawei =
!TextUtils.isEmpty(ffrom) && ffrom.startsWith("ATK_7") && ffrom.endsWith("huawei")
val itemBean = listData[position] val itemBean = listData[position]
//头像 //头像
val headConfig = SimpleImageOpConfiger() val headConfig = SimpleImageOpConfiger()
...@@ -283,6 +291,27 @@ class ExpertSearchAdapter( ...@@ -283,6 +291,27 @@ class ExpertSearchAdapter(
} }
} }
} }
if (isFromXinliZiXunHuawei) {
holder.ll_honor_layout.visibility = View.GONE
holder.ll_tags.visibility = View.GONE
holder.imgHead_online.visibility = View.GONE
holder.imgHead_online_server.visibility = View.GONE
holder.tvPrice.visibility = View.GONE
holder.tvPriceContent.visibility = View.GONE
holder.tv_money_symbol.visibility = View.GONE
holder.chat_people_in_question.visibility = View.GONE
holder.tvCity.visibility = View.GONE
holder.tvChat.visibility = View.GONE
holder.tvChat.text = "咨询"
val params = holder.cv_head_view.layoutParams
params.width = RxImageTool.dp2px(92f)
params.height = RxImageTool.dp2px(92f)
holder.cv_head_view.layoutParams = params
}
} else if (holder is FooterViewHolder) { } else if (holder is FooterViewHolder) {
if (hasMore) { if (hasMore) {
holder.itemView.visibility = View.VISIBLE holder.itemView.visibility = View.VISIBLE
...@@ -330,6 +359,7 @@ class ExpertSearchAdapter( ...@@ -330,6 +359,7 @@ class ExpertSearchAdapter(
inner class NormalViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { inner class NormalViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
//头像 //头像
val imgHead = itemView.imgHead!! val imgHead = itemView.imgHead!!
val cv_head_view = itemView.cv_head_view!!
//专家姓名 //专家姓名
val tvName = itemView.tvName!! val tvName = itemView.tvName!!
//活动图标 //活动图标
...@@ -340,6 +370,8 @@ class ExpertSearchAdapter( ...@@ -340,6 +370,8 @@ class ExpertSearchAdapter(
val imgServiceFree = itemView.imgServiceFree!! val imgServiceFree = itemView.imgServiceFree!!
//新驻图标 //新驻图标
val imgNewEnter = itemView.imgNewEnter!! val imgNewEnter = itemView.imgNewEnter!!
//荣誉标签
val ll_honor_layout = itemView.ll_honor_layout!!
//好评率 //好评率
val ll_feedbackRate = itemView.ll_feedbackRate!! val ll_feedbackRate = itemView.ll_feedbackRate!!
//xxx人点评 //xxx人点评
...@@ -358,6 +390,8 @@ class ExpertSearchAdapter( ...@@ -358,6 +390,8 @@ class ExpertSearchAdapter(
val tvSaleDurationForMonthContent = itemView.tvSaleDurationForMonthContent val tvSaleDurationForMonthContent = itemView.tvSaleDurationForMonthContent
//价格 //价格
val tvPrice = itemView.tvPrice!! val tvPrice = itemView.tvPrice!!
val tvPriceContent = itemView.tvPriceContent!!
val tv_money_symbol = itemView.tv_money_symbol!!
//服务套餐 //服务套餐
val ll_products = itemView.ll_products!! val ll_products = itemView.ll_products!!
//私聊按钮 //私聊按钮
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout 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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="@dimen/platform_dp_13" android:paddingLeft="@dimen/platform_dp_13"
android:paddingRight="@dimen/platform_dp_15" android:paddingRight="@dimen/platform_dp_15"
android:paddingBottom="@dimen/platform_dp_8" android:paddingBottom="@dimen/platform_dp_8">
xmlns:app="http://schemas.android.com/apk/res-auto">
<!--头像--> <!--头像-->
<LinearLayout <LinearLayout
android:id="@+id/cvHead" android:id="@+id/cvHead"
...@@ -15,18 +15,20 @@ ...@@ -15,18 +15,20 @@
android:layout_marginTop="@dimen/platform_dp_15" android:layout_marginTop="@dimen/platform_dp_15"
android:background="@drawable/consultant_bg_radius_line_gray_05" android:background="@drawable/consultant_bg_radius_line_gray_05"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
android:id="@+id/cv_head_view"
android:layout_width="92dp" android:layout_width="92dp"
android:layout_height="114dp" android:layout_height="114dp"
app:cardElevation="0px" app:cardCornerRadius="4dp"
app:cardCornerRadius="4dp"> app:cardElevation="0px">
<ImageView <ImageView
android:id="@+id/imgHead" android:id="@+id/imgHead"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/consultant_avatar_def_circle" android:src="@drawable/consultant_avatar_def_circle" />
/>
</android.support.v7.widget.CardView> </android.support.v7.widget.CardView>
</LinearLayout> </LinearLayout>
...@@ -34,67 +36,70 @@ ...@@ -34,67 +36,70 @@
android:id="@+id/imgHead_online" android:id="@+id/imgHead_online"
android:layout_width="62dp" android:layout_width="62dp"
android:layout_height="14dp" android:layout_height="14dp"
android:layout_alignBottom="@+id/cvHead"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:layout_alignBottom="@+id/cvHead" android:visibility="gone"
app:srcCompat="@drawable/consultant_online_yue" app:srcCompat="@drawable/consultant_online_yue"
tools:visibility="visible" tools:visibility="visible" />
android:visibility="gone"/>
<ImageView <ImageView
android:id="@+id/imgHead_online_server" android:id="@+id/imgHead_online_server"
android:layout_width="41dp" android:layout_width="41dp"
android:layout_height="14dp" android:layout_height="14dp"
android:layout_alignBottom="@+id/cvHead"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:layout_alignBottom="@+id/cvHead" android:visibility="gone"
app:srcCompat="@drawable/consultant_online_server" app:srcCompat="@drawable/consultant_online_server"
tools:visibility="visible" tools:visibility="visible" />
android:visibility="gone"/>
<!--咨询师姓名--> <!--咨询师姓名-->
<TextView <TextView
android:id="@+id/tvName" android:id="@+id/tvName"
android:layout_toRightOf="@+id/cvHead"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:textSize="@dimen/platform_dp_18"
android:textColor="@color/platform_color_242424"
android:layout_marginStart="@dimen/platform_dp_12" android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_toEndOf="@+id/cvHead"
android:layout_toRightOf="@+id/cvHead"
android:gravity="center_vertical" android:gravity="center_vertical"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_18"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="SpUsage" tools:ignore="SpUsage"
tools:text="罗静" tools:text="罗静" />
android:layout_toEndOf="@+id/cvHead" />
<LinearLayout <LinearLayout
android:layout_toRightOf="@+id/tvName" android:id="@+id/ll_honor_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="8dp"
android:gravity="center_vertical"
android:layout_alignTop="@+id/tvName" android:layout_alignTop="@+id/tvName"
android:layout_alignBottom="@+id/tvName" android:layout_alignBottom="@+id/tvName"
android:layout_marginStart="@dimen/platform_dp_2"
android:layout_toEndOf="@+id/tvName" android:layout_toEndOf="@+id/tvName"
android:layout_marginStart="@dimen/platform_dp_2"> android:layout_toRightOf="@+id/tvName"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="8dp">
<ImageView <ImageView
android:id="@+id/img_fightEpidemicIcon" android:id="@+id/img_fightEpidemicIcon"
android:layout_width="53dp" android:layout_width="53dp"
android:layout_height="@dimen/platform_dp_17" android:layout_height="@dimen/platform_dp_17"
android:layout_marginRight="4dp" android:layout_marginRight="4dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:visibility="gone"/> android:visibility="gone" />
<!--活动图标--> <!--活动图标-->
<ImageView <ImageView
android:id="@+id/img_activity" android:id="@+id/img_activity"
android:layout_width="42dp" android:layout_width="42dp"
android:layout_height="12dp" android:layout_height="12dp"
android:layout_marginRight="4dp" android:layout_marginRight="4dp"
android:visibility="gone"/> android:visibility="gone" />
<!--公益图标--> <!--公益图标-->
<ImageView <ImageView
android:id="@+id/imgServiceFree" android:id="@+id/imgServiceFree"
...@@ -118,8 +123,8 @@ ...@@ -118,8 +123,8 @@
android:layout_height="@dimen/platform_dp_12" android:layout_height="@dimen/platform_dp_12"
android:layout_marginRight="4dp" android:layout_marginRight="4dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
tools:background="@drawable/consultant_expert_search_shixi" android:visibility="gone"
android:visibility="gone"/> tools:background="@drawable/consultant_expert_search_shixi" />
</LinearLayout> </LinearLayout>
...@@ -130,37 +135,38 @@ ...@@ -130,37 +135,38 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tvName" android:layout_below="@+id/tvName"
android:layout_marginLeft="@dimen/platform_dp_12" android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_toRightOf="@+id/cvHead"
android:layout_toEndOf="@+id/cvHead"
android:layout_marginTop="@dimen/platform_dp_4" android:layout_marginTop="@dimen/platform_dp_4"
android:textSize="@dimen/platform_dp_12" android:layout_toEndOf="@+id/cvHead"
android:textColor="@color/platform_color_242424" android:layout_toRightOf="@+id/cvHead"
android:lines="1"
android:ellipsize="end" android:ellipsize="end"
tools:text="一级婚姻家庭咨询师,二级心理咨询师"/> android:lines="1"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_12"
tools:text="一级婚姻家庭咨询师,二级心理咨询师" />
<!--咨询师标签--> <!--咨询师标签-->
<LinearLayout <LinearLayout
android:id="@+id/ll_tags" android:id="@+id/ll_tags"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/tvName"
android:layout_alignTop="@+id/tvChat" android:layout_alignTop="@+id/tvChat"
android:layout_alignBottom="@+id/tvChat" android:layout_alignBottom="@+id/tvChat"
android:layout_alignLeft="@+id/tvName"
android:layout_toLeftOf="@+id/tvChat" android:layout_toLeftOf="@+id/tvChat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_zixunOrderNum" android:id="@+id/ll_zixunOrderNum"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/platform_dp_16" android:layout_height="@dimen/platform_dp_16"
android:layout_toRightOf="@+id/cvHead"
android:layout_toEndOf="@+id/cvHead"
android:layout_below="@+id/tvTeamCertifications" android:layout_below="@+id/tvTeamCertifications"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_marginStart="@dimen/platform_dp_12" android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_5" android:layout_marginTop="@dimen/platform_dp_5"
android:layout_toEndOf="@+id/cvHead"
android:layout_toRightOf="@+id/cvHead"
android:orientation="horizontal"> android:orientation="horizontal">
<!--好评率--> <!--好评率-->
<LinearLayout <LinearLayout
...@@ -174,173 +180,179 @@ ...@@ -174,173 +180,179 @@
<!--61234人点评--> <!--61234人点评-->
<TextView <TextView
android:id="@+id/tv_zixunOrderNum" android:id="@+id/tv_zixunOrderNum"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:textSize="@dimen/platform_dp_12" android:layout_marginLeft="@dimen/platform_dp_12"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
tools:text="61234" android:textSize="@dimen/platform_dp_12"
android:textStyle="bold"/> android:textStyle="bold"
tools:text="61234" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:textSize="@dimen/platform_dp_12" android:text="条评价"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
android:text="条评价" /> android:textSize="@dimen/platform_dp_12" />
</LinearLayout> </LinearLayout>
<!--帮助人数--> <!--帮助人数-->
<TextView <TextView
android:id="@+id/tvOrderNumContent" android:id="@+id/tvOrderNumContent"
android:layout_toRightOf="@+id/cvHead" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_zixunOrderNum" android:layout_below="@+id/ll_zixunOrderNum"
android:layout_marginStart="@dimen/platform_dp_12" android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_12" android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/platform_dp_12"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:layout_toRightOf="@+id/cvHead"
android:text="帮助"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
tools:ignore="SpUsage" android:textSize="@dimen/platform_dp_12"
android:text="帮助" /> tools:ignore="SpUsage" />
<TextView <TextView
android:id="@+id/tvOrderNum" android:id="@+id/tvOrderNum"
android:layout_toRightOf="@+id/tvOrderNumContent"
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/platform_dp_12" android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_marginLeft="1dp" android:layout_marginLeft="1dp"
android:layout_marginRight="1dp" android:layout_marginRight="1dp"
android:layout_toRightOf="@+id/tvOrderNumContent"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_12"
android:textStyle="bold" android:textStyle="bold"
tools:text="2648" tools:ignore="SpUsage"
tools:ignore="SpUsage" /> tools:text="2648" />
<TextView <TextView
android:layout_toRightOf="@+id/tvOrderNum"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvOrderNumContent" android:layout_alignTop="@+id/tvOrderNumContent"
android:textSize="@dimen/platform_dp_12" android:layout_toRightOf="@+id/tvOrderNum"
android:text="人"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
tools:ignore="SpUsage" android:textSize="@dimen/platform_dp_12"
android:text="人" /> tools:ignore="SpUsage" />
<!--服务时长--> <!--服务时长-->
<TextView <TextView
android:id="@+id/tvSaleDurationForMonthContent" android:id="@+id/tvSaleDurationForMonthContent"
android:layout_toRightOf="@+id/tvOrderNum"
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_marginLeft="@dimen/platform_dp_20"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/platform_dp_12" android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_marginLeft="@dimen/platform_dp_20"
android:layout_toRightOf="@+id/tvOrderNum"
android:text="服务"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
tools:ignore="SpUsage" android:textSize="@dimen/platform_dp_12"
android:text="服务" /> tools:ignore="SpUsage" />
<TextView <TextView
android:id="@+id/tvSaleDurationForMonth" android:id="@+id/tvSaleDurationForMonth"
android:layout_toRightOf="@+id/tvSaleDurationForMonthContent"
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/platform_dp_12" android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_marginLeft="1dp" android:layout_marginLeft="1dp"
android:layout_marginRight="1dp" android:layout_marginRight="1dp"
android:layout_toRightOf="@+id/tvSaleDurationForMonthContent"
android:gravity="center"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_12"
android:textStyle="bold" android:textStyle="bold"
android:gravity="center" tools:ignore="SpUsage"
tools:text="134" tools:text="134" />
tools:ignore="SpUsage" />
<TextView <TextView
android:layout_toRightOf="@+id/tvSaleDurationForMonth"
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/platform_dp_12" android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_toRightOf="@+id/tvSaleDurationForMonth"
android:text="小时"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
tools:ignore="SpUsage" android:textSize="@dimen/platform_dp_12"
android:text="小时" /> tools:ignore="SpUsage" />
<TextView <TextView
android:id="@+id/people_in_question" android:id="@+id/people_in_question"
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_alignParentRight="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/platform_dp_12" android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_alignParentRight="true"
android:textColor="@color/platform_color_FF5040" android:textColor="@color/platform_color_FF5040"
android:textSize="@dimen/platform_dp_12"
android:visibility="gone"
tools:ignore="SpUsage" tools:ignore="SpUsage"
tools:text="多人在问询" tools:text="多人在问询"
android:visibility="gone" tools:visibility="visible" />
tools:visibility="visible"/>
<TextView <TextView
android:id="@+id/tv_money_symbol"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvPrice" android:layout_alignTop="@+id/tvPrice"
android:layout_marginTop="3dp"
android:layout_marginRight="1dp"
android:layout_toLeftOf="@+id/tvPrice" android:layout_toLeftOf="@+id/tvPrice"
android:text="¥"
android:textColor="#FF5040" android:textColor="#FF5040"
android:textSize="@dimen/platform_dp_11" android:textSize="@dimen/platform_dp_11"
tools:ignore="SpUsage"
android:layout_marginTop="3dp"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginRight="1dp" tools:ignore="SpUsage" />
android:text="¥" />
<TextView <TextView
android:id="@+id/tvPrice" android:id="@+id/tvPrice"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvName" android:layout_alignTop="@+id/tvName"
android:layout_toLeftOf="@+id/tvPriceContent" android:layout_toLeftOf="@+id/tvPriceContent"
android:fontFamily="@font/platform_din_bold"
android:textColor="#FF5040" android:textColor="#FF5040"
android:textSize="@dimen/platform_dp_20" android:textSize="@dimen/platform_dp_20"
android:fontFamily="@font/platform_din_bold"
tools:text="250" /> tools:text="250" />
<TextView <TextView
android:id="@+id/tvPriceContent" android:id="@+id/tvPriceContent"
android:layout_alignParentRight="true"
android:layout_alignBottom="@+id/tvPrice"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#FF5040" android:layout_alignBottom="@+id/tvPrice"
android:textSize="@dimen/platform_dp_11" android:layout_alignParentRight="true"
android:layout_marginLeft="1dp"
android:layout_marginBottom="2.5dp" android:layout_marginBottom="2.5dp"
android:text="起" android:text="起"
android:layout_marginLeft="1dp" /> android:textColor="#FF5040"
android:textSize="@dimen/platform_dp_11" />
<TextView <TextView
android:id="@+id/tvCity" android:id="@+id/tvCity"
android:layout_below="@+id/tvName"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_4" android:layout_below="@+id/tvName"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
tools:text="浙江.杭州" android:layout_marginTop="@dimen/platform_dp_4"
android:gravity="right" android:gravity="right"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12"/> android:textSize="@dimen/platform_dp_12"
tools:text="浙江.杭州" />
<!--<View--> <!--<View-->
<!--android:id="@+id/vLine"--> <!--android:id="@+id/vLine"-->
<!--android:layout_below="@+id/tvPrice"--> <!--android:layout_below="@+id/tvPrice"-->
<!--android:layout_width="match_parent"--> <!--android:layout_width="match_parent"-->
<!--android:layout_height="2dp"--> <!--android:layout_height="2dp"-->
<!--android:layout_marginLeft="104dp"--> <!--android:layout_marginLeft="104dp"-->
<!--android:layout_marginStart="104dp"--> <!--android:layout_marginStart="104dp"-->
<!--android:layout_marginTop="7dp"--> <!--android:layout_marginTop="7dp"-->
<!--android:layerType="software"--> <!--android:layerType="software"-->
<!--android:background="@drawable/expert_search_dash_line" />--> <!--android:background="@drawable/expert_search_dash_line" />-->
<!--服务套餐--> <!--服务套餐-->
<LinearLayout <LinearLayout
android:id="@+id/ll_products" android:id="@+id/ll_products"
android:layout_below="@+id/vLine"
android:layout_marginLeft="104dp"
android:layout_marginStart="104dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="104dp"
android:layout_marginLeft="104dp"
android:layout_marginTop="@dimen/platform_dp_5" android:layout_marginTop="@dimen/platform_dp_5"
android:orientation="vertical" android:orientation="vertical"
android:visibility="gone"> android:visibility="gone">
...@@ -353,43 +365,45 @@ ...@@ -353,43 +365,45 @@
android:layout_height="@dimen/platform_dp_24" android:layout_height="@dimen/platform_dp_24"
android:layout_alignBottom="@+id/cvHead" android:layout_alignBottom="@+id/cvHead"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:gravity="center"
android:textSize="@dimen/platform_dp_13"
android:textStyle="bold"
android:background="@drawable/consultant_expert_search_chat" android:background="@drawable/consultant_expert_search_chat"
android:gravity="center"
android:text="私聊"
android:textColor="@color/consultant_confirm_text_color" android:textColor="@color/consultant_confirm_text_color"
android:text="私聊"/> android:textSize="@dimen/platform_dp_13"
android:textStyle="bold" />
<!--描述--> <!--描述-->
<RelativeLayout <RelativeLayout
android:id="@+id/group_desc" android:id="@+id/group_desc"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_10"
android:layout_below="@+id/tvChat" android:layout_below="@+id/tvChat"
android:layout_toRightOf="@+id/cvHead"
android:layout_marginLeft="@dimen/platform_dp_15" android:layout_marginLeft="@dimen/platform_dp_15"
android:visibility="gone" android:layout_marginTop="@dimen/platform_dp_10"
android:background="@drawable/consultant_bg_radius_gray_2"> android:layout_toRightOf="@+id/cvHead"
android:background="@drawable/consultant_bg_radius_gray_2"
android:visibility="gone">
<ImageView <ImageView
android:layout_width="12dp" android:layout_width="12dp"
android:layout_height="11dp" android:layout_height="11dp"
android:layout_marginTop="@dimen/platform_dp_6"
android:layout_marginLeft="@dimen/platform_dp_8" android:layout_marginLeft="@dimen/platform_dp_8"
android:src="@drawable/consultant_bg_item_desc"/> android:layout_marginTop="@dimen/platform_dp_6"
android:src="@drawable/consultant_bg_item_desc" />
<TextView <TextView
android:id="@+id/tvDesc" android:id="@+id/tvDesc"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginLeft="12dp" android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
tools:text="的客人能够黄偶尔烦人呢日工俄日给你额鞥你让个汇入你哦个人会儿个黄胡蓉呢你个人给哦 而归黑人更换二给"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_11"/> android:textSize="@dimen/platform_dp_11"
tools:text="的客人能够黄偶尔烦人呢日工俄日给你额鞥你让个汇入你哦个人会儿个黄胡蓉呢你个人给哦 而归黑人更换二给" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
...@@ -6,7 +6,7 @@ import android.text.TextUtils ...@@ -6,7 +6,7 @@ import android.text.TextUtils
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.ydl.ydlcommon.data.PlatformDataManager.getRam import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.constract.YdlHomeViewHolderConstract import com.yidianling.home.constract.YdlHomeViewHolderConstract
import com.yidianling.home.event.HomeImpl import com.yidianling.home.event.HomeImpl
...@@ -29,6 +29,7 @@ class YdlHomeAdapter( ...@@ -29,6 +29,7 @@ class YdlHomeAdapter(
private var list: ArrayList<HomePagerDataBean> private var list: ArrayList<HomePagerDataBean>
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() { ) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
private val ffrom = PlatformDataManager.getRam().getChannelName()
private val mInflater: LayoutInflater = LayoutInflater.from(mContext) private val mInflater: LayoutInflater = LayoutInflater.from(mContext)
/** /**
* 倾述item的position * 倾述item的position
...@@ -151,21 +152,31 @@ class YdlHomeAdapter( ...@@ -151,21 +152,31 @@ class YdlHomeAdapter(
} }
//倾诉*排解模块 //倾诉*排解模块
is HomeConfideViewHolder -> { is HomeConfideViewHolder -> {
holder.confideViewView.setTitle( if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
list[position].headerBean?.listenCategoryDate, val parm = holder.itemView.layoutParams
confideSelectPosition parm.height = 0
) holder.itemView.layoutParams = parm
holder.confideViewView.setConfideExpertInfoView(list[position].confideBean?.body) } else {
confidePosition = position holder.confideViewView.setTitle(
list[position].headerBean?.listenCategoryDate,
confideSelectPosition
)
holder.confideViewView.setConfideExpertInfoView(list[position].confideBean?.body)
confidePosition = position
}
} }
//课程*成长模块 //课程*成长模块
is HomeCourseViewHolder -> { is HomeCourseViewHolder -> {
holder.courseViewView.initData(list[position].courseBean?.list) if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
val parm = holder.itemView.layoutParams
parm.height = 0
holder.itemView.layoutParams = parm
} else {
holder.courseViewView.initData(list[position].courseBean?.list)
}
} }
//解忧*问答模块 //解忧*问答模块
is HomeAssuageGriefViewHolder -> { is HomeAssuageGriefViewHolder -> {
val ffrom =
getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) { if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
val parm = holder.itemView.layoutParams val parm = holder.itemView.layoutParams
parm.height = 0 parm.height = 0
...@@ -180,15 +191,22 @@ class YdlHomeAdapter( ...@@ -180,15 +191,22 @@ class YdlHomeAdapter(
} }
//咨询模块 //咨询模块
is HomeConsultViewHolder -> { is HomeConsultViewHolder -> {
holder.consultView.setTitle( if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
list[position].headerBean?.consultCategoryData, val parm = holder.itemView.layoutParams
consultSelectPosition parm.height = 0
) holder.itemView.layoutParams = parm
holder.consultView.setConsultInfoView( } else {
list[position].consultBean?.list,
list[position].headerBean?.consultCategoryData?.get(consultSelectPosition) holder.consultView.setTitle(
) list[position].headerBean?.consultCategoryData,
consultPosition = position consultSelectPosition
)
holder.consultView.setConsultInfoView(
list[position].consultBean?.list,
list[position].headerBean?.consultCategoryData?.get(consultSelectPosition)
)
consultPosition = position
}
} }
//测试模块 //测试模块
is HomeTestViewHolder -> { is HomeTestViewHolder -> {
......
...@@ -6,13 +6,15 @@ import android.support.v7.widget.RecyclerView ...@@ -6,13 +6,15 @@ import android.support.v7.widget.RecyclerView
import android.text.TextUtils import android.text.TextUtils
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.* import android.widget.FrameLayout
import android.widget.LinearLayout
import android.widget.RelativeLayout
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
import com.yidianling.home.model.bean.HomeHeaderBean import com.yidianling.home.model.bean.HomeHeaderBean
import com.yidianling.home.ui.widget.HomeModuleCategoryView import kotlinx.android.synthetic.xlzx.home_button_banner_view.view.*
/** /**
* @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a> * @author <a href="https://www.jianshu.com/u/c1e5310dd724">xujian</a>
...@@ -37,8 +39,6 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -37,8 +39,6 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
*/ */
var hasRealTestView: Boolean = false var hasRealTestView: Boolean = false
var mView: View? = null
private var realTestView: HomePagerBannerRealView? = null private var realTestView: HomePagerBannerRealView? = null
/** /**
* 线 * 线
...@@ -56,48 +56,50 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -56,48 +56,50 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
ViewGroup.LayoutParams.WRAP_CONTENT ViewGroup.LayoutParams.WRAP_CONTENT
) )
layoutParams = params layoutParams = params
View.inflate(mContext, R.layout.home_button_banner_view, this)
val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
mView = View.inflate(mContext, R.layout.home_button_banner_view_huawei, this)
} else {
mView = View.inflate(mContext, R.layout.home_button_banner_view, this)
}
// initButtonView() // initButtonView()
val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) { if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
mView!!.findViewById<ImageView>(R.id.homeModuleButtonBannerFirst).background = homeModuleButtonBannerThird.visibility = View.GONE
homeModuleButtonBannerSecond.visibility = View.GONE
homeModuleButtonBannerFirst.background =
resources.getDrawable(R.drawable.home_dcotor_bt_bg_huawei) resources.getDrawable(R.drawable.home_dcotor_bt_bg_huawei)
mView!!.findViewById<ImageView>(R.id.homeModuleButtonBannerSecond).background = homeModuleButtonBannerSecond.background =
resources.getDrawable(R.drawable.home_test_bt_bg_hauwei) resources.getDrawable(R.drawable.home_test_bt_bg_hauwei)
mView!!.findViewById<ImageView>(R.id.homeModuleButtonBannerThird).background = homeModuleButtonBannerThird.background =
resources.getDrawable(R.drawable.home_course_bt_bg_huawei) resources.getDrawable(R.drawable.home_course_bt_bg_huawei)
mView!!.findViewById<ImageView>(R.id.homeModuleButtonBannerFourth).background = homeModuleButtonBannerFourth.background =
resources.getDrawable(R.drawable.home_listen_bt_bg_huawei) resources.getDrawable(R.drawable.home_listen_bt_bg_huawei)
homeModuleButtonBannerFirstTitle.setTextColor(Color.WHITE)
tv_first_text.setTextColor(Color.WHITE)
homeModuleButtonBannerFourthTitle.setTextColor(Color.WHITE)
tv_second_text.setTextColor(Color.WHITE)
homeModuleButtonBannerThirdTitle.setTextColor(Color.WHITE)
tv_third_text.setTextColor(Color.WHITE)
homeModuleButtonBannerSecondTitle.setTextColor(Color.WHITE)
tv_fourth_text.setTextColor(Color.WHITE)
mView!!.findViewById<TextView>(R.id.homeModuleButtonBannerFirstTitle).setTextColor(Color.WHITE) homeModuleButtonBannerFirstTitle.textSize = 18f
mView!!.findViewById<TextView>(R.id.tv_first_text).setTextColor(Color.WHITE) tv_first_text.textSize = 13f
mView!!.findViewById<TextView>(R.id.homeModuleButtonBannerFourthTitle).setTextColor(Color.WHITE) homeModuleButtonBannerFourthTitle.textSize = 18f
mView!!.findViewById<TextView>(R.id.tv_second_text).setTextColor(Color.WHITE) tv_second_text.textSize = 13f
mView!!.findViewById<TextView>(R.id.homeModuleButtonBannerThirdTitle).setTextColor(Color.WHITE)
mView!!.findViewById<TextView>(R.id.tv_third_text).setTextColor(Color.WHITE)
mView!!.findViewById<TextView>(R.id.homeModuleButtonBannerSecondTitle).setTextColor(Color.WHITE)
mView!!.findViewById<TextView>(R.id.tv_fourth_text).setTextColor(Color.WHITE)
} }
mView!!.findViewById<RelativeLayout>(R.id.homeModuleButtonBannerFirst).setOnClickListener { homeModuleButtonBannerFirst.setOnClickListener {
homeEvent?.reservationExpertsClick() homeEvent?.reservationExpertsClick()
} }
mView!!.findViewById<RelativeLayout>(R.id.homeModuleButtonBannerSecond).setOnClickListener { homeModuleButtonBannerSecond.setOnClickListener {
homeEvent?.nowConfideClick() homeEvent?.nowConfideClick()
} }
mView!!.findViewById<RelativeLayout>(R.id.homeModuleButtonBannerThird).setOnClickListener { homeModuleButtonBannerThird.setOnClickListener {
homeEvent?.psychologyClassClick() homeEvent?.psychologyClassClick()
} }
mView!!.findViewById<RelativeLayout>(R.id.homeModuleButtonBannerFourth).setOnClickListener { homeModuleButtonBannerFourth.setOnClickListener {
homeEvent?.psychologyTestClick() homeEvent?.psychologyTestClick()
} }
} }
...@@ -108,8 +110,15 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -108,8 +110,15 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
homeCategory: List<HomeHeaderBean.AskCategoryDataBean>? homeCategory: List<HomeHeaderBean.AskCategoryDataBean>?
) { ) {
setRealTextView(homeSaleData) setRealTextView(homeSaleData)
homeEvent?.let { mView!!.findViewById<HomeModuleCategoryView>(R.id.home_category_view).setEvent(it) };
mView!!.findViewById<HomeModuleCategoryView>(R.id.home_category_view).initData(homeCategory) val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
home_category_view.visibility = View.GONE
} else {
homeEvent?.let { home_category_view.setEvent(it) }
home_category_view.initData(homeCategory)
}
} }
/** /**
...@@ -144,9 +153,9 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -144,9 +153,9 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
private fun setRealTextView(list: List<HomeHeaderBean.HomeSaleDataBean>?) { private fun setRealTextView(list: List<HomeHeaderBean.HomeSaleDataBean>?) {
if (!hasRealTestView) { if (!hasRealTestView) {
initLineView() initLineView()
mView!!.findViewById<LinearLayout>(R.id.ll_home_module_button).addView(lineView) ll_home_module_button.addView(lineView)
initRealTextView() initRealTextView()
mView!!.findViewById<LinearLayout>(R.id.ll_home_module_button).addView(realTestView) ll_home_module_button.addView(realTestView)
val cutOffParams = FrameLayout.LayoutParams( val cutOffParams = FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT,
...@@ -157,7 +166,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -157,7 +166,7 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
cutOffView.setBackgroundColor(resources.getColor(R.color.home_colorBg)) cutOffView.setBackgroundColor(resources.getColor(R.color.home_colorBg))
cutOffView.layoutParams = cutOffParams cutOffView.layoutParams = cutOffParams
mView!!.findViewById<LinearLayout>(R.id.ll_home_module_button).addView(cutOffView) ll_home_module_button.addView(cutOffView)
hasRealTestView = true hasRealTestView = true
} }
......
...@@ -2,8 +2,10 @@ package com.yidianling.home.ui.view ...@@ -2,8 +2,10 @@ package com.yidianling.home.ui.view
import android.content.Context import android.content.Context
import android.support.constraint.ConstraintLayout import android.support.constraint.ConstraintLayout
import android.text.TextUtils
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.home.R import com.yidianling.home.R
import kotlinx.android.synthetic.xlzx.home_common_title_view.view.* import kotlinx.android.synthetic.xlzx.home_common_title_view.view.*
...@@ -14,7 +16,9 @@ import kotlinx.android.synthetic.xlzx.home_common_title_view.view.* ...@@ -14,7 +16,9 @@ import kotlinx.android.synthetic.xlzx.home_common_title_view.view.*
* @Company 壹点灵 * @Company 壹点灵
* @date 2019/02/14 * @date 2019/02/14
*/ */
class HomeCommonTitleView(private val mContext: Context, private val attributeSet: AttributeSet) : ConstraintLayout(mContext, attributeSet) { class HomeCommonTitleView(private val mContext: Context, private val attributeSet: AttributeSet) :
ConstraintLayout(mContext, attributeSet) {
private val ffrom = PlatformDataManager.getRam().getChannelName()
init { init {
initView() initView()
...@@ -26,5 +30,13 @@ class HomeCommonTitleView(private val mContext: Context, private val attributeSe ...@@ -26,5 +30,13 @@ class HomeCommonTitleView(private val mContext: Context, private val attributeSe
fun setTitle(title: String) { fun setTitle(title: String) {
homeModuleCommonTitleViewTitle.text = title homeModuleCommonTitleViewTitle.text = title
val isFromXinliZiXunHuawei =
!TextUtils.isEmpty(ffrom) && ffrom.startsWith("ATK_7") && ffrom.endsWith("huawei")
if (isFromXinliZiXunHuawei) {
view_line.visibility = View.GONE
}
} }
} }
\ No newline at end of file
package com.yidianling.home.ui.view package com.yidianling.home.ui.view
import android.content.Context import android.content.Context
import android.text.TextUtils
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.LinearLayout import android.widget.LinearLayout
import com.ydl.ydl_image.manager.YDLImageCacheManager import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent import com.yidianling.home.event.IHomeBaseEvent
...@@ -20,7 +22,7 @@ import kotlinx.android.synthetic.xlzx.home_test_item_view.view.* ...@@ -20,7 +22,7 @@ import kotlinx.android.synthetic.xlzx.home_test_item_view.view.*
*/ */
class HomeTestItemView(private val mContext: Context, private var homeEvent: IHomeBaseEvent?) : class HomeTestItemView(private val mContext: Context, private var homeEvent: IHomeBaseEvent?) :
LinearLayout(mContext) { LinearLayout(mContext) {
private val ffrom = PlatformDataManager.getRam().getChannelName()
private var params: LinearLayout.LayoutParams? = null private var params: LinearLayout.LayoutParams? = null
init { init {
...@@ -35,6 +37,11 @@ class HomeTestItemView(private val mContext: Context, private var homeEvent: IHo ...@@ -35,6 +37,11 @@ class HomeTestItemView(private val mContext: Context, private var homeEvent: IHo
) )
layoutParams = params layoutParams = params
View.inflate(mContext, R.layout.home_test_item_view, this) View.inflate(mContext, R.layout.home_test_item_view, this)
val isFromXinliZiXunHuawei =
!TextUtils.isEmpty(ffrom) && ffrom.startsWith("ATK_7") && ffrom.endsWith("huawei")
if (isFromXinliZiXunHuawei) {
tv_go.visibility = View.GONE
}
} }
......
package com.yidianling.home.ui.view package com.yidianling.home.ui.view
import android.content.Context import android.content.Context
import android.text.TextUtils
import android.view.View import android.view.View
import android.widget.LinearLayout import android.widget.LinearLayout
import com.ydl.ydl_image.config.ISimpleImageOpConfig import com.ydl.ydl_image.config.ISimpleImageOpConfig
import com.ydl.ydl_image.config.SimpleImageOpConfiger import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.manager.YDLImageCacheManager import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R import com.yidianling.home.R
...@@ -22,6 +24,7 @@ import kotlinx.android.synthetic.xlzx.home_test_top_item_view.view.* ...@@ -22,6 +24,7 @@ import kotlinx.android.synthetic.xlzx.home_test_top_item_view.view.*
*/ */
class HomeTestTopItemView(private val mContext: Context, private var homeEvent: IHomeBaseEvent?) : class HomeTestTopItemView(private val mContext: Context, private var homeEvent: IHomeBaseEvent?) :
LinearLayout(mContext) { LinearLayout(mContext) {
private val ffrom = PlatformDataManager.getRam().getChannelName()
init { init {
initView() initView()
...@@ -37,6 +40,11 @@ class HomeTestTopItemView(private val mContext: Context, private var homeEvent: ...@@ -37,6 +40,11 @@ class HomeTestTopItemView(private val mContext: Context, private var homeEvent:
layoutParams = params layoutParams = params
View.inflate(mContext, R.layout.home_test_top_item_view, this) View.inflate(mContext, R.layout.home_test_top_item_view, this)
val isFromXinliZiXunHuawei =
!TextUtils.isEmpty(ffrom) && ffrom.startsWith("ATK_7") && ffrom.endsWith("huawei")
if (isFromXinliZiXunHuawei) {
ll_day_test.visibility = View.GONE
}
} }
/** /**
......
...@@ -14,19 +14,16 @@ ...@@ -14,19 +14,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginTop="8dp"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:paddingBottom="12dp" android:orientation="horizontal"
android:orientation="horizontal"> android:paddingBottom="12dp">
<RelativeLayout <RelativeLayout
android:id="@+id/homeModuleButtonBannerFirst" android:id="@+id/homeModuleButtonBannerFirst"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="78dp" android:layout_height="78dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/home_dcotor_bt_bg" android:background="@drawable/home_dcotor_bt_bg"
android:gravity="center_horizontal"> android:gravity="center_horizontal">
...@@ -55,8 +52,7 @@ ...@@ -55,8 +52,7 @@
android:id="@+id/homeModuleButtonBannerFourth" android:id="@+id/homeModuleButtonBannerFourth"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="78dp" android:layout_height="78dp"
android:layout_marginEnd="8dp" android:layout_marginStart="8dp"
android:layout_marginRight="8dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/home_listen_bt_bg" android:background="@drawable/home_listen_bt_bg"
android:gravity="center_horizontal"> android:gravity="center_horizontal">
...@@ -85,8 +81,7 @@ ...@@ -85,8 +81,7 @@
android:id="@+id/homeModuleButtonBannerThird" android:id="@+id/homeModuleButtonBannerThird"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="78dp" android:layout_height="78dp"
android:layout_marginEnd="8dp" android:layout_marginStart="8dp"
android:layout_marginRight="8dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/home_course_bt_bg" android:background="@drawable/home_course_bt_bg"
android:gravity="center_horizontal" android:gravity="center_horizontal"
...@@ -116,6 +111,7 @@ ...@@ -116,6 +111,7 @@
android:id="@+id/homeModuleButtonBannerSecond" android:id="@+id/homeModuleButtonBannerSecond"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="78dp" android:layout_height="78dp"
android:layout_marginStart="8dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/home_test_bt_bg" android:background="@drawable/home_test_bt_bg"
android:gravity="center_horizontal"> android:gravity="center_horizontal">
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:paddingTop="@dimen/platform_dp_24" android:paddingTop="@dimen/platform_dp_24"
android:paddingBottom="@dimen/platform_dp_14"> android:paddingBottom="@dimen/platform_dp_14">
<View <View
android:layout_width="0dp" android:id="@+id/view_line"
android:layout_height="5dp" android:layout_width="0dp"
android:background="@drawable/home_common_title_gradient_back" android:layout_height="5dp"
app:layout_constraintLeft_toLeftOf="@+id/homeModuleCommonTitleViewTitle" android:background="@drawable/home_common_title_gradient_back"
app:layout_constraintRight_toRightOf="@+id/homeModuleCommonTitleViewTitle" app:layout_constraintLeft_toLeftOf="@+id/homeModuleCommonTitleViewTitle"
app:layout_constraintBottom_toBottomOf="@+id/homeModuleCommonTitleViewTitle" app:layout_constraintRight_toRightOf="@+id/homeModuleCommonTitleViewTitle"
android:layout_marginBottom="2dp"/> app:layout_constraintBottom_toBottomOf="@+id/homeModuleCommonTitleViewTitle"
android:layout_marginBottom="2dp"/>
<TextView
android:id="@+id/homeModuleCommonTitleViewTitle" <TextView
android:layout_width="wrap_content" android:id="@+id/homeModuleCommonTitleViewTitle"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:paddingRight="@dimen/platform_dp_1" android:layout_height="wrap_content"
tools:text="通用.标题" android:paddingRight="@dimen/platform_dp_1"
android:textSize="24dp" tools:text="通用.标题"
android:textStyle="bold" android:textSize="24dp"
android:textColor="@color/platform_color_333333" android:textStyle="bold"
android:layout_marginLeft="@dimen/platform_dp_15" android:textColor="@color/platform_color_333333"
app:layout_constraintLeft_toLeftOf="parent"/> android:layout_marginLeft="@dimen/platform_dp_15"
app:layout_constraintLeft_toLeftOf="parent"/>
<LinearLayout
android:layout_width="66dp" <LinearLayout
android:layout_height="@dimen/platform_dp_24" android:layout_width="66dp"
android:orientation="horizontal" android:layout_height="@dimen/platform_dp_24"
android:gravity="center" android:orientation="horizontal"
android:layout_marginBottom="@dimen/platform_dp_3" android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="@dimen/platform_dp_3"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginRight="@dimen/platform_dp_15" app:layout_constraintRight_toRightOf="parent"
android:background="@drawable/home_show_more_line"> android:layout_marginRight="@dimen/platform_dp_15"
android:background="@drawable/home_show_more_line">
<TextView
android:layout_width="wrap_content" <TextView
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:gravity="center" android:layout_height="wrap_content"
android:text="更多" android:gravity="center"
android:layout_marginLeft="@dimen/platform_dp_2" android:text="更多"
android:textColor="@color/platform_color_444444" android:layout_marginLeft="@dimen/platform_dp_2"
android:textSize="13sp"/> android:textColor="@color/platform_color_444444"
android:textSize="13sp"/>
<ImageView
android:layout_height="8dp" <ImageView
android:layout_width="4dp" android:layout_height="8dp"
android:src="@drawable/home_sale_arrow" android:layout_width="4dp"
android:layout_marginLeft="3dp"/> android:src="@drawable/home_sale_arrow"
android:layout_marginLeft="3dp"/>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/tv_go"
android:layout_width="@dimen/platform_dp_32" android:layout_width="@dimen/platform_dp_32"
android:layout_height="@dimen/platform_dp_32" android:layout_height="@dimen/platform_dp_32"
android:background="@drawable/home_test_item_go_bg" android:background="@drawable/home_test_item_go_bg"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/home_image_default_back" android:background="@drawable/home_image_default_back"
android:scaleType="centerCrop"/> android:scaleType="centerCrop" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="45"/> android:layout_weight="45" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="55" android:layout_weight="55"
android:background="@drawable/home_intelligent_gradient_back"/> android:background="@drawable/home_intelligent_gradient_back" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
...@@ -59,8 +59,7 @@ ...@@ -59,8 +59,7 @@
android:textColor="@color/platform_color_FFFFFF" android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_24" android:textSize="@dimen/platform_dp_24"
android:textStyle="bold" android:textStyle="bold"
tools:text="先结婚还是先买先结婚还是先买房" tools:text="先结婚还是先买先结婚还是先买房" />
/>
<LinearLayout <LinearLayout
android:id="@+id/homeModuleIntelligentTopViewDescLayout" android:id="@+id/homeModuleIntelligentTopViewDescLayout"
...@@ -82,19 +81,18 @@ ...@@ -82,19 +81,18 @@
android:textColor="@color/platform_color_444444" android:textColor="@color/platform_color_444444"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12"
android:textStyle="bold" android:textStyle="bold"
tools:text="2486" tools:text="2486" />
/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="已测" android:text="已测"
android:textColor="@color/platform_color_666666" android:textColor="@color/platform_color_666666"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12" />
/>
</LinearLayout> </LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/ll_day_test"
android:layout_width="@dimen/platform_dp_64" android:layout_width="@dimen/platform_dp_64"
android:layout_height="@dimen/platform_dp_20" android:layout_height="@dimen/platform_dp_20"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -107,7 +105,7 @@ ...@@ -107,7 +105,7 @@
android:text="每日一测" android:text="每日一测"
android:textColor="@color/platform_color_242424" android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12"
android:textStyle="bold"/> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
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