Refactoring message dialog
This commit is contained in:
@@ -156,11 +156,11 @@ public class SplashActivity extends BaseActivity implements MainContext.Listener
|
||||
@Override
|
||||
public void onError(Spanned message) {
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeErrorDialog(
|
||||
DialogSimpleMessageView.makeErrorDialog(this,
|
||||
message, null, this::finish, R.string.logout, () -> {
|
||||
this.mainContext.logout(MainApplication::exit);
|
||||
})
|
||||
.show(this.getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import androidx.databinding.BindingAdapter;
|
||||
import androidx.databinding.BindingConversion;
|
||||
import androidx.databinding.Observable;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
@@ -48,8 +47,8 @@ import java.util.Locale;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.helper.ContextHelper;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
@@ -476,8 +475,8 @@ public class Converters {
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
||||
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate, DialogFragment parentFragment, boolean warningOnOldDates) {
|
||||
@BindingAdapter(value = {"binding", "warningOnOldDates"}, requireAll = false)
|
||||
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate, boolean warningOnOldDates) {
|
||||
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableDate) {
|
||||
if (pair != null) {
|
||||
@@ -512,15 +511,15 @@ public class Converters {
|
||||
var calendar = UtilityDate.getCalendarInstance();
|
||||
calendar.setTimeInMillis(timeInMillis);
|
||||
|
||||
if (parentFragment != null && warningOnOldDates && calendar.before(UtilityDate.getCalendarInstance())) {
|
||||
if (warningOnOldDates && calendar.before(UtilityDate.getCalendarInstance())) {
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||
.makeWarningDialog(view.getContext(), new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
observableDate.set(calendar.getTime());
|
||||
}, () -> {
|
||||
|
||||
})
|
||||
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
} else {
|
||||
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
observableDate.set(calendar.getTime());
|
||||
@@ -532,7 +531,7 @@ public class Converters {
|
||||
}
|
||||
});
|
||||
|
||||
datePicker.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
||||
datePicker.show(ContextHelper.getFragmentManagerFromContext(view.getContext()), "tag");
|
||||
};
|
||||
|
||||
//Adding click-listener
|
||||
@@ -547,8 +546,8 @@ public class Converters {
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
||||
public static void bindTextInputEditTextDate(TextInputEditText view, final MutableLiveData<Date> liveDataDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
||||
@BindingAdapter(value = {"binding", "warningOnOldDates"}, requireAll = false)
|
||||
public static void bindTextInputEditTextDate(TextInputEditText view, final MutableLiveData<Date> liveDataDate, boolean warningOnOldDates) {
|
||||
// Ottieni il LifecycleOwner dalla view
|
||||
LifecycleOwner lifecycleOwner = ViewTreeLifecycleOwner.get(view);
|
||||
if (lifecycleOwner == null) {
|
||||
@@ -592,14 +591,14 @@ public class Converters {
|
||||
calendar.setTimeInMillis(selection);
|
||||
Date selectedDate = calendar.getTime();
|
||||
|
||||
if (parentFragment != null && warningOnOldDates && calendar.before(UtilityDate.getCalendarInstance())) {
|
||||
if (warningOnOldDates && calendar.before(UtilityDate.getCalendarInstance())) {
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||
.makeWarningDialog(view.getContext(), new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||
liveDataDate.postValue(selectedDate);
|
||||
}, () -> {
|
||||
// Non fare nulla se l'utente annulla
|
||||
})
|
||||
.show(parentFragment.requireActivity().getSupportFragmentManager(), "DatePickerWarningDialog");
|
||||
.show();
|
||||
} else {
|
||||
liveDataDate.postValue(selectedDate);
|
||||
}
|
||||
@@ -612,7 +611,7 @@ public class Converters {
|
||||
});
|
||||
|
||||
|
||||
datePicker.show(parentFragment.requireActivity().getSupportFragmentManager(), "MaterialDatePicker");
|
||||
datePicker.show(ContextHelper.getFragmentManagerFromContext(view.getContext()), "MaterialDatePicker");
|
||||
};
|
||||
|
||||
view.setOnClickListener(onClick::run);
|
||||
@@ -664,8 +663,8 @@ public class Converters {
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
||||
public static void bindEditTextDate(EditText view, final ObservableField<LocalDate> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
||||
@BindingAdapter(value = {"binding", "warningOnOldDates"}, requireAll = false)
|
||||
public static void bindEditTextDate(EditText view, final ObservableField<LocalDate> observableDate, boolean warningOnOldDates) {
|
||||
Pair<ObservableField<LocalDate>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableDate) {
|
||||
if (pair != null) {
|
||||
@@ -696,15 +695,15 @@ public class Converters {
|
||||
var nowTime = UtilityDate.millisTimeToLocalDate(selectedTimeInMillis, null);
|
||||
|
||||
|
||||
if (parentFragment != null && warningOnOldDates && nowTime.isBefore(UtilityDate.getNow())) {
|
||||
if (warningOnOldDates && nowTime.isBefore(UtilityDate.getNow())) {
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||
.makeWarningDialog(view.getContext(), new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
observableDate.set(nowTime);
|
||||
}, () -> {
|
||||
|
||||
})
|
||||
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
} else {
|
||||
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
observableDate.set(nowTime);
|
||||
@@ -716,7 +715,7 @@ public class Converters {
|
||||
}
|
||||
});
|
||||
|
||||
datePicker.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
||||
datePicker.show(ContextHelper.getFragmentManagerFromContext(view.getContext()), "tag");
|
||||
};
|
||||
|
||||
//Adding click-listener
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
package it.integry.integrywmsnative.core.utility;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.Html;
|
||||
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidConnectionException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUGestioneException;
|
||||
import it.integry.integrywmsnative.core.helper.ContextHelper;
|
||||
import it.integry.integrywmsnative.core.rest.CommonRESTException;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class UtilityExceptions {
|
||||
|
||||
private static Handler handler = new Handler(Looper.getMainLooper());
|
||||
|
||||
private static final Class<?>[] FIREBASE_IGNORED_EXCEPTIONS = new Class[]{
|
||||
InvalidConnectionException.class,
|
||||
InvalidLUGestioneException.class,
|
||||
@@ -46,19 +48,24 @@ public class UtilityExceptions {
|
||||
if (ex.getCause() != null) errorMessage += "<br />" + ex.getCause().getMessage();
|
||||
}
|
||||
|
||||
FragmentManager fm = ContextHelper.getFragmentManagerFromContext(context);
|
||||
|
||||
if (fm != null) {
|
||||
// FragmentManager fm = ContextHelper.getFragmentManagerFromContext(context);
|
||||
|
||||
// if (fm != null) {
|
||||
boolean isBarcodeEnabled = BarcodeManager.isLastCallbackEnabled();
|
||||
if (isBarcodeEnabled) BarcodeManager.disableLastCallback();
|
||||
DialogSimpleMessageView.makeErrorDialog(Html.fromHtml(errorMessage), null, () -> {
|
||||
|
||||
String finalErrorMessage = errorMessage;
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeErrorDialog(context, Html.fromHtml(finalErrorMessage), null, () -> {
|
||||
if (isBarcodeEnabled) BarcodeManager.enableLastCallback();
|
||||
})
|
||||
.show(fm, "tag");
|
||||
}
|
||||
.show();
|
||||
});
|
||||
// }
|
||||
|
||||
boolean toIgnore = ex.getClass().getName().startsWith("it.integry.integrywmsnative") ||
|
||||
Stream.of(FIREBASE_IGNORED_EXCEPTIONS).anyMatch(x -> x.isAssignableFrom(ex.getClass()));
|
||||
Arrays.stream(FIREBASE_IGNORED_EXCEPTIONS).anyMatch(x -> x.isAssignableFrom(ex.getClass()));
|
||||
|
||||
if (!BuildConfig.DEBUG && !toIgnore) {
|
||||
if (sendEmail) UtilityLogger.error(ex);
|
||||
|
||||
@@ -478,13 +478,13 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
|
||||
@Override
|
||||
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||
runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||
DialogSimpleMessageView.makeWarningDialog(this, new SpannableString(text),
|
||||
null,
|
||||
() -> onComplete.run(true),
|
||||
() -> onComplete.run(false)
|
||||
).show(getSupportFragmentManager(), "tag");
|
||||
).show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -522,11 +522,13 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
|
||||
@Override
|
||||
public void onLUSuccessullyPrinted() {
|
||||
handler.post(() -> {
|
||||
Resources res = getResources();
|
||||
String errorMessage = res.getText(R.string.alert_print_completed_message).toString();
|
||||
DialogSimpleMessageView
|
||||
.makeSuccessDialog(res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.makeSuccessDialog(this, res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -538,13 +540,15 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
@Override
|
||||
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView.makeErrorDialog(
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeErrorDialog(this,
|
||||
new SpannableString(ex.getMessage()),
|
||||
null,
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
onComplete)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -704,12 +708,14 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
|
||||
@Override
|
||||
public void onConfirmAnomalie(int anomalie, RunnableArgs<Boolean> onConfirm) {
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(String.format(getString(R.string.confirm_anomalie), anomalie))),
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(this, new SpannableString(Html.fromHtml(String.format(getString(R.string.confirm_anomalie), anomalie))),
|
||||
null, () -> {
|
||||
onConfirm.run(true);
|
||||
}, () -> {
|
||||
onConfirm.run(false);
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -275,7 +275,9 @@ public class MainAccettazioneOrdiniElencoFragment extends BaseFragment implement
|
||||
|
||||
@Override
|
||||
public void onOrdersDispatched(List<OrdineAccettazioneInevasoDTO> orders, List<SitArtOrdDTO> sitArts) {
|
||||
long artsCounter = Stream.of(sitArts)
|
||||
handler.post(() -> {
|
||||
|
||||
long artsCounter = sitArts.stream()
|
||||
.filter(x -> UtilityBigDecimal.greaterThan(x.getQtaDaEvadere(), BigDecimal.ZERO))
|
||||
.map(SitArtOrdDTO::getCodMart)
|
||||
.distinct()
|
||||
@@ -286,7 +288,7 @@ public class MainAccettazioneOrdiniElencoFragment extends BaseFragment implement
|
||||
.count();
|
||||
|
||||
|
||||
DialogSimpleMessageView.makeInfoDialog(getText(R.string.orders).toString(),
|
||||
DialogSimpleMessageView.makeInfoDialog(requireContext(), getText(R.string.orders).toString(),
|
||||
Html.fromHtml(String.format(getActivity().getResources().getQuantityString(R.plurals.loaded_orders_message, (int) ordsCounter), ordsCounter)
|
||||
+ "<br /><br />" +
|
||||
"<b>" + artsCounter + "</b> " + getActivity().getResources().getQuantityString(R.plurals.ordered_articles, (int) artsCounter)),
|
||||
@@ -301,6 +303,7 @@ public class MainAccettazioneOrdiniElencoFragment extends BaseFragment implement
|
||||
myIntent.putExtra("keySitArts", cacheSitArtItemID);
|
||||
getActivity().startActivity(myIntent);
|
||||
|
||||
}).show(getActivity().getSupportFragmentManager(), "tag");
|
||||
}).show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -719,7 +719,12 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
public void onLUSuccessullyPrinted() {
|
||||
Resources res = getResources();
|
||||
String errorMessage = res.getText(R.string.alert_print_completed_message).toString();
|
||||
DialogSimpleMessageView.makeSuccessDialog(res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null).show(getSupportFragmentManager(), "tag");
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeSuccessDialog(this,
|
||||
res.getText(R.string.completed).toString(),
|
||||
new SpannableString(errorMessage), null, null)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -730,7 +735,9 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
@Override
|
||||
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView.makeErrorDialog(new SpannableString(ex.getMessage()), null, null, R.string.button_ignore_print, onComplete).show(getSupportFragmentManager(), "tag");
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeErrorDialog(this, new SpannableString(ex.getMessage()), null, null, R.string.button_ignore_print, onComplete).show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -785,11 +792,11 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
@Override
|
||||
public void onWarning(String warningText, Runnable action) {
|
||||
this.runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString(Html.fromHtml(warningText)), null, action)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.makeWarningDialog(this, new SpannableString(Html.fromHtml(warningText)), null, action)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -850,9 +857,14 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
@Override
|
||||
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||
runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text), null, () -> onComplete.run(true), () -> onComplete.run(false)).show(getSupportFragmentManager(), "tag");
|
||||
DialogSimpleMessageView.makeWarningDialog(this,
|
||||
new SpannableString(text),
|
||||
null,
|
||||
() -> onComplete.run(true),
|
||||
() -> onComplete.run(false))
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -125,11 +125,12 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
||||
|
||||
@Override
|
||||
public void onWarning(String warningText, Runnable action) {
|
||||
this.requireActivity().runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString(Html.fromHtml(warningText)), null, action)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
.makeWarningDialog(requireContext(),
|
||||
new SpannableString(Html.fromHtml(warningText)), null, action)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
|
||||
@Override
|
||||
public void onDocExported() {
|
||||
runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
DialogCommon.showDataSaved(this, this::closeEdit);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -176,12 +176,14 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
this.mPrinterRESTConsumer.printCollo(mtbColt.get(),
|
||||
() -> {
|
||||
this.onLoadingEnded();
|
||||
|
||||
handler.post(() -> {
|
||||
Resources res = this.getResources();
|
||||
String errorMessage = res.getText(R.string.alert_print_completed_message).toString();
|
||||
DialogSimpleMessageView
|
||||
.makeSuccessDialog(res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.makeSuccessDialog(this,
|
||||
res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||
.show();
|
||||
});
|
||||
}, this::onError);
|
||||
|
||||
} catch (Exception ex) {
|
||||
@@ -192,7 +194,9 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
public void deleteUL() {
|
||||
String text = getResources().getString(R.string.alert_delete_UL);
|
||||
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(text)), null, () -> this.runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(this,
|
||||
new SpannableString(Html.fromHtml(text)), null, () -> this.runOnUiThread(() -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
try {
|
||||
@@ -214,7 +218,8 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
this.onError(ex);
|
||||
}
|
||||
}), () -> {
|
||||
}).show(this.getSupportFragmentManager(), "tag");
|
||||
}).show();
|
||||
});
|
||||
}
|
||||
|
||||
public void showFabMenu() {
|
||||
|
||||
@@ -6,8 +6,6 @@ import android.text.Html;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.firebase.installations.FirebaseInstallations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@@ -108,12 +106,12 @@ public class LoginActivity extends BaseActivity implements LoginViewModel.Listen
|
||||
public void onLoginCompleted(String fullName) {
|
||||
|
||||
this.onLoadingEnded();
|
||||
runOnUiThread(() -> DialogSimpleMessageView.makeSuccessDialog(
|
||||
handler.post(() -> DialogSimpleMessageView.makeSuccessDialog(this,
|
||||
"Benvenuto",
|
||||
Html.fromHtml("Ciao <b>" + fullName + "</b>, la Integry le augura di svolgere al meglio il suo lavoro"),
|
||||
null,
|
||||
this::startSplashActivity)
|
||||
.show(getSupportFragmentManager(), "tag"));
|
||||
.show());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -832,16 +832,18 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
|
||||
@Override
|
||||
public void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<AlreadyRegisteredUlDTO> alreadyRegisteredMtbColts) {
|
||||
List<String> codMarts = Stream.of(sitArts)
|
||||
.distinctBy(SitArtOrdDTO::getCodMart)
|
||||
handler.post(() -> {
|
||||
|
||||
List<String> codMarts = sitArts.stream()
|
||||
.map(SitArtOrdDTO::getCodMart)
|
||||
.distinct()
|
||||
.toList();
|
||||
|
||||
int alreadyRegisteredUL = alreadyRegisteredMtbColts.size();
|
||||
|
||||
boolean divideByGrpMerc = SettingsManager.iDB().isGroupShippingByCommodityGroup();
|
||||
|
||||
DialogSimpleMessageView.makeInfoDialog(getText(R.string.orders).toString(),
|
||||
DialogSimpleMessageView.makeInfoDialog(requireContext(), getText(R.string.orders).toString(),
|
||||
Html.fromHtml(String.format(getActivity().getResources().getQuantityString(R.plurals.loaded_orders_message, orders.size()), orders.size())
|
||||
+ "<br />" +
|
||||
"<b>" + codMarts.size() + "</b> " + getActivity().getResources().getQuantityString(R.plurals.ordered_articles, codMarts.size())
|
||||
@@ -856,7 +858,8 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
MtbColr.Causale.DEFAULT,
|
||||
mDialogRowInfo,
|
||||
divideByGrpMerc)
|
||||
).show(getActivity().getSupportFragmentManager(), "tag");
|
||||
).show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -299,12 +299,15 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
|
||||
@Override
|
||||
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||
handler.post(() -> {
|
||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||
DialogSimpleMessageView.makeWarningDialog(requireContext(),
|
||||
new SpannableString(text),
|
||||
null,
|
||||
() -> onComplete.run(true),
|
||||
() -> onComplete.run(false)
|
||||
).show(requireActivity().getSupportFragmentManager(), DialogSimpleMessageView.class.getName());
|
||||
).show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -498,11 +498,11 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||
handler.post(() -> {
|
||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||
DialogSimpleMessageView.makeWarningDialog(this, new SpannableString(text),
|
||||
null,
|
||||
() -> onComplete.run(true),
|
||||
() -> onComplete.run(false)
|
||||
).show(getSupportFragmentManager(), "delete-row-dialog");
|
||||
).show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -535,8 +535,10 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
Resources res = getResources();
|
||||
String errorMessage = res.getText(R.string.alert_print_completed_message).toString();
|
||||
DialogSimpleMessageView
|
||||
.makeSuccessDialog(res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||
.show(getSupportFragmentManager(), "dialog-print-completed");
|
||||
.makeSuccessDialog(this,
|
||||
res.getText(R.string.completed).toString(),
|
||||
new SpannableString(errorMessage), null, null)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -566,12 +568,15 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
@Override
|
||||
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView.makeErrorDialog(new SpannableString(ex.getMessage()),
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeErrorDialog(this,
|
||||
new SpannableString(ex.getMessage()),
|
||||
null,
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
onComplete != null ? onComplete : () -> {
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,6 +348,8 @@ public class ProdOrdineProduzioneElencoFragment extends BaseFragment implements
|
||||
|
||||
@Override
|
||||
public void onOrdersDispatched(List<OrdineAccettazioneInevasoDTO> orders, List<SitArtOrdDTO> sitArts) {
|
||||
handler.post(() -> {
|
||||
|
||||
long artsCounter = Stream.of(sitArts)
|
||||
.filter(x -> UtilityBigDecimal.greaterThan(x.getQtaDaEvadere(), BigDecimal.ZERO))
|
||||
.map(SitArtOrdDTO::getCodMart)
|
||||
@@ -359,7 +361,7 @@ public class ProdOrdineProduzioneElencoFragment extends BaseFragment implements
|
||||
.count();
|
||||
|
||||
|
||||
DialogSimpleMessageView.makeInfoDialog(getText(R.string.orders).toString(),
|
||||
DialogSimpleMessageView.makeInfoDialog(requireContext(), getText(R.string.orders).toString(),
|
||||
Html.fromHtml(String.format(getActivity().getResources().getQuantityString(R.plurals.loaded_orders_message, (int) ordsCounter), ordsCounter)
|
||||
+ "<br /><br />" +
|
||||
"<b>" + artsCounter + "</b> " + getActivity().getResources().getQuantityString(R.plurals.ordered_articles, (int) artsCounter)),
|
||||
@@ -374,7 +376,8 @@ public class ProdOrdineProduzioneElencoFragment extends BaseFragment implements
|
||||
myIntent.putExtra("keySitArts", cacheSitArtItemID);
|
||||
getActivity().startActivity(myIntent);
|
||||
|
||||
}).show(getActivity().getSupportFragmentManager(), "tag");
|
||||
}).show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -157,8 +157,8 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
|
||||
@Override
|
||||
public void confirmInconsistentDeposit(Runnable onConfirm) {
|
||||
this.runOnUiThread(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(this,
|
||||
Html.fromHtml("L'articolo che si vuole versare non è compatibile con nessun ordine presente sulla linea!"
|
||||
+ "<br /> <br/>" +
|
||||
"Vuoi versarlo comunque?"),
|
||||
@@ -168,7 +168,7 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
onLoadingEnded();
|
||||
BarcodeManager.enable(mBarcodeScannerInstanceID);
|
||||
}
|
||||
).show(getSupportFragmentManager(), "confirmOrderClose");
|
||||
).show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -295,8 +295,11 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
public void successDialog(String message, Runnable onComplete) {
|
||||
BarcodeManager.disable(mBarcodeScannerInstanceID);
|
||||
|
||||
this.runOnUiThread(() -> DialogSimpleMessageView.makeSuccessDialog(getResources().getString(R.string.success),
|
||||
new SpannableString(message), null, onComplete).show(getSupportFragmentManager(), "successDialog"));
|
||||
handler.post(() -> DialogSimpleMessageView.makeSuccessDialog(
|
||||
this,
|
||||
getResources().getString(R.string.success),
|
||||
new SpannableString(message), null, onComplete)
|
||||
.show());
|
||||
|
||||
}
|
||||
|
||||
@@ -318,15 +321,14 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
@Override
|
||||
public void confirmOrderClose(Runnable onConfirm) {
|
||||
this.onLoadingEnded();
|
||||
this.runOnUiThread(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(this,
|
||||
Html.fromHtml("Per completare l'operazione è necessario chiudere gli ordini attualmente aperti sulla linea."
|
||||
+ "<br /> <br/>" +
|
||||
"Continuare?"),
|
||||
null,
|
||||
() -> {
|
||||
DialogSimpleMessageView.makeInfoDialog(
|
||||
this,
|
||||
DialogSimpleMessageView.makeInfoDialog(this,
|
||||
null,
|
||||
Html.fromHtml("Vuoi recuperare del materiale prima di chiudere gli ordini?"),
|
||||
null,
|
||||
@@ -335,10 +337,10 @@ public class ProdDettaglioLineaActivity extends BaseActivity implements ProdDett
|
||||
this.requestMaterialRecover();
|
||||
},
|
||||
onConfirm
|
||||
).show(getSupportFragmentManager(), "confirmOrderClose");
|
||||
).show();
|
||||
},
|
||||
() -> BarcodeManager.enable(mBarcodeScannerInstanceID)
|
||||
).show(getSupportFragmentManager(), "confirmOrderClose");
|
||||
).show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -132,8 +132,11 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
||||
@Override
|
||||
public void successDialog(String message, Runnable onComplete) {
|
||||
BarcodeManager.disable(mBarcodeScannerInstanceID);
|
||||
requireActivity().runOnUiThread(() -> DialogSimpleMessageView.makeSuccessDialog(getResources().getString(R.string.success),
|
||||
new SpannableString(message), null, onComplete).show(getChildFragmentManager(), "successDialog"));
|
||||
handler.post(() -> DialogSimpleMessageView.makeSuccessDialog(
|
||||
requireContext(),
|
||||
getResources().getString(R.string.success),
|
||||
new SpannableString(message), null, onComplete)
|
||||
.show());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -565,28 +565,32 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
@Override
|
||||
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView.makeErrorDialog(
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeErrorDialog(requireContext(),
|
||||
new SpannableString(ex.getMessage()),
|
||||
null,
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
onComplete)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNoLUFound(Runnable onComplete) {
|
||||
handler.post(() -> {
|
||||
String errorMessage = "Nessuna stampante configurata";
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString(errorMessage), null, onComplete)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
.makeWarningDialog(requireContext(), new SpannableString(errorMessage), null, onComplete)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDataSaved() {
|
||||
this.onLoadingEnded();
|
||||
this.requireActivity().runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
DialogCommon.showDataSaved(requireActivity(), this::popMe);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -201,13 +201,15 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
|
||||
@Override
|
||||
public void onMtbColrDelete(MtbColr mtbColr) {
|
||||
handler.post(() -> {
|
||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||
DialogSimpleMessageView.makeWarningDialog(requireContext(), new SpannableString(text),
|
||||
null,
|
||||
() -> mProdRientroMerceOrderDetailFragment.deleteMtbColr(mtbColr),
|
||||
() -> {
|
||||
}
|
||||
).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
).show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -430,15 +430,17 @@ public class ProdVersamentoMaterialeFragment extends BaseFragment implements Pro
|
||||
handler.post(() -> {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString(Html.fromHtml(warningText)), null, action)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
.makeWarningDialog(
|
||||
requireContext(),
|
||||
new SpannableString(Html.fromHtml(warningText)), null, action)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataSaved() {
|
||||
this.onLoadingEnded();
|
||||
this.requireActivity().runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
DialogCommon.showDataSaved(requireActivity(), this::popMe);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -80,10 +80,13 @@ public class ProdVersamentoMaterialeInBufferFragment extends BaseFragment implem
|
||||
mtbColt.getSegno() == 1) {
|
||||
|
||||
if (mtbColt.getMtbColr() == null || mtbColt.getMtbColr().isEmpty()) {
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(
|
||||
requireContext(),
|
||||
new SpannableString(Html.fromHtml("E' stata scansionata una UL già vuota")),
|
||||
null, this::openLU)
|
||||
.show((requireActivity()).getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
|
||||
} else {
|
||||
mViewModel.setMtbColt(mtbColt);
|
||||
|
||||
@@ -175,13 +175,16 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
||||
}
|
||||
|
||||
private void deleteArticolo(ArticoloOrdine articoloOrdine) {
|
||||
handler.post(() -> {
|
||||
String text = "Stai per eliminare l'articolo <b> " + articoloOrdine.getDescrizione() + "</b> dall'ordine, <br> sei sicuro?";
|
||||
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(text)), null, () -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(this,
|
||||
new SpannableString(Html.fromHtml(text)), null, () -> {
|
||||
this.mViewModel.deleteArticolo(articoloOrdine);
|
||||
}, () -> {
|
||||
|
||||
}).show(getSupportFragmentManager(), "tag");
|
||||
}).show();
|
||||
});
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
@@ -201,20 +204,26 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
||||
|
||||
@Override
|
||||
public void confirmExceedingQtyOrder(Runnable onSuccess) {
|
||||
DialogSimpleMessageView.makeInfoDialog(getText(R.string.warning).toString(),
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeInfoDialog(this, getText(R.string.warning).toString(),
|
||||
Html.fromHtml(getResources().getString(R.string.confirm_orderable_qty_exceeded)),
|
||||
null,
|
||||
onSuccess, this::onLoadingEnded).show(getSupportFragmentManager(), "confirmExceedingQtyOrder");
|
||||
onSuccess, this::onLoadingEnded).show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void confirmCheckForUnlistedProduct(String barcode, Runnable onComplete) {
|
||||
DialogSimpleMessageView.makeInfoDialog(getText(R.string.info).toString(),
|
||||
handler.post(() -> {
|
||||
|
||||
|
||||
DialogSimpleMessageView.makeInfoDialog(this, getText(R.string.info).toString(),
|
||||
Html.fromHtml(getResources().getString(R.string.confirm_order_unlisted_item)),
|
||||
null,
|
||||
() -> {
|
||||
this.mViewModel.loadArticolo(barcode, onComplete);
|
||||
}, this::onLoadingEnded).show(getSupportFragmentManager(), "confirmExceedingQtyOrder");
|
||||
}, this::onLoadingEnded).show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -253,11 +262,13 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
||||
|
||||
@Override
|
||||
public void confirmExportInvalidProducts(Runnable onConfirm) {
|
||||
DialogSimpleMessageView.makeInfoDialog(getText(R.string.warning).toString(),
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeInfoDialog(this, getText(R.string.warning).toString(),
|
||||
Html.fromHtml(getResources().getString(R.string.confirm_export_invalid_product)),
|
||||
null,
|
||||
onConfirm,
|
||||
this::onLoadingEnded).show(getSupportFragmentManager(), "confirmExportInvalidProducts");
|
||||
this::onLoadingEnded).show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -189,12 +189,15 @@ public class DialogEditArticoloView extends BaseDialogFragment implements Dialog
|
||||
|
||||
public void saveAndExit() {
|
||||
if (!UtilityBigDecimal.isNullOrZero(this.getArticolo().getCtMaxOrd()) && UtilityBigDecimal.greaterThan(this.mViewModel.getNumCnf(), this.getArticolo().getCtMaxOrd())) {
|
||||
DialogSimpleMessageView.makeInfoDialog(getText(R.string.warning).toString(),
|
||||
handler.post(() -> {
|
||||
|
||||
DialogSimpleMessageView.makeInfoDialog(requireContext(), getText(R.string.warning).toString(),
|
||||
Html.fromHtml(getActivity().getResources().getString(R.string.confirm_orderable_qty_exceeded)),
|
||||
null,
|
||||
this::save, () -> {
|
||||
this.mBindings.inputNumCnfText.requestFocus();
|
||||
}).show(getActivity().getSupportFragmentManager(), "confirmExceedingQtyOrder");
|
||||
}).show();
|
||||
});
|
||||
} else {
|
||||
save();
|
||||
}
|
||||
|
||||
@@ -129,19 +129,21 @@ public class PVOrdiniAcquistoGrigliaFragment extends BaseFragment implements ITi
|
||||
Map<String, Long> downloadedGrids = Stream.of(mListArticoli).collect(Collectors.groupingBy(ArticoloOrdinabileDTO::getCodAlis, Collectors.counting()));
|
||||
if (downloadedGrids != null && !downloadedGrids.isEmpty()) {
|
||||
|
||||
handler.post(() -> {
|
||||
List<String> gridsDetails = Stream.of(downloadedGrids)
|
||||
.map((el) -> "<b>" + el.getKey() + ":</b> " + el.getValue() + " " + getResources().getQuantityString(R.plurals.available_articles, el.getValue().intValue()))
|
||||
.toList();
|
||||
|
||||
|
||||
DialogSimpleMessageView.makeInfoDialog(getText(R.string.grid_details).toString(),
|
||||
DialogSimpleMessageView.makeInfoDialog(requireContext(), getText(R.string.grid_details).toString(),
|
||||
Html.fromHtml(
|
||||
String.format(getResources().getQuantityString(R.plurals.loaded_grids_message, (int) downloadedGrids.size()), downloadedGrids.size())
|
||||
+ "<br /><br />" +
|
||||
StringUtils.join(gridsDetails, "<br/>")),
|
||||
null,
|
||||
this::fetchOrders)
|
||||
.show(requireActivity().getSupportFragmentManager(), "downloadedGridDetails");
|
||||
.show();
|
||||
});
|
||||
} else {
|
||||
fetchOrders();
|
||||
}
|
||||
@@ -229,9 +231,11 @@ public class PVOrdiniAcquistoGrigliaFragment extends BaseFragment implements ITi
|
||||
}
|
||||
|
||||
private void deleteOrdine(Ordine ordine) {
|
||||
handler.post(() -> {
|
||||
String text = "Stai per eliminare un ordine sei sicuro?";
|
||||
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(text)), null, () -> requireActivity().runOnUiThread(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(requireContext(),
|
||||
new SpannableString(Html.fromHtml(text)), null, () -> requireActivity().runOnUiThread(() -> {
|
||||
this.onLoadingStarted();
|
||||
mPvOrdiniAcquistoGrigliaViewModel.deleteOrder(ordine, () -> {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
@@ -241,7 +245,8 @@ public class PVOrdiniAcquistoGrigliaFragment extends BaseFragment implements ITi
|
||||
});
|
||||
}, this::onError);
|
||||
}), () -> {
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}).show();
|
||||
});
|
||||
}
|
||||
|
||||
private void refreshRenderedOrdini(List<OrdineWrapper> ordini) {
|
||||
|
||||
@@ -373,13 +373,16 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
@Override
|
||||
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||
handler.post(() -> {
|
||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||
DialogSimpleMessageView.makeWarningDialog(requireContext(),
|
||||
new SpannableString(text),
|
||||
null,
|
||||
() -> onComplete.run(true),
|
||||
() -> onComplete.run(false)
|
||||
)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -459,12 +462,15 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
private void checkIfItemIsActive(String flagStato, String codMart, Runnable onContinue, Runnable onNegativeClick) {
|
||||
if (flagStato.equalsIgnoreCase("I")) {
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(
|
||||
requireContext(),
|
||||
new SpannableString(Html.fromHtml(String.format(UtilityResources.getString(R.string.item_not_enabled), codMart))),
|
||||
null,
|
||||
onContinue,
|
||||
onNegativeClick)
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
} else {
|
||||
onContinue.run();
|
||||
}
|
||||
@@ -512,19 +518,24 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
@Override
|
||||
public void onLUSuccessullyPrinted() {
|
||||
handler.post(() -> {
|
||||
Resources res = getResources();
|
||||
String errorMessage = res.getText(R.string.alert_print_completed_message).toString();
|
||||
DialogSimpleMessageView
|
||||
.makeSuccessDialog(res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
.makeSuccessDialog(requireContext(),
|
||||
res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onLUPrintRequest() {
|
||||
AtomicReference<Boolean> resultPrintPackingList = new AtomicReference<>();
|
||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
handler.post(() -> {
|
||||
|
||||
DialogSimpleMessageView.makeInfoDialog(
|
||||
DialogSimpleMessageView.makeInfoDialog(requireContext(),
|
||||
getActivity().getResources().getString(R.string.action_print_ul),
|
||||
new SpannableString(getActivity().getResources().getString(R.string.ask_print_message)),
|
||||
null,
|
||||
@@ -536,8 +547,9 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
resultPrintPackingList.set(false);
|
||||
countDownLatch.countDown();
|
||||
})
|
||||
.show(getActivity().getSupportFragmentManager(), "dialog-print");
|
||||
.show();
|
||||
|
||||
});
|
||||
|
||||
try {
|
||||
countDownLatch.await();
|
||||
@@ -551,17 +563,20 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
@Override
|
||||
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||
DialogSimpleMessageView.makeErrorDialog(
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeErrorDialog(requireContext(),
|
||||
new SpannableString(ex.getMessage()),
|
||||
null,
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
onComplete)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete) {
|
||||
handler.post(() -> {
|
||||
DialogYesNoView.newInstance(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
switch (result) {
|
||||
case YES:
|
||||
@@ -584,6 +599,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
break;
|
||||
}
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -912,8 +912,9 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
Resources res = getResources();
|
||||
String errorMessage = res.getText(R.string.alert_print_completed_message).toString();
|
||||
DialogSimpleMessageView
|
||||
.makeSuccessDialog(res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.makeSuccessDialog(this,
|
||||
res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -945,13 +946,15 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
@Override
|
||||
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView.makeErrorDialog(
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeErrorDialog(this,
|
||||
new SpannableString(ex.getMessage()),
|
||||
null,
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
onComplete)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -972,12 +975,13 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||
handler.post(() -> {
|
||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||
DialogSimpleMessageView.makeWarningDialog(this,
|
||||
new SpannableString(text),
|
||||
null,
|
||||
() -> onComplete.run(true),
|
||||
() -> onComplete.run(false)
|
||||
)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1103,7 +1107,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeInfoDialog(
|
||||
DialogSimpleMessageView.makeInfoDialog(this,
|
||||
getResources().getString(R.string.action_close_order),
|
||||
new SpannableString(getResources().getString(R.string.message_print_packing_list_on_close_order)),
|
||||
null,
|
||||
@@ -1116,7 +1120,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
countDownLatch.countDown();
|
||||
}
|
||||
)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
|
||||
|
||||
@@ -1294,10 +1298,13 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
dialogInputQuantityToDuplicate(inputNumber -> {
|
||||
if (qtaTot != null && qtaEvasa != null && UtilityBigDecimal.equalsOrGreaterThan(qtaEvasa.multiply(BigDecimal.valueOf(inputNumber)), qtaTot)) {
|
||||
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(textWarning)),
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(this,
|
||||
new SpannableString(Html.fromHtml(textWarning)),
|
||||
null,
|
||||
() -> this.onInputDuplicate(qtaTot, qtaEvasa, onComplete, onNegativeClick)
|
||||
).show(getSupportFragmentManager(), "tag");
|
||||
).show();
|
||||
});
|
||||
} else {
|
||||
onComplete.run(inputNumber);
|
||||
}
|
||||
|
||||
@@ -118,10 +118,13 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
} else if (mtbColt.getGestioneEnum() == GestioneEnum.VENDITA) {
|
||||
this.mViewModel.getCurrentMtbColt().postValue(mtbColt);
|
||||
} else {
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString(Html.fromHtml("Sono accettate solamente UL di <b>Acquisto</b> o <b>Lavorazione</b> di <b>CARICO</b>")),
|
||||
.makeWarningDialog(requireContext(),
|
||||
new SpannableString(Html.fromHtml("Sono accettate solamente UL di <b>Acquisto</b> o <b>Lavorazione</b> di <b>CARICO</b>")),
|
||||
null, this::openLU)
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
@@ -167,11 +170,13 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
@Override
|
||||
public void onSpostamentoTraDepConfirmRequired(String sourceCodMdep, String destinationCodMdep, RunnableArgs<Boolean> onComplete) {
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(Html.fromHtml("Stai spostando una UL dal deposito <b>" + sourceCodMdep + "</b> al deposito <b>" + destinationCodMdep + "</b>"),
|
||||
DialogSimpleMessageView.makeWarningDialog(
|
||||
requireContext(),
|
||||
Html.fromHtml("Stai spostando una UL dal deposito <b>" + sourceCodMdep + "</b> al deposito <b>" + destinationCodMdep + "</b>"),
|
||||
null,
|
||||
() -> onComplete.run(true),
|
||||
() -> onComplete.run(false))
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -247,7 +252,7 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
|
||||
@Override
|
||||
public void onDataSaved() {
|
||||
this.requireActivity().runOnUiThread(() -> {
|
||||
handler.post(() -> {
|
||||
DialogCommon.showDataSaved(requireActivity(), this::popMe);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package it.integry.integrywmsnative.view.dialogs;
|
||||
import android.content.Context;
|
||||
import android.text.SpannableString;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -17,33 +16,33 @@ public class DialogCommon {
|
||||
|
||||
public static void showNoArtFoundDialog(@NotNull Context context, @Nullable Runnable onPositiveClick) {
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString(context.getResources().getText(R.string.no_result_from_barcode)),
|
||||
.makeWarningDialog(context, new SpannableString(context.getResources().getText(R.string.no_result_from_barcode)),
|
||||
null, onPositiveClick)
|
||||
.show(((AppCompatActivity) context).getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
}
|
||||
|
||||
public static void showNoULFound(@NotNull Context context, @Nullable Runnable onPositiveClick) {
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(context.getResources().getText(R.string.no_lu_found_message)),
|
||||
DialogSimpleMessageView.makeWarningDialog(context, new SpannableString(context.getResources().getText(R.string.no_lu_found_message)),
|
||||
null, onPositiveClick)
|
||||
.show(((AppCompatActivity) context).getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
}
|
||||
|
||||
|
||||
public static void showNoOrderFound(@NotNull Context context, @Nullable Runnable onPositiveClick) {
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(context.getResources().getText(R.string.no_orders_found_message)),
|
||||
DialogSimpleMessageView.makeWarningDialog(context, new SpannableString(context.getResources().getText(R.string.no_orders_found_message)),
|
||||
null, onPositiveClick)
|
||||
.show(((AppCompatActivity) context).getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
public static void showDataSaved(@NotNull FragmentActivity context, @Nullable Runnable onPositiveClick) {
|
||||
context.runOnUiThread(() -> {
|
||||
DialogSimpleMessageView.makeSuccessDialog(
|
||||
DialogSimpleMessageView.makeSuccessDialog(context,
|
||||
context.getResources().getString(R.string.completed),
|
||||
new SpannableString(context.getResources().getString(R.string.data_saved)),
|
||||
null, onPositiveClick)
|
||||
.show(context.getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
|
||||
}
|
||||
@@ -51,7 +50,7 @@ public class DialogCommon {
|
||||
|
||||
public static void showRestError(@NotNull Context context, Exception ex, @Nullable Runnable onPositiveClick) {
|
||||
DialogSimpleMessageView
|
||||
.makeErrorDialog(new SpannableString(ex.getMessage()), null, onPositiveClick)
|
||||
.show(((AppCompatActivity) context).getSupportFragmentManager(), "tag");
|
||||
.makeErrorDialog(context, new SpannableString(ex.getMessage()), null, onPositiveClick)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.base;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.Spanned;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -69,15 +67,16 @@ public class DialogSimpleMessageView extends MaterialAlertDialogBuilder {
|
||||
Integer mRNeutralButtonString;
|
||||
private final Runnable mOnNeutralClick;
|
||||
|
||||
private final Handler mHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
private String positiveButtonText;
|
||||
private String neutralButtonText;
|
||||
private String negativeButtonText;
|
||||
|
||||
private AlertDialog dialog;
|
||||
// private AlertDialog dialog;
|
||||
|
||||
|
||||
public static DialogSimpleMessageView newInstance(@NonNull Context context, @NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent, Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
private static DialogSimpleMessageView newInstance(@NonNull Context context, @NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent, Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
return new DialogSimpleMessageView(context, type, titleText, messageText, hashmapContent, onPositiveClick, onNegativeClick, rNeutralButtonString, onNeutralClick);
|
||||
}
|
||||
|
||||
@@ -93,7 +92,7 @@ public class DialogSimpleMessageView extends MaterialAlertDialogBuilder {
|
||||
this.mRNeutralButtonString = rNeutralButtonString;
|
||||
this.mOnNeutralClick = onNeutralClick;
|
||||
|
||||
DialogBaseBinding bindings = DialogBaseBinding.inflate(LayoutInflater.from(context), null, false);
|
||||
DialogBaseBinding bindings = DialogBaseBinding.inflate(LayoutInflater.from(getContext()), null, false);
|
||||
|
||||
setCancelable(false);
|
||||
|
||||
@@ -115,47 +114,52 @@ public class DialogSimpleMessageView extends MaterialAlertDialogBuilder {
|
||||
setNegativeButton(getNegativeButtonText(), (dialog, which) -> {
|
||||
if (this.mOnNegativeClick != null) this.mOnNegativeClick.run();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public AlertDialog create() {
|
||||
dialog = super.create();
|
||||
// var createdDialog = super.create();
|
||||
|
||||
|
||||
var createdDialog = super.create();
|
||||
|
||||
// dialog.setCanceledOnTouchOutside(isCancelable());
|
||||
dialog.setOnShowListener(d -> {
|
||||
if (mContext instanceof Activity) {
|
||||
Dialog dialogToShow = (Dialog) d;
|
||||
if (dialogToShow.getWindow() != null) {
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
((Activity) mContext).getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||
int displayWidth = displayMetrics.widthPixels;
|
||||
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
|
||||
layoutParams.copyFrom(dialogToShow.getWindow().getAttributes());
|
||||
int dialogWindowWidth = (int) (displayWidth * 0.9f);
|
||||
layoutParams.width = dialogWindowWidth;
|
||||
dialogToShow.getWindow().setAttributes(layoutParams);
|
||||
}
|
||||
}
|
||||
});
|
||||
return dialog;
|
||||
// createdDialog.setOnShowListener(d -> {
|
||||
// if (mContext instanceof Activity) {
|
||||
// Dialog dialogToShow = (Dialog) d;
|
||||
// if (dialogToShow.getWindow() != null) {
|
||||
// DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
// ((Activity) mContext).getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||
// int displayWidth = displayMetrics.widthPixels;
|
||||
// WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
|
||||
// layoutParams.copyFrom(dialogToShow.getWindow().getAttributes());
|
||||
// int dialogWindowWidth = (int) (displayWidth * 0.9f);
|
||||
// layoutParams.width = dialogWindowWidth;
|
||||
// dialogToShow.getWindow().setAttributes(layoutParams);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
return createdDialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AlertDialog show() {
|
||||
if (dialog == null) {
|
||||
dialog = create();
|
||||
}
|
||||
if (!dialog.isShowing()) {
|
||||
dialog.show();
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
// @Override
|
||||
// public AlertDialog show() {
|
||||
// if (dialog == null) {
|
||||
// dialog = create();
|
||||
// }
|
||||
// if (!dialog.isShowing()) {
|
||||
// dialog.show();
|
||||
// }
|
||||
// return dialog;
|
||||
// }
|
||||
|
||||
public void dismiss() {
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
// public void dismiss() {
|
||||
// if (dialog != null && dialog.isShowing()) {
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// }
|
||||
|
||||
private void initContent(DialogBaseBinding mBindings) {
|
||||
int colorBackgroundTitle = -1;
|
||||
@@ -237,17 +241,17 @@ public class DialogSimpleMessageView extends MaterialAlertDialogBuilder {
|
||||
}
|
||||
|
||||
public void onPositiveClick() {
|
||||
dismiss();
|
||||
// dismiss();
|
||||
if (mOnPositiveClick != null) mOnPositiveClick.run();
|
||||
}
|
||||
|
||||
public void onNeutralClick() {
|
||||
dismiss();
|
||||
// dismiss();
|
||||
if (mOnNeutralClick != null) mOnNeutralClick.run();
|
||||
}
|
||||
|
||||
public void onNegativeClick() {
|
||||
dismiss();
|
||||
// dismiss();
|
||||
if (mOnNegativeClick != null) mOnNegativeClick.run();
|
||||
}
|
||||
|
||||
|
||||
@@ -357,7 +357,9 @@ public class DialogChooseArtsFromMtbColrListView extends BaseDialogFragment impl
|
||||
private void showNoArtFoundDialog() throws InterruptedException {
|
||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
|
||||
handler.post(() -> {
|
||||
DialogCommon.showNoArtFoundDialog(mContext, countDownLatch::countDown);
|
||||
});
|
||||
|
||||
countDownLatch.await();
|
||||
}
|
||||
|
||||
@@ -339,10 +339,12 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
|
||||
LocalDate minDataScad = UtilityDate.getNow().plusDays(mtbAart.getGgScadPartita());
|
||||
if (minDataScad.isAfter(value) && value.isAfter(UtilityDate.getNow())) {
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString("La data selezionata è precedente alla data di scadenza consigliata per l'articolo scelto ( " + mtbAart.getGgScadPartita() + " giorni) . Continuare?"), null,
|
||||
.makeWarningDialog(context, new SpannableString("La data selezionata è precedente alla data di scadenza consigliata per l'articolo scelto ( " + mtbAart.getGgScadPartita() + " giorni) . Continuare?"), null,
|
||||
() -> this.mViewModel.setDataScad(value), () -> this.currentDataScad.set(null))
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
} else {
|
||||
this.mViewModel.setDataScad(value);
|
||||
}
|
||||
@@ -563,11 +565,11 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
public void onWarning(String text, RunnableArgs<Boolean> result) {
|
||||
handler.post(() -> {
|
||||
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(text)),
|
||||
DialogSimpleMessageView.makeWarningDialog(context, new SpannableString(Html.fromHtml(text)),
|
||||
null,
|
||||
() -> result.run(true),
|
||||
() -> result.run(false)
|
||||
).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
).show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -167,13 +167,16 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
|
||||
@Override
|
||||
public void onLUVenditaConfirmRequired(RunnableArgs<Boolean> onConfirm) {
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(getString(R.string.lu_gest_v_loading_alert)),
|
||||
handler.post(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(requireContext(),
|
||||
new SpannableString(getString(R.string.lu_gest_v_loading_alert)),
|
||||
null, () -> {
|
||||
onConfirm.run(true);
|
||||
}, () -> {
|
||||
onConfirm.run(false);
|
||||
})
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -751,7 +751,6 @@
|
||||
android:hint="@string/expire_date"
|
||||
android:inputType="text"
|
||||
app:binding="@{view.currentDataScad}"
|
||||
app:parentView="@{view}"
|
||||
app:warningOnOldDates="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@@ -762,7 +762,6 @@
|
||||
android:hint="@string/expire_date"
|
||||
android:inputType="text"
|
||||
app:binding="@{view.currentDataScad}"
|
||||
app:parentView="@{view}"
|
||||
app:warningOnOldDates="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@@ -142,8 +142,7 @@
|
||||
android:focusableInTouchMode="false"
|
||||
android:hint="@string/document_date"
|
||||
android:inputType="none"
|
||||
app:binding="@{view.selectedDataDoc}"
|
||||
app:parentView="@{view}" />
|
||||
app:binding="@{view.selectedDataDoc}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
android:minHeight="?attr/listPreferredItemHeightSmall"
|
||||
app:binding="@{viewmodel.dataDocBindable}"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@@ -81,8 +81,7 @@
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
android:minHeight="?attr/listPreferredItemHeightSmall"
|
||||
app:binding="@{viewmodel.dataDocBindable}"
|
||||
app:parentView="@{view}" />
|
||||
app:binding="@{viewmodel.dataDocBindable}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user