Commit 86efa993 authored by wanglei's avatar wanglei

...

parent 7b4fb1a2
package com.base.browserwhite.ui.activity.bookmark
import android.view.View
import androidx.core.view.isVisible
import com.base.browserwhite.bean.HistoryBean
import com.base.browserwhite.databinding.FragmentHistoryBinding
import com.base.browserwhite.ui.fragment.BaseFragment
......@@ -24,6 +25,9 @@ class HistoryFragment : BaseFragment<FragmentHistoryBinding>() {
override fun setView() {
historyAdapter = HistoryAdapter()
historyAdapter.moreAction={
}
binding.rv.adapter = historyAdapter
viewInit = true
......@@ -45,6 +49,7 @@ class HistoryFragment : BaseFragment<FragmentHistoryBinding>() {
}
historyList.add(it)
}
binding.llEmpty.isVisible = historyList.isEmpty()
runCatching {
historyAdapter.submitList(historyList)
}
......
......@@ -128,12 +128,13 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
}
binding.editWeb.setOnFocusChangeListener { v, hasFocus ->
if (hasFocus) {
binding.editWeb.selectAll()
}
}
if (searchContent.isNotEmpty()) {
binding.editWeb.setText(searchContent)
binding.editWeb.requestFocus()
binding.editWeb.selectAll()
binding.tvCancel.visibility = View.GONE
binding.tvSearch.visibility = View.VISIBLE
binding.ivClear.visibility = View.VISIBLE
......
......@@ -14,4 +14,28 @@
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_bookmark_history" />
<LinearLayout
android:id="@+id/ll_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@mipmap/nohistory"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="15dp"
android:text="No History"
tools:ignore="HardcodedText" />
</LinearLayout>
</FrameLayout>
\ No newline at end of file
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