Problem with activity group

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


Sponsored Links
 Hi,

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
B.

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 < http://sites.google.com/site/rezmobileapps/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


 Hi,

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.

Thanks!!






-- 



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 < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 



Other Threads

1. Shake Detector

Has anyone implemented an Android Shake Detector that works well on most 
phones?


I thought it would be fairly simple to implement but I keep getting false results. Basically, what I'm doing is setting up a sensor Listener, checking to make sure it is a SensorManager.SENSOR_ACCELEROMETER event, then only checking the event if the last event I received was more than 50 milliseconds ago (to try to reduce the amount of checking I do)... Then I look for 3 "Shakes" within 4 seconds... A "Shake" to me being a speed reading of over 1000 followed by a speed reading of less than 400 within 1 second. If I don't get three "Shakes" within 4 seconds then the counter is reset to zero. At times it seems to work well... but I continue to have instances where I just pick up the phone, and it triggers all three shakes, which makes very little sense to me.. because at other times, I can physically shake the phone quite hard, and not trigger all three shakes... As I said.. it works about 90% of the time correctly, but a 10% error rate is making the feature I want to implement useless. Anyone have a better formula or some links? Thanks.., Brad Gies ----------------------------------------------------------------------- Bistro Bot - Bistro Blurb http://www.bgies.com http://www.bistroblurb.com http://www.ihottonight.com ----------------------------------------------------------------------- Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead --

2. Issue with Full Text Search (FTS3) queries in SQL in Android 2.2 Froyo

Me too. And it happens on final build of 2.2, too :(



> 

3. Need help on verifying Bluetooth DUN Tethering on zoom2

4. problem of creating SQLite database on SDCard

5. Menu bhs Indonesia

6. Modify Your Kernel Configuration to Accommodate Android Drivers

7. FM Radio on N1, a light at the end of the tunne