3
I’m using the Toolbar
, but wanted the bottom of it to have a line of another color that delimited it, as shown in the image,
To achieve this effect the only thing I remember is using a ImageView
. Is there any other better way to do this?
3
I’m using the Toolbar
, but wanted the bottom of it to have a line of another color that delimited it, as shown in the image,
To achieve this effect the only thing I remember is using a ImageView
. Is there any other better way to do this?
2
Instead of a Imageview use a View with the background the color you want and set the height in android:layout_height
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
........
........
........>
<View
android:id="@+id/LinhaHorizontal"
android:layout_width="match_parent"
android:layout_height= "2dp"
android:background="@color/gray"
android:layout_gravity="bottom"/>
</android.support.v7.widget.Toolbar>
Browser other questions tagged android android-layout
You are not signed in. Login or sign up in order to post.
It doesn’t work. I put it exactly like you said, but it looks exactly the same without the gray bar :\
– porthfind
It works, you have to increase the value of
layout_height
.– ramaral
It won’t take up all of Toobar, just the middle part between the left navigation icon and points on the right menu. If you do not use any of them the line can be extended to the entire length using
app:contentInsetStart="0dp"
andapp:contentInsetEnd="0dp"
– ramaral