あなたはあなたの第二の画像にモーフィングあなたの最初の画像のいくつかの連続するフレームを作り、バック、そしてanimation-list
としてそれらを定義し、
button_frames.xmlのonCreateでアニメーションを開始することができます
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/frame1" android:duration="100" />
<item android:drawable="@drawable/frame2" android:duration="100" />
....
レイアウト:
<ImageView android:id="@+id/button"
android:background="@drawable/button_frames"/>
のOnCreate:
ImageView button= (ImageView)findViewById(R.id.button);
mAnimation = (AnimationDrawable) animationView.getBackground();
button.postDelayed(new Runnable() {
public void run() {
mAnimation.start();
}
}, 100);
出典
2013-05-28 20:33:54
msh
あなたがアニメーションを使用し、あなたのアルファトランジションとアニメーション 'XML'ファイルを作成し、設定することができます'ImageButton' – kabuto178