Launcher Custom Application distribution-High-imitation APUS desktop, pull-up loading application distribution radar effect, launcherapus
Directly add the code,
To extract image resources, go to APUS.
Xml:
<? Xml version = "1.0" encoding = "UTF-8"?> <Merge android: layout_width = "fill_parent" android: layout_height = "10020.dip" xmlns: android = "http://schemas.android.com/apk/res/android"> <TextView android: textSize = "16366sp" android: textColor = "# ffffffff" android: gravity = "bottom | center" android: id = "@ + id/intro" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: minHeight = "401_dip" android: text = "load more" android: singleLine = "false"/> <FrameLayout android: layout_gravity = "bottom | center" android: id = "@ + id/anim_view" android: clipChildren = "true" android: layout_width = "fill_parent" android: layout_height = "1001_dip"> <ImageView android: layout_gravity = "top | center" android: id = "@ + id/scan_meter" android: layout_width = "210.0dip" android: layout_height = "210.0dip" android: layout_marginTop = "-5.0dip" android: src = "@ drawable/folder_radar_center_meter" android: scaleType = "fitXY" android: contentDescription = "nil"/> <ImageView android: layout_gravity = "bottom | center" android: id = "@ + id/scan_indicator" android: layout_width = "146.0dip" android: layout_height = "73.0dip" android: src = "@ drawable/radar_scan_indicator" android: scaleType = "fitXY" android: contentDescription = "nil"/> </FrameLayout> </merge>
package com.xyz.workspace;import android.animation.Animator;import android.animation.AnimatorListenerAdapter;import android.animation.ValueAnimator;import android.content.Context;import android.util.AttributeSet;import android.view.View;import android.view.animation.LinearInterpolator;import android.widget.FrameLayout;import android.widget.ImageView;import android.widget.TextView;public class PromotionLoadingFooter extends FrameLayout {public PromotionLoadingFooter(Context context) {super(context);// TODO Auto-generated constructor stubinit();}public PromotionLoadingFooter(Context context, AttributeSet attrs) {super(context, attrs);init();}ValueAnimator valueAnimator;View anim_view = null;ImageView scan_meter = null;ImageView scan_indicator = null;TextView intro;private void init() {inflate(getContext(), R.layout.folder_promotion_loading_footer, this); anim_view = findViewById(R.id.anim_view); scan_meter = ((ImageView) findViewById(R.id.scan_meter)); scan_indicator = ((ImageView) findViewById(R.id.scan_indicator)); intro = ((TextView) findViewById(R.id.intro));}public void startAnima(){anim_view.clearAnimation();scan_meter.clearAnimation();scan_indicator.clearAnimation();intro.clearAnimation();valueAnimator= ValueAnimator.ofFloat(new float[] { 0.0F, 1.0F });valueAnimator.setDuration(1200L);valueAnimator.setInterpolator(new LinearInterpolator());valueAnimator.setRepeatCount(6);valueAnimator.setRepeatMode(1);AnimatorListenerAdapter local1 = new AnimatorListenerAdapter() {public void onAnimationEnd(Animator paramAnimator) {}public void onAnimationRepeat(Animator paramAnimator) {}public void onAnimationStart(Animator paramAnimator) {scan_meter.setPivotX(scan_meter.getWidth() / 2);scan_meter.setPivotY(scan_meter.getHeight());scan_indicator.setPivotX(scan_indicator.getWidth() / 2);scan_indicator.setPivotY(scan_indicator.getHeight());}};ValueAnimator.AnimatorUpdateListener local2 = new ValueAnimator.AnimatorUpdateListener() {public void onAnimationUpdate(ValueAnimator paramValueAnimator) {float f = ((Float) paramValueAnimator.getAnimatedValue()).floatValue();scan_indicator.setRotation(f * 360.0F);}};valueAnimator.addListener(local1);valueAnimator.addUpdateListener(local2);intro.setVisibility(View.GONE); valueAnimator.start();}}