Add a preferences screen
This commit is contained in:
23
app/src/main/res/layout/setup_config.xml
Normal file
23
app/src/main/res/layout/setup_config.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@+id/configure_button"
|
||||
android:autofillHints="" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/configure_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/configure"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -2,10 +2,14 @@
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/nav_graph"
|
||||
app:startDestination="@id/repository_ist_fragment">
|
||||
app:startDestination="@id/setup_config_fragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/repository_ist_fragment"
|
||||
android:id="@+id/setup_config_fragment"
|
||||
android:name="fr.uca.iut.clfreville2.teaiswarm.fragment.SetupConfigFragment"
|
||||
android:label="SetupConfigFragment" />
|
||||
<fragment
|
||||
android:id="@+id/repository_list_fragment"
|
||||
android:name="fr.uca.iut.clfreville2.teaiswarm.fragment.RepositoryListFragment"
|
||||
android:label="RepositoryListFragment" >
|
||||
<action
|
||||
@@ -16,4 +20,8 @@
|
||||
android:id="@+id/activity_list_fragment"
|
||||
android:name="fr.uca.iut.clfreville2.teaiswarm.fragment.ActivityListFragment"
|
||||
android:label="ActivityListFragment" />
|
||||
</navigation>
|
||||
<fragment
|
||||
android:id="@+id/preferences_fragment"
|
||||
android:name="fr.uca.iut.clfreville2.teaiswarm.fragment.PreferencesFragment"
|
||||
android:label="PreferencesFragment" />
|
||||
</navigation>
|
||||
|
@@ -11,4 +11,6 @@
|
||||
<string name="language">Language: %s</string>
|
||||
<string name="loading">Loading</string>
|
||||
<string name="unknown">Unknown</string>
|
||||
<string name="username">Username</string>
|
||||
<string name="configure">Configure</string>
|
||||
</resources>
|
9
app/src/main/res/xml/preferences.xml
Normal file
9
app/src/main/res/xml/preferences.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<EditTextPreference
|
||||
app:key="username"
|
||||
app:title="@string/username" />
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
Reference in New Issue
Block a user