Hi all,
My code looks as follows..
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finish();
}
And my XML is
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_gravity="center"><Button android:id="@+id/Button01" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Button"
android:layout_gravity="center"
android:layout_marginTop="80px"></Button>
In my XML i had a button. Now what i want is After starting the activity i have to wait for 3 seconds and then the Activity has to be stopped..Through my code the Activity is stopped after 3 seconds. But am not seeing any Button when the activity is started..Only Black screen is appearing for 3 seconds..But i also want to display that button..can any one help with sample code..please...I am need of it..