android

how to remove listview items in android

Hi all,, Can somebody please give me an example code of removing all ListView items and replacing with new items. I tried replacing the adapter items.Still no results. my code is at first i am calling populateList(){ results //populated arraylist with strings ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, ...

How to reduce apk bloat through library usage?

Hi all, I added google-collect-1.0.jar to my Android project and it made a 50K .apk into a 250k .apk (both Release). This was all through using a single method Lists.newArrayList() Is there any way to reduce the overhead? ...

AppsLib package details uri

Is there an Uri similar to market://details?id=package_name for AppsLib too? It seems that the guys there don't answer to emails. :) If I don't find a solution for this I will remove my app from there. ...

Android - Adjust screen when keyboard pops up?

I want to be able to adjust my UI screen on Android when the soft keyboard pops up. So at the minute I have something similiar to the first picture below where I have and EditText at the bottom of the screen and when a user taps the EditText I want the same as what happens in the second picture. That is that the EditText gets moved up ...

How to build shared library (.so file) for chm reader in Android?

Hi. In my application, I want to use chm library. Can anyone tell me How to build shared library (.so file) for chm reader in Android? And which toolchain is used. what is the steps for building it? Thanx in advance. ...

route finding between two designation on maps in android?

i want to just find a shortest path between the location on map. we have to pass the location's geopoint then click the button to get direction. it will show the shortest path like a blue line. how to do this? i search about this. many of them import a package com.google.googlenav.*;. where i have to get this? Any Idea???? Edit:got down...

setSelection on Spinner based on rowId

Hi! I have a Spinner View that's populated through a SimpleCursorAdapter. Based on the selection I need to save the rowid in the entry database (position won't work because things can be added and deleted from the Spinner Database). This I can do by using spinner.getAdapter().getItemId(pos) . But When I edit an entry I need to make the ...

Backflip Testing Results

Good Morning, I got my app to install on the Backflip and started testing it. On the emulator everything appeared ok but on the Backflip there are a few notable differences. I have edittext boxes which on the emulator automatically vary in size to accommodate the text. The text is a number, the max being two digits, i.e., 1-99. On t...

Android, sending XML via HTTP POST (SOAP)

Hi, I would like to invoke a webservice via Android. I need to POST some XML to a URL via HTTP. I found this snipped for sending a POST, but i dont know how to include/add the XML data itself. public void postData() { // Create a new HttpClient and Post Header HttpClient httpclient = new DefaultHttpClient(); ...

How to change internal buffer size of DataInputStream

I'm using this kind of code for my TCP/IP connection: sock = new Socket(host, port); sock.setKeepAlive(true); din = new DataInputStream(sock.getInputStream()); dout = new DataOutputStream(sock.getOutputStream()); Then, in separate thread I'm checking din.available() bytes to see if there are some incoming packets to read. The proble...

List View Below Image

Hi I want a list view and below of that list view i want one image.when i use the below code the list view and image view are appeared only in Portrait mode but not landscape mode,Can any one gie me the suggestions for displaying that list view and image view in Landscape also.My xml code is <?xml version="1.0" encoding="UTF-8"?> <Fram...

Android converted jar file into eclipse error

Hi, i got an error when converted jar file into eclipse. The error is "Error generating final archive: duplicate entry: classes.dex" Anyone please help me? ...

How do I handle calls to AudioTrack from jni without crashing?

I was trying to write to an AudioTrack from a jni callback, and I get a signal 7 (SIGBUS), fault addr 00000000. I have looked at the Wolf3D example for odroid and they seem to use a android.os.Handler to post a Runnable that will do an update in the correct thread context. I have also tried AttachCurrentThread, but I fail in this case a...

Wraping EditText Boxes in Layout

I have a UI that has 6 EditText boxes. 3 of those EditText boxes don't show up when in vertical orientation. I was hoping that wrap_content would wrap the non-showing 3 to the next line but found out that LinearLayout only allows for one row. When in horizontal orientation I get all 6 of them showing. I tried a TableView with two row...

Android - Declarative vs Programmatic UI

Has anyone seen or compiled benchmarks comparing declarative (XML) versus programmatically created UI's in Android? There are things that Google has done to speed up the declarative approach, but you still do have the layout inflation step done at runtime. Have you ever switched (or considered) changing your UI from declarative to prog...

How to avoid Eclipse leaks on XServer when editing Android XML files?

When I'm editing XML files in Eclipse (mainly, Android layouts and so), it causes leaks on XServer and it ends eating all my RAM (4GB), so I have to Ctrl+Alt+Backspace to continue. Do you know any remedy for that? Thank you! ...

Documentation of available Ant tasks for Android?

I just accidentally discovered the ant task for test coverage reports with emma. I'm now looking for a target that only invokes the unit test and generates unit testing output. Is there a list with the available ant targets somewhere, or is it possible to look them up somewhere inside the code of the SDK? ...

What resolution should my Android splash screens be?

I'm creating a splash screen that will display while my Android application loads. I'd like to create it at the correct size so Android won't auto-scale it up or down to fit the screen. (It's a bitmap image, a photograph of an oil painting, so I can't just turn it into a nine-patch.) But there are at least three important screen sizes...

Cannot access android.R.drawable.timepicker_input

Hello there i'm trying to write a layout similar to the timepicker widget layout. So i decided to use the android framework layouts but i can't use them It seems that if i write android.R.drawable.timepicker_input or other timepicker related drawables i get them this Eclipse error: android.R.drawable.timepicker_up_btn cannot be reso...

ListView item background via custom selector

Is it possible to apply a custom background to each Listview item via the list selector? The default selector specifies @android:color/transparent for the state_focused="false" case, but changing this to some custom drawable doesn't affect items that aren't selected. Romain Guy seems to suggest in this answer that this is possible. I'm...