android

Select portion of a text from EditText

Hi everyone, I think this might be a newbie question but I could not figure out a way to do it. In the Messaging application which comes with Android, they provide a way to select the text. When you select the option to select text from the context menu a selection tip comes up which can let you select the text you want? I figu...

Activity remains on screen after another activity is called from a service and finished on Android

I have a service that is listening for some events. When that event happens, it fires a screen by startActivity(intent) When the user finishes doing something on that screen, the code calls finish() but instead of 'closing' the complete application, is shows the main/launcher activity. any way to go around this? thanks ...

Suggestions for building a treeview control in Android

Suggestions for building a treeview control in Android ...

Select Drawable file path

I am developing an android application that receives data about events from a server. In a ListView I put the name and category of the event and a picture. My problem is: each category should have a specific picture. How do I choose which of the pictures in the drawable folder should be displayed? View v; /**I get this view from the pa...

Android GridView Disable Highlighting

I'm trying to disable the highlighting of objects in a GridView in Android 2.2. I did find another article saying that I should set the selector to a transparent ColorDrawable, but the views in my GridView are still dimmed when I select them. I'm just using the GridView to display static objects (right now it's text, but I plan on switch...

Issues with screen sizes and activity rendering

I'm currently developing my first android app, and my first game. I've been developing on a netbook with a CliqXT (HVGA). Things are going well, it renders perfectly on the smaller screen. I knew I'd have some issues when rendering on larger screens, but the issues I'm having are not what I was expecting and I'm kind of stuck. So b...

Android: Multiple singleTasks within a single Application: problem with <HOME>

Hello, I have 2 activities declared as singleTask in my application. The reason for this is, with standard mode, pressing "HOME" in one activity (say A) and launching another (say B), still shows activity A. However, a new problem arises because of this. A -> "HOME" -> B (Result : B, Expected Result: B) -> "BACK" -> (Result:A, Expect...

Android show ProgressDialog until activity UI finished loading.

HI, Im trying to show a ProgressDialog while the activity is loading. my problem is that although i completed all the work in the activity it takes a long time for the activity to load, i suspect this is because i use multiple views with multiple listviews with custom array adapters inside a viewflipper. it takes a long time for the UI t...

Custom AlertDialog not showing

I have a TextViewer Activity , that has a button, and when I click on it I want to popup an AlertDialog with list. I followed this link but it does not work (no popup). I believe the context is wrong. I used the following code: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setConten...

What's the correct way to save state of an Activity.

I have an Activity, which contains a bunch of check boxes and a submit button. When the submit button is clicked, the activity will exit (finish() will be called). Before the activity exits, I want to save the states of the check boxes in the activity, so when the activity starts again, the check boxes can stay in their previous states....

Android ListView item from custom adapter not selectable.

I'm making a custom adapter so that I can display a list of items with icons which looks like the menu that comes up when you long click the home screen. For some reason though the list items are not clickable. The can be navigated to with the D-pad but they cannot be clicked in any way. I thought maybe the problem was with the AlertDia...

how to show up the settings for text to speech in my app?

i have an application which uses the tts engine in android, now as the activity starts , i want to show to the users the settings present in the phone for the tts engine in which they can change the pitch, test the engine, etc which is already present in the emulator.So, how do i present to them this screen? ...

Findout if a default viewer exist

I know how to lunch another activity, But how do I meke sure an activity exist for my MIME type before starting the activity? for example if I have a PDF file that I want to display, how do I make sure a PDF viewer exist? here is the code I use to lunch the PDF viewer MimeTypeMap tMimeType = MimeTypeMap.getSingleton(); String tMimeStr ...

Linking Google Maps Api Target with Android 2.1 Target

I have developed two separate applications 1) android 2.1 that takes user input / registers , shared pref and stuff and 2) Google Maps GPS on target Google APIs 7 . Now, I would like to embed the second project in first . That is, after the user registers it will bring up Maps and suggestions and stuff. How can I use both the targets (A...

How to set the position of a AlertDialog off the screen at top in Android ?

Hi, I want to set the AlertDialog position behind the status bar, when the content in my Dialog will increase, How to do that? I am creating a custom AlertDialog using my own layout.... Please help me out.... ...

Android Custom AlertDialog with EfficientAdapter

Hi How can I have the EfficientAdapter, which is a list with images (something like this) contained inside an AlertDialog? (It's like the custom AlertDialog but looks nicer) ...

Referencing enumerated style attributes from XML in Android

I have an app that requires scrollbars to be enabled in one landscape orientation but not in portrait orientation. I thought the easiest way to do this would be to make an attribute indicating whether the scrollbar is enabled or not, such as the following: <ScrollView a:layout_width="fill_parent" a:layout_height="fill_p...

Turn off map tile updates in Android MapsActivity

I am working on a Google Maps project for Android and would like the ability to toggle on/off map tile updates while still allowing the GPS and other network activity to run. Is there a way to do this? ...

How to turn list scrolling off when calling onContentChanged in Android ListActivity?

Hello all, I got a ListActivity. I update the activity using onContentChanged() API. My problem is that each time I call the above API the list scrolls to the top. Is there any easy way to turn this "feature" off? Thanks. / Henrik ...

Why is ADT calling code that the doc specifies throws an UnsupportedOperationException?

My XML layout in res/layout/edit.xml: <?xml version="1.0" encoding="utf-8"?> <GridView android:id="@+id/GridView01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:numColumns="2"> <TextView android:text="Person's Name" android:id="@+...