How can i customize my Snackbar layout like on Google Drive as shown below?
EDIT: Is this the only way around? how to customize snackBar's layout?
How can i customize my Snackbar layout like on Google Drive as shown below?
EDIT: Is this the only way around? how to customize snackBar's layout?
Why would this need to be a snackbar
? Just add a view at the bottom of the layout that holds the information you need.
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:background="@android:color/black"
android:layout_alignParentStart="true">
<ImageView
android:id="@+id/image"
android:src="@drawable/image"
android:layout_width="50dp"
android:layout_height="50dp"/>
<TextView
android:id="@+id/email"
android:textSize="25sp"
android:textColor="@android:color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Email"
android:layout_alignParentBottom="true"
android:layout_toEndOf="@+id/image" />
<TextView
android:id="@+id/name"
android:textSize="25sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:text="Name"
android:layout_alignParentTop="true"
android:layout_toEndOf="@+id/image" />
</RelativeLayout>
I've managed to work it out with Mike and JJD anwser here. Here's my code
At my activity:
My layout:
Final result