Thanks for the help but in this way the application stops ("the
application has stopped unexpectedly).
The problem is that B is a ListActivity (not a Activity)?
Here there is my code:
public class FileList extends Activity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
[...]
this.startActivity(new Intent(this, Browser.class));
}
}
class Browser extends ListActivity {
private List<String> directoryEntries = new ArrayList<String>();
private File currentDirectory = new File("/");
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
[...]
HELP!
On Sep 1, 1:25 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Alberto wrote:
> > Hi all,
> > I need a help: I've got an Activity that I use as splash screen (and
> > it works fine) and a ListActivity that represents the main application
> > (and it works fine too).
> > public class A extends Activity {
> > @Override
> > public void onCreate(Bundle icicle) {
> > super.onCreate(icicle);
> > setContentView(R.layout.main);
> > try {Thread.sleep(5000);} catch (Exception e)
> > {e.printStackTrace();}
> > //start(B)
> > }
> > }
> > public class B extends ListActivity {
> > [...]
> > }
>
> > How can I start the class B after the 5 seconds of pause?
>
> To have Activity A start Activity B, create an appropriate Intent and
> use startActivity(), such as:
>
> startActivity(new Intent(this, B.class));
>
> With regards to your five-second pause, I really really really really
> really really really recommend you get rid of that. :-)
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.1 Published!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---