Oui, c'est possible. Ajoutez ce code dans l'Activité de votre application d'usure.
public class Animate extends Activity
{
Animation rotate;
@Override
protected void onCreate(Bundle savedInstanceState)
{
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.animate);
final WatchViewStub stub = (WatchViewStub) findViewById(R.id.mainmenu_viewstub);
stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener()
{
@Override
public void onLayoutInflated(WatchViewStub stub)
{
rotate = = AnimationUtils.loadAnimation(Animate.this,
R.anim.rotate);
ImageView tip = (ImageView) findViewById(R.id.tip);
//Write the below line of code to animate image at the place where you are getting the //notification.
tip.startAnimation(rotate);
}
});
}
}
rotate.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="600"
android:repeatMode="restart"
android:repeatCount="infinite"
android:interpolator="@android:anim/cycle_interpolator"/>
</set>
espère que cela vous aidera mon pote .. Merci ..
J'ai essayé cet échantillon mais il est toujours incapable d'afficher la rotation sur mes vêtements. En passant, je cours l'usure sur l'émulateur, est-ce important? – user3464646