diff --git a/app/src/main/java/net/foucry/pilldroid/MedicamentDetailFragment.java b/app/src/main/java/net/foucry/pilldroid/MedicamentDetailFragment.java index fdfcc0c..787fe2f 100644 --- a/app/src/main/java/net/foucry/pilldroid/MedicamentDetailFragment.java +++ b/app/src/main/java/net/foucry/pilldroid/MedicamentDetailFragment.java @@ -94,24 +94,32 @@ public class MedicamentDetailFragment extends Fragment { TextView stockValue = stockView.findViewById(R.id.valeur); stockLibelle.setText(R.string.med_current_stock_label); stockValue.setText(Double.toString(medicament.getStock())); + stockValue.setHint(R.string.med_current_stock_label); + stockValue.setSelectAllOnFocus(true); priseView = detailView.findViewById(R.id.prise_cell); TextView priseLibelle = priseView.findViewById(R.id.libelle); TextView priseValue = (priseView.findViewById(R.id.valeur)); priseLibelle.setText(R.string.med_take_label); priseValue.setText(Double.toString(medicament.getPrise())); + priseValue.setHint(R.string.med_take_label); + priseValue.setSelectAllOnFocus(true); warningView = detailView.findViewById(R.id.warning_cell); TextView warningLibelle = warningView.findViewById(R.id.libelle); TextView warningValue = warningView.findViewById(R.id.valeur); warningLibelle.setText(R.string.med_warningTherehold_label); warningValue.setText(Integer.toString(medicament.getWarnThreshold())); + warningValue.setHint(R.string.med_warningTherehold_label); + warningValue.setSelectAllOnFocus(true); alertView = detailView.findViewById(R.id.alert_cell); TextView alertLibelle = alertView.findViewById(R.id.libelle); TextView alertValue = alertView.findViewById(R.id.valeur); - alertLibelle.setText(R.string.med_criticalTherehold_label); + alertLibelle.setText(R.string.med_alertTherehold_label); alertValue.setText(Integer.toString(medicament.getAlertThreshold())); + alertValue.setHint(R.string.med_alertTherehold_label); + alertValue.setSelectAllOnFocus(true); } return detailView; diff --git a/app/src/main/res/layout/activity_medicament_list.xml b/app/src/main/res/layout/activity_medicament_list.xml index 34af492..c43203e 100644 --- a/app/src/main/res/layout/activity_medicament_list.xml +++ b/app/src/main/res/layout/activity_medicament_list.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" - tools:context=".MainActivity"> + tools:context=".MedicamentListActivity"> - - - - + app:maxImageSize="60dp" + android:contentDescription="@string/add_button" /> diff --git a/app/src/main/res/layout/custom_button.xml b/app/src/main/res/layout/custom_button.xml index ab48eb9..d85c631 100644 --- a/app/src/main/res/layout/custom_button.xml +++ b/app/src/main/res/layout/custom_button.xml @@ -9,5 +9,6 @@ android:backgroundTint="@android:color/transparent" app:fabCustomSize="60dp" app:maxImageSize="60dp" - android:src="@drawable/ic_add_circle_black_24dp" /> + android:src="@drawable/ic_add_circle_black_24dp" + android:contentDescription="@string/add_button" /> diff --git a/app/src/main/res/layout/info_cell.xml b/app/src/main/res/layout/info_cell.xml index 39b3356..04a6a8c 100644 --- a/app/src/main/res/layout/info_cell.xml +++ b/app/src/main/res/layout/info_cell.xml @@ -11,14 +11,14 @@ android:paddingStart="10sp" android:paddingEnd="10sp" android:paddingTop="5dp" - android:text="Valeur" + android:text="@string/Value" android:textColor="#040404" android:textSize="16sp" android:textStyle="bold" /> + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> - + android:layout_gravity="center_horizontal" /> \ No newline at end of file diff --git a/app/src/main/res/layout/medicament_list_content.xml b/app/src/main/res/layout/medicament_list_content.xml index 600a17d..65366a0 100644 --- a/app/src/main/res/layout/medicament_list_content.xml +++ b/app/src/main/res/layout/medicament_list_content.xml @@ -15,7 +15,7 @@ android:layout_height="50sp" android:layout_marginStart="5dp" android:src="@drawable/ok_stock_vect" - android:contentDescription="Icone de stock" + android:contentDescription="@string/icone_de_stock" android:layout_centerVertical="true" android:layout_alignParentStart="true" /> @@ -23,14 +23,14 @@ android:id="@+id/valeur" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Nom Médicament" + android:text="@string/nom_m_dicament" android:textColor="#040404" android:typeface="sans" android:textSize="16sp" android:textStyle="bold" android:layout_alignTop="@+id/list_image" android:layout_toEndOf="@+id/list_image" - android:layout_marginLeft="5dp" /> + android:layout_marginStart="5dp" /> @@ -47,8 +47,8 @@ android:id="@+id/endOfStock" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:gravity="right" - android:text="lundi 1 janvier 2001" + android:gravity="end" + android:text="@string/Date" android:textSize="14sp" android:textColor="#212121" android:textStyle="bold" @@ -66,9 +66,9 @@ diff --git a/app/src/main/res/layout/value_input.xml b/app/src/main/res/layout/value_input.xml index 6ba924c..3f853eb 100644 --- a/app/src/main/res/layout/value_input.xml +++ b/app/src/main/res/layout/value_input.xml @@ -1,5 +1,6 @@ + android:hint="@string/zero" + android:textColorHint="@color/grey" + android:textAlignment="gravity" + android:importantForAutofill="no" + tools:ignore="LabelFor" /> \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index e279097..599f7f3 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -18,4 +18,5 @@ #000000 #31f623 + #777