无法找到一种方法,让一个居中的TextView在两侧都有垂直居中的水平线,伸展到屏幕的左右两端.就像在下面的这张照片. 任何见解都会有帮助! 最后提出了这个完全符合要求的解决方案
          任何见解都会有帮助!
最后提出了这个完全符合要求的解决方案<FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            >
        <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="@color/light_grey"
                android:layout_gravity="center_vertical"/>
        <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/add_heading_description"
                android:textSize="@dimen/add_headings"
                android:textColor="@color/dark_grey"
                android:paddingLeft="10dp"
                android:paddingRight="10dp"
                android:layout_gravity="center"
                android:background="@color/white"
                />
    </FrameLayout>
        
             