Implementata nuova UI (nuovo Material Design) per alcuni dialog in Rettifica Giacenze / Versamento Merce.
Implementato dialog per la domanda semplice (Si / No).
This commit is contained in:
parent
b95dab2bcc
commit
4eb6bedf04
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -113,7 +113,7 @@ dependencies {
|
|||||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
|
||||||
kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
//kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
||||||
implementation 'com.danielpuiu:ghostfish:2.0.0'
|
implementation 'com.danielpuiu:ghostfish:2.0.0'
|
||||||
annotationProcessor "com.danielpuiu:ghostfish-compiler:2.0.0"
|
annotationProcessor "com.danielpuiu:ghostfish-compiler:2.0.0"
|
||||||
//MVVM
|
//MVVM
|
||||||
|
|||||||
@ -62,6 +62,7 @@ import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.Dialo
|
|||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.QuantityDTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity.QuantityDTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLU;
|
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLU;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNo;
|
||||||
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
||||||
import it.integry.plugins.barcode_base_library.model.BarcodeType;
|
import it.integry.plugins.barcode_base_library.model.BarcodeType;
|
||||||
|
|
||||||
@ -568,6 +569,11 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void posizionaCollo(Runnable onComplete, Runnable onAbort, RunnableArgs<Exception> onFailed) {
|
private void posizionaCollo(Runnable onComplete, Runnable onAbort, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
DialogYesNo.make(mContext, "Posiziona UL", "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||||
|
|
||||||
|
switch (result){
|
||||||
|
case YES:
|
||||||
DialogAskPositionOfLU.makeBase(mContext, mtbColt.get(), mtbDepoPosizione -> {
|
DialogAskPositionOfLU.makeBase(mContext, mtbColt.get(), mtbDepoPosizione -> {
|
||||||
if(mtbDepoPosizione != null && mtbColt.get() != null) {
|
if(mtbDepoPosizione != null && mtbColt.get() != null) {
|
||||||
Objects.requireNonNull(mtbColt.get()).setPosizione(mtbDepoPosizione.getPosizione());
|
Objects.requireNonNull(mtbColt.get()).setPosizione(mtbDepoPosizione.getPosizione());
|
||||||
@ -578,6 +584,16 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
|
|
||||||
}, onFailed).show();
|
}, onFailed).show();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NO:
|
||||||
|
onAbort.run();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}).show();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onItemEdit(MtbColr mtbColrToEdit, int index) {
|
private void onItemEdit(MtbColr mtbColrToEdit, int index) {
|
||||||
|
|||||||
@ -96,9 +96,11 @@ public class VenditaOrdineInevasoHelper {
|
|||||||
final PickingObjectDTO currentItem = currentGroup.get(k);
|
final PickingObjectDTO currentItem = currentGroup.get(k);
|
||||||
final VenditaOrdineInevasoListViewModel.SubItem rowModel = new VenditaOrdineInevasoListViewModel.SubItem();
|
final VenditaOrdineInevasoListViewModel.SubItem rowModel = new VenditaOrdineInevasoListViewModel.SubItem();
|
||||||
|
|
||||||
|
String badge1 = "";
|
||||||
|
|
||||||
|
badge1 += !UtilityString.isNullOrEmpty(currentItem.getCodAlis()) ? (currentItem.getCodAlis() + " - ") : "";
|
||||||
|
badge1 += (!UtilityString.isNullOrEmpty(currentItem.getCodArtFor()) ? currentItem.getCodArtFor() : currentItem.getCodMart());
|
||||||
|
|
||||||
String badge1 = currentItem.getCodAlis() + " - " + (!UtilityString.isNullOrEmpty(currentItem.getCodArtFor()) ? currentItem.getCodArtFor() : currentItem.getCodMart());
|
|
||||||
rowModel.setBadge1(badge1);
|
rowModel.setBadge1(badge1);
|
||||||
|
|
||||||
rowModel.setBadge2(UtilityString.isNullOrEmpty(currentItem.getCodJcom()) ? null : currentItem.getCodJcom());
|
rowModel.setBadge2(UtilityString.isNullOrEmpty(currentItem.getCodJcom()) ? null : currentItem.getCodJcom());
|
||||||
|
|||||||
@ -4,9 +4,11 @@ import android.content.Context;
|
|||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
public class DeactivatableViewPager extends ViewPager {
|
public class DeactivatableViewPager extends ViewPager {
|
||||||
|
|
||||||
|
private View mCurrentView;
|
||||||
|
|
||||||
public DeactivatableViewPager(Context context) {
|
public DeactivatableViewPager(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
@ -25,4 +27,34 @@ public class DeactivatableViewPager extends ViewPager {
|
|||||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||||
return isEnabled() && super.onInterceptTouchEvent(event);
|
return isEnabled() && super.onInterceptTouchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||||
|
if (mCurrentView == null) {
|
||||||
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int height = 0;
|
||||||
|
mCurrentView.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
|
||||||
|
int h = mCurrentView.getMeasuredHeight();
|
||||||
|
if (h > height) height = h;
|
||||||
|
heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
|
||||||
|
|
||||||
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void measureCurrentView(View currentView) {
|
||||||
|
mCurrentView = currentView;
|
||||||
|
requestLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int measureFragment(View view) {
|
||||||
|
if (view == null)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
view.measure(0, 0);
|
||||||
|
return view.getMeasuredHeight();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,8 @@ package it.integry.integrywmsnative.view.dialogs;
|
|||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -24,7 +25,7 @@ public class DialogAskLivelloPosizione {
|
|||||||
private Context mContext;
|
private Context mContext;
|
||||||
private MtbDepoPosizione mtbDepoPosizione;
|
private MtbDepoPosizione mtbDepoPosizione;
|
||||||
|
|
||||||
private Dialog mAlert;
|
private Dialog mDialog;
|
||||||
|
|
||||||
private RunnableArgs<MtbDepoPosizione> onComplete;
|
private RunnableArgs<MtbDepoPosizione> onComplete;
|
||||||
private RunnableArgs<Exception> onFailed;
|
private RunnableArgs<Exception> onFailed;
|
||||||
@ -34,7 +35,7 @@ public class DialogAskLivelloPosizione {
|
|||||||
private boolean completedFLow = false;
|
private boolean completedFLow = false;
|
||||||
|
|
||||||
public static void make(Context context, MtbDepoPosizione mtbDepoPosizione, boolean canAbort, RunnableArgs<MtbDepoPosizione> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void make(Context context, MtbDepoPosizione mtbDepoPosizione, boolean canAbort, RunnableArgs<MtbDepoPosizione> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
new DialogAskLivelloPosizione(context, mtbDepoPosizione, canAbort, onComplete, onFailed).mAlert.show();
|
new DialogAskLivelloPosizione(context, mtbDepoPosizione, canAbort, onComplete, onFailed).mDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -48,15 +49,17 @@ public class DialogAskLivelloPosizione {
|
|||||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||||
View currentView = inflater.inflate(R.layout.dialog_ask_livello_of_position, null, false);
|
View currentView = inflater.inflate(R.layout.dialog_ask_livello_of_position, null, false);
|
||||||
|
|
||||||
mAlert = new Dialog(mContext);
|
mDialog = new Dialog(mContext);
|
||||||
mAlert.setContentView(currentView);
|
mDialog.setContentView(currentView);
|
||||||
mAlert.setCanceledOnTouchOutside(false);
|
mDialog.setCanceledOnTouchOutside(false);
|
||||||
|
mDialog.setCancelable(false);
|
||||||
|
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
mAlert.setOnDismissListener(dialog -> {
|
mDialog.setOnDismissListener(dialog -> {
|
||||||
if(!completedFLow) onComplete.run(null);
|
if(!completedFLow) onComplete.run(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
mAlert.setOnShowListener(dialog -> {
|
mDialog.setOnShowListener(dialog -> {
|
||||||
|
|
||||||
if(!canAbort) currentView.findViewById(R.id.button_abort).setVisibility(View.GONE);
|
if(!canAbort) currentView.findViewById(R.id.button_abort).setVisibility(View.GONE);
|
||||||
|
|
||||||
@ -111,7 +114,7 @@ public class DialogAskLivelloPosizione {
|
|||||||
|
|
||||||
completedFLow = true;
|
completedFLow = true;
|
||||||
onComplete.run(foundPosizione);
|
onComplete.run(foundPosizione);
|
||||||
mAlert.dismiss();
|
mDialog.dismiss();
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -142,7 +145,7 @@ public class DialogAskLivelloPosizione {
|
|||||||
private void onLevelAbort() {
|
private void onLevelAbort() {
|
||||||
completedFLow = true;
|
completedFLow = true;
|
||||||
onComplete.run(null);
|
onComplete.run(null);
|
||||||
mAlert.dismiss();
|
mDialog.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs;
|
||||||
|
|
||||||
|
public class DialogConsts {
|
||||||
|
|
||||||
|
public enum Results {
|
||||||
|
YES,
|
||||||
|
NO,
|
||||||
|
ABORT
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -6,6 +6,9 @@ import android.content.Context;
|
|||||||
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -73,6 +76,8 @@ public class DialogAskPositionOfLU {
|
|||||||
mDialog = new Dialog(mContext);
|
mDialog = new Dialog(mContext);
|
||||||
mDialog.setContentView(mBinding.getRoot());
|
mDialog.setContentView(mBinding.getRoot());
|
||||||
mDialog.setCanceledOnTouchOutside(false);
|
mDialog.setCanceledOnTouchOutside(false);
|
||||||
|
mDialog.setCancelable(false);
|
||||||
|
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
mDialog.setOnShowListener(dialog -> {
|
mDialog.setOnShowListener(dialog -> {
|
||||||
adapter.getPage(1).findViewById(R.id.button_confirm).setOnClickListener(v -> {
|
adapter.getPage(1).findViewById(R.id.button_confirm).setOnClickListener(v -> {
|
||||||
|
|||||||
@ -3,6 +3,8 @@ package it.integry.integrywmsnative.view.dialogs.ask_position_of_lu;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.viewpager.widget.PagerAdapter;
|
import androidx.viewpager.widget.PagerAdapter;
|
||||||
|
import it.integry.integrywmsnative.ui.DeactivatableViewPager;
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -25,10 +27,6 @@ public class DialogAskPositionOfLUAdapter extends PagerAdapter {
|
|||||||
this.mDatasetViews = new ArrayList<>();
|
this.mDatasetViews = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getCount() {
|
|
||||||
return mDatasetLayout.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View instantiateItem(ViewGroup container, int position) {
|
public View instantiateItem(ViewGroup container, int position) {
|
||||||
@ -38,6 +36,9 @@ public class DialogAskPositionOfLUAdapter extends PagerAdapter {
|
|||||||
container.addView(view);
|
container.addView(view);
|
||||||
this.mDatasetViews.add(view);
|
this.mDatasetViews.add(view);
|
||||||
|
|
||||||
|
DeactivatableViewPager pager = (DeactivatableViewPager) container;
|
||||||
|
pager.measureCurrentView(view);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,4 +57,10 @@ public class DialogAskPositionOfLUAdapter extends PagerAdapter {
|
|||||||
return this.mDatasetViews.get(index);
|
return this.mDatasetViews.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return mDatasetLayout.size();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
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();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -9,23 +9,48 @@
|
|||||||
type="android.content.Context" />
|
type="android.content.Context" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
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_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp"
|
android:paddingTop="24dp"
|
||||||
android:layout_gravity="center">
|
android:paddingLeft="24dp"
|
||||||
|
android:paddingRight="24dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<TextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Posizionamento"
|
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.DialogTitle"
|
||||||
|
android:text="@string/placement"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|
||||||
@ -33,6 +58,11 @@
|
|||||||
layout="@layout/dialog_ask_position_of_lu__page2" />
|
layout="@layout/dialog_ask_position_of_lu__page2" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
@ -9,34 +9,63 @@
|
|||||||
type="android.content.Context" />
|
type="android.content.Context" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
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_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp"
|
android:paddingTop="24dp"
|
||||||
android:layout_gravity="center">
|
android:paddingLeft="24dp"
|
||||||
|
android:paddingRight="24dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<TextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Posizionamento"
|
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.DialogTitle"
|
||||||
|
android:text="@string/placement"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||||
android:id="@+id/viewpager"
|
android:id="@+id/viewpager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="180dp"
|
android:layout_height="wrap_content">
|
||||||
class="it.integry.integrywmsnative.view.WrapContentHeightViewPager">
|
|
||||||
|
|
||||||
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_margin="16dp">
|
android:layout_margin="16dp">
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/level_number_layout"
|
android:id="@+id/level_number_layout"
|
||||||
@ -30,6 +31,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
android:gravity="bottom|center_horizontal">
|
android:gravity="bottom|center_horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial"
|
style="@style/TextViewMaterial"
|
||||||
android:text="L'errore è stato comunicato allo sviluppatore. Verrà analizzato e risolto al più presto"
|
android:text="L'errore è stato comunicato al team di supporto. Verrà analizzato e risolto al più presto"
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="16dp" />
|
android:layout_marginBottom="16dp" />
|
||||||
|
|||||||
@ -230,6 +230,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:enabled="@{quantityViewModel.canPartitaMagBeChanged}"
|
android:enabled="@{quantityViewModel.canPartitaMagBeChanged}"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
app:hintTextAppearance="@style/hint_text"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/guideline_partita_data"
|
app:layout_constraintEnd_toStartOf="@id/guideline_partita_data"
|
||||||
android:nextFocusRight="@+id/input_data_scad">
|
android:nextFocusRight="@+id/input_data_scad">
|
||||||
@ -239,6 +240,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textNoSuggestions"
|
android:inputType="textNoSuggestions"
|
||||||
android:hint="@string/batch_lot"
|
android:hint="@string/batch_lot"
|
||||||
|
android:textAllCaps="true"
|
||||||
app:binding="@{quantityViewModel.batchLot}"/>
|
app:binding="@{quantityViewModel.batchLot}"/>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
110
app/src/main/res/layout/dialog_yes_no.xml
Normal file
110
app/src/main/res/layout/dialog_yes_no.xml
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
<?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: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">
|
||||||
|
|
||||||
|
<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"
|
||||||
|
android:src="@drawable/ic_error_white_24dp"
|
||||||
|
android:layout_margin="24dp"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingLeft="24dp"
|
||||||
|
android:paddingRight="24dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/TextViewMaterial.DialogTitle"
|
||||||
|
android:text="Title here"
|
||||||
|
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="Description here"
|
||||||
|
android:gravity="left"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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: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.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
|
</layout>
|
||||||
@ -185,8 +185,11 @@
|
|||||||
<string name="wait_a_moment">Attendi qualche istante</string>
|
<string name="wait_a_moment">Attendi qualche istante</string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<string name="check_in_printer">Stampante Accettazione</string>
|
<string name="check_in_printer">Stampante Accettazione</string>
|
||||||
<string name="check_out_printer">Stampante Vendita</string>
|
<string name="check_out_printer">Stampante Vendita</string>
|
||||||
|
|
||||||
|
<string name="yes">Si</string>
|
||||||
|
<string name="no">No</string>
|
||||||
|
|
||||||
|
<string name="placement">Posizionamento</string>
|
||||||
</resources>
|
</resources>
|
||||||
@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
<color name="brown_500">#795548</color>
|
<color name="brown_500">#795548</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_with_alpha">#884CAF50</color>
|
||||||
<color name="green_500">#4CAF50</color>
|
<color name="green_500">#4CAF50</color>
|
||||||
<color name="green_600">#43A047</color>
|
<color name="green_600">#43A047</color>
|
||||||
@ -48,6 +50,10 @@
|
|||||||
<color name="indigo_700">#303F9F</color>
|
<color name="indigo_700">#303F9F</color>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<color name="light_blue_300">#4fc3f7</color>
|
||||||
|
|
||||||
|
|
||||||
<color name="orange_600_with_alpha">#88FB8C00</color>
|
<color name="orange_600_with_alpha">#88FB8C00</color>
|
||||||
<color name="orange_600">#FB8C00</color>
|
<color name="orange_600">#FB8C00</color>
|
||||||
<color name="orange_700">#F57C00</color>
|
<color name="orange_700">#F57C00</color>
|
||||||
|
|||||||
@ -192,5 +192,9 @@
|
|||||||
|
|
||||||
<string name="check_in_printer">Check In printer</string>
|
<string name="check_in_printer">Check In printer</string>
|
||||||
<string name="check_out_printer">Check Out printer</string>
|
<string name="check_out_printer">Check Out printer</string>
|
||||||
|
<string name="yes">Yes</string>
|
||||||
|
<string name="no">No</string>
|
||||||
|
|
||||||
|
<string name="placement">Placement</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext{
|
ext{
|
||||||
kotlin_version = '1.3.11'
|
kotlin_version = '1.3.21'
|
||||||
gradle_version = '3.2.1'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -15,7 +14,7 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.3.1'
|
classpath 'com.android.tools.build:gradle:3.3.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath 'com.google.gms:google-services:4.2.0'
|
classpath 'com.google.gms:google-services:4.2.0'
|
||||||
classpath 'com.google.firebase:firebase-plugins:1.1.5'
|
classpath 'com.google.firebase:firebase-plugins:1.1.5'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user