Why startSubActivity method is undefined?

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Why startSubActivity method is undefined?

Postby zalek » Wed Jan 11, 2012 11:46 pm

I am leaning Android from "andbook! release.002" by Nicolas Gramlich located at:http://andbook.anddev.org.

I copied code from the book - it defines onClick() method:


Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                 public void onClick(View arg0) {
  2.                         Intent i = new Intent(  StartingSubactivities.this,
  3.                                                         MySecondActivity.class);
  4.                         startSubActivity(i, 0x1337);
  5.             }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

I am getting 2 compilation errors:
1. class StartingSubactivities is undefined
2. startSubActivity(i, 0x1337); method is undefined in my Activity program.

Any ideas why?

Thanks,

Zalek
zalek
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Jan 11, 2012 10:04 pm

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests