如何修复nestedscrollview内部的项目定位约束布局

时间:2019-03-27 04:35:29

标签: java android android-layout

当我尝试通过拖动项目将项目放置到其他位置时(例如textview),在我释放缪斯键后,它会立即向上跳跃。约束布局位于nestedscrollview内部

我尝试附加约束,也没有约束的项目。我有相同的结果。

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    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:fillViewport="true"
    android:orientation="vertical">Not

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#62def8">

        <android.support.v4.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="900dp"
            android:fillViewport="true">

            <android.support.constraint.ConstraintLayout
                android:id="@+id/constraintLayout2"
                android:layout_width="match_parent"
                 android:layout_height="match_parent"
                android:background="@drawable/rounded_corner2">


                <Button
                    android:id="@+id/button4infoor3j"
                    android:layout_width="45dp"
                    android:layout_height="34dp"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="8dp"
                    android:layout_marginEnd="8dp"
                    android:layout_marginBottom="8dp"
                    android:background="@drawable/sllidewon"
                    android:clickable="false"
                    android:stateListAnimator="@null"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHorizontal_bias="0.502"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintVertical_bias="0.01" />


                <TextView
                    android:id="@+id/textView13j14"
                    android:layout_width="204dp"
                    android:layout_height="21dp"
                    android:background="@drawable/rounded_corner2"
                    android:fontFamily="@font/calibril"
                    android:text="EDUCATION REQUIRED"
                    android:textColor="@android:color/black"
                    android:textSize="20sp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHorizontal_bias="0.387"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintVertical_bias="0.555" />


            </android.support.constraint.ConstraintLayout>
        </android.support.v4.widget.NestedScrollView>
    </LinearLayout>
</ScrollView>

0 个答案:

没有答案