Fix UI Dark.
Fix separatore virgola nel dialog input quantity.
This commit is contained in:
parent
24d90b58f9
commit
cff52140bd
@ -11,6 +11,7 @@ import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.ColorRes;
|
||||
import androidx.appcompat.widget.AppCompatCheckBox;
|
||||
@ -37,6 +38,8 @@ import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
@ -45,6 +48,7 @@ import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.LocaleDecimalKeyListener;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
@ -975,4 +979,64 @@ public class Converters {
|
||||
view.setLayoutParams(layoutParams);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* BindingAdapter per bindare una LocalDate diretta su una TextView con un formato specificato.
|
||||
* Esempio di utilizzo in XML:
|
||||
* app:localDateText="@{myLocalDate}" app:dateFormat="@{@string/my_date_format}"
|
||||
*/
|
||||
@BindingAdapter(value = {"localDateText", "dateFormat"}, requireAll = false)
|
||||
public static void bindLocalDateText(TextView view, LocalDate date, String dateFormat) {
|
||||
if (date == null) {
|
||||
view.setText("");
|
||||
return;
|
||||
}
|
||||
String pattern = dateFormat != null ? dateFormat : "dd/MM/yyyy";
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||
view.setText(date.format(formatter));
|
||||
}
|
||||
|
||||
@BindingAdapter(value = {"localDateTimeText", "dateFormat"}, requireAll = false)
|
||||
public static void bindLocalDateText(TextView view, LocalDateTime date, String dateFormat) {
|
||||
if (date == null) {
|
||||
view.setText("");
|
||||
return;
|
||||
}
|
||||
String pattern = dateFormat != null ? dateFormat : "dd/MM/yyyy hh:mm";
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||
view.setText(date.format(formatter));
|
||||
}
|
||||
|
||||
/**
|
||||
* BindingAdapter per bindare una ObservableField<LocalDate> su una TextView con un formato specificato.
|
||||
* Esempio di utilizzo in XML:
|
||||
* app:localDateObservableText="@{myObservableLocalDate}" app:dateFormat="@{@string/my_date_format}"
|
||||
*/
|
||||
@BindingAdapter(value = {"localDateObservableText", "dateFormat"}, requireAll = false)
|
||||
public static void bindObservableLocalDateText(TextView view, ObservableField<LocalDate> observableDate, String dateFormat) {
|
||||
if (observableDate == null) {
|
||||
view.setText("");
|
||||
return;
|
||||
}
|
||||
LocalDate date = observableDate.get();
|
||||
if (date == null) {
|
||||
view.setText("");
|
||||
return;
|
||||
}
|
||||
String pattern = dateFormat != null ? dateFormat : "dd/MM/yyyy";
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||
view.setText(date.format(formatter));
|
||||
}
|
||||
|
||||
/**
|
||||
* BindingAdapter che applica automaticamente il KeyListener localizzato
|
||||
* ai campi con inputType numberDecimal, permettendo l'uso della virgola
|
||||
* come separatore decimale in base al locale del dispositivo.
|
||||
*/
|
||||
@BindingAdapter("useLocaleDecimalInput")
|
||||
public static void setLocaleDecimalInput(EditText view, boolean useLocaleInput) {
|
||||
if (useLocaleInput) {
|
||||
view.setKeyListener(LocaleDecimalKeyListener.getInstance());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1 @@
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
package it.integry.integrywmsnative.core.utility;
|
||||
|
||||
import android.text.method.DigitsKeyListener;
|
||||
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* KeyListener personalizzato che accetta numeri decimali
|
||||
* usando il separatore decimale del locale corrente (virgola per italiano)
|
||||
*/
|
||||
public class LocaleDecimalKeyListener {
|
||||
|
||||
/**
|
||||
* Ottiene un'istanza del KeyListener per il locale corrente
|
||||
*/
|
||||
public static DigitsKeyListener getInstance() {
|
||||
return getInstance(Locale.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
* Ottiene un'istanza del KeyListener per un locale specifico
|
||||
*/
|
||||
public static DigitsKeyListener getInstance(Locale locale) {
|
||||
DecimalFormatSymbols symbols = new DecimalFormatSymbols(locale);
|
||||
char decimalSeparator = symbols.getDecimalSeparator();
|
||||
return DigitsKeyListener.getInstance("0123456789" + decimalSeparator);
|
||||
}
|
||||
}
|
||||
@ -3,9 +3,15 @@ package it.integry.integrywmsnative.core.utility;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.util.TypedValue;
|
||||
|
||||
import androidx.annotation.AttrRes;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.ColorRes;
|
||||
import androidx.annotation.RawRes;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@ -69,4 +75,23 @@ public class UtilityResources {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Funzione di utilità per ottenere un colore da un attributo del tema
|
||||
public static @ColorRes int getColorResourceFromAttr(Context context, @AttrRes int attrRes) {
|
||||
TypedValue typedValue = new TypedValue();
|
||||
context.getTheme().resolveAttribute(attrRes, typedValue, true);
|
||||
return typedValue.data;
|
||||
}
|
||||
|
||||
public static @ColorInt int getColorFromAttr(Context context, @AttrRes int attrRes) {
|
||||
return ContextCompat.getColor(context, getColorResourceFromAttr(context, attrRes));
|
||||
}
|
||||
|
||||
public static ColorStateList getColorStateListFromAttr(Context context, @AttrRes int attrRes) {
|
||||
return ColorStateList.valueOf(getColorResourceFromAttr(context, attrRes));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ public class AccettazioneBollaPickingListAdapter extends SectionedRecyclerViewAd
|
||||
} else if (position % 2 == 1) {
|
||||
holder.mBinding.getRoot().setBackgroundColor(Color.WHITE);
|
||||
} else {
|
||||
holder.mBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBG));
|
||||
holder.mBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBGLight));
|
||||
}
|
||||
|
||||
holder.mBinding.deactivatedOverBg.setVisibility(!pickingObjectDTO.isActive() ? View.VISIBLE : View.GONE);
|
||||
|
||||
@ -114,7 +114,7 @@ public class AccettazioneOrdiniPickingListAdapter extends SectionedRecyclerViewA
|
||||
} else if (position % 2 == 1) {
|
||||
holder.mBinding.getRoot().setBackgroundColor(Color.WHITE);
|
||||
} else {
|
||||
holder.mBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBG));
|
||||
holder.mBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBGLight));
|
||||
}
|
||||
|
||||
holder.mBinding.deactivatedOverBg.setVisibility(!pickingObjectDTO.isActive() ? View.VISIBLE : View.GONE);
|
||||
|
||||
@ -251,6 +251,9 @@ public class OrdiniUscitaElencoFiltroViewModel {
|
||||
.distinct()
|
||||
.toList();
|
||||
|
||||
if(codMdeps.isEmpty())
|
||||
return new ArrayList<>();
|
||||
|
||||
return Stream.of(Objects.requireNonNull(mtbDepoFullList))
|
||||
.filter(x -> codMdeps.contains(x.getCodMdep()))
|
||||
.distinct()
|
||||
|
||||
@ -102,7 +102,7 @@ public class PickingResiListAdapter extends SectionedRecyclerViewAdapter<Picking
|
||||
} else if (position % 2 == 1) {
|
||||
holder.mBinding.getRoot().setBackgroundColor(Color.WHITE);
|
||||
} else {
|
||||
holder.mBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBG));
|
||||
holder.mBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBGLight));
|
||||
}
|
||||
|
||||
holder.mBinding.deactivatedOverBg.setVisibility(!pickingResiListModel.isActive() ? View.VISIBLE : View.GONE);
|
||||
|
||||
@ -30,6 +30,7 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.SpedizioneMainListGroupHeaderBinding;
|
||||
import it.integry.integrywmsnative.databinding.SpedizioneMainListGroupItemBinding;
|
||||
@ -123,9 +124,9 @@ public class SpedizioneListAdapter extends SectionedRecyclerViewAdapter<Spedizio
|
||||
} else if (pickingObjectDTO.getQtaEvasa().floatValue() > 0) {
|
||||
holder.mBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.orange_600_with_alpha));
|
||||
} else if (position % 2 == 1) {
|
||||
holder.mBinding.getRoot().setBackgroundColor(Color.WHITE);
|
||||
holder.mBinding.getRoot().setBackgroundColor(0);
|
||||
} else {
|
||||
holder.mBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBG));
|
||||
holder.mBinding.getRoot().setBackgroundColor(UtilityResources.getColorResourceFromAttr(mContext, R.attr.colorLetturaFacilitataSurface));
|
||||
}
|
||||
|
||||
holder.mBinding.deactivatedOverBg.setVisibility(!pickingObjectDTO.isActive() ? View.VISIBLE : View.GONE);
|
||||
@ -135,8 +136,10 @@ public class SpedizioneListAdapter extends SectionedRecyclerViewAdapter<Spedizio
|
||||
holder.mBinding.qtaEvasa.setTextColor(ResourcesCompat.getColor(mContext.getResources(), !pickingObjectDTO.isActive() ? R.color.gray_600 : R.color.green_700, null));
|
||||
|
||||
holder.mBinding.descrizione.setText(pickingObjectDTO.getDescrizione());
|
||||
holder.mBinding.descrizione.setTextColor(pickingObjectDTO.isDescrizionePresente() ? Color.BLACK : Color.GRAY);
|
||||
|
||||
if(pickingObjectDTO.isDescrizionePresente())
|
||||
holder.mBinding.descrizione.setTextColor(UtilityResources.getColorResourceFromAttr(mContext, android.R.attr.colorForeground));
|
||||
else
|
||||
holder.mBinding.descrizione.setTextColor(Color.GRAY);
|
||||
|
||||
holder.mBinding.badge1.setText(pickingObjectDTO.getBadge1());
|
||||
holder.mBinding.badge2.setText(pickingObjectDTO.getBadge2());
|
||||
|
||||
@ -91,7 +91,7 @@ public class BottomSheetFragmentLUContentListAdapter extends RecyclerView.Adapte
|
||||
holder.mViewDataBinding.executePendingBindings();
|
||||
|
||||
if (position % 2 == 1)
|
||||
holder.mViewDataBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBG));
|
||||
holder.mViewDataBinding.getRoot().setBackgroundColor(mContext.getResources().getColor(R.color.letturaFacilitataBGLight));
|
||||
|
||||
holder.mViewDataBinding.getRoot().setOnClickListener(new OnSingleClickListener() {
|
||||
@Override
|
||||
|
||||
@ -214,6 +214,8 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
|
||||
@ -218,7 +218,8 @@
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:textColor="@{ContextCompat.getColor(context, view.enabledQtaCnf ? android.R.color.black : R.color.gray_400)}"
|
||||
app:binding="@{view.currentPesoCollo}" />
|
||||
app:binding="@{view.currentPesoCollo}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@ -799,7 +799,8 @@
|
||||
android:hint="@string/qty_x_pck"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
app:binding="@{view.currentQtaCnf}" />
|
||||
app:binding="@{view.currentQtaCnf}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -822,7 +823,8 @@
|
||||
android:digits="0123456789"
|
||||
android:hint="@string/tot_qty"
|
||||
android:inputType="number"
|
||||
app:binding="@{view.currentQtaTot}" />
|
||||
app:binding="@{view.currentQtaTot}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -857,7 +859,8 @@
|
||||
android:hint="@string/tare_art"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/gray_400"
|
||||
app:binding="@{view.currentTaraArticolo}" />
|
||||
app:binding="@{view.currentTaraArticolo}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -881,7 +884,8 @@
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:textColor="@color/gray_400"
|
||||
app:binding="@{view.currentTaraTot}" />
|
||||
app:binding="@{view.currentTaraTot}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -904,7 +908,8 @@
|
||||
android:hint="@string/LU_weight"
|
||||
android:inputType="number"
|
||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }"
|
||||
app:binding="@{view.currentPesoLordo}" />
|
||||
app:binding="@{view.currentPesoLordo}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@ -20,7 +20,6 @@
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/full_white"
|
||||
android:fitsSystemWindows="false"
|
||||
tools:context=".gest.spedizione.SpedizioneActivity">
|
||||
|
||||
@ -44,7 +43,6 @@
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/full_white"
|
||||
android:minHeight="?attr/actionBarSize">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
@ -200,6 +198,7 @@
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:src="@drawable/ic_playlist_add_check_24dp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@ -207,7 +206,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/no_item_to_pick_text"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxLines="2"
|
||||
android:text="@string/select_batch_lot" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@ -75,8 +75,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:text="@{UtilityString.isNull(mtbPartitaMag.descrizione, "Nessuna descrizione")}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
|
||||
|
||||
|
||||
@ -258,7 +258,8 @@
|
||||
android:inputType="numberDecimal"
|
||||
android:nextFocusDown="@id/input_default_pos_text"
|
||||
android:singleLine="true"
|
||||
app:binding="@{viewmodel.qtaCnf}" />
|
||||
app:binding="@{viewmodel.qtaCnf}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@ -203,7 +203,8 @@
|
||||
android:hint="@string/kg_x_pck"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
app:binding="@{view.currentPesoCollo}" />
|
||||
app:binding="@{view.currentPesoCollo}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@ -623,6 +623,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
android:layout_width="wrap_content"
|
||||
@ -815,7 +816,8 @@
|
||||
android:inputType="numberDecimal"
|
||||
android:nextFocusForward="@+id/input_qta_tot_text"
|
||||
android:selectAllOnFocus="true"
|
||||
app:binding="@{view.currentQtaCnf}" />
|
||||
app:binding="@{view.currentQtaCnf}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -839,7 +841,8 @@
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:selectAllOnFocus="true"
|
||||
app:binding="@{view.currentQtaTot}" />
|
||||
app:binding="@{view.currentQtaTot}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -874,7 +877,8 @@
|
||||
android:hint="@string/tare_art"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/gray_400"
|
||||
app:binding="@{view.currentTaraArticolo}" />
|
||||
app:binding="@{view.currentTaraArticolo}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -898,7 +902,8 @@
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:textColor="@color/gray_400"
|
||||
app:binding="@{view.currentTaraTot}" />
|
||||
app:binding="@{view.currentTaraTot}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -921,7 +926,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/LU_weight"
|
||||
android:inputType="number"
|
||||
app:binding="@{view.currentPesoLordo}" />
|
||||
app:binding="@{view.currentPesoLordo}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@ -534,6 +534,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
android:layout_width="wrap_content"
|
||||
@ -665,7 +666,8 @@
|
||||
android:hint="@string/qty_x_pck"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
app:binding="@{view.currentQtaCnf}" />
|
||||
app:binding="@{view.currentQtaCnf}"
|
||||
app:useLocaleDecimalInput="@{true}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@ -48,7 +48,9 @@
|
||||
android:id="@+id/vendita_main_list"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/fragment_main_ordini_uscita__list_group_model"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ordini_vendita_empty_view"
|
||||
@ -90,14 +92,14 @@
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_playlist_add_check_24dp" />
|
||||
android:src="@drawable/ic_playlist_add_check_24dp"
|
||||
android:tint="?attr/colorControlNormal" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/no_orders_found_message"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<data>
|
||||
<import type="android.text.Html" />
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||
<import type="it.integry.integrywmsnative.core.di.BindableBoolean" />
|
||||
<variable
|
||||
name="selected"
|
||||
@ -15,7 +17,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingVertical="4dp">
|
||||
android:paddingVertical="8dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<!-- 2. Lo spazio di 8dp è ora gestito con constraint -->
|
||||
<View
|
||||
@ -38,55 +41,57 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<!-- 4. Descrizione principale a destra del checkbox -->
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:id="@+id/descrizione"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Ord. Ven. 39 del 27 ott 2017"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintStart_toEndOf="@id/checkbox"
|
||||
app:layout_constraintEnd_toStartOf="@id/right_descrizione"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"/>
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<!-- 5. Descrizione secondaria a destra del checkbox, sotto la principale -->
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.BodySmall"
|
||||
android:id="@+id/sub_descrizione"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginEnd="8dp"
|
||||
tools:text="TextView"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
app:layout_constraintStart_toStartOf="@id/descrizione"
|
||||
app:layout_constraintEnd_toStartOf="@id/right_sub_descrizione"
|
||||
app:layout_constraintTop_toBottomOf="@+id/descrizione"
|
||||
android:layout_marginEnd="8dp"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/descrizione"/>
|
||||
|
||||
<!-- 6. Right descrizione allineata a destra -->
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:id="@+id/right_descrizione"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Cons 07 nov 2018"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/descrizione" />
|
||||
|
||||
<!-- 7. Right sub-descrizione allineata a destra -->
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.BodySmall"
|
||||
android:id="@+id/right_sub_descrizione"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?attr/colorSecondaryContainer"
|
||||
android:textColor="?attr/colorOnSecondaryContainer"
|
||||
tools:text="Cod Jcom"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/right_descrizione"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/sub_descrizione" />
|
||||
app:layout_constraintTop_toBottomOf="@id/right_descrizione" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@ -5,8 +5,7 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/full_white">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/content_view_child"
|
||||
@ -63,7 +62,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
style="@android:style/TextAppearance.Medium"
|
||||
android:text=" / " />
|
||||
|
||||
@ -72,7 +70,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
tools:text="QTA" />
|
||||
|
||||
@ -81,7 +78,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:layout_gravity="center_vertical"
|
||||
@ -109,9 +105,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
style="@style/TextAppearance.Material3.BodyLarge"
|
||||
tools:text="DESCRIZIONE" />
|
||||
|
||||
<RelativeLayout
|
||||
@ -129,7 +123,6 @@
|
||||
android:id="@+id/subdescrizione1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
tools:text="SUB DESCRIZIONE" />
|
||||
|
||||
@ -138,7 +131,6 @@
|
||||
android:id="@+id/subdescrizione2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
tools:text="SUB DESCRIZIONE" />
|
||||
|
||||
@ -181,7 +173,7 @@
|
||||
android:layout_alignTop="@id/content_view_child"
|
||||
android:layout_alignBottom="@id/content_view_child"
|
||||
android:alpha="0.15"
|
||||
android:background="@android:color/black" />
|
||||
android:background="?attr/colorDisabledSurface" />
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
@ -27,5 +27,7 @@
|
||||
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
|
||||
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item>
|
||||
<item name="colorDisabledSurface">@android:color/white</item>
|
||||
<item name="colorLetturaFacilitataSurface">@color/letturaFacilitataBGDark</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@ -26,4 +26,18 @@
|
||||
<attr name="confirmTitle" format="string" />
|
||||
<attr name="confirmMessage" format="string" />
|
||||
</declare-styleable>
|
||||
|
||||
|
||||
<attr name="colorSuccess" format="color" />
|
||||
<attr name="colorSuccessContainer" format="color" />
|
||||
<attr name="colorOnSuccess" format="color" />
|
||||
<attr name="colorOnSuccessContainer" format="color" />
|
||||
|
||||
<attr name="colorWarning" format="color" />
|
||||
<attr name="colorWarningContainer" format="color" />
|
||||
<attr name="colorOnWarning" format="color" />
|
||||
<attr name="colorOnWarningContainer" format="color" />
|
||||
|
||||
<attr name="colorDisabledSurface" format="color" />
|
||||
<attr name="colorLetturaFacilitataSurface" format="color" />
|
||||
</resources>
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
<color name="md_theme_light_onPrimaryContainer">#08006C</color>
|
||||
<color name="md_theme_light_secondary">#0059C5</color>
|
||||
<color name="md_theme_light_onSecondary">#FFFFFF</color>
|
||||
<color name="md_theme_light_secondaryContainer">#D8E2FF</color>
|
||||
<color name="md_theme_light_onSecondaryContainer">#001A43</color>
|
||||
<color name="md_theme_light_secondaryContainer">#FFE0C2</color>
|
||||
<color name="md_theme_light_onSecondaryContainer">#4C2700</color>
|
||||
<color name="md_theme_light_tertiary">#795369</color>
|
||||
<color name="md_theme_light_onTertiary">#FFFFFF</color>
|
||||
<color name="md_theme_light_tertiaryContainer">#FFD8EC</color>
|
||||
@ -17,6 +17,14 @@
|
||||
<color name="md_theme_light_errorContainer">#FFDAD6</color>
|
||||
<color name="md_theme_light_onError">#FFFFFF</color>
|
||||
<color name="md_theme_light_onErrorContainer">#410002</color>
|
||||
<color name="md_theme_light_success">#006E1C</color>
|
||||
<color name="md_theme_light_successContainer">#D1FADF</color>
|
||||
<color name="md_theme_light_onSuccess">#FFFFFF</color>
|
||||
<color name="md_theme_light_onSuccessContainer">#00210A</color>
|
||||
<color name="md_theme_light_warning">#FFB300</color> <!-- Amber 700 -->
|
||||
<color name="md_theme_light_warningContainer">#FFF8E1</color> <!-- Amber 50 -->
|
||||
<color name="md_theme_light_onWarning">#212121</color> <!-- Grey 900 -->
|
||||
<color name="md_theme_light_onWarningContainer">#664400</color> <!-- Deep amber -->
|
||||
<color name="md_theme_light_background">#F6FEFF</color>
|
||||
<color name="md_theme_light_onBackground">#001F24</color>
|
||||
<color name="md_theme_light_surface">#F6FEFF</color>
|
||||
@ -46,6 +54,14 @@
|
||||
<color name="md_theme_dark_errorContainer">#93000A</color>
|
||||
<color name="md_theme_dark_onError">#690005</color>
|
||||
<color name="md_theme_dark_onErrorContainer">#FFDAD6</color>
|
||||
<color name="md_theme_dark_success">#5FF59C</color>
|
||||
<color name="md_theme_dark_successContainer">#00531A</color>
|
||||
<color name="md_theme_dark_onSuccess">#003915</color>
|
||||
<color name="md_theme_dark_onSuccessContainer">#85FFB8</color>
|
||||
<color name="md_theme_dark_warning">#FFD54F</color> <!-- Amber 300, più visibile su sfondo scuro -->
|
||||
<color name="md_theme_dark_warningContainer">#534300</color> <!-- Amber 900 -->
|
||||
<color name="md_theme_dark_onWarning">#332200</color> <!-- Molto scuro per testo su warning -->
|
||||
<color name="md_theme_dark_onWarningContainer">#FFF8E1</color> <!-- Amber 50 -->
|
||||
<color name="md_theme_dark_background">#001F24</color>
|
||||
<color name="md_theme_dark_onBackground">#97F0FF</color>
|
||||
<color name="md_theme_dark_surface">#001F24</color>
|
||||
|
||||
@ -13,7 +13,8 @@
|
||||
|
||||
<color name="mainGreen">@color/green_500</color>
|
||||
<color name="mainOrange">@color/orange_700</color>
|
||||
<color name="letturaFacilitataBG">#eeeeee</color>
|
||||
<color name="letturaFacilitataBGLight">#eeeeee</color>
|
||||
<color name="letturaFacilitataBGDark">#111111</color>
|
||||
|
||||
<!-- FAB DEFINITIONS -->
|
||||
<color name="black_semi_transparent">#B2000000</color>
|
||||
|
||||
@ -27,6 +27,8 @@
|
||||
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
|
||||
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
|
||||
<item name="colorDisabledSurface">@android:color/black</item>
|
||||
<item name="colorLetturaFacilitataSurface">@color/letturaFacilitataBGLight</item>
|
||||
|
||||
|
||||
<item name="android:fontFamily">@font/google_sans_regular</item>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user