Questions tagged «android-motionlayout»

1
带有EditText的运动布局会破坏动画
我创建了一个简单的MotionLayout,它几乎与协调器布局相似(动画略有不同)。 这里是这样的: 打开键盘后,在内容区域中使用(几个)EditText视图将中断MotionLayout动画。动画现在有延迟,状态错误,UI开始冻结。任何想法如何解决这个问题? 以gif格式链接到错误 使用的版本: com.google.android.material:material:1.2.0-alpha01 androidx.constraintlayout:constraintlayout:2.0.0-beta3 我也可以在一个小示例应用程序中重现该行为 示例layout.xml: <androidx.constraintlayout.motion.widget.MotionLayout 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" app:layoutDescription="@xml/animation" tools:showPaths="true"> <androidx.appcompat.widget.Toolbar android:id="@+id/customtoolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <com.google.android.material.textview.MaterialTextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="32dp" android:layout_marginBottom="48dp" android:text="title" app:layout_constraintBottom_toTopOf="@+id/formLayout" app:layout_constraintStart_toStartOf="parent" /> <ImageView android:id="@+id/image" android:layout_width="200dp" android:background="#ff00ff" android:layout_height="200dp" android:scaleType="centerCrop" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/ic_home_black_24dp" /> <androidx.core.widget.NestedScrollView android:id="@+id/formLayout" android:layout_width="match_parent" android:layout_height="0dp" app:layout_constraintBottom_toBottomOf="parent" …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.