Migliorato rendering di dialog ask cliente e fix su check delle posizioni da cache
This commit is contained in:
parent
84d800a698
commit
5476e9633e
@ -53,21 +53,17 @@ public abstract class BaseFragment extends Fragment {
|
||||
}
|
||||
|
||||
public void onLoadingStarted() {
|
||||
new Thread(() -> {
|
||||
BarcodeManager.disable();
|
||||
this.openProgress();
|
||||
}).start();
|
||||
BarcodeManager.disable();
|
||||
this.openProgress();
|
||||
}
|
||||
|
||||
public void onLoadingEnded() {
|
||||
new Thread(() -> {
|
||||
this.closeProgress();
|
||||
BarcodeManager.enable();
|
||||
}).start();
|
||||
this.closeProgress();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
public void onError(Exception ex) {
|
||||
this.getActivity().runOnUiThread(() -> {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
BarcodeManager.enable();
|
||||
|
||||
@ -31,10 +31,13 @@ public class UtilityPosizione {
|
||||
}
|
||||
|
||||
public static MtbDepoPosizione getFromCache(String posizione) {
|
||||
List<MtbDepoPosizione> tmpList = Stream.of(SettingsManager.iDB().getAvailablePosizioni())
|
||||
var availablePosizioni = SettingsManager.iDB().getAvailablePosizioni();
|
||||
if(availablePosizioni == null) return null;
|
||||
|
||||
List<MtbDepoPosizione> tmpList = Stream.of(availablePosizioni)
|
||||
.filter(x -> x.getPosizione().equalsIgnoreCase(posizione)).toList();
|
||||
|
||||
if(tmpList != null && tmpList.size() > 0) return tmpList.get(0);
|
||||
if(tmpList.size() > 0) return tmpList.get(0);
|
||||
else return null;
|
||||
}
|
||||
|
||||
|
||||
@ -155,6 +155,8 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessfull(onScanSuccessful)
|
||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(getActivity(), ex, false)));
|
||||
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
private void initBottomSheet() {
|
||||
@ -199,10 +201,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
};
|
||||
|
||||
public void createNewLU() {
|
||||
this.onLoadingStarted();
|
||||
|
||||
this.mViewModel.createNewLU(null, null, () -> {
|
||||
this.onLoadingEnded();
|
||||
});
|
||||
}
|
||||
|
||||
@ -227,7 +226,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
|
||||
@Override
|
||||
public void onLUOpened(MtbColt mtbColt) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
mToolbarTitleText.setText(String.format(getActivity().getText(R.string.lu_number_text).toString(), mtbColt.getNumCollo()));
|
||||
|
||||
initAdapter();
|
||||
@ -248,7 +247,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
|
||||
@Override
|
||||
public void onLUClosed() {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
mToolbarTitleText.setText(getActivity().getText(R.string.free_picking_title_fragment).toString());
|
||||
destroyAdapter();
|
||||
|
||||
|
||||
@ -229,7 +229,6 @@ public class PickingLiberoViewModel {
|
||||
|
||||
public void createNewLU(Integer customNumCollo, String customSerCollo, Runnable onComplete) {
|
||||
if (this.mFlagAskCliente) {
|
||||
this.sendOnLoadingEnded();
|
||||
this.sendLUClienteRequired((vtbDest, codJcom) -> {
|
||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, vtbDest, codJcom, onComplete);
|
||||
}, () -> {
|
||||
@ -276,6 +275,8 @@ public class PickingLiberoViewModel {
|
||||
|
||||
this.mCurrentMtbColt = mtbColt;
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
if (onComplete != null) onComplete.run();
|
||||
this.sendLUOpened(mtbColt);
|
||||
}, this::sendError);
|
||||
|
||||
@ -23,17 +23,31 @@ import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.IDialogAsk
|
||||
|
||||
public class DialogAskClienteAdapter extends PagerAdapter implements ViewPager.OnPageChangeListener {
|
||||
|
||||
private Context mContext;
|
||||
private final Context mContext;
|
||||
|
||||
private List<Map.Entry<Integer, Class>> mDatasetLayout;
|
||||
private List<Map.Entry<ViewDataBinding, IDialogAskClienteViewModel>> mDatasetViews;
|
||||
private final List<Map.Entry<Integer, Class<? extends IDialogAskClienteViewModel>>> mDatasetLayout;
|
||||
private final List<Map.Entry<ViewDataBinding, IDialogAskClienteViewModel>> mDatasetViews;
|
||||
private final List<IDialogAskClienteViewModel> mDatasetViewModels;
|
||||
|
||||
private DeactivatableViewPager viewPager;
|
||||
|
||||
public DialogAskClienteAdapter(Context context, List<Map.Entry<Integer, Class>> datasetLayouts) {
|
||||
public DialogAskClienteAdapter(Context context, List<Map.Entry<Integer, Class<? extends IDialogAskClienteViewModel>>> datasetLayouts) {
|
||||
this.mContext = context;
|
||||
this.mDatasetLayout = datasetLayouts;
|
||||
this.mDatasetViews = new ArrayList<>();
|
||||
this.mDatasetViewModels = new ArrayList<>();
|
||||
|
||||
|
||||
for (var viewModelEntry : mDatasetLayout) {
|
||||
var viewModelClazz = viewModelEntry.getValue();
|
||||
|
||||
try {
|
||||
IDialogAskClienteViewModel viewModel = viewModelClazz.newInstance();
|
||||
mDatasetViewModels.add(viewModel);
|
||||
} catch (IllegalAccessException | InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -43,20 +57,13 @@ public class DialogAskClienteAdapter extends PagerAdapter implements ViewPager.O
|
||||
|
||||
Integer viewId = mDatasetLayout.get(position).getKey();
|
||||
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
ViewDataBinding mBinding = DataBindingUtil.inflate(inflater, viewId, null, false);
|
||||
ViewDataBinding mBinding = DataBindingUtil.inflate(inflater, viewId, container, false);
|
||||
|
||||
Class viewModelClass = mDatasetLayout.get(position).getValue();
|
||||
IDialogAskClienteViewModel viewModel = null;
|
||||
|
||||
try {
|
||||
viewModel = (IDialogAskClienteViewModel) viewModelClass.newInstance();
|
||||
viewModel.setBinding(mBinding);
|
||||
viewModel.setContext(mContext);
|
||||
} catch (IllegalAccessException | InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
var viewModel = this.mDatasetViewModels.get(position);
|
||||
viewModel.setBinding(mBinding);
|
||||
viewModel.setContext(mContext);
|
||||
|
||||
mBinding.setVariable(BR.viewmodel, viewModel);
|
||||
|
||||
@ -82,10 +89,10 @@ public class DialogAskClienteAdapter extends PagerAdapter implements ViewPager.O
|
||||
return mDatasetLayout.size();
|
||||
}
|
||||
|
||||
public IDialogAskClienteViewModel getViewModel(@NonNull int layoutID) {
|
||||
public IDialogAskClienteViewModel getViewModel(int layoutID) {
|
||||
for(int i = 0; i < mDatasetLayout.size(); i++) {
|
||||
if(mDatasetLayout.get(i).getKey() == layoutID) {
|
||||
return this.mDatasetViews.get(i).getValue();
|
||||
return this.mDatasetViewModels.get(i);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -31,6 +31,7 @@ import it.integry.integrywmsnative.databinding.DialogAskClienteBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteDestinatarioDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page1ViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page2ViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.IDialogAskClienteViewModel;
|
||||
|
||||
public class DialogAskClienteView extends BaseDialogFragment {
|
||||
|
||||
@ -45,7 +46,7 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
private boolean mIsClienteSelected = false;
|
||||
|
||||
public static DialogAskClienteView newInstance(@NotNull RunnableArgss<VtbDest, String> onComplete, @NotNull Runnable onAbort) {
|
||||
return new DialogAskClienteView( onComplete, onAbort);
|
||||
return new DialogAskClienteView(onComplete, onAbort);
|
||||
}
|
||||
|
||||
private DialogAskClienteView(@NotNull RunnableArgss<VtbDest, String> onComplete, @NotNull Runnable onAbort) {
|
||||
@ -69,7 +70,7 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
|
||||
|
||||
List<Map.Entry<Integer, Class>> views = new ArrayList<>();
|
||||
List<Map.Entry<Integer, Class<? extends IDialogAskClienteViewModel>>> views = new ArrayList<>();
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page1, DialogAskCliente_Page1ViewModel.class));
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page2, DialogAskCliente_Page2ViewModel.class));
|
||||
|
||||
@ -79,9 +80,7 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
mBindings.viewpager.addOnPageChangeListener(mAdapter);
|
||||
mBindings.viewpager.setCurrentItem(0, false);
|
||||
|
||||
getDialog().setOnShowListener(d -> {
|
||||
this.initView();
|
||||
});
|
||||
this.initView();
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
@ -93,11 +92,6 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
DialogAskCliente_Page1ViewModel viewModel1 = (DialogAskCliente_Page1ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page1);
|
||||
DialogAskCliente_Page2ViewModel viewModel2 = (DialogAskCliente_Page2ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page2);
|
||||
@ -106,7 +100,7 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
.setOnConfirmClickListener(() -> {
|
||||
String codAnag = viewModel1.getCurrentCliente();
|
||||
|
||||
if(UtilityString.isNullOrEmpty(codAnag)) {
|
||||
if (UtilityString.isNullOrEmpty(codAnag)) {
|
||||
this.mIsClienteSelected = true;
|
||||
dismiss();
|
||||
mOnComplete.run(null, null);
|
||||
@ -134,7 +128,7 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
mAdapter.onDismiss();
|
||||
if(!mIsClienteSelected) {
|
||||
if (!mIsClienteSelected) {
|
||||
this.mOnAbort.run();
|
||||
}
|
||||
super.onDismiss(dialog);
|
||||
|
||||
@ -40,7 +40,10 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
private int mBarcodeScannerInstanceID;
|
||||
|
||||
private ArrayList<DialogAskClienteClienteDTO> availableClienti;
|
||||
private ObservableArrayList<String> codJcoms = new ObservableArrayList<>();
|
||||
private final ObservableArrayList<String> codJcoms = new ObservableArrayList<>();
|
||||
|
||||
private Runnable onConfirmClickListener;
|
||||
private Runnable onAbortClickListener;
|
||||
|
||||
public DialogAskCliente_Page1ViewModel() {
|
||||
|
||||
@ -104,6 +107,20 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
}
|
||||
});
|
||||
|
||||
this.mBinding.buttonYes.setOnClickListener(v -> {
|
||||
if (validateCliente()) {
|
||||
this.resetClienteError();
|
||||
BarcodeManager.removeCallback(mBarcodeScannerInstanceID);
|
||||
if (onConfirmClickListener != null) onConfirmClickListener.run();
|
||||
} else {
|
||||
this.setClienteError(mContext.getResources().getText(R.string.not_valid_customer_error).toString());
|
||||
}
|
||||
});
|
||||
|
||||
this.mBinding.buttonNo.setOnClickListener(v -> {
|
||||
if (onAbortClickListener != null) onAbortClickListener.run();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -113,16 +130,7 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
|
||||
@Override
|
||||
public void setOnConfirmClickListener(Runnable onConfirm) {
|
||||
this.mBinding.buttonYes.setOnClickListener(v -> {
|
||||
if (validateCliente()) {
|
||||
this.resetClienteError();
|
||||
BarcodeManager.removeCallback(mBarcodeScannerInstanceID);
|
||||
if (onConfirm != null) onConfirm.run();
|
||||
} else {
|
||||
this.setClienteError(mContext.getResources().getText(R.string.not_valid_customer_error).toString());
|
||||
}
|
||||
|
||||
});
|
||||
this.onConfirmClickListener = onConfirm;
|
||||
}
|
||||
|
||||
|
||||
@ -174,9 +182,7 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
||||
|
||||
@Override
|
||||
public void setOnAbortClickListener(Runnable onAbort) {
|
||||
this.mBinding.buttonNo.setOnClickListener(v -> {
|
||||
if (onAbort != null) onAbort.run();
|
||||
});
|
||||
this.onAbortClickListener = onAbort;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
private Context mContext;
|
||||
|
||||
private Runnable mOnConfirm;
|
||||
private Runnable mOnAbort;
|
||||
|
||||
private List<DialogAskClienteDestinatarioDTO> availableDestinatari;
|
||||
|
||||
@ -69,6 +70,21 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.mBinding.buttonYes.setOnClickListener(v -> {
|
||||
if (validateDestinatario()) {
|
||||
this.resetClienteError();
|
||||
if (mOnConfirm != null) mOnConfirm.run();
|
||||
} else {
|
||||
this.setClienteError(mContext.getResources().getText(R.string.not_valid_recipient_error).toString());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.mBinding.buttonNo.setOnClickListener(v -> {
|
||||
if (mOnAbort != null) mOnAbort.run();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -78,22 +94,11 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
@Override
|
||||
public void setOnConfirmClickListener(Runnable onConfirm) {
|
||||
this.mOnConfirm = onConfirm;
|
||||
this.mBinding.buttonYes.setOnClickListener(v -> {
|
||||
if (validateDestinatario()) {
|
||||
this.resetClienteError();
|
||||
if (onConfirm != null) onConfirm.run();
|
||||
} else {
|
||||
this.setClienteError(mContext.getResources().getText(R.string.not_valid_recipient_error).toString());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnAbortClickListener(Runnable onAbort) {
|
||||
this.mBinding.buttonNo.setOnClickListener(v -> {
|
||||
if (onAbort != null) onAbort.run();
|
||||
});
|
||||
this.mOnAbort = onAbort;
|
||||
}
|
||||
|
||||
public void setCodAnag(String codAnag) {
|
||||
@ -102,7 +107,6 @@ public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewMod
|
||||
|
||||
|
||||
private void initializeAdapter(ArrayList<DialogAskClienteDestinatarioDTO> items) {
|
||||
|
||||
DialogAskCliente_Page2_ArrayAdapter adapter = new DialogAskCliente_Page2_ArrayAdapter(mContext, items);
|
||||
|
||||
|
||||
|
||||
@ -1,63 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<data>
|
||||
<import type="android.text.Html" />
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
<variable
|
||||
name="mContext"
|
||||
type="android.content.Context" />
|
||||
</data>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
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
|
||||
|
||||
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<RelativeLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:background="@color/light_blue_300"-->
|
||||
<!--android:gravity="center_horizontal">-->
|
||||
|
||||
<!--<ImageView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:src="@drawable/ic_error_white_24dp"-->
|
||||
<!--android:layout_margin="24dp"/>-->
|
||||
|
||||
<!--</RelativeLayout>-->
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="24dp" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
|
||||
|
||||
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</layout>
|
||||
@ -3,55 +3,59 @@
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page1ViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_margin="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/customer"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="@string/select_a_customer_message"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/customer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextViewMaterial"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="start"
|
||||
android:text="@string/select_a_customer_message"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_text" />
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_cliente"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/customer">
|
||||
android:hint="@string/customer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/description_text">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/dropdown_cliente"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"/>
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -60,64 +64,55 @@
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/job">
|
||||
android:hint="@string/job"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/input_cliente">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/dropdown_commessa"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"/>
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="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"/>
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_no"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_margin="8dp"
|
||||
android:text="@string/abort"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
android:text="@string/abort"/>
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/input_commessa"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_yes"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
android:layout_margin="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/confirm"/>
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintTop_toBottomOf="@id/input_commessa" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@ -3,104 +3,96 @@
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page2ViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_margin="16dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="@string/recipient"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/recipient"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="@string/select_a_recipient_message"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="start"
|
||||
android:text="@string/select_a_recipient_message"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_text" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_destinatario"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_destinatario"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recipient"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/description_text">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/dropdown_destinatario"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recipient">
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/dropdown_destinatario"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="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"/>
|
||||
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/abort"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_no"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="@string/abort"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/input_destinatario"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
|
||||
|
||||
<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/confirm"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_yes"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintTop_toBottomOf="@id/input_destinatario" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
Loading…
x
Reference in New Issue
Block a user