Commit 193d3ab8 by 霍志良

feat:修改UI

parent 728e1ce1
......@@ -64,15 +64,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
signingConfigs {
release {
storeFile file("keystore.jks")
storePassword "123456"
keyAlias "ydl"
keyPassword "123456"
}
}
productFlavors {
ydl{}
xlzx{}
......
......@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2'
componentVersion = "0.3.0.12"
componentVersion = "0.3.0.29-SNAPSHOT"
}
repositories {
mavenCentral()
......
......@@ -564,7 +564,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
}, {
}, {
})
})
}
}
}
......@@ -1362,23 +1362,21 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
//显示价格弹窗
private fun showPricePopupWindow() {
if (headData?.reorder != null) {
pricePopup = PricePopupWindow(
this, headData?.reorder!!,
headData?.filters!!,
pricePopup = headData?.filters?.let { it1 ->
PricePopupWindow(
this,
it1,
tempFilter, this
)
pricePopup!!.setOnDismissListener {
if (tempFilter.priceRanges != null) {
updateFilterTextViewStatus(tvSort, FILTER_STATUS_FILTERED)
} else {
updateFilterTextViewStatus(tvSort, FILTER_STATUS_NORMAL)
}
}
pricePopup!!.setOnDismissListener {
if (tempFilter.priceRanges != null) {
updateFilterTextViewStatus(tvSort, FILTER_STATUS_FILTERED)
} else {
updateFilterTextViewStatus(tvSort, FILTER_STATUS_NORMAL)
}
pricePopup!!.showAsDropDown(viewSep2)
} else {
ToastUtil.toastShort("数据初始化失败,请重试")
}
pricePopup!!.showAsDropDown(viewSep2)
}
//显示排序弹窗
......
......@@ -1004,24 +1004,21 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
//显示价格弹窗
private fun showPricePopupWindow() {
if (headData?.reorder != null) {
pricePopup = PricePopupWindow(
requireContext(), headData?.reorder!!,
headData?.filters!!,
pricePopup = headData?.filters?.let { it1 ->
PricePopupWindow(
requireContext(),
it1,
tempFilter, this
)
pricePopup!!.setOnDismissListener {
if (tempFilter.priceRanges != null) {
updateFilterTextViewStatus(tvSort, FILTER_STATUS_FILTERED)
} else {
updateFilterTextViewStatus(tvSort, FILTER_STATUS_NORMAL)
}
}
pricePopup!!.setOnDismissListener {
if (tempFilter.priceRanges != null) {
updateFilterTextViewStatus(tvSort, FILTER_STATUS_FILTERED)
} else {
updateFilterTextViewStatus(tvSort, FILTER_STATUS_NORMAL)
}
pricePopup!!.showAsDropDown(viewSep2)
} else {
ToastUtil.toastShort("数据初始化失败,请重试")
}
pricePopup!!.showAsDropDown(viewSep2)
}
//显示筛选弹窗
......
......@@ -30,7 +30,6 @@ import com.yidianling.consultant.listener.OnExpertClickListener
import com.yidianling.consultant.model.bean.ExpertServiceItem
import com.yidianling.consultant.modular.utils.TempH5RouteUtils
import com.yidianling.consultant.router.ConsultantIn
import kotlinx.android.synthetic.main.consultant_activity_hot_search.*
import kotlinx.android.synthetic.main.consultant_expert_search_feedbackrate.view.*
import kotlinx.android.synthetic.main.consultant_expert_search_header_view.view.*
import kotlinx.android.synthetic.main.consultant_expert_search_item_view.view.*
......@@ -38,7 +37,6 @@ import kotlinx.android.synthetic.main.consultant_expert_search_products_item.vie
import kotlinx.android.synthetic.main.consultant_item_empty.view.*
import kotlinx.android.synthetic.main.consultant_item_footer.view.*
import kotlinx.android.synthetic.main.consultant_item_tag.view.*
import kotlinx.android.synthetic.main.consultant_layout_search_content.*
import java.math.BigDecimal
/**
......
......@@ -10,7 +10,8 @@ import com.yidianling.consultant.model.bean.ChildrenBean
/**
* Created by Ykai on 2022/5/18.
*/
class SortAdapter(data: List<ChildrenBean>) : BaseMultiItemQuickAdapter<ChildrenBean, BaseViewHolder>(data) {
class SortAdapter(data: List<ChildrenBean>) :
BaseMultiItemQuickAdapter<ChildrenBean, BaseViewHolder>(data) {
var isVisible = false
init {
......@@ -19,25 +20,37 @@ class SortAdapter(data: List<ChildrenBean>) : BaseMultiItemQuickAdapter<Children
}
override fun convert(holder: BaseViewHolder, item: ChildrenBean) {
when(holder.itemViewType){
1 ->{
holder.setGone(R.id.ll_sort_item,item.isVisible)
when (holder.itemViewType) {
1 -> {
holder.setGone(R.id.ll_sort_item, item.isVisible)
holder.setText(R.id.tv_sort_name, item.cate_name)
holder.getView<TextView>(R.id.tv_sort_name).isSelected = item.isSelected
if (item.isSelected){
holder.setTextColor(R.id.tv_sort_name,ContextCompat.getColor(mContext,R.color.platform_main_theme))
}else{
holder.setTextColor(R.id.tv_sort_name,ContextCompat.getColor(mContext,R.color.platform_color_242424))
if (item.isSelected) {
holder.setTextColor(
R.id.tv_sort_name,
ContextCompat.getColor(mContext, R.color.platform_main_theme)
)
} else {
holder.setTextColor(
R.id.tv_sort_name,
ContextCompat.getColor(mContext, R.color.platform_color_242424)
)
}
}
2->{
holder.setGone(R.id.ll_sort_item,item.isVisible)
2 -> {
holder.setGone(R.id.ll_sort_item, item.isVisible)
holder.setText(R.id.tv_sort_name, item.cate_name)
holder.getView<TextView>(R.id.tv_sort_name).isSelected = item.isSelected
if (item.isSelected){
holder.setTextColor(R.id.tv_sort_name,ContextCompat.getColor(mContext,R.color.platform_main_theme))
}else{
holder.setTextColor(R.id.tv_sort_name,ContextCompat.getColor(mContext,R.color.platform_color_242424))
if (item.isSelected) {
holder.setTextColor(
R.id.tv_sort_name,
ContextCompat.getColor(mContext, R.color.platform_main_theme)
)
} else {
holder.setTextColor(
R.id.tv_sort_name,
ContextCompat.getColor(mContext, R.color.platform_color_242424)
)
}
}
}
......@@ -47,7 +60,7 @@ class SortAdapter(data: List<ChildrenBean>) : BaseMultiItemQuickAdapter<Children
/**
* 设置大于第12个之后的标签全部显示
*/
fun setAllVisible(){
fun setAllVisible() {
mData.forEach { bean ->
bean.isVisible = true
}
......@@ -58,9 +71,9 @@ class SortAdapter(data: List<ChildrenBean>) : BaseMultiItemQuickAdapter<Children
/**
* 设置大于第12个之后的标签全部隐藏
*/
fun setGone(){
fun setGone() {
mData.forEachIndexed { index, bean ->
if (index>12){
if (index > 12) {
bean.isVisible = false
}
}
......
......@@ -52,6 +52,7 @@ class AreaPopupWindow(
private var locationRegionItem: RegionItem? = null
private var locationList: ArrayList<SubItem>? = arrayListOf()
private var locationHistoryList = regionList
init {
val view =
LayoutInflater.from(context).inflate(R.layout.consultant_ui_region_popup_window, null)
......
......@@ -12,7 +12,6 @@ import android.widget.FrameLayout
import android.widget.PopupWindow
import android.widget.TextView
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.R
......@@ -23,7 +22,6 @@ import com.yidianling.consultant.listener.OnPriceItemSelectedListener
import com.yidianling.consultant.model.bean.AllFilter
import com.yidianling.consultant.model.bean.Filters
import com.yidianling.consultant.model.bean.PriceRangesItem
import com.yidianling.consultant.model.bean.ReorderItem
import com.yidianling.consultant.ui.view.rangeseekbar.OnRangeChangedListener
import com.yidianling.consultant.ui.view.rangeseekbar.RangeSeekBar
import kotlinx.android.synthetic.main.consultant_ui_price_popup_window.view.*
......@@ -34,7 +32,7 @@ import kotlinx.android.synthetic.main.consultant_ui_price_popup_window.view.*
* Created by zqk on 17-9-15.
*/
class PricePopupWindow(
val context: Context, sortItems: ArrayList<ReorderItem>,
val context: Context,
private val filterData: Filters,
private val tempFilter: AllFilter,
var onPriceItemSelectedListener: OnPriceItemSelectedListener
......
......@@ -6,10 +6,12 @@ import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.LinearLayout
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.constraintlayout.widget.ConstraintSet
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.home.R
import com.yidianling.home.event.IHomeBaseEvent
import kotlinx.android.synthetic.ydl.home_button_banner_view.view.*
......@@ -21,34 +23,43 @@ import kotlinx.android.synthetic.ydl.home_button_banner_view.view.*
* @Company 壹点灵
* @date 2019/02/13
*/
class HomeButtonBannerView(private val mContext: Context, private var homeEvent: IHomeBaseEvent?,var listenFree:Boolean) : LinearLayout(mContext) {
class HomeButtonBannerView(
private val mContext: Context,
private var homeEvent: IHomeBaseEvent?,
var listenFree: Boolean
) : LinearLayout(mContext) {
private var buttonParams: ConstraintLayout.LayoutParams? = null
private var buttonParams: LinearLayout.LayoutParams? = null
private var buttonParamsFrame: FrameLayout.LayoutParams? = null
private var buttonParamsFrame2: FrameLayout.LayoutParams? = null
init {
initView()
}
fun setVisibilityFree(boolean: Boolean){
if (boolean){
qingsuGif.visibility=View.VISIBLE
fun setVisibilityFree(boolean: Boolean) {
if (boolean) {
qingsuGif.visibility = View.VISIBLE
homeModuleButtonBannerSecondTitle.text = "免费热线"
}else{
qingsuGif.visibility=View.GONE
} else {
qingsuGif.visibility = View.GONE
homeModuleButtonBannerSecondTitle.text = "倾诉热线"
}
}
private fun initView() {
val params = RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
val params = RecyclerView.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
)
layoutParams = params
View.inflate(mContext, R.layout.home_button_banner_view, this)
setVisibilityFree(listenFree)
Glide.with(context)
.load(R.drawable.qingsu_new_free_dynamic)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.into(qingsuGif)
// initButtonView()
Glide.with(context)
.load(R.drawable.qingsu_new_free_dynamic)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.into(qingsuGif)
initButtonView()
homeModuleButtonBannerFirst.setOnClickListener {
homeEvent?.reservationExpertsClick()
......@@ -70,18 +81,21 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
private fun initButtonView() {
if (null == buttonParams) {
val screenWidth = RxDeviceTool.getScreenWidth(mContext)
val viewWidth = ((screenWidth - 2 * 9 * RxDeviceTool.getScreenDensity(mContext)) / 4).toInt()
val viewHeight = viewWidth * 78 / 80
buttonParams = ConstraintLayout.LayoutParams(viewWidth, viewHeight)
// val viewWidth = ((screenWidth - 2 * 9 * RxDeviceTool.getScreenDensity(mContext)) / 4).toInt()
val viewWidth = screenWidth / 4 - 40
val viewHeight = viewWidth
buttonParams = LinearLayout.LayoutParams(viewWidth, viewHeight)
buttonParams!!.setMargins(0, 0, 15, 0)
buttonParamsFrame = FrameLayout.LayoutParams(viewWidth, viewHeight)
buttonParamsFrame2= FrameLayout.LayoutParams((viewWidth/2.0).toInt(), (viewHeight/2.3).toInt())
buttonParamsFrame2!!.setMargins((((viewWidth/12f).toInt())),0,0,0)
buttonParamsFrame2 =
FrameLayout.LayoutParams((viewWidth / 2.0).toInt(), (viewHeight / 2.3).toInt())
buttonParamsFrame2!!.setMargins((((viewWidth / 12f).toInt())), 0, 0, 0)
// qingsuGif.layoutParams=buttonParamsFrame2
homeModuleButtonBannerFirst.layoutParams = buttonParams
homeModuleButtonBannerFourth.layoutParams = buttonParams
homeModuleButtonBannerSecond.layoutParams = buttonParams
homeModuleButtonBannerThird.layoutParams = buttonParams
homeModuleButtonBannerFourth.layoutParams = buttonParams
// homeModuleButtonBannerSecondFrame.layoutParams=buttonParamsFrame
homeModuleButtonBannerSecondFrame.layoutParams = buttonParamsFrame
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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:id="@+id/four_button_constrain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:gravity="center_horizontal"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginEnd="@dimen/platform_dp_12"
android:paddingTop="@dimen/platform_dp_8">
android:orientation="horizontal"
android:paddingLeft="@dimen/platform_dp_8"
android:paddingTop="@dimen/platform_dp_8"
android:paddingRight="@dimen/platform_dp_8">
<RelativeLayout
android:id="@+id/homeModuleButtonBannerFirst"
android:layout_width="87dp"
android:layout_height="87dp"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/homeModuleButtonBannerFourth"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="0dp"
android:layout_height="78dp"
android:layout_weight="1"
android:background="@drawable/home_button_banner_first_img_new"
android:gravity="center">
android:gravity="center"
android:paddingRight="@dimen/platform_dp_10">
<TextView
android:id="@+id/homeModuleButtonBannerFirstTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="心理咨询"
android:textColor="@color/black"
android:textSize="@dimen/platform_dp_16"
android:text="心理咨询" />
android:textStyle="bold" />
<TextView
android:layout_below="@+id/homeModuleButtonBannerFirstTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/homeModuleButtonBannerFirstTitle"
android:text="3W+师资"
android:textColor="@color/black"
android:textSize="@dimen/platform_dp_12"
android:text="3W+师资"/>
android:textSize="@dimen/platform_dp_12" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/homeModuleButtonBannerFourth"
android:layout_width="87dp"
android:layout_height="87dp"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintLeft_toRightOf="@id/homeModuleButtonBannerFirst"
app:layout_constraintRight_toLeftOf="@id/homeModuleButtonBannerThird"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="0dp"
android:layout_height="78dp"
android:layout_weight="1"
android:background="@drawable/home_confide_free_icon"
android:gravity="center">
android:gravity="center"
android:paddingRight="@dimen/platform_dp_10">
<TextView
android:id="@+id/homeModuleButtonBannerFourthTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="心理测试"
android:textColor="@color/black"
android:textSize="@dimen/platform_dp_16"
android:text="心理测试" />
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
......@@ -69,24 +67,22 @@
<RelativeLayout
android:id="@+id/homeModuleButtonBannerThird"
android:layout_width="87dp"
android:layout_height="87dp"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintLeft_toRightOf="@id/homeModuleButtonBannerFourth"
app:layout_constraintRight_toLeftOf="@id/homeModuleButtonBannerSecond"
app:layout_constraintTop_toTopOf="parent"
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="78dp"
android:layout_weight="1"
android:background="@drawable/home_button_banner_third_img_new"
android:gravity="center">
android:gravity="center"
android:orientation="vertical"
android:paddingRight="@dimen/platform_dp_10">
<TextView
android:id="@+id/homeModuleButtonBannerThirdTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="心理课堂"
android:textColor="@color/black"
android:textSize="@dimen/platform_dp_16"
android:text="心理课堂"/>
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
......@@ -99,42 +95,44 @@
<FrameLayout
android:id="@+id/homeModuleButtonBannerSecond"
android:layout_width="87dp"
android:layout_height="87dp"
android:layout_width="0dp"
android:layout_height="78dp"
android:layout_weight="1"
android:background="@drawable/home_button_banner_fourth_img_new"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintLeft_toRightOf="@id/homeModuleButtonBannerThird"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/home_button_banner_fourth_img_new">
app:layout_constraintTop_toTopOf="parent">
<RelativeLayout
android:id="@+id/homeModuleButtonBannerSecondFrame"
android:layout_width="87dp"
android:layout_height="87dp"
android:gravity="center">
android:layout_width="78dp"
android:layout_height="78dp"
android:gravity="center"
android:paddingRight="@dimen/platform_dp_10">
<TextView
android:id="@+id/homeModuleButtonBannerSecondTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="倾诉热线"
android:textColor="@color/black"
android:textSize="@dimen/platform_dp_16"
android:text="倾诉热线" />
android:textStyle="bold" />
<TextView
android:layout_below="@+id/homeModuleButtonBannerSecondTitle"
android:layout_width="wrap_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/homeModuleButtonBannerSecondTitle"
android:text="温暖守护您"
android:textColor="@color/black"
android:textSize="@dimen/platform_dp_12"
android:text="温暖守护您" />
android:textSize="@dimen/platform_dp_12" />
</RelativeLayout>
<ImageView
android:id="@+id/qingsuGif"
android:layout_width="@dimen/platform_dp_48"
android:layout_height="@dimen/platform_dp_22"
android:id="@+id/qingsuGif"
android:visibility="visible"></ImageView>
android:visibility="visible" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
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