mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-04 10:15:18 +08:00
Added errors detail title float to scroll view
This commit is contained in:
@@ -71,6 +71,12 @@ object LocaleString {
|
|||||||
*/
|
*/
|
||||||
private fun Int.bind(vararg objArrs: Any) = resources.getString(this, *objArrs)
|
private fun Int.bind(vararg objArrs: Any) = resources.getString(this, *objArrs)
|
||||||
|
|
||||||
|
/** @string Automatic generated */
|
||||||
|
val appName get() = appName()
|
||||||
|
|
||||||
|
/** @string Automatic generated */
|
||||||
|
fun appName(vararg objArrs: Any) = R.string.app_name.bind(*objArrs)
|
||||||
|
|
||||||
/** @string Automatic generated */
|
/** @string Automatic generated */
|
||||||
val copied get() = copied()
|
val copied get() = copied()
|
||||||
|
|
||||||
|
@@ -90,6 +90,10 @@ class AppErrorsDetailActivity : BaseActivity<ActivityAppErrorsDetailBinding>() {
|
|||||||
binding.errorLineNumberText.text = appErrorsInfo.throwLineNumber.toString()
|
binding.errorLineNumberText.text = appErrorsInfo.throwLineNumber.toString()
|
||||||
binding.errorRecordTimeText.text = appErrorsInfo.time
|
binding.errorRecordTimeText.text = appErrorsInfo.time
|
||||||
binding.errorStackText.text = appErrorsInfo.stackTrace
|
binding.errorStackText.text = appErrorsInfo.stackTrace
|
||||||
|
binding.appPanelScrollView.setOnScrollChangeListener { _, _, y, _, _ ->
|
||||||
|
binding.detailTitleText.text = if (y >= 30.dp(context = this)) appName(appErrorsInfo.packageName) else LocaleString.appName
|
||||||
|
}
|
||||||
|
binding.detailTitleText.setOnClickListener { binding.appPanelScrollView.smoothScrollTo(0, 0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 弹出提示并退出 */
|
/** 弹出提示并退出 */
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
android:tooltipText="@string/back" />
|
android:tooltipText="@string/back" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/detail_title_text"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="2.5dp"
|
android:layout_marginEnd="2.5dp"
|
||||||
@@ -70,6 +71,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/app_panel_scroll_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
Reference in New Issue
Block a user