【发布时间】:2019-05-15 10:03:27
【问题描述】:
我有这样的看法:
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/...">
<ImageView
android:id="@+id/.."
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@android:color/black"
android:src="@drawable/.."
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</android.support.constraint.ConstraintLayout>
我想创建简单而干净的动画,让我的 ImageView 从最底部(容器)滑动,并将 alpha(淡入)更改为容器的最顶部。
当您指定特定的幻灯片高度时,我在 stackoverflow 中找到了很多解决方案。从下到上是否有我需要的简单解决方案?
【问题讨论】:
-
@Deepak 使用您提出的解决方案,仅从其高度而不是容器(底部)查看幻灯片。关于如何改进解决方案以使其按预期工作的任何想法?
-
哦,让我在下面为您提供另一个答案。
标签: android