Tanto vario
This commit is contained in:
parent
7d771bf39b
commit
cc7044c7de
@ -551,6 +551,12 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@BindingAdapter("visibility")
|
||||||
|
public static void bindViewVisibility(View view, boolean bool) {
|
||||||
|
view.setVisibility(bool ? View.VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@BindingAdapter({"reverse_visibility"})
|
@BindingAdapter({"reverse_visibility"})
|
||||||
public static void bindViewReverseVisibility(View view, final BindableBoolean bindableBoolean) {
|
public static void bindViewReverseVisibility(View view, final BindableBoolean bindableBoolean) {
|
||||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
|
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
|
||||||
|
import com.annimon.stream.Optional;
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
@ -32,6 +33,7 @@ import it.integry.integrywmsnative.core.rest.model.DistribuzioneColloDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
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;
|
||||||
@ -646,4 +648,58 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void versamentoAutomaticoUL(MtbColt sourceMtbColt, RunnableArgs<VersamentoAutomaticoULResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
|
||||||
|
|
||||||
|
for (int i = 0; i < sourceMtbColtClone.getMtbColr().size(); i++) {
|
||||||
|
sourceMtbColtClone.getMtbColr().get(i)
|
||||||
|
.setMtbAart(null)
|
||||||
|
.setMtbPartitaMag(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
colliMagazzinoRESTConsumerService.versamentoAutomaticoUL(sourceMtbColtClone).enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> call, Response<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "versamentoAutomaticoUL", data -> {
|
||||||
|
var result = response.body().getDto();
|
||||||
|
|
||||||
|
List<MtbColr> allMtbColr = new ArrayList<>();
|
||||||
|
allMtbColr.addAll(result.getSuccess());
|
||||||
|
allMtbColr.addAll(result.getFailed());
|
||||||
|
|
||||||
|
List<String> codMarts = Stream.of(allMtbColr)
|
||||||
|
.map(x -> x.getCodMart().trim())
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
mArticoloRESTConsumer.getByCodMarts(codMarts, mtbAarts -> {
|
||||||
|
for (var mtbColr : allMtbColr) {
|
||||||
|
|
||||||
|
MtbAart foundMtbAart = null;
|
||||||
|
|
||||||
|
Optional<MtbAart> mtbAartOpt = Stream.of(mtbAarts)
|
||||||
|
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbColr.getCodMart()))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if(mtbAartOpt.isPresent()){
|
||||||
|
foundMtbAart = mtbAartOpt.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
mtbColr.setMtbAart(foundMtbAart);
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(result);
|
||||||
|
}, onFailed);
|
||||||
|
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> call, Throwable t) {
|
||||||
|
if (onFailed != null) onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import it.integry.integrywmsnative.core.rest.model.DistribuzioneColloDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.GET;
|
import retrofit2.http.GET;
|
||||||
@ -42,4 +43,7 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("wms/assegnaLottoSuColloScarico")
|
@POST("wms/assegnaLottoSuColloScarico")
|
||||||
Call<ServiceRESTResponse<MtbColt>> assegnaLottoSuColloScarico(@Body MtbColt mtbColt);
|
Call<ServiceRESTResponse<MtbColt>> assegnaLottoSuColloScarico(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
|
@POST("wms/versamentoAutomaticoUL")
|
||||||
|
Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> versamentoAutomaticoUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,29 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
|
public class VersamentoAutomaticoULResponseDTO {
|
||||||
|
|
||||||
|
private List<MtbColr> success;
|
||||||
|
private List<MtbColr> failed;
|
||||||
|
|
||||||
|
public List<MtbColr> getSuccess() {
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VersamentoAutomaticoULResponseDTO setSuccess(List<MtbColr> success) {
|
||||||
|
this.success = success;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MtbColr> getFailed() {
|
||||||
|
return failed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VersamentoAutomaticoULResponseDTO setFailed(List<MtbColr> failed) {
|
||||||
|
this.failed = failed;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -44,6 +44,7 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
|||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
@ -58,6 +59,7 @@ import it.integry.integrywmsnative.gest.accettazione_picking.dto.PickingObjectDT
|
|||||||
import it.integry.integrywmsnative.gest.accettazione_picking.filters.AccettazionePickingFiltroOrdineViewModel;
|
import it.integry.integrywmsnative.gest.accettazione_picking.filters.AccettazionePickingFiltroOrdineViewModel;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterCodArtLayoutView;
|
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterCodArtLayoutView;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterDescrLayoutView;
|
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterDescrLayoutView;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterPosizioneLayoutView;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.rest.RecoverMtbColt;
|
import it.integry.integrywmsnative.gest.accettazione_picking.rest.RecoverMtbColt;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.ui.AccettazioneListAdapter;
|
import it.integry.integrywmsnative.gest.accettazione_picking.ui.AccettazioneListAdapter;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.ui.AccettazioneListModel;
|
import it.integry.integrywmsnative.gest.accettazione_picking.ui.AccettazioneListModel;
|
||||||
@ -68,10 +70,12 @@ import it.integry.integrywmsnative.ui.filter_chips.FilterChipDTO;
|
|||||||
import it.integry.integrywmsnative.ui.filter_chips.FilterChipView;
|
import it.integry.integrywmsnative.ui.filter_chips.FilterChipView;
|
||||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_should_versamento_automatico_ul.DialogAskShouldVersamentoAutomaticoULView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
import it.integry.integrywmsnative.view.dialogs.note_aggiuntive_lu.NoteAggiuntiveLUDialog;
|
import it.integry.integrywmsnative.view.dialogs.note_aggiuntive_lu.NoteAggiuntiveLUDialog;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.versamento_automatico_ul_done.DialogVersamentoAutomaticoULDoneView;
|
||||||
|
|
||||||
public class AccettazionePickingActivity extends BaseActivity implements AccettazionePickingViewModel.Listener, BottomSheetFragmentLUContentViewModel.Listener, BottomSheetFragmentLUContentView.Listener {
|
public class AccettazionePickingActivity extends BaseActivity implements AccettazionePickingViewModel.Listener, BottomSheetFragmentLUContentViewModel.Listener, BottomSheetFragmentLUContentView.Listener {
|
||||||
|
|
||||||
@ -152,6 +156,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
|
|
||||||
mAppliedFilterViewModel.getCurrentCodArtPredicate().addOnPropertyChangedCallback(onPredicateChanged);
|
mAppliedFilterViewModel.getCurrentCodArtPredicate().addOnPropertyChangedCallback(onPredicateChanged);
|
||||||
mAppliedFilterViewModel.getCurrentDescrPredicate().addOnPropertyChangedCallback(onPredicateChanged);
|
mAppliedFilterViewModel.getCurrentDescrPredicate().addOnPropertyChangedCallback(onPredicateChanged);
|
||||||
|
mAppliedFilterViewModel.getCurrentPosPredicate().addOnPropertyChangedCallback(onPredicateChanged);
|
||||||
|
|
||||||
List<FilterChipDTO> filterList = Stream.of(AccettazionePickingBindings.AVAILABLE_FILTERS.entrySet())
|
List<FilterChipDTO> filterList = Stream.of(AccettazionePickingBindings.AVAILABLE_FILTERS.entrySet())
|
||||||
.map(Map.Entry::getValue)
|
.map(Map.Entry::getValue)
|
||||||
@ -171,6 +176,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (mAppliedFilterViewModel.getCurrentCodArtPredicate().get() == null) {
|
if (mAppliedFilterViewModel.getCurrentCodArtPredicate().get() == null) {
|
||||||
|
mViewModel.resetMatchedRows();
|
||||||
filterChipView.disableCloseIcon();
|
filterChipView.disableCloseIcon();
|
||||||
|
|
||||||
mBindings.filterChipsGroup.removeView(filterChipView);
|
mBindings.filterChipsGroup.removeView(filterChipView);
|
||||||
@ -192,6 +198,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (mAppliedFilterViewModel.getCurrentDescrPredicate().get() == null) {
|
if (mAppliedFilterViewModel.getCurrentDescrPredicate().get() == null) {
|
||||||
|
mViewModel.resetMatchedRows();
|
||||||
filterChipView.disableCloseIcon();
|
filterChipView.disableCloseIcon();
|
||||||
|
|
||||||
mBindings.filterChipsGroup.removeView(filterChipView);
|
mBindings.filterChipsGroup.removeView(filterChipView);
|
||||||
@ -208,6 +215,28 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
});
|
});
|
||||||
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentDescrPredicate().set(null));
|
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentDescrPredicate().set(null));
|
||||||
break;
|
break;
|
||||||
|
case AccettazionePickingBindings.POS_FILTER_ID:
|
||||||
|
mAppliedFilterViewModel.getCurrentPosPredicate().addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (mAppliedFilterViewModel.getCurrentPosPredicate().get() == null) {
|
||||||
|
mViewModel.resetMatchedRows();
|
||||||
|
filterChipView.disableCloseIcon();
|
||||||
|
|
||||||
|
mBindings.filterChipsGroup.removeView(filterChipView);
|
||||||
|
mBindings.filterChipsGroup.addView(filterChipView);
|
||||||
|
mBindings.filterChips.smoothScrollTo(0, 0);
|
||||||
|
} else {
|
||||||
|
filterChipView.enableCloseIcon();
|
||||||
|
|
||||||
|
mBindings.filterChipsGroup.removeView(filterChipView);
|
||||||
|
mBindings.filterChipsGroup.addView(filterChipView, 0);
|
||||||
|
mBindings.filterChips.smoothScrollTo(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
filterChipView.setOnResetClicked(() -> mAppliedFilterViewModel.getCurrentPosPredicate().set(null));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mBindings.filterChipsGroup.addView(filterChipView);
|
this.mBindings.filterChipsGroup.addView(filterChipView);
|
||||||
@ -250,13 +279,25 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
.map(x -> x.getSitArtOrdDTO().getDescrizioneEstesaArt())
|
.map(x -> x.getSitArtOrdDTO().getDescrizioneEstesaArt())
|
||||||
.toList());
|
.toList());
|
||||||
break;
|
break;
|
||||||
|
case AccettazionePickingBindings.POS_FILTER_ID:
|
||||||
|
((FilterPosizioneLayoutView) filterLayoutView)
|
||||||
|
.setAll(mAppliedFilterViewModel.getAllPos())
|
||||||
|
.setAvailable(mAppliedFilterViewModel.getAvailablePos())
|
||||||
|
.setOnFilterApplied(mAppliedFilterViewModel::setPosFilter)
|
||||||
|
.setPreselected(Stream.of(Objects.requireNonNull(mViewModel.getPickingList().getValue()))
|
||||||
|
.filter(mAppliedFilterViewModel.getCurrentPosPredicate().get() == null ?
|
||||||
|
x -> false :
|
||||||
|
mAppliedFilterViewModel.getCurrentPosPredicate().get())
|
||||||
|
.map(x -> x.getMtbAart().getPosizione())
|
||||||
|
.toList());
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
filterLayoutView.show(getSupportFragmentManager(), "TAG");
|
filterLayoutView.show(getSupportFragmentManager(), "TAG");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onSupportNavigateUp() {
|
public boolean onSupportNavigateUp() {
|
||||||
onBackPressed();
|
onBackPressed();
|
||||||
return true;
|
return true;
|
||||||
@ -288,7 +329,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
// Handle item selection
|
// Handle item selection
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.action_filter:
|
case R.id.action_filter:
|
||||||
showOrderDialog();
|
showOrderByDialog();
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
@ -326,7 +367,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void refreshList() {
|
private void refreshList() {
|
||||||
this.onLoadingStarted();
|
//this.onLoadingStarted();
|
||||||
|
|
||||||
//new Thread(() -> {
|
//new Thread(() -> {
|
||||||
|
|
||||||
@ -346,7 +387,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
this.mAccettazioneMutableData.addAll(list);
|
this.mAccettazioneMutableData.addAll(list);
|
||||||
this.noItemsToPick.set(!isThereAnyItemToPick(tmpList));
|
this.noItemsToPick.set(!isThereAnyItemToPick(tmpList));
|
||||||
|
|
||||||
this.onLoadingEnded();
|
//this.onLoadingEnded();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,7 +429,8 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
accettazioneListModel.setBadge2(String.valueOf(x.getSitArtOrdDTO().getNumOrd()));
|
accettazioneListModel.setBadge2(String.valueOf(x.getSitArtOrdDTO().getNumOrd()));
|
||||||
|
|
||||||
accettazioneListModel.setDescrizione(x.getSitArtOrdDTO().getDescrizioneCommessa());
|
accettazioneListModel.setDescrizione(x.getSitArtOrdDTO().getDescrizioneCommessa());
|
||||||
if(x.getMtbAart() != null) accettazioneListModel.setPosizione(x.getMtbAart().getPosizione());
|
if (x.getMtbAart() != null)
|
||||||
|
accettazioneListModel.setPosizione(x.getMtbAart().getPosizione());
|
||||||
|
|
||||||
//Calc Num CNF
|
//Calc Num CNF
|
||||||
BigDecimal numCnfEvasa = BigDecimal.ZERO;
|
BigDecimal numCnfEvasa = BigDecimal.ZERO;
|
||||||
@ -452,7 +494,8 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
accettazioneListModel.setBadge2(String.valueOf(x.getSitArtOrdDTO().getNumOrd()));
|
accettazioneListModel.setBadge2(String.valueOf(x.getSitArtOrdDTO().getNumOrd()));
|
||||||
|
|
||||||
accettazioneListModel.setDescrizione(x.getSitArtOrdDTO().getDescrizioneCommessa());
|
accettazioneListModel.setDescrizione(x.getSitArtOrdDTO().getDescrizioneCommessa());
|
||||||
if(x.getMtbAart() != null) accettazioneListModel.setPosizione(x.getMtbAart().getPosizione());
|
if (x.getMtbAart() != null)
|
||||||
|
accettazioneListModel.setPosizione(x.getMtbAart().getPosizione());
|
||||||
|
|
||||||
//Calc Num CNF
|
//Calc Num CNF
|
||||||
BigDecimal numCnfEvasa = BigDecimal.ZERO;
|
BigDecimal numCnfEvasa = BigDecimal.ZERO;
|
||||||
@ -667,8 +710,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
this.mViewModel.retrieveExistentLU(this::startListaBancaliRegistratiActivity);
|
this.mViewModel.retrieveExistentLU(this::startListaBancaliRegistratiActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showOrderDialog() {
|
private void showOrderByDialog() {
|
||||||
|
|
||||||
AlertDialog dialog = new AlertDialog.Builder(this)
|
AlertDialog dialog = new AlertDialog.Builder(this)
|
||||||
.setTitle(this.getText(R.string.action_orderBy))
|
.setTitle(this.getText(R.string.action_orderBy))
|
||||||
.setSingleChoiceItems(AccettazioneOrdineInevasoOrderBy.descriptions, mCurrentOrderBy.getVal(), (dialog12, which) -> {
|
.setSingleChoiceItems(AccettazioneOrdineInevasoOrderBy.descriptions, mCurrentOrderBy.getVal(), (dialog12, which) -> {
|
||||||
@ -680,7 +722,6 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void startListaBancaliRegistratiActivity(ArrayList<RecoverMtbColt> mtbColts) {
|
public void startListaBancaliRegistratiActivity(ArrayList<RecoverMtbColt> mtbColts) {
|
||||||
|
|
||||||
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||||
@ -713,7 +754,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
null,
|
null,
|
||||||
R.string.button_ignore_print,
|
R.string.button_ignore_print,
|
||||||
onComplete)
|
onComplete)
|
||||||
.show(getSupportFragmentManager(), "tag");
|
.show(getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -741,9 +782,19 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
this.mViewModel.closeLU();
|
this.mViewModel.closeLU();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
DialogAskShouldVersamentoAutomaticoULView.newInstance(onComplete)
|
||||||
|
.show(getSupportFragmentManager(), "tag");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNoteAggiuntiveRequest(RunnableArgs<String> onComplete) {
|
public void onNoteAggiuntiveRequest(RunnableArgs<String> onComplete) {
|
||||||
NoteAggiuntiveLUDialog.make(this, onComplete::run, () -> onComplete.run(null)).show();
|
runOnUiThread(() -> {
|
||||||
|
NoteAggiuntiveLUDialog.make(this, onComplete).show();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -798,44 +849,72 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRowSaved() {
|
public void onRowSaved() {
|
||||||
FBToast.successToast(this, getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
runOnUiThread(() -> {
|
||||||
|
FBToast.successToast(this, getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFilterApplied(String newValue) {
|
public void onFilterCodMartApplied(String codMartToFilter) {
|
||||||
this.mBindings.filteredArtsInListExpandableLayout.expand(true);
|
runOnUiThread(() -> {
|
||||||
this.mBindings.descriptionFilterText.setText(!UtilityString.isNullOrEmpty(newValue) ? newValue : "");
|
var codMarts = new ArrayList<String>();
|
||||||
|
codMarts.add(codMartToFilter);
|
||||||
|
|
||||||
|
this.mAppliedFilterViewModel.setCodArtFilter(codMarts);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFilterRemoved() {
|
public void onFilterPosizioneApplied(String posizioneToFilter) {
|
||||||
mBindings.filteredArtsInListExpandableLayout.collapse(true);
|
runOnUiThread(() -> {
|
||||||
|
var posizioni = new ArrayList<String>();
|
||||||
|
posizioni.add(posizioneToFilter);
|
||||||
|
|
||||||
|
this.mAppliedFilterViewModel.setPosFilter(posizioni);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onULVersata(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete) {
|
||||||
|
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
DialogVersamentoAutomaticoULDoneView
|
||||||
|
.newInstance(versamentoAutomaticoULResponseDTO, onComplete)
|
||||||
|
.show(getSupportFragmentManager(), "tag");
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
runOnUiThread(() -> {
|
||||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||||
null,
|
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||||
() -> onComplete.run(true),
|
null,
|
||||||
() -> onComplete.run(false)
|
() -> onComplete.run(true),
|
||||||
).show(getSupportFragmentManager(), "tag");
|
() -> onComplete.run(false)
|
||||||
|
).show(getSupportFragmentManager(), "tag");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUOpened(MtbColt mtbColt) {
|
public void onLUOpened(MtbColt mtbColt) {
|
||||||
noLUPresent.set(false);
|
runOnUiThread(() -> {
|
||||||
FBToast.successToast(this, getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
noLUPresent.set(false);
|
||||||
|
FBToast.successToast(this, getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||||
|
|
||||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(mtbColt);
|
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(mtbColt);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUClosed() {
|
public void onLUClosed() {
|
||||||
noLUPresent.set(true);
|
runOnUiThread(() -> {
|
||||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
noLUPresent.set(true);
|
||||||
|
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
||||||
|
|
||||||
if (this.mShouldCloseActivity) super.onBackPressed();
|
if (this.mShouldCloseActivity) super.onBackPressed();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -4,12 +4,14 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterCodArtLayoutView;
|
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterCodArtLayoutView;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterDescrLayoutView;
|
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterDescrLayoutView;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterPosizioneLayoutView;
|
||||||
import it.integry.integrywmsnative.ui.filter_chips.FilterChipDTO;
|
import it.integry.integrywmsnative.ui.filter_chips.FilterChipDTO;
|
||||||
|
|
||||||
public class AccettazionePickingBindings {
|
public class AccettazionePickingBindings {
|
||||||
|
|
||||||
public static final int COD_ART_FILTER_ID = 0;
|
public static final int COD_ART_FILTER_ID = 0;
|
||||||
public static final int DESCR_FILTER_ID = 1;
|
public static final int DESCR_FILTER_ID = 1;
|
||||||
|
public static final int POS_FILTER_ID = 2;
|
||||||
|
|
||||||
public static final HashMap<Integer, FilterChipDTO> AVAILABLE_FILTERS = new HashMap<>() {
|
public static final HashMap<Integer, FilterChipDTO> AVAILABLE_FILTERS = new HashMap<>() {
|
||||||
{
|
{
|
||||||
@ -24,6 +26,12 @@ public class AccettazionePickingBindings {
|
|||||||
.setPosizione(1)
|
.setPosizione(1)
|
||||||
.setFilterChipText("Descrizione articolo")
|
.setFilterChipText("Descrizione articolo")
|
||||||
.setFilterLayoutView(new FilterDescrLayoutView()));
|
.setFilterLayoutView(new FilterDescrLayoutView()));
|
||||||
|
|
||||||
|
put(POS_FILTER_ID, new FilterChipDTO()
|
||||||
|
.setID(POS_FILTER_ID)
|
||||||
|
.setPosizione(1)
|
||||||
|
.setFilterChipText("Posizione")
|
||||||
|
.setFilterLayoutView(new FilterPosizioneLayoutView()));
|
||||||
}};
|
}};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,11 +42,13 @@ import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsume
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityThread;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneInevasoDTO;
|
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneInevasoDTO;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.dto.SitArtOrdDTO;
|
import it.integry.integrywmsnative.gest.accettazione.dto.SitArtOrdDTO;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.dto.HistoryMtbAartDTO;
|
import it.integry.integrywmsnative.gest.accettazione_picking.dto.HistoryMtbAartDTO;
|
||||||
@ -243,6 +245,10 @@ public class AccettazionePickingViewModel {
|
|||||||
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||||
|
|
||||||
|
|
||||||
|
} else if (UtilityBarcode.isEtichettaPosizione(barcodeScanDTO)) {
|
||||||
|
//Applico filtro per posizione
|
||||||
|
this.executeEtichettaPosizione(barcodeScanDTO, onComplete);
|
||||||
|
|
||||||
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||||
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||||
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
||||||
@ -293,6 +299,15 @@ public class AccettazionePickingViewModel {
|
|||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void executeEtichettaPosizione(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
|
|
||||||
|
var optionalPos = Stream.of(SettingsManager.iDB().getAvailablePosizioni())
|
||||||
|
.filter(x -> x.getPosizione().equalsIgnoreCase(barcodeScanDTO.getStringValue()))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
this.sendFilterPosizioneApplied(optionalPos.get().getPosizione());
|
||||||
|
onComplete.run();
|
||||||
|
}
|
||||||
|
|
||||||
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
||||||
if (barcodeProd.length() == 14) {
|
if (barcodeProd.length() == 14) {
|
||||||
@ -332,16 +347,14 @@ public class AccettazionePickingViewModel {
|
|||||||
} else if (matchedRows.size() == 1) {
|
} else if (matchedRows.size() == 1) {
|
||||||
this.dispatchOrdineRow(matchedRows.get(0));
|
this.dispatchOrdineRow(matchedRows.get(0));
|
||||||
} else {
|
} else {
|
||||||
List<PickingObjectDTO> pickingList = mPickingList.getValue();
|
//So che il codMart sarà solo 1
|
||||||
|
var firstCodMart = Stream.of(matchedRows)
|
||||||
|
.map(x -> x.getSitArtOrdDTO().getCodMart())
|
||||||
|
.distinct()
|
||||||
|
.findFirst()
|
||||||
|
.get();
|
||||||
|
|
||||||
for (int i = 0; i < pickingList.size(); i++) {
|
this.sendFilterCodMartApplied(firstCodMart);
|
||||||
if (!matchedRows.contains(pickingList.get(i))) {
|
|
||||||
pickingList.get(i).setHidden(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.sendFilterApplied(null);
|
|
||||||
this.getPickingList().postValue(pickingList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,64 +584,67 @@ public class AccettazionePickingViewModel {
|
|||||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
public void saveNewRow(PickingObjectDTO pickingObjectDTO, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
String gestioneRif = pickingObjectDTO.getSitArtOrdDTO().getGestioneEnum() == GestioneEnum.PRODUZIONE ? "L" : pickingObjectDTO.getSitArtOrdDTO().getGestione();
|
UtilityThread.executeParallel(() -> {
|
||||||
|
|
||||||
final MtbColr mtbColr = new MtbColr()
|
String gestioneRif = pickingObjectDTO.getSitArtOrdDTO().getGestioneEnum() == GestioneEnum.PRODUZIONE ? "L" : pickingObjectDTO.getSitArtOrdDTO().getGestione();
|
||||||
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
|
||||||
.setPartitaMag(partitaMag)
|
final MtbColr mtbColr = new MtbColr()
|
||||||
.setDataScadPartita(dataScad)
|
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||||
.setQtaCol(qtaTot)
|
.setPartitaMag(partitaMag)
|
||||||
.setQtaCnf(qtaCnf)
|
.setDataScadPartita(dataScad)
|
||||||
.setNumCnf(numCnf)
|
.setQtaCol(qtaTot)
|
||||||
.setGestioneRif(gestioneRif)
|
.setQtaCnf(qtaCnf)
|
||||||
.setCodJcom(pickingObjectDTO.getSitArtOrdDTO().getCodJcom())
|
.setNumCnf(numCnf)
|
||||||
.setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
.setGestioneRif(gestioneRif)
|
||||||
.setDatetimeRow(UtilityDate.getDateInstance())
|
.setCodJcom(pickingObjectDTO.getSitArtOrdDTO().getCodJcom())
|
||||||
.setDataOrd(pickingObjectDTO.getSitArtOrdDTO().getDataOrd())
|
.setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
||||||
.setNumOrd(pickingObjectDTO.getSitArtOrdDTO().getNumOrd())
|
.setDatetimeRow(UtilityDate.getDateInstance())
|
||||||
.setRigaOrd(pickingObjectDTO.getSitArtOrdDTO().getRigaOrd());
|
.setDataOrd(pickingObjectDTO.getSitArtOrdDTO().getDataOrd())
|
||||||
|
.setNumOrd(pickingObjectDTO.getSitArtOrdDTO().getNumOrd())
|
||||||
|
.setRigaOrd(pickingObjectDTO.getSitArtOrdDTO().getRigaOrd());
|
||||||
|
|
||||||
|
|
||||||
this.addHistoryItem(mtbColr);
|
this.addHistoryItem(mtbColr);
|
||||||
|
|
||||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||||
|
|
||||||
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||||
cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
|
cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
|
||||||
|
|
||||||
if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
|
if (UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) && UtilityBigDecimal.equalsTo(qtaTot, BigDecimal.ZERO)) {
|
||||||
resetMatchedRows();
|
resetMatchedRows();
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
if (shouldCloseLU) closeLU();
|
if (shouldCloseLU) closeLU();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
||||||
|
|
||||||
mtbColr
|
mtbColr
|
||||||
.setDataCollo(value.getDataColloS())
|
.setDataCollo(value.getDataColloS())
|
||||||
.setNumCollo(value.getNumCollo())
|
.setNumCollo(value.getNumCollo())
|
||||||
.setGestione(value.getGestione())
|
.setGestione(value.getGestione())
|
||||||
.setSerCollo(value.getSerCollo())
|
.setSerCollo(value.getSerCollo())
|
||||||
.setRiga(value.getMtbColr().get(value.getMtbColr().size() - 1).getRiga())
|
.setRiga(value.getMtbColr().get(value.getMtbColr().size() - 1).getRiga())
|
||||||
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||||
.setMtbAart(pickingObjectDTO.getMtbAart());
|
.setMtbAart(pickingObjectDTO.getMtbAart());
|
||||||
|
|
||||||
pickingObjectDTO.getWithdrawMtbColrs().add(mtbColr);
|
pickingObjectDTO.getWithdrawMtbColrs().add(mtbColr);
|
||||||
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||||
|
|
||||||
//Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
|
//Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
|
||||||
resetMatchedRows();
|
resetMatchedRows();
|
||||||
|
|
||||||
this.sendOnRowSaved();
|
this.sendOnRowSaved();
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
if (shouldCloseLU) closeLU();
|
if (shouldCloseLU) closeLU();
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
}, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -772,19 +788,40 @@ public class AccettazionePickingViewModel {
|
|||||||
} else {
|
} else {
|
||||||
mColliMagazzinoRESTConsumer.updateDataFine(mCurrentMtbColt, () -> {
|
mColliMagazzinoRESTConsumer.updateDataFine(mCurrentMtbColt, () -> {
|
||||||
|
|
||||||
if (!mCurrentMtbColt.getDisablePrint()) {
|
Runnable onVersamentoCompleted = () -> {
|
||||||
printCollo(this::postCloseOperations);
|
if (!mCurrentMtbColt.getDisablePrint()) {
|
||||||
} else {
|
printCollo(this::postCloseOperations);
|
||||||
postCloseOperations();
|
} else {
|
||||||
}
|
postCloseOperations();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sendLUClosed();
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
};
|
||||||
|
|
||||||
|
sendVersamentoAutomaticoULRequest(response -> {
|
||||||
|
if (response) {
|
||||||
|
versaAutomaticamenteUL(onVersamentoCompleted);
|
||||||
|
} else {
|
||||||
|
onVersamentoCompleted.run();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.sendLUClosed();
|
|
||||||
this.sendOnLoadingEnded();
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void versaAutomaticamenteUL(Runnable onComplete) {
|
||||||
|
if (mCurrentMtbColt == null) return;
|
||||||
|
|
||||||
|
mColliMagazzinoRESTConsumer.versamentoAutomaticoUL(mCurrentMtbColt, versamentoResult -> {
|
||||||
|
this.notifyVersamentoAutomaticoResult(versamentoResult, onComplete);
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void printCollo(Runnable onComplete) {
|
private void printCollo(Runnable onComplete) {
|
||||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||||
cloneMtbColt.setGestione(cloneMtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE ? GestioneEnum.PRODUZIONE : cloneMtbColt.getGestioneEnum());
|
cloneMtbColt.setGestione(cloneMtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE ? GestioneEnum.PRODUZIONE : cloneMtbColt.getGestioneEnum());
|
||||||
@ -816,12 +853,10 @@ public class AccettazionePickingViewModel {
|
|||||||
public void resetMatchedRows() {
|
public void resetMatchedRows() {
|
||||||
for (PickingObjectDTO pickingObjectDTO : this.mPickingList.getValue()) {
|
for (PickingObjectDTO pickingObjectDTO : this.mPickingList.getValue()) {
|
||||||
pickingObjectDTO
|
pickingObjectDTO
|
||||||
.setTempPickData(null)
|
.setTempPickData(null);
|
||||||
.setHidden(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mPickingList.postValue(this.mPickingList.getValue());
|
this.mPickingList.postValue(this.mPickingList.getValue());
|
||||||
this.sendFilterRemoved();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addHistoryItem(@NonNull MtbColr mtbColr) {
|
private void addHistoryItem(@NonNull MtbColr mtbColr) {
|
||||||
@ -857,6 +892,10 @@ public class AccettazionePickingViewModel {
|
|||||||
if (this.mListener != null) mListener.onLoadingEnded();
|
if (this.mListener != null) mListener.onLoadingEnded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
|
if (this.mListener != null) this.mListener.onVersamentoAutomaticoULRequest(onComplete);
|
||||||
|
}
|
||||||
|
|
||||||
private void sendOnNoteAggiuntiveRequest(RunnableArgs<String> onComplete) {
|
private void sendOnNoteAggiuntiveRequest(RunnableArgs<String> onComplete) {
|
||||||
if (this.mListener != null) this.mListener.onNoteAggiuntiveRequest(onComplete);
|
if (this.mListener != null) this.mListener.onNoteAggiuntiveRequest(onComplete);
|
||||||
}
|
}
|
||||||
@ -925,26 +964,32 @@ public class AccettazionePickingViewModel {
|
|||||||
if (this.mListener != null) mListener.onRowSaved();
|
if (this.mListener != null) mListener.onRowSaved();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendFilterApplied(String newValue) {
|
private void sendFilterCodMartApplied(String codMart) {
|
||||||
if (this.mListener != null) mListener.onFilterApplied(newValue);
|
if (this.mListener != null) mListener.onFilterCodMartApplied(codMart);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendFilterRemoved() {
|
private void sendFilterPosizioneApplied(String posizione) {
|
||||||
if (this.mListener != null) mListener.onFilterRemoved();
|
if (this.mListener != null) mListener.onFilterPosizioneApplied(posizione);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
private void sendMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
if (this.mListener != null) mListener.onMtbColrDeleteRequest(onComplete);
|
if (this.mListener != null) mListener.onMtbColrDeleteRequest(onComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AccettazionePickingViewModel setListeners(AccettazionePickingViewModel.Listener
|
private void notifyVersamentoAutomaticoResult(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete) {
|
||||||
listener) {
|
if (this.mListener != null)
|
||||||
|
mListener.onULVersata(versamentoAutomaticoULResponseDTO, onComplete);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AccettazionePickingViewModel setListeners(AccettazionePickingViewModel.Listener listener) {
|
||||||
this.mListener = listener;
|
this.mListener = listener;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface Listener extends ILoadingListener, ILUPrintListener, ILUBaseOperationsListener {
|
public interface Listener extends ILoadingListener, ILUPrintListener, ILUBaseOperationsListener {
|
||||||
|
|
||||||
|
void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete);
|
||||||
|
|
||||||
void onNoteAggiuntiveRequest(RunnableArgs<String> onComplete);
|
void onNoteAggiuntiveRequest(RunnableArgs<String> onComplete);
|
||||||
|
|
||||||
void onError(Exception ex);
|
void onError(Exception ex);
|
||||||
@ -969,9 +1014,11 @@ public class AccettazionePickingViewModel {
|
|||||||
boolean canOverflowQuantity,
|
boolean canOverflowQuantity,
|
||||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||||
|
|
||||||
void onFilterApplied(String newValue);
|
void onFilterCodMartApplied(String codMartToFilter);
|
||||||
|
|
||||||
void onFilterRemoved();
|
void onFilterPosizioneApplied(String posizioneToFilter);
|
||||||
|
|
||||||
|
void onULVersata(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,12 +9,14 @@ import com.annimon.stream.function.Predicate;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.dto.PickingObjectDTO;
|
import it.integry.integrywmsnative.gest.accettazione_picking.dto.PickingObjectDTO;
|
||||||
|
|
||||||
public class AccettazionePickingFiltroOrdineViewModel {
|
public class AccettazionePickingFiltroOrdineViewModel {
|
||||||
|
|
||||||
private final ObservableField<Predicate<PickingObjectDTO>> currentCodArtPredicate = new ObservableField<>();
|
private final ObservableField<Predicate<PickingObjectDTO>> currentCodArtPredicate = new ObservableField<>();
|
||||||
private final ObservableField<Predicate<PickingObjectDTO>> currentDescrPredicate = new ObservableField<>();
|
private final ObservableField<Predicate<PickingObjectDTO>> currentDescrPredicate = new ObservableField<>();
|
||||||
|
private final ObservableField<Predicate<PickingObjectDTO>> currentPosPredicate = new ObservableField<>();
|
||||||
|
|
||||||
|
|
||||||
private List<PickingObjectDTO> initialOrderList;
|
private List<PickingObjectDTO> initialOrderList;
|
||||||
@ -30,7 +32,6 @@ public class AccettazionePickingFiltroOrdineViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setCodArtFilter(List<String> codArts) {
|
public void setCodArtFilter(List<String> codArts) {
|
||||||
if (codArts == null || codArts.isEmpty()) currentCodArtPredicate.set(null);
|
if (codArts == null || codArts.isEmpty()) currentCodArtPredicate.set(null);
|
||||||
else {
|
else {
|
||||||
@ -47,18 +48,28 @@ public class AccettazionePickingFiltroOrdineViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setPosFilter(List<String> pos) {
|
||||||
|
if (pos == null || pos.isEmpty()) currentPosPredicate.set(null);
|
||||||
|
else {
|
||||||
|
currentPosPredicate.set(o -> o.getMtbAart() != null && o.getMtbAart().getPosizione() == null ? pos.contains(null) : pos.contains(o.getMtbAart().getPosizione()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void applyAllTests() {
|
public void applyAllTests() {
|
||||||
|
|
||||||
List<PickingObjectDTO> returnList = null;
|
List<PickingObjectDTO> returnList = null;
|
||||||
|
|
||||||
if (currentCodArtPredicate.get() == null &&
|
if (currentCodArtPredicate.get() == null &&
|
||||||
currentDescrPredicate.get() == null) {
|
currentDescrPredicate.get() == null &&
|
||||||
|
currentPosPredicate.get() == null) {
|
||||||
returnList = this.initialOrderList;
|
returnList = this.initialOrderList;
|
||||||
} else {
|
} else {
|
||||||
Stream<PickingObjectDTO> tmpStream = Stream.of(this.initialOrderList)
|
Stream<PickingObjectDTO> tmpStream = Stream.of(this.initialOrderList)
|
||||||
.filter(x ->
|
.filter(x ->
|
||||||
(currentCodArtPredicate.get() == null || (currentCodArtPredicate.get().test(x))) &&
|
(currentCodArtPredicate.get() == null || (currentCodArtPredicate.get().test(x))) &&
|
||||||
(currentDescrPredicate.get() == null || (currentDescrPredicate.get().test(x)))
|
(currentDescrPredicate.get() == null || (currentDescrPredicate.get().test(x))) &&
|
||||||
|
(currentPosPredicate.get() == null || (currentPosPredicate.get().test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
returnList = tmpStream.toList();
|
returnList = tmpStream.toList();
|
||||||
@ -75,6 +86,10 @@ public class AccettazionePickingFiltroOrdineViewModel {
|
|||||||
return currentDescrPredicate;
|
return currentDescrPredicate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ObservableField<Predicate<PickingObjectDTO>> getCurrentPosPredicate() {
|
||||||
|
return currentPosPredicate;
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> getAllCodArts() {
|
public List<String> getAllCodArts() {
|
||||||
return Stream
|
return Stream
|
||||||
.of(Objects.requireNonNull(initialOrderList))
|
.of(Objects.requireNonNull(initialOrderList))
|
||||||
@ -87,12 +102,14 @@ public class AccettazionePickingFiltroOrdineViewModel {
|
|||||||
|
|
||||||
public List<String> getAvailableCodArts() {
|
public List<String> getAvailableCodArts() {
|
||||||
|
|
||||||
if (currentDescrPredicate.get() == null) {
|
if (currentDescrPredicate.get() == null &&
|
||||||
|
currentPosPredicate.get() == null) {
|
||||||
return getAllCodArts();
|
return getAllCodArts();
|
||||||
} else {
|
} else {
|
||||||
return Stream.of(this.initialOrderList)
|
return Stream.of(this.initialOrderList)
|
||||||
.filter(x ->
|
.filter(x ->
|
||||||
(currentDescrPredicate.get() == null || (currentDescrPredicate.get().test(x)))
|
(currentDescrPredicate.get() == null || (currentDescrPredicate.get().test(x))) &&
|
||||||
|
(currentPosPredicate.get() == null || (currentPosPredicate.get().test(x)))
|
||||||
)
|
)
|
||||||
.map(x -> x.getSitArtOrdDTO().getCodMart())
|
.map(x -> x.getSitArtOrdDTO().getCodMart())
|
||||||
.distinct()
|
.distinct()
|
||||||
@ -112,12 +129,14 @@ public class AccettazionePickingFiltroOrdineViewModel {
|
|||||||
|
|
||||||
public List<String> getAvailableDescrs() {
|
public List<String> getAvailableDescrs() {
|
||||||
|
|
||||||
if (currentCodArtPredicate.get() == null) {
|
if (currentCodArtPredicate.get() == null &&
|
||||||
|
currentPosPredicate.get() == null) {
|
||||||
return getAllDescrs();
|
return getAllDescrs();
|
||||||
} else {
|
} else {
|
||||||
return Stream.of(this.initialOrderList)
|
return Stream.of(this.initialOrderList)
|
||||||
.filter(x ->
|
.filter(x ->
|
||||||
(currentCodArtPredicate.get() == null || (currentCodArtPredicate.get().test(x)))
|
(currentCodArtPredicate.get() == null || (currentCodArtPredicate.get().test(x))) &&
|
||||||
|
(currentPosPredicate.get() == null || (currentPosPredicate.get().test(x)))
|
||||||
)
|
)
|
||||||
.map(x -> x.getSitArtOrdDTO().getDescrizioneEstesaArt())
|
.map(x -> x.getSitArtOrdDTO().getDescrizioneEstesaArt())
|
||||||
.distinct()
|
.distinct()
|
||||||
@ -125,4 +144,31 @@ public class AccettazionePickingFiltroOrdineViewModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getAllPos() {
|
||||||
|
return Stream
|
||||||
|
.of(Objects.requireNonNull(initialOrderList))
|
||||||
|
.filter(x -> x.getMtbAart() != null && x.getMtbAart().getPosizione() != null)
|
||||||
|
.sortBy(x -> UtilityString.isNull(x.getMtbAart().getPosizione(), "000000"))
|
||||||
|
.map(x -> x.getMtbAart().getPosizione() != null ? x.getMtbAart().getPosizione() : null)
|
||||||
|
.distinct()
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getAvailablePos() {
|
||||||
|
|
||||||
|
if (currentCodArtPredicate.get() == null &&
|
||||||
|
currentDescrPredicate.get() == null) {
|
||||||
|
return getAllPos();
|
||||||
|
} else {
|
||||||
|
return Stream.of(this.initialOrderList)
|
||||||
|
.filter(x ->
|
||||||
|
(currentCodArtPredicate.get() == null || (currentCodArtPredicate.get().test(x))) &&
|
||||||
|
(currentDescrPredicate.get() == null || (currentDescrPredicate.get().test(x)))
|
||||||
|
)
|
||||||
|
.map(x -> x.getMtbAart().getPosizione())
|
||||||
|
.distinct()
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,186 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_picking.filters;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import com.annimon.stream.ComparatorCompat;
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.BR;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBoolean;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.databinding.LayoutFilterPosizioneBinding;
|
||||||
|
import it.integry.integrywmsnative.ui.filter_chips.FilterLayoutView;
|
||||||
|
|
||||||
|
public class FilterPosizioneLayoutView extends FilterLayoutView {
|
||||||
|
|
||||||
|
protected LayoutFilterPosizioneBinding mBindings;
|
||||||
|
|
||||||
|
private List<String> all;
|
||||||
|
private List<String> available;
|
||||||
|
private List<String> preselected = new ArrayList<>();
|
||||||
|
private List<String> hidden = new ArrayList<>();
|
||||||
|
private final MutableLiveData<List<ListModel>> listModel = new MutableLiveData<>();
|
||||||
|
|
||||||
|
private RunnableArgs<List<String>> onFilterApplied;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
mBindings = DataBindingUtil.inflate(inflater, R.layout.layout_filter_posizione, container, false);
|
||||||
|
this.mBindings.setView(this);
|
||||||
|
|
||||||
|
refreshList();
|
||||||
|
|
||||||
|
this.setSearchView(this.mBindings.searchView, newFilter -> {
|
||||||
|
hidden = Stream.of(all)
|
||||||
|
.filter(x -> !x.toUpperCase(Locale.ROOT).contains(newFilter.toUpperCase(Locale.ROOT)) &&
|
||||||
|
!x.toUpperCase(Locale.ROOT).contains(newFilter.toUpperCase(Locale.ROOT)))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
refreshList();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
new LiveAdapter(listModel, getViewLifecycleOwner(), BR.item)
|
||||||
|
.map(ListModel.class, R.layout.layout_filter_posizione__list_item)
|
||||||
|
.into(this.mBindings.recyclerview);
|
||||||
|
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void onConfirm() {
|
||||||
|
if (onFilterApplied == null) return;
|
||||||
|
|
||||||
|
this.onFilterApplied.run(Stream.of(Objects.requireNonNull(listModel.getValue()))
|
||||||
|
.filter(x -> x.selected.get())
|
||||||
|
.map(x -> x.originalModel)
|
||||||
|
.toList());
|
||||||
|
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshList() {
|
||||||
|
ComparatorCompat<ListModel> c =
|
||||||
|
ComparatorCompat
|
||||||
|
.chain(new ComparatorCompat<ListModel>((x, y) -> UtilityBoolean.toInt(x.getSelected().get()) - UtilityBoolean.toInt(y.getSelected().get())))
|
||||||
|
.thenComparing(new ComparatorCompat<>((x, y) -> UtilityBoolean.toInt(x.getEnabled().get()) - UtilityBoolean.toInt(y.getEnabled().get())))
|
||||||
|
.thenComparing(new ComparatorCompat<>((x, y) ->
|
||||||
|
UtilityString.isNull(y.getOriginalModel(), "000000").compareToIgnoreCase(UtilityString.isNull(x.getOriginalModel(), "000000"))))
|
||||||
|
.reversed();
|
||||||
|
|
||||||
|
|
||||||
|
listModel.setValue(Stream.of(getAll())
|
||||||
|
.filter(x -> !hidden.contains(x))
|
||||||
|
.map(x -> {
|
||||||
|
var selectedBoolean = new BindableBoolean(preselected.contains(x));
|
||||||
|
selectedBoolean.addOnPropertyChangedCallback(() -> {
|
||||||
|
if (selectedBoolean.get()) preselected.add(x);
|
||||||
|
else preselected.remove(x);
|
||||||
|
});
|
||||||
|
|
||||||
|
return new ListModel()
|
||||||
|
.setSelected(selectedBoolean)
|
||||||
|
.setEnabled(new BindableBoolean(available.contains(x)))
|
||||||
|
.setOriginalModel(x);
|
||||||
|
})
|
||||||
|
.sorted(c)
|
||||||
|
.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getAll() {
|
||||||
|
return all;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterPosizioneLayoutView setAll(List<String> all) {
|
||||||
|
this.all = all;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getAvailable() {
|
||||||
|
return available;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterPosizioneLayoutView setAvailable(List<String> available) {
|
||||||
|
this.available = available;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getPreselected() {
|
||||||
|
return preselected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterPosizioneLayoutView setPreselected(List<String> preselected) {
|
||||||
|
this.preselected = preselected;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RunnableArgs<List<String>> getOnFilterApplied() {
|
||||||
|
return onFilterApplied;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterPosizioneLayoutView setOnFilterApplied(RunnableArgs<List<String>> onFilterApplied) {
|
||||||
|
this.onFilterApplied = onFilterApplied;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getHidden() {
|
||||||
|
return hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterPosizioneLayoutView setHidden(List<String> hidden) {
|
||||||
|
this.hidden = hidden;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ListModel {
|
||||||
|
private BindableBoolean selected = new BindableBoolean();
|
||||||
|
private BindableBoolean enabled = new BindableBoolean();
|
||||||
|
private String originalModel;
|
||||||
|
|
||||||
|
public BindableBoolean getSelected() {
|
||||||
|
return selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListModel setSelected(BindableBoolean selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableBoolean getEnabled() {
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListModel setEnabled(BindableBoolean enabled) {
|
||||||
|
this.enabled = enabled;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListModel setOriginalModel(String originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -851,8 +851,10 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
|
|
||||||
private void initMtbGrupsCache(Runnable onComplete) {
|
private void initMtbGrupsCache(Runnable onComplete) {
|
||||||
var codMgrpArts = Stream.of(Objects.requireNonNull(this.mViewModel.getOrderList().getValue()))
|
var codMgrpArts = Stream.of(Objects.requireNonNull(this.mViewModel.getOrderList().getValue()))
|
||||||
.flatMap(x -> Stream.of(x.getAvailableClassMerc()))
|
.flatMap(x -> Stream.of(x.getAvailableClassMerc() != null ? x.getAvailableClassMerc() : new ArrayList<>()))
|
||||||
.map(OrdineUscitaInevasoDTO.AvailableClassMerc::getCodMgrp)
|
.map(OrdineUscitaInevasoDTO.AvailableClassMerc::getCodMgrp)
|
||||||
|
.withoutNulls()
|
||||||
|
.distinct()
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
this.mArticoloRESTConsumer.getArtsGroups(codMgrpArts, mtbGrupCache -> {
|
this.mArticoloRESTConsumer.getArtsGroups(codMgrpArts, mtbGrupCache -> {
|
||||||
|
|||||||
@ -648,7 +648,10 @@ public class VenditaFiltroOrdiniViewModel {
|
|||||||
|
|
||||||
public List<MtbGrup> getAllGruppoMerc(List<MtbGrup> mtbGrupFullList) {
|
public List<MtbGrup> getAllGruppoMerc(List<MtbGrup> mtbGrupFullList) {
|
||||||
var codMgrp = Stream.of(initialOrderList)
|
var codMgrp = Stream.of(initialOrderList)
|
||||||
.flatMap(ordiniUscitaElencoDTO -> Stream.of(ordiniUscitaElencoDTO.getAvailableClassMerc()))
|
.flatMap(ordiniUscitaElencoDTO ->
|
||||||
|
Stream.of(ordiniUscitaElencoDTO.getAvailableClassMerc() != null ?
|
||||||
|
ordiniUscitaElencoDTO.getAvailableClassMerc() :
|
||||||
|
new ArrayList<>()))
|
||||||
.map(OrdineUscitaInevasoDTO.AvailableClassMerc::getCodMgrp)
|
.map(OrdineUscitaInevasoDTO.AvailableClassMerc::getCodMgrp)
|
||||||
.withoutNulls()
|
.withoutNulls()
|
||||||
.distinct()
|
.distinct()
|
||||||
|
|||||||
@ -276,8 +276,8 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNoteAggiuntiveRequired(RunnableArgs<String> onComplete, Runnable onAbort) {
|
public void onNoteAggiuntiveRequired(RunnableArgs<String> onComplete) {
|
||||||
NoteAggiuntiveLUDialog.make(this, onComplete, onAbort).show();
|
NoteAggiuntiveLUDialog.make(this, onComplete).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -185,9 +185,6 @@ public class PickingResiViewModel {
|
|||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|
||||||
}, () -> {
|
|
||||||
this.sendLUClosed();
|
|
||||||
this.sendOnLoadingEnded();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
@ -720,8 +717,8 @@ public class PickingResiViewModel {
|
|||||||
return mPickingList;
|
return mPickingList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendOnNoteAggiuntiveRequired(RunnableArgs<String> onComplete, Runnable onAbort) {
|
private void sendOnNoteAggiuntiveRequired(RunnableArgs<String> onComplete) {
|
||||||
if (this.mListener != null) this.mListener.onNoteAggiuntiveRequired(onComplete, onAbort);
|
if (this.mListener != null) this.mListener.onNoteAggiuntiveRequired(onComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendOnLoadingStarted() {
|
private void sendOnLoadingStarted() {
|
||||||
@ -798,7 +795,7 @@ public class PickingResiViewModel {
|
|||||||
|
|
||||||
public interface Listener extends ILUPrintListener, ILoadingListener, ILUBaseOperationsListener {
|
public interface Listener extends ILUPrintListener, ILoadingListener, ILUBaseOperationsListener {
|
||||||
|
|
||||||
void onNoteAggiuntiveRequired(RunnableArgs<String> onComplete, Runnable onAbort);
|
void onNoteAggiuntiveRequired(RunnableArgs<String> onComplete);
|
||||||
|
|
||||||
void onError(Exception ex);
|
void onError(Exception ex);
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ public class PickingResiRESTConsumer {
|
|||||||
|
|
||||||
|
|
||||||
if(onComplete != null) onComplete.run(values);
|
if(onComplete != null) onComplete.run(values);
|
||||||
}
|
} else onComplete.run(new ArrayList<>());
|
||||||
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
|
|
||||||
|
|||||||
@ -174,7 +174,7 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
private void getEmptyPickingList(List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<PickingObjectDTO>> onComplete) {
|
private void getEmptyPickingList(List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<PickingObjectDTO>> onComplete) {
|
||||||
List<String> codMarts = Stream.of(sitArtOrdList)
|
List<String> codMarts = Stream.of(sitArtOrdList)
|
||||||
.map(SitArtOrdDTO::getCodMart)
|
.map(x -> x.getCodMart().trim())
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
this.mArticoloRESTConsumer.getByCodMarts(codMarts, listMtbAarts -> {
|
this.mArticoloRESTConsumer.getByCodMarts(codMarts, listMtbAarts -> {
|
||||||
@ -183,7 +183,7 @@ public class SpedizioneViewModel {
|
|||||||
MtbAart mtbAart = null;
|
MtbAart mtbAart = null;
|
||||||
|
|
||||||
for (MtbAart mtbAartItem : listMtbAarts) {
|
for (MtbAart mtbAartItem : listMtbAarts) {
|
||||||
if (mtbAartItem.getCodMart().equalsIgnoreCase(sitArtOrdDTO.getCodMart())) {
|
if (mtbAartItem.getCodMart().trim().equalsIgnoreCase(sitArtOrdDTO.getCodMart().trim())) {
|
||||||
mtbAart = mtbAartItem;
|
mtbAart = mtbAartItem;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,333 @@
|
|||||||
|
package it.integry.integrywmsnative.ui.expandablelayout;
|
||||||
|
|
||||||
|
import static it.integry.integrywmsnative.ui.expandablelayout.ExpandableLayout.State.COLLAPSED;
|
||||||
|
import static it.integry.integrywmsnative.ui.expandablelayout.ExpandableLayout.State.COLLAPSING;
|
||||||
|
import static it.integry.integrywmsnative.ui.expandablelayout.ExpandableLayout.State.EXPANDED;
|
||||||
|
import static it.integry.integrywmsnative.ui.expandablelayout.ExpandableLayout.State.EXPANDING;
|
||||||
|
|
||||||
|
import android.animation.Animator;
|
||||||
|
import android.animation.AnimatorListenerAdapter;
|
||||||
|
import android.animation.ValueAnimator;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.res.Configuration;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.animation.Interpolator;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
|
||||||
|
public class ExpandableLayout extends FrameLayout {
|
||||||
|
public interface State {
|
||||||
|
int COLLAPSED = 0;
|
||||||
|
int COLLAPSING = 1;
|
||||||
|
int EXPANDING = 2;
|
||||||
|
int EXPANDED = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final String KEY_SUPER_STATE = "super_state";
|
||||||
|
public static final String KEY_EXPANSION = "expansion";
|
||||||
|
|
||||||
|
public static final int HORIZONTAL = 0;
|
||||||
|
public static final int VERTICAL = 1;
|
||||||
|
|
||||||
|
private static final int DEFAULT_DURATION = 300;
|
||||||
|
|
||||||
|
private int duration = DEFAULT_DURATION;
|
||||||
|
private float parallax;
|
||||||
|
private float expansion;
|
||||||
|
private int orientation;
|
||||||
|
private int state;
|
||||||
|
|
||||||
|
private Interpolator interpolator = new FastOutSlowInInterpolator();
|
||||||
|
private ValueAnimator animator;
|
||||||
|
|
||||||
|
private ExpandableLayout.OnExpansionUpdateListener listener;
|
||||||
|
|
||||||
|
public ExpandableLayout(Context context) {
|
||||||
|
this(context, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExpandableLayout(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
|
||||||
|
if (attrs != null) {
|
||||||
|
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ExpandableLayout);
|
||||||
|
duration = a.getInt(R.styleable.ExpandableLayout_el_duration, DEFAULT_DURATION);
|
||||||
|
expansion = a.getBoolean(R.styleable.ExpandableLayout_el_expanded, false) ? 1 : 0;
|
||||||
|
orientation = a.getInt(R.styleable.ExpandableLayout_android_orientation, VERTICAL);
|
||||||
|
parallax = a.getFloat(R.styleable.ExpandableLayout_el_parallax, 1);
|
||||||
|
a.recycle();
|
||||||
|
|
||||||
|
state = expansion == 0 ? COLLAPSED : EXPANDED;
|
||||||
|
setParallax(parallax);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Parcelable onSaveInstanceState() {
|
||||||
|
Parcelable superState = super.onSaveInstanceState();
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
|
||||||
|
expansion = isExpanded() ? 1 : 0;
|
||||||
|
|
||||||
|
bundle.putFloat(KEY_EXPANSION, expansion);
|
||||||
|
bundle.putParcelable(KEY_SUPER_STATE, superState);
|
||||||
|
|
||||||
|
return bundle;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onRestoreInstanceState(Parcelable parcelable) {
|
||||||
|
Bundle bundle = (Bundle) parcelable;
|
||||||
|
expansion = bundle.getFloat(KEY_EXPANSION);
|
||||||
|
state = expansion == 1 ? EXPANDED : COLLAPSED;
|
||||||
|
Parcelable superState = bundle.getParcelable(KEY_SUPER_STATE);
|
||||||
|
|
||||||
|
super.onRestoreInstanceState(superState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||||
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||||
|
|
||||||
|
int width = getMeasuredWidth();
|
||||||
|
int height = getMeasuredHeight();
|
||||||
|
|
||||||
|
int size = orientation == LinearLayout.HORIZONTAL ? width : height;
|
||||||
|
|
||||||
|
setVisibility(expansion == 0 && size == 0 ? GONE : VISIBLE);
|
||||||
|
|
||||||
|
int expansionDelta = size - Math.round(size * expansion);
|
||||||
|
if (parallax > 0) {
|
||||||
|
float parallaxDelta = expansionDelta * parallax;
|
||||||
|
for (int i = 0; i < getChildCount(); i++) {
|
||||||
|
View child = getChildAt(i);
|
||||||
|
if (orientation == HORIZONTAL) {
|
||||||
|
int direction = -1;
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1 && getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
|
||||||
|
direction = 1;
|
||||||
|
}
|
||||||
|
child.setTranslationX(direction * parallaxDelta);
|
||||||
|
} else {
|
||||||
|
child.setTranslationY(-parallaxDelta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (orientation == HORIZONTAL) {
|
||||||
|
setMeasuredDimension(width - expansionDelta, height);
|
||||||
|
} else {
|
||||||
|
setMeasuredDimension(width, height - expansionDelta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onConfigurationChanged(Configuration newConfig) {
|
||||||
|
if (animator != null) {
|
||||||
|
animator.cancel();
|
||||||
|
}
|
||||||
|
super.onConfigurationChanged(newConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get expansion state
|
||||||
|
*
|
||||||
|
* @return one of {@link ExpandableLayout.State}
|
||||||
|
*/
|
||||||
|
public int getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isExpanded() {
|
||||||
|
return state == EXPANDING || state == EXPANDED;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void toggle() {
|
||||||
|
toggle(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void toggle(boolean animate) {
|
||||||
|
if (isExpanded()) {
|
||||||
|
collapse(animate);
|
||||||
|
} else {
|
||||||
|
expand(animate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void expand() {
|
||||||
|
expand(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void expand(boolean animate) {
|
||||||
|
setExpanded(true, animate);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void collapse() {
|
||||||
|
collapse(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void collapse(boolean animate) {
|
||||||
|
setExpanded(false, animate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method - same as calling setExpanded(expanded, true)
|
||||||
|
*/
|
||||||
|
public void setExpanded(boolean expand) {
|
||||||
|
setExpanded(expand, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpanded(boolean expand, boolean animate) {
|
||||||
|
if (expand == isExpanded()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int targetExpansion = expand ? 1 : 0;
|
||||||
|
if (animate) {
|
||||||
|
animateSize(targetExpansion);
|
||||||
|
} else {
|
||||||
|
setExpansion(targetExpansion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInterpolator(Interpolator interpolator) {
|
||||||
|
this.interpolator = interpolator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDuration(int duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getExpansion() {
|
||||||
|
return expansion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpansion(float expansion) {
|
||||||
|
if (this.expansion == expansion) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Infer state from previous value
|
||||||
|
float delta = expansion - this.expansion;
|
||||||
|
if (expansion == 0) {
|
||||||
|
state = COLLAPSED;
|
||||||
|
} else if (expansion == 1) {
|
||||||
|
state = EXPANDED;
|
||||||
|
} else if (delta < 0) {
|
||||||
|
state = COLLAPSING;
|
||||||
|
} else if (delta > 0) {
|
||||||
|
state = EXPANDING;
|
||||||
|
}
|
||||||
|
|
||||||
|
setVisibility(state == COLLAPSED ? GONE : VISIBLE);
|
||||||
|
this.expansion = expansion;
|
||||||
|
requestLayout();
|
||||||
|
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onExpansionUpdate(expansion, state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getParallax() {
|
||||||
|
return parallax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParallax(float parallax) {
|
||||||
|
// Make sure parallax is between 0 and 1
|
||||||
|
parallax = Math.min(1, Math.max(0, parallax));
|
||||||
|
this.parallax = parallax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getOrientation() {
|
||||||
|
return orientation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrientation(int orientation) {
|
||||||
|
if (orientation < 0 || orientation > 1) {
|
||||||
|
throw new IllegalArgumentException("Orientation must be either 0 (horizontal) or 1 (vertical)");
|
||||||
|
}
|
||||||
|
this.orientation = orientation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnExpansionUpdateListener(ExpandableLayout.OnExpansionUpdateListener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void animateSize(int targetExpansion) {
|
||||||
|
if (animator != null) {
|
||||||
|
animator.cancel();
|
||||||
|
animator = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||||
|
|
||||||
|
animator = ValueAnimator.ofFloat(expansion, targetExpansion);
|
||||||
|
animator.setInterpolator(interpolator);
|
||||||
|
animator.setDuration(duration);
|
||||||
|
|
||||||
|
animator.addUpdateListener(valueAnimator -> setExpansion((float) valueAnimator.getAnimatedValue()));
|
||||||
|
animator.addListener(new AnimatorListenerAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
super.onAnimationEnd(animation);
|
||||||
|
|
||||||
|
setLayerType(View.LAYER_TYPE_NONE, null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
animator.addListener(new ExpandableLayout.ExpansionListener(targetExpansion));
|
||||||
|
|
||||||
|
animator.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnExpansionUpdateListener {
|
||||||
|
/**
|
||||||
|
* Callback for expansion updates
|
||||||
|
*
|
||||||
|
* @param expansionFraction Value between 0 (collapsed) and 1 (expanded) representing the the expansion progress
|
||||||
|
* @param state One of {@link ExpandableLayout.State} repesenting the current expansion state
|
||||||
|
*/
|
||||||
|
void onExpansionUpdate(float expansionFraction, int state);
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ExpansionListener implements Animator.AnimatorListener {
|
||||||
|
private int targetExpansion;
|
||||||
|
private boolean canceled;
|
||||||
|
|
||||||
|
public ExpansionListener(int targetExpansion) {
|
||||||
|
this.targetExpansion = targetExpansion;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationStart(Animator animation) {
|
||||||
|
state = targetExpansion == 0 ? COLLAPSING : EXPANDING;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
if (!canceled) {
|
||||||
|
state = targetExpansion == 0 ? COLLAPSED : EXPANDED;
|
||||||
|
setExpansion(targetExpansion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationCancel(Animator animation) {
|
||||||
|
canceled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationRepeat(Animator animation) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
package it.integry.integrywmsnative.ui.expandablelayout;
|
||||||
|
|
||||||
|
public class FastOutSlowInInterpolator extends LookupTableInterpolator {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lookup table values sampled with x at regular intervals between 0 and 1 for a total of
|
||||||
|
* 201 points.
|
||||||
|
*/
|
||||||
|
private static final float[] VALUES = new float[] {
|
||||||
|
0.0000f, 0.0001f, 0.0002f, 0.0005f, 0.0009f, 0.0014f, 0.0020f,
|
||||||
|
0.0027f, 0.0036f, 0.0046f, 0.0058f, 0.0071f, 0.0085f, 0.0101f,
|
||||||
|
0.0118f, 0.0137f, 0.0158f, 0.0180f, 0.0205f, 0.0231f, 0.0259f,
|
||||||
|
0.0289f, 0.0321f, 0.0355f, 0.0391f, 0.0430f, 0.0471f, 0.0514f,
|
||||||
|
0.0560f, 0.0608f, 0.0660f, 0.0714f, 0.0771f, 0.0830f, 0.0893f,
|
||||||
|
0.0959f, 0.1029f, 0.1101f, 0.1177f, 0.1257f, 0.1339f, 0.1426f,
|
||||||
|
0.1516f, 0.1610f, 0.1707f, 0.1808f, 0.1913f, 0.2021f, 0.2133f,
|
||||||
|
0.2248f, 0.2366f, 0.2487f, 0.2611f, 0.2738f, 0.2867f, 0.2998f,
|
||||||
|
0.3131f, 0.3265f, 0.3400f, 0.3536f, 0.3673f, 0.3810f, 0.3946f,
|
||||||
|
0.4082f, 0.4217f, 0.4352f, 0.4485f, 0.4616f, 0.4746f, 0.4874f,
|
||||||
|
0.5000f, 0.5124f, 0.5246f, 0.5365f, 0.5482f, 0.5597f, 0.5710f,
|
||||||
|
0.5820f, 0.5928f, 0.6033f, 0.6136f, 0.6237f, 0.6335f, 0.6431f,
|
||||||
|
0.6525f, 0.6616f, 0.6706f, 0.6793f, 0.6878f, 0.6961f, 0.7043f,
|
||||||
|
0.7122f, 0.7199f, 0.7275f, 0.7349f, 0.7421f, 0.7491f, 0.7559f,
|
||||||
|
0.7626f, 0.7692f, 0.7756f, 0.7818f, 0.7879f, 0.7938f, 0.7996f,
|
||||||
|
0.8053f, 0.8108f, 0.8162f, 0.8215f, 0.8266f, 0.8317f, 0.8366f,
|
||||||
|
0.8414f, 0.8461f, 0.8507f, 0.8551f, 0.8595f, 0.8638f, 0.8679f,
|
||||||
|
0.8720f, 0.8760f, 0.8798f, 0.8836f, 0.8873f, 0.8909f, 0.8945f,
|
||||||
|
0.8979f, 0.9013f, 0.9046f, 0.9078f, 0.9109f, 0.9139f, 0.9169f,
|
||||||
|
0.9198f, 0.9227f, 0.9254f, 0.9281f, 0.9307f, 0.9333f, 0.9358f,
|
||||||
|
0.9382f, 0.9406f, 0.9429f, 0.9452f, 0.9474f, 0.9495f, 0.9516f,
|
||||||
|
0.9536f, 0.9556f, 0.9575f, 0.9594f, 0.9612f, 0.9629f, 0.9646f,
|
||||||
|
0.9663f, 0.9679f, 0.9695f, 0.9710f, 0.9725f, 0.9739f, 0.9753f,
|
||||||
|
0.9766f, 0.9779f, 0.9791f, 0.9803f, 0.9815f, 0.9826f, 0.9837f,
|
||||||
|
0.9848f, 0.9858f, 0.9867f, 0.9877f, 0.9885f, 0.9894f, 0.9902f,
|
||||||
|
0.9910f, 0.9917f, 0.9924f, 0.9931f, 0.9937f, 0.9944f, 0.9949f,
|
||||||
|
0.9955f, 0.9960f, 0.9964f, 0.9969f, 0.9973f, 0.9977f, 0.9980f,
|
||||||
|
0.9984f, 0.9986f, 0.9989f, 0.9991f, 0.9993f, 0.9995f, 0.9997f,
|
||||||
|
0.9998f, 0.9999f, 0.9999f, 1.0000f, 1.0000f
|
||||||
|
};
|
||||||
|
|
||||||
|
public FastOutSlowInInterpolator() {
|
||||||
|
super(VALUES);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package it.integry.integrywmsnative.ui.expandablelayout;
|
||||||
|
|
||||||
|
import android.view.animation.Interpolator;
|
||||||
|
|
||||||
|
abstract class LookupTableInterpolator implements Interpolator {
|
||||||
|
|
||||||
|
private final float[] mValues;
|
||||||
|
private final float mStepSize;
|
||||||
|
|
||||||
|
public LookupTableInterpolator(float[] values) {
|
||||||
|
mValues = values;
|
||||||
|
mStepSize = 1f / (mValues.length - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getInterpolation(float input) {
|
||||||
|
if (input >= 1.0f) {
|
||||||
|
return 1.0f;
|
||||||
|
}
|
||||||
|
if (input <= 0f) {
|
||||||
|
return 0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate index - We use min with length - 2 to avoid IndexOutOfBoundsException when
|
||||||
|
// we lerp (linearly interpolate) in the return statement
|
||||||
|
int position = Math.min((int) (input * (mValues.length - 1)), mValues.length - 2);
|
||||||
|
|
||||||
|
// Calculate values to account for small offsets as the lookup table has discrete values
|
||||||
|
float quantized = position * mStepSize;
|
||||||
|
float diff = input - quantized;
|
||||||
|
float weight = diff / mStepSize;
|
||||||
|
|
||||||
|
// Linearly interpolate between the table values
|
||||||
|
return mValues[position] + weight * (mValues[position + 1] - mValues[position]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -77,12 +77,14 @@ public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseVie
|
|||||||
this.mViewModel.getObservableMtbColt().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
this.mViewModel.getObservableMtbColt().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||||
if(mViewModel.getObservableMtbColt().get() != null) {
|
var mtbColt = mViewModel.getObservableMtbColt().get();
|
||||||
|
|
||||||
|
if(mtbColt != null) {
|
||||||
initAdapter();
|
initAdapter();
|
||||||
|
|
||||||
onMtbColrItemChanged();
|
onMtbColrItemChanged();
|
||||||
|
|
||||||
mViewModel.getObservableMtbColt().get().getMtbColr().addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
mtbColt.getMtbColr().addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(ObservableList sender) {
|
public void onChanged(ObservableList sender) {
|
||||||
onMtbColrItemChanged();
|
onMtbColrItemChanged();
|
||||||
|
|||||||
@ -0,0 +1,75 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.ask_should_versamento_automatico_ul;
|
||||||
|
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogAskShouldVersamentoAutomaticoUlBinding;
|
||||||
|
|
||||||
|
public class DialogAskShouldVersamentoAutomaticoULView extends BaseDialogFragment {
|
||||||
|
|
||||||
|
private RunnableArgs<Boolean> mOnDismiss;
|
||||||
|
private DialogAskShouldVersamentoAutomaticoUlBinding mBindings;
|
||||||
|
|
||||||
|
private boolean returnValue = false;
|
||||||
|
|
||||||
|
public static DialogAskShouldVersamentoAutomaticoULView newInstance(@NotNull RunnableArgs<Boolean> onDismiss) {
|
||||||
|
return new DialogAskShouldVersamentoAutomaticoULView(onDismiss);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DialogAskShouldVersamentoAutomaticoULView(@NotNull RunnableArgs<Boolean> onDismiss) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.mOnDismiss = onDismiss;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_should_versamento_automatico_ul, container, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
getDialog().setCanceledOnTouchOutside(false);
|
||||||
|
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||||
|
|
||||||
|
mBindings.setView(this);
|
||||||
|
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
|
super.onDismiss(dialog);
|
||||||
|
|
||||||
|
if (mOnDismiss != null) {
|
||||||
|
this.mOnDismiss.run(returnValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void confirm() {
|
||||||
|
this.returnValue = true;
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void abort() {
|
||||||
|
this.returnValue = false;
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -10,21 +10,23 @@ import android.view.LayoutInflater;
|
|||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||||
import it.integry.integrywmsnative.databinding.DialogNoteAggiuntiveNuovaUlBinding;
|
import it.integry.integrywmsnative.databinding.DialogNoteAggiuntiveNuovaUlBinding;
|
||||||
|
|
||||||
public class NoteAggiuntiveLUDialog {
|
public class NoteAggiuntiveLUDialog {
|
||||||
|
|
||||||
private Dialog mDialog;
|
private Dialog mDialog;
|
||||||
|
|
||||||
public static Dialog make(Context context, final RunnableArgs<String> onComplete, final Runnable onAbort) {
|
public static Dialog make(Context context, final RunnableArgs<String> onComplete) {
|
||||||
return new NoteAggiuntiveLUDialog(context, onComplete, onAbort).mDialog;
|
return new NoteAggiuntiveLUDialog(context, onComplete).mDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
private NoteAggiuntiveLUDialog(Context context, final RunnableArgs<String> onComplete, final Runnable onAbort){
|
private NoteAggiuntiveLUDialog(Context context, final RunnableArgs<String> onComplete){
|
||||||
|
|
||||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||||
DialogNoteAggiuntiveNuovaUlBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_note_aggiuntive_nuova_ul, null, false);
|
DialogNoteAggiuntiveNuovaUlBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_note_aggiuntive_nuova_ul, null, false);
|
||||||
|
|
||||||
|
|
||||||
mDialog = new Dialog(context);
|
mDialog = new Dialog(context);
|
||||||
mDialog.setContentView(bindings.getRoot());
|
mDialog.setContentView(bindings.getRoot());
|
||||||
|
|
||||||
@ -32,17 +34,14 @@ public class NoteAggiuntiveLUDialog {
|
|||||||
mDialog.setCancelable(false);
|
mDialog.setCancelable(false);
|
||||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
|
UtilityDialog.setTo90PercentWidth(context, mDialog);
|
||||||
|
|
||||||
|
|
||||||
bindings.buttonConfirm.setOnClickListener(v -> {
|
bindings.buttonConfirm.setOnClickListener(v -> {
|
||||||
mDialog.dismiss();
|
mDialog.dismiss();
|
||||||
if(onComplete != null) onComplete.run(bindings.additionalNotesText.getText().toString());
|
if(onComplete != null) onComplete.run(bindings.additionalNotesText.getText().toString());
|
||||||
});
|
});
|
||||||
|
|
||||||
bindings.buttonAbort.setOnClickListener(v -> {
|
|
||||||
mDialog.dismiss();
|
|
||||||
if(onAbort != null) onAbort.run();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,170 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.versamento_automatico_ul_done;
|
||||||
|
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogVersamentoAutomaticoUlDoneBinding;
|
||||||
|
|
||||||
|
public class DialogVersamentoAutomaticoULDoneView extends BaseDialogFragment {
|
||||||
|
|
||||||
|
public final VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO;
|
||||||
|
private final Runnable mOnDismiss;
|
||||||
|
|
||||||
|
private DialogVersamentoAutomaticoUlDoneBinding mBindings;
|
||||||
|
|
||||||
|
public static DialogVersamentoAutomaticoULDoneView newInstance(@NotNull VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, @NotNull Runnable onDismiss) {
|
||||||
|
return new DialogVersamentoAutomaticoULDoneView(versamentoAutomaticoULResponseDTO, onDismiss);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DialogVersamentoAutomaticoULDoneView(@NotNull VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, @NotNull Runnable onDismiss) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.versamentoAutomaticoULResponseDTO = versamentoAutomaticoULResponseDTO;
|
||||||
|
this.mOnDismiss = onDismiss;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_versamento_automatico_ul_done, container, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
getDialog().setCanceledOnTouchOutside(false);
|
||||||
|
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||||
|
|
||||||
|
UtilityDialog.setTo95PercentWidth(requireContext(), this);
|
||||||
|
|
||||||
|
mBindings.setView(this);
|
||||||
|
|
||||||
|
this.initTitle();
|
||||||
|
this.initContent();
|
||||||
|
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
|
super.onDismiss(dialog);
|
||||||
|
|
||||||
|
if (mOnDismiss != null) {
|
||||||
|
this.mOnDismiss.run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void initTitle() {
|
||||||
|
int colorBackgroundTitle = -1;
|
||||||
|
|
||||||
|
if (versamentoAutomaticoULResponseDTO.getFailed() == null || versamentoAutomaticoULResponseDTO.getFailed().isEmpty()) {
|
||||||
|
//SUCCESS
|
||||||
|
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.green_300);
|
||||||
|
} else {
|
||||||
|
//WARNING
|
||||||
|
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.yellow_600);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mBindings.base.setBackgroundColor(colorBackgroundTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initContent() {
|
||||||
|
String text;
|
||||||
|
|
||||||
|
if (versamentoAutomaticoULResponseDTO.getFailed() == null || versamentoAutomaticoULResponseDTO.getFailed().isEmpty()) {
|
||||||
|
//SUCCESS
|
||||||
|
text = "Versamento completato con successo";
|
||||||
|
} else {
|
||||||
|
//WARNING
|
||||||
|
text = "Il sistema non è riuscito a versare <b>" + versamentoAutomaticoULResponseDTO.getFailed().size() +
|
||||||
|
" " + getResources().getQuantityString(R.plurals.articles, versamentoAutomaticoULResponseDTO.getFailed().size()) + "</b>";
|
||||||
|
}
|
||||||
|
|
||||||
|
mBindings.descriptionText.setText(Html.fromHtml(text));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// var notCompletedListAdapter = new BaseAdapter() {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
//
|
||||||
|
// var mtbColr = versamentoAutomaticoULResponseDTO.getFailed().get(position);
|
||||||
|
//
|
||||||
|
// var inflater = LayoutInflater.from(requireContext());
|
||||||
|
// DialogVersamentoAutomaticoUlDoneNotCompletedListItemBinding binding = null;
|
||||||
|
//
|
||||||
|
// if(convertView == null) {
|
||||||
|
// binding = DataBindingUtil.inflate(inflater, R.layout.dialog_versamento_automatico_ul_done__not_completed_list_item, parent, false);
|
||||||
|
// } else {
|
||||||
|
// binding = DataBindingUtil.findBinding(convertView);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// binding.setItem(mtbColr);
|
||||||
|
//
|
||||||
|
// convertView = binding.getRoot();
|
||||||
|
//
|
||||||
|
// //Setting qty with unt_mis
|
||||||
|
// if (!SettingsManager.iDB().isFlagForceAllToColli() && (mtbColr.getMtbAart() == null || mtbColr.getMtbAart().isFlagQtaCnfFissaBoolean())) {
|
||||||
|
// String text = UtilityNumber.decimalToString(mtbColr.getQtaCol());
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// if (mtbColr.getMtbAart() != null) {
|
||||||
|
// text += !UtilityString.isNullOrEmpty(mtbColr.getMtbAart().getUntMis()) ? "\n" + mtbColr.getMtbAart().getUntMis() : "";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// binding.qtaTextview.setText(text);
|
||||||
|
// } else {
|
||||||
|
// binding.qtaTextview.setText(UtilityNumber.decimalToString(mtbColr.getNumCnf()) + "\n" + UtilityResources.getString(R.string.unt_mis_col));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return convertView;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public long getItemId(int position) {
|
||||||
|
// return position;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public Object getItem(int position) {
|
||||||
|
// return position;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public int getCount() {
|
||||||
|
// return versamentoAutomaticoULResponseDTO.getFailed().size();
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// mBindings.detailsNotCompletedList.setAdapter(notCompletedListAdapter);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// public void toggleDetailVisibility() {
|
||||||
|
// mBindings.detailsContainer.toggle(true);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,9 +0,0 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
|
||||||
<solid android:color="@android:color/white" />
|
|
||||||
<stroke android:width="1dip" android:color="#969696"/>
|
|
||||||
|
|
||||||
<!-- The radius makes the corners rounded -->
|
|
||||||
<corners
|
|
||||||
android:radius="8dp" >
|
|
||||||
</corners>
|
|
||||||
</shape>
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
|
||||||
|
|
||||||
<solid android:color="#ebebeb" />
|
|
||||||
|
|
||||||
<padding
|
|
||||||
android:left="4dp"
|
|
||||||
android:right="4dp"
|
|
||||||
android:top="4dp" />
|
|
||||||
|
|
||||||
<corners android:topLeftRadius="16dp" android:topRightRadius="16dp" />
|
|
||||||
</shape>
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="16dp"
|
|
||||||
android:topRightRadius="16dp" />
|
|
||||||
<padding android:top="16dp" />
|
|
||||||
<solid android:color="@color/white" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<shape
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="oval">
|
|
||||||
|
|
||||||
<solid
|
|
||||||
android:color="#0074E4"/>
|
|
||||||
|
|
||||||
<size
|
|
||||||
android:width="100dp"
|
|
||||||
android:height="100dp"/>
|
|
||||||
</shape>
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
|
||||||
|
|
||||||
<solid android:color="@android:color/white" />
|
|
||||||
|
|
||||||
<padding
|
|
||||||
android:left="1dp"
|
|
||||||
android:right="1dp"
|
|
||||||
android:top="1dp" />
|
|
||||||
|
|
||||||
<corners android:radius="500dp" />
|
|
||||||
</shape>
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
|
||||||
|
|
||||||
<solid
|
|
||||||
android:color="@color/white_bg_alpha" />
|
|
||||||
|
|
||||||
<padding
|
|
||||||
android:left="1dp"
|
|
||||||
android:right="1dp"
|
|
||||||
android:top="1dp" />
|
|
||||||
|
|
||||||
<corners android:radius="500dp" />
|
|
||||||
</shape>
|
|
||||||
7
app/src/main/res/drawable/dialog_card_child_bg.xml
Normal file
7
app/src/main/res/drawable/dialog_card_child_bg.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<solid android:color="@color/white" />
|
||||||
|
|
||||||
|
<corners android:radius="20dp" />
|
||||||
|
</shape>
|
||||||
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<solid android:color="@color/black_semi_transparent"/>
|
|
||||||
<padding
|
|
||||||
android:left="16dp"
|
|
||||||
android:top="4dp"
|
|
||||||
android:right="16dp"
|
|
||||||
android:bottom="4dp"/>
|
|
||||||
<corners
|
|
||||||
android:radius="2dp"/>
|
|
||||||
</shape>
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<solid android:color="@color/colorAccent"/>
|
|
||||||
<corners
|
|
||||||
android:bottomLeftRadius="50dp"
|
|
||||||
android:bottomRightRadius="0dp"
|
|
||||||
android:topLeftRadius="50dp"
|
|
||||||
android:topRightRadius="50dp"/>
|
|
||||||
</shape>
|
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z"/>
|
||||||
|
</vector>
|
||||||
@ -1,5 +1,10 @@
|
|||||||
<vector android:height="76dp" android:tint="#FFFFFF"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
android:width="24dp"
|
||||||
android:width="76dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:height="24dp"
|
||||||
<path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z"/>
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z" />
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<item android:id="@android:id/background">
|
|
||||||
<shape>
|
|
||||||
<corners android:radius="6.5dp" />
|
|
||||||
|
|
||||||
<solid android:color="@android:color/white" />
|
|
||||||
|
|
||||||
<stroke
|
|
||||||
android:width="1dp"
|
|
||||||
android:color="@android:color/darker_gray" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
</layer-list>
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<gradient
|
|
||||||
android:angle="90"
|
|
||||||
android:endColor="@android:color/transparent"
|
|
||||||
android:startColor="#64000000"/>
|
|
||||||
</shape>
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<gradient
|
|
||||||
android:angle="135"
|
|
||||||
android:centerColor="#4CAF50"
|
|
||||||
android:endColor="#2E7D32"
|
|
||||||
android:startColor="#81C784"
|
|
||||||
android:type="linear" />
|
|
||||||
</shape>
|
|
||||||
@ -26,239 +26,172 @@
|
|||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<RelativeLayout
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/full_white"
|
||||||
|
android:minHeight="?attr/actionBarSize">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/toolbar"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
app:layout_collapseMode="pin" />
|
||||||
|
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:id="@+id/filter_chips"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/full_white"
|
android:scrollbars="none">
|
||||||
android:minHeight="?attr/actionBarSize">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<com.google.android.material.chip.ChipGroup
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/filter_chips_group"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="?attr/actionBarSize"
|
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<HorizontalScrollView
|
|
||||||
android:id="@+id/filter_chips"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:scrollbars="none">
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
app:chipSpacing="8dp"
|
||||||
|
app:singleSelection="true" />
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<com.google.android.material.chip.ChipGroup
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
android:id="@+id/filter_chips_group"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingStart="8dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
app:chipSpacing="8dp"
|
|
||||||
app:singleSelection="true" />
|
|
||||||
</HorizontalScrollView>
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/accettazione_picking_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:paddingBottom="72dp"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/accettazione_empty_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:alpha="0.3"
|
||||||
|
app:visibility="@{accettazioneView.noItemsToPick}">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_empty_top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_percent="0.2" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_empty_left"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.15" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_empty_right"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.85" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_constraintEnd_toStartOf="@id/guideline_empty_right"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/guideline_empty_left"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/guideline_empty_top">
|
||||||
|
|
||||||
<net.cachapa.expandablelayout.ExpandableLayout
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/filtered_arts_in_list_expandable_layout"
|
android:layout_width="72dp"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:el_duration="400"
|
android:adjustViewBounds="true"
|
||||||
app:el_expanded="false">
|
android:src="@drawable/ic_playlist_add_check_24dp" />
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:paddingTop="12dp"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:paddingBottom="12dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_toStartOf="@+id/remove_art_filter_list"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/filtered_arts_in_list" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/description_filter_text"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="COD_ART_HERE" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/remove_art_filter_list"
|
|
||||||
style="@style/Button.DangerOutline"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:onClick="@{() -> accettazioneView.removeListFilter()}"
|
|
||||||
android:text="@string/remove_filter_button"
|
|
||||||
app:strokeColor="@color/red_600" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/accettazione_picking_list"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:paddingBottom="72dp"
|
|
||||||
android:scrollbars="vertical" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/accettazione_empty_view"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:alpha="0.3"
|
|
||||||
app:visibility="@{accettazioneView.noItemsToPick}">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
|
||||||
android:id="@+id/guideline_empty_top"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintGuide_percent="0.2" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
|
||||||
android:id="@+id/guideline_empty_left"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintGuide_percent="0.15" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
|
||||||
android:id="@+id/guideline_empty_right"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintGuide_percent="0.85" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical"
|
android:text="@string/no_item_to_pick_text"
|
||||||
app:layout_constraintEnd_toStartOf="@id/guideline_empty_right"
|
android:textColor="@android:color/black"
|
||||||
app:layout_constraintStart_toEndOf="@id/guideline_empty_left"
|
android:textSize="18sp" />
|
||||||
app:layout_constraintTop_toTopOf="@id/guideline_empty_top">
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:layout_width="72dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:src="@drawable/ic_playlist_add_check_24dp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<com.github.clans.fab.FloatingActionMenu
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/accettazione_ordine_inevaso_fab"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:gravity="center_horizontal"
|
android:layout_height="match_parent"
|
||||||
android:text="@string/no_item_to_pick_text"
|
android:layout_alignParentBottom="true"
|
||||||
android:textColor="@android:color/black"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:textSize="18sp" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
</LinearLayout>
|
app:visibility="@{accettazioneView.noLUPresent}"
|
||||||
|
fab:menu_animationDelayPerItem="50"
|
||||||
|
fab:menu_backgroundColor="@color/white_bg_alpha"
|
||||||
|
fab:menu_buttonSpacing="0dp"
|
||||||
|
fab:menu_colorNormal="@color/colorSecondary"
|
||||||
|
fab:menu_colorPressed="@color/colorSecondaryDark"
|
||||||
|
fab:menu_fab_size="normal"
|
||||||
|
fab:menu_labels_colorNormal="@color/white"
|
||||||
|
fab:menu_labels_colorPressed="@color/white_pressed"
|
||||||
|
fab:menu_labels_colorRipple="#66FFFFFF"
|
||||||
|
fab:menu_labels_cornerRadius="3dp"
|
||||||
|
fab:menu_labels_hideAnimation="@anim/fab_slide_out_to_right"
|
||||||
|
fab:menu_labels_margin="0dp"
|
||||||
|
fab:menu_labels_padding="8dp"
|
||||||
|
fab:menu_labels_paddingBottom="4dp"
|
||||||
|
fab:menu_labels_paddingLeft="8dp"
|
||||||
|
fab:menu_labels_paddingRight="8dp"
|
||||||
|
fab:menu_labels_paddingTop="4dp"
|
||||||
|
fab:menu_labels_position="left"
|
||||||
|
fab:menu_labels_showAnimation="@anim/fab_slide_in_from_right"
|
||||||
|
fab:menu_labels_showShadow="true"
|
||||||
|
fab:menu_labels_textColor="@color/black_semi_transparent"
|
||||||
|
fab:menu_labels_textSize="18sp"
|
||||||
|
fab:menu_openDirection="up"
|
||||||
|
fab:menu_shadowColor="#66000000"
|
||||||
|
fab:menu_shadowRadius="4dp"
|
||||||
|
fab:menu_shadowXOffset="1dp"
|
||||||
|
fab:menu_shadowYOffset="3dp"
|
||||||
|
fab:menu_showShadow="true">
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<com.github.clans.fab.FloatingActionButton
|
||||||
|
android:id="@+id/accettazione_ordine_inevaso_fab_item1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_box"
|
||||||
|
app:fab_colorNormal="@color/white"
|
||||||
|
app:fab_colorPressed="@color/white_pressed"
|
||||||
|
app:fab_colorRipple="#66FFFFFF"
|
||||||
|
app:onClick="@{() -> accettazioneView.showCreatedUL()}"
|
||||||
|
fab:fab_label="@string/action_show_created_ul" />
|
||||||
|
|
||||||
<com.github.clans.fab.FloatingActionMenu
|
<com.github.clans.fab.FloatingActionButton
|
||||||
android:id="@+id/accettazione_ordine_inevaso_fab"
|
android:id="@+id/accettazione_ordine_inevaso_fab_item2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:src="@drawable/ic_add_24dp"
|
||||||
app:visibility="@{accettazioneView.noLUPresent}"
|
app:fab_colorNormal="@color/white"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:fab_colorPressed="@color/white_pressed"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:fab_colorRipple="#66FFFFFF"
|
||||||
fab:menu_animationDelayPerItem="50"
|
app:onClick="@{() -> accettazioneView.createNewLU()}"
|
||||||
fab:menu_backgroundColor="@color/white_bg_alpha"
|
fab:fab_label="@string/action_create_ul" />
|
||||||
fab:menu_buttonSpacing="0dp"
|
|
||||||
fab:menu_colorNormal="@color/colorSecondary"
|
|
||||||
fab:menu_colorPressed="@color/colorSecondaryDark"
|
|
||||||
fab:menu_fab_size="normal"
|
|
||||||
fab:menu_labels_colorNormal="@color/white"
|
|
||||||
fab:menu_labels_colorPressed="@color/white_pressed"
|
|
||||||
fab:menu_labels_colorRipple="#66FFFFFF"
|
|
||||||
fab:menu_labels_cornerRadius="3dp"
|
|
||||||
fab:menu_labels_hideAnimation="@anim/fab_slide_out_to_right"
|
|
||||||
fab:menu_labels_margin="0dp"
|
|
||||||
fab:menu_labels_padding="8dp"
|
|
||||||
fab:menu_labels_paddingBottom="4dp"
|
|
||||||
fab:menu_labels_paddingLeft="8dp"
|
|
||||||
fab:menu_labels_paddingRight="8dp"
|
|
||||||
fab:menu_labels_paddingTop="4dp"
|
|
||||||
fab:menu_labels_position="left"
|
|
||||||
fab:menu_labels_showAnimation="@anim/fab_slide_in_from_right"
|
|
||||||
fab:menu_labels_showShadow="true"
|
|
||||||
fab:menu_labels_textColor="@color/black_semi_transparent"
|
|
||||||
fab:menu_labels_textSize="18sp"
|
|
||||||
fab:menu_openDirection="up"
|
|
||||||
fab:menu_shadowColor="#66000000"
|
|
||||||
fab:menu_shadowRadius="4dp"
|
|
||||||
fab:menu_shadowXOffset="1dp"
|
|
||||||
fab:menu_shadowYOffset="3dp"
|
|
||||||
fab:menu_showShadow="true">
|
|
||||||
|
|
||||||
<com.github.clans.fab.FloatingActionButton
|
</com.github.clans.fab.FloatingActionMenu>
|
||||||
android:id="@+id/accettazione_ordine_inevaso_fab_item1"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@drawable/ic_box"
|
|
||||||
app:fab_colorNormal="@color/white"
|
|
||||||
app:fab_colorPressed="@color/white_pressed"
|
|
||||||
app:fab_colorRipple="#66FFFFFF"
|
|
||||||
app:onClick="@{() -> accettazioneView.showCreatedUL()}"
|
|
||||||
fab:fab_label="@string/action_show_created_ul" />
|
|
||||||
|
|
||||||
<com.github.clans.fab.FloatingActionButton
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
android:id="@+id/accettazione_ordine_inevaso_fab_item2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@drawable/ic_add_24dp"
|
|
||||||
app:fab_colorNormal="@color/white"
|
|
||||||
app:fab_colorPressed="@color/white_pressed"
|
|
||||||
app:fab_colorRipple="#66FFFFFF"
|
|
||||||
app:onClick="@{() -> accettazioneView.createNewLU()}"
|
|
||||||
fab:fab_label="@string/action_create_ul" />
|
|
||||||
|
|
||||||
</com.github.clans.fab.FloatingActionMenu>
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -138,241 +138,306 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:text="@string/details_text"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:padding="15dp">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<TextView
|
||||||
android:layout_width="match_parent"
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
android:layout_height="wrap_content">
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
<androidx.constraintlayout.widget.Guideline
|
android:layout_marginStart="10dp"
|
||||||
android:id="@+id/guideline1"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_width="wrap_content"
|
android:text="@string/details_text"
|
||||||
android:layout_height="wrap_content"
|
android:textAllCaps="true"
|
||||||
android:orientation="vertical"
|
android:textColor="@android:color/black"
|
||||||
app:layout_constraintGuide_percent="0.40" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:text="@string/date_text"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/guideline1"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/articoli_in_collo_details_date"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/guideline1"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:text="TextView" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
|
||||||
android:id="@+id/guideline2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintGuide_percent="0.40" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/articoli_in_collo_details_posizione"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:text="@string/position_text"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/guideline2"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:text="@{viewModel.mtbColt.posizione}"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/guideline2"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:text="TextView" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
|
||||||
android:id="@+id/guideline3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintGuide_percent="0.40" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:text="@string/prepared_by_text"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/guideline3"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:text="@{viewModel.mtbColt.preparatoDa}"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/guideline3"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:text="TextView" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
|
||||||
android:id="@+id/guideline4"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintGuide_percent="0.40" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:text="@string/customer"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/guideline4"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:text="@{viewModel.mtbColt.ragSocCliente}"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/guideline4"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:text="TextView" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:background="#ededed" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:text="@string/already_read_articles"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingTop="14dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp"
|
android:padding="15dp">
|
||||||
android:visibility="@{viewModel.mtbColt == null || viewModel.mtbColt.mtbColr.size() == 0 ? View.VISIBLE : View.GONE}">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@drawable/ic_info_78dp"
|
|
||||||
android:tint="@color/empty_view_gray" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/empty_rows_in_mtbcolt"
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:textColor="@color/empty_view_gray"
|
android:id="@+id/guideline0"
|
||||||
android:textSize="20sp" />
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.40" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="@string/number_text"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/guideline0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:visibility="@{viewModel.mtbColt != null ? View.VISIBLE : View.GONE}"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/guideline0"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{viewModel.mtbColt.numCollo.toString()}"
|
||||||
|
tools:text="TextView" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#57535D"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:text="(serie: " />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#57535D"
|
||||||
|
android:text="@{viewModel.mtbColt.serCollo}"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="TextView" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#57535D"
|
||||||
|
android:text=")" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.40" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="@string/date_text"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/guideline1"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:text="@{viewModel.mtbColt.dataColloHumanLong}"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/guideline1"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="TextView" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.40" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/articoli_in_collo_details_posizione"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="@string/position_text"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/guideline2"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:text="@{viewModel.mtbColt.posizione}"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/guideline2"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="TextView" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.40" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="@string/prepared_by_text"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/guideline3"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:text="@{viewModel.mtbColt.preparatoDa}"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/guideline3"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="TextView" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.40" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="@string/customer"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/guideline4"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:text="@{viewModel.mtbColt.ragSocCliente}"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/guideline4"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="TextView" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
</LinearLayout>
|
||||||
android:id="@+id/mtb_colr_recycler_view"
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:background="#ededed" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="@string/already_read_articles"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clickable="true"
|
android:orientation="vertical"
|
||||||
android:focusable="true"
|
android:paddingTop="14dp">
|
||||||
app:dividerThickness="0.5dp" />
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:visibility="@{viewModel.mtbColt == null || viewModel.mtbColt.mtbColr.size() == 0 ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_info_78dp"
|
||||||
|
android:tint="@color/empty_view_gray" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/empty_rows_in_mtbcolt"
|
||||||
|
android:textColor="@color/empty_view_gray"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/mtb_colr_recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:dividerThickness="0.5dp" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
@ -390,9 +455,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#99000000"
|
android:background="#99000000"
|
||||||
android:visibility="gone"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"/>
|
android:focusable="true"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/customer"
|
android:text="@string/customer"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/recipient"
|
android:text="@string/recipient"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/placement"
|
android:text="@string/placement"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/production_line"
|
android:text="@string/production_line"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/placement"
|
android:text="@string/placement"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
@ -111,7 +111,7 @@
|
|||||||
<!--android:layout_width="match_parent"-->
|
<!--android:layout_width="match_parent"-->
|
||||||
<!--android:layout_height="wrap_content"-->
|
<!--android:layout_height="wrap_content"-->
|
||||||
<!--android:text="@string/action_print"-->
|
<!--android:text="@string/action_print"-->
|
||||||
<!--style="@style/TextViewMaterial.DialogTitle"-->
|
<!--style="@style/TextViewMaterial.Dialog.HeadlineText"-->
|
||||||
<!--android:gravity="center_horizontal"/>-->
|
<!--android:gravity="center_horizontal"/>-->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,118 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.ask_should_versamento_automatico_ul.DialogAskShouldVersamentoAutomaticoULView" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/light_blue_300"
|
||||||
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="24dp"
|
||||||
|
android:src="@drawable/ic_error_white_24dp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="24dp"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingRight="24dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/versamento_automatico" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/description_text"
|
||||||
|
style="@style/TextViewMaterial"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:text="@string/ask_should_versamento_automatico" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/center_buttons_guideline"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.5" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/button_abort"
|
||||||
|
style="@style/Button.PrimaryOutline"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:text="@string/no"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:strokeColor="@color/colorPrimary"
|
||||||
|
android:onClick="@{() -> view.abort()}" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/button_confirm"
|
||||||
|
style="@style/Button.PrimaryFull"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:text="@string/yes"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:onClick="@{() -> view.confirm()}"/>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/basket"
|
android:text="@string/basket"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/dialog_choose_art_from_lista_art"
|
android:text="@string/dialog_choose_art_from_lista_art"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
|
|||||||
@ -1,34 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingLeft="12dp"
|
|
||||||
android:paddingRight="12dp">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/dialog_content_main_message"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:text="Message text here"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/dialog_content_hashmap"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingLeft="12dp"
|
|
||||||
android:paddingRight="12dp"
|
|
||||||
android:layout_marginTop="12dp">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:orientation="vertical" android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:padding="24dp"
|
|
||||||
android:id="@+id/llsubhead"
|
|
||||||
>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/title_icon"
|
|
||||||
android:layout_width="76dp"
|
|
||||||
android:layout_height="76dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:src="@drawable/ic_info_78dp"
|
|
||||||
android:tint="@color/green_500"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title_text"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Exemption Sub Head"
|
|
||||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Medium"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="24sp"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0.5dp"
|
|
||||||
android:background="#AAA"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="Si è verificato un problema"
|
android:text="Si è verificato un problema"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
tools:text="Insert here"
|
tools:text="Insert here"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/action_insert_weight"
|
android:text="@string/action_insert_weight"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/action_insert_quantity"
|
android:text="@string/action_insert_quantity"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -1,131 +1,89 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<import type="android.text.Html" />
|
<import type="android.text.Html" />
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.R" />
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="mContext"
|
name="mContext"
|
||||||
type="android.content.Context" />
|
type="android.content.Context" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.cardview.widget.CardView
|
||||||
android:orientation="vertical" android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
app:cardCornerRadius="12dp"
|
android:orientation="vertical"
|
||||||
|
app:cardBackgroundColor="@android:color/transparent"
|
||||||
|
app:cardCornerRadius="24dp"
|
||||||
app:cardElevation="0dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/base"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:cardBackgroundColor="@color/light_blue_300"
|
||||||
|
app:cardCornerRadius="24dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/light_blue_300"
|
android:layout_margin="4dp"
|
||||||
android:gravity="center_horizontal">
|
android:padding="24dp"
|
||||||
|
android:background="@drawable/dialog_card_child_bg">
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@drawable/ic_error_white_24dp"
|
|
||||||
android:layout_margin="24dp"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingTop="24dp"
|
|
||||||
android:paddingLeft="24dp"
|
|
||||||
android:paddingRight="24dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/lu_info"
|
android:text="@string/lu_info"
|
||||||
android:gravity="center_horizontal"/>
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
<!--<TextView-->
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
<!--android:id="@+id/description_text"-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--style="@style/TextViewMaterial"-->
|
|
||||||
<!--android:text="@string/dialog_message_additional_notes"-->
|
|
||||||
<!--android:gravity="left"-->
|
|
||||||
<!--android:layout_marginTop="16dp"-->
|
|
||||||
<!--android:layout_marginBottom="16dp" />-->
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:orientation="vertical"
|
android:id="@+id/level_number_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp">
|
android:layout_marginTop="16dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/title_text">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/level_number_layout"
|
android:id="@+id/additional_notes_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
android:hint="@string/hint_additional_notes"
|
||||||
style="@style/TextInputLayout.OutlinePrimary">
|
android:inputType="text" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/additional_notes_text"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/hint_additional_notes"
|
|
||||||
android:inputType="text"
|
|
||||||
style="@style/TextInputEditText.OutlinePrimary"/>
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
<LinearLayout
|
android:id="@+id/button_confirm"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:text="@string/confirm"
|
||||||
android:paddingTop="8dp"
|
android:layout_marginTop="24dp"
|
||||||
android:paddingBottom="8dp"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:gravity="bottom|center_horizontal">
|
app:layout_constraintTop_toBottomOf="@id/level_number_layout" />
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/button_abort"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/Button.PrimaryOutline"
|
|
||||||
app:icon="@drawable/ic_clear_24dp"
|
|
||||||
app:strokeColor="@color/colorPrimary"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:text="@string/abort"/>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/button_confirm"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/Button.PrimaryFull"
|
|
||||||
app:icon="@drawable/ic_save_24dp"
|
|
||||||
android:text="@string/confirm"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/dialog_vendita_filtro_avanzato"
|
android:text="@string/dialog_vendita_filtro_avanzato"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:layout_marginBottom="12dp"/>
|
android:layout_marginBottom="12dp"/>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/loading"
|
android:text="@string/loading"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
@ -37,7 +37,7 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
||||||
<!-- style="@style/TextViewMaterial.DialogTitle"-->
|
<!-- style="@style/TextViewMaterial.Dialog.HeadlineText"-->
|
||||||
<!-- android:layout_width="match_parent"-->
|
<!-- android:layout_width="match_parent"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:gravity="center_horizontal"-->
|
<!-- android:gravity="center_horizontal"-->
|
||||||
|
|||||||
@ -10,13 +10,13 @@
|
|||||||
app:cardCornerRadius="12dp"
|
app:cardCornerRadius="12dp"
|
||||||
app:cardElevation="0dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@ -29,11 +29,11 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/extra_item"
|
android:text="@string/extra_item"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
@ -57,7 +57,7 @@
|
|||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
android:text="@string/scan_item"/>
|
android:text="@string/scan_item"/>
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -72,9 +72,9 @@
|
|||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:text="@string/abort"/>
|
android:text="@string/abort"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/title_open_grid_pv"
|
android:text="@string/title_open_grid_pv"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/title_open_lu"
|
android:text="@string/title_open_lu"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="12dp"
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/dialog_vendita_filtro_avanzato"
|
android:text="@string/dialog_vendita_filtro_avanzato"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:layout_marginBottom="12dp"/>
|
android:layout_marginBottom="12dp"/>
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/dialog_vendita_filtro_avanzato"
|
android:text="@string/dialog_vendita_filtro_avanzato"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:layout_marginBottom="12dp"/>
|
android:layout_marginBottom="12dp"/>
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/dialog_vendita_filtro_avanzato"
|
android:text="@string/dialog_vendita_filtro_avanzato"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:layout_marginBottom="12dp"/>
|
android:layout_marginBottom="12dp"/>
|
||||||
|
|||||||
157
app/src/main/res/layout/dialog_versamento_automatico_ul_done.xml
Normal file
157
app/src/main/res/layout/dialog_versamento_automatico_ul_done.xml
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
<import type="android.view.View" />
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.versamento_automatico_ul_done.DialogVersamentoAutomaticoULDoneView" />
|
||||||
|
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:cardBackgroundColor="@android:color/transparent"
|
||||||
|
app:cardCornerRadius="24dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/base"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:cardBackgroundColor="@color/light_blue_300"
|
||||||
|
app:cardCornerRadius="24dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@drawable/dialog_card_child_bg"
|
||||||
|
android:padding="24dp">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/versamento_automatico"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/description_text"
|
||||||
|
style="@style/TextViewMaterial.Dialog.SupportingText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/completed"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/title_text" />
|
||||||
|
|
||||||
|
<!-- <com.google.android.material.button.MaterialButton-->
|
||||||
|
<!-- android:id="@+id/view_details_btn"-->
|
||||||
|
<!-- style="@style/Widget.MaterialComponents.Button.TextButton.Icon"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="Vedi dettagli"-->
|
||||||
|
<!-- android:textStyle="bold"-->
|
||||||
|
<!-- app:icon="@drawable/ic_baseline_keyboard_arrow_down_24"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toBottomOf="@id/description_text"-->
|
||||||
|
<!-- app:singleClick="@{() -> view.toggleDetailVisibility()}" />-->
|
||||||
|
|
||||||
|
<!-- <it.integry.integrywmsnative.ui.expandablelayout.ExpandableLayout-->
|
||||||
|
<!-- android:id="@+id/details_container"-->
|
||||||
|
<!-- android:layout_width="0dp"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toBottomOf="@id/view_details_btn">-->
|
||||||
|
|
||||||
|
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:background="@color/gray_200">-->
|
||||||
|
|
||||||
|
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
||||||
|
<!-- android:id="@+id/not_completed_lbl"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="Non completati"-->
|
||||||
|
<!-- android:textStyle="bold"-->
|
||||||
|
<!-- android:textAllCaps="true"-->
|
||||||
|
<!-- android:padding="8dp"-->
|
||||||
|
<!-- android:visibility="@{view.versamentoAutomaticoULResponseDTO.failed.empty ? View.GONE : View.VISIBLE}"-->
|
||||||
|
<!-- style="@style/TextViewMaterial.Dialog.SupportingText"-->
|
||||||
|
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"/>-->
|
||||||
|
|
||||||
|
<!-- <com.linearlistview.LinearListView-->
|
||||||
|
<!-- android:id="@+id/details_not_completed_list"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:nestedScrollingEnabled="false"-->
|
||||||
|
<!-- app:layout_constraintTop_toBottomOf="@id/not_completed_lbl"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent" />-->
|
||||||
|
|
||||||
|
<!-- <androidx.appcompat.widget.AppCompatTextView-->
|
||||||
|
<!-- android:id="@+id/completed_lbl"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="Completati"-->
|
||||||
|
<!-- android:textStyle="bold"-->
|
||||||
|
<!-- android:textAllCaps="true"-->
|
||||||
|
<!-- android:padding="8dp"-->
|
||||||
|
<!-- android:visibility="@{view.versamentoAutomaticoULResponseDTO.success.empty ? View.GONE : View.VISIBLE}"-->
|
||||||
|
<!-- style="@style/TextViewMaterial.Dialog.SupportingText"-->
|
||||||
|
<!-- app:layout_constraintTop_toBottomOf="@id/details_not_completed_list"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"/>-->
|
||||||
|
|
||||||
|
<!-- <com.linearlistview.LinearListView-->
|
||||||
|
<!-- android:id="@+id/details_completed_list"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- app:layout_constraintTop_toBottomOf="@id/completed_lbl"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent" />-->
|
||||||
|
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- </it.integry.integrywmsnative.ui.expandablelayout.ExpandableLayout>-->
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/button_confirm"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="@string/ok"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/description_text"
|
||||||
|
app:singleClick="@{() -> view.dismiss()}" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</layout>
|
||||||
@ -0,0 +1,151 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.settings.SettingsManager" />
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="item"
|
||||||
|
type="it.integry.integrywmsnative.core.model.MtbColr" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/qta_textview"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:layout_marginRight="8dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/first_line"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/cod_mart"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{item.codMart}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="COD MART" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/diacod"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_toEndOf="@id/cod_mart"
|
||||||
|
android:text="@{`(` + item.mtbAart.diacod + `)`}"
|
||||||
|
android:textColor="@color/red_600"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="@{(item.mtbAart != null && !UtilityString.isNullOrEmpty(item.mtbAart.diacod)) ? View.VISIBLE : View.GONE}"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/cod_mart"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="(12345)" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:background="@drawable/badge_round_corner"
|
||||||
|
android:backgroundTint="@color/orange_600"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(item.qtaCol) + item.mtbAart.untMis}"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="@{SettingsManager.iDB().isFlagForceAllToColli() || (item.mtbAart != null && !item.mtbAart.flagQtaCnfFissaBoolean) ? View.VISIBLE : View.GONE}"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="PESO KG" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/second_line"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="@{item.getDescrizione()}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/first_line"
|
||||||
|
tools:text="Descrizione lunga articolo" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{`Lotto: ` + item.getPartitaMag()}"
|
||||||
|
android:visibility="@{UtilityString.isNullOrEmpty(item.getPartitaMag()) ? View.INVISIBLE : View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/second_line"
|
||||||
|
tools:text="Lotto: ABCDE" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/qta_textview"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:background="@drawable/badge_round_corner"
|
||||||
|
android:backgroundTint="@color/colorPrimary"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="6dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingRight="6dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="280.45\nCONF" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="Title here"
|
android:text="Title here"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</layout>
|
|
||||||
@ -1,71 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="it.integry.integrywmsnative.R" />
|
|
||||||
<variable
|
|
||||||
name="ordine"
|
|
||||||
type="it.integry.integrywmsnative.core.data_store.db.view_model.OrdineWithGriglia" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginBottom="4dp"
|
|
||||||
android:paddingStart="8dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:background="@drawable/bg_checked_layout">
|
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/badge1"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
tools:text="BADGE 1"
|
|
||||||
android:background="@drawable/badge_round_corner"
|
|
||||||
android:backgroundTint="@color/colorPrimary"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:paddingTop="2dp"
|
|
||||||
android:paddingBottom="2dp"
|
|
||||||
android:paddingLeft="6dp"
|
|
||||||
android:paddingRight="6dp"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/description_main"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
style="@android:style/TextAppearance.Small"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
android:layout_below="@id/badge1"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
tools:text="TITLE"/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/date"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
|
||||||
android:textColor="@color/colorPrimaryGray"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:textSize="14sp"
|
|
||||||
tools:text="13 Apr"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
||||||
@ -133,7 +133,7 @@
|
|||||||
tools:text="28 maggio 2021" />
|
tools:text="28 maggio 2021" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{`Ordine #`+ view.currentOrder.numOrd.toString()}"
|
android:text="@{`Ordine #`+ view.currentOrder.numOrd.toString()}"
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||||
android:text="@string/distribute_ul"
|
android:text="@string/distribute_ul"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|||||||
114
app/src/main/res/layout/layout_filter_posizione.xml
Normal file
114
app/src/main/res/layout/layout_filter_posizione.xml
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="dto"
|
||||||
|
type="it.integry.integrywmsnative.ui.filter_chips.FilterChipDTO" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterPosizioneLayoutView" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_toStartOf="@id/search_view"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:reverse_visibility="@{view.enabledSearch}">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/bottom_sheet_actions_title"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:text="@{view.filterName}"
|
||||||
|
android:textColor="#444"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="Nome filtro" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:text="Seleziona la posizione che vuoi filtrare"
|
||||||
|
android:textColor="#444" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SearchView
|
||||||
|
android:id="@+id/search_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:backgroundTint="@android:color/white" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/title_layout">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHeight_max="300dp"
|
||||||
|
app:layout_constraintHeight_min="200dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/save_btn"
|
||||||
|
style="@style/Button.PrimaryFull"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="@string/confirm"
|
||||||
|
app:singleClick="@{() -> view.onConfirm()}" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="item"
|
||||||
|
type="it.integry.integrywmsnative.gest.accettazione_picking.filters.FilterPosizioneLayoutView.ListModel" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:clickable="@{item.enabled}"
|
||||||
|
android:onClick="@{() -> item.selected.toggle()}">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatCheckBox
|
||||||
|
android:id="@+id/checkbox"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:enabled="@{item.enabled}"
|
||||||
|
app:checked="@{item.selected}"
|
||||||
|
android:clickable="false"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:enabled="@{item.enabled}"
|
||||||
|
android:clickable="false">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{item.enabled}"
|
||||||
|
android:text="@{item.originalModel}"
|
||||||
|
app:visibility="@{!UtilityString.isNullOrEmpty(item.originalModel)}"
|
||||||
|
tools:text="Posizione"
|
||||||
|
android:clickable="false" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{item.enabled}"
|
||||||
|
android:text="NESSUNA POSIZIONE"
|
||||||
|
app:visibility="@{UtilityString.isNullOrEmpty(item.originalModel)}"
|
||||||
|
android:clickable="false" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
@ -21,141 +22,143 @@
|
|||||||
type="it.integry.integrywmsnative.core.model.MtbColr" />
|
type="it.integry.integrywmsnative.core.model.MtbColr" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/art_detail"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/qta_textview"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:layout_marginEnd="8dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/first_line"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/qta_box"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/cod_mart"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{mtbColr.codMart}"
|
|
||||||
android:textColor="@color/colorPrimary"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="COD MART" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/diacod"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_toEndOf="@id/cod_mart"
|
|
||||||
android:text="@{`(` + mtbColr.mtbAart.diacod + `)`}"
|
|
||||||
android:textColor="@color/red_600"
|
|
||||||
android:textSize="13sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="@{(mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(mtbColr.mtbAart.diacod)) ? View.VISIBLE : View.GONE}"
|
|
||||||
tools:text="(12345)" />
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:background="@drawable/badge_round_corner"
|
|
||||||
android:backgroundTint="@color/orange_600"
|
|
||||||
android:paddingStart="6dp"
|
|
||||||
android:paddingEnd="6dp"
|
|
||||||
android:text="@{UtilityNumber.decimalToString(mtbColr.qtaCol) + mtbColr.mtbAart.untMis}"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="@{SettingsManager.iDB().isFlagForceAllToColli() || (mtbColr.mtbAart != null && !mtbColr.mtbAart.flagQtaCnfFissaBoolean) ? View.VISIBLE : View.GONE}"
|
|
||||||
tools:text="PESO KG" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
android:id="@+id/cod_mart"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:text="@{mtbColr.getDescrizione()}"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:text="Descrizione lunga articolo" />
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}"
|
|
||||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.INVISIBLE : View.VISIBLE}"
|
|
||||||
tools:text="Lotto: ABCDE" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/qta_box"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingStart="12dp"
|
|
||||||
android:paddingEnd="12dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/qta_textview"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/badge_round_corner"
|
android:text="@{mtbColr.codMart}"
|
||||||
android:backgroundTint="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
android:gravity="center"
|
android:textSize="14sp"
|
||||||
android:paddingLeft="6dp"
|
|
||||||
android:paddingTop="2dp"
|
|
||||||
android:paddingRight="6dp"
|
|
||||||
android:paddingBottom="2dp"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="280.45\nCONF" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="COD MART" />
|
||||||
|
|
||||||
</RelativeLayout>
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/diacod"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_toEndOf="@id/cod_mart"
|
||||||
|
android:text="@{`(` + mtbColr.mtbAart.diacod + `)`}"
|
||||||
|
android:textColor="@color/red_600"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="@{(mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(mtbColr.mtbAart.diacod)) ? View.VISIBLE : View.GONE}"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/cod_mart"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="(12345)" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:background="@drawable/badge_round_corner"
|
||||||
|
android:backgroundTint="@color/orange_600"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(mtbColr.qtaCol) + mtbColr.mtbAart.untMis}"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="@{SettingsManager.iDB().isFlagForceAllToColli() || (mtbColr.mtbAart != null && !mtbColr.mtbAart.flagQtaCnfFissaBoolean) ? View.VISIBLE : View.GONE}"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="PESO KG" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/second_line"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="@{mtbColr.getDescrizione()}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/first_line"
|
||||||
|
tools:text="Descrizione lunga articolo" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}"
|
||||||
|
android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.INVISIBLE : View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/second_line"
|
||||||
|
tools:text="Lotto: ABCDE" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/qta_textview"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:background="@drawable/badge_round_corner"
|
||||||
|
android:backgroundTint="@color/colorPrimary"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="6dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingRight="6dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/ul_ref_container"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="280.45\nCONF" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:id="@+id/ul_ref_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:visibility="@{mtbColr.numColloRif != null ? View.VISIBLE : View.GONE}"
|
android:visibility="@{mtbColr.numColloRif != null ? View.VISIBLE : View.GONE}"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/art_detail">
|
app:layout_constraintTop_toBottomOf="@id/linearLayout">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -207,7 +210,7 @@
|
|||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:layout_width="2dp"
|
android:layout_width="2dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/green_600"/>
|
android:background="@color/green_600" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -239,16 +242,16 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{mtbColr.numColloRif.toString()}"
|
android:text="@{mtbColr.numColloRif.toString()}"
|
||||||
tools:text="5230"
|
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
tools:text="5230" />
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:layout_marginTop="2dp"
|
||||||
android:layout_marginTop="2dp">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
@ -262,9 +265,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{mtbColr.gestioneRif}"
|
android:text="@{mtbColr.gestioneRif}"
|
||||||
tools:text="V"
|
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
tools:text="V" />
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
@ -292,16 +295,16 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{UtilityDate.formatDate(mtbColr.dataColloRifD, "dd MMM yy")}"
|
android:text="@{UtilityDate.formatDate(mtbColr.dataColloRifD, "dd MMM yy")}"
|
||||||
tools:text="02 mar 2020"
|
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
tools:text="02 mar 2020" />
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:layout_marginTop="2dp"
|
||||||
android:layout_marginTop="2dp">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
@ -315,9 +318,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{mtbColr.serColloRif}"
|
android:text="@{mtbColr.serColloRif}"
|
||||||
tools:text="UL"
|
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
tools:text="UL" />
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|||||||
@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layout>
|
|
||||||
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<variable
|
|
||||||
name="view"
|
|
||||||
type="it.integry.integrywmsnative.ui.filter_chips.FilterChipView" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/chip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{view.primaryText}"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
app:chipBackgroundColor="@color/colorPrimary"
|
|
||||||
app:chipCornerRadius="4dp"
|
|
||||||
app:closeIconEnabled="true"
|
|
||||||
app:closeIconTint="@android:color/white"
|
|
||||||
tools:text="Primary text" />
|
|
||||||
|
|
||||||
</layout>
|
|
||||||
@ -174,8 +174,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignTop="@id/content_view_child"
|
android:layout_alignTop="@id/content_view_child"
|
||||||
android:layout_alignBottom="@id/content_view_child"
|
android:layout_alignBottom="@id/content_view_child"
|
||||||
android:background="@android:color/black"
|
android:alpha="0.15"
|
||||||
android:alpha="0.15" />
|
android:background="@android:color/black" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@ -1,165 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:background="@color/full_white">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/content_view_child"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="8dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_badge1"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
tools:text="BADGE 1"
|
|
||||||
android:background="@drawable/badge_round_corner"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:paddingTop="2dp"
|
|
||||||
android:paddingBottom="2dp"
|
|
||||||
android:paddingLeft="6dp"
|
|
||||||
android:paddingRight="6dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"/>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="right">
|
|
||||||
|
|
||||||
<!--<TextView-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:textStyle="bold"-->
|
|
||||||
<!--android:textColor="@color/green_700"-->
|
|
||||||
<!--style="@android:style/TextAppearance.Medium"-->
|
|
||||||
<!--android:text="@string/dispatched"/>-->
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_qta_evasa"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@color/green_700"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
|
||||||
tools:text="QTA"/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
style="@android:style/TextAppearance.Medium"
|
|
||||||
android:text=" / "/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_qta_tot"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
|
||||||
tools:text="QTA"/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_unt_mis"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
tools:text="cnf"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_descrizione"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
tools:text="DESCRIZIONE"/>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_subdescrizione_layout"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_toStartOf="@+id/vendita_ordine_inevaso_main_list_group_item_badge2">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_subdescrizione1"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="14sp"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
tools:text="SUB DESCRIZIONE"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_subdescrizione2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="14sp"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
tools:text="SUB DESCRIZIONE"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list_group_item_badge2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
tools:text="BADGE 2"
|
|
||||||
android:background="@drawable/badge_round_corner"
|
|
||||||
android:backgroundTint="@color/orange_600"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:paddingTop="2dp"
|
|
||||||
android:paddingBottom="2dp"
|
|
||||||
android:paddingLeft="6dp"
|
|
||||||
android:paddingRight="6dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/deactivated_over_bg"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignTop="@id/content_view_child"
|
|
||||||
android:layout_alignBottom="@id/content_view_child"
|
|
||||||
android:background="@android:color/black"
|
|
||||||
android:alpha="0.15" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/mainGreen"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list__descrizione_gruppo"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
tools:text="POSIZIONE"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:ellipsize="end"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium" />
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/white"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:id="@+id/vendita_ordine_inevaso_main_list__group_item_container">
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</RelativeLayout>
|
|
||||||
@ -1,89 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<group android:checkableBehavior="single">
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_home"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_home"-->
|
|
||||||
<!-- android:title="Home" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_accettazione"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_download"-->
|
|
||||||
<!-- android:title="@string/accettazione_title_fragment" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_spedizione"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_upload"-->
|
|
||||||
<!-- android:title="@string/vendita_title_fragment" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_rettifica_giacenze"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_empty_box"-->
|
|
||||||
<!-- android:title="@string/rettifica_giacenze_fragment_title" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_versamento_merce"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_load_shelf"-->
|
|
||||||
<!-- android:title="@string/versamento_merce_fragment_title" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_free_picking"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_barcode_scanner"-->
|
|
||||||
<!-- android:title="@string/free_picking" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_resi_fornitore"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_latest_delivery"-->
|
|
||||||
<!-- android:title="@string/fragment_ultime_arrivi_fornitore_title" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_resi_cliente"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_latest_delivery"-->
|
|
||||||
<!-- android:title="@string/fragment_ultime_consegne_cliente_title" />-->
|
|
||||||
</group>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <group android:checkableBehavior="single" >-->
|
|
||||||
<!-- <item android:title="@string/production">-->
|
|
||||||
<!-- <menu>-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_prod_ordine_produzione"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_external"-->
|
|
||||||
<!-- android:title="@string/prod_ordine_produzione_title_fragment" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_prod_ordine_lavorazione"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_external"-->
|
|
||||||
<!-- android:title="@string/prod_ordine_lavorazione_title_fragment" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_prod_versamento_materiale"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_external"-->
|
|
||||||
<!-- android:title="@string/prod_versamento_materiale_title_fragment" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_prod_recupero_materiale"-->
|
|
||||||
<!-- android:icon="@drawable/ic_black_internal"-->
|
|
||||||
<!-- android:title="@string/prod_recupero_materiale_title_fragment" />-->
|
|
||||||
<!-- </menu>-->
|
|
||||||
<!-- </item>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!--
|
|
||||||
<item android:title="Communicate">
|
|
||||||
<menu>
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_share"
|
|
||||||
android:icon="@drawable/ic_menu_share"
|
|
||||||
android:title="Share" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_send"
|
|
||||||
android:icon="@drawable/ic_menu_send"
|
|
||||||
android:title="Send" />
|
|
||||||
</menu>
|
|
||||||
</item>
|
|
||||||
-->
|
|
||||||
<!-- <item android:title="Altro">-->
|
|
||||||
<!-- <menu>-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_settings"-->
|
|
||||||
<!-- android:icon="@drawable/ic_settings_24dp"-->
|
|
||||||
<!-- android:title="@string/general_settings" />-->
|
|
||||||
<!-- <item-->
|
|
||||||
<!-- android:id="@+id/nav_logout"-->
|
|
||||||
<!-- android:icon="@drawable/ic_logout_24dp"-->
|
|
||||||
<!-- android:title="Logout" />-->
|
|
||||||
<!-- </menu>-->
|
|
||||||
<!-- </item>-->
|
|
||||||
|
|
||||||
</menu>
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
</menu>
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
<!--<item-->
|
|
||||||
<!--android:id="@+id/action_free_picking"-->
|
|
||||||
<!--android:orderInCategory="100"-->
|
|
||||||
<!--android:title="@string/free_picking"-->
|
|
||||||
<!--app:showAsAction="never" />-->
|
|
||||||
</menu>
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
<!--<item-->
|
|
||||||
<!--android:id="@+id/action_settings"-->
|
|
||||||
<!--android:orderInCategory="100"-->
|
|
||||||
<!--android:title="@string/action_settings"-->
|
|
||||||
<!--app:showAsAction="never" />-->
|
|
||||||
</menu>
|
|
||||||
@ -64,6 +64,11 @@
|
|||||||
<string name="lu_already_attache_to_doc">L\'UL selezionata è già agganciata ad un documento per cui non può essere utilizzata</string>
|
<string name="lu_already_attache_to_doc">L\'UL selezionata è già agganciata ad un documento per cui non può essere utilizzata</string>
|
||||||
<string name="lu_gest_v_loading_alert">Stai caricando una UL di <b>vendita</b>. Sei sicuro di voler continuare?</string>
|
<string name="lu_gest_v_loading_alert">Stai caricando una UL di <b>vendita</b>. Sei sicuro di voler continuare?</string>
|
||||||
|
|
||||||
|
<string name="action_continue">Continua</string>
|
||||||
|
|
||||||
|
<string name="versamento_automatico">Versamento automatico</string>
|
||||||
|
<string name="ask_should_versamento_automatico">Effettuare il versamento automatico degli articoli presenti nelle loro posizioni di default?</string>
|
||||||
|
|
||||||
<string name="warehouse">Magazzino</string>
|
<string name="warehouse">Magazzino</string>
|
||||||
|
|
||||||
<!-- SETTINGS -->
|
<!-- SETTINGS -->
|
||||||
@ -104,6 +109,7 @@
|
|||||||
<string name="orders">Ordini</string>
|
<string name="orders">Ordini</string>
|
||||||
<string name="articoli_in_collo_sheet_title"><![CDATA[Unità numero %d]]></string>
|
<string name="articoli_in_collo_sheet_title"><![CDATA[Unità numero %d]]></string>
|
||||||
<string name="details_text">Dettagli</string>
|
<string name="details_text">Dettagli</string>
|
||||||
|
<string name="number_text">Numero</string>
|
||||||
<string name="date_text">Data</string>
|
<string name="date_text">Data</string>
|
||||||
<string name="position_text">Posizione</string>
|
<string name="position_text">Posizione</string>
|
||||||
<string name="prepared_by_text">Preparato da</string>
|
<string name="prepared_by_text">Preparato da</string>
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
|
|
||||||
|
|
||||||
<array name="menuColors">
|
|
||||||
<item>@color/green_500</item> <!-- Accettazione -->
|
|
||||||
<item>@color/green_500</item> <!-- Accettazione -->
|
|
||||||
<item>@color/green_500</item> <!-- Accettazione -->
|
|
||||||
<item>@color/green_500</item> <!-- Accettazione -->
|
|
||||||
<item>@color/green_500</item> <!-- Accettazione -->
|
|
||||||
<item>@color/green_500</item> <!-- Accettazione -->
|
|
||||||
<item>@color/green_500</item> <!-- Accettazione -->
|
|
||||||
<item>@color/green_500</item> <!-- Accettazione -->
|
|
||||||
<item>@color/green_500</item> <!-- Accettazione -->
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<array name="printerTypes">
|
|
||||||
<item>Primary</item>
|
|
||||||
<item>Secondary</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
</resources>
|
|
||||||
@ -3,20 +3,20 @@
|
|||||||
|
|
||||||
|
|
||||||
<style name="Button.PrimaryOutline" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
<style name="Button.PrimaryOutline" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||||
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
<!-- <item name="fontFamily">@font/product_sans_regular</item> <!– target android sdk versions < 26 and > 14 if theme other than AppCompat –>-->
|
||||||
<item name="android:textStyle">bold</item>
|
<!-- <item name="android:textStyle">bold</item>-->
|
||||||
<item name="android:textAllCaps">false</item>
|
<!-- <item name="android:textAllCaps">false</item>-->
|
||||||
<item name="android:paddingTop">8dp</item>
|
<!-- <item name="android:paddingTop">8dp</item>-->
|
||||||
<item name="android:paddingBottom">8dp</item>
|
<!-- <item name="android:paddingBottom">8dp</item>-->
|
||||||
<item name="iconTint">@color/colorPrimary</item>
|
<item name="iconTint">@color/colorPrimary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Button.PrimaryFull" parent="Widget.MaterialComponents.Button.UnelevatedButton">
|
<style name="Button.PrimaryFull" parent="Widget.MaterialComponents.Button">
|
||||||
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
<!-- <item name="fontFamily">@font/product_sans_regular</item> <!– target android sdk versions < 26 and > 14 if theme other than AppCompat –>-->
|
||||||
<item name="android:textStyle">bold</item>
|
<!-- <item name="android:textStyle">bold</item>-->
|
||||||
<item name="android:textAllCaps">false</item>
|
<!-- <item name="android:textAllCaps">false</item>-->
|
||||||
<item name="android:paddingTop">8dp</item>
|
<!-- <item name="android:paddingTop">8dp</item>-->
|
||||||
<item name="android:paddingBottom">8dp</item>
|
<!-- <item name="android:paddingBottom">8dp</item>-->
|
||||||
<item name="backgroundTint">@color/colorPrimary</item>
|
<item name="backgroundTint">@color/colorPrimary</item>
|
||||||
<item name="iconTint">@android:color/white</item>
|
<item name="iconTint">@android:color/white</item>
|
||||||
</style>
|
</style>
|
||||||
@ -26,22 +26,22 @@
|
|||||||
|
|
||||||
|
|
||||||
<style name="Button.DangerOutline" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
<style name="Button.DangerOutline" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||||
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
<!-- <item name="fontFamily">@font/product_sans_regular</item> <!– target android sdk versions < 26 and > 14 if theme other than AppCompat –>-->
|
||||||
<item name="android:textStyle">bold</item>
|
<!-- <item name="android:textStyle">bold</item>-->
|
||||||
<item name="android:textAllCaps">false</item>
|
<!-- <item name="android:textAllCaps">false</item>-->
|
||||||
<item name="android:textColor">@color/red_400</item>
|
<item name="android:textColor">@color/red_400</item>
|
||||||
<item name="android:paddingTop">8dp</item>
|
<!-- <item name="android:paddingTop">8dp</item>-->
|
||||||
<item name="android:paddingBottom">8dp</item>
|
<!-- <item name="android:paddingBottom">8dp</item>-->
|
||||||
<item name="backgroundTint">@android:color/white</item>
|
<item name="backgroundTint">@android:color/white</item>
|
||||||
<item name="iconTint">@color/red_400</item>
|
<item name="iconTint">@color/red_400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Button.DangerFull" parent="Widget.MaterialComponents.Button.UnelevatedButton">
|
<style name="Button.DangerFull" parent="Widget.MaterialComponents.Button.UnelevatedButton">
|
||||||
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
<!-- <item name="fontFamily">@font/product_sans_regular</item> <!– target android sdk versions < 26 and > 14 if theme other than AppCompat –>-->
|
||||||
<item name="android:textStyle">bold</item>
|
<!-- <item name="android:textStyle">bold</item>-->
|
||||||
<item name="android:textAllCaps">false</item>
|
<!-- <item name="android:textAllCaps">false</item>-->
|
||||||
<item name="android:paddingTop">8dp</item>
|
<!-- <item name="android:paddingTop">8dp</item>-->
|
||||||
<item name="android:paddingBottom">8dp</item>
|
<!-- <item name="android:paddingBottom">8dp</item>-->
|
||||||
<item name="backgroundTint">@color/red_400</item>
|
<item name="backgroundTint">@color/red_400</item>
|
||||||
<item name="iconTint">@android:color/white</item>
|
<item name="iconTint">@android:color/white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -82,6 +82,12 @@
|
|||||||
<string name="info">Info</string>
|
<string name="info">Info</string>
|
||||||
<string name="lu_info">LU\'s info</string>
|
<string name="lu_info">LU\'s info</string>
|
||||||
|
|
||||||
|
<string name="action_continue">Continue</string>
|
||||||
|
|
||||||
|
|
||||||
|
<string name="versamento_automatico">Versamento automatico</string>
|
||||||
|
<string name="ask_should_versamento_automatico">Effettuare il versamento automatico degli articoli presenti nelle loro posizioni di default?</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- SETTINGS -->
|
<!-- SETTINGS -->
|
||||||
<string name="action_recover_ul">Recover LU</string>
|
<string name="action_recover_ul">Recover LU</string>
|
||||||
@ -99,6 +105,7 @@
|
|||||||
<string name="orders">Orders</string>
|
<string name="orders">Orders</string>
|
||||||
<string name="articoli_in_collo_sheet_title"><![CDATA[Unit #%d]]></string>
|
<string name="articoli_in_collo_sheet_title"><![CDATA[Unit #%d]]></string>
|
||||||
<string name="details_text">Details</string>
|
<string name="details_text">Details</string>
|
||||||
|
<string name="number_text">Number</string>
|
||||||
<string name="date_text">Date</string>
|
<string name="date_text">Date</string>
|
||||||
<string name="position_text">Position</string>
|
<string name="position_text">Position</string>
|
||||||
<string name="prepared_by_text">Prepared by</string>
|
<string name="prepared_by_text">Prepared by</string>
|
||||||
|
|||||||
@ -177,11 +177,6 @@
|
|||||||
|
|
||||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Dark" />
|
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Dark" />
|
||||||
|
|
||||||
<style name="menu_labels_style">
|
|
||||||
<item name="android:background">@drawable/fab_label_background</item>
|
|
||||||
<item name="android:textColor">@color/white</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="white_button">
|
<style name="white_button">
|
||||||
<item name="colorButtonNormal">@android:color/white</item>
|
<item name="colorButtonNormal">@android:color/white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -5,9 +5,22 @@
|
|||||||
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="TextViewMaterial.DialogTitle">
|
<style name="TextViewMaterial.Dialog">
|
||||||
<item name="android:textColor">@android:color/black</item>
|
</style>
|
||||||
<item name="android:textSize">20sp</item>
|
|
||||||
|
<style name="TextViewMaterial.Dialog.HeadlineText">
|
||||||
|
<item name="android:textColor">#1C1B1F</item>
|
||||||
|
<item name="android:textSize">24sp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextViewMaterial.Dialog.SupportingText">
|
||||||
|
<item name="android:textColor">#57535D</item>
|
||||||
|
<item name="android:textSize">14sp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextViewMaterial.Dialog.Button">
|
||||||
|
<item name="android:textColor">#6750A4</item>
|
||||||
|
<item name="android:textSize">14sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
1
waterfall_toolbar/.gitignore
vendored
1
waterfall_toolbar/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
/build
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
apply plugin: 'com.android.library'
|
|
||||||
apply plugin: 'kotlin-android'
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 28
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 21
|
|
||||||
targetSdkVersion 27
|
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
||||||
// google
|
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
|
||||||
implementation 'com.google.android.material:material:1.1.0-alpha02'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
|
|
||||||
testImplementation 'junit:junit:4.12'
|
|
||||||
androidTestImplementation 'androidx.test:runner:1.1.1'
|
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
||||||
}
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
21
waterfall_toolbar/proguard-rules.pro
vendored
21
waterfall_toolbar/proguard-rules.pro
vendored
@ -1,21 +0,0 @@
|
|||||||
# Add project specific ProGuard rules here.
|
|
||||||
# You can control the set of applied configuration files using the
|
|
||||||
# proguardFiles setting in build.gradle.
|
|
||||||
#
|
|
||||||
# For more details, see
|
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
|
||||||
# class:
|
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
||||||
# public *;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Uncomment this to preserve the line number information for
|
|
||||||
# debugging stack traces.
|
|
||||||
#-keepattributes SourceFile,LineNumberTable
|
|
||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
|
||||||
# hide the original source file name.
|
|
||||||
#-renamesourcefileattribute SourceFile
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package it.integry.plugins.waterfalltoolbar;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import androidx.test.InstrumentationRegistry;
|
|
||||||
import androidx.test.runner.AndroidJUnit4;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instrumented test, which will execute on an Android device.
|
|
||||||
*
|
|
||||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
||||||
*/
|
|
||||||
@RunWith(AndroidJUnit4.class)
|
|
||||||
public class ExampleInstrumentedTest {
|
|
||||||
@Test
|
|
||||||
public void useAppContext() {
|
|
||||||
// Context of the app under test.
|
|
||||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
|
||||||
|
|
||||||
assertEquals("it.integry.plugins.waterfall_toolbar.test", appContext.getPackageName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
package="it.integry.plugins.waterfalltoolbar" />
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package it.integry.plugins.waterfalltoolbar
|
|
||||||
|
|
||||||
var density: Float? = null
|
|
||||||
|
|
||||||
data class Dp(var value: Float) {
|
|
||||||
fun toPx(): Px {
|
|
||||||
val innerDensity: Float = density ?: throw NullPointerException(
|
|
||||||
"You must set density before using DimensionUnits classes.")
|
|
||||||
return Px((value * innerDensity + 0.5f).toInt())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
data class Px(var value: Int) {
|
|
||||||
fun toDp(): Dp {
|
|
||||||
val innerDensity: Float = density ?: throw NullPointerException(
|
|
||||||
"You must set density before using DimensionUnits classes.")
|
|
||||||
return Dp(value / innerDensity + 0.5f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,353 +0,0 @@
|
|||||||
package it.integry.plugins.waterfalltoolbar
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.os.Build
|
|
||||||
import android.os.Parcel
|
|
||||||
import android.os.Parcelable
|
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import androidx.core.widget.NestedScrollView
|
|
||||||
import android.util.AttributeSet
|
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewTreeObserver
|
|
||||||
import android.widget.ScrollView
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Hugo Castelani
|
|
||||||
* Date: 19/09/17
|
|
||||||
* Time: 19:30
|
|
||||||
*/
|
|
||||||
|
|
||||||
open class WaterfallToolbar : androidx.cardview.widget.CardView {
|
|
||||||
init {
|
|
||||||
// set density to be able to use DimensionUnits
|
|
||||||
// this code must run before all the signings using DimensionUnits
|
|
||||||
if (density == null) density = resources.displayMetrics.density
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The recycler view whose scroll is going to be listened
|
|
||||||
*/
|
|
||||||
var recyclerView: androidx.recyclerview.widget.RecyclerView? = null
|
|
||||||
set(value) {
|
|
||||||
field = value
|
|
||||||
addRecyclerViewScrollListener()
|
|
||||||
}
|
|
||||||
|
|
||||||
var recyclerViewScrollListener : RecyclerView.OnScrollListener = object : RecyclerView.OnScrollListener() {
|
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
|
||||||
super.onScrolled(recyclerView, dx, dy)
|
|
||||||
// real position must always get updated
|
|
||||||
realPosition.value = realPosition.value + dy
|
|
||||||
mutualScrollListenerAction()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The scroll view whose scroll is going to be listened
|
|
||||||
*/
|
|
||||||
var scrollView: ScrollView? = null
|
|
||||||
set(value) {
|
|
||||||
field = value
|
|
||||||
addScrollViewScrollListener()
|
|
||||||
}
|
|
||||||
|
|
||||||
var scrollViewScrollListener : ViewTreeObserver.OnScrollChangedListener = ViewTreeObserver.OnScrollChangedListener {
|
|
||||||
// real position must always get updated
|
|
||||||
if(scrollView != null) {
|
|
||||||
realPosition.value = scrollView!!.scrollY
|
|
||||||
mutualScrollListenerAction()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The scroll view whose scroll is going to be listened
|
|
||||||
*/
|
|
||||||
var nestedScrollView: NestedScrollView? = null
|
|
||||||
set(value) {
|
|
||||||
field = value
|
|
||||||
if (value != null) addNestedScrollViewScrollListener()
|
|
||||||
}
|
|
||||||
|
|
||||||
var nestedScrollViewScrollListener : ViewTreeObserver.OnScrollChangedListener = ViewTreeObserver.OnScrollChangedListener {
|
|
||||||
// real position must always get updated
|
|
||||||
if(nestedScrollView != null) {
|
|
||||||
realPosition.value = nestedScrollView!!.scrollY
|
|
||||||
mutualScrollListenerAction()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The three variables ahead are null safe, since they are always set
|
|
||||||
* at least once in init() and a null value can't be assigned to them
|
|
||||||
* after that. So all the "!!" involving them below are fully harmless.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The elevation with which the toolbar starts
|
|
||||||
*/
|
|
||||||
var initialElevation: Px? = null
|
|
||||||
set(value) {
|
|
||||||
if (value != null) {
|
|
||||||
field = value
|
|
||||||
|
|
||||||
// got to update elevation in case this value have
|
|
||||||
// been set in a running and visible activity
|
|
||||||
if (isSetup) adjustCardElevation()
|
|
||||||
|
|
||||||
} else throw NullPointerException("This field cannot be null.")
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The elevation the toolbar gets when it reaches final scroll elevation
|
|
||||||
*/
|
|
||||||
var finalElevation: Px? = null
|
|
||||||
set(value) {
|
|
||||||
if (value != null) {
|
|
||||||
field = value
|
|
||||||
|
|
||||||
// got to update elevation in case this value have
|
|
||||||
// been set in a running and visible activity
|
|
||||||
if (isSetup) adjustCardElevation()
|
|
||||||
|
|
||||||
} else throw NullPointerException("This field cannot be null.")
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The percentage of the screen's height that is
|
|
||||||
* going to be scrolled to reach the final elevation
|
|
||||||
*/
|
|
||||||
var scrollFinalPosition: Int? = null
|
|
||||||
set(value) {
|
|
||||||
if (value != null) {
|
|
||||||
val screenHeight = resources.displayMetrics.heightPixels
|
|
||||||
field = Math.round(screenHeight * (value / 100.0f))
|
|
||||||
|
|
||||||
// got to update elevation in case this value have
|
|
||||||
// been set in a running and visible activity
|
|
||||||
if (isSetup) adjustCardElevation()
|
|
||||||
|
|
||||||
} else throw NullPointerException("This field cannot be null.")
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dimension units (dp and pixel) auxiliary
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Values related to Waterfall Toolbar behavior in their default forms
|
|
||||||
*/
|
|
||||||
val defaultInitialElevation = Dp(0f).toPx()
|
|
||||||
val defaultFinalElevation = Dp(4f).toPx()
|
|
||||||
val defaultScrollFinalElevation = 12
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Auxiliary that indicates if the view is already setup
|
|
||||||
*/
|
|
||||||
private var isSetup: Boolean = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Position in which toolbar must be to reach expected shadow
|
|
||||||
*/
|
|
||||||
private var orthodoxPosition = Px(0)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Recycler/scroll view real position
|
|
||||||
*/
|
|
||||||
private var realPosition = Px(0)
|
|
||||||
|
|
||||||
constructor(context: Context) : super(context) {
|
|
||||||
init(context, null)
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
|
||||||
init(context, attrs)
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int?)
|
|
||||||
: super(context, attrs, defStyleAttr!!) {
|
|
||||||
init(context, attrs)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun resetElevation() {
|
|
||||||
realPosition = Px(0)
|
|
||||||
cardElevation = 0f
|
|
||||||
}
|
|
||||||
|
|
||||||
fun resetAll() {
|
|
||||||
resetElevation()
|
|
||||||
|
|
||||||
removeNestedScrollViewScrollListener()
|
|
||||||
nestedScrollView = null
|
|
||||||
|
|
||||||
removeRecyclerViewScrollListener()
|
|
||||||
recyclerView = null
|
|
||||||
|
|
||||||
removeScrollViewScrollListener()
|
|
||||||
scrollView = null
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun init(context: Context?, attrs: AttributeSet?) {
|
|
||||||
// leave card corners square
|
|
||||||
radius = 0f
|
|
||||||
|
|
||||||
if (context != null && attrs != null) {
|
|
||||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.WaterfallToolbar)
|
|
||||||
|
|
||||||
val rawInitialElevation = typedArray.getDimensionPixelSize(
|
|
||||||
R.styleable.WaterfallToolbar_initial_elevation, defaultInitialElevation.value)
|
|
||||||
|
|
||||||
val rawFinalElevation = typedArray.getDimensionPixelSize(
|
|
||||||
R.styleable.WaterfallToolbar_final_elevation, defaultFinalElevation.value)
|
|
||||||
|
|
||||||
scrollFinalPosition = typedArray.getInteger(
|
|
||||||
R.styleable.WaterfallToolbar_scroll_final_elevation, defaultScrollFinalElevation)
|
|
||||||
|
|
||||||
this.initialElevation = Px(rawInitialElevation)
|
|
||||||
this.finalElevation = Px(rawFinalElevation)
|
|
||||||
|
|
||||||
typedArray.recycle()
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
initialElevation = defaultInitialElevation
|
|
||||||
finalElevation = defaultFinalElevation
|
|
||||||
scrollFinalPosition = defaultScrollFinalElevation
|
|
||||||
}
|
|
||||||
|
|
||||||
adjustCardElevation() // just to make sure card elevation is set
|
|
||||||
|
|
||||||
isSetup = true
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun addRecyclerViewScrollListener() {
|
|
||||||
recyclerView?.addOnScrollListener(recyclerViewScrollListener)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun removeRecyclerViewScrollListener() {
|
|
||||||
recyclerView?.removeOnScrollListener(recyclerViewScrollListener)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun addScrollViewScrollListener() {
|
|
||||||
scrollView?.viewTreeObserver?.addOnScrollChangedListener(scrollViewScrollListener)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun removeScrollViewScrollListener() {
|
|
||||||
scrollView?.viewTreeObserver?.removeOnScrollChangedListener(scrollViewScrollListener)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun addNestedScrollViewScrollListener() {
|
|
||||||
nestedScrollView?.viewTreeObserver?.addOnScrollChangedListener(nestedScrollViewScrollListener)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun removeNestedScrollViewScrollListener() {
|
|
||||||
nestedScrollView?.viewTreeObserver?.removeOnScrollChangedListener(nestedScrollViewScrollListener)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* These lines are common in both scroll listeners, so they are better joined
|
|
||||||
*/
|
|
||||||
private fun mutualScrollListenerAction() {
|
|
||||||
// orthodoxPosition can't be higher than scrollFinalPosition because
|
|
||||||
// the last one holds the position in which shadow reaches ideal size
|
|
||||||
|
|
||||||
if (realPosition.value <= scrollFinalPosition!!) {
|
|
||||||
orthodoxPosition.value = realPosition.value
|
|
||||||
} else {
|
|
||||||
orthodoxPosition.value = scrollFinalPosition!!
|
|
||||||
}
|
|
||||||
|
|
||||||
adjustCardElevation()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Speed up the card elevation setting
|
|
||||||
*/
|
|
||||||
private fun adjustCardElevation() {
|
|
||||||
cardElevation = calculateElevation().value.toFloat()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculates the elevation based on given attributes and scroll
|
|
||||||
* @return New calculated elevation
|
|
||||||
*/
|
|
||||||
private fun calculateElevation(): Px {
|
|
||||||
// getting back to rule of three:
|
|
||||||
// finalElevation = scrollFinalPosition
|
|
||||||
// newElevation = orthodoxPosition
|
|
||||||
var newElevation: Int = finalElevation!!.value * orthodoxPosition.value / scrollFinalPosition!!
|
|
||||||
|
|
||||||
// avoid values under minimum value
|
|
||||||
if (newElevation < initialElevation!!.value) newElevation = initialElevation!!.value
|
|
||||||
|
|
||||||
return Px(newElevation)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Saves the view's current dynamic state in a parcelable object
|
|
||||||
* @return A parcelable with the saved data
|
|
||||||
*/
|
|
||||||
override fun onSaveInstanceState(): Parcelable? {
|
|
||||||
val savedState = SavedState(super.onSaveInstanceState() as Parcelable)
|
|
||||||
|
|
||||||
savedState.elevation = cardElevation.toInt()
|
|
||||||
savedState.orthodoxPosition = orthodoxPosition
|
|
||||||
savedState.realPosition = realPosition
|
|
||||||
|
|
||||||
return savedState
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Restore the view's dynamic state
|
|
||||||
* @param state The frozen state that had previously been returned by onSaveInstanceState()
|
|
||||||
*/
|
|
||||||
override fun onRestoreInstanceState(state: Parcelable) {
|
|
||||||
if (state is SavedState) {
|
|
||||||
super.onRestoreInstanceState(state.superState)
|
|
||||||
|
|
||||||
// setting card elevation doesn't work until view is created
|
|
||||||
post {
|
|
||||||
// it's safe to use "!!" here, since savedState will
|
|
||||||
// always store values properly set in onSaveInstanceState()
|
|
||||||
|
|
||||||
cardElevation = state.elevation!!.toFloat()
|
|
||||||
orthodoxPosition = state.orthodoxPosition!!
|
|
||||||
realPosition = state.realPosition!!
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
super.onRestoreInstanceState(state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom parcelable to store this view's dynamic state
|
|
||||||
*/
|
|
||||||
private class SavedState : View.BaseSavedState {
|
|
||||||
var elevation: Int? = null
|
|
||||||
var orthodoxPosition: Px? = null
|
|
||||||
var realPosition: Px? = null
|
|
||||||
|
|
||||||
internal constructor(source: Parcel) : super(source)
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
|
||||||
internal constructor(source: Parcel, loader: ClassLoader) : super(source, loader)
|
|
||||||
|
|
||||||
internal constructor(superState: Parcelable) : super(superState)
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
@JvmField
|
|
||||||
internal val CREATOR: Parcelable.Creator<SavedState> = object : Parcelable.Creator<SavedState> {
|
|
||||||
override fun createFromParcel(source: Parcel): SavedState {
|
|
||||||
return SavedState(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun newArray(size: Int): Array<SavedState?> {
|
|
||||||
return arrayOfNulls(size)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<declare-styleable name="WaterfallToolbar">
|
|
||||||
<attr format="dimension" name="initial_elevation" />
|
|
||||||
<attr format="dimension" name="final_elevation" />
|
|
||||||
<attr format="integer" name="scroll_final_elevation" />
|
|
||||||
</declare-styleable>
|
|
||||||
</resources>
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
<resources>
|
|
||||||
<string name="app_name">Waterfall Toolbar</string>
|
|
||||||
</resources>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user