Commit 454a2467 authored by wanglei's avatar wanglei

...

parent 1c493516
...@@ -290,7 +290,7 @@ class DownloadAdapter : BaseQuickAdapter<DownloadBean, DownloadAdapter.DownloadV ...@@ -290,7 +290,7 @@ class DownloadAdapter : BaseQuickAdapter<DownloadBean, DownloadAdapter.DownloadV
private fun createNewLister(item: DownloadBean, tag: String = "", position: Int): FileDownloadListener { private fun createNewLister(item: DownloadBean, tag: String = "", position: Int): FileDownloadListener {
return object : FileDownloadListener() { return object : FileDownloadListener() {
override fun pending(task: BaseDownloadTask?, soFarBytes: Int, totalBytes: Int) { override fun pending(task: BaseDownloadTask?, soFarBytes: Int, totalBytes: Int) {
LogEx.logDebug(TAG, "pending tag=$tag item=${item.downloadId} ${task?.id}") LogEx.logDebug(TAG, "pending tag=$tag item=${item.downloadId} ${task?.id} ${item.url}")
} }
override fun progress(task: BaseDownloadTask?, soFarBytes: Int, totalBytes: Int) { override fun progress(task: BaseDownloadTask?, soFarBytes: Int, totalBytes: Int) {
...@@ -320,6 +320,7 @@ class DownloadAdapter : BaseQuickAdapter<DownloadBean, DownloadAdapter.DownloadV ...@@ -320,6 +320,7 @@ class DownloadAdapter : BaseQuickAdapter<DownloadBean, DownloadAdapter.DownloadV
} }
override fun error(task: BaseDownloadTask?, e: Throwable?) { override fun error(task: BaseDownloadTask?, e: Throwable?) {
LogEx.logDebug(TAG, "error ${task?.id} $e")
} }
override fun warn(task: BaseDownloadTask?) { override fun warn(task: BaseDownloadTask?) {
......
...@@ -13,6 +13,7 @@ import com.base.browserwhite.utils.BarUtils ...@@ -13,6 +13,7 @@ import com.base.browserwhite.utils.BarUtils
import com.base.browserwhite.utils.KotlinExt.toFormatSize import com.base.browserwhite.utils.KotlinExt.toFormatSize
import com.base.browserwhite.utils.LogEx import com.base.browserwhite.utils.LogEx
import com.base.browserwhite.help.NewsUtils import com.base.browserwhite.help.NewsUtils
import com.base.browserwhite.ui.activity.appprocess.AppProcessActivity
import com.chad.library.adapter4.QuickAdapterHelper import com.chad.library.adapter4.QuickAdapterHelper
import com.chad.library.adapter4.loadState.LoadState import com.chad.library.adapter4.loadState.LoadState
import com.chad.library.adapter4.loadState.trailing.TrailingLoadStateAdapter import com.chad.library.adapter4.loadState.trailing.TrailingLoadStateAdapter
...@@ -84,6 +85,10 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() { ...@@ -84,6 +85,10 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() {
binding.flFanhui.setOnClickListener { binding.flFanhui.setOnClickListener {
onBackPressedDispatcher.onBackPressed() onBackPressedDispatcher.onBackPressed()
} }
binding.tvFunctionBtn.setOnClickListener {
startActivity(Intent(this, AppProcessActivity::class.java))
finish()
}
} }
fun requestMore() { fun requestMore() {
......
...@@ -249,6 +249,8 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() { ...@@ -249,6 +249,8 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() {
} }
private var isParsing: Boolean = false private var isParsing: Boolean = false
@SuppressLint("NotifyDataSetChanged")
fun parseVideoLink(view: WebView) { fun parseVideoLink(view: WebView) {
if (isParsing) return if (isParsing) return
isParsing = true isParsing = true
...@@ -341,10 +343,11 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() { ...@@ -341,10 +343,11 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() {
} }
} }
private fun fastGetSize(bean: DownloadBean) { private fun fastGetSize(bean: DownloadBean) = runCatching {
if (bean.size == -1L) { if (bean.size == -1L) {
val client = OkHttpClient() val client = OkHttpClient()
LogEx.logDebug(TAG, "fastGetSize ${bean.url}")
val request = Request.Builder() val request = Request.Builder()
.url(bean.url) .url(bean.url)
.head() // 发送 HEAD 请求 .head() // 发送 HEAD 请求
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="10dp"
android:topRightRadius="10dp" />
<solid android:color="#FD8700" />
</shape>
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
android:id="@+id/cl_top" android:id="@+id/cl_top"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_gradient_0571ed_5aa7ff" android:background="#4C9F81"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<LinearLayout <LinearLayout
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="45dp" android:layout_marginTop="45dp"
android:src="@mipmap/wancheng" android:src="@mipmap/wancheng_result"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll" app:layout_constraintTop_toBottomOf="@id/ll"
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="50dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@id/card" app:layout_constraintBottom_toTopOf="@id/card"
...@@ -79,12 +78,13 @@ ...@@ -79,12 +78,13 @@
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/card" android:id="@+id/card"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="150dp"
android:layout_marginHorizontal="15dp" android:layout_marginHorizontal="15dp"
android:layout_marginTop="32dp"
android:layout_marginBottom="40dp" android:layout_marginBottom="40dp"
android:visibility="gone" app:cardCornerRadius="10dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp" app:cardElevation="0dp"
app:cardMaxElevation="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<ImageView <ImageView
android:id="@+id/iv_tuijian" android:id="@+id/iv_function"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
...@@ -111,10 +111,10 @@ ...@@ -111,10 +111,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp" android:layout_marginHorizontal="16dp"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@id/iv_tuijian" app:layout_constraintBottom_toBottomOf="@id/iv_function"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_tuijian" app:layout_constraintStart_toEndOf="@id/iv_function"
app:layout_constraintTop_toTopOf="@id/iv_tuijian"> app:layout_constraintTop_toTopOf="@id/iv_function">
<TextView <TextView
android:id="@+id/tv_function" android:id="@+id/tv_function"
...@@ -152,6 +152,17 @@ ...@@ -152,6 +152,17 @@
app:layout_constraintTop_toBottomOf="@id/ll_function" app:layout_constraintTop_toBottomOf="@id/ll_function"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<TextView
android:layout_width="47dp"
android:layout_height="25dp"
android:background="@drawable/bg_fd8700_tr10_bl10"
android:gravity="center"
android:text="REC"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="HardcodedText" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
......
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