Hi,
I am trying to use an intent from an inner class which should be
callable from different Activities/outer classes. I receive the
following compilation error: "The constructor Intent(InnerClass,
Class<OtherClass>) is undefined".
The code below illustrates what I am trying to achieve.
Any help would be greatly appreciated.
Thanks,
Alex
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public class OuterClass1 extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
...
new InnerClass(this);
...
}
}
public class OuterClass2 extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
...
new InnerClass(this);
...
}
}
public class InnerClass {
public InnerClass(Activity ac){
...
Intent i = new Intent(ac, FooBar.class); // This line compiles
// Next line doesn't compile - "The constructor Intent
(InnerClass, Class<OtherClass>) is undefined"
ac.startActivity(i);
...
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en