0

I have bit idea about Fragment but not in depth.I want to call FragmentActivity from Simple Activity via Intent.

My two File are as below,

  • EventMain.java (extend Activity)
  • EventDetail.java (extend FragmentActivity)

I am able to Run this if both Class extend Activity.

Intent i = new Intent(EventMain.this, EventDetail.class);
TabGroupActivity parentActivity = (TabGroupActivity) EventMain.this.getParent();
i.putExtra("event_id", EventId.get(position));
parentActivity.startChildActivity("Event_Detail", i);

But i want to integrate Google Map in EventDetail.java so i must have to extend FragmentActivity.

Right now i am calling same Intent as above and getting

java.lang.RuntimeException: Unable to start activity ComponentInfo{my_package}: java.lang.ClassCastException: android.support.v4.app.NoSaveStateFrameLayout

I got some Link but don't know how to manage with TabHost(TabGroupActivity)

Update :

Recently i get this

How to start an intent that extends fragment, from a class that extends Activity?

Its okay with simple activity but how to call under TabHost

Please Guys Help me & Guide me on right way to achieve this.

Community
  • 1
  • 1
Chintan Khetiya
  • 15,962
  • 9
  • 47
  • 85

1 Answers1

0

You must know that a FragmentActivity is an Activity, so you can start an Activity as a normal one. So as the post you've linked says:

Intent intent1 = new Intent(EventMain.this, EventDetail.class);
startActivity(intent1);

Try to do that and tell us your result.

gutiory
  • 1,135
  • 5
  • 13
  • 33
  • as i have mention in my question if i am calling same as way then getting error and that error is also post in my question link – Chintan Khetiya Apr 16 '13 at 12:22