mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-01 08:45:16 +08:00
Fix the previous fix caused the text could not be selected in AppErrorsDetailActivity, activity_app_errors_detail
This commit is contained in:
@@ -26,6 +26,7 @@ package com.fankes.apperrorstracking.ui.activity.errors
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import com.fankes.apperrorstracking.R
|
||||
@@ -121,6 +122,8 @@ class AppErrorsDetailActivity : BaseActivity<ActivityAppErrorsDetailBinding>() {
|
||||
binding.appPanelScrollView.setOnScrollChangeListener { _, _, y, _, _ ->
|
||||
binding.detailTitleText.text = if (y >= 30.dp(context = this)) appNameOf(appErrorsInfo.packageName) else LocaleString.appName
|
||||
}
|
||||
/** 修复在一些小屏设备上设置了 [TextView.setTextIsSelectable] 后布局自动上滑问题 */
|
||||
binding.appPanelScrollView.post { binding.appPanelScrollView.scrollTo(0, 0) }
|
||||
binding.detailTitleText.setOnClickListener { binding.appPanelScrollView.smoothScrollTo(0, 0) }
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorThemeBackground"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activity.errors.AppErrorsDetailActivity"
|
||||
tools:ignore="ContentDescription,UseCompoundDrawables,SmallSp,UnusedAttribute">
|
||||
|
Reference in New Issue
Block a user