Search code examples
androidandroid-layoutandroid-xmlandroid-styleslist-separator

Different text style while using listSeparatorTextStyleView


I want to use a list separator in my .xml file, but everytime i do that, the text style changes, it becomes bigger and bolder.

Below are links of the screenshots. The picture on the left is what shows up from my code, and on the right is what i really want.

Picture for output

I only want to know how to stop the text from getting bigger and bolder, and at the same time how to put a horizontal line below the <TextView>.

Below is the link for the code

Code


Solution

  • Building from @John Kalimeris' answer, i have a better way, in which no foriegn resource will be needed. This should work for you.

    <TextView
            android:layout_width="match_parent"
            android:layout_height="5dp"
            style="?android:attr/listSeparatorTextViewStyle"
            android:layout_marginBottom="3dp"/>