- WebView background set to #F5F5F5 to avoid white flash - SSL certificate errors now show a dialog (user can accept self-signed) - HTTP errors (4xx/5xx) shown with status code - Migrates old 'public_url' key to 'server_url' automatically - Better error messages with troubleshooting tips - Progress bar shows real page load progress - No-server-configured state shows clear instructions
92 lines
3.8 KiB
XML
92 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:id="@+id/swipe_refresh"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:id="@+id/appbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
|
|
|
|
<androidx.appcompat.widget.Toolbar
|
|
android:id="@+id/toolbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="?attr/actionBarSize"
|
|
android:background="@color/colorPrimary"
|
|
app:contentInsetStart="12dp">
|
|
|
|
<TextView
|
|
android:id="@+id/toolbar_title"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/app_name"
|
|
android:textColor="@android:color/white"
|
|
android:textSize="18sp"
|
|
android:maxLines="1"
|
|
android:ellipsize="end"
|
|
android:gravity="center_vertical" />
|
|
|
|
<ImageButton
|
|
android:id="@+id/btn_refresh"
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp"
|
|
android:layout_gravity="end"
|
|
android:src="@drawable/ic_refresh"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:contentDescription="@string/refresh" />
|
|
|
|
<ImageButton
|
|
android:id="@+id/btn_settings"
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp"
|
|
android:layout_gravity="end"
|
|
android:src="@drawable/ic_settings"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:contentDescription="@string/settings" />
|
|
|
|
</androidx.appcompat.widget.Toolbar>
|
|
|
|
<ProgressBar
|
|
android:id="@+id/progress_bar"
|
|
style="?android:attr/progressBarStyleHorizontal"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="3dp"
|
|
android:max="100"
|
|
android:visibility="gone"
|
|
android:indeterminateTint="@color/colorAccent"
|
|
android:progressTint="@color/colorAccent" />
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
<WebView
|
|
android:id="@+id/webview"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
|
|
|
<TextView
|
|
android:id="@+id/error_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center"
|
|
android:padding="32dp"
|
|
android:textSize="16sp"
|
|
android:textColor="@android:color/darker_gray"
|
|
android:visibility="gone"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:background="?attr/selectableItemBackground"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|