android

android:layout_alignParentBottom is ignored when used without explicit layout height as a row in ListView

When I use a RelativeLayout with either fill_parent or wrap_content as height and an element which specifies: android:layout_alignParentBottom="true" it is ignored and it is aligned at the top. Setting the height of the RelativeLayout to an explicit value makes it work. Any clues? ...

Why does my Sax Parser produce no results after using InputStream Read?

Hello, I have this piece of code which I'm hoping will be able to tell me how much data I have downloaded (and soon put it in a progress bar), and then parse the results through my Sax Parser. If I comment out basically everything above the //xr.parse(new InputSource(request.getInputStream())); line and swap the xr.parse's over, it wor...

How do I get an imageview to rotate while translating in Android?

I am trying to make an imageview that rotates while sliding across the screen. I setup a rotate animation for 180 degrees, and it works by itself. I setup a translate animation and it works by itself. When I combine them I get an imageview that makes a big spiral. I would like the imageview to rotate around the center of the imageview wh...

Any collaborative tool/website to localize an Android app?

My open source Android application has internationalization done the Android way, with strings.xml files. The community has many people from many countries, and they are willing to contribute/improve translations using a collaborative website. There is Launchpad but it only supports the gettext format so we would have to use scripts, n...

Way around 1mb file size restriction?

My app needs to save files that will range from about 2-20mb. When I tried to do this I was getting an OutOfMemoryException. I did some reading and it's looking like Android has a file size limit of 1mb. Is this correct? If so, is there a way around this limitation, other than splitting up every file into 1mb chunks? ...

How do I set the intent of menu items defined in an Android menu xml file?

How do I set the intent of menu items defined in an Android menu xml file? For example I currently have... <menu xmlns:android="http://schemas.android.com/apk/res/android" android:name="Main Menu"> <item android:title="@string/resume_game" android:icon="@drawable/resume"></item> <item android:title="@string/play_golf" android:i...

How to delete a contact in android 2.1

Hi, I have added one contact to android by following code. ContentValues values = new ContentValues(); Uri rawContactUri = getContentResolver().insert(RawContacts.CONTENT_URI, values); long rawContactId = ContentUris.parseId(rawContactUri); values.clear(); values.put(Data.RAW_CONTACT_ID, rawContactId); values.put(Data.MIMETYPE, ...

Android, store a couple of wav files.

I'm generating about 6 wav audio files at runtime. I want to store them in internal memory. Is a blob to sqlite the right/recommended way? ...

onItemClick gives index/ position of item on visible page ... not actual index of the item in list ..problem on enabling setTextFilterEnabled .. android

hi, I am creating a list .. the elements of the list are drawn from sqlite database .. I populate the list using ArrayList and ArrayAdapter ...upon clicking the items on the list I want to be able to fire an intent containing info about the item clicked ... info like the index number of the item .. using the method : onItemClick(Adapt...

How to scale an Image in ImageView to keep the aspect ratio

Hi, In android, I defined an ImageView's layoutWidth to be 'fill_parent' (which takes up the full width of the phone). My question is if the Image i put to ImageView is bigger than the layoutWidth, android will scale it, right? But what about the height? when android scale it, will it keeps the aspect ratio? What I find out is, there ...

Update UI from an event with a thread

Im working on a small application to try out an idea that I have. The idea is to periodically update the UI when event of some sort occurs. In the demo I've created, I'm updating a ProgressDialog every 2 seconds for 15 turns. The problem I am having, which I don't quite understand is that when an event is handled, I send a message to ...

How to draw the graph in android based on its height and size

i want to draw a graph in a area and i used a linear layout as area.i want to set the size of the graph area,which should be compatible to small,medium ,default emulators etc.i need to set the size for graph area,how can i do it in xml file for eg in blackberry we use Display.getWidth();Similar is there way to get the width of the disp...

How to make Edittext size stay put? Android

Hi everybody, I know the attribute which makes the text "disapear" on the left part of the Edittext to maintain a single line, (singleLine="true"). But my issue is when I fill the edittext before the view is displayed... in this case, my edittexts are all going out of the screen... any ideas? thx! This is what is get when fill the empt...

Integrate IPhone Safari like view in Android?

The main concept goes like this. I have four listviews with its own data loaded at the same time. Only one listview will be visible to the user. Now, when the user presses a button, not only the current listview but also other three listviews should be minimized and then user can just scroll just as in Gallery and select the listview tha...

android ExifInterface platform 1.5, 1.6

ExifInterface is available from platform 1.7 how to read exif tags from image on platform 1.5, 1.6 ? ...

Android PixelFormat per device

analogous to this thread: http://stackoverflow.com/questions/2093594/opengl-extensions-available-on-different-android-devices I would like to collect the different PixelFormats the android devices use. To find out you must do the following: Parameters camParams = camera.getParameters(); int format = camParams.getPreviewFormat(); Now ...

Handler vs AsyncTask

I'm confused as to when one would choose AsyncTask over a Handler. Say I have some code I want to run every n seconds which will update the UI. Why would I choose one over the other? ...

HTML inside webView

I am posting some data to a server using DefaultHttpClient class and in the response stream I am getting a HTML file. I save the stream as a string and pass it onto another activity which contains a WebView to render this HTML on the screen: response = httpClient.execute(get); InputStream is = response.getEntity().getContent(); Buffered...

Button style in AlertDialogs

Does anyone know how to override the default style for AlertDialog buttons? I've looked through the Android source for themes and styles and experimented with different things but I haven't been able to find a way that works. What I've got below works for changing the backgrounds, but doesn't do anything with the buttons. myTheme is app...

Live wallpaper on 1.6 android application

Hi I have an Android application with version 1.6 I take the wallpaper and show it on my application. (I do that programatically by calling getWallpaper() on the Activity) When this is installed on a 2.1 phone, that has live wallpaper, the live wallpaper is not returned by getWallpaper() , because it just returns a Drawable, and live ...