Directly on the code,
Need picture resources, please go to apus inside to extract.
Xml:
<?xml version= "1.0" encoding= "Utf-8"? ><merge android:layout_width= "Fill_parent" android:layout_height= " 100.0dip "xmlns:android=" http://schemas.android.com/apk/res/android "> <textview android:textsize=" 16.0sp "Android:textcolor=" #ffffffff "android:gravity=" Bottom|center "android:id=" @+id/intro "an Droid:layout_width= "Fill_parent" android:layout_height= "wrap_content" android:minheight= "40.0dip" 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" an droid:layout_height= "100.0dip" > <imageview android:layout_gravity= "Top|center" Androi D: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" Androi D: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 ();}}
Launcher custom application Distribution-high imitation apus desktop, pull-up loading application distributed radar effect