I am having problems using a custom view. It does not allow me to use "fillParent" and the settings like color or alignment do not work for me either.
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
> android:id="@+id/custom_upload_snackbar"
> android:layout_width="match_parent"
> android:layout_height="48dp"
> android:orientation="horizontal"
> android:background="@drawable/transparent_background"
> >
> <ProgressBar
> android:id="@+id/snackbar_progressBar"
> style="?android:attr/progressBarStyle"
> android:layout_width="25dp"
> android:layout_height="25dp"
> android:layout_marginEnd="15dp"
> android:layout_gravity="center_vertical"
> android:progressTint="@color/colorPrimary"
> />
> <TextView
> android:id="@+id/snackbar_text"
> android:layout_width="match_parent"
> android:layout_height="wrap_content"
> android:gravity="center_vertical"
> android:layout_gravity="center_vertical"
> android:textColor="@color/colorPrimary"
> />
>
> </LinearLayout>
`Snackbar snack = new Snackbar();
View view = LayoutInflater.from(this).inflate(R.layout.custom_upload_snackbar, null);
TextView tv = (TextView) view.findViewById(R.id.snackbar_text);
ProgressBar prBar = (ProgressBar) view.findViewById(R.id.snackbar_progressBar);
tv.setText(R.string.fragment_document_uploading);
snack.with(this,null)
.type(Type.CUSTOM, 0xff323232)
.fillParent(true)
.contentView(view, 48)
.textAlign(Align.CENTER)
.duration(Duration.INFINITE)
.show();`
Im use minSDK 21 and Landscape on tablet.
Thanks.