From 28a1169a89036d89dab85923a06b247d988d38b5 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 10 Aug 2022 09:34:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98,shouye=20ytuijian?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/anim/vice_banner_come_in.xml | 13 +++++++++---- .../src/main/res/layout/view_home_float_banner.xml | 2 +- .../java/com/yunbao/main/views/FloatBannerView.java | 8 ++++++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/common/src/main/res/anim/vice_banner_come_in.xml b/common/src/main/res/anim/vice_banner_come_in.xml index a24947702..4371db378 100644 --- a/common/src/main/res/anim/vice_banner_come_in.xml +++ b/common/src/main/res/anim/vice_banner_come_in.xml @@ -1,7 +1,12 @@ - + + + \ No newline at end of file diff --git a/common/src/main/res/layout/view_home_float_banner.xml b/common/src/main/res/layout/view_home_float_banner.xml index ea6ce9d15..66923fd4d 100644 --- a/common/src/main/res/layout/view_home_float_banner.xml +++ b/common/src/main/res/layout/view_home_float_banner.xml @@ -55,7 +55,7 @@ android:layout_width="28dp" android:layout_height="28dp" android:layout_centerVertical="true" - android:layout_marginStart="10dp" + android:layout_marginStart="7dp" android:background="@drawable/bg_white_clip" android:visibility="visible"> diff --git a/main/src/main/java/com/yunbao/main/views/FloatBannerView.java b/main/src/main/java/com/yunbao/main/views/FloatBannerView.java index 5107f512c..96b913924 100644 --- a/main/src/main/java/com/yunbao/main/views/FloatBannerView.java +++ b/main/src/main/java/com/yunbao/main/views/FloatBannerView.java @@ -7,6 +7,9 @@ import android.util.AttributeSet; import android.view.View; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; +import android.view.animation.AnimationSet; +import android.view.animation.AnimationUtils; +import android.view.animation.ScaleAnimation; import android.view.animation.TranslateAnimation; import android.widget.FrameLayout; import android.widget.LinearLayout; @@ -95,11 +98,12 @@ public class FloatBannerView extends FrameLayout { ImgLoader.displayAvatar(getContext(), list.get(index).getAvatar(), clipImage1); Animation animation = new TranslateAnimation(0, -40, 0, 0); animation.setFillAfter(true); - animation.setDuration(700); + animation.setDuration(800); + Animation animation2 = new AlphaAnimation(1, 0); animation2.setFillAfter(true); - animation2.setDuration(800); + animation2.setDuration(900); animation.setAnimationListener(new Animation.AnimationListener() { @Override