**** BEGIN LOGGING AT Sat Mar 01 10:59:57 2008 Mar 01 12:14:22 <[AD]Turbo> hi all Mar 01 12:14:56 ciao Mar 01 12:15:29 <[AD]Turbo> ciao davidw Mar 01 13:00:15 anyone around? Mar 01 13:00:19 yeah Mar 01 13:00:33 can you test something out for me? send email to translations@innsbruck-apartments.com Mar 01 13:00:40 ok Mar 01 13:02:27 sent Mar 01 13:02:57 it bounce? Mar 01 13:03:05 * davidw can't figure out what is wrong with this f&(&)(*&*( thing Mar 01 13:03:13 yes Mar 01 13:05:22 aha... got it Mar 01 13:05:24 lunch time Mar 01 13:05:27 i have a general design question, I haven't worked with small devices before, I need to upload a generated file from android over http to a webserver using POST, can I generate the file in real time and send it, or do i need to generate, then save it to disk, then send it, or are tehre other methods? Mar 01 13:05:45 do you know what I mean? Mar 01 14:38:52 jtoy, you can send it as a stream Mar 01 14:41:40 so do it in real? arent there lots of problems with that method? Mar 01 14:45:38 I'm having trouble opening the Android tutorial in eclipse Mar 01 14:46:38 i downloaded the zip from google but eclipse doesn't seem to find the package name Mar 01 16:33:07 got the sdk? :) Mar 01 20:04:02 Anyone have an idea on how to do get an Activity to send data back to it's calling Activity? Mar 01 20:05:16 The Maps application must be doing this... when you do a search on the map a transparent list pops up, and when you select items from the list it moves the map location to the lat/long of the entry you selected. Mar 01 20:19:32 dragor43: you can use setResult() and pass in a bundle, etc Mar 01 20:20:26 yawn Mar 01 20:21:06 dragor43: startSubActivity Mar 01 20:21:33 yeah, startSubActivity(), onActivityResult(), setResult(), etc Mar 01 20:21:44 yeah i know that, but the weird thing is that the activity doesn't end Mar 01 20:21:57 it's sending information back to the parent without closing the child activity Mar 01 20:22:04 finish ends an activity, otherwise it won't Mar 01 20:22:10 ooooh Mar 01 20:22:14 setResult doesn't finish Mar 01 20:22:26 dragor43: you're talking on the google maps app right? Mar 01 20:22:36 aha. wow and here i thought it was this elaborate hack. haha Mar 01 20:22:38 yes i am Mar 01 20:22:38 not sure how they do all those dialogs.... Mar 01 20:22:54 yeah, those dialogs are bit buggy too :) Mar 01 20:23:07 they're pretty cool though Mar 01 20:28:49 let's see, what to work on this morning Mar 01 20:32:28 wow Mar 01 20:32:48 just did a line count on my project, 8174 so far :) Mar 01 20:32:58 and still so much more left to do Mar 01 20:32:59 you been busy Mar 01 20:33:10 yes Mar 01 20:33:13 the first 5K came quick :) Mar 01 20:33:14 what's an easy command to do a linecount? Mar 01 20:33:19 i did: Mar 01 20:33:25 $ wc -l $(find -name "*.java" -or -name "*.[ch]") | tail -1 8174 total Mar 01 20:34:38 i suppose it would be more accurate to exclude the auto-generated aidl interfaces and include the original aidl files, but that won't account for much Mar 01 20:34:42 like 500 lines at best Mar 01 20:35:19 If I include *.xml, it jumps to 8821 ;) Mar 01 20:36:07 some of my older modules have SVN revisions well into the 200s ;) Mar 01 20:36:47 I only get 5600 including xml :( Mar 01 20:37:06 my project is very elaborate :) Mar 01 20:37:16 i had to include *.[ch] because I wrote quite a lot of C code as well Mar 01 20:37:31 mine is actually very simple Mar 01 20:37:41 plus no server component Mar 01 20:37:41 2600 lines of C Mar 01 20:37:44 just counted Mar 01 20:39:03 i have 4 separate modules, a SyncML client library written in Java, the server using libsyncml in C, my synchronization engine and associated activities, and finally the music player which utilizes the engine's provider and services. Mar 01 20:39:43 the music player itself is only a week old. i spent most of my initial time making sure the synchronization pieces were working well. Mar 01 20:40:03 which probably wasn't good for the challenge, since judging seems to be so narrow Mar 01 20:40:08 but it's better for the project itself :) Mar 01 20:41:43 the provider and service engine could easily be dropped into any type of application too. i'm really proud of how i have designed this. Mar 01 20:41:44 the pretiest player wins :) Mar 01 20:42:11 my player's going to still be pretty :) Mar 01 20:42:27 my gf is helping me. she's very artistic :) Mar 01 20:43:02 i'm heavily integrating with last.fm as well. Mar 01 20:43:02 jasta: If I include *.xml, it jumps to 8821 << ah! it's not even the number of lines of code used by Listview :)) Mar 01 20:44:11 romainguy_: what's the android line count? Mar 01 20:44:11 i disassembled ListView.class and it's only 1800. you sure about that? :) Mar 01 20:44:32 jasta: disassemble AbsListview and AdapterView too :) Mar 01 20:44:34 must be 6000 lines of comments! Mar 01 20:44:43 hehe Mar 01 20:44:45 zhobbs: can't say :) Mar 01 20:44:54 but last time I checked it was a lot :) Mar 01 20:45:12 getting closer, 4000 :) Mar 01 20:45:44 jasta: what decompiler you use, I haven't tried that yet Mar 01 20:46:00 zhobbs: note hat according to the rules you're not supposed to decompile the code ;-) Mar 01 20:46:05 i use JAD. it's very helpful because these folks won't give us source :) Mar 01 20:46:29 romainguy_: the license or ADC? Mar 01 20:46:39 the license Mar 01 20:46:54 i am not concerned ;) Mar 01 20:46:56 oh yeah, I remember reading that just before I hit "Accept" :) Mar 01 20:47:16 you guys have a lot of black magic in here. Mar 01 20:47:39 not really Mar 01 20:48:01 thought i must admit that the more i develop against Android, the less need i have to even look back at the documentation, let alone source. Mar 01 20:48:04 though* Mar 01 20:48:17 I think it's called "learning" :) Mar 01 20:48:18 jasta: hmm, don't seen jad in ubuntu repo Mar 01 20:48:24 zhobbs: no, and it's not. Mar 01 20:48:28 k Mar 01 20:48:42 romainguy_: No, surely that's not it :) Mar 01 20:48:56 if you use eclipse there's a plugin that will automatically decompile .class files that you open. JADclipse Mar 01 20:49:30 romainguy_: I did post a really annoying discrepency I found yesterday though. A Service's stopSelf() is said to not actually stop or destroy the service until all connected clients have disconnected. Mar 01 20:49:34 hmmm, wonder if that will work when debugging and get exception in android.jar Mar 01 20:49:40 However, stopSelf() seems to immediately severe active connections and destroy itself Mar 01 20:49:45 yeah I saw your bug Mar 01 20:49:49 sever* Mar 01 20:50:28 what is the deal with that? the docs aren't precisely clear, but they do imply that the behaviour i observed is not right. Mar 01 20:51:14 brb, breakfast Mar 01 20:51:15 romainguy_ probably has never looked at the service stuff Mar 01 20:51:57 probably not Mar 01 20:52:11 but he might be able to go knock someone around who has :) Mar 01 20:52:30 jasta: "the docs aren't precisely clear, but they do imply that the behaviour i observed is not right."" Mar 01 20:52:37 Android is under heavy development Mar 01 20:52:45 and it's not surprising that kind of stuff happens Mar 01 20:53:02 i know, which is why i approached it that way Mar 01 20:53:10 it's hard to tell if it's a bug in source, or a bug in documentation. Mar 01 20:53:54 i think it's a bug in the source, though, because if this doesn't work then how the hell are you supposed to let your service die when it's done doing work? Mar 01 20:56:49 i suppose i could just watch on my service's unregisterObserver method and when the last listener is gone, stopSelf(). Mar 01 20:57:16 but that seems like a race condition. Mar 01 21:04:29 hmmmm...eclipse isn't finding JADclipse Mar 01 21:05:37 ahh..wrong folder Mar 01 21:12:45 hrm Mar 01 21:12:59 so... this gtalk message + intent thing... Mar 01 21:13:03 anyone cracked that one? Mar 01 21:14:22 are you asking if someone figured out how to capture an incoming gtalk message? Mar 01 21:15:17 yeah Mar 01 21:15:40 well, apparently you can if you use an intentreceiver Mar 01 21:15:52 and the gtalk sender adds some extra bits to the message Mar 01 21:15:53 right Mar 01 21:16:29 there's example code out there showing the intentreceiver used to capture the message Mar 01 21:16:55 it's for m37 but it works for m5 too, you just need to change the package names from XMPP to GTalk Mar 01 21:18:49 m37? :) have we regressed? :) Mar 01 21:31:34 hrm... not finding it Mar 01 21:31:43 I need to generate the XML though Mar 01 22:20:28 hi. it seems like the ContentProvider for Im.Contacts returns 15 columns Mar 01 22:21:18 specifically, it's like it implicitly does a join on between the contacts and presence Mar 01 22:21:28 it probably does Mar 01 22:21:39 so less work for me :D Mar 01 22:21:51 thats the point of content providers Mar 01 22:22:08 i wasn't expecting it to be joined Mar 01 22:22:14 as per our previous discussion Mar 01 22:22:36 i told you that if you found a content uri which had a join in the provider, it would do exactly as you need. Mar 01 22:22:50 oh you did? Mar 01 22:22:50 heh Mar 01 22:22:53 yes, i did. Mar 01 22:23:07 but that if you did not, you would not have any option but to try to merge the data yourself. Mar 01 22:23:31 yeah i'm glad i did a bit of dissecting here Mar 01 22:24:08 romainguy_: you around? Mar 01 22:37:40 Hmm. Mar 01 22:44:43 what does getResources return ? Mar 01 22:45:08 a reference to your applications resource collection, i believe. Mar 01 22:45:12 i would have to confirm Mar 01 22:45:25 do you know what type it is? Mar 01 22:45:31 i'm trying to avoid calling getResources() all over the place Mar 01 22:45:36 Resources Mar 01 22:45:40 the docs will tell you that Mar 01 22:46:07 i hate the sdk Mar 01 22:46:09 docs Mar 01 22:46:16 it eats up some much ram in firefox :/ Mar 01 22:46:22 use the local copy stupid Mar 01 22:46:45 i am stupid Mar 01 22:46:58 with the SDK is an offline copy of all the documentation Mar 01 22:46:59 even with the local copy it's slow Mar 01 22:47:07 it doesn't do all that stupid searching crap Mar 01 22:47:22 it seems that there's something up with the page itself Mar 01 22:47:30 the online version is very slow for me, but the local copy is fine. Mar 01 22:47:42 i leave it open for days Mar 01 22:48:34 either way, i will not serve as your portal to the docs. Mar 01 22:49:06 you already did :) Mar 01 22:49:46 romainguy_: there is definitely magic in this compound control technique you suggested. how on earth does TwoLineListItem specify it's two children? It looks to be defined in XML, but where? how? Mar 01 22:50:31 it seems that as a lowly mortal, the best i could do is extend a LinearLayout and ViewInflate something taht is a RelativeLayout. So my extended view would contain only 1 child, a RelativeLayout. Mar 01 22:56:51 jasta: it just uses a ViewInflate Mar 01 22:57:52 but how could that work? If I extend a RelativeLayout, won't I have a RelativeLayout also specified in the view XML? Mar 01 22:58:03 So I'd have my extended RelativeLayout containing another RelativelyLayout containing my widgets? Mar 01 22:58:50 that's one way of doing it Mar 01 22:59:11 It sounds silly to me, and I doubt very much that TwoLineListItem, for example, does that. Mar 01 22:59:24 twolinelistitem seems like a hack Mar 01 22:59:37 its contents are defined in an xml file that's in some jar Mar 01 22:59:39 undocumented Mar 01 22:59:46 That doesn't make it a hack. Mar 01 23:00:02 you're right, you should try it. Mar 01 23:00:11 That's precisely how I intend to implement my compound control, defining it in an XML file entirely. Mar 01 23:00:32 However I doubt very much that the structure that comes out into TwoLineListItem is a RelativeLayout containing anohter RelativeLayout. Mar 01 23:00:58 TwoLineListItem is a RelativeLayout Mar 01 23:01:04 and it inflates an XML that contains a LinearLayout Mar 01 23:01:10 and in that LinearLayout there are two textView Mar 01 23:01:20 http://groups.google.com/group/android-developers/browse_thread/thread/ba05919a9489c686/89e263543886f4c7?lnk=gst&q=simple_list_item_1#89e263543886f4c7 Mar 01 23:01:36 romainguy_: Then why would TwoLineListItem be a RelativeLayout? Why does that make sense? Mar 01 23:01:45 it could be a FrameLayout Mar 01 23:01:55 just any sort of layout Mar 01 23:02:08 So for my compound widget, I think it would make the most sense to be a LinearLayout that wraps a RelativeLayout. Hmm, this seems goofy. Mar 01 23:02:11 But sure :) Mar 01 23:02:54 if only XML let you have more than one root tag :)) Mar 01 23:03:06 maybe we should have a fake root tag Mar 01 23:03:14 right, i was thinking i was going to have to wrap it in a relativelayout and gut it and insert it at the root. Mar 01 23:03:18 so that you could inflate the content of an XML as your direct children Mar 01 23:03:24 so i'd basically inflate a view, then walk the children and attach them manually. Mar 01 23:03:29 why bother? Mar 01 23:03:48 right, i don't want to. i just thought that's what i had to do not realizing that the recommended approach was to just hav ea dummy wrapper. Mar 01 23:04:00 ideally this wrapper wouldn't be here Mar 01 23:04:05 but right now it has to be here Mar 01 23:04:16 i'm fine with that for now, really. Mar 01 23:04:23 as I said, we should make a special version of ViewInflate.inflate() that would skip the root tag Mar 01 23:05:21 i think i'm rolling now then Mar 01 23:05:33 i just call inflate from my constructor and build up there Mar 01 23:05:40 :q Mar 01 23:05:41 oops Mar 01 23:23:28 wow, that was sure easy Mar 01 23:49:08 shoot, i just realized i can't avoid handling onLayout and onMeasure because I have to adjust the sizes and positions of the labels based on the size of the widget Mar 01 23:49:12 bummer ;) Mar 01 23:54:38 what's the best way to add imageview's dynamically to a RelativeLayout at run-time? Mar 01 23:54:53 i have 3 combinations of ImageViews that could be added, so don't think i can define those combinations in the XML ? Mar 01 23:58:23 it would be more efficient to add them all and play with their visibility Mar 02 00:01:48 but you could add them dynamically by using addView Mar 02 00:01:56 and you can remove them with, uhm, removeChild i think? Mar 02 00:02:00 look at the documentation. Mar 02 00:27:49 * jasta scratches his head Mar 02 00:28:00 maybe setOnClickListener doesn't do what I think it does. Mar 02 00:28:56 oh duh, textview's aren't clickable :) Mar 02 00:30:22 i wish i could see the style definition for a button now ;) Mar 02 00:37:01 ok jasta so i'll use android:visibility :) Mar 02 00:37:01 thanks Mar 02 00:50:58 romainguy_: why is it insufficient to call setClickable(true) on a TextView to make it clickable? What is the critical style difference between a button and a textview that makes a button clickable? Mar 02 00:58:04 jasta: Try setting focusable to true Mar 02 01:02:25 that did it Mar 02 01:03:30 yay, my bar works now! Mar 02 01:08:11 sort of annoyingly, though. setSelection maybe could stand be a bit more flexible ;P Mar 02 01:14:16 more flexible than selecting the given position? Mar 02 01:15:51 the idea of positioning the list should be more flexible, at least. not appropriate for setselection,. Mar 02 01:15:55 erm setselection. Mar 02 01:16:48 my purpose obviously doesn't want to center the separator bar. it should be at the very top of the list Mar 02 01:21:24 it's ok for my purposes, i can work around it by just measure a few views until i get to the approximate center and call setSelection on that position. still, i think you will find a lot of applications wanting more options to control the viewport. Mar 02 01:22:26 perhaps setSelectionFromTop could be useful for that Mar 02 01:22:56 we'll see Mar 02 01:23:15 i coudl of course just extend ListView and get what i need from it that way Mar 02 01:23:36 I don't know if we expose enough to do that from a subclass Mar 02 01:24:14 actually wait, setSelectionFromTop behaves much different than I expected Mar 02 01:25:03 setSelectionFromTop(selectorPos, 0) seems to behave much like I'd want. Mar 02 01:25:09 but I did not expect that ;) Mar 02 01:28:26 jasta: the doc is pretty obvious to me though Mar 02 02:08:16 hi Mar 02 03:46:19 ello to all Mar 02 03:46:24 ello to one and all Mar 02 03:47:05 anyone here? Mar 02 03:47:11 by and large Mar 02 03:47:25 viscosity and vehemence to all Mar 02 03:47:25 sort of Mar 02 03:47:40 jasta:you a bot? Mar 02 03:47:55 jasta: you a bot Mar 02 03:48:37 no Mar 02 03:53:12 jasta: ello Mar 02 03:53:26 jaaaaaaaaaaaaaaaasta: Mar 02 03:53:43 pandora: hello Mar 02 03:53:55 pandora: quick ques Mar 02 03:54:33 hey hey Mar 02 06:55:02 hey guys, i'm coming to java by way of android - i've done plenty in python, etc, even written some small c embedded programs, but don't know much about java. I'm curious what this syntax means (you can just point me in the direction of docs, but punctuation is hard to google): Mar 02 06:55:06 mTitleText = (EditText) findViewById(R.id.title); Mar 02 06:55:16 specifically, the parens around the EditText class **** ENDING LOGGING AT Sun Mar 02 10:59:57 2008