[android-developers] Re: getExternalStorageDirectory() on NEXUS S
It's forced into the built-in space that will get picked up by the Android media scanner when it indexes EXTERNAL_CONTENT_URI. btw I don't think the media scanner picks it up. The media scanner would need to be explicitly told to look at '/mnt/emmc' On Jan 4, 12:45 pm, Tabman tabishfay...@gmail.com wrote: Thanks Doug, Your reply is very helpful, you also replied to another post of mine so thanks again :) On Dec 20 2010, 1:51 am, Doug beafd...@gmail.com wrote: On Dec 19, 2:14 pm, Tabman tabishfay...@gmail.com wrote: I have a question related to this. How many phones are out there with this type of behavior ? I want to access Camera Photos/Videos on a phone and for that I've used EXTERNAL_CONTENT_URI but it seems that approach would fail on a phone likeDroidIncredible. How should I design my app such that it is able to get camera data from any android phone ? It will fail on theDroidIncrediblebecause they didn't wire up that URI to point to the external storage mounted at, I think, /emmc. That's fragmentation for you. (I think they did it wrong.) But at least their camera app doesn't put content on the sdcard. It's forced into the built-in space that will get picked up by the Android media scanner when it indexes EXTERNAL_CONTENT_URI. However, it works on Galaxy S devices because its built-in external space is wired to that URI --AND-- if you do have a sdcard in the device, it will mount THAT filesystem underneath the internal storage space. So if the internal storage space was at /mnt/sdcard, your additional sdcard would be at /mnt/sdcard/external_sd. And when the Android media scanner runs to index media referenced by EXTERNAL_CONTENT_URI, it will scan all of /mnt/sdcard, including the sdcard. So they're doing it in a more compatible way that lets you get at the media on the user's sdcard in addition to the built-in space. I don't know what the Nexus S or HTC Hero do. I also don't know what this Picasa Tool Pro does. Maybe it doesn't query against the Android content providers for media and does its own thing instead. Doug -- 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] Error when i try to convert the minSDK version from 8 to 7
Hi guys I made an application on android 2.2 api but i also want to run it on android 2.1 api I am not using any 2.2 specific library and it should work absolutely fine . May be i messed up something in the process of converting it to 2.1 I have navigated to android tools - Fix Project Properties and set the api level Changed it manually in androidManifest but still it is giving me the Null Pointer Exception but it seems to work fine on 2.2 emulator What could possibly be left out -- 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
Re: [android-developers] Re: TextView with a top margin that is proportional to the height of the parent view
John, You can do this with LinearLayout and layout_weight attribute that it supports: LinearLayout layout_height=fill_parent orientation=vertical View layout_height=0dp layout_weight=20/ TextView layout_height=0dp layout_weight=80/ /LinearLayout The top view acts as a spacer, taking up 20% of the screen height, and the TextView starts below that. -- Kostya 29.01.2011 10:59, Jonathan Foley пишет: Yes, but you'll have to do it at runtime as there is not a way to do proportional layout as you describe in xml. To prevent a visible transition from the xml size to the correct size, you'll probably want to extend LinearLayout and override its onLayout(). You'll want to layout your child textview within that and you'll want to use getHeight() to get the height of the LinearLayout at runtime. I'd suggest looking through the code of ListView or RelativeLayout to see how children are measured and layout. The other option would be to do this after everything is inflated. You can override onFinishInflate of the LinearLayout and then adjust the height of the TextView from there. You'll need to invalidate the TextView after adjusting it's height. Jonathan On Jan 28, 9:48 pm, John Gabyjg...@gabysoft.com wrote: Is there a way to position text within a linear layout such that the position of the text is proportional to the height, rather than a fixed distance. For example, I would like the text to be displayed down from the top a distance equal to 20% of the height of the view. Thanks. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] Re: Linux User ID?
It's actually myUid(), and it doesn't require any permissions. -- Kostya 29.01.2011 3:26, paladin пишет: Do I need to set up any permission to make that call? android.os.Process.myUID(), correct? On Jan 28, 3:57 pm, Kostya Vasilyevkmans...@gmail.com wrote: Process.myUID(): http://developer.android.com/reference/android/os/Process.html 28.01.2011 23:46, paladin пишет: Is it possible to retrieve the Linux user ID that an app is running under (and possibly group ID)? -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] How to bring Activity to top of stack and reset it?
Nope singleTop is great. singleTask should be avoided unless you really, really want the radically different behavior it creates. On Fri, Jan 28, 2011 at 9:39 PM, Moto medicalsou...@gmail.com wrote: Thanks Dianne for your reply. I'm currently using android:launchMode=singleTop and have implemented the onNewIntent(). With that I'm also using the flag FLAG_ACTIVITY_REORDER_TO_FRONThttp://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT This behavior is perfect for what I was trying to do. If you don't recommend this please do let me know! 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 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] How to bring Activity to top of stack and reset it?
Ah, so singleTask for an existing activity pulls it out of whatever task it was in, and starts a new task? 29.01.2011 12:00, Dianne Hackborn ?: Nope singleTop is great. singleTask should be avoided unless you really, really want the radically different behavior it creates. On Fri, Jan 28, 2011 at 9:39 PM, Moto medicalsou...@gmail.com mailto:medicalsou...@gmail.com wrote: Thanks Dianne for your reply. I'm currently using android:launchMode=singleTop and have implemented the onNewIntent(). With that I'm also using the flag FLAG_ACTIVITY_REORDER_TO_FRONT http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT This behavior is perfect for what I was trying to do. If you don't recommend this please do let me know! 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com mailto:hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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
Re: [android-developers] Re: Android SDK is so slow that is ridiculous.
Not to mention that testing OpenGL games is impossible. The only way to test on devices is users, otherwise it's just a guessing and hoping for the best. In any case, I don't care WHY the emulator is so slow. Hopefully they'll make it fast in the near future, the iPhone emulator is much better. On Fri, Jan 28, 2011 at 11:52 PM, Jonathan Foley jonefo...@gmail.com wrote: As Dianne mentioned and others have before, the bottleneck is the dynamic translation of ARM opcodes to x86 opcodes. Other VM's like Vmware emulate hardware, but they are still executing code natively albeit with some hypervisor that itself has direct hooks within modern processors. The WebOS and WP7 and iOS emulators are all running builds compiled natively for x86 so they are fast. The Android emulator does not, though I don't see why it couldn't be. The emulator is unusable, I only use real devices except for UI assessment on smaller screens, though I use that less and less as the UI builder/previewer becomes more feature rich. Jonathan On Jan 28, 11:19 pm, Marcin Orlowski webnet.andr...@gmail.com wrote: All I was trying to say that emulating of 1GHz of any non native code at the instruction level will be slow on a 2Ghz host. I'd bet if you tried to run a PacMan 8-bit CPU at 1GHz, it wouldn't emulate at full speed or even come close. 8-bit or not is not directly related to possible emulation speed. And this is just type of architecture which is not the only factor that influences the whole process (and yes, you can run 8-bit pacman full speed on far slower devices - i.e. Spectrum emulator on Palm phone (which is 300MHz). I believe in case of Android the bottlenecks is not just different architecture but also a GPU support (or lack of h/w support of such) which hits performance badly. In general I believe it would help if Google could just spend a few bucks and simply hire bunch of folks from emulators scene. -- 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 -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://developingthedream.blogspot.com/, http://www.youtube.com/user/revoltingx -- 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: Android SDK is so slow that is ridiculous.
(and yes, you can run 8-bit pacman full speed on far slower devices - i.e. Spectrum emulator on Palm phone (which is 300MHz). I meant if Pacman's 8080 were running at 1GHz. No way it could be emulated at full speed on a 2GHz i86, if each instruction is emulated individually -- not even close. Even with caching or other optimizations, you would have to read/decode/execute/write in a handful of processor cycles. And that assuming you would have 100% of the cycles available to you, which you don't. The iOS emulator is Mac specific and it's probably more like a simulator than an emulator. I believe the only real viable solution is to simulate an Android system below at some cut-off layer.Even if the emulated processor is running at 600Mhz which is about the speed of the slowest Android devices, trying to emulate such an advanced processor architecture at an acceptable speed will not work. Actually, I am quite suprised that it's running as good as it is, so without knowing all details, it's possible that some things are already simulated, not emulated. -- 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
Re: [android-developers] Error when i try to convert the minSDK version from 8 to 7
May be i messed up something in the process of converting it to 2.1 I have navigated to android tools - Fix Project Properties and set the api level Changed it manually in androidManifest but still it is giving me the Null Pointer Exception What could possibly be left out If your code is not using 2.2 features then it's just matter of setting targetSdk as low as you can and rebuilding your project (would clear project just in case myself). So if it now crashes it may be just bug in your code. Debug it as such. Or check logs and stacktrace you get on crash. -- 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 keep adb from being launched too early?
Is there any way to keep adb not running unless really needed ? It now starts as soon as I launch Eclipse and that causes some conflicts on my system for some reasons. I'd prefer it not to be launched unless I run/debug app or launch it by hand. Not spent much time investigating I just keep adb.exe renamed, but I do not like this approach too much. Any hints? -- 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
Re: [android-developers] Re: help to build an intent filter
2011/1/28 hansolo h4ns...@gmail.com: what's you mean using a standard MIME type ? I mean using a standard MIME type, where by standard I mean one that a random email client might actually use when constructing an email message with an attachment. You can invent your own MIME types, and that can work OK with Web servers, but email clients won't know to use them, generally. do you mean should I change my file extension to some well-known one (ex: txt, jpg..) ? Only if the file is of that format. I don't know how mail client decide mime type of attached file. Most map file extensions to MIME types, AFAIK. and I tried to change my extension to a some well-known one. (.pdf) but the situation is same as follow 01-28 22:50:28.518: INFO/ActivityManager(59): Starting activity: Intent { act=android.intent.action.VIEW dat=content:// com.android.email.attachmentprovider/1/9/RAW flg=0x80001 } so please tell me how can I use standard mime type. I would have expected that the Email app would use the MIME type embedded in the email information for the attachment, and that the MIME type would therefore have appeared in the Intent. Make sure the email you are looking at has the MIME types in it, by looking at the raw email message itself. my custom file is a base64-encoded text. and its content is some SEED- encrypted html file. so I use .smail extension on my file. I will be fairly stunned if you ever get that to work. I suggest that you reconsider the use of email as a means of distributing your files. For example, if your emails have links to files, and the files are served by Web servers, you have much greater control over how MIME types are handled. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- 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
Re: [android-developers] Error when i try to convert the minSDK version from 8 to 7
Yes i have done everything now if i run the build on 2.1 it says Android Library project could not be launched On Sat, Jan 29, 2011 at 3:16 PM, Marcin Orlowski webnet.andr...@gmail.comwrote: May be i messed up something in the process of converting it to 2.1 I have navigated to android tools - Fix Project Properties and set the api level Changed it manually in androidManifest but still it is giving me the Null Pointer Exception What could possibly be left out If your code is not using 2.2 features then it's just matter of setting targetSdk as low as you can and rebuilding your project (would clear project just in case myself). So if it now crashes it may be just bug in your code. Debug it as such. Or check logs and stacktrace you get on crash. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Error when i try to convert the minSDK version from 8 to 7
and in console it says Could not find MyApplication.apk! On Sat, Jan 29, 2011 at 5:06 PM, Robin Talwar r.o.b.i.n.abhis...@gmail.comwrote: Yes i have done everything now if i run the build on 2.1 it says Android Library project could not be launched On Sat, Jan 29, 2011 at 3:16 PM, Marcin Orlowski webnet.andr...@gmail.com wrote: May be i messed up something in the process of converting it to 2.1 I have navigated to android tools - Fix Project Properties and set the api level Changed it manually in androidManifest but still it is giving me the Null Pointer Exception What could possibly be left out If your code is not using 2.2 features then it's just matter of setting targetSdk as low as you can and rebuilding your project (would clear project just in case myself). So if it now crashes it may be just bug in your code. Debug it as such. Or check logs and stacktrace you get on crash. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Error when i try to convert the minSDK version from 8 to 7
On Sat, Jan 29, 2011 at 12:36 PM, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Yes i have done everything now if i run the build on 2.1 it says Android Library project could not be launched Check the project properties. It looks like you have checked the Is library checkbox. On Sat, Jan 29, 2011 at 3:16 PM, Marcin Orlowski webnet.andr...@gmail.com wrote: May be i messed up something in the process of converting it to 2.1 I have navigated to android tools - Fix Project Properties and set the api level Changed it manually in androidManifest but still it is giving me the Null Pointer Exception What could possibly be left out If your code is not using 2.2 features then it's just matter of setting targetSdk as low as you can and rebuilding your project (would clear project just in case myself). So if it now crashes it may be just bug in your code. Debug it as such. Or check logs and stacktrace you get on crash. -- 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 -- 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 -- 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] Custom Dialog without context application
Hi all, I'm trying to create an dialog wich is show on android desktop. My application contains a service who create notification. On notification click I would like show a dialog on desktop. My problem: each time I click on notification my dialog is showing with black screen behind (activity of my application). Notification notification = new Notification(R.drawable.charges, text, System.currentTimeMillis()); Intent myIntent = new Intent(getApplicationContext(), MyActivity.class); myIntent.putExtra(extra, extra); PendingIntent contentIntent = PendingIntent.getActivity(this, 0,myIntent, 0); notification.setLatestEventInfo(this, getText(R.string.app_name),text, contentIntent); notificationManager.notify(notifId, notification); How I should I do? My activity should be declare in specific way ? My activity just declare a custom dialog and show it in onCreate method. Thanks for help, Regards. -- 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
Re: [android-developers] Custom Dialog without context application
Anthony, Rather than using a dialog, make an Activity that looks like one with this: activity name, label... android:theme=@android:style/Theme.Dialog/ -- Kostya 29.01.2011 15:51, Antony BODY пишет: Hi all, I'm trying to create an dialog wich is show on android desktop. My application contains a service who create notification. On notification click I would like show a dialog on desktop. My problem: each time I click on notification my dialog is showing with black screen behind (activity of my application). Notification notification = new Notification(R.drawable.charges, text, System.currentTimeMillis()); Intent myIntent = new Intent(getApplicationContext(), MyActivity.class); myIntent.putExtra(extra, extra); PendingIntent contentIntent = PendingIntent.getActivity(this, 0,myIntent, 0); notification.setLatestEventInfo(this, getText(R.string.app_name),text, contentIntent); notificationManager.notify(notifId, notification); How I should I do? My activity should be declare in specific way ? My activity just declare a custom dialog and show it in onCreate method. Thanks for help, Regards. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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] Submenus in Options Menu on Honeycomb - broken, or I'm using it in wrong way?
Hi, I tried my app on image of Honeycomb preview in emulator and I noticed that sub menu in Options Menu doesn't work on Honeycomb. I'm adding submenu to Options menu: public boolean onCreateOptionsMenu(Menu menu) { menu.add(getString(R.string.addImage)); menu.add(getString(R.string.images)); /// here we create submenu Menu subMenu = menu.addSubMenu(getString(R.string.editExistingPosts)); subMenu.add(getString(R.string.fromBlog)); subMenu.add(getString(R.string.fromSD)); /// --- and it is created ;-) menu.add(getString(R.string.saveToSD)); return true; } And in onOptionsItemSelected I handle only options fromBlog and fromSD not editExistingPosts (of course I handle also rest of options), as I understand in earlier versions calling of super.onOptionsItemSelected(item) at the end of method caused that Android handled submenus and displayed submenu.. in Honeycomb it isn't true :-) Anybody noticed this problem on Honeycomb, or maybe I'm doing something wrong? -- 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] Honeycomb emulator on Linux
Hi, Anyone managed to get the emulator to run on Linux? For me it gets stuck on '/dev/dsp no such device' or '/dev/dsp: Device or resource busy' if I install OSS emulation. The '-noaudo' and '-audo none' options seem to be ignored, and '-audio alsa' doesn't make a difference either. I'm using Fedora 14 x86_64. -- 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: Custom Dialog without context application
Oh ! Thank you Kostya It works well and it's realy easier !!! -- 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] Custom List layout with checkbox selection problem
have ContactListActivity class as below public class ContactListActivity extends ListActivity{ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); getListView().setFocusable(true); getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); String[] from = new String[] {ContactsContract.Contacts.DISPLAY_NAME,ContactsContract.Contacts.HAS_PHONE_NUMBER,ContactsContract.Contacts._ID}; int[] to = new int[] {R.id.name}; ContactListCursorAdapter adapter = new ContactListCursorAdapter(getApplicationContext(), R.layout.listview, getCursor(), from, to); setListAdapter(adapter); } Where ContactListCursorAdapter looks as below public class ContactListCursorAdapter extends SimpleCursorAdapter{ private Context context; private int layout; private Cursor c; public ContactListCursorAdapter (Context context, int layout, Cursor c, String[] from, int[] to) { super(context, layout, c, from, to); this.context = context; this.layout = layout; this.c = c; } @Override public Cursor runQueryOnBackgroundThread(CharSequence constraint) { String[] projection = new String[] { ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID }; return context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, projection, null, null, null); } } listview xml looks as below RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=horizontal TextView android:id=@+id/name android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=25sp/ TextView android:id=@+id/number android:layout_width=wrap_content android:layout_height=fill_parent android:layout_below=@id/name android:layout_alignBottom=@id/number android:textSize=15sp/ CheckBox android:text= android:id=@+id/checkBox android:layout_width=wrap_content android:layout_height=fill_parent android:layout_alignRight=@id/name android:layout_alignParentRight=true/ /RelativeLayout My contact list with checkbox is prepared correctly. however when I check an item from the list (using check box) and then continuing scrolling up or down, it checks/selects other items(randomly) as well. I think first chekecked item's id is preserved and everytime it creates new view and selects/checks other items with same id or something? When I uncheck any of those indirectly selected items it unselcts all of them together. Strongly it appers to be an id issue? 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: org.xml.sax.SAXParseException: Unexpected end of document
Have you considered the obvious? On Jan 28, 11:01 pm, Pankaj Deshpande pcdeshpande...@gmail.com wrote: Hi everybody, I am parsing following xml with SimpleParser, but I am facing error as follows: Can anyone tell me why is this happening? XML: ?xml version=1.0 encoding=utf-8?resultstatus552/ statusstatustextNo Results Found/statustext/result Error: 01-29 10:28:51.220: WARN/System.err(520): org.xml.sax.SAXParseException: Unexpected end of document 01-29 10:28:51.239: WARN/System.err(520): at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java: 129) 01-29 10:28:51.239: WARN/System.err(520): at org.simpleframework.xml.stream.DocumentProvider.provide(DocumentProvider.java: 97) 01-29 10:28:51.239: WARN/System.err(520): at org.simpleframework.xml.stream.DocumentProvider.provide(DocumentProvider.java: 83) 01-29 10:28:51.239: WARN/System.err(520): at org.simpleframework.xml.stream.NodeBuilder.read(NodeBuilder.java:71) 01-29 10:28:51.239: WARN/System.err(520): at org.simpleframework.xml.core.Persister.read(Persister.java:569) 01-29 10:28:51.239: WARN/System.err(520): at org.simpleframework.xml.core.Persister.read(Persister.java:506) 01-29 10:28:51.249: WARN/System.err(520): at org.simpleframework.xml.core.Persister.read(Persister.java:415) 01-29 10:28:51.249: WARN/System.err(520): at com.optumizeme.vminterface.UserProvider.onResponseReceived(UserProvider.java: 788) 01-29 10:28:51.249: WARN/System.err(520): at com.optumizeme.network.CallbackWrapper.run(CallbackWrapper.java:15) 01-29 10:28:51.249: WARN/System.err(520): at android.os.Handler.handleCallback(Handler.java:587) 01-29 10:28:51.249: WARN/System.err(520): at android.os.Handler.dispatchMessage(Handler.java:92) 01-29 10:28:51.249: WARN/System.err(520): at android.os.Looper.loop(Looper.java:123) 01-29 10:28:51.249: WARN/System.err(520): at android.app.ActivityThread.main(ActivityThread.java:4363) 01-29 10:28:51.249: WARN/System.err(520): at java.lang.reflect.Method.invokeNative(Native Method) 01-29 10:28:51.259: WARN/System.err(520): at java.lang.reflect.Method.invoke(Method.java:521) 01-29 10:28:51.259: WARN/System.err(520): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) 01-29 10:28:51.259: WARN/System.err(520): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 01-29 10:28:51.259: WARN/System.err(520): at dalvik.system.NativeStart.main(Native Method) -- 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] SQL query
This is doing my head in. I have a database where there is currently one entry. What I want to do is to check if this entry exists. If it does I want to update it, if not create a new one. recentC = db.fetchExisting(file); if (recentC != null){ long rwId = recentC.getLong(recentC.getColumnIndexOrThrow(SilverDbManager.RECENT_ROWID)); db.updateRecent(rwId, name, file, time); } else { db.createRecent(name, file, time); } public Cursor fetchExisting(String file) throws SQLException { Cursor mCursor = null; mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); return mCursor; } I know that recentC != null is probably wrong but I dont know what to change it to. And its some problem with the query because it can't find the entry I already have there when I search for it. Any suggestions? //André -- 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: SQL query
if ( ! recentC.getCount() == 0) { On Jan 29, 8:41 am, André pha...@hotmail.com wrote: This is doing my head in. I have a database where there is currently one entry. What I want to do is to check if this entry exists. If it does I want to update it, if not create a new one. recentC = db.fetchExisting(file); if (recentC != null){ long rwId = recentC.getLong(recentC.getColumnIndexOrThrow(SilverDbManager.RECENT_ROWID)); db.updateRecent(rwId, name, file, time);} else { db.createRecent(name, file, time); } public Cursor fetchExisting(String file) throws SQLException { Cursor mCursor = null; mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); return mCursor; } I know that recentC != null is probably wrong but I dont know what to change it to. And its some problem with the query because it can't find the entry I already have there when I search for it. Any suggestions? //André -- 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] Detect Android version
Hi, I thought that I can use Build.VERSION.SDK_INT for detect android version. But I got errors from my users because they has Froyo, Build.VERSION.RELEASE returns 2.2 (I can see it in error mails), and Build.VERSION.SDK_INT has value 9. It says that it is gingerbread and my app tries to use gingerbread features. It is a Samsung device. I'm very sad about it :( T. -- 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
Re: [android-developers] SQL query
Andre, Yes, recentC != null is wrong, because a cursor is returned if the query itself succeeds, even if there is no data (for various reasons: the cursor returns the schema of your query, also you can requery the cursor later, and get new data if any is added). Two ways to check existence are: - Try to call moveNext() and check if it returns true; - Call getCount() and check if it's greater than 0. ( and a third one is to execute SELECT COUNT(*) FROM WHERE ... ) -- Kostya 29.01.2011 17:41, André пишет: This is doing my head in. I have a database where there is currently one entry. What I want to do is to check if this entry exists. If it does I want to update it, if not create a new one. recentC = db.fetchExisting(file); if (recentC != null){ long rwId = recentC.getLong(recentC.getColumnIndexOrThrow(SilverDbManager.RECENT_ROWID)); db.updateRecent(rwId, name, file, time); } else { db.createRecent(name, file, time); } public Cursor fetchExisting(String file) throws SQLException { Cursor mCursor = null; mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); return mCursor; } I know that recentC != null is probably wrong but I dont know what to change it to. And its some problem with the query because it can't find the entry I already have there when I search for it. Any suggestions? //André -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: SQL query
I just went through this myself, but my logic is inverted to yours, so ignore my previous probably better to use if (recentC.getCount() != 0) { On Jan 29, 8:41 am, André pha...@hotmail.com wrote: This is doing my head in. I have a database where there is currently one entry. What I want to do is to check if this entry exists. If it does I want to update it, if not create a new one. recentC = db.fetchExisting(file); if (recentC != null){ long rwId = recentC.getLong(recentC.getColumnIndexOrThrow(SilverDbManager.RECENT_ROWID)); db.updateRecent(rwId, name, file, time);} else { db.createRecent(name, file, time); } public Cursor fetchExisting(String file) throws SQLException { Cursor mCursor = null; mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); return mCursor; } I know that recentC != null is probably wrong but I dont know what to change it to. And its some problem with the query because it can't find the entry I already have there when I search for it. Any suggestions? //André -- 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: SQL query
Thanks for quick answers guys! It works very well with getCount(). Do you have any suggestions about the query thou? Because it still returns 0 on get count when I try to look for the already existing entry. mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); Any suggestions there? On Jan 29, 3:50 pm, kernelpanic j.m.roya...@gmail.com wrote: I just went through this myself, but my logic is inverted to yours, so ignore my previous probably better to use if (recentC.getCount() != 0) { On Jan 29, 8:41 am, André pha...@hotmail.com wrote: This is doing my head in. I have a database where there is currently one entry. What I want to do is to check if this entry exists. If it does I want to update it, if not create a new one. recentC = db.fetchExisting(file); if (recentC != null){ long rwId = recentC.getLong(recentC.getColumnIndexOrThrow(SilverDbManager.RECENT_ROWID) ); db.updateRecent(rwId, name, file, time);} else { db.createRecent(name, file, time); } public Cursor fetchExisting(String file) throws SQLException { Cursor mCursor = null; mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); return mCursor; } I know that recentC != null is probably wrong but I dont know what to change it to. And its some problem with the query because it can't find the entry I already have there when I search for it. Any suggestions? //André -- 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] android.webkit.cts.WebViewTest#testFindNext
Hi all, there is a cts case which I can not ran success,and I can not find the root cause, Anybody came across the same question? Offer me some clues,Many thanks!!! / cts_host start --plan CTS -t android.webkit.cts.WebViewTest#testFindNext cts_host start test android.webkit.cts.WebViewTest#testFindNext == Test package: android.webkit android.webkit.cts.WebViewTest#testFindNext..(fail) junit.framework.AssertionFailedError at android.webkit.cts.WebViewTest.testFindNext(WebViewTest.java:948) at android.webkit.cts.WebViewTest.testFindNext(WebViewTest.java:948) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:236) at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:226) at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:206) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:200) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:185) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:461) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1488) at android.webkit.cts.WebViewTest.testFindNext(WebViewTest.java:948) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:236) at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:226) at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:206) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:200) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:185) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:461) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1488) == Time: 1502708.541s BR Hongyue Xu -- 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
Re: [android-developers] Re: SQL query
Your query looks ok to me. Check how you insert data, and make sure that the value that's stored in the database is what you expect. Oh, and before you call recentC.getLong(recentC.getColumnIndexOrThrow, make sure you've moved the cursor to the first row. -- Kostya 29.01.2011 18:02, André пишет: Thanks for quick answers guys! It works very well with getCount(). Do you have any suggestions about the query thou? Because it still returns 0 on get count when I try to look for the already existing entry. mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); Any suggestions there? On Jan 29, 3:50 pm, kernelpanicj.m.roya...@gmail.com wrote: I just went through this myself, but my logic is inverted to yours, so ignore my previous probably better to use if (recentC.getCount() != 0) { On Jan 29, 8:41 am, Andrépha...@hotmail.com wrote: This is doing my head in. I have a database where there is currently one entry. What I want to do is to check if this entry exists. If it does I want to update it, if not create a new one. recentC = db.fetchExisting(file); if (recentC != null){ long rwId = recentC.getLong(recentC.getColumnIndexOrThrow(SilverDbManager.RECENT_ROWID) ); db.updateRecent(rwId, name, file, time);} else { db.createRecent(name, file, time); } public Cursor fetchExisting(String file) throws SQLException { Cursor mCursor = null; mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); return mCursor; } I know that recentC != null is probably wrong but I dont know what to change it to. And its some problem with the query because it can't find the entry I already have there when I search for it. Any suggestions? //André -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: android.webkit.cts.WebViewTest#testFindNext
And I also find that the Find all instances of a word on the page and highlight them appears in the top and bottom of the screen at the same time,But the normal just appear one in the screen and the other one will appear when excute the scrol func. Why? 2011/1/29 xhy xhyg...@gmail.com Hi all, there is a cts case which I can not ran success,and I can not find the root cause, Anybody came across the same question? Offer me some clues,Many thanks!!! / cts_host start --plan CTS -t android.webkit.cts.WebViewTest#testFindNext cts_host start test android.webkit.cts.WebViewTest#testFindNext == Test package: android.webkit android.webkit.cts.WebViewTest#testFindNext..(fail) junit.framework.AssertionFailedError at android.webkit.cts.WebViewTest.testFindNext(WebViewTest.java:948) at android.webkit.cts.WebViewTest.testFindNext(WebViewTest.java:948) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:236) at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:226) at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:206) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:200) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:185) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:461) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1488) at android.webkit.cts.WebViewTest.testFindNext(WebViewTest.java:948) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:236) at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:226) at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:206) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:200) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:185) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:461) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1488) == Time: 1502708.541s BR Hongyue Xu -- Hongyue Xu -- 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: Detect Android version
There is an other problem in an other device. It says that SDK_INT=9, VERSION.RELEASE=2.3, but I throws java.lang.NoClassDefFoundError: android.view.InputDevice I can't understan these bugs -- 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
Re: [android-developers] Re: Detect Android version
Sounds like somebody installed a bad alternative ROM. On Sat, Jan 29, 2011 at 10:19 AM, b_t bartata...@gmail.com wrote: There is an other problem in an other device. It says that SDK_INT=9, VERSION.RELEASE=2.3, but I throws java.lang.NoClassDefFoundError: android.view.InputDevice I can't understan these bugs -- 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- 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: Enterprise Virtual App Container (EVC)
Any feedback on Bitzer's approach ? Amer On Jan 27, 11:22 am, amerhhh amer...@gmail.com wrote: Bitzer is trying to push Android into the Enterprise. Bitzer has created a virtual container available on Android that can seamlessly connect to enterprise applications via a mobile virtualization layer (MVL). Please contact us if you want to help us push Android into the Enterprise. We are looking for MVL developers who can add more apps into the enterprise virtual app container (EVC) on Android. Download the EVC from Android market by searching for Bitzer Mobile App About Bitzer Mobile (http://www.bitzermobile.com) Bitzer Mobile Inc. provides virtualization software for application infrastructure and mobile devices that simplifies enterprise application access on mobile devices. CIOs and IT managers use Bitzer’s solution to securely extend enterprise application access on mobile devices owned by employers and employees. Reviews about Bitzer's mobile enterprise solution. - unique... compelling... Kevin Fitchard, Connected planet - mobile remote access…unlike any that I have seen. Bill French, iPadCTO.com - has an answer that may make everyone happy. Louis E. Frenzel, Mobile Dev - the best of the thin client, virtualized client Dana Gardner, Analyst - offers a quick way…without the need to recode the business logic. Alex Handy, SDTimes - It’s a very neat idea, and it holds a lot of promise. Justin James, TechRepublic - I can suggest…Bitzer Mobile’s approach be evaluated. Daniel Kusnetzky, Analyst -- 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: TextView with a top margin that is proportional to the height of the parent view
That works great. Thanks! On Jan 29, 12:46 am, Kostya Vasilyev kmans...@gmail.com wrote: John, You can do this with LinearLayout and layout_weight attribute that it supports: LinearLayout layout_height=fill_parent orientation=vertical View layout_height=0dp layout_weight=20/ TextView layout_height=0dp layout_weight=80/ /LinearLayout The top view acts as a spacer, taking up 20% of the screen height, and the TextView starts below that. -- Kostya 29.01.2011 10:59, Jonathan Foley пишет: Yes, but you'll have to do it at runtime as there is not a way to do proportional layout as you describe in xml. To prevent a visible transition from the xml size to the correct size, you'll probably want to extend LinearLayout and override its onLayout(). You'll want to layout your child textview within that and you'll want to use getHeight() to get the height of the LinearLayout at runtime. I'd suggest looking through the code of ListView or RelativeLayout to see how children are measured and layout. The other option would be to do this after everything is inflated. You can override onFinishInflate of the LinearLayout and then adjust the height of the TextView from there. You'll need to invalidate the TextView after adjusting it's height. Jonathan On Jan 28, 9:48 pm, John Gabyjg...@gabysoft.com wrote: Is there a way to position text within a linear layout such that the position of the text is proportional to the height, rather than a fixed distance. For example, I would like the text to be displayed down from the top a distance equal to 20% of the height of the view. Thanks. -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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: Honeycomb emulator on Linux
On Sat, Jan 29, 2011 at 10:24 PM, Nikolay Elenkov nikolay.elen...@gmail.com wrote: Hi, Anyone managed to get the emulator to run on Linux? For me it gets stuck on '/dev/dsp no such device' or '/dev/dsp: Device or resource busy' if I install OSS emulation. The '-noaudo' and '-audo none' options seem to be ignored, and '-audio alsa' doesn't make a difference either. I'm using Fedora 14 x86_64. Killing pulseaudio makes it go further -- the emulator loads, but Android never boots. Seems to be a problem with the SDK 9, not specific to HC. Will rollback to SDK 8 for now, but I'd really like to know the cause of this. -- 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: Did the Honeycomb platform package go away?
On 29 Jan, 02:54, davemac davemac...@gmail.com wrote: I'm trying to download Honeycomb preview but I get this from sdk_manager: Downloading SDK Platform Android Honeycomb Preview, revision 1 File not found:http://dl-ssl.google.com/android/repository/android-3.0_pre_r01-linux... I've tried with https also with the same result. Where is it now please? I've got the same problem. android-3.0_pre_r01-linux.zip is nowhere to be found... H -- 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: Did the Honeycomb platform package go away?
Same for me -- 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
Re: [android-developers] Re: Honeycomb emulator on Linux
FWIW, I have no problem launching existing AVDs in Ubuntu 10.10 with SDK Tools 9. On Sat, Jan 29, 2011 at 10:46 AM, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Sat, Jan 29, 2011 at 10:24 PM, Nikolay Elenkov nikolay.elen...@gmail.com wrote: Hi, Anyone managed to get the emulator to run on Linux? For me it gets stuck on '/dev/dsp no such device' or '/dev/dsp: Device or resource busy' if I install OSS emulation. The '-noaudo' and '-audo none' options seem to be ignored, and '-audio alsa' doesn't make a difference either. I'm using Fedora 14 x86_64. Killing pulseaudio makes it go further -- the emulator loads, but Android never boots. Seems to be a problem with the SDK 9, not specific to HC. Will rollback to SDK 8 for now, but I'd really like to know the cause of this. -- 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- 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: Honeycomb emulator on Linux
Ubuntu 64bit 10.10, no OSS. No issues with running emulator(except that it's slow). On 29 янв, 17:46, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Sat, Jan 29, 2011 at 10:24 PM, Nikolay Elenkov nikolay.elen...@gmail.com wrote: Hi, Anyone managed to get the emulator to run on Linux? For me it gets stuck on '/dev/dsp no such device' or '/dev/dsp: Device or resource busy' if I install OSS emulation. The '-noaudo' and '-audo none' options seem to be ignored, and '-audio alsa' doesn't make a difference either. I'm using Fedora 14 x86_64. Killing pulseaudio makes it go further -- the emulator loads, but Android never boots. Seems to be a problem with the SDK 9, not specific to HC. Will rollback to SDK 8 for now, but I'd really like to know the cause of this. -- 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: Honeycomb emulator on Linux
Which exact version of the JDK are you all running your emulator on? And are you using Sun's or the OpenJDK? - dave On Jan 29, 11:36 am, Mark Murphy mmur...@commonsware.com wrote: FWIW, I have no problem launching existing AVDs in Ubuntu 10.10 with SDK Tools 9. On Sat, Jan 29, 2011 at 10:46 AM, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Sat, Jan 29, 2011 at 10:24 PM, Nikolay Elenkov nikolay.elen...@gmail.com wrote: Hi, Anyone managed to get the emulator to run on Linux? For me it gets stuck on '/dev/dsp no such device' or '/dev/dsp: Device or resource busy' if I install OSS emulation. The '-noaudo' and '-audo none' options seem to be ignored, and '-audio alsa' doesn't make a difference either. I'm using Fedora 14 x86_64. Killing pulseaudio makes it go further -- the emulator loads, but Android never boots. Seems to be a problem with the SDK 9, not specific to HC. Will rollback to SDK 8 for now, but I'd really like to know the cause of this. -- 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2 -- 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] SimlpleCursorAdapter and ListView with custom row and a checkbox
Hi! I have ONE annoying problem with SimpleCursorAdapter. My programm has list view and ListActivity. Each row has it's own layout: TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_height=wrap_content android:layout_width=fill_parent android:orientation=horizontal android:weightSum=1.0 TableRow TextView android:id=@+id/task_time android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=24sp android:text=Time /TextView LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=fill_parent TextView android:id=@+id/task_name android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=20sp android:text=Name /TextView TextView android:id=@+id/task_categoty android:layout_width=wrap_content android:layout_height=wrap_content android:text=Category android:textSize=12sp /TextView /LinearLayout TextView android:id=@+id/task_state android:layout_width=wrap_content android:layout_height=wrap_content android:text=State android:textSize=12sp /TextView CheckBox android:id=@+id/task_enabled android:layout_width=wrap_content android:layout_height=wrap_content android:focusable=false /CheckBox /TableRow Tasks are stored in SQLite database. I have DAO object (singleton) to access the database. TaskDao: public void updateEnabled(int id, boolean enabled){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(ENABLED_COLUMN, enabled==true?1:0); Log.i(TAG, update to + cv.get(ENABLED_COLUMN) ); try{ db.beginTransaction(); db.update(TASK_TABLE, cv, ID_COLUMN+=?, new String[]{id +}); db.setTransactionSuccessful(); } catch (SQLException e) { Log.i(TAG, edit task failed!); } finally { db.endTransaction(); if (db != null) db.close(); } } and the Cursor method for ListActivity: public Cursor getTasks(){ SQLiteDatabase db = dbHelper.getReadableDatabase(); return db.query(TASK_TABLE, COLUMNS, null, null, null, null, NAME_COLUMN); } I extended SimpleCursorAdapter (TaskDbAdapter) like this: @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null){ convertView = inflater.inflate(R.layout.task_list_row, null); } Cursor c = getCursor(); c.moveToPosition(position); Log.i(TAG, getView + position + = + c.getInt(enabledIdx)); enabled.setTag(c.getInt(c.getColumnIndex(BaseColumns._ID))); enabled.setChecked(c.getInt(enabledIdx)0?true:false); enabled.setOnClickListener(this); return convertView; } @Override public void onClick(View v) { CheckBox box = (CheckBox) v; Integer id = (Integer)box.getTag(); TaskDao.getInstance(context).updateEnabled(id.intValue(), box.isChecked()); } And at last I use all the above stuff in my main ListActivity private void refreshList(){ c = TaskDao.getInstance(this).getTasks(); startManagingCursor(c); adapter = new TaskDbAdapter(this, R.layout.task_list_row, c, new String[]{TaskDao.ENABLED_COLUMN}, new int[]{R.id.task_enabled}); setListAdapter(adapter); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.task); getListView().setItemsCanFocus(false); getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); getListView().setVerticalScrollBarEnabled(true); registerForContextMenu(getListView()); getListView().setOnCreateContextMenuListener(this); refreshList(); } @Override protected void onResume() { super.onResume(); refreshList(); } @Override protected void onPause() { super.onPause(); } Everything works fine. But CheckBoxes loose their states. For instance I check my first column and scroll the list down. In my trace before press I have: getView 0 = 0 getView 2 = 0 getView 3 = 0 then uptate to 1 and then (when I scroll up to the first element) getView 0 = 0 getView 2 = 0 getView 3 = 0 I tried to make getCursor().requery(); in my TaskDbAdapter onClick method. But then I saw no items in the list! And exception because of cursor management(connection was closed by android). When I write startManagingCursor(c); in refreshList() method then check and uncheck methods don't work. Please, Help! -- 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
Re: [android-developers] SimlpleCursorAdapter and ListView with custom row and a checkbox
Its better to use ArrayAdapterString adapter=new ArrayAdapterString(playlist_new.this,android.R.layout.simple_list_item_multiple_choice,song_name); lv.setAdapter(adapter); lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); On Sat, Jan 29, 2011 at 10:51 PM, Nick ympe...@gmail.com wrote: Hi! I have ONE annoying problem with SimpleCursorAdapter. My programm has list view and ListActivity. Each row has it's own layout: TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_height=wrap_content android:layout_width=fill_parent android:orientation=horizontal android:weightSum=1.0 TableRow TextView android:id=@+id/task_time android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=24sp android:text=Time /TextView LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=fill_parent TextView android:id=@+id/task_name android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=20sp android:text=Name /TextView TextView android:id=@+id/task_categoty android:layout_width=wrap_content android:layout_height=wrap_content android:text=Category android:textSize=12sp /TextView /LinearLayout TextView android:id=@+id/task_state android:layout_width=wrap_content android:layout_height=wrap_content android:text=State android:textSize=12sp /TextView CheckBox android:id=@+id/task_enabled android:layout_width=wrap_content android:layout_height=wrap_content android:focusable=false /CheckBox /TableRow Tasks are stored in SQLite database. I have DAO object (singleton) to access the database. TaskDao: public void updateEnabled(int id, boolean enabled){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(ENABLED_COLUMN, enabled==true?1:0); Log.i(TAG, update to + cv.get(ENABLED_COLUMN) ); try{ db.beginTransaction(); db.update(TASK_TABLE, cv, ID_COLUMN+=?, new String[]{id +}); db.setTransactionSuccessful(); } catch (SQLException e) { Log.i(TAG, edit task failed!); } finally { db.endTransaction(); if (db != null) db.close(); } } and the Cursor method for ListActivity: public Cursor getTasks(){ SQLiteDatabase db = dbHelper.getReadableDatabase(); return db.query(TASK_TABLE, COLUMNS, null, null, null, null, NAME_COLUMN); } I extended SimpleCursorAdapter (TaskDbAdapter) like this: @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null){ convertView = inflater.inflate(R.layout.task_list_row, null); } Cursor c = getCursor(); c.moveToPosition(position); Log.i(TAG, getView + position + = + c.getInt(enabledIdx)); enabled.setTag(c.getInt(c.getColumnIndex(BaseColumns._ID))); enabled.setChecked(c.getInt(enabledIdx)0?true:false); enabled.setOnClickListener(this); return convertView; } @Override public void onClick(View v) { CheckBox box = (CheckBox) v; Integer id = (Integer)box.getTag(); TaskDao.getInstance(context).updateEnabled(id.intValue(), box.isChecked()); } And at last I use all the above stuff in my main ListActivity private void refreshList(){ c = TaskDao.getInstance(this).getTasks(); startManagingCursor(c); adapter = new TaskDbAdapter(this, R.layout.task_list_row, c, new String[]{TaskDao.ENABLED_COLUMN}, new int[]{R.id.task_enabled}); setListAdapter(adapter); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.task); getListView().setItemsCanFocus(false); getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); getListView().setVerticalScrollBarEnabled(true); registerForContextMenu(getListView()); getListView().setOnCreateContextMenuListener(this); refreshList(); } @Override protected void onResume() { super.onResume(); refreshList(); } @Override protected void onPause() { super.onPause(); } Everything works fine. But CheckBoxes loose their states. For instance I check my first column and scroll the list down. In my trace before press I have: getView 0 = 0 getView 2 = 0 getView 3 = 0 then uptate to 1 and then (when I scroll up to the first element) getView 0 = 0 getView 2 = 0 getView 3 = 0 I tried to make getCursor().requery(); in my TaskDbAdapter onClick method. But then I saw no items in the list! And exception because of cursor management(connection was closed by android). When I write startManagingCursor(c); in refreshList() method then check and uncheck methods don't work. Please, Help! -- You received this message because you are subscribed to the Google
Re: [android-developers] Re: Android SDK is so slow that is ridiculous.
On Sat, Jan 29, 2011 at 1:26 AM, Miguel Morales therevolti...@gmail.comwrote: Not to mention that testing OpenGL games is impossible. The only way to test on devices is users, otherwise it's just a guessing and hoping for the best. In any case, I don't care WHY the emulator is so slow. Hopefully they'll make it fast in the near future, the iPhone emulator is much better. At the end of the day, you absolutely need to test and run on a device, especially for doing things like OpenGL games. An emulator or simulator on desktop hardware is never going to give you a good idea of how your app performs on real hardware. This isn't an excuse for the emulator being slow (we really would like to improve it, this is just a fairly challenging problem), but no matter what is done it can never be a replacement for running on a real device. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] i have htc legend The problem with is that whenevr i connect it witd my computer it says USB DEVICE NOT RECOGNISED error
Da device searches for htc sync on pc bt iz unale to find it I have installed the latest htc sync It does not even pick it as usb drive Its jst that whenever i connect it says USB DEVICE NOT RECOGNISED and nothing then Though it charges the phone I have even factory resetted it On 29 Jan 2011 00:18, Kumar Bibek coomar@gmail.com wrote: Does your emulator show any devices? I suspect that you have the proper drivers. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Sat, Jan 29, 2011 at 12:15 AM, Muhammad Jawad phoenixja...@gmail.com wrote: i have htc legend The problem with is that whenever i connect it with my computer it says USB DEVICE NOT RECOGNISED error i have windows 7 n XP same error on both i have installed htc sync latest version and my htc legend is updated to 2.2 OS i need a solution as soon as possible please -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: my Eclipse stuck while running emulator
means: hangs..Not doing any thingjust running and running and running On Jan 26, 9:55 pm, TreKing treking...@gmail.com wrote: On Wed, Jan 26, 2011 at 6:12 AM, Atif Musaddaq atif.musad...@gmail.comwrote: my Eclipse stuck while running the emulator or connected it with the Mobile device. What does stuck mean? --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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
Re: [android-developers] Re: Android SDK is so slow that is ridiculous.
It's easy to say that until you have actually written an OpenGL game for Android. Running at seconds per frame instead of frames per second means you can ONLY test on real hardware. On real hardware my game (Tank Recon 3D) takes over 5 minutes to load in the debugger (30 seconds on BlackBerry). Even working with these limitations you also have to develop for the different OS versions and screen sizes. Now I understand what you're saying with the emulation but this blanket answer is getting kind of old. Stop giving the 'You can't get there from here' answer and try and figure something out. The BlackBerry emulators route the OpenGL calls to the desktop PC and allow you to choose the level of acceleration. Maybe this is something that can be looked into. Sure I know you're not getting a 1:1 mapping but it does allows you to develop. How about making a new driver backed by the desktop GPU and give some way to select it? On 1/29/2011 12:53 PM, Dianne Hackborn wrote: On Sat, Jan 29, 2011 at 1:26 AM, Miguel Morales therevolti...@gmail.com mailto:therevolti...@gmail.com wrote: Not to mention that testing OpenGL games is impossible. The only way to test on devices is users, otherwise it's just a guessing and hoping for the best. In any case, I don't care WHY the emulator is so slow. Hopefully they'll make it fast in the near future, the iPhone emulator is much better. At the end of the day, you absolutely need to test and run on a device, especially for doing things like OpenGL games. An emulator or simulator on desktop hardware is never going to give you a good idea of how your app performs on real hardware. This isn't an excuse for the emulator being slow (we really would like to improve it, this is just a fairly challenging problem), but no matter what is done it can never be a replacement for running on a real device. -- Dianne Hackborn Android framework engineer hack...@android.com mailto:hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 -- Leigh McRae http://www.lonedwarfgames.com/ -- 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 convert a image into Base64 string?
thanks to all! -- 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: SQL query
Thanks, did as you said and found a mistake I made. It works perfectly now! On Jan 29, 4:14 pm, Kostya Vasilyev kmans...@gmail.com wrote: Your query looks ok to me. Check how you insert data, and make sure that the value that's stored in the database is what you expect. Oh, and before you call recentC.getLong(recentC.getColumnIndexOrThrow, make sure you've moved the cursor to the first row. -- Kostya 29.01.2011 18:02, André пишет: Thanks for quick answers guys! It works very well with getCount(). Do you have any suggestions about the query thou? Because it still returns 0 on get count when I try to look for the already existing entry. mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); Any suggestions there? On Jan 29, 3:50 pm, kernelpanicj.m.roya...@gmail.com wrote: I just went through this myself, but my logic is inverted to yours, so ignore my previous probably better to use if (recentC.getCount() != 0) { On Jan 29, 8:41 am, Andrépha...@hotmail.com wrote: This is doing my head in. I have a database where there is currently one entry. What I want to do is to check if this entry exists. If it does I want to update it, if not create a new one. recentC = db.fetchExisting(file); if (recentC != null){ long rwId = recentC.getLong(recentC.getColumnIndexOrThrow(SilverDbManager.RECENT_ROWID) ); db.updateRecent(rwId, name, file, time);} else { db.createRecent(name, file, time); } public Cursor fetchExisting(String file) throws SQLException { Cursor mCursor = null; mCursor = mDb.query(true, RECENT_TABLE, new String[] {RECENT_ROWID, RECENT_NAME, RECENT_FILE, RECENT_TIME}, RECENT_FILE + = ?, new String[]{file}, null, null, null, null); return mCursor; } I know that recentC != null is probably wrong but I dont know what to change it to. And its some problem with the query because it can't find the entry I already have there when I search for it. Any suggestions? //André -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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 convert a image into Base64 string?
thanks to all! -- 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] database values to string[]
Is there a simple way to get all my values from a column in my database to a String[] without having to use simpleCursorAdapter? When I try: String[] from = new String[]{dbManager.NAME}; I only get the name of the column. I'd appreciate any suggestions! //André -- 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
Re: [android-developers] database values to string[]
On Sat, Jan 29, 2011 at 2:22 PM, André pha...@hotmail.com wrote: Is there a simple way to get all my values from a column in my database to a String[] without having to use simpleCursorAdapter? You would not use a SimpleCursorAdapter for that. SimpleCursorAdapter is for taking a Cursor and putting it into an AdapterView, like a ListView. When I try: String[] from = new String[]{dbManager.NAME}; I only get the name of the column. That is because you have no database. I'd appreciate any suggestions! Use rawQuery() to get a Cursor. Either use the Cursor directly or iterate over it to get all [your] values from a column in [your] database to a String[] -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 -- 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: Did the Honeycomb platform package go away?
same -- 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] 3.0 Preview SDK won't install
When I try to install the Honeycomb preview using the SDK AVD Manager, I get this error: File not found: https://dl-ssl.google.com/android/repository/android-3.0_pre_r01-linux.zip Anyone have a work around? Thanks, -- Darren -- 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
Re: [android-developers] Re: Android SDK is so slow that is ridiculous.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/29/2011 10:55 AM, Leigh McRae wrote: It's easy to say that until you have actually written an OpenGL game for Android. Running at seconds per frame instead of frames per second means you can ONLY test on real hardware. On real hardware my game (Tank Recon 3D) takes over 5 minutes to load in the debugger (30 seconds on BlackBerry). Even working with these limitations you also have to develop for the different OS versions and screen sizes. Now I understand what you're saying with the emulation but this blanket answer is getting kind of old. Stop giving the 'You can't get there from here' answer and try and figure something out. The BlackBerry emulators route the OpenGL calls to the desktop PC and allow you to choose the level of acceleration. Maybe this is something that can be looked into. Sure I know you're not getting a 1:1 mapping but it does allows you to develop. How about making a new driver backed by the desktop GPU and give some way to select it? And what about you write and contribute this driver to the code base? There was something I disliked in the phone emulator, I fixed it for myself, and then submitted it in Gerrit and the patch was accepted, all in less than two months and it is now part of Gingerbread. Complaining about missing features on an open source project is ridiculous. On 1/29/2011 12:53 PM, Dianne Hackborn wrote: On Sat, Jan 29, 2011 at 1:26 AM, Miguel Morales therevolti...@gmail.com mailto:therevolti...@gmail.com wrote: Not to mention that testing OpenGL games is impossible. The only way to test on devices is users, otherwise it's just a guessing and hoping for the best. In any case, I don't care WHY the emulator is so slow. Hopefully they'll make it fast in the near future, the iPhone emulator is much better. At the end of the day, you absolutely need to test and run on a device, especially for doing things like OpenGL games. An emulator or simulator on desktop hardware is never going to give you a good idea of how your app performs on real hardware. This isn't an excuse for the emulator being slow (we really would like to improve it, this is just a fairly challenging problem), but no matter what is done it can never be a replacement for running on a real device. -- Dianne Hackborn Android framework engineer hack...@android.com mailto:hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog: http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk1EcS8ACgkQ9RoMZyVa61es6wCeMZHA1Lu5GrzI4qNBIpW/vMQX 6NIAn3azdKrV6q6BAurX2sDMwJsEkfMp =tUSL -END PGP SIGNATURE- -- 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: SimlpleCursorAdapter and ListView with custom row and a checkbox
I'm using SimpleCursorAdapter just because I store data in the database. And you suggested to use standard layout what isn't suitable for me. On 29 янв, 20:46, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Its better to use ArrayAdapterString adapter=new ArrayAdapterString(playlist_new.this,android.R.layout.simple_list_item_mu ltiple_choice,song_name); lv.setAdapter(adapter); lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); On Sat, Jan 29, 2011 at 10:51 PM, Nick ympe...@gmail.com wrote: Hi! I have ONE annoying problem with SimpleCursorAdapter. My programm has list view and ListActivity. Each row has it's own layout: TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_height=wrap_content android:layout_width=fill_parent android:orientation=horizontal android:weightSum=1.0 TableRow TextView android:id=@+id/task_time android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=24sp android:text=Time /TextView LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=fill_parent TextView android:id=@+id/task_name android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=20sp android:text=Name /TextView TextView android:id=@+id/task_categoty android:layout_width=wrap_content android:layout_height=wrap_content android:text=Category android:textSize=12sp /TextView /LinearLayout TextView android:id=@+id/task_state android:layout_width=wrap_content android:layout_height=wrap_content android:text=State android:textSize=12sp /TextView CheckBox android:id=@+id/task_enabled android:layout_width=wrap_content android:layout_height=wrap_content android:focusable=false /CheckBox /TableRow Tasks are stored in SQLite database. I have DAO object (singleton) to access the database. TaskDao: public void updateEnabled(int id, boolean enabled){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(ENABLED_COLUMN, enabled==true?1:0); Log.i(TAG, update to + cv.get(ENABLED_COLUMN) ); try{ db.beginTransaction(); db.update(TASK_TABLE, cv, ID_COLUMN+=?, new String[]{id +}); db.setTransactionSuccessful(); } catch (SQLException e) { Log.i(TAG, edit task failed!); } finally { db.endTransaction(); if (db != null) db.close(); } } and the Cursor method for ListActivity: public Cursor getTasks(){ SQLiteDatabase db = dbHelper.getReadableDatabase(); return db.query(TASK_TABLE, COLUMNS, null, null, null, null, NAME_COLUMN); } I extended SimpleCursorAdapter (TaskDbAdapter) like this: @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null){ convertView = inflater.inflate(R.layout.task_list_row, null); } Cursor c = getCursor(); c.moveToPosition(position); Log.i(TAG, getView + position + = + c.getInt(enabledIdx)); enabled.setTag(c.getInt(c.getColumnIndex(BaseColumns._ID))); enabled.setChecked(c.getInt(enabledIdx)0?true:false); enabled.setOnClickListener(this); return convertView; } @Override public void onClick(View v) { CheckBox box = (CheckBox) v; Integer id = (Integer)box.getTag(); TaskDao.getInstance(context).updateEnabled(id.intValue(), box.isChecked()); } And at last I use all the above stuff in my main ListActivity private void refreshList(){ c = TaskDao.getInstance(this).getTasks(); startManagingCursor(c); adapter = new TaskDbAdapter(this, R.layout.task_list_row, c, new String[]{TaskDao.ENABLED_COLUMN}, new int[]{R.id.task_enabled}); setListAdapter(adapter); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.task); getListView().setItemsCanFocus(false); getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); getListView().setVerticalScrollBarEnabled(true); registerForContextMenu(getListView()); getListView().setOnCreateContextMenuListener(this); refreshList(); } @Override protected void onResume() { super.onResume(); refreshList(); } @Override protected void onPause() { super.onPause(); } Everything works fine. But CheckBoxes loose their states. For instance I check my first column and scroll the list down. In my trace before press I have: getView 0 = 0 getView 2 = 0 getView 3 = 0 then uptate to 1 and then (when I scroll up to the first element) getView 0 = 0 getView 2 = 0 getView 3 = 0 I tried to make
[android-developers] Re: SimlpleCursorAdapter and ListView with custom row and a checkbox
I'm using SimpleCursorAdapter just because I store data in the database. And you suggested to use standard layout what isn't suitable for me. On 29 янв, 20:46, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Its better to use ArrayAdapterString adapter=new ArrayAdapterString(playlist_new.this,android.R.layout.simple_list_item_mu ltiple_choice,song_name); lv.setAdapter(adapter); lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); On Sat, Jan 29, 2011 at 10:51 PM, Nick ympe...@gmail.com wrote: Hi! I have ONE annoying problem with SimpleCursorAdapter. My programm has list view and ListActivity. Each row has it's own layout: TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_height=wrap_content android:layout_width=fill_parent android:orientation=horizontal android:weightSum=1.0 TableRow TextView android:id=@+id/task_time android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=24sp android:text=Time /TextView LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=fill_parent TextView android:id=@+id/task_name android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=20sp android:text=Name /TextView TextView android:id=@+id/task_categoty android:layout_width=wrap_content android:layout_height=wrap_content android:text=Category android:textSize=12sp /TextView /LinearLayout TextView android:id=@+id/task_state android:layout_width=wrap_content android:layout_height=wrap_content android:text=State android:textSize=12sp /TextView CheckBox android:id=@+id/task_enabled android:layout_width=wrap_content android:layout_height=wrap_content android:focusable=false /CheckBox /TableRow Tasks are stored in SQLite database. I have DAO object (singleton) to access the database. TaskDao: public void updateEnabled(int id, boolean enabled){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(ENABLED_COLUMN, enabled==true?1:0); Log.i(TAG, update to + cv.get(ENABLED_COLUMN) ); try{ db.beginTransaction(); db.update(TASK_TABLE, cv, ID_COLUMN+=?, new String[]{id +}); db.setTransactionSuccessful(); } catch (SQLException e) { Log.i(TAG, edit task failed!); } finally { db.endTransaction(); if (db != null) db.close(); } } and the Cursor method for ListActivity: public Cursor getTasks(){ SQLiteDatabase db = dbHelper.getReadableDatabase(); return db.query(TASK_TABLE, COLUMNS, null, null, null, null, NAME_COLUMN); } I extended SimpleCursorAdapter (TaskDbAdapter) like this: @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null){ convertView = inflater.inflate(R.layout.task_list_row, null); } Cursor c = getCursor(); c.moveToPosition(position); Log.i(TAG, getView + position + = + c.getInt(enabledIdx)); enabled.setTag(c.getInt(c.getColumnIndex(BaseColumns._ID))); enabled.setChecked(c.getInt(enabledIdx)0?true:false); enabled.setOnClickListener(this); return convertView; } @Override public void onClick(View v) { CheckBox box = (CheckBox) v; Integer id = (Integer)box.getTag(); TaskDao.getInstance(context).updateEnabled(id.intValue(), box.isChecked()); } And at last I use all the above stuff in my main ListActivity private void refreshList(){ c = TaskDao.getInstance(this).getTasks(); startManagingCursor(c); adapter = new TaskDbAdapter(this, R.layout.task_list_row, c, new String[]{TaskDao.ENABLED_COLUMN}, new int[]{R.id.task_enabled}); setListAdapter(adapter); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.task); getListView().setItemsCanFocus(false); getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); getListView().setVerticalScrollBarEnabled(true); registerForContextMenu(getListView()); getListView().setOnCreateContextMenuListener(this); refreshList(); } @Override protected void onResume() { super.onResume(); refreshList(); } @Override protected void onPause() { super.onPause(); } Everything works fine. But CheckBoxes loose their states. For instance I check my first column and scroll the list down. In my trace before press I have: getView 0 = 0 getView 2 = 0 getView 3 = 0 then uptate to 1 and then (when I scroll up to the first element) getView 0 = 0 getView 2 = 0 getView 3 = 0 I tried to make
Re: [android-developers] Re: SimlpleCursorAdapter and ListView with custom row and a checkbox
Nick, - Since list item views get recycled, you've got to have something that maintains item state (checked / unchecked) - besides the checkboxes in your list, since those are part of recycled item layouts. - To change data in the database, use the usual database update methods. Other than constantly opening and closing the database, your code looks ok. - To refresh the list, call adapter.notifyDataSetChanged(). This causes the list view to rebuild its item views, calling your getView(), which sets checkbox state according to values in the database. -- Kostya 29.01.2011 23:58, Nick пишет: I'm using SimpleCursorAdapter just because I store data in the database. And you suggested to use standard layout what isn't suitable for me. On 29 янв, 20:46, Robin Talwarr.o.b.i.n.abhis...@gmail.com wrote: Its better to use ArrayAdapterString adapter=new ArrayAdapterString(playlist_new.this,android.R.layout.simple_list_item_mu ltiple_choice,song_name); lv.setAdapter(adapter); lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); On Sat, Jan 29, 2011 at 10:51 PM, Nickympe...@gmail.com wrote: Hi! I have ONE annoying problem with SimpleCursorAdapter. My programm has list view and ListActivity. Each row has it's own layout: TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_height=wrap_content android:layout_width=fill_parent android:orientation=horizontal android:weightSum=1.0 TableRow TextView android:id=@+id/task_time android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=24sp android:text=Time /TextView LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=fill_parent TextView android:id=@+id/task_name android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=20sp android:text=Name /TextView TextView android:id=@+id/task_categoty android:layout_width=wrap_content android:layout_height=wrap_content android:text=Category android:textSize=12sp /TextView /LinearLayout TextView android:id=@+id/task_state android:layout_width=wrap_content android:layout_height=wrap_content android:text=State android:textSize=12sp /TextView CheckBox android:id=@+id/task_enabled android:layout_width=wrap_content android:layout_height=wrap_content android:focusable=false /CheckBox /TableRow Tasks are stored in SQLite database. I have DAO object (singleton) to access the database. TaskDao: public void updateEnabled(int id, boolean enabled){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(ENABLED_COLUMN, enabled==true?1:0); Log.i(TAG, update to + cv.get(ENABLED_COLUMN) ); try{ db.beginTransaction(); db.update(TASK_TABLE, cv, ID_COLUMN+=?, new String[]{id +}); db.setTransactionSuccessful(); } catch (SQLException e) { Log.i(TAG, edit task failed!); } finally { db.endTransaction(); if (db != null) db.close(); } } and the Cursor method for ListActivity: public Cursor getTasks(){ SQLiteDatabase db = dbHelper.getReadableDatabase(); return db.query(TASK_TABLE, COLUMNS, null, null, null, null, NAME_COLUMN); } I extended SimpleCursorAdapter (TaskDbAdapter) like this: @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null){ convertView = inflater.inflate(R.layout.task_list_row, null); } Cursor c = getCursor(); c.moveToPosition(position); Log.i(TAG, getView + position + = + c.getInt(enabledIdx)); enabled.setTag(c.getInt(c.getColumnIndex(BaseColumns._ID))); enabled.setChecked(c.getInt(enabledIdx)0?true:false); enabled.setOnClickListener(this); return convertView; } @Override public void onClick(View v) { CheckBox box = (CheckBox) v; Integer id = (Integer)box.getTag(); TaskDao.getInstance(context).updateEnabled(id.intValue(), box.isChecked()); } And at last I use all the above stuff in my main ListActivity private void refreshList(){ c = TaskDao.getInstance(this).getTasks(); startManagingCursor(c); adapter = new TaskDbAdapter(this, R.layout.task_list_row, c, new String[]{TaskDao.ENABLED_COLUMN}, new int[]{R.id.task_enabled}); setListAdapter(adapter); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.task); getListView().setItemsCanFocus(false); getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); getListView().setVerticalScrollBarEnabled(true); registerForContextMenu(getListView()); getListView().setOnCreateContextMenuListener(this); refreshList(); } @Override protected void onResume() { super.onResume();
Re: [android-developers] Re: Draw bitmaps one after other using canvas
A pause isn't enough. All drawing is double-buffered. You will never see what you have drawn until the entire drawing is complete. If the code is in the view hierarchy, this means nothing is drawn until everything returns from its onDraw() call. To do sequential frames, after the first one you need to call invalidate() to schedule the draw of the next one and then wait for the following onDraw() to call that next frame. Of course, you don't want to just call invalidate() inside of onDraw() or else your app will set there continually drawing as fast it can and draining the battery. This is why you typically use Handler.postDelayed() or sendDelayed() to schedule the invalidate() calls at the rate you want to animate. On Fri, Jan 28, 2011 at 2:44 PM, Kumar Bibek coomar@gmail.com wrote: Run a thread. Put a sleep and then change your Bitmap when the thread wakes up. Loop it 3 times. :) Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Sat, Jan 29, 2011 at 4:13 AM, android777 anilreddy...@gmail.comwrote: Sorry to ask such a silly question, but How can I put pause? Is it in canvas class or a sleep? On Jan 28, 4:36 pm, Tommy droi...@gmail.com wrote: The drawing is probably happening to fast for you to notice. Put a pause in there for like ½ a second (500 ms) From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of Kumar Bibek Sent: Friday, January 28, 2011 5:32 PM To: android-developers@googlegroups.com Subject: Re: [android-developers] Draw bitmaps one after other using canvas What are you trying to achieve? If you want a pause between the switch, you have to set it in your code, else, you wouldn't notice the transition. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Sat, Jan 29, 2011 at 3:55 AM, android777 anilreddy...@gmail.com wrote: How can I draw bitmaps one after other. I was trying to draw three bitmaps as follows. Bitmap flower = BitmapFactory.decodeResource(getResources(),R.drawable.flowers1); canvas.drawColor(Color.BLACK); canvas.drawBitmap(kangoo, 0, 0, null); flower = BitmapFactory.decodeResource(getResources(),R.drawable.flowers2); canvas.drawColor(Color.BLACK); canvas.drawBitmap(kangoo, 0, 0, null); flower = BitmapFactory.decodeResource(getResources(),R.drawable.flowers3); canvas.drawColor(Color.BLACK); canvas.drawBitmap(kangoo, 0, 0, null); But it draws only the last image. What is the problem? How can I solve 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 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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] Re: SimlpleCursorAdapter and ListView with custom row and a checkbox
Thanks fro advice. I tried but had no luck. By the way, my getViw method was called even without notifyDatasetChanged(). It was while scrolling. Now it's called after click. But still have this in trace log: uptate to 1 getView 0 = 0 (here must be 1) getView 2 = 0 getView 3 = 0 And... is it bad to reopen cursor? As I see itdatabase is a store for checked values. Like boolean array for ArrayAdapter. On 30 янв, 00:13, Kostya Vasilyev kmans...@gmail.com wrote: Nick, - Since list item views get recycled, you've got to have something that maintains item state (checked / unchecked) - besides the checkboxes in your list, since those are part of recycled item layouts. - To change data in the database, use the usual database update methods. Other than constantly opening and closing the database, your code looks ok. - To refresh the list, call adapter.notifyDataSetChanged(). This causes the list view to rebuild its item views, calling your getView(), which sets checkbox state according to values in the database. -- Kostya 29.01.2011 23:58, Nick пишет: I'm using SimpleCursorAdapter just because I store data in the database. And you suggested to use standard layout what isn't suitable for me. On 29 янв, 20:46, Robin Talwarr.o.b.i.n.abhis...@gmail.com wrote: Its better to use ArrayAdapterString adapter=new ArrayAdapterString(playlist_new.this,android.R.layout.simple_list_item_mu ltiple_choice,song_name); lv.setAdapter(adapter); lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); On Sat, Jan 29, 2011 at 10:51 PM, Nickympe...@gmail.com wrote: Hi! I have ONE annoying problem with SimpleCursorAdapter. My programm has list view and ListActivity. Each row has it's own layout: TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_height=wrap_content android:layout_width=fill_parent android:orientation=horizontal android:weightSum=1.0 TableRow TextView android:id=@+id/task_time android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=24sp android:text=Time /TextView LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=fill_parent TextView android:id=@+id/task_name android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=20sp android:text=Name /TextView TextView android:id=@+id/task_categoty android:layout_width=wrap_content android:layout_height=wrap_content android:text=Category android:textSize=12sp /TextView /LinearLayout TextView android:id=@+id/task_state android:layout_width=wrap_content android:layout_height=wrap_content android:text=State android:textSize=12sp /TextView CheckBox android:id=@+id/task_enabled android:layout_width=wrap_content android:layout_height=wrap_content android:focusable=false /CheckBox /TableRow Tasks are stored in SQLite database. I have DAO object (singleton) to access the database. TaskDao: public void updateEnabled(int id, boolean enabled){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(ENABLED_COLUMN, enabled==true?1:0); Log.i(TAG, update to + cv.get(ENABLED_COLUMN) ); try{ db.beginTransaction(); db.update(TASK_TABLE, cv, ID_COLUMN+=?, new String[]{id +}); db.setTransactionSuccessful(); } catch (SQLException e) { Log.i(TAG, edit task failed!); } finally { db.endTransaction(); if (db != null) db.close(); } } and the Cursor method for ListActivity: public Cursor getTasks(){ SQLiteDatabase db = dbHelper.getReadableDatabase(); return db.query(TASK_TABLE, COLUMNS, null, null, null, null, NAME_COLUMN); } I extended SimpleCursorAdapter (TaskDbAdapter) like this: @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null){ convertView = inflater.inflate(R.layout.task_list_row, null); } Cursor c = getCursor(); c.moveToPosition(position); Log.i(TAG, getView + position + = + c.getInt(enabledIdx)); enabled.setTag(c.getInt(c.getColumnIndex(BaseColumns._ID))); enabled.setChecked(c.getInt(enabledIdx)0?true:false); enabled.setOnClickListener(this); return convertView; } @Override public void onClick(View v) { CheckBox box = (CheckBox) v; Integer id = (Integer)box.getTag(); TaskDao.getInstance(context).updateEnabled(id.intValue(), box.isChecked()); } And at last I use all the above stuff in my main ListActivity private void refreshList(){ c = TaskDao.getInstance(this).getTasks();
[android-developers] Re: 3.0 Preview SDK won't install
Hi Darren, I had the same issue when I tried to download it with SDK/AVD Manager. Did you solve it ? dave On Jan 29, 2:54 pm, Darren Hinderer hindenb...@gmail.com wrote: When I try to install the Honeycomb preview using the SDK AVD Manager, I get this error: File not found:https://dl-ssl.google.com/android/repository/android-3.0_pre_r01-linu... Anyone have a work around? Thanks, -- Darren -- 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] android plugin for eclipse slow performance
Hello, I was wondering if anyone is noticing pauses lasting about 5+ seconds on content assist with android development plugin. I'm developing on Fedora 12, once every now and then I get this slow down, I see the eclipse process at 50% (I have a dual core machine). Can't find anything specific by browsing the gnome system monitor. I've increased minimum heap for eclipse, and it behaves better but not fast enough but I still notice the lag. Any ideas? -- 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
Re: [android-developers] Re: SimlpleCursorAdapter and ListView with custom row and a checkbox
If the cursor still pulls out old values after the update, try adding a call to requery(). -- Kostya Vasilyev -- http://kmansoft.wordpress.com 30.01.2011 1:17 пользователь Nick ympe...@gmail.com написал: Thanks fro advice. I tried but had no luck. By the way, my getViw method was called even without notifyDatasetChanged(). It was while scrolling. Now it's called after click. But still have this in trace log: uptate to 1 getView 0 = 0 (here must be 1) getView 2 = 0 getView 3 = 0 And... is it bad to reopen cursor? As I see itdatabase is a store for checked values. Like boolean array for ArrayAdapter. On 30 янв, 00:13, Kostya Vasilyev kmans...@gmail.com wrote: Nick, - Since list item views get recycled, you've got to have something that maintains item state (checked / unchecked) - besides the checkboxes in your list, since those are part of recycled item layouts. - To change data in the database, use the usual database update methods. Other than constantly opening and closing the database, your code looks ok. - To refresh the list, call adapter.notifyDataSetChanged(). This causes the list view to rebuild its item views, calling your getView(), which sets checkbox state according to values in the database. -- Kostya 29.01.2011 23:58, Nick пишет: I'm using SimpleCursorAdapter just because I store data in the database. And you suggested to use standard layout what isn't suitable for me. On 29 янв, 20:46, Robin Talwarr.o.b.i.n.abhis...@gmail.com wrote: Its better to use ArrayAdapterString adapter=new ArrayAdapterString(playlist_new.this,android.R.layout.simple_list_item_mu ltiple_choice,song_name); lv.setAdapter(adapter); lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); On Sat, Jan 29, 2011 at 10:51 PM, Nickympe...@gmail.com wrote: Hi! I have ONE annoying problem with SimpleCursorAdapter. My programm has list view and ListActivity. Each row has it's own layout: TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_height=wrap_content android:layout_width=fill_parent android:orientation=horizontal android:weightSum=1.0 TableRow TextView android:id=@+id/task_time android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=24sp android:text=Time /TextView LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=fill_parent TextView android:id=@+id/task_name android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=20sp android:text=Name /TextView TextView android:id=@+id/task_categoty android:layout_width=wrap_content android:layout_height=wrap_content android:text=Category android:textSize=12sp /TextView /LinearLayout TextView android:id=@+id/task_state android:layout_width=wrap_content android:layout_height=wrap_content android:text=State android:textSize=12sp /TextView CheckBox android:id=@+id/task_enabled android:layout_width=wrap_content android:layout_height=wrap_content android:focusable=false /CheckBox /TableRow Tasks are stored in SQLite database. I have DAO object (singleton) to access the database. TaskDao: public void updateEnabled(int id, boolean enabled){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(ENABLED_COLUMN, enabled==true?1:0); Log.i(TAG, update to + cv.get(ENABLED_COLUMN) ); try{ db.beginTransaction(); db.update(TASK_TABLE, cv, ID_COLUMN+=?, new String[]{id +}); db.setTransactionSuccessful(); } catch (SQLException e) { Log.i(TAG, edit task failed!); } finally { db.endTransaction(); if (db != null) db.close(); } } and the Cursor method for ListActivity: public Cursor getTasks(){ SQLiteDatabase db = dbHelper.getReadableDatabase(); return db.query(TASK_TABLE, COLUMNS, null, null, null, null, NAME_COLUMN); } I extended SimpleCursorAdapter (TaskDbAdapter) like this: @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null){ convertView = inflater.inflate(R.layout.task_list_row, null); } Cursor c = getCursor(); c.moveToPosition(position); Log.i(TAG, getView + position + = + c.getInt(enabledIdx)); enabled.setTag(c.getInt(c.getColumnIndex(BaseColumns._ID))); enabled.setChecked(c.getInt(enabledIdx)0?true:false); enabled.setOnClickListener(this); return convertView; } @Override public void onClick(View v) { CheckBox box = (CheckBox) v; Integer id = (Integer)box.getTag();
[android-developers] Re: android plugin for eclipse slow performance
Found this post: http://stackoverflow.com/questions/3980022/eclipse-auto-suggest-list-very-slow but no answer. -- 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
Re: [android-developers] android plugin for eclipse slow performance
If you are using Eclipse Helios (3.6), that's a known bug in parsing JavaDoc files for content assist. A fix is scheduled for 3.6sr2 (end of February). -- Kostya Vasilyev -- http://kmansoft.wordpress.com 30.01.2011 1:27 пользователь android_interest kar...@gmail.com написал: Hello, I was wondering if anyone is noticing pauses lasting about 5+ seconds on content assist with android development plugin. I'm developing on Fedora 12, once every now and then I get this slow down, I see the eclipse process at 50% (I have a dual core machine). Can't find anything specific by browsing the gnome system monitor. I've increased minimum heap for eclipse, and it behaves better but not fast enough but I still notice the lag. Any ideas? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: SimlpleCursorAdapter and ListView with custom row and a checkbox
By the way, how many items do you expect to have in these lists? -- Kostya Vasilyev -- http://kmansoft.wordpress.com 30.01.2011 1:27 пользователь Kostya Vasilyev kmans...@gmail.com написал: If the cursor still pulls out old values after the update, try adding a call to requery(). -- Kostya Vasilyev -- http://kmansoft.wordpress.com 30.01.2011 1:17 пользователь Nick ympe...@gmail.com написал: Thanks fro advice. I tried but had no luck. By the way, my getViw method was called even without notifyDatasetChanged(). It was while scrolling. Now it's called after click. But still have this in trace log: uptate to 1 getView 0 = 0 (here must be 1) getView 2 = 0 getView 3 = 0 And... is it bad to reopen cursor? As I see itdatabase is a store for checked values. Like boolean array for ArrayAdapter. On 30 янв, 00:13, Kostya Vasilyev kmans...@gmail.com wrote: Nick, - Since list item views get recycled, you've got to have something that maintains item state (checked / unchecked) - besides the checkboxes in your list, since those are part of recycled item layouts. - To change data in the database, use the usual database update methods. Other than constantly opening and closing the database, your code looks ok. - To refresh the list, call adapter.notifyDataSetChanged(). This causes the list view to rebuild its item views, calling your getView(), which sets checkbox state according to values in the database. -- Kostya 29.01.2011 23:58, Nick пишет: I'm using SimpleCursorAdapter just because I store data in the database. And you suggested to use standard layout what isn't suitable for me. On 29 янв, 20:46, Robin Talwarr.o.b.i.n.abhis...@gmail.com wrote: Its better to use ArrayAdapterString adapter=new ArrayAdapterString(playlist_new.this,android.R.layout.simple_list_item_mu ltiple_choice,song_name); lv.setAdapter(adapter); lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); On Sat, Jan 29, 2011 at 10:51 PM, Nickympe...@gmail.com wrote: Hi! I have ONE annoying problem with SimpleCursorAdapter. My programm has list view and ListActivity. Each row has it's own layout: TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_height=wrap_content android:layout_width=fill_parent android:orientation=horizontal android:weightSum=1.0 TableRow TextView android:id=@+id/task_time android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=24sp android:text=Time /TextView LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=fill_parent TextView android:id=@+id/task_name android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=20sp android:text=Name /TextView TextView android:id=@+id/task_categoty android:layout_width=wrap_content android:layout_height=wrap_content android:text=Category android:textSize=12sp /TextView /LinearLayout TextView android:id=@+id/task_state android:layout_width=wrap_content android:layout_height=wrap_content android:text=State android:textSize=12sp /TextView CheckBox android:id=@+id/task_enabled android:layout_width=wrap_content android:layout_height=wrap_content android:focusable=false /CheckBox /TableRow Tasks are stored in SQLite database. I have DAO object (singleton) to access the database. TaskDao: public void updateEnabled(int id, boolean enabled){ SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(ENABLED_COLUMN, enabled==true?1:0); Log.i(TAG, update to + cv.get(ENABLED_COLUMN) ); try{ db.beginTransaction(); db.update(TASK_TABLE, cv, ID_COLUMN+=?, new String[]{id +}); db.setTransactionSuccessful(); } catch (SQLException e) { Log.i(TAG, edit task failed!); } finally { db.endTransaction(); if (db != null) db.close(); } } and the Cursor method for ListActivity: public Cursor getTasks(){ SQLiteDatabase db = dbHelper.getReadableDatabase(); return db.query(TASK_TABLE, COLUMNS, null, null, null, null, NAME_COLUMN); } I extended SimpleCursorAdapter (TaskDbAdapter) like this: @Override public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null){ convertView = inflater.inflate(R.layout.task_list_row, null); } Cursor c = getCursor(); c.moveToPosition(position); Log.i(TAG, getView + position + = + c.getInt(enabledIdx)); enabled.setTag(c.getInt(c.getColumnIndex(BaseColumns._ID))); enabled.setChecked(c.getInt(enabledIdx)0?true:false); enabled.setOnClickListener(this); return convertView; } @Override public void onClick(View v) { CheckBox box = (CheckBox) v; Integer id = (Integer)box.getTag(); TaskDao.getInstance(context).updateEnabled(id.intValue(), box.isChecked()); } And at last I use all the above stuff in my main ListActivity private void refreshList(){ c =
Re: [android-developers] Re: android plugin for eclipse slow performance
BTW, I documented several possible workarounds for Eclipse Helios in my blog, see below. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 30.01.2011 1:35 пользователь android_interest kar...@gmail.com написал: Found this post: http://stackoverflow.com/questions/3980022/eclipse-auto-suggest-list-very-slowbut no answer. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: Did the Honeycomb platform package go away?
Also gone for me somebody removed it by accident? On Jan 29, 9:03 pm, circle kenne...@gmail.com wrote: Same. It seems that Google removed the file. I found some links on the web, but don't feel very comfortable installing from unofficial source... What's up, Google? -- 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: 3.0 Preview SDK won't install
Nope. I haven't tried anything else, I'm hoping it's a just a temporary error. On Jan 29, 2:26 pm, dave dayong...@gmail.com wrote: Hi Darren, I had the same issue when I tried to download it with SDK/AVD Manager. Did you solve it ? dave On Jan 29, 2:54 pm, Darren Hinderer hindenb...@gmail.com wrote: When I try to install the Honeycomb preview using the SDK AVD Manager, I get this error: File not found:https://dl-ssl.google.com/android/repository/android-3.0_pre_r01-linu... Anyone have a work around? Thanks, -- Darren -- 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: Android SDK is so slow that is ridiculous.
iOS simulator is fast because XCode builds an X86 binary and because iPhone and OSX both run basically the same OS, there is no actual emulation happening, mostly just API mapping... It's running as a mostly OS-Native binary. Unless you want to develop your apps in Android itself on your desktop on an ARM CPU, you should understand that there will be a performance penalty for emulating the an ARM CPU on x86. One way to make it faster is to build an Android x86 emulator and stop emulating operations, instead using the CPU natively. It seems as if there is progress in that area, even if it's not all from Google. On Jan 29, 11:57 am, Marc Petit-Huguenin petit...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/29/2011 10:55 AM, Leigh McRae wrote: It's easy to say that until you have actually written an OpenGL game for Android. Running at seconds per frame instead of frames per second means you can ONLY test on real hardware. On real hardware my game (Tank Recon 3D) takes over 5 minutes to load in the debugger (30 seconds on BlackBerry). Even working with these limitations you also have to develop for the different OS versions and screen sizes. Now I understand what you're saying with the emulation but this blanket answer is getting kind of old. Stop giving the 'You can't get there from here' answer and try and figure something out. The BlackBerry emulators route the OpenGL calls to the desktop PC and allow you to choose the level of acceleration. Maybe this is something that can be looked into. Sure I know you're not getting a 1:1 mapping but it does allows you to develop. How about making a new driver backed by the desktop GPU and give some way to select it? And what about you write and contribute this driver to the code base? There was something I disliked in the phone emulator, I fixed it for myself, and then submitted it in Gerrit and the patch was accepted, all in less than two months and it is now part of Gingerbread. Complaining about missing features on an open source project is ridiculous. On 1/29/2011 12:53 PM, Dianne Hackborn wrote: On Sat, Jan 29, 2011 at 1:26 AM, Miguel Morales therevolti...@gmail.com mailto:therevolti...@gmail.com wrote: Not to mention that testing OpenGL games is impossible. The only way to test on devices is users, otherwise it's just a guessing and hoping for the best. In any case, I don't care WHY the emulator is so slow. Hopefully they'll make it fast in the near future, the iPhone emulator is much better. At the end of the day, you absolutely need to test and run on a device, especially for doing things like OpenGL games. An emulator or simulator on desktop hardware is never going to give you a good idea of how your app performs on real hardware. This isn't an excuse for the emulator being slow (we really would like to improve it, this is just a fairly challenging problem), but no matter what is done it can never be a replacement for running on a real device. -- Dianne Hackborn Android framework engineer hack...@android.com mailto:hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 - -- Marc Petit-Huguenin Personal email: m...@petit-huguenin.org Professional email: petit...@acm.org Blog:http://blog.marc.petit-huguenin.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk1EcS8ACgkQ9RoMZyVa61es6wCeMZHA1Lu5GrzI4qNBIpW/vMQX 6NIAn3azdKrV6q6BAurX2sDMwJsEkfMp =tUSL -END PGP SIGNATURE- -- 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: Did the Honeycomb platform package go away?
On Jan 29, 9:03 pm, circle kenne...@gmail.com wrote: Same. It seems that Google removed the file. I found some links on the web, but don't feel very comfortable installing from unofficial source... By some links I guess you mean http://burnbit.com/torrent/162617/android_3_0_pre_r01_linux_zip. It's useless, since no-one is seeding. H -- 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: Did the Honeycomb platform package go away?
I was able to get a copy of the file from a friend of mine so I'm now good. The repository.xml file on Google has this for the sha1 checksum: sdk:archive os=any arch=any sdk:size99663071/sdk:size sdk:checksum type=sha1b11da2f078b7383b0c3357847ab6ede367973ce3/ sdk:checksum sdk:urlandroid-3.0_pre_r01-linux.zip/sdk:url /sdk:archive so if you can find another copy and the checksum matches you should be fine. Note: you don't really need to use the SDK Manager to install it. Just unzip it and stick the android-Honeycomb folder underneath platforms. - dave On Jan 29, 6:57 pm, henrik henrik.aron...@gmail.com wrote: On Jan 29, 9:03 pm, circle kenne...@gmail.com wrote: Same. It seems that Google removed the file. I found some links on the web, but don't feel very comfortable installing from unofficial source... By some links I guess you meanhttp://burnbit.com/torrent/162617/android_3_0_pre_r01_linux_zip. It's useless, since no-one is seeding. H -- 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
Re: [android-developers] Re: my Eclipse stuck while running emulator
On Sat, Jan 29, 2011 at 12:22 PM, Samsung Galaxy atif.musad...@gmail.comwrote: means: hangs..Not doing any thingjust running and running and running If that's Eclipse that's hanging, there's a Progress view you can look at to see what it's doing. Can you tell what's it's doing? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] screenshot from a surfaceview
Hi, I would like to create a bitmap image from some freehand drawing on a surface view...if someone shows me the way, that will be of immense help... i tried setDrawingCacheEnabled(true) and getDrawingCache(true) of the view class...but its not working... are these two functions behave differently for surfaceview? thanks in advance Som -- 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: HoneyComb and LayoutInflator-cloning seems broken
Thank you Dianne, When I get back to work, I'll give you an API with that problem. On Jan 28, 11:39 pm, Dianne Hackborn hack...@android.com wrote: Actually just the .apk binary with a description of what to look for should be sufficient initially. On Fri, Jan 28, 2011 at 7:13 PM, Dianne Hackborn hack...@android.comwrote: It's not by design. If you could me code + an .apk that runs on both GB and HC and tell me what to look for in different behavior between the two, I can take a look. On Fri, Jan 28, 2011 at 1:43 PM, Streets Of Boston flyingdutc...@gmail.com wrote: I have this piece of code: final LayoutInflater liCloned = LayoutInflater.from(this).cloneInContext(this); liCloned.setFactory(new KMInflaterFactory()); return liCloned; It returns a layout-inflator with my own custom factory 'KMInflatorFactory'. The KMInflatorFactory's method 'onCreateView' is never called (i tried both target-sdk-version of 8 and Honeycomb). Is this by design or a bug in the preview-SDK? -- 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
Re: [android-developers] How to create contact list view plug-in?
Hi Xi Shen, QuickContact does not associate app icons with the entire contact. So there is no simple way to simply add an application to QuickContact so that it would show for all contacts. Instead, QuickContact associates app icons with contact's data such as email address, phone number etc. It looks at all ContactsContract.Data rows for the contact and displays one icon per mime type. If your app needs to be associated with an existing mimetype (e.g. email address, IM address etc) then all you need to do is add an intent filter for that mime type to your app and you are set. If your app needs to be linked to a brand new type of data, that's far more complex. This is typically done by introducing a sync adapter. The sync adapter declares the new mime type and provides an activity with the corresponding intent filter. Then it creates ContactsContract.RawContact's for all contacts that need to be linked to your application and inserts a data row with the custom mime type. Then it either relies on automatic contact aggregation or links raw contacts programmatically using the ContactsContract.AggregationException API. Here is an example of how this can be done: http://developer.android.com/intl/zh-CN/resources/samples/SampleSyncAdapter/index.html Cheers, - Dmitri On Thu, Jan 27, 2011 at 1:17 PM, TreKing treking...@gmail.com wrote: On Tue, Jan 25, 2011 at 12:43 AM, Xi Shen davidshe...@googlemail.comwrote: Is it possible? No, don't think so. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Implementation Of Snmp on Android
Hello, I want to implement SNMP on Android Emulator. But not getting how to proceed.I m using SNMP4J libraries.but not getting anything Please help me !!! Thank you 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Honeycomb emulator on Linux
Running it on Ubuntu 10.04 decently. Really slow (but I think that's normal) and landscape mode isn't working properly. Otherwise it's all systems go over here.. -- 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
Re: [android-developers] Re: Honeycomb emulator on Linux
On Sun, Jan 30, 2011 at 2:02 AM, JAlexoid (Aleksandr Panzin) jalex...@gmail.com wrote: Ubuntu 64bit 10.10, no OSS. No issues with running emulator(except that it's slow). Thanks to everyone who confirmed it works. After much strace-ing I've found the issue. There are actually 3 separate issues: 1. SDK 9 emulator doesn't support (or ignores) the -noaudio option. It was not of any use before either, though: specifying it resulted in a crash. Cf. http://code.google.com/p/android/issues/detail?id=12182 http://code.google.com/p/android/issues/detail?id=13505 2. SDK 9 emulator doesn't support the -audio oss/-audio alsa parameters (in previous versions I had it working with -audio alsa). It seems only pulseaudio is supported. 3. I had some old esd libraries lying around in /usr/local, and the emulator was using those, instead of the pulseaudio ones. That's why it was looking for /dev/dsp and hanging on startup. So now it works, but HC is dead slow, hardly usable at all, even on my brand new 6 core machine. Let's hope it gets better after it is officially announced next week. -- 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
Re: [android-developers] Re: Honeycomb emulator on Linux
On Sun, Jan 30, 2011 at 2:02 AM, davemac davemac...@gmail.com wrote: Which exact version of the JDK are you all running your emulator on? And are you using Sun's or the OpenJDK? The emulator is a native application, so it shouldn't matter, but I am using Sun JDK 1.6_22 x86_64. -- 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: Honeycomb browser broken?
I also see that any activities of mine that have a webview (even it is just local content) crash... -- 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] For those who are looking for testing their apps on multiple devices:
For those who are looking for testing their apps on multiple devices: I had the chance to meet a guy from Device Anywhere last week. They wire mobile phones and put them into server racks. This allows remote control of them. No simulation, the real thing. Pretty cool… They offer a device pool that can be accessed remotely or one can buy the machines. This is useful for building an internal testlab in big companies. The test automation in the live demo looked pretty cool, too. Though I have seen too many “magic testing tools demos” In my live to believe it till I have tried it :-) Greetings from Berne, Stephan -- Interessiert an Android? http://android-schweiz.blogspot.com/ Whant to learn German? http://german-podcast.blogspot.com -- 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: Emulator loses network connection issue
Similar problems happened to me。 Is there a plan for google android developers to fix this issue in future release? On 1月17日, 下午8时48分, code vthme codevt...@gmail.com wrote: Any update on this issue. I am also facing same issue. Any insight would be highly appreciated. From: YSRB ysrb.ri...@gmail.com Date: Sep 10 2010, 6:42 am Subject: Emulator loses network connection issue To: Android Developers Yes. I experienced the same issue. Sometimes restarting theemulator doesn't work still no internet. On Jul 17, 10:32 am, Ken ken0624...@gmail.com wrote: Hi, I wonder if anybody has ran into the issue where a runningemulator would lose networkconnectionall at a sudden for no obvious reason. And I am sure the computer running the JVM is still online. Restarting theemulatorseems to fix the issue but it's been a major PITA for me as it interrupts the workflow. I am using 2.1 SDK 7. Thanks. Ken -- 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