- Add toolbar setup in NoteEditorActivity - Add toolbar setup in SettingsActivity - Add toolbar to activity_settings.xml layout - Fix back button and menu display issues
166 lines
6.7 KiB
XML
166 lines
6.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical">
|
|
|
|
<com.google.android.material.appbar.MaterialToolbar
|
|
android:id="@+id/toolbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="?attr/actionBarSize"
|
|
app:title="@string/settings"
|
|
app:navigationIcon="?attr/homeAsUpIndicator" />
|
|
|
|
<ScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<!-- Server Settings -->
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/server_settings"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="16dp" />
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="@string/server_url"
|
|
android:layout_marginBottom="8dp"
|
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/editTextServerUrl"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="textUri" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="@string/username"
|
|
android:layout_marginBottom="8dp"
|
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/editTextUsername"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="text" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="@string/password"
|
|
android:layout_marginBottom="16dp"
|
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
|
app:endIconMode="password_toggle">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/editTextPassword"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="textPassword" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<!-- WiFi Settings -->
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/wifi_settings"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_marginBottom="16dp" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:hint="@string/home_ssid"
|
|
android:layout_marginEnd="8dp"
|
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/editTextHomeSSID"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="text" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<Button
|
|
android:id="@+id/buttonDetectSSID"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:text="Detect"
|
|
style="@style/Widget.Material3.Button.OutlinedButton" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/auto_sync"
|
|
android:textSize="16sp"
|
|
android:layout_gravity="center_vertical" />
|
|
|
|
<androidx.appcompat.widget.SwitchCompat
|
|
android:id="@+id/switchAutoSync"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Actions -->
|
|
<Button
|
|
android:id="@+id/buttonTestConnection"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/test_connection"
|
|
android:layout_marginTop="8dp"
|
|
style="@style/Widget.Material3.Button.OutlinedButton" />
|
|
|
|
<Button
|
|
android:id="@+id/buttonSyncNow"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/sync_now"
|
|
android:layout_marginTop="8dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|
|
|
|
</LinearLayout>
|