Fix library update on textInputLayout

This commit is contained in:
Giuseppe Scorrano 2020-06-09 12:44:35 +02:00
parent 1485d73e51
commit f053c776a3
10 changed files with 38 additions and 13 deletions

View File

@ -88,13 +88,13 @@ dependencies {
}) })
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.orhanobut:logger:2.2.0' implementation 'com.orhanobut:logger:2.2.0'
implementation 'com.google.firebase:firebase-core:17.4.2' implementation 'com.google.firebase:firebase-core:17.4.3'
implementation 'com.google.firebase:firebase-crash:16.2.1' implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'com.google.firebase:firebase-perf:19.0.7' implementation 'com.google.firebase:firebase-perf:19.0.7'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0' implementation 'com.google.firebase:firebase-crashlytics:17.0.1'
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0' implementation 'com.google.android.material:material:1.3.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta6' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta6'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'androidx.recyclerview:recyclerview:1.1.0'

View File

@ -289,6 +289,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
private void setError(TextInputLayout textInputLayout, String message) { private void setError(TextInputLayout textInputLayout, String message) {
textInputLayout.setErrorEnabled(true); textInputLayout.setErrorEnabled(true);
textInputLayout.setError(message); textInputLayout.setError(message);
textInputLayout.setErrorIconDrawable(null);
} }
private void resetAllError() { private void resetAllError() {

View File

@ -135,6 +135,7 @@ public class DialogAskLivelloPosizione {
private void setLevelError(String message){ private void setLevelError(String message){
livelloTextInputLayout.setErrorEnabled(true); livelloTextInputLayout.setErrorEnabled(true);
livelloTextInputLayout.setError(message); livelloTextInputLayout.setError(message);
livelloTextInputLayout.setErrorIconDrawable(null);
} }
private void resetLevelError() { private void resetLevelError() {

View File

@ -113,6 +113,7 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
private void setClienteError(String message){ private void setClienteError(String message){
mBinding.inputCliente.setErrorEnabled(true); mBinding.inputCliente.setErrorEnabled(true);
mBinding.inputCliente.setError(message); mBinding.inputCliente.setError(message);
mBinding.inputCliente.setErrorIconDrawable(null);
} }
private void resetClienteError() { private void resetClienteError() {
mBinding.inputCliente.setError(null); mBinding.inputCliente.setError(null);

View File

@ -117,6 +117,7 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
private void setClienteError(String message){ private void setClienteError(String message){
mBinding.inputDestinatario.setErrorEnabled(true); mBinding.inputDestinatario.setErrorEnabled(true);
mBinding.inputDestinatario.setError(message); mBinding.inputDestinatario.setError(message);
mBinding.inputDestinatario.setErrorIconDrawable(null);
} }
private void resetClienteError() { private void resetClienteError() {
mBinding.inputDestinatario.setError(null); mBinding.inputDestinatario.setError(null);

View File

@ -237,6 +237,7 @@ public class DialogAskPositionOfLU {
private void setLevelError(String message){ private void setLevelError(String message){
livelloTextInputLayout.setErrorEnabled(true); livelloTextInputLayout.setErrorEnabled(true);
livelloTextInputLayout.setError(message); livelloTextInputLayout.setError(message);
livelloTextInputLayout.setErrorIconDrawable(null);
} }
private void resetLevelError() { private void resetLevelError() {

View File

@ -606,6 +606,7 @@ public class DialogInputQuantity {
textInputLayout.setError(" "); textInputLayout.setError(" ");
textInputLayout.getEditText().setTextColor(ContextCompat.getColor(currentContext, R.color.red_600)); textInputLayout.getEditText().setTextColor(ContextCompat.getColor(currentContext, R.color.red_600));
textInputLayout.setHintTextAppearance(R.style.ErrorFloatingLabel); textInputLayout.setHintTextAppearance(R.style.ErrorFloatingLabel);
textInputLayout.setErrorIconDrawable(null);
if (textInputLayout.getChildCount() == 2) { if (textInputLayout.getChildCount() == 2) {
textInputLayout.getChildAt(1).setVisibility(View.GONE); textInputLayout.getChildAt(1).setVisibility(View.GONE);

View File

@ -246,7 +246,8 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/guideline_partita_data" app:layout_constraintEnd_toStartOf="@id/guideline_partita_data"
android:nextFocusRight="@+id/input_data_scad"> android:nextFocusRight="@+id/input_data_scad"
style="@style/TextInputLayout.NoLine">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_width="match_parent"
@ -310,7 +311,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:enabled="@{!(quantityViewModel.blockedQtaTot.get() &amp;&amp; quantityViewModel.blockedQtaPerCnf.get())}"> android:enabled="@{!(quantityViewModel.blockedQtaTot.get() &amp;&amp; quantityViewModel.blockedQtaPerCnf.get())}"
style="@style/TextInputLayout.NoLine">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_width="match_parent"
@ -327,7 +329,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:id="@+id/input_qta_cnf" android:id="@+id/input_qta_cnf"
android:enabled="@{!(quantityViewModel.blockedQtaTot.get() &amp;&amp; quantityViewModel.blockedNumDiCnf.get())}"> android:enabled="@{!(quantityViewModel.blockedQtaTot.get() &amp;&amp; quantityViewModel.blockedNumDiCnf.get())}"
style="@style/TextInputLayout.NoLine">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_width="match_parent"
@ -343,7 +346,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:id="@+id/input_qta_tot" android:id="@+id/input_qta_tot"
android:enabled="@{!(quantityViewModel.blockedNumDiCnf.get() &amp;&amp; quantityViewModel.blockedQtaPerCnf.get())}"> android:enabled="@{!(quantityViewModel.blockedNumDiCnf.get() &amp;&amp; quantityViewModel.blockedQtaPerCnf.get())}"
style="@style/TextInputLayout.NoLine">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -113,19 +113,23 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/auto_complete_fornitori_layout" android:id="@+id/auto_complete_fornitori_layout"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
app:hintTextAppearance="@style/hint_text" app:hintTextAppearance="@style/hint_text"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/guide_line_fornitore"> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/guide_line_fornitore"
style="@style/TextInputLayout.NoLine">
<androidx.appcompat.widget.AppCompatAutoCompleteTextView <androidx.appcompat.widget.AppCompatAutoCompleteTextView
android:id="@+id/auto_complete_fornitori" android:id="@+id/auto_complete_fornitori"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:ems="10" android:ems="10"
android:singleLine="true"
android:completionThreshold="2" android:completionThreshold="2"
android:hint="@string/supplier"/> android:hint="@string/supplier"
android:paddingStart="12dp"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -136,7 +140,9 @@
app:hintTextAppearance="@style/hint_text" app:hintTextAppearance="@style/hint_text"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/guide_line_fornitore" app:layout_constraintStart_toEndOf="@id/guide_line_fornitore"
app:layout_constraintEnd_toEndOf="parent"> app:layout_constraintEnd_toEndOf="parent"
android:layout_marginStart="8dp"
style="@style/TextInputLayout.NoLine">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/input_cod_art_descr_forn" android:id="@+id/input_cod_art_descr_forn"
@ -144,6 +150,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textNoSuggestions" android:inputType="textNoSuggestions"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:singleLine="true"
android:hint="@string/cod_art_or_description"/> android:hint="@string/cod_art_or_description"/>
@ -185,7 +192,8 @@
app:hintTextAppearance="@style/hint_text" app:hintTextAppearance="@style/hint_text"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"> app:layout_constraintEnd_toEndOf="parent"
style="@style/TextInputLayout.NoLine">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/input_cod_art_descr_int" android:id="@+id/input_cod_art_descr_int"
@ -193,6 +201,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textNoSuggestions" android:inputType="textNoSuggestions"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:singleLine="true"
android:hint="@string/cod_art_or_description"/> android:hint="@string/cod_art_or_description"/>

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="TextInputLayout.NoLine" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
<item name="android:textColorHint">@color/colorPrimary</item>
<item name="boxStrokeColor">@android:color/transparent</item>
</style>
<style name="TextInputLayout.OutlinePrimary" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox"> <style name="TextInputLayout.OutlinePrimary" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat --> <item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
<item name="android:textColorHint">@color/colorPrimary</item> <item name="android:textColorHint">@color/colorPrimary</item>