**** BEGIN LOGGING AT Tue Dec 30 02:59:56 2008 Dec 30 03:04:31 ph|ber, what's cupcake? Dec 30 03:23:45 * savid looks up cupcake Dec 30 03:24:33 Wow. Is cupcake going to merged back into the main android development tree? (ie, are we going to see it in a future update)? Dec 30 03:42:46 word on the street it is still actively being worked on Dec 30 03:45:52 Quick question (hopefully): I have a ListView in my app, and each item in the listview is a RelativeLayout with two text boxes and a checkbox. How do I make the entire row item selectable? Dec 30 03:46:07 s/text boxes/textviews/ Dec 30 03:47:15 savid: cupcake is already merged into master. Dec 30 03:47:28 jasta, cool :) Dec 30 03:47:37 savid: it already is. the relativelayout will get the selected property, not your children. Dec 30 03:47:46 if ti doesnt draw correctly, its because you screwed up the background somehow ;) Dec 30 03:50:18 jasta, here's my layout: http://pastebin.com/m467b8a28 Dec 30 03:50:23 (for the list item) Dec 30 03:50:54 Not sure if I'm missing a property or something Dec 30 03:51:00 why are you using RelativeLayout? this can be accomplished more correctly using a LinearLayout Dec 30 03:51:13 [passive observation, nothing to do with your problem] Dec 30 03:51:31 jasta, I wasn't able to get the checkbox aligned to the right w/ relative... Dec 30 03:51:55 nothing looks wrong with this that would prevent the outer-most layout from being shown as selected. that said, clicking the checkbox will not click the row, it'll click the checkbox of course Dec 30 03:52:03 savid: that's because you didnt use the weight property of LinearLayout. Dec 30 03:52:23 jasta, this was my attempt at LinearLayout: http://pastebin.com/m38398170 Dec 30 03:53:30 am i correct in understanding that this looks like a two columns, the right column being only the checkbox, and the left column being two rows high with two text boxes stacked on top of each other? Dec 30 03:53:31 jasta, is there an advantage to using linearlayout vs. relativelayout? Dec 30 03:54:11 jasta, yeah, just basically duplicating what the settings screens look like Dec 30 03:54:18 savid: yes, with your code the textviews will bleed into the checkbox if the text is too long Dec 30 03:54:25 ah Dec 30 03:54:31 with linearlayout and weight, they would not. Dec 30 03:54:36 I'll try it w/ linearlayout Dec 30 03:54:39 and weight Dec 30 03:54:42 also, LinearLayout is much simpler, and there is no reason to avoid it :) Dec 30 03:54:49 anyway, to do it iwth linearlayout you would use: Dec 30 03:55:59 Dec 30 03:56:22 although that said, the settings screen is using a standard widget introduced in the 1.0 sdk Dec 30 03:57:06 look up PreferenceActivity Dec 30 03:58:17 to expand upon weight, what it does is allow children of the LinearLayout to grow to take up "leftover" space. in this case, you are using width=0 weight=1 to say "calculate all the children except this one, then set this one's width to the remainder of space." thus allowing the CheckBox to neatly fit along the right side, with the textviews taking up the rest of the space. Dec 30 03:58:46 more advanced usage of weight would be to, for instance, have two textviews fill exactly half of the available space, each would use width=0 weight=1. Dec 30 03:59:34 the weight affects only the dimension of the layouts orientation, however. so a linearlayout laid out vertically, weight affects height and so you would then set height=0. setting the dimension's value to 0 is merely an optimization asking linearlayout not to bother computing its size because it doesn't matter: it will just grow as big as possible. Dec 30 04:00:32 jasta: how long did you spend on just the design / UI side of five? Dec 30 04:00:40 jasta, is it layout_width=0 or just width=0? either way, I'm getting "integer types not allowed" Dec 30 04:01:09 unix_infidel: very little. most of the work went into the server, sync process, and building a working and efficient streaming media framework atop the broken MediaPlayer. Dec 30 04:01:29 savid: i was shorthanding a _LOT_ in that code snippet. i literally meant android:layout_width="0px" Dec 30 04:01:30 jasta: when's a stable 1.0 due out? Dec 30 04:01:39 unix_infidel: i'm hoping for late feb/early mar Dec 30 04:01:40 just the player. Dec 30 04:01:49 what do you mean just the player? Dec 30 04:01:52 heh, I figured as much :) forgot the px part Dec 30 04:02:05 jasta: is five usable as just a local media / music playback app? Dec 30 04:02:30 it could be made to be, but if that's what you want why wouldn't you just use another media player like the builtin one or tunewiki? Dec 30 04:02:46 jasta, thanks for explaining that, btw. It makes much more sense now :) Dec 30 04:02:46 jasta: because five is better designed? Dec 30 04:03:08 unix_infidel: well, i'm flattered, but currently no it must stream the content. Dec 30 04:03:25 it is on my list of things to do to allow you to just bulk copy in music and have it absorb it Dec 30 04:03:38 what's this "five" you guys are talking about? Dec 30 04:03:46 but that is not really for your purposes, but more so that folks with expensive or unreliable data can still use it. Dec 30 04:03:54 http://code.google.com/p/five/ Dec 30 04:04:14 oh gosh, i'm embarrassed i haven't updated those screenshots Dec 30 04:04:26 nice Dec 30 04:04:28 it looks much different these days :) Dec 30 04:04:41 jasta: heh, inquiring eyes want to know ;-) Dec 30 04:04:56 hang on, i will get some screenshots :) Dec 30 04:08:02 been a long time since ive used this on the emu hehe. i do most of my dev directly on the g1 now :) Dec 30 04:09:32 i'll get back to you on that request :) Dec 30 04:09:40 i gotta sync it from scratch on the emu hehe Dec 30 04:23:00 jasta, now this is odd, I've updated the layout for my listview row (http://pastebin.com/m463d1c85), and it seems to look fine in the eclipse layout designer, but when I run the app the checkboxes are still flush left.. Dec 30 04:23:10 yo jasta Dec 30 04:24:25 sup dude, you left seattle already? Dec 30 04:25:13 savid: your outer-most layout should explicitly set orientation. Dec 30 04:25:34 doh Dec 30 04:25:56 I guess I assumed it defaulted to horiz Dec 30 04:28:26 hmm, changed it (http://pastebin.com/m2dee9d20), still didn't seem to fix it. Dec 30 04:30:27 can you show me what it looks like on screen? i see no immediate problems with your layout. Dec 30 04:30:37 sure, one sec... Dec 30 04:31:40 btw i hope you do consider just using the PreferencesActivity if thats what you want :) Dec 30 04:33:39 http://i44.tinypic.com/oaaqsj.png Dec 30 04:33:50 Yeah, I might just end up doing that :) Dec 30 04:34:59 Though I'd to learn more about layouts atm Dec 30 04:35:08 can you describe more about how that dialog was constructed? Dec 30 04:35:25 sure, I'll grab the activity source Dec 30 04:35:40 it is possible to make the layouts weight system break by having its parent force a wrap_content width (then layout will determine that there is no "leftover" space to expand into) Dec 30 04:37:20 here's the oncreate http://pastebin.com/m174706e6 Dec 30 04:37:54 jasta: those dont look like new screenshots. Dec 30 04:38:00 in the meantime, I'm going to take a look at PreferencesActivity :) (though it's going to kill me to not know what was going on with my previous attempt at a layout) Dec 30 04:38:06 unix_infidel: hehe :) Dec 30 04:38:42 savid: and i assume ive been looking at available_settings_row? Dec 30 04:39:30 jasta, yes Dec 30 04:41:21 ;-) Dec 30 04:41:35 savid: is this code small enough that you could package it all up for me as a demo? i am also curious why this is not working. Dec 30 04:41:53 could i also see available_settings in the mean time? Dec 30 04:42:26 jasta, heh, ok. but remember, this is my first app :-) (not to mention my first stab at java) Dec 30 04:42:42 i just want to be able to experiment with it and debug what is happening. i'm curious :) Dec 30 04:42:53 it is definitely something to do with a parent's layout being totally wrong Dec 30 04:43:00 but im not immediately sure where that would be Dec 30 04:45:39 hmm, I just realized my ListView has a layout_width="wrap_content"... I wonder if that's it Dec 30 04:45:45 bingo :) Dec 30 04:46:06 Hah! Dec 30 04:46:08 yup that was it Dec 30 04:46:15 not sure why I didn't think to check it Dec 30 04:46:23 Oh well, glad I learned something. Dec 30 04:46:28 as i said, weight only works when there is actually space leftover. your parent's layout said that there wasn't any. Dec 30 04:46:42 Now it's time to trash the whole thing for PreferenceActivity Dec 30 04:46:45 :-) Dec 30 04:46:52 thanks a bunch for the help! Dec 30 04:47:04 i stronlgy advise you to think about using a LinearLayout first, moving into another only when LinearLayout clearly doesn't fit. Dec 30 04:47:18 i have written entire non-trivial apps exclusively with LinearLayout and FrameLayout Dec 30 04:47:40 jasta, I'll keep that in mind from now on. thanks Dec 30 04:47:51 most of the other layouts are just derivatives of those two layouts for specialized purposes. and while they have value, they are not commonly needed. Dec 30 04:49:05 RelativeLayout is more or less an optimization for certian very specialized layouts. In most cases, using it as a first resort will result in terrible bugs creeping into your designs. Dec 30 04:51:54 good to know Dec 30 05:42:19 unix_infidel: you there? Dec 30 05:56:28 Hi, see this pic http://i43.tinypic.com/jrrako.png anyone has any suggest ? I write persian and use persian font but chars split Dec 30 06:08:37 jasta: shoot. Dec 30 06:09:01 jasta: nice shots. Dec 30 06:09:37 yeah i just finished uploading them (i changed a few if you looked a second ago hehe) Dec 30 06:10:42 they look ssome margin less spectacular than the old ones, but of course on a real handset it looks much nicer Dec 30 06:10:49 i refined things for that purpose Dec 30 13:23:03 I want to switch from one View to another in the handleMessage() method and tried several ways: http://rafb.net/p/FwQ3lK81.html What happens is that the first View disappears and leaves a black screen. What am I doing wrong? Dec 30 18:43:54 hello Dec 30 18:43:56 does anyone know if skydrive has an official CRUD api? Dec 30 19:16:07 can anyone here recommend a company with experience developing android apps? i want to outsource, but googling turns up mostly junk Dec 30 19:17:04 i have experience Dec 30 19:17:05 :) Dec 30 19:17:10 id like to quit my job too Dec 30 19:17:22 I'm a native english speaker from the US Dec 30 19:19:52 blau-MikeDG: based on the rather short time-frame, i don't think a single developer could deliver on time... Dec 30 19:20:08 perhaps i'm wrong, though. i'm putting together a rough spec Dec 30 19:21:03 you can try one of those rent a coder-like sites Dec 30 19:21:39 theres usually software dev teams there, but a lot of the time they are not native english speakers, and are just mainly coders Dec 30 19:22:43 adammck, most of the groups with android experience, are already engrossed with their own projects. You would be better off assembling individual coders in to a workgroup for your project if you don't want your work to be their 2nd best. Dec 30 19:22:57 blau-MikeDG: yeah, i'm hesitant to use those, for fear of ending up with clowns Dec 30 19:24:13 adammck, some of the coders in #android on freenode know of/help eachother on their individual side projects, and may make a better team than one you would find within a limited time frame. Dec 30 19:24:30 I'm not including myself, I'm not a coder :) Dec 30 19:24:37 languish: i suspect you may be right, i'll look into that. thanks! Dec 30 19:24:38 I just herd my own cats. Dec 30 19:24:49 np, and good luck Dec 30 19:26:28 yeah ask #android for some help, if its a compelling project you should do good there Dec 30 21:06:06 Is there any way to create a package that contains code that is shared amongst several applications? Dec 30 21:18:05 Nafai, im sure there is because i've seen it mentioend in the docs, there's also a couple packages in git like the google services that im sure a couple diff apps use Dec 30 21:18:07 Nafai: depends on how you mean by shared. Dec 30 21:19:06 you can create services which share an instance of the code or you can create jar files which share the code itself but not the instance and not necessarily any runtime savings Dec 30 22:02:35 Hrm, can I define a View in layout XML and also attach to it, so-to-speak, programatically as a class instance and update it? That is, I have a layout that contains a View that I hope to have some custom graphics inside. The way the examples use is to programatically create a View and "setContentView(viewInstance)" in the activity. But, my root should be a LinearLayout that contains my custom view. Dec 30 22:03:32 I hope I'm missing something obvious. Dec 30 22:05:02 CardinalFang: either your question is very basic, or it is confusing me: do you mean findView()? Dec 30 22:05:14 findViewById()? Dec 30 22:05:43 pjv, That gives me a view instance, right? Dec 30 22:05:56 yeah Dec 30 22:05:59 pjv, But, not an instance of my custom class. Dec 30 22:07:03 ah I see Dec 30 22:07:11 I need to override onPaint(0 ant all that.... Dec 30 22:07:21 put a View in the xml and then use code to fill that in to a specific CustomView Dec 30 22:07:28 ? Dec 30 22:07:53 Eh, that's what I'm asking. "fill that in"? Dec 30 22:08:38 sorry, can't help you there, but we used to (1y ago) do a trick with a MapView/MapActivity like that I think Dec 30 22:08:49 Huh. Dec 30 22:09:07 there was a bug where you couldn't put "MapView" in the xml I think, so it needed to be added in another way Dec 30 22:09:26 perhaps that's already the setContentView() you mentioned Dec 30 22:09:42 sorry, not my field Dec 30 22:10:50 hm, I think setContentView() really only is for layouts Dec 30 22:13:11 jasta: My main concern is just shared code. I've got it working so I can write Android apps with Clojure (with the help of Rich Hickey), but the addition of the Clojure jar to my app balloons a small hello world app to 2 MB Dec 30 22:13:20 I'm sure most of that is the Clojure runtime Dec 30 22:13:30 I'm not as worried about the runtime memory usage, just the storage Dec 30 22:13:38 CardinalFang: this might not help you after all: http://groups.google.com/group/android-developers/browse_thread/thread/f20af021ab92fbe6/e3d7d74ed1e7bdfc Dec 30 22:13:55 they basically were doing: but you needed something dynamic, right? Or do you have a class ready? Dec 30 22:15:24 Nafai, ooh, sexy! I love Lisp, but I'm rubbish at thinking about making applications with it -- the scale breaks my brANe!! Dec 30 22:15:37 CardinalFang: Heh :) Dec 30 22:17:12 pjv, I've pretty much decided I have to rip out the View from the XML and use View.addView(instanceOfCustomClass) . Dec 30 22:18:04 well, good luck Dec 30 22:18:15 Nafai, You have that documented somewhere, I hope, the steps to get Clojure running? Blog that bitch! Dec 30 22:19:18 CardinalFang: I will blog it, but it is documented here with a minimal example: http://github.com/Nafai77/helloandroid/tree/master Dec 30 22:19:38 have a question of my own actually: How can I get multiple TextSwitchers in the same Activity? There's a setFactory() method. Is that necessary or can I just put TextViews as children in TextSwitchers in my xml? Dec 30 22:20:50 get it done easily that is Dec 30 22:35:47 pjv, FWIW, "class" isn't an XML attribute of View. At least, not now. Dec 30 22:37:27 Probably was removed. I thought you were set on the addView method? Dec 30 22:37:37 Yeah, I am. Dec 30 22:41:36 ViewGroup.addView(). Hrm. Dec 30 22:45:06 so, from lat/long to get x/y args for Draw, you need new PointF(projection.toPixels(new GeoPoint(lat, long))? Wondering why Projection can't give you float co-ords. Dec 30 22:46:05 (drawing on a MapView of course) Dec 30 22:51:08 ugh, I can't seem to add a TextView as a child to a TextSwitcher in my xml and then do setText(), am I missing something stupid here? Dec 30 23:35:43 hi all, I'm looking for any news about Android on Treos, specifically the 755p. I've seen the two main threads about it on a-internals and a-porting, but I'm wondering if anyone is currently working on a port. Dec 30 23:36:23 pjv: you need 2 children, both TextView's. your best bet would be to use a factory (setFactory(...)) that just makes TextViews how you want. Dec 30 23:36:28 then use settext and youll be fine Dec 30 23:36:41 donspaulding: you are in the wrong place. Dec 30 23:36:57 ask in #android, or better yet, on the android-* google groups with the thread you've been reading. Dec 30 23:37:08 jasta: oh right, I need 2! thanks Dec 30 23:37:55 jasta: ah, reading the title over again makes more sense now Dec 30 23:38:06 jasta: thanks. Dec 30 23:38:49 still a bit silly, I'll submit an issue for the lacking documentation Dec 30 23:40:53 pjv: well, the ViewSwitcher documents this better. Dec 30 23:41:03 they should just point you to the superclass docs :) Dec 30 23:41:24 I've even read that, and still not realised Dec 30 23:41:49 really? the ViewSwitcher's description tells you quite clearly it switches between two views. and that it can only have 2. Dec 30 23:42:28 a TextSwitcher is just a ViewSwitcher with a couple of convenience methods so you dont have to call setText and showNext yourself Dec 30 23:42:40 well... thought TextSwitcher was a different implementation in that had only one TextView Dec 30 23:42:59 yeah...I admit it's partly my mistake as well Dec 30 23:44:34 weird that it didn't throw a specific error or something Dec 30 23:44:35 shame on you, the source is available and it's only 90 lines long :) Dec 30 23:45:36 I was busy looking at the source (briefly) just now! can you imagine that? it still escaped me Dec 30 23:45:57 didn't look at getNext Vie() yet though Dec 30 23:46:04 *getNextView() Dec 30 23:47:51 anyways, much obliged Dec 30 23:49:02 and I suppose everyone now and then has something they really don't see, and their limits of how far they'll dig (Android source is near limits for me, I'm only do app development) :-) Dec 30 23:49:17 *I only Dec 30 23:51:31 also, it's much later here Dec 31 00:46:24 Is there a list of android stock drawables? (ie, for icons / buttons /etc..)? Dec 31 00:50:01 jasta: So what do I need to do to share a jar (essentially) between apk's? Dec 31 01:24:11 * savid found icons in android/frameworks/base/core/res/res/drawable Dec 31 01:44:05 Nafai: as i said it doesnt share an instance or any runtime resources. Dec 31 02:05:17 Is it possible to make a Button w/ an icon instead of text? I don't want an image _as_ a button, just a small image in the middle of the button Dec 31 02:24:02 savid: yeah, just style the background of the ImageButton with the same drawable as the Button. Dec 31 02:24:17 id ont know what that is, and i have to run, but with the source just look at the styles.xml and find the style the Button uses. Dec 31 02:24:32 ok, thanks :) **** ENDING LOGGING AT Wed Dec 31 02:59:58 2008