创建如下所示的 TextView 的最佳方式

The best way to create a TextView that looks like this

我正在尝试重新创建这种类型的 TextView。是Material设计TextInput还是修改TextView? 如何将行放在 TextView 的顶部? 谢谢。

这只是一个 view 背景 属性。像这样使用它:

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="20dp"
    android:orientation="vertical">

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@color/black"/>
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="View line placed above the text view"
        android:layout_marginTop="5dp"/>

</LinearLayout>