0
SplashScreen.java-我想在啓動畫面中嵌入聲音。它必須在活動變化
package com.example.android.nxtgendataingestion;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import gr.net.maroulis.library.EasySplashScreen;
public class SplashScreen extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EasySplashScreen config=new EasySplashScreen(SplashScreen.this)
.withFullScreen()
.withTargetActivity(MainActivity.class)
.withSplashTimeOut(3000)
.withBackgroundColor(Color.parseColor("#ebedef"))
.withLogo(R.drawable.nxtgenlogo)
.withAfterLogoText("NxtGen Grafana Dashboard");
//Set Text Color
View view=config.create();
setContentView(view);
}
}
我在一個項目中,我想用.OGG擴展聲音剪輯這項活動的工作被停止,它必須停止時改投其他活動。
檢查這個https://stackoverflow.com/questions/3370211/how-to-play -audio-in-splash-screen-in-android和http://www.coderefer.com/android-splash-screen-example-tutorial/ 這可能會幫助你。 –