android - Locating style animation for ImageView -


i'm trying create animation imageview shows picture below (collected on stackoverflow). want because want shows when location locating. i've tried find keywords couldn't found anything. thanks.

enter image description here

you can use wavedrawable library. available in github sample projects.

https://github.com/alexrs95/wavedrawable

compile 'me.alexrs:wave-drawable:1.0.0'

import android.app.activity; import android.graphics.color; import android.os.bundle; import android.view.menu; import android.view.menuitem; import android.view.view; import android.view.animation.interpolator; import android.widget.adapterview; import android.widget.arrayadapter; import android.widget.imageview; import android.widget.spinner; import me.alexrs.wavedrawable.wavedrawable;   public class mainactivity extends activity {  private wavedrawable wavedrawable;      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);          imageview imageview = (imageview) findviewbyid(r.id.image);  wavedrawable = new wavedrawable(color.parsecolor("#8e44ad"), 500);         imageview.setbackgrounddrawable(wavedrawable); interpolator = new linearinterpolator();  wavedrawable.setwaveinterpolator(interpolator);         wavedrawable.startanimation();  }       @override     public boolean oncreateoptionsmenu(menu menu) {         // inflate menu; adds items action bar if present.         getmenuinflater().inflate(r.menu.main, menu);         return true;     }      @override     public boolean onoptionsitemselected(menuitem item) {         // handle action bar item clicks here. action bar         // automatically handle clicks on home/up button, long         // specify parent activity in androidmanifest.xml.         int id = item.getitemid();         if (id == r.id.action_settings) {             return true;         }         return super.onoptionsitemselected(item);     }  } 

Comments

Popular posts from this blog

javascript - Hide toolbar of pdf file opened inside iframe using firefox -

Ansible - ERROR! the field 'hosts' is required but was not set -

Copy range with conditional formatting -