私のアプリのスプラッシュ画面が表示されません。白い背景のみが表示されます。それから、次のページに行きます。私はstackoverflowで他の同様の質問を見ましたが、それは私を助けませんでした。 splash.xml:Androidのスプラッシュ画面が表示されない
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/splash">
</RelativeLayout>
コード:
public class Splash extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Handler handler=new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
Intent intent=new Intent(Splash.this,MainActivity.class);
startActivity(intent);
Splash.this.finish();
}
},2000);
}
}
たManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.jobinsabu.ohxee">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity"></activity>
</application>
</manifest>
投稿あなたの 'Manifest.xml' –
は今 – jobin
マニフェストincluded.Please私はあなたがロードしようとしていると思う、それ – jobin