**** BEGIN LOGGING AT Wed Dec 17 02:59:57 2008 Dec 17 03:57:31 what's the easiest way to create a context menu (with the same L&F as the native one)? Dec 17 03:57:40 the kind that you get on, say, a long press Dec 17 04:15:11 registerContextMenu, then handle onCreateContextMenuItem or whatever it is Dec 17 04:15:32 arent there lots and lots of examples of this you could find? Dec 17 04:26:03 jasta, no, I mean if I wanted to duplicate it for something else Dec 17 04:26:26 you mean not on a listview? Dec 17 04:26:42 not necessarily Dec 17 04:26:50 if I wanted it on a button or something Dec 17 04:27:19 well, first of all i dont think you should do that. Dec 17 04:27:38 second, you'd just make a Dialog with a ListView, just like the context menu does Dec 17 04:28:34 yeah, I'm not saying it'll necessarily be on a button; that was just an example Dec 17 04:28:39 actually, what am i saying. you'd still use registerForContextMenu and onCreateContextMenu Dec 17 04:29:06 okay, here's part two: how could you do it without it needing to be a long press? Dec 17 04:29:19 for that you'd just use a dialog with a listview then Dec 17 04:29:22 like, if I wanted it so that you clicked an item in a list and the "context" menu would pop up Dec 17 04:29:22 ah Dec 17 04:29:30 but you don't want to do that, i'm sure. Dec 17 04:29:41 instead consider using a dropdown/combo widget or something Dec 17 04:29:52 or a regular menu if that makes sense for your app Dec 17 04:30:07 you are likely to confuse your users if you try to go off inventing new types of standard widgets that don't behave like anything they've used before Dec 17 04:30:41 well, what sparked all of this is that I have a list of voicemail, and there are several behaviors, none of which make sense to do automatically when a specific voicemail is clicked Dec 17 04:30:55 like call back, download, listen, mark as spam, etc Dec 17 04:31:06 that is exactly what long click / context menus are for. Dec 17 04:31:18 define one default action that is most likely (listen), and then multiple long click actions. Dec 17 04:31:32 hmm Dec 17 04:31:45 then do something like while the voicemail is being played, a button could be on the left indicating that if you push it, you will call the person Dec 17 04:31:58 and also, while a voicemail is playing, make the green call button call them Dec 17 04:32:05 well, I'd just pipe it into the music app or something Dec 17 04:32:05 heh Dec 17 04:32:09 then download/spam would just be exclusivley in a context menu Dec 17 04:32:20 god don't do that. that is a fucking terribly interface Dec 17 04:32:26 haha Dec 17 04:32:47 * KNY doesn't feel like rolling his own Dec 17 04:33:17 rolling your own what? your own 5 lines of code to use the MediaPlayer class? Dec 17 04:33:42 I don't think that using Music will work anyway because it loses the auth session, rendering the URL useless Dec 17 04:33:47 I'll look into it Dec 17 04:34:12 i dont advise that you even stream the voicemails Dec 17 04:34:23 have a setting, default on, to automatically download the voicemails locally Dec 17 04:34:44 why would you advise against streaming? Dec 17 04:34:53 well, think about how this application is used. Dec 17 04:35:29 most users will indefinitely want to listen to their voicemails at some point, but they might not have data service when that is, or it might be slow. moreover, they wont want to wait for buffering. Dec 17 04:35:56 well, this app is 100% useless without data service Dec 17 04:36:00 second, when a voicemail is received, you can reasonably assume that the user is not looking at their phone. that is, they dont care what its doing. you have a free opportunity to use the data radio. Dec 17 04:36:11 cache it? Dec 17 04:36:18 KNY: no, it's not. are you saying if i have a deadzone in my house, i shouldn't be able to listen to my voicemails? Dec 17 04:36:43 jasta, if you can't get a connection to GrandCentral, you can't use the app, at all Dec 17 04:36:56 KNY: then your app is poorly designed. Dec 17 04:37:05 you'd have to download them all individually with the intention of listening to them later Dec 17 04:37:22 you have more than enough data to cache and provide a user experience in either case. Dec 17 04:39:23 jasta, so if you were using this app, you'd want the voicemails to be downloaded in the background as they came in or something? Dec 17 04:39:47 yes, can you explain to me who wouldnt want that? Dec 17 04:40:37 well, GrandCentral for one Dec 17 04:41:07 if I'm polling their servers every X minutes instead of on-demand, they might not like it Dec 17 04:41:27 plus, you already get emails from them when you get a new email Dec 17 04:42:04 i didn't tell you to poll their servers. Dec 17 04:42:17 how else would I check for new voicemails? Dec 17 04:42:29 ideally you should find some way to hook into those voicemail alert emails and wake up the device when you get them Dec 17 04:42:39 perhaps GrandCentral offers a "push" approach? Dec 17 04:43:26 can you (a developer) read incoming emails? Dec 17 04:43:55 not directly on the device, but you could intercept them through an intermediate service. you tell the user to configure their grandcentral alerts through your system, for instance. Dec 17 04:44:05 or, as i said, if grandcentral offers a push system you should use that. Dec 17 04:44:47 this has nothing to do with whether you download the emails actively or passively even. this is everything to do with whether your app can even tell the user they have voicemail. if not, what a piece of junk Dec 17 04:46:10 youre designing your entire app around a clumsy usage pattern. i would have to open my email to even know that i got a voicemail, then open your app to hear it? *UGH*. Dec 17 04:47:14 unfortunately, GrandCentral limits me pretty severely on what I can do since I have to use kludgy workarounds with their m.grandcentral.com interface Dec 17 04:47:32 well then why are you even building this awful app? Dec 17 04:47:44 because it's useful to me Dec 17 04:47:51 if other people like it, then good Dec 17 04:47:56 otherwise, they can not use it Dec 17 04:47:58 *shrug* Dec 17 04:48:32 and, judging from the response I've gotten without even having voicemail support support, other people find it useful as well Dec 17 04:48:57 i still think the best solution would be ask your users to set up with as you as an intermediary. do these voicemail emails include the voicemail itself? Dec 17 04:49:29 I believe there's a link to it or something Dec 17 04:49:36 if so, your users might not appreciate the invasion of privacy... Dec 17 04:49:58 is the link secured using some information not known in the e-mail? Dec 17 04:50:22 I think you have to log in and then it redirects you to the .mp3 Dec 17 04:50:29 could be wrong though; I don't get many voicemails Dec 17 04:50:49 i can see that, because you're designing an app that utterly sucks for voicemail :) Dec 17 04:51:21 anyway, if the voicemail is secured in such a way that intercepting the email is not a problem, i strongly recommend you set up a separate service which implements push support so that your users can go through you Dec 17 04:51:38 or, pressure GrandCentral engineers into providing push support directly Dec 17 04:51:46 ha, pressure GC Dec 17 04:51:50 or, possibly, an SMS alert system and you can intercept that Dec 17 04:52:07 google owns grandcentral now? Dec 17 04:52:07 I get the impression that google has GC on the chopping block Dec 17 04:52:11 either way, if you want to implement voicemail, you need to be able to tell when a voicemail is received. Dec 17 04:53:22 I'll mark that down for version # when.i.have.time Dec 17 04:53:23 haha Dec 17 04:53:42 what i'm telling you is that if you cant alert for new voicemails, then you should NOT be supporting voicemails at all Dec 17 04:53:52 because your usage pattern is so broken nobody could possibly find it worthwhile Dec 17 04:53:56 why dont they just click the damn link in their email then? Dec 17 04:54:24 because you don't always have an email handy for every voicemail you have? Dec 17 04:55:04 then why not just bookmark the m.grandcentral.com page? what advantage are you offering? Dec 17 04:56:26 in order to call anyone from m.gc.com, you have to have them as a contact Dec 17 04:56:32 I have a dialer and local contacts Dec 17 04:56:51 oh, and there's no way to import contacts into GC Dec 17 09:51:28 hi all, I am trying to write a stack of cards for a game of solitare by overriding onLayout of LinearLayout, but I don't understand what normally goes on when onLayout is called. Is there anyone here I can talk to about what normally goes on when onLayout gets called? Dec 17 09:51:51 how does onLayout lays out its children? Dec 17 10:39:40 hi i I am trying to write a stack of cards for a game of solitare by overriding onLayout of LinearLayout. The cards I use are extended from ImageView. But my stack looks like this: http://edwinhere.googlepages.com/Image2.jpg . The code for my cards is http://pastebin.com/d4feba7b5 .The code for my stack of cards is http://pastebin.com/d2d295f01 and this my test activity http://pastebin.com/d43512561 Can you help, please? Dec 17 10:39:49 The cards seem to get smaller as they get stacked up Dec 17 10:39:55 omehow by extending ImageView, my custom view has inherited some undesired behavior from Image View Dec 17 10:40:24 Can anyone help? Dec 17 11:04:17 louzer, for your first question, you can look it up from there: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/LinearLayout.java Dec 17 11:04:54 ok thanks Dec 17 23:02:08 any idea why the message isn't updated in this AlertDialog? http://pastie.org/341831 Dec 17 23:02:35 ignore the missing brace :p Dec 17 23:04:55 are you sure that onPrepareDialog is being invoked? Dec 17 23:05:07 and that the parameters youre getting are what you expect? Dec 17 23:06:04 yep, just verified Dec 17 23:08:25 hm, in which .git do i have to loko for AlertDialog? Dec 17 23:08:38 its in frameworks Dec 17 23:08:54 frameworks/base.git Dec 17 23:09:03 ah then core/java/ Dec 17 23:09:05 found it, thanks Dec 17 23:13:17 i just created a simple test and could not verify what you are seeing. Dec 17 23:13:36 can you post the entire class? Dec 17 23:14:00 i dont know what this onPreparedDialog method is coming from or in what context your code is running... Dec 17 23:14:03 if you don't mind looking at uncleaned code ;) Dec 17 23:17:45 ok fine Dec 17 23:18:34 http://pastie.org/341853 Dec 17 23:18:44 showDIalog is on line 123 Dec 17 23:18:54 onEvent is called from another thread Dec 17 23:19:05 onPrepareDialog and onCreateDialog are at bottom Dec 17 23:21:30 the documentation says you need to call through to the superclass, and you are not. Dec 17 23:22:03 yeah, i've read that but 1) the example in ApiDemos does not and 2) Dialog::onPrepareDialog is empty :) Dec 17 23:22:30 i tried running the code with it though and it didn't display the message Dec 17 23:24:15 hm, calling showDialog from main thread doesn't display the message, neither Dec 17 23:24:46 doesn't display the message, or doesn't display the whole alert? Dec 17 23:24:59 the alert is there Dec 17 23:25:12 but the message is empty Dec 17 23:25:21 onPrepareDialog is NOT empty. Dec 17 23:26:08 sorry, you are right. i added it though and it didn't change anything Dec 17 23:26:26 (it was Dialog::onContentChanged that's empty) Dec 17 23:27:26 hang on, i will build my test like yours Dec 17 23:27:33 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/Dialog.java;h=f1d2e65880eaee660b03c2045eee99d87cc2752d;hb=HEAD#l167 Dec 17 23:27:37 that's interesting though Dec 17 23:27:54 the example directly in the framework ;) Dec 17 23:30:49 oh, setTitle() works in onPrepareDialog Dec 17 23:31:11 ah lol, it probably doesn't create a message as the onCreateDialog doesn't set one Dec 17 23:31:22 use setMessage("") in onCreateDialog Dec 17 23:31:22 *sec* Dec 17 23:31:30 yea :) Dec 17 23:31:40 works now Dec 17 23:31:49 thanks Dec 18 00:11:04 I've read about activityCreator.py, but I'm not seeing it in my SDK download Dec 18 00:11:07 Where do I find this? Dec 18 00:13:30 tools/activitycreator? Dec 18 00:14:35 Ah, thanks. Dec 18 00:14:38 It's been ported to Java, I see Dec 18 00:19:09 hello i am french Dec 18 00:19:21 are there a franch here? :) Dec 18 01:29:30 does anyone know how to get the android eclipse plugin to play nicely with an CPE_CONTAINER library? Dec 18 01:29:45 ie: an indirectly referenced jar Dec 18 01:29:59 it doesn't translate them and pack them into the apk, so the app won't run **** ENDING LOGGING AT Thu Dec 18 02:59:56 2008