1

私はこのようなレイアウトを持っています:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@android:color/white"
    android:gravity="center"
    android:orientation="vertical" >

    <LinearLayout android:id="@+id/linearLayout1"
        android:layout_width="fill_parent" android:orientation="vertical"
        android:layout_height="fill_parent" android:weightSum="1">

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/who" 
            android:layout_gravity="center"
            android:layout_weight="0.3"/>



    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Presents"
        android:textColor="@color/color1"
        android:textAppearance="?android:attr/textAppearanceLarge" 
        android:layout_gravity="center"
        android:layout_marginTop="20dp"
        android:layout_weight="0.1"
        />

    <ImageView
        android:id="@+id/imageView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/logo"
        android:layout_gravity="center"
        android:layout_weight="0.6" 
        />
</LinearLayout>
</LinearLayout>

およびアクティビティ:

package com.n;

import android.app.Activity;
import android.os.Bundle;

public class MyMainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
    }
}

私が欲しいのは、X秒後に、ズーム遷移アニメーションを使用して最後のイメージビューに別の画像を表示することです。可能です?tnx!!!

4

1 に答える 1

0

はい、スケールアニメーションでこれを行うことができます

このようなものにする必要があります (スケール アニメーションの値について 100% 確信があるわけではありませんが、それで遊ぶことはできます)

private static final int DURATION = "put here duration...";
private static final int OFFSET = "put here offset...";


ScaleAnimation zoomAnimation = new ScaleAnimation(0.1f, 1.0f, 0.1f, 1.0f, 0.5f,0.5f);
zoomAnimation.setDuration(DURATION);
zoomAnimation.setStartOffset(OFFSET); 
newImageView.startAnimation(zoomAnimation);
于 2012-10-03T16:27:57.850 に答える