Problem with activity group

by Laxmi Verma » Tue, 05 Apr 2011 00:03:07 GMT

Sponsored Links

I am using ActivityGroup class for one of my tab in my application.

1) There is a tab activity class calling the activitygroup class.

2) In activity group class i am calling one activity say Activity A which is
a list view.

3) On Activity A item click, I am calling another activity say Activity B.

I need to override the back button functionality in Activity A and Activity

The problem which I am facing is on Activity A it is successfuly calling the
overriden onBackButton method but on Activity B instead of overriding the
back button method, it is calling the Tab Activity's back button method.  I
am not sure why?
I even debugged the code and it never goes into the onbackbutton method of
Activity B.

To resolve this I even tried calling Activity A on back button press of tab
activity which is required.  But the flow come as it goes into activity A
and then from there it goes directly to the First Activity.

I am also using Alert Dialog Box in both of the activity and passing
getParent() as context in the Alert Builder Dialog Box.

Any help in this regard will be great.

Thanks & Regards,
Laxmi Verma


Re: Problem with activity group

by TreKing » Tue, 05 Apr 2011 01:01:53 GMT

 On Mon, Apr 4, 2011 at 11:03 AM, Laxmi Verma

That's a problem in and of itself. From what I've read around here,
ActivityGroup is pretty much a hack. Use Views in your Tabs or try the new
fragment stuff.

TreKing <> ; - Chicago
transit tracking app for Android-powered devices


Sponsored Links

Re: Problem with activity group

by Laxmi Verma » Tue, 05 Apr 2011 13:20:57 GMT


Can you please detail out about your reply.  I am unable to understand it.
Is there any other option available instead of ActivityGroup to change the
views in the tab.
If yes, then please provide some link or some code example on it.



Re: Problem with activity group

by TreKing » Tue, 05 Apr 2011 23:42:13 GMT

 On Tue, Apr 5, 2011 at 12:20 AM, Laxmi Verma

Yes, use Views or Fragments, as I said.

Look through the documentation for TabView or Fragment. You should find
plenty of info.

TreKing <> ; - Chicago
transit tracking app for Android-powered devices


Other Threads

1. ISO2022JP->UTF-8(unicode) conversion


"HT-03A" will be release to the market in Japan, I'm lookig forward to

Then I wonder whether String class support following charset type.

String unicode = new String(jis);
try {
     unicode = new String(unicode.getBytes("ISO2022JP"), "ISO2022JP");
} catch (Exception e) {
     unicode = "Undefined";

If String class doesn't support adove conversion funciton, are there
any class
those we can convert various charset types of Japanese to UTF8?


2. aapt error with Standard menu icons (resource is not public)

Oops, looks like some of the resources mentioned in that document
aren't exported in public.xml.  That's okay, you can still copy the
assets directly from the source and use them from your project's local
drawable directory.  Here's where most of the framework drawables are
coming from:;a=tree;f=core/res/res/drawable;hb=cupcake


Jeff Sharkey


3. Are the Google Ion Phones rooted?

4. How to add picture in Avatar in Contact on the emulator

5. Pass a javascript function to java using the webview addJavascripInterface

6. Multiple drawable name

7. IllegalStateException: get field slot from row 0 col 9 failed