I usually use this code to add horizontal line:
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray"/>
To add vertical separator, switch the layout_width
and layout_height
values
More Related Contents:
- Android: How do I prevent the soft keyboard from pushing my view up?
- Drawing a line/path on Google Maps
- Android: alternate layout xml for landscape mode
- Set the absolute position of a view
- How to get screen dimensions as pixels in Android
- Lock screen orientation (Android) [duplicate]
- how to read value from string.xml in android?
- How to size an Android view based on its parent’s dimensions
- What’s the difference between fill_parent and wrap_content?
- How to make an Android SlidingDrawer slide out from the left?
- How do you setLayoutParams() for an ImageView?
- How to change line color in EditText
- Change the Right Margin of a View Programmatically?
- Change the text color of a single ClickableSpan when pressed without affecting other ClickableSpans in the same TextView
- Change shape solid color at runtime inside Drawable xml used as background
- “Canvas: trying to draw too large bitmap” when Android N Display Size set larger than Small
- Android: How to make all elements inside LinearLayout same size?
- Android — How to position View off-screen?
- If I call getMeasuredWidth() or getWidth() for layout in onResume they return 0
- What is the correct way to specify dimensions in DIP from Java code?
- Modifying the Android seekbar widget to operate vertically
- How to resize a android webview after adding data in it
- Creating multi-screen support app android
- Android layouts for different screen sizes
- How to use view flipper with three layouts?
- Best way to create a bottom toolbar in android.
- Horizontal “tab”ish scroll between views
- How to support all the different resolutions of android products
- Simple swipe gesture to activity tutorial? [closed]
- GridLayoutManager – how to auto fit columns?