Layout filters and other dialogs
This commit is contained in:
parent
f68691df6b
commit
16a565fc51
@ -471,12 +471,12 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
onComplete)
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete) {
|
||||
new DialogYesNoView(requireActivity(), "Posiziona UL", "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
switch (result) {
|
||||
case YES:
|
||||
DialogAskPositionOfLU.makeBase(getActivity(), false, (status, mtbDepoPosizione) -> {
|
||||
@ -496,7 +496,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
onComplete.run(false, null);
|
||||
break;
|
||||
}
|
||||
}).show();
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -862,7 +862,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
@Override
|
||||
public void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete) {
|
||||
new DialogYesNoView(this, "Posiziona UL", "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
switch (result) {
|
||||
case YES:
|
||||
DialogAskPositionOfLU.makeBase(this, false, (status, mtbDepoPosizione) -> {
|
||||
@ -878,7 +878,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
onComplete.run(false, null);
|
||||
break;
|
||||
}
|
||||
}).show();
|
||||
}).show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
public void askShouldPrintPackingList(PrintOrderCloseDTO printOrderCloseDTO, RunnableArgs<PrintOrderCloseDTO> onComplete) {
|
||||
|
||||
@ -1,15 +1,12 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.app.Dialog;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.Spanned;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -19,7 +16,8 @@ import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@ -66,7 +64,8 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
private final HashMap<String, String> mHashmapContent;
|
||||
private final Runnable mOnPositiveClick;
|
||||
private final Runnable mOnNegativeClick;
|
||||
private final @StringRes Integer mRNeutralButtonString;
|
||||
private final @StringRes
|
||||
Integer mRNeutralButtonString;
|
||||
private final Runnable mOnNeutralClick;
|
||||
|
||||
|
||||
@ -76,13 +75,12 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
|
||||
|
||||
private DialogBaseBinding mBindings;
|
||||
private Context mContext;
|
||||
|
||||
public static DialogSimpleMessageView newInstance(@NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent , Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
public static DialogSimpleMessageView newInstance(@NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent, Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
return new DialogSimpleMessageView(type, titleText, messageText, hashmapContent, onPositiveClick, onNegativeClick, rNeutralButtonString, onNeutralClick);
|
||||
}
|
||||
|
||||
private DialogSimpleMessageView(@NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent , Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
private DialogSimpleMessageView(@NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent, Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
super();
|
||||
|
||||
this.mType = type;
|
||||
@ -99,57 +97,79 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(this.mContext, this);
|
||||
UtilityDialog.setTo90PercentWidth(this.requireContext(), this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@NonNull
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
this.mContext = getActivity();
|
||||
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_base, container, false);
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogBaseBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
|
||||
mBindings.setView(this);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
getDialog().setCanceledOnTouchOutside(false);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
this.initContent();
|
||||
|
||||
var alertDialogBuilder = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false);
|
||||
|
||||
if (isPositiveVisible())
|
||||
alertDialogBuilder.setPositiveButton(getPositiveButtonText(), (dialog, which) -> {
|
||||
this.mOnPositiveClick.run();
|
||||
});
|
||||
|
||||
if (isNeutralVisible())
|
||||
alertDialogBuilder.setNeutralButton(getNeutralButtonText(), (dialog, which) -> {
|
||||
this.mOnNeutralClick.run();
|
||||
});
|
||||
|
||||
if (isNegativeVisible())
|
||||
alertDialogBuilder.setNegativeButton(getNegativeButtonText(), (dialog, which) -> {
|
||||
this.mOnNegativeClick.run();
|
||||
});
|
||||
|
||||
var alertDialog = alertDialogBuilder.create();
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private void initContent() {
|
||||
int colorBackgroundTitle = -1;
|
||||
Drawable titleIconRes = null;
|
||||
|
||||
switch (mType) {
|
||||
case INFO:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.light_blue_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_info_78dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.colorPrimary);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_info_78dp, null);
|
||||
break;
|
||||
|
||||
case SUCCESS:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.green_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_done_white_24dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.green_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_done_white_24dp, null);
|
||||
break;
|
||||
|
||||
case WARNING:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.yellow_600);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_warning_white_24dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.yellow_600);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_warning_white_24dp, null);
|
||||
break;
|
||||
|
||||
case ERROR:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.red_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_mood_bad_24dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.red_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_mood_bad_24dp, null);
|
||||
break;
|
||||
}
|
||||
|
||||
this.positiveButtonText = mContext.getText(R.string.ok).toString();
|
||||
this.negativeButtonText = mContext.getText(R.string.no).toString();
|
||||
this.positiveButtonText = requireContext().getText(R.string.ok).toString();
|
||||
this.negativeButtonText = requireContext().getText(R.string.no).toString();
|
||||
|
||||
//Title VIEW
|
||||
mBindings.titleText.setText(mTitleText);
|
||||
ColorStateList colorStateList = ColorStateList.valueOf(Color.WHITE);
|
||||
ColorStateList colorStateList = ColorStateList.valueOf(colorBackgroundTitle);
|
||||
mBindings.titleIcon.setImageTintList(colorStateList);
|
||||
mBindings.titleIcon.setImageDrawable(titleIconRes);
|
||||
|
||||
mBindings.titleContainer.setBackgroundColor(colorBackgroundTitle);
|
||||
// mBindings.titleContainer.setBackgroundColor(colorBackgroundTitle);
|
||||
|
||||
//Content View
|
||||
mBindings.descriptionText.setText(mMessageText);
|
||||
@ -161,15 +181,15 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
String currentKey = mHashmapContent.keySet().toArray()[i].toString();
|
||||
String currentValue = mHashmapContent.get(currentKey);
|
||||
|
||||
RelativeLayout singleMapContent = (RelativeLayout) inflater.inflate(R.layout.dialog_custom_content_hashmap_viewmodel, hashMapContainer);
|
||||
RelativeLayout singleMapContent = (RelativeLayout) LayoutInflater.from(requireContext()).inflate(R.layout.dialog_custom_content_hashmap_viewmodel, hashMapContainer);
|
||||
((TextView) singleMapContent.findViewById(R.id.dialog_content_hashmap_key)).setText(currentKey);
|
||||
((TextView) singleMapContent.findViewById(R.id.dialog_content_hashmap_value)).setText(currentValue);
|
||||
|
||||
hashMapContainer.addView(singleMapContent);
|
||||
}
|
||||
} else {
|
||||
hashMapContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
|
||||
@ -191,7 +211,7 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
}
|
||||
|
||||
public String getNeutralButtonText() {
|
||||
return mRNeutralButtonString != null && mRNeutralButtonString != -1 ? mContext.getText(mRNeutralButtonString).toString() : null;
|
||||
return mRNeutralButtonString != null && mRNeutralButtonString != -1 ? requireContext().getText(mRNeutralButtonString).toString() : null;
|
||||
}
|
||||
|
||||
public String getNegativeButtonText() {
|
||||
@ -200,17 +220,17 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
|
||||
public void onPositiveClick() {
|
||||
dismiss();
|
||||
if(mOnPositiveClick != null) mOnPositiveClick.run();
|
||||
if (mOnPositiveClick != null) mOnPositiveClick.run();
|
||||
}
|
||||
|
||||
public void onNeutralClick() {
|
||||
dismiss();
|
||||
if(mOnNeutralClick != null) mOnNeutralClick.run();
|
||||
if (mOnNeutralClick != null) mOnNeutralClick.run();
|
||||
}
|
||||
|
||||
public void onNegativeClick() {
|
||||
dismiss();
|
||||
if(mOnNegativeClick != null) mOnNegativeClick.run();
|
||||
if (mOnNegativeClick != null) mOnNegativeClick.run();
|
||||
}
|
||||
|
||||
public static DialogSimpleMessageView makeInfoDialog(String titleText, Spanned messageText, HashMap<String, String> hashmapContent, Runnable onPositiveClick) {
|
||||
|
||||
@ -22,14 +22,14 @@ import it.integry.integrywmsnative.databinding.DialogBasketLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1.DialogBasketLU_Page1_ViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page2.DialogBasketLU_Page2_ViewModel;
|
||||
|
||||
public class DialogBasketLU extends BaseDialogFragment {
|
||||
public class DialogBasketLUView extends BaseDialogFragment {
|
||||
|
||||
private final RunnableArgs<MtbColt> mOnComplete;
|
||||
private DialogBasketLuBinding mBindings;
|
||||
|
||||
|
||||
|
||||
public DialogBasketLU(RunnableArgs<MtbColt> onComplete) {
|
||||
public DialogBasketLUView(RunnableArgs<MtbColt> onComplete) {
|
||||
mOnComplete = onComplete;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.databinding.DialogScanOrCreateLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.DialogBasketLU;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.DialogBasketLUView;
|
||||
|
||||
public class DialogScanOrCreateLUView extends BaseDialogFragment implements DialogScanOrCreateLUViewModel.Listener {
|
||||
|
||||
@ -98,7 +98,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
});
|
||||
|
||||
mBindings.viewBasket.setOnClickListener(v -> {
|
||||
new DialogBasketLU(mtbColt -> {
|
||||
new DialogBasketLUView(mtbColt -> {
|
||||
onLUOpened(mtbColt, false);
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
|
||||
@ -1,68 +1,67 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.yes_no;
|
||||
|
||||
import android.content.Context;
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogYesNoBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
|
||||
public class DialogYesNoView extends MaterialAlertDialogBuilder {
|
||||
public class DialogYesNoView extends DialogFragment {
|
||||
|
||||
private final String title;
|
||||
private final String description;
|
||||
private final RunnableArgs<DialogConsts.Results> onDialogDismiss;
|
||||
|
||||
public DialogYesNoView(final String title, final String description, RunnableArgs<DialogConsts.Results> onDialogDismiss) {
|
||||
super();
|
||||
|
||||
public DialogYesNoView(Context context, final String title, final String description, RunnableArgs<DialogConsts.Results> onDialogDismiss) {
|
||||
super(context);
|
||||
|
||||
var binding = DialogYesNoBinding.inflate(LayoutInflater.from(context));
|
||||
// binding.setView(this);
|
||||
|
||||
binding.executePendingBindings();
|
||||
|
||||
// this.qtaResidua.set(qtaResidua);
|
||||
|
||||
this.setTitle(title);
|
||||
this.setMessage(description);
|
||||
// this.setView(binding.getRoot());
|
||||
|
||||
this.setPositiveButton("Ok", (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.YES);
|
||||
});
|
||||
|
||||
this.setNegativeButton("Annulla", (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.NO);
|
||||
});
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.onDialogDismiss = onDialogDismiss;
|
||||
}
|
||||
|
||||
// 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();
|
||||
// });
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
var binding = DialogYesNoBinding.inflate(LayoutInflater.from(requireContext()));
|
||||
binding.executePendingBindings();
|
||||
|
||||
if(UtilityString.isNullOrEmpty(title)) {
|
||||
binding.titleText.setVisibility(View.GONE);
|
||||
binding.descriptionText.setTextAppearance(requireContext(), R.style.TextAppearance_Material3_BodyLarge);
|
||||
} else {
|
||||
binding.titleText.setText(title);
|
||||
binding.titleText.setVisibility(View.VISIBLE);
|
||||
binding.descriptionText.setTextAppearance(requireContext(), R.style.TextAppearance_Material3_BodyMedium);
|
||||
}
|
||||
|
||||
binding.descriptionText.setText(description);
|
||||
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(binding.getRoot())
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Ok", (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.YES);
|
||||
})
|
||||
.setNegativeButton("Annulla", (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.NO);
|
||||
})
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,58 +17,40 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/title_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/green_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/title_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:src="@drawable/ic_error_white_24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
android:id="@id/title_icon"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/base_buttons_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="Title here" />
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextViewMaterial"
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="left"
|
||||
tools:text="Description here" />
|
||||
|
||||
|
||||
@ -76,203 +58,202 @@
|
||||
android:id="@+id/dialog_content_hashmap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp">
|
||||
android:paddingHorizontal="12dp" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/center_guideline"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.5" />-->
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.OutlinedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.onNegativeClick()}"-->
|
||||
<!-- android:text="@{view.negativeButtonText}"-->
|
||||
<!-- tools:text="Neutral"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/center_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNegativeClick()}"
|
||||
android:text="@{view.negativeButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/center_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{!view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/ok_left_buttons_guideline"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.25" />-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{!view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/ok_right_buttons_guideline"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.75" />-->
|
||||
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@id/ok_right_buttons_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/ok_left_buttons_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/ok_left_buttons_guideline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.25" />
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/ok_right_buttons_guideline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.75" />
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/left_buttons_guideline"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.33" />-->
|
||||
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="@id/ok_right_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="@id/ok_left_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/right_buttons_guideline"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.66" />-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/left_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.33" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/right_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.66" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Button.DangerFull"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Negative"-->
|
||||
<!-- android:onClick="@{() -> view.onNegativeClick()}"-->
|
||||
<!-- android:text="@{view.negativeButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.DangerFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNegativeClick()}"
|
||||
android:text="@{view.negativeButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.OutlinedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Neutral"-->
|
||||
<!-- android:onClick="@{() -> view.onNeutralClick()}"-->
|
||||
<!-- android:text="@{view.neutralButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:strokeColor="@color/colorPrimary" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNeutralClick()}"
|
||||
android:text="@{view.neutralButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/right_buttons_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/right_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{!view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/center_guideline2"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.5" />-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{!view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_guideline2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.OutlinedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Neutral"-->
|
||||
<!-- android:onClick="@{() -> view.onNeutralClick()}"-->
|
||||
<!-- android:text="@{view.neutralButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/center_guideline2"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:strokeColor="@color/colorPrimary" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNeutralClick()}"
|
||||
android:text="@{view.neutralButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/center_guideline2"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline2"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@ -8,101 +8,42 @@
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/green_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
android:layout_margin="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="Title here"
|
||||
android:gravity="center_horizontal"/>
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="Title here" />
|
||||
|
||||
<TextView
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="Description here"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Description here" />
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_no"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
android:text="@string/no"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_yes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/yes"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@ -91,20 +91,20 @@
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="300dp"
|
||||
app:layout_constraintHeight_max="280dp"
|
||||
app:layout_constraintHeight_min="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/layout_filter_gruppo_merc__list_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save_btn"
|
||||
style="@style/Button.PrimaryFull"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:singleClick="@{() -> view.onConfirm()}" />
|
||||
|
||||
@ -16,21 +16,21 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
android:onClick="@{() -> item.selected.toggle()}"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_height="36dp"
|
||||
android:clickable="false"
|
||||
android:enabled="@{item.enabled}"
|
||||
app:checked="@{item.selected}"
|
||||
android:clickable="false"/>
|
||||
app:checked="@{item.selected}" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{item.enabled}"
|
||||
@ -51,7 +51,7 @@
|
||||
android:clickable="false" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" - "
|
||||
@ -61,7 +61,7 @@
|
||||
android:clickable="false" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{item.enabled}"
|
||||
|
||||
@ -25,8 +25,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_marginEnd="16dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
@ -91,20 +90,20 @@
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="300dp"
|
||||
app:layout_constraintHeight_max="280dp"
|
||||
app:layout_constraintHeight_min="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/layout_filter_numero_ordine__list_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save_btn"
|
||||
style="@style/Button.PrimaryFull"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:singleClick="@{() -> view.onConfirm()}" />
|
||||
|
||||
@ -5,7 +5,9 @@
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
@ -16,42 +18,34 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
android:onClick="@{() -> item.selected.toggle()}"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_height="36dp"
|
||||
android:clickable="false"
|
||||
android:enabled="@{item.enabled}"
|
||||
app:checked="@{item.selected}"
|
||||
android:clickable="false"/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="false">
|
||||
app:checked="@{item.selected}" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:enabled="@{item.enabled}"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@{item.originalModel.toString()}"
|
||||
tools:text="01"
|
||||
android:clickable="false" />
|
||||
tools:text="01" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</layout>
|
||||
@ -33,7 +33,7 @@
|
||||
<item name="iconTint">@color/red_400</item>
|
||||
</style>
|
||||
|
||||
<style name="Button.DangerFull" parent="Widget.MaterialComponents.Button.UnelevatedButton">
|
||||
<style name="Button.DangerFull" parent="Widget.Material3.Button.UnelevatedButton">
|
||||
<!-- <item name="fontFamily">@font/product_sans_regular</item> <!– target android sdk versions < 26 and > 14 if theme other than AppCompat –>-->
|
||||
<!-- <item name="android:textStyle">bold</item>-->
|
||||
<!-- <item name="android:textAllCaps">false</item>-->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user