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
38 lines
1.2 KiB
XML
38 lines
1.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/url_label"
|
|
android:textSize="14sp"
|
|
android:textColor="@android:color/darker_gray"
|
|
android:paddingBottom="6dp" />
|
|
|
|
<EditText
|
|
android:id="@+id/url_input"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="textUri"
|
|
android:hint="https://meals.example.com"
|
|
android:padding="12dp"
|
|
android:background="@android:drawable/edit_text"
|
|
android:textSize="14sp"
|
|
android:importantForAutofill="no"
|
|
android:autofillHints="no" />
|
|
|
|
<TextView
|
|
android:id="@+id/url_hint"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textSize="12sp"
|
|
android:textColor="@android:color/darker_gray"
|
|
android:paddingTop="8dp" />
|
|
|
|
</LinearLayout>
|