스플래시 화면을 만들었지 만 내 앱을 실행하면 스플래시 화면이 표시되지 않고 검은 색 화면 만 표시됩니다. 그러나 스플래시 화면 타이머가 끝나면 메뉴가 나타납니다. 내 splashscreen.xml의 그래픽 레이아웃에서 스플래시 화면 이미지가 표시됩니다. 그러나 달릴 때, 그것은이지 않는다. 모든android Eclipse 스플래시 화면 이미지가 보이지 않습니다.
코드 myMain.java을 위해 ... 나의 시작 화면을 제외하고 정상입니다 : 내 main.xml에 대한 myMenu.java
package com.immrroj.firstapp;
import android.app.Activity;
import android.os.Bundle;
public class myMenu extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
코드
package com.immrroj.firstapp;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class myMain extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.splashscreen);
Thread splashtimer = new Thread()
{
@Override
public void run()
{
try
{
int timer = 0;
while (timer < 5000)
{
sleep(100);
timer = timer + 100;
}
startActivity(new Intent("com.immrroj.firstapp.CLEARSCREEN"));
} catch (InterruptedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
finally
{
finish();
}
}
};
splashtimer.run();
}
@Override
protected void onDestroy()
{
// TODO Auto-generated method stub
super.onDestroy();
}
@Override
protected void onResume()
{
// TODO Auto-generated method stub
super.onResume();
}
@Override
protected void onStart()
{
// TODO Auto-generated method stub
super.onStart();
}
@Override
protected void onStop()
{
// TODO Auto-generated method stub
super.onStop();
}
}
코드
<?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:orientation="vertical"
android:background="@drawable/mymenu">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PRESS ME!!"
android:textSize="19dp"
android:textStyle="bold"
android:width="200dp" android:layout_gravity="right"/>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PRESS ME TOO!"
android:gravity="center"
android:textSize="19dp"
android:textStyle="bold" android:width="200dp" android:layout_gravity="right"/>
</LinearLayout>
내 splashscreen.xml 코드 .... 이미지 안드로이드 플랏이 표시되지 않습니다.
내 안드로이드 매니페스트에 대한<?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:orientation="vertical" >
<ImageView
android:src="@drawable/androidsplash"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>
코드 : 좋아 ... 내가 생각 :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.immrroj.firstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:name=".myMain" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:label="@string/app_name"
android:name=".myMenu" >
<intent-filter >
<action android:name="com.immrroj.firstapp.CLEARSCREEN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
는 help..although 내가
이UPDATE .... 정말 나를 귀찮게한다, 계속하시기 바랍니다 코드에 손을 대지 않고도이 문제를 해결하는 것이 정말 어렵습니다. 그래서이 링크를 게시하면 누구나 코드를보고 땜장이로 찍을 수 있습니다 ... 제발 도와주세요 ... 나는 안드로이드를 배우기 위해 열심히 노력하지만 여기에 갇혀 있습니다. .. 여기에 소스 코드를 다운로드하면 맹세 대상이됩니다. https://skydrive.live.com/redir.aspx?cid=79ecba5b079a1b4c&resid=79ECBA5B079A1B4C!293&parid=79ECBA5B079A1B4C!113&authkey=!AK8-cta_tThQUms
스플래시 XML 레이아웃에 텍스트가있는'TextView'를 넣을 수 있습니까? 내 추측은 당신의 이미지가 보이지 않는 것입니다. – inazaruk
먼저 이미지를 제거하고 textview를 넣으십시오 ... 그러나 텍스트는 스플래시 화면로드 중 표시되지 않습니다 .... TT –