Android :: ActivityGroup - Get Reference Of The LocalActivityManager
Aug 20, 2009I have a tab with an activitygroup as the intent of tab1.
My code of the activity(group):
CODE:..................
I have a tab with an activitygroup as the intent of tab1.
My code of the activity(group):
CODE:..................
I need a to create a layout that holds to other layouts. each one of the layout should be populated by a different activity.
I've done some research and came across the fact that I need to implement an ActivityGroup and use it's LocalActivityManager. problem is that I don't understand the View hierarchy in such a situation. a naive attempt to find the view of the parent window (simple findViewById) fails (returns NULL).
I can't find any examples on the web. have anyone done it before?
Is it possible to embed some external activities, lets say, com.android.calculator 2.Calculator in my activity?
i always get exception saying that my activity's uid != Calculator's uid. should i use some permission? or from security reasons its not possible at all?
About ActivityGroup or give me some hints on how to use it? I looked at the documentation but I wasn't able to understand how it works...
View 4 Replies View RelatedI want to add a MapActivity in an ActivtyGroup. As only single level inheritance is supported, my class can either extend from either MapActivity or ActivityGroup. As far as I know MapActivity is not a part of ActivityGroup. I want an activity to extend MapActivty as well be a part of an ActivityGroup.
View 2 Replies View RelatedSo I have a default searchable Activity in my app, and if I press the search button in simples activities it works. But when I'm in a tab where the content is an ActivityGroup, and not an Activity, the app crashes.
CODE:..............
Even if I add this code in my activityGroup, I'm still crashing :
CODE:.....................
I am using an ActivityGroup and when I finish a top-level Activity (e.g. with destroyActivity method) and display one from history, the getCurrentActivity method returns the last Activity - the finished one. I need to access currently displayed activity, which is actually shown.
View 1 Replies View RelatedI have one problem using ActivityGroup. I have two activities inside an ActivityGroup and both of them use a menu (overriding the onCreateOptionMenu and onOptionsItemSelected).
Well, the problem is that the second activity in the group doesn't show the menu when I press the menu Key. The first activity works fine showing the menu.
I have this code in child activity:
CODE:...........................
I'm trying to give my first steps on working with ActivityGroups. To be more specific, I have a parent activity with a layout containing several buttons, and another layout below them in order to add other activities' layouts by means of the "addView()" method. Well, everything works fine in functionality terms; but I'm experiencing a weird behavior inside the layout where other activities are kind of loaded into. A black line along the top border of the layout plus a slight shadow do appear when I run the application on the emulator. I have tried to play changing the paddings, margins, etc. with no success.
Has any of you experienced such weird behavior?
I'm trying to run an activityGroup embedded inside another activityGroup. (Example : an activityGroup inside a tabActivity)
This seems to display properly but throw an exception when i'm trying to display a modal box like an alertDialog.
CODE:............
If childActivity1 or 2 try to display a dialogBox i'm getting this exception :
CODE:......................................
I'm extending ActivityGroup class and implemented a custom tabHost and widgets for my app. Can someone shed a light on how are the Activities fife-time inside an ActivityGroup?.
Im getting a weird behavior when using the following code to send a new intent to the current sub-activity, then change tab, and getting back to original tab. (TAB1 -> TAB2 -> TAB1)
CODE:.......
What i see from debug..
onSaveInstanceState() is called on TAB1, then TAB2 is current subActivity, but when going back to TAB1 onCreate() is called.
onCreate() is not called with the same test without using the onNewIntent() described above.
I have 6 options to put in options Menu, but 3 of them are not so important and i want to hide them in submenu. All of my Activities are started from one ActivityGroup which creates Menu on MENU button press. Problem is that when I open SubMenu or Dialog (which is created and displayed by ActivityGroup) my current foreground activity makes onPause, onStop and onDestroy, and when I close this submenu (using "back" key) or dialog (by "ok" button for ex.) I don't have any response (onCreate, onResume) from any of my activities registered in LocalActivityManager.
View 3 Replies View RelatedI have a Activitygroup and some activities are part of it.
lets say Activitygroup is DetailsGroup which has a activity by name DetailsActivity.
On certail events DetailsActivity launches another activity ExtraActivity by calling startActivityForResult(intent, 2);
The extraActivity is launched it does its work and before calling finish() of it I am calling setResult(RESULT_OK,mintent);
By doing this I was expecting that the DetailsActivity's onActivityResult() would be called, but instead DetailsGroup activities' onActivityResult() is getting called.
Any idea what changes are required to get DetailsActivity's onActivityResult() called in above scenario?
I'll be brief. I have an application with the following Activities Schema:
A (ActivityGroup) | |__
B (Activity Group) | | | |__
C (Activity) | |__ ... (Other Activities) | |__
D (ListActivity) | | | |__
ListView with a custom adapter with two buttons per row
All the Activities shown on the "diagram" are displayed and visible in real time while the application is being executed.
I'm pushing new list elements from C to the ListView in D. And by clicking each row's buttons I'm trying to edit the data of the row by means of a dialog. The problem is when, in the dialog activity, I perform the setResult() and finish(); the D's onActivityResult() is never called, and I do not know why.
I am using an ActivityGroup to spawn multiple activities and switch views from within the same tab in a TabActivity.
When I press the back key this method is called inside my ActivityGroup
CODE:..............
This method allows me to keep a stack of my activities and go back to the previous one when the back key is pressed.
This is working well on all my nested activities, except on a ListActivity where a press on the back key will simply exit the application.
I have an ActivityGroup containing three embedded Activities (A, B and C). Sometimes I need to "destroy" A and B to start another one, D, and when D is finished, A and B are re-created. Is it possible? If so, how can I do it?
View 5 Replies View RelatedI have a tab bar and within one tab want to implement an activity flow (without leaving the tab screen). I tried to get this up with an ActivityGroup and it partly works, but certain commands like the onCreateOptionsMenu must be dispatched to the ActivityGroup child activity manually.
The main issue is that showDialog() in my child activity of the ActivityGroup fails with the following exception:
CODE:.............
How I can get the child activities fully working? I expect this to happen with more of the built-in activity methods and there is not much documentation for the ActivityGroup.
I'm trying to make an ActivityGroup which has it's own interface, which should be persistent between Activities.
I have it working for my own Activities. But when I try to launch a 3rd party activity (from it's Intent{action="ACTION_HOME", category="CATEGORY_LAUNCHER"}) I get a java.lang.SecurityException because the Activity I want to start does not have the same UID as the calling Activity. Does anyone knows how to cirumvent this?
I have an ActivityGroup with an embedded TabActivity and another simple Activity.
The TabActivity has three tabs, each one with a ListActivity.
When I try to start a search from a list (calling onSearchRequested()), I get a WindowManager$BadTokenException.
I've tried requesting focus in the list, but the same error occurred.
To be plain, the android / xml widget reference material is poor at best.Rather than approaching the controls from an xml point of view, its all driven from a class point of view, which is clunky when you want to figure out how to build a good xml UI.Is there any decent documentation with design in mind (tag names, attribute names, etc) or is it just figure it out and struggle through the best you can? I'm on my 2nd android app and losing patience with hunting and pecking for the correct attributes / tags.
View 2 Replies View RelatedIs there one? I have "Professional Android 2 Application Development" by Meier and "Teach Yourself Android Application Development in 24 Hours" by Darcy/Conder. Both are mediocre at best. Neither is a decent REFERENCE, but rather they are basically structured as tutorials, without nothing in the way of reasonably comprehensive API documentation (which also, BTW, is woefully inadequate on the android.com site). And no sort of in-depth discussion of the structure of the system, so one could perhaps understand it rather than simply using the (inadequate) cookbooks.
View 19 Replies View RelatedIs there any sort of xml reference?
I found this which turned out to be invaluable for me http://groups.google.com/group/android-developers/msg/d334017d72909c79
but I can't figure out how I was supposed to know how to do that, had I not found that post.
I know that the api reference has xml attributes listed for many of the classes... but what about xml tags? Where is it documented that I could build a shape using <padding>, <corners>, <solid> tags?
I'd really like to know where I can find such documentation.
I want to write an application that will log down whatever I type using the Android keyboard.
The purpose is to have a backup of all the keyboard entries.
Is it possible?
I have a custom view that needs a reference to the activity that created it.Dianne Hackborn said in another thread: >Give your view a reference to the activity (or a Java interface it implements) and call back through that. >Much much MUCH more efficient than sending a broadcast. >See all of the standard view and view subclass callbacks for examples.
View 9 Replies View RelatedHow i can get a reference to the digital keyboard? is the keyboard added to the activity? how i can set a other style to the keyboard? Where i get a documentation of the digital keyboard?
View 2 Replies View RelatedI have a jar that I need to reference from my Android project. I also have the src of the jar, so I could include it in the project itself. I was wondering if referencing a jar vs. compiling it in with the project using Dalvik makes any difference in terms of final Dalvik package size that gets generated.
View 1 Replies View RelatedI have an object that is used for calling callback functions ----- static jobject o;
I have assigned the callback function to that object through a pointer, env -----
o=env->NewGlobalRef(callback);
The same pointer, env, points towards the function CallVoidMethod( ) that uses JNI to reach to the java code.
env->CallVoidMethod(o, methodId, pDeviceId, deviceStatus, statusReason, connectionProgressInfo);
However on calling this function, the system is getting crashed, and VM says that it's an invalid reference to static jobject o and then it crashes.
My code is as follows :
CODE:..........................
Object getThisObjName= new Object();
I'd like to get the name of an object reference.
Is this possible via reflection in Android?
Where can i find a Reference Chooser like this: http://www.vogella.de/articles/Android/images/first46.gif
View 2 Replies View RelatedI am trying to get a reference to the android internal class PhoneWindow (android.policy.PhoneWindow) object from an application. I would like to call a method on it (specifically I would like to call getDecorView on PhoneWindow). How do I do this?
View 2 Replies View Related