为什么文本不向右移动?
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBelow="true"
android:text="happy birthday" />
如果使用以下代码,您的TextView将垂直居中,并移至右侧。最好使用layout_constraint。您的用户界面将响应。
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:text="happy birthday" />