Add scroll-to-top control for logs

This commit is contained in:
ajp_anton
2026-07-27 01:17:40 +00:00
parent 607e89938e
commit 931ff5830f
2 changed files with 42 additions and 19 deletions
+35 -19
View File
@@ -1,31 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/logs_refresh"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/logs_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<ScrollView
android:id="@+id/log_scroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/page_padding">
<TextView
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="No logs yet." />
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/log_rows"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>
</ScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
android:orientation="vertical"
android:padding="@dimen/page_padding">
<TextView
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="No logs yet." />
<LinearLayout
android:id="@+id/log_rows"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>
</ScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/scroll_to_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:contentDescription="Scroll to top"
android:visibility="gone"
android:src="@android:drawable/arrow_up_float" />
</FrameLayout>