esthétique

This commit is contained in:
NonoL3Robot
2022-03-15 23:41:56 +01:00
parent b2d8cd80a5
commit 965a00c03d
11 changed files with 142 additions and 86 deletions
+2 -2
View File
@@ -4,9 +4,9 @@
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@drawable/four"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@drawable/four"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.OutilCuisson"> android:theme="@style/Theme.OutilCuisson">
<activity <activity
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

+13 -10
View File
@@ -1,18 +1,21 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <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_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/tablayout_style" />
<androidx.viewpager2.widget.ViewPager2 <androidx.viewpager2.widget.ViewPager2
android:id="@+id/activity_main_viewpager" android:id="@+id/activity_main_viewpager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1"/> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
+19 -15
View File
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TableLayout 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content">
android:stretchColumns="3">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -10,33 +9,38 @@
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:text="@string/afficher_titre" android:text="@string/afficher_titre"
android:layout_marginBottom="15dp"/> style="@style/titre_style" />
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="100">
<TableRow>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_weight="70"
android:text="@string/afficher_label_plat" android:text="@string/afficher_label_plat"
android:layout_column="1" style="@style/label_style" />
android:layout_span="1"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="25"
android:text="@string/afficher_label_duree" android:text="@string/afficher_label_duree"
android:layout_column="2" style="@style/label_style" />
android:layout_span="1"
android:layout_marginLeft="100dp"
android:layout_marginRight="100dp"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0"
android:text="@string/afficher_label_temperature" android:text="@string/afficher_label_temperature"
android:layout_column="3" style="@style/label_style" />
android:layout_span="1"/>
</TableRow> </TableRow>
<ListView <ListView
android:id="@+id/listeCuisson" android:id="@+id/listeCuisson"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content" />
</TableLayout> </TableLayout>
+51 -43
View File
@@ -1,76 +1,84 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<TableLayout 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:stretchColumns="1"> android:stretchColumns="1">
<!-- Titre --> <!-- Titre -->
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:text="@string/ajouter_titre" /> android:text="@string/ajouter_titre"
style="@style/titre_style" />
<TableRow> <!-- Plat --> <TableRow> <!-- Plat -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/ajouter_label_plat" /> android:text="@string/ajouter_label_plat"
android:layout_gravity="center"
style="@style/label_style"/>
<EditText <EditText
android:id="@+id/input_plat" android:id="@+id/input_plat"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_span="2" android:layout_span="2"
android:inputType="text" android:inputType="text"
android:maxLength="20" android:maxLength="20"
android:maxLines="1" /> android:maxLines="1" />
</TableRow> </TableRow>
<!-- Durée de cuisson --> <!-- Durée de cuisson -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/ajouter_label_duree" /> android:text="@string/ajouter_label_duree"
style="@style/label_style"/>
<TimePicker <TimePicker
android:id="@+id/input_duree" android:id="@+id/input_duree"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:timePickerMode="spinner" /> android:timePickerMode="spinner" />
<TableRow> <!-- Température --> <TableRow> <!-- Température -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/ajouter_label_temperature" /> android:text="@string/ajouter_label_temperature"
android:layout_gravity="center"
style="@style/label_style"/>
<EditText <EditText
android:id="@+id/input_temperature" android:id="@+id/input_temperature"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_column="3" android:layout_span="2"
android:inputType="number"/> android:inputType="number" />
</TableRow> </TableRow>
<TableRow> <!-- Buttons --> <TableRow> <!-- Buttons -->
<Button <Button
android:id="@+id/btn_effacer" android:id="@+id/btn_effacer"
style="?android:attr/buttonBarButtonStyle" android:layout_width="wrap_content"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:layout_column="2"
android:layout_column="2" android:text="@string/btn_effacer"
android:text="@string/btn_effacer"/> android:textColor="@color/text_color"
style="?android:attr/buttonBarButtonStyle" />
<Button <Button
android:id="@+id/btn_valider" android:id="@+id/btn_valider"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/btn_valider" /> style="@style/button_ok_style"
android:text="@string/btn_valider" />
</TableRow> </TableRow>
+10 -8
View File
@@ -6,14 +6,16 @@
Un padding est ajouté autour du texte Un padding est ajouté autour du texte
fichier ligne_liste.xml 12/21 --> fichier ligne_liste.xml 12/21 -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/item_cuisson" android:id="@+id/item_cuisson"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:typeface="monospace" android:typeface="monospace"
android:textStyle="bold"/> android:textStyle="bold"
android:layout_margin="@dimen/cuissons_margin"
android:textSize="@dimen/cuissons_police"/>
</LinearLayout> </LinearLayout>
+1 -1
View File
@@ -3,7 +3,7 @@
<style name="Theme.OutilCuisson" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.OutilCuisson" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item> <item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorPrimaryVariant">@color/text_color</item>
<item name="colorOnPrimary">@color/black</item> <item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. --> <!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item> <item name="colorSecondary">@color/teal_200</item>
+5 -2
View File
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="purple_200">#FFBB86FC</color> <color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color> <color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color> <color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="fond_notif_color">#F6160C</color>
<color name="header_color">#F6160C</color>
<color name="text_color">#AA0000</color>
<color name="background_color">#D46B0B</color>
</resources> </resources>
+9 -1
View File
@@ -1,2 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources></resources> <resources>
<dimen name="cuissons_margin">5dp</dimen>
<dimen name="title_margin_bottom">10dp</dimen>
<!-- Polices -->
<dimen name="titre_police">20sp</dimen>
<dimen name="categories_police">16sp</dimen>
<dimen name="cuissons_police">16sp</dimen>
</resources>
+29 -1
View File
@@ -1,2 +1,30 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources></resources> <resources>
<style name="clickable_element_style">
<item name="android:backgroundTint">@color/background_color</item>
</style>
<style name="tablayout_style" parent="clickable_element_style">
<item name="tabTextColor">@color/text_color</item>
<item name="tabIndicatorColor">@color/text_color</item>
</style>
<style name="button_ok_style" parent="clickable_element_style">
<item name="android:textColor">@color/text_color</item>
</style>
<style name="button_cancel_style" parent="clickable_element_style">
<item name="buttonBarNegativeButtonStyle">?attr/buttonBarButtonStyle</item>
</style>
<style name="textview_style">
<item name="android:textColor">@color/text_color</item>
<item name="android:gravity">center</item>
<item name="android:layout_margin">@dimen/cuissons_margin</item>
</style>
<style name="titre_style" parent="@style/textview_style">
<item name="android:textSize">@dimen/titre_police</item>
<item name="android:layout_marginBottom">@dimen/title_margin_bottom</item>
</style>
<style name="label_style" parent="@style/textview_style">
<item name="android:textSize">@dimen/categories_police</item>
</style>
</resources>
+3 -3
View File
@@ -2,9 +2,9 @@
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.OutilCuisson" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.OutilCuisson" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item> <item name="colorPrimary">@color/fond_notif_color</item>
<item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorPrimaryVariant">@color/text_color</item>
<item name="colorOnPrimary">@color/white</item> <item name="colorOnPrimary">@color/text_color</item>
<!-- Secondary brand color. --> <!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item> <item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item> <item name="colorSecondaryVariant">@color/teal_700</item>