Commit d26ef805 authored by wanglei's avatar wanglei

...

parent e2c14a91
......@@ -5,15 +5,10 @@ import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.content.res.Resources
import android.graphics.Color
import android.os.Handler
import android.text.TextUtils
import android.util.DisplayMetrics
import android.util.Log
import android.util.TypedValue
import android.view.KeyEvent
import android.view.View
import android.view.inputmethod.EditorInfo
......
......@@ -372,28 +372,31 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
)
}
// binding.ivPageSearchClose.setOnClickListener {
// binding.editPageSearch.setText("")
// binding.llPageSearch.visibility = View.GONE
// binding.clBottom.visibility = View.VISIBLE
// }
// binding.editPageSearch.addTextChangedListener(object : TextWatcher {
// override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
//
// }
//
// override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
// }
//
// override fun afterTextChanged(s: Editable?) {
// val key = s.toString()
// if (currentFragment != null) {
// currentFragment?.findAll(key)
// }
//
// }
// })
binding.ivPageSearchClose.setOnClickListener {
binding.editPageSearch.setText("")
binding.llPageSearch.visibility = View.GONE
binding.clBottom.visibility = View.VISIBLE
closeIm()
}
binding.editPageSearch.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
}
override fun afterTextChanged(s: Editable?) {
val key = s.toString()
if (currentFragment != null) {
currentFragment?.findAll(key)
}
}
})
binding.ivLeftSearch.setOnClickListener {
if (currentFragment != null) {
......@@ -406,6 +409,9 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
}
}
}
fun closeIm() {
}
fun setSearchNum(int: Int, max: Int) {
binding.tvPageSearchNumber.text = "" + int + "/" + max
......
......@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
......@@ -217,20 +218,20 @@
android:background="@drawable/bg_storke_070709_20"
android:orientation="horizontal">
<!-- <EditText-->
<!-- android:id="@+id/edit_page_search"-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:layout_marginHorizontal="15dp"-->
<!-- android:layout_weight="1"-->
<!-- android:background="@null"-->
<!-- android:drawableStart="@mipmap/sousuoicon_page_search"-->
<!-- android:drawablePadding="5dp"-->
<!-- android:hint="Search"-->
<!-- android:singleLine="true"-->
<!-- android:textSize="16sp"-->
<!-- tools:ignore="Autofill,HardcodedText,NestedWeights,TextFields" />-->
<EditText
android:id="@+id/edit_page_search"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="15dp"
android:layout_weight="1"
android:background="@null"
android:drawableStart="@mipmap/sousuoicon_page_search"
android:drawablePadding="5dp"
android:hint="Search"
android:singleLine="true"
android:textSize="16sp"
tools:ignore="Autofill,HardcodedText,NestedWeights,TextFields" />
<TextView
android:id="@+id/tv_page_search_number"
......
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