2

Just I have created graph chart using Chart Engine Android I have used data from my database to use value for chart. Now I have one activity which is main to display graph chart with left menu options. So Whenever i am calling chart activity its going to show its own activity sepratly. I want to embed that chart activity with my main activity with left menu options. Is it possible? I am using android 4.0 How to solve this task? Please help me friends.

Mr. Sajid Shaikh
  • 7,051
  • 4
  • 21
  • 35
  • Finally found answer on this link which i am looking for:: http://stackoverflow.com/questions/4062161/android-i-am-using-achartengine-library-for-graphs-but-not-able-to-integrate-a – Mr. Sajid Shaikh Jun 14 '12 at 10:00

3 Answers3

3

It sounds like your application would benefit from using Fragments The developer site has some very good information you should read.

Dazzy_G
  • 820
  • 9
  • 22
2

You can't embed an Activity into another in Android, as Activities are meant to be independent objects.

Since android 3.0, you can use Fragments, which are Activities sub-elements, which you can combine in many different way. For example having your Activity using one left fragment to display a list of items and a right fragment to display the details of the selected item.

You should take a look at the Fragements documentation to implement this in your application.

XGouchet
  • 10,002
  • 10
  • 48
  • 83
-1

Try Activity Group. http://developer.android.com/reference/android/app/ActivityGroup.html

fahms
  • 165
  • 2
  • 10
  • 2
    Please don't, if at all avoidable. ActivityGroup is deprecated and should not be used any more, and for good reasons. You can use Fragments even on pre-3.0 devices by using the support library. – Timo Ohr Jun 13 '12 at 10:41