【发布时间】:2018-08-27 21:46:35
【问题描述】:
在android中有什么方法可以实现滑动解锁android中的动画吗? 我有一个文本视图,我想在其中设置动画动画! 这是我的布局:
<LinearLayout
android:id="@+id/ll_chooseLang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:orientation="vertical" >
<TextView
android:id="@+id/tv_chooseLanguage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingMultiplier="1.2"
android:textColor="#fff"
android:textSize="25sp"
android:text="TextView" />
</LinearLayout>
我已经完成了淡出和淡入动画:
animSet=new AnimationSet(true);
trans=new TranslateAnimation(400, 0,0, 0);
trans.setDuration(2000);
fadeIn=new AlphaAnimation(0.0f, 1.0f);
fadeIn.setDuration(1800);
fadeIn.setFillAfter(true);
fadeout=new AlphaAnimation(1.0f, 0.0f);
fadeout.setDuration(2000);
fadeout.setFillAfter(true);
animSet.addAnimation(trans);
animSet.addAnimation(fadeIn);
但我想要“滑动解锁”之类的动画。我搜索了很多,无法满足我的要求..
需要帮助提前谢谢..!!
【问题讨论】: