Completata gestione del contenuto UL in BottomSheetFragment
This commit is contained in:
parent
9967b7a3ef
commit
653f0d6d70
@ -315,23 +315,23 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
private void init(){
|
||||
|
||||
ServerStatusChecker.getInstance().addCallback(value -> {
|
||||
if(value && (!mIsOnline || firstCheckExecution)){
|
||||
|
||||
SettingsManager.loadDBVariables(() -> {
|
||||
mIsOnline = true;
|
||||
firstCheckExecution = false;
|
||||
|
||||
}, ex -> {
|
||||
//mNoConnectionLayout.expand(true);
|
||||
if(mIsOnline) mIsOnline = false;
|
||||
}
|
||||
);
|
||||
|
||||
} else if(!value && mIsOnline){
|
||||
mIsOnline = false;
|
||||
}
|
||||
});
|
||||
// ServerStatusChecker.getInstance().addCallback(value -> {
|
||||
// if(value && (!mIsOnline || firstCheckExecution)){
|
||||
//
|
||||
// SettingsManager.loadDBVariables(() -> {
|
||||
// mIsOnline = true;
|
||||
// firstCheckExecution = false;
|
||||
//
|
||||
// }, ex -> {
|
||||
// //mNoConnectionLayout.expand(true);
|
||||
// if(mIsOnline) mIsOnline = false;
|
||||
// }
|
||||
// );
|
||||
//
|
||||
// } else if(!value && mIsOnline){
|
||||
// mIsOnline = false;
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -44,6 +44,8 @@ public class UtilityLogger {
|
||||
public static void errorMe(Exception ex, String additionalText, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
if(!BuildConfig.DEBUG) FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
|
||||
logMe(ex.getMessage());
|
||||
|
||||
// if ((!(ex instanceof SocketTimeoutException) && !(ex.getCause() instanceof SocketTimeoutException)) ||
|
||||
// (!(ex instanceof SocketException) && !(ex.getCause() instanceof SocketException)) ||
|
||||
// (!(ex instanceof IOException) && !(ex.getCause() instanceof IOException))) {
|
||||
|
||||
@ -8,6 +8,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.tfb.fbtoast.FBToast;
|
||||
@ -35,13 +36,11 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.ActivitySpedizioneBinding;
|
||||
@ -51,7 +50,6 @@ import it.integry.integrywmsnative.gest.spedizione_new.model.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.exceptions.BottomSheetFragmentViewNotInitializedException;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
@ -61,7 +59,7 @@ import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQua
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2ResultDTO;
|
||||
|
||||
public class SpedizioneActivity extends AppCompatActivity implements SpedizioneViewModel.Listeners, BottomSheetFragmentLUContentViewModel.Listener {
|
||||
public class SpedizioneActivity extends AppCompatActivity implements SpedizioneViewModel.Listeners, BottomSheetFragmentLUContentViewModel.Listener, BottomSheetFragmentLUContentView.Listener {
|
||||
|
||||
private ActivitySpedizioneBinding mBindings;
|
||||
|
||||
@ -117,9 +115,9 @@ public class SpedizioneActivity extends AppCompatActivity implements SpedizioneV
|
||||
mBindings.setLifecycleOwner(this);
|
||||
mBindings.setSpedizioneView(this);
|
||||
|
||||
mBindings.bottomSheetLuContent.init(mBindings.bottomSheetLuContent);
|
||||
mBindings.bottomSheetLuContent.setListener(this);
|
||||
mBindings.bottomSheetLuContent.init(mBindings.bottomSheetLuContent, null);
|
||||
mBottomSheetFragmentLUContentViewModel = mBindings.bottomSheetLuContent.getViewModelInstance();
|
||||
mBottomSheetFragmentLUContentViewModel.setListener(this);
|
||||
|
||||
|
||||
this.initVars();
|
||||
@ -505,4 +503,14 @@ public class SpedizioneActivity extends AppCompatActivity implements SpedizioneV
|
||||
public void onBottomSheetLUClose() {
|
||||
this.mViewmodel.closeLU(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||
Toast.makeText(this, "Edit", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMtbColrDelete(MtbColr mtbColr) {
|
||||
Toast.makeText(this, "Delete", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -675,12 +675,11 @@ public class SpedizioneViewModel {
|
||||
if (UtilityBigDecimal.lowerThan(mtbColrToDispatch.getQtaCol(), qtaDaEvadere)) {
|
||||
numCnfDaPrelevare = mtbColrToDispatch.getNumCnf();
|
||||
qtaColDaPrelevare = mtbColrToDispatch.getQtaCol();
|
||||
qtaCnfDaPrelevare = mtbColrToDispatch.getQtaCnf();
|
||||
} else {
|
||||
numCnfDaPrelevare = numCnfDaEvadere;
|
||||
qtaColDaPrelevare = qtaDaEvadere;
|
||||
qtaCnfDaPrelevare = qtaCnfDaEvadere;
|
||||
}
|
||||
qtaCnfDaPrelevare = mtbColrToDispatch.getQtaCnf();
|
||||
|
||||
|
||||
totalQtaAvailable = mtbColrToDispatch.getQtaCol();
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
|
||||
public class AutoCloseBottomSheetBehavior<V extends View> extends BottomSheetBehavior<V> {
|
||||
|
||||
public AutoCloseBottomSheetBehavior(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(CoordinatorLayout parent, V child, MotionEvent event) {
|
||||
if (event.getAction() == MotionEvent.ACTION_DOWN &&
|
||||
getState() == BottomSheetBehavior.STATE_EXPANDED) {
|
||||
|
||||
Rect outRect = new Rect();
|
||||
child.getGlobalVisibleRect(outRect);
|
||||
|
||||
if (!outRect.contains((int) event.getRawX(), (int) event.getRawY())) {
|
||||
setState(BottomSheetBehavior.STATE_COLLAPSED);
|
||||
}
|
||||
}
|
||||
return super.onInterceptTouchEvent(parent, child, event);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,129 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__base.exceptions.BottomSheetFragmentViewNotInitializedException;
|
||||
|
||||
public abstract class BottomSheetFragmentBaseView extends ConstraintLayout {
|
||||
|
||||
protected Context mContext;
|
||||
protected View parentView;
|
||||
|
||||
protected BottomSheetBehavior mBottomSheetBehavior;
|
||||
|
||||
public BottomSheetFragmentBaseView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public BottomSheetFragmentBaseView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
public BottomSheetFragmentBaseView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
this(context, attrs);
|
||||
}
|
||||
|
||||
public BottomSheetFragmentBaseView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
this(context, attrs);
|
||||
}
|
||||
|
||||
|
||||
public void init(View view, View backgroundView) {
|
||||
this.parentView = view;
|
||||
this.mBottomSheetBehavior = BottomSheetBehavior.from(this.parentView);
|
||||
|
||||
this.mBottomSheetBehavior.addBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
|
||||
@Override
|
||||
public void onStateChanged(@NonNull View bottomSheet, int newState) {
|
||||
if (newState == BottomSheetBehavior.STATE_COLLAPSED && backgroundView != null)
|
||||
backgroundView.setVisibility(View.GONE);
|
||||
|
||||
onStateChangedCallback(mapState(newState));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSlide(@NonNull View bottomSheet, float slideOffset) {
|
||||
if(backgroundView != null) {
|
||||
backgroundView.setVisibility(View.VISIBLE);
|
||||
backgroundView.setAlpha(slideOffset);
|
||||
}
|
||||
|
||||
onSlideCallback(1 - slideOffset);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void expand() {
|
||||
if(this.mBottomSheetBehavior == null) {
|
||||
UtilityLogger.errorMe(new BottomSheetFragmentViewNotInitializedException());
|
||||
return;
|
||||
}
|
||||
|
||||
this.mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
}
|
||||
|
||||
public void collapse() {
|
||||
if(this.mBottomSheetBehavior == null) {
|
||||
UtilityLogger.errorMe(new BottomSheetFragmentViewNotInitializedException());
|
||||
return;
|
||||
}
|
||||
|
||||
this.mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
|
||||
}
|
||||
|
||||
public boolean isExpanded() {
|
||||
return this.getState() == State.EXPANDED;
|
||||
}
|
||||
|
||||
public boolean isCollapsed() {
|
||||
return this.getState() == State.COLLAPSED;
|
||||
}
|
||||
|
||||
|
||||
public State getState() {
|
||||
if(this.mBottomSheetBehavior == null) {
|
||||
UtilityLogger.errorMe(new BottomSheetFragmentViewNotInitializedException());
|
||||
return null;
|
||||
}
|
||||
|
||||
return mapState(this.mBottomSheetBehavior.getState());
|
||||
}
|
||||
|
||||
public void toggle() {
|
||||
if(isExpanded()) collapse();
|
||||
else expand();
|
||||
}
|
||||
|
||||
protected State mapState(int stateInt) {
|
||||
if(stateInt == BottomSheetBehavior.STATE_DRAGGING) return State.DRAGGING;
|
||||
if(stateInt == BottomSheetBehavior.STATE_SETTLING) return State.SETTLING;
|
||||
if(stateInt == BottomSheetBehavior.STATE_EXPANDED) return State.EXPANDED;
|
||||
if(stateInt == BottomSheetBehavior.STATE_COLLAPSED) return State.COLLAPSED;
|
||||
if(stateInt == BottomSheetBehavior.STATE_HIDDEN) return State.HIDDEN;
|
||||
if(stateInt == BottomSheetBehavior.STATE_HALF_EXPANDED) return State.HALF_EXPANDED;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected abstract void onStateChangedCallback(State newState);
|
||||
|
||||
protected abstract void onSlideCallback(float slideOffset);
|
||||
|
||||
public enum State {
|
||||
DRAGGING,
|
||||
SETTLING,
|
||||
EXPANDED,
|
||||
COLLAPSED,
|
||||
HIDDEN,
|
||||
HALF_EXPANDED
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__lu_content.exceptions;
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__base.exceptions;
|
||||
|
||||
public class BottomSheetFragmentViewNotInitializedException extends Exception {
|
||||
public BottomSheetFragmentViewNotInitializedException() {
|
||||
@ -11,6 +11,7 @@ import androidx.databinding.Observable;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.WeakReferenceOnListChangedCallback;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
@ -40,7 +41,6 @@ public class BottomSheetFragmentLUContentListAdapter extends BaseAdapter {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void onLUChangedCallback() {
|
||||
if(this.mtbColt.get() != null) {
|
||||
this.mtbColt.get().getMtbColr().addOnListChangedCallback(onListChangedCallback);
|
||||
|
||||
@ -7,38 +7,30 @@ import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.Observable;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.linearlistview.LinearListView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.di.BindableString;
|
||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.BottomSheetFragmentLuContentBinding;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.exceptions.BottomSheetFragmentViewNotInitializedException;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__base.BottomSheetFragmentBaseView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||
|
||||
public class BottomSheetFragmentLUContentView extends ConstraintLayout {
|
||||
|
||||
private final Context mContext;
|
||||
private BottomSheetBehavior mBottomSheetBehavior;
|
||||
public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseView implements BottomSheetMtbColrEditView.Listener {
|
||||
|
||||
private BottomSheetFragmentLuContentBinding mBinding;
|
||||
private BottomSheetFragmentLUContentViewModel mViewModel;
|
||||
|
||||
private BottomSheetFragmentLUContentListAdapter mAdapter;
|
||||
|
||||
|
||||
public BottomSheetFragmentLUContentView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
private Listener mListener;
|
||||
|
||||
public BottomSheetFragmentLUContentView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
@ -51,41 +43,26 @@ public class BottomSheetFragmentLUContentView extends ConstraintLayout {
|
||||
mViewModel = new BottomSheetFragmentLUContentViewModel();
|
||||
mBinding.setViewModel(mViewModel);
|
||||
|
||||
mBinding.bottomSheetMtbColrEdit.setListener(this);
|
||||
mBinding.bottomSheetMtbColrEdit.init(mBinding.bottomSheetMtbColrEdit, mBinding.bottomSheetMtbColrEditBackground);
|
||||
|
||||
this.initAdapter();
|
||||
this.initCallbacks();
|
||||
}
|
||||
|
||||
public BottomSheetFragmentLUContentView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
this(context, attrs);
|
||||
}
|
||||
|
||||
public BottomSheetFragmentLUContentView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
this(context, attrs);
|
||||
}
|
||||
|
||||
public BottomSheetFragmentLUContentViewModel getViewModelInstance() {
|
||||
return mViewModel;
|
||||
}
|
||||
|
||||
public void init(View view) {
|
||||
this.mBottomSheetBehavior = BottomSheetBehavior.from(view);
|
||||
|
||||
this.mBottomSheetBehavior.addBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
|
||||
@Override
|
||||
public void onStateChanged(@NonNull View bottomSheet, int newState) {
|
||||
onStateChangedCallback(mapState(newState));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSlide(@NonNull View bottomSheet, float slideOffset) {
|
||||
onSlideCallback(1 - slideOffset);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initAdapter() {
|
||||
this.mAdapter = new BottomSheetFragmentLUContentListAdapter(this.mContext, this.mViewModel.getObservableMtbColt());
|
||||
this.mBinding.linearListview.setAdapter(this.mAdapter);
|
||||
|
||||
this.mBinding.linearListview.setOnItemClickListener((parent, view, position, id) -> {
|
||||
this.mBinding.bottomSheetMtbColrEdit.setMtbColr(this.mViewModel.getObservableMtbColt().get().getMtbColr().get(position));
|
||||
this.mBinding.bottomSheetMtbColrEdit.expand();
|
||||
});
|
||||
}
|
||||
|
||||
private void initCallbacks() {
|
||||
@ -112,53 +89,13 @@ public class BottomSheetFragmentLUContentView extends ConstraintLayout {
|
||||
mBinding.textviewArtDescription.setText(mContext.getResources().getQuantityString(R.plurals.articles, mtbColrs.size()));
|
||||
}
|
||||
|
||||
private State mapState(int stateInt) {
|
||||
if(stateInt == BottomSheetBehavior.STATE_DRAGGING) return State.DRAGGING;
|
||||
if(stateInt == BottomSheetBehavior.STATE_SETTLING) return State.SETTLING;
|
||||
if(stateInt == BottomSheetBehavior.STATE_EXPANDED) return State.EXPANDED;
|
||||
if(stateInt == BottomSheetBehavior.STATE_COLLAPSED) return State.COLLAPSED;
|
||||
if(stateInt == BottomSheetBehavior.STATE_HIDDEN) return State.HIDDEN;
|
||||
if(stateInt == BottomSheetBehavior.STATE_HALF_EXPANDED) return State.HALF_EXPANDED;
|
||||
|
||||
return null;
|
||||
public BottomSheetFragmentLUContentView setListener(Listener listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public State getState() {
|
||||
if(this.mBottomSheetBehavior == null) {
|
||||
UtilityLogger.errorMe(new BottomSheetFragmentViewNotInitializedException());
|
||||
return null;
|
||||
}
|
||||
|
||||
return mapState(this.mBottomSheetBehavior.getState());
|
||||
}
|
||||
|
||||
public boolean isExpanded() {
|
||||
return this.getState() == State.EXPANDED;
|
||||
}
|
||||
|
||||
public boolean isCollapsed() {
|
||||
return this.getState() == State.COLLAPSED;
|
||||
}
|
||||
|
||||
public void expand() {
|
||||
if(this.mBottomSheetBehavior == null) {
|
||||
UtilityLogger.errorMe(new BottomSheetFragmentViewNotInitializedException());
|
||||
return;
|
||||
}
|
||||
|
||||
this.mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
}
|
||||
|
||||
public void collapse() {
|
||||
if(this.mBottomSheetBehavior == null) {
|
||||
UtilityLogger.errorMe(new BottomSheetFragmentViewNotInitializedException());
|
||||
return;
|
||||
}
|
||||
|
||||
this.mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
|
||||
}
|
||||
|
||||
private void onStateChangedCallback(State newState) {
|
||||
@Override
|
||||
protected void onStateChangedCallback(State newState) {
|
||||
switch (newState) {
|
||||
case EXPANDED:
|
||||
this.mBinding.btnCloseLu.setClickable(false);
|
||||
@ -172,24 +109,27 @@ public class BottomSheetFragmentLUContentView extends ConstraintLayout {
|
||||
}
|
||||
}
|
||||
|
||||
private void onSlideCallback(float slideOffset) {
|
||||
@Override
|
||||
protected void onSlideCallback(float slideOffset) {
|
||||
this.mBinding.btnCloseLu.setAlpha(slideOffset);
|
||||
// mBinding.tapActionLayout.setAlpha(1-slideOffset);
|
||||
}
|
||||
|
||||
|
||||
public void toggle() {
|
||||
if(isExpanded()) collapse();
|
||||
else expand();
|
||||
@Override
|
||||
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||
if(mListener != null) this.mListener.onMtbColrEdit(mtbColr);
|
||||
}
|
||||
|
||||
public enum State {
|
||||
DRAGGING,
|
||||
SETTLING,
|
||||
EXPANDED,
|
||||
COLLAPSED,
|
||||
HIDDEN,
|
||||
HALF_EXPANDED
|
||||
@Override
|
||||
public void onMtbColrDelete(MtbColr mtbColr) {
|
||||
if(mListener != null) this.mListener.onMtbColrDelete(mtbColr);
|
||||
}
|
||||
|
||||
|
||||
public interface Listener {
|
||||
void onMtbColrEdit(MtbColr mtbColr);
|
||||
|
||||
void onMtbColrDelete(MtbColr mtbColr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ public class BottomSheetFragmentLUContentViewModel {
|
||||
|
||||
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
||||
private Listener mListener;
|
||||
private MtbColrListener mMtbColrListener;
|
||||
|
||||
public void closeCurrentLU() {
|
||||
if(this.mListener != null) this.mListener.onBottomSheetLUClose();
|
||||
@ -27,7 +28,16 @@ public class BottomSheetFragmentLUContentViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public BottomSheetFragmentLUContentViewModel setMtbColrListener(MtbColrListener mtbColrListener) {
|
||||
this.mMtbColrListener = mtbColrListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
void onBottomSheetLUClose();
|
||||
}
|
||||
|
||||
public interface MtbColrListener {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,97 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.databinding.BottomSheetMtbColrEditBinding;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__base.BottomSheetFragmentBaseView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.exceptions.NullMtbColrException;
|
||||
|
||||
public class BottomSheetMtbColrEditView extends BottomSheetFragmentBaseView {
|
||||
|
||||
private BottomSheetMtbColrEditBinding mBinding;
|
||||
private BottomSheetMtbColrEditViewModel mViewModel;
|
||||
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
public BottomSheetMtbColrEditView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.bottom_sheet__mtb_colr_edit, this, true);
|
||||
|
||||
|
||||
mViewModel = new BottomSheetMtbColrEditViewModel();
|
||||
mBinding.setViewModel(mViewModel);
|
||||
mBinding.setView(this);
|
||||
}
|
||||
|
||||
public void setMtbColr(MtbColr mtbColr) {
|
||||
this.mBinding.invalidateAll();
|
||||
this.mViewModel.setMtbColr(mtbColr);
|
||||
this.mBinding.executePendingBindings();
|
||||
|
||||
this.parentView.requestLayout();
|
||||
}
|
||||
|
||||
public void editMtbColr() {
|
||||
if(this.mListener != null) this.mListener.onMtbColrEdit(this.mViewModel.getMtbColr());
|
||||
this.collapse();
|
||||
}
|
||||
|
||||
public void deleteMtbColr() {
|
||||
if(this.mListener != null) this.mListener.onMtbColrDelete(this.mViewModel.getMtbColr());
|
||||
this.collapse();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void expand() {
|
||||
if(this.mViewModel.getMtbColr() == null) {
|
||||
UtilityLogger.errorMe(new NullMtbColrException());
|
||||
return;
|
||||
}
|
||||
|
||||
super.expand();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStateChangedCallback(State newState) {
|
||||
if(newState == State.COLLAPSED) this.mViewModel.setMtbColr(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSlideCallback(float slideOffset) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public BottomSheetMtbColrEditViewModel getViewModelInstance() {
|
||||
return this.mViewModel;
|
||||
}
|
||||
|
||||
|
||||
public BottomSheetMtbColrEditView setListener(Listener listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
|
||||
void onMtbColrEdit(MtbColr mtbColr);
|
||||
|
||||
void onMtbColrDelete(MtbColr mtbColr);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit;
|
||||
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
|
||||
public class BottomSheetMtbColrEditViewModel {
|
||||
|
||||
private ObservableField<MtbColr> mtbColr = new ObservableField<>();
|
||||
|
||||
|
||||
public MtbColr getMtbColr() {
|
||||
return mtbColr.get();
|
||||
}
|
||||
|
||||
public BottomSheetMtbColrEditViewModel setMtbColr(MtbColr mtbColr) {
|
||||
this.mtbColr.set(mtbColr);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.exceptions;
|
||||
|
||||
public class NullMtbColrException extends Exception {
|
||||
|
||||
public NullMtbColrException() {
|
||||
super("Please set MtbColr before opening the BottomSheet");
|
||||
}
|
||||
|
||||
}
|
||||
229
app/src/main/res/layout/bottom_sheet__mtb_colr_edit.xml
Normal file
229
app/src/main/res/layout/bottom_sheet__mtb_colr_edit.xml
Normal file
@ -0,0 +1,229 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/title_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/bottom_sheet_actions_title"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="@{viewModel.mtbColr.descrizione}"
|
||||
android:textColor="#444"
|
||||
android:textStyle="bold"
|
||||
tools:text="Descrizione articolo" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/bottom_sheet_actions_subtitle"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.mtbColr.codMart}"
|
||||
tools:text="ABF52IL" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:text="@{UtilityNumber.decimalToString(viewModel.mtbColr.qtaCol)}"
|
||||
android:textStyle="bold"
|
||||
tools:text="250" />
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="end"
|
||||
android:text="@{viewModel.mtbColr.untMis}"
|
||||
android:textStyle="bold"
|
||||
tools:text="PZ" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:text="@{UtilityNumber.decimalToString(viewModel.mtbColr.numCnf)}"
|
||||
android:textStyle="bold"
|
||||
tools:text="250" />
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="end"
|
||||
android:text="@string/unt_mis_col"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_layout">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.50" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:singleClick="@{() -> view.editMtbColr()}"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_action"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bottom_sheet_actions_edit_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:padding="16dp"
|
||||
android:scaleX="1.5"
|
||||
android:scaleY="1.5"
|
||||
android:src="@drawable/ic_edit_24dp"
|
||||
android:tint="@color/green_600" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/edit" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:singleClick="@{() -> view.deleteMtbColr()}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_action"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bottom_sheet_actions_delete_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:padding="16dp"
|
||||
android:scaleX="1.5"
|
||||
android:scaleY="1.5"
|
||||
android:src="@drawable/ic_delete_24dp"
|
||||
android:tint="@color/red_600" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/delete" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
@ -14,371 +16,393 @@
|
||||
type="it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/bottom_sheet"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ffffffff"
|
||||
android:orientation="vertical">
|
||||
android:background="@color/full_white">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ffffffff"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/title_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="66dp"
|
||||
android:background="@color/colorAccent"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:clickable="true"
|
||||
android:onClick="@{() -> view.toggle()}"
|
||||
android:focusable="true">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white">
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/indicator_view"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="4dp"
|
||||
android:background="@drawable/badge_gray_round_corner"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:backgroundTint="@android:color/white"
|
||||
android:alpha="0.5"/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/title_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="66dp"
|
||||
android:background="@color/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{() -> view.toggle()}"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/indicator_view">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
||||
<View
|
||||
android:id="@+id/indicator_view"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:tint="@android:color/white"
|
||||
android:layout_height="4dp"
|
||||
android:alpha="0.5"
|
||||
android:background="@drawable/badge_gray_round_corner"
|
||||
android:backgroundTint="@android:color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_box" />
|
||||
app:layout_constraintTop_toBottomOf="@id/indicator_view">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/textview_art_counter"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:tint="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_box" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/textview_art_counter"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView"
|
||||
tools:text="2" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/textview_art_description"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/article"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_close_lu"
|
||||
style="@style/Button.DangerFull"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView"
|
||||
tools:text="2" />
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/action_close_ul"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/indicator_view"
|
||||
app:singleClick="@{() -> viewModel.closeCurrentLU()}"
|
||||
app:strokeColor="@color/red_600" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/textview_art_description"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/article"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_close_lu"
|
||||
style="@style/Button.DangerFull"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/lu_detail_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:singleClick="@{() -> viewModel.closeCurrentLU()}"
|
||||
android:text="@string/action_close_ul"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/indicator_view"
|
||||
app:strokeColor="@color/red_600" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_layout">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lu_detail_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_toBottomOf="@+id/title_layout">
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/details_text"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/date_text"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/articoli_in_collo_details_date"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/articoli_in_collo_details_posizione"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/position_text"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:text="@{viewModel.mtbColt.posizione}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/prepared_by_text"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:text="@{viewModel.mtbColt.preparatoDa}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/customer"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline4"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:text="@{viewModel.mtbColt.ragSocCliente}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline4"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/separator_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:background="#ededed"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/lu_detail_layout" />
|
||||
|
||||
<LinearLayout
|
||||
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_toBottomOf="@+id/separator_view">
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/already_read_articles"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="14dp">
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/details_text"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:visibility="@{viewModel.mtbColt == null || viewModel.mtbColt.mtbColr.size() == 0 ? View.VISIBLE : View.GONE}">
|
||||
android:padding="15dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_info_78dp"
|
||||
android:tint="@color/empty_view_gray" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/empty_rows_in_mtbcolt"
|
||||
android:textColor="@color/empty_view_gray"
|
||||
android:textSize="20sp" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/date_text"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/articoli_in_collo_details_date"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/articoli_in_collo_details_posizione"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/position_text"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:text="@{viewModel.mtbColt.posizione}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/prepared_by_text"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:text="@{viewModel.mtbColt.preparatoDa}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/customer"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline4"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:text="@{viewModel.mtbColt.ragSocCliente}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline4"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.linearlistview.LinearListView
|
||||
android:id="@+id/linear_listview"
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/separator_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:background="#ededed"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/lu_detail_layout" />
|
||||
|
||||
<LinearLayout
|
||||
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_toBottomOf="@+id/separator_view">
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/already_read_articles"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
app:dividerThickness="0.5dp" />
|
||||
android:paddingTop="14dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:visibility="@{viewModel.mtbColt == null || viewModel.mtbColt.mtbColr.size() == 0 ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_info_78dp"
|
||||
android:tint="@color/empty_view_gray" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/empty_rows_in_mtbcolt"
|
||||
android:textColor="@color/empty_view_gray"
|
||||
android:textSize="20sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.linearlistview.LinearListView
|
||||
android:id="@+id/linear_listview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
app:dividerThickness="0.5dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit__background"
|
||||
android:background="#99000000"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:layout_behavior=".view.bottom_sheet__base.AutoCloseBottomSheetBehavior"/>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@ -411,13 +411,12 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:behavior_peekHeight="160dp"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user