Android :: Forward Search Queries To One Single Activity
Dec 15, 2009
have an activity handling search (ACTIVITY_1), which works perfectly when I use the search (via SEARCH button on the phone) within/from this activity. However, when I use search from another activity (ACTIVITY_2..x) by implementing onNewIntent and forward the query string to my Search_Activity.class (ACTIVITY_1) it always pauses ACTIVITY_2 first and then goes to onCreate() of ACTIVITY_2..................
View 5 Replies
Dec 15, 2009
I have an activity handling search (ACTIVITY_1), which works perfectly when I use the search (via SEARCH button on the phone) within/from this activity. However, when I use search from another activity (ACTIVITY_2..x) by implementing onNewIntent and forward the query string to my Search_Activity.class (ACTIVITY_1)
@Override
protected void onNewIntent(Intent intent) {
Log.i(TAG, "onNewIntent()");.....................
View 1 Replies
View Related
Jun 1, 2010
I have two activities: a MainListActivity, and a DetailViewActivity. DetailViewActivity is set with android:launchMode="singleTop".
When clicking an item in the "main list" activity, it launches the "detail view" activity via:
startActivityForResult(detailIntent, REQUEST_CODE_DETAIL);
If I then call setResult(RESULT_OK, resultData); and finish(); from within the Detail activity, that resultData is received by the "main list" activity's onActivityResult(..) method correctly.
However, if I implement a "see previous"/"see next" type of navigation within the Detail activity, and implement it using singleTop, that result no longer gets sent back to the initial activity:
Intent nextItemIntent = this.createIntent(nextId);
nextItemIntent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
startActivity(nextItemIntent);
// at this point, my DetailActivity's onNewIntent() method is called, and the new data is loaded properly
But from here, when I call setResult(..) and finish(), my MainList activity never receives the new/updated result. Anyone know what I'm doing wrong?
View 1 Replies
View Related
Feb 3, 2009
I need to have 2 launcher activities (i.e. 2 icons on the home screen). Each launch icon would launch a separate activity. Essentially, I need a single apk which contains a suite of 2 apps which I don't want to distribute separately. Is this possible?
View 6 Replies
View Related
Oct 4, 2010
In my application if i press a button map is loaded in my layout.again i press the button i got error like this.
only one map is added to a single map activity . how to solve this.
View 1 Replies
View Related
Apr 5, 2010
I want to have multiple listviews in single activity. But only one listview should be displayed at one time. The listviews will be loaded dynamically. So, how can I fill all the four listviews at the same time and display only one?
View 4 Replies
View Related
Oct 29, 2010
I have been trying to get a specific layout for more than two days now and really struck with it, what am trying to achieve is: To have a layout like the following
LISTVIEW A
VIEW
LISTVIEW B
VIEW
LISTVIEW C
(VIEWS are basically for headers) Can any one help to sort out this task?
View 1 Replies
View Related
May 13, 2010
I've more than one Handlers in an Activity. I create all the handlers in the onCreate() of the main activity. My understanding is the handleMessage() method of each handler will never be called at the same time because all messages are put in the same queue (the Activity thread MessageQueue). Therefore, they will be executed in the order in which are put into the Queue. They will also be executed in the main activity thread. Is this correct ? Code...
View 1 Replies
View Related
Mar 12, 2010
I have a TabActivity. Each tab points to a sub activity. Works great.
Is there any clever way to refresh one of the activity tabs? I just want to 'restart' the activity in tab #3 for example. Not sure of a good way to do this other than building in refresh support to the activity itself, or clearing ALL the tabs and recreating all of them.
View 1 Replies
View Related
Oct 29, 2010
i have three imagebuttons.and on clicking each buttons a new image with new screen opens.means three imagebuttons calls three different activities. it means if you have ten buttons we have to call 10 activities. i want to call the common activity on each button clicked using if else construct.
View 2 Replies
View Related
Jun 12, 2010
I want to know if we can display multiple activities in a single activity using ActivityGroup.Can anyone please help me out with this?
View 1 Replies
View Related
Oct 4, 2009
Before asking my doubt, let me clarify my understanding of allowTaskReparenting...
Suppose there exists a Task (say Task 1) and this task has an activity (say Activity 1) which wants to call my Activity (say Activity 2). Let my activity (activity 2) set the attribute allowTaskReparenting to true and let my activity have a specific taskAffinity(affinity1). When Activity1 calls my activity (activity2), my activity becomes part of the task1. But suppose another task (task2) is already present/created with the same taskAffinity as mine (affinity1) and an activity in that task (say activity3) tries to start my activity, my activity gets re- parented to task2.
Not sure if i was clear enough. If i were to rephrase my words...
If my activity has allowTaskReparenting set to true and an instance of my activity is already present in task1. If task2 with the same task affinity as my activity tries to start my activity, the EXISTING activity gets re-parented from task1 to task2.
My quesions:
(1) Is my understanding correct ?
(2) If I am correct then a single instance of my activity gets shifted from task1 to task2. So 2 activity objects of my activity are NOT created.
View 5 Replies
View Related
Jun 16, 2009
I want to customize my ExpandableList my issue is i need a button and expandable list on single activity can i achieve that as i have seen all the examples they all extends ExpandableListActivity not the Activity in which i can put all the widgets in one activity
View 1 Replies
View Related
Sep 7, 2010
I have two activities. A and B. A starts B. Both are running in the screen and both are visible. Say now B is visible.
On a special key press, I want to bring the A to the front and make it active. The problem I am facing is when the special key is pressed, another instance of A is launched and the new instance is brought to the front.
But I want the original A to come to the front. I want to make this change in the framework layer rather than application specific by using the singleInstance theme in the launchMode in AndroidManifest file.
Please help me in this regard as this is really urgent for me. Any inputs will be really valuable for me.
View 1 Replies
View Related
Oct 7, 2010
I want to use addIntentOptions to drive my menus when ever possible. This seems the cleanest way to provide them. Rather than explicitly detailing activities, simply ask for a menu listing all the activities which are available for my data item.So I'm trying to put together a context menu for a List View. It works great. Only problem is that I have an activity that has two intents that consume my data type, and only the first shows up.The activity in question in Android Manifest.xml
<activity android:name=".ui.MyActivity" android:label="The title">
<intent-filter android:label="First context label">
<action android:name="com.sample.action.FIRST_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.ALTERNATIVE" />
<category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
<data android:scheme="myscheme" />
</intent-filter>
<intent-filter android:label="Second context label">
<action android:name="com.sample.action.SECOND_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.ALTERNATIVE" />
<category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
<data android:scheme="myscheme" />
</intent-filter>
</activity>
View 1 Replies
View Related
Nov 7, 2010
Basically what I am trying to accomplish is I want a canvas I can pass bitmaps to, to be displayed on the screen with the rest of my view objects (buttons, textviews, etc).
View 1 Replies
View Related
Oct 7, 2010
I wish to have a single class which all of my Activity classes extend. I have ListActivities, Activities, MapActivities, TabActivities, etc in my App.
I have many of these different activities in my app, ~12 activities. I want each of them to have the methods which are in the parent class.
Right now, i have created 4 parent activity classes which are extended from a certain activity depending on their type(ListActivity, Activity, MapActivity, TabActivity)
I am creating a lot of redundant code - each of the 4 parent activities has almost identical code, in exception for what class activity it extends.
Here is an example that may clarify what my problem is:
I have an Activity: MenuScreen which extends BaseListActivity BaseListActivity extends ListActivity BaseListActivity contains methods and fields which i want all my activities to have access to I have another Activity: HomeScreen which extends BaseActivity BaseActivity extends Activity BaseActivity contains the same methods and fields which are in my other Base[<type>]Activity classes(such as BaseListActivity)
These methods/fields are copy-pasted to all my Base[<type>]Activity, and seems awfully redundant to me.
Can i create a master activity class which all types of Activity classes can use as its parent? if not, am i stuck with copy and pasting this code and feeling gross/dirty about it?
View 2 Replies
View Related
Apr 5, 2010
I want to have multiple listviews in single activity. But only one listview should be displayed at one time. The listviews will be loaded dynamically. So, how can I fill all the four listviews at the same time and display only one.
If anyone knows the solution then please share it over here. I hope to get a quick response.
View 1 Replies
View Related
Mar 2, 2010
I want to display the Search Box in an activity. But I am not able to get it implemented it properly.
Can anyone provide me with a simple demo of implementing it. I have tried using API Demos example but the Search box just dont appear. I don't know what is the problem. What I want is the Searchbox at the top of the screen and below is the other UI needed for that Activity.
View 2 Replies
View Related
Nov 3, 2010
I want to add a search bar in my activity. I have some lat long stored in a vector and i want to search a lat long using search bar and want to animate map to that point.
How to do this?
View 1 Replies
View Related
Oct 24, 2009
I have a package with two activities
1. A main activity 2. A search activity
The search activity is invoked by a search suggestion provider in two possible ways
1. By clicking directly on a suggestion invoking the search activity through a VIEW action 2. By clicking on the explicit search icon invoking the activity through SEARCH action
If it is invoked through SEARCH I stay on the search activity and show some text to the user. Now when I click the back button I go back CORRECTLY to the home page.
ODD Behaviour: However if I came to the search activity through the VIEW, I invoke a browser activity and call finish() on the search activity. Now I have the browser in my view. If I now go back I would expect to go back to teh device home page. But from now where the "main activity" is showing up.
I see in the logcat a message from ActivityManager indicating
moveTaskToBack: 8
I have tried various flags to invoke the browser activity the tried flags include new task previous is top and I have also tried both a singleTop and otherwise with the SearchActivity as well. Same end result.
View 2 Replies
View Related
Sep 24, 2010
I am not using a SearchManager, but I have built my own custom search activity. I want this to be shown when the user clicks on the Search button. How can I do this?
View 3 Replies
View Related
Oct 8, 2009
The 1.5 AVD doesn't seem to follow the documentation in: http://developer.android.com/reference/android/app/SearchManager.html
which says it's enough to call onSearchRequested() to call the search activity. I need to call startSearch() to make it work. However, when I check the source code of Activity.java, onSearchRequested() does call startSearch().
This works in 1.6.
Is this a bug in 1.5, or did I miss something?
View 5 Replies
View Related
Nov 11, 2009
By default, if we long press search key it opens quick search box with the keypad slided up. what should be done if I want to change this default action to launching of an application when ever search key is long pressed. This obliviously requires changes in the framework. i tried changing some code in Search dialog.Java file but we can't use Start Activity there. pls guide.
View 2 Replies
View Related
Nov 18, 2010
Activity A is main activity. Whereas Activity B is SearcActivity (Search Manager). Activity B is List Activity, so whatever result comes, result is displayed in the list. Once user clicks on the list, I want to get that list selected item to be returned to ActivityA.What I did. Code...
View 3 Replies
View Related
Aug 25, 2010
I have a tab host with two tabs. I want one of those tabs to be a search screen. The content for the tab is a ListActivity. I'm pulling the content from a web service. My problem is, when I execute the search a new intent is pushed onto the screen. I've used the android:launchMode="singleTop" property in my manifest for the search activity. What that seems to have done is, once the new intent is pushed on top of the TabActivity, every time I run the search it reuses that intent. But I want the already existing intent which is set as the tab's content to be the one it uses.
View 3 Replies
View Related
May 27, 2009
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.
View 4 Replies
View Related
Dec 9, 2009
I would like to start MyActivity class when the user clicks on the search button on the handset.
Are there any strategies you can suggest for this? Any code examples would be very useful.
View 1 Replies
View Related
Mar 16, 2010
I am running cts test cases on eclair . I've done with : . build/envsetup.sh; lunch 1; make cts
That compiled my all cts test cases. Apk's for that all have been installed in $(ANDROID_BUILD_TOP)/out/target/product/generic/data/app :
few of these are : CtsDatabaseTestCases.apk , ApiDemos.apk etc.
Now I start my emulator :: ./emulator &
I "adb push " to all apk's to my emulator .
Now my query is how to run these apk's on device /emulator ?
View 5 Replies
View Related
Dec 27, 2009
Can anyone point me to a good example where a AsyncTask queries a local SQLite database and then updates the UI successfully. I have a database which I query using doInBackground... create a new custom SimpleCursorAdapter (overriding onViewBind), return the adapter (SimpleCursorAdapter), then in postExecute() create ListView adapter which is set to the the SimpleCursorAdapter, that was returned, then I set the listview adapter using SetAdapter(adapter);...
For some reason I throw an exception on fillWindow.java:200....
View 2 Replies
View Related