package com.aide.trainer.myapp;
import android.app.*;
import android.os.*;
import android.view.*;
import android.view.animation.*;
public class MainActivity extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Set main.xml as user interface layout
setContentView(R.layout.main);
}
/** Called when the new exit button is clicked. */
public void onExitButtonClick(View view)
{
finish();
}
/** Called when the new drop button is clicked. */
public void onDropButtonClick(View view)
{
// Do some fancy animation...
TranslateAnimation animation = new TranslateAnimation(0, 0, 0, 1000);
animation.setDuration(1000);
view.startAnimation(animation);
/*
TranslateAnimation animation = new TranslateAnimation(0, 0, 0, 1000);
animation.setDuration(1000);
view.startAnimation(animation);
*/
//以上這三行代碼有何作用?
}
public void onAppButtonClick(View view)
{
}
}
uj5u.com熱心網友回復:
上面有一行英文注釋呢,就執行一些自己想要的影片,uj5u.com熱心網友回復:
第一行告訴你什么影片,第二行影片執行多長時間,第三行view中開始執行這個影片uj5u.com熱心網友回復:
你這個是值影片第一行:這些值影片物件的傳遞引數是可變引數,你現在使用的是移動影片,前兩個引數是左上角坐標,后兩個引數是右下角坐標
第二行:影片的持續時間
第三行:通過view的啟動影片方法啟動影片
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/74138.html
標籤:Android
上一篇:求解決 謝謝哥哥姐姐
