Share the post "Center Div Horizontally And Vertically Using CSS"
By far this is the best solution that I have come across with with regards to placing a Div element at the center both horizontally and vertically.
<div style="position: relative; left: 50%; top: 50%; transform: translate(-50%,-50%);">
Add your custom width and height values to complete the result.
If you do not assign a width and height value, the Div will stretch its width to fill the screen but its height will be centered vertically depending on the content.
Share the post "Android: Adding A Horizontal Line In TableLayout"
It may be common instinct for you to place a horizontal line in a TableLayout within the TableRow tags. However, when I did try that, the horizontal line never stretched to fill the whole width.
The trick is not to place the View tag inside the TableRow tag but outside of it. See example below.
<View android:layout_width="fill_parent" android:layout_height="1px"
<TableRow android:layout_height="wrap_content" android:layout_width="match_parent"