Commit 5989f51d by 严久程

华为渠道特殊处理

parent f09b9019
...@@ -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) {
......
...@@ -22,6 +22,7 @@ import com.ydl.ydlcommon.utils.URLUtils ...@@ -22,6 +22,7 @@ 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
...@@ -299,8 +300,16 @@ class ExpertSearchAdapter( ...@@ -299,8 +300,16 @@ class ExpertSearchAdapter(
holder.imgHead_online_server.visibility = View.GONE holder.imgHead_online_server.visibility = View.GONE
holder.tvPrice.visibility = View.GONE holder.tvPrice.visibility = View.GONE
holder.tvPriceContent.visibility = View.GONE holder.tvPriceContent.visibility = View.GONE
holder.tvPriceContent.visibility = View.GONE holder.tv_money_symbol.visibility = View.GONE
holder.tvChat.text="咨询" 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) {
...@@ -350,6 +359,7 @@ class ExpertSearchAdapter( ...@@ -350,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!!
//活动图标 //活动图标
...@@ -380,6 +390,8 @@ class ExpertSearchAdapter( ...@@ -380,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!!
//私聊按钮 //私聊按钮
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
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:cardCornerRadius="4dp" app:cardCornerRadius="4dp"
...@@ -288,7 +289,7 @@ ...@@ -288,7 +289,7 @@
tools:visibility="visible" /> tools:visibility="visible" />
<TextView <TextView
android:id="@+id/tv_money_s" 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"
......
...@@ -8,6 +8,7 @@ import android.view.View ...@@ -8,6 +8,7 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.FrameLayout import android.widget.FrameLayout
import android.widget.LinearLayout 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
...@@ -61,8 +62,8 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -61,8 +62,8 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
val ffrom = PlatformDataManager.getRam().getChannelName() val ffrom = PlatformDataManager.getRam().getChannelName()
if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) { if (!TextUtils.isEmpty(ffrom) && ffrom.endsWith("huawei")) {
homeModuleButtonBannerThird.visibility=View.GONE homeModuleButtonBannerThird.visibility = View.GONE
homeModuleButtonBannerSecond.visibility=View.GONE homeModuleButtonBannerSecond.visibility = View.GONE
homeModuleButtonBannerFirst.background = homeModuleButtonBannerFirst.background =
resources.getDrawable(R.drawable.home_dcotor_bt_bg_huawei) resources.getDrawable(R.drawable.home_dcotor_bt_bg_huawei)
...@@ -73,6 +74,18 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -73,6 +74,18 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
homeModuleButtonBannerFourth.background = homeModuleButtonBannerFourth.background =
resources.getDrawable(R.drawable.home_listen_bt_bg_huawei) 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) homeModuleButtonBannerFirstTitle.setTextColor(Color.WHITE)
tv_first_text.setTextColor(Color.WHITE) tv_first_text.setTextColor(Color.WHITE)
...@@ -82,6 +95,12 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent: ...@@ -82,6 +95,12 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
tv_third_text.setTextColor(Color.WHITE) tv_third_text.setTextColor(Color.WHITE)
homeModuleButtonBannerSecondTitle.setTextColor(Color.WHITE) homeModuleButtonBannerSecondTitle.setTextColor(Color.WHITE)
tv_fourth_text.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 { homeModuleButtonBannerFirst.setOnClickListener {
......
...@@ -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
}
} }
/** /**
......
...@@ -12,16 +12,14 @@ ...@@ -12,16 +12,14 @@
android:layout_marginTop="8dp" 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">
...@@ -50,8 +48,7 @@ ...@@ -50,8 +48,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">
...@@ -80,8 +77,7 @@ ...@@ -80,8 +77,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"
...@@ -111,6 +107,7 @@ ...@@ -111,6 +107,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">
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
android:paddingBottom="@dimen/platform_dp_14"> android:paddingBottom="@dimen/platform_dp_14">
<View <View
android:id="@+id/view_line"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="5dp" android:layout_height="5dp"
android:background="@drawable/home_common_title_gradient_back" android:background="@drawable/home_common_title_gradient_back"
......
...@@ -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"
......
...@@ -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