修改测试问题,shouye ytuijian

This commit is contained in:
18401019693 2022-08-10 16:44:30 +08:00
parent 5b47d0b930
commit 0a36dc99f3
3 changed files with 30 additions and 21 deletions

View File

@ -17,27 +17,31 @@
android:paddingEnd="7dp"
android:paddingBottom="5dp" />
<FrameLayout
<RelativeLayout
android:id="@+id/banner_layout2"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_centerVertical="true"
android:layout_marginStart="25dp"
android:gravity="center"
android:padding="1.5dp"
android:background="@drawable/bg_white_clip"
android:visibility="visible">
<com.yunbao.common.views.weight.ClipPathCircleImage
android:id="@+id/clip_image2"
android:layout_centerInParent="true"
android:layout_width="23.5dp"
android:layout_height="23.5dp"
android:layout_gravity="center"
android:layout_height="23.5dp" />
</RelativeLayout>
android:layout_gravity="center" />
</FrameLayout>
<FrameLayout
<RelativeLayout
android:id="@+id/banner_layout3"
android:layout_width="25dp"
android:layout_height="25dp"
android:gravity="center"
android:padding="1.5dp"
android:layout_centerVertical="true"
android:layout_marginStart="25dp"
android:background="@drawable/bg_white_clip">
@ -46,25 +50,29 @@
android:id="@+id/clip_image3"
android:layout_width="23.5dp"
android:layout_height="23.5dp"
android:layout_centerInParent="true"
android:layout_gravity="center" />
</FrameLayout>
</RelativeLayout>
<FrameLayout
<RelativeLayout
android:id="@+id/banner_layout1"
android:layout_width="29dp"
android:layout_height="29dp"
android:layout_width="25dp"
android:layout_height="25dp"
android:gravity="center"
android:layout_centerVertical="true"
android:layout_marginStart="7dp"
android:padding="1.5dp"
android:background="@drawable/bg_white_clip"
android:visibility="visible">
<com.yunbao.common.views.weight.ClipPathCircleImage
android:id="@+id/clip_image1"
android:layout_width="27.5dp"
android:layout_height="27.5dp"
android:layout_width="23.5dp"
android:layout_height="23.5dp"
android:layout_centerInParent="true"
android:layout_gravity="center" />
</FrameLayout>
</RelativeLayout>
<TextView

View File

@ -12,6 +12,7 @@ import android.view.animation.ScaleAnimation;
import android.view.animation.TranslateAnimation;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ViewFlipper;
import com.yunbao.common.R;
@ -29,7 +30,7 @@ public class FloatBannerView extends FrameLayout {
private View rootView;
private LinearLayout rootLayout;
private ViewFlipper homeBanner;
private FrameLayout bannerLayout1, bannerLayout2, bannerLayout3;
private RelativeLayout bannerLayout1, bannerLayout2, bannerLayout3;
private ClipPathCircleImage clipImage1, clipImage2, clipImage3;
private List<AnchorRecommendItemModel> list = new ArrayList<>();
//默认定时器时间
@ -97,18 +98,18 @@ public class FloatBannerView extends FrameLayout {
if (index == 0) {
ImgLoader.displayAvatar(getContext(), list.get(index).getAvatar(), clipImage1);
}
TranslateAnimation animationTranslate = new TranslateAnimation(0, -35, 0, 0);
ScaleAnimation scaleAnim = new ScaleAnimation(1f, 1.15f, 1f, 1.15f, bannerLayout3.getWidth() / 1.1f, bannerLayout3.getHeight() / 1.1f);
TranslateAnimation animationTranslate = new TranslateAnimation(0, -27, 0, 0.2f);
// ScaleAnimation scaleAnim = new ScaleAnimation(1f, 1.16f, 1f, 1.16f);
AnimationSet animationSet1 = new AnimationSet(true);
animationSet1.setFillAfter(true);
animationSet1.setDuration(750);
animationSet1.setDuration(700);
animationSet1.addAnimation(animationTranslate);
animationSet1.addAnimation(scaleAnim);
// animationSet1.addAnimation(scaleAnim);
AlphaAnimation animationAlpha = new AlphaAnimation(1, 0);
AnimationSet animationSet2 = new AnimationSet(true);
animationSet2.setFillAfter(true);
animationSet2.setDuration(750);
animationSet2.setDuration(800);
animationSet2.addAnimation(animationAlpha);
animationSet2.addAnimation(animationTranslate);
bannerLayout1.startAnimation(animationSet2);

View File

@ -26,8 +26,8 @@
<ImageView
android:id="@+id/search_del"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_width="23dp"
android:layout_height="23dp"
android:layout_gravity="end"
android:src="@mipmap/search_del" />
</FrameLayout>