我有两个类Splash.java
和Activity2.java
!!我曾尝试过简单的泼溅代码:初始屏幕没有显示
public class Splash extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread thread= new Thread()
{
@Override
public void run()
{
super.run();
startActivity(new Intent(Splash.this,Trial.class));
finish();
}
};
thread.start();
}
}
在我的清单中,我也给出了条目。我的代码没有错误地运行。 R.layout.splash
的代码如下:
<?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:gravity="center_horizontal"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/d"
android:layout_gravity="center"/>
</LinearLayout>
谢谢!!
请重新格式化您的代码and.give更多细节。而不是新的线程尝试postDelayed(Runnable,它) – 2010-11-02 07:08:30