[android-developers] How to create an InputStream from a content Uri

2008-12-18 Thread PAS
I have discovered how to get an InputStream object from a Uri pointing to an image stored on the SD card!!! Since the method to do this was not straight forward to me, I would like to share it so that others may not suffer like I did. A ContentResolver is the thing needed, but it is an abstract

[android-developers] Fonts in XML

2008-10-27 Thread PAS
Hey developers, I have a TTF in my assets/fonts directory I can use in TextViews from within code following the API example. That is great for one-offs, but what I really want to do is to use this font in a style, and the reference that style from a layout. Broken example: !-- styles.xml --

[android-developers] Re: Fonts in XML

2008-10-27 Thread PAS
Thanks for setting up the RFE... I have stared it and encourage anyone else who wants this feature to star it as well. PAS On Oct 27, 4:22 am, Tom Gibara [EMAIL PROTECTED] wrote: I raised this on the forums a little while ago and found out it isn't supported in 1.0. Seeing your post reminded

[android-developers] Why is onPause() called

2008-10-17 Thread PAS
Hi all, I noticed that if the orientation of the phone changes (portrait to landscape mode), my Activity is restarted, calling onPause(), onStop(), onStart(), and onResume(). The same thing happens when my Activity is running and a phone call comes in. I would like to treat these two events

[android-developers] Enabling audio in emulator

2008-10-06 Thread PAS
Since I found nothing about this while looking, I thought I would document my findings here. I had some trouble getting audio to work in the Android emulator. Eclipse was displaying the following: [2008-10-06 16:18:12 - Emulator] emulator: warning: opening audio output failed Having a look

[android-developers] Re: When is R.string etc available?

2008-10-06 Thread PAS
is not initialized until onCreate() is called. The code you quote should fail every single time the activity is constructed. On Oct 2, 3:55 pm, PAS [EMAIL PROTECTED] wrote: It seems like the R.string resource is not available as early as I would like. The following code looks fine in Eclipse