Commit 55608d82 by 霍志良

feat:BUG修改

parent e3d02156
package com.yidianling.consultant.ui.view
import com.ydl.ydlcommon.base.BaseFragment
import com.yidianling.consultant.R
class ConsultCategoryFragment : BaseFragment() {
override fun layoutResId(): Int {
return R.layout.consultant_layout_category_view
}
override fun initDataAndEvent() {
}
override fun initDataAndEventLazy() {
}
}
\ No newline at end of file
...@@ -34,6 +34,8 @@ import com.yidianling.consultant.ui.view.rangeseekbar.RangeSeekBar ...@@ -34,6 +34,8 @@ import com.yidianling.consultant.ui.view.rangeseekbar.RangeSeekBar
import kotlinx.android.synthetic.main.consultant_item_filter.view.* import kotlinx.android.synthetic.main.consultant_item_filter.view.*
import kotlinx.android.synthetic.main.consultant_item_price_range.view.* import kotlinx.android.synthetic.main.consultant_item_price_range.view.*
import kotlinx.android.synthetic.main.consultant_ui_filter_popup.view.* import kotlinx.android.synthetic.main.consultant_ui_filter_popup.view.*
import kotlinx.android.synthetic.main.consultant_ui_filter_popup.view.btnConfirm
import kotlinx.android.synthetic.main.consultant_ui_subject_popup_window.view.*
import kotlin.math.roundToInt import kotlin.math.roundToInt
...@@ -69,8 +71,6 @@ class FilterPopupWindow( ...@@ -69,8 +71,6 @@ class FilterPopupWindow(
private val popWidth = (RxDeviceTool.getScreenWidth(context)) private val popWidth = (RxDeviceTool.getScreenWidth(context))
var etMinPrice: EditText? = null
var etMaxPrice: EditText? = null
init { init {
val view = LayoutInflater.from(context).inflate(R.layout.consultant_ui_filter_popup, null) val view = LayoutInflater.from(context).inflate(R.layout.consultant_ui_filter_popup, null)
...@@ -105,7 +105,6 @@ class FilterPopupWindow( ...@@ -105,7 +105,6 @@ class FilterPopupWindow(
//学历选择 //学历选择
initEduViews(view) initEduViews(view)
initKeyboardListener(view)
updateCount() updateCount()
view.btnReset.setOnClickListener { view.btnReset.setOnClickListener {
...@@ -177,29 +176,6 @@ class FilterPopupWindow( ...@@ -177,29 +176,6 @@ class FilterPopupWindow(
} }
} }
@SuppressLint("ClickableViewAccessibility")
private fun initKeyboardListener(view: View) {
val svFilter = view.findViewById<ScrollView>(R.id.sv_filter)
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
svFilter.setOnTouchListener { _, _ ->
if (imm.isActive(etMinPrice) || imm.isActive(etMaxPrice)) {
RxKeyboardTool.hideSoftInput(context, etMaxPrice)
RxKeyboardTool.hideSoftInput(context, etMinPrice)
}
false
}
val activity = context as Activity;
RxKeyboardTool.setKeyboardChangedListener(activity) { b: Boolean, i: Int, i1: Int, i2: Int ->
if (!b) {
//软键盘隐藏
updatePriceFilter()
}
}
}
private fun reset() { private fun reset() {
tempFilter.showType = filterData.showType[0] tempFilter.showType = filterData.showType[0]
tempFilter.ages.clear() tempFilter.ages.clear()
...@@ -689,25 +665,6 @@ class FilterPopupWindow( ...@@ -689,25 +665,6 @@ class FilterPopupWindow(
} }
} }
private fun updatePriceFilter() {
RxKeyboardTool.hideSoftInput(context, etMaxPrice)
RxKeyboardTool.hideSoftInput(context, etMinPrice)
if (tempFilter.priceRanges == null) {
val priceRangesItem = PriceRangesItem()
tempFilter.priceRanges = priceRangesItem;
}
tempFilter.priceRanges!!.max_price = etMaxPrice?.text.toString()
tempFilter.priceRanges!!.min_price = etMinPrice?.text.toString()
tempFilter.priceRangesView?.isSelected = false
tempFilter.priceRangesView?.paint?.isFakeBoldText = false
tempFilter.priceRangesView = null
etMinPrice?.clearFocus()
etMaxPrice?.clearFocus()
updateCount(ConsultBIConstants.POSITION_AVERAGE_SERVICE_INPUT)
}
private fun initShowTypeViews(view: View) { private fun initShowTypeViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(42f)) / 2 val mWidth = (popWidth - RxImageTool.dp2px(42f)) / 2
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="MissingDefaultResource">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/scroll_nested"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<LinearLayout <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