IRC log for #android on 20080319

00:00.38*** join/#android mhilmi (n=mhilmi@modemcable083.241-82-70.mc.videotron.ca)
00:02.37_avatarso my next question is: if I create a custom composite control, e.g. subclass LinearLayout, and add child views via code, is there a safe way to assign the children unique ID's? Or will I just have to add accessors to my class?
00:06.13zhobbs_avatar: not sure...the issue is that they won't be in R
00:06.23_avatarexactly.
00:06.42zhobbsYou don't want your activity to be accessing your composite's children if they aren't in the xml you know?
00:07.00zhobbsthe idea of the composite is that it will handle all the children
00:08.39_avatarhrm, I have a bit of a complex layout, that is, composite controls within composite controls. i'm trying to separate some of the business logic that shouldn't belong in the view into a controller.
00:09.15_avatari guess i'll need to rethink my approach
00:11.45zhobbs_avatar: if you have a composite control with an EditText and TextView you would want to add a function like CustomControl.setTextViewText(), setEditTextText() or whatever
00:12.20_avataryeah, that's exactly what I just started to do :)
00:12.27_avatarsounds like i'm on the right track then
00:12.38_avatarthanks for the advice, much appreciated
00:16.52zhobbs700 Mhz auction is over, winners anounced within 10 days
00:25.32jastazhobbs: really?  exciting :)
00:25.36jastawhat was the winning bid?
00:26.11jastazhobbs: or, depending on your intention, getTextView().setText()
00:26.25zhobbshttp://www.helloandroid.com/node/317
00:26.35zhobbs^ about auction
00:26.44zhobbs19.6B total
00:26.57zhobbs4.75 billion for C-block
00:27.21zhobbsjasta: that's true, you could just create getters for the child views
00:27.42jastait might make sense and it might not; it would depend on what your views purpose is
00:54.24Aetmo1ugh. Verizon?
00:54.29Aetmo1Aetmos
00:54.38Aetmosgod, I hate Verizon
00:54.51zhobbsMaybe they'll be better now
00:54.57AetmosI doubt it
00:55.14AetmosThe only good thing is that they've said they're going to open their network for Android phones
00:55.24AetmosBut my experience with them in the past has been miserable
00:56.01romainguyAetmos: I still can't get over the fact that they have no SIM cards in phones
00:56.04zhobbsAetmos: customer support or reception?
00:56.17Aetmoszhobbs: both and more
00:56.23zhobbsdidn't know about the sim card thing
00:56.26AetmosI was unlucky enough to have them for local service and DSL
00:56.31Aetmosa long time ago
00:56.36Aetmoswell, 5 years or so
00:56.42zhobbsAetmos: I'd like to have Verizon FiOS
00:56.50AetmosI'd like to have FiOS
00:56.53Aetmosnot Verizon
00:57.57AetmosIf it was Verizon, they'd probably take 6 months to set it up, and for no apparent reason I'd get 2800bps
00:58.07AetmosThen I'd call tech support, and they'd hang up on me
00:58.23zhobbsIf google wins they'll probably lease it or trade it
00:58.35jastaromainguy: you're thinking of Sprint, I think.
00:58.46romainguyjasta: Verizon does that too
00:59.19jastareally?
00:59.20AetmosI have a friend with a 3G Verizon RAZR, and he can't figure out how to get to the web on the phone...
00:59.27AetmosWhat the heck is the point of 3G, then?
00:59.43AetmosOr maybe it was 2.75G
00:59.46AetmosEDGE, I think
00:59.49Aetmos...
00:59.52romainguyjasta: yep, that's why my g/f cannot replace her crappy old broken Verizon cell phone with the shiny Sony Ericsson I have sitting on a shelf :)
01:00.57jastaromainguy: I wonder, does the choice to use SIM cards have any bearing on what devices *can* operate on the network?  I mean, if sufficient information about the network was available, could you program a SIM card to work on it?
01:01.12romainguyI have no idea
01:01.21romainguyall I know is that it forces you to stick with their devices
01:01.21jastaI would have to think yes
01:01.28romainguyand good luck to get personal data out of the phone
01:01.59Aetmosromainguy: yeah, makes it hard to recycle the phones
01:22.24*** join/#android nslu2-log (n=nslu2-lo@nslu2-linux/dyoung)
01:31.22zhobbsIs there anyway to mute the emulator?  Seems to play audio with or without -useaudio
01:31.40*** join/#android tmcneal (n=asdf@pool-151-199-245-93.phil.east.verizon.net)
01:32.07romainguy-noaudio
01:32.09romainguytype emulator --help to see all options
01:32.19zhobbsahh
01:39.37*** join/#android mypapit (n=mypapit@pdpc/supporter/active/mypapit)
01:49.03jastaromainguy: *poke*
01:50.00jastai have a SimpleCursorAdapter here with an image and text view, and whenever i scroll the list around it hangs for about a second with 4 lines sent to adb logcat in succession saying:
01:50.05jastaD/dalvikvm( 1275): Exception Ljava/io/IOException; from BufferedInputStream.java:264 not caught locally
01:50.13jastathen it draws just like i expect it to
01:50.24jastado you know what that's about?
01:51.13jastathe rows in the database are mixed such that some of the rows have null instead of a content:// uri specifying an image resource.  it seems like maybe it hangs when calling getView on those rows, actually.
01:58.02zhobbsjasta: I've been wondering what kind of column does the SimpleCursorAdapter expect to be binded to an ImageView?
01:58.14jastatext, specifying a content:// uri.
01:58.20zhobbsok
01:58.46jastai had hoped it would be able to tolerate null or empty values as well
01:58.49jastabut maybe not :)
01:59.14zhobbsgotta point it to an empty pic
01:59.38zhobbsbut yeah, you'd think it could handle null
01:59.42jastawell it works, and maybe it has nothing to do with this
01:59.46jastabut it's slow as hell as i'm using it now
02:00.33*** join/#android ApplePedlar (n=ApplePed@60.153.94.219.dedicated.sakura.ne.jp)
02:01.09jastalol
02:01.17jastawhat the heck?
02:01.20*** join/#android chaosvoyager (n=Miranda@pool-72-80-180-212.nycmny.fios.verizon.net)
02:01.24jastathe code looks like:
02:01.46jastatry { v.setImageResource(Integer.valueOf(value)) } catch (NumberFormatException e) { v.setImageURI(Uri.parse(value)); }
02:02.04jastait first tries to interpret the database row as an image resource number?
02:02.46zhobbsstrange way of doing it
02:03.10jastaagreed, i wonder why you'd ever want to store a resource id into a database?
02:03.14jastathat seems like a miserable strategy
02:03.39jastai guess simplecursoradapter's not just for database cursors, though
02:03.52zhobbshm
02:15.01jastayeah, it's totally the null column that screws it up.  i bet it's because it tries to load it as an image resource (resource 0?)
02:16.23jastanot sure what Integer.valueOf("") yields, though.
02:21.10f00f-matybe a numformat ex
02:21.31zhobbsyeah, it must throw the exception
02:43.48tmcnealit's a nice feeling when code works the first time :)
02:43.55tmcnealit's a rare feeling, for me at least :p
02:44.26zhobbsfor sure
02:44.40chomchomdefinitely , had that last night
02:44.52chomchomcompletely not happening tonight though
02:45.42chomchomMy happiness has been devoured by SQL JOINS
02:46.05tmcnealhehe
02:46.10zhobbsmine is being destroyed by MediaPlayer + DeadObjectExceptions
02:46.21zhobbsMediaPlayer crashing my service
02:51.30*** join/#android hoopla (n=hoopla@adsl-75-15-189-26.dsl.bkfd14.sbcglobal.net)
02:53.59*** join/#android jjt009 (n=james@c-98-207-50-162.hsd1.ca.comcast.net)
02:54.06jjt009hello
02:54.07jjt009to all
02:54.10chaosvoyagerHmm, youknow, why should you be getting DeadObjectExceptions on an emulator anyway? That should only happen when resources are low, right?
02:54.18jjt009i have a quick question
02:54.26jjt009ok, here goes...
02:54.51jjt009i am trying to find the location a business based on its proximity to a certain address
02:56.21*** join/#android infobot (i=ibot@pdpc/supporter/active/TimRiker/bot/apt)
02:56.21*** topic/#android is Planet Android seems pretty cool: http://planetandroid.com/
02:56.27jjt009can anyone point me to a better channel?
02:56.45zhobbsjjt009: you using the Search object?
02:56.53jjt009no
02:57.08jjt009i'm just connecting to Google Maps web service with UrlConnection
02:57.20zhobbsUse a Search object
02:57.22jjt009this is a basically a question about the use of google maps
02:57.29jjt009ok what package?
02:57.34tmcnealjjt: are you using the GmmGeocoder class?
02:57.39tmcnealohh
02:57.51jjt009GmmGeocoder is supposed to be unsupported
02:57.59tmcnealyep
02:58.03tmcneali use it anyways tho.
02:58.06chaosvoyagerhmm....
02:58.07jjt009it also doesn't work for me
02:58.11jjt009for some reason
02:58.13*** join/#android _ken____ (n=user@84.92.70.37)
02:58.21tmcneali've got it working fine except it doesn't return the business name for some reason
02:58.55jjt009i decompiled android.jar and found that it uses the same bogus White House addresses as the supported Geocoding classes
02:59.28jjt009zhobbs: where can i find the Search object?
02:59.29tmcnealright, that's what GeoCoder uses.. however the Contacts application returns real addresses
02:59.36tmcnealso it's either using GmmGeocoder, or the Google API
02:59.45zhobbsjjt009: android.app.SearchManager
02:59.48jjt009i should try that out
02:59.59jjt009the Contacts app
03:00.17jjt009ok thanks
03:00.20zhobbsjjt009: there is an example in the ApiDemos I think
03:00.25jjt009thanks
03:01.35jjt009can you use Search outside of local data on the phone?
03:01.53jjt009for websites?
03:02.07zhobbsjjt009: this uses a Search object, looks like it's gone in M5 though: http://davanum.wordpress.com/2007/11/19/drawing-overlays-for-android-maps-aka-search-for-starbucks/
03:05.18o3uomg :( "Challenge is void in, and not open to residents of, Italy and the Quebec Province of Canada"
03:07.14jjt009sweet thanks
03:07.15chaosvoyagerThe challenge is overrated. If you can make a killer mobile app, you can make your cash the old fashioned way.
03:07.29jjt009Can i win the challenge?
03:07.44chaosvoyagerPotentially anyone can.
03:07.45jjt009What are my chances?
03:07.58chaosvoyagerUnless you're in Italy or Quebec.
03:08.25jjt009how many entries do you think there will be?
03:08.34chomchom1bajillion
03:08.46jjt009i'm guessing 700-800
03:09.10chaosvoyagerThat's like trying to guess how many jellybeans are in the jar.
03:09.41jjt009if i just port an app from wm(WINMOB) to android, do i have a chance of winning?
03:09.53chomchomyeah, I wouldn't dwell on how many entries there will be, I'd just look at it as a goal to work to rather than a competition
03:10.03jjt009true, ture
03:10.05jjt009true
03:10.22jjt00925,000 is some good money
03:10.50chaosvoyagerOne thing I do know is that there will be a LOT of duplicate entries, partly because of a lack of vision, partly because Android lacks certain functionality, and partly because the current bugs keep entries from working.
03:11.14chaosvoyagerer, 'certain' entries that is.
03:11.27jjt009the lack of a working prototype is really annoying
03:11.37jjt009an emulator just cant match the real thing
03:11.52jjt009and who knows if android will turn out to be a flop
03:12.13jjt009then our development was for nothing
03:12.14chaosvoyagerThen again, I wonder if you can you submit a 'theoretically' working entry...
03:12.37jjt009well, all apps are theoretically working
03:12.37chomchomThere will be a lot of people out there working to make an application that will grab some free attention. Lots of students with a lot more free time than anyone else, companies making a good pitch to enter at the bottom rung, also entries from less privileged areas.
03:13.07chomchomI've been on job web sites where people bid on work for like $10
03:13.56chomchomIf 25,000 is at stake plus the opportunity to learn a new skill, I'm betting that it won't be much of a secret between eager developers
03:14.56tmcnealgood point chaosvoyager. there will definitely be lots of duplicate entries
03:16.19*** join/#android romainguy (n=gfx@69.36.227.131)
03:16.24jjt009and a lot of low-quality ones as well
03:16.39chaosvoyagerchomchom: Man, I use to trudge the software bounty websites and see things like that too.
03:17.07jjt009things that don't make good use of android functionality
03:17.12tmcnealit's quite an unknown tho, the quality and quantity of the entries....
03:17.30chomchomI would bank on high quality.
03:18.00chaosvoyagerI hate to say the current quality of Android is a big limiting factor.
03:18.08jjt009i'm unsure whether google is doing this just to get a bunch of working apps in order to be able to quickly hit the market
03:18.18jjt009with actual devices
03:18.35jjt009then the phone's unique functionality wouldn't really matter
03:18.42tmcnealand it's an odd position for a developer to be in.. working for months on a project for phone that's not out yet, for a prize you may or may not win. :)
03:19.01chaosvoyagerI have NO idea why Google is doing this.
03:19.33jjt009yep, so many competitors like symbian and wm that are already established in the market
03:19.43jjt009i don't see what's so great about android
03:19.50jjt009linux phones have been out for a while
03:19.56jjt009and have found little success
03:20.48jjt009symbian is already highly developer oriented
03:21.05jjt009android is really just trying to find a place in a niche that other companies have already filled
03:21.36tmcneali don't really agree with that...
03:21.39chaosvoyagerSymbian is a PITA to dev for.
03:22.14jjt009i haven't really developed much for it
03:22.28tmcnealthere's been a lot of interest in mobile devices in the last year or two.. i think it's only going to garner more interest and innovation as people develop apps for android and the iphone
03:22.32o3uAndroid is making more developpers aware of the new technology available on all kinds of handsets,
03:22.49jjt009true
03:22.55o3uthereby attracting new ideas, and a wider vision of development potential
03:23.02jjt009i'm still waiting for the source
03:23.03jastai think Android is more hoping to change the landscape of the industry than to just earn google some short-term profits.
03:23.06f00f-chaosvoyager: isn't it obvious? :)  they want to be able to have a develoepr base to make apps for the OEM phones that will come out :P
03:23.13tmcnealplus phones are getting more powerful, data plans and faster data access on phones is getting more ubiquitous..
03:23.14jastaAndroid is a very potent way to get more people thinking about smartphones, and more importantly: internet access.
03:23.29o3ubut frankly, i could have used 25k to invest in some backbone servers for my killer app :( this is disappointing
03:23.34jastaand that benefits google in the long run, even more than Android as an instance of that does.
03:23.44f00f-the problem with symbian is that its architectural semantics were designed for phones of the 90's.
03:24.01chaosvoyagerWell, deja vu.
03:24.14*** join/#android rwhitby (n=rwhitby@nslu2-linux/rwhitby)
03:24.42f00f-that is, requiring a lot of hoops to write a Hello, world proggie even
03:24.53*** join/#android {HelloWorld} (n=Hello@97.90.139.166)
03:25.00f00f-Open C is a much better alternative, but not default or standard yet
03:25.01jastathat was weird.
03:25.05{HelloWorld}helppp
03:25.07f00f-heh
03:25.10chaosvoyagerIndeed.
03:25.30{HelloWorld}can anybody help me out?
03:25.44chaosvoyagerPossibly.
03:25.45{HelloWorld}i'm trying to create a spinner
03:26.09{HelloWorld}can't use <CharSequence> because for some reason it throws me an IndexOutOfBoundException
03:26.29{HelloWorld}so i'm wondering if there's an alternative
03:26.34{HelloWorld}i have int within <item>
03:26.36{HelloWorld}and string
03:26.53romainguyWHere and how do you use a CharSequence?
03:27.05{HelloWorld}i tried to use it just like the one in tutorial
03:27.12{HelloWorld}Spinner1 tutorial
03:27.29{HelloWorld}didn't work well, and i post something in the developer forum, but takes forever to get a response..
03:27.36chaosvoyagerf00f: It always kind of blew me away how much memory things like Java and C# take to run 'Hellow World' (PS {HelloWorld} we were just discussing this right before you arrived.)
03:28.08f00f-chaosvoyager: well that's something out of our control :P
03:28.21f00f-surely it's different on mobile platforms
03:28.30{HelloWorld}romainguy: could you help me out? :-/
03:28.45chaosvoyagerWell, it was one of the reasons for Dalvik.
03:28.47romainguyUnless you explain the problem clearly, no :)
03:28.50jastaromainguy: did you get my earlier comments about SimpleCursorAdapter?  i feel it should gracefully handle a null column to show no image (a blank drawable).  currently, it does something odd that hangs the program for a second or two.
03:28.58{HelloWorld}btw, i'm also wondering is it a good practice to have one XML for main.xml
03:29.02{HelloWorld}then use ids within that XML
03:29.35{HelloWorld}that's what i have for main.xml
03:29.38f00f-jasta: like a null-column hack ... would be good?
03:29.38romainguyjasta: I guess it's trying to load an image with the URI null
03:30.16jastaromainguy: which does what?
03:30.30romainguyjasta: Apparently it craps out
03:30.34jastayes ;)
03:30.58romainguyActually
03:31.08romainguyby default I think we turn null values to the empty String
03:31.13romainguyI would have to look at the code
03:31.19jasta(you do) :)
03:32.55jastaweirder still, you guys first try setImageResource() on the value converted to an integer.
03:33.00jastathen fallback to setImageURI
03:33.03jastawhich makes no sense to me
03:33.04romainguyyes
03:33.09romainguyah
03:33.13romainguywell it makes sense to us :)
03:34.32jastawell, null could still be more gracefully supported I think.
03:34.58*** part/#android jjt009 (n=james@c-98-207-50-162.hsd1.ca.comcast.net)
03:35.37chaosvoyagerI wonder how many devs are in this for the prize money...
03:35.56romainguychaosvoyager: Ask on this channel :)
03:35.57chomchom1bajillion
03:36.02f00f-i know i am.
03:36.24f00f-obviously not for my caribbean vacation...
03:36.33chomchomf00f: its a good thing you are going to win then.
03:36.43f00f-agreed.
03:38.10chaosvoyagerSo I'm the only one in ot for world power?
03:38.38chaosvoyagerwell, 1bajillion is pretty much the same thing :?
03:38.57f00f-seriously, i'd say 5,000 to 10,000 entries.
03:39.19f00f-it's going to be a cesspit
03:39.31f00f-but after weeding out the rubbish, we'll probably have
03:39.39f00f-100 - 150 solid entries
03:39.59f00f-i'd say that's the best case scenario
03:40.11f00f-worst case could be, all of us in here win
03:40.30jastai think the reality is that none of us have any idea how many submissions are expected, or how hard it will be for the judges to sort through them all.
03:40.32tmcnealthat's the worst case? :)
03:40.47chaosvoyagerStrangely, I believe that's also close to the ration of developers who are actually participating in the Google groups and channels too.
03:41.32chaosvoyagerActually, I have no idea. I hate questions like this. I never win the jellybeans.
03:41.46tmcnealwell it's fun to speculate :)
03:41.48f00f-neither do i, but this one is a bit more than guesswork :>
03:42.14*** join/#android KernelPanic (n=ThePHPJe@adsl-64-237-163-166.prtc.net)
03:42.15chomchomIf I were being serious I would say that around 8,000 - 12,000 and would guess around the same as f00f, about 100 really good ones.
03:44.36chaosvoyagerIt reminds me of another puzzler. Awhile back, TicTac made, er, TicTacs 30% larger, but they did NOT alter the dimentions on the container. So, are you now getting more TicTac per mass now than you were before, or less?
03:45.10f00f-less
03:45.26chomchomHit ranking analysis: http://www.alexa.com/data/details/traffic_details/code.google.com/android/adc-submit/index.html
03:46.36chomchomAnd here: http://siteanalytics.compete.com/code.google.com/?metric=uv
03:46.38chaosvoyagerWell, the math is a bitch and a half to back that up :)
03:47.23f00f-wait
03:47.26f00f-that is for google.com
03:48.08chomchomThe one for compete does seem to cut it down to the base domain
03:48.12f00f-wtf is up with these sites
03:48.25f00f-they never got the memo about subdomains
03:49.15f00f-a good metric would be how many people download the SDK
03:49.52f00f-grep "android_sdk.zip" /gfs/code.google.com/access_log | wc -l
03:51.07*** join/#android jtoy (n=jtoy@58.62.4.128)
03:51.30f00f-http://code.google.com/android/
03:51.31f00f-hahaha
03:51.32f00f-rofl
03:51.35f00f-@ Community posts
03:52.03chaosvoyagerWell, it would be a similar to judging how much money had been lost based on how many times a song had been dled
03:52.39f00f-"We, from Virtual Site, are working hard to send our project until the deadline. However, perhaps we wont have time to refine some interfaces and views."
03:52.57f00f-i can't find anything about "Virtual Site"
03:53.00{HelloWorld}guys
03:53.08{HelloWorld}is there CharSequence for int ?
03:54.41{HelloWorld}ehm..
03:58.59*** join/#android foysavas (n=foysavas@146-115-47-76.c3-0.sbo-ubr1.sbo.ma.cable.rcn.com)
04:00.14{HelloWorld}can anybody help me?
04:00.18{HelloWorld}with this spinner? :(
04:01.09chaosvoyagerI'm not sure what you're asking, at least as far as CharSequence.
04:01.15jasta<PROTECTED>
04:01.32{HelloWorld}alright, let me cleared it up
04:01.37{HelloWorld}i'm trying to create a spinner
04:01.41{HelloWorld}that takes integer value
04:01.50{HelloWorld}from <resources>
04:01.54{HelloWorld}how would you do that?
04:02.05jastayou wouldn't, at least not directly.
04:02.28{HelloWorld}ummm... so..?
04:03.34jastaso... what?
04:03.47jastaalso, what is the reason for requiring an integer value?
04:04.14{HelloWorld}because that's the way i specify the <item></item> within <resources></resources>
04:04.27jastano, you're specifying a charsequence.
04:04.44{HelloWorld}it throws an ArrayIndexOutOfBound for some reason... :-/
04:04.55jastabecause you're using something incorrectly.
04:05.24{HelloWorld}hmmm..
04:05.26{HelloWorld}potentially?
04:05.33jastaif you could paste a small example, perhaps i could better understand what you're wanting to do.
04:08.36*** join/#android ApplePedlar (n=ApplePed@60.153.94.219.dedicated.sakura.ne.jp)
04:09.55{HelloWorld}thanks jasta
04:09.59{HelloWorld}appreciate it
04:10.47*** join/#android romainguy (n=gfx@adsl-75-55-212-70.dsl.pltn13.sbcglobal.net)
04:13.16*** join/#android ApplePedlar (n=ApplePed@60.153.94.219.dedicated.sakura.ne.jp)
04:16.12*** join/#android muthu (n=sara@59.92.89.234)
04:33.42{HelloWorld}i'm wondering if there's a way for me to do a dynamic resources
04:33.49{HelloWorld}other than writing a file..
04:33.50{HelloWorld}:-/
04:34.14muthuwhat do you want to do?
04:34.25{HelloWorld}i want to have resources for years
04:34.30{HelloWorld}so depending on what's current year
04:34.34{HelloWorld}i'll take 5 more years
04:34.39{HelloWorld}so say that current year is 2008
04:34.51{HelloWorld}then 2008 2009 ... 2013 is displayed in the Spinner
04:35.23muthuok
04:36.19jasta{HelloWorld}: just make a list silly.
04:36.34jastause an ArrayAdapter with the array that you've made.
04:36.46{HelloWorld}but ArrayAdapter doesn't take lists..
04:36.49{HelloWorld}it only takes int resources
04:37.05{HelloWorld}ArrayAdapter(Context context, int resource, int fieldId, T[] objects)
04:37.17{HelloWorld}int resource is the one that we use for the resources XML file rite?
04:38.26jastayou have quite a few options here, of course.
04:38.47{HelloWorld}jasta: not really, i looked over the docs, they always have int resources
04:38.53{HelloWorld}doesn't have int[] resources
04:38.56jastayou could extend a BaseAdapter as List4.java does, for example.
04:38.59{HelloWorld}so the only way is to write a file
04:39.02{HelloWorld}? :-/
04:39.04jastayou could use a CursorAdapter and just use an ArrayListCursor
04:39.09{HelloWorld}which i thought is kind of inefficient
04:39.14{HelloWorld}hmmm...
04:39.25jasta(sorry for suggesting ArrayAdapter, you are correct about that one)
04:39.36jastaI was thinking ArrayListCursor, which I have personally done quite a few times.
04:39.55jastaalthough extending a BaseAdapter is also an option, it's just a bit more code.  though, more flexible.
04:41.08{HelloWorld}jasta: it's fine
04:41.27{HelloWorld}let me take a look on List4.java
04:42.04jastai'm not sure I'd recommend that approach if you're just looking to get going.
04:42.12jastaArrayListCursor would be much easier.
04:42.27jastathen you could just use a [Simple]CursorAdapter and not fuss with it.
04:42.55{HelloWorld}hmmm
04:43.00jastaor you could extend a cursor yourself, which ould be very efficient in your case.
04:43.18{HelloWorld}do you have some sample code that i could see?
04:43.34{HelloWorld}i learned it better by looking at codes :-/ or docs...
04:43.35jastanot really, but i have personally written some public domain code that uses ArrayListCursor
04:43.40{HelloWorld}ah alright
04:43.46{HelloWorld}but it's using ArraYLiostCursor rite?
04:44.01jastahttp://devtcg.blogspot.com/2008/03/custom-android-list-view-widget-to.html -- this demonstration control uses an ArrayListCursor to populate the dummy data you see in the screenshot.
04:45.10jastai realize that this is a ListView, whereas you want a Spinner, but the principle and code are roughly the same for either.
04:47.05{HelloWorld}jasta: Thanks, i'll take a look at the code
04:48.46muthujasta: looks like you've been busy coding the last few days
04:48.52jastahow so?
04:48.58muthunot seen here
04:49.10jastaoh, i'm irish, and it was st. patrick's day weekend.
04:49.15muthuoh great
04:49.17jastaso, that's why :)
04:49.22muthunow i know
04:49.24*** join/#android duey (n=Nick@203.96.223.40)
04:49.40jastabut now i'm busy coding :)
04:50.09muthutoday i have to force myself to code something.. lately i've been a twitter addict
04:50.18muthuchecking out a few things on twitter.. very interesting
04:51.18f00f-jasta: if you had to choose, guinnes draught in a bottle or a can?
04:51.25f00f-+s
04:51.37jastaobviously a can, that stupid rocket widget doesn't work at all.
04:51.56f00f-hmm, are you supposed to pour the bottle one in a timeframe too?
04:52.03f00f-like what is it 17.2 seconds?
04:52.25f00f-so do you drink it straight out of the can or pour it?
04:52.29muthudoes the taste differ?
04:52.53jastaf00f-: Well, the only time I personally have ever drank it from a can was to make car bombs for parties, so...
04:52.57tmcnealmy opinion: either way it tastes like coffee grinds :p
04:53.03jastaI mean, other than to taste it :)
04:53.12f00f-lol
04:53.23f00f-well i'd prefer tap any day, but i don't have a bar in my home
04:53.26muthuwhich beer is the best?
04:53.39tmcnealharp's pretty good
04:53.58muthuok.. that's a silly question
04:53.58tmcnealit's guinness' lager
04:53.58f00f-imho guinness is a good food beer
04:54.02chaosvoyagerThe King of Beers took power by underhanded means.
04:54.09muthuall beer are good ;)
04:54.19jastaf00f-: I don't generally drink Guinness unless I'm drinking socially, and I do most of that at bars so...
04:54.35jastaBut like I said, car bombs at home :)
04:54.40f00f-ya
04:54.59muthuhow do you make a car bomb?
04:55.00jastaIf I was being absolutely honest, I'd say that I prefer Amber beers for drinking casually.
04:55.17f00f-i definitely wouldn't waste a Guinness socially
04:55.21f00f-unless it was with a good meal :)
04:55.27jastamuthu: Half pint of guinness with a shot of mostly jameson and a bit of bailey's.  Drop the shot in and chug.
04:55.46jastaf00f-: Waste it socially?  Are you mad?
04:55.59chaosvoyagerProbably.
04:56.02jastaGuinness is best had with friends and conversation.
04:56.03muthugood to know.. i've seen pictures not tried it myself
04:56.17f00f-well, yeah in those terms 'socially' yes
04:56.18f00f-absolutely
04:56.22f00f-but not to get drunk or anything
04:56.30jastaAhh, ok.
04:56.33jastaI meant casually as that.
04:56.57jastaAs in, few beers after work or whatever.  For that, I much prefer ambers.  More relaxing to me.
04:57.21jastawe have this very delicious local microbrew called Mac & Jack's here in Seattle.  Mmm, delicious :)
04:57.54jastai'm always disappointed to travel anywhere else in the US because all the local microbrewed ambers are shit :)
04:58.00muthuanyone drank KingFisher?
04:58.27chaosvoyagerYou mean there's no more left?
04:58.40f00f-i was never a big fan of ambers, but what do i know
04:58.45f00f-aren't ambers and stout kind of opposites?
04:59.19jastaI dunno, in what sense do you mean?
04:59.27chaosvoyagerArch enemies.
04:59.33jastaOh, well sure :)
04:59.43f00f-well just in terms of look and taste
05:00.01f00f-amber feels very aggressive in taste
05:00.02muthudrinking beer everyday makes scientist less productive - a new study, read today
05:00.10chaosvoyagerLike those beers that played football on that one superbowl commercial.
05:00.25f00f-uh.. yeah
05:00.28muthubeer used as a litmus test? - that was the title
05:00.56f00f-haha
05:01.13chaosvoyagerWhich beer best enables me to magically enter kung-fu movies?
05:01.16f00f-http://www.nytimes.com/2008/03/18/science/18beer.html
05:02.19muthuthat's the one
05:03.14muthuIn spite of his study, Dr. Grim, who said he would on occasion enjoy more than 12 beers in a night, is not on a campaign to decrease beer drinking among scientists. Why not? His answer: “I like it.”
05:03.23muthu:)
05:03.29chaosvoyagerI like the Belgian ales.
05:03.47chaosvoyagerStrangely, a lot of those are brewed by Monks.
05:04.10f00f-maybe we can reverse it muthu?
05:04.18f00f-that is, drink beer and then *try* to concentrate
05:04.20chaosvoyagerSo let me get this straight, you BREW beer, but you don't DRINK beer?
05:04.24f00f-to work on android project for example
05:04.32chaosvoyagerOr do Trappist Monks drink?
05:05.18chaosvoyagerScratch that, wikipedia says they do.
05:05.40muthuyeah.. drink beer and code android!
05:05.52f00f-i've done that on many an occasion
05:06.01f00f-maybe that's why my questions to jasta always seem ridiculous ;)
05:06.15jasta...maybe. :)
05:06.57chaosvoyager0_o Trappist monks say \ldblquote Don\rquote t drink our beer\rdblquote  -> http://mondaynightbrewery.com/?p=473
05:08.52jastahmm, it just occurred to me that my ViewBinder's are all really inefficient
05:09.26f00f-just the sheer number of method calls doesn't sound efficient
05:09.33f00f-as in number of 'callbacks'
05:17.51*** join/#android chumphries (n=chumphri@labs.niroze.net)
05:41.25*** part/#android chaosvoyager (n=Miranda@pool-72-80-180-212.nycmny.fios.verizon.net)
05:56.47thedaniel`i feel like i'm missing the obvious bug in this line that is causing c = null : someone sanity check for me?
05:56.53thedaniel`Cursor c = getContentResolver().query(People.CONTENT_URI, new String[] {People._ID, People.NAME}, People._ID+"="+mThisContactId, null, null);
05:57.35thedaniel`(people being android.provider.Contacts.People)
05:57.54jastac is null, or is empty?
05:57.58thedaniel`null
05:58.21jastathat i can't say :)
05:58.25jastadoes adb logcat say anything?
05:59.07thedaniel`jasta: oh duh, thanks
05:59.26thedaniel`uncaught remote exception, a problem with the generated sql somehow
05:59.48thedaniel`my query must not be right
06:00.11jastawell, they're the ones that construct the query
06:00.24jastathough are you sure that mThisContactId is not some silly string? :)
06:01.06thedaniel`jasta: yeah, it's a getLong from another cursor
06:01.23thedaniel`in this case it is 1L
06:01.33jastawell, adb logcat should somewhere show you the failed query
06:01.38jastaperhaps you can deduce what strangeness they have done
06:02.28thedaniel`jasta: it's a sqlite ambigous column name exc, which i feel like i've caused myself in other applications - anyway, googling seems to find others have had the same issue so i am hopeful the solution is at hand
06:03.12thedaniel`hm, someone posted to android-developers a month ago with no reply from anyone
06:03.15jastaperhaps it is because they are using a projection which you aren't seeing so are requesting _id = ... where they expect p._id = .. or something?
06:03.32jastaReally, Content Providers are not as abstract and self-documenting and Google would have us think :)
06:03.36thedaniel`lol
06:03.39f00f-or just "SELECT t1.uniqbleh AS _id ..."
06:03.45jastathey are, in my opinion, Android's most serious weakness.
06:04.02jastaas*, not and :P
06:05.28muthuthe "selection" part - doesn't look right to me
06:05.39thedaniel`this is the generatedquery:
06:05.42thedaniel`android.database.sqlite.SQLiteException: ambiguous column name: _id, while compiling: SELECT COUNT(*) FROM (SELECT people._id AS _id, name FROM people LEFT OUTER JOIN phones ON people.preferred_phone=phones._id LEFT OUTER JOIN presence ON (presence.person=people._id) WHERE (_id=1))
06:05.58thedaniel`muthu: yeah, this is the first i've used a contentprovider, and i suspect the selection is the problem
06:06.40jastasee, if you change Phone._ID to "phones._id", it will work (but that is strange, of course)
06:06.43thedaniel`muthu: i think.. that i need to construc the URI with the id
06:06.48thedaniel`and leave the selection null.
06:07.00jastayes, that would be a much better way to go, if possible.
06:07.23thedaniel`jasta: easily possible, i was just thinking of the content provider too much as a db
06:08.51jastawell it is unfortunately neither a good abstraction of a db, nor is it a good interface to one :)
06:10.00muthui do something like this
06:10.03muthu<PROTECTED>
06:10.03muthu<PROTECTED>
06:11.25muthufrom the sql.. you need to specify which _id you are talking about
06:14.31thedaniel`muthu: yeah, but i am not accessing the sqlite db, i have to go through a contentprovider
06:15.02thedaniel`anyway, i was going aobut this in the wrong way, but still the main content provider page is out of date. there were changes in the latest sdk and there's a specific example for what i should have been doing
06:15.07thedaniel`<PROTECTED>
06:15.10thedaniel`http://code.google.com/android/migrating/m3-to-m5/m5-api-changes.html#sql
06:15.37thedaniel`ContentURI.addId(id) //before  uri = Uri.withAppendedPath(SOME_URI, id); //after
06:35.21*** join/#android jeddy3 (n=mattiast@gw.sbg.se)
06:52.51{HelloWorld}jasta: the thing that you wrote doesn't use Spinner though...
06:53.47{HelloWorld}helppppppp
06:54.05muthunot working?
06:56.48{HelloWorld}it's not that it's not working
06:56.53{HelloWorld}it doesn't fit to the problemn
06:57.00{HelloWorld}i'm looking a way for a Spinner to have integer values
06:57.14{HelloWorld}spinner that contains arraylist or something
06:57.21{HelloWorld}where i could store integers
06:57.32{HelloWorld}or String is fine..
06:58.47muthui thought spinner took arraylist
07:00.21{HelloWorld}no it's not
07:01.44muthunone of the adapters fit your need?
07:04.05{HelloWorld}well i just know ArrayAdapter for now
07:04.08{HelloWorld}cuz i'm new at these
07:04.09{HelloWorld}:-/
07:08.19{HelloWorld}muthu: i need some type of direction...
07:08.20{HelloWorld}:-/
07:08.41muthuhelloworld: i've used arrayadapter with spinner
07:08.52*** join/#android chomchom (n=chomchom@78.32.95.81)
07:08.54muthui was looking for some code.. but couldn't find it
07:09.59{HelloWorld}muthu: thanks, i wish i could get some code for the integer spinner
07:10.18{HelloWorld}hmm... well yeah, i used Arrayadapter for spinner that takes string
07:10.27{HelloWorld}but it doesn't work for some reason when i use integer
07:10.34{HelloWorld}that's because i used CharSequence for the String values
07:10.42{HelloWorld}that sting contains Char, while integer doesn't...
07:10.45{HelloWorld}taht's probably why..
07:10.55jasta{HelloWorld}: ugh, dude, this is not as complicated as you are making it out to be
07:11.06muthuyeah.. i'm not getting it
07:11.18jastayou don't have to use an ArrayAdapter, that is just the one used by the demos.
07:11.30{HelloWorld}sure
07:12.02jastaincluding, i'm sure, CursorAdapter.
07:12.10jastaand then you could use ArrayListCursor
07:12.16jastai don't know why you are making this so hard?
07:13.42jastai have to go to bed, though
07:14.02muthugood night jasta, its lunch time here
07:15.42*** join/#android romainguy_ (n=gfx@adsl-75-55-212-70.dsl.pltn13.sbcglobal.net)
07:16.12{HelloWorld}jasta: i've no clue what u're talking about
07:16.17{HelloWorld}i hope could get code
07:30.00{HelloWorld}man, nobody here could help...?
07:30.04{HelloWorld}thanks all
07:30.06{HelloWorld}:(
07:38.25raidfivedoes anyone know where I can find the relationships between UI xml for a specific element and the java code equivalent?
07:38.56raidfiveexample: android:id="@+id/name" -> element.setId(num)
07:39.45raidfiveI have the UI xml for a progress bar but I need to create multiple progress bars dynamically so I can't really hard code them in the xml file
07:40.28raidfiveor is there a way to apply the UI xml to multiple progress bars that are created dynamically?
07:50.44raidfiveI've figured out all of them except: style="?android:attr/progressBarStyleHorizontal"
08:03.26muthuraidfive: look in android.R docs
08:04.07raidfiveyea I just stumbled across that ...
08:05.00raidfiveProgressBar(Context context, AttributeSet attrs, Map inflateParams, int defStyle) ... any idea what to pass in for AttributeSet and inflateParams? can I just pass in null?
08:08.03*** join/#android rch850 (n=rch850@c220090.ppp.asahi-net.or.jp)
08:09.43muthuyou can pass null
08:10.38muthuwithin the docs.. there was some explanation on how to do this mapping actually
08:10.55muthui must admit its all hidden. and not easy to find
08:11.03raidfiveyea I have no clue what they are even used for
08:11.11raidfiveseems to be a reoccuring trend :)
08:11.28raidfivenot too impressed with documentation so far
08:15.24raidfivegreat, progress bar isn't displaying now since I moved away from the xml layout
08:15.32raidfivehttp://pastie.caboo.se/167691
08:15.36muthuraidfive: have you looked at the apidemos?
08:15.37raidfivesee anything wrong with that?
08:15.59muthuthere were some progressbar examples
08:16.19raidfiveyea I've looked at them ... they use xml for the UI but they don't supply them :P
08:17.28*** join/#android raidfive (n=null@71.236.205.80)
08:17.46muthuah yes
08:17.50muthuthey request window feature
08:18.24*** join/#android raidfive (n=null@c-71-236-205-80.hsd1.or.comcast.net)
08:19.03*** join/#android Aetmo1 (n=tomadmin@c-98-226-6-195.hsd1.il.comcast.net)
08:19.28muthuraidfive:  do this -        setProgressBarVisibility(true);
08:20.08raidfivethat is for the progress bar in the view title bar ...
08:20.30raidfiveProgressBar doesn't have that method
08:21.04muthuhmmm
08:21.33muthuthen may be its the null attributes you are passing
08:21.55raidfivegreat :)
08:30.04raidfivetime to try to figure those out :/
08:30.33muthugood luck :)
08:30.38raidfiveso is there no way to apply a single xml ui styling to multiple object instances?
08:31.00muthui haven't tried it yet
08:31.16muthui'm staying away from r&d for now
08:31.28raidfivewell you have the unique id for the element, so it seem unlikely
08:31.51muthucheck out view inflate
08:47.37*** join/#android cutmasta (n=cutmasta@62.225.134.181)
09:05.13*** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl)
09:15.09*** join/#android romainguy_ (n=gfx@adsl-75-55-212-70.dsl.pltn13.sbcglobal.net)
09:17.02*** join/#android Mathiasdm (n=Mathias@vpna077.ugent.be)
09:46.23*** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl)
09:55.23*** join/#android Mathiasdm2 (n=Mathias@vpne240.ugent.be)
09:57.47*** join/#android diego (n=dpino@cm135183.red83-165.mundo-r.com)
10:15.18*** join/#android _ken____ (n=user@84.92.70.37)
10:18.43*** join/#android Mathiasdm (n=Mathias@vpne240.ugent.be)
10:24.05*** join/#android chumphries (n=chumphri@pdpc/supporter/monthlybronze/chumphries)
11:02.25*** join/#android isaac_ (n=isaac@13.Red-88-23-204.staticIP.rima-tde.net)
11:27.42*** join/#android mypapit (n=mypapit@pdpc/supporter/active/mypapit)
12:11.20*** join/#android mike1o (n=mike@82.58.120.121)
12:39.12*** join/#android o3u (n=slim@modemcable095.170-70-69.mc.videotron.ca) [NETSPLIT VICTIM]
12:45.36*** join/#android Andy80 (n=andy80@79.22.201.18)
13:03.22*** join/#android Zer0Her0 (n=Z@cpe-74-70-193-250.nycap.res.rr.com)
13:05.01*** join/#android isaac (n=isaac@88.23.204.13)
13:25.36*** join/#android Vipsy (i=c6980c43@gateway/web/ajax/mibbit.com/x-47cbe79a9543db74)
13:26.46VipsyAny android app for call recording?
13:26.59zhobbsVipsy: can't record calls currently
13:27.37VipsyOh.. Is it hard to develop ? or SDK doesnt support ?
13:32.24*** join/#android The_PHP_Jedi (n=ThePHPJe@adsl-64-237-163-166.prtc.net)
13:38.19*** join/#android mike1o (n=mike@host121-120-dynamic.58-82-r.retail.telecomitalia.it)
13:57.45*** join/#android Dralspire (n=dralspir@199-96.126-70.tampabay.res.rr.com)
14:28.36*** join/#android cutmasta (n=cutmasta@62.225.134.181)
14:45.10*** join/#android morrildl (n=chatzill@nat/google/x-e67066d56e414ecd)
14:54.47muthuhttp://www.lacherstorfer.at/haris_blog/2008/03/
14:57.24*** part/#android jasonchen (n=chatzill@nat/google/x-e35a862d6afd8886)
14:57.24*** join/#android jasonchen (n=chatzill@nat/google/x-e35a862d6afd8886)
14:58.05*** join/#android jasonchen (n=chatzill@nat/google/x-5ae16c25df2b6f34)
15:01.59*** join/#android jasonchen (n=chatzill@nat/google/x-982aff9085c55f1c)
15:09.25*** join/#android TimRiker (n=timr@99-200-65-211.area1.spcsdns.net)
15:16.03*** join/#android eton (n=eton@ppp-58-8-15-241.revip2.asianet.co.th)
15:18.13*** join/#android tmarble (n=tmarble@user-38q4et6.cable.mindspring.com)
15:24.38*** join/#android Stephmw (n=steph@tangency.co.uk)
15:26.48*** part/#android muthu (n=sara@59.92.89.234)
16:02.55jastahmm, my emulator is taking 100% cpu and it's just sitting at the home screen
16:05.22*** join/#android matt_c (n=mcroydon@gozur.sunflowerbroadband.com)
16:15.18*** join/#android eton_ (n=eton@ppp-58-8-15-241.revip2.asianet.co.th)
16:19.50Aetmosguess you'll have to get another computer
16:20.17*** join/#android muthu (n=sara@59.92.24.104)
16:21.15*** join/#android matt_c (n=mcroydon@gozur.sunflowerbroadband.com)
16:22.31jastai'm trying to debug it (it's my process doing it), but i can't think of what it could be busy doing
16:23.20Aetmoswhile(1);
16:23.21Aetmos?
16:23.35Aetmos;-)
16:24.47Aetmos<sigh> I *always* forget to add new Activities to my AndroidManifest file...
16:25.01Aetmosevery single time
16:26.27Stephmwjasta: such a shame you can't use the JVM debug/profiling hooks
16:27.05jastai want to just break it and investigate the call stack
16:27.08jastabut i dont know how ;)
16:27.21Aetmosadd a breakpoint?
16:27.28jastaright, but where?
16:27.51Aetmosline 123 of InfiniteLoop.java
16:28.51Aetmos<---- Smart Ass
16:29.10jastahopefully one of the google folks can help me out
16:29.21jastabecause i do want to debug this; i suspect my app's not the thing that's really busy
16:29.28jastaactivitymanager is probably screwing with it or something
16:29.53AetmosYou can't find a point in your code prior to where it peaks the CPU?
16:30.07jastano, i'm trying to say that it hasn't ever done this before
16:30.14jastait must have started some time during the night
16:30.21jastawhile i just left everything running
16:30.35jastathe app isn't even running.
16:30.46Aetmosheh ;-)
16:30.48jasta(it's not visible to the user, but process is alive and using 100%)
16:31.00AetmosWhy don't you just kill the process?
16:31.00zhobbsjasta: I've had that happen in my app too
16:31.14jastaAetmos: because it seems like a bug in Android that should be investigated and reported.
16:31.27AetmosAh, well, yes.
16:32.29Aetmosunderstands now
16:32.44Aetmosso you want to break the current process to see what happened
16:32.46Aetmosgot it
16:32.50Aetmosno idea how to do that ;-)
16:33.06jastai figured out how to attach to it with ddms
16:33.16jastaand i can break and resume it
16:33.25jastabut it doesnt give me a stack trace or anything.  no idea how to do that :)
16:33.38jastaanyway, off to work
16:33.48Aetmoscya
16:41.25*** join/#android kristian-m (i=kristian@217.13.205.113)
16:42.28romainguy_re
16:49.53Aetmos.
16:55.26*** join/#android romainguy__ (n=gfx@72.14.224.1)
17:03.27zhobbsromainguy_: how can I change an activity's theme after calling setContentView()?
17:05.18romainguy__I don't think you can
17:07.07zhobbsno way to change the theme and then invalidate everything
17:07.40*** join/#android The_PHP_Jedi (n=ThePHPJe@adsl-64-237-163-166.prtc.net)
17:08.15zhobbsis is the theme only read prior to inflating
17:09.26romainguy__changing the theme could work but only for newly created views
17:10.11zhobbshmm, that would be useful to be able to change theme
17:10.38romainguy__certainly not for 1.0
17:13.07*** join/#android javahorn (n=shriani_@122.167.96.238)
17:13.27*** part/#android javahorn (n=shriani_@122.167.96.238)
17:14.36zhobbsit works if you re-setContentView...so might be workable
17:30.57*** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl)
17:35.21*** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl)
18:10.32*** join/#android Raven_coda (n=Raven_co@64.50.35.254)
18:15.32*** join/#android soulreaper (i=soul@p4FCE771D.dip.t-dialin.net)
18:22.55AetmosHow would I go about resizing an ImageView?
18:23.10zhobbslayout_width, layout_height
18:23.46Aetmosare those parameters?
18:23.52Aetmosdoesn't seem them in the docs
18:25.19zhobbsImageView.setLayoutParams( new LayoutParams( ... ) )
18:25.49AetmosI tried that, but can't seem to figure out where to import LayoutParams from
18:26.11AetmosCtrl-Shift-O gives me a list of 10 packages
18:26.15Aetmosnone of which seem to work
18:26.36AetmosI always get "LayoutParams cannot be resolved to a type"
18:26.36zhobbsViewGroup
18:27.01zhobbsViewGroup.LayoutParams
18:27.33AetmosSo I have this:
18:27.35Aetmosimport android.view.ViewGroup.LayoutParams;
18:27.40Aetmos.setLayoutParams(new LayoutParams())
18:27.46AetmosBut I get this:
18:27.47muthu<PROTECTED>
18:27.48muthu<PROTECTED>
18:27.57AetmosThe constructor ViewGroup.LayoutParams() is not visible
18:28.27AetmosHmm...I don't think I want to add a view
18:28.34AetmosIt's already there...I just want to resize i
18:28.36Aetmosit
18:28.50muthutry LinearLayout.LayoutParams
18:28.56Aetmostrying...
18:29.23muthui mean whatever layout you are using.. there must be a corresponding layout params
18:29.35zhobbsthat makes sense
18:29.50AetmosYeah, I'm using LinearLayout.
18:30.13AetmosThe constructor LinearLayout.LayoutParams() is undefined
18:30.37zhobbswell, are you passing 2 ints?
18:30.45AetmosI'm an idiot
18:31.00AetmosYes, that works
18:31.06zhobbs:)
18:31.06Aetmossmacks his forehead
18:31.08*** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl)
18:31.24AetmosTHanks
18:31.37zhobbsViewGroup should work also as LinearLayout is a indirect child of ViewGroup
18:31.46Aetmosokay, thanks
18:31.49*** join/#android krau (n=cktakaha@200.184.118.132)
18:32.34muthuzhobss: are you done with adc?
18:32.42muthuargghhh.. sorry zhobbs
18:32.45*** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl)
18:32.51zhobbsI was but signed on to another project
18:33.07muthuhow many are you doing?l
18:33.12zhobbs2
18:33.17muthucool
18:33.26zhobbsNeither of them are mine, just contract work
18:33.31muthuwoah
18:33.33muthugreat
18:33.34zhobbsI really wish I would have had time to do myself
18:34.12zhobbsbut..contract work pays rent now, adc winnings may or may not pay later
18:34.22muthucorrect
18:34.43muthuand you'll always be hired if you win
18:36.15zhobbsI'm really interested in the quality of the apps that will be entereed into the adc
18:37.16zhobbsSeems like it could go either way...50 really polished apps with really great ideas, or will there be some apps in there with interesting ideas that barely work
18:37.45AetmosMy app will be polished, but I'm not sure it's a good idea ;-(
18:37.59muthulol
18:38.17muthuyou need a bit of both
18:38.33zhobbsAetmos: yeah one of the ones I'm working on is very standard, but will be polished/eye pleasing
18:38.35muthupotential is something they'll look at
18:38.53muthuaetmos: what you working at?
18:39.00AetmosYeah, hopefully it will be a good idea once it's a fully fleshed out idea
18:39.09Aetmosmuthu: not allowed to talk about it...
18:39.13Aetmosmuthu: sorry ;-(
18:39.19zhobbshehe, no one will reveal
18:39.26zhobbsmuthu: are you working on the open intents stuff?
18:39.32muthuyeah
18:39.39muthui am
18:39.41zhobbsthat's cool, how many are working on that?
18:40.00muthuaround 4 to 5 active currently
18:40.14muthui'm trying to get active
18:40.29muthulot of members though
18:43.47AetmosHere's another question: Is there any way to specify "px", "dip", "sp", etc. in LayoutParams()?
18:44.46zhobbsAetmos: probably with ViewGroup.LayoutParams(Context c, AttributeSet attrs)
18:45.02zhobbsbut don't know any details on that
18:45.37Aetmosthanks. I'll take a look
18:45.54AetmosAny idea what the default is? "dip"?
18:46.17muthudefault is px i guess
18:46.23Aetmosokay, thanks
18:46.29zhobbsdoes px==dp==dip?
18:46.41AetmosI think it depends on the device, doesn't it?
18:46.48muthuyeah
18:47.05Aetmoswhat's dp?
18:47.13zhobbsdigital pixels
18:47.17Aetmosoh
18:47.21AetmosI use analog
18:47.25zhobbs:)
18:48.37*** join/#android romainguy (n=gfx@adsl-75-55-212-70.dsl.pltn13.sbcglobal.net)
18:49.07zhobbshey romainguy, is there a difference between px,dp,dip?
18:49.13*** join/#android zelip (n=zelip@nat/hp/x-aee83e2680cd1e40)
18:49.19romainguypx = pixels
18:49.25romainguydp = dip = device independent pixel
18:49.34Aetmosoh dp == dip?
18:50.11romainguyyes
18:50.27romainguyyou can also use pt, mm and in
18:50.33Aetmosso is it generally best to use dip when drawing?
18:50.46romainguyyes
18:50.54romainguyhmm, apparently we removed dp from the next SDK
18:51.10AetmosI didn't see dp in the docs...maybe that's why
18:51.17zhobbshehe, I've been only using dp
18:51.18romainguyit was there in M3
18:51.24romainguyzhobbs: switch to dip :)
18:52.06AetmosSo if dip is best, why does LinearLayout.LayoutParams default to px?
18:53.15*** join/#android crib (n=chris@port-195-158-167-8.dynamic.qsc.de)
18:53.15*** join/#android romainguy (n=gfx@adsl-75-36-221-4.dsl.pltn13.sbcglobal.net)
18:55.24*** join/#android Dan_U (n=Dan@70.41.192.219)
18:55.59Aetmoshmm...and AttributeSet has only getters, but no setters in the docs...
18:56.10*** part/#android muthu (n=sara@59.92.24.104)
18:57.01*** join/#android romainguy_ (n=gfx@72.14.224.1)
19:03.06jastayawn
19:04.28*** join/#android Dan_U (n=Dan@70-41-192-219.cust.wildblue.net)
19:14.44*** join/#android zelipe (n=zelip@nat/hp/x-dd0d0ee71176ddd7)
19:17.11*** join/#android Raven_coda (n=Raven_co@64.50.35.232)
19:18.52*** join/#android Yeggstry (n=mind@cpc1-rdng14-0-0-cust946.winn.cable.ntl.com)
19:25.00AetmosSo, I have a TextView, and the text is at the bottom of the view, but I want it in the middle. So, I set android:gravity="center_vertical", but it's still at the bottom...why?
19:28.31AetmosDoes gravity actually do anything?
19:29.31Aetmoslayout_gravity doesn't seem to work either
19:31.41romainguy_Aetmos: it does, are you sure your textview is larger than the text height?
19:32.08Aetmosromainguy_: yes, I've made the background of the textview green, so I can see it
19:32.12Aetmosthe text is at the bottom
19:32.40AetmosOddly, I have an ImageView with a shape stuck to the top...gravity can't bring that down either
19:32.59romainguy_it's weird because by default EditText uses a gravity of center_vertical
19:33.01romainguy_and it works
19:33.09Aetmoshmm
19:33.26*** join/#android crib (n=chris@port-195-158-167-8.dynamic.qsc.de)
19:37.43*** join/#android chomchom (n=chomchom@78.32.95.81)
19:38.06*** join/#android Dan_U (n=Dan@70-41-192-219.cust.wildblue.net)
19:51.44*** join/#android der_maddis (n=der_madd@dslb-088-066-040-142.pools.arcor-ip.net)
20:16.20*** join/#android raidfive (n=null@c-71-236-205-80.hsd1.wa.comcast.net)
20:17.38*** join/#android raidfive (n=null@c-71-236-205-80.hsd1.or.comcast.net)
20:27.59*** part/#android der_maddis (n=der_madd@dslb-088-066-040-142.pools.arcor-ip.net)
20:32.50*** join/#android SomeSpoons (n=tomadmin@c-98-226-6-195.hsd1.il.comcast.net)
20:34.27_avataris the MediaPlayer known to be a bit buggy? it seems to intermittently fail to play streamed mp3's. sometimes it works, sometimes my OnErrorListener is called with what=1, extra-0
20:46.13*** join/#android chomchom (n=chomchom@78.32.95.81)
20:50.22*** join/#android romainguy (n=gfx@adsl-75-36-221-4.dsl.pltn13.sbcglobal.net)
20:53.28*** join/#android romainguy (n=gfx@adsl-75-36-223-147.dsl.pltn13.sbcglobal.net)
20:54.31*** join/#android romainguy__ (n=gfx@72.14.224.1)
20:56.25*** join/#android Dan_U (n=Dan@70-41-192-219.cust.wildblue.net)
21:47.36*** join/#android chomchom (n=chomchom@78.32.95.81)
21:50.30*** join/#android Dan_U (n=Dan@70-41-192-219.cust.wildblue.net)
21:56.43*** join/#android romainguy (n=gfx@adsl-75-36-223-147.dsl.pltn13.sbcglobal.net)
21:58.59*** join/#android romainguy_ (n=gfx@adsl-75-36-210-105.dsl.pltn13.sbcglobal.net)
22:01.07*** join/#android aksyn_ (n=aksyn@cp1242056-a.schoo1.lb.home.nl)
22:07.39*** join/#android romainguy__ (n=gfx@adsl-75-36-210-105.dsl.pltn13.sbcglobal.net)
22:14.54*** join/#android romainguy (n=gfx@72.14.224.1)
22:25.47zhobbs_avatar: I'm finding MediaPlayer extremely buggy...
22:26.06_avatarok, good that I'm not the only one... the API seems pretty straight forward
22:26.31zhobbsI'm using it in a service and it's regularly crashing my service
22:26.46_avataryeah, its also crashing my Activity
22:26.51*** join/#android eton (n=eton@ppp-58-8-15-241.revip2.asianet.co.th)
22:27.16zhobbsI'm wondering if after each song I would be better off creating a new instance of MediaPlayer...I'm currently doing player.reset() and then reusing it
22:27.44zhobbsand it seems like between songs is when it's taking me down
22:27.47_avatardon't think that'll help, i'm not recycling the old instance :)
22:27.54_avatarthats exactly where i'm dying too...
22:28.03zhobbshmmm
22:28.27_avatari handle onMediaPlayerCompleted, and use it to queue up the next track
22:28.36zhobbsyeah me too
22:28.38_avatarit appears to die calling MediaPlayer.setDataSource()
22:28.58zhobbsso you create a new MediaPlayer object?
22:29.11_avataryeah
22:29.20zhobbs...who knows...
22:29.48_avatari doubt this makes a difference, what operating system are you using to run the emulator?
22:29.50zhobbssometimes it works too
22:29.53zhobbslinux
22:29.55_avataryeah, sometimes its fine
22:30.03_avatarlinux here as well, perhaps I should try it in windows
22:30.27zhobbsa guy I'm working with is having it happen on mac also
22:30.53_avatarhrm
22:31.45zhobbsI guess I'm just going to have to have my activity deal with in in a user friendly manner...try to recover and give an error message "MediaPlayer is broken!"
22:33.46_avatarhave you tried to use MediaPlayer.create(Context, Uri)? I doubt that'll make a difference, but I've been using the default constructor and setDataSource().
22:34.08zhobbsyeah, maybe I'll give that a shot
22:34.15zhobbshaven't tried it though
22:47.18*** join/#android duey (n=duey@203-190-208-12.innovationwaikato.co.nz)
22:48.02*** join/#android inZane- (i=nemo@dslb-084-058-002-091.pools.arcor-ip.net)
22:49.19*** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl)
22:53.56zhobbsactually seems like MediaPlayer worked better in M3
22:55.14_avatarhrm
22:55.21_avatarthat's unfortunate
22:58.06*** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl)
23:08.38*** join/#android Dan_U (n=Dan@70-41-192-219.cust.wildblue.net)
23:11.18_avatarzhobbs: fwiw, i just verified it also crashes in the windows emulator. no surprise i guess
23:13.29*** join/#android chomchom (n=chomchom@78.32.95.81)
23:19.00*** join/#android romainguy_ (n=gfx@adsl-75-36-210-105.dsl.pltn13.sbcglobal.net)
23:31.33*** join/#android ersi_ (n=ersi@81-237-203-165-no38.tbcn.telia.com)
23:35.16*** join/#android ovnicraft (n=ovnicraf@corp-190-12-31-140-cue.puntonet.ec)
23:42.22*** join/#android yakischloba (n=jake@rnkfoods.com)
23:47.32*** part/#android ovnicraft (n=ovnicraf@corp-190-12-31-140-cue.puntonet.ec)
23:52.43*** join/#android tmcneal (n=asdf@pool-151-199-245-93.phil.east.verizon.net)
23:59.50*** join/#android krau (n=cktakaha@189.70.14.252)

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