IRC log for #android on 20080302

00:01.48jastabut you could add them dynamically by using addView
00:01.56jastaand you can remove them with, uhm, removeChild i think?
00:01.59jastalook at the documentation.
00:18.53*** join/#android trigatch4 (n=chatzill@static-66-16-244-12.dsl.cavtel.net)
00:20.22*** part/#android der_maddi1 (n=der_madd@dslb-088-067-235-162.pools.arcor-ip.net)
00:28.00jastamaybe setOnClickListener doesn't do what I think it does.
00:28.56jastaoh duh, textview's aren't clickable :)
00:30.22jastai wish i could see the style definition for a button now ;)
00:37.00f00f-ok jasta so i'll use android:visibility :)
00:37.01f00f-thanks
00:50.58jastaromainguy_: 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?
00:58.04Dan_Ujasta: Try setting focusable to true
01:02.25jastathat did it
01:03.30jastayay, my bar works now!
01:04.51*** join/#android Dan_U (n=Dan@70-41-192-219.cust.wildblue.net)
01:08.10jastasort of annoyingly, though.  setSelection maybe could stand be a bit more flexible ;P
01:14.16romainguy_more flexible than selecting the given position?
01:15.51jastathe idea of positioning the list should be more flexible, at least.  not appropriate for setselection,.
01:15.55jastaerm setselection.
01:16.48jastamy purpose obviously doesn't want to center the separator bar.  it should be at the very top of the list
01:19.28*** join/#android The_PHP_Jedi (n=ThePHPJe@66-50-125-149.prtc.net)
01:21.24jastait'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.
01:22.26jastaperhaps setSelectionFromTop could be useful for that
01:22.56romainguy_we'll see
01:23.15jastai coudl of course just extend ListView and get what i need from it that way
01:23.36romainguy_I don't know if we expose enough to do that from a subclass
01:24.14jastaactually wait, setSelectionFromTop behaves much different than I expected
01:25.03jastasetSelectionFromTop(selectorPos, 0) seems to behave much like I'd want.
01:25.09jastabut I did not expect that ;)
01:28.26romainguy_jasta: the doc is pretty obvious to me though
01:50.49*** join/#android TimRiker (n=timr@rikers.org)
02:07.40*** join/#android icecubed (n=ishan@59.94.115.133)
02:08.16icecubedhi
03:24.52*** join/#android eton (n=eton@ppp-58-8-3-72.revip2.asianet.co.th)
03:46.06*** join/#android jjt001 (n=james@c-98-207-50-162.hsd1.ca.comcast.net)
03:46.19jjt001ello to all
03:46.23jjt001ello to one and all
03:47.05jjt001anyone here?
03:47.11jjt001by and large
03:47.25jjt001viscosity and vehemence to all
03:47.25jastasort of
03:47.40jjt001jasta:you a bot?
03:47.55jjt001jasta: you a bot
03:48.37jastano
03:52.02*** join/#android duey (n=Nick@203.96.223.40)
03:53.12jjt001jasta: ello
03:53.26jjt001jaaaaaaaaaaaaaaaasta:
03:53.28*** join/#android pandora-- (n=pandora-@cpe-76-172-208-63.socal.res.rr.com)
03:53.43jjt001pandora: hello
03:53.55jjt001pandora: quick ques
03:54.33pandora--hey hey
05:02.22*** join/#android dragor43 (n=asdf@pool-151-199-245-93.phil.east.verizon.net)
05:24.25*** join/#android kurzum (n=opera@chello084112021199.32.11.tuwien.teleweb.at)
05:31.16*** join/#android Cybergeek2021 (n=cybergee@d149-67-39-135.col.wideopenwest.com)
05:51.42*** join/#android Dralspire2 (n=dralspir@unaffiliated/dralspire)
06:25.09*** part/#android kurzum (n=opera@chello084112021199.32.11.tuwien.teleweb.at)
06:55.02thedaniel`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):
06:55.06thedaniel`mTitleText = (EditText) findViewById(R.id.title);
06:55.16thedaniel`specifically, the parens around the EditText class
07:05.44*** join/#android jota- (n=jota@190.6.0.180)
07:23.51*** join/#android matt_c (n=mcroydon@137.147.45.66.cm.sunflower.com)
07:38.56*** join/#android Zoolooc (n=fredsiba@nrbg-4dbfa789.pool.einsundeins.de)
08:12.43*** join/#android chaosvoyager (n=Miranda@pool-72-80-180-212.nycmny.fios.verizon.net)
08:20.52*** join/#android davidw (n=davidw@chello212186016224.tirol.surfer.at)
08:45.55*** join/#android LWT001 (n=lwt@121.15.101.61)
08:50.11*** part/#android LWT001 (n=lwt@121.15.101.61)
08:55.54*** join/#android jeddy3 (n=mattiast@81-237-230-160-no83.tbcn.telia.com)
08:57.03*** join/#android mypapit (n=mypapit@pdpc/supporter/active/mypapit)
09:12.05*** join/#android tmarble (n=tmarble@195.65.142.1)
09:25.37*** join/#android illustir (n=alper@s5590818c.adsl.wanadoo.nl)
09:39.11*** join/#android Azalar_ (n=Azalar@cpc2-acto9-0-0-cust415.brnt.cable.ntl.com)
09:41.02*** join/#android danmulvey (n=polx@adsl-68-125-24-255.dsl.irvnca.pacbell.net)
10:09.03*** join/#android acsia (n=acsia@host86-161-118-239.range86-161.btcentralplus.com)
10:25.45*** join/#android [AD]Turbo (n=turbo@host131-128-dynamic.57-82-r.retail.telecomitalia.it)
10:48.57*** join/#android grah (n=grah@58.161.241.86)
11:14.38acsiahas anyone used the IDL ?
11:17.42acsiaI guess I ll wait til the states gets online...
11:29.22mypapitw00f w00f!
11:37.49*** join/#android Mathiasdm (n=Mathias@d54C597B6.access.telenet.be)
11:42.54chaosvoyagerIDL? No.
11:51.10acsiaandroid description language for inter process communication
11:51.41acsiai will probably need it so I am wondering if anybody has played with it yet
11:53.21chaosvoyagerI'm under the impression that it's still buggy as hell, and to be honest I REALLY hope they replace it with something else before Android is released anyway.
11:54.20acsiahow do you know?
11:55.20chaosvoyagerAndroid developer group forum.
11:56.18acsiaarf
11:56.25acsiashould I or should I not
11:56.57chaosvoyagerAt this point, if you want inter-process communication, you have to.
11:58.33chaosvoyagerYpou should be safe if you're just sending over ints and strings. It's when you attempt to send over more complicated Parcels that the trouble begins. But as I said, haven't actually used it.
12:00.20chaosvoyageranddev.org is usually a good site for this kind of information.
12:02.55acsiaI ll need to read it up
12:03.14acsiaI feared the response
12:03.26acsiaI don t want to spend endless night again
12:03.32acsiaand then change design
12:03.53chaosvoyagerI  know what you mean.
12:16.40*** join/#android kurzum (n=opera@chello084112021199.32.11.tuwien.teleweb.at)
12:24.28*** join/#android mystic_cat (n=jarek@ata216.neoplus.adsl.tpnet.pl)
12:24.33*** part/#android mystic_cat (n=jarek@ata216.neoplus.adsl.tpnet.pl)
12:37.59*** join/#android Mathiasdm2 (n=Mathias@vpne056.ugent.be)
13:03.45*** join/#android morrildl_ (n=chatzill@nat/google/x-6236ef78ed7823bc)
13:03.46*** join/#android markf_ (n=markf@nat/google/x-8d2d5788f3625300)
13:06.00*** join/#android Mathias (n=Mathias@d54C597B6.access.telenet.be)
13:07.28*** join/#android Mathiasdm (n=Mathias@vpna106.ugent.be)
13:23.48*** join/#android Mathias (n=Mathias@d54C597B6.access.telenet.be)
13:24.44*** part/#android chaosvoyager (n=Miranda@pool-72-80-180-212.nycmny.fios.verizon.net)
14:34.01acsiacan you do Class instantiation with the android sdk?
14:34.18acsialike         aBar = (Bar) Class.forName(barClassName).newInstance();
14:38.22davidwacsia, yes
15:07.25*** join/#android dragor43 (n=asdf@151.199.245.93)
15:19.54davidwhrm hrm hrm hrm hrm hrmmmmmmmmmmmmmmmm
15:34.59acsiais that the sound of a motorcycle?
15:55.06davidwit's me thinking
16:11.15*** join/#android Lede (n=lede@85.148.228.92)
16:11.40Ledehello
16:12.44davidwhi
16:19.05*** join/#android illustir (n=alper@s5590818c.adsl.wanadoo.nl)
16:19.34*** join/#android Mathiasdm (n=Mathias@d54C597B6.access.telenet.be)
16:20.02chomchomf
16:21.40chomchomf
16:21.57chomchomwhoops
16:22.21chomchomwas just doing searches through my irc logs! hence the f's
16:22.39chomchomHello everyone! I'm just back from a nice skiing holiday
16:23.22chomchomHope everyone has been hard at work on their applications
16:45.52acsiais it possible from application A to load a class from application B with loadClass?
16:47.15*** join/#android muthu (n=sara@59.92.80.186)
16:50.27*** join/#android Kraln (n=Kuja@pool-71-191-36-254.washdc.fios.verizon.net)
16:51.26davidwacsia, my guess is: probably not
17:02.23davidwdammit
17:02.37davidwit uses the package as a unique identifier:-/
17:04.50*** join/#android The_PHP_Jedi (n=ThePHPJe@66-50-125-149.prtc.net)
17:42.31*** join/#android grah_ (n=grah@CPE-58-161-241-86.nsw.bigpond.net.au)
17:47.39*** part/#android chomchom (n=chomchom@78.32.95.81)
17:57.30*** join/#android [jarek] (n=jarek@atd228.neoplus.adsl.tpnet.pl)
18:01.11*** join/#android chomchom (n=chomchom@78.32.95.81)
18:05.34*** part/#android muthu (n=sara@59.92.80.186)
18:24.26*** join/#android plusminus (i=590f5db3@gateway/web/ajax/mibbit.com/x-0e43d2160d85f96c)
19:07.41jastadavidw: yeah, isn't that annoying?
19:10.03davidwvery much so
19:10.38davidwOn J2ME (sorry, Java ME), you can just change a few things and you have a new app.  This is very useful for Hecl
19:11.02jastaalso, there is a goofy "feature" that causes apk files with different filenames but from the same java package scope to not be installable.
19:11.08jastathe stack just ignores it
19:14.12davidwyeah... I'm fooling around with that right now
19:14.20davidwyou have to completely change the package
19:17.55davidwwow....got it to work finally
19:18.05jastayeah, it's especially lame because this way you can't version your fucking apk files.
19:18.20jastafoo-0.0.2.apk will not replace foo-0.0.1.apk when installed.  very bad ;)
19:19.21zhobbsyeah, that'll need to change
19:25.09romainguy_remember it's just a pre-alpha version of a 1.0 platform :)
19:30.48jastait'll probably be like all the google apps.  Android BETA until 2010 :)
19:39.57*** join/#android jeddy3 (n=mattiast@81-237-230-160-no83.tbcn.telia.com)
19:40.08*** join/#android Mathiasdm (n=Mathias@vpna083.ugent.be)
19:40.41*** join/#android igandroid (n=igandroi@c-75-69-236-102.hsd1.ma.comcast.net)
19:46.47chomchomI have a question about the UI threading. As far as I have seen all of the threading to be done on the GUI has been done within each actual activities class. I have been trying to move as much functionality as possible out of my activity classes and instead call a controller. Is it preferable to actually have the code for those threading calls within the implementing Actions class or move it into a controller and use the
19:46.47chomchom<PROTECTED>
19:48.44romainguy_It does not matter in which class the code lives
19:48.53romainguy_As long as it is executed on the UI thread
19:49.01romainguy_if you don't spawn threads, you have nothing to do
19:49.29chomchomcool thats fine then.
19:51.00*** join/#android bladezor (n=bladezor@c-98-196-112-154.hsd1.tx.comcast.net)
19:59.31jastaI see this a lot :)
20:00.06*** join/#android Beryllium (n=berylliu@S01060018f8f93bda.gv.shawcable.net)
20:00.14jastachomchom: A thread of execution is merely analogous to a person walking a path.  The code is the path, but any person can walk any path should you schedule them to do so.
20:02.13jastaUIThreadUtilities in this sense is unusual.  Programs don't normally offer a way to detect what thread is running since they ought to know that by how the thread was scheduled.
20:02.39chomchomUnless you are doing eclipse RCP development
20:02.53chomchomwhich also has a ui thread access thing
20:02.59romainguy_Unless you are doing Swing development
20:03.01chomchombut its called a UIJob
20:03.15romainguy_but it's called SwingUtilities
20:03.17jastachomchom: Most UI toolkits have a single UI thread.
20:03.30jastaFor Linux, even X itself is not thread-safe.
20:03.47romainguy_writing a thread-safe UI toolkit is both very hard and very inefficient
20:04.07jastaStill, offering utilities to determine the running thread is merely a convenience to guard against sloppy programming.
20:04.48romainguy_jasta: and to avoid having a Handler around
20:04.57chomchomWell I guess it must just be down to my inexperience in UI toolkits, will have to look for some recommended resources
20:05.05romainguy_it has nothing to do with sloppy programming
20:06.07jastachomchom: It is perhaps more to your inexperience with threading.
20:06.25chomchommaybe indeed
20:07.06jastaThe UI model is actually one of the simplest threading models to adhere to.  The rule is simple: manipulation of the UI happens in just one thread, and it's the first thread of execution your program is given.
20:07.41romainguy_"and it's the first thread of execution your program is given." << not necessarily :)
20:07.44romainguy_for instance in Swing
20:08.07jastaReally?  I thought that was so common as to be considered a rule?
20:08.21chomchomAh, so if I name the thread I can find it in the scheduler?
20:08.38jastaOh well now that I think about it I suppose you're right.  It's wherever you scheduled the event loop :)
20:09.43jastachomchom: There is no need to name the thread at all in Android.  Android, as most UI toolkits do, offer a simple way to schedule code to run in the UI thread using an event loop.
20:10.41jastaThat is, the UI thread is forever consuming events and responding to them.  Firing callbacks for user input like button clicks, keyboard input, etc, handling drawing/layout updates, and whatever else it is designed to do.
20:11.13jastaThat includes running your scheduled code.  In Android, your interface to schedule into that event loop is through a Handler, which need only be constructed in the UI thread.
20:11.28jastaThen, it is a thread-safe handle to schedule events in any thread.
20:12.03jastaThe common usage is documented somewhere in Android's documentation.  Can't remember where exactly :)
20:13.59acsiawhat would you use if you want to have a textView with paragraph styling?
20:14.13acsiaTextView has not enought options IMO
20:14.30jastawhat do you mean paragraph styling?
20:14.40zhobbsindentation and stuff?
20:14.50acsiamore or less, a bit like html
20:15.04jastaOh.  I would recommend a WebView but they are so heavy right now
20:15.08zhobbscan you indent with \t ?
20:15.26acsiayes I used webView but as you say it is heavy and just doesn't seem right
20:16.08acsiathere is a new class called Html
20:16.15jastait might be most sensible to extend TextView if it truly doesn't offer a way to do this
20:16.16acsiadoes not seem to be implemented thought
20:16.33jastabut that could be an enormous task
20:16.42zhobbsyeah, could extend textview and format the text in there
20:16.49acsiayes, I just want an about page/view
20:17.06acsiaa bit to much to extend TextView ;)
20:17.08jastayou realize of course that you could do that with just multiple textviews instead, yeah?
20:17.09*** join/#android TimRiker (n=timr@rikers.org)
20:17.18acsiabut again, could add it to my utility package
20:17.46acsiahum, I actually did not think about that...
20:17.49zhobbsI have a textview with multiple paragraphs and I just use \n\n and it looks fine
20:18.12acsiaI want a text-align: justify
20:18.17acsiaso it looks square
20:18.41zhobbsyeah, I was thinking justify would be good also
20:19.02acsiao well not really important, was just wondering if there were something that I did not see in the doc
20:19.04jastai'm gonna try to release my alphabet list widget today :)
20:19.20jastait works perfectly.
20:19.33jastaand i can't wait for setSelection() to have a fling animation associated with it.
20:20.44zhobbsjasta: license?
20:20.48jastaGPL
20:21.08jastawell, maybe a BSD license for this particular thing.
20:21.11jastathe rest of my code of course is GPL
20:21.43jastais of course*
20:22.07zhobbsyeah
20:22.17jastai'm mostly just hoping someone will help me improve it a bit aesthetically
20:22.28jastaand maybe improve precision a bit for touch-screen devices
20:22.33jastaso it can react to more fudged input
20:22.40jastaright now i suspect it's very hard to operate with your finger
20:31.18jastasweet, android provides a UNICODE collator for SQLite3
20:35.51zhobbsalso would be nice to be able to format specific words in a TextView somehow
20:36.09jastayou sort of can with resources
20:37.49zhobbswhat you mean?
20:39.57jastaCharSequence can hold formatting
20:40.10jastalook at the ApiDemos content/StyledText.java
20:40.25zhobbsok, thanks
20:41.40jastaseems somewhat limited, but still
20:42.14zhobbsahh, simple as <b>, <i>, etc
20:42.40jastabut remember that a String will lose that formatting.
20:42.51zhobbshmm...
20:43.04jastaCharSequence seems to have some magic, I don't know
20:44.42kurzumhmm im wondering if theres some java bb code lib out there
20:45.09kurzumwhich converts bb code into html
20:45.10jastathat could be somewhat useful
20:46.14kurzumhttps://javabbcode.dev.java.net/ :)
20:55.50*** join/#android duey (n=nick@ip-58-28-159-211.static-xdsl.xnet.co.nz)
20:57.19plusminusnew AndNav! version. Now recalculates the route being "off-route" for X seconds.
20:57.22plusminusFlash-Video: http://www.anddev.org/images/tut/map/andnav/screencast.htm
20:57.32plusminusAny feedback is appreciated
20:57.34plusminus:)
20:58.06plusminus(Video is 4 MBytes)
21:00.52zhobbspretty cool
21:03.11plusminusthx :)
21:03.51jastaa skateboarding android?
21:03.54plusminusi'd love to test this in real...
21:03.55plusminus^^
21:04.10jastawhy is the video so clunky?
21:04.23plusminuslooking up "clunky"...
21:04.34jastathe framerate is very low
21:04.52plusminusIts just a series of screenshots
21:05.09plusminuscreated with "wink"
21:05.20plusminusbtw: skateboard-droid: http://code.google.com/android/goodies/wallpaper/android-wallpaper6_1024x768.jpg
21:05.36jastalol awesome, google produced that!?
21:05.50plusminusthe skateboarder ? yes
21:05.58plusminushttp://code.google.com/android/goodies/index.html
21:07.19plusminusdamn I love .svg graphics. Especially inkscape. I just could extract the vectors of the Boarding-Droid with I click and the modify it ...
21:07.28romainguy_you love inkscape?
21:08.03plusminussometimes the selection is shitty, but imo it is basically pretty good
21:08.22plusminusYou know a better tool ?
21:08.24romainguy_have you tried potrace?
21:08.34plusminusI'll have a look...
21:08.45romainguy_ah apparently Inkscape uses potrace
21:08.47romainguy_nevermind :)
21:08.59romainguy_so then you can try autotrace
21:09.29davidw"I AM MARVIN THE MOBILE GARBAGE CAN"
21:09.31jastai can't believe google made a crummy skateboarding android
21:09.32jastathat is so great
21:09.34plusminusdavidw: which logo ?
21:09.51davidwthe android one
21:10.32jastaoh my god i want that so bad
21:10.40jastai mean, not *YOUR* t-shirt, that would be creepy
21:10.43plusminus:( I want such a shirt too
21:10.49plusminus^^
21:10.51davidwI want a skateboarding android
21:11.00plusminusromainguy_: you should be sellign them ^^
21:11.04davidwI think that would  be slightly cooler than a shirt!
21:11.05romainguy_lol
21:11.11plusminusor make more codedays...
21:11.16plusminusdavidw:
21:11.19plusminuslol
21:14.43*** join/#android eton_ (n=eton@ppp-58-8-1-181.revip2.asianet.co.th)
21:15.05zhobbsyou should be able to cash in X ammount of helpful posts on android-developers for a t-shirt
21:15.43plusminuslike ~200 :P ...
21:16.18jastahelpful?  Awwww! :)
21:17.13zhobbshaha, nothing wrong with being helpful jasta
21:17.29jastai'm just saying i have a lot of posts, but perhaps not a lot of helpful posts ;)
21:17.39jastaand i really want a skateboarding android t-shit
21:17.41jastat-shirt*
21:21.36*** join/#android illustir (n=alper@s55912056.adsl.wanadoo.nl)
21:23.11*** join/#android lindever__ (n=eton@ppp-58-8-1-111.revip2.asianet.co.th)
21:28.51*** join/#android Marv|LG (n=Marv|TF@ip70-190-12-40.ph.ph.cox.net)
21:35.33jastaalright, time to correctly implement onmeasure and onlayout for this custom widget of mine
21:35.43romainguy_good luck :)
21:37.09jastamy only concern is how to adjust the size of the alphabet labels accordingly.  how does fontsize relate to the height of the drawn letters?
21:37.56jastai can easily calculate the size that each label must be, but i'm not sure how to select a font size from that that will ensure it fits nicely.
21:40.05jastai suppose i could just do something really awful like make a guess and loop onMeasure until I get a size i like :)
21:40.31plusminusanyone knows, whether on the CeBit (Germany) there will also be Android Devices?
21:42.52dueythere is no info on that
21:47.28plusminusOHA Members: HTC, Motorola, T-Mobile
21:47.39plusminuswe'll see :)
22:02.20*** join/#android loic-pointgphone (n=sexystif@ill67-1-82-231-213-14.fbx.proxad.net)
22:11.55*** join/#android dragor43 (n=asdf@pool-151-199-245-93.phil.east.verizon.net)
22:11.56f00f-how do i make a TextView span its width, but be 'constrained' between two other views in a RelativeLayout?
22:12.20f00f-like if the text is too much to fit, i've set scrollHorizontally to true
22:12.22jastaf00f-: you can use a linearlayout for that, and set the "contrained" widget's weight property to 1 (or anything higher)
22:12.57jasta<LinearLayout> <TextView/> <TextView layout_width="0px" layout_weight="1"/> <TextView/> </LinearLayout>
22:13.11f00f-is there a way to do it with relative?
22:13.17jastaby that i mean you do not need to use a relativelayout at all.
22:13.25jastaf00f-: Yes, it will work the same in a relativelayout i believe.
22:13.31*** join/#android Kriyasurfer (n=Akashakr@dsl027-162-152.atl1.dsl.speakeasy.net)
22:13.45jastalet me confirm though, hang on
22:14.00jastai am probably wrong.  relativelayout will not do it.
22:14.05f00f-i don't see a weight or constrained property :(
22:14.16jastathat said, a similar effect can be found by aligning the widgets to the left and right with alignRight/Left...
22:15.06jastathough it is more cumbersome for sure.
22:15.20jastai did it this way once with a relativelayout a long time ago before i realized you could just use a linearlayout
22:16.18jastai seem ot have used some strange combination of POSITION_TO_LEFT/RIGHT and ALIGN_WITH_PARENT_LEFT/RIGHT.
22:16.37f00f-hmm okay let me see
22:16.52jastabut i strongly recommend looking at a linearlayout and just nesting some other type of layout as necessary
22:21.23dragor43yesterday i asked about sending data back to the calling activity without having to close the child activity... someone said to use setResult(), however that didn't work for me
22:21.34jastathen you didnt use it right
22:21.49jastadid you use startSubActivity?
22:21.54dragor43yep
22:22.10dragor43and in the sub activity I called setResult() and didn't call finish();
22:22.12jastaactually i dont know that to be true tha setResult has any effect without finish
22:22.19dragor43yeah...
22:22.22dragor43it doesn't.
22:22.26jastatry calling finish() after setResult just to make sure that your setup is correct
22:25.47dragor43yeah, when i call finish() it hits onActivityResult with the correct requestCode, data in the bundle etc.
22:26.01jastathen i don't know ;)
22:26.06dragor43but calling setResult() without calling finish() doesn't do anything.
22:26.07dragor43k
22:26.11*** join/#android edcba (i=edcba@nor75-17-82-67-199-204.fbx.proxad.net)
22:26.55dragor43so.. sorta related question
22:28.32dragor43I'm going back in my code and thinking about the correct way of passing data from a child activity to the parent activity
22:29.02dragor43Have you guys had success with using Parcelable to serialize the objects and send them back, or are you using Strings and primitive data types in the Bundle to pass back data?
22:29.24jastathe technical arrangement here doesn't suggest that finish() is necessary to communicate the data.  perhaps there is just some API or approach being used that we don't know about?
22:33.53dragor43yeah, my thought was that the Maps application is using some hack involving a handler and Runnable object in order to communicate between the two activities.
22:34.21jastayou know, they may have just sent an IBinder to the subactivity and communicate through that.
22:34.40jastawe know that IBinder references can be serialized and sent to even multiple processes for IPC.
22:34.47*** join/#android chaosvoyager (n=Miranda@pool-72-80-180-212.nycmny.fios.verizon.net)
22:34.56dragor43hmm
22:35.58dragor43well, i know one hack you could do for sure is to have the view of the child activity be a custom view, and pass the runnable object/handler to that view in the constructor.
22:36.14dragor43that way you can invoke the handler from within the child activity. very hacky way of doing it.
22:45.23f00f-i can't seem to get relative layouts to work properly without speciyfing a margin
22:45.40f00f-it's not using my layout_toLeft or layout_toRight etc.
22:45.51f00f-or alignRight
22:46.02jastai used them and accomplished the effect you're looking for
22:46.21f00f-did you have to call measure() or those functions
22:46.22jastabut again, i strongly recommend using linearlayout with a weighted child for your outer layout to accomplish this effect.
22:46.25f00f-i'm doing this all in XML
22:46.33jastaf00f-: No, and I did it all in code.
22:46.34f00f-i need relativelayout for other things
22:46.36f00f-so i'm using it
22:46.39jastaYou've got a losing strategy this way.
22:46.47jastaYou can mix layouts.
22:46.57f00f-doing it in code is pretty bad
22:47.06jastaan outer linearlayout with an inner relativelayout or something
22:47.13jastadoing layouts in code is miserable.  i don't recommend it ever.
22:47.31jastajust call ViewInflate.from(context).inflate() and save yourself the pain.
22:47.32f00f-yet you use it?
22:47.42jastaI *used* it, once, a long time ago before I knew better.
22:47.53jastaThat code is in the public domain too if you really want to see it
22:48.19f00f-so i can't setContentView(R.layout.x) ?
22:48.25jastasure you could.
22:48.36f00f-that's what i'm doing and it works, i'm just having trouble with the layout itself
22:48.50jastabut i did my relativelayout trick inside an extended relativelayout.  i had eventually replaced that code with inflating a view from XML.
22:49.20f00f-ok, i guess it complicates it more that i'm using a cursor view adapter
22:49.27jastanot at all
22:49.31f00f-right
22:49.36jastayou're making this hard on yourself, trust me.
22:50.04f00f-ok how do i make an imageview to the left and textview to the right
22:50.04jastathe layout system in android is easily over-complicated.  there's usually a simple way to do just about anything though.
22:50.15f00f-it seems like i need to specify a margin for it to work
22:50.19jastahow do you mean to the left and right?
22:50.20f00f-otherwise everything is 'bunched up' together
22:50.29f00f-<IMAGE> <TEXT...........>
22:50.33f00f-without specifying absolute margins
22:50.40f00f-assuming image is parentleft
22:50.49davidwhrm... anyone know how to make a tempdir in Java?
22:50.51jastasimple, <LinearLayout> <ImageView/> <TextView layout_weight="1"/> </LinearLayout>
22:51.04f00f-with a RelativeLayout ?
22:51.10jastado it with a linearlayout.
22:51.26jastalike i said, you can combine layouts to your hearts content.
22:51.30f00f-why doesn't a RelativeLayout work?
22:51.36jastait does, it's just harder to do this very simple thing.
22:51.47f00f-what's the secret?
22:52.08jastathere is no secret.  alignWithParentLeft for the ImageView then POSITION_TO_LEFT for the textview
22:52.39jastalike i said, you're making this hard on yourself for no reason :)
22:52.49jastai wouldn't use a relativelayout at all.  i'd next a relativelayout some other way.
22:53.15jastaerr, i'd embed* :)
22:55.03f00f-okay so i get the image to show up (it has alignparentleft) but when i add layout_toLeft="the-image" to the textView it doesn't show up
22:55.12f00f-the latter 'it' is the TextView
22:55.15f00f-i can only see the image now
22:55.23jastamaybe i meant toRight, i'm not sure, read the docs.
22:55.56jastathe view that i had originally constructed doing this was <IMG> <TEXT ......> <TEXT>
22:55.59jastaand it worked fine.
22:56.09jastabut it's totally stupid, because a linearlayout can do it simpler.
23:02.25f00f-ok with a LinearLayout it only appears to 'stretch' it out (with weight = 1) if the text is longer than its given area
23:02.47jastanot true.
23:02.58jastawhat did you specify for layout_width?
23:03.05f00f-wrap_content
23:03.09jastause 0px
23:03.10f00f-for the layout and all its children
23:03.29f00f-set to 0px for the LinearLayout or its children?
23:03.35jastathe layout itself should be layout_width="fill_parent" almost certainly
23:03.39jastaf00f-: the child that has weight=1
23:03.59jastacan you just show me your entire layout at some pastebin somewhere?  it sounds like you've got lots of problems.
23:06.14*** join/#android illustir (n=alper@s55912056.adsl.wanadoo.nl)
23:06.24*** join/#android ersi_ (n=ersi@81-237-203-165-no38.tbcn.telia.com)
23:09.22f00f-jasta: i think i got it working sort of... is there a way to make the 'squished' textview now 'scroll' itself automatically when it is selected?
23:09.34f00f-like left-right scrolling automatically..
23:11.41jastapresumably, yes
23:11.49jastai'll leave that as an exercise for you
23:11.57jastai'm wrestling with onMeasure right now
23:12.17f00f-okay, i thought it was a ssimple as scrollHorizontally="true" but i'll dig more
23:12.23f00f-thanks
23:15.14romainguy_what are you trying to do?
23:17.25f00f-who?
23:17.30romainguy_you
23:18.03f00f-well i want a textview to scroll it's contents left-to-right when there is not enough room to fit the text, while still take up only one line
23:18.30f00f-like on many phones you see a list that has items
23:18.41f00f-some text doesn't fit so when you scroll to it, it scrolls
23:18.46romainguy_singleLine="true"
23:19.17romainguy_but obviously that works only with EditText
23:19.22romainguy_a regular TextView doesn't get focus
23:19.27romainguy_so you cannot scroll it
23:19.34f00f-ooh right
23:19.44romainguy_you could try to set the TextView focusable
23:19.51romainguy_I don't know if it will work though
23:20.18f00f-hmm, i'd still need to scrolling code though?
23:20.22jastahmm, damn, my onMeasure implementation did not work :(
23:20.24f00f-or would it automatically scroll
23:20.33romainguy_f00f-: it scrolls if the user makes it scroll
23:20.34f00f-well it's not a big deal either way
23:20.37romainguy_if won't behave like a ticker
23:20.38f00f-ok
23:20.41romainguy_use a ticker for that :)
23:20.47f00f-oh TICKER!!!
23:20.47f00f-lol
23:20.48f00f-thanks
23:43.13jastaromainguy_: my girlfriend *really* wants a skateboarding android t-shirt :P
23:43.24romainguy_^^
23:43.30jastai showed her hehe
23:43.36jastaare you guys giving them away at code days?
23:43.42romainguy_I have no idea
23:43.44romainguy_probably
23:43.50jastaboo, you should find out :)
23:43.52romainguy_we got loads of tshirts, hoodies, stickers, etc.
23:44.01romainguy_but I don't know if we give them away at code days
23:44.16romainguy_there's even a Dalvik tshirt :p
23:47.06chaosvoyagerNow that you mention it, what are the rights granted on the Android logo? Can someone use it royalty free on their own, say, mousepads, buttons, and ties?
23:48.01romainguy_"Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License."
23:48.04jastagrr, this is so frustrating.  now that i've overridden onMeasure the textviews don't center correctly.
23:48.11romainguy_chaosvoyager: http://creativecommons.org/licenses/by/3.0/
23:50.13chaosvoyagerExcellent. Thanks.
23:53.55*** join/#android Yeggstry (n=mind@cpc1-rdng14-0-0-cust946.winn.cable.ntl.com)
23:58.39*** join/#android rch850 (n=rch850@c220090.ppp.asahi-net.or.jp)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.