Launcher Custom Application distribution-High-imitation APUS desktop, pull-up loading application distribution radar effect, launcherapus

Source: Internet
Author: User
Tags radar

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();}}



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.