Is there any Android layout equivalent for HTML <HR />
tag?
<hr>: The Thematic Break (Horizontal Rule) element The <hr> HTML element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.
The <hr> tag in HTML stands for horizontal rule and is used to insert a horizontal rule or a thematic break in an HTML page to divide or separate document sections. The <hr> tag is an empty tag, and it does not require an end tag. Used to specify the alignment of the horizontal rule.
All "presentation attributes" of the hr element were deprecated in HTML 4.01, and are not supported in XHTML 1.0 Strict DTD.
HTML <hr> Tag Attributes in HTML 4These attributes are not supported in HTML5. It sets the alignment of the horizontal rule. To specify the width of the rule. It specifies the height of the horizontal line.
You can use next trick:
<View android:layout_width="match_parent" android:layout_height="2dp" android:background="#ffffff"/>
This will draw horizontal line of white color with 2dp in height.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With