mirror of
https://github.com/LucasVbr/OutilCuisson.git
synced 2026-05-19 10:53:18 +00:00
Les fragments ça fonctionne + Interface Ajouter (pas terminée)
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/activity_main_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,6 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:stretchColumns="0">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TableRow> <!-- Titre -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="@string/ajouter_titre"
|
||||
android:layout_span="3"/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow> <!-- Plat -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_plat"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_plat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow> <!-- Durée de cuisson -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_duree"/>
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/input_duree"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:timePickerMode="spinner"/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow> <!-- Température -->
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_temperature"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_temperature"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_column="2"
|
||||
android:inputType="number"/>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow> <!-- Buttons -->
|
||||
|
||||
<Button
|
||||
android:layout_column="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/btn_effacer"
|
||||
android:onClick="actionBtnEffacer"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/btn_valider"
|
||||
android:onClick="actionBtnAjouter"/>
|
||||
|
||||
</TableRow>
|
||||
|
||||
|
||||
|
||||
</TableLayout>
|
||||
@@ -1,3 +1,19 @@
|
||||
<resources>
|
||||
<string name="app_name">OutilCuisson</string>
|
||||
|
||||
<!-- Tabs -->
|
||||
<string name="tab_afficher">Afficher</string>
|
||||
<string name="tab_ajouter">Ajouter</string>
|
||||
|
||||
<!-- Section Afficher -->
|
||||
|
||||
|
||||
<!-- Section Ajouter -->
|
||||
<string name="ajouter_titre">Description cuisson d\'un plat</string>
|
||||
<string name="label_plat">Plat</string>
|
||||
<string name="label_duree">Durée de la cuisson</string>
|
||||
<string name="label_temperature">Température</string>
|
||||
<string name="btn_effacer">Effacer</string>
|
||||
<string name="btn_valider">Valider</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user