[android-developers] Re: Is it safe to share a View among several layouts?

2008-04-04 Thread hackbod
The most likely reason for it to be slow is that it is a huge image you are loading. You could also try making it a PNG -- since pretty much all of the UI is PNG images, those are loaded into each app as they start, so the performance of that is clearly acceptable -- though as far as I know JPEG

[android-developers] Re: canvas.scale and text size bug

2008-04-04 Thread Romain Guy
Using scale(0.5f, 0.5f) just means that the text will be drawn at half its size, not that it will be drawn to fit in a rectangle that is half the size of the screen. It depends on the length of the text you are drawing, the font size and the type face you are using. On Thu, Apr 3, 2008 at 11:41

[android-developers] Re: Getting the state of a checkbox inside of a listview

2008-04-04 Thread Romain Guy
It is actually not very difficult to implement a list of checkboxes. The key is to write a custom Adapter that keeps track of the selected items (using a SparseBooleanArray for instance.) I wrote such an adapter as an ApiDemo recently, I'll try to find the code and paste it here. Note that the

[android-developers] Re: How to set rich text in TextView?

2008-04-04 Thread Dan U.
It also supports u/u, but I don't think there's any way to set a color only for specific words in the string without implementing your own TextView. Either that or string together multiple textviews with appropriate colors, but that probably isn't the best idea. On Apr 4, 12:35 am, Evan JIANG

[android-developers] Re: Problem using XMPP demo in latest SDK emulator m5 rc 14

2008-04-04 Thread Marcos Hack
Hi Juan, Start the second instance and run the command adb -d 2 install ANDROID_SDK_PATH/samples/ApiDemos/bin/ApiDemos.apk Note that you only need the -d 2 argument if you start the first emulator first. Regards, Marcos Hack. On Mar 25, 7:50 pm, jtaylor [EMAIL PROTECTED] wrote: How do I

[android-developers] Re: How to set rich text in TextView?

2008-04-04 Thread Romain Guy
I believe it is possible to do this by using a Spannable and BackgroundColorSpan. You can take a look at the documentation for SpannableStringBuilder if you want more information. On Fri, Apr 4, 2008 at 1:04 AM, Dan U. [EMAIL PROTECTED] wrote: It also supports u/u, but I don't think there's

[android-developers] Resuming not visible activities using intents

2008-04-04 Thread Semeria Stefano
Hi all, Is it possible to resume a background activity using an intent? When I register a notification in the status bar and clicked on it an Activity is fired, but it's always a new one... I would need a way to reuse one in background already on the stack. Please help. Thanks a lot.

[android-developers] Re: Getting the state of a checkbox inside of a listview

2008-04-04 Thread xingye
here is the demo code what you want. http://code.google.com/p/sharepath just checkout the source code, the checkable list in choosebuddy.java. On 4月4日, 上午10时57分, SnowDrifter [EMAIL PROTECTED] wrote: I have a ListView that contains a list of checkbox and text pairs. I am having trouble

[android-developers] Re: Resuming not visible activities using intents

2008-04-04 Thread xingye
Use service instead of activity:) On 4月4日, 下午4时16分, Semeria Stefano [EMAIL PROTECTED] wrote: Hi all, Is it possible to resume a background activity using an intent? When I register a notification in the status bar and clicked on it an Activity is fired, but it's always a new one... I would

[android-developers] Re: Resuming not visible activities using intents

2008-04-04 Thread Semeria Stefano
Well, I'll probably need to explain better my use case. I am working on a instant messaging application. I would like to support multiple conversation. For handling each ongoing conversation I use different instances of the same activity (let's call it ChatActivity). I have a background thread

[android-developers] Re: Resuming not visible activities using intents

2008-04-04 Thread xingye
here is my way, just a suggestion:) 1. if the activity is not in active, start it and show the unread messages; 2. if the activity in front, hook the database changes, just show a message in the activity not the state bar. 3. switch the char window(with deffrient buddy) by popup menu(a dialog) or

[android-developers] Re: How to set rich text in TextView?

2008-04-04 Thread Evan JIANG
Thank you for your reply. Is there any examples to show how to use SpannableString. In the method like SpannableStringBuilder.setSpan(Object what, int start, int end, int flags) , I've no idea what type of Object of the parameter what is needed. Best regards, Evan JIANG On Fri, Apr 4, 2008 at

[android-developers] Re: Android clip

2008-04-04 Thread jessealbini
This code works for me but it also stops after maybe 20 to 30 seconds. Please fix the media player! It's frustrating to use when half of the features are non-functional! - Jesse --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[android-developers] Re: Is it safe to share a View among several layouts?

2008-04-04 Thread Anil
When I print out the before/after times around the 3 statements, it takes 1 second. Log.v(TAG, new java.util.Date().toString()); VERBOSE/BEFORE(768): Fri Apr 04 12:35:23 GMT 2008 VERBOSE/AFTER(768): Fri Apr 04 12:35:24 GMT 2008 However it takes 3.5 seconds to see the button in the layout. So

[android-developers] Strange slow behavior in Emulator and how to recreate it (CameraPreview)

2008-04-04 Thread Franco
Hi, Using the CameraPreview example and doing some image processing I found a strange slow behavior in the Emulator. I have little experience with java and Android (C/C++ background) so I do not know if it is a true issue of the emulator or some strange memory/thread handling that I am not aware.

[android-developers] Re: Aver the air download and install application

2008-04-04 Thread Dan U.
I think http://groups.google.com/group/android-developers/browse_thread/thread/d6fddac0a408e59f/0159a8a2759e7280?lnk=gstq=apk+browser#0159a8a2759e7280 is about the only place I've seen mention of doing this. Sounds like it's not possible with the browser, or at least not yet. On Apr 4, 6:25 am,

[android-developers] importing java 6 libs

2008-04-04 Thread Lahiru
Hi I need to import some javax packages comes with Java6. I added required jre in eclipse project and successfully imported several javax pkgs. But in runtime I'm getting class not found error,... is there any other way to link jre 6 libs with android? Please help.. Thanks in advance. Lahiru.

[android-developers] Image not correctly viewed

2008-04-04 Thread Andrea Bernardi
Hello at all, i'm developing on Android since the last month and I've encountered this problem in these days. If I download an image from Internet with this code isn't correctly viewed: package org.ti.weather; import java.io.BufferedInputStream; import java.io.IOException; import

[android-developers] Re: View Parents

2008-04-04 Thread [EMAIL PROTECTED]
thx megat Joshi i´m currently use m5rc15 ,but i solverd the problem. I was triying to assign a static view between 2 activities and when return to main activity show exception. thats occurs because second activity catch the static view an throws the exception when back to main activiy and tries

[android-developers] Re: Image not correctly viewed

2008-04-04 Thread xingye
// ImageView iv = (ImageView)convertView.findViewById(R.id.image); // iv.setImageResource(R.drawable.badge); // Uri uri = Uri.parse(http://www.yexing.org/image.axd? picture=browse.png); // iv.setImageURI(uri); //

[android-developers] proxy

2008-04-04 Thread Raja Nagendra Kumar
Hi, I have set the proxy using the commands adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/ settings.db INSERT INTO system VALUES(99,'http_proxy','192.168.0.88:8118'); sqlite3 /data/data/com.google.android.providers.settings/databases/ settings.db SELECT * FROM

[android-developers] Re: Any one tried uisng mediaplayer example ,I ma unable to play video file from local directory

2008-04-04 Thread Cheryl Sedota
I can play a video from a local directory just fine. I am using a video podcast intended for the iPhone and I put it in an sdcard image and accessed it at /sdcard/myVideos/TheVideoPodcast.m4v Then use VideoView in your layout XML and set its URI programatically in your activity:

[android-developers] Adding xmpp users into xmppDataMessageCapable table

2008-04-04 Thread Jorge
Hi, I am trying to add an users into xmppDataMessageCapable table, without success. This is my code: * SQLiteDatabase db; ContentValues values = new ContentValues(); String myResource = Resource ; String myEmail = [EMAIL PROTECTED]; Cursor c;

[android-developers] Re: JAD - Java Application Descriptor like

2008-04-04 Thread David Given
Raja Nagendra Kumar wrote: [...] Once the application is compiled and packed, is there a way provide external properties to the andorid application. Similar to JAD file in j2me. Yes; you can attach metadata to activities by putting it in your manifest.xml file. You can then read it by

[android-developers] Re: How does a user input a text on HVGA portrait mode with no keyboard, in the actual device.

2008-04-04 Thread Megha Joshi
Hi, I am assuming that you are trying to simulate keyevents. You can use the APIs in the instrumentationhttp://code.google.com/android/reference/android/app/Instrumentation.html class, particularly

[android-developers] Re: Why bitmap cache was removed in mc5?

2008-04-04 Thread Megha Joshi
When I loaded images from the web, it was quite useful to use caching of images Could you give me some more background information on this? What APIs did you use that are now not available or what behavior did you see in m3 which is no longer visible? On Thu, Apr 3, 2008 at 1:37 PM, rostik

[android-developers] Is ScrollView the only way Scroll the Screen?

2008-04-04 Thread gilgantic
Hi All, Is it common to use ScrollView as the parent layout for scrolling on a screen? My screens normally go beyond the view of the screen. Especially when I test using the QVJA emulator skins. Below is example of what most of my layouts for app look like. ?xml version=1.0 encoding=utf-8?

[android-developers] Re: MediaPlayer example: Has anyone been able to stream an .mp4 file yet?

2008-04-04 Thread Markiv
I am having the same issue...let me know if you figure out a solution... Vikram On Apr 4, 1:46 am, acopernicus [EMAIL PROTECTED] wrote: Please feel free to test your working code against my .mp4 file if your code works. It's possible there's something wrong with my .mp4 file, but I doubt

[android-developers] Re: Strange slow behavior in Emulator and how to recreate it (CameraPreview)

2008-04-04 Thread qvark
Also, try rotating the device (Ctrl-Alt-Pg. down). The ratio (frames/ sec) is much slower in landscape mode than in portrait mode. I suppose it is just an emulator issue and it will not be a problem with the actual devices, so I'm not too much worried about it... On 4 abr, 15:05, Franco [EMAIL

[android-developers] how to change Menu show up as VERTICAL?

2008-04-04 Thread Android-Berry
Hi There, After creating the menuitems and add them to Menu, they are showing HORIZONTAL instead of VERITCAL, like the following style: I3 | ITEM4 | ITEM5 -- FIRST 1 | SECOND 2 how to make them display like vertical alignment ITEM5 ITEM4 I3 SECOND 2 FIRST 1

[android-developers] Re: Deploy from a webserver

2008-04-04 Thread Shane Isbell
Hi Mikael, I've got remote downloading working. You can go to code.google.com/p/jvending and download a provisioning server that handles stocking and delivery of Android apps. It uses OMA OTA descriptors (a superset of JAD descriptors). I'm going to shortly release the application manager

[android-developers] Re: Custom listview

2008-04-04 Thread NikB
On the ImageView question, this should work: ImageView image = (ImageView)findViewById(R.id.avatar); Bitmap bitmap = BitmapFactory.decodeFile(photoPath); //this is the full path in my case it is /sdcard/sample/foo.png image.setImageBitmap(bitmap); The setImageDrawable(int drawable) with a

[android-developers] Re: Reset of the emulator?

2008-04-04 Thread Digit
emulator -wipe-data On Fri, Apr 4, 2008 at 9:00 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Vista, I deleted the userdata.img file, but after that I am not able to launch the emulator at all. Is there any other way to do a hard reset on Android emulator? On Feb 9, 7:33 am, zurdo1119

[android-developers] Re: MediaPlayer example: Has anyone been able to stream an .mp4 file yet?

2008-04-04 Thread acopernicus
I decided to take matters into my own hands and to write my own streaming utility for the MediaPlayer. I created a tutorial on my solution and posted everything including source code onto my blog: blog.pocketjourney.com. Please check it out leave a comment on my blog if you have questions.

[android-developers] gtalkservice.IGTalkSession.logout() causes GTalk Service to crash

2008-04-04 Thread android munky
Has anybody else experienced com.google.android.gtalkservice.IGTalkSession.logout() causing the GTalkService to crash? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group,

[android-developers] Re: Any one tried uisng mediaplayer example ,I ma unable to play video file from local directory

2008-04-04 Thread acopernicus
Hi guys, I decided to write my own streaming utility for the MediaPlayer. My solution is now documented as a tutorial on my blog including including source code: blog.pocketjourney.com. Please check it out leave a comment on my blog if you have questions. Best of luck, Anthony

[android-developers] Re: How to setup a server for streaming audio files

2008-04-04 Thread acopernicus
Still no luck streaming the audio using the built-in MediaPlayer functionality so I decided to write my own streaming utility for the MediaPlayer. My solution is now documented as a tutorial on my blog including including source code: blog.pocketjourney.com. Please check it out leave a

[android-developers] Why don't System.err and System.out point to the console?

2008-04-04 Thread Anil
It would be good for Android phones to have a rolling log file that doubles as a console. That way, when there are problems with applications in production, the user can simply push the logs to a server - just as Microsoft does now. It is weird for developers to not have familiar tools like

[android-developers] Call out to the community about the poor quality of Android's error messaging

2008-04-04 Thread acopernicus
Yeah...the Challenge deadline is growing closer, so I needed to spread a a little feedback to the Android team about the many days I've just spent working around issues in the API. OK...first off...some of those issues were mine but my biggest waste of time has been tracking down error messaging

[android-developers] Re: Why don't System.err and System.out point to the console?

2008-04-04 Thread Andrex
It's because the Android code isn't really Java, it's Dalvik, and the Android emultator makes you report those things to the Dalvik output. You yourself listed the process to print errors there, I suggest you use it. ;) On Apr 4, 7:34 pm, Anil [EMAIL PROTECTED] wrote: It would be good for

[android-developers] Re: Call out to the community about the poor quality of Android's error messaging

2008-04-04 Thread Andrex
Well that's what you get when you program in the Java language... Although I agree, some errors are seemingly random. It'd be nice to have some sort of stability, but I'll make do because of how great Android is now already. On Apr 5, 12:19 am, acopernicus [EMAIL PROTECTED] wrote: Yeah...the