android

Overriding onDraw() for an EditText widget with a blank implementation has no effect

I am trying to create a "hidden edit view" which will give me the functionality of text editing within a 3rd party GUI on Android. I figured that the easiest way to make it not draw would be to just override onDraw() with a no-op; however it's having no effect. I've added a log statement to check that it is being called. Does anyone have...

Android - Threaded BitmapFactory image decoding

Our Android app does a lot of image decoding. We fetch a lot of images from the internet, local storage caches, etc. Up to now, these images are being decoded on the UI thread (using BitmapFactory.decodeX() methods). It's been causing some timeout crashes because the UI doesn't respond quickly enough to user input. I could write a li...

android Locale app - R's full package name

This is the source to Locale section that's in the Settings [http://android.git.kernel.org/?p=platform/packages/apps/Settings.git;a=blob_plain;f=src/com/android/settings/LocalePicker.java;hb=HEAD][1] Does anyone know what is the full package name for the R class?? Oddly enough its not in the import list NOR is it in the com / android /...

MotoDev not recognizing Button class?

I'm still really new at this, but this should hopefully be a simple question and answer. I'm trying to just make a button and I've done so in the layout manager. I'm trying to implement it in code, but MotoDev won't recognize the Button class that's part of the android.widget package. I imagine I just have to do something similar to a...

How to handle Historical data for multitouch application

I'm confused as to how to get historical data on two touch locations on a touch screen. In the MotionEvent class it seems like I can only get one history size using the getHistorySize() method. How do I know what in that history belongs to my primary touch location, and what belongs to my secondary touch location. The MotionEvent class ...

Android - give indication that menu is available

Is there any functionality baked into Android SDK that will give user visual clue that menu is available? Or has anybody worked on this problem? Currently, I need to rely on user clicking Menu button and sometimes it's just not so obvious that certain Activity has Menu. So, any suggestions? ...

Why arent my new resources added in the res/ sub-folders showing up in the R class?

I don't understand why Eclipse doesn't know how to resolve the color resources I've defined. Am I doing something wrong? R.color.notepad_lines cannot be resolved MyNewTextView.java I've had problems before too with eclipse being able to find images in my /res/drawable directory /res/values/colors.xml <?xml version="1.0" encoding="ut...

How to pass an int value to another class

Hi, I have been trying to get "getExtra" to work but without success, I have a listview with 4 choices which launch a webpage within a webView class, when the user selects the option lets say option 3 I want to pass the value of 3 to the webView class so that it will load the correct webpage, at the moment all I get is errors, can some...

what parameters to pass to invalidate(left, top,right,bottom) for google map on android ?

Hi there, what parameters do I pass to this function ? invalidate(left, top, right, bottom) for use with google map on android ? thanks - ahsan ...

Android SQLiteDatabase update error

A piece of code to update DB raw: private EditText et; //... private void updateRecipe(){ SQLiteDatabase db=recipes.getWritableDatabase(); ContentValues values=new ContentValues(); values.put(RECIPE, et.getText().toString()); db.update(RECIPES_TABLE, values, "id=?", new String[]{id}); } When running error occures: Error upd...

can not display webpage after making http request in android

i am a new android and not much familiar with all the libraries. i am trying to acces a simple web page(google.com) through my android app. i have made the http requst but i am not able to see anything after i click the button public void onClick (View viewParam) { EditText usernameEditText = (EditText) findViewById(R.id.tx...

Data/XML being trucated when displayed

My project downloads lots of xml (as text) and images then I parse the xml and interpret the data there. When I check some of the xml downloaded some of them are getting truncated only showing a partial part of it. The beginning parts of it is gone. I use: InputStream in; in = OpenHttpConnection(url); SAXParserFactory spf =...

Voice Activity Detection in Android

I am writing an application that will behave similar to the existing Voice recognition but will be sending the sound data to a proprietary web service to perform the speech recognition part. I am using the standard MediaRecord (which is AMR-NB encoded) which seems to be perfect to speech recognition. The only data provided by this is the...

Android: search youtube and play best result

Hi! How can i search for for a keyword and afterwards play best result in youtube player? Thx ...

Ads aren't showing in android app

I am using AdWhirl for my ads and they aren't showing in my app when I run it in the emulator. I heard it sometimes takes a while, so i left it for 10 minutes but still nothing. I have disabled AdSense just to see if it would work with just AdMob, but it didn't help. In my DDMS it shows this: It shows the same when AdSense is enabled...

Android: Huge multi-layer scrolling backgrounds.

Hi there, I'm developing a side-scrolling android game and I've come across one hiccup. The game is rendering graphics on the Canvas object. The game features about 6 scrolling layers, the main ground layer, a collision layer, a foreground layer, and two background layers, which all scroll with variable speed for camera depth. Now, t...

Populate gallery with selection of images

How can I populate a gallery with a selection of images on my SD card. For example: All files beginning with 'A' in the directory /sdcard/example/ Thanks in advance for your help ...

Why I have to cast this statement in order to get a result?

private final static int L1_MAX_SCORE = 30; private final static int L2_MAX_SCORE = 150; public void UpdateLevel(int score) { double progress; //returns 0.0 progress = score / (L2_MAX_SCORE - L1_MAX_SCORE) * 100; //works correctly. progress = (double) score / (L2_MAX_SCORE - L1_MAX_SCORE) * 100; Thanks. ...

Where do you report typos at developer.android.com ?

I found a typo on the guide section at developer.android.com, but I can't find a link/email to report the typo to. I don't want to report it on the Android Developers Google group, as its a typo and not a technical question. Anyone have an email address or link I can use to report typos? ...

Android Application class being called twice

In my Android application, I overload the Application class, and I updated the tag in my manifest. This application also creates an Android Service. I have put some logs in the onCreate of my Application class, and I see it being called twice. The first time is when my application gets launched (this is expected) and then, it's usually ...