Prima implementazione delle Ultime Consegne.
This commit is contained in:
parent
4aa8cef617
commit
82e21ccacb
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -102,7 +102,7 @@ dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.1.0-alpha05'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha5'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
|
||||
implementation 'androidx.preference:preference:1.1.0-alpha04'
|
||||
@ -140,6 +140,9 @@ dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'com.mikhaellopez:lazydatepicker:1.0.0'
|
||||
implementation 'com.github.demoNo:AutoScrollViewPager:v1.0.2'
|
||||
implementation 'com.github.zhukic:sectioned-recyclerview:1.2.3'
|
||||
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
||||
|
||||
//AppUpdate
|
||||
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
||||
//Barcode
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.di.binders;
|
||||
|
||||
import androidx.databinding.BindingAdapter;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
|
||||
public class RecyclerViewAdapterBinders {
|
||||
|
||||
|
||||
|
||||
// @BindingAdapter("app:adapter")
|
||||
// public static void setItems(RecyclerView recyclerView, Class clazz) {
|
||||
// setItems(recyclerView, null, clazz);
|
||||
// }
|
||||
//
|
||||
// @BindingAdapter("app:items")
|
||||
// public static <T> void setItems(RecyclerView recyclerView, ObservableArrayList<T> entries) {
|
||||
// setItems(recyclerView, entries, null);
|
||||
// }
|
||||
//
|
||||
// @BindingAdapter({"app:items", "app:adapter"})
|
||||
// public static <T> void setItems(RecyclerView recyclerView,
|
||||
// ObservableArrayList<T> entries, Class clazz) {
|
||||
//
|
||||
//// recyclerView.removeAllViews();
|
||||
//// if (entries != null) {
|
||||
//// LayoutInflater inflater = (LayoutInflater)
|
||||
//// viewGroup.getContext()
|
||||
//// .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
//// for (int i = 0; i < entries.size(); i++) {
|
||||
//// T entry = entries.get(i);
|
||||
//// ViewDataBinding bindings = DataBindingUtil
|
||||
//// .inflate(inflater, layoutId, viewGroup, true);
|
||||
//// bindings.setVariable(BR.data, entry);
|
||||
//// }
|
||||
//// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@ -16,6 +16,7 @@ public class UtilityDate {
|
||||
public static final String YMD_TIME_SLASH = YMD_SLASH + " hh:mm";
|
||||
|
||||
|
||||
public static final String DM_HUMAN = "dd MMM";
|
||||
public static final String DMY_HUMAN = "dd MMM yyyy";
|
||||
public static final String DMY_HUMAN_LONG = "dd MMMM yyyy";
|
||||
}
|
||||
|
||||
@ -217,10 +217,10 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
((MainActivity) getActivity()).setItem(R.id.nav_free_picking);
|
||||
}
|
||||
|
||||
// @OnClick(R.id.fast_button_resi_clienti)
|
||||
// public void onClickResiClientio(View view) {
|
||||
// ((MainActivity) getActivity()).setItem(R.id.nav_resi_cliente);
|
||||
// }
|
||||
@OnClick(R.id.fast_button_resi_clienti)
|
||||
public void onClickResiClientio(View view) {
|
||||
((MainActivity) getActivity()).setItem(R.id.nav_resi_cliente);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package it.integry.integrywmsnative.gest.ultime_consegne_cliente;
|
||||
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@ -12,16 +11,16 @@ import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteBinding;
|
||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.viewmodel.UltimeConsegneClienteViewModel;
|
||||
import it.integry.integrywmsnative.gest.vendita.rest.UltimeConsegneClienteRESTConsumer;
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
|
||||
public class UltimeConsegneClienteFragment extends Fragment implements ITitledFragment {
|
||||
public class UltimeConsegneClienteFragment extends Fragment implements ITitledFragment, IScrollableFragment {
|
||||
|
||||
private Runnable mOnPreDestroy;
|
||||
private ElevatedToolbar mToolbar;
|
||||
|
||||
public UltimeConsegneClienteFragment() {
|
||||
// Required empty public constructor
|
||||
@ -42,14 +41,32 @@ public class UltimeConsegneClienteFragment extends Fragment implements ITitledFr
|
||||
|
||||
FragmentMainUltimeConsegneClienteBinding mBinding = DataBindingUtil.inflate(LayoutInflater.from(getActivity()), R.layout.fragment_main_ultime_consegne_cliente, container, false);
|
||||
|
||||
mBinding.setViewmodel(new UltimeConsegneClienteViewModel(getActivity()));
|
||||
mBinding.setViewmodel(new UltimeConsegneClienteViewModel(getActivity(), mBinding));
|
||||
|
||||
mToolbar.setRecyclerView(mBinding.recyclerView);
|
||||
|
||||
// Inflate the layout for this fragment
|
||||
return mBinding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if(mOnPreDestroy != null) mOnPreDestroy.run();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||
titleText.setText(context.getText(R.string.fragment_ultime_consegne_cliente_title).toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnPreDestroy(Runnable onPreDestroy) {
|
||||
mOnPreDestroy = onPreDestroy;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
package it.integry.integrywmsnative.gest.ultime_consegne_cliente.dto;
|
||||
|
||||
import androidx.databinding.Observable;
|
||||
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
||||
|
||||
public class CheckableConsegnaClienteDTO {
|
||||
|
||||
private ConsegnaClienteDTO mItem;
|
||||
private BindableBoolean checked = new BindableBoolean(false);
|
||||
|
||||
public CheckableConsegnaClienteDTO(ConsegnaClienteDTO item) {
|
||||
this.mItem = item;
|
||||
}
|
||||
|
||||
public ConsegnaClienteDTO getItem() {
|
||||
return mItem;
|
||||
}
|
||||
|
||||
public CheckableConsegnaClienteDTO setItem(ConsegnaClienteDTO item) {
|
||||
this.mItem = item;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BindableBoolean getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public boolean isChecked() {
|
||||
return checked.get();
|
||||
}
|
||||
|
||||
public CheckableConsegnaClienteDTO setChecked(BindableBoolean checked) {
|
||||
this.checked = checked;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckableConsegnaClienteDTO setCheckedValue(boolean value) {
|
||||
this.checked.set(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void toggleCheck() {
|
||||
this.checked.set(!this.checked.get());
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package it.integry.integrywmsnative.gest.vendita.rest;
|
||||
package it.integry.integrywmsnative.gest.ultime_consegne_cliente.rest;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
@ -15,7 +15,7 @@ import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
||||
|
||||
public class UltimeConsegneClienteRESTConsumer {
|
||||
|
||||
public static void getUltimeConsegneClienti(String codMdep, String codAnag, String codMart, RunnableArgs<List<ConsegnaClienteDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public static void getUltimeConsegneClienti(String codMdep, String codAnag, String codMart, RunnableArgs<ArrayList<ConsegnaClienteDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
int numberOfConsegnePerCli = 10;
|
||||
int numberOfDayToAnalyze = 90;
|
||||
@ -29,14 +29,14 @@ public class UltimeConsegneClienteRESTConsumer {
|
||||
UtilityDB.valueToString(codMdep) + ", " +
|
||||
UtilityDB.valueToString(numberOfDayToAnalyze) + ") consegne " +
|
||||
"LEFT OUTER JOIN gtb_anag ON consegne.cod_anag = gtb_anag.cod_anag " +
|
||||
"ORDER BY consegne.cod_anag, " +
|
||||
"ORDER BY rag_soc, " +
|
||||
" counter_consegna ";
|
||||
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<ConsegnaClienteDTO>>() {}.getType();
|
||||
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<List<ConsegnaClienteDTO>>() {
|
||||
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<ConsegnaClienteDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(List<ConsegnaClienteDTO> value) {
|
||||
public void onSuccess(ArrayList<ConsegnaClienteDTO> value) {
|
||||
if(onComplete != null) onComplete.run(value);
|
||||
}
|
||||
|
||||
@ -2,24 +2,36 @@ package it.integry.integrywmsnative.gest.ultime_consegne_cliente.viewmodel;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.gest.vendita.rest.UltimeConsegneClienteRESTConsumer;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteBinding;
|
||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.rest.UltimeConsegneClienteRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
||||
|
||||
public class UltimeConsegneClienteViewModel {
|
||||
|
||||
private Context mContext;
|
||||
private FragmentMainUltimeConsegneClienteBinding mBinding;
|
||||
|
||||
public UltimeConsegneClienteViewModel(Context context) {
|
||||
public UltimeConsegneClienteViewModel(Context context, FragmentMainUltimeConsegneClienteBinding binding) {
|
||||
this.mContext = context;
|
||||
this.mBinding = binding;
|
||||
|
||||
this.initList();
|
||||
}
|
||||
|
||||
|
||||
private void initList() {
|
||||
|
||||
ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
|
||||
UltimeConsegneClienteRESTConsumer.getUltimeConsegneClienti(
|
||||
@ -27,10 +39,29 @@ public class UltimeConsegneClienteViewModel {
|
||||
null,
|
||||
null,
|
||||
consegne -> {
|
||||
this.initDataAdapter(consegne);
|
||||
|
||||
progressDialog.dismiss();
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||
});
|
||||
}
|
||||
|
||||
private void initDataAdapter(ArrayList<ConsegnaClienteDTO> dataset) {
|
||||
UltimeConsegneMainListAdapter adapter = new UltimeConsegneMainListAdapter(mContext, dataset);
|
||||
adapter.setOnItemClickListener(consegna -> {
|
||||
Toast.makeText(mContext, String.format("Selezionato doc n° %d del %s", consegna.getNumDoc(), consegna.getDataDoc()), Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
|
||||
mBinding.recyclerView.setHasFixedSize(true);
|
||||
|
||||
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
|
||||
mBinding.recyclerView.setAdapter(adapter);
|
||||
|
||||
mBinding.fastscroll.setRecyclerView(mBinding.recyclerView);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,210 @@
|
||||
package it.integry.integrywmsnative.gest.ultime_consegne_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteListHeaderBinding;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainUltimeConsegneClienteListSingleItemBinding;
|
||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.dto.CheckableConsegnaClienteDTO;
|
||||
import it.integry.integrywmsnative.gest.vendita.rest.model.ConsegnaClienteDTO;
|
||||
import it.integry.integrywmsnative.ui.fastscroll.SectionTitleProvider;
|
||||
|
||||
public class UltimeConsegneMainListAdapter extends SectionedRecyclerViewAdapter<UltimeConsegneMainListAdapter.SubheaderHolder, UltimeConsegneMainListAdapter.SingleItemViewHolder> implements SectionTitleProvider {
|
||||
|
||||
private Context mContext;
|
||||
private ArrayList<ConsegnaClienteDTO> mDataset;
|
||||
private ArrayList<String> mSectionTitleItems;
|
||||
|
||||
private OnItemClickListener onItemClickListener;
|
||||
|
||||
private TextDrawable.IShapeBuilder smallIconBuilder;
|
||||
private TextDrawable.IShapeBuilder mediumIconBuilder;
|
||||
private TextDrawable.IShapeBuilder largeIconBuilder;
|
||||
|
||||
@Override
|
||||
public String getSectionTitle(int position) {
|
||||
return this.mSectionTitleItems.get(position);
|
||||
}
|
||||
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onItemClicked(ConsegnaClienteDTO consegna);
|
||||
}
|
||||
|
||||
|
||||
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
FragmentMainUltimeConsegneClienteListHeaderBinding mBinding;
|
||||
|
||||
SubheaderHolder(FragmentMainUltimeConsegneClienteListHeaderBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.mBinding = binding;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class SingleItemViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
FragmentMainUltimeConsegneClienteListSingleItemBinding mBinding;
|
||||
|
||||
SingleItemViewHolder(FragmentMainUltimeConsegneClienteListSingleItemBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.mBinding = binding;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public UltimeConsegneMainListAdapter(Context context, ArrayList<ConsegnaClienteDTO> dataset) {
|
||||
super();
|
||||
this.mContext = context;
|
||||
this.mDataset = new ArrayList<>();
|
||||
this.mSectionTitleItems = new ArrayList<>();
|
||||
|
||||
Stream.of(dataset)
|
||||
.map(x -> x.getRagSoc())
|
||||
.distinct()
|
||||
.forEach(x -> {
|
||||
this.mSectionTitleItems.add(String.valueOf(x.charAt(0)));
|
||||
|
||||
Stream.of(dataset)
|
||||
.filter(y -> y.getRagSoc().equalsIgnoreCase(x))
|
||||
.forEach(y -> {
|
||||
this.mSectionTitleItems.add(String.valueOf(x.charAt(0)));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
this.mDataset = dataset;
|
||||
|
||||
smallIconBuilder = TextDrawable.builder()
|
||||
.beginConfig()
|
||||
.width(40)
|
||||
.height(40)
|
||||
.fontSize(24)
|
||||
.useFont(ResourcesCompat.getFont(mContext, R.font.product_sans_regular))
|
||||
.endConfig();
|
||||
|
||||
mediumIconBuilder = TextDrawable.builder()
|
||||
.beginConfig()
|
||||
.width(40)
|
||||
.height(40)
|
||||
.fontSize(20)
|
||||
.useFont(ResourcesCompat.getFont(mContext, R.font.product_sans_regular))
|
||||
.endConfig();
|
||||
|
||||
largeIconBuilder = TextDrawable.builder()
|
||||
.beginConfig()
|
||||
.width(40)
|
||||
.height(40)
|
||||
.fontSize(16)
|
||||
.useFont(ResourcesCompat.getFont(mContext, R.font.product_sans_regular))
|
||||
.endConfig();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SingleItemViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
|
||||
FragmentMainUltimeConsegneClienteListSingleItemBinding binding = DataBindingUtil.inflate(LayoutInflater.from(mContext), R.layout.fragment_main_ultime_consegne_cliente__list_single_item, parent, false);
|
||||
return new SingleItemViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubheaderHolder onCreateSubheaderViewHolder(ViewGroup parent, int viewType) {
|
||||
FragmentMainUltimeConsegneClienteListHeaderBinding binding = DataBindingUtil.inflate(LayoutInflater.from(mContext), R.layout.fragment_main_ultime_consegne_cliente__list_header, parent, false);
|
||||
return new SubheaderHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindItemViewHolder(final SingleItemViewHolder holder, final int position) {
|
||||
final ConsegnaClienteDTO consegna = this.mDataset.get(position);
|
||||
|
||||
holder.mBinding.descriptionMain.setText(UtilityString.isNullOrEmpty(consegna.getRifOrd()) ? "" : consegna.getRifOrd());
|
||||
|
||||
String numDoc = "" + consegna.getNumDoc();
|
||||
|
||||
if(numDoc.length() <= 2) {
|
||||
holder.mBinding.startIcon.setImageDrawable(smallIconBuilder.buildRound(numDoc, ContextCompat.getColor(mContext, R.color.colorPrimary)));
|
||||
} else if(numDoc.length() == 3) {
|
||||
holder.mBinding.startIcon.setImageDrawable(mediumIconBuilder.buildRound(numDoc, ContextCompat.getColor(mContext, R.color.colorPrimary)));
|
||||
} else if(numDoc.length() == 4) {
|
||||
holder.mBinding.startIcon.setImageDrawable(largeIconBuilder.buildRound(numDoc, ContextCompat.getColor(mContext, R.color.colorPrimary)));
|
||||
}
|
||||
|
||||
try {
|
||||
Date dataDoc = UtilityDate.recognizeDate(consegna.getDataDoc());
|
||||
|
||||
Calendar calendarNow = Calendar.getInstance(TimeZone.getDefault());
|
||||
Calendar calendarDataDoc = Calendar.getInstance(TimeZone.getDefault());
|
||||
calendarDataDoc.setTime(dataDoc);
|
||||
|
||||
String dataDocString = "";
|
||||
|
||||
if(calendarDataDoc.get(Calendar.YEAR) == calendarNow.get(Calendar.YEAR)) {
|
||||
dataDocString = UtilityDate.formatDate(dataDoc, UtilityDate.COMMONS_DATE_FORMATS.DM_HUMAN);
|
||||
} else {
|
||||
dataDocString = UtilityDate.formatDate(dataDoc, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN);
|
||||
}
|
||||
|
||||
holder.mBinding.date.setText(dataDocString);
|
||||
|
||||
|
||||
holder.mBinding.compilatoDa.setText(consegna.getCompilatoDa());
|
||||
holder.mBinding.compilatoDa.setVisibility(UtilityString.isNullOrEmpty(consegna.getCompilatoDa()) ? View.GONE : View.VISIBLE);
|
||||
} catch (Exception ex) {
|
||||
UtilityExceptions.defaultException(mContext, ex);
|
||||
}
|
||||
|
||||
holder.mBinding.getRoot().setOnClickListener(l -> {
|
||||
if(onItemClickListener != null) onItemClickListener.onItemClicked(consegna);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindSubheaderViewHolder(SubheaderHolder subheaderHolder, int nextItemPosition) {
|
||||
subheaderHolder.mBinding.title.setText(this.mDataset.get(nextItemPosition).getRagSoc());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPlaceSubheaderBetweenItems(int position) {
|
||||
|
||||
if(!this.mDataset.get(position).getCodAnag().equalsIgnoreCase(this.mDataset.get(position+1).getCodAnag())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemSize() {
|
||||
return this.mDataset.size();
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
}
|
||||
@ -9,6 +9,9 @@ public class ConsegnaClienteDTO {
|
||||
private String serDoc;
|
||||
private int numDoc;
|
||||
private String ragSoc;
|
||||
private String compilatoDa;
|
||||
private String rifOrd;
|
||||
private String dataord;
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
@ -72,4 +75,31 @@ public class ConsegnaClienteDTO {
|
||||
this.ragSoc = ragSoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCompilatoDa() {
|
||||
return compilatoDa;
|
||||
}
|
||||
|
||||
public ConsegnaClienteDTO setCompilatoDa(String compilatoDa) {
|
||||
this.compilatoDa = compilatoDa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRifOrd() {
|
||||
return rifOrd;
|
||||
}
|
||||
|
||||
public ConsegnaClienteDTO setRifOrd(String rifOrd) {
|
||||
this.rifOrd = rifOrd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDataord() {
|
||||
return dataord;
|
||||
}
|
||||
|
||||
public ConsegnaClienteDTO setDataord(String dataord) {
|
||||
this.dataord = dataord;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,294 @@
|
||||
package it.integry.integrywmsnative.ui.fastscroll;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.core.widget.TextViewCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.ui.fastscroll.viewprovider.DefaultScrollerViewProvider;
|
||||
import it.integry.integrywmsnative.ui.fastscroll.viewprovider.ScrollerViewProvider;
|
||||
|
||||
/**
|
||||
* Created by mklimczak on 28/07/15.
|
||||
*/
|
||||
public class FastScroller extends LinearLayout {
|
||||
|
||||
private static final int STYLE_NONE = -1;
|
||||
private final RecyclerViewScrollListener scrollListener = new RecyclerViewScrollListener(this);
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
private View bubble;
|
||||
private View handle;
|
||||
private TextView bubbleTextView;
|
||||
|
||||
private int bubbleOffset;
|
||||
private int handleColor;
|
||||
private int bubbleColor;
|
||||
private int bubbleTextAppearance;
|
||||
private int scrollerOrientation;
|
||||
|
||||
//TODO the name should be fixed, also check if there is a better way of handling the visibility, because this is somewhat convoluted
|
||||
private int maxVisibility;
|
||||
|
||||
private boolean manuallyChangingPosition;
|
||||
|
||||
private ScrollerViewProvider viewProvider;
|
||||
private SectionTitleProvider titleProvider;
|
||||
|
||||
public FastScroller(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public FastScroller(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public FastScroller(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setClipChildren(false);
|
||||
TypedArray style = context.obtainStyledAttributes(attrs, R.styleable.fastscroll__fastScroller, R.attr.fastscroll__style, 0);
|
||||
try {
|
||||
bubbleColor = style.getColor(R.styleable.fastscroll__fastScroller_fastscroll__bubbleColor, STYLE_NONE);
|
||||
handleColor = style.getColor(R.styleable.fastscroll__fastScroller_fastscroll__handleColor, STYLE_NONE);
|
||||
bubbleTextAppearance = style.getResourceId(R.styleable.fastscroll__fastScroller_fastscroll__bubbleTextAppearance, STYLE_NONE);
|
||||
} finally {
|
||||
style.recycle();
|
||||
}
|
||||
maxVisibility = getVisibility();
|
||||
setViewProvider(new DefaultScrollerViewProvider());
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables custom layout for {@link FastScroller}.
|
||||
* @param viewProvider A {@link ScrollerViewProvider} for the {@link FastScroller} to use when building layout.
|
||||
*/
|
||||
public void setViewProvider(ScrollerViewProvider viewProvider) {
|
||||
removeAllViews();
|
||||
this.viewProvider = viewProvider;
|
||||
viewProvider.setFastScroller(this);
|
||||
bubble = viewProvider.provideBubbleView(this);
|
||||
handle = viewProvider.provideHandleView(this);
|
||||
bubbleTextView = viewProvider.provideBubbleTextView();
|
||||
addView(bubble);
|
||||
addView(handle);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach the {@link FastScroller} to {@link RecyclerView}. Should be used after the adapter is set
|
||||
* to the {@link RecyclerView}. If the adapter implements SectionTitleProvider, the FastScroller
|
||||
* will show a bubble with title.
|
||||
* @param recyclerView A {@link RecyclerView} to attach the {@link FastScroller} to.
|
||||
*/
|
||||
public void setRecyclerView(RecyclerView recyclerView) {
|
||||
this.recyclerView = recyclerView;
|
||||
if(recyclerView.getAdapter() instanceof SectionTitleProvider) titleProvider = (SectionTitleProvider) recyclerView.getAdapter();
|
||||
recyclerView.addOnScrollListener(scrollListener);
|
||||
invalidateVisibility();
|
||||
recyclerView.setOnHierarchyChangeListener(new OnHierarchyChangeListener() {
|
||||
@Override
|
||||
public void onChildViewAdded(View parent, View child) {
|
||||
invalidateVisibility();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChildViewRemoved(View parent, View child) {
|
||||
invalidateVisibility();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the orientation of the {@link FastScroller}. The orientation of the {@link FastScroller}
|
||||
* should generally match the orientation of connected {@link RecyclerView} for good UX but it's not enforced.
|
||||
* Note: This method is overridden from {@link LinearLayout#setOrientation(int)} but for {@link FastScroller}
|
||||
* it has a totally different meaning.
|
||||
* @param orientation of the {@link FastScroller}. {@link #VERTICAL} or {@link #HORIZONTAL}
|
||||
*/
|
||||
@Override
|
||||
public void setOrientation(int orientation) {
|
||||
scrollerOrientation = orientation;
|
||||
//switching orientation, because orientation in linear layout
|
||||
//is something different than orientation of fast scroller
|
||||
super.setOrientation(orientation == HORIZONTAL ? VERTICAL : HORIZONTAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the background color of the bubble.
|
||||
* @param color Color in hex notation with alpha channel, e.g. 0xFFFFFFFF
|
||||
*/
|
||||
public void setBubbleColor(int color) {
|
||||
bubbleColor = color;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the background color of the handle.
|
||||
* @param color Color in hex notation with alpha channel, e.g. 0xFFFFFFFF
|
||||
*/
|
||||
public void setHandleColor(int color) {
|
||||
handleColor = color;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the text appearance of the bubble.
|
||||
* @param textAppearanceResourceId The id of the resource to be used as text appearance of the bubble.
|
||||
*/
|
||||
public void setBubbleTextAppearance(int textAppearanceResourceId){
|
||||
bubbleTextAppearance = textAppearanceResourceId;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a {@link it.integry.integrywmsnative.ui.fastscroll.RecyclerViewScrollListener.ScrollerListener}
|
||||
* to be notified of user scrolling
|
||||
* @param listener
|
||||
*/
|
||||
public void addScrollerListener(RecyclerViewScrollListener.ScrollerListener listener){
|
||||
scrollListener.addScrollerListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
super.onLayout(changed, l, t, r, b);
|
||||
|
||||
initHandleMovement();
|
||||
bubbleOffset = viewProvider.getBubbleOffset();
|
||||
|
||||
applyStyling(); //TODO this doesn't belong here, even if it works
|
||||
|
||||
if (!isInEditMode()) {
|
||||
//sometimes recycler starts with a defined scroll (e.g. when coming from saved state)
|
||||
scrollListener.updateHandlePosition(recyclerView);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void applyStyling() {
|
||||
if(bubbleColor!=STYLE_NONE) setBackgroundTint(bubbleTextView, bubbleColor);
|
||||
if(handleColor!=STYLE_NONE) setBackgroundTint(handle, handleColor);
|
||||
if(bubbleTextAppearance!=STYLE_NONE) TextViewCompat.setTextAppearance(bubbleTextView, bubbleTextAppearance);
|
||||
}
|
||||
|
||||
private void setBackgroundTint(View view, int color) {
|
||||
final Drawable background = DrawableCompat.wrap(view.getBackground());
|
||||
if(background==null) return;
|
||||
DrawableCompat.setTint(background.mutate(), color);
|
||||
Utils.setBackground(view, background);
|
||||
}
|
||||
|
||||
private void initHandleMovement() {
|
||||
handle.setOnTouchListener(new OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
requestDisallowInterceptTouchEvent(true);
|
||||
if (event.getAction() == MotionEvent.ACTION_DOWN || event.getAction() == MotionEvent.ACTION_MOVE) {
|
||||
if(titleProvider!=null && event.getAction() == MotionEvent.ACTION_DOWN) viewProvider.onHandleGrabbed();
|
||||
manuallyChangingPosition = true;
|
||||
float relativePos = getRelativeTouchPosition(event);
|
||||
setScrollerPosition(relativePos);
|
||||
setRecyclerViewPosition(relativePos);
|
||||
return true;
|
||||
} else if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
manuallyChangingPosition = false;
|
||||
if(titleProvider!=null) viewProvider.onHandleReleased();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private float getRelativeTouchPosition(MotionEvent event){
|
||||
if(isVertical()){
|
||||
float yInParent = event.getRawY() - Utils.getViewRawY(handle);
|
||||
return yInParent / (getHeight() - handle.getHeight());
|
||||
} else {
|
||||
float xInParent = event.getRawX() - Utils.getViewRawX(handle);
|
||||
return xInParent / (getWidth() - handle.getWidth());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisibility(int visibility) {
|
||||
maxVisibility = visibility;
|
||||
invalidateVisibility();
|
||||
}
|
||||
|
||||
private void invalidateVisibility() {
|
||||
if(
|
||||
recyclerView.getAdapter()==null ||
|
||||
recyclerView.getAdapter().getItemCount()==0 ||
|
||||
recyclerView.getChildAt(0)==null ||
|
||||
isRecyclerViewNotScrollable() ||
|
||||
maxVisibility != View.VISIBLE
|
||||
){
|
||||
super.setVisibility(INVISIBLE);
|
||||
} else {
|
||||
super.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isRecyclerViewNotScrollable() {
|
||||
if(isVertical()) {
|
||||
return recyclerView.getChildAt(0).getHeight() * recyclerView.getAdapter().getItemCount() <= recyclerView.getHeight();
|
||||
} else {
|
||||
return recyclerView.getChildAt(0).getWidth() * recyclerView.getAdapter().getItemCount() <= recyclerView.getWidth();
|
||||
}
|
||||
}
|
||||
|
||||
private void setRecyclerViewPosition(float relativePos) {
|
||||
if (recyclerView == null) return;
|
||||
int itemCount = recyclerView.getAdapter().getItemCount();
|
||||
int targetPos = (int) Utils.getValueInRange(0, itemCount - 1, (int) (relativePos * (float) itemCount));
|
||||
recyclerView.scrollToPosition(targetPos);
|
||||
if(titleProvider!=null && bubbleTextView!=null) bubbleTextView.setText(titleProvider.getSectionTitle(targetPos));
|
||||
}
|
||||
|
||||
void setScrollerPosition(float relativePos) {
|
||||
if(isVertical()) {
|
||||
bubble.setY(Utils.getValueInRange(
|
||||
0,
|
||||
getHeight() - bubble.getHeight(),
|
||||
relativePos * (getHeight() - handle.getHeight()) + bubbleOffset)
|
||||
);
|
||||
handle.setY(Utils.getValueInRange(
|
||||
0,
|
||||
getHeight() - handle.getHeight(),
|
||||
relativePos * (getHeight() - handle.getHeight()))
|
||||
);
|
||||
} else {
|
||||
bubble.setX(Utils.getValueInRange(
|
||||
0,
|
||||
getWidth() - bubble.getWidth(),
|
||||
relativePos * (getWidth() - handle.getWidth()) + bubbleOffset)
|
||||
);
|
||||
handle.setX(Utils.getValueInRange(
|
||||
0,
|
||||
getWidth() - handle.getWidth(),
|
||||
relativePos * (getWidth() - handle.getWidth()))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isVertical(){
|
||||
return scrollerOrientation == VERTICAL;
|
||||
}
|
||||
|
||||
boolean shouldUpdateHandlePosition() {
|
||||
return handle!=null && !manuallyChangingPosition && recyclerView.getChildCount() > 0;
|
||||
}
|
||||
|
||||
ScrollerViewProvider getViewProvider() {
|
||||
return viewProvider;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package it.integry.integrywmsnative.ui.fastscroll;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Michal on 04/08/16.
|
||||
* Responsible for updating the handle / bubble position when user scrolls the {@link android.support.v7.widget.RecyclerView}.
|
||||
*/
|
||||
public class RecyclerViewScrollListener extends RecyclerView.OnScrollListener {
|
||||
|
||||
private final FastScroller scroller;
|
||||
List<ScrollerListener> listeners = new ArrayList<>();
|
||||
int oldScrollState = RecyclerView.SCROLL_STATE_IDLE;
|
||||
|
||||
public RecyclerViewScrollListener(FastScroller scroller) {
|
||||
this.scroller = scroller;
|
||||
}
|
||||
|
||||
public void addScrollerListener(ScrollerListener listener){
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrollStateChanged(RecyclerView recyclerView, int newScrollState) {
|
||||
super.onScrollStateChanged(recyclerView, newScrollState);
|
||||
if(newScrollState==RecyclerView.SCROLL_STATE_IDLE && oldScrollState!=RecyclerView.SCROLL_STATE_IDLE){
|
||||
scroller.getViewProvider().onScrollFinished();
|
||||
} else if(newScrollState!=RecyclerView.SCROLL_STATE_IDLE && oldScrollState==RecyclerView.SCROLL_STATE_IDLE){
|
||||
scroller.getViewProvider().onScrollStarted();
|
||||
}
|
||||
oldScrollState = newScrollState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrolled(RecyclerView rv, int dx, int dy) {
|
||||
if(scroller.shouldUpdateHandlePosition()) {
|
||||
updateHandlePosition(rv);
|
||||
}
|
||||
}
|
||||
|
||||
void updateHandlePosition(RecyclerView rv) {
|
||||
float relativePos;
|
||||
if(rv != null) {
|
||||
if (scroller.isVertical()) {
|
||||
int offset = rv.computeVerticalScrollOffset();
|
||||
int extent = rv.computeVerticalScrollExtent();
|
||||
int range = rv.computeVerticalScrollRange();
|
||||
relativePos = offset / (float) (range - extent);
|
||||
} else {
|
||||
int offset = rv.computeHorizontalScrollOffset();
|
||||
int extent = rv.computeHorizontalScrollExtent();
|
||||
int range = rv.computeHorizontalScrollRange();
|
||||
relativePos = offset / (float) (range - extent);
|
||||
}
|
||||
scroller.setScrollerPosition(relativePos);
|
||||
notifyListeners(relativePos);
|
||||
}
|
||||
}
|
||||
|
||||
public void notifyListeners(float relativePos){
|
||||
for(ScrollerListener listener : listeners) listener.onScroll(relativePos);
|
||||
}
|
||||
|
||||
public interface ScrollerListener {
|
||||
void onScroll(float relativePos);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package it.integry.integrywmsnative.ui.fastscroll;
|
||||
|
||||
/**
|
||||
* Created by mklimczak on 31/07/15.
|
||||
*/
|
||||
public interface SectionTitleProvider{
|
||||
|
||||
/**
|
||||
* Should be implemented by the adapter of the RecyclerView.
|
||||
* Provides a text to be shown by the bubble, when RecyclerView reaches
|
||||
* the position. Usually the first letter of the text shown by the item
|
||||
* at this position.
|
||||
* @param position Position of the row in adapter
|
||||
* @return The text to be shown in the bubble
|
||||
*/
|
||||
String getSectionTitle(int position);
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package it.integry.integrywmsnative.ui.fastscroll;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* Created by mklimczak on 31/07/15.
|
||||
*/
|
||||
public class Utils {
|
||||
|
||||
public static float getViewRawY(View view) {
|
||||
int[] location = new int[2];
|
||||
location[0] = 0;
|
||||
location[1] = (int) view.getY();
|
||||
((View)view.getParent()).getLocationInWindow(location);
|
||||
return location[1];
|
||||
}
|
||||
|
||||
public static float getViewRawX(View view) {
|
||||
int[] location = new int[2];
|
||||
location[0] = (int) view.getX();
|
||||
location[1] = 0;
|
||||
((View)view.getParent()).getLocationInWindow(location);
|
||||
return location[0];
|
||||
}
|
||||
|
||||
public static float getValueInRange(float min, float max, float value) {
|
||||
float minimum = Math.max(min, value);
|
||||
return Math.min(minimum, max);
|
||||
}
|
||||
|
||||
public static void setBackground(View view, Drawable drawable){
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
view.setBackground(drawable);
|
||||
} else {
|
||||
view.setBackgroundDrawable(drawable);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package it.integry.integrywmsnative.ui.fastscroll.viewprovider;
|
||||
|
||||
/**
|
||||
* Created by Michal on 11/08/16.
|
||||
*/
|
||||
public class DefaultBubbleBehavior implements ViewBehavior {
|
||||
|
||||
private final VisibilityAnimationManager animationManager;
|
||||
|
||||
public DefaultBubbleBehavior(VisibilityAnimationManager animationManager) {
|
||||
this.animationManager = animationManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHandleGrabbed() {
|
||||
animationManager.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHandleReleased() {
|
||||
animationManager.hide();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrollStarted() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrollFinished() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package it.integry.integrywmsnative.ui.fastscroll.viewprovider;
|
||||
|
||||
import android.graphics.drawable.InsetDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.ui.fastscroll.Utils;
|
||||
|
||||
/**
|
||||
* Created by Michal on 05/08/16.
|
||||
*/
|
||||
public class DefaultScrollerViewProvider extends ScrollerViewProvider {
|
||||
|
||||
protected View bubble;
|
||||
protected View handle;
|
||||
|
||||
@Override
|
||||
public View provideHandleView(ViewGroup container) {
|
||||
handle = new View(getContext());
|
||||
|
||||
int verticalInset = getScroller().isVertical() ? 0 : getContext().getResources().getDimensionPixelSize(R.dimen.fastscroll__handle_inset);
|
||||
int horizontalInset = !getScroller().isVertical() ? 0 : getContext().getResources().getDimensionPixelSize(R.dimen.fastscroll__handle_inset);
|
||||
InsetDrawable handleBg = new InsetDrawable(ContextCompat.getDrawable(getContext(), R.drawable.fastscroll__default_handle), horizontalInset, verticalInset, horizontalInset, verticalInset);
|
||||
Utils.setBackground(handle, handleBg);
|
||||
|
||||
int handleWidth = getContext().getResources().getDimensionPixelSize(getScroller().isVertical() ? R.dimen.fastscroll__handle_clickable_width : R.dimen.fastscroll__handle_height);
|
||||
int handleHeight = getContext().getResources().getDimensionPixelSize(getScroller().isVertical() ? R.dimen.fastscroll__handle_height : R.dimen.fastscroll__handle_clickable_width);
|
||||
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(handleWidth, handleHeight);
|
||||
handle.setLayoutParams(params);
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View provideBubbleView(ViewGroup container) {
|
||||
bubble = LayoutInflater.from(getContext()).inflate(R.layout.fastscroll__default_bubble, container, false);
|
||||
return bubble;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextView provideBubbleTextView() {
|
||||
return (TextView) bubble;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBubbleOffset() {
|
||||
return (int) (getScroller().isVertical() ? ((float)handle.getHeight()/2f)-bubble.getHeight() : ((float)handle.getWidth()/2f)-bubble.getWidth());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ViewBehavior provideHandleBehavior() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ViewBehavior provideBubbleBehavior() {
|
||||
return new DefaultBubbleBehavior(new VisibilityAnimationManager.Builder(bubble).withPivotX(1f).withPivotY(1f).build());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package it.integry.integrywmsnative.ui.fastscroll.viewprovider;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import it.integry.integrywmsnative.ui.fastscroll.FastScroller;
|
||||
|
||||
/**
|
||||
* Created by Michal on 05/08/16.
|
||||
* Provides {@link View}s and their behaviors for the handle and bubble of the fastscroller.
|
||||
*/
|
||||
public abstract class ScrollerViewProvider {
|
||||
|
||||
private FastScroller scroller;
|
||||
private ViewBehavior handleBehavior;
|
||||
private ViewBehavior bubbleBehavior;
|
||||
|
||||
public void setFastScroller(FastScroller scroller){
|
||||
this.scroller = scroller;
|
||||
}
|
||||
|
||||
protected Context getContext(){
|
||||
return scroller.getContext();
|
||||
}
|
||||
|
||||
protected FastScroller getScroller() {
|
||||
return scroller;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param container The container {@link FastScroller} for the view to inflate properly.
|
||||
* @return A view which will be by the {@link FastScroller} used as a handle.
|
||||
*/
|
||||
public abstract View provideHandleView(ViewGroup container);
|
||||
|
||||
/**
|
||||
* @param container The container {@link FastScroller} for the view to inflate properly.
|
||||
* @return A view which will be by the {@link FastScroller} used as a bubble.
|
||||
*/
|
||||
public abstract View provideBubbleView(ViewGroup container);
|
||||
|
||||
/**
|
||||
* Bubble view has to provide a {@link TextView} that will show the index title.
|
||||
* @return A {@link TextView} that will hold the index title.
|
||||
*/
|
||||
public abstract TextView provideBubbleTextView();
|
||||
|
||||
/**
|
||||
* To offset the position of the bubble relative to the handle. E.g. in {@link DefaultScrollerViewProvider}
|
||||
* the sharp corner of the bubble is aligned with the center of the handle.
|
||||
* @return the position of the bubble in relation to the handle (according to the orientation).
|
||||
*/
|
||||
public abstract int getBubbleOffset();
|
||||
|
||||
@Nullable
|
||||
protected abstract ViewBehavior provideHandleBehavior();
|
||||
|
||||
@Nullable
|
||||
protected abstract ViewBehavior provideBubbleBehavior();
|
||||
|
||||
protected ViewBehavior getHandleBehavior(){
|
||||
if(handleBehavior==null) handleBehavior = provideHandleBehavior();
|
||||
return handleBehavior;
|
||||
}
|
||||
|
||||
protected ViewBehavior getBubbleBehavior(){
|
||||
if(bubbleBehavior==null) bubbleBehavior = provideBubbleBehavior();
|
||||
return bubbleBehavior;
|
||||
}
|
||||
|
||||
public void onHandleGrabbed(){
|
||||
if(getHandleBehavior()!=null) getHandleBehavior().onHandleGrabbed();
|
||||
if(getBubbleBehavior()!=null) getBubbleBehavior().onHandleGrabbed();
|
||||
}
|
||||
|
||||
public void onHandleReleased(){
|
||||
if(getHandleBehavior()!=null) getHandleBehavior().onHandleReleased();
|
||||
if(getBubbleBehavior()!=null) getBubbleBehavior().onHandleReleased();
|
||||
}
|
||||
|
||||
public void onScrollStarted(){
|
||||
if(getHandleBehavior()!=null) getHandleBehavior().onScrollStarted();
|
||||
if(getBubbleBehavior()!=null) getBubbleBehavior().onScrollStarted();
|
||||
}
|
||||
|
||||
public void onScrollFinished(){
|
||||
if(getHandleBehavior()!=null) getHandleBehavior().onScrollFinished();
|
||||
if(getBubbleBehavior()!=null) getBubbleBehavior().onScrollFinished();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.ui.fastscroll.viewprovider;
|
||||
|
||||
/**
|
||||
* Created by Michal on 11/08/16.
|
||||
* Extending classes should use this interface to get notified about events that occur to the
|
||||
* fastscroller elements (handle and bubble) and react accordingly. See {@link DefaultBubbleBehavior}
|
||||
* for an example.
|
||||
*/
|
||||
public interface ViewBehavior {
|
||||
void onHandleGrabbed();
|
||||
void onHandleReleased();
|
||||
void onScrollStarted();
|
||||
void onScrollFinished();
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package it.integry.integrywmsnative.ui.fastscroll.viewprovider;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorInflater;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.AnimatorRes;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
|
||||
/**
|
||||
* Created by Michal on 05/08/16.
|
||||
* Animates showing and hiding elements of the {@link it.integry.integrywmsnative.ui.fastscroll.FastScroller} (handle and bubble).
|
||||
* The decision when to show/hide the element should be implemented via {@link ViewBehavior}.
|
||||
*/
|
||||
public class VisibilityAnimationManager {
|
||||
|
||||
protected final View view;
|
||||
|
||||
protected AnimatorSet hideAnimator;
|
||||
protected AnimatorSet showAnimator;
|
||||
|
||||
private float pivotXRelative;
|
||||
private float pivotYRelative;
|
||||
|
||||
protected VisibilityAnimationManager(final View view, @AnimatorRes int showAnimator, @AnimatorRes int hideAnimator, float pivotXRelative, float pivotYRelative, int hideDelay){
|
||||
this.view = view;
|
||||
this.pivotXRelative = pivotXRelative;
|
||||
this.pivotYRelative = pivotYRelative;
|
||||
this.hideAnimator = (AnimatorSet) AnimatorInflater.loadAnimator(view.getContext(), hideAnimator);
|
||||
this.hideAnimator.setStartDelay(hideDelay);
|
||||
this.hideAnimator.setTarget(view);
|
||||
this.showAnimator = (AnimatorSet) AnimatorInflater.loadAnimator(view.getContext(), showAnimator);
|
||||
this.showAnimator.setTarget(view);
|
||||
this.hideAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
|
||||
//because onAnimationEnd() goes off even for canceled animations
|
||||
boolean wasCanceled;
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
super.onAnimationEnd(animation);
|
||||
if(!wasCanceled) view.setVisibility(View.INVISIBLE);
|
||||
wasCanceled = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
super.onAnimationCancel(animation);
|
||||
wasCanceled = true;
|
||||
}
|
||||
});
|
||||
|
||||
updatePivot();
|
||||
}
|
||||
|
||||
public void show(){
|
||||
hideAnimator.cancel();
|
||||
if (view.getVisibility() == View.INVISIBLE) {
|
||||
view.setVisibility(View.VISIBLE);
|
||||
updatePivot();
|
||||
showAnimator.start();
|
||||
}
|
||||
}
|
||||
|
||||
public void hide(){
|
||||
updatePivot();
|
||||
hideAnimator.start();
|
||||
}
|
||||
|
||||
protected void updatePivot() {
|
||||
view.setPivotX(pivotXRelative*view.getMeasuredWidth());
|
||||
view.setPivotY(pivotYRelative*view.getMeasuredHeight());
|
||||
}
|
||||
|
||||
public static abstract class AbsBuilder<T extends VisibilityAnimationManager> {
|
||||
protected final View view;
|
||||
protected int showAnimatorResource = R.animator.fastscroll__default_show;
|
||||
protected int hideAnimatorResource = R.animator.fastscroll__default_hide;
|
||||
protected int hideDelay = 1000;
|
||||
protected float pivotX = 0.5f;
|
||||
protected float pivotY = 0.5f;
|
||||
|
||||
public AbsBuilder(View view) {
|
||||
this.view = view;
|
||||
}
|
||||
|
||||
public AbsBuilder<T> withShowAnimator(@AnimatorRes int showAnimatorResource){
|
||||
this.showAnimatorResource = showAnimatorResource;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AbsBuilder<T> withHideAnimator(@AnimatorRes int hideAnimatorResource){
|
||||
this.hideAnimatorResource = hideAnimatorResource;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AbsBuilder<T> withHideDelay(int hideDelay){
|
||||
this.hideDelay = hideDelay;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AbsBuilder<T> withPivotX(float pivotX){
|
||||
this.pivotX = pivotX;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AbsBuilder<T> withPivotY(float pivotY){
|
||||
this.pivotY = pivotY;
|
||||
return this;
|
||||
}
|
||||
|
||||
public abstract T build();
|
||||
}
|
||||
|
||||
public static class Builder extends AbsBuilder<VisibilityAnimationManager> {
|
||||
|
||||
public Builder(View view) {
|
||||
super(view);
|
||||
}
|
||||
|
||||
public VisibilityAnimationManager build(){
|
||||
return new VisibilityAnimationManager(view, showAnimatorResource, hideAnimatorResource, pivotX, pivotY, hideDelay);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
28
app/src/main/res/animator/fastscroll__default_hide.xml
Normal file
28
app/src/main/res/animator/fastscroll__default_hide.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:ordering="together"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
>
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="scaleX"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="0.0"
|
||||
android:duration="200"
|
||||
/>
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="scaleY"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="0.0"
|
||||
android:duration="200"
|
||||
/>
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="alpha"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="0.0"
|
||||
android:duration="200"
|
||||
/>
|
||||
|
||||
</set>
|
||||
24
app/src/main/res/animator/fastscroll__default_show.xml
Normal file
24
app/src/main/res/animator/fastscroll__default_show.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:ordering="together"
|
||||
android:interpolator="@android:anim/decelerate_interpolator">
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="scaleX"
|
||||
android:valueFrom="0.0"
|
||||
android:valueTo="1.0"
|
||||
android:duration="200"/>
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="scaleY"
|
||||
android:valueFrom="0.0"
|
||||
android:valueTo="1.0"
|
||||
android:duration="200"/>
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="alpha"
|
||||
android:valueFrom="0.0"
|
||||
android:valueTo="1.0"
|
||||
android:duration="200"/>
|
||||
|
||||
</set>
|
||||
10
app/src/main/res/drawable/fast_scroll_thumb.xml
Normal file
10
app/src/main/res/drawable/fast_scroll_thumb.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/colorAccent"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="50dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="50dp"
|
||||
android:topRightRadius="50dp"/>
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/fastscroll__default_bubble.xml
Normal file
10
app/src/main/res/drawable/fastscroll__default_bubble.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners
|
||||
android:topLeftRadius="@dimen/fastscroll__bubble_corner"
|
||||
android:topRightRadius="@dimen/fastscroll__bubble_corner"
|
||||
android:bottomLeftRadius="@dimen/fastscroll__bubble_corner"
|
||||
android:bottomRightRadius="0dp" />
|
||||
<solid android:color="@android:color/white" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/fastscroll__default_handle.xml
Normal file
5
app/src/main/res/drawable/fastscroll__default_handle.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:radius="@dimen/fastscroll__handle_corner" />
|
||||
<solid android:color="@android:color/darker_gray" />
|
||||
</shape>
|
||||
12
app/src/main/res/drawable/gray_detail_background_round4.xml
Normal file
12
app/src/main/res/drawable/gray_detail_background_round4.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<solid android:color="#ebebeb" />
|
||||
|
||||
<padding
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:top="1dp" />
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
BIN
app/src/main/res/font/product_sans_black.ttf
Normal file
BIN
app/src/main/res/font/product_sans_black.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_black_italic.ttf
Normal file
BIN
app/src/main/res/font/product_sans_black_italic.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_bold.ttf
Normal file
BIN
app/src/main/res/font/product_sans_bold.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_bold_italic.ttf
Normal file
BIN
app/src/main/res/font/product_sans_bold_italic.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_italic.ttf
Normal file
BIN
app/src/main/res/font/product_sans_italic.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_light.ttf
Normal file
BIN
app/src/main/res/font/product_sans_light.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_light_italic.ttf
Normal file
BIN
app/src/main/res/font/product_sans_light_italic.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_medium.ttf
Normal file
BIN
app/src/main/res/font/product_sans_medium.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_medium_italic.ttf
Normal file
BIN
app/src/main/res/font/product_sans_medium_italic.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_regular.ttf
Normal file
BIN
app/src/main/res/font/product_sans_regular.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_thin.ttf
Normal file
BIN
app/src/main/res/font/product_sans_thin.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/product_sans_thin_italic.ttf
Normal file
BIN
app/src/main/res/font/product_sans_thin_italic.ttf
Normal file
Binary file not shown.
@ -47,7 +47,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/integry"
|
||||
android:layout_marginStart="8dp"
|
||||
android:letterSpacing="-0.05"
|
||||
style="@style/AppTheme.NewMaterial.Text.ToolbarTitle"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
@ -59,7 +58,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:letterSpacing="-0.05"
|
||||
android:visibility="gone"
|
||||
style="@style/AppTheme.NewMaterial.Text.ToolbarTitle"/>
|
||||
|
||||
|
||||
@ -129,6 +129,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"
|
||||
app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
android:onClick="@{() -> viewmodel.onNeutralClick()}"
|
||||
android:text="@string/abort"/>
|
||||
|
||||
@ -171,6 +172,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
android:onClick="@{() -> viewmodel.onNegativeClick()}"
|
||||
android:text="@string/no"/>
|
||||
|
||||
|
||||
13
app/src/main/res/layout/fastscroll__default_bubble.xml
Normal file
13
app/src/main/res/layout/fastscroll__default_bubble.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:gravity="center"
|
||||
android:textSize="24sp"
|
||||
android:background="@drawable/fastscroll__default_bubble"
|
||||
android:visibility="invisible"
|
||||
android:elevation="2dp"
|
||||
android:layout_margin="1dp"
|
||||
tools:text="A"
|
||||
tools:visibility="visible" />
|
||||
@ -391,42 +391,42 @@
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!--<com.google.android.material.card.MaterialCardView-->
|
||||
<!--android:id="@+id/fast_button_resi_clienti"-->
|
||||
<!--style="@style/Widget.MaterialComponents.CardView"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_margin="8dp"-->
|
||||
<!--app:cardBackgroundColor="@android:color/white"-->
|
||||
<!--app:cardCornerRadius="4dp">-->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/fast_button_resi_clienti"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp">
|
||||
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:gravity="center_horizontal"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:padding="8dp">-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<!--<ImageView-->
|
||||
<!--android:layout_width="64sp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:adjustViewBounds="true"-->
|
||||
<!--android:src="@drawable/ic_versamento_merce_96" />-->
|
||||
<ImageView
|
||||
android:layout_width="64sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_versamento_merce_96" />
|
||||
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_marginTop="16dp"-->
|
||||
<!--android:gravity="center_horizontal"-->
|
||||
<!--android:text="@string/fragment_ultime_consegne_cliente_title"-->
|
||||
<!--android:textAllCaps="true"-->
|
||||
<!--android:textColor="@color/grey_700"-->
|
||||
<!--android:textStyle="bold" />-->
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/fragment_ultime_consegne_cliente_title"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
<!--</com.google.android.material.card.MaterialCardView>-->
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -436,266 +436,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
<!---->
|
||||
<!--<androidx.cardview.widget.CardView-->
|
||||
<!--app:cardBackgroundColor="@android:color/white"-->
|
||||
<!--app:cardCornerRadius="4dp"-->
|
||||
<!--android:layout_marginLeft="10dp"-->
|
||||
<!--android:layout_marginRight="10dp"-->
|
||||
<!--android:layout_marginBottom="10dp"-->
|
||||
<!--android:layout_marginTop="10dp"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:textColor="@android:color/black"-->
|
||||
<!--android:layout_marginTop="10dp"-->
|
||||
<!--android:layout_marginLeft="10dp"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:text="Informazioni generali"-->
|
||||
<!--android:textAllCaps="true"-->
|
||||
<!--android:textStyle="bold"/>-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:padding="15dp"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
|
||||
<!--<androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
|
||||
<!--<androidx.constraintlayout.widget.Guideline-->
|
||||
<!--android:id="@+id/guideline_username"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--app:layout_constraintGuide_percent="0.40"/>-->
|
||||
|
||||
|
||||
<!--</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/guideline1"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--app:layout_constraintGuide_percent="0.40"/>-->
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_marginStart="8dp"-->
|
||||
<!--android:text="Segnale WI-FI"-->
|
||||
<!--android:textColor="@android:color/black"-->
|
||||
<!--app:layout_constraintEnd_toStartOf="@+id/guideline"-->
|
||||
<!--app:layout_constraintStart_toStartOf="parent" />-->
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:id="@+id/wifi_power"-->
|
||||
<!--android:layout_width="0dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_marginEnd="0dp"-->
|
||||
<!--android:layout_marginStart="0dp"-->
|
||||
<!--android:text="N/A"-->
|
||||
<!--android:textSize="16sp"-->
|
||||
<!--app:layout_constraintStart_toStartOf="@+id/guideline1"-->
|
||||
<!--app:layout_constraintEnd_toEndOf="parent" />-->
|
||||
|
||||
<!--</androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
<!--</androidx.cardview.widget.CardView>-->
|
||||
|
||||
<!--<androidx.cardview.widget.CardView-->
|
||||
<!--app:cardBackgroundColor="@android:color/white"-->
|
||||
<!--app:cardCornerRadius="4dp"-->
|
||||
<!--android:layout_marginLeft="10dp"-->
|
||||
<!--android:layout_marginRight="10dp"-->
|
||||
<!--android:layout_marginBottom="10dp"-->
|
||||
<!--android:layout_marginTop="10dp"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:textColor="@android:color/black"-->
|
||||
<!--android:layout_marginTop="10dp"-->
|
||||
<!--android:layout_marginLeft="10dp"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:text="Azioni rapide"-->
|
||||
<!--android:textAllCaps="true"-->
|
||||
<!--android:textStyle="bold"/>-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:layout_margin="15dp"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="horizontal"-->
|
||||
<!--android:weightSum="1">-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:id="@+id/fast_button_accettazione"-->
|
||||
<!--android:layout_width="0dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_weight="0.5"-->
|
||||
<!--android:gravity="center">-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatImageView-->
|
||||
<!--android:layout_width="36dp"-->
|
||||
<!--android:layout_height="36dp"-->
|
||||
<!--android:layout_margin="8dp"-->
|
||||
<!--android:background="@android:color/white"-->
|
||||
<!--android:src="@drawable/ic_download_black_24dp"-->
|
||||
<!--android:tint="@color/mainGreen" />-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:text="Accettazione"-->
|
||||
<!--android:gravity="center_horizontal"/>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:id="@+id/fast_button_spedizione"-->
|
||||
<!--android:layout_width="0dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_weight="0.5"-->
|
||||
<!--android:gravity="center">-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatImageView-->
|
||||
<!--android:layout_width="36dp"-->
|
||||
<!--android:layout_height="36dp"-->
|
||||
<!--android:layout_margin="8dp"-->
|
||||
<!--android:background="@android:color/white"-->
|
||||
<!--android:src="@drawable/ic_upload_black_24dp"-->
|
||||
<!--android:tint="@color/mainOrange" />-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:text="Spedizione"-->
|
||||
<!--android:gravity="center_horizontal"/>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="horizontal"-->
|
||||
<!--android:layout_marginTop="16dp"-->
|
||||
<!--android:weightSum="0.9">-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:id="@+id/fast_button_rettifica_giacenze"-->
|
||||
<!--android:layout_width="0dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_weight="0.3"-->
|
||||
<!--android:gravity="center">-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatImageView-->
|
||||
<!--android:layout_width="36dp"-->
|
||||
<!--android:layout_height="36dp"-->
|
||||
<!--android:layout_margin="8dp"-->
|
||||
<!--android:background="@android:color/white"-->
|
||||
<!--android:src="@drawable/ic_empty_box_96"-->
|
||||
<!--android:tint="@color/brown_500" />-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:text="Rettifica Giacenze"-->
|
||||
<!--android:gravity="center_horizontal"/>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:id="@+id/fast_button_versamento"-->
|
||||
<!--android:layout_width="0dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_weight="0.3"-->
|
||||
<!--android:gravity="center">-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatImageView-->
|
||||
<!--android:layout_width="36dp"-->
|
||||
<!--android:layout_height="36dp"-->
|
||||
<!--android:layout_margin="8dp"-->
|
||||
<!--android:background="@android:color/white"-->
|
||||
<!--android:src="@drawable/ic_load_shelf_96"-->
|
||||
<!--android:tint="@color/teal_500" />-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:gravity="center_horizontal"-->
|
||||
<!--android:text="Versamento Merce"/>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:id="@+id/fast_button_picking_libero"-->
|
||||
<!--android:layout_width="0dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_weight="0.3"-->
|
||||
<!--android:gravity="center">-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatImageView-->
|
||||
<!--android:layout_width="36dp"-->
|
||||
<!--android:layout_height="36dp"-->
|
||||
<!--android:layout_margin="8dp"-->
|
||||
<!--android:adjustViewBounds="true"-->
|
||||
<!--android:scaleType="centerInside"-->
|
||||
<!--android:background="@android:color/white"-->
|
||||
<!--android:src="@drawable/ic_barcode_96"-->
|
||||
<!--android:tint="@color/colorPrimary" />-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:text="@string/free_picking"-->
|
||||
<!--android:gravity="center_horizontal"/>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
<!--</androidx.cardview.widget.CardView>-->
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
@ -10,60 +10,28 @@
|
||||
</data>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
<RelativeLayout
|
||||
android:background="@android:color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".gest.ultime_consegne_cliente.UltimeConsegneClienteFragment">
|
||||
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
card_view:cardUseCompatPadding="true"
|
||||
card_view:cardCornerRadius="4dp"
|
||||
card_view:cardElevation="4dp">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:background="@android:color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:id="@+id/recyclerView"
|
||||
android:scrollbars="none"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="4dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cardview_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold"
|
||||
style="@android:style/TextAppearance.Medium"
|
||||
android:text="NOME GRUPPO"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
<it.integry.integrywmsnative.ui.fastscroll.FastScroller
|
||||
android:id="@+id/fastscroll"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/accettazione_main_list_group_item_container">
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!--<androidx.cardview.widget.CardView-->
|
||||
<!--xmlns:card_view="http://schemas.android.com/apk/res-auto"-->
|
||||
<!--android:id="@+id/card_view"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--card_view:cardUseCompatPadding="true"-->
|
||||
<!--card_view:cardCornerRadius="4dp"-->
|
||||
<!--card_view:cardElevation="4dp">-->
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AppTheme.NewMaterial.Text.ListDivider"
|
||||
android:textAllCaps="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
tools:text="Title here"/>
|
||||
|
||||
<!--<com.google.android.material.button.MaterialButton-->
|
||||
<!--android:id="@+id/select_all_button"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--style="@style/Button.PrimaryOutline"-->
|
||||
<!--app:strokeColor="@color/colorPrimary"-->
|
||||
<!--android:layout_alignParentEnd="true"-->
|
||||
<!--android:textSize="13sp"-->
|
||||
<!--android:text="@string/action_select_all"/>-->
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<!--</androidx.cardview.widget.CardView>-->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
<variable
|
||||
name="checkableItem"
|
||||
type="it.integry.integrywmsnative.gest.ultime_consegne_cliente.dto.CheckableConsegnaClienteDTO" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
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:layout_marginTop="2dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/start_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="italic"
|
||||
style="@android:style/TextAppearance.Medium"
|
||||
tools:text="TITLE"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:textColor="@color/colorPrimaryGray"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textSize="14sp"
|
||||
tools:text="13 Apr"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/compilato_da"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AppTheme.NewMaterial.Text.Badge"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_below="@id/date"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textSize="12sp"
|
||||
tools:text="Nome Cognome"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@ -199,4 +199,6 @@
|
||||
<string name="fragment_ultime_consegne_cliente_title">Ultime consegne</string>
|
||||
|
||||
<string name="exception_printer_not_found">Stampante non trovata</string>
|
||||
|
||||
<string name="action_select_all">Seleziona tutto</string>
|
||||
</resources>
|
||||
9
app/src/main/res/values/attr.xml
Normal file
9
app/src/main/res/values/attr.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<attr name="fastscroll__style" format="reference" />
|
||||
<declare-styleable name="fastscroll__fastScroller">
|
||||
<attr name="fastscroll__bubbleColor" format="color" />
|
||||
<attr name="fastscroll__handleColor" format="color" />
|
||||
<attr name="fastscroll__bubbleTextAppearance" format="reference" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@ -3,17 +3,16 @@
|
||||
|
||||
|
||||
<style name="Button.PrimaryOutline" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<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>
|
||||
<item name="android:paddingTop">8dp</item>
|
||||
<item name="android:paddingBottom">8dp</item>
|
||||
<item name="backgroundTint">@android:color/white</item>
|
||||
<item name="iconTint">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="Button.PrimaryFull" parent="Widget.MaterialComponents.Button.UnelevatedButton">
|
||||
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<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>
|
||||
<item name="android:paddingTop">8dp</item>
|
||||
@ -27,7 +26,7 @@
|
||||
|
||||
|
||||
<style name="Button.DangerOutline" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<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>
|
||||
<item name="android:textColor">@color/red_400</item>
|
||||
@ -38,7 +37,7 @@
|
||||
</style>
|
||||
|
||||
<style name="Button.DangerFull" parent="Widget.MaterialComponents.Button.UnelevatedButton">
|
||||
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<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>
|
||||
<item name="android:paddingTop">8dp</item>
|
||||
|
||||
@ -8,4 +8,20 @@
|
||||
<dimen name="bottom_sheet_round16">16dp</dimen>
|
||||
|
||||
<dimen name="standard_rounc">16dp</dimen>
|
||||
|
||||
<dimen name="fastscroll__bubble_corner">20dp</dimen>
|
||||
|
||||
<dimen name="fastscroll__bubble_size">50dp</dimen>
|
||||
|
||||
<dimen name="fastscroll__handle_corner">3dp</dimen>
|
||||
|
||||
<dimen name="fastscroll__handle_height">30dp</dimen>
|
||||
|
||||
<dimen name="fastscroll__handle_width">6dp</dimen>
|
||||
|
||||
<dimen name="fastscroll__handle_inset">9dp</dimen>
|
||||
|
||||
<dimen name="fastscroll__handle_clickable_width">24dp</dimen>
|
||||
|
||||
<dimen name="fastscroll__handle_padding">2dp</dimen>
|
||||
</resources>
|
||||
|
||||
@ -204,6 +204,8 @@
|
||||
|
||||
<string name="exception_printer_not_found">Printer not found</string>
|
||||
|
||||
<string name="action_select_all">Select all</string>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
|
||||
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
|
||||
</style>
|
||||
|
||||
@ -18,18 +18,33 @@
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NewMaterial">
|
||||
<item name="android:fontFamily">@font/open_sans_regular</item>
|
||||
<item name="android:fontFamily">@font/product_sans_regular</item>
|
||||
</style>
|
||||
<style name="AppTheme.NewMaterial.Text" parent = "AppTheme.NewMaterial">
|
||||
<item name="android:fontFamily">@font/open_sans_regular</item>
|
||||
<item name="android:fontFamily">@font/product_sans_regular</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
</style>
|
||||
<style name="AppTheme.NewMaterial.Text.Badge" parent = "AppTheme.NewMaterial">
|
||||
<item name="android:fontFamily">@font/product_sans_regular</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:background">@drawable/gray_detail_background_round4</item>
|
||||
<item name="android:paddingStart">8dp</item>
|
||||
<item name="android:paddingEnd">8dp</item>
|
||||
<item name="android:paddingTop">2dp</item>
|
||||
<item name="android:paddingBottom">2dp</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NewMaterial.Text.ToolbarTitle" parent="AppTheme.NewMaterial.Text">
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textColor">#5F6368</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NewMaterial.Text.ListDivider" parent="AppTheme.NewMaterial.Text">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">#5F6368</item>
|
||||
<item name="android:letterSpacing">+0.03</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.NewMaterial.Text.TextBoxDashboard" parent="AppTheme.NewMaterial.Text">
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TextInputLayout.OutlinePrimary" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<item name="android:textColorHint">@color/colorPrimary</item>
|
||||
<item name="boxStrokeColor">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="TextInputEditText.OutlinePrimary" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox.Dense">
|
||||
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<item name="android:textColor">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<resources>
|
||||
|
||||
<style name="TextViewMaterial">
|
||||
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
<item name="fontFamily">@font/product_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
</style>
|
||||
|
||||
<style name="TextViewMaterial.DialogTitle">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user