Android :: Odd Behavior With A Search Activity

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.

Android :: Odd behavior with a search activity


Android :: Strange Activity Stack Behavior When Using Map Activity

Apr 23, 2010

I have the following activity structure in my application A simple "splash screen" activity is started when the application is fired up (let's call it "Splash"). This activity starts the main activity when the user presses a button (I will call it "Main"). Main can in turn start two activities from the menu. The first activity presents a simple form (let's call this one "Form"), the second is a MapActivity that presents a map (it is called "Map").
Main, Form, and Map are declared exactly the same in the manifest:
<activity android:name="fully qualified activity class"
android:screenOrientation="landscape"
android:configChanges="keyboard|keyboardHidden|orientation"
> <intent-filter>
<action android:name="android.intent.action.DEFAULT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter> </activity> When Main is active and I start Form and press "back", Main comes up again. Pressing "back" again brings up "Splash". Nothing strange here.Now comes the strange part: when I am in Main, start Map, and press "back", Main comes up as expected. But pressing "back" again just restarts Main. A second press on "back" is needed to bring me back to Splash!So it seems that starting the Map activity somehow results in Main ending up on the activity stack twice while starting the Form activity does not! Both Form and Map are started like this: start Activity(new Intent(this, MyActivity.class)); I don not catch the back key in any activity.Any clues on what is going on or how to debug this?

View 1 Replies View Related

Android :: Search Suggestions / Autocomplete OnClick Behavior

Mar 17, 2010

I cannot seem to dictate the behavior of the onClick function.When a suggestion is clicked, it fires off the intent immediately. Is there a way for it to instead of firing off the intent immediately,simply copy and paste the suggestion as part of the search string?Eg. when typing in J,o,h the suggestion "John" comes up. When I click "John" can it copy that text into the search bar instead of immediately processing the search with John?I'm assuming theres a simple configuration which I cant seem to find.I dont want to go extensively into catching the fired of intent and re-processing etc

View 2 Replies View Related

Android :: Behavior Of Activity For Cases

Mar 18, 2010

1. I want to know the behavior of activity for the cases where onStop and on Destroy were not called like low memory situations.
2. I was registered my handler in on Create() and unregistering in on Destroy, what is the behavior if other thread sends messages to the registrants after the activity was killed by android without calling on Destroy. I know that those handler were not removed by GC as they are still referring by the thread.
3. Also suggest me to handle the above situations.

View 3 Replies View Related

Android :: Search Box In Activity

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

Android :: Add A Search Bar In Activity?

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

Android :: How To Define An Activity For The Search Button

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

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 View Related

Android :: OnSearchRequested - Doesn't Call Search Activity In 1.5

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

Android :: How To Start Activity With Long Press Of Search Key?

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

Android :: Get Result From Search Manager To Main Activity

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

Android :: Tab Host - Property In Manifest For Search Activity

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

Android :: ActivityGroup - Embedded Activity Search Window

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

Android :: Start An Activity On Clicking Search Button On Droid Handset?

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

Android :: Android - Forward Search Queries To One Single Activity

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

Android :: Implement Search Like The Google Maps Address Search?

Aug 27, 2010

I would like to create a search in my app which acts like the map search in the Google Maps app. I have creates an an auto complete text view which updates dynamically based on the results of the Geocoder.GetLocationByName() Method. However the results retrieved from this function are really bad and not at all consistent with the text I pass to it. Is there a better method of doing this to achieve accurate results?

View 1 Replies View Related

Android :: How To Set Notifications Behavior On EVO?

Jul 13, 2010

Does anyone know how to set the notifications behavior on the EVO? Specifically with Google Talk? I would like the phone to beep at me only once when someone sends a google talk message, and then not ever again for the following messages until I unlock the phone's screen and reactivate the google talk app. I think it already works this way for email, but not for Gtalk. Can this be done? And, I already know that if I open up the chat session, the sounds shut off on successive messages. However I would like it to stop the beeping without opening the chat window.

View 1 Replies View Related

Android :: Search Context With Type To Search?

May 1, 2009

When implementing search in my application, I'm including some search context info depending on the activity where search is invoked. In one of those, I'd like to implement type-to-search as well, but the standard method of adding search context info doesn't work in that case... the onSearchRequested() method in the activity is never called. Is there any way to include search context info in a type-to-search invocation, or am I stuck with only the Search key and menu option?

View 2 Replies View Related

Android :: Customize Spinner Behavior

Apr 21, 2010

I want to customize the spinner behavior a little bit. I want to add a couple of buttons at the end of the drop down menu that is displayed when the user selects the control. Any idea how this could be done?

View 4 Replies View Related

Android :: Getting Right Highlighting Behavior In ListView

Sep 20, 2010

I have a ListView set up in single-choice mode like this:

<ListView android:id="@id/android:list"android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#ff444444" android:layout_weight="1"
android:drawSelectorOnTop="false" android:choiceMode="singleChoice" android:scrollbars="vertical"
android:headerDividersEnabled="true"/>

When I press my finger on a choice, the selection changes from white text on light gray to black text on orange. But as soon as I lift my finger, the selection reverts to the original state. I'd like that chosen row to remain in the black-text-on-orange mode when I lift my finger so that the user knows what was selected in the list (my onClickListener has captured the selected row, of course). Is there a way I can tell the ListView that I want this behavior or something similar so the user knows what item has been selected?

View 6 Replies View Related

Android :: Select Behavior Of TextView

Oct 18, 2010

I have a TextView which is inside a LinearLayout which is in the child position of an ExpandableListView. Without assigning a color state selector to the text view, the following behavior is observed:Text unselected - text paints as white Text selected - text paints as black.If I add a color state selector with a call to text.setTextColor(R.color.textcolorstatelist) then the following behavior is observed:Text unselected - text paints as black Text selected - text paints as black.I tried two versions of textcolorstatelist.xml and both produced the results above.

View 9 Replies View Related

Android :: Inconsistent Handler Behavior

Sep 30, 2010

I am using a handler inside my service to display notifications at a certain time using the Handler.postDelayed method. My application runs fine on the emulator just as expected satisfying all cases. But when I installed the same on my HTC Wildfire, it simply doesn't happen as anticipated. Notifications are displayed at a random manner after the scheduled time and some notifications even fail. I'm monitoring my service from the Applications > Running Services and still my service is active.

View 1 Replies View Related

Android :: Inconsistent Ringtone Behavior

Mar 16, 2009

I am trying to add ringtones to the media/ringtones folder from my application. If the phone is connected via USB to a computer or mounted on my Mac, the ringtones do not show up in the SD Card, nor in the Ringtone settings.

But if I run the application with the USB unplugged, the ringtones appear ok. This is not a problem with Ringdroid which does the same thing.

View 2 Replies View Related

Android :: AddHeaderView Changes Behavior On ListView / Way To Fix?

Jul 10, 2010

I got two kind of lists on 4 different views. All lists are clickable and starts an activity to read the clicked record. One is just a listview populated from the DB and works fine. The second is also a listview populated from a DB but has a addHeaderView. This makes the list forget where it was when you return from the listview's intent. If I remove the addHeaderView(); it works fine. Why does AddHeaderView changes or even malfunctions ListView's behavior?

View 2 Replies View Related

Android : Use To Try And Duplicate Behavior Of An App Upgrade?

Jul 13, 2009

I changed my database schema on my application to include an additional column in one of the tables. I did this in the onUpgrade method in the DBHelper.

Then I tried exporting my signed application and reinstalling it using the 'adb install -r <app>.apk' command to try and 'simulate' an application upgrade, but onUpgrade never gets called.

Is there a command that I can use to try and duplicate the behavior of an application upgrade?

View 3 Replies View Related

Android :: Set Behavior For An Inflated View?

Oct 1, 2010

I have an audio player toolbar activity that has a corresponding layout file.

I need this player to show up at the bottom of another activity. I use a ViewStub and inflate the audio toolbar's layout file in the stub.

How do I access the buttons, etc on this inflated view and how do I set their behavior?

The docs on ViewStub did not mention anything about this (or maybe I totally overlooked something).

View 1 Replies View Related

Android :: Sleep - Screen Behavior Documented

Oct 1, 2009

I'm looking around and trying to find out where sleep behavior is documented - and I mean in the general sense.

When the phone is left alone: * Sometimes the phone screen dims and doesn't shut off. * Sometimes the phone screen goes dark in five seconds * Sometimes the menu lock happens. * Sometimes the menu lock doesn't happen. * Sometimes the only way to darken the screen is to push the power button.

What's not clear is what triggers these different states. I'm looking for a complete list I can use in testing and application validation.

View 6 Replies View Related

Android :: Difference In Behavior Between HTC / NexusOne / SDK 2.1-update1

Jun 7, 2010

I wrote an app that invokes the contact manager in the following way: Intent pickcontact = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivityForResult(pickcontact, CONTACTPICKED); I am experiencing 2 different behavior between HTC phones and the NexusOne, all with firmware 2.1-update1. (i.e., my application is getting access to all my contact along the primary phone number of that contact list). On HTC phones however (incredible and the hero), the list of contact I get represents some sort of index as opposed to the actual contact name/phone number.

View 4 Replies View Related

Android :: Behavior Of SingleTask Not Consistent With Document

Mar 31, 2010

I have an app with two activities, one of which the launchmode is set to "singleTask". From the Android dev guide, I got the impression that my SingleTaskActivity should start a new task (or reuse an old task) and always sit at the root of the stack when launched.

However, it's inconsistent with the behavior of the app if I follow the steps below: - launch StandardActivity from home - click the "home" key - launch SingleTaskActivity from home, you will see it's in the foreground as expected - click the "Back" key, StandardActivity comes to the foreground whereas I expect to see the home screen because SingleTaskActivity is supposed to be at the ROOT of the stack. It appears SingleTaskActivity was launched into the task that StandardActivity started, rather than starting its own task.

Is my understanding about the "singleTask" launch mode correct?

=== The Android Dev guide (http://developer.android.com/guide/topics/ manifest/activity-element.html#lmode) says:

In contrast, "singleTask" and "singleInstance" activities can only begin a task. They are always at the root of the activity stack. Moreover, the device can hold only one instance of the activity at a time — only one such task.

CODE:.....................

View 5 Replies View Related

Android :: Inconsistent Premultiply Behavior In Bitmap

Sep 28, 2010

I have noticed that loading an image into a GLTexture using

CODE:........

Will create a texture with premultiplied alpha. Not a problem, as long as I use glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA) to blend instead of glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) which will cause dark borders.

However, I've found that if I render text onto the Bitmap and convert to glTexture using:

CODE:........

The resultant texture is NOT premultiplied, and using glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA) will cause ugly over- saturated edges when blended into the 3D world. Blending using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) makes it look right again.

To confirm this, I saved the bitmap into a PNG file and load it as a resource into a texture, and the resultant texture is premultiplied and renders correctly using glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA)

Is there a way to force the text rendering onto the bitmap to be pre- multiplied?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved