android

size or length of a Document object

How can i get the size of an Document object? DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); InputStream iStr = urlConnection.getInputStream(); doc = db.parse(iStr); ???? --> Log.i("Bytes",String.valueOf(doc.get????)); ...

Android: How to hide a ListView Item

How can you hide an item in a ListView or at least set its height to zero? I have tried setting the visibility of the View to GONE but it still maintains the item's space (height). ...

How to change android indeterminate ProgressBar color ?

Hello, I'm looking for a very obvious thing (in other languages !!) and it drives me crazy ! I would like to know how I can change indeterminate ProgressBar color from basis white/grey color to black ? When I change the indeterminateDrawable, I get a static image instead of a moving animated progressBar. Is there any way to do it simply...

how to detect javascript features on Android 1.5

I'm trying to write a code that can run on Android 1.5 and 2.0.1, but I have issues with the javascript engine used on Android 1.5. alert(localStorage); just hang on v1.5 while on v2.0.1 it alerts correctly. is there an unblocking way to do it or to detect the version of Android with javascript? ...

Android multiple screen sizes with same density

I'm confused regarding the densities. I see that with medium density, the screen resolution could be either 320x480, 480x800, or 480x854. So if I have an image thats 300px wide in the mdpi folder, how is it going to look the same size on all 3 different screen sizes (mainly 320x480 vs the other 2)? And by look the same size, I mean scal...

Performance of map overlay in conjunction with ItemizedOverlay is very poor

I am trying to display one png (drawable) on a map in about 300 points. I am retrieving the coordinates from a Sqlite table, dumping them in a cursor. When I try to display them by parsing through the cursor, it takes for ever for the images to be drawn, about .5 second per image. I find that to be suspiciously slow, so some insight on h...

Incorrect Coordinates From getLocationOnScreen/getLocationInWindow

A call to getLocationOnScreen() or getLocationInWindow() both give me a top/Y coordinate that is about ~30px (status/notifications bar's height) too far down. The left/X coordinate is dead on. As I hinted above, I believe the difference is because of the status/notification bar... I could be wrong. I think I can solve this if I can...

Android custom xml widget

I have an XML file in my layout folder that has how i want my custom widget/view (not sure what correct terminology is here). but how do i make it so that i can programatically, add one or more to an activity the xml file is as follows <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/r...

alternative to the missing setOnDateChangeListener()-function

I have a DatePicker-view as well as a TimePicker-view in my layout, and everytime the date or time is changed I want to update a value. On the TimePicker I can simply set a setOnTimeChangedListener, but nothing corresponding exists for the DatePicker. A listener called OnDateChangedListener can be set in the init()-function, but it does ...

Problems with starting an activity in onStart

Hello everyone. I'm trying to start a floating activity from onStart to retrieve some info from the user right when the initial activity begins. I have the following: @Override public void onStart(){ super.onStart(); callProfileDialog(); } And callProfileDialog() is just: private void callProfileDialog(){ Intent i = new Intent(thi...

C/C++ in Android?

Is it possible to use C/C++ code in Android? And how easy is it? ...

Help: Android paint/canvas issue; drawing smooth curves

How do I get smooth curves instead of dots or circles, when I draw with my finger on the touch screen, in Android? I am using the following code- public class DrawView extends View implements OnTouchListener { private static final String TAG = "DrawView"; List<Point> points = new ArrayList<Point>(); Paint paint = new Paint(); public D...

Android & java.util.concurrent.ConcurrentLinkedQueue

Hi All, I want to use ConcurrentLinkedQueue in an android application, have written the code, but now I'm getting an error when the project builds: Conversion to Dalvik format failed with error 2 I'm using Eclipse with the lastest version of the ADT plugin. Any ideas how I can fix this problem? ...

Android: failing in cmd when locating debug.keystore, what is the problem!?

Hi there, I'm trying to generate the MD5 fingerprint from the debug.keystore file using keytool.exe in my jdk so I can use google maps in my android project. I've located the keystore file and have moved it into C:\android just to make things easier. Then in command I type c:\Program Files\Java\jdk1.5.0_13\bin>keytool -list -alias and...

how to play an encrypted file in Android.

I need to be able to play an encrypted file in Android. The file is AAC. The only way I can see to do this is either: decrypt the file to internal private storage and point the player at that file to play, or decrypt & decode the file to pcm and feed it to an AudioTrack. 1 isn't great because it takes a long time to do that. 2 isn'...

Android Emulator typing "="

Hello. I have a problem with Android Emulator. I have created avd and run it. But when it was started I can't work, because it emulate typing many "=" symbol. I launch this avd with -debug-all parameter and debuger write "could not handle (sym=61, mod=0, str=EQUAL) >> KEY [0x00d, down]". OS - Windows Vista. Last version Java platform,...

How to detect doubletap on a View?

Hello! I'm trying to have a View sensitive to double taps on an Android. So far, I learned to set up the double tap and know what place to handle the event for action: API: android.view.GestureDetector.OnDoubleTapListener private GestureDetector mGestureDetector; … mGestureDetector = new GestureDetector(this); … mG...

How to set the color of an Android ScrollView fading edge?

I have an Android scrollview with a white background. The fading edge is a white translucent gradient. I would like to change it be black instead of white. I have a ListView in the same project with a white background that has a black fading edge by default, but I can't find where (if anywhere) that was set. ...

ScrollView containing TextView does not scroll

I have a textview displaying many individual words, each word is a link using Spans and setMovementMethod(LinkMovementMethod.getInstance()); The textview is wrapped by a ScrollView. However the ScrollView does not work as the links in the TextView are activated instead. Is there a way to combine a ScrollView and TextView so that both...

Where is android.os.SystemProperties

I'm looking at the Android Camera code and when I try importing android.os.SystemProperties It cannot be found. here is the file I'm looking at. http://android.git.kernel.org/?p=platform/packages/apps/Camera.git;a=blob;f=src/com/android/camera/VideoCamera.java;h=8effd3c7e2841eb1ccf0cfce52ca71085642d113;hb=refs/heads/eclair I created a ...