欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

android實(shí)現(xiàn)Splash閃屏效果示例

 更新時(shí)間:2016年08月12日 15:14:30   作者:與時(shí)俱進(jìn)  
這篇文章主要介紹了android實(shí)現(xiàn)Splash閃屏效果的方法,涉及Android中postDelayed方法及AndroidManifest.xml權(quán)限控制的相關(guān)使用技巧,需要的朋友可以參考下

本文實(shí)例講述了android實(shí)現(xiàn)Splash閃屏效果的方法。分享給大家供大家參考,具體如下:

Java代碼:

public class Splash extends Activity{
  private final int SPLASH_DISPLAY_LENGHT = 1000;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.splash);
    new Handler().postDelayed(new Runnable(){
      @Override
      public void run() {
        // TODO Auto-generated method stub
        Intent mainIntent = new Intent(Splash.this, Application.class);
        Splash.this.startActivity(mainIntent);
        Splash.this.finish();
      }
    }, SPLASH_DISPLAY_LENGHT);
  }
}

AndroidManifest.xml

Xml代碼:

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".Application" android:label="@string/app_name">
      <intent-filter>
        <action android:name="android.intent.action.DEFAULT" />
        <category android:name="ndroid.intent.category.VIEW" />
      </intent-filter>
    </activity>
    <activity android:name="Splash" android:label="@string/app_name">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
</application>

PS:這里再為大家提供一個(gè)關(guān)于AndroidManifest.xml權(quán)限控制的在線查詢工具:

Android Manifest功能與權(quán)限描述大全:
http://tools.jb51.net/table/AndroidManifest

更多關(guān)于Android相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《Android編程之a(chǎn)ctivity操作技巧總結(jié)》、《Android視圖View技巧總結(jié)》、《Android操作SQLite數(shù)據(jù)庫技巧總結(jié)》、《Android操作json格式數(shù)據(jù)技巧總結(jié)》、《Android數(shù)據(jù)庫操作技巧總結(jié)》、《Android文件操作技巧匯總》、《Android編程開發(fā)之SD卡操作方法匯總》、《Android開發(fā)入門與進(jìn)階教程》、《Android資源操作技巧匯總》及《Android控件用法總結(jié)

希望本文所述對大家Android程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評論