Compare commits
35 Commits
v1.16.35(2
...
v1.17.2(22
| Author | SHA1 | Date | |
|---|---|---|---|
| 2782c4b477 | |||
| 5f13f7a634 | |||
| e811514764 | |||
| 21137b1224 | |||
| 7da0a5ade9 | |||
| 86d92b947d | |||
| 374127dfe9 | |||
| 91b43d1974 | |||
| c167893544 | |||
| 4c9a1bbaa9 | |||
| f970eb6cac | |||
| 1e1163c04d | |||
| 48f1307095 | |||
| 64fdda43db | |||
| 6611617a81 | |||
| f488e6bad0 | |||
| 266b3d707f | |||
| a726631925 | |||
| 0b634154e4 | |||
| 3e4d4300f1 | |||
| fb527c443f | |||
| 259c719344 | |||
| 178787d907 | |||
| a51cf2e899 | |||
| 9f587ac8b1 | |||
| df97d5c4a2 | |||
| 697bd1e85e | |||
| 5ace80ba28 | |||
| 1c8abcaa58 | |||
| 96ab52821c | |||
| ecd58dea14 | |||
| 9cdc4f299e | |||
| 39af233380 | |||
| 2576d423da | |||
| 234c21c7a1 |
@@ -6,8 +6,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 217
|
||||
def appVersionName = '1.16.35'
|
||||
def appVersionCode = 220
|
||||
def appVersionName = '1.17.2'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -72,6 +72,7 @@ android {
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
|
||||
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti", ":dynamic_ime", ":dynamic_frudis", ":dynamic_saporiveri_pv", ":dynamic_saporiveri", ':dynamic_gramm']
|
||||
@@ -91,11 +92,11 @@ dependencies {
|
||||
|
||||
// Import the Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:26.3.0')
|
||||
implementation 'com.google.firebase:firebase-analytics:19.0.0'
|
||||
implementation 'com.google.firebase:firebase-core:19.0.0'
|
||||
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
||||
implementation 'com.google.firebase:firebase-crashlytics:18.0.0'
|
||||
implementation 'com.google.firebase:firebase-perf:20.0.0'
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
implementation 'com.google.firebase:firebase-core'
|
||||
implementation 'com.google.firebase:firebase-crash'
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
implementation 'com.google.firebase:firebase-perf'
|
||||
implementation 'com.google.android.gms:play-services-basement:17.6.0'
|
||||
|
||||
|
||||
@@ -116,7 +117,7 @@ dependencies {
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
def dagger2_version = '2.35.1'
|
||||
def dagger2_version = '2.29.1'
|
||||
api "com.google.dagger:dagger:$dagger2_version"
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
||||
|
||||
@@ -94,6 +94,7 @@ public class SplashActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
if(this.onRequestPermissionResult != null) {
|
||||
List<Integer> grantResultsList = new ArrayList<>();
|
||||
for(int i = 0; i < grantResults.length; i++) {
|
||||
|
||||
@@ -190,7 +190,6 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
BarcodeManager.disable();
|
||||
|
||||
this.openProgress();
|
||||
|
||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
||||
@@ -238,30 +237,34 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
|
||||
@Override
|
||||
public void onLUOpened(MtbColt mtbColt) {
|
||||
mToolbarTitleText.setText(String.format(getActivity().getText(R.string.lu_number_text).toString(), mtbColt.getNumCollo()));
|
||||
getActivity().runOnUiThread(() -> {
|
||||
mToolbarTitleText.setText(String.format(getActivity().getText(R.string.lu_number_text).toString(), mtbColt.getNumCollo()));
|
||||
|
||||
initAdapter();
|
||||
initAdapter();
|
||||
|
||||
thereIsAnOpenedUL.set(true);
|
||||
thereIsAnyRowInUL.set(mtbColt.getMtbColr().size() > 0, true);
|
||||
thereIsAnOpenedUL.set(true);
|
||||
thereIsAnyRowInUL.set(mtbColt.getMtbColr().size() > 0, true);
|
||||
|
||||
mtbColt.getMtbColr().addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
thereIsAnyRowInUL.set(mtbColt.getMtbColr().size() > 0, true);
|
||||
}
|
||||
mtbColt.getMtbColr().addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
thereIsAnyRowInUL.set(mtbColt.getMtbColr().size() > 0, true);
|
||||
}
|
||||
});
|
||||
|
||||
FBToast.successToast(getActivity(), getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||
});
|
||||
|
||||
FBToast.successToast(getActivity(), getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUClosed() {
|
||||
mToolbarTitleText.setText(getActivity().getText(R.string.free_picking_title_fragment).toString());
|
||||
destroyAdapter();
|
||||
getActivity().runOnUiThread(() -> {
|
||||
mToolbarTitleText.setText(getActivity().getText(R.string.free_picking_title_fragment).toString());
|
||||
destroyAdapter();
|
||||
|
||||
thereIsAnyRowInUL.set(false);
|
||||
thereIsAnOpenedUL.set(false);
|
||||
thereIsAnyRowInUL.set(false);
|
||||
thereIsAnOpenedUL.set(false);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -276,15 +279,17 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
this.closeProgress();
|
||||
getActivity().runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
}
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
}
|
||||
|
||||
BarcodeManager.enable();
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -357,7 +362,9 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
|
||||
@Override
|
||||
public void onRowSaved() {
|
||||
FBToast.successToast(getActivity(), getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||
getActivity().runOnUiThread(() -> {
|
||||
FBToast.successToast(getActivity(), getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -181,15 +181,18 @@ public class PickingLiberoViewModel {
|
||||
if (this.mFlagAskCliente) {
|
||||
this.sendOnLoadingEnded();
|
||||
this.sendLUClienteRequired((vtbDest, codJcom) -> {
|
||||
this.sendOnLoadingStarted();
|
||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, vtbDest, codJcom, onComplete);
|
||||
}, onComplete);
|
||||
}, () -> {
|
||||
|
||||
});
|
||||
} else {
|
||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, null, null, onComplete);
|
||||
}
|
||||
}
|
||||
|
||||
private void createNewLU_PostClienteAsk(Integer customNumCollo, String customSerCollo, VtbDest vtbDest, String codJcom, Runnable onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
MtbColt mtbColt = new MtbColt();
|
||||
mtbColt.initDefaultFields();
|
||||
mtbColt.setGestione(mDefaultGestione)
|
||||
@@ -211,7 +214,7 @@ public class PickingLiberoViewModel {
|
||||
mtbColt.setCodVdes(vtbDest.getCodVdes());
|
||||
}
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(codJcom)) {
|
||||
if (!UtilityString.isNullOrEmpty(codJcom)) {
|
||||
mtbColt.setCodJcom(codJcom);
|
||||
}
|
||||
|
||||
@@ -378,38 +381,29 @@ public class PickingLiberoViewModel {
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
mColliMagazzinoRESTConsumer.saveCollo(clonedTestata, value -> {
|
||||
for (int i = 0; i < mtbColrObservableField.size(); i++) {
|
||||
MtbColr initialMtbColr = mtbColrObservableField.get(i);
|
||||
new Thread(() -> {
|
||||
mColliMagazzinoRESTConsumer.saveCollo(clonedTestata, value -> {
|
||||
for (int i = 0; i < mtbColrObservableField.size(); i++) {
|
||||
MtbColr initialMtbColr = mtbColrObservableField.get(i);
|
||||
|
||||
initialMtbColr
|
||||
.setDataCollo(value.getDataColloS())
|
||||
.setNumCollo(value.getNumCollo())
|
||||
.setGestione(value.getGestione())
|
||||
.setSerCollo(value.getSerCollo());
|
||||
initialMtbColr
|
||||
.setDataCollo(value.getDataColloS())
|
||||
.setNumCollo(value.getNumCollo())
|
||||
.setGestione(value.getGestione())
|
||||
.setSerCollo(value.getSerCollo());
|
||||
|
||||
initialMtbColr.setRiga(value.getMtbColr().get(i).getRiga());
|
||||
initialMtbColr.setRiga(value.getMtbColr().get(i).getRiga());
|
||||
mCurrentMtbColt.getMtbColr().add(mtbColrObservableField.get(i));
|
||||
}
|
||||
|
||||
// for (int j = 0; j < value.getMtbColr().size(); j++) {
|
||||
// MtbColr savedMtbColr = value.getMtbColr().get(j);
|
||||
// if (savedMtbColr.getCodMart().equals(initialMtbColr.getCodMart()) &&
|
||||
// UtilityString.equalsIgnoreCase(savedMtbColr.getPartitaMag(), initialMtbColr.getPartitaMag()) &&
|
||||
// UtilityString.equalsIgnoreCase(savedMtbColr.getCodCol(), initialMtbColr.getCodCol()) &&
|
||||
// UtilityString.equalsIgnoreCase(savedMtbColr.getCodTagl(), initialMtbColr.getCodTagl()) &&
|
||||
// savedMtbColr.getQtaCol().equals(initialMtbColr.getQtaCol()) &&
|
||||
// savedMtbColr.getNumCnf().equals(initialMtbColr.getNumCnf())) {
|
||||
// initialMtbColr.setRiga(savedMtbColr.getRiga());
|
||||
// }
|
||||
// }
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
mCurrentMtbColt.getMtbColr().add(mtbColrObservableField.get(i));
|
||||
}
|
||||
onComplete.run();
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
|
||||
onComplete.run();
|
||||
}, this::sendError);
|
||||
}).start();
|
||||
}
|
||||
}, onComplete);
|
||||
} else {
|
||||
|
||||
@@ -103,7 +103,7 @@ public class UltimeConsegneClienteFragment extends BaseFragment implements Ultim
|
||||
dispatchConsegne();
|
||||
});
|
||||
|
||||
this.mViewModel.getDocuments().observe(this, this::refreshList);
|
||||
this.mViewModel.getDocuments().observe(this.getViewLifecycleOwner(), this::refreshList);
|
||||
|
||||
openFilterDialog();
|
||||
}
|
||||
|
||||
@@ -60,7 +60,6 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -101,7 +100,6 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void openLU() {
|
||||
DialogScanOrCreateLUView.newInstance(true, false, true, false, (mtbColt, created) -> {
|
||||
if (mtbColt == null) {
|
||||
@@ -163,21 +161,27 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
|
||||
@Override
|
||||
public void onLivelloPosizioneRequired(MtbDepoPosizione posizione, RunnableArgs<MtbDepoPosizione> onComplete) {
|
||||
DialogAskLivelloPosizione.make(getActivity(), posizione, false, onComplete, this::onError);
|
||||
this.getActivity().runOnUiThread(() -> {
|
||||
DialogAskLivelloPosizione.make(getActivity(), posizione, false, onComplete, this::onError);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSpostamentoTraDepConfirmRequired(String sourceCodMdep, String destinationCodMdep, RunnableArgs<Boolean> onComplete) {
|
||||
DialogSimpleMessageView.makeWarningDialog(Html.fromHtml("Stai spostando una UL dal deposito <b>" + sourceCodMdep + "</b> al deposito <b>" + destinationCodMdep + "</b>"),
|
||||
null,
|
||||
() -> onComplete.run(true),
|
||||
() -> onComplete.run(false))
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
this.getActivity().runOnUiThread(() -> {
|
||||
DialogSimpleMessageView.makeWarningDialog(Html.fromHtml("Stai spostando una UL dal deposito <b>" + sourceCodMdep + "</b> al deposito <b>" + destinationCodMdep + "</b>"),
|
||||
null,
|
||||
() -> onComplete.run(true),
|
||||
() -> onComplete.run(false))
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArtsChooseRequired(List<MtbColr> mtbColrList, RunnableArgs<List<MtbColr>> onComplete, Runnable onAbort) {
|
||||
DialogChooseArtsFromListaArts.make(getActivity(), mtbColrList, onComplete, onAbort);
|
||||
this.getActivity().runOnUiThread(() -> {
|
||||
DialogChooseArtsFromListaArts.make(getActivity(), mtbColrList, onComplete, onAbort);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -207,33 +211,39 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
.setCanPartitaMagBeChanged(canBatchLotBeChanged)
|
||||
.setCanLUBeClosed(false);
|
||||
|
||||
DialogInputQuantityV2View
|
||||
.newInstance(dialogInputQuantityV2DTO, (resultDTO, shouldCloseLU) -> {
|
||||
this.getActivity().runOnUiThread(() -> {
|
||||
DialogInputQuantityV2View
|
||||
.newInstance(dialogInputQuantityV2DTO, (resultDTO, shouldCloseLU) -> {
|
||||
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
onComplete.run(pickedQuantityDTO);
|
||||
onComplete.run(pickedQuantityDTO);
|
||||
|
||||
}, this::onLoadingEnded)
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
}, this::onLoadingEnded)
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataSaved() {
|
||||
DialogCommon.showDataSaved(getActivity(), () -> {
|
||||
((IPoppableActivity) getActivity()).pop();
|
||||
this.getActivity().runOnUiThread(() -> {
|
||||
DialogCommon.showDataSaved(getActivity(), () -> {
|
||||
((IPoppableActivity) getActivity()).pop();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
BarcodeManager.enable();
|
||||
this.getActivity().runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ public class DialogAskClienteAdapter extends PagerAdapter implements ViewPager.O
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
if(position != lastPage) {
|
||||
if(lastPage != -1) mDatasetViews.get(lastPage).getValue().onDismiss();
|
||||
viewPager.onPageChanged(mDatasetViews.get(position).getKey().getRoot());
|
||||
mDatasetViews.get(position).getValue().onShow();
|
||||
lastPage = position;
|
||||
@@ -111,4 +112,8 @@ public class DialogAskClienteAdapter extends PagerAdapter implements ViewPager.O
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
|
||||
}
|
||||
|
||||
public void onDismiss() {
|
||||
if(lastPage != -1) mDatasetViews.get(lastPage).getValue().onDismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
mAdapter.onDismiss();
|
||||
if(!mIsClienteSelected) {
|
||||
this.mOnAbort.run();
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
"WHERE vtb_clie.flag_stato = 'A' " +
|
||||
"ORDER BY rag_soc";
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<HashMap<String, Object>>>() {
|
||||
}.getType();
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<HashMap<String, Object>>>() { }.getType();
|
||||
|
||||
SystemRESTConsumer.processSqlStatic(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<HashMap<String, Object>>>() {
|
||||
@Override
|
||||
public void onSuccess(ArrayList<HashMap<String, Object>> value) {
|
||||
@@ -106,6 +106,11 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
BarcodeManager.removeCallback(mBarcodeScannerInstanceID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnConfirmClickListener(Runnable onConfirm) {
|
||||
this.mBinding.buttonYes.setOnClickListener(v -> {
|
||||
|
||||
@@ -71,6 +71,10 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnConfirmClickListener(Runnable onConfirm) {
|
||||
this.mOnConfirm = onConfirm;
|
||||
|
||||
@@ -12,6 +12,8 @@ public interface IDialogAskClienteViewModel {
|
||||
|
||||
void onShow();
|
||||
|
||||
void onDismiss();
|
||||
|
||||
void setOnConfirmClickListener(Runnable onConfirm);
|
||||
|
||||
void setOnAbortClickListener(Runnable onAbort);
|
||||
|
||||
@@ -161,7 +161,7 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
String currentKey = mHashmapContent.keySet().toArray()[i].toString();
|
||||
String currentValue = mHashmapContent.get(currentKey);
|
||||
|
||||
RelativeLayout singleMapContent = (RelativeLayout) inflater.inflate(R.layout.dialog_custom_content_hashmap_viewmodel, null);
|
||||
RelativeLayout singleMapContent = (RelativeLayout) inflater.inflate(R.layout.dialog_custom_content_hashmap_viewmodel, hashMapContainer);
|
||||
((TextView) singleMapContent.findViewById(R.id.dialog_content_hashmap_key)).setText(currentKey);
|
||||
((TextView) singleMapContent.findViewById(R.id.dialog_content_hashmap_value)).setText(currentValue);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
@@ -22,7 +23,6 @@ import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
@@ -42,13 +42,13 @@ public class DialogChooseArtsFromListaArts {
|
||||
private Context currentContext;
|
||||
private Dialog mDialog;
|
||||
|
||||
private DialogChooseArtsFromListaArtsLayoutBinding mBindings;
|
||||
private DialogChooseArtsFromListaArtsAdapter currentAdapter;
|
||||
|
||||
private RunnableArgs<List<MtbColr>> mOnItemsChoosed;
|
||||
private Runnable mOnAbort;
|
||||
|
||||
private List<DialogChooseArtsFromListaArtsItemModel> mDataset;
|
||||
private BindableBoolean filterStatus = new BindableBoolean(false);
|
||||
|
||||
public static void make(@NotNull final FragmentActivity activity, List<MtbColr> listaMtbColr, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
||||
activity.runOnUiThread(() -> {
|
||||
@@ -64,9 +64,9 @@ public class DialogChooseArtsFromListaArts {
|
||||
|
||||
mDataset = new ArrayList<>();
|
||||
|
||||
if(listaMtbColr != null){
|
||||
if (listaMtbColr != null) {
|
||||
for (MtbColr mtbColr : listaMtbColr) {
|
||||
if(UtilityString.isNullOrEmpty(mtbColr.getUntMis()) && mtbColr.getMtbAart() != null){
|
||||
if (UtilityString.isNullOrEmpty(mtbColr.getUntMis()) && mtbColr.getMtbAart() != null) {
|
||||
mtbColr.setUntMis(mtbColr.getMtbAart().getUntMis());
|
||||
}
|
||||
|
||||
@@ -75,56 +75,131 @@ public class DialogChooseArtsFromListaArts {
|
||||
}
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
DialogChooseArtsFromListaArtsLayoutBinding binding = DataBindingUtil.inflate(inflater, R.layout.dialog_choose_arts_from_lista_arts_layout, null, false);
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_choose_arts_from_lista_arts_layout, null, false);
|
||||
|
||||
binding.setFilterStatus(filterStatus);
|
||||
binding.emptyView.setVisibility(listaMtbColr != null && listaMtbColr.size() > 0 ? View.GONE : View.VISIBLE);
|
||||
mBindings.emptyView.setVisibility(listaMtbColr != null && listaMtbColr.size() > 0 ? View.GONE : View.VISIBLE);
|
||||
|
||||
|
||||
mDialog = new Dialog(context);
|
||||
mDialog.setContentView(binding.getRoot());
|
||||
mDialog.setContentView(mBindings.getRoot());
|
||||
mDialog.setCanceledOnTouchOutside(false);
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
mDialog.setOnCancelListener(dialog -> {
|
||||
if(this.mOnAbort != null) this.mOnAbort.run();
|
||||
if (this.mOnAbort != null) this.mOnAbort.run();
|
||||
});
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(context, mDialog);
|
||||
|
||||
|
||||
initRecyclerView(binding);
|
||||
initRecyclerView();
|
||||
|
||||
initRemoveFilterButton(binding);
|
||||
initFilter();
|
||||
|
||||
setupBarcode();
|
||||
|
||||
binding.positiveButton.setOnClickListener(v -> {
|
||||
mBindings.positiveButton.setOnClickListener(v -> {
|
||||
mDialog.dismiss();
|
||||
onPositiveClick();
|
||||
});
|
||||
|
||||
binding.negativeButton.setOnClickListener(v -> {
|
||||
mBindings.negativeButton.setOnClickListener(v -> {
|
||||
mDialog.dismiss();
|
||||
onNegativeClick();
|
||||
});
|
||||
}
|
||||
|
||||
private void initRecyclerView(DialogChooseArtsFromListaArtsLayoutBinding binding) {
|
||||
binding.dialogChooseArtsFromListaArtMainList.setNestedScrollingEnabled(false);
|
||||
private void initRecyclerView() {
|
||||
mBindings.dialogChooseArtsFromListaArtMainList.setNestedScrollingEnabled(false);
|
||||
|
||||
binding.dialogChooseArtsFromListaArtMainList.setHasFixedSize(true);
|
||||
mBindings.dialogChooseArtsFromListaArtMainList.setHasFixedSize(true);
|
||||
|
||||
binding.dialogChooseArtsFromListaArtMainList.setLayoutManager(new LinearLayoutManager(currentContext));
|
||||
mBindings.dialogChooseArtsFromListaArtMainList.setLayoutManager(new LinearLayoutManager(currentContext));
|
||||
|
||||
currentAdapter = new DialogChooseArtsFromListaArtsAdapter(currentContext, mDataset);
|
||||
binding.dialogChooseArtsFromListaArtMainList.setAdapter(currentAdapter);
|
||||
mBindings.dialogChooseArtsFromListaArtMainList.setAdapter(currentAdapter);
|
||||
}
|
||||
|
||||
|
||||
private void initRemoveFilterButton(DialogChooseArtsFromListaArtsLayoutBinding binding) {
|
||||
binding.buttonRemoveFilter.setOnClickListener(v -> {
|
||||
removeListFilter();
|
||||
private void initFilter() {
|
||||
mBindings.mainSearch.setOnCloseListener(() -> {
|
||||
this.removeListFilter();
|
||||
return true;
|
||||
});
|
||||
|
||||
mBindings.mainSearch.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||
@Override
|
||||
public boolean onQueryTextSubmit(String query) {
|
||||
// removeListFilter();
|
||||
//
|
||||
// if (!UtilityString.isNullOrEmpty(query) && query.trim().length() > 3) {
|
||||
// List<DialogChooseArtsFromListaArtsItemModel> foundRowsList = Stream.of(mDataset)
|
||||
// .filter(x -> {
|
||||
// String codMart = x.getMtbColr().getMtbAart().getCodMart();
|
||||
// String descrizioneArt = x.getMtbColr().getMtbAart().getDescrizioneEstesa();
|
||||
// String diacod = x.getMtbColr().getMtbAart().getDiacod();
|
||||
//
|
||||
// return ((codMart.startsWith(query) ||
|
||||
// codMart.endsWith(query) ||
|
||||
// codMart.contains(query) ||
|
||||
// codMart.equalsIgnoreCase(query)) ||
|
||||
// (descrizioneArt.startsWith(query) ||
|
||||
// descrizioneArt.endsWith(query) ||
|
||||
// descrizioneArt.contains(query) ||
|
||||
// descrizioneArt.equalsIgnoreCase(query)) ||
|
||||
// (diacod.startsWith(query) ||
|
||||
// diacod.endsWith(query) ||
|
||||
// diacod.contains(query) ||
|
||||
// diacod.equalsIgnoreCase(query))) &&
|
||||
// !x.isHidden();
|
||||
// })
|
||||
// .toList();
|
||||
//
|
||||
// for (int i = 0; i < mDataset.size(); i++) {
|
||||
// mDataset.get(i).setHidden(!foundRowsList.contains(mDataset.get(i)));
|
||||
// }
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onQueryTextChange(String newText) {
|
||||
removeListFilter();
|
||||
|
||||
newText = newText.toLowerCase();
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(newText) && newText.trim().length() > 2) {
|
||||
String finalNewText = newText;
|
||||
List<DialogChooseArtsFromListaArtsItemModel> foundRowsList = Stream.of(mDataset)
|
||||
.filter(x -> {
|
||||
String codMart = x.getMtbColr().getMtbAart().getCodMart().toLowerCase();
|
||||
String descrizioneArt = x.getMtbColr().getMtbAart().getDescrizioneEstesa().toLowerCase();
|
||||
String diacod = x.getMtbColr().getMtbAart().getDiacod().toLowerCase();
|
||||
|
||||
return ((codMart.startsWith(finalNewText) ||
|
||||
codMart.endsWith(finalNewText) ||
|
||||
codMart.contains(finalNewText) ||
|
||||
codMart.equalsIgnoreCase(finalNewText)) ||
|
||||
(descrizioneArt.startsWith(finalNewText) ||
|
||||
descrizioneArt.endsWith(finalNewText) ||
|
||||
descrizioneArt.contains(finalNewText) ||
|
||||
descrizioneArt.equalsIgnoreCase(finalNewText)) ||
|
||||
(diacod.startsWith(finalNewText) ||
|
||||
diacod.endsWith(finalNewText) ||
|
||||
diacod.contains(finalNewText) ||
|
||||
diacod.equalsIgnoreCase(finalNewText))) &&
|
||||
!x.isHidden();
|
||||
})
|
||||
.toList();
|
||||
|
||||
for (int i = 0; i < mDataset.size(); i++) {
|
||||
mDataset.get(i).setHidden(!foundRowsList.contains(mDataset.get(i)));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -147,9 +222,9 @@ public class DialogChooseArtsFromListaArts {
|
||||
|
||||
Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(currentContext);
|
||||
|
||||
if(UtilityBarcode.isEan13(data)){
|
||||
if (UtilityBarcode.isEan13(data)) {
|
||||
this.loadArticolo(data.getStringValue(), null, progressDialog);
|
||||
} else if(UtilityBarcode.isEtichetta128(data)) {
|
||||
} else if (UtilityBarcode.isEtichetta128(data)) {
|
||||
this.executeEtichettaEan128(data, progressDialog);
|
||||
} else {
|
||||
progressDialog.dismiss();
|
||||
@@ -165,14 +240,15 @@ public class DialogChooseArtsFromListaArts {
|
||||
|
||||
String barcodeProd = null;
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.Content)) barcodeProd = ean128Model.Content;
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||
barcodeProd = ean128Model.Content;
|
||||
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.Gtin) || !UtilityString.isNullOrEmpty(ean128Model.Content)){
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin) || !UtilityString.isNullOrEmpty(ean128Model.Content)) {
|
||||
this.loadArticolo(barcodeProd, ean128Model, progressDialog);
|
||||
} else {
|
||||
DialogCommon.showNoArtFoundDialog(currentContext, () -> {
|
||||
@@ -191,22 +267,23 @@ public class DialogChooseArtsFromListaArts {
|
||||
});
|
||||
|
||||
}
|
||||
}, ex-> {
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(currentContext, ex, progressDialog);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, Dialog progressDialog) {
|
||||
if(barcodeProd.length() == 14) {
|
||||
if (barcodeProd.length() == 14) {
|
||||
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||
}
|
||||
|
||||
String finalBarcodeProd = barcodeProd;
|
||||
ArticoloRESTConsumer.getByBarcodeProdStatic(barcodeProd, mtbAartList -> {
|
||||
|
||||
if(mtbAartList != null && mtbAartList.size() > 0) {
|
||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||
this.mBindings.mainSearch.setQuery(finalBarcodeProd, false);
|
||||
|
||||
this.searchArtInList(mtbAartList.get(0), ean128Model);
|
||||
|
||||
@@ -236,42 +313,34 @@ public class DialogChooseArtsFromListaArts {
|
||||
!x.isHidden())
|
||||
.toList();
|
||||
|
||||
if(foundRowsList.size() == 0) {
|
||||
if (foundRowsList.size() == 0) {
|
||||
DialogCommon.showNoArtFoundDialog(currentContext, null);
|
||||
} else {
|
||||
|
||||
for(int i = 0; i < mDataset.size(); i++) {
|
||||
for (int i = 0; i < mDataset.size(); i++) {
|
||||
mDataset.get(i).setHidden(!foundRowsList.contains(mDataset.get(i)));
|
||||
}
|
||||
|
||||
filterStatus.set(true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void removeListFilter() {
|
||||
filterStatus.set(false);
|
||||
for (DialogChooseArtsFromListaArtsItemModel itemModel : mDataset) {
|
||||
itemModel.setHidden(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void onPositiveClick() {
|
||||
if(mOnItemsChoosed != null) {
|
||||
if (mOnItemsChoosed != null) {
|
||||
mOnItemsChoosed.run(currentAdapter.getSelectedItems());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void onNegativeClick() {
|
||||
if(this.mOnAbort != null) mOnAbort.run();
|
||||
if (this.mOnAbort != null) mOnAbort.run();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,171 +3,168 @@
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="filterStatus"
|
||||
type="it.integry.integrywmsnative.core.di.BindableBoolean" />
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/base_root"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/buttons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_default="wrap"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintStart_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.DialogTitle"
|
||||
android:text="@string/dialog_choose_arts_from_lista_art"
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_remove_filter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
style="@style/Button.DangerOutline"
|
||||
app:icon="@drawable/ic_clear_24dp"
|
||||
app:strokeColor="@color/red_400"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:visibility="@{filterStatus.get() ? View.VISIBLE : View.GONE}"
|
||||
android:text="@string/remove_filter_button"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_text"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"/>
|
||||
|
||||
|
||||
android:layout_above="@id/buttons"
|
||||
android:layout_below="@id/title_container"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/button_remove_filter"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:padding="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/empty_view"
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_item_to_pick_text"
|
||||
android:textSize="20sp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/empty_view_gray"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/dialog_choose_arts_from_lista_art__main_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:text="@string/no_item_to_pick_text"
|
||||
android:textColor="@color/empty_view_gray"
|
||||
android:textSize="20sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/dialog_choose_arts_from_lista_art__main_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/title_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/TextViewMaterial.DialogTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/dialog_choose_arts_from_lista_art" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center">
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.SearchView
|
||||
android:id="@+id/main_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:iconifiedByDefault="true"
|
||||
app:defaultQueryHint="@string/search"
|
||||
app:iconifiedByDefault="false"
|
||||
android:layout_gravity="end"
|
||||
android:tint="@android:color/black"/>
|
||||
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- android:id="@+id/button_remove_filter"-->
|
||||
<!-- style="@style/Button.DangerOutline"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_gravity="center_horizontal"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:text="@string/remove_filter_button"-->
|
||||
<!-- android:visibility="@{filterStatus.get() ? View.VISIBLE : View.GONE}"-->
|
||||
<!-- app:icon="@drawable/ic_clear_24dp"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:strokeColor="@color/red_400" />-->
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5"/>
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/negative_button"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/abort"
|
||||
app:layout_constrainedHeight="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
android:text="@string/abort"/>
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/positive_button"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:layout_constrainedHeight="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/confirm"/>
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@@ -20,11 +20,16 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
137
build.gradle
137
build.gradle
@@ -13,10 +13,10 @@ buildscript {
|
||||
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.google.gms:google-services:4.3.5'
|
||||
classpath 'com.google.firebase:perf-plugin:1.4.0'
|
||||
classpath 'com.google.firebase:perf-plugin:1.3.5'
|
||||
|
||||
// Add the Firebase Crashlytics Gradle plugin.
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.6.1'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@@ -29,8 +29,141 @@ allprojects {
|
||||
maven { url 'https://jitpack.io' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
|
||||
// gradle.projectsEvaluated {
|
||||
// tasks.withType(JavaCompile) {
|
||||
// options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
task buildBase() {
|
||||
doFirst {
|
||||
copy {
|
||||
from 'dynamic__base/src/main/java/it/integry'
|
||||
into 'app/src/main/java/it/integry'
|
||||
}
|
||||
}
|
||||
|
||||
dependsOn "app:build"
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from 'app/build/outputs/apk/release'
|
||||
into 'dist/release/_base'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task buildFrudis() {
|
||||
doFirst {
|
||||
copy {
|
||||
from 'dynamic_frudis/src/main/java/it/integry'
|
||||
into 'app/src/main/java/it/integry'
|
||||
}
|
||||
}
|
||||
|
||||
dependsOn "app:build"
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from 'app/build/outputs/apk/release'
|
||||
into 'dist/release/frudis'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task buildGramm() {
|
||||
doFirst {
|
||||
copy {
|
||||
from 'dynamic_gramm/src/main/java/it/integry'
|
||||
into 'app/src/main/java/it/integry'
|
||||
}
|
||||
}
|
||||
|
||||
dependsOn "app:build"
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from 'app/build/outputs/apk/release'
|
||||
into 'dist/release/gramm'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task buildIme() {
|
||||
doFirst {
|
||||
copy {
|
||||
from 'dynamic_ime/src/main/java/it/integry'
|
||||
into 'app/src/main/java/it/integry'
|
||||
}
|
||||
}
|
||||
|
||||
dependsOn "app:build"
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from 'app/build/outputs/apk/release'
|
||||
into 'dist/release/ime'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task buildSaporiVeriPV() {
|
||||
doFirst {
|
||||
copy {
|
||||
from 'dynamic_saporiveri_pv/src/main/java/it/integry'
|
||||
into 'app/src/main/java/it/integry'
|
||||
}
|
||||
}
|
||||
|
||||
dependsOn "app:build"
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from 'app/build/outputs/apk/release'
|
||||
into 'dist/release/saporiveri_pv'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task buildSaporiVeri() {
|
||||
doFirst {
|
||||
copy {
|
||||
from 'dynamic_saporiveri/src/main/java/it/integry'
|
||||
into 'app/src/main/java/it/integry'
|
||||
}
|
||||
}
|
||||
|
||||
dependsOn "app:build"
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from 'app/build/outputs/apk/release'
|
||||
into 'dist/release/saporiveri'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task buildVGAlimenti() {
|
||||
doFirst {
|
||||
copy {
|
||||
from 'dynamic_vgalimenti/src/main/java/it/integry'
|
||||
into 'app/src/main/java/it/integry'
|
||||
}
|
||||
}
|
||||
|
||||
dependsOn "app:build"
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from 'app/build/outputs/apk/release'
|
||||
into 'dist/release/vgalimenti'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,59 +2,14 @@
|
||||
|
||||
SET nome_azienda=%1
|
||||
|
||||
rem setlocal enabledelayedexpansion
|
||||
rem set INTEXTFILE=build.gradle
|
||||
rem set OUTTEXTFILE=build_out.gradle
|
||||
rem set SEARCHTEXT=:dynamic__base
|
||||
rem set REPLACETEXT=:dynamic_%nome_azienda%
|
||||
rem set OUTPUTLINE=
|
||||
|
||||
rem cd app
|
||||
|
||||
rem for /f "tokens=1,* delims=<3D>" %%A in ( '"findstr /n ^^ %INTEXTFILE%"') do (
|
||||
rem SET string=%%A
|
||||
rem for /f "delims=: tokens=1,*" %%a in ("!string!") do set "string=%%b"
|
||||
rem if "!string!" == "" (
|
||||
rem echo.>>%OUTTEXTFILE%
|
||||
rem ) else (
|
||||
rem SET modified=!string:%SEARCHTEXT%=%REPLACETEXT%!
|
||||
rem echo !modified! >> %OUTTEXTFILE%
|
||||
rem )
|
||||
rem )
|
||||
rem del %INTEXTFILE%
|
||||
rem rename %OUTTEXTFILE% %INTEXTFILE%
|
||||
|
||||
rem cd ..
|
||||
|
||||
rem RMDIR app\build\generated /S /Q
|
||||
rem RMDIR app\build\intermediates /S /Q
|
||||
rem RMDIR app\build\reports /S /Q
|
||||
rem RMDIR app\build\test-results /S /Q
|
||||
rem RMDIR app\build\tmp /S /Q
|
||||
|
||||
XCOPY dynamic_%nome_azienda%\src\main\java\it\integry app\src\main\java\it\integry\ /E /Y
|
||||
CALL gradlew app:build --stacktrace
|
||||
|
||||
RMDIR app\src\main\java\it\integry\wms\ /S /Q
|
||||
|
||||
rem cd app
|
||||
MKDIR dist
|
||||
MKDIR dist\release
|
||||
MKDIR dist\release\%nome_azienda%
|
||||
|
||||
rem for /f "tokens=1,* delims=<3D>" %%A in ( '"findstr /n ^^ %INTEXTFILE%"') do (
|
||||
rem SET string=%%A
|
||||
rem for /f "delims=: tokens=1,*" %%a in ("!string!") do set "string=%%b"
|
||||
rem if "!string!" == "" (
|
||||
rem echo.>>%OUTTEXTFILE%
|
||||
rem ) else (
|
||||
rem SET modified=!string:%REPLACETEXT%=%SEARCHTEXT%!
|
||||
rem echo !modified! >> %OUTTEXTFILE%
|
||||
rem )
|
||||
rem )
|
||||
rem del %INTEXTFILE%
|
||||
rem rename %OUTTEXTFILE% %INTEXTFILE%
|
||||
rem
|
||||
rem cd ..
|
||||
|
||||
MKDIR app\build\outputs\apk\release\%nome_azienda%
|
||||
|
||||
MOVE app\build\outputs\apk\release\*.apk app\build\outputs\apk\release\%nome_azienda%\
|
||||
MOVE app\build\outputs\apk\release\*.txt app\build\outputs\apk\release\%nome_azienda%\
|
||||
MOVE app\build\outputs\apk\release\*.apk dist\release\%nome_azienda%\
|
||||
MOVE app\build\outputs\apk\release\*.txt dist\release\%nome_azienda%\
|
||||
|
||||
@@ -14,6 +14,10 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -13,8 +13,8 @@ android {
|
||||
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,17 +11,20 @@ android {
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation project(':app')
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
}
|
||||
@@ -14,8 +14,8 @@ android {
|
||||
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = '1.8'
|
||||
targetCompatibility = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ android {
|
||||
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ android {
|
||||
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
|
||||
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
|
||||
distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip
|
||||
|
||||
@@ -3,7 +3,6 @@ apply plugin: 'com.android.library'
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
@@ -20,11 +19,15 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -3,8 +3,6 @@ apply plugin: 'com.android.library'
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
@@ -21,11 +19,15 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -3,8 +3,6 @@ apply plugin: 'com.android.library'
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
@@ -12,7 +10,6 @@ android {
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -21,11 +18,15 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
include ':dynamic_gramm'
|
||||
include ':app', ':pointmobilescannerlibrary', ':dynamic_vgalimenti', ':dynamic__base', ':zebrascannerlibrary', ':honeywellscannerlibrary', ':dynamic_ime', ':dynamic_frudis', ':dynamic_saporiveri_pv', ':keyobardemulatorscannerlibrary', ':barcode_base_android_library', ':dynamic_saporiveri'
|
||||
include ':app', ':dynamic_gramm', ':pointmobilescannerlibrary', ':dynamic_vgalimenti', ':dynamic__base', ':zebrascannerlibrary', ':honeywellscannerlibrary', ':dynamic_ime', ':dynamic_frudis', ':dynamic_saporiveri_pv', ':keyobardemulatorscannerlibrary', ':barcode_base_android_library', ':dynamic_saporiveri'
|
||||
|
||||
@@ -3,7 +3,6 @@ apply plugin: 'com.android.library'
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
@@ -11,7 +10,6 @@ android {
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -20,11 +18,15 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
Reference in New Issue
Block a user