android

Android : EditText with custom keyboard

Hello I created my own custom keyboard following the the example in the sdk. Now I would like to use this custom keyboard by default on my EditText in my app (actualy I have to long press the edittext and then choose my custom keyboard). How can I do that ? (seems to be related to the inputType property but I can't find out how to se...

AutoCompleteTextView showing suggestions only for the first word entered

Hello! My autocompletetextview shows suggestions only for the first entered word. So if i write "ki" suggestions for king will popup. But if i enter "queen whitespace ki" there will be no suggestion for king. textView = (AutoCompleteTextView) findViewById(R.id.predlogi); String[] pred = getResources().getStringArray(R.array.pre...

Rotated image in ImageView

I want to show an arrow that indicates the direction towards a goal, using the orientation sensor and current GPS position. Everything works well, except that I want to rotate the arrow image in my ImageView. The current code, which shows the arrow pointing upwards, is this: ImageViewArrow.setImageResource(R.drawable.arrow); What is ...

How to retrieve ImageUri of an ImageView?

I'm looking forward the method for accessing the current image's Uri from an ImageView, to save it to my database, but i've only found the setter. Where's the getter?? ...

Android Mediaplayer: setDataSource issue for downloaded media file

I have an application that will record and play audio files. Some of the audio files are downloaded using simple standard http downloads using httpclient. It worked like a charm for a long time. Now all of a sudden I cannot play the files I download. It fails with this stack. I store the files on the SDCard and I experience the problem b...

Is it possible to view multiple video files with android simultaneously ?

Hello, I would like to play three or more video streams on my Nexus One with the VideoView class (or other). Unfortunately the other streams always stop after I start the next video. Always one at the same time is playing, but not more - even if I use threads. Does anybody have an idea how to solve this? Thanks for help. ...

Android 2.1 fling gesture captured on textview but still a contextmenu opens

The following problem seems unique to 2.1, happens both on an emulator and on a nexus. The same example works fine on other platforms I've tested (1.5, 1.6 and 2.0 emulators). I've added created gestureListener as described in this post. The difference is that I've added the listener on a TextView which also has a contextMenu registered...

Android: ProgressDialog doesn't show

Hi, I'm trying to create a ProgressDialog for an Android-App (just a simple one showing the user that stuff is happening, no buttons or anything) but I can't get it right. I've been through forums and tutorials as well as the Sample-Code that comes with the SDK, but to no avail. This is what I got: btnSubmit.setOnClickListener(new...

Do null SQLite Data fields take up extra memory?

I'm using the built in sqlite library on the Android platform. I'm considering adding several general purpose fields that users will be able to use for their own custom applications, but these fields will be blank most of the time. My question is, how much overhead will these blank fields add to my database? Do null fields even take u...

Add an Overlay of layout in Listactivity

Hi, I am tryin to make a layout appear when even I clich on a row of listactivity. The Overlay layout contains certain function which have to be performed based on the row selected in the list. Can anyone pls suggest me how to do it. ...

EditText selects by default?

Whenever I have an EditText field in my android application, it is highlighted with the blinking cursor for input as soon as the activity is started (though the keyboard doesn't pop up). How can I disable this? ...

no sms deleted folder?

Hi, I'm new to Android and trying to convert a Windows Mobile app to java/android. In WM there are the followning standard folders: Inbox,Sent, dratfs, outbox, deleted. I'm able to access all folders except deleted with Uri.parse("content://sms/XXXXXX") 1) Is deleted folder missing? 2) Is it possible to create user folders, like "...

Display a gallery of images that are stored as Drawables in a List

Hello - I am trying to modify this example: http://developer.android.com/resources/tutorials/views/hello-gridview.html But instead of displaying images that are resources, I want to display Drawables that I currently am storing in a List. Can anyone instruct me on how I would modify private Integer[] mThumbIds = { R.dra...

How to add user customized data to database?

I am trying to design a sqlite database that will store notes. Each of these notes will have common fields like title, due date, details, priority, and completed. In addition though, I would like to add data for more specialized notes like price for shopping list items and author/publisher data for books. I also want to have a few gen...

Load large images into Bitmap?

I'm trying to make a basic application that displays an image from the camera, but I when I try to load the .jpg in from the sdcard with BitmapFactory.decodeFile, it returns null. It doesn't give an out of memory error which I find strange, but the exact same code works fine on smaller images. How does the generic gallery display huge ...

HTC Incredible displaying blank ImageView

HI, I have an app that displays an an image in an ImageView using the setImageDrawable(Drawable) method. However, with the release of the Droid Incredible the images are coming up as a blank screen. I am using Drawable.createFromPath(Environment.getExternalStorageDirectory() + "\imagefile") to access the image from the SD card. I don...

How can I detect the Android emulator?

I would like to have my code run slightly differently when running on the emulator than when running on a device. (For example, using 10.0.2.2 instead of a public URL to run against a development server automatically.) What is the best way to detect when an Android application is running in the emulator? ...

Android: make a scrollable custom view

Hey, I've rolled my own custom view and can draw to the screen alright, but what I'd really like to do is set the measuredHeigh of the screen to, say, 1000px and let the user scroll on the Y axis, but I'm having problems doing this. Can anyone help? Here's some code: public class TestScreen extends Activity { CustomDrawableVi...

I need to recover an instance of an activity

Well.. the title is pretty descriptive, I have a bunch of tab activities (which I implemented myself, didn't want to use the tabviews with activities inside them), so It's basically 5 activities calling each other every time the user clicks on the tabs displayed as a row of LinearLayouts at the bottom of the screen. The thing is that th...

Update UI in the main activity through handler in a thread (Android)

Hello, I try to make several connection in a class and update the multiple progressbar in the main screen. But I've got the following error trying to use thread in android : Code: 05-06 13:13:11.092: ERROR/ConnectionManager(22854): ERROR:Can't create handler inside thread that has not called Looper.prepare() Here is a small part ...