00:00.38 | *** join/#android mhilmi (n=mhilmi@modemcable083.241-82-70.mc.videotron.ca) |
00:02.37 | _avatar | so 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.13 | zhobbs | _avatar: not sure...the issue is that they won't be in R |
00:06.23 | _avatar | exactly. |
00:06.42 | zhobbs | You don't want your activity to be accessing your composite's children if they aren't in the xml you know? |
00:07.00 | zhobbs | the idea of the composite is that it will handle all the children |
00:08.39 | _avatar | hrm, 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 | _avatar | i guess i'll need to rethink my approach |
00:11.45 | zhobbs | _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 | _avatar | yeah, that's exactly what I just started to do :) |
00:12.27 | _avatar | sounds like i'm on the right track then |
00:12.38 | _avatar | thanks for the advice, much appreciated |
00:16.52 | zhobbs | 700 Mhz auction is over, winners anounced within 10 days |
00:25.32 | jasta | zhobbs: really? exciting :) |
00:25.36 | jasta | what was the winning bid? |
00:26.11 | jasta | zhobbs: or, depending on your intention, getTextView().setText() |
00:26.25 | zhobbs | http://www.helloandroid.com/node/317 |
00:26.35 | zhobbs | ^ about auction |
00:26.44 | zhobbs | 19.6B total |
00:26.57 | zhobbs | 4.75 billion for C-block |
00:27.21 | zhobbs | jasta: that's true, you could just create getters for the child views |
00:27.42 | jasta | it might make sense and it might not; it would depend on what your views purpose is |
00:54.24 | Aetmo1 | ugh. Verizon? |
00:54.29 | Aetmo1 | Aetmos |
00:54.38 | Aetmos | god, I hate Verizon |
00:54.51 | zhobbs | Maybe they'll be better now |
00:54.57 | Aetmos | I doubt it |
00:55.14 | Aetmos | The only good thing is that they've said they're going to open their network for Android phones |
00:55.24 | Aetmos | But my experience with them in the past has been miserable |
00:56.01 | romainguy | Aetmos: I still can't get over the fact that they have no SIM cards in phones |
00:56.04 | zhobbs | Aetmos: customer support or reception? |
00:56.17 | Aetmos | zhobbs: both and more |
00:56.23 | zhobbs | didn't know about the sim card thing |
00:56.26 | Aetmos | I was unlucky enough to have them for local service and DSL |
00:56.31 | Aetmos | a long time ago |
00:56.36 | Aetmos | well, 5 years or so |
00:56.42 | zhobbs | Aetmos: I'd like to have Verizon FiOS |
00:56.50 | Aetmos | I'd like to have FiOS |
00:56.53 | Aetmos | not Verizon |
00:57.57 | Aetmos | If it was Verizon, they'd probably take 6 months to set it up, and for no apparent reason I'd get 2800bps |
00:58.07 | Aetmos | Then I'd call tech support, and they'd hang up on me |
00:58.23 | zhobbs | If google wins they'll probably lease it or trade it |
00:58.35 | jasta | romainguy: you're thinking of Sprint, I think. |
00:58.46 | romainguy | jasta: Verizon does that too |
00:59.19 | jasta | really? |
00:59.20 | Aetmos | I 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.27 | Aetmos | What the heck is the point of 3G, then? |
00:59.43 | Aetmos | Or maybe it was 2.75G |
00:59.46 | Aetmos | EDGE, I think |
00:59.49 | Aetmos | ... |
00:59.52 | romainguy | jasta: 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.57 | jasta | romainguy: 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.12 | romainguy | I have no idea |
01:01.21 | romainguy | all I know is that it forces you to stick with their devices |
01:01.21 | jasta | I would have to think yes |
01:01.28 | romainguy | and good luck to get personal data out of the phone |
01:01.59 | Aetmos | romainguy: yeah, makes it hard to recycle the phones |
01:22.24 | *** join/#android nslu2-log (n=nslu2-lo@nslu2-linux/dyoung) |
01:31.22 | zhobbs | Is 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.07 | romainguy | -noaudio |
01:32.09 | romainguy | type emulator --help to see all options |
01:32.19 | zhobbs | ahh |
01:39.37 | *** join/#android mypapit (n=mypapit@pdpc/supporter/active/mypapit) |
01:49.03 | jasta | romainguy: *poke* |
01:50.00 | jasta | i 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.05 | jasta | D/dalvikvm( 1275): Exception Ljava/io/IOException; from BufferedInputStream.java:264 not caught locally |
01:50.13 | jasta | then it draws just like i expect it to |
01:50.24 | jasta | do you know what that's about? |
01:51.13 | jasta | the 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.02 | zhobbs | jasta: I've been wondering what kind of column does the SimpleCursorAdapter expect to be binded to an ImageView? |
01:58.14 | jasta | text, specifying a content:// uri. |
01:58.20 | zhobbs | ok |
01:58.46 | jasta | i had hoped it would be able to tolerate null or empty values as well |
01:58.49 | jasta | but maybe not :) |
01:59.14 | zhobbs | gotta point it to an empty pic |
01:59.38 | zhobbs | but yeah, you'd think it could handle null |
01:59.42 | jasta | well it works, and maybe it has nothing to do with this |
01:59.46 | jasta | but 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.09 | jasta | lol |
02:01.17 | jasta | what the heck? |
02:01.20 | *** join/#android chaosvoyager (n=Miranda@pool-72-80-180-212.nycmny.fios.verizon.net) |
02:01.24 | jasta | the code looks like: |
02:01.46 | jasta | try { v.setImageResource(Integer.valueOf(value)) } catch (NumberFormatException e) { v.setImageURI(Uri.parse(value)); } |
02:02.04 | jasta | it first tries to interpret the database row as an image resource number? |
02:02.46 | zhobbs | strange way of doing it |
02:03.10 | jasta | agreed, i wonder why you'd ever want to store a resource id into a database? |
02:03.14 | jasta | that seems like a miserable strategy |
02:03.39 | jasta | i guess simplecursoradapter's not just for database cursors, though |
02:03.52 | zhobbs | hm |
02:15.01 | jasta | yeah, 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.23 | jasta | not sure what Integer.valueOf("") yields, though. |
02:21.10 | f00f- | matybe a numformat ex |
02:21.31 | zhobbs | yeah, it must throw the exception |
02:43.48 | tmcneal | it's a nice feeling when code works the first time :) |
02:43.55 | tmcneal | it's a rare feeling, for me at least :p |
02:44.26 | zhobbs | for sure |
02:44.40 | chomchom | definitely , had that last night |
02:44.52 | chomchom | completely not happening tonight though |
02:45.42 | chomchom | My happiness has been devoured by SQL JOINS |
02:46.05 | tmcneal | hehe |
02:46.10 | zhobbs | mine is being destroyed by MediaPlayer + DeadObjectExceptions |
02:46.21 | zhobbs | MediaPlayer 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.06 | jjt009 | hello |
02:54.07 | jjt009 | to all |
02:54.10 | chaosvoyager | Hmm, youknow, why should you be getting DeadObjectExceptions on an emulator anyway? That should only happen when resources are low, right? |
02:54.18 | jjt009 | i have a quick question |
02:54.26 | jjt009 | ok, here goes... |
02:54.51 | jjt009 | i 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.27 | jjt009 | can anyone point me to a better channel? |
02:56.45 | zhobbs | jjt009: you using the Search object? |
02:56.53 | jjt009 | no |
02:57.08 | jjt009 | i'm just connecting to Google Maps web service with UrlConnection |
02:57.20 | zhobbs | Use a Search object |
02:57.22 | jjt009 | this is a basically a question about the use of google maps |
02:57.29 | jjt009 | ok what package? |
02:57.34 | tmcneal | jjt: are you using the GmmGeocoder class? |
02:57.39 | tmcneal | ohh |
02:57.51 | jjt009 | GmmGeocoder is supposed to be unsupported |
02:57.59 | tmcneal | yep |
02:58.03 | tmcneal | i use it anyways tho. |
02:58.06 | chaosvoyager | hmm.... |
02:58.07 | jjt009 | it also doesn't work for me |
02:58.11 | jjt009 | for some reason |
02:58.13 | *** join/#android _ken____ (n=user@84.92.70.37) |
02:58.21 | tmcneal | i've got it working fine except it doesn't return the business name for some reason |
02:58.55 | jjt009 | i decompiled android.jar and found that it uses the same bogus White House addresses as the supported Geocoding classes |
02:59.28 | jjt009 | zhobbs: where can i find the Search object? |
02:59.29 | tmcneal | right, that's what GeoCoder uses.. however the Contacts application returns real addresses |
02:59.36 | tmcneal | so it's either using GmmGeocoder, or the Google API |
02:59.45 | zhobbs | jjt009: android.app.SearchManager |
02:59.48 | jjt009 | i should try that out |
02:59.59 | jjt009 | the Contacts app |
03:00.17 | jjt009 | ok thanks |
03:00.20 | zhobbs | jjt009: there is an example in the ApiDemos I think |
03:00.25 | jjt009 | thanks |
03:01.35 | jjt009 | can you use Search outside of local data on the phone? |
03:01.53 | jjt009 | for websites? |
03:02.07 | zhobbs | jjt009: 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.18 | o3u | omg :( "Challenge is void in, and not open to residents of, Italy and the Quebec Province of Canada" |
03:07.14 | jjt009 | sweet thanks |
03:07.15 | chaosvoyager | The challenge is overrated. If you can make a killer mobile app, you can make your cash the old fashioned way. |
03:07.29 | jjt009 | Can i win the challenge? |
03:07.44 | chaosvoyager | Potentially anyone can. |
03:07.45 | jjt009 | What are my chances? |
03:07.58 | chaosvoyager | Unless you're in Italy or Quebec. |
03:08.25 | jjt009 | how many entries do you think there will be? |
03:08.34 | chomchom | 1bajillion |
03:08.46 | jjt009 | i'm guessing 700-800 |
03:09.10 | chaosvoyager | That's like trying to guess how many jellybeans are in the jar. |
03:09.41 | jjt009 | if i just port an app from wm(WINMOB) to android, do i have a chance of winning? |
03:09.53 | chomchom | yeah, 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.03 | jjt009 | true, ture |
03:10.05 | jjt009 | true |
03:10.22 | jjt009 | 25,000 is some good money |
03:10.50 | chaosvoyager | One 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.14 | chaosvoyager | er, 'certain' entries that is. |
03:11.27 | jjt009 | the lack of a working prototype is really annoying |
03:11.37 | jjt009 | an emulator just cant match the real thing |
03:11.52 | jjt009 | and who knows if android will turn out to be a flop |
03:12.13 | jjt009 | then our development was for nothing |
03:12.14 | chaosvoyager | Then again, I wonder if you can you submit a 'theoretically' working entry... |
03:12.37 | jjt009 | well, all apps are theoretically working |
03:12.37 | chomchom | There 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.07 | chomchom | I've been on job web sites where people bid on work for like $10 |
03:13.56 | chomchom | If 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.56 | tmcneal | good point chaosvoyager. there will definitely be lots of duplicate entries |
03:16.19 | *** join/#android romainguy (n=gfx@69.36.227.131) |
03:16.24 | jjt009 | and a lot of low-quality ones as well |
03:16.39 | chaosvoyager | chomchom: Man, I use to trudge the software bounty websites and see things like that too. |
03:17.07 | jjt009 | things that don't make good use of android functionality |
03:17.12 | tmcneal | it's quite an unknown tho, the quality and quantity of the entries.... |
03:17.30 | chomchom | I would bank on high quality. |
03:18.00 | chaosvoyager | I hate to say the current quality of Android is a big limiting factor. |
03:18.08 | jjt009 | i'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.18 | jjt009 | with actual devices |
03:18.35 | jjt009 | then the phone's unique functionality wouldn't really matter |
03:18.42 | tmcneal | and 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.01 | chaosvoyager | I have NO idea why Google is doing this. |
03:19.33 | jjt009 | yep, so many competitors like symbian and wm that are already established in the market |
03:19.43 | jjt009 | i don't see what's so great about android |
03:19.50 | jjt009 | linux phones have been out for a while |
03:19.56 | jjt009 | and have found little success |
03:20.48 | jjt009 | symbian is already highly developer oriented |
03:21.05 | jjt009 | android is really just trying to find a place in a niche that other companies have already filled |
03:21.36 | tmcneal | i don't really agree with that... |
03:21.39 | chaosvoyager | Symbian is a PITA to dev for. |
03:22.14 | jjt009 | i haven't really developed much for it |
03:22.28 | tmcneal | there'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.32 | o3u | Android is making more developpers aware of the new technology available on all kinds of handsets, |
03:22.49 | jjt009 | true |
03:22.55 | o3u | thereby attracting new ideas, and a wider vision of development potential |
03:23.02 | jjt009 | i'm still waiting for the source |
03:23.03 | jasta | i think Android is more hoping to change the landscape of the industry than to just earn google some short-term profits. |
03:23.06 | f00f- | 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.13 | tmcneal | plus phones are getting more powerful, data plans and faster data access on phones is getting more ubiquitous.. |
03:23.14 | jasta | Android is a very potent way to get more people thinking about smartphones, and more importantly: internet access. |
03:23.29 | o3u | but frankly, i could have used 25k to invest in some backbone servers for my killer app :( this is disappointing |
03:23.34 | jasta | and that benefits google in the long run, even more than Android as an instance of that does. |
03:23.44 | f00f- | the problem with symbian is that its architectural semantics were designed for phones of the 90's. |
03:24.01 | chaosvoyager | Well, deja vu. |
03:24.14 | *** join/#android rwhitby (n=rwhitby@nslu2-linux/rwhitby) |
03:24.42 | f00f- | 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.00 | f00f- | Open C is a much better alternative, but not default or standard yet |
03:25.01 | jasta | that was weird. |
03:25.05 | {HelloWorld} | helppp |
03:25.07 | f00f- | heh |
03:25.10 | chaosvoyager | Indeed. |
03:25.30 | {HelloWorld} | can anybody help me out? |
03:25.44 | chaosvoyager | Possibly. |
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.53 | romainguy | WHere 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.36 | chaosvoyager | f00f: 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.08 | f00f- | chaosvoyager: well that's something out of our control :P |
03:28.21 | f00f- | surely it's different on mobile platforms |
03:28.30 | {HelloWorld} | romainguy: could you help me out? :-/ |
03:28.45 | chaosvoyager | Well, it was one of the reasons for Dalvik. |
03:28.47 | romainguy | Unless you explain the problem clearly, no :) |
03:28.50 | jasta | romainguy: 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.38 | f00f- | jasta: like a null-column hack ... would be good? |
03:29.38 | romainguy | jasta: I guess it's trying to load an image with the URI null |
03:30.16 | jasta | romainguy: which does what? |
03:30.30 | romainguy | jasta: Apparently it craps out |
03:30.34 | jasta | yes ;) |
03:30.58 | romainguy | Actually |
03:31.08 | romainguy | by default I think we turn null values to the empty String |
03:31.13 | romainguy | I would have to look at the code |
03:31.19 | jasta | (you do) :) |
03:32.55 | jasta | weirder still, you guys first try setImageResource() on the value converted to an integer. |
03:33.00 | jasta | then fallback to setImageURI |
03:33.03 | jasta | which makes no sense to me |
03:33.04 | romainguy | yes |
03:33.09 | romainguy | ah |
03:33.13 | romainguy | well it makes sense to us :) |
03:34.32 | jasta | well, 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.37 | chaosvoyager | I wonder how many devs are in this for the prize money... |
03:35.56 | romainguy | chaosvoyager: Ask on this channel :) |
03:35.57 | chomchom | 1bajillion |
03:36.02 | f00f- | i know i am. |
03:36.24 | f00f- | obviously not for my caribbean vacation... |
03:36.33 | chomchom | f00f: its a good thing you are going to win then. |
03:36.43 | f00f- | agreed. |
03:38.10 | chaosvoyager | So I'm the only one in ot for world power? |
03:38.38 | chaosvoyager | well, 1bajillion is pretty much the same thing :? |
03:38.57 | f00f- | seriously, i'd say 5,000 to 10,000 entries. |
03:39.19 | f00f- | it's going to be a cesspit |
03:39.31 | f00f- | but after weeding out the rubbish, we'll probably have |
03:39.39 | f00f- | 100 - 150 solid entries |
03:39.59 | f00f- | i'd say that's the best case scenario |
03:40.11 | f00f- | worst case could be, all of us in here win |
03:40.30 | jasta | i 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.32 | tmcneal | that's the worst case? :) |
03:40.47 | chaosvoyager | Strangely, I believe that's also close to the ration of developers who are actually participating in the Google groups and channels too. |
03:41.32 | chaosvoyager | Actually, I have no idea. I hate questions like this. I never win the jellybeans. |
03:41.46 | tmcneal | well it's fun to speculate :) |
03:41.48 | f00f- | 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.15 | chomchom | If 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.36 | chaosvoyager | It 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.10 | f00f- | less |
03:45.26 | chomchom | Hit ranking analysis: http://www.alexa.com/data/details/traffic_details/code.google.com/android/adc-submit/index.html |
03:46.36 | chomchom | And here: http://siteanalytics.compete.com/code.google.com/?metric=uv |
03:46.38 | chaosvoyager | Well, the math is a bitch and a half to back that up :) |
03:47.23 | f00f- | wait |
03:47.26 | f00f- | that is for google.com |
03:48.08 | chomchom | The one for compete does seem to cut it down to the base domain |
03:48.12 | f00f- | wtf is up with these sites |
03:48.25 | f00f- | they never got the memo about subdomains |
03:49.15 | f00f- | a good metric would be how many people download the SDK |
03:49.52 | f00f- | 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.30 | f00f- | http://code.google.com/android/ |
03:51.31 | f00f- | hahaha |
03:51.32 | f00f- | rofl |
03:51.35 | f00f- | @ Community posts |
03:52.03 | chaosvoyager | Well, 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.39 | f00f- | "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.57 | f00f- | 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.09 | chaosvoyager | I'm not sure what you're asking, at least as far as CharSequence. |
04:01.15 | jasta | <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.05 | jasta | you wouldn't, at least not directly. |
04:02.28 | {HelloWorld} | ummm... so..? |
04:03.34 | jasta | so... what? |
04:03.47 | jasta | also, 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.27 | jasta | no, you're specifying a charsequence. |
04:04.44 | {HelloWorld} | it throws an ArrayIndexOutOfBound for some reason... :-/ |
04:04.55 | jasta | because you're using something incorrectly. |
04:05.24 | {HelloWorld} | hmmm.. |
04:05.26 | {HelloWorld} | potentially? |
04:05.33 | jasta | if 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.14 | muthu | what 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.23 | muthu | ok |
04:36.19 | jasta | {HelloWorld}: just make a list silly. |
04:36.34 | jasta | use 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.26 | jasta | you 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.56 | jasta | you 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.04 | jasta | you 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.25 | jasta | (sorry for suggesting ArrayAdapter, you are correct about that one) |
04:39.36 | jasta | I was thinking ArrayListCursor, which I have personally done quite a few times. |
04:39.55 | jasta | although 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.04 | jasta | i'm not sure I'd recommend that approach if you're just looking to get going. |
04:42.12 | jasta | ArrayListCursor would be much easier. |
04:42.27 | jasta | then you could just use a [Simple]CursorAdapter and not fuss with it. |
04:42.55 | {HelloWorld} | hmmm |
04:43.00 | jasta | or 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.35 | jasta | not 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.01 | jasta | http://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.10 | jasta | i 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.46 | muthu | jasta: looks like you've been busy coding the last few days |
04:48.52 | jasta | how so? |
04:48.58 | muthu | not seen here |
04:49.10 | jasta | oh, i'm irish, and it was st. patrick's day weekend. |
04:49.15 | muthu | oh great |
04:49.17 | jasta | so, that's why :) |
04:49.22 | muthu | now i know |
04:49.24 | *** join/#android duey (n=Nick@203.96.223.40) |
04:49.40 | jasta | but now i'm busy coding :) |
04:50.09 | muthu | today i have to force myself to code something.. lately i've been a twitter addict |
04:50.18 | muthu | checking out a few things on twitter.. very interesting |
04:51.18 | f00f- | jasta: if you had to choose, guinnes draught in a bottle or a can? |
04:51.25 | f00f- | +s |
04:51.37 | jasta | obviously a can, that stupid rocket widget doesn't work at all. |
04:51.56 | f00f- | hmm, are you supposed to pour the bottle one in a timeframe too? |
04:52.03 | f00f- | like what is it 17.2 seconds? |
04:52.25 | f00f- | so do you drink it straight out of the can or pour it? |
04:52.29 | muthu | does the taste differ? |
04:52.53 | jasta | f00f-: Well, the only time I personally have ever drank it from a can was to make car bombs for parties, so... |
04:52.57 | tmcneal | my opinion: either way it tastes like coffee grinds :p |
04:53.03 | jasta | I mean, other than to taste it :) |
04:53.12 | f00f- | lol |
04:53.23 | f00f- | well i'd prefer tap any day, but i don't have a bar in my home |
04:53.26 | muthu | which beer is the best? |
04:53.39 | tmcneal | harp's pretty good |
04:53.58 | muthu | ok.. that's a silly question |
04:53.58 | tmcneal | it's guinness' lager |
04:53.58 | f00f- | imho guinness is a good food beer |
04:54.02 | chaosvoyager | The King of Beers took power by underhanded means. |
04:54.09 | muthu | all beer are good ;) |
04:54.19 | jasta | f00f-: I don't generally drink Guinness unless I'm drinking socially, and I do most of that at bars so... |
04:54.35 | jasta | But like I said, car bombs at home :) |
04:54.40 | f00f- | ya |
04:54.59 | muthu | how do you make a car bomb? |
04:55.00 | jasta | If I was being absolutely honest, I'd say that I prefer Amber beers for drinking casually. |
04:55.17 | f00f- | i definitely wouldn't waste a Guinness socially |
04:55.21 | f00f- | unless it was with a good meal :) |
04:55.27 | jasta | muthu: Half pint of guinness with a shot of mostly jameson and a bit of bailey's. Drop the shot in and chug. |
04:55.46 | jasta | f00f-: Waste it socially? Are you mad? |
04:55.59 | chaosvoyager | Probably. |
04:56.02 | jasta | Guinness is best had with friends and conversation. |
04:56.03 | muthu | good to know.. i've seen pictures not tried it myself |
04:56.17 | f00f- | well, yeah in those terms 'socially' yes |
04:56.18 | f00f- | absolutely |
04:56.22 | f00f- | but not to get drunk or anything |
04:56.30 | jasta | Ahh, ok. |
04:56.33 | jasta | I meant casually as that. |
04:56.57 | jasta | As in, few beers after work or whatever. For that, I much prefer ambers. More relaxing to me. |
04:57.21 | jasta | we have this very delicious local microbrew called Mac & Jack's here in Seattle. Mmm, delicious :) |
04:57.54 | jasta | i'm always disappointed to travel anywhere else in the US because all the local microbrewed ambers are shit :) |
04:58.00 | muthu | anyone drank KingFisher? |
04:58.27 | chaosvoyager | You mean there's no more left? |
04:58.40 | f00f- | i was never a big fan of ambers, but what do i know |
04:58.45 | f00f- | aren't ambers and stout kind of opposites? |
04:59.19 | jasta | I dunno, in what sense do you mean? |
04:59.27 | chaosvoyager | Arch enemies. |
04:59.33 | jasta | Oh, well sure :) |
04:59.43 | f00f- | well just in terms of look and taste |
05:00.01 | f00f- | amber feels very aggressive in taste |
05:00.02 | muthu | drinking beer everyday makes scientist less productive - a new study, read today |
05:00.10 | chaosvoyager | Like those beers that played football on that one superbowl commercial. |
05:00.25 | f00f- | uh.. yeah |
05:00.28 | muthu | beer used as a litmus test? - that was the title |
05:00.56 | f00f- | haha |
05:01.13 | chaosvoyager | Which beer best enables me to magically enter kung-fu movies? |
05:01.16 | f00f- | http://www.nytimes.com/2008/03/18/science/18beer.html |
05:02.19 | muthu | that's the one |
05:03.14 | muthu | In 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.23 | muthu | :) |
05:03.29 | chaosvoyager | I like the Belgian ales. |
05:03.47 | chaosvoyager | Strangely, a lot of those are brewed by Monks. |
05:04.10 | f00f- | maybe we can reverse it muthu? |
05:04.18 | f00f- | that is, drink beer and then *try* to concentrate |
05:04.20 | chaosvoyager | So let me get this straight, you BREW beer, but you don't DRINK beer? |
05:04.24 | f00f- | to work on android project for example |
05:04.32 | chaosvoyager | Or do Trappist Monks drink? |
05:05.18 | chaosvoyager | Scratch that, wikipedia says they do. |
05:05.40 | muthu | yeah.. drink beer and code android! |
05:05.52 | f00f- | i've done that on many an occasion |
05:06.01 | f00f- | maybe that's why my questions to jasta always seem ridiculous ;) |
05:06.15 | jasta | ...maybe. :) |
05:06.57 | chaosvoyager | 0_o Trappist monks say \ldblquote Don\rquote t drink our beer\rdblquote -> http://mondaynightbrewery.com/?p=473 |
05:08.52 | jasta | hmm, it just occurred to me that my ViewBinder's are all really inefficient |
05:09.26 | f00f- | just the sheer number of method calls doesn't sound efficient |
05:09.33 | f00f- | 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.47 | thedaniel` | i feel like i'm missing the obvious bug in this line that is causing c = null : someone sanity check for me? |
05:56.53 | thedaniel` | Cursor c = getContentResolver().query(People.CONTENT_URI, new String[] {People._ID, People.NAME}, People._ID+"="+mThisContactId, null, null); |
05:57.35 | thedaniel` | (people being android.provider.Contacts.People) |
05:57.54 | jasta | c is null, or is empty? |
05:57.58 | thedaniel` | null |
05:58.21 | jasta | that i can't say :) |
05:58.25 | jasta | does adb logcat say anything? |
05:59.07 | thedaniel` | jasta: oh duh, thanks |
05:59.26 | thedaniel` | uncaught remote exception, a problem with the generated sql somehow |
05:59.48 | thedaniel` | my query must not be right |
06:00.11 | jasta | well, they're the ones that construct the query |
06:00.24 | jasta | though are you sure that mThisContactId is not some silly string? :) |
06:01.06 | thedaniel` | jasta: yeah, it's a getLong from another cursor |
06:01.23 | thedaniel` | in this case it is 1L |
06:01.33 | jasta | well, adb logcat should somewhere show you the failed query |
06:01.38 | jasta | perhaps you can deduce what strangeness they have done |
06:02.28 | thedaniel` | 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.12 | thedaniel` | hm, someone posted to android-developers a month ago with no reply from anyone |
06:03.15 | jasta | perhaps 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.32 | jasta | Really, Content Providers are not as abstract and self-documenting and Google would have us think :) |
06:03.36 | thedaniel` | lol |
06:03.39 | f00f- | or just "SELECT t1.uniqbleh AS _id ..." |
06:03.45 | jasta | they are, in my opinion, Android's most serious weakness. |
06:04.02 | jasta | as*, not and :P |
06:05.28 | muthu | the "selection" part - doesn't look right to me |
06:05.39 | thedaniel` | this is the generatedquery: |
06:05.42 | thedaniel` | 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.58 | thedaniel` | muthu: yeah, this is the first i've used a contentprovider, and i suspect the selection is the problem |
06:06.40 | jasta | see, if you change Phone._ID to "phones._id", it will work (but that is strange, of course) |
06:06.43 | thedaniel` | muthu: i think.. that i need to construc the URI with the id |
06:06.48 | thedaniel` | and leave the selection null. |
06:07.00 | jasta | yes, that would be a much better way to go, if possible. |
06:07.23 | thedaniel` | jasta: easily possible, i was just thinking of the content provider too much as a db |
06:08.51 | jasta | well it is unfortunately neither a good abstraction of a db, nor is it a good interface to one :) |
06:10.00 | muthu | i do something like this |
06:10.03 | muthu | <PROTECTED> |
06:10.03 | muthu | <PROTECTED> |
06:11.25 | muthu | from the sql.. you need to specify which _id you are talking about |
06:14.31 | thedaniel` | muthu: yeah, but i am not accessing the sqlite db, i have to go through a contentprovider |
06:15.02 | thedaniel` | 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.07 | thedaniel` | <PROTECTED> |
06:15.10 | thedaniel` | http://code.google.com/android/migrating/m3-to-m5/m5-api-changes.html#sql |
06:15.37 | thedaniel` | 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.05 | muthu | not 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.47 | muthu | i thought spinner took arraylist |
07:00.21 | {HelloWorld} | no it's not |
07:01.44 | muthu | none 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.41 | muthu | helloworld: i've used arrayadapter with spinner |
07:08.52 | *** join/#android chomchom (n=chomchom@78.32.95.81) |
07:08.54 | muthu | i 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.55 | jasta | {HelloWorld}: ugh, dude, this is not as complicated as you are making it out to be |
07:11.06 | muthu | yeah.. i'm not getting it |
07:11.18 | jasta | you don't have to use an ArrayAdapter, that is just the one used by the demos. |
07:11.30 | {HelloWorld} | sure |
07:12.02 | jasta | including, i'm sure, CursorAdapter. |
07:12.10 | jasta | and then you could use ArrayListCursor |
07:12.16 | jasta | i don't know why you are making this so hard? |
07:13.42 | jasta | i have to go to bed, though |
07:14.02 | muthu | good 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.25 | raidfive | does anyone know where I can find the relationships between UI xml for a specific element and the java code equivalent? |
07:38.56 | raidfive | example: android:id="@+id/name" -> element.setId(num) |
07:39.45 | raidfive | I 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.28 | raidfive | or is there a way to apply the UI xml to multiple progress bars that are created dynamically? |
07:50.44 | raidfive | I've figured out all of them except: style="?android:attr/progressBarStyleHorizontal" |
08:03.26 | muthu | raidfive: look in android.R docs |
08:04.07 | raidfive | yea I just stumbled across that ... |
08:05.00 | raidfive | ProgressBar(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.43 | muthu | you can pass null |
08:10.38 | muthu | within the docs.. there was some explanation on how to do this mapping actually |
08:10.55 | muthu | i must admit its all hidden. and not easy to find |
08:11.03 | raidfive | yea I have no clue what they are even used for |
08:11.11 | raidfive | seems to be a reoccuring trend :) |
08:11.28 | raidfive | not too impressed with documentation so far |
08:15.24 | raidfive | great, progress bar isn't displaying now since I moved away from the xml layout |
08:15.32 | raidfive | http://pastie.caboo.se/167691 |
08:15.36 | muthu | raidfive: have you looked at the apidemos? |
08:15.37 | raidfive | see anything wrong with that? |
08:15.59 | muthu | there were some progressbar examples |
08:16.19 | raidfive | yea 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.46 | muthu | ah yes |
08:17.50 | muthu | they 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.28 | muthu | raidfive: do this - setProgressBarVisibility(true); |
08:20.08 | raidfive | that is for the progress bar in the view title bar ... |
08:20.30 | raidfive | ProgressBar doesn't have that method |
08:21.04 | muthu | hmmm |
08:21.33 | muthu | then may be its the null attributes you are passing |
08:21.55 | raidfive | great :) |
08:30.04 | raidfive | time to try to figure those out :/ |
08:30.33 | muthu | good luck :) |
08:30.38 | raidfive | so is there no way to apply a single xml ui styling to multiple object instances? |
08:31.00 | muthu | i haven't tried it yet |
08:31.16 | muthu | i'm staying away from r&d for now |
08:31.28 | raidfive | well you have the unique id for the element, so it seem unlikely |
08:31.51 | muthu | check 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.46 | Vipsy | Any android app for call recording? |
13:26.59 | zhobbs | Vipsy: can't record calls currently |
13:27.37 | Vipsy | Oh.. 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.47 | muthu | http://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.55 | jasta | hmm, 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.50 | Aetmos | guess 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.31 | jasta | i'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.20 | Aetmos | while(1); |
16:23.21 | Aetmos | ? |
16:23.35 | Aetmos | ;-) |
16:24.47 | Aetmos | <sigh> I *always* forget to add new Activities to my AndroidManifest file... |
16:25.01 | Aetmos | every single time |
16:26.27 | Stephmw | jasta: such a shame you can't use the JVM debug/profiling hooks |
16:27.05 | jasta | i want to just break it and investigate the call stack |
16:27.08 | jasta | but i dont know how ;) |
16:27.21 | Aetmos | add a breakpoint? |
16:27.28 | jasta | right, but where? |
16:27.51 | Aetmos | line 123 of InfiniteLoop.java |
16:28.51 | Aetmos | <---- Smart Ass |
16:29.10 | jasta | hopefully one of the google folks can help me out |
16:29.21 | jasta | because i do want to debug this; i suspect my app's not the thing that's really busy |
16:29.28 | jasta | activitymanager is probably screwing with it or something |
16:29.53 | Aetmos | You can't find a point in your code prior to where it peaks the CPU? |
16:30.07 | jasta | no, i'm trying to say that it hasn't ever done this before |
16:30.14 | jasta | it must have started some time during the night |
16:30.21 | jasta | while i just left everything running |
16:30.35 | jasta | the app isn't even running. |
16:30.46 | Aetmos | heh ;-) |
16:30.48 | jasta | (it's not visible to the user, but process is alive and using 100%) |
16:31.00 | Aetmos | Why don't you just kill the process? |
16:31.00 | zhobbs | jasta: I've had that happen in my app too |
16:31.14 | jasta | Aetmos: because it seems like a bug in Android that should be investigated and reported. |
16:31.27 | Aetmos | Ah, well, yes. |
16:32.29 | Aetmos | understands now |
16:32.44 | Aetmos | so you want to break the current process to see what happened |
16:32.46 | Aetmos | got it |
16:32.50 | Aetmos | no idea how to do that ;-) |
16:33.06 | jasta | i figured out how to attach to it with ddms |
16:33.16 | jasta | and i can break and resume it |
16:33.25 | jasta | but it doesnt give me a stack trace or anything. no idea how to do that :) |
16:33.38 | jasta | anyway, off to work |
16:33.48 | Aetmos | cya |
16:41.25 | *** join/#android kristian-m (i=kristian@217.13.205.113) |
16:42.28 | romainguy_ | re |
16:49.53 | Aetmos | . |
16:55.26 | *** join/#android romainguy__ (n=gfx@72.14.224.1) |
17:03.27 | zhobbs | romainguy_: how can I change an activity's theme after calling setContentView()? |
17:05.18 | romainguy__ | I don't think you can |
17:07.07 | zhobbs | no 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.15 | zhobbs | is is the theme only read prior to inflating |
17:09.26 | romainguy__ | changing the theme could work but only for newly created views |
17:10.11 | zhobbs | hmm, that would be useful to be able to change theme |
17:10.38 | romainguy__ | 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.36 | zhobbs | it 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.55 | Aetmos | How would I go about resizing an ImageView? |
18:23.10 | zhobbs | layout_width, layout_height |
18:23.46 | Aetmos | are those parameters? |
18:23.52 | Aetmos | doesn't seem them in the docs |
18:25.19 | zhobbs | ImageView.setLayoutParams( new LayoutParams( ... ) ) |
18:25.49 | Aetmos | I tried that, but can't seem to figure out where to import LayoutParams from |
18:26.11 | Aetmos | Ctrl-Shift-O gives me a list of 10 packages |
18:26.15 | Aetmos | none of which seem to work |
18:26.36 | Aetmos | I always get "LayoutParams cannot be resolved to a type" |
18:26.36 | zhobbs | ViewGroup |
18:27.01 | zhobbs | ViewGroup.LayoutParams |
18:27.33 | Aetmos | So I have this: |
18:27.35 | Aetmos | import android.view.ViewGroup.LayoutParams; |
18:27.40 | Aetmos | .setLayoutParams(new LayoutParams()) |
18:27.46 | Aetmos | But I get this: |
18:27.47 | muthu | <PROTECTED> |
18:27.48 | muthu | <PROTECTED> |
18:27.57 | Aetmos | The constructor ViewGroup.LayoutParams() is not visible |
18:28.27 | Aetmos | Hmm...I don't think I want to add a view |
18:28.34 | Aetmos | It's already there...I just want to resize i |
18:28.36 | Aetmos | it |
18:28.50 | muthu | try LinearLayout.LayoutParams |
18:28.56 | Aetmos | trying... |
18:29.23 | muthu | i mean whatever layout you are using.. there must be a corresponding layout params |
18:29.35 | zhobbs | that makes sense |
18:29.50 | Aetmos | Yeah, I'm using LinearLayout. |
18:30.13 | Aetmos | The constructor LinearLayout.LayoutParams() is undefined |
18:30.37 | zhobbs | well, are you passing 2 ints? |
18:30.45 | Aetmos | I'm an idiot |
18:31.00 | Aetmos | Yes, that works |
18:31.06 | zhobbs | :) |
18:31.06 | Aetmos | smacks his forehead |
18:31.08 | *** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl) |
18:31.24 | Aetmos | THanks |
18:31.37 | zhobbs | ViewGroup should work also as LinearLayout is a indirect child of ViewGroup |
18:31.46 | Aetmos | okay, thanks |
18:31.49 | *** join/#android krau (n=cktakaha@200.184.118.132) |
18:32.34 | muthu | zhobss: are you done with adc? |
18:32.42 | muthu | argghhh.. sorry zhobbs |
18:32.45 | *** join/#android aksyn (n=aksyn@cp1242056-a.schoo1.lb.home.nl) |
18:32.51 | zhobbs | I was but signed on to another project |
18:33.07 | muthu | how many are you doing?l |
18:33.12 | zhobbs | 2 |
18:33.17 | muthu | cool |
18:33.26 | zhobbs | Neither of them are mine, just contract work |
18:33.31 | muthu | woah |
18:33.33 | muthu | great |
18:33.34 | zhobbs | I really wish I would have had time to do myself |
18:34.12 | zhobbs | but..contract work pays rent now, adc winnings may or may not pay later |
18:34.22 | muthu | correct |
18:34.43 | muthu | and you'll always be hired if you win |
18:36.15 | zhobbs | I'm really interested in the quality of the apps that will be entereed into the adc |
18:37.16 | zhobbs | Seems 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.45 | Aetmos | My app will be polished, but I'm not sure it's a good idea ;-( |
18:37.59 | muthu | lol |
18:38.17 | muthu | you need a bit of both |
18:38.33 | zhobbs | Aetmos: yeah one of the ones I'm working on is very standard, but will be polished/eye pleasing |
18:38.35 | muthu | potential is something they'll look at |
18:38.53 | muthu | aetmos: what you working at? |
18:39.00 | Aetmos | Yeah, hopefully it will be a good idea once it's a fully fleshed out idea |
18:39.09 | Aetmos | muthu: not allowed to talk about it... |
18:39.13 | Aetmos | muthu: sorry ;-( |
18:39.19 | zhobbs | hehe, no one will reveal |
18:39.26 | zhobbs | muthu: are you working on the open intents stuff? |
18:39.32 | muthu | yeah |
18:39.39 | muthu | i am |
18:39.41 | zhobbs | that's cool, how many are working on that? |
18:40.00 | muthu | around 4 to 5 active currently |
18:40.14 | muthu | i'm trying to get active |
18:40.29 | muthu | lot of members though |
18:43.47 | Aetmos | Here's another question: Is there any way to specify "px", "dip", "sp", etc. in LayoutParams()? |
18:44.46 | zhobbs | Aetmos: probably with ViewGroup.LayoutParams(Context c, AttributeSet attrs) |
18:45.02 | zhobbs | but don't know any details on that |
18:45.37 | Aetmos | thanks. I'll take a look |
18:45.54 | Aetmos | Any idea what the default is? "dip"? |
18:46.17 | muthu | default is px i guess |
18:46.23 | Aetmos | okay, thanks |
18:46.29 | zhobbs | does px==dp==dip? |
18:46.41 | Aetmos | I think it depends on the device, doesn't it? |
18:46.48 | muthu | yeah |
18:47.05 | Aetmos | what's dp? |
18:47.13 | zhobbs | digital pixels |
18:47.17 | Aetmos | oh |
18:47.21 | Aetmos | I use analog |
18:47.25 | zhobbs | :) |
18:48.37 | *** join/#android romainguy (n=gfx@adsl-75-55-212-70.dsl.pltn13.sbcglobal.net) |
18:49.07 | zhobbs | hey romainguy, is there a difference between px,dp,dip? |
18:49.13 | *** join/#android zelip (n=zelip@nat/hp/x-aee83e2680cd1e40) |
18:49.19 | romainguy | px = pixels |
18:49.25 | romainguy | dp = dip = device independent pixel |
18:49.34 | Aetmos | oh dp == dip? |
18:50.11 | romainguy | yes |
18:50.27 | romainguy | you can also use pt, mm and in |
18:50.33 | Aetmos | so is it generally best to use dip when drawing? |
18:50.46 | romainguy | yes |
18:50.54 | romainguy | hmm, apparently we removed dp from the next SDK |
18:51.10 | Aetmos | I didn't see dp in the docs...maybe that's why |
18:51.17 | zhobbs | hehe, I've been only using dp |
18:51.18 | romainguy | it was there in M3 |
18:51.24 | romainguy | zhobbs: switch to dip :) |
18:52.06 | Aetmos | So 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.59 | Aetmos | hmm...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.06 | jasta | yawn |
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.00 | Aetmos | So, 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.31 | Aetmos | Does gravity actually do anything? |
19:29.31 | Aetmos | layout_gravity doesn't seem to work either |
19:31.41 | romainguy_ | Aetmos: it does, are you sure your textview is larger than the text height? |
19:32.08 | Aetmos | romainguy_: yes, I've made the background of the textview green, so I can see it |
19:32.12 | Aetmos | the text is at the bottom |
19:32.40 | Aetmos | Oddly, I have an ImageView with a shape stuck to the top...gravity can't bring that down either |
19:32.59 | romainguy_ | it's weird because by default EditText uses a gravity of center_vertical |
19:33.01 | romainguy_ | and it works |
19:33.09 | Aetmos | hmm |
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 | _avatar | is 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.47 | zhobbs | _avatar: I'm finding MediaPlayer extremely buggy... |
22:26.06 | _avatar | ok, good that I'm not the only one... the API seems pretty straight forward |
22:26.31 | zhobbs | I'm using it in a service and it's regularly crashing my service |
22:26.46 | _avatar | yeah, its also crashing my Activity |
22:26.51 | *** join/#android eton (n=eton@ppp-58-8-15-241.revip2.asianet.co.th) |
22:27.16 | zhobbs | I'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.44 | zhobbs | and it seems like between songs is when it's taking me down |
22:27.47 | _avatar | don't think that'll help, i'm not recycling the old instance :) |
22:27.54 | _avatar | thats exactly where i'm dying too... |
22:28.03 | zhobbs | hmmm |
22:28.27 | _avatar | i handle onMediaPlayerCompleted, and use it to queue up the next track |
22:28.36 | zhobbs | yeah me too |
22:28.38 | _avatar | it appears to die calling MediaPlayer.setDataSource() |
22:28.58 | zhobbs | so you create a new MediaPlayer object? |
22:29.11 | _avatar | yeah |
22:29.20 | zhobbs | ...who knows... |
22:29.48 | _avatar | i doubt this makes a difference, what operating system are you using to run the emulator? |
22:29.50 | zhobbs | sometimes it works too |
22:29.53 | zhobbs | linux |
22:29.55 | _avatar | yeah, sometimes its fine |
22:30.03 | _avatar | linux here as well, perhaps I should try it in windows |
22:30.27 | zhobbs | a guy I'm working with is having it happen on mac also |
22:30.53 | _avatar | hrm |
22:31.45 | zhobbs | I 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 | _avatar | have 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.08 | zhobbs | yeah, maybe I'll give that a shot |
22:34.15 | zhobbs | haven'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.56 | zhobbs | actually seems like MediaPlayer worked better in M3 |
22:55.14 | _avatar | hrm |
22:55.21 | _avatar | that'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 | _avatar | zhobbs: 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) |