How to put lateral lines between TextView? Android

0

How can I put lateral lines in a TextView something like this:

- or -

link

    
asked by Eric Retamero 13.12.2016 в 19:23
source

1 answer

1

you must define it in the layout

<!--TEXVIEW CON LINEAS -->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:orientation="horizontal">
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1" >
                    <View
                        android:layout_width="match_parent"
                        android:layout_height="1dp"
                        android:layout_gravity="center"
                        android:background="@android:color/darker_gray" />
                </LinearLayout>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="TEXTO DEL TEXTVIEW"
                    android:textStyle="bold"
                    android:textColor="#555"
                    android:layout_marginLeft="3dp"
                    android:layout_marginRight="3dp"
                    android:textSize="16sp"/>
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1" >
                    <View
                        android:layout_width="match_parent"
                        android:layout_height="1dp"
                        android:layout_gravity="center"
                        android:background="@android:color/darker_gray" />
                </LinearLayout>
            </LinearLayout>
    
answered by 13.12.2016 / 19:26
source