I am a beginner in Android Programming. I was creating an app and I want to underline a text. Please have a look into my code snippet
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:text="hello world"
android:id="@+id/textview"
android:layout_height="wrap_content"
/>
<View
android:layout_width="wrap_content"
android:layout_height="1dp"
android:background="@color/colorPrimary"/>
</LinearLayout>
Actually, I want the same width for both textview content and View. But View width size same as full-screen width.