데이터베이스에 삽입하는 동안 스플래시 이미지가 표시되는 스플래시 화면이 내 애플리케이션에 있지만 스플래시 활동이 해당 뷰를 표시하지 않습니다. 아무에게도 발생하지 않았습니까?활동이 실행되지 않고 뷰가 표시되고 있습니다.
public class Splash extends Activity {
private ChannelDB mDB;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ImageView iv = (ImageView)findViewById(R.id.bg);
mDB = new ChannelDB(this);
try {
createDataBase();
} catch (Exception e) {
Intent intent = new Intent(this,HDtvs.class);
e.printStackTrace();
startActivity(intent);
this.finish();
Log.d("Splash","createDataBaseException");
}
}
public void createDataBase() throws Exception
{
try{
}catch (Exception e){
Log.d("splash","data insert exception");
e.printStackTrace();
Intent intent = new Intent(this,HDtvs.class);
startActivity(intent);
this.finish();
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/splash">
<ImageView android:id="@+id/bg"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/splash"/>
</LinearLayout>
미안, 잘못 제목과 설명, 난, 난 그냥, 미안에서 onCreate 방법에 creatData 일을 넣어 AsyncTask를 사용하지 않았고, 그것을 수정
당신이 선언에는 시작 화면 코드가 없습니다
AsyncTask 코드는 어디에 있으며 다음 활동을 어디에서 호출합니까? – havexz
AsyncTask는 어디에 실행 중입니까? – user370305
비동기 작업 코드를 추가 할 수 있습니까? – Mal