mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-01 08:45:16 +08:00
Modify remove scrollbar and reset scroll view when view changed in AppErrorsDetailActivity, activity_app_errors_detail
This commit is contained in:
@@ -125,14 +125,21 @@ class AppErrorsDetailActivity : BaseActivity<ActivityAppErrorsDetailBinding>() {
|
||||
binding.disableAutoWrapErrorStackTraceSwitch.bind(ConfigData.DISABLE_AUTO_WRAP_ERROR_STACK_TRACE) {
|
||||
binding.errorStackTraceScrollView.isVisible = it
|
||||
binding.errorStackTraceFixedText.isGone = it
|
||||
binding.errorStackTraceScrollView.post { binding.errorStackTraceScrollView.scrollTo(0, 0) }
|
||||
resetScrollView()
|
||||
}
|
||||
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) }
|
||||
resetScrollView()
|
||||
}
|
||||
|
||||
/** 修复在一些小屏设备上设置了 [TextView.setTextIsSelectable] 后布局自动上滑问题 */
|
||||
private fun resetScrollView() {
|
||||
binding.rootView.post {
|
||||
binding.appPanelScrollView.scrollTo(0, 0)
|
||||
binding.errorStackTraceScrollView.scrollTo(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
|
@@ -467,6 +467,7 @@
|
||||
android:overScrollMode="never"
|
||||
android:padding="15dp"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:scrollbars="none"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
|
Reference in New Issue
Block a user