Android layout 如何在android中向textview添加必需的开始符号(用户名*),而不使用另外两个视图,如imageview或textview

Android layout 如何在android中向textview添加必需的开始符号(用户名*),而不使用另外两个视图,如imageview或textview,android-layout,Android Layout,我必须实现文本视图的必填字段指示器。我在线性布局中使用了两个文本视图,并且实现了无需使用其他视图即可帮助我的功能 <LinearLayout android:layout_width="wrap_content" android:orientation="horizontal" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:text="U

我必须实现文本视图的必填字段指示器。我在线性布局中使用了两个文本视图,并且实现了无需使用其他视图即可帮助我的功能

<LinearLayout android:layout_width="wrap_content" android:orientation="horizontal" android:layout_height="wrap_content">
  <TextView android:layout_width="wrap_content" android:text="Username" android:layout_height="wrap_content" />
  <TextView android:layout_width="wrap_content" android:text="*" android:textColor="#fcf90303" android:layout_height="wrap_content" />
</LinearLayout>

下次请使用帖子下方左侧的“”选项,在问题中使用的标签下方的右侧-更新或编辑问题,而不是使用评论