user6456773 user6456773 - 1 month ago 10
Android Question

How to separate the footer of a layout with a line in android

I am building a page with a Linearlayout and numerous elements within it. At the bottom of the screen, I want to add a line, separating the "footer". How can this be achieved? I was thinking for something as a TextView, and the line to be the text added, but am sure there is a better way to be done. Thanks!

Answer

just add a view with specify background into the xml layout like below:

<View
    android:layout_width="match_parent"
    android:layout_height="0.5dp"
    android:background="@android:color/darker_gray"/>
Comments