-1
안녕하세요. 안드로이드에 안성맞춤 인 초보자입니다. 아래 코드로 시작 화면을 설정할 시간이 있지만 응용 프로그램이 아닙니다. 설치되어 NULL을 반환합니다. Android를 사용하고 있습니다. 4.1.2응용 프로그램이 설치되지 않고 아래 코드에 대한 Android에서 null을 반환합니다.
public class SplashActivity extends Activity {
//how long until we go to the next activity
protected boolean _active = true;
protected int _splashTime = 5000;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
// thread for displaying the SplashScreen
Thread splashTread = new Thread() {
@SuppressWarnings("deprecation")
@Override
public void run() {
try {
int waited = 0;
while(_active && (waited < _splashTime)) {
sleep(100);
if(_active) {
waited += 100;
}
}
} catch(InterruptedException e) {
// do nothing
} finally {
stop();
}
}
};
splashTread.start();
}
}
이 질문은 혼란 스럽습니다. 당신이 "설치되지 않았다"고 말할 때 당신은 무엇을 의미합니까? 두 번째로 강제 5 초 스플래시 화면을 사용하고 있습니까? 사용자 리뷰에 행운을 비네. – Geobits
나는 잠시 동안 화면을 활성 상태로 유지하고 비활성 상태로 유지하기를 원합니다. – user1764582