feat: full-featured Android app — not just public view
Rewrote the Android WebView app to load the entire meal-tracker web application, not just the public sharing page: - User configures their server base URL (e.g. https://meals.example.com) - Full login/register, dashboard, meal responses, history, settings - Cookie/session support — login persists across app restarts - Dynamic toolbar title from page - 'Clear Data' button in settings to wipe cookies/cache/sessions - Server URL auto-normalized (trailing slash stripped, https:// added) - Back button navigates within WebView history - Swipe-to-refresh, loading bar, network error handling
This commit is contained in:
@@ -20,16 +20,26 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:title="@string/app_name"
|
||||
app:titleTextColor="@android:color/white"
|
||||
android:background="@color/colorPrimary">
|
||||
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:layout_marginEnd="4dp"
|
||||
android:src="@drawable/ic_refresh"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/refresh" />
|
||||
@@ -39,7 +49,6 @@
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/ic_settings"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/settings" />
|
||||
|
||||
Reference in New Issue
Block a user