**** BEGIN LOGGING AT Sat May 05 03:00:01 2012 May 05 04:10:26 is anyone here May 05 04:12:11 hey poseidon May 05 04:12:19 hello May 05 04:12:44 whats wrong with this line ? List addresses=new List(); May 05 04:13:51 Well I haven't used java in a while May 05 04:13:57 devslash: not instantiable type List May 05 04:13:58 but iirc List is an interface May 05 04:14:07 so how do i fix it May 05 04:14:14 try ArrayList instead May 05 04:14:26 ie the second part May 05 04:14:27 press ctrl-T on the type List to see what implementations exist May 05 04:14:40 http://docs.oracle.com/javase/6/docs/api/java/util/List.html May 05 04:14:49 shows there May 05 04:16:37 So I'm interested in creating an application to show local events and things to do. I want it to be available for iphone and android. After reading, it sounds like the best way to do this is to keep the logic on a remote server, and simply create the interface for each platform. May 05 04:16:53 What would be a good abstracted way to communicate with the server? May 05 04:17:12 Or would it be best to simply make it a website with a mobile version? I've never created an app, so I'm not sure May 05 04:17:41 use a RESTful webservice to get your data from whichever device May 05 04:17:49 lazy arse May 05 04:18:06 er get your data for whichever device May 05 04:18:15 and then display it appropriately May 05 04:20:54 the index of List starts at index 0 right ? May 05 04:21:57 devslash: Yes May 05 04:22:05 rule of thumb, all lists/arrays start at 0 May 05 04:22:07 hmm May 05 04:22:20 I'm trying to figure out why i got an indexoutofboundexception May 05 04:22:30 You can test, just create a List, and put one item it it May 05 04:22:35 see if you can grab it from index 1 May 05 04:22:37 http://pastebin.com/UkgnMT4y May 05 04:22:38 or index 0 May 05 04:23:28 UNLESS ITS VB :3 May 05 04:23:31 geocoder.getFromLocation(lat, lng, 1); May 05 04:23:36 the lat,lng,1 May 05 04:23:43 Nighthawk: ie all real languages =P May 05 04:23:50 the one is causing you problems May 05 04:24:14 more than likely, yea May 05 04:24:17 i don't think so it was working until it got to the toast. i think its how I'm referencing the list May 05 04:24:18 try index 0 May 05 04:24:33 u getting a stacktrace? May 05 04:24:34 the addresses list is probably empty May 05 04:24:40 yea, I think it is the last one May 05 04:24:47 the last line May 05 04:24:50 change the one to a 0 May 05 04:25:03 t0mless: I'm going to look into this restful webservice May 05 04:25:05 not sure what getFromLocation third argument is May 05 04:25:06 any suggested reading? May 05 04:25:12 nope May 05 04:25:14 or if your making it to the toast then the array is empty May 05 04:25:17 so the get(0) is failing May 05 04:25:27 ^ my money is on that May 05 04:25:38 geocoder.getFromLocation(lat, lng, 1); is probably returning an empty list May 05 04:25:56 devslash: Now would be a great time to learn to use your debugger ;) May 05 04:26:25 "Returns null or empty list if no matches were found or there is no backend service available." May 05 04:26:51 also, your new ArrayList() is obsolete there. May 05 04:27:04 since you just replace it with a new object from the geocoder May 05 04:27:22 if (!addresses.isEmpty()) { Toast.makeText(this,addresses.get(0).toString() , Toast.LENGTH_SHORT).show(); } May 05 04:27:26 "if (!addresses.isEmpty()) { Toast.makeText(this,addresses.get(0).toString() , Toast.LENGTH_SHORT).show(); }" May 05 04:27:34 if (!addresses.isEmpty()) May 05 04:27:46 I think he get's it... May 05 04:27:56 try checking it first May 05 04:28:01 Though you should also check if it's null May 05 04:28:07 since it says null might be returned May 05 04:28:21 in which case addresses.isEmpty() would throw a NPE May 05 04:29:02 t0mless: if i don't put the ArrayList initializer i get an error that its not initialized May 05 04:31:00 = null; May 05 04:31:03 initalized. May 05 04:31:06 and less memory May 05 04:31:38 or use a smarter ide May 05 04:32:20 though I bet if you set it = null in your catch block it wouldn't give you that error either May 05 04:41:18 devslash: you might want to try #java May 05 04:41:45 its ok. I've decided not to implement what I wanted to do at least for now May 05 04:42:59 but i do have another android related question. I've implemented a map view in my app. Is there an easy way to display the icon that the user can click on to be located using the GPS ? May 05 05:01:49 devslash: in java, every collection is also just an object, so they must always be instantiated to be used. All variables that hold objects hold references, there is nothing else May 05 05:03:39 que pasa amigos? May 05 05:04:01 ... wrong channel, sorry May 05 05:10:20 ok May 05 05:14:31 've implemented a map view in my app. Is there an easy way to display the icon that the user can click on to be located using the GPS ? May 05 05:28:10 * pfn scratches his head May 05 05:28:22 wtf, just cloned a copy of actionbarsherlock and it's not building, what gives... May 05 05:33:03 last mac java updates -004 is available May 05 05:33:14 i guess its in oracle's hands now May 05 05:34:41 hi, android.provider.CallLog.Calls.CONTENT_FILTER_URI <--- is it used ? May 05 05:35:42 nevermind, it was viewpagerindicator that was eating crap May 05 05:56:24 pfn: how is the irc client? did you finish it? May 05 06:20:07 pfn: disregard irc clients and observe this http://humormood.com/wp-content/uploads/2012/05/jGaG7.jpg May 05 06:20:09 hi wting and mr_lou May 05 06:20:27 r u guys into generative art? May 05 06:20:54 fleend00d: please be quiet. May 05 06:22:00 yr thing is funny May 05 06:22:16 g00s, haven't had time to work on it recently May 05 06:22:36 anything cool online? Here's me : http://fleen.org May 05 06:23:04 I use split hexagonal tesselation tile system. and shape-grammar stuff May 05 06:23:11 pragma-, cute May 05 06:23:18 I think that generative animation is the biggest thing since drugs May 05 06:23:27 hmm, how do I make viewpagerindicator with the tabpageindicator scroll May 05 06:23:33 also: http://img.skitch.com/20081012-kfpg2mqx49yf39484ng3i7hhm7.jpg May 05 06:24:59 fleend00d: procedural animation May 05 06:25:35 woops. sorry, wrong channel. I'm high. Meant to do the one on the left May 05 06:25:36 heh May 05 06:25:52 ya, procedural animation May 05 06:25:52 http://www.dangermouse.net/esoteric/piet/samples.html May 05 06:25:57 also my glasses are foggy May 05 06:26:16 HEY coooooooooool May 05 06:26:17 those are actual programs May 05 06:26:20 hey pfn May 05 06:26:31 decided to test that out then May 05 06:26:34 that you pragma-? May 05 06:26:45 everything is me May 05 06:26:52 I am a soliphist May 05 06:27:06 solipsist May 05 06:27:16 Napalm, yeah, giving it a swing May 05 06:27:18 I dig the images. The fact that they are programs is neat, but I'm mainly into the intense graphicsw May 05 06:27:30 I am you as you are he as you are me and we are all together May 05 06:27:38 pfn: add more tabs May 05 06:27:41 see what happens May 05 06:28:02 Napalm, yeah, it doesn't scroll May 05 06:28:05 i also saw a max/min width inside the tabviewpager May 05 06:28:15 a attribute i believe May 05 06:28:56 I've got java apps. This is sample of diamond crayfish. I turned it into an app : http://www.fleen.org/machines/diamond_crayfish_sample6.php May 05 06:30:45 fleend00d: I'll buy three May 05 06:30:49 ;) May 05 06:31:23 pfn: see what i was talking about? May 05 06:31:31 I want to make $, but I also want to promote the cause of generative animation psychedelic art. May 05 06:32:01 Napalm, not yet, running into another problem right now May 05 07:02:41 i notice the longer i am away from something wrote, the more i want to rewrite it, rather than "refactor" it May 05 07:03:04 g00s: Hrm, yeah kinda same here. May 05 07:03:15 I really try to refactor instead of rewrite, but there are times to. May 05 07:03:22 :) May 05 07:05:52 how can i make the emulator run faster? May 05 07:05:58 certain settings? May 05 07:06:07 or even hardware upgrades? May 05 07:06:23 +1 ↑ May 05 07:06:26 there is a hidden command setting in avd, --omg-opzimized for that May 05 07:06:28 the best way is to slow down your heart rate and metabolism May 05 07:06:55 Is the emulator slow because it's actually doing that much processing, or is it lagged to simulate the device? May 05 07:07:01 if you perceive things the way a turtle does, it will be lightning fast ! May 05 07:07:17 I've implemented a map view in my app. Is there an easy way to display the icon that the user can click on to be located using the GPS ? May 05 07:07:21 It would be so nice if it was like game console emulators where it has a fast-forward key. May 05 07:07:53 rking: it is emulating the complete cpu, which is very intensive on the host cpu power May 05 07:07:58 also, no 2D acceleration :( May 05 07:07:59 K. May 05 07:08:01 Fair enough. May 05 07:08:10 rking, well startup is pretty slow. It's pretty responsive usually, but I've noticed that using the browser maxes out the CPU core May 05 07:08:17 so if you try to emulate hdpi devices or tablets, its getting really laggy May 05 07:08:54 I think there is some kind of optimized emulator/avd for windows available May 05 07:08:59 * Ge0rG is testing on real devices. May 05 07:09:08 i realize it takes a bit of processing to emulate a cpu. So to emulate this faster you need ... a faster cpu? May 05 07:09:15 btw, what should I get, a galaxy s3 or the last nexus phone? May 05 07:09:24 RustyShackleford: exactly May 05 07:09:54 is there a way to give the emulator more cores? May 05 07:10:09 Try the x86 emulator or gpu acceleration May 05 07:10:17 anyone ? May 05 07:11:16 RustyShackleford: Re: startup, there should /defintely/ be a way to freeze the memory state so you can go back to it instantly. May 05 07:11:19 Is there not that/ May 05 07:11:36 i wonder if the x86 project would run decently on an eeepc 701 May 05 07:12:12 Ge0rG: i would only get an unlocked gsm nexus May 05 07:12:20 rking, yeah I haven't played around with snapshots yet May 05 07:12:21 the kind that google itself updates May 05 07:12:35 i dont think they update certain ones, like the vz ones May 05 07:12:41 i just leave the emulator open after I start it the first time May 05 07:12:46 even though they are still "nexus" May 05 07:12:52 exmphasis on '"' May 05 07:13:00 g00s: the sgs3 looks sexy as well, even though samsung is generally slow with updates... and its got QUADCORE! May 05 07:13:17 quad core droids? really? May 05 07:13:19 Ge0rG: terrific :| May 05 07:13:37 i bought my phone like 3 months ago. I feel like it's already obselete May 05 07:13:49 pro tip: use shitty slow hardware for development May 05 07:14:09 * Ge0rG is testing stuff on his g1 from time to time... though its running cm5 May 05 07:14:32 its so freaking slow, even the launcher opening time pisses me off :( May 05 07:14:34 g1 qualifies as shitty shlow hardware :) May 05 07:14:40 how do you determine the lowest android version your app will run on? May 05 07:14:52 I get this : java.lang.IllegalArgumentException: Unknown URL content://call_log/calls/filter if I use android.provider.CallLog.Calls.CONTENT_FILTER_URI ? May 05 07:14:56 i have 8 right now, hopefully by this time next year 9 May 05 07:15:02 RustyShackleford: AndroidManifest.xml minSdkVersion May 05 07:15:13 oh :) May 05 07:15:34 Ge0rG, well it seems like the developer sets this, right? May 05 07:15:49 how do I, as a wannabe dev, determine this value? May 05 07:16:36 RustyShackleford: it depends on which APIs you are using. look in the docs, API level is listed for every function May 05 07:17:13 RustyShackleford: e.g. if you are using the ActionBar, your app will only run on honeycomb+ unless you add the compat library or actionbarsherlock May 05 07:17:45 so I've gotta pay attention to the API? Is there a way automatically determine this? May 05 07:17:47 RustyShackleford: you should support down to 2.1 if you are going for a general audience... May 05 07:17:54 Depends on if there are APIs which are crucial to your app, as well as how much time you're willing to spend supporting older platforms May 05 07:18:04 RustyShackleford: I think recent SDKs will warn you if you are using incompatible APIs May 05 07:18:15 or time you're willing to support newer platforms :D May 05 07:18:36 RustyShackleford: have a look at http://developer.android.com/resources/dashboard/platform-versions.html May 05 07:18:55 Pfft, supporting newer platforms are easy May 05 07:19:07 Just don't be stuck in the old ways May 05 07:19:10 SimonVT: exactly. minsdk = targetsdk = 8 XD XD May 05 07:19:15 == fail app May 05 07:19:18 * g00s puts on flame proof suit May 05 07:19:20 Ge0rG, I'm a George as well. Don't see too many of them nowadays... May 05 07:19:28 You got a menu button on ICS.. Your app is fail May 05 07:19:38 most are old men, have you noticed? May 05 07:19:52 lol May 05 07:19:56 MENU BUTTONS FTW May 05 07:20:00 SimonVT: the other way to look at it, is you can take the easy way out and spend that time writing an ios or wp7 port May 05 07:20:00 RustyShackleford: I feel like an old man as well. May 05 07:20:20 * g00s still has flame proof suit on May 05 07:20:32 the only error I can attest the android developers re menu button is that they didn't add a visual clue if the menu button is working in the current context May 05 07:20:41 pft, newer platforms are backwards compatible, otherwise they fail May 05 07:20:47 doesn't the SGS III have a menu button anyhow ? May 05 07:20:47 so being stuck in the old ways is perfectly fine! May 05 07:20:59 g00s: yeah, home menu and back May 05 07:21:02 mine's minsdk = 4; target = 8; for great win. May 05 07:21:10 aweome :D May 05 07:21:12 pragma-: thats why so many android apps suck and look like written for 1.0 May 05 07:21:23 *awesome May 05 07:21:37 its a little too large for my personal feeling though May 05 07:21:42 Your android app is still fail, even if you got an ios or wp7 port :P May 05 07:22:03 even if your android app isn't fail, its probably not making money anyhow so who cares May 05 07:22:11 how can I assemble a library of songs for a music player? May 05 07:22:20 RustyShackleford: thepiratebay.se May 05 07:22:23 my app is a UX fail and is still making money. I don't care :> May 05 07:22:30 I saw the doc about searching the file system for music files May 05 07:22:52 how do I save this info, especially to build menus? May 05 07:23:28 also, how are id3 tags handled? May 05 07:23:49 RustyShackleford: have you checked if there is a content provider for media? May 05 07:23:58 Ge0rG: have fun with that $8 a year that your app makes May 05 07:25:49 pragma-: its more like 8$ a day, kthx May 05 07:26:00 Ge0rG: nice :) May 05 07:26:30 is it feasible to make a living developing android apps? May 05 07:26:44 thats a loaded question May 05 07:26:45 I'm learning how to do it so I can build up a portfolio May 05 07:27:00 your best bet is to work for someone May 05 07:27:08 i'm just hoping to release some apps for free and have people use them May 05 07:27:47 also, i was reading last week that one of the most promising areas for app growth will be enterprise apps May 05 07:28:00 but , i'm not sure how well android will do in the enterprise May 05 07:28:07 its not going anywhere at the moment anyhow May 05 07:28:18 g00s: What are some examples of "enterprise" apps? May 05 07:28:31 rking: hold on May 05 07:28:34 I've not-understood that word ever since Java started using it for everything everywhere all the time. May 05 07:28:40 i agree May 05 07:28:45 it's a vague term May 05 07:28:55 I infer that it means large scale May 05 07:28:58 Yes. May 05 07:29:02 But it is an example of: May 05 07:29:05 'big company' May 05 07:29:05 http://www.fiercedeveloper.com/story/enterprise-mobile-developers-we-need-business-apps/2012-04-20 May 05 07:29:14 http://c2.com/cgi/wiki?DeGeneralization May 05 07:29:32 you won't make a living with selling apps on android market or with in-app ads... May 05 07:29:32 and so why is there an enterprise version of Java? May 05 07:29:43 it's a more stable version? May 05 07:29:52 but you can make contract work for companies to provide customer-oriented apps for free May 05 07:30:13 g00s: OK, I pretty much get the use, there.. thanks. May 05 07:30:32 Ge0rG: Sounds right, to me. May 05 07:31:10 Can anyone shed some light on the "iOS dev is more $$ than Android" meme for me? May 05 07:31:18 RustyShackleford: my advice is: make apps to solve problems you have yourself on android. May 05 07:32:04 rking: generally said, ios users are shopping for apps more often. May 05 07:32:13 But why? May 05 07:32:19 rking: iirc, you have to pay $100 every year to be able to create and publish apps for apple; android is free to create, $25 to publish on google's store, free or other prices on other stores May 05 07:32:32 apple doesn't allow other stores, either May 05 07:32:36 sprint is rocking the galaxy nexus on Fringe already. May 05 07:32:38 rking: my personal opinion is that apple devices are marketed to the top 20% of the smartphone users May 05 07:32:42 pragma-: No I mean more $$ incoming. May 05 07:32:49 Great phone, great show, much better carrier in terms of Android than VZW :/ May 05 07:32:50 gnex is unimpressive. May 05 07:32:57 pragma-: right.t May 05 07:32:58 Ge0rG, that's the plan. I don't feel I'm at the level where I should be distributing or selling my work just yet May 05 07:33:01 rking: so they care less about the money May 05 07:33:16 cheap omap soc gnex crap May 05 07:33:20 Unlocked bootloader, 6 months headstart on 720p and ICS. Pretty much boring. May 05 07:33:26 Ge0rG: K, I can imagine that, but I still need to see the data to be sure that's it. May 05 07:33:29 Not wasting the type I'm enjoying on a troll. May 05 07:33:36 720p and ICS on a gpu that barely gets 18 fps. May 05 07:33:55 goodbye. better things to do than this certainly. May 05 07:33:58 rking: google around a bit, some indie game publishers compare at least the relative numbers on android vs. appstore May 05 07:34:14 magn3ts: what, are you catholic or something? do you regularly go around sticking your head in the sand when you get a contrary opinion? May 05 07:35:48 rking: http://news.ycombinator.com/item?id=2929612 May 05 07:36:41 rking: some people also argue that buying on the app store is more secure for the buyer due to apples rigid validation process May 05 07:37:11 i got the impression that bignoggins was a pretty smart motherfucker from somewhere May 05 07:37:42 appropriate handle ;) May 05 07:39:22 Ge0rG: K, decent info. May 05 07:39:26 Heheh May 05 07:40:50 SimonVT: how is the maple syrup and stuff going in VT May 05 07:40:59 :) May 05 07:41:08 Anyone coding apps straight up w c May 05 07:41:12 Going slow May 05 07:41:24 Documenting code written in a crappy scripting language May 05 07:41:52 SimonVT: Hehe.. Ok I gotta ask which one? May 05 07:43:53 In power engineering there's a programming called Power Factory, which is used to perform simulations on the transmission grid. The manufacturers made their own programming language called "DIgSILENT Programming Language" which can be used to write scrips in the program May 05 07:43:58 And it's crap May 05 07:44:34 is it turing complete? May 05 07:44:39 write an llvm backend! :> May 05 07:45:52 I just.. want to get this over with :P May 05 07:47:29 But, the editor has a "Check" button which checks your syntax for you! May 05 07:50:14 if (!bool) /* there is no bool, so int, really*/ => if (.not. bool) May 05 07:50:32 if (statement || statement2) => if (statement .or. statement2) May 05 07:50:34 SimonVT: Ok, you totally win. May 05 07:50:44 SimonVT: I thought you were whining about Tcl or something. May 05 07:50:51 But that sounds like a truly crappy language. May 05 07:51:36 Iterating a Map: for (error = MapFirst(mapStationsMvar, tempStation, mvar); error = 0; success = MapNext(mapStationsMvar, tempStation, mvar)) where mapStationsMvar is an int ID for the array, tempStation is the variable where the key is loaded, and mvar is where the value is loaded May 05 07:51:51 Haha May 05 07:51:55 Oh yeah, you don't compare with ==, it's = May 05 07:52:04 You know, I skipped the phase where I was tempted to invent my own lanaguage. May 05 07:52:05 So var = 1; assigns, if (var = 1) compares May 05 07:52:14 I don't really understand the bug that makes people do so. May 05 07:52:24 SimonVT: Shell is like that. May 05 07:52:31 SimonVT: that's actually an improvement. May 05 07:52:34 == is retarted. May 05 07:52:43 Lets see.. Iterating a list: for (station = stations.First(); station; station = stations.Next()) May 05 07:53:26 Oh yeah, you can't get a value from a map if you have the key.. At least there's no documented way.. Gotta iterate every time May 05 07:54:10 whats wrong with iteration? Its only O(N)... May 05 07:54:13 But, you can check if the map contains a key.. that's at least something May 05 07:54:38 With the awesome method MapContains(id, key) (which is also undocumented) May 05 07:55:04 SimonVT: sounds like a perfect language for Google to port android to. May 05 07:55:07 hahaha http://www.androidpolice.com/2012/05/04/the-samsung-galaxy-s-iii-the-first-smartphone-designed-entirely-by-lawyers/ May 05 07:56:28 There's not really functions either.. but subscripts.. They have input parameters as well. Two ways of calling.. Script:inputVar; then Script.Execute() .. or Script.Execute(inputVar) May 05 07:56:47 And how to get return values? Why with Script:returnVal after Execute has been called May 05 07:57:19 g00s: indeed :p May 05 08:01:26 has anyone used timer? May 05 08:04:47 you don't use Timer in android May 05 08:09:12 I'm trying to implement TimerTask May 05 08:09:26 why don't you use timer May 05 08:10:01 google says their implementation of it is too inefficient May 05 08:10:15 devslash use a handler May 05 08:10:21 i am May 05 08:10:42 http://pastebin.com/DrrTbipG May 05 08:11:24 heres my problem. on line 8, I want to disable this LocationListener. My Base class extends LocationListener. How do i refer to it inside the Handler ? May 05 08:11:47 make it final May 05 08:12:02 make what final May 05 08:12:02 another correlation between failure-to-indent and can't-figure-out-how-to-code is proven May 05 08:12:19 "lm" May 05 08:13:25 that doesn't make a difference May 05 08:13:50 devslash, you want to turn location updates on and off (repetitively) at a scheduled interval? May 05 08:13:57 yea May 05 08:14:17 can i use "somehow" the android 4.0-style buttons on a lower platform, like android 1.6 or 2.3.3? May 05 08:14:22 i don't believe that LocationManager has a built in way to do that May 05 08:15:24 requestLocationUpdates() updates the location too frequently May 05 08:15:28 you would have to do it manually, but why toggle it repetitively? May 05 08:15:39 oh May 05 08:16:02 there's a one-shot version, it might require a higher api though May 05 08:16:26 do you mean requestSingleUpdate() May 05 08:16:35 yeah that May 05 08:17:04 everythingWorks, yes May 05 08:17:31 "somehow" download the images and put them in your resources May 05 08:17:33 everythingWorks: you have to have a different layout for older devices May 05 08:17:36 :> May 05 08:17:47 everythingWorks: ActionBarSherlock.com May 05 08:18:04 jeppy: how do i refer to my base class from within the handler ? May 05 08:19:29 (i think) you only need to make the instance of it final. May 05 08:19:47 no i tried that May 05 08:19:49 devslash: how can i copy the android 4 button style to my project folder then? May 05 08:20:05 you mean the On/Off toggle switch ? May 05 08:21:29 no, i mean the button... May 05 08:22:12 its in the xml designer May 05 08:22:23 can you be more specific please? May 05 08:22:27 I wish my phone had an android-4 button. May 05 08:22:42 click on your XML, click on the Graphical Layout tab May 05 08:22:58 click on Form Widgets if it isn't selected already May 05 08:23:15 bam, 3 buttons of different size May 05 08:23:19 sizes are there May 05 08:23:57 sorry, i don't know what you are actually talking about. :) May 05 08:24:03 I think its a misunderstanding May 05 08:26:17 Hi all May 05 08:29:13 Any idea about that? http://stackoverflow.com/questions/10460120/how-to-port-android-4-button-styles-to-a-lower-platform May 05 08:30:27 port something from newer to older? mostly folks have problem with GridLayout for htat May 05 08:30:31 and there's a fix for it by some guy May 05 08:31:02 someone from here made it May 05 08:31:02 what is the problem with gridlayout ? May 05 08:31:10 I would say it is generally a bad idea to violate the style of the device May 05 08:31:16 there is no gridlayout in < 4 May 05 08:31:29 or older platforms (not sure of the revision number) dont have it May 05 08:31:37 had a problem with that and with the Space tag May 05 08:32:00 gridlayout? What has this actually to do with the issue? ;) May 05 08:32:25 hey all May 05 08:32:39 just on the topic of porting these layout stuff backwards May 05 08:32:40 everythingWorks: what object are you referring to ? May 05 08:32:45 or maybe im just way off May 05 08:33:11 maybe a "Button"? May 05 08:33:31 but there isn't a newer one for ICS May 05 08:34:01 everythingWorks: That's just a background image.. Find the xml and png's in the aosp repo and copy to your project May 05 08:34:04 the design is different and that what its all about. May 05 08:34:36 SimonVT: I understand, "aosp" ? May 05 08:34:42 android open src project? May 05 08:34:46 yes May 05 08:34:55 i see :) May 05 08:35:13 Or sdk/platforms/android-15/data/res/ and copy from there May 05 08:36:09 <`z> HOLY FUCK May 05 08:36:14 <`z> ICS IS FINALLY RUNNING ON MY LAPTOP May 05 08:36:41 android x86 ? May 05 08:37:00 SimonVT: good hint, thanks! May 05 08:38:39 <`z> devslash, no May 05 08:38:41 <`z> emulated May 05 08:38:54 how so ? May 05 08:39:11 i have ICS running in virtual box which is an emulator May 05 08:42:37 <`z> devslash, it emulates ARM May 05 08:42:39 <`z> not x86 May 05 08:43:03 the official emulator that comes with the SDK does that but its freaking hella slow May 05 08:44:46 <`z> not that slow May 05 08:44:51 <`z> about as slow as my old htc touch2 May 05 08:45:45 <`z> oh cool the arm emulator uses my webcam May 05 08:46:17 <`z> aw dang May 05 08:53:45 hi, someone knows a blog or something on how to create a similar autocomplete box like the gmail app uses for "To:" and such? ( with contacts becoming those 'boxes' ) ? May 05 09:05:07 Is there any easy go to find if it is a footer/header in onItemClickListener? May 05 09:06:04 Check the position May 05 09:06:18 If you have a header and the pos is 0, then it's a header May 05 09:06:35 If you have a footer and the pos is count-1, then it's a footer May 05 09:06:50 SimonVT: no easy ways May 05 09:06:52 ? May 05 09:06:53 <`z> If you have a footer and the pos is 0-count, then it's a middler May 05 09:07:11 ok May 05 09:07:37 if (position == (listView.getHeaderCount() - 1)) or something May 05 09:07:43 Seems pretty easy May 05 09:07:56 ok, thank you SimonVT May 05 09:08:53 hi, someone knows a blog or something on how to create a similar autocomplete box like the gmail app uses for "To:" and such? ( with contacts becoming those 'boxes' ) ? May 05 09:20:17 hey guys, are there any other "better" solutions to communicate between threads and main UI than Handler? May 05 09:21:31 what's the best pdf reader for reading reto meiers book on an android device :3 May 05 09:25:52 storkme_: use an iPad :) May 05 09:32:17 if only May 05 09:32:27 i'm stuck with a shitty transformer prime May 05 09:37:48 storkme_: whats the matter with https://play.google.com/store/apps/details?id=com.adobe.reader&hl=en May 05 09:41:03 i figureedit was bad since its adobe May 05 09:41:54 well, for reading their own format … :) May 05 09:42:05 looks like it got good reviews though May 05 09:44:20 all ireally wanna ois import it to google books/kindle but apparently that's not kosher May 05 09:50:47 * hackkitten hugs g00s :) May 05 09:51:16 hi hackkitten May 05 09:51:22 hi :) May 05 09:51:30 are hugs > glomps, or the other way around ? May 05 09:51:34 how is master g00s? :) May 05 09:51:38 glomp > hug May 05 09:51:57 glomp: running jump followed by humongous huggle~ May 05 09:52:07 injuries are possible May 05 09:52:10 :P May 05 09:52:11 ahhh ! May 05 09:52:23 be careful of the wings :) May 05 09:52:27 I shall :) May 05 09:53:37 http://www.wikihow.com/Glomp-Someone May 05 09:53:42 :O May 05 09:54:00 6. Step off/away from the person. May 05 09:54:02 off ? May 05 09:54:06 http://24.media.tumblr.com/tumblr_m1ntpu0DGY1r3mr82o1_1280.jpg is what a cat hug looks like May 05 09:54:08 :O :O May 05 09:55:28 meow :3 May 05 09:56:01 g00s > the receiving person may not be able to stay standing May 05 09:56:13 this problem is especially severe if you raise cats from cubs, as they get used to doing this sort of stuff with you and still insists on it after they are larger than you are and weigh more. Also their tongues are like sand paper. May 05 09:57:18 maybe having a lion or tiger as pet isn't such a good idea May 05 09:57:20 :D May 05 09:57:34 it happens, good idea or not. May 05 09:57:48 people also raise pythons as pets May 05 09:57:51 then get eaten by them May 05 09:57:53 (o/ May 05 09:58:07 yay 6 meter python :3 May 05 09:58:10 ahah May 05 09:58:18 hackkitten: &hearts May 05 09:58:26 :3 May 05 10:01:55 anyway, cats have a bad reputation as antisocial animals -- and this no doubt is partly the lure of cats -- but these bigger ones appears to undeniably enjoy company and greet long-lost friends warmly. May 05 10:02:19 they strike as surprisingly sociable animals to me. May 05 10:05:49 alankila > some of the larger cats live in groups May 05 10:05:55 so yeah, they're more social May 05 10:06:01 * hackkitten isn't a very social kitteh, though May 05 10:06:18 at least my gf keeps telling me that >.> May 05 10:06:28 * hackkitten lix paw and stares people down~ May 05 10:15:21 When I come back to a MapActivity, bottom and right tiles are not loading until I zoom in or out. Any idea? May 05 10:17:21 JulienDev: my idea is that you should load the tiles by zooming out then zooming back in super quickly such that the user is unaware May 05 10:17:24 * pragma- nods. May 05 10:17:26 next?! May 05 10:18:02 i am a genus. May 05 10:18:03 pragma-: Yes, I did that trick but this is a bad way :) May 05 10:18:13 why is it bad? May 05 10:19:49 it works fine but I thought about another way May 05 10:20:11 I think there is a problem if my mapview do that May 05 10:50:29 why am i getting this error every time May 05 10:50:32 05-05 16:19:23.621: E/dalvikvm(311): Could not find class 'com.eggdroid.akhld.CBot', referenced from method com.eggdroid.akhld.EggDroidActivity.LaunchBot May 05 10:50:53 The class exists and it does compiled without any errors May 05 11:03:15 hi, i'm kinda new to android dev. Could any one hint in a direction if I wan't to create a button with a title and subtitle and have the text color on those changed when the button is selected? May 05 11:16:31 Hi, I'm building a canvas game for the moment. What is the esiest and best way to implement a UI? May 05 11:23:07 I have added a footerview to my listview inside my activity. The onItemClik is not fired when I click on the footer. All the other items are 'clickable' May 05 11:23:12 can someone help me May 05 11:23:12 ? May 05 11:35:13 <[twisti]> ok, i have a really weird problem May 05 11:35:25 <[twisti]> my android app crashes with 05-05 11:34:14.562: E/AndroidRuntime(603): java.lang.NoClassDefFoundError: java.awt.Point May 05 11:35:51 <[twisti]> how can android not have a POINT class ? am i including something wrong ? May 05 11:36:12 <[twisti]> that seems like an oddly arbitrary thing to leave out May 05 11:36:21 You mean like this class: http://developer.android.com/reference/android/graphics/Point.html ? May 05 11:37:20 How can developers NOT search the documentation.. Seems like an oddly arbitrary thing to leave out May 05 11:38:01 <[twisti]> but thats android only May 05 11:38:10 <[twisti]> it would mean i cant debug my project on desktop anymore May 05 11:38:22 [twisti]: *nice* joke May 05 11:38:42 <[twisti]> ? May 05 11:38:43 that *was* a joke, right? May 05 11:39:03 <[twisti]> no May 05 11:39:13 uh... May 05 11:39:16 <[twisti]> i suppose i could add the android depencies to my desktop project May 05 11:39:29 [twisti] how can android not have a POINT class ? am i including something wrong ? May 05 11:39:35 [twisti] but thats android only May 05 11:39:39 ???? May 05 11:39:46 <[twisti]> it still seems odd to make something as basic as point to be platform dependant May 05 11:40:33 [twisti]: why not use an actual device or the virtual machine? May 05 11:40:57 <[twisti]> because those are much slower May 05 11:43:13 [twisti]: I'm getting worried - it's starting to sound like you're not joking, after all May 05 11:43:20 <[twisti]> im not May 05 11:43:49 [twisti]: if you are not testing your Android app on Android, how do you know it will actually work when you run it on Android? May 05 11:44:01 <[twisti]> because i test it on android May 05 11:44:08 <[twisti]> im just DEVELOPING it on desktop May 05 11:44:13 <[twisti]> because thats about a gazillion times faster May 05 11:44:27 in which case, welcome to #android-dev - you'll find your life is much simpler if you give up any idea of Android being any particular Java profile you're familiar with - it's Android, not SE, ME, EE, ABCDE or any other Sun^WOracle-defined thing May 05 11:45:47 <[twisti]> im not really sure what youre trying to say with that May 05 11:46:51 any idea that you can develop Android software 'on the desktop' is insanity May 05 11:48:01 <[twisti]> why ? May 05 11:48:50 because the Android UI and Java libraries are a custom mix designed for phone/tablet/TV/etc. use May 05 11:48:56 meh May 05 11:49:42 <[twisti]> im developing a fullscreen opengl application May 05 11:49:48 <[twisti]> no android UI elements are needed May 05 11:49:55 if you use eclipse and the android sdk in windows, isn't that "developing on the desktop"? May 05 11:50:17 <[twisti]> sure, if youre alright with waiting 20 seconds for a debug run instead of 0.2 seconds May 05 11:50:33 do you have an Android device? May 05 11:50:57 [twisti]: what are you comparing with? May 05 11:51:31 <[twisti]> desktop debugging May 05 11:51:33 <[twisti]> and i do May 05 11:51:44 that IS desktop debugging, isn't it? May 05 11:51:53 you just run it on the device/in the emulator May 05 11:52:08 <[twisti]> right, i mean direct debugging May 05 11:52:17 <[twisti]> as compared to android device debugging May 05 11:52:39 why not debug on the device? It's fast to debug that way May 05 12:04:18 Error: Unable to start activity ComponentInfo: Your content must have a ListView whose id attribute is 'android.R.id.list' May 05 12:04:18 I have listview with android:id="@+id/listplayers". how do i make id 'android.R.id.list'? May 05 12:08:22 @android:id/list May 05 12:13:53 jaami: instead of creating new id use the one SimonVT provided May 05 12:15:45 I'm adding facebook register and login to my app. When the user finished facebook login, and now we want to (Automated) login to my server, what should be a good identifier in additional to the facebook id ? since there is no password here.. May 05 12:19:34 open res/layout/main.xml under the project tree and change the value there May 05 12:20:25 jaami: see msg above May 05 12:31:37 changed to android:id="@+id/list" in my xml. but same error 05-05 13:20:03.855: E/AndroidRuntime(709): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' May 05 12:31:37 in properties of the listview the id is "@+id/list" May 05 12:31:56 @android:id/list May 05 12:42:21 hi, someone knows a blog or something on how to create a similar autocomplete box like the gmail app uses for "To:" and such? ( with contacts becoming those 'boxes' ) ? May 05 12:43:34 Have you looked at AutocompleteTextView? May 05 12:43:47 http://developer.android.com/reference/android/widget/AutoCompleteTextView.html May 05 12:43:57 reading May 05 12:44:19 Essentially you provide it with an adapter for the autocomplete to look through. May 05 12:44:32 ah i know autocompletetext view May 05 12:44:34 used it before :p May 05 12:44:39 what i want is the view to be like gmail May 05 12:44:41 seen it? May 05 12:44:45 those "boxes" with the adresses May 05 12:44:50 isnt that what the gmail one does? May 05 12:45:18 Knossos, no, check gmail app on your phone :) May 05 12:45:36 it displays them differently and more important it adds to existing May 05 12:45:56 ( could program it myself but I imagine since it's in their app it could be done already by someone else ) May 05 12:45:56 That is what the autocompletetextview does I am sure of it May 05 12:46:30 Knossos, " choose an item to replace the content of the edit box" May 05 12:46:35 that's not what gmail does May 05 12:46:49 In the case of the gmail app, it has a "To:" hint May 05 12:46:56 You can choose what the replace does May 05 12:47:17 are people still targeting < 2.1? May 05 12:47:28 luyang: Some people do May 05 12:47:53 Knossos, srr but you haven't looked at it, it's not like the default autocompletetextview May 05 12:48:01 dzan: You can set it to set the textview to currenttext + additional email May 05 12:48:02 it shows the items in boxes and let's the user remove one by one etc May 05 12:48:14 sure but then still i'd have only 10% of the functionality May 05 12:48:18 Knossos: but they dont get access to AccountManager... May 05 12:48:44 Then register a permission to gain access to your contact list? May 05 12:54:43 dzan: Maybe it's a custom view.. Check the email client, see if it does something similar, then find it in the source May 05 12:55:11 SimonVT, i'm working on a fork of the email client ;) it doesn't May 05 12:55:31 SimonVT, I was just asking of someone may have read a blog post or something on how to do it, i'm pretty sure it's something custom May 05 12:58:56 I'd like to measure how much movement occurs to my phone when say I'm walking on my bed. The idea is not to measure acceleration, but movement that occurs? May 05 12:59:12 I'm not entirely sure what sensor type to use. May 05 13:07:14 I need link for android ebook. May 05 13:22:10 jaami: you can buy a set at http://commonsware.com/ May 05 13:24:17 Thanks May 05 13:33:42 morning. I have an interesting dilema. I'm trying to add a gesture overlay view to a gridview. when I nest the gridview inside the gestureoverlayveiw the grid view does not render (though I see in the logs It May 05 13:33:53 is calling the get view method) May 05 13:34:11 when I take it out of the gesture overlay view, i can see my grid view, but of course I loose my gesutres ... May 05 13:35:45 Any ideas on what would cause my gridview not to render ? May 05 13:47:31 Having Timer.scheduleAtFixedRate(new TimerTask() { //do stuff }, 0, SOME_TIME); What happens if the "do stuff" takes longer than SOME_TIME? May 05 13:48:51 When the docs say I can place my gestureoverlayview on top of another view, how do I actually *do* that ? May 05 14:06:12 Hey May 05 14:06:55 how can i make a TextView appear like an EditText ? May 05 14:07:07 Is there any way I can find the position of the first character in a string? E.g. if the string was "(4 spaces)Hello", the position would be 4 May 05 14:09:07 how do i change the default theme for all apps? (Current: Holo.Dark, I want Holo.Light as standard) May 05 14:09:11 I think its a system setting, but i cant find it May 05 14:09:19 [using android 4.0.4] May 05 14:09:54 in the AndroidManifest.xml change the android:theme attribute in the application-element May 05 14:10:24 mcescher: I want to change the default theme of the device, not of one single app May 05 14:10:41 oh sorry, didnt get that.. that i don't know May 05 14:11:01 Is there any way I can find the position of the first character in a string? E.g. if the string was "(4 spaces)Hello", the position would be 4 May 05 14:48:19 Hello May 05 14:48:23 Anybody here? May 05 14:48:32 !ask May 05 14:48:34 no, nobody May 05 14:49:34 Umm I need to get some inspiration idea from you guys. May 05 15:01:38 Does anyone have an idea why I can do this: for(String f2 : run.inbuiltFunctions) {} once, but not more than one time? May 05 15:02:40 Nvm¨ May 05 15:21:45 xml: http://pastebin.com/Q27KfGba May 05 15:21:45 java: http://pastebin.com/5RYS7Hi2 May 05 15:21:45 What i cant understand is setContentView(R.layout.multiplayers); in java file. i commented the line and program is still working fine. How without setContentView() Activity is working fine? May 05 15:22:36 Might be the other setContentView call, just below super.. May 05 15:23:15 SimonVT: pasted code. there is no other call to setContentView() May 05 15:23:26 There is May 05 15:23:31 Opps May 05 15:23:34 Line 22 May 05 15:24:32 SimonVT: oh, i said, i commented the line @ 22 May 05 15:24:35 Also, ListActivity will automatically inflate a layout with a listview if you don't May 05 15:24:48 ahh, okay May 05 15:50:28 is there a way to make the Grid's cells more visible? May 05 15:51:20 I mean, atm they all black, with black separators, you can't tell the beginning and ending of each cell May 05 15:51:39 a $ at the end of a method hides it from the public api or what does the $ do? May 05 15:51:48 ekh: cant you add a margin to each cell? May 05 15:52:33 Napalm: I think yes I can. Each cell is a LinearLayout, so yea May 05 15:52:38 ekh: layout_margin="4dp" or something May 05 15:52:40 I am at least very sure that this is not the way to call a method May 05 15:52:44 Method getInt = FileDescriptor.class.getDeclaredMethod("getInt$"); May 05 16:02:28 Are there any libraries which allow building android layouts from xml text input? May 05 16:03:08 skfax: er, that's how native Android UI works :) May 05 16:03:10 skfax: whut, android layouts are built from xml text input by default May 05 16:03:15 is plaisthos still here? May 05 16:03:27 * readme ignores join/part/nick spam May 05 16:03:39 Well they are compiled when you build your resource file May 05 16:04:13 because I looked up how the dollar sign gets in the mthod name.. it's apparently what the compiler does with inner classes http://www.retrologic.com/innerclasses.doc7.html May 05 16:04:14 I want to dynamically load an XML file during execution and build a layout from it (directly from text string input) May 05 16:04:38 skfax: okay, I imagine that the xml parser is still there and you can just use it to compile xml and give it to layoutinflater May 05 16:05:15 yes, I think you pass a prepared XmlPullParser to it May 05 16:05:33 hi, has anyone had the .out.xml problem ? May 05 16:05:37 The LayoutInflater documentation states "Therefore, it is not currently possible to use LayoutInflater with an XmlPullParser over a plain XML file at runtime;", so it doesn't seem like it :\ May 05 16:05:52 nah, you can't May 05 16:05:56 skfax: oh. Got to read that part before "therefore" May 05 16:05:59 because the layouts are preprocessed May 05 16:06:03 I looked into this recently May 05 16:06:35 oh well that's crap. I'm curious what the exact technical excuse is May 05 16:06:38 skfax: why do you want to do that? May 05 16:06:45 I only need pretty basic elements to start with, so it might be worth writing a small bit of code to translate XML into a view hierarchy May 05 16:06:46 alankila: optimization May 05 16:06:50 no May 05 16:06:57 no? May 05 16:07:01 I mean the exact way it fails if you just use XmlPullParser May 05 16:07:01 that's what the documentation says. May 05 16:07:45 because the claim made doesn't really make sense to me at all. How could the layoutinflater know that the xmlpullparser is reading from some precompiled gunk instead of actual file. May 05 16:07:48 Leeds: It's to allow for dynamic in-app layout building May 05 16:08:06 skfax: yeah... I'd think again May 05 16:08:30 > "For performance reasons," view inflation relies heavily on pre-processing of XML files that is done at build time. Therefore, it is not currently possible to use LayoutInflater with an XmlPullParser over a plain XML file at runtime; it only works with an XmlPullParser returned from a compiled resource (R.something file.) May 05 16:08:44 Leeds: How so? May 05 16:09:03 skfax: i hate to suggest this, but if you want dynamic layouts in app you might want to consider HTML May 05 16:09:09 skfax: at worst, come up with something a lot simpler than the Android XML stuff May 05 16:09:10 maybe some XSLT and XML too May 05 16:09:13 so the code starts like this: May 05 16:09:22 AttribtueSet attrs = Xml.asAttributeSet(parser) May 05 16:09:40 good greetings this morning May 05 16:09:41 Maybe it's that or something else. The other stuff looks plausible to me. May 05 16:09:58 alankila: i would love to be able to do this, because I want to build a live-layout preview tool. May 05 16:10:13 Since the eclipse layout preview is somewhat useless for any complicated layout especially involving custom views. May 05 16:10:16 readme: It's to be used for rendering widget layouts, so straight to a bitmap. HTML might be both a scary and good idea May 05 16:10:20 xbp: happy Sunday to you too! May 05 16:10:26 skfax: bitmap? hmm May 05 16:10:35 oops ; Thanks Leeds May 05 16:10:43 Beautiful day it is here May 05 16:10:52 skfax: I suggest you at least try XSLT and XML if you haven't. Android has all the tools you need for that. May 05 16:10:56 sat here still but beautiful none the less. A day to spend on the beach for sure May 05 16:11:09 Hm. Well, IDK, I can't find anything that obviously looks like it will break it May 05 16:11:26 I'd recommend to try it and see what happens. Maybe I do that myself, in fact, I'm simply curious about where it will crash May 05 16:11:55 the docs say the XmlpullParser must be returned from a compiled resource.. I'm guessing there are more than one concrete implementation of XmlPullParser May 05 16:12:16 I think I tried it before, but I don't even recall. I'd try it again today but I kind of have enormous piles of work May 05 16:12:20 readme: thanks :) i will continue on with the research May 05 16:15:24 has anyone had the .out.xml problem ? i read it's because there are extra xml plugins installed but i've installed none May 05 16:16:10 iirc the layoutinflater relies on the attributes and their values being compiled in the xml. i.e. match_parent would be compiled as its actual integer value, layout_width would be its integer value as well May 05 16:16:30 testing it now May 05 16:16:53 (also why match_parent works on 2.1) May 05 16:16:59 if you have any luck please post the code. we need a live-layout preview May 05 16:17:07 (and why you can read new attributes on old platforms, if making custom views) May 05 16:17:16 readme: http://vimeo.com/41497912 May 05 16:17:24 Someone already did it, kinda :p May 05 16:17:28 nice May 05 16:18:03 I like his stands May 05 16:18:06 I need to get those May 05 16:19:36 is the code somewhere? May 05 16:19:44 Dunno, only seen the video May 05 16:20:52 05-05 19:19:55.579: E/AndroidRuntime(570): Caused by: java.lang.ClassCastException: android.util.XmlPullAttributes cannot be cast to android.content.res.XmlBlock$Parser May 05 16:21:26 so there it is, a nice layering violation May 05 16:21:58 SimonVT: i wonder if this thing can do custom views May 05 16:22:48 Not really useful until it allows live xml editing while running an actual app :p May 05 16:23:07 I'd pay for that May 05 16:24:17 SimonVT: he's only been working on it for 3 weeks May 05 16:24:25 I wonder if he got the idea when we talked about it here : May 05 16:24:27 :| May 05 16:24:33 https://github.com/bignerdranch/Roger May 05 16:24:43 needless to say, I'm forking it now May 05 16:25:09 heh, cool May 05 16:26:31 it looks like he uploads the actual APK and dissects that May 05 16:27:50 requires "mac roger" May 05 16:28:00 I guess that means they are in need of a linux port. May 05 16:36:11 Hey guys, I have a SearchActivity (has layout with fields) SearchResultsActivity(has list). When I have more than 0 results from SearchActivitiy I want to pass that list to SearchResultsActivity. How can i pass the list May 05 16:36:35 or should i just use one single activity for both May 05 16:36:39 what is the best design May 05 16:39:04 Hi, I'm having issues with accessing an integer resource. Isn't the java method used as this : getInteger(R.integer.myInt) ? May 05 16:44:32 Sure May 05 16:52:48 i think i hate orms May 05 17:02:20 Why did they make it so hard to pass custom object data between activities. I really don't want to use Singleton May 05 17:03:18 make it parcelable May 05 17:03:19 easypeasy May 05 17:03:35 Hi, i have the same Clicked method for 9 Buttons can I in this method with a switch construct check wath i have clicked for a Button i have set a android:id in the main.xml layout. May 05 17:03:57 yes May 05 17:04:32 in your public void Clicked(View v) method, just do switch(v.getId()){case R.id.button1: case R.id.button2...} May 05 17:04:40 what's the best way to implement tabs on the bottom ? May 05 17:04:59 don't use tabactivity May 05 17:05:09 thanks t0mless May 05 17:05:11 Horizontal LinearLayout with textviews/buttons May 05 17:05:11 use tabhost and fragments May 05 17:05:18 i just found a custom tab implementation that allows to do this: http://code.google.com/p/androidtabs/ May 05 17:05:22 or just custom buttons May 05 17:05:57 pretty sure all of that can be done with the built in tabhost May 05 17:06:16 tabhost is as horrible as tabactivity May 05 17:06:22 t0mless: is the tabhost more recent? i didn't know it May 05 17:06:23 Should both have been deprecated May 05 17:07:20 You can accomplish the same thing with a linearlayout of customized buttons/views and fragments May 05 17:07:33 when I select a contact from my contact picker, it populates the phone editText with the selected number.... This works, but when I go to send the message and add to sql database, my app crashes.. If I edit the phone number manually, no crash. Its only when I select from the contact picker. Any ideas? May 05 17:07:56 t0mless: and is that approach better ? why? May 05 17:08:14 simpler, faster, less stupid May 05 17:09:08 abelianHorizon stacktrace plz May 05 17:09:26 and better than tabhost ? May 05 17:10:27 * t0mless shrugs May 05 17:10:31 easier to do for sure May 05 17:11:54 http://pastebin.com/Ky9zQGaD May 05 17:12:23 com.destructionlabs.Sms.SmsDataSource.createMessage(SmsDataSource May 05 17:12:23 .java:40) May 05 17:12:38 what is line 40 in SmsDataSource.java? May 05 17:12:56 line 40 in your SmsDataSource.java file. May 05 17:13:05 that is createMessage() which sends the sms object to my sql database May 05 17:13:13 totally missed the context May 05 17:13:16 * iSeeDeadPixels shuts up May 05 17:13:17 what is line 40 May 05 17:13:21 your problem is as simple as determining what is null, abelianHorizon May 05 17:13:30 ^ May 05 17:13:48 breakpoint at line 40 May 05 17:13:49 * readme recently stopped putting things on the same line that can evaluate to null May 05 17:13:50 see what is null May 05 17:14:00 that way if something is null, there's only one thing per line that can be null May 05 17:14:06 (if possible) May 05 17:14:15 t0mless: ok i'll give it a try but is there any similar tutorial or starting point ? May 05 17:14:24 The only thing I can think of is that the phone number in the textview is null because of the contact picker selection, but its showing up... May 05 17:14:29 o.O May 05 17:14:41 ddreamer0 not sure... it's pretty simple though May 05 17:14:56 Its just weird because everything works fine if I dont use the contact picker May 05 17:14:57 abelianHorizon: put some asserts in to see what is null Assert.assertNotNull(foo); May 05 17:15:02 remove them when you fix it May 05 17:15:15 this returns bool? May 05 17:15:54 never used asserts before May 05 17:15:54 abelianHorizon: SomeObject foo = null; foo.bar(); // NullPointerException May 05 17:15:57 ddreamer0 why do you need a tutorial? make your buttons and have them load whichever fragment you need May 05 17:16:23 abelianHorizon: they will cause your program to stop if the condition is false May 05 17:16:39 okay, sweet I'll try that thanks May 05 17:17:50 now that I look, asserts are key May 05 17:18:03 just remove them when you are done debugging. May 05 17:18:15 yeah yeah May 05 17:18:34 t0mless, when i click on a button then show the first toast msg correctly and then I see all toast msgs after the clicked button. Is my layout not correctly? I use LinearLayout vertical and in this LinearLayout Horinzontal. Want to see the code? May 05 17:19:02 because you're not putting break; in your case statments May 05 17:19:19 possibly because you don't know how switch() works. May 05 17:29:26 t0mless, thanks... omg break... May 05 17:51:17 tur tur key key May 05 17:51:53 t0mless:i found this but it doesn't look quite like what you were saying http://android.codeandmagic.org/2011/07/android-tabs-with-fragments/ May 05 17:52:01 pastebin: http://pastebin.com/3iQ5RckN May 05 17:52:01 displaying a list android.R.layout.simple_list_item_multiple_choice and also need to show a button at the top of list. Why the button does not show up on top of the list at runtime while it is visible in layout? May 05 17:52:25 t0mless: does is look more complicated than the buttons + fragments to you? (i've never used fragments= May 05 17:52:27 ) May 05 17:52:29 jaami: easy, you have a fill_parent ListView May 05 17:52:39 you want it to be layout_height="0dp" layout_weight="1" instead May 05 17:52:43 that will take up the remaining space. May 05 17:53:03 ddreamer0 that is pretty much the using tabhost with fragments concept May 05 17:53:58 and yes, that is more complicated than your fragments/buttons implementation May 05 18:03:23 t0mless: yeah, but i'm still going to rearch more the fragments+buttons, since you say i can avoid the tabhost and it's simpler May 05 18:05:37 Anyone tried implementing google maps for directions? I'm not quite sure how to implement routing, map is visible. May 05 18:08:20 how do you access the functions within a JNI C++ class from Java? May 05 18:11:00 all the examples use C and I have some existing C++ code I'm trying to incorporate :( May 05 18:13:53 I believe you must use the same technique that is used to call C++ code from C. May 05 18:15:00 http://stackoverflow.com/questions/6423078/use-c-with-android-ndk-jni May 05 18:15:26 although this one says that it just depends that you use a ".cpp" extension May 05 18:15:32 are you using ".cc"? that could be a problem May 05 18:16:23 This one says you need the extern "C" block. May 05 18:16:26 http://stackoverflow.com/questions/5292190/using-android-ndk-and-c May 05 18:16:45 readme: I have a GridView, that has many custom view (that consists of LinearLayout, with many textviews), it is not possible to make the linearlayout's height fill_parent? May 05 18:16:49 Note, the title of both of those was C++, but that stackoverflow removed the pluses for their link slug. May 05 18:17:05 java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams May 05 18:17:19 show me the code May 05 18:17:32 setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.FILL_PARENT)); May 05 18:17:34 It looks like you are using the wrong layout params May 05 18:17:50 you should use AbsListView.LayoutParams May 05 18:18:05 although I'm not sure if you're even doing it right (tm) because I don't know what your whole situation is. May 05 18:22:14 yep thanks May 05 18:56:44 ddp May 05 19:00:51 readme, thanks. May 05 19:03:06 finally after waiting too long, moved from svn to git May 05 19:07:34 QubeZ: i'm trying to like git - just having a hard time though May 05 19:07:48 seems like its at the wrong level of abstraction or something May 05 19:08:55 its weird coming from svn because well simplistically it did fulfill my needs May 05 19:09:00 but i wanted to try git May 05 19:09:30 like in git, you commit first to your local repo then push to the remote server May 05 19:09:43 It's so aggravating... even the examples that claim to be for C++... don't use a fcking C++ class! May 05 19:16:02 http://imageshack.us/photo/my-images/832/mofoyh4au3.gif/ May 05 19:17:57 Say I have a LinearLayout where I want to divide the space equally between X elements. Is there a way to automatically make the layout just show the number of elements it can comfortably fit, depending on the space available? May 05 19:21:04 skfax: are you sure you don't want a gridview? May 05 19:21:38 MDijkstra: just looking at the gridview tutorial now, I think so :-) cheers May 05 19:21:45 np :) May 05 19:49:20 Mind signing this guys? http://www.change.org/petitions/arm-release-openmax-codecs-for-arm-v6 May 05 21:02:43 I'm doing some HelloWorld stuff and I can't figure out why my activities only fill, like, the middle third of the screen instead of the entire width May 05 21:02:56 has anyone had the issue where in Eclipse if you ctrl+click on a class to go to its source, it will try and use the source attached to Android Dependencies rather than Referenced Libraries and therefore not find the source? May 05 21:03:13 Norfenstein: match_parent or fill_parent on layout_width will cause a view to fill the parent's width May 05 21:03:41 my top level view already has layout_width set to fill_parent May 05 21:03:50 ...maybe it needs to be match_parent... May 05 21:03:53 Napalm: yeah, in a library project it will open the class file instead of the java source in the library file May 05 21:03:59 Norfenstein: nah, they're identical May 05 21:04:09 your view is probably using all the space. change the background color so you can see. May 05 21:04:24 readme: know a fix ? May 05 21:04:27 try android:gravity if you want to center text May 05 21:04:35 what the hell is that ctrl+click feature called anyway May 05 21:04:37 Napalm: nope, I am guessing it would require actual work on the ADT and eclipse. May 05 21:04:41 open declaration? May 05 21:04:50 I usually right click and click open declaration May 05 21:05:08 it doesn't look like it's even the View's fault; the header for the entire activity doesn't even fill the screen width May 05 21:05:21 screenshots and code May 05 21:05:38 literally the output of android create project May 05 21:06:09 don't know how to get a screenshot yet May 05 21:06:36 run ddms from the tools directory of the sdk May 05 21:06:51 select the device or emulator, then select Device->Screen Capture May 05 21:08:44 readme: if you go into preferences > general > editors > text editors > hyperlinking, this is where you can select what it does.. looks like ADT overrides the default behaviour and perhaps you can turn it off May 05 21:08:53 =O May 05 21:09:33 i could change it to ctrl+shift for ADT and ctrl for default or something, that might work May 05 21:10:11 what they really need to do is make Android Dependencies pull the src reference over from the Referenced Libraries May 05 21:10:12 problem solved May 05 21:10:14 :( May 05 21:10:30 yes May 05 21:10:40 especially when an exception is thrown in the library code May 05 21:10:47 exactly May 05 21:10:49 and the class file is opened instead of the java src in library May 05 21:10:55 bloody pain, there must be a fix May 05 21:11:02 then you are trying to figure out why you can't edit it May 05 21:11:16 * Napalm goes to trawl through the depths of the internet May 05 21:13:56 readme: feel link rebuilding ADT? I found a patch May 05 21:13:57 https://android-review.googlesource.com/#/c/35702/ May 05 21:14:12 I haven't mustered the willpower to build the source tree May 05 21:14:20 well not the source May 05 21:14:22 just ADT May 05 21:14:23 am i right to say that to build ADT, you need to build the whole thing? May 05 21:14:27 readme: http://imgur.com/1CIb1 http://pastebin.com/Jnv90rSJ May 05 21:14:28 no May 05 21:14:31 i dont believe so May 05 21:14:32 I see ADT inside it, but I have no clue how to build it May 05 21:14:36 i have a checkout here May 05 21:14:37 since its just a plugin for eclipse May 05 21:14:46 right, it doesn't make sense that you would have to May 05 21:15:12 but I don't see an obvious way on how, and I was trying to find info on Android.mk files which are supposedly like regular Makefiles but I can't run them with make -f so I am kind of stumped May 05 21:15:28 Norfenstein: check large screen aware section of dev guide May 05 21:15:50 Norfenstein: what device is this screenshot taken on? May 05 21:15:54 nook color May 05 21:15:57 ugh May 05 21:15:58 running cyanogenmod 7 May 05 21:16:11 yea you need to add some stuff to androidmanifest May 05 21:16:15 i forget right this secon d May 05 21:16:28 k May 05 21:16:49 I have noticed at least one other program starting out narrow like this then expanding to full screen after initializing May 05 21:16:49 http://developer.android.com/guide/topics/manifest/supports-screens-element.html May 05 21:16:51 there you go May 05 21:16:54 thanks May 05 21:17:28 i wish I could spend the day building ADT but to get stuff done I have to accept what doesn't work and ignore it :| May 05 21:17:45 readme: yea i know what you mean May 05 21:18:02 I want to play with this, soon https://github.com/bignerdranch/Roger May 05 21:18:10 it does what I've wanted for a while: preview layout live on device May 05 21:18:12 but it needs work May 05 21:18:43 interesting idea May 05 21:18:50 i might have done that if i could be bothered May 05 21:18:54 I had the idea here three weeks ago, curiously enough, then someone did it May 05 21:19:02 but I didn't write it. so good for them,. May 05 21:19:20 if/when I ever have time I'll try to make it work on linux May 05 21:19:44 i dont think i would have done it like he has May 05 21:19:58 nah, that's not the solution I would have come up with either May 05 21:20:06 i would have sent the raw xml over tcp/ip socket and used the inflaters to inflate the content May 05 21:20:12 you can't do that May 05 21:20:13 and some factory stuff to override May 05 21:20:13 I tried May 05 21:20:19 oh rly? May 05 21:20:21 because the XML layouts in android are preprocessed May 05 21:20:24 yes May 05 21:20:26 i remember now May 05 21:20:29 ffff May 05 21:20:31 ;) May 05 21:20:43 you need to get a special instance of the XmlPullParser from the resources, somehow May 05 21:20:52 so that I beleive is why he pushes the whole APK May 05 21:20:57 hmm May 05 21:20:59 but apk May 05 21:21:10 i suppose it works May 05 21:21:15 it looks fast in his demo May 05 21:21:16 without too much hassle but still May 05 21:21:20 demo:? May 05 21:21:22 where where May 05 21:21:25 you don't push the APK yourself, it's zero click etc. May 05 21:21:39 http://vimeo.com/41497912 May 05 21:21:49 only problem I see with it right now is that it doesn't support custom views yet May 05 21:22:08 well that reqires code builds and other dependency issues May 05 21:22:16 so that kinda defeats the purpose May 05 21:22:43 my biggest gripe is that there is no way to tell how a layout will look in the ADT if it has a custom view in it. May 05 21:22:46 you need to build and run May 05 21:23:05 and recently, I wrote a custom view for the most fundamental of things: specify the font in XML. May 05 21:23:30 so one of my projects is full of custom views, practically unpreviewable unless I do a search and replace on the custom view to change it to a textview May 05 21:23:47 readme: i did the custom font aswell with attrs and the like May 05 21:24:06 readme: one of the most annoying things is theres no way to specify a font file from assets upfront in the layouts May 05 21:24:19 yeah, I coded that May 05 21:24:27 https://github.com/tom-dignan/nifty May 05 21:24:32 readme: so instead, ive overridden onCreateView in my base activity and it overrides TextView ;) May 05 21:24:38 works brilliantly May 05 21:24:39 you can specify font names in assets for NiftyTextView and NiftyButton May 05 21:24:42 oh yeah, that's another trick May 05 21:24:56 perhaps a better one May 05 21:25:02 you could aos take it a step further May 05 21:25:04 I'm kind of liking my solution too though May 05 21:25:11 make it so it creates the view May 05 21:25:16 and then overrides the Typeface May 05 21:25:21 https://github.com/tom-dignan/nifty/blob/master/src/com/tomdignan/nifty/NiftyTextViewHelper.java May 05 21:25:21 after creation May 05 21:25:34 so it would work on lots of different views May 05 21:25:35 hmm May 05 21:25:44 sorry for the crap indentation, I always forget to set it in eclispe when I have a new workspace May 05 21:26:14 that allows you to use a style to set the typeface or use an attribute in xml :) May 05 21:26:40 the default android fonts are ugly as hell May 05 21:26:47 and people wonder why ios fanboys make fun of android. May 05 21:27:45 readme: Do you mean Roboto, or pre-4.0? May 05 21:27:46 readme: something i had to do in my version was detect the style and choose the right font file May 05 21:28:05 skfax: yea, thats the reason why I did mine, so all views get Roboto May 05 21:29:48 skfax: to be fair yeah, the 4.0 fonts are kind of better May 05 21:29:49 readme: you might aswell make NiftyTypefaceHelper final May 05 21:29:50 is that roboto? May 05 21:29:57 good idea May 05 21:29:57 readme: yep May 05 21:30:00 readme: yes May 05 21:30:51 I also made a dialog that takes up the whole screen and allows animations on show and dismiss ;P May 05 21:31:41 trying to make my android port of an ios app not look inferior to the ios version. May 05 22:05:34 what could be the reason that Socket works on emulator but not on the phone itself? May 05 22:06:41 rimad: Do you have in your manifest? May 05 22:08:25 yes... May 05 22:08:42 i tested this in emulator, works great...i install apk on the phone, no go :( May 05 22:10:51 Is there a javadoc version of this webpage, with all the OpenGLES calls on it, with explanations? http://www.khronos.org/opengles/sdk/1.1/docs/man/ May 05 22:20:18 ah, it's throwing NetworkOnMainThreadException :-( May 05 22:27:16 hello? May 05 22:28:52 need a little help here.. May 05 22:30:04 with what? May 05 22:30:37 Storm2010: Have you tried that one thing? May 05 22:30:45 the one that does stuff May 05 22:30:56 OMG no i havent!! May 05 22:32:00 how can I reduce the width of an ImageView without rescaling the image (ie, causing to crop off right side of image) May 05 22:32:27 LayoutParams mahamoti May 05 22:32:40 mahamoti: android:scaleType May 05 22:33:22 i did imageView.getLayoutParams().width = x; but it rescales the image. i looked over scaleType and couldnt figure out how May 05 22:34:25 use padding. i think it works for images too. it works for text. May 05 22:34:54 Storm2010: he dont want that May 05 22:34:56 or margins May 05 22:35:10 Storm2010: he's trying to crop the right side of the image May 05 22:35:56 yeah. its an extending colorbar May 05 22:36:44 oh CROP May 05 22:37:06 mahamoti: make a new crop drawable that extends your current drawable and use that instead May 05 22:37:26 mahamoti: http://developer.android.com/guide/topics/resources/drawable-resource.html#Clip May 05 22:38:40 mahamoti: to be honest, why not just make a different drawable May 05 22:38:51 what are you trying to crop/clip anyway? May 05 22:39:04 ah ok thanks May 05 22:39:23 its a colorbar goes from blue to red May 05 22:39:45 just a different way to show rating May 05 22:39:49 I made something like that once May 05 22:39:50 lol May 05 22:39:51 lol May 05 22:39:55 I did a full rainbow though May 05 22:40:15 I didn't use a drawable, just used the canvas May 05 22:40:17 mahamoti: please tell me you are using a RatingBar widget May 05 22:41:25 meh that probably isnt what you want May 05 22:41:34 using a clip drawable May 05 22:41:37 and set the level as per the rating May 05 22:41:42 simplist solution May 05 22:42:02 readme: im doing a global app font override, want to test it out in a moment? May 05 22:42:16 did you extend Activity and override onCreateView May 05 22:42:27 yeah, didnt want to have stars etc. this is just 2 pixels tall. May 05 22:42:47 ive already done that, but because of the onCreateView semantics you cant do it for all views May 05 22:42:51 im working on another method May 05 22:42:54 share it on github and i'll check it out May 05 22:43:39 readme: i think im going to have to do a proxy for a LayoutInflater May 05 22:43:46 napalm wat kind of app is it? May 05 22:43:46 annoying but it could work May 05 22:44:16 I would like to write a LayoutInflater that doesn't require the preprocessed XML layouts :P May 05 22:44:34 possible by the looks of the code May 05 22:44:35 seems like it would be a lot of work though May 05 22:45:12 then you have the problem that android will keep changing and you'd have to keep your custom layout inflater up to date. that would be a sysiphean task May 05 22:45:43 readme: why? May 05 22:46:11 JesusFreke: because it would be constant work and always replicating the work of other people May 05 22:46:31 readme: no no. why would you want it in the first place? May 05 22:46:53 oh, have you seen this: https://github.com/bignerdranch/Roger May 05 22:47:07 I want the ability to preview layouts while I develop with custom views and all working May 05 22:47:21 i think a layout inflater that could take the regular XML unprocessed would be a step towards that goal May 05 22:47:29 ah. May 05 22:47:36 roger is pretty close to what I want May 05 22:47:37 I thought eclipse already did that? May 05 22:47:47 nah, it puts a gray box whereever you have a fragment or a custom layout. May 05 22:47:55 ah May 05 22:47:57 and on linux at least the layout editor is fairly buggy, too May 05 22:48:05 often I see a big box that says "TAB 1" instead of the layout May 05 22:48:12 yeah, I haven't really used it May 05 22:48:20 tbh I'd like to can it and just preview on the device forever May 05 22:48:27 at least it's accurate that way May 05 22:48:39 currently I don't own enough devices for that May 05 22:48:43 istr that IDEA does layout previews now. I don't know if it handled custom views though May 05 22:48:52 handles* May 05 22:49:02 yeah, I have heard IDEA has pretty good layout preview May 05 22:49:32 but community edition of intellij isn't doing so well on linux. last time I tried it I filed two bugs one of which was a dup but both are assigned so I am watching to see if they get fixed. May 05 22:49:53 buying a mac soon, although I really like linux. I need a mac because clients want android and ios from the same guy. May 05 22:51:25 I have a relativelayout in a scrollview, and when I dynamically add content to the relativelayout it doesn't let me scroll up once it's filled past the screen. May 05 22:51:58 mdwright: layout the scrollview May 05 22:52:08 mdwright: measure and layout the scrollview May 05 22:52:24 Link to xml: https://gist.github.com/a6089e3ceea78080b033 May 05 22:52:37 Napalm: measure and layout the scrollview? I'm not sure I understand what you're saying. May 05 22:52:52 ok first of all what id are you adding your views to May 05 22:52:57 im looking at your layout May 05 22:53:21 textContainer May 05 22:53:52 textScroll needs measuring and layout out again May 05 22:56:53 findViewById(R.id.textScroll).requestLayout(); May 05 22:56:59 mdwright: ^ May 05 23:00:33 Napalm: thanks! May 05 23:01:12 mdwright: if your adding more than one view at a time do the requestLayout after adding all of them May 05 23:01:41 hey how do i go to the next item in a cursor? May 05 23:02:05 Napalm: Hmm. It still doesn't seem to be working. I'm wondering if it's an issue with how I'm adding things to my relativelayout. May 05 23:04:12 Basically I'm adding each new item with alignParentBottom set, and then if there was a previous item I'm removing alignParentBottom and setting it to be Above my new element. May 05 23:05:43 mdwright: why exactly are you doing this? May 05 23:05:45 https://gist.github.com/4e86bdef915611569eb6 May 05 23:05:58 Napalm: essentially I'm trying to get something like the Messaging interface May 05 23:06:05 lol May 05 23:06:11 android supports this already May 05 23:06:16 Napalm: oh? how? May 05 23:06:35 http://developer.android.com/reference/android/widget/AbsListView.html#attr_android:transcriptMode May 05 23:07:22 mdwright: your Adapter can return your views and maintain the relationship with backing data May 05 23:07:34 Storm2010: moveToNext() May 05 23:07:52 readme doesnt work...tried already May 05 23:08:15 im trying to launch the settings activity , specificly "language&input" any idea how to get there ? May 05 23:08:19 Napalm: cool! thanks May 05 23:08:27 the intent with the component from honeycomb no longer works May 05 23:08:29 believe me, it works. you must have something wrong in your code. May 05 23:08:48 check the return value to make sure the move succeeded. May 05 23:08:49 wana take a look? May 05 23:09:04 Storm2010: if you call Cursor.getCount() what is the result May 05 23:09:05 only if you can drill the code down to a minimal example that demonstrates the issue May 05 23:09:08 if its 1, you know your problem May 05 23:09:24 using ClipDrawable, it works. altough the documentation had a bug, it said to assign background to the ClipDrawable but really you have to assign src image. May 05 23:11:31 1351 May 05 23:12:16 mahamoti: not really, it depends on how you use it i believe May 05 23:12:42 mahamoti: the drawable resource documentation is notoriously unreliable May 05 23:12:45 so who knows May 05 23:13:32 napalm the return was 1351 May 05 23:14:20 Storm2010: your cursor is probably at the end of the data then, first use Cursor.moveToFirst() then do your loop with Cursor.moveToNext() May 05 23:17:14 http://codepad.org/Dn2cYbVG May 05 23:20:02 know wat im doing wrong? May 05 23:20:52 did you ever print cursor.getCount()? May 05 23:20:58 to see how many rows were returned May 05 23:21:18 yes it returned 1351 May 05 23:21:22 [18:11] 1351 May 05 23:21:34 why aren't you doing anythin gin the body of the do {} while() May 05 23:21:36 it's empty May 05 23:21:51 also, you shouldn't nest if statements when you can instead use && May 05 23:22:00 if (cursor != null && cursor.moveToFirst()) { } May 05 23:22:02 is more readable May 05 23:22:11 How do i launch the keyboard settings activity ? May 05 23:24:23 Is there a way to get dialog box to show up in front of a fullscreen OpenGL view? May 05 23:24:46 dark3n: startActivity(new Intent("android.settings.INPUT_METHOD_SETTINGS")); May 05 23:24:57 Napalm, that easy :D ? May 05 23:25:17 i used new ComponentName("com.android.settings","com.android.settings.Settings$InputMethodAndLanguageSettingsActivity"); May 05 23:25:58 Nameless, thx May 05 23:26:01 fu May 05 23:26:04 Napalm, thx May 05 23:26:22 Napalm, since what API is this available ? May 05 23:26:37 or ICS only? May 05 23:26:47 no idea May 05 23:26:58 i only have the latest source tree checked out May 05 23:28:27 Napalm, k works on 2.3 too May 05 23:28:31 gonna check out the 1.6 emulator May 05 23:28:46 I'm writing code so that every 10 seconds I send an update to LocationManager to get an update for the location of the user using the GPS and draw it on mymap view. The code is here: http://pastebin.com/xjK8ZzGR the problem is, my onLocationListener doesn't get called when i implement it this way and I'm not sure why. I put a Toast message in the onLocationListener but its never displaying May 05 23:29:48 Napalm, works on 1.6 emulator too May 05 23:31:14 anyone have an idea whats wrong ? May 05 23:32:27 try running it from a thread May 05 23:32:49 i do May 05 23:33:03 from what I've read you need to use a handler which I do May 05 23:35:12 i dont see new Thread(new Runnable() { public void run() { May 05 23:35:16 anywhere May 05 23:35:34 or anything like tht.... May 05 23:35:48 that doesn't work in android May 05 23:36:09 i thought that you don't do it like that May 05 23:36:12 im running a thread now..... May 05 23:36:21 tht was a snippet from my code May 05 23:36:27 I've read you need to use a handler May 05 23:36:56 can you show me the code of the thread May 05 23:37:01 I'm trying to use a timer May 05 23:37:03 one sec May 05 23:38:09 devslash: how do you run it? without a timer May 05 23:38:10 http://pastebin.com/zivNtcSE May 05 23:38:31 Thread.sleep(time in milliseconds here) May 05 23:39:10 dark3n: good to know May 05 23:39:39 devslash: I would create a Handler, and then make it call your OnLocationChanged(New Location) May 05 23:39:54 i did May 05 23:39:56 http://pastebin.com/xjK8ZzGR May 05 23:40:16 but i don't call onlocationchanged May 05 23:40:22 not like that May 05 23:40:33 because i can't provide the location i need the gps to provide that May 05 23:40:37 a handler is a timer, no need to create a timer that calls a handler May 05 23:40:41 give me a sec, i'll correct that May 05 23:40:45 ok thanks May 05 23:41:28 oh, what I can do is telling how to use a handler, but GPS locator i have no idea how to work with May 05 23:43:20 i need to call lm.requestSingleUpdate(LocationManager.GPS_PROVIDER, pendingIntent); which should call onLocationChanged with the new location May 05 23:43:55 so you want your handler/time to call that piece of line? May 05 23:44:06 yea May 05 23:44:09 every 10 seconds May 05 23:44:16 Is there anything wrong with this "cursor pattern"? http://pastebin.com/znzMkTFD May 05 23:47:40 ekh: any idea how to implement it ? May 05 23:47:46 1 sec May 05 23:48:47 http://pastebin.com/XmTBWvCk May 05 23:49:01 something like that, fix the errors, references, imports, if any May 05 23:50:39 devslash: handler.postDelayed(); Thread.sleep(); etc May 05 23:50:50 ? May 05 23:50:53 ? May 05 23:51:03 i dont understand May 05 23:51:45 well, ask a useful question that targets the specifics of what you wish clarified May 05 23:51:52 i thought i did May 05 23:51:59 me too May 05 23:52:02 i answered May 05 23:55:59 pragma- where do i place that code May 05 23:58:41 so...yeah May 06 00:04:53 readme it still didnt work May 06 00:05:34 Storm2010: define what it is that doesn't work May 06 00:05:38 the uniqueID that is sent to the Notification Manager, is it associated with a message? an application? May 06 00:08:00 well ill say i dont know what to put in the do section of the if (cursor != null && cursor.moveToFirst()) { May 06 00:08:10 Lets put a print statement? May 06 00:08:16 first, I'm not sure why you have that do while May 06 00:08:25 why do you have it? what is it for? May 06 00:08:31 I think you are cargo-cult programming May 06 00:09:47 well tht i just pasted in there May 06 00:09:59 programming is not cut & paste and hope it works. May 06 00:10:14 you should know what every line of code is at least SUPPOSED to do, or at least what each class does. May 06 00:10:30 if you have a do while in your code & don't know what it's for, that's a red flag May 06 00:10:40 if you don't know what code does, just remove it! May 06 00:11:02 (don't use that advice when working with other more talented people-- ask them what it does) May 06 00:11:55 take a complicated example you don't understand. run it, see that it works. Then start building a new one, to copy it May 06 00:12:06 that way you put each line in yourself, and you know what it does. May 06 00:12:13 ok. well i was gonna try at first if this then do move to next position as one of the failures ive had and i just lift it there May 06 00:12:37 I honestly don't really know what your code is supposed to do so I can't advise. my advice is to take the example you have and restructure it piece by piece in a new project until it works May 06 00:12:41 start with JUST the cursor May 06 00:12:47 and get it to print the media file metadata to logcat May 06 00:13:47 ok well it really just passes the filename path to a musicplayer service tht runs in the background and launches a visualizer May 06 00:15:22 ok so can you tell me: specifically what is the problem you are trying to solve *right now* May 06 00:15:59 is it: why doesn't the cursor move to next? May 06 00:17:45 going to the next song May 06 00:18:03 yes exactly May 06 00:19:15 in your code, here: http://codepad.org/Dn2cYbVG May 06 00:19:17 I don't think you need to understand everything fully - what does that even mean? May 06 00:19:47 For example, what are the first steps that happen when a modern PC boots - I have no idea, the answer is nowhere on the Internet May 06 00:19:48 Ologn: http://en.wikipedia.org/wiki/Cargo_cult_programming May 06 00:19:52 cargo-cult is an anti-pattern. May 06 00:20:06 it's fine to use black boxes, but ritualistically including code that has no effect or doesn't work is an anti-pattern. May 06 00:20:44 like the do while in his paste, with nothing in the loop body May 06 00:20:50 which he hasn't explained the purpose of May 06 00:21:30 If a black box works I don't learn how it works. If it has problems, that's when I learn about it. May 06 00:21:52 Ologn: I agree. but you see how I wasn't necessarily talking about abstraction. I was talking about cargo-cult. May 06 00:22:01 sorry if I wasn't specific enough May 06 00:23:41 Storm2010: what is the purpose of the do while loop in your code. Why is it there? May 06 00:25:01 [19:11] ok. well i was gonna try at first if this then do move to next position as one of the failures ive had and i just left it there May 06 00:25:11 ok, delete it then May 06 00:25:25 now, which part of the code are you asking me about now? May 06 00:25:25 did it already May 06 00:25:28 what lines? May 06 00:25:53 is it this? http://pastebin.com/zivNtcSE May 06 00:29:35 no thts from another class updating the seekbar May 06 00:30:21 ok i found the position of the playing media as 0. how do i go to one May 06 00:30:53 moveToNext() May 06 00:31:10 I think the reason it doesn't work is because you're using that same cursor in your SimpleCursorAdapter for your listview. May 06 00:31:52 so create two cursors? May 06 00:32:03 That would probably solve it, but there is likely a better way May 06 00:32:11 like your own adapter May 06 00:32:24 you would want the current track to be highlighted in the listview, right May 06 00:33:58 yeah May 06 00:37:24 call getItem() on your SimpleCursorAdapter instead May 06 00:38:27 actually, that doesn't even seem safe to do. forget I said that. May 06 00:40:33 lol ok.. May 06 00:40:35 I'll do an experiment May 06 00:50:38 <[[thufir]]> whois AbsurdMind May 06 00:51:22 Any android devs want to give me a hand with: http://stackoverflow.com/questions/10467175/drawing-non-rectangular-shapes-on-android May 06 00:54:47 Storm2010: nah, I just wrote the code and moving the cursor works fine. May 06 00:55:16 using moveToNext(); May 06 00:55:23 yes May 06 00:55:37 http://pastie.org/3866338 May 06 00:55:44 ok it must be how im doing it May 06 00:55:45 of course, once you press an item in the listview or scroll, the cursor will move. May 06 00:55:53 so you'll need to think about that May 06 00:58:24 Is it possible to limit GridView to one row? May 06 00:58:33 yeah May 06 00:59:27 I mean, if by row you mean column, then sure. May 06 01:00:05 hehe :P May 06 01:00:23 don't know why they don't have a "setNumRows()".. probably some clever reason May 06 01:00:44 so it could scroll sideways instead? May 06 01:01:38 I'm not sure an element in your gridview has to have the same height as all the others. May 06 01:01:42 I don't want it to scroll. I just want to show as many elements in a horizontal line as possible. The ViewGroup should figure out how many items that can fit May 06 01:03:10 ok, then you can do that. numColumns, and stretchMode seem relevant May 06 01:03:43 but it's going to want to scroll vertically May 06 01:03:43 hmm May 06 01:04:40 yeah, auto_fit works well - but i still get several rows May 06 01:06:13 http://stackoverflow.com/questions/4852867/how-to-disable-gridview-scrolling-android May 06 01:08:22 readme: cheers :) it seems like romain has the right answer :( "roll your own" May 06 01:12:00 -join windows May 06 01:12:15 Ñ= May 06 01:12:29 :) May 06 01:12:33 funny eh ? May 06 01:13:14 readme: "GridView: Displays a scrolling grid of m columns and n rows." Misleading advertising ^.^ n is not user selectable May 06 01:14:06 it's not what it says, but what it doesn't say May 06 01:14:23 it's correct, but it should include something that says the number of rows is not selectable May 06 01:21:42 hey readme can i call movetonext from another actvity if the cursor is still open? May 06 01:25:42 yeah, you can, but I would think you should put the cursor in a service, at the very least. May 06 01:26:28 Hi guys! May 06 01:26:36 it's my first time here May 06 01:26:45 hi May 06 01:28:22 omg i never thought of tht.. May 06 01:42:32 hey readme May 06 01:42:35 you about May 06 02:06:05 NotificationManager is not allowing me to send the same message more than once (same id and message), although i canceled it after i used it the first time May 06 02:20:01 Quite indeed. May 06 02:20:08 StringPool. May 06 02:20:22 @@ May 06 02:20:33 ... May 06 02:20:50 thought it was for me May 06 02:20:54 o?o May 06 02:34:35 readme i figured out why that method doesnt work. its not that moveToNext() doesnt work. it does. its changing the datasource for the song **** ENDING LOGGING AT Sun May 06 03:00:01 2012