Merge branch 'feature/UpdateUI' into develop
This commit is contained in:
commit
04d811af93
17
.idea/deploymentTargetDropDown.xml
generated
Normal file
17
.idea/deploymentTargetDropDown.xml
generated
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="21088B8EFD" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2022-10-03T13:43:02.652233200Z" />
|
||||
</component>
|
||||
</project>
|
||||
@ -107,21 +107,25 @@ dependencies {
|
||||
implementation 'com.google.android.gms:play-services-basement:18.1.0'
|
||||
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.6.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
|
||||
implementation('androidx.preference:preference-ktx:1.2.0') {
|
||||
exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel'
|
||||
exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel-ktx'
|
||||
}
|
||||
|
||||
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.annimon:stream:1.2.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.5.1'
|
||||
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
|
||||
@ -49,7 +49,7 @@ public class BaseActivity extends AppCompatActivity {
|
||||
public void onError(Exception ex) {
|
||||
this.runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(this, ex);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
public void onError(Exception ex) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(getActivity(), ex);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
@ -61,8 +61,8 @@ public class UpdatesManager {
|
||||
|
||||
String destination = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/";
|
||||
|
||||
var progressDialog = DialogProgressView.newInstance("Download", null, false);
|
||||
progressDialog.show(mContext.getSupportFragmentManager(), "tag");
|
||||
var progressDialogBuilder = new DialogProgressView("Download", null, false);
|
||||
progressDialogBuilder.show(mContext.getSupportFragmentManager(), "tag");
|
||||
|
||||
|
||||
var fileDownloader = new FileDownloader()
|
||||
@ -70,13 +70,13 @@ public class UpdatesManager {
|
||||
.setUrlString(downloadURL)
|
||||
.setOnProgressUpdate(progress -> {
|
||||
mContext.runOnUiThread(() -> {
|
||||
progressDialog.setProgress(progress);
|
||||
progressDialogBuilder.setProgress(progress);
|
||||
});
|
||||
})
|
||||
.setOnDownloadCompleted(destPath -> {
|
||||
|
||||
mContext.runOnUiThread(() -> {
|
||||
progressDialog.dismiss();
|
||||
progressDialogBuilder.dismiss();
|
||||
|
||||
Uri fileLoc;
|
||||
Intent intent;
|
||||
|
||||
@ -15,7 +15,6 @@ import it.integry.integrywmsnative.core.exception.InvalidConnectionException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUGestioneException;
|
||||
import it.integry.integrywmsnative.core.rest.CommonRESTException;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class UtilityExceptions {
|
||||
@ -25,12 +24,6 @@ public class UtilityExceptions {
|
||||
InvalidLUGestioneException.class,
|
||||
InvalidLUException.class
|
||||
};
|
||||
|
||||
public static void defaultException(Context context, Exception ex, DialogProgressView progressDialog) {
|
||||
defaultException(context, ex);
|
||||
if (progressDialog != null && progressDialog.isVisible()) progressDialog.dismiss();
|
||||
}
|
||||
|
||||
public static void defaultException(Context context, Exception ex) {
|
||||
defaultException(context, ex, false);
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
public class UtilityProgress {
|
||||
|
||||
public static DialogProgressView createDefaultProgressDialog(FragmentActivity mContext) {
|
||||
var progress = DialogProgressView.newInstance();
|
||||
var progress = DialogProgressView.newInstance(null, null, true);
|
||||
progress.show(mContext.getSupportFragmentManager(), "tag");
|
||||
return progress;
|
||||
}
|
||||
|
||||
@ -798,7 +798,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(this, ex);
|
||||
}
|
||||
|
||||
BarcodeManager.enable();
|
||||
|
||||
@ -49,7 +49,7 @@ import it.integry.integrywmsnative.core.utility.UtilityContext;
|
||||
import it.integry.integrywmsnative.databinding.ActivityMainBinding;
|
||||
import it.integry.integrywmsnative.gest.login.LoginActivity;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
|
||||
public class MainActivity extends BaseActivity
|
||||
implements NavigationView.OnNavigationItemSelectedListener, IPoppableActivity {
|
||||
@ -71,9 +71,8 @@ public class MainActivity extends BaseActivity
|
||||
@Inject
|
||||
UpdatesManager updatesManager;
|
||||
|
||||
|
||||
@Inject
|
||||
DialogInputQuantityV2View mDialogInputQuantityV2View;
|
||||
DialogProgressView mDialogProgressView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -81,6 +80,7 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
MainApplication.appComponent
|
||||
.mainActivityComponent()
|
||||
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
@ -108,14 +108,6 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
init();
|
||||
|
||||
|
||||
// mDialogInputQuantityV2View
|
||||
// .setDialogInputQuantityV2DTO(new DialogInputQuantityV2DTO()
|
||||
// .setMtbAart(new MtbAart()
|
||||
// .setCodMart("AAAA")
|
||||
// .setFlagQtaCnfFissa("S")))
|
||||
// .show(getSupportFragmentManager(), "tag");
|
||||
|
||||
}
|
||||
|
||||
private void startLoginActivity() {
|
||||
|
||||
@ -171,10 +171,10 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
private void initRecyclerView() {
|
||||
mBindings.pickingLiberoMainList.setNestedScrollingEnabled(false);
|
||||
mBindings.pickingLiberoMainList.setHasFixedSize(true);
|
||||
mBindings.pickingLiberoMainList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
mBindings.pickingLiberoMainList.setLayoutManager(new LinearLayoutManager(requireActivity()));
|
||||
|
||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(getActivity(), SimpleDividerItemDecoration.VERTICAL);
|
||||
itemDecorator.setDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.divider));
|
||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(requireActivity(), SimpleDividerItemDecoration.VERTICAL);
|
||||
itemDecorator.setDrawable(ContextCompat.getDrawable(requireActivity(), R.drawable.divider));
|
||||
mBindings.pickingLiberoMainList.addItemDecoration(itemDecorator);
|
||||
}
|
||||
|
||||
@ -277,7 +277,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(getActivity(), ex);
|
||||
}
|
||||
|
||||
BarcodeManager.enable();
|
||||
|
||||
@ -287,7 +287,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(this, ex);
|
||||
}
|
||||
|
||||
BarcodeManager.enable();
|
||||
|
||||
@ -63,7 +63,7 @@ import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.Dialo
|
||||
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.scan_or_create_lu.DialogScanOrCreateLUView;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNo;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||
|
||||
public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFragment, ILifecycleFragment, RettificaGiacenzeViewModel.Listener, BottomSheetMtbColrEditView.Listener {
|
||||
|
||||
@ -341,7 +341,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(requireActivity(), ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(requireActivity(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -471,12 +471,12 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
onComplete)
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete) {
|
||||
DialogYesNo.make(getActivity(), "Posiziona UL", "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
switch (result) {
|
||||
case YES:
|
||||
DialogAskPositionOfLU.makeBase(getActivity(), false, (status, mtbDepoPosizione) -> {
|
||||
@ -496,7 +496,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
onComplete.run(false, null);
|
||||
break;
|
||||
}
|
||||
}).show();
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -75,11 +75,11 @@ import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArts;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotView;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialog;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPeso;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLuView;
|
||||
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.scan_art.DialogScanArtView;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNo;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||
|
||||
public class SpedizioneActivity extends BaseActivity implements SpedizioneViewModel.Listener, BottomSheetFragmentLUContentViewModel.Listener, BottomSheetFragmentLUContentView.Listener {
|
||||
|
||||
@ -722,9 +722,15 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
@Override
|
||||
public void onLUPesoRequired(String codTcol, BigDecimal netWeightKG, BigDecimal grossWeightKG, RunnableArgsss<String, BigDecimal, BigDecimal> onComplete) {
|
||||
DialogInputPeso.make(this, codTcol, netWeightKG, grossWeightKG, (newCodTcol, newNetWeight, newGrossWeight) -> {
|
||||
onComplete.run(newCodTcol, netWeightKG, grossWeightKG);
|
||||
}).show();
|
||||
// DialogInputPesoView.make(this, codTcol, netWeightKG, grossWeightKG, (newCodTcol, newNetWeight, newGrossWeight) -> {
|
||||
// onComplete.run(newCodTcol, netWeightKG, grossWeightKG);
|
||||
// }).show();
|
||||
|
||||
|
||||
new DialogInputPesoLuView(null, new BigDecimal(50), new BigDecimal(55), (newCodTcol, newNetWeight, newGrossWeight) -> {
|
||||
// onComplete.run(newCodTcol, netWeightKG, grossWeightKG);
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -856,7 +862,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
@Override
|
||||
public void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete) {
|
||||
DialogYesNo.make(this, "Posiziona UL", "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
switch (result) {
|
||||
case YES:
|
||||
DialogAskPositionOfLU.makeBase(this, false, (status, mtbDepoPosizione) -> {
|
||||
@ -872,7 +878,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
onComplete.run(false, null);
|
||||
break;
|
||||
}
|
||||
}).show();
|
||||
}).show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
public void askShouldPrintPackingList(PrintOrderCloseDTO printOrderCloseDTO, RunnableArgs<PrintOrderCloseDTO> onComplete) {
|
||||
@ -923,9 +929,9 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
@Override
|
||||
public void onCreateDocsRequest() {
|
||||
DialogYesNo.make(this, "Chiusura ordine", "Vuoi creare i documenti per gli ordini selezionati?", result -> {
|
||||
new DialogYesNoView("Chiusura ordine", "Vuoi creare i documenti per gli ordini selezionati?", result -> {
|
||||
this.mViewmodel.onCreateDocsAnswered(result);
|
||||
}).show();
|
||||
}).show(this.getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -29,13 +29,13 @@ public class FilterChipView extends Chip {
|
||||
this.defaultChipBackgroundColor = getChipBackgroundColor();
|
||||
this.defaultChipTextColor = getTextColors();
|
||||
|
||||
setShapeAppearanceModel(
|
||||
getShapeAppearanceModel()
|
||||
.withCornerSize(4)
|
||||
.toBuilder()
|
||||
.build());
|
||||
|
||||
setChipMinHeight(getChipMinHeight() * 1.25f);
|
||||
// setShapeAppearanceModel(
|
||||
// getShapeAppearanceModel()
|
||||
// .withCornerSize(4)
|
||||
// .toBuilder()
|
||||
// .build());
|
||||
//
|
||||
// setChipMinHeight(getChipMinHeight() * 1.25f);
|
||||
|
||||
setOnCloseIconClickListener(v -> {
|
||||
if (onResetClicked != null) onResetClicked.run();
|
||||
|
||||
@ -1,18 +1,16 @@
|
||||
package it.integry.integrywmsnative.view.dialogs;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.app.Dialog;
|
||||
import android.os.Build;
|
||||
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.fragment.app.DialogFragment;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
@ -29,36 +27,51 @@ public class DialogProgressView extends DialogFragment {
|
||||
private boolean indeterminateProgress;
|
||||
|
||||
public static DialogProgressView newInstance(String title, String subtitle, boolean indeterminate) {
|
||||
return new DialogProgressView()
|
||||
.setIndeterminateProgress(indeterminate)
|
||||
.setTitle(title)
|
||||
.setSubtitle(subtitle);
|
||||
return new DialogProgressView(title, subtitle, indeterminate);
|
||||
}
|
||||
|
||||
public static DialogProgressView newInstance() {
|
||||
return newInstance(null, null, true);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public DialogProgressView(String title, String subtitle, boolean indeterminate) {
|
||||
this.setTitle(title);
|
||||
this.setSubtitle(subtitle);
|
||||
this.setIndeterminateProgress(indeterminate);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_progress, container, false);
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogProgressBinding.inflate(LayoutInflater.from(requireContext()));
|
||||
|
||||
setCancelable(false);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
mBindings.setTitle(UtilityString.isNullOrEmpty(title) ? requireContext().getString(R.string.loading) : title);
|
||||
if (!UtilityString.isNullOrEmpty(subtitle)) mBindings.setSubtitle(subtitle);
|
||||
|
||||
mBindings.setTitle(UtilityString.isNullOrEmpty(title) ? requireActivity().getString(R.string.loading) : title);
|
||||
|
||||
mBindings.setSubtitle(subtitle);
|
||||
mBindings.progressBar.setIndeterminate(isIndeterminateProgress());
|
||||
if (!isIndeterminateProgress()) mBindings.progressBar.setMax(100);
|
||||
|
||||
if(!isIndeterminateProgress()){
|
||||
mBindings.progressBar.setMax(100);
|
||||
return new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false)
|
||||
.create();
|
||||
}
|
||||
|
||||
return mBindings.getRoot();
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getSubtitle() {
|
||||
return subtitle;
|
||||
}
|
||||
|
||||
public void setSubtitle(String subtitle) {
|
||||
this.subtitle = subtitle;
|
||||
}
|
||||
|
||||
public boolean isIndeterminateProgress() {
|
||||
return indeterminateProgress;
|
||||
@ -69,17 +82,6 @@ public class DialogProgressView extends DialogFragment {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public DialogProgressView setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogProgressView setSubtitle(String subtitle) {
|
||||
this.subtitle = subtitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setProgress(int progress) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
mBindings.progressBar.setProgress(progress, true);
|
||||
|
||||
@ -1,15 +1,12 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.app.Dialog;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.Spanned;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -19,7 +16,8 @@ import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@ -66,7 +64,8 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
private final HashMap<String, String> mHashmapContent;
|
||||
private final Runnable mOnPositiveClick;
|
||||
private final Runnable mOnNegativeClick;
|
||||
private final @StringRes Integer mRNeutralButtonString;
|
||||
private final @StringRes
|
||||
Integer mRNeutralButtonString;
|
||||
private final Runnable mOnNeutralClick;
|
||||
|
||||
|
||||
@ -76,7 +75,6 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
|
||||
|
||||
private DialogBaseBinding mBindings;
|
||||
private Context mContext;
|
||||
|
||||
public static DialogSimpleMessageView newInstance(@NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent, Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
return new DialogSimpleMessageView(type, titleText, messageText, hashmapContent, onPositiveClick, onNegativeClick, rNeutralButtonString, onNeutralClick);
|
||||
@ -99,57 +97,79 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(this.mContext, this);
|
||||
UtilityDialog.setTo90PercentWidth(this.requireContext(), this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@NonNull
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
this.mContext = getActivity();
|
||||
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_base, container, false);
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogBaseBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
|
||||
mBindings.setView(this);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
getDialog().setCanceledOnTouchOutside(false);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
this.initContent();
|
||||
|
||||
var alertDialogBuilder = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false);
|
||||
|
||||
if (isPositiveVisible())
|
||||
alertDialogBuilder.setPositiveButton(getPositiveButtonText(), (dialog, which) -> {
|
||||
this.mOnPositiveClick.run();
|
||||
});
|
||||
|
||||
if (isNeutralVisible())
|
||||
alertDialogBuilder.setNeutralButton(getNeutralButtonText(), (dialog, which) -> {
|
||||
this.mOnNeutralClick.run();
|
||||
});
|
||||
|
||||
if (isNegativeVisible())
|
||||
alertDialogBuilder.setNegativeButton(getNegativeButtonText(), (dialog, which) -> {
|
||||
this.mOnNegativeClick.run();
|
||||
});
|
||||
|
||||
var alertDialog = alertDialogBuilder.create();
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private void initContent() {
|
||||
int colorBackgroundTitle = -1;
|
||||
Drawable titleIconRes = null;
|
||||
|
||||
switch (mType) {
|
||||
case INFO:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.light_blue_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_info_78dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.colorPrimary);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_info_78dp, null);
|
||||
break;
|
||||
|
||||
case SUCCESS:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.green_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_done_white_24dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.green_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_done_white_24dp, null);
|
||||
break;
|
||||
|
||||
case WARNING:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.yellow_600);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_warning_white_24dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.yellow_600);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_warning_white_24dp, null);
|
||||
break;
|
||||
|
||||
case ERROR:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.red_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_mood_bad_24dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.red_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_mood_bad_24dp, null);
|
||||
break;
|
||||
}
|
||||
|
||||
this.positiveButtonText = mContext.getText(R.string.ok).toString();
|
||||
this.negativeButtonText = mContext.getText(R.string.no).toString();
|
||||
this.positiveButtonText = requireContext().getText(R.string.ok).toString();
|
||||
this.negativeButtonText = requireContext().getText(R.string.no).toString();
|
||||
|
||||
//Title VIEW
|
||||
mBindings.titleText.setText(mTitleText);
|
||||
ColorStateList colorStateList = ColorStateList.valueOf(Color.WHITE);
|
||||
ColorStateList colorStateList = ColorStateList.valueOf(colorBackgroundTitle);
|
||||
mBindings.titleIcon.setImageTintList(colorStateList);
|
||||
mBindings.titleIcon.setImageDrawable(titleIconRes);
|
||||
|
||||
mBindings.titleContainer.setBackgroundColor(colorBackgroundTitle);
|
||||
// mBindings.titleContainer.setBackgroundColor(colorBackgroundTitle);
|
||||
|
||||
//Content View
|
||||
mBindings.descriptionText.setText(mMessageText);
|
||||
@ -161,15 +181,15 @@ 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, hashMapContainer);
|
||||
RelativeLayout singleMapContent = (RelativeLayout) LayoutInflater.from(requireContext()).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);
|
||||
|
||||
hashMapContainer.addView(singleMapContent);
|
||||
}
|
||||
} else {
|
||||
hashMapContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
|
||||
@ -191,7 +211,7 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
}
|
||||
|
||||
public String getNeutralButtonText() {
|
||||
return mRNeutralButtonString != null && mRNeutralButtonString != -1 ? mContext.getText(mRNeutralButtonString).toString() : null;
|
||||
return mRNeutralButtonString != null && mRNeutralButtonString != -1 ? requireContext().getText(mRNeutralButtonString).toString() : null;
|
||||
}
|
||||
|
||||
public String getNegativeButtonText() {
|
||||
|
||||
@ -1,81 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.basket_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||
import it.integry.integrywmsnative.databinding.DialogBasketLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1.DialogBasketLU_Page1_ViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page2.DialogBasketLU_Page2_ViewModel;
|
||||
|
||||
public class DialogBasketLU {
|
||||
|
||||
private Context mContext;
|
||||
private Dialog mDialog;
|
||||
private DialogBasketLuBinding mBinding;
|
||||
|
||||
private RunnableArgs<MtbColt> mOnComplete;
|
||||
|
||||
public static Dialog make(final Context context, RunnableArgs<MtbColt> onComplete) {
|
||||
return new DialogBasketLU(context, onComplete).mDialog;
|
||||
}
|
||||
|
||||
|
||||
private DialogBasketLU(Context context, RunnableArgs<MtbColt> onComplete) {
|
||||
mContext = context;
|
||||
mOnComplete = onComplete;
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.dialog_basket_lu, null, false);
|
||||
|
||||
mDialog = new Dialog(context);
|
||||
|
||||
mDialog.setContentView(mBinding.getRoot());
|
||||
|
||||
mDialog.setCanceledOnTouchOutside(false);
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(context, mDialog);
|
||||
|
||||
this.initViewPager();
|
||||
}
|
||||
|
||||
private void initViewPager() {
|
||||
List<Map.Entry<Integer, Class<?>>> views = new ArrayList<>();
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_basket_lu__page1, DialogBasketLU_Page1_ViewModel.class));
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_basket_lu__page2, DialogBasketLU_Page2_ViewModel.class));
|
||||
|
||||
DialogBasketLU_ViewPagerAdapter viewPagerAdapter = new DialogBasketLU_ViewPagerAdapter(mContext, views);
|
||||
mBinding.viewpager.setAdapter(viewPagerAdapter);
|
||||
mBinding.viewpager.beginFakeDrag();
|
||||
mBinding.viewpager.addOnPageChangeListener(viewPagerAdapter);
|
||||
mBinding.viewpager.setEnabled(false);
|
||||
|
||||
|
||||
mDialog.setOnShowListener(v -> {
|
||||
|
||||
|
||||
viewPagerAdapter.getViewModel(R.layout.dialog_basket_lu__page2).setOnConfirmClickListener(data -> {
|
||||
MtbColt mtbColt = (MtbColt) data;
|
||||
|
||||
mOnComplete.run(mtbColt);
|
||||
mDialog.dismiss();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.basket_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.databinding.DialogBasketLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1.DialogBasketLU_Page1_ViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page2.DialogBasketLU_Page2_ViewModel;
|
||||
|
||||
public class DialogBasketLUView extends BaseDialogFragment {
|
||||
|
||||
private final RunnableArgs<MtbColt> mOnComplete;
|
||||
private DialogBasketLuBinding mBindings;
|
||||
|
||||
|
||||
|
||||
public DialogBasketLUView(RunnableArgs<MtbColt> onComplete) {
|
||||
mOnComplete = onComplete;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogBasketLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false)
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
this.initViewPager(alertDialog);
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private void initViewPager(Dialog dialog) {
|
||||
List<Map.Entry<Integer, Class<?>>> views = new ArrayList<>();
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_basket_lu__page1, DialogBasketLU_Page1_ViewModel.class));
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_basket_lu__page2, DialogBasketLU_Page2_ViewModel.class));
|
||||
|
||||
DialogBasketLU_ViewPagerAdapter viewPagerAdapter = new DialogBasketLU_ViewPagerAdapter(requireContext(), views);
|
||||
mBindings.viewpager.setAdapter(viewPagerAdapter);
|
||||
mBindings.viewpager.beginFakeDrag();
|
||||
mBindings.viewpager.addOnPageChangeListener(viewPagerAdapter);
|
||||
mBindings.viewpager.setEnabled(false);
|
||||
|
||||
|
||||
dialog.setOnShowListener(v -> {
|
||||
viewPagerAdapter.getViewModel(R.layout.dialog_basket_lu__page2).setOnConfirmClickListener(data -> {
|
||||
MtbColt mtbColt = (MtbColt) data;
|
||||
|
||||
mOnComplete.run(mtbColt);
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,135 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.input_peso_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.di.BindableString;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputPesoLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
|
||||
public class DialogInputPeso {
|
||||
|
||||
|
||||
private final FragmentActivity mContext;
|
||||
private final DialogInputPesoLuBinding mBindings;
|
||||
private final DialogInputPesoViewModel mViewModel;
|
||||
private final Dialog currentDialog;
|
||||
|
||||
private List<MtbTCol> codTcolList = null;
|
||||
private ArrayAdapter<String> codTcolArrayAdapter = null;
|
||||
|
||||
public static Dialog make(final FragmentActivity context, String codTcol, BigDecimal netWeight, BigDecimal grossWeight, RunnableArgsss<String, BigDecimal, BigDecimal> onDialogDismiss) {
|
||||
return new DialogInputPeso(context, codTcol, netWeight, grossWeight, onDialogDismiss).currentDialog;
|
||||
}
|
||||
|
||||
|
||||
private DialogInputPeso(final FragmentActivity context, String codTcol, BigDecimal netWeight, BigDecimal grossWeight, RunnableArgsss<String, BigDecimal, BigDecimal> onDialogDismiss) {
|
||||
this.mContext = context;
|
||||
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_input_peso_lu, null, false);
|
||||
|
||||
currentDialog = new Dialog(context);
|
||||
currentDialog.setContentView(mBindings.getRoot());
|
||||
|
||||
currentDialog.setCanceledOnTouchOutside(false);
|
||||
currentDialog.setCancelable(false);
|
||||
currentDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
mViewModel = new DialogInputPesoViewModel();
|
||||
mViewModel.codTcol.set(codTcol);
|
||||
mViewModel.netWeight.set(UtilityNumber.decimalToString(netWeight));
|
||||
mViewModel.grossWeight.set(UtilityNumber.decimalToString(grossWeight));
|
||||
|
||||
mBindings.setViewModel(mViewModel);
|
||||
|
||||
mBindings.buttonConfirm.setOnClickListener(v -> {
|
||||
currentDialog.dismiss();
|
||||
|
||||
String newCodTcol = null;
|
||||
|
||||
if(mViewModel.codTcol.get() != null) {
|
||||
Optional<MtbTCol> newCodTcolOptional = Stream.of(codTcolList)
|
||||
.filter(x -> (x.getCodTcol() + " - " + x.getDescrizione()).equalsIgnoreCase(mViewModel.codTcol.get()))
|
||||
.findSingle();
|
||||
|
||||
if(newCodTcolOptional.isPresent()) newCodTcol = newCodTcolOptional.get().getCodTcol();
|
||||
}
|
||||
|
||||
|
||||
BigDecimal netWeightDecimal = new BigDecimal(mViewModel.netWeight.get());
|
||||
BigDecimal grossWeightDecimal = new BigDecimal(mViewModel.grossWeight.get());
|
||||
|
||||
onDialogDismiss.run(newCodTcol, netWeightDecimal, grossWeightDecimal);
|
||||
});
|
||||
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void init() {
|
||||
|
||||
final DialogProgressView progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
|
||||
MagazzinoRESTConsumer.getTipiColloStatic(codTcols -> {
|
||||
this.codTcolList = codTcols;
|
||||
|
||||
List<String> codTcolDescriptions = Stream.of(codTcols)
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.toList();
|
||||
|
||||
if(mViewModel.codTcol.get() != null) {
|
||||
Optional<String> newCodTcol = Stream.of(codTcols)
|
||||
.filter(x -> x.getCodTcol().equalsIgnoreCase(mViewModel.codTcol.get()))
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.findSingle();
|
||||
|
||||
if(newCodTcol.isPresent()) mViewModel.codTcol.set(newCodTcol.get());
|
||||
}
|
||||
|
||||
codTcolArrayAdapter = new ArrayAdapter(mContext, R.layout.array_adapter_single_item);
|
||||
codTcolArrayAdapter.addAll(codTcolDescriptions);
|
||||
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
|
||||
|
||||
progressDialog.dismiss();
|
||||
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class DialogInputPesoViewModel {
|
||||
public BindableString codTcol = new BindableString();
|
||||
public BindableString netWeight = new BindableString();
|
||||
public BindableString grossWeight = new BindableString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.input_peso_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.di.BindableString;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputPesoLuBinding;
|
||||
|
||||
public class DialogInputPesoLuView extends DialogFragment {
|
||||
|
||||
private DialogInputPesoLuBinding mBindings;
|
||||
private RunnableArgsss<String, BigDecimal, BigDecimal> onDialogDismiss;
|
||||
|
||||
public BindableString codTcol = new BindableString();
|
||||
public BindableString netWeight = new BindableString();
|
||||
public BindableString grossWeight = new BindableString();
|
||||
|
||||
|
||||
private List<MtbTCol> codTcolList = null;
|
||||
private ArrayAdapter<String> codTcolArrayAdapter = null;
|
||||
|
||||
|
||||
public DialogInputPesoLuView(String codTcol, BigDecimal netWeight, BigDecimal grossWeight, RunnableArgsss<String, BigDecimal, BigDecimal> onDialogDismiss) {
|
||||
this.onDialogDismiss = onDialogDismiss;
|
||||
|
||||
this.codTcol.set(codTcol);
|
||||
this.netWeight.set(UtilityNumber.decimalToString(netWeight));
|
||||
this.grossWeight.set(UtilityNumber.decimalToString(grossWeight));
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogInputPesoLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
mBindings.setView(this);
|
||||
|
||||
this.init();
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.confirm, (dialog, which) -> {
|
||||
String newCodTcol = null;
|
||||
|
||||
if(codTcol.get() != null) {
|
||||
Optional<MtbTCol> newCodTcolOptional = Stream.of(codTcolList)
|
||||
.filter(x -> (x.getCodTcol() + " - " + x.getDescrizione()).equalsIgnoreCase(codTcol.get()))
|
||||
.findSingle();
|
||||
|
||||
if(newCodTcolOptional.isPresent()) newCodTcol = newCodTcolOptional.get().getCodTcol();
|
||||
}
|
||||
|
||||
|
||||
BigDecimal netWeightDecimal = new BigDecimal(netWeight.get());
|
||||
BigDecimal grossWeightDecimal = new BigDecimal(grossWeight.get());
|
||||
|
||||
onDialogDismiss.run(newCodTcol, netWeightDecimal, grossWeightDecimal);
|
||||
})
|
||||
.create();
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
// final DialogProgressView progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
|
||||
MagazzinoRESTConsumer.getTipiColloStatic(codTcols -> {
|
||||
this.codTcolList = codTcols;
|
||||
|
||||
List<String> codTcolDescriptions = Stream.of(codTcols)
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.toList();
|
||||
|
||||
if(codTcol.get() != null) {
|
||||
Optional<String> newCodTcol = Stream.of(codTcols)
|
||||
.filter(x -> x.getCodTcol().equalsIgnoreCase(codTcol.get()))
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.findSingle();
|
||||
|
||||
if(newCodTcol.isPresent()) codTcol.set(newCodTcol.get());
|
||||
}
|
||||
|
||||
codTcolArrayAdapter = new ArrayAdapter(requireContext(), R.layout.array_adapter_single_item);
|
||||
codTcolArrayAdapter.addAll(codTcolDescriptions);
|
||||
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
|
||||
|
||||
// progressDialog.dismiss();
|
||||
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(requireContext(), ex);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -2,17 +2,14 @@ package it.integry.integrywmsnative.view.dialogs.scan_or_create_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
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 com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -30,7 +27,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.databinding.DialogScanOrCreateLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.DialogBasketLU;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.DialogBasketLUView;
|
||||
|
||||
public class DialogScanOrCreateLUView extends BaseDialogFragment implements DialogScanOrCreateLUViewModel.Listener {
|
||||
|
||||
@ -40,12 +37,12 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
private DialogScanOrCreateLuBinding mBindings;
|
||||
private int mBarcodeScannerIstanceID;
|
||||
|
||||
private RunnableArgss<MtbColt, Boolean> mOnComplete;
|
||||
private final RunnableArgss<MtbColt, Boolean> mOnComplete;
|
||||
private MtbColt openedMtbColt;
|
||||
|
||||
private boolean mShouldCheckResiduo;
|
||||
private boolean mShouldCheckIfExistDoc;
|
||||
private boolean mEnableCreation;
|
||||
private final boolean mShouldCheckResiduo;
|
||||
private final boolean mShouldCheckIfExistDoc;
|
||||
private final boolean mEnableCreation;
|
||||
|
||||
private final BindableBoolean basketEnabled = new BindableBoolean();
|
||||
private final BindableBoolean creationEnabled = new BindableBoolean();
|
||||
@ -73,22 +70,21 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
|
||||
mEnableCreation = enableCreation;
|
||||
mOnComplete = onComplete;
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
this.initBarcode();
|
||||
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_scan_or_create_lu, container, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
mBindings.setView(this);
|
||||
|
||||
MainApplication.appComponent
|
||||
.dialogScanOrCreateLUComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
this.initBarcode();
|
||||
|
||||
mBindings = DialogScanOrCreateLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
mBindings.setView(this);
|
||||
|
||||
this.mViewModel
|
||||
.setListener(this);
|
||||
@ -97,27 +93,22 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc, mEnableCreation);
|
||||
|
||||
mBindings.createNewLuButton.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
this.mViewModel.createNewLU();
|
||||
});
|
||||
|
||||
mBindings.viewBasket.setOnClickListener(v -> {
|
||||
DialogBasketLU.make(getActivity(), mtbColt -> {
|
||||
new DialogBasketLUView(mtbColt -> {
|
||||
onLUOpened(mtbColt, false);
|
||||
}).show();
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
var dialog = super.onCreateDialog(savedInstanceState);
|
||||
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
return dialog;
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false)
|
||||
.create();
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,52 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.yes_no;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.databinding.DialogYesNoBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
|
||||
public class DialogYesNo {
|
||||
|
||||
private Dialog currentDialog;
|
||||
|
||||
public static Dialog make(final Context context, final String title, final String description, RunnableArgs<DialogConsts.Results> onDialogDismiss) {
|
||||
return new DialogYesNo(context, title, description, onDialogDismiss).currentDialog;
|
||||
}
|
||||
|
||||
private DialogYesNo(Context context, String title, String description, RunnableArgs<DialogConsts.Results> onDialogDismiss) {
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
DialogYesNoBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_yes_no, null, false);
|
||||
|
||||
currentDialog = new Dialog(context);
|
||||
|
||||
currentDialog.setContentView(bindings.getRoot());
|
||||
|
||||
currentDialog.setCancelable(false);
|
||||
currentDialog.setCanceledOnTouchOutside(false);
|
||||
currentDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
bindings.titleText.setText(title);
|
||||
bindings.descriptionText.setText(description);
|
||||
|
||||
bindings.buttonYes.setOnClickListener(v -> {
|
||||
onDialogDismiss.run(DialogConsts.Results.YES);
|
||||
currentDialog.dismiss();
|
||||
});
|
||||
|
||||
bindings.buttonNo.setOnClickListener(v -> {
|
||||
onDialogDismiss.run(DialogConsts.Results.NO);
|
||||
currentDialog.dismiss();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.yes_no;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogYesNoBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
|
||||
public class DialogYesNoView extends DialogFragment {
|
||||
|
||||
private final String title;
|
||||
private final String description;
|
||||
private final RunnableArgs<DialogConsts.Results> onDialogDismiss;
|
||||
|
||||
public DialogYesNoView(final String title, final String description, RunnableArgs<DialogConsts.Results> onDialogDismiss) {
|
||||
super();
|
||||
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.onDialogDismiss = onDialogDismiss;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
var binding = DialogYesNoBinding.inflate(LayoutInflater.from(requireContext()));
|
||||
binding.executePendingBindings();
|
||||
|
||||
if(UtilityString.isNullOrEmpty(title)) {
|
||||
binding.titleText.setVisibility(View.GONE);
|
||||
binding.descriptionText.setTextAppearance(requireContext(), R.style.TextAppearance_Material3_BodyLarge);
|
||||
} else {
|
||||
binding.titleText.setText(title);
|
||||
binding.titleText.setVisibility(View.VISIBLE);
|
||||
binding.descriptionText.setTextAppearance(requireContext(), R.style.TextAppearance_Material3_BodyMedium);
|
||||
}
|
||||
|
||||
binding.descriptionText.setText(description);
|
||||
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(binding.getRoot())
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Ok", (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.YES);
|
||||
})
|
||||
.setNegativeButton("Annulla", (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.NO);
|
||||
})
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
}
|
||||
@ -17,58 +17,40 @@
|
||||
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">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/title_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/green_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/title_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:src="@drawable/ic_error_white_24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
android:id="@id/title_icon"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/base_buttons_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="Title here" />
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextViewMaterial"
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="left"
|
||||
tools:text="Description here" />
|
||||
|
||||
|
||||
@ -76,203 +58,202 @@
|
||||
android:id="@+id/dialog_content_hashmap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp">
|
||||
android:paddingHorizontal="12dp" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
<!-- <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" />-->
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<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" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.OutlinedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.onNegativeClick()}"-->
|
||||
<!-- android:text="@{view.negativeButtonText}"-->
|
||||
<!-- tools:text="Neutral"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/center_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNegativeClick()}"
|
||||
android:text="@{view.negativeButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/center_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{!view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/ok_left_buttons_guideline"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.25" />-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{!view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/ok_right_buttons_guideline"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.75" />-->
|
||||
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@id/ok_right_buttons_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/ok_left_buttons_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/ok_left_buttons_guideline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.25" />
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/ok_right_buttons_guideline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.75" />
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/left_buttons_guideline"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.33" />-->
|
||||
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="@id/ok_right_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="@id/ok_left_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/right_buttons_guideline"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.66" />-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/left_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.33" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/right_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.66" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Button.DangerFull"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Negative"-->
|
||||
<!-- android:onClick="@{() -> view.onNegativeClick()}"-->
|
||||
<!-- android:text="@{view.negativeButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.DangerFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNegativeClick()}"
|
||||
android:text="@{view.negativeButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.OutlinedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Neutral"-->
|
||||
<!-- android:onClick="@{() -> view.onNeutralClick()}"-->
|
||||
<!-- android:text="@{view.neutralButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:strokeColor="@color/colorPrimary" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNeutralClick()}"
|
||||
android:text="@{view.neutralButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/right_buttons_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/right_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{!view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/center_guideline2"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.5" />-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{!view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_guideline2"
|
||||
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-->
|
||||
<!-- style="@style/Widget.Material3.Button.OutlinedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Neutral"-->
|
||||
<!-- android:onClick="@{() -> view.onNeutralClick()}"-->
|
||||
<!-- android:text="@{view.neutralButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/center_guideline2"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:strokeColor="@color/colorPrimary" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNeutralClick()}"
|
||||
android:text="@{view.neutralButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/center_guideline2"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline2"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@ -1,45 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<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_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="@string/basket"
|
||||
android:gravity="center_horizontal"/>
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/basket" />
|
||||
|
||||
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:animateLayoutChanges="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</layout>
|
||||
@ -1,10 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.model.MtbColt" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
@ -12,49 +17,41 @@
|
||||
type="MtbColt" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@{mtbColt.numCollo.toString()}"
|
||||
tools:text="22222"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:textColor="@android:color/white"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
</RelativeLayout>
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@{mtbColt.numCollo.toString()}"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
tools:text="22222" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
@ -63,25 +60,25 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_toStartOf="@id/posizione_collo"
|
||||
android:layout_alignParentStart="true"
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toStartOf="@id/posizione_collo"
|
||||
android:text="@{mtbColt.getDataColloHumanLong()}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:text="@{mtbColt.getDataColloHumanLong()}"
|
||||
tools:text="28 ottobre 2018" />
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/posizione_collo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@{mtbColt.posizione}"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColt.posizione) ? View.INVISIBLE : View.VISIBLE}"
|
||||
tools:text="A01F01C01L01" />
|
||||
@ -90,16 +87,17 @@
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:text="@{`Preparato da: ` + mtbColt.preparatoDa}"
|
||||
android:textSize="14sp"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColt.preparatoDa) ? View.INVISIBLE : View.VISIBLE}"
|
||||
tools:text="Preparato da: Utente" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
@ -45,7 +45,7 @@
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.85" />
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
@ -69,7 +69,7 @@
|
||||
android:text="@string/no_lu_found_message"
|
||||
android:layout_marginTop="16dp"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"/>
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@ -106,15 +106,13 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_abort"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
style="@style/Widget.Material3.Button.TextButton.Dialog"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:text="@string/back"
|
||||
app:icon="@drawable/ic_black_back"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="24dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@ -123,15 +121,13 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_confirm"
|
||||
style="@style/Button.PrimaryFull"
|
||||
style="@style/Widget.Material3.Button.TonalButton.Icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:text="@string/use"
|
||||
app:icon="@drawable/ic_black_tick"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@ -1,83 +1,74 @@
|
||||
<?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">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.text.Html" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
<variable
|
||||
name="mContext"
|
||||
type="android.content.Context" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPeso.DialogInputPesoViewModel" />
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLuView" />
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/light_blue_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
android:layout_margin="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="@string/action_insert_weight"
|
||||
android:gravity="center_horizontal"/>
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/action_insert_weight" />
|
||||
|
||||
<TextView
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="@string/dialog_input_peso_lu_description"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="16dp" />
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/dialog_input_peso_lu_description" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
|
||||
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
@ -91,12 +82,12 @@
|
||||
android:id="@+id/filled_exposed_dropdown_cod_tcol"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:nextFocusForward="@id/filled_exposed_dropdown_vettore"
|
||||
app:binding="@{viewModel.codTcol}"/>
|
||||
android:singleLine="true"
|
||||
app:binding="@{view.codTcol}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -120,69 +111,47 @@
|
||||
app:layout_constraintGuide_percent="0.51" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_center_1"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/TextInputLayout.OutlinePrimary">
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_center_1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/gross_weight"
|
||||
android:inputType="numberDecimal"
|
||||
app:binding="@{viewModel.grossWeight}"
|
||||
style="@style/TextInputEditText.OutlinePrimary"/>
|
||||
app:binding="@{view.grossWeight}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_center_2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/TextInputLayout.OutlinePrimary">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_center_2"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/net_weight"
|
||||
android:inputType="numberDecimal"
|
||||
app:binding="@{viewModel.netWeight}"
|
||||
style="@style/TextInputEditText.OutlinePrimary"/>
|
||||
app:binding="@{view.netWeight}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:gravity="bottom|center_horizontal">
|
||||
|
||||
|
||||
<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.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@ -3,8 +3,11 @@
|
||||
<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" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<variable
|
||||
@ -15,38 +18,33 @@
|
||||
name="subtitle"
|
||||
type="String" />
|
||||
</data>
|
||||
<androidx.cardview.widget.CardView
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@{title}"
|
||||
android:gravity="center_horizontal"/>
|
||||
tools:text="Loading" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@{subtitle}"
|
||||
tools:text="@string/loading"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(subtitle) ? View.GONE : View.VISIBLE}"
|
||||
android:gravity="center_horizontal"/>
|
||||
tools:text="@string/loading" />
|
||||
|
||||
|
||||
<ProgressBar
|
||||
@ -58,36 +56,7 @@
|
||||
android:layout_marginBottom="24dp"
|
||||
android:indeterminate="true" />
|
||||
|
||||
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="32dp"-->
|
||||
<!-- android:layout_marginBottom="40dp"-->
|
||||
<!-- android:layout_marginStart="40dp"-->
|
||||
<!-- android:layout_marginEnd="40dp"-->
|
||||
<!-- android:paddingStart="4dp"-->
|
||||
<!-- android:paddingEnd="4dp"-->
|
||||
<!-- android:backgroundTint="@color/white_bg_alpha"-->
|
||||
<!-- android:background="@drawable/circular_background">-->
|
||||
|
||||
<!-- <ProgressBar-->
|
||||
<!-- android:id="@+id/progressBar"-->
|
||||
<!-- style="?android:attr/progressBarStyleHorizontal"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="20dp"-->
|
||||
<!-- android:indeterminate="true"-->
|
||||
<!-- android:layout_marginTop="-5dp"-->
|
||||
<!-- android:layout_marginBottom="-5dp"/>-->
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</layout>
|
||||
@ -1,76 +1,54 @@
|
||||
<?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">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView" />
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/base_root"
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/title_container"
|
||||
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:id="@+id/title_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
android:layout_margin="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/title_open_lu" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="@string/title_open_lu"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="16dp">
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
|
||||
<ProgressBar
|
||||
@ -80,121 +58,87 @@
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="Scansiona il codice a barre di una UL" />
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/dialog_scan_or_create_lu__creation_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:visibility="@{view.creationEnabled}">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="OPPURE" />
|
||||
android:layout_marginVertical="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="OPPURE"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/create_new_lu_button"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/button_create_new_ul" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/dialog_scan_or_create_lu__basket_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:gravity="center_horizontal"
|
||||
app:visibility="@{view.basketEnabled}">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="OPPURE" />
|
||||
android:layout_marginVertical="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="OPPURE"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/view_basket"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/button_view_basket_ul"
|
||||
app:iconSize="24dp"
|
||||
app:icon="@drawable/ic_black_shopping_cart"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
app:icon="@drawable/ic_black_shopping_cart"
|
||||
app:iconSize="24dp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</layout>
|
||||
@ -8,101 +8,42 @@
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/green_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
android:layout_margin="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="Title here"
|
||||
android:gravity="center_horizontal"/>
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="Title here" />
|
||||
|
||||
<TextView
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="Description here"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Description here" />
|
||||
|
||||
|
||||
|
||||
<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_no"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
android:text="@string/no"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_yes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/yes"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@ -24,9 +24,10 @@
|
||||
android:background="@android:color/white"
|
||||
tools:context=".gest.vendita.MainVenditaFragment">
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/filter_chips"
|
||||
@ -50,8 +51,7 @@
|
||||
android:id="@+id/vendita_main_list"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/filter_chips"/>
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ordini_vendita_empty_view"
|
||||
@ -106,18 +106,17 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/vendita_main_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:tint="@android:color/white"
|
||||
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="Dispatch orders"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
android:onClick="@{() -> view.dispatchOrders()}"
|
||||
app:visibility="@{view.fabVisible}"
|
||||
android:onClick="@{() -> view.dispatchOrders()}" />
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@ -17,6 +17,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingVertical="2dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
@ -24,33 +25,29 @@
|
||||
<View
|
||||
android:id="@+id/empty_view"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp" />
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ordine_lavorazione_main_list_group_item_container_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@color/full_white">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:checked="@{selected}" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_toEndOf="@id/checkbox">
|
||||
android:layout_alignParentEnd="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/right_descrizione"
|
||||
@ -96,7 +93,7 @@
|
||||
android:layout_toStartOf="@id/right_sub_descrizione"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@ -1,23 +1,15 @@
|
||||
<layout>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat 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">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/mainOrange"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
@ -30,16 +22,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
style="@style/TextAppearance.Material3.TitleMedium"
|
||||
tools:text="NOME GRUPPO"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</layout>
|
||||
|
||||
@ -1,26 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.gest.picking_libero.PickingLiberoFragment" />
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout android:layout_width="match_parent"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/picking_libero_main_list"
|
||||
android:layout_width="match_parent"
|
||||
@ -28,10 +25,9 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="92dp"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
android:paddingEnd="2dp"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/lista_picking_libero_list_model" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@ -63,76 +59,84 @@
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:alpha="0.4"
|
||||
app:visibility="@{view.thereIsntAnOpenedUL}"
|
||||
app:layout_constraintTop_toBottomOf="@id/free_picking__suggestion_1__guideline_top"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintLeft_toRightOf="@id/free_picking__suggestion_1__guideline_left"
|
||||
app:layout_constraintRight_toLeftOf="@id/free_picking__suggestion_1__guideline_right">
|
||||
app:layout_constraintRight_toLeftOf="@id/free_picking__suggestion_1__guideline_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/free_picking__suggestion_1__guideline_top"
|
||||
app:visibility="@{view.thereIsntAnOpenedUL}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/free_picking_suggestion_1"/>
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/free_picking_suggestion_1"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:alpha="0.4"
|
||||
app:visibility="@{view.thereIsAnOpenULWithoutRows}"
|
||||
app:layout_constraintTop_toBottomOf="@id/free_picking__suggestion_1__guideline_top"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintLeft_toRightOf="@id/free_picking__suggestion_1__guideline_left"
|
||||
app:layout_constraintRight_toLeftOf="@id/free_picking__suggestion_1__guideline_right">
|
||||
app:layout_constraintRight_toLeftOf="@id/free_picking__suggestion_1__guideline_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/free_picking__suggestion_1__guideline_top"
|
||||
app:visibility="@{view.thereIsAnOpenULWithoutRows}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/free_picking_suggestion_2"/>
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/free_picking_suggestion_2"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/fab_add"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription=""
|
||||
app:srcCompat="@drawable/fab_add"
|
||||
android:onClick="@{() -> view.createNewLU()}"
|
||||
app:visibility="@{view.thereIsntAnOpenedUL}"
|
||||
fab:fab_colorNormal="@color/colorPrimary"
|
||||
fab:fab_colorPressed="@color/white_pressed"
|
||||
fab:fab_colorRipple="#66FFFFFF"/>
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
|
||||
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/ic_check_white_24dp"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription=""
|
||||
app:srcCompat="@drawable/ic_check_white_24dp"
|
||||
android:onClick="@{() -> view.closeLU()}"
|
||||
app:visibility="@{view.thereIsAnOpenedUL}"
|
||||
fab:fab_colorNormal="@color/mainGreen"
|
||||
fab:fab_colorPressed="@color/white_pressed"
|
||||
fab:fab_colorRipple="#66FFFFFF"/>
|
||||
style="?attr/floatingActionButtonSecondaryStyle" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <com.github.clans.fab.FloatingActionButton-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_gravity="bottom|end"-->
|
||||
<!-- android:layout_marginEnd="8dp"-->
|
||||
<!-- android:layout_marginBottom="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.closeLU()}"-->
|
||||
<!-- android:src="@drawable/ic_check_white_24dp"-->
|
||||
<!-- app:visibility="@{view.thereIsAnOpenedUL}"-->
|
||||
<!-- fab:fab_colorNormal="@color/mainGreen"-->
|
||||
<!-- fab:fab_colorPressed="@color/white_pressed"-->
|
||||
<!-- fab:fab_colorRipple="#66FFFFFF" />-->
|
||||
|
||||
|
||||
<View
|
||||
@ -140,9 +144,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:visibility="gone"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||
|
||||
@ -91,20 +91,20 @@
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="300dp"
|
||||
app:layout_constraintHeight_max="280dp"
|
||||
app:layout_constraintHeight_min="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/layout_filter_gruppo_merc__list_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save_btn"
|
||||
style="@style/Button.PrimaryFull"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:singleClick="@{() -> view.onConfirm()}" />
|
||||
|
||||
@ -16,21 +16,21 @@
|
||||
<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()}">
|
||||
android:onClick="@{() -> item.selected.toggle()}"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_height="36dp"
|
||||
android:clickable="false"
|
||||
android:enabled="@{item.enabled}"
|
||||
app:checked="@{item.selected}"
|
||||
android:clickable="false"/>
|
||||
app:checked="@{item.selected}" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{item.enabled}"
|
||||
@ -51,7 +51,7 @@
|
||||
android:clickable="false" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" - "
|
||||
@ -61,7 +61,7 @@
|
||||
android:clickable="false" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{item.enabled}"
|
||||
|
||||
@ -25,8 +25,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_marginEnd="16dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
@ -91,20 +90,20 @@
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="300dp"
|
||||
app:layout_constraintHeight_max="280dp"
|
||||
app:layout_constraintHeight_min="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/layout_filter_numero_ordine__list_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save_btn"
|
||||
style="@style/Button.PrimaryFull"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:singleClick="@{() -> view.onConfirm()}" />
|
||||
|
||||
@ -5,7 +5,9 @@
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
@ -16,42 +18,34 @@
|
||||
<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()}">
|
||||
android:onClick="@{() -> item.selected.toggle()}"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_height="36dp"
|
||||
android:clickable="false"
|
||||
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:clickable="false">
|
||||
app:checked="@{item.selected}" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:enabled="@{item.enabled}"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@{item.originalModel.toString()}"
|
||||
tools:text="01"
|
||||
android:clickable="false" />
|
||||
tools:text="01" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</layout>
|
||||
31
app/src/main/res/values-night/themes.xml
Normal file
31
app/src/main/res/values-night/themes.xml
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
<resources>
|
||||
<style name="AppTheme" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<item name="colorPrimary">@color/md_theme_dark_primary</item>
|
||||
<item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item>
|
||||
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>
|
||||
<item name="colorOnPrimaryContainer">@color/md_theme_dark_onPrimaryContainer</item>
|
||||
<item name="colorSecondary">@color/md_theme_dark_secondary</item>
|
||||
<item name="colorOnSecondary">@color/md_theme_dark_onSecondary</item>
|
||||
<item name="colorSecondaryContainer">@color/md_theme_dark_secondaryContainer</item>
|
||||
<item name="colorOnSecondaryContainer">@color/md_theme_dark_onSecondaryContainer</item>
|
||||
<item name="colorTertiary">@color/md_theme_dark_tertiary</item>
|
||||
<item name="colorOnTertiary">@color/md_theme_dark_onTertiary</item>
|
||||
<item name="colorTertiaryContainer">@color/md_theme_dark_tertiaryContainer</item>
|
||||
<item name="colorOnTertiaryContainer">@color/md_theme_dark_onTertiaryContainer</item>
|
||||
<item name="colorError">@color/md_theme_dark_error</item>
|
||||
<item name="colorErrorContainer">@color/md_theme_dark_errorContainer</item>
|
||||
<item name="colorOnError">@color/md_theme_dark_onError</item>
|
||||
<item name="colorOnErrorContainer">@color/md_theme_dark_onErrorContainer</item>
|
||||
<item name="android:colorBackground">@color/md_theme_dark_background</item>
|
||||
<item name="colorOnBackground">@color/md_theme_dark_onBackground</item>
|
||||
<item name="colorSurface">@color/md_theme_dark_surface</item>
|
||||
<item name="colorOnSurface">@color/md_theme_dark_onSurface</item>
|
||||
<item name="colorSurfaceVariant">@color/md_theme_dark_surfaceVariant</item>
|
||||
<item name="colorOnSurfaceVariant">@color/md_theme_dark_onSurfaceVariant</item>
|
||||
<item name="colorOutline">@color/md_theme_dark_outline</item>
|
||||
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
|
||||
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item>
|
||||
</style>
|
||||
</resources>
|
||||
@ -33,7 +33,7 @@
|
||||
<item name="iconTint">@color/red_400</item>
|
||||
</style>
|
||||
|
||||
<style name="Button.DangerFull" parent="Widget.MaterialComponents.Button.UnelevatedButton">
|
||||
<style name="Button.DangerFull" parent="Widget.Material3.Button.UnelevatedButton">
|
||||
<!-- <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:textAllCaps">false</item>-->
|
||||
|
||||
@ -1,118 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
<color name="colorPrimary">#1A73E8</color>
|
||||
<color name="colorPrimaryDark">#0049b4</color>
|
||||
<color name="colorSecondary">#4db6ac</color>
|
||||
<color name="colorSecondaryDark">#459B90</color>
|
||||
<color name="colorAccent">#387ef5</color>
|
||||
<color name="colorRipple">#3f3f51b5</color>
|
||||
<color name="colorPrimaryGray">#757575</color>
|
||||
|
||||
<color name="mainGreen">@color/green_500</color>
|
||||
<color name="mainOrange">@color/orange_700</color>
|
||||
<color name="letturaFacilitataBG">#eeeeee</color>
|
||||
|
||||
<!-- FAB DEFINITIONS -->
|
||||
<color name="black_semi_transparent">#B2000000</color>
|
||||
<color name="full_white">#FFFFFF</color>
|
||||
<color name="white">#fafafa</color>
|
||||
<color name="white_bg_alpha">#88BCBCBC</color>
|
||||
<color name="white_pressed">#f1f1f1</color>
|
||||
<color name="half_black">#808080</color>
|
||||
|
||||
<!-- EMPTY VIEW -->
|
||||
<color name="empty_view_gray">#bdbdbd</color>
|
||||
<color name="empty_view_bg_gray">#f5f5f5</color>
|
||||
|
||||
|
||||
|
||||
<color name="bg_checked_layout">#E8F0FE</color>
|
||||
<color name="bg_checked_layout_dark">#C9D5F0</color>
|
||||
|
||||
|
||||
|
||||
<color name="colorPrimaryA10">#1A1A73E8</color>
|
||||
<color name="colorPrimaryA20">#331A73E8</color>
|
||||
<color name="colorPrimaryA30">#4D1A73E8</color>
|
||||
<color name="colorPrimaryA40">#661A73E8</color>
|
||||
<color name="colorPrimaryA50">#801A73E8</color>
|
||||
<color name="colorPrimaryA60">#991A73E8</color>
|
||||
<color name="colorPrimaryA70">#B31A73E8</color>
|
||||
<color name="colorPrimaryA80">#CC1A73E8</color>
|
||||
<color name="colorPrimaryA90">#E61A73E8</color>
|
||||
|
||||
|
||||
<color name="alpha_blue_500">#2d42a5f5</color>
|
||||
|
||||
<color name="blue_100">#BBDEFB</color>
|
||||
<color name="blue_300">#64B5F6</color>
|
||||
<color name="blue_400">#42A5F5</color>
|
||||
<color name="blue_500">#2196F3</color>
|
||||
<color name="blue_600">#1E88E5</color>
|
||||
<color name="blue_700">#1976D2</color>
|
||||
<color name="blue_800">#1565C0</color>
|
||||
|
||||
<color name="brown_500">#795548</color>
|
||||
|
||||
<color name="green_100">#C8E6C9</color>
|
||||
<color name="green_200">#A5D6A7</color>
|
||||
<color name="green_300">#81c784</color>
|
||||
<color name="green_400">#66bb6a</color>
|
||||
<color name="green_500_with_alpha">#884CAF50</color>
|
||||
<color name="green_500">#4CAF50</color>
|
||||
<color name="green_600">#43A047</color>
|
||||
<color name="green_700">#388E3C</color>
|
||||
<color name="green_800">#2e7d32</color>
|
||||
<color name="green_900">#1b5e20</color>
|
||||
|
||||
|
||||
<color name="gray_050">#FAFAFA</color>
|
||||
<color name="gray_100">#F5F5F5</color>
|
||||
<color name="gray_200">#eeeeee</color>
|
||||
<color name="gray_300">#e0e0e0</color>
|
||||
<color name="gray_400">#BDBDBD</color>
|
||||
<color name="gray_500">#9E9E9E</color>
|
||||
<color name="gray_600">#757575</color>
|
||||
<color name="gray_700">#616161</color>
|
||||
<color name="gray_800">#424242</color>
|
||||
|
||||
<color name="alpha_indigo_500">#813f51b5</color>
|
||||
|
||||
<color name="indigo_400">#5C6BC0</color>
|
||||
<color name="indigo_500">#3F51B5</color>
|
||||
<color name="indigo_600">#3949AB</color>
|
||||
<color name="indigo_700">#303F9F</color>
|
||||
|
||||
|
||||
|
||||
<color name="light_blue_100">#B3E5FC</color>
|
||||
<color name="light_blue_200">#81D4FA</color>
|
||||
<color name="light_blue_300">#4fc3f7</color>
|
||||
<color name="light_blue_400">#29B6F6</color>
|
||||
<color name="light_blue_500">#03A9F4</color>
|
||||
<color name="light_blue_600">#039BE5</color>
|
||||
<color name="light_blue_700">#0288D1</color>
|
||||
<color name="light_blue_800">#0277BD</color>
|
||||
|
||||
|
||||
<color name="orange_600_with_alpha">#88FB8C00</color>
|
||||
<color name="orange_600">#FB8C00</color>
|
||||
<color name="orange_700">#F57C00</color>
|
||||
<color name="orange_800">#EF6C00</color>
|
||||
|
||||
|
||||
<color name="red_200">#ef9a9a</color>
|
||||
<color name="red_300">#e57373</color>
|
||||
<color name="red_400">#EF5350</color>
|
||||
<color name="red_500">#F44336</color>
|
||||
<color name="red_600">#E53935</color>
|
||||
<color name="red_700">#D32F2F</color>
|
||||
|
||||
|
||||
<color name="teal_500">#009688</color>
|
||||
|
||||
<color name="yellow_100">#FFF9C4</color>
|
||||
<color name="yellow_600">#FDD835</color>
|
||||
<color name="yellow_800">#F9A825</color>
|
||||
|
||||
<color name="seed">#4c4dcf</color>
|
||||
<color name="md_theme_light_primary">#4C4DCF</color>
|
||||
<color name="md_theme_light_onPrimary">#FFFFFF</color>
|
||||
<color name="md_theme_light_primaryContainer">#E1DFFF</color>
|
||||
<color name="md_theme_light_onPrimaryContainer">#08006C</color>
|
||||
<color name="md_theme_light_secondary">#0059C5</color>
|
||||
<color name="md_theme_light_onSecondary">#FFFFFF</color>
|
||||
<color name="md_theme_light_secondaryContainer">#D8E2FF</color>
|
||||
<color name="md_theme_light_onSecondaryContainer">#001A43</color>
|
||||
<color name="md_theme_light_tertiary">#795369</color>
|
||||
<color name="md_theme_light_onTertiary">#FFFFFF</color>
|
||||
<color name="md_theme_light_tertiaryContainer">#FFD8EC</color>
|
||||
<color name="md_theme_light_onTertiaryContainer">#2E1125</color>
|
||||
<color name="md_theme_light_error">#BA1A1A</color>
|
||||
<color name="md_theme_light_errorContainer">#FFDAD6</color>
|
||||
<color name="md_theme_light_onError">#FFFFFF</color>
|
||||
<color name="md_theme_light_onErrorContainer">#410002</color>
|
||||
<color name="md_theme_light_background">#F6FEFF</color>
|
||||
<color name="md_theme_light_onBackground">#001F24</color>
|
||||
<color name="md_theme_light_surface">#F6FEFF</color>
|
||||
<color name="md_theme_light_onSurface">#001F24</color>
|
||||
<color name="md_theme_light_surfaceVariant">#E4E1EC</color>
|
||||
<color name="md_theme_light_onSurfaceVariant">#47464F</color>
|
||||
<color name="md_theme_light_outline">#777680</color>
|
||||
<color name="md_theme_light_inverseOnSurface">#D0F8FF</color>
|
||||
<color name="md_theme_light_inverseSurface">#00363D</color>
|
||||
<color name="md_theme_light_inversePrimary">#C1C1FF</color>
|
||||
<color name="md_theme_light_shadow">#000000</color>
|
||||
<color name="md_theme_light_surfaceTint">#4C4DCF</color>
|
||||
<color name="md_theme_light_surfaceTintColor">#4C4DCF</color>
|
||||
<color name="md_theme_dark_primary">#C1C1FF</color>
|
||||
<color name="md_theme_dark_onPrimary">#160AA2</color>
|
||||
<color name="md_theme_dark_primaryContainer">#3231B6</color>
|
||||
<color name="md_theme_dark_onPrimaryContainer">#E1DFFF</color>
|
||||
<color name="md_theme_dark_secondary">#AEC6FF</color>
|
||||
<color name="md_theme_dark_onSecondary">#002E6C</color>
|
||||
<color name="md_theme_dark_secondaryContainer">#004397</color>
|
||||
<color name="md_theme_dark_onSecondaryContainer">#D8E2FF</color>
|
||||
<color name="md_theme_dark_tertiary">#E9B9D3</color>
|
||||
<color name="md_theme_dark_onTertiary">#46263A</color>
|
||||
<color name="md_theme_dark_tertiaryContainer">#5F3C51</color>
|
||||
<color name="md_theme_dark_onTertiaryContainer">#FFD8EC</color>
|
||||
<color name="md_theme_dark_error">#FFB4AB</color>
|
||||
<color name="md_theme_dark_errorContainer">#93000A</color>
|
||||
<color name="md_theme_dark_onError">#690005</color>
|
||||
<color name="md_theme_dark_onErrorContainer">#FFDAD6</color>
|
||||
<color name="md_theme_dark_background">#001F24</color>
|
||||
<color name="md_theme_dark_onBackground">#97F0FF</color>
|
||||
<color name="md_theme_dark_surface">#001F24</color>
|
||||
<color name="md_theme_dark_onSurface">#97F0FF</color>
|
||||
<color name="md_theme_dark_surfaceVariant">#47464F</color>
|
||||
<color name="md_theme_dark_onSurfaceVariant">#C8C5D0</color>
|
||||
<color name="md_theme_dark_outline">#918F9A</color>
|
||||
<color name="md_theme_dark_inverseOnSurface">#001F24</color>
|
||||
<color name="md_theme_dark_inverseSurface">#97F0FF</color>
|
||||
<color name="md_theme_dark_inversePrimary">#4C4DCF</color>
|
||||
<color name="md_theme_dark_shadow">#000000</color>
|
||||
<color name="md_theme_dark_surfaceTint">#C1C1FF</color>
|
||||
<color name="md_theme_dark_surfaceTintColor">#C1C1FF</color>
|
||||
</resources>
|
||||
|
||||
118
app/src/main/res/values/custom_colors.xml
Normal file
118
app/src/main/res/values/custom_colors.xml
Normal file
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#1A73E8</color>
|
||||
<color name="colorPrimaryDark">#0049b4</color>
|
||||
<color name="colorSecondary">#4db6ac</color>
|
||||
<color name="colorSecondaryDark">#459B90</color>
|
||||
<color name="colorAccent">#387ef5</color>
|
||||
<color name="colorRipple">#3f3f51b5</color>
|
||||
<color name="colorPrimaryGray">#757575</color>
|
||||
|
||||
<color name="mainGreen">@color/green_500</color>
|
||||
<color name="mainOrange">@color/orange_700</color>
|
||||
<color name="letturaFacilitataBG">#eeeeee</color>
|
||||
|
||||
<!-- FAB DEFINITIONS -->
|
||||
<color name="black_semi_transparent">#B2000000</color>
|
||||
<color name="full_white">#FFFFFF</color>
|
||||
<color name="white">#fafafa</color>
|
||||
<color name="white_bg_alpha">#88BCBCBC</color>
|
||||
<color name="white_pressed">#f1f1f1</color>
|
||||
<color name="half_black">#808080</color>
|
||||
|
||||
<!-- EMPTY VIEW -->
|
||||
<color name="empty_view_gray">#bdbdbd</color>
|
||||
<color name="empty_view_bg_gray">#f5f5f5</color>
|
||||
|
||||
|
||||
|
||||
<color name="bg_checked_layout">#E8F0FE</color>
|
||||
<color name="bg_checked_layout_dark">#C9D5F0</color>
|
||||
|
||||
|
||||
|
||||
<color name="colorPrimaryA10">#1A1A73E8</color>
|
||||
<color name="colorPrimaryA20">#331A73E8</color>
|
||||
<color name="colorPrimaryA30">#4D1A73E8</color>
|
||||
<color name="colorPrimaryA40">#661A73E8</color>
|
||||
<color name="colorPrimaryA50">#801A73E8</color>
|
||||
<color name="colorPrimaryA60">#991A73E8</color>
|
||||
<color name="colorPrimaryA70">#B31A73E8</color>
|
||||
<color name="colorPrimaryA80">#CC1A73E8</color>
|
||||
<color name="colorPrimaryA90">#E61A73E8</color>
|
||||
|
||||
|
||||
<color name="alpha_blue_500">#2d42a5f5</color>
|
||||
|
||||
<color name="blue_100">#BBDEFB</color>
|
||||
<color name="blue_300">#64B5F6</color>
|
||||
<color name="blue_400">#42A5F5</color>
|
||||
<color name="blue_500">#2196F3</color>
|
||||
<color name="blue_600">#1E88E5</color>
|
||||
<color name="blue_700">#1976D2</color>
|
||||
<color name="blue_800">#1565C0</color>
|
||||
|
||||
<color name="brown_500">#795548</color>
|
||||
|
||||
<color name="green_100">#C8E6C9</color>
|
||||
<color name="green_200">#A5D6A7</color>
|
||||
<color name="green_300">#81c784</color>
|
||||
<color name="green_400">#66bb6a</color>
|
||||
<color name="green_500_with_alpha">#884CAF50</color>
|
||||
<color name="green_500">#4CAF50</color>
|
||||
<color name="green_600">#43A047</color>
|
||||
<color name="green_700">#388E3C</color>
|
||||
<color name="green_800">#2e7d32</color>
|
||||
<color name="green_900">#1b5e20</color>
|
||||
|
||||
|
||||
<color name="gray_050">#FAFAFA</color>
|
||||
<color name="gray_100">#F5F5F5</color>
|
||||
<color name="gray_200">#eeeeee</color>
|
||||
<color name="gray_300">#e0e0e0</color>
|
||||
<color name="gray_400">#BDBDBD</color>
|
||||
<color name="gray_500">#9E9E9E</color>
|
||||
<color name="gray_600">#757575</color>
|
||||
<color name="gray_700">#616161</color>
|
||||
<color name="gray_800">#424242</color>
|
||||
|
||||
<color name="alpha_indigo_500">#813f51b5</color>
|
||||
|
||||
<color name="indigo_400">#5C6BC0</color>
|
||||
<color name="indigo_500">#3F51B5</color>
|
||||
<color name="indigo_600">#3949AB</color>
|
||||
<color name="indigo_700">#303F9F</color>
|
||||
|
||||
|
||||
|
||||
<color name="light_blue_100">#B3E5FC</color>
|
||||
<color name="light_blue_200">#81D4FA</color>
|
||||
<color name="light_blue_300">#4fc3f7</color>
|
||||
<color name="light_blue_400">#29B6F6</color>
|
||||
<color name="light_blue_500">#03A9F4</color>
|
||||
<color name="light_blue_600">#039BE5</color>
|
||||
<color name="light_blue_700">#0288D1</color>
|
||||
<color name="light_blue_800">#0277BD</color>
|
||||
|
||||
|
||||
<color name="orange_600_with_alpha">#88FB8C00</color>
|
||||
<color name="orange_600">#FB8C00</color>
|
||||
<color name="orange_700">#F57C00</color>
|
||||
<color name="orange_800">#EF6C00</color>
|
||||
|
||||
|
||||
<color name="red_200">#ef9a9a</color>
|
||||
<color name="red_300">#e57373</color>
|
||||
<color name="red_400">#EF5350</color>
|
||||
<color name="red_500">#F44336</color>
|
||||
<color name="red_600">#E53935</color>
|
||||
<color name="red_700">#D32F2F</color>
|
||||
|
||||
|
||||
<color name="teal_500">#009688</color>
|
||||
|
||||
<color name="yellow_100">#FFF9C4</color>
|
||||
<color name="yellow_600">#FDD835</color>
|
||||
<color name="yellow_800">#F9A825</color>
|
||||
|
||||
</resources>
|
||||
@ -1,23 +1,23 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
|
||||
<!-- <style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">-->
|
||||
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<!-- <!– Customize your theme here. –>-->
|
||||
<!-- <item name="colorPrimary">@color/colorPrimary</item>-->
|
||||
<!-- <item name="colorPrimaryDark">@color/colorPrimaryDark</item>-->
|
||||
<!-- <item name="colorAccent">@color/colorAccent</item>-->
|
||||
|
||||
<item name="fontFamily">@font/google_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<!-- <item name="fontFamily">@font/google_sans_regular</item> <!– target android sdk versions < 26 and > 14 if theme other than AppCompat –>-->
|
||||
|
||||
<!-- Add these -->
|
||||
<item name="materialCalendarStyle">@style/Widget.MaterialComponents.MaterialCalendar</item>
|
||||
<item name="materialCalendarFullscreenTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar.Fullscreen</item>
|
||||
<item name="materialCalendarTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>
|
||||
<!-- <!– Add these –>-->
|
||||
<!-- <item name="materialCalendarStyle">@style/Widget.MaterialComponents.MaterialCalendar</item>-->
|
||||
<!-- <item name="materialCalendarFullscreenTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar.Fullscreen</item>-->
|
||||
<!-- <item name="materialCalendarTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>-->
|
||||
|
||||
<item name="bottomSheetDialogTheme">@style/CustomBottomSheetDialog</item>
|
||||
<!-- <item name="bottomSheetDialogTheme">@style/CustomBottomSheetDialog</item>-->
|
||||
|
||||
</style>
|
||||
<!-- </style>-->
|
||||
|
||||
<style name="AppTheme.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
@ -94,7 +94,7 @@
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.NewMaterial.Dialog.FullscreenDialog" parent="Theme.AppCompat.Light.DialogWhenLarge">
|
||||
<style name="AppTheme.NewMaterial.Dialog.FullscreenDialog" parent="Theme.Material3.Light.DialogWhenLarge">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
@ -124,7 +124,7 @@
|
||||
<item name="android:windowBackground">@drawable/splash_background</item>
|
||||
</style>
|
||||
|
||||
<style name="Light" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
|
||||
<style name="Light" parent="Theme.Material3.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
@ -192,7 +192,7 @@
|
||||
|
||||
<style name="MaterialToolbar.Base" parent="">
|
||||
<item name="popupTheme">@style/AppTheme.PopupOverlay</item>
|
||||
<item name="theme">@style/Theme.MaterialComponents.Light</item>
|
||||
<item name="theme">@style/Theme.Material3.Light</item>
|
||||
</style>
|
||||
|
||||
<style name="MaterialToolbar" parent="MaterialToolbar.Base"/>
|
||||
@ -201,11 +201,11 @@
|
||||
<item name="titleTextAppearance">@style/AppTheme.NewMaterial.Text.ToolbarTitle</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomBottomSheetDialog" parent="@style/ThemeOverlay.MaterialComponents.BottomSheetDialog">
|
||||
<style name="CustomBottomSheetDialog" parent="@style/ThemeOverlay.Material3.BottomSheetDialog">
|
||||
<item name="bottomSheetStyle">@style/CustomBottomSheet</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomBottomSheet" parent="Widget.MaterialComponents.BottomSheet">
|
||||
<style name="CustomBottomSheet" parent="Widget.Material3.BottomSheet">
|
||||
<item name="shapeAppearanceOverlay">@style/CustomShapeAppearanceBottomSheetDialog</item>
|
||||
</style>
|
||||
|
||||
|
||||
31
app/src/main/res/values/themes.xml
Normal file
31
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
<resources>
|
||||
<style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/md_theme_light_primary</item>
|
||||
<item name="colorOnPrimary">@color/md_theme_light_onPrimary</item>
|
||||
<item name="colorPrimaryContainer">@color/md_theme_light_primaryContainer</item>
|
||||
<item name="colorOnPrimaryContainer">@color/md_theme_light_onPrimaryContainer</item>
|
||||
<item name="colorSecondary">@color/md_theme_light_secondary</item>
|
||||
<item name="colorOnSecondary">@color/md_theme_light_onSecondary</item>
|
||||
<item name="colorSecondaryContainer">@color/md_theme_light_secondaryContainer</item>
|
||||
<item name="colorOnSecondaryContainer">@color/md_theme_light_onSecondaryContainer</item>
|
||||
<item name="colorTertiary">@color/md_theme_light_tertiary</item>
|
||||
<item name="colorOnTertiary">@color/md_theme_light_onTertiary</item>
|
||||
<item name="colorTertiaryContainer">@color/md_theme_light_tertiaryContainer</item>
|
||||
<item name="colorOnTertiaryContainer">@color/md_theme_light_onTertiaryContainer</item>
|
||||
<item name="colorError">@color/md_theme_light_error</item>
|
||||
<item name="colorErrorContainer">@color/md_theme_light_errorContainer</item>
|
||||
<item name="colorOnError">@color/md_theme_light_onError</item>
|
||||
<item name="colorOnErrorContainer">@color/md_theme_light_onErrorContainer</item>
|
||||
<item name="android:colorBackground">@color/md_theme_light_background</item>
|
||||
<item name="colorOnBackground">@color/md_theme_light_onBackground</item>
|
||||
<item name="colorSurface">@color/md_theme_light_surface</item>
|
||||
<item name="colorOnSurface">@color/md_theme_light_onSurface</item>
|
||||
<item name="colorSurfaceVariant">@color/md_theme_light_surfaceVariant</item>
|
||||
<item name="colorOnSurfaceVariant">@color/md_theme_light_onSurfaceVariant</item>
|
||||
<item name="colorOutline">@color/md_theme_light_outline</item>
|
||||
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
|
||||
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
|
||||
</style>
|
||||
</resources>
|
||||
@ -33,7 +33,7 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
@ -19,5 +19,5 @@ dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation project(':app')
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ dependencies {
|
||||
// implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||
|
||||
implementation project(":honeywellsdk")
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
@ -32,7 +32,7 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
@ -30,7 +30,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
@ -32,7 +32,7 @@ dependencies {
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user