Commit 5989f51d by 严久程

华为渠道特殊处理

parent f09b9019
......@@ -20,8 +20,8 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_PROD;
// public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_PROD;
@Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......
......@@ -22,6 +22,7 @@ import com.ydl.ydlcommon.utils.URLUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.ExpertSearchActivity
import com.yidianling.consultant.IExpertSearchView
import com.yidianling.consultant.R
......@@ -299,8 +300,16 @@ class ExpertSearchAdapter(
holder.imgHead_online_server.visibility = View.GONE
holder.tvPrice.visibility = View.GONE
holder.tvPriceContent.visibility = View.GONE
holder.tvPriceContent.visibility = View.GONE
holder.tvChat.text="咨询"
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) {
......@@ -350,6 +359,7 @@ class ExpertSearchAdapter(
inner class NormalViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
//头像
val imgHead = itemView.imgHead!!
val cv_head_view = itemView.cv_head_view!!
//专家姓名
val tvName = itemView.tvName!!
//活动图标
......@@ -380,6 +390,8 @@ class ExpertSearchAdapter(
val tvSaleDurationForMonthContent = itemView.tvSaleDurationForMonthContent
//价格
val tvPrice = itemView.tvPrice!!
val tvPriceContent = itemView.tvPriceContent!!
val tv_money_symbol = itemView.tv_money_symbol!!
//服务套餐
val ll_products = itemView.ll_products!!
//私聊按钮
......
......@@ -17,6 +17,7 @@
android:orientation="vertical">
<android.support.v7.widget.CardView
android:id="@+id/cv_head_view"
android:layout_width="92dp"
android:layout_height="114dp"
app:cardCornerRadius="4dp"
......@@ -288,7 +289,7 @@
tools:visibility="visible" />
<TextView
android:id="@+id/tv_money_s"
android:id="@+id/tv_money_symbol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvPrice"
......
......@@ -8,6 +8,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.LinearLayout
import android.widget.RelativeLayout
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
......@@ -61,8 +62,8 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
homeModuleButtonBannerThird.visibility=View.GONE
homeModuleButtonBannerSecond.visibility=View.GONE
homeModuleButtonBannerThird.visibility = View.GONE
homeModuleButtonBannerSecond.visibility = View.GONE
homeModuleButtonBannerFirst.background =
resources.getDrawable(R.drawable.home_dcotor_bt_bg_huawei)
......@@ -73,6 +74,18 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
homeModuleButtonBannerFourth.background =
resources.getDrawable(R.drawable.home_listen_bt_bg_huawei)
homeModuleButtonBannerFirst.setPadding(15, 0, 0, 0)
homeModuleButtonBannerFourth.setPadding(15, 0, 0, 0)
val params1 =
homeModuleButtonBannerFirstTitle.layoutParams as RelativeLayout.LayoutParams
params1.addRule(RelativeLayout.ALIGN_PARENT_START)
homeModuleButtonBannerFirstTitle.layoutParams = params1
val params2 =
homeModuleButtonBannerFourthTitle.layoutParams as RelativeLayout.LayoutParams
params2.addRule(RelativeLayout.ALIGN_PARENT_START)
homeModuleButtonBannerFourthTitle.layoutParams = params2
homeModuleButtonBannerFirstTitle.setTextColor(Color.WHITE)
tv_first_text.setTextColor(Color.WHITE)
......@@ -82,6 +95,12 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
tv_third_text.setTextColor(Color.WHITE)
homeModuleButtonBannerSecondTitle.setTextColor(Color.WHITE)
tv_fourth_text.setTextColor(Color.WHITE)
homeModuleButtonBannerFirstTitle.textSize = 18f
tv_first_text.textSize = 13f
homeModuleButtonBannerFourthTitle.textSize = 18f
tv_second_text.textSize = 13f
}
homeModuleButtonBannerFirst.setOnClickListener {
......
......@@ -2,8 +2,10 @@ package com.yidianling.home.ui.view
import android.content.Context
import android.support.constraint.ConstraintLayout
import android.text.TextUtils
import android.util.AttributeSet
import android.view.View
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.home.R
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 壹点灵
* @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 {
initView()
......@@ -26,5 +30,13 @@ class HomeCommonTitleView(private val mContext: Context, private val attributeSe
fun setTitle(title: String) {
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
import android.content.Context
import android.text.TextUtils
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
......@@ -20,7 +22,7 @@ import kotlinx.android.synthetic.xlzx.home_test_item_view.view.*
*/
class HomeTestItemView(private val mContext: Context, private var homeEvent: IHomeBaseEvent?) :
LinearLayout(mContext) {
private val ffrom = PlatformDataManager.getRam().getChannelName()
private var params: LinearLayout.LayoutParams? = null
init {
......@@ -35,6 +37,11 @@ class HomeTestItemView(private val mContext: Context, private var homeEvent: IHo
)
layoutParams = params
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
import android.content.Context
import android.text.TextUtils
import android.view.View
import android.widget.LinearLayout
import com.ydl.ydl_image.config.ISimpleImageOpConfig
import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydlcommon.data.PlatformDataManager
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
......@@ -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?) :
LinearLayout(mContext) {
private val ffrom = PlatformDataManager.getRam().getChannelName()
init {
initView()
......@@ -37,6 +40,11 @@ class HomeTestTopItemView(private val mContext: Context, private var homeEvent:
layoutParams = params
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
}
}
/**
......
......@@ -12,16 +12,14 @@
android:layout_marginTop="8dp"
android:layout_marginRight="15dp"
android:gravity="center_horizontal"
android:paddingBottom="12dp"
android:orientation="horizontal">
android:orientation="horizontal"
android:paddingBottom="12dp">
<RelativeLayout
android:id="@+id/homeModuleButtonBannerFirst"
android:layout_width="0dp"
android:layout_height="78dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_weight="1"
android:background="@drawable/home_dcotor_bt_bg"
android:gravity="center_horizontal">
......@@ -50,8 +48,7 @@
android:id="@+id/homeModuleButtonBannerFourth"
android:layout_width="0dp"
android:layout_height="78dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:background="@drawable/home_listen_bt_bg"
android:gravity="center_horizontal">
......@@ -80,8 +77,7 @@
android:id="@+id/homeModuleButtonBannerThird"
android:layout_width="0dp"
android:layout_height="78dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:background="@drawable/home_course_bt_bg"
android:gravity="center_horizontal"
......@@ -111,6 +107,7 @@
android:id="@+id/homeModuleButtonBannerSecond"
android:layout_width="0dp"
android:layout_height="78dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:background="@drawable/home_test_bt_bg"
android:gravity="center_horizontal">
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:paddingTop="@dimen/platform_dp_24"
android:paddingBottom="@dimen/platform_dp_14">
<View
android:layout_width="0dp"
android:layout_height="5dp"
android:background="@drawable/home_common_title_gradient_back"
app:layout_constraintLeft_toLeftOf="@+id/homeModuleCommonTitleViewTitle"
app:layout_constraintRight_toRightOf="@+id/homeModuleCommonTitleViewTitle"
app:layout_constraintBottom_toBottomOf="@+id/homeModuleCommonTitleViewTitle"
android:layout_marginBottom="2dp"/>
<TextView
android:id="@+id/homeModuleCommonTitleViewTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="@dimen/platform_dp_1"
tools:text="通用.标题"
android:textSize="24dp"
android:textStyle="bold"
android:textColor="@color/platform_color_333333"
android:layout_marginLeft="@dimen/platform_dp_15"
app:layout_constraintLeft_toLeftOf="parent"/>
<LinearLayout
android:layout_width="66dp"
android:layout_height="@dimen/platform_dp_24"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginBottom="@dimen/platform_dp_3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginRight="@dimen/platform_dp_15"
android:background="@drawable/home_show_more_line">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="更多"
android:layout_marginLeft="@dimen/platform_dp_2"
android:textColor="@color/platform_color_444444"
android:textSize="13sp"/>
<ImageView
android:layout_height="8dp"
android:layout_width="4dp"
android:src="@drawable/home_sale_arrow"
android:layout_marginLeft="3dp"/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:paddingTop="@dimen/platform_dp_24"
android:paddingBottom="@dimen/platform_dp_14">
<View
android:id="@+id/view_line"
android:layout_width="0dp"
android:layout_height="5dp"
android:background="@drawable/home_common_title_gradient_back"
app:layout_constraintLeft_toLeftOf="@+id/homeModuleCommonTitleViewTitle"
app:layout_constraintRight_toRightOf="@+id/homeModuleCommonTitleViewTitle"
app:layout_constraintBottom_toBottomOf="@+id/homeModuleCommonTitleViewTitle"
android:layout_marginBottom="2dp"/>
<TextView
android:id="@+id/homeModuleCommonTitleViewTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="@dimen/platform_dp_1"
tools:text="通用.标题"
android:textSize="24dp"
android:textStyle="bold"
android:textColor="@color/platform_color_333333"
android:layout_marginLeft="@dimen/platform_dp_15"
app:layout_constraintLeft_toLeftOf="parent"/>
<LinearLayout
android:layout_width="66dp"
android:layout_height="@dimen/platform_dp_24"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginBottom="@dimen/platform_dp_3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginRight="@dimen/platform_dp_15"
android:background="@drawable/home_show_more_line">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="更多"
android:layout_marginLeft="@dimen/platform_dp_2"
android:textColor="@color/platform_color_444444"
android:textSize="13sp"/>
<ImageView
android:layout_height="8dp"
android:layout_width="4dp"
android:src="@drawable/home_sale_arrow"
android:layout_marginLeft="3dp"/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
......@@ -81,6 +81,7 @@
</LinearLayout>
<TextView
android:id="@+id/tv_go"
android:layout_width="@dimen/platform_dp_32"
android:layout_height="@dimen/platform_dp_32"
android:background="@drawable/home_test_item_go_bg"
......
<?xml version="1.0" encoding="utf-8"?>
<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"
android:layout_width="match_parent"
android:layout_height="match_parent">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
......@@ -22,7 +22,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/home_image_default_back"
android:scaleType="centerCrop"/>
android:scaleType="centerCrop" />
<LinearLayout
android:layout_width="match_parent"
......@@ -32,13 +32,13 @@
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="45"/>
android:layout_weight="45" />
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="55"
android:background="@drawable/home_intelligent_gradient_back"/>
android:background="@drawable/home_intelligent_gradient_back" />
</LinearLayout>
</RelativeLayout>
......@@ -59,8 +59,7 @@
android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_24"
android:textStyle="bold"
tools:text="先结婚还是先买先结婚还是先买房"
/>
tools:text="先结婚还是先买先结婚还是先买房" />
<LinearLayout
android:id="@+id/homeModuleIntelligentTopViewDescLayout"
......@@ -82,19 +81,18 @@
android:textColor="@color/platform_color_444444"
android:textSize="@dimen/platform_dp_12"
android:textStyle="bold"
tools:text="2486"
/>
tools:text="2486" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已测"
android:textColor="@color/platform_color_666666"
android:textSize="@dimen/platform_dp_12"
/>
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<RelativeLayout
android:id="@+id/ll_day_test"
android:layout_width="@dimen/platform_dp_64"
android:layout_height="@dimen/platform_dp_20"
android:layout_alignParentRight="true"
......@@ -107,7 +105,7 @@
android:text="每日一测"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_12"
android:textStyle="bold"/>
android:textStyle="bold" />
</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