android文本视图,文本后带行
如何实现示例中的一件事情 文本视图,文本后有一行 用于添加行检查 并将此视图与文本视图的右侧对齐。android文本视图,文本后带行,android,textview,Android,Textview,如何实现示例中的一件事情 文本视图,文本后有一行 用于添加行检查 并将此视图与文本视图的右侧对齐。 完成了试试这个方法这对我很有效 <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:layout_width=
完成了试试这个方法这对我很有效
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="Heelloos"
android:layout_marginLeft="10dp"/>
<View
android:layout_width="150dp"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="#ff00ff"/>
</LinearLayout>
输出
尝试以下答案:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Your Message: "
android:textAppearance="?android:attr/textAppearanceLarge" />
<View
android:layout_width="150dp"
android:layout_height="1dp"
android:layout_alignBottom="@+id/textView"
android:layout_gravity="bottom"
android:layout_toEndOf="@+id/textView"
android:layout_toRightOf="@+id/textView"
android:background="#FF0000FF" />
</RelativeLayout>
该行的用途是什么?是否用于用户输入?