I am trying to make empty lines within android. This is what I have been doing:
android:layout_width=\"fill_parent\"
android:layout_height=\"wrap_content\"
an
<View
android:layout_width="fill_parent"
android:layout_height="30dp"
android:background="#80000000">
</View>
The previous answers didn't work in my case. However, creating an empty item in the menu does.
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
...
<item />
...
</menu>
View if you need change background color , Space if not .
that dosent mean you have to change view background .
<View
android:layout_width="match_parent"
android:layout_height="20dp"
android:background="@color/YOUR_BACKGROUND">
</View>
or Space
<Space
android:layout_width="match_parent"
android:layout_height="20dp"
/>
Below is the simple way to create blank line with line size. Here we can adjust size of the blank line. Try this one.
<TextView
android:id="@id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="5dp"/>
Agree with all the answers......also,
<TextView android:text=""
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_weight="2" />
should work :) I am just messing with others as TextView is my favourite (waste of memory though!)
An updated Answer: Since API 14, you can use "Space" View, as described in the documentation.
Space is a lightweight View subclass that may be used to create gaps between components in general purpose layouts.