Piccole ottimizzazioni
This commit is contained in:
parent
5692980dcd
commit
2767db96c1
@ -97,14 +97,14 @@ dependencies {
|
|||||||
implementation 'com.orhanobut:logger:2.2.0'
|
implementation 'com.orhanobut:logger:2.2.0'
|
||||||
implementation 'com.google.firebase:firebase-core:17.2.1'
|
implementation 'com.google.firebase:firebase-core:17.2.1'
|
||||||
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.1'
|
implementation 'com.google.firebase:firebase-perf:19.0.3'
|
||||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.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-beta01'
|
implementation 'com.google.android.material:material:1.1.0-beta01'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta3'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0-rc01'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||||
implementation 'androidx.preference:preference:1.1.0'
|
implementation 'androidx.preference:preference:1.1.0'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
|
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
|
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
|
||||||
|
|||||||
@ -81,7 +81,6 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<List<StbGestSetup>>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<List<StbGestSetup>>> call, Throwable t) {
|
||||||
Log.e("PrintCollo", t.toString());
|
|
||||||
UtilityLogger.errorMe(new Exception(t));
|
UtilityLogger.errorMe(new Exception(t));
|
||||||
if(onFailed != null) onFailed.run(new Exception(t));
|
if(onFailed != null) onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.orhanobut.logger.Logger;
|
|||||||
|
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
import java.net.SocketException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
@ -38,7 +39,8 @@ public class UtilityLogger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void errorMe(Exception ex, String additionalText, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public static void errorMe(Exception ex, String additionalText, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
if(!(ex instanceof SocketTimeoutException) && !(ex.getCause() instanceof SocketTimeoutException)) {
|
if((!(ex instanceof SocketTimeoutException) && !(ex.getCause() instanceof SocketTimeoutException)) ||
|
||||||
|
(!(ex instanceof SocketException) && !(ex.getCause() instanceof SocketException)) ) {
|
||||||
|
|
||||||
String message = UtilityResources.readRawTextFile(R.raw.error_mail);
|
String message = UtilityResources.readRawTextFile(R.raw.error_mail);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package it.integry.integrywmsnative.gest.accettazione;
|
|||||||
|
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.ProgressDialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
@ -30,11 +29,11 @@ import it.integry.integrywmsnative.core.rest.CommonRESTException;
|
|||||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ISearcableFragment;
|
import it.integry.integrywmsnative.core.interfaces.ISearcableFragment;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentMainAccettazioneBinding;
|
import it.integry.integrywmsnative.databinding.FragmentMainAccettazioneBinding;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.core.AccettazioneHelper;
|
import it.integry.integrywmsnative.gest.accettazione.core.AccettazioneHelper;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.core.MainListAccettazioneAdapter;
|
import it.integry.integrywmsnative.gest.accettazione.core.MainListAccettazioneAdapter;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.core.interfaces.ILoadOrdiniCallback;
|
|
||||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneDTO;
|
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneDTO;
|
||||||
@ -84,10 +83,6 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
if (getArguments() != null) {
|
|
||||||
// mParam1 = getArguments().getString(ARG_PARAM1);
|
|
||||||
// mParam2 = getArguments().getString(ARG_PARAM2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
init();
|
init();
|
||||||
@ -126,28 +121,19 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
|||||||
|
|
||||||
mHelper = new AccettazioneHelper(getActivity());
|
mHelper = new AccettazioneHelper(getActivity());
|
||||||
|
|
||||||
mHelper.loadOrdini(new ILoadOrdiniCallback() {
|
mHelper.loadOrdini(ordini -> {
|
||||||
@Override
|
if(ordini != null) {
|
||||||
public void onLoadSuccess(List<OrdineAccettazioneInevasoDTO> ordini) {
|
Toast.makeText(getActivity(), "Caricati " + ordini.size() + " ordini", Toast.LENGTH_LONG).show();
|
||||||
if(ordini != null) {
|
mOriginalOrderList = ordini;
|
||||||
Toast.makeText(getActivity(), "Caricati " + ordini.size() + " ordini", Toast.LENGTH_LONG).show();
|
|
||||||
mOriginalOrderList = ordini;
|
|
||||||
}
|
|
||||||
|
|
||||||
mBinding.ordiniAccettazioneEmptyView.setVisibility(ordini != null && ordini.size() > 0 ? View.GONE : View.VISIBLE);
|
|
||||||
refreshRenderedOrdini(ordini);
|
|
||||||
initRecyclerView();
|
|
||||||
progress.dismiss();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
mBinding.ordiniAccettazioneEmptyView.setVisibility(ordini != null && ordini.size() > 0 ? View.GONE : View.VISIBLE);
|
||||||
public void onLoadFail(Exception ex) {
|
refreshRenderedOrdini(ordini);
|
||||||
progress.dismiss();
|
initRecyclerView();
|
||||||
|
progress.dismiss();
|
||||||
|
|
||||||
String errorMessage = CommonRESTException.tryRecognizeThenGetMessage(ex);
|
}, ex -> {
|
||||||
if(errorMessage == null) errorMessage = ex.getMessage();
|
UtilityExceptions.defaultException(getActivity(), ex, progress);
|
||||||
DialogSimpleMessageHelper.makeErrorDialog(getActivity(), new SpannableString(errorMessage), null, null).show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -164,10 +150,6 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
|||||||
if(ordini != null) mRenderedOrderList.addAll(ordini);
|
if(ordini != null) mRenderedOrderList.addAll(ordini);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshRecyclerView() {
|
|
||||||
mAdapter.updateItems(mRenderedOrderList);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private RunnableArgs<OrdineAccettazioneInevasoDTO> onSingleSelectionChanged = dto -> {
|
private RunnableArgs<OrdineAccettazioneInevasoDTO> onSingleSelectionChanged = dto -> {
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.core.interfaces.ILoadOrdiniCallback;
|
|
||||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneDTO;
|
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneDTO;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneInevasoDTO;
|
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneInevasoDTO;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.rest.OrdiniAccettazioneRESTConsumerService;
|
import it.integry.integrywmsnative.gest.accettazione.rest.OrdiniAccettazioneRESTConsumerService;
|
||||||
@ -35,7 +34,7 @@ public class AccettazioneHelper {
|
|||||||
mContext = context;
|
mContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadOrdini(final ILoadOrdiniCallback callback){
|
public void loadOrdini(RunnableArgs<List<OrdineAccettazioneInevasoDTO>> onComplete, RunnableArgs<Exception> onFailed){
|
||||||
String codMdep = SettingsManager.i().userSession.depo.getCodMdep();
|
String codMdep = SettingsManager.i().userSession.depo.getCodMdep();
|
||||||
|
|
||||||
OrdiniAccettazioneRESTConsumerService service = RESTBuilder.getService(OrdiniAccettazioneRESTConsumerService.class);
|
OrdiniAccettazioneRESTConsumerService service = RESTBuilder.getService(OrdiniAccettazioneRESTConsumerService.class);
|
||||||
@ -47,25 +46,21 @@ public class AccettazioneHelper {
|
|||||||
|
|
||||||
if(response.body() != null) {
|
if(response.body() != null) {
|
||||||
if(response.body().getEsito() == EsitoType.OK) {
|
if(response.body().getEsito() == EsitoType.OK) {
|
||||||
callback.onLoadSuccess(response.body().getDto());
|
onComplete.run(response.body().getDto());
|
||||||
} else {
|
} else {
|
||||||
Log.e("Accettazione", response.body().getErrorMessage());
|
onFailed.run(new Exception(response.body().getErrorMessage()));
|
||||||
callback.onLoadFail(new Exception(response.body().getErrorMessage()));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e("Accettazione", response.message());
|
onFailed.run(new Exception(response.message()));
|
||||||
callback.onLoadFail(new Exception(response.message()));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e("Accettazione", "Status " + response.code() + ": " + response.message());
|
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||||
callback.onLoadFail(new Exception("Status " + response.code() + ": " + response.message()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<List<OrdineAccettazioneInevasoDTO>>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<List<OrdineAccettazioneInevasoDTO>>> call, Throwable t) {
|
||||||
Log.e("Accettazione", t.toString());
|
onFailed.run(new Exception(t));
|
||||||
callback.onLoadFail(new Exception(t));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -96,23 +91,18 @@ public class AccettazioneHelper {
|
|||||||
|
|
||||||
onComplete.run(dto);
|
onComplete.run(dto);
|
||||||
} else {
|
} else {
|
||||||
Log.e("Accettazione", response.body().getErrorMessage());
|
|
||||||
onFailed.run(new Exception(response.body().getErrorMessage()));
|
onFailed.run(new Exception(response.body().getErrorMessage()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e("Accettazione", response.message());
|
|
||||||
onFailed.run(new Exception(response.message()));
|
onFailed.run(new Exception(response.message()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e("Accettazione", "Status " + response.code() + ": " + response.message());
|
|
||||||
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<List<OrdineAccettazioneDTO>>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<List<OrdineAccettazioneDTO>>> call, Throwable t) {
|
||||||
Log.e("Accettazione", t.toString());
|
|
||||||
UtilityLogger.errorMe(new Exception(t));
|
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.gest.accettazione.core.interfaces;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneInevasoDTO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by GiuseppeS on 06/03/2018.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public interface ILoadOrdiniCallback {
|
|
||||||
|
|
||||||
|
|
||||||
void onLoadSuccess(List<OrdineAccettazioneInevasoDTO> ordini);
|
|
||||||
|
|
||||||
void onLoadFail(Exception ex);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.gest.accettazione.core.interfaces;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneDTO;
|
|
||||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneInevasoDTO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by GiuseppeS on 22/03/2018.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public interface ILoadPickingListCallback {
|
|
||||||
|
|
||||||
void onLoadSuccess(List<OrdineAccettazioneDTO> ordini);
|
|
||||||
|
|
||||||
void onLoadFail(Exception ex);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -130,8 +130,6 @@ public class AccettazioneOrdineInevasoHelper {
|
|||||||
if(tmpList.get(i).isHidden() == null || forceHiddenCheck) {
|
if(tmpList.get(i).isHidden() == null || forceHiddenCheck) {
|
||||||
if (tmpList.get(i).getQtaDaEvadere().floatValue() <= 0) {
|
if (tmpList.get(i).getQtaDaEvadere().floatValue() <= 0) {
|
||||||
tmpList.get(i).setHidden(true);
|
tmpList.get(i).setHidden(true);
|
||||||
//tmpList.remove(i);
|
|
||||||
//i--;
|
|
||||||
} else tmpList.get(i).setHidden(false);
|
} else tmpList.get(i).setHidden(false);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -76,8 +76,6 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
|
|||||||
|
|
||||||
private GestioneEnum defaultGestioneOfUL = null;
|
private GestioneEnum defaultGestioneOfUL = null;
|
||||||
|
|
||||||
// private MtbColt mtbColtOfAccettazione = null;
|
|
||||||
|
|
||||||
public AccettazioneOrdineAccettazioneInevasoViewModel(AccettazioneOrdineInevasoActivity activity, ArticoliInColloBottomSheetViewModel articoliInColloBottomSheetViewModel, List<OrdineAccettazioneDTO> orders) {
|
public AccettazioneOrdineAccettazioneInevasoViewModel(AccettazioneOrdineInevasoActivity activity, ArticoliInColloBottomSheetViewModel articoliInColloBottomSheetViewModel, List<OrdineAccettazioneDTO> orders) {
|
||||||
this.mActivity = activity;
|
this.mActivity = activity;
|
||||||
this.mArticoliInColloBottomSheetViewModel = articoliInColloBottomSheetViewModel;
|
this.mArticoliInColloBottomSheetViewModel = articoliInColloBottomSheetViewModel;
|
||||||
|
|||||||
@ -90,9 +90,6 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
if (getArguments() != null) {
|
|
||||||
}
|
|
||||||
|
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
@ -218,7 +215,6 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS
|
|||||||
final String finalDataCons = dataCons;
|
final String finalDataCons = dataCons;
|
||||||
checkSelectedOrders(selectedOrders, () -> {
|
checkSelectedOrders(selectedOrders, () -> {
|
||||||
|
|
||||||
|
|
||||||
RunnableArgs<List<PickingObjectDTO>> onPostGetPickingList = ordini -> {
|
RunnableArgs<List<PickingObjectDTO>> onPostGetPickingList = ordini -> {
|
||||||
|
|
||||||
mHelper.getBancaliVenditaGiaRegistrati(selectedOrders, mtbColtList -> {
|
mHelper.getBancaliVenditaGiaRegistrati(selectedOrders, mtbColtList -> {
|
||||||
|
|||||||
@ -61,17 +61,14 @@ public class VenditaHelper {
|
|||||||
onComplete.run(response.body().getDto());
|
onComplete.run(response.body().getDto());
|
||||||
} else {
|
} else {
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
Log.e("Vendita", response.body().getErrorMessage());
|
|
||||||
onFailed.run(new Exception(response.body().getErrorMessage()));
|
onFailed.run(new Exception(response.body().getErrorMessage()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
Log.e("Vendita", response.message());
|
|
||||||
onFailed.run(new Exception(response.message()));
|
onFailed.run(new Exception(response.message()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
Log.e("Vendita", "Status " + response.code() + ": " + response.message());
|
|
||||||
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -111,18 +108,15 @@ public class VenditaHelper {
|
|||||||
onComplete.run(response.body().getDto());
|
onComplete.run(response.body().getDto());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.e("Vendita", response.body().getErrorMessage());
|
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
onFailed.run(new Exception(response.body().getErrorMessage()));
|
onFailed.run(new Exception(response.body().getErrorMessage()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e("Vendita", response.message());
|
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
onFailed.run(new Exception(response.message()));
|
onFailed.run(new Exception(response.message()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
Log.e("Vendita", "Status " + response.code() + ": " + response.message());
|
|
||||||
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -130,8 +124,6 @@ public class VenditaHelper {
|
|||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Throwable t) {
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
Log.e("Vendita", t.toString());
|
|
||||||
UtilityLogger.errorMe(new Exception(t));
|
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -167,18 +159,15 @@ public class VenditaHelper {
|
|||||||
onComplete.run(response.body().getDto());
|
onComplete.run(response.body().getDto());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.e("Vendita", response.body().getErrorMessage());
|
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
onFailed.run(new Exception(response.body().getErrorMessage()));
|
onFailed.run(new Exception(response.body().getErrorMessage()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e("Vendita", response.message());
|
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
onFailed.run(new Exception(response.message()));
|
onFailed.run(new Exception(response.message()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
Log.e("Vendita", "Status " + response.code() + ": " + response.message());
|
|
||||||
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,8 +175,6 @@ public class VenditaHelper {
|
|||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Throwable t) {
|
||||||
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
UtilityFirebase.stopPerformanceTrace(perfTrace, true);
|
||||||
Log.e("Vendita", t.toString());
|
|
||||||
UtilityLogger.errorMe(new Exception(t));
|
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -246,9 +233,6 @@ public class VenditaHelper {
|
|||||||
|
|
||||||
|
|
||||||
public void getOrdiniInCommessaCollo(MtbColt testataCollo, RunnableArgs<List<DtbOrdt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getOrdiniInCommessaCollo(MtbColt testataCollo, RunnableArgs<List<DtbOrdt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OrdiniVenditaRESTConsumerService service = RESTBuilder.getService(OrdiniVenditaRESTConsumerService.class);
|
OrdiniVenditaRESTConsumerService service = RESTBuilder.getService(OrdiniVenditaRESTConsumerService.class);
|
||||||
service.getOrdiniInCommessaCollo(
|
service.getOrdiniInCommessaCollo(
|
||||||
testataCollo.getDataColloS(),
|
testataCollo.getDataColloS(),
|
||||||
@ -267,15 +251,12 @@ public class VenditaHelper {
|
|||||||
if(response.body().getEsito() == EsitoType.OK) {
|
if(response.body().getEsito() == EsitoType.OK) {
|
||||||
onComplete.run(response.body().getDto());
|
onComplete.run(response.body().getDto());
|
||||||
} else {
|
} else {
|
||||||
Log.e("getOrdiniInCommCollo", response.body().getErrorMessage());
|
|
||||||
onFailed.run(new Exception(response.body().getErrorMessage()));
|
onFailed.run(new Exception(response.body().getErrorMessage()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e("getOrdiniInCommCollo", response.message());
|
|
||||||
onFailed.run(new Exception(response.message()));
|
onFailed.run(new Exception(response.message()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e("getOrdiniInCommCollo", "Status " + response.code() + ": " + response.message());
|
|
||||||
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,8 +264,6 @@ public class VenditaHelper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<List<DtbOrdt>>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<List<DtbOrdt>>> call, Throwable t) {
|
||||||
Log.e("getOrdiniInCommCollo", t.toString());
|
|
||||||
UtilityLogger.errorMe(new Exception(t));
|
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import android.content.res.ColorStateList;
|
|||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
import androidx.databinding.Observable;
|
import androidx.databinding.Observable;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
@ -40,6 +42,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||||
@ -208,7 +211,7 @@ public class DialogInputQuantity {
|
|||||||
|
|
||||||
private String scadenzaString = "Scadenza";
|
private String scadenzaString = "Scadenza";
|
||||||
|
|
||||||
private AlertDialog currentAlert;
|
private Dialog currentDialog;
|
||||||
private Context currentContext;
|
private Context currentContext;
|
||||||
|
|
||||||
private DialogInputQuantityArticoloBinding currentBinding;
|
private DialogInputQuantityArticoloBinding currentBinding;
|
||||||
@ -217,14 +220,14 @@ public class DialogInputQuantity {
|
|||||||
private QuantityDTO currentQuantityDto;
|
private QuantityDTO currentQuantityDto;
|
||||||
private DTO currentDTO;
|
private DTO currentDTO;
|
||||||
|
|
||||||
public static AlertDialog makeBase(final Context context, final DTO dto, boolean canOverflowQuantity, final RunnableArgs<QuantityDTO> dialogCallback, final Runnable onAbort) {
|
public static Dialog makeBase(final Context context, final DTO dto, boolean canOverflowQuantity, final RunnableArgs<QuantityDTO> dialogCallback, final Runnable onAbort) {
|
||||||
return new DialogInputQuantity(context, dto, canOverflowQuantity, false, (quantityDto, closeUL) -> {
|
return new DialogInputQuantity(context, dto, canOverflowQuantity, false, (quantityDto, closeUL) -> {
|
||||||
dialogCallback.run(quantityDto);
|
dialogCallback.run(quantityDto);
|
||||||
}, onAbort).currentAlert;
|
}, onAbort).currentDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AlertDialog makeBase(final Context context, final DTO dto, boolean canOverflowQuantity, final RunnableArgss<QuantityDTO, Boolean> dialogCallback, final Runnable onAbort) {
|
public static Dialog makeBase(final Context context, final DTO dto, boolean canOverflowQuantity, final RunnableArgss<QuantityDTO, Boolean> dialogCallback, final Runnable onAbort) {
|
||||||
return new DialogInputQuantity(context, dto, canOverflowQuantity, true, dialogCallback, onAbort).currentAlert;
|
return new DialogInputQuantity(context, dto, canOverflowQuantity, true, dialogCallback, onAbort).currentDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DialogInputQuantity(@NotNull Context context, @NotNull final DTO dto, boolean canOverflowQuantity, boolean showCloseUL, final RunnableArgss<QuantityDTO, Boolean> dialogCallback, final Runnable onAbort) {
|
public DialogInputQuantity(@NotNull Context context, @NotNull final DTO dto, boolean canOverflowQuantity, boolean showCloseUL, final RunnableArgss<QuantityDTO, Boolean> dialogCallback, final Runnable onAbort) {
|
||||||
@ -258,19 +261,17 @@ public class DialogInputQuantity {
|
|||||||
currentBinding.setViewmodel(dto);
|
currentBinding.setViewmodel(dto);
|
||||||
currentBinding.setQuantityViewModel(currentQuantityDto);
|
currentBinding.setQuantityViewModel(currentQuantityDto);
|
||||||
|
|
||||||
final AlertDialog.Builder alertDialog = new AlertDialog.Builder(context)
|
|
||||||
.setView(currentBinding.getRoot())
|
|
||||||
.setPositiveButton(context.getText(R.string.confirm), null)
|
|
||||||
.setNegativeButton(context.getText(R.string.abort), (dialog, which) -> {
|
|
||||||
if(onAbort != null) onAbort.run();
|
|
||||||
});
|
|
||||||
|
|
||||||
if(showCloseUL) alertDialog.setNeutralButton("Chiudi UL", null);
|
currentDialog = new Dialog(context);
|
||||||
|
currentDialog.setContentView(currentBinding.getRoot());
|
||||||
|
|
||||||
currentAlert = alertDialog.create();
|
currentDialog.setCanceledOnTouchOutside(false);
|
||||||
currentAlert.setCanceledOnTouchOutside(false);
|
currentDialog.setCancelable(false);
|
||||||
|
currentDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
currentAlert.setOnShowListener(dialogInterface -> {
|
currentDialog.setCanceledOnTouchOutside(false);
|
||||||
|
|
||||||
|
currentDialog.setOnShowListener(dialogInterface -> {
|
||||||
|
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
handler.postDelayed(() -> {
|
handler.postDelayed(() -> {
|
||||||
@ -286,16 +287,16 @@ public class DialogInputQuantity {
|
|||||||
|
|
||||||
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.showSoftInput(editTextToFocus, InputMethodManager.SHOW_IMPLICIT);
|
imm.showSoftInput(editTextToFocus, InputMethodManager.SHOW_IMPLICIT);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
currentBinding.saveBtn.setOnClickListener(view -> onConfirm(context, currentQuantityDto, dialogCallback, false));
|
||||||
|
currentBinding.abortBtn.setOnClickListener(view -> { if(onAbort != null) onAbort.run(); });
|
||||||
|
|
||||||
|
currentBinding.closeLuBtn.setVisibility(showCloseUL ? View.VISIBLE : View.INVISIBLE);
|
||||||
|
currentBinding.closeLuBtn.setOnClickListener(view -> onConfirm(context, currentQuantityDto, dialogCallback, true));
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
Button positiveButton = currentAlert.getButton(AlertDialog.BUTTON_POSITIVE);
|
|
||||||
positiveButton.setOnClickListener(view -> onConfirm(context, currentQuantityDto, dialogCallback, false));
|
|
||||||
|
|
||||||
if(showCloseUL) {
|
|
||||||
Button neutralButton = currentAlert.getButton(AlertDialog.BUTTON_NEUTRAL);
|
|
||||||
neutralButton.setOnClickListener(view -> onConfirm(context, currentQuantityDto, dialogCallback, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -385,7 +386,7 @@ public class DialogInputQuantity {
|
|||||||
.setOnScanSuccessfull(onScanSuccessfull)
|
.setOnScanSuccessfull(onScanSuccessfull)
|
||||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(context, ex, false)));
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(context, ex, false)));
|
||||||
|
|
||||||
currentAlert.setOnDismissListener(dialog -> {
|
currentDialog.setOnDismissListener(dialog -> {
|
||||||
BarcodeManager.removeCallback(barcodeIstanceID);
|
BarcodeManager.removeCallback(barcodeIstanceID);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -662,9 +663,6 @@ public class DialogInputQuantity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
text += "</b>";
|
text += "</b>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
currentBinding.qtaDescriptionText.setText(Html.fromHtml(text));
|
currentBinding.qtaDescriptionText.setText(Html.fromHtml(text));
|
||||||
@ -701,7 +699,7 @@ public class DialogInputQuantity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dialogCallback.run(quantityDTO, closeUL);
|
dialogCallback.run(quantityDTO, closeUL);
|
||||||
currentAlert.dismiss();
|
currentDialog.dismiss();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -734,7 +732,6 @@ public class DialogInputQuantity {
|
|||||||
private void showBatchLotErrorPrompt(Context mContext){
|
private void showBatchLotErrorPrompt(Context mContext){
|
||||||
|
|
||||||
String errorMessage = mContext.getText(R.string.batch_lot_error_message).toString();
|
String errorMessage = mContext.getText(R.string.batch_lot_error_message).toString();
|
||||||
|
|
||||||
DialogSimpleMessageHelper.makeErrorDialog(mContext, new SpannableString(Html.fromHtml(errorMessage)), null, null).show();
|
DialogSimpleMessageHelper.makeErrorDialog(mContext, new SpannableString(Html.fromHtml(errorMessage)), null, null).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24.0"
|
|
||||||
android:viewportHeight="24.0">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FF000000"
|
|
||||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
|
||||||
</vector>
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24.0"
|
|
||||||
android:viewportHeight="24.0">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFFFFF"
|
|
||||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
|
||||||
</vector>
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<vector android:height="24dp" android:tint="@color/red_600"
|
|
||||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
|
||||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<path android:fillColor="#FFFFFF" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
|
||||||
</vector>
|
|
||||||
@ -29,12 +29,15 @@
|
|||||||
|
|
||||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp">
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/dialog_title"
|
android:id="@+id/dialog_title"
|
||||||
@ -48,8 +51,8 @@
|
|||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:text='@{viewmodel.mtbAart.codMart + (!UtilityString.isNullOrEmpty(viewmodel.batchLot) ? " (" + viewmodel.batchLot + ")" : "") }'
|
android:text='@{viewmodel.mtbAart.codMart + (!UtilityString.isNullOrEmpty(viewmodel.batchLot) ? " (" + viewmodel.batchLot + ")" : "") }'
|
||||||
android:textColor="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
tools:text="AV25D200010B"/>
|
tools:text="AV25D200010B"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
@ -59,21 +62,22 @@
|
|||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:text='@{!UtilityString.isNullOrEmpty(viewmodel.mtbAart.diacod) ? viewmodel.mtbAart.diacod : ""}'
|
android:text='@{!UtilityString.isNullOrEmpty(viewmodel.mtbAart.diacod) ? viewmodel.mtbAart.diacod : ""}'
|
||||||
android:textColor="@color/red_600"
|
android:textColor="@color/red_600"
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:visibility="@{UtilityString.isNullOrEmpty(viewmodel.mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
android:visibility="@{UtilityString.isNullOrEmpty(viewmodel.mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
tools:text="DIACOD HERE"/>
|
tools:text="DIACOD HERE"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:paddingLeft="8dp"
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
android:text='@{viewmodel.mtbAart.untMis != null ? "(" + viewmodel.mtbAart.untMis + ")" : ""}'
|
android:text='@{viewmodel.mtbAart.untMis != null ? "(" + viewmodel.mtbAart.untMis + ")" : ""}'
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="(PZ)"
|
tools:text="(PZ)"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
app:layout_constraintRight_toRightOf="parent" />
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -101,8 +105,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{viewmodel.mtbAart.descrizioneEstesa}"
|
android:text="@{viewmodel.mtbAart.descrizioneEstesa}"
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
tools:text="RAD 25 D H/L 200 - 10 EL B BIANCO" />
|
tools:text="RAD 25 D H/L 200 - 10 EL B BIANCO" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -355,7 +359,62 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/close_lu_btn"
|
||||||
|
android:layout_weight="0.4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/Button.PrimaryOutline"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"
|
||||||
|
app:strokeColor="@color/colorPrimary"
|
||||||
|
android:text="@string/action_close_ul"/>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/abort_btn"
|
||||||
|
android:layout_weight="0.3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/Button.DangerFull"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"
|
||||||
|
app:icon="@drawable/ic_close_24dp"
|
||||||
|
app:iconGravity="textStart"/>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/save_btn"
|
||||||
|
android:layout_weight="0.3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/Button.PrimaryFull"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/right_buttons_guideline"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:icon="@drawable/ic_save_24"
|
||||||
|
app:iconGravity="textStart"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user