我试过app:layout_constraintBottom_toTopOf =“@ id / the_view_which_will_remain_below”,但它不是所需的输出.
我想从RelativeLayout的layout_above中获得相同的行为.
使用此代码,我的Textview开始从底部出现,随着字符增加文本进入上面.但我希望文本从父母的开始开始.
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
tools:context="com.fatimamostafa.restfulwebservices.asynctask.AsyncTaskRequest">
android:id="@+id/ll"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Run" />
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Clear" />
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/ll"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:textSize="160sp"
android:text="Text"
/>