[android-developers] How to disable the soft keyboard for the EditText control in sdk1.1
I'm using sdk1.1, there is no setInputType in InputMethodManager. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to disable the soft keyboard for the EditText control in sdk1.1
Thank you Mike, I think reflect should done my job. I also find my trouble is using 1.1 sdk with 1.5 emulator -_-!! On Oct 15, 11:12 am, EboMike ebom...@gmail.com wrote: See this very recent thread about using functions of a newer SDK while maintaining compatibility with an older one: http://groups.google.com/group/android-developers/browse_frm/thread/a... On Oct 14, 6:54 pm, xingye yeas...@gmail.com wrote: I'm using sdk1.1, there is no setInputType in InputMethodManager. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to show a dialog in thread.run()
My code: public class GameView extends SurfaceView implements SurfaceHolder.Callback { ... Dialog dialog = new Dialog(app); class GameThread extends Thread { public void run() { Looper.prepare(); while (bRun) { switch(flag){ case 0: break; case 1: dialog.show(); flag=0; break; } } } } ... } The dialog.show() was called, but noting happened. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Final SDK build available (84853); deadline extended to Tuesday, August 5?????
details of the mail maybe i'm in the entrants list but i don't know it, ha:) fromAndroid Developer Challenge Team [EMAIL PROTECTED] to Android Developer Challenge Contest Entrants adc- [EMAIL PROTECTED] dateTue, Jul 15, 2008 at 5:50 AM subject Final SDK build available (84853); deadline extended to Tuesday, August 5 mailing listadc-entrants.google.com Filter messages from this mailing list On 7月15日, 上午8时42分, xingye [EMAIL PROTECTED] wrote: What's this ADC Entrants, We're pleased to announce that SDK build 84853 is now available on your private download site. This will be the last build released for ADC Round 2 and is the build that you will need to submit your final application under. In addition, the final ADC deadline has been extended to Tuesday, August 5. This is the final ADC deadline. Thanks! Android Developer Challenge Team --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: I want to Draw a image on image on x and y axis
): bea42728 b7b0 [heap] INFO/DEBUG(494): bea4272c 420e95ba INFO/DEBUG(494): bea42730 41009db4 INFO/DEBUG(494): bea42734 bea42750 [stack] INFO/DEBUG(494): bea42738 41009dac INFO/DEBUG(494): bea4273c 0100 INFO/DEBUG(494): bea42740 41f72620 INFO/DEBUG(494): bea42744 ad33258d /system/lib/ libandroid_runtime.so INFO/DEBUG(494): bea42748 bea42770 [stack] INFO/DEBUG(494): bea4274c ad00a668 /system/lib/libdvm.so INFO/DEBUG(494): bea42750 41051ebc INFO/DEBUG(494): bea42754 b7b0 [heap] INFO/DEBUG(494): bea42758 420e95ba INFO/DEBUG(494): bea4275c bea427f0 [stack] INFO/DEBUG(494): bea42760 0001 INFO/DEBUG(494): bea42764 0271 INFO/DEBUG(494): bea42768 bea42770 [stack] INFO/DEBUG(494): bea4276c ad036b9d /system/lib/libdvm.so INFO/DEBUG(494): bea42770 41009dac INFO/DEBUG(494): bea42774 420e95ba INFO/DEBUG(494): bea42778 ad332581 /system/lib/ libandroid_runtime.so INFO/DEBUG(494): bea4277c bea427f0 [stack] INFO/DEBUG(494): bea42780 41009dc4 INFO/DEBUG(494): bea42784 41009dac INFO/DEBUG(494): bea42788 41009d9c INFO/DEBUG(494): bea4278c 41051ebc INFO/DEBUG(494): bea42790 ad06e1d8 /system/lib/libdvm.so INFO/DEBUG(494): bea42794 ad017604 /system/lib/libdvm.so INFO/DEBUG(494): bea42798 bea42807 [stack] INFO/DEBUG(494): bea4279c 0004 INFO/DEBUG(494): bea427a0 0005d260 [heap] INFO/DEBUG(494): bea427a4 e3d4 INFO/DEBUG(494): bea427a8 02fc INFO/DEBUG(494): bea427ac ad06d5c8 /system/lib/libdvm.so INFO/DEBUG(494): bea427b0 bea42838 [stack] INFO/DEBUG(494): bea427b4 b7b0 [heap] INFO/DEBUG(494): bea427b8 00060400 [heap] INFO/DEBUG(494): bea427bc 41052dc0 INFO/DEBUG(494): bea427c0 2d18 INFO/DEBUG(494): bea427c4 bea42838 [stack] INFO/DEBUG(494): bea427c8 b7b0 [heap] INFO/DEBUG(494): bea427cc 4022d948 INFO/DEBUG(494): bea427d0 4005d308 INFO/DEBUG(494): bea427d4 4001df70 INFO/DEBUG(494): bea427d8 0003 INFO/DEBUG(494): bea427dc INFO/DEBUG(494): bea427e0 01c2 INFO/DEBUG(494): bea427e4 INFO/DEBUG(494): bea427e8 2a77b21d INFO/DEBUG(494): bea427ec 3fdd8689 INFO/DEBUG(494): bea427f0 00120b58 [heap] INFO/DEBUG(494): bea427f4 01070003 INFO/DEBUG(494): bea427f8 INFO/DEBUG(494): bea427fc 41009980 INFO/WindowManager(515): WIN DEATH: Window{401ac850 com.gps.framework.rivepoint/com.gps.framework.rivepoint.TestLayout} INFO/ActivityManager(515): APP DEATH: com.gps.framework.rivepoint INFO/WindowManager(515): WIN DEATH: Window{403b0088 com.gps.framework.rivepoint/com.gps.framework.rivepoint.BrowsePOI} INFO/WindowManager(515): WIN DEATH: Window{40366718 com.gps.framework.rivepoint/com.gps.framework.rivepoint.BrowseCoupon} INFO/WindowManager(515): WIN DEATH: Window{40355d00 com.gps.framework.rivepoint/com.gps.framework.rivepoint.ShowCoupon} INFO/WindowManager(515): WIN DEATH: Window{402d0d30 com.gps.framework.rivepoint/ com.gps.framework.rivepoint.BrowsePOICategory} On Apr 24, 2:37 pm, xingye [EMAIL PROTECTED] wrote: Canvas c = new Canvas(bitmapA); c.drawBitmap(bitmapB, left, top, paint); On 4月24日, 下午3时10分, Greg [EMAIL PROTECTED] wrote: hello android champs On Apr 24, 11:02 am, Greg [EMAIL PROTECTED] wrote: hello any body can help me out ? On Apr 24, 10:10 am, Greg [EMAIL PROTECTED] wrote: public static BitmapDrawable convertBytesintoDrawable(byte[] imageBytes, Context context,byte[] logoImageBytes) throws IOException { ByteArrayInputStream mainImageinputStream = new ByteArrayInputStream(imageBytes); ByteArrayInputStream logoImageInputStream = new ByteArrayInputStream(logoImageBytes); Bitmap mainImageBitmap = BitmapFactory.decodeStream(mainImageinputStream); //Bitmap.create Bitmap logoBitmap = BitmapFactory.decodeStream(logoImageInputStream); //logoBitmap.setPixels(new int[0], 0, 0, 5, 5, 5, 5); //logoBitmap.setPixel(5, 5, R.color.theme_black_text); mainImageinputStream.close(); ... 阅读更多 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now
[android-developers] Re: I want to Draw a image on image on x and y axis
i don't know when did you call the imageView.draw(canvas), but if i need draw a bitmap on a imageview, i should call ImageView.setImageBitmap(bm). here the bm should be Bitmap background in before code. On 4月24日, 下午7时09分, Greg [EMAIL PROTECTED] wrote: hello now all work fine but applicated crashed on imageView.draw(canvas); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: set an OnClickListener for each button in a ListView's row
see http://code.google.com/p/sharepath ChooseBuddy.java. the multi- selected list is seem to yours. On 4月18日, 下午11时13分, Pzikit Bloo [EMAIL PROTECTED] wrote: Hi guys, I'm trying to create a ListView, with a TextView and two ImageButton per row. The problem comes when I try to add an OnClickListener to each button. I did in this way: -- row.xml -- LinearLayout ... TextView ... / ImageButton android:id=@+id/button1 android:layout_width=35dip android:layout_height=35dip android:src=@android:drawable/arrow_down_panel_bezel / ImageButton .. / /LinearLayout -- .java -- ... ImageButton ib1 = (ImageButton) this.findViewById(R.id.button1); ib1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View arg0) { } }); But I get a NullPointerException. What's the right way to do that? Thanks, Pzikit Bloo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to force ViewBinder redraw?
reportdatachanged On 4月14日, 上午9时51分, SnowDrifter [EMAIL PROTECTED] wrote: I have tried both: getListView.requestLayout() and invalidate() neither of which seems to update it. It is however calling the ViewBinder code so it seems that it is almost doing the right thing. On Apr 13, 7:35 pm, SnowDrifter [EMAIL PROTECTED] wrote: I have a value that I am writing to my list via a ViewBinder but I want to occasionally have it recalculate it's value. Is there a way to force the ViewBinder to update the values? Preferably without it disrupting the selection process. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: listview refresh data
Call notifyDataSetChanged() after the list has been changed. On 3月23日, 下午11时22分, andronir [EMAIL PROTECTED] wrote: and then - reload the CursorAdapter? by reloading the database data? Is there a more efficient way to do it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Amount of Zoom from Distance in Maps (Very Easy)
As we all know, there is a function named Calculate.getPointXY() which can calculate the screen point by map point. If there are many map points, we can easily find our the great distance in lat and lon, and got the center of all these points. When they converted to screen point and we also have the screen width and screen height, think becomes easy. A zoom in level just div the distance(pixels) by 2 and a zoom out multiple it. so we can find out the new level by current level. Maybe i should update my project with this feature :P AD: Welcome to my project sharepath on google code. On 4月7日, 下午12时42分, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello everyone, I want to get the zoom number from a distance. For instance, int distance = 999; Now, how could I calculate the amount of zoom needed so I can see all of these 999 miles on the map? Ex. int distance = 999; MapView mMapView = new MapView(this); MapController mc = mMapView.getController(); //let's say that I calculated that the amount of zoom is 10 //here I need to actually calculate this mc.zoomTo(10); Thanks, Noam. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ListView custom items and OnClick events
Perhaps grid is better for this job. On 4月9日, 上午5时07分, Redhunt [EMAIL PROTECTED] wrote: Hi, After some work I was able to get the custom items on a ListView working. Very cool stuff. I have a quesiton about click events. My custom list item view has 2 imageViews and a TextView. On the listView I capture onItemClick(AdapterView parent, View v, int position, long id) And everything works great. But what about the possibility of finding out what actual view inside the custom list item view the user clicked on?. Did he click on an image, on the text ... I looked at v View passed in to the above method, but that tells me that the user clicked on the LinearLayout which is the base view for the cutom item so no help there. Note, It is important that when I capture the event I know what item (position) object was clicked. Any thoughts. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is it possible to use multiple selection list?
Here is an example. http://code.google.com/p/sharepath Semeria Stefano 写道: Hi all, I need a list view that can handle the selection of multiple items at the same time. Is that possible? Thanks a lot. Regards, Stefano --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Thank you all
Good Luck! On 4月7日, 下午6时20分, Shamim [EMAIL PROTECTED] wrote: My whole hearted thanks to the active member of this group for their contribution and question regarding android which helped me to solve problem, think differently and finally let me learned so many things. I have submitted my project to the Google and let's wait for the result.wish you all the best those who have submitted and going to submit. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: dynmatically create menuitem
Here is a full example for your question: http://code.google.com/p/sharepath see buddy.java plz On 4月8日, 上午4时51分, hackbod [EMAIL PROTECTED] wrote: To change the menus each time they are displayed, implement Activity.onPrepareOptionsMenu(). On Apr 7, 12:45 pm, Android-Berry [EMAIL PROTECTED] wrote: Hi There, As you know, we create a menuitem at onCreateOptionsMenu method, However, when the view content has been changed, for example, first the Screen is blank, no view is added,and we display only one menuitem called Add a Button, After fullfill this function, I want to add a menuitem Delete a Button when A button-view added to screen and focus is on. so when the user click menu, it will show Add a Button,Delete aButton. How to implement this function, which method should we override it? Thanks~~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android:text=#... bug?
try \#... On 4月7日, 上午4时43分, Nixarn [EMAIL PROTECTED] wrote: Might have found a bug. So I thought I'd post about it. Doing: android:text=#... will give an error. The # makes it try to parse the text as a color, but android:text should not be parsed as a color? Niklas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting the state of a checkbox inside of a listview
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 figuring out how to access the data in the checkbox or get an onclick from the checkbox since there are n of them and I can't exactly give each one an ID. This has been posted before but nobody had a solution:http://groups.google.com/group/android-developers/browse_thread/threa... I was hoping there was a fix for this in M5. Anybody know? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Resuming not visible activities using intents
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 need a way to reuse one in background already on the stack. Please help. Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Resuming not visible activities using intents
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 system menu or tabset in one activity not many activity On 4月4日, 下午4时32分, Semeria Stefano [EMAIL PROTECTED] wrote: 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 in a service that receives and sends messages. Any time a message is received I add a persistent notification in the status bar. The user should be able to switch between different conversation by selecting the notification that is bound to that conversation. When he does so, I would like a new activity to be started (if a new conversation takes place) or a background activity is taken into the foreground. The problem is that when the notification is clicked I am currently firing an Intent with ACTION_VIEW as an action and a new instance of my chat activity is launched every time (so I am not able to resume old conversations)... I guess services are not useful to solve my problem... Have you got any suggestion? Thanks a lot Stefano -Original Message- From: android-developers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of xingye Sent: venerdì 4 aprile 2008 10.22 To: Android Developers Subject: [android-developers] Re: Resuming not visible activities using intents 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 need a way to reuse one in background already on the stack. Please help. Thanks a lot.- 隐藏被引用文字 - - 显示引用的文字 - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Image not correctly viewed
// 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); // Drawable drawable = Drawable.createFromPath(uri.getPath()); // try { // URL url = new URL(http://www.yexing.org/image.axd? picture=browse.png); // InputStream is = url.openStream(); // Drawable drawable = Drawable.createFromStream(is, none); // iv.setImageDrawable(drawable); // } catch(Exception e) { // Log.e(LOG_TAG, load image error! \n + e.toString()); // } On 4月4日, 下午9时55分, Andrea Bernardi [EMAIL PROTECTED] wrote: 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 java.io.InputStream; import java.net.URL; import java.net.URLConnection; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.widget.ImageView; public class Weather extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); ImageView img = (ImageView) findViewById(R.id.weatherimg); // this don't function try { URL aURL = new URL(http://vdt.meteo.alice.it/meteo/imgs/icone/small/previsioni/notte/ser... ); URLConnection conn = aURL.openConnection(); conn.connect(); InputStream is = conn.getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); Bitmap bm = BitmapFactory.decodeStream(bis); bis.close(); is.close(); img.setImageBitmap(bm); } catch (IOException e) { // Reset to 'Dunno' on any error showAlert(Error, 0, Can't download image, Ok, false); } } } where the main.xml is the following: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/weatherimg android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout Instead, if I insert the same image in the directory res/drawable of the project and I use the following code the image is correctly viewed: public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); ImageView img = (ImageView) findViewById(R.id.weatherimg); //this function img.setImageDrawable(getResources().getDrawable(R.drawable.sereno)); } Have you some suggestion? Thanks Andrea --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Finish Activity(Urgent)
override B.onActivityResult and call finish() On 4月3日, 下午5时23分, Greg [EMAIL PROTECTED] wrote: I have three activies A B C i start sub activity from A then i startsubactivity from B i just want to do like when i finish C ..it finish all activies and show me the A activity please help me out i tried to do that but ..when i press back button it again shows B activity. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MapView inside ScrollView doesn't move right
Maybe you should override the scrollview's dispatchTouchEvent, and detect if the touch event fired by the mapview, then decided who will handle that event. On 4月4日, 上午9时47分, colintheprep [EMAIL PROTECTED] wrote: Hi - anybody know if it's possible to have a mapview inside a scrollview, and have it take focus such that it can move without the scrollview scrolling? So I want: scrollview some stuff mapview some more stuff When I drag on empty space or tab between elements in stuff, the scrollview scrolls correctly. But when the mapview is visible, and I click on it, and try to move it around with the 'touchscreen', the scrollview takes over and scrolls instead of the mapview moving. I'd like to be able to 'focus' the mapview, such that it pans instead of the scrollview scrolling, and then to restore focus to the scrollview by clicking on empty space, or another item. any ideas? thanks! Colin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: NullPointerException Error (Very Easy)
Is there a view with id list in your layout file? On 4月4日, 下午12时46分, Dan U. [EMAIL PROTECTED] wrote: It'd be helpful to see your code, but I'm guessing you have a ListActivity and you haven't set a list adapter. On Apr 3, 7:42 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello everyone, When I want to start my activity in Run mode, all I get is a NullPointerException error. When I run it in debug mode, I can see the stack trace but it doesn't really help me..Can anyone decipher this stack trace? DalvikVM[localhost:8606] Thread [3 Main] (Suspended (exception NullPointerException)) ArrayAdapter.createViewFromResource(int, View, ViewGroup, int) line: 243 ArrayAdapter.getView(int, View, ViewGroup) line: 221 ListView.measureHeightOfChildren(int, int, int, int, int) line: 1009 ListView.onMeasure(int, int) line: 959 ListView(View).measure(int, int) line: 5937 LinearLayout(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 2251 LinearLayout.measureChildBeforeLayout(View, int, int, int, int, int) line: 742 LinearLayout.measureVertical(int, int) line: 289 LinearLayout.onMeasure(int, int) line: 231 LinearLayout(View).measure(int, int) line: 5937 FrameLayout(ViewGroup).measureChild(View, int, int) line: 2219 FrameLayout.onMeasure(int, int) line: 146 FrameLayout(View).measure(int, int) line: 5937 LinearLayout.measureVertical(int, int) line: 385 LinearLayout.onMeasure(int, int) line: 231 LinearLayout(View).measure(int, int) line: 5937 PhoneWindow$DecorView(ViewGroup).measureChild(View, int, int) line: 2219 PhoneWindow$DecorView(FrameLayout).onMeasure(int, int) line: 146 PhoneWindow$DecorView.onMeasure(int, int) line: 1202 PhoneWindow$DecorView(View).measure(int, int) line: 5937 ViewRoot.performTraversals() line: 341 ViewRoot.handleMessage(Message) line: 584 ViewRoot(Handler).dispatchMessage(Message) line: 80 Looper.loop() line: 91 ActivityThread.main(String[]) line: 3052 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 356 ZygoteInit$MethodAndArgsCaller.run() line: 1547 ZygoteInit.main(String[]) line: 1445 NativeStart.main(String[]) line: not available [native method] Thread [13 Binder Thread #2] (Running) Thread [11 Binder Thread #1] (Running) Thread [15 Thread-7] (Running) Thanks, Noam.- 隐藏被引用文字 - - 显示引用的文字 - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cant created non-interactive ListView
If you don't need a list, why not draw the items on a simple view? On 4月2日, 下午6时33分, Harsh Jain [EMAIL PROTECTED] wrote: Hi, I need to create a list view, which doesnt response to user interactions, it should be non-clickable, and user should not be able to scroll through it. I tried the following ListView lv = getListView(); lv.setClickable(false); lv.setFocusable(false); lv.setDividerHeight(0); lv.setItemsCanFocus(false); But I am still able to navigate the list using key pad and am also able to click through it. I even tried lv.setEnabled(false), which only makes it grey but i am still able to scroll through it. Please advice. Regards, harsh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Unable to set the image on an ImageView in code
My code 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); // Drawable drawable = Drawable.createFromPath(uri.getPath()); try { URL url = new URL(http:// www.yexing.org/image.axd? picture=browse.png); InputStream is = url.openStream(); Drawable drawable = Drawable.createFromStream(is, none); iv.setImageDrawable(drawable); } catch(Exception e) { Log.e(LOG_TAG, load image error! \n + e.toString()); } On 4月2日, 上午9时19分, David Given [EMAIL PROTECTED] wrote: I'm trying to programmatically set the image on an ImageView. (Part of a SimpleCursorAdapter binding function.) I'm finding that the image never appears to show up. While this behaviour appears if I call setImageURI(), I also see it if I break things down as follows: ImageView iv = (ImageView) view; String path = getApplication().getFilesDir().getAbsolutePath(); InputStream is = new FileInputStream(path + /icon.png); Drawable icon = new BitmapDrawable(is); Log.i(Fnord, width=+icon.getIntrinsicWidth()+ height=+icon.getIntrinsicHeight()); iv.setImageDrawable(icon); I'm getting sensible tracing, indicating that the image has loaded correctly, and iv.setImageDrawable() appears to succeed --- but nothing happens. The ImageView doesn't even change size. Any suggestions? -- David Given [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to make a View always display on Screen?
Maybe you should use your owen home.apk instead of the one android provided. On Apr 3, 4:28 am, Android-Berry [EMAIL PROTECTED] wrote: Hi there, I want to create a view stick with screen, what I means is like status bar, but is always at the bottom of screen, for example, Create a view and it will show at the bottom of the screen, maybe the screen holds tabview or linearlayout view that holds lots of view, which is needed to scroll up/down/right/left to browser all the view, No matter how to do, the Stick-view always is displayed on the bottom of the screen. Thanks~~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: efficiency question: ViewInflate used for rows of a listview
It's posiable to create a LinearLayout layout and put some controls in it. look at here (InternalSelectionFocus.java in ApiDemos): final LinearLayout layout = new LinearLayout(this); layout.setOrientation(LinearLayout.HORIZONTAL); layout.setLayoutParams(new ViewGroup.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.FILL_PARENT, 1); final InternalSelectionView leftColumn = new InternalSelectionView(this, 5, left column); leftColumn.setLayoutParams(params); leftColumn.setPadding(10, 10, 10, 10); layout.addView(leftColumn); final InternalSelectionView middleColumn = new InternalSelectionView(this, 5, middle column); middleColumn.setLayoutParams(params); middleColumn.setPadding(10, 10, 10, 10); layout.addView(middleColumn); final InternalSelectionView rightColumn = new InternalSelectionView(this, 5, right column); rightColumn.setLayoutParams(params); rightColumn.setPadding(10, 10, 10, 10); layout.addView(rightColumn); setContentView(layout); On Apr 3, 2:35 am, Craig [EMAIL PROTECTED] wrote: Is there a more efficient way to create rows for a listview other than to use ViewInflate over and over? Is there much of a performance gain by creating the views programmatically rather than in xml (although I do perfer the maintainability of the xml approach)? Since I am inflating the same definision over and over again can I do the inflate once and somehow clone the result? Or is this not practical since the xml definision is already optimized for inflation during compile time? NOTE: I am already skipping the inflate if an old row's view is passed in to the getview method. I am looking into this because the screens that take long to bring up (with there lists filled) spend 95% of their time inflating the views for these rows (4.5 seconds for approx 20 rows according to the profiler) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: List of images
adapter = new SimpleCursorAdapter(this, R.layout.inbox_list, mCursor, new String[] { Domain.Message.FROM, Domain.Message.END, Domain.Message.START }, new int[] { R.id.image, R.id.text1, R.id.text2 }); adapter.setViewBinder(new SimpleCursorAdapter.ViewBinder(){ public boolean setViewValue(View view, Cursor cursor, int columnIndex) { // TODO Auto-generated method stub // Log.v(LOG_TAG, setViewValue); // Log.v(LOG_TAG, columnIndex: + columnIndex); // Log.v(LOG_TAG, column: + cursor.getString(columnIndex)); int resid = 0; if(columnIndex == cursor.getColumnIndex(Domain.Message.FROM)) { ImageView iv = (ImageView)view; Log.v(LOG_TAG, list type: + cursor.getInt(cursor.getColumnIndex(Domain.Message.TYPE))); if(cursor.getInt(cursor.getColumnIndex(Domain.Message.TYPE)) == 0) { if(cursor.getInt(cursor.getColumnIndex(Domain.Message.READ)) == 0) { resid = R.drawable.msg_ask_new; } else { resid = R.drawable.msg_ask_read; } } else { if(cursor.getInt(cursor.getColumnIndex(Domain.Message.READ)) == 0) { resid = R.drawable.msg_reply_new; } else { resid = R.drawable.msg_reply_read; } } if(resid != 0) { iv.setImageResource(resid); return true; } } return false; } }); setListAdapter(adapter); On Apr 2, 4:18 am, Tofik [EMAIL PROTECTED] wrote: Hello. I have object type in DB (integer field 1, 2, 3 ... 8). Each object type corresponds to image, which is stored in drawable directory. I want to display list of objects with their images. I found solution, using SimpleCursorAdapter. It bind image from DB, but in this case I have to store image in DB, which is unnecessary, because I have object type. Can you please help me, how can I solve this problem? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is there a API implementing a multi-selected list views?
I have find it out, look at this code:) http://code.google.com/p/sharepath On Mar 26, 5:11 pm, Wei Yongqiang [EMAIL PROTECTED] wrote: Good news. After your trying, tell us the result. Thanks. Frank On Wed, 2008-03-26 at 02:03 -0700, xingye wrote: I'm trying on it. There is an example already here - layer selection dialog in the maps. If I find the key, I will post it out:) On Mar 25, 11:45 pm, Wei Yongqiang [EMAIL PROTECTED] wrote: Hi all, I want to know if there is a API that have implemented a multi-selected list views. I am developing a File Manager, and I need a list view where I can select several items other than only one. Many thanks. Frank, Wei --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Disabling Chat Notifications.
remove the gtalk simple from apidemos? On 3月30日, 上午5时40分, Harsh Jain [EMAIL PROTECTED] wrote: Hi, I really really need to disable them. Has anyone been able to get the provider id for GTalk ? Regards, harsh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---