**** BEGIN LOGGING AT Fri Nov 07 02:59:57 2008 Nov 07 03:36:43 hey, is this channel for writing apps or for Android source? Nov 07 03:39:21 a bit of both, I guess. Nov 07 03:41:20 nice. Well, anyone every used KeyListener? I've got a listener implementing it, and in onKeyUp(..) I'm doing if(keyCode == MY_DESIRED_KEY) { /* do stuff */ return true; } return false; Nov 07 03:41:24 but no keys get through Nov 07 03:41:33 even if keyCode != MY_DESIRED_KEY Nov 07 03:42:18 I haven't done any GUI development yet, so I won't be able to help. Nov 07 03:42:24 are ports on android blocked to traffic? Nov 07 03:42:27 even if I just do onKeyUp(...) { return false; } it still traps the keys Nov 07 03:43:16 are you overriding the key listener KNY? Nov 07 03:43:52 I've got a custom KeyListener, then saying setKeyListener(new MyKeyListener()); Nov 07 03:44:04 pastebin your code Nov 07 03:44:10 michaelnovakjr, sure thing Nov 07 03:44:43 http://svn.evancharlton.com/wsvn/Mileage/src/com/evancharlton/mileage/KeyFocuser.java Nov 07 03:44:46 that's the keylistener Nov 07 03:47:45 not sure, i've only overrode the keylistener method in the activity class Nov 07 03:48:26 hmm Nov 07 03:48:33 I'll look into that Nov 07 03:48:56 I'd rather not do that because this would be used in multiple activities Nov 07 04:20:45 anyone in here? Nov 07 04:22:59 * jbq_ waves Nov 07 04:23:09 question about sockets Nov 07 04:23:19 do ServerSockets work on android? Nov 07 04:23:32 am i able to listen on a port? Nov 07 04:24:26 Yes, although I'm not 100% sure how T-Mobile's network handles inbound connections. But you can get an inbound connection on wifi at least. Nov 07 04:25:01 familiar with a Permissions do not allow action on socket exception? Nov 07 04:25:45 Oh, the java permissions stuff. I've only barely looked at that. I was talking more about low level stuff, I guess. Nov 07 04:27:30 yea, its a dumb message Nov 07 04:28:11 Des your process have the permission to access the network? If not, you get an "unknown error" exception. Nov 07 04:28:35 i have the internet permission set, are there any others related to network? Nov 07 04:28:54 that's the only one I'm aware of. Nov 07 04:32:56 it throws the exception while creating the serversocket instance Nov 07 04:37:09 Sorry, I'm not familiar with those APIs at that level of detail. Nov 07 04:37:16 Are you trying to bind a port below 1024? Nov 07 05:45:13 hey Nov 07 05:45:22 do you guys think that Android, if it takes off, will help Java's popularity? Nov 07 05:45:51 Java is popular enough as it is Nov 07 05:46:05 I got back into Java because of Android Nov 07 05:46:09 I haven't touched it in 5 + years Nov 07 05:50:45 ha, finally.. guess its an jdk 5 issue Nov 07 05:50:56 what's your problem muthu ? Nov 07 05:50:56 now make sdk gives an error.. good Nov 07 05:51:11 'make sdk' wasn't generating sdk Nov 07 05:51:27 how did you guys learn Java? Nov 07 05:51:48 Sorium: i learned it at grad school Nov 07 05:51:50 Sorium: I don't remember, I started with Java 1.0.2 Nov 07 05:51:56 the amusing thing is android doesn't have a jvm Nov 07 05:52:05 huh Nov 07 05:52:35 spikebike: say what? Nov 07 05:52:50 michaelnovakjr: it doesn;t :) Nov 07 05:53:16 it has a vm, no? Nov 07 05:54:25 michaelnovakjr: but it's not a *J*VM Nov 07 05:54:39 ya, they translate bytecodes into dalvik Nov 07 05:54:53 and from what I can tell it's a rather nice virtual machine Nov 07 05:55:02 I'm kinda curious what the second language ported to it will be Nov 07 05:55:27 spikebike: python Nov 07 05:55:35 Anything that targets the jvm already runs on it, you don't need to "target" dalvik per se. Nov 07 05:56:29 i'm more interested in GAE supporting java Nov 07 05:56:49 so you don't have to learn python :) Nov 07 05:56:54 yep Nov 07 05:57:14 muthu that would please me Nov 07 05:57:26 well seems smarter to target dalvik directly Nov 07 05:57:42 (and more efficient) Nov 07 05:57:49 both in memory and performance Nov 07 09:07:14 romainguy, you said you fixed the ColorDrawable bug in ListView dividers? which one (setting the drawable in xml or the one that fills the whole ListView with the divider color)? Nov 07 11:49:45 ..also if I change the selector color in ListView to anything other than transparent, the whole ListView will be filled with that color.. not only the currently selected item. Nov 07 11:50:12 are these both cases a bug or am I doing something fundamentally wrong here? :/ Nov 07 13:08:36 how are activities supposed to pass data back and forth? lets say, for example, i have a login activity that progresses to a inspect activity, and I want to create the connection in the login activity. How do I pass this connection to the inspect activity? Nov 07 13:43:10 duncanfoo: you might want to use services, especially if you're providing long-lived activities Nov 07 13:43:25 long lived in that the network persists even while the activity is not in the foreground Nov 07 13:43:45 vol: yeah, I don't hink that is applicable to my app Nov 07 15:14:44 I'm again totally lost... setBackgroundResource(..) works for one View but does not for Checkbox (eg the checkbox width will be set to 0 after that). Nov 07 15:15:18 the resource I'm setting is the same for both cases Nov 07 15:16:01 ..and it works for my custom widget (that extends View) Nov 07 15:22:58 ..and it seems only romainguy knows something about stuff like that :) Nov 07 15:43:50 tauno: it is probably because the checkbox actually uses its background property to draw its check state Nov 07 15:44:08 try setting the background of a wrapping view or layout. Nov 07 15:44:32 as in, Nov 07 15:47:30 will try. Nov 07 15:48:40 sweet... it worked :) Nov 07 15:49:24 jasta, thanks very much! Nov 07 15:50:20 no problem Nov 07 17:30:00 hello? Nov 07 17:49:58 hey, anyone around that has used KeyListeners (via someView.setKeyListener())? Nov 07 18:00:13 no but you can ask anyway :) Nov 07 18:04:07 I have a question too - if my ListView spits out custom Views then how can I determine in the custom View itself, if it's currently selected in the ListView or not? checking getDrawableState() to see if it contains R.attr.state_selected every onDraw() seems like a lot of overhead for this small task.. Nov 07 18:04:26 ..it works but I wonder if there's a simpler..more elegant way of doing it Nov 07 18:12:53 tauno: what exactly are you trying to accomplish? Nov 07 18:16:09 the reason i ask is that normally, ListView controls drawing the background of the selected drawable Nov 07 18:16:16 (see setSelector() if you want to change it in a general way) Nov 07 18:17:48 and the way it does this is with a selector drawable. you're oversimplifying android's very sophisticated widget scheme. Nov 07 18:17:58 or at least, i think you are :) Nov 07 18:23:50 so I've got a keylistener implementation that is wrongly trapping the keys Nov 07 18:24:18 even if I do onKeyUp(...) { return false; }, the EditText it is on doesn't get any keypresses Nov 07 18:24:19 I want to change the color of the text that my custom widget draw based on the selected/notselected state of it in a ListView Nov 07 18:25:33 tauno: ahh, well that's easy enough. hang on, ill show you something... Nov 07 18:25:49 * tauno waits in exitement.. :) Nov 07 18:27:09 I found that I can check (getDrawableState() == ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET) but I still have to do it in every onDraw().. Nov 07 18:27:26 why are you using a custom widget, btw? Nov 07 18:27:54 if you are using it just to accomplish this effect of seletected/unselected state then you've made a mistake :) Nov 07 18:29:29 anywya, this is old code that i no longer use, but it still applies to 1.0r1: Nov 07 18:29:32 Using a composite standard widget would require using a container + 3 TextViews and one ImageView -> the small logic chip in my head figured that I can save a few ms and bytes by implementing my own View that just does what I want it to do and nothing more. Nov 07 18:29:34 http://code.google.com/p/five/source/browse/tags/leaving-m5/five-music/res/layout/tab_indicator.xml?r=957 Nov 07 18:29:51 notice that i use android:textColor="@color/tab_indicator_text" Nov 07 18:29:57 http://code.google.com/p/five/source/browse/tags/leaving-m5/five-music/res/color/tab_indicator_text.xml?r=957 Nov 07 18:30:04 this is res/color/tab_indicator_text.xml Nov 07 18:30:40 tauno: honestly, i don't recommend that optimization until you are more comfortable writing android software. you will likely actually hurt performance by implementing an inefficient view. Nov 07 18:32:26 it is best to do as little custom as possible while you are learning, especially ListAdapters. Nov 07 18:32:36 well to this point I have managed to get away without any "hacks" and the code "seems fast".. haven't done any bechmarks tough.. Nov 07 18:32:52 well, it's just advice you don't have to listen to me Nov 07 18:33:05 yeah.. I'm just thinking loud :) Nov 07 18:33:07 but i have been writing android code for a year now :) Nov 07 18:34:43 jasta, you are right but maybe it's just the J2ME coder in me.. every time I create a new variable I calculate the speed/memory impact that it has etc :/ Nov 07 18:35:23 that's a fine attitude, but i am telling you that android is nuanced and complex. it is unlikely that what you think is an optimization actually will be. Nov 07 18:36:20 android sure is a way more complicated beast that I figured that it is in the beginning.. Nov 07 18:36:49 it is very well optimized. don't trample on that by thinking you know best. Nov 07 18:37:31 anyway, did the xml i pasted help you at all? is not just specific to colors btw. you could use it for anything. Nov 07 18:38:10 for instance, the orange selection that you see by default in listviews is actually just a drawable set as the background of each widget Nov 07 18:38:16 of each row in the listview, i mean Nov 07 18:38:57 that default can be found in frameworks/base/core/res/res/drawable/list_selector_background.xml in the source, btw Nov 07 18:39:21 you could easily make a selector which changes an image or text colors or whatever. Nov 07 18:39:30 based on its selected state Nov 07 18:39:40 or its pressed, enabled states. its very flexible Nov 07 18:42:19 jasta, I use selectors for the ListView background but I paint the text in my custom view with my own Paint.. the android:textColor property won't affect this I'm afraid.. Nov 07 18:43:03 tauno: you could load a state selector for text Nov 07 18:43:10 for text color I mean Nov 07 18:43:17 and use this to pick the color of the text you draw Nov 07 18:44:17 and fwiw, I'm all for the use of custom views instead of using tons of standard views :)) Nov 07 18:44:19 jasta, ..you made me doubt my decision to use a custom View.. argh.. now I'm ..unsecure :P Nov 07 18:44:56 romainguy_.. and you are not kidding? :P Nov 07 18:45:01 no I'm not Nov 07 18:45:11 (fwiw, I am one of the UI toolkit engineers on Android) Nov 07 18:45:17 but jasta has a point Nov 07 18:45:24 you might want to know the APIs better before doing it Nov 07 18:45:35 that's what I'm trying to do here ;) Nov 07 18:45:43 it is a good way to learn :) Nov 07 18:45:53 it just has a steeper learning curve Nov 07 18:45:59 for instance I don't understand why you need getDrawableState() == ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET in onDraw() Nov 07 18:46:27 because I havent figured out a simpler way of determining if I'm currently selected or not :( Nov 07 18:46:58 and because it seems like "an hack" I'm asking here :) Nov 07 18:47:15 well View has a isSelected() Nov 07 18:47:22 no..? Nov 07 18:47:39 yes it does Nov 07 18:47:42 ah f.. Nov 07 18:47:43 View.isSelected() :) Nov 07 18:47:49 oh come on.. Nov 07 18:47:50 that said, that's not how we do things usually Nov 07 18:48:03 what we do is we pass the state of the View to the drawables (like you may have noticed) Nov 07 18:48:04 * tauno drops some tears..) Nov 07 18:48:13 and then we use s, like jasta told you Nov 07 18:48:17 romainguy_: i didn't mean to imply that you should never create custom views when you can just mash together lots of standard views. i just meant don't do it prematurely, and certainly don't do it before you have had some time to let the UI toolkit sink in a little bit. Nov 07 18:48:40 jasta: I know, and I agree Nov 07 18:48:54 I was just insisting on the fact that in and by itself, it's not a bad idea to go with a custom view Nov 07 18:49:05 ok, agreed Nov 07 18:49:14 (I spent so much time removing views from apps that it makes me happy to see somebody do it directly, don't ruin my happiness :)) Nov 07 18:56:43 I'm trying to use adb forward. Is it possible to connect to a machine using the emulator that's set adb forward on those ports? Nov 07 18:56:55 I've tried telnetting from another machine to a machine running the emu on the emu telnet port Nov 07 18:57:01 which should already be forwarded, but I get connection refused Nov 07 18:57:44 Huh? Nov 07 18:58:16 I want to run the emu on one machine, and telnet into it on another Nov 07 18:58:39 Okay. So you need to have the adb daemon listen on the telnet port, or specify a port other than the default telnet port. Nov 07 18:58:50 well, I'm specifying 5554 Nov 07 18:58:55 e.g. "adb forward tcp:5100 tcp:25" Nov 07 18:59:22 Okay, you want to telnet into the emulator's control port? Nov 07 18:59:28 yes, from another machine Nov 07 19:00:20 the problem is that I have a decently powerful windows machine, and an incredibly wimpy linux machine. I am not allowed to place linux on the powerful windows machine. Nov 07 19:00:36 So, I want to run the emulator on the windows machine, and use arm-eabi-gdb/etc on the linux machine Nov 07 19:00:56 right now, I'm running a linux VM image on the windows machine and running the emulator in there, but that's kind of less than optimal. Nov 07 19:01:33 I don't know if it binds to localhost or INADDR_ANY. Nov 07 19:01:54 The output of "netstat" suggests localhost. Nov 07 19:02:10 yeah Nov 07 19:02:26 so, not feasable? Nov 07 19:02:37 You can write a trivial packet forwarder. Nov 07 19:03:07 Like, take development/tools/jdwpspy and rip out the JDWP stuff. Nov 07 19:03:16 Just ssh will do. Nov 07 19:03:26 urgh. trivial if you know networking already I suppose. Nov 07 19:03:27 Yeah, that would likely be easier. Nov 07 19:03:35 hmm, ssh forward you say? Nov 07 19:04:05 You have cygwin on the windows box? ssh port forwarding is really easy. Looks like the emulator is listening on 5554 and 5555 Nov 07 19:04:26 yes, I have cygwin Nov 07 19:06:02 So from the windows host, something like "ssh -NL 5554:localhost:5554 linux_hostname &" Nov 07 19:06:05 (and again for 5555) Nov 07 19:06:13 hmm, let me try Nov 07 19:06:42 That says, essencially, forward local port 5554 to "localhost:5554" on linux_hostname. Nov 07 19:07:07 oh ffs Nov 07 19:07:12 yet another thing not installed on cygwin... Nov 07 19:07:51 Or wait, I think I misread: your emulator is on windows, not linux? Then reverse those: run ssh on the linux host where you'll be running the debugging tools. Nov 07 19:08:09 yes Nov 07 19:08:12 emulator is on windows Nov 07 19:08:23 You have sshd running on windows? Nov 07 19:08:27 no : ( Nov 07 19:08:30 (I can) Nov 07 19:13:50 Is anyone (external or from Google) planning to come to FOSDEM 7/8 february 2009 in Brussels? Nov 07 19:16:23 ugh. why doesn't openssh seem to come with sshd.... :\ Nov 07 19:16:40 It's in something like "openssh-server" I think. Nov 07 19:16:51 Been a while since I've done anything with cygwin Nov 07 19:16:53 I didn't see it in the cygwin lists Nov 07 19:16:58 and openssh specifies client and server Nov 07 19:17:10 You sure you have /usr/sbin on your path? Nov 07 19:17:11 yet sshd doesn't appear in /usr/bin Nov 07 19:17:20 ah Nov 07 19:17:21 that might be it Nov 07 19:18:03 yep :\ Nov 07 19:19:23 there we go, sshd works, and I feel like an idiot for not thinking of that Nov 07 19:19:34 now to see if port forwarding will do the trick Nov 07 19:24:30 There we go, that's a little better : ) Nov 07 19:36:29 romainguy_, jasta, thanks, got it working now. Just to be sure, am I doing it right? I'm defining color states in xml, then on View creation I load the ColorStateList into a local variable. I override drawableStateChanged() and then there i do text.setColor(colors.getColorForState(getDrawableState(), 0)); Nov 07 19:36:54 yep Nov 07 19:37:49 btw it would be convenient if drawableStateChanged() could pass the new state along.. Nov 07 19:41:28 or is it pointless? :) Nov 07 19:47:47 I also tried it like this: I just override drawableStateChanged() and there I do: if (isSelected() || isPressed) text.setColor(hardcoded1); else text.setColor(hardcoded2); and it wokrs also but in this case I don't have to load stuff from xml (I'm perfectly fine hardcoding the values to code) and I don't have to hold ColorStateList objects for every text paint... so it seems to be more efficient but I'm not sure which approach is better.. Nov 07 20:14:15 romainguy_, romainguy, you said you fixed the ColorDrawable bug in ListView dividers? which one (setting the drawable in xml or the one that fills the whole ListView with the divider color)? Nov 07 20:26:52 http://crave.cnet.co.uk/mobiles/0,39029453,49299652-1,00.htm <-- makes me sad that the G1 wasn't the Touch HD Nov 07 20:27:31 if it was the touch hd someone besides bloggers would have noticed that the G1 launched Nov 07 20:29:44 oops, wrong channel :) Nov 07 20:39:27 zhobbs: have you plugged the G1 into good speakers yet? Nov 07 20:39:39 jasta: nope Nov 07 20:39:44 i'm skeptical that the output range is as good as the iphone/ipod touch Nov 07 20:39:56 in fact, im quite certain its not. i'm trying to find specs right now on the output power. Nov 07 20:40:07 the G1's focus doesn't seem to be multimedia Nov 07 20:40:08 it seems to output a very low range compared to other devices Nov 07 20:40:18 right but this type of thing could just be my adapter Nov 07 20:40:33 since the extusb port should be able to output very good quality by design Nov 07 20:40:44 (a side note, i wonder how i could get digital output?) Nov 07 20:40:49 digital output would own Nov 07 20:41:18 Hmm, I'd be surprised if the adapter was hurting quality that bad Nov 07 20:41:39 well it certainly could, extusb isn't outputting an analog signal at all i would't think Nov 07 20:41:51 I think it's analog Nov 07 20:42:00 well, actually that can't be. if it were digital, then the adapter could not be so small and run so cold Nov 07 20:42:02 actually, I'm sure it's analog Nov 07 20:42:36 hmm, well, if that's the case then maybe i'll have to try to find a digital solution somehow Nov 07 20:42:43 the stereo system at my house and in my car is very high end Nov 07 20:43:00 http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=280277868575&ssPageName=ADME:B:EOIBSA:US:12 Nov 07 20:43:05 it's livable, but i can definitely notice the range the g1 produces is generally shifted lower than my girlfriends ipod Nov 07 20:43:06 that adapter doesn't have DAC :) Nov 07 20:43:21 yeah, totally Nov 07 20:43:43 I was actually wondering how you could write a software EQ for android...is it possible? Nov 07 20:44:14 i'm sure you could, but not with the SDK Nov 07 20:44:21 right Nov 07 20:46:24 i'm trying to look into this now to confirm Nov 07 20:46:40 i'll be disappointed if i can't get higher quality audio output out of this thing Nov 07 20:47:03 When did they say A2DP was coming? 2009? Nov 07 21:04:43 well, interesting. I made "hello, segfault" to test gdbserver on the emulator with. It seems that instead of throwing segfault, it just terminates. Nov 07 21:05:41 I want to scroll a text view to the bottom Nov 07 21:05:42 it also returns 0. Nov 07 21:05:57 text.getLineCoutn() returns how many lines are in the view Nov 07 21:06:03 can anyone make a statically linked exe that segfaults and makes anything interesting happen? :) Nov 07 21:06:16 so it is text.scrolllTo(0, line count * height)? Nov 07 21:06:23 or are these physical coordinates rather than logical/ Nov 07 21:07:44 sigh, or, it's because I didn't actually recompile with arm-eabi-gcc. Nov 07 21:10:52 Interesting in the sense of what, a core? If you set the working directory right and fix the ulimit, my guess is it should work. Nov 07 21:10:53 I now have some corrupted prefs on the device... Nov 07 21:11:06 do I have to programatically fix it, or is there other way to clear the pers? Nov 07 21:13:04 interesting in the sense of saying "oh noes I segfaulted" Nov 07 21:13:14 it was because I didn't recompile what I changed using arm-eabi-gcc Nov 07 21:13:26 I just made a lib to test on my linux machine to see if it segfaulted Nov 07 21:13:36 so, I was wondering "why the hell won't this segfault" when it was an old bin :P Nov 07 21:13:52 also strange is how gdb seems to like looping functions when stepping Nov 07 21:15:57 tauno: both Nov 07 21:18:19 vol: Yeah, the standard "source file is newer than executable" warning doesn't work too well across a link. Nov 07 21:19:25 anyone know how to programatically scroll a text view? Nov 07 21:21:14 call scrollBy() or scrollTo() Nov 07 21:21:41 on the view, or the scroll view? Nov 07 21:21:54 I want the text view to scroll to the bottom of the text Nov 07 21:22:06 ie: tail -f type stuff :) Nov 07 21:22:14 on the scrollview Nov 07 21:22:22 that is, if your scrollview has a height of wrap_content Nov 07 21:22:35 it does not, it has a layout_weight Nov 07 21:22:43 and height of 0dip Nov 07 21:23:01 then that won't work Nov 07 21:23:08 this means nothing in a scrollview btw Nov 07 21:23:29 ? Nov 07 21:23:34 the layout looks correct Nov 07 21:23:45 or is that an accident? Nov 07 21:24:04 just use wrap_content and no weight Nov 07 21:24:50 I guess I'd need to wrap that in a view or something to make sure things layout correctly then Nov 07 21:25:04 no, there no need to Nov 07 21:25:22 where will the layout height come from then? Nov 07 21:25:42 I just said it, wrap_content Nov 07 21:25:51 that way your textview will grow as you add text to it Nov 07 21:26:00 which means you'll then be able to scroll the scrollview Nov 07 21:26:02 I want it to be fixed sized Nov 07 21:26:05 ie: Nov 07 21:26:08 its like a log viewed Nov 07 21:26:11 viewer Nov 07 21:26:20 there is a text view, say 90% of teh screen Nov 07 21:26:21 you make the scrollview fixed size Nov 07 21:26:28 but the content of the scrollview must not be Nov 07 21:26:30 and then a row of buttons at the bottom Nov 07 21:26:30 otherwise it won't scroll Nov 07 21:26:51 I'm confused... currently it does scroll manually, just not programatically Nov 07 21:28:40 romainguy_: hmm, do you recall the other day when i was wondering about the permission for LISTEN_CALL_STATE? Nov 07 21:28:55 i forgot to add the permission READ_PHONE_STATE and it still seemed to work? Nov 07 21:29:19 I have no idea :) Nov 07 21:29:35 * jasta writes up a quick test Nov 07 21:29:49 this would be a pretty huge failure of the permission system if this turns out to be possible without special permission Nov 07 21:30:40 romainguy_, great! Do you know if there's a workaround for setting the divider color? :) Nov 07 21:31:00 tauno: yes, use a 9-patch instead Nov 07 21:31:37 can this be set from the xml or does it work in code as is the case with colors? Nov 07 21:31:44 both Nov 07 21:31:50 romainguy_, thanks again! :) Nov 07 21:32:36 np, sorry for the inconvenience Nov 07 21:32:38 ok, it now scrolls programatically... I was calling on the text view, not the scroll view. Nov 07 21:32:53 the only thing I have to figure out now is where to scroll too Nov 07 21:32:58 line coutn * height isn't correct Nov 07 21:33:24 note that if you add stuff line by line you could use a ListView instead Nov 07 21:33:32 it has a special "transcript" mode that does all that for you Nov 07 21:33:44 does it wrap the lines? Nov 07 21:33:50 yes Nov 07 21:34:06 ok, I'll look at the list view anyway, thanks! Nov 07 21:44:00 I wrote the text wrapping for one of my custom items.. wonder if I should have used TextViews there instead. Nov 07 21:44:59 romainguy_ turns out freenode doesn't require ident Nov 07 21:45:05 i've got it running on the g1 Nov 07 21:45:21 Now I also want automatic link handling in this view (in some parts of it at least).. managed to get it automatically color the right parts of the text but implementing touch/key-navigation handling will kill me I guess :/ Nov 07 21:47:13 LinkMovementMethod accepts only TextViews.. so can't use this direclty Nov 07 21:53:52 just curious - can I spit out Views with different sizes in a custom ListAdapter? Nov 07 21:54:10 I mean totally different heights :P Nov 07 21:54:47 yes, of course Nov 07 21:55:01 ok, never tried it myself :) Nov 07 21:55:13 but do realize that your UI will probably be terrible if your list doesn't actually look much like a list but rather just a smattering of unrelated widgets Nov 07 21:55:42 emm.. no.. it will look something like.. Nov 07 21:55:45 in most of my apps, i intentionally restrict the height because it looks nicer and is easier to use. Nov 07 21:56:19 that and also it makes ListView's job harder Nov 07 21:56:21 er... yeah.. basically I have a repeating pattern that has a header and then some 1-n lines of text.. Nov 07 21:56:24 and the scrollbar will look like crap :)) Nov 07 21:56:40 (we have a fix, but it still doesn't look as nice as with items of same height) Nov 07 21:56:44 currently I use a custom view that's wrapped in a scrollview.. Nov 07 21:57:08 and it looks nice.. but I have the problem that I cant autolink text.. Nov 07 21:57:20 wrapping etc is done.. link coloring also.. Nov 07 21:57:33 but link navigation inside it etc looks like too much effort Nov 07 21:58:36 now the option would be to use a ListView and an adapter that spits out the different views that are composed of the custom header and then a n+1 line TextView.. Nov 07 21:59:11 and disable selection color in the ListView :P Nov 07 21:59:29 but I don't know how it will work out :/õ Nov 07 22:02:28 romainguy_ whats should I call in my custom view to indicate to the outer ScrollView that the height has changed and it needs to shrink the scrollbar? Nov 07 22:04:15 requestLayout() will force a layout Nov 07 22:06:53 I do this but at some point the scrollbar height does not chane anymore until I try to scroll manually Nov 07 22:08:37 the height changes rapidly so I call requestLayout() quite often (it can be a few times per second even..) Nov 07 22:10:47 don't know if that matters.. Nov 07 22:11:54 will make a test app tomorrow to see if I'm doing something wrong (I guess I am..) or it's something more general Nov 07 22:12:11 well without seeing your code it's hard to say Nov 07 22:16:46 don't you think that would be a really difficult progrma to use if the height of clickable widgets changes a few times a second? Nov 07 22:36:34 Anyone familiar with the HttpCLient in Android? Nov 07 22:37:00 I use the same code in 'normal'-Java and it works, where 'Android'-Java produces a: Nov 07 22:37:02 HTTP Error 504 - Gateway timeout Nov 07 22:38:18 the only thing I can imagine is different lib-versions :( Nov 07 22:39:27 or maybe a carrier probem ?? Nov 07 22:41:44 ok it doesn't happen on 3G (was on EDGE before) Nov 07 22:47:52 plusminus_: slow connection? Nov 07 22:48:22 hm don't think so Nov 07 22:48:31 had the timeout to 120sec Nov 07 22:48:45 Hrm... holding down key repeat produces repeated onKeyDown() calls without matching onKeyUp()s, but does *not* produce onkeyMultiple(). Is that a bug, or am I confused? Is there a flag I need to set somewhere? How to i tell a synthesized down from a real one? Nov 07 23:01:51 Another event question: MotionEvents seem to report precision values that are always zero. The docs say I'm supposed to "multiply them with the X/Y coordinates to get the actual hardware value of the coordinate", but X and Y seem to be pixel coordinates already. Nov 07 23:04:48 And a third: Trackball events dont' make a lot of sense to me. They sorta seem like a bounded "joystick-like" space in the range [-1:1] (the precision value exists here, oddly). But you only get events when the ball hits the "edge" of the box after a good bit of scrolling. What's the intent? **** ENDING LOGGING AT Sat Nov 08 03:00:02 2008