0
我是相當新的Droid和我一直在跳動我的頭試圖找出如何創建這個動畫循環,我希望它看起來像這樣...卡住如何使我的機器人動畫連續
我一直在試圖創建3個背靠背該幻燈片由一個連續正確的translateanimations。我能拿到第一的ImageView動畫像我想,但我很爲難什麼就添加到我的代碼來獲取其他動畫背後動畫以及
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView image1 = (ImageView) findViewById(R.id.nescontroller);
ImageView image2 = (ImageView) findViewById(R.id.segacontroller);
ImageView image3 = (ImageView) findViewById(R.id.pscontroller);
TranslateAnimation anim1 = new TranslateAnimation(0, 500, 0, 0);
anim1.setDuration(2000);
anim1.setRepeatCount(Animation.INFINITE);
image1.startAnimation(anim1);
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<ImageView
android:id="@+id/ee"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/e" />
<ImageView
android:id="@+id/dd"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/d" />
<ImageView
android:id="@+id/pscontroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/c" />
<ImageView
android:id="@+id/segacontroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/b" />
<ImageView
android:id="@+id/nescontroller"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/a" />
</RelativeLayout>
任何幫助或建議,將不勝感激