**** BEGIN LOGGING AT Mon Nov 17 02:59:57 2008 Nov 17 10:01:09 what is the secret to TableLayouts? Nov 17 10:01:26 In this bit of code: http://pastebin.com/m30a2aaa3 Nov 17 10:01:41 the "secret"? Nov 17 10:01:49 Search is a LinearLayout which displays fine if I setContentView() on it Nov 17 10:02:04 but I see nothing if I add it in a simple table layout Nov 17 10:02:24 jasta, I say secret because it seems to work in xml but not in java for me Nov 17 10:02:36 uhh, what the hell is this gibberish? Nov 17 10:02:50 a small test case Nov 17 10:02:53 you don't set any layout parameters or anything? Nov 17 10:02:55 whats wrong with it Nov 17 10:03:07 Im setting layoutparameters inside Search Nov 17 10:03:22 I also was setting them in the TableLayout but it seemed to make no difference Nov 17 10:03:38 well, where does ll get added to? Nov 17 10:04:08 the bottom row. Nov 17 10:04:21 not in that example? Nov 17 10:04:44 Its commented out on line 22 Nov 17 10:04:50 here, all i see is that you will have a TableLayout with no layout parameters with 1 row which has 1 view (sv) Nov 17 10:04:59 which makes absolutely no sense to do Nov 17 10:05:08 btw, why are you not using XML for this? Nov 17 10:05:14 right im just trying to get the simplest case working Nov 17 10:05:15 it makes things much clearer. Nov 17 10:05:32 Ive been trying to avoid xml because it crashes my eclipse Nov 17 10:05:37 and no autocomplete Nov 17 10:05:52 that's your honest reasoning? Nov 17 10:06:01 yes :) Nov 17 10:06:12 you're going to compromise your projects maintainability because of that? open fucking vim and make the layouts then. Nov 17 10:06:52 i dont see how xml offers any advantages but I dont want to open up that can of worms Nov 17 10:07:16 anyway, without seeing more of your code i cannot say. what you have here "looks correct", although appears pointless. Nov 17 10:08:04 your layout parameters matter a great deal, but you have not shown them, so... Nov 17 10:08:24 if you could produce a simple test case that you can package in full, i could probably be much more helpful Nov 17 10:08:28 ok well I did a this.setLayoutParams(FILL,FILL) on tableLayout. (which now has 2 rows uncommented) Nov 17 10:08:46 zhobbs: About trusting Intents, check my post on google mailinglist: http://groups.google.com/group/android-framework/t/4f3ff82434d252d0 Nov 17 10:09:11 it whacks the scrollView (which is what ll is holding) to the far left and the Search autocomplete that is "sv=new Search()" is still nowhere to be found Nov 17 10:09:33 So to be clearer, Favorites is a ScrollView containing a list of buttons Nov 17 10:09:52 Search is a simple LinearLayout containing an autocomplete box Nov 17 10:11:45 and Search has what layout parameters for itself and its children? Nov 17 10:12:02 (this is why XML improves maintainability, by the way, you could just show me a small set of files and i could see precisely what is going on) Nov 17 10:12:27 ah ok 1 sec Nov 17 10:12:30 still, you could reveal the full source code of a simple test and we could proceed much more efficiently Nov 17 10:14:23 i need to go to bed soon :) Nov 17 10:14:35 ok will be fast :) Nov 17 10:14:52 first file: http://pastebin.com/d3518d131 Nov 17 10:15:45 uhm, ok Nov 17 10:15:51 so you don't use layout parameters on findtv or actv? Nov 17 10:16:07 hi can any one help me out in getting a better understanding of Userspace Hardware abstraction layer? Nov 17 10:16:09 no should I? Nov 17 10:16:23 that depends, the default i think is WRAP_CONTENT, WRAP_CONTENT Nov 17 10:16:26 is that what you intend? Nov 17 10:16:35 (my guess is no) Nov 17 10:16:36 http://pastebin.com/d7f1980fd Nov 17 10:17:32 uhm, im not sure tbh. Nov 17 10:17:40 now that i think about it, i'm not sure there really is a default. you should be explicitly setting the layout params always Nov 17 10:17:43 for every view Nov 17 10:17:54 ok Nov 17 10:17:56 i believe the XML approach forces you to do this Nov 17 10:18:28 can anyone help me out? Nov 17 10:18:30 please Nov 17 10:18:35 also, i'm betting you don't understand what FILL_PARENT really does Nov 17 10:18:48 where is the userspace code written? Nov 17 10:18:58 ding...we have a winner Nov 17 10:19:10 i think I do but I could easily be confused Nov 17 10:19:54 for instance if you packed findtv and actv with height=FILL_PARENT, you would get an undesirable effect. do you realize that? Nov 17 10:20:17 not that you would in this case, i'm just mentioning it as an example Nov 17 10:20:19 yes I thought that if something is fill_parent its the dominant widget Nov 17 10:20:32 i was planning to port the android on the real hardware but got stuck with this userspace HAL, i need a more detailed understanding on it Nov 17 10:20:34 is that right ? Nov 17 10:20:36 in what sense? initially, that sounds wrong but i dont know what you mean exactly Nov 17 10:20:47 like it will squish everything else down Nov 17 10:20:52 to its smalles size Nov 17 10:20:59 FILL_PARENT merely means to explicitly set the dimension equal to the value of its immediate parent. Nov 17 10:21:02 no, absolutely not. Nov 17 10:21:06 yes to its smallest size Nov 17 10:21:09 weight is used to do that, most certainly not FILL_PARENT Nov 17 10:21:13 for instance Nov 17 10:21:18 for instance Nov 17 10:21:46 ah ok. I got you Nov 17 10:21:49 Nov 17 10:22:00 will NOT draw two TextView's of equal width on the same row. Nov 17 10:22:12 yeah i got you ll NOT draw two TextView's of equal width on the same row. Nov 17 10:22:16 each TextView will be exactly as wide as its parent, meaning one will get clobbered and all screwed up Nov 17 10:22:18 also, i'm betting you don't understand what FILL_PARENT really does Nov 17 10:22:25 FILL_PARENT merely means to explicitly set the dimension equal to the value of its immediate parent. Nov 17 10:22:32 what the hell? Nov 17 10:22:32 each TextView will be exactly as wide as its parent, meaning one will get clobbered and all screwed up Nov 17 10:22:39 weight is used to do that, most certainly not FILL_PARENT Nov 17 10:22:44 anyway Nov 17 10:22:58 for instance if you packed findtv and actv with height=FILL_PARENT, you would get an undesirable effect. do you realize that? Nov 17 10:23:06 gambler_: in my example, Nov 17 10:23:14 would be the correct way to have two textviews of equal width next to each other Nov 17 10:23:26 gambler_: in my example, Nov 17 10:23:39 ould be the correct way to have two textviews of equal width next to each other Nov 17 10:23:40 FILL_PARENT is poorly named if you ask me, it should really be called SET_PARENT Nov 17 10:23:45 ILL_PARENT is poorly named if you ask me, it should really be called SET_PARENT Nov 17 10:23:52 because it means to literally set the value of that dimension equal to the parent's value for that dimension, whatever that is Nov 17 10:24:01 no special consideration is done for other children Nov 17 10:24:02 because it means to literally set the value of that dimension equal to the parent's value for that dimension, whatever that is Nov 17 10:24:08 LinearLayout's weight is used for that. Nov 17 10:24:30 anyway, explicitly set layout params on all of the widgets you pack. i'm sure this will help you understand your problem. Nov 17 10:24:36 and also, pay attention to your usage of FILL_PARENT Nov 17 10:25:18 damn I think I was going to kick someone for the 1st time Nov 17 10:25:26 i already ignored that guy Nov 17 10:25:31 and im such a relentless free speech advocate Nov 17 10:26:06 ok 1 sec im grepping this convo Nov 17 10:27:02 and, i earnestly encourage you to reconsider XML layouts. Nov 17 10:27:44 ok thanks for the info. i see now that weight is what I need Nov 17 10:28:09 xml evil! fire good Nov 17 10:33:43 good night Nov 17 12:34:43 in android there is kernel folder which contains the linux kernel and we can create the kernel image by executing the make file inside the kernel folder.once the image is created we can port the kernel image to memory of the hardware and boot from there Nov 17 12:34:46 but my doubt is there are many things lying outside this kernel folder like video codecs , java apllications etc , how we will port all those stuffs on the hardware Nov 17 12:34:48 ? Nov 17 12:35:07 And if i wanna write a driver for a specific hardware how i am going to make it work in case of android? Nov 17 12:51:43 ListView is buggy -> can't scroll up using trackball when viewing an app on the Market for example :( Nov 17 13:55:50 romainguy__ you have nothing to do with paint.measureText()? :) Nov 17 16:45:35 can I hook teh back key? Nov 17 16:46:36 sure you can Nov 17 16:47:39 how? :) Nov 17 16:48:51 ok, onKeyDown I guess Nov 17 16:50:09 or onKeyUp and from there just check if keyCode == KeyEvent.KEYCODE_BACK and do what you want Nov 17 16:50:09 duncanfoo: correct, if (keyCode == KeyEvent.KEYCODE_BACK) ;) Nov 17 16:51:18 yup, perfect :) thanks Nov 17 20:19:04 I'm trying to start a service in my own application Nov 17 20:19:10 except I'm getting "not found" Nov 17 20:19:30 that is when I use an CompoentnName intent. If I use an intent with setClass it works... what am I missing? Nov 17 20:20:01 can you please show us how you are using it? Nov 17 20:20:59 I did: Intent i = new Intent(); i.setComponent(new ComponentName("com.foo.monitor", "MonitorService")); startService(i); from with onCreate of an activity. that fails. Nov 17 20:21:15 hwoever, i.setClass(getApplicationContext(), MonitorService.class); succeeds Nov 17 20:21:37 duncanfoo: you have to repeat the package name in the second strin Nov 17 20:21:38 string Nov 17 20:21:48 the first string is the package name of the app Nov 17 20:21:56 the second string is the fully qualified name of the activity inside that app Nov 17 20:22:11 so the package name in the first and the second strings can be different Nov 17 20:22:35 ok, perfect! that works. thanks! Nov 17 20:23:14 is there a reason I would package the service in a separate bundle? Nov 17 20:23:26 or is it better to package it all inside the same application/project? Nov 17 20:24:15 in a separate apk? yes, there are reasons, but given the apk formats lack of dependency management, i would recommend putting it in the same apk Nov 17 20:24:50 otherwise users will need to perform two separate installations to get your app loaded. my app is currently built this way but i intend to merge it for 1.0 if no dependency management exists by then Nov 17 20:29:28 ok, cool. **** ENDING LOGGING AT Tue Nov 18 02:59:56 2008