**** BEGIN LOGGING AT Wed Jul 03 02:59:58 2013 Jul 03 03:00:23 guys, what does this error mean please : "com.sun.istack.internal.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML" Jul 03 03:10:02 jayn, i take it you're writing out xml documents as opposed to reading them. Jul 03 03:12:29 timemage, nope I just write my classes and for the xsdl, it would autmatically be generated Jul 03 03:13:23 jayn, the reason why i ask it the error sounds like you have a node in your xml three with a child reference that points to a parent or the opposite. Jul 03 03:13:35 jayn, not sure how that comes about just from reading xml. Jul 03 03:14:24 timemage, that's it but the problem that I have a circular persistence if u see what i mean? Jul 03 03:15:06 jayn, i don't, but then i barely understand the problem. i don't know what xsdl is, and the last time i played with sax was probably over three years ago. Jul 03 03:15:42 jayn, what is "circular persistence" ? Jul 03 03:18:12 timemage, wsdl sorry (such xml files), about the "circular persistence", I have two classes that they reference to each other Jul 03 03:18:47 so when I call the first, it will call the second and the second will call the first, etc.. Jul 03 03:18:58 timemage, that's the problem Jul 03 03:19:28 jayn, you mean "circular dependency", i think. Jul 03 03:19:52 jayn, or mutually dependent. Jul 03 03:20:19 timemage, maybe ^^ Jul 03 03:23:57 jayn, http://stackoverflow.com/questions/4922548/web-service-cycle-using-contract-first-in-java sounds like you're looking at something like that. sorry, i don't know anything about wsdl. Jul 03 03:27:02 timemage, not really but I really appreciate your effort thank you very much :)) Jul 03 03:27:40 jayn, this is not something that ##java is better suited to? Jul 03 03:30:07 timemage, I've just poster my question and they wasn't really helpfull except mapreduce Jul 03 03:30:25 hello.. I am developing android GUI elements in Eclipse. I am using Margins around elements which are contained by a LinearLayout Jul 03 03:30:30 timemage, posted** Jul 03 03:30:39 they show up just fine in the eclipse GUI preview Jul 03 03:30:45 but not on the device Jul 03 03:30:52 has anyone else had this problem? Jul 03 03:31:05 or, what could cause margins not to show up? Jul 03 03:31:18 (elements touching eachother, no space between them) Jul 03 03:31:53 jayn, ok. Jul 03 03:32:24 ForestJohnson developing ? Jul 03 03:32:28 you mean designing ? Jul 03 03:32:30 sorry Jul 03 03:32:32 designed Jul 03 03:32:33 cause either way thats bad Jul 03 03:32:40 I mean Jul 03 03:32:42 you dont use layout editor to design Jul 03 03:32:43 writing dat xml Jul 03 03:32:46 for the layout Jul 03 03:33:18 what do you mean.. ? it needs to be tested on the device? or.. ? Jul 03 03:33:49 no i mean you use eclipse + layout editor + test on device, AFTER designing Jul 03 03:34:13 oh. well, I came up with a design already. I am just trying to get a margin between my elements Jul 03 03:35:56 can LinearLayouts have margins around them? Jul 03 03:36:26 I have n linear layouts contained in another linear layout Jul 03 03:36:34 margins are child to parent attribs Jul 03 03:36:40 so yes Jul 03 03:36:48 hmm Jul 03 03:37:04 i might just add transparent pixels for now because I don't know how to fix this Jul 03 03:37:22 sorry to bug you with these (probably) stupid questions Jul 03 03:37:41 not at all, clean your project Jul 03 03:37:48 then try run again Jul 03 03:42:06 transparent pixels works :) Jul 03 03:46:21 * capella stingray_ gets less sleep apparently than I do :P Jul 03 03:46:58 "i'll get all the sleep I need when I'm dead" 5pts for film 10pts film and actor Jul 03 03:47:02 :) Jul 03 03:48:47 hey, I was using an activity as "noHistory=true" but just noticed that if the app goes to background that activitity isn't recreated... is there a way to have A->B->C where B won't be considered in the back stack and it can go to the background? Jul 03 03:55:29 finish b when starting c. Jul 03 04:04:39 codebutler: excellent! :) Jul 03 04:20:22 hey.. so the AVD in Eclipse blows as everyone knows... I usually always test on my physical devices but my nexus7 (the second one) is now broken again (same problem as the first - do NOT buy nexus7) anyway I set up android on an Oracle VM box... question is --- how can I debug and test my applications (in eclipse) on the oracle vm box? Jul 03 04:20:57 KillmeSoftly: my nexi are all fine Jul 03 04:21:03 and have been since I got them Jul 03 04:21:06 :) Jul 03 04:21:26 and yes they include nexus 7 Jul 03 04:21:46 looking at one now, been on for months an all good Jul 03 04:21:49 ok well i have gotten 2 bad ones Jul 03 04:21:56 whats been the prob ? Jul 03 04:21:58 fair enough Jul 03 04:22:11 how can i debug my shnizzes on Oracle VM box Jul 03 04:22:33 with adb like any other entity Jul 03 04:22:37 oh the screen cracked when I put it under a 2-5 lb. book on android 4 Jul 03 04:23:08 i have never debugged using any emulator before so i have really no idea... but im waiting for my new nexus7 to come in...alright Jul 03 04:23:35 oh and the input jack for sound broke within 1st day --- same thing happened with my old one Jul 03 04:23:37 adb = debug for emulator, device….. anything Jul 03 04:23:42 well anything android Jul 03 04:24:37 the life of my galaxy nexus has been disasterous at best, and I've not damanged my screen in the least Jul 03 04:24:47 fell out of my pocket while riding my motorcycle Jul 03 04:25:03 ron_frown: ottabox Jul 03 04:25:07 nope Jul 03 04:25:09 all my crap has it Jul 03 04:25:10 no case Jul 03 04:25:19 I scratched the screen on my S2, dropped it on the bus and it skidded across some grit on the floor Jul 03 04:25:20 the plastic bits around the edges is torn up Jul 03 04:25:21 ipads, gnex etc Jul 03 04:25:24 but still functionally perfect Jul 03 04:25:27 defender series Jul 03 04:25:38 really impressed with it Jul 03 04:26:00 ron_frown: the hardest phone I have had to break was 1st gen iphone Jul 03 04:26:11 I wasnt so lucky with that one Jul 03 04:26:22 I kinda ran over it twice with maybe 3-4 tonne Jul 03 04:26:26 okay so adb on eclipse... i would assume eclipse documentation would tell me how to make it debug it on my oracle vm box? Jul 03 04:26:42 KillmeSoftly: has nothing to do with eclipse Jul 03 04:26:55 what what is this oracle box you refer to Jul 03 04:26:57 ADT plugings > adb > debug device Jul 03 04:27:06 ok Jul 03 04:27:07 adb has all the commands you need Jul 03 04:27:12 like "connect" Jul 03 04:27:15 ;) Jul 03 04:27:22 lol thnx Jul 03 04:28:38 how do we use OR with db.query in sqlite? can't seem to find it in the docs Jul 03 04:28:44 i could do rawquery but trying ot use .query... Jul 03 04:29:15 why am i such a tard and never remember where i put my android sdk? (no answer that, just expressing my frustration about myself) Jul 03 04:30:08 did you check in the kitchen? Jul 03 04:30:22 good place to check Jul 03 04:30:50 OK GUYS Jul 03 04:30:56 how the fuck do I do the android havas Jul 03 04:31:00 javas Jul 03 04:31:16 ...question that is unrelated to android-dev (yes i know what chan im in) --- what the fudge does immunization mean in terms of virus/malware protection? Jul 03 04:31:28 ron_frown: what the hell does that mean? Jul 03 04:31:32 funny buzzwords Jul 03 04:31:34 get a book? Jul 03 04:31:47 HAHAHAHAHAHAH Jul 03 04:31:54 I was trolling you Jul 03 04:32:32 gottem Jul 03 04:32:39 bloody C# weenies Jul 03 04:33:02 moi Jul 03 04:33:22 why would extending SherlockFragmentActivity cause me to get java.lang.NoClassDefFoundError when i try to launch the app? Jul 03 04:33:43 i would say tho... i only develop for 4.2.2 and my android 4 book (published in september 2012 or october or november...) is somewhat outdated... why does the android team always feel the need to deprecate sooo many things (again, dont answer.. just frustration) Jul 03 04:34:04 i added the progaurd config and of course included the ActionBarSherlock library project and referenced it Jul 03 04:34:16 compiles fine, it's a runtime error Jul 03 04:34:30 i prefer hard books rather than actual android docs online.. i like tit. ...okay im done.. thanks guys good night/morning... 7 days till PALESTINE!!!!!! woooo Jul 03 04:34:30 speakingcode: look higher up for VerifyError Jul 03 04:34:32 could be proguard Jul 03 04:34:43 or jake can answer your shit Jul 03 04:34:50 his buggy ass shit is his problem;-) Jul 03 04:34:58 nah it's not me Jul 03 04:35:12 class loader is rejecting your class because it can't find ABS Jul 03 04:35:33 yeah there's a VFY error Jul 03 04:36:18 yup you appear to be right. know how i resolve it? Jul 03 04:37:18 off topic (again) --- Snowden: hero or anti-hero??? peace Jul 03 04:39:03 i see a post on SO about it but it says to change 'lib' folder to 'libs' but it's already libs Jul 03 04:42:31 what does the verify error say? Jul 03 04:43:10 unable to resolve superclass fo Landroid/support/v4/app/Watson, etc etc Jul 03 04:43:56 down the rabbit hole to SherlockFragmentActivity and then my activity that extends it Jul 03 04:46:28 You're missing the support library then Jul 03 04:47:02 Hello, I have an application distribution question, is it possible to publish a paid app from lebanon? and how can one receive the payments? Jul 03 04:48:43 I have never published an app before Jul 03 04:50:29 i have the support lib included, tho Jul 03 04:51:34 Apparently not Jul 03 04:51:42 The classloader can't find it Jul 03 04:51:53 The superclass of Watson is FragmentActivity Jul 03 04:52:00 it's in the build path Jul 03 04:52:55 ah, got it Jul 03 04:52:59 added it to order and export Jul 03 04:54:10 thanks for the assistance Jul 03 04:56:26 only developers from supported locations for merchant accounts can sell paid applications? Jul 03 04:56:42 probably Jul 03 04:57:09 other app distribution sites may have other policies, but google sets the policy for google play store and that is the most popular of course Jul 03 05:10:09 Is there a way to use selection without selectionArgs in sqlite? Jul 03 05:10:15 i know its not android specific... Jul 03 05:14:50 yeah just dont use them :) Jul 03 05:22:40 which is better for android dev, linux or windows? Jul 03 05:23:33 if you have a device they're probably about the same, but i feel like the emulator is a bit less buggy on windows Jul 03 05:23:54 and google tv android is only really doable from linux Jul 03 05:25:01 i've found the emulator MORE buggy on windows Jul 03 05:27:45 linux is better for development in general in my opinion Jul 03 05:30:11 ron_frown: hah, Google TV... you're a comedian! Jul 03 05:43:35 Linux with intelliJ idea IMHO Jul 03 05:46:21 Android studio EAP is less laggy in linux compared to windows Jul 03 06:20:18 got a jni prob: http://paste.stejau.de/?387 i am creating a direct byte buffer for passing bytes to a c function, but i am getting the error documented in this paste.... what i am doing wrong? Jul 03 06:33:10 Hi all, is there a way to set a custom timeout for the OkHttp client? Jul 03 06:33:23 set it on the HttpURLConnection Jul 03 06:33:54 does this mean I need to get the code instead of using the jar file? Jul 03 06:34:03 https://developer.android.com/reference/java/net/URLConnection.html#setReadTimeout(int) Jul 03 06:34:04 https://developer.android.com/reference/java/net/URLConnection.html#setConnectTimeout(int) Jul 03 06:34:19 no, you set it after calling .open() Jul 03 06:34:27 ok Jul 03 06:34:38 if I'm using Volley, is this done in the queue? Jul 03 06:35:04 i should hope so Jul 03 06:35:18 otherwise that's a HUGE bug because the defaults are 0 Jul 03 06:35:53 well, I didn't find it as an exposed method in the volley queue Jul 03 06:36:09 I just looked. It definitely sets values Jul 03 06:36:41 it's defined by the RetryPolicy Jul 03 06:36:49 question is if they're customizable Jul 03 06:36:53 oh Jul 03 06:36:58 I'll look into it Jul 03 06:37:26 it is, you just have to construct the RequestQueue yourself rather than using the factory method Jul 03 06:38:00 I lied, it's set per-request Jul 03 06:38:05 yes yes Jul 03 06:38:08 just found it Jul 03 06:38:31 so I can set a RetryPolicy for each request I have Jul 03 06:38:39 to customize every single request Jul 03 06:38:42 that's cool Jul 03 06:38:53 btw, LIER!!! Jul 03 06:38:55 :P Jul 03 06:39:11 your fault for trusting me Jul 03 06:39:13 i don't use Volley Jul 03 06:39:23 ?! Jul 03 06:39:40 didn't you just recommend it on your G+ profile? Jul 03 06:39:55 yes, because people suck at doing HTTP Jul 03 06:40:03 well... Jul 03 06:40:09 *shameful face* Jul 03 06:40:14 * thepoosh is ashamed Jul 03 06:40:19 well it's hard Jul 03 06:40:28 and Volley makes it... easier, I guess Jul 03 06:40:34 how do you manage your request queue? Jul 03 06:41:01 got shoved into this after opening a different thread for each request Jul 03 06:41:06 killed battery Jul 03 06:41:08 yeah, that's bad Jul 03 06:41:11 you should use an Executor Jul 03 06:41:15 I use Retrofit Jul 03 06:41:39 Volley requires that the calling code know waaay too much about HTTP Jul 03 06:41:41 looking into it Jul 03 06:41:50 http://square.github.io/retrofit/ Jul 03 06:41:53 how? Jul 03 06:42:02 you are a real square fan Jul 03 06:42:05 :) Jul 03 06:42:47 heh, is that a surprise? Jul 03 06:42:55 idk, do you work there? Jul 03 06:43:00 i do Jul 03 06:43:17 I always thought you're a freelance god-like guy Jul 03 06:43:25 * thepoosh is ashamed Jul 03 06:43:32 oh Jul 03 06:43:40 just saw you wrote the sample app for this Jul 03 06:43:41 :D Jul 03 06:44:34 and a bit more. But yeah, Retrofit is one of my babys. Jul 03 06:44:41 cool Jul 03 06:44:50 it's not on you personal github or websit Jul 03 06:44:57 if I recall correctly Jul 03 06:45:29 it's #2 on my "Repositories contributed to" Jul 03 06:45:34 oh Jul 03 06:45:47 I guess I just took the view pager indicator and ABS Jul 03 06:47:02 is there a benchmark anywhere to compare those two? Jul 03 06:47:16 no Jul 03 06:47:19 there's no point Jul 03 06:47:21 hmmmm Jul 03 06:47:30 the actual HTTP call is going to be many times slower than the actual library code Jul 03 06:47:30 maybe now is a good time to start this Jul 03 06:47:42 how do you mean? Jul 03 06:47:48 oh Jul 03 06:47:57 nvm, just read both lines Jul 03 06:48:05 cool Jul 03 06:48:25 I think I'll still use Volley, for the management Jul 03 06:48:38 it looks like it fits my needs better Jul 03 06:48:55 even though it's full of bloat Jul 03 06:52:20 JakeWharton: thanks for today and yesterday, you helped a lot Jul 03 06:52:22 :D Jul 03 06:53:05 glad i was actually helpful Jul 03 06:53:29 hey ppl, damn heads spinnign from that bottle of wine last night Jul 03 06:54:43 hopyfulyl today is my last day of fixes on this damn app Jul 03 06:58:29 watched "the net" last night with Sandra Bullock, lol..... Jul 03 06:58:52 weebee Leeds Jul 03 06:59:12 ahah the net Jul 03 06:59:22 yeh was pretyt hilarious Jul 03 06:59:35 also i dont believe any guy would kill her lol Jul 03 07:00:16 client has asked me for a web view with full controls... im like why dont we use a browser Jul 03 07:00:21 that reminds me of all the horrible 90's movies Jul 03 07:00:27 lawnmower man Jul 03 07:00:33 johnny mnemonic Jul 03 07:01:04 etc Jul 03 07:01:10 Edward scissorhands Jul 03 07:01:25 that was a documentary i thought Jul 03 07:01:50 Waterworld ... (when was that?) Jul 03 07:06:18 '95 Jul 03 07:06:34 ha. i was right Jul 03 07:07:44 ?! Jul 03 07:07:48 hah? Jul 03 07:08:10 icetooth ive got very into johnny mnemonic recently, hes on my profile pic currently lol and i watche dlawnmower man 2 weeks ago Jul 03 07:08:34 its this game im writing i want all the cyberpunk weirdness in there, and the rift has inspired me to be into VR stuff :) Jul 03 07:09:03 the only thing that doesnt inspire me is the need for 120 fps ;/ Jul 03 07:09:07 haha nice, i havent seen it in like 15 years probably, wasnt there like dolphins and weird stuff? Jul 03 07:09:21 yep theres a dolhin in a glass tank with some silly name Jul 03 07:09:24 dolphin Jul 03 07:09:36 which is weird my game is a bit dolphin-y Jul 03 07:11:23 someone needs to make a 90's era cyberspace plugin for some web browser when the occulus rift hits Jul 03 07:11:38 future cyberspace, in 90's vision Jul 03 07:12:05 yaaahhhh Jul 03 07:12:14 io got the rift and the intel perceptual camera Jul 03 07:12:19 i could do the whole using your hands thing Jul 03 07:14:00 it would give me a reason not to continue hating the internet Jul 03 07:14:02 oh noez Jul 03 07:14:11 why are we talking about crappy movies? Jul 03 07:14:27 because theyre becoming our day to day reality Jul 03 07:14:48 i often convert idiotic lawn mower men into super intelligent semi computer beings Jul 03 07:15:02 meh Jul 03 07:15:53 ahah someone edited that whole movie into just the CGI scenes http://www.youtube.com/watch?v=I33u7P-XokE Jul 03 07:16:31 lol, im so replicating this in my game Jul 03 07:17:39 * StingRay_ used to have to do artwork to that quality Jul 03 07:17:49 at a time when that quality was good ! Jul 03 07:18:42 hehe Jul 03 07:18:47 wonder if they used Amigas Jul 03 07:20:49 hmm i so need a new android device, still deving on n1 Jul 03 07:21:00 infact all the android devices i have were sent to me for free.. lol Jul 03 07:21:54 wow, how did you get them free> Jul 03 07:21:55 ? Jul 03 07:22:25 Google mostly, and Sony: g1, 2x nexus ones, htc flyer, and a sony smart watch Jul 03 07:23:17 google sent you them free? Jul 03 07:23:23 yeh Jul 03 07:23:28 many ppl in here too i think Jul 03 07:23:37 i got some from going to events Jul 03 07:23:52 iod have had a google tv box too if i was a yank Jul 03 07:24:43 if google is looking, i'm using a kindle fire its making me very disgruntled :] Jul 03 07:24:59 i find that even the new devices are slower than my nexus one in many ways Jul 03 07:25:01 which is very weird Jul 03 07:25:08 my mate has htc one x and it drags so bad Jul 03 07:29:46 oh on a final note, this is what got me goign last night http://apcmag.com/top-10-worst-movie-tech-moments.htm Jul 03 07:30:08 that top pic of johhny is my rofile pic lol Jul 03 07:30:27 u can see chinese numbers in the background too and an ancient crt Jul 03 07:31:11 8. The Lone Gunman (2001) Jul 03 07:31:18 ... what a weird pilot episode Jul 03 07:36:21 hehe Jul 03 07:38:27 I still think independence day is the worst Jul 03 07:38:37 yeh Jul 03 07:38:42 i laughed at that at the time Jul 03 07:38:43 where they can infect a spaceship with a virus Jul 03 07:39:01 and i was a mere teen Jul 03 07:40:04 me too, but when I thought about it later Jul 03 07:40:17 it was just ridicules Jul 03 07:40:47 actually they havent put matrix 2 or 3 in there Jul 03 07:40:51 they would be if the list was longer Jul 03 07:41:16 damn, i had convinced myself those movies never existed. thanks for reminding me Jul 03 07:41:53 enjoying them right now :) Jul 03 07:42:23 as inspiration for my ridiculously strange FPS http://68060e.wordpress.com/ Jul 03 07:43:49 bad ass :] Jul 03 07:44:36 thanks man :D Jul 03 07:48:06 Gaz`: very psychedelic Jul 03 07:48:22 hehe yeh Jul 03 07:50:00 my chrome is so shit now, barely responds Jul 03 07:50:23 what can I do if my http get requests returns an internal server error on a certain url? Jul 03 07:51:58 public class DemoActivity extends FragmentActivity implements ScanditSDKListener, got error: cannot find symbol class scandigsdklistener. But I've added scandit library to libs folder Jul 03 07:55:55 hey, is there a way to protect your source code from being viewed? i've just tried to get my sources from the APK, using dex2jar and jd-gui... and it extracts my code prefectly :/ Jul 03 07:56:00 java code Jul 03 07:56:14 i thought android obfuscated Jul 03 07:56:34 maybe it doesnt until release Jul 03 07:56:45 i've checked the released apk Jul 03 07:56:52 weiiiird Jul 03 07:57:57 yeah thats not cool Jul 03 07:58:25 we ned that dolphin from johhny mneunomic really Jul 03 07:58:33 he will sort it Jul 03 08:00:17 Gaz`: you'd just try to kill him Jul 03 08:01:11 hahaha Jul 03 08:01:22 you and your dolphin genocide... Jul 03 08:01:30 teehee Jul 03 08:01:35 hk madness over? Jul 03 08:01:42 madness? Jul 03 08:01:49 thought some weird protests or something Jul 03 08:01:56 or just a celebration of the handover? Jul 03 08:02:07 happens every year on July 1st - it's become a traditional day of protest Jul 03 08:02:09 i was there last week for 2 hrs :) Jul 03 08:02:21 drinkign in the airport bar Jul 03 08:02:26 difference this year is that it was in a typhoon, rather than in blazing sun Jul 03 08:02:32 can anybody help me, i'm trying to create build an android library (which has resources) with ant using Jenkins Jul 03 08:02:36 hehe Jul 03 08:03:02 it's nice not to have to do visa runs :P Jul 03 08:03:17 aye.. i might be goign to shanghai in a month or so too Jul 03 08:03:20 if my game gets in :) Jul 03 08:03:45 we were almost in your town this weekend, looks like we might be there in October instead for a weekend Jul 03 08:03:52 cool man Jul 03 08:04:05 sorry i didnt reply i dont know much about hotels, i know very good and pretty lame Jul 03 08:04:23 it's okay - I don't know much about hotels in HK either... Jul 03 08:04:26 hi there, i just wanted to ask something, its possible to scan 2 QR Codes at the same time with android? Jul 03 08:04:32 but someone said Ximen, def the coolest palce to be Jul 03 08:06:01 so no one got a suggestion on how to protect an APK's code being so visible Jul 03 08:06:01 ? Jul 03 08:06:11 viran: isn't proguard the normal suggestion? Jul 03 08:06:12 viran: obfuscate Jul 03 08:06:42 i will give it a try Jul 03 08:07:34 nobody here can help me with ant ? Jul 03 08:10:04 Is there anyway to get rid of that white background color in WebView before it loads the page? Jul 03 08:10:16 i've tried setting background property, the html background, etc etc, no luck Jul 03 08:10:31 tried setting webview bg to transparent? Jul 03 08:10:40 altho tbh that wont work on all phones so no point Jul 03 08:11:12 i wonder if u could keep it invisible til its finished loading Jul 03 08:11:19 theres a call after the page is ready iirc Jul 03 08:13:21 hmm Jul 03 08:13:22 i tried that Jul 03 08:13:37 Gaz`, the new WebClient, onPageFinished Jul 03 08:13:37 or something Jul 03 08:13:44 yeh thats it Jul 03 08:13:49 keep it invisible til then Jul 03 08:13:49 didn't work Jul 03 08:13:53 ah Jul 03 08:13:54 still had the same issue heh Jul 03 08:22:15 hey guys…. what are some code coverage tools you guys would recommend using? Jul 03 08:22:50 Gaz` disabling hardware acceleration does the trick Jul 03 08:23:22 i see Jul 03 08:23:26 hmm Jul 03 08:24:12 Hi, i have to parse a json object but some data elements are not always inside the received json object, what's the best way to handle that? Jul 03 08:24:39 not sure what u mean Jul 03 08:25:33 i think he means he gets a "mismatch" type of error where the json object can't be created so it throws an exception Jul 03 08:25:48 need to use the proper libs import org.json.JSONArray; Jul 03 08:25:49 etc Jul 03 08:26:09 FrancescoV: use the org.json.JSONObject.opt Jul 03 08:26:14 has in JSONObject Jul 03 08:26:34 or before each attempt use Jul 03 08:26:51 if(json.has("tag") { json.get("tag");} Jul 03 08:27:04 for the optional ones i do what thepoosh does Jul 03 08:27:06 parsing json can be a pain Jul 03 08:27:15 or on the serverside i just assign a "" Jul 03 08:27:15 no it's not Jul 03 08:27:21 you gotta get used to it Jul 03 08:27:34 and it's sure as hell better than xml parsing Jul 03 08:27:35 true, i must have 10k lines of json code here ive made :) Jul 03 08:27:36 tnx for all the responses :) Jul 03 08:27:43 i cant see any improvement over xml Jul 03 08:27:56 is the json.has("tag") better than the json.optString("tag")? Jul 03 08:27:59 you're blind Jul 03 08:28:08 * thepoosh agrees Jul 03 08:28:17 is it just bandwidth? Jul 03 08:28:18 xml is bloatfest Jul 03 08:28:30 json can be too tho if the wrong person creates it Jul 03 08:28:30 ordering for instance Jul 03 08:28:43 arrays Jul 03 08:29:18 json is almost the best part of Javascript Jul 03 08:30:13 yaml anyone? Jul 03 08:30:17 i think its just k00l to be into the new kid on the block, xml is better :p Jul 03 08:30:56 Gaz`: better how? Jul 03 08:31:09 it takes up much more space, parsing it is painful Jul 03 08:31:31 parsing it is equal difficult imho, possibly easier Jul 03 08:31:40 it might take up more bandwidth in some cases yeh Jul 03 08:32:09 yaml is ok but whitespace sensitivity is a pita. logging for instance. hard to do it in a compact form. Jul 03 08:32:13 prob done 5 to 7 years parsing each Jul 03 08:32:47 dont get me wrong iwas glad when xml vnaished as the standard, but not happy to se ejson replace it ;) Jul 03 08:33:07 binary files are the way to go :P Jul 03 08:33:14 xml lacks arrays which make it a poor fit to most langs/libs Jul 03 08:33:23 kjeldahl: don't feed the trolls Jul 03 08:33:25 ah yeh Jul 03 08:33:37 hah troll Jul 03 08:33:45 I'm new to android dev, how should I start? getting errors like Gradle: error: package com.mirasense.scanditsdk.interfaces does not exist, Gradle: error: cannot find symbol class ScanditSDKListener, Gradle: error: method does not override or implement a method from a supertype Jul 03 08:34:18 start with something small that works. Jul 03 08:34:51 i couldnt get gradle to work either :\ Jul 03 08:35:30 it takes some work yes. Jul 03 08:35:46 EugenA: did you manage to create a simple sample app? Jul 03 08:35:54 thepoosh: yes Jul 03 08:36:03 i'm running a program that sends IP broadcasts, it seems to work fine on my HTC, but if i run it in x86 virtualbox for testing the packets don't seem to reach the network, are there any obvious issues? Jul 03 08:36:04 when did you start having issues? Jul 03 08:36:08 now I'd like to try to create an app to scan bar codes Jul 03 08:36:12 pabs: Gaz` isn't a troll, he's a drunken reprobate Jul 03 08:36:21 yehthats much better Jul 03 08:36:55 tonight i drink snake blood Jul 03 08:37:00 heeehee Jul 03 08:37:20 whats better for a jsonobject: has(tag) with if else or optString(tag) Jul 03 08:37:32 tonight I take my young lady out for birthday steak Jul 03 08:37:46 youre always doing that Jul 03 08:37:51 didnt u do that last year too Jul 03 08:37:52 :) Jul 03 08:37:59 what can I say, she likes steak Jul 03 08:38:07 man i still crave that kebab shop we went to Jul 03 08:38:11 also, going shopping for high fashion at M&S Jul 03 08:38:14 i wish i could have taken 50 home Jul 03 08:38:22 hahah m&s died here Jul 03 08:38:53 doing okay here, AFAIK... if they weren't here, I'd have nothing to wear! Jul 03 08:39:03 so civilised being bale to have a kebab at the end of the night, altho that was about 45% into my night - after that iwas down wanchai lol Jul 03 08:39:04 optString coerces to string always. its not the same as has which just check. Jul 03 08:40:10 I don't even need to tell them what I want at that kebab place - they know my regular order by now :) Jul 03 08:40:33 nice, shame the food here sucks Jul 03 08:43:18 Leeds: hey bro howve you been Jul 03 08:43:26 Leeds: do u have any experience with sqlite Jul 03 08:44:54 they should change this to #android-sqlite-json-dev bahaha ok its almost my bed time sorry :[ Jul 03 08:48:19 haha ur a homo Jul 03 08:50:02 how can I add a library to build path using android studio? Jul 03 08:52:19 you cant. do it in build.gradle . Jul 03 09:12:00 Hi Jul 03 09:28:02 what's the best way to parse a json object: option 1: to custom class option 2: to hashmap ? Jul 03 09:31:24 depends on your needs... but if you are doing anything real it'll be much more convenient for you to have some kind of ODM Jul 03 09:33:21 what is ODM? I have to make an app with items, orders and customers, that's it Jul 03 09:34:58 is androidstudio usable yet for serious dev? Jul 03 09:35:12 FrancescoV, that could get pretty complex depending on what the app needs to visualize about the relationships of those 3 things Jul 03 09:35:31 it happily compiles an apk that has tons of errors Jul 03 09:35:54 osxorgate, a bunch of people have had success with it Jul 03 09:36:42 icetooth: the relationship is pretty simple, only the order contains items but all the items/orders/customers are loaded with a REST service, nothing is inside an intnern database Jul 03 10:02:33 i'm trying to create a view from a thread by using a Handler in the UI thread, but I can't seem to create views from a handler because it's not an activity Jul 03 10:02:58 hy alll Jul 03 10:03:03 catphish: using an asynctask? Jul 03 10:03:19 minioim: hi Jul 03 10:03:28 so in my app i want to fetch a particular twitter user's tweets. i have an app defined on dev.twitter.com, i have the oauth keys and tokens, now what? I don't need to log the user into twitter to just fetch a timeline, do i? How do i use these keys and secrets? Jul 03 10:03:34 catphish: for ui changes, you have to get the main UI thread Jul 03 10:03:54 FrancescoV: you can run Context.runOnUIThread Jul 03 10:04:56 anyone know his way around Volley? Jul 03 10:05:10 I have a question for you guys... (what a surprise ^^) Jul 03 10:05:16 FrancescoV: thepoosh: thanks, i think i need to understand a little more about the options available to run code in the UI thread Jul 03 10:05:33 is it possible to put a String[][] as an extra in an intent? Jul 03 10:05:42 not yes, next week i'm going to look for volley, is it possible to cashe images with volley? Jul 03 10:06:00 I know that's possible for a simple array (String[]) but for a double... Jul 03 10:07:21 FrancescoV: ok, i'm using "runOnUiThread(new Runnable() { public void run() { TextView tv = new TextView(this); }}" Jul 03 10:07:40 but it fails because "this" is not an activity Jul 03 10:07:58 getActivity() ? Jul 03 10:07:59 should i be passing something else to the TextView constructor? Jul 03 10:08:02 if you're running that inside an activity you can do ActivityClassName.this Jul 03 10:08:09 or getApplicationContext Jul 03 10:09:01 ActivityClassName.this appears to work Jul 03 10:10:44 catphish: think about when you're using the same task in another class (if you need it, it won't work) Jul 03 10:11:25 on what do I call getActivity? Jul 03 10:12:34 you can use getActivity() inside a fragment Jul 03 10:12:49 but bear in mind it can viably be null Jul 03 10:12:54 if it isn't attached to an activity Jul 03 10:15:39 thanks, i feel a little out of my depth so far, but things are working Jul 03 10:18:18 one of the most reliable ways of launching onto the ui thread is to use runOnUiThread or directly invoking a ui linked handler. Some other techniques (e.g. using View.post) are somewhat unreliable under certain circumstances (e.g. the view doesn't have a path to the root view) which can be hard to debug (the post() returns true but is never executed) Jul 03 10:18:52 runOnUiThread appears to work well, it doesn't block the non-ui thread as i had expected though :) Jul 03 10:19:05 so I tend to use runOnUiThread if I'm within an activity scope for clarity, and a UI linked Handler when I'm not Jul 03 10:19:18 thanks Jul 03 10:20:55 yeah, runOnUiThread is an async post ftr - if you want it to be synchronous (block until it's done) you'll need to do that yourself e.g. http://stackoverflow.com/questions/5996885/how-to-wait-for-android-runonuithread-to-be-finished Jul 03 10:21:43 i really just want to pass a string to the thread in a safe manner so it isn't modified by the calling thread Jul 03 10:22:12 it doesn't matter that it's async as long as i can somehow pass it a duplicate string Jul 03 10:22:21 catphish, make a copy? Jul 03 10:23:13 yep, just need to work out how to pass the copy into new Runnable Jul 03 10:23:53 class Foo implements Runnable { Foo(String bar) {this.bar = bar} ... etc ? Jul 03 10:24:17 yep, i think that's the way to go, thanks for all the help! Jul 03 10:24:45 alternatively you could just declare the string final Jul 03 10:25:24 by the way Jul 03 10:25:28 Strings are immutable Jul 03 10:25:59 simply declaring the string final works, but i have no idea why Jul 03 10:32:42 So I want to make a new Asynctask but give it two parameteres (nick and password). Atm I have this: "protected String doInBackground(String... uri)" How do I change it to two parameters? I tried (String nick, String password) but then it says it doesnt implement a supertype method Jul 03 10:33:08 thanks all for the help, my code works now, just got to tidy up a lot and understand it better :) Jul 03 10:40:56 hey i'm wondering about something; im trying to find user's gps location and also geocoder address, so should i put both in AsyncTask or gps location fecthing could happen in UI thread? Jul 03 10:52:07 in an AutoCompleteTextView, where is the code that says if I press a dropdown_item autoCompleteTextView executes setText(item.toString());? Jul 03 11:01:13 can someone from google whos not a fucking idiot please send me a nexus 4 :( Jul 03 11:18:38 lol Jul 03 11:19:57 weird how theyre even making Android Studio Jul 03 11:20:27 Gaz`: did you understand already how Android Studio works? Jul 03 11:20:34 didn't manage to do anything there Jul 03 11:21:06 not used it, looks same as eclipse pretty much? Jul 03 11:21:24 well, it's based off IntelliJ which is based off Eclipse Jul 03 11:21:33 so it's supposed to look the same Jul 03 11:21:37 dont know why theyre doing it Jul 03 11:21:42 but I heard IntelliJ is awesome Jul 03 11:21:43 unless they hate eclipse Jul 03 11:21:58 is there a single person that doesn't hate Eclipse?! Jul 03 11:22:08 i dont anymore Jul 03 11:22:10 lol Jul 03 11:22:19 I found IntelliJ really nice, but Android Studio had some workflow issues at the moment. I will change from eclipse at a later date Jul 03 11:22:45 how can you not hate Eclipse? Jul 03 11:22:55 i had wanted a good gui builder for yrs - but now i can do it so i dont need it Jul 03 11:22:59 Eclipse isn't all bad on a decent machine Jul 03 11:23:03 well its a bit slow n buggy Jul 03 11:23:10 but ive been using mono develop for 2 months Jul 03 11:23:13 its better than that! Jul 03 11:23:49 monodevelop is arse. at least the mac version I used for Unity3D scripting. it took 15 minutes to load my project Jul 03 11:23:49 one thing i wish they had was an auto uninstall option in eclipse, so when u push a new build it kills ol one Jul 03 11:24:04 and auto completion when typing vars/classes Jul 03 11:24:17 havchr: I have a very nice machine for dev but eclipse is truly a buggy IDE Jul 03 11:24:23 I miss VS2008 Jul 03 11:24:45 havchr yeh its a pain, i have to set all these weird prefs each time i load monodev Jul 03 11:24:57 and manually delete files to get a compile Jul 03 11:25:31 just s i wa spraising eclipse its crashed Jul 03 11:25:43 does anyone know how to set the auto formatting to indent all the parameters and field names with tabs to have the same indentation? Jul 03 11:26:28 it almost melted my laptop on refreshing the autocomplete analyze. I changed to SlickEdit for unity3d projects and it was much better. Jul 03 11:27:07 nice havchr, i might moved over to something else too Jul 03 11:28:45 i'm wondering about something; im trying to find user's gps location and also geocoder address, so should i put both in AsyncTask or gps location fecthing could happen in UI thread? Jul 03 11:28:52 what can I do if a http request return 405 method not allowed? Jul 03 11:29:07 talk to the webmaster or can I do something about it myself? Jul 03 11:29:23 Flaiker: change the permissions? Jul 03 11:29:48 in my app? i allowed internetpermissions Jul 03 11:29:57 i have no control over the webserver Jul 03 11:30:18 so, I'm about to start implementing the design of an app we're doing. It's a list of thumbnails, but above the listView, there is some complex structures. (really complex enough to be in its own fragment). The main problem, is that all of the page's content should scroll. So these complex views should act as a header in the listView. Before I start hacking away at solutions, do any of you have done similar stuff and know a good way to do it ? Jul 03 11:31:25 why not include it as the list view header? Jul 03 11:32:06 hey, proguard changes the names of some functions, but leaves others (in the same Activity) .. any idea why? Jul 03 11:32:12 how do you judge something is complex enough to be in its own fragment? Jul 03 11:33:01 viran: in the proguard.cfg you can set what to obfuscate and what to leave Jul 03 11:34:06 for one thing, the top part is different things depending on where in the app you are. For instance, it's a slide-show in one part of the app, and in other parts, it's a video plus a comment system and meta info about the video. Jul 03 11:34:55 viran, because you told him to in proguard.cfg Jul 03 11:35:02 thepoosh: i've got proguard-project.txt is it the same? Jul 03 11:35:41 viran: look at your project.properties and see where pro guard goes to look for configurations Jul 03 11:36:09 proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt Jul 03 11:36:29 ?? Jul 03 11:36:31 ok Jul 03 11:36:46 so proguard-prject.txt is what you're looking for Jul 03 11:36:47 some of the header-views needs to be pushed out of the list on the top, while there is one that should be a floating header. Actually, I have a custom ListView from another project, that did this, but it was complex and not all that slow. Jul 03 11:37:07 havchr: sounds to me like ugly UI Jul 03 11:37:08 yeah, but that's in the SDK dir... can i create one in my project's dir? Jul 03 11:37:15 yes Jul 03 11:37:30 thepoosh, it's not that ugly, but it's a bit ugly to code :p Jul 03 11:37:41 I don;t know pro guard good enough to give you any other advice Jul 03 11:37:49 havchr: seems very un-Android Jul 03 11:38:13 anyone can take a look at this? http://stackoverflow.com/q/17445411/1056359 Jul 03 11:40:29 is there any way like @SuppressLint("NewApi") for xml ?? i need use switch in xml layout , i can do it in java with if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) , my minSdk is 8 , and i want support switch if target is newerthan HONEYCOMB Jul 03 11:40:53 use resource qualifiers Jul 03 11:40:54 thepoosh: Are you building with AS (you shouldn't be) or gradle (you should)? Jul 03 11:41:07 nope, I use Eclipse Jul 03 11:41:26 ah, ok. Jul 03 11:41:36 why? Jul 03 11:42:31 karlo|w : are you with me ? Jul 03 11:42:54 Because lots of people - me including - got really confused when AS was first released and supported "native" AS builds versus using gradle. In later versions, they disabled the "native" AS builds. I was afraid you were in that frankenstein state inbetween like I was earlier. Jul 03 11:44:20 no no no Jul 03 11:44:34 I tried AS but couldn't understand it at all Jul 03 11:44:52 do i need this in my proguard.cfg? -keep public class com.google.vending.licensing.ILicensingService Jul 03 11:44:55 went back to Eclipse and now I'm waiting for a nice stable version to come out Jul 03 11:47:04 thepoosh, you could create a request queue with your own HttpStack, thus keep this stack as a singleton and stuff cookies into it as needed. Jul 03 11:47:24 the webserver i am trying to access seems to block http get / post requests (returns 405: function not allowed). Any way to circumvent that? Jul 03 11:48:16 i never understood eclipse so i went straight to as when it came out. with gradle for building the ide becomes less important thank god. Jul 03 11:48:28 karlo|w : any way , your sugestion , worked, thank you Jul 03 11:49:15 havchr: so basically, making the HttpStack a global singleton with setters for the cookie can fix this? Jul 03 11:49:39 when i use the following code [list.put(new Pair));] I get an error: Incorrect number of arguments for type Pair; it cannot be parameterized with arguments getString Jul 03 11:50:10 lol Jul 03 11:50:14 Any idea what is the proper Pair syntax? Jul 03 11:50:28 getint inside getstring? Jul 03 11:50:55 even if i change getint to getstring it says the same Jul 03 11:51:07 parens are wrong Jul 03 11:51:15 thepoosh, yeah, I'd imagine so. usually the httpStack is kept as a singleton anyway. Jul 03 11:51:19 list.put(new Pair(c.get..., c.getInt)) Jul 03 11:51:39 you can also use Pair.create(c.get, c.getInt) Jul 03 11:51:40 hmmm Jul 03 11:51:43 that saves you from the brackets Jul 03 11:51:47 ok let me try that ...thx Jul 03 11:51:58 the angle brackets are parameters for generics, you don't put variable arguments in there Jul 03 11:52:00 havchr: I just created one on the fly when creating a new RequestQueue Jul 03 11:54:14 thepoosh, in my project, I'm creating a requestQueue on startup and keeping it. I have a class VolleyBackend which is a member of a singleton called *Services , where Services is the name of the app I'm working on Jul 03 11:55:46 i save "Actions history" by serializing my actions class and saving it as a sharedPreference. i've just added proguard which makes something in that process go wrong. Jul 03 11:56:01 I'm guessing that's because proguard changes the name of the actions class Jul 03 11:56:09 any idea how should i solve that? Jul 03 11:59:57 Maybe check "obfuscation options" on http://proguard.sourceforge.net/index.html#manual/usage.html Jul 03 12:00:18 This is my code after changing [list.put(new Pair(cursor.getString(cursor.getColumnIndex("address"), cursor.getString(cursor.getColumnIndex("entrydate"));] getting errors: The method put(Pair) is undefined for the type ArrayList> and The method getString(int) in the type Cursor is not applicable for the arguments (int, int) Jul 03 12:00:53 Erm, scratch that, "-keep" seems to be the correct keyword. Jul 03 12:01:20 For some reason my Eclipse doesn't have the SDK manager Jul 03 12:01:28 anybody know what I am doing wrong Jul 03 12:02:03 Wrong/missing $ANDROID_HOME? Jul 03 12:03:35 havchr: is the Activity.onCreate a good place to instantiate the RequestQueue? Jul 03 12:03:44 hmm opening it in a new folder seems to fix it Jul 03 12:04:36 thepoosh, you could override the Application class and stuff it in there Jul 03 12:05:00 I know, the question is what is the best way to instansiate Jul 03 12:05:09 in the onCreate or with a factory methode Jul 03 12:05:13 *method Jul 03 12:05:31 with lazy instancing Jul 03 12:06:01 anyone know where i can get a list of supported annotations Jul 03 12:06:08 what is the difference between list.put and list.add Jul 03 12:06:22 checkoney: location location location Jul 03 12:06:27 I don't think there is much overhead on creating the requestQueue if you're concerned about startup-performance. Jul 03 12:06:34 I am Jul 03 12:06:43 there's a lot of objects there Jul 03 12:07:16 but I think that is a much more elegant way to do it Jul 03 12:07:52 kjeldahl: i'm trying -keep class * implements java.io.Serializable { ... } and i see that it keeps the class that serialize but... the sharedprefernce isnt actually save, or saved under a different name.. not sure Jul 03 12:08:00 you could do a test and see if it has any impact. I would imagine loading up graphics/inflating views is going to be what takes time. Jul 03 12:08:59 thepoosh, but if you're not going to do any calls at startup or early in the app, can understand your hesistance. Jul 03 12:09:18 thepoosh, network calls I mean :) Jul 03 12:09:22 true Jul 03 12:13:09 havchr: are there good ways to create a priority queue for volley? Jul 03 12:13:14 why does GPS on real device not follow the MinTime and MinDistance values set in code? Jul 03 12:13:18 if I have different types of request Jul 03 12:13:55 viran: Is this what you are struggling with: http://stackoverflow.com/questions/10971810/proguard-keep-class-names Jul 03 12:15:01 (I'm just guessing here, I know shit about this stuff really) Jul 03 12:17:43 wow, am i really that dumb, or are the new api annotations not documented anywher ? Jul 03 12:18:07 thepoosh, the queue is a priority-queue allready. You can specify priority when you do the requests iirc. Jul 03 12:18:29 hmmm Jul 03 12:18:42 the RequestQueue.add has a parameter for priority? Jul 03 12:20:28 it doesn't Jul 03 12:20:35 how do I set priority? Jul 03 12:21:21 thepoosh, yeah, you're right. it's done somewhere else. but it should be straight forward. Jul 03 12:21:45 hmmm Jul 03 12:22:04 it might be, but it's hidden somewhere and there's little documentation Jul 03 12:23:14 havchr: I'm an idiot Jul 03 12:23:18 it's in Request Jul 03 12:23:20 :S Jul 03 12:23:58 you need to override the getPriority on creation of a new request Jul 03 12:24:01 thepoosh, as far as I can see, you have to override Jul 03 12:24:18 thepoosh, seems we found it simultaniously :) Jul 03 12:24:23 lol\ Jul 03 12:24:51 havchr: hmmm? do you think i can use more that just the enum that's defined there for more fine tuning? Jul 03 12:26:16 thepoosh, yeah, from the comments in the Request class, it seems you can. it's FIFO but take highest priority first. Jul 03 12:26:56 yep Jul 03 12:27:06 it's FIFO per priority Jul 03 12:28:55 thepoosh, but I'd suggest just using what you have out of the box unless you really need to change it. One thing could be to let lower priorities rise to a higher one if it's choking, but then it might be better to rethink how/why you are firing so many requests. Jul 03 12:29:31 well, I'm not Jul 03 12:29:40 just trying to design the system Jul 03 12:29:48 I have about 13 different types of requests Jul 03 12:30:55 thepoosh, for me volley also seems like a system it's ok to fork if you need to special case it. Jul 03 12:31:29 nah Jul 03 12:31:39 just extended the JsonRequest Jul 03 12:31:52 for dealing with weird responses from my server Jul 03 12:32:04 it returns a JSONObject anyway Jul 03 12:32:16 so handling errors is a bit more complex Jul 03 12:32:24 and easy in the same time Jul 03 12:32:42 thepoosh, one bug I found in volley though, is cache-header-parsing. it might be unrelevant to your usage, but it caused some days of debugging for me. The problem is that the built-in cache-header parsing depends on the case of cache-header-names. Jul 03 12:33:00 poosh Jul 03 12:33:05 i want my fucking nexus 4 Jul 03 12:33:06 now Jul 03 12:33:17 mikedg_: who are you? Jul 03 12:33:26 who are you? Jul 03 12:33:39 I am thepoosh Jul 03 12:33:50 * thepoosh is thepoosh Jul 03 12:33:51 overnight my fuckign phone please Jul 03 12:34:07 do I have your phone without knowing who you are? Jul 03 12:37:04 is anybody aware of a way to use a listview without the scrollview and to handle scrolling manually Jul 03 12:37:07 ? Jul 03 12:37:15 it's more about disabling the scrollview Jul 03 12:37:25 siyb: why? Jul 03 12:38:17 mikedg_: i have to implement designs of someone that doesn't know shit about mobile design but insist that i follow the desings to the letter Jul 03 12:38:56 mikedg_: basically, there is a view containing a lot of information, including a list, but the overall view has to be scrollable as well and since nesting scrollviews causes problems ... Jul 03 12:38:58 so? Jul 03 12:39:02 what is the problem Jul 03 12:39:13 if he's following the design guide there's no problem Jul 03 12:39:31 thepoosh: he didn't Jul 03 12:39:41 so reject his design Jul 03 12:39:50 or tell him it can't be done Jul 03 12:40:08 siyb: so you want to scroll a content in addition to the listview content? Jul 03 12:40:53 or theres a compnent that scrolls and its in a scrollview? Jul 03 12:40:54 you gonna get messed up product if you don't adhere to the design Jul 03 12:41:17 * thepoosh agrees with Maziz Jul 03 12:41:46 Maziz: i am well aware about that, but sometimes you cannot convince the person responsible. in addition, it doesn't help you lecturing me about an issue i am well aware of Jul 03 12:42:09 Maziz: i can refuse to do my work and get fired ... Jul 03 12:42:11 siyb: are you a freelance? Jul 03 12:42:15 nope Jul 03 12:42:30 do you have a boss? Jul 03 12:42:33 a CTO? Jul 03 12:43:52 mikedg_: basically there is a lot of content, then there is a list of items and then there is even more content. whole thing must be scrollable. currently i am contemplating of implementing a non scrollable listview myself so that i can wrap the whole view in a scrollview manually Jul 03 12:44:03 but if there is a better way Jul 03 12:44:11 siyb: put the top content as the listview heaer Jul 03 12:44:17 and the bottom content as the listview footer Jul 03 12:44:58 mikedg_: thought about that, but that's extremly dirty, unless there is a way to use fragments as footers / headers (which i am not aware of) Jul 03 12:45:32 siyb: yeah you can do that Jul 03 12:45:34 i forget how Jul 03 12:45:37 it's possible though Jul 03 12:45:54 mikedg_: nice, i will look that up. thank you :) Jul 03 12:50:14 siyb, haha, seems we are almost working on the same app :p Jul 03 12:50:52 me 2, mine is crap though Jul 03 12:50:56 can i have your source codes? Jul 03 12:50:57 sup Jul 03 12:51:12 is there some sort of android java interpreter? Jul 03 12:51:40 let's say I connect through adb Jul 03 12:51:41 to shell Jul 03 12:51:48 and then execute some interpreter java code Jul 03 12:51:58 siyb, but my "list-view" part, consist of categories, so it's really a view-pager of sorts with lists-views, my head is exploding allready :-) Jul 03 12:54:45 In AS, when I select Build->Rebuild Project, how does it know - assuming I'm using gradle - whether I want a debug or release build? Jul 03 12:54:50 havchr: yep, sucks complety. what i don't get is that people in a technical help channel almost always more interesed in giving social advise. i wouldn't ask here if i wouldn't have exhausted all my other options ... Jul 03 12:56:14 siyb: using a header-view will work, but might require a custom ListView . I did it for an earlier project, but the code was a bit messy. I can see if I find it. Jul 03 12:57:15 havchr: i am looking for a clean solution, one option i had in mind was creating a non scrollable listview, but that takes a lot of time and "time is money" Jul 03 12:57:19 :) Jul 03 12:59:16 hi Jul 03 13:00:44 siyb: it would be nice if you could have a ScrollView that contains a listView and that passes the scroll-values down to the listView when appropiate Jul 03 13:01:15 siyb: might be possible to do custom components that behave this way Jul 03 13:01:20 "adb shell am broadcast -a android.intent.action.PHONE_STATE" command execution leads to my emulator reboot(4.1 and 4.2 versions of android) according to logcat it cause a crash in one of system services Jul 03 13:03:28 i think that i'll play around with list footers (using fragments as list footers) as mikedg_ suggested Jul 03 13:04:14 it that an emulator bug or what? Jul 03 13:09:49 Hi, I am trying to override ?android:attr/listPreferredItemPaddingLeft for SDK < 11 by creating values/dimens.xml & values-v11/dimens.xml. My values-11/dimens.xml: @android:attr/listPreferredItemPaddingLeft; Android is throwing an exception: android.content.res.Resources$NotFoundException: Resource ID #0x7f09000c type #0x1 is not valid Jul 03 13:10:25 the v11 config is causing an issue on my Android 4.1 phone Jul 03 13:15:09 Answering my own question about builds in AS: The "traditional" Intellij-style build in AS does not allow you to easily switch between different builds (debug/release), but you can create different configuration and select them in the named combobox. Whatever is selected there will be used when you do a Build->Rebuild Project. Jul 03 13:16:31 Using gradle however, another method seems to be "preferred" (from an Android/Gradle point of view). There is a tab bar to the left named "Build Variants", which matches one-to-one with the variants in the build.gradle file. Change the build type there, and the gradle plugin will trigger a rebuild, regardless of whatever you have selected in the Intellij-style run/debug configuration combobox. Jul 03 13:23:01 does anyone know who mikedg_ is? Jul 03 13:25:50 seems to me like this should get him banned Jul 03 13:25:51 http://pastie.org/8106720 Jul 03 13:27:43 thepoosh: i think he was trolling you ... Jul 03 13:27:52 oh Jul 03 13:27:54 hmmm Jul 03 13:27:56 thepoosh, he trolled you. Jul 03 13:28:00 Apparently it worked. Jul 03 13:28:05 Qix: thanks Jul 03 13:28:07 like a charme ;) Jul 03 13:28:10 * thepoosh is trolled Jul 03 13:28:14 -e Jul 03 13:31:02 siyb: you devil you.... Jul 03 13:31:32 kinda caught up to this when you used Arieh Neiv Jul 03 13:32:05 but I'm not a native English speaker so it went right over my head Jul 03 13:43:16 * Eltjo vindt een highlight altijd wel leuk hoor Zout Jul 03 13:52:28 hello Jul 03 13:52:32 i have a problem Jul 03 13:52:56 Jalak: are you going to state your problem ;) Jul 03 13:53:00 is there any way to have five buttons, and then to create an imageview that draws a small image over each one? Jul 03 13:54:05 i mean, creating a new imageview for each button i can do, i just don't know if you can draw it OVER the button Jul 03 13:54:14 why would you Jul 03 13:54:17 Jalak: use an imagebutton Jul 03 13:54:22 no no Jul 03 13:54:28 the buttons already are imagebuttons, sorry Jul 03 13:54:39 but i want to draw an image over the imagebutton Jul 03 13:54:46 eg, i have five black squares as my buttons Jul 03 13:54:46 why Jul 03 13:54:48 when i press them Jul 03 13:54:54 Jalak: use a selector Jul 03 13:54:56 i want to put a small white square in the middle Jul 03 13:55:01 a selector? Jul 03 13:55:43 xorgate: What do you mean why would you? Jul 03 13:55:52 Jalak: http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList Jul 03 13:56:42 won't I then need a ton of images? Jul 03 13:56:53 say i had different colored buttons Jul 03 13:57:06 i'd then need twice as many images Jul 03 13:57:18 man, if there's really no easy way to draw an image over something Jul 03 13:57:29 how android does layouts is really, really stupid Jul 03 13:57:48 yea... totally Jul 03 13:58:11 why not take photoshop as an example! Jul 03 13:58:35 ?? Jul 03 13:58:43 all i want to do is draw an image to the screen in a set location Jul 03 13:58:55 it should only be a few lines of code Jul 03 13:59:00 but no, android has to do it all stupidly Jul 03 13:59:42 I think you're being unreasonable Jul 03 13:59:52 then how come nobody has any answers? Jul 03 14:00:00 I assume most of your are quite decent android developers Jul 03 14:00:02 they already told you to use a state list Jul 03 14:00:06 no Jul 03 14:00:08 its really not hard Jul 03 14:00:11 state lists do not do what i want Jul 03 14:00:20 with a state list, if I had different images Jul 03 14:00:22 well then describe in greater detail exactly what it is you're trying to do? Jul 03 14:00:26 I would need DUPLICATE of those images Jul 03 14:00:27 okay Jul 03 14:00:28 five buttons Jul 03 14:00:30 each a different color Jul 03 14:00:32 Jalak: you could use alignTop, alignBottom, alignLeft, alignRight as well Jul 03 14:00:32 so each button will have different image enabled when pressed? Jul 03 14:00:37 draw a white square in the middle Jul 03 14:00:46 each button is a different image to start with Jul 03 14:01:03 ok, so each button is, say, a square, a circle, a triangle, and an X. GO Jul 03 14:01:10 yes Jul 03 14:01:14 then, when you press the button Jul 03 14:01:19 it draws a white square on top of the button Jul 03 14:01:19 you press circle, what happens Jul 03 14:01:23 as small one Jul 03 14:01:24 in the center Jul 03 14:01:28 ok, what happens when you press square? Jul 03 14:01:40 it draws a white square to the center of the square Jul 03 14:01:47 when you press circle, a white square at the center of the circle Jul 03 14:02:01 ok so is it safe to say that the same white square shows on any pressed button? Jul 03 14:02:07 yes Jul 03 14:02:15 same white square Jul 03 14:03:01 anyone know why i don't get the Simple API Access option in the google apis? Jul 03 14:03:01 so is a button only "pressed" when you are touching it? Jul 03 14:03:10 or can you "enable" a button by pressing it and letting go Jul 03 14:03:14 enable Jul 03 14:03:24 can more than one button be enabled at a time? Jul 03 14:03:30 yes Jul 03 14:04:30 are you any good with java? Jul 03 14:04:34 reasonably Jul 03 14:04:50 it's the android bits Jul 03 14:05:15 right, well.. personally what I would do would be to extend ImageButton or Button or even just a View Jul 03 14:05:32 you could have 5 of them in your layout, each with the appropriate background drawable (circle, triangle, etc) Jul 03 14:05:52 ok Jul 03 14:05:59 you could even just assign an onClickListener to toggle the state of each button Jul 03 14:06:29 this is pretty complicated just for a very simple task Jul 03 14:06:42 well I think you are discovering that it's not as simple as you think Jul 03 14:06:53 there are many ways to do it, many options, many ways to customize/configure something like this Jul 03 14:07:08 and it seems to be the amount of choice (or rather, the lack of a limit of choice) that is making you think it's more complicated than it really is Jul 03 14:07:19 amount of choice? Jul 03 14:07:23 but honestly, this is not a complicated thing and it happens all the time in android. Jul 03 14:07:24 there seems to be not much choice Jul 03 14:07:38 you will do it a lot if you continue to make android apps Jul 03 14:07:41 it's annoying i need to extend a class simply to draw an image to the screen Jul 03 14:07:53 you can do it all in xml but you refused! Jul 03 14:08:00 it can't be done in xml! Jul 03 14:08:17 or well Jul 03 14:08:19 it can Jul 03 14:08:21 well not entirely. You would need a click listener to enable/disable your special white squares Jul 03 14:08:24 but it'd be really time consuming Jul 03 14:08:29 i'd need five little white squares Jul 03 14:08:36 but even then, you'd need a click listener anyway, because your buttons actually do stuff Jul 03 14:08:38 (assumption) Jul 03 14:08:39 < Jalak> but it'd be really time consuming <-- like this conversation? Jul 03 14:08:43 ;) Jul 03 14:08:50 i was hoping for a better way than making there be five little white squares that are invisible Jul 03 14:09:02 what if I had 20 buttons? Jul 03 14:09:07 how would it be done if it were up to you? Jul 03 14:09:23 if you had 20 buttons, that's exactly why you'd extend an already existing class and reuse it 20 times Jul 03 14:09:40 you'd write it once, use it 20 times. Jul 03 14:10:03 as you can see, that actually saves you time in the long run, and opens the door to all kinds of options to do stuff exactly how you want and not how the framework is enforcing some idea Jul 03 14:10:12 okay Jul 03 14:10:12 so Jul 03 14:10:22 i need to go learn how the imagebutton class works Jul 03 14:10:27 in order to let me draw stuff on top of it Jul 03 14:10:34 this is gonna take forever Jul 03 14:10:50 are there any tutorials to extending android classes Jul 03 14:10:53 so your real problem is wanting to do something without really learning how to do it :) Jul 03 14:11:16 http://developer.android.com/training/custom-views/index.html Jul 03 14:11:31 remember that pretty much anything you see on screen is a descendant of View already Jul 03 14:11:57 i wish that when you click the button, it just creates an imageview with the image that copies the location of the button Jul 03 14:12:14 yeah but that gets into this ugly idea of where to put it on screen and such? Jul 03 14:12:34 just copy the location of the button Jul 03 14:12:42 there's a reason the framework is set up like it is, so that the developers can be a lot more generic when they do things Jul 03 14:13:05 Question, does the youtube api not support simple access api? I'm creating a project and i cant seem to find that anywhere on the google apis Jul 03 14:13:13 think of a button as just a View with a background color/drawable, wich an onClickListener defined that handles its clicks Jul 03 14:13:38 nevermind looks like i had to activate something Jul 03 14:13:44 given that, you can make your own special button, by putting a white square set to invisible in the center of a RelativeLayout that has the same background as your normal button would have Jul 03 14:13:54 once you've made that you can use it 20 times in your app Jul 03 14:14:06 hnng Jul 03 14:14:11 you can make the constructor take a drawable if you want so that each one can have its own custom background Jul 03 14:14:19 are there really no tutorials except the.. API documentations? Jul 03 14:14:28 then once you do that (probably 20-30 minutes of work), you can use it everywhere in your app. Jul 03 14:14:36 right Jul 03 14:14:36 so Jul 03 14:15:07 if you want to drag & drop stuff to create an app, maybe Android isn't the right platform for you (no offense( Jul 03 14:15:09 )* Jul 03 14:15:25 i never said i wanted to drag and drop Jul 03 14:15:32 i just hate how complicated java+android makes simple things Jul 03 14:15:48 if this was, say, python or something all I'd have to do is call a draw method and a location Jul 03 14:16:17 with this, i need to extend a class, then struggle with androids silly "web-layout" design Jul 03 14:16:37 anywhere i can go to see the code that defines imagebutton Jul 03 14:16:44 ok so how do you get the location in python? Jul 03 14:17:12 however you want, that's the beauty of it Jul 03 14:17:16 and how do you say "draw this image at (x,y)" in python? is there some assumed already-existing user-friendly API for layout design that exists in this python hypothetical of yours? Jul 03 14:17:36 of course, that's the point Jul 03 14:17:43 android has no user friendly API's Jul 03 14:18:21 where can i see imagebutton code Jul 03 14:18:26 so i know what i need to ..do whatever to Jul 03 14:18:35 you can't even say 'draw it at x,y' because there are many different screen sizes and densities Jul 03 14:19:09 i bet iphone development doesn't have this problem Jul 03 14:19:10 Jalak: first of all, there is not a single python ui framework, secondly, android was concepted for a very heterogeneous environment Jul 03 14:19:26 well, any tutorials or anything on how to extend the button class would be nice Jul 03 14:19:35 Jalak: what bindings are you talking about, gtk, qt, tk? Jul 03 14:19:46 desktop != mobile Jul 03 14:19:48 enough about python Jul 03 14:19:55 you need a different attitude if you are going to be successful on either platform (android or iOS) (no offense) Jul 03 14:19:59 how do i extend an imagebutton class Jul 03 14:20:07 Jalak: using extends?! Jul 03 14:20:22 public MyClass extends ImageButton { ... Jul 03 14:20:29 public class* Jul 03 14:20:31 yers... Jul 03 14:20:34 but this is the thing Jul 03 14:20:41 i can extend my own classes because i know how they work Jul 03 14:20:50 how the hell do you extend a class where you can't even read the code of it? Jul 03 14:20:59 Jalak: the sourcecode is available ... Jul 03 14:21:04 where? Jul 03 14:21:09 this is what i was aaaaasking Jul 03 14:21:18 welp Jul 03 14:21:20 good luck Jul 03 14:21:21 * tnzr out Jul 03 14:21:30 hello guys Jul 03 14:21:38 anyone have galaxy s4 or htc one? Jul 03 14:21:40 tnzr: same here Jul 03 14:21:43 they really should have made this stuff easier Jul 03 14:21:48 tnzr: can't be asked any more ... Jul 03 14:21:52 i guess android dev is aimed at people who have been doing this for years Jul 03 14:21:56 pity really Jul 03 14:22:32 not really :/ you don't need to know all about it to extend views Jul 03 14:22:52 Jalak: It's Java Jul 03 14:23:03 I assume you've already read http://developer.android.com/training/custom-views/index.html Jul 03 14:23:07 yes Jul 03 14:24:15 referring to your original Q, you should be able to put Drawables on top of those imagebuttons Jul 03 14:24:20 I think Jul 03 14:24:24 really? Jul 03 14:24:29 this is all I wanted Jul 03 14:24:37 ImageButtons are a pain, use a View instead Jul 03 14:24:54 how would i use a view? Jul 03 14:24:58 setBackground Jul 03 14:25:06 setOnClickListener Jul 03 14:25:18 look into things like android:drawableTop Jul 03 14:25:19 and a selector for the background to handle the states Jul 03 14:25:23 hmm Jul 03 14:25:34 ohhhh Jul 03 14:25:35 i see Jul 03 14:25:53 ImageButton loves to mess with the view bounds Jul 03 14:26:18 although you may find ImageButton too restrictive, which means you may find it easier to just fake a layout as a button (using onClickListeners for events) Jul 03 14:26:24 yes Jul 03 14:26:27 i understand now Jul 03 14:26:33 i want to try to extend imagebutton first though Jul 03 14:26:35 http://pastebin.com/MYAS5bvt Jul 03 14:26:38 * Kegsay nods Jul 03 14:26:41 Everything, Buttons, ImageButtons, they are all just extended Views Jul 03 14:26:48 im trying to query a db with a where clause but it crashes Jul 03 14:27:01 so, what i should do is, extend imagebutton with a constructor that allows me to input a parameter for an.. imageview inside it? Jul 03 14:27:03 so... I'm transitioning a project from NDK r4b to the latest NDK. Problem? My native code has instantly dropped a factor 4 in performance Jul 03 14:27:17 Chainfire: oh cool Jul 03 14:27:24 and then call imageview.set_visible or whatever that command is? Jul 03 14:27:29 I have no idea where to even start looking Jul 03 14:27:41 Chainfire: upgrade your mammary Jul 03 14:27:54 gotta be the mammary Jul 03 14:28:05 i have a situation where i expand the children of a ListView. what's the best way to make the ListView expand it's height as the expand animation is happening Jul 03 14:28:14 you make me sad. Jul 03 14:28:35 What means "R" ? setContentView(R.layout.activity_main); Jul 03 14:28:59 forgot the single quote thx for help team Jul 03 14:29:11 Chainfire: NDK fiascs Jul 03 14:29:15 fiascos Jul 03 14:29:21 You may be able to get it to work like that Jalak if you position the view on top of imagebutton itself (when you attach to your parent view). Alternatively, you can override onLayout and onDraw and just draw a bitmap/drawbale and ignore imageview altogether Jul 03 14:29:41 Kegsay: ohhh please just use a view and set the background to a selector Jul 03 14:29:56 ImageButton is a waste of time Jul 03 14:30:19 EugenA: You're not very far into Beginning Android Development, are you? Jul 03 14:30:57 Short: Every resource has an entry in R.java, which you can use to refer to them. Jul 03 14:31:01 oh, I should probably have read further into his question. If you want the image to appear on presses, then absolutely you should be using a selector Jul 03 14:31:40 kakazza: yes, trying to understand where R is defined Jul 03 14:31:58 R.java is automatically generated for you and you do not need to touch it. Jul 03 14:32:01 a tutorial like http://www.charlesharley.com/2012/programming/custom-drawable-states-in-android/ should help Jalak (though I've just skimmed it) Jul 03 14:32:01 Neither should you. Jul 03 14:32:11 hi good morning does anybody knows how to highlight an item in a list view Jul 03 14:32:42 hmm Jul 03 14:32:42 ok Jul 03 14:32:57 a simpler example is http://android-er.blogspot.co.uk/2009/08/exercise-load-background-to-imagebutton.html Jul 03 14:33:17 Kegsay I do see Jul 03 14:33:19 though you would probably want some code in there to activate all of your buttons Jul 03 14:33:23 but i dont want a radiobutton or a checkbox in front of the textview with singlechoice or multichoice mode Jul 03 14:33:24 but this requires having duplicates of the image Jul 03 14:33:27 see, what i would like Jul 03 14:33:31 is having different images Jul 03 14:33:35 and the same white square Jul 03 14:33:40 then to draw the square over the top of the image Jul 03 14:33:44 then make different selectors and use them? Jul 03 14:33:53 but then i need five selectors for five buttons Jul 03 14:33:59 for ten buttons, i need ten selectors Jul 03 14:34:05 each selector with two images Jul 03 14:34:10 so ten buttons means twenty images Jul 03 14:34:12 do you see? Jul 03 14:34:15 hi, how i can stop a thread that i've started with runOnUiThread ? Jul 03 14:34:15 I would rather avoid this Jul 03 14:34:22 Jalak: you have just wasted 40 minutes complaining ... Jul 03 14:34:28 Justin_T, er, what. Jul 03 14:34:28 no Jul 03 14:34:33 i think i know to do something Jul 03 14:34:37 uhh you said " is having different images" so if each button is having different images, I don't see how you can avoid this Jul 03 14:34:43 Jalak: you would have been able to write the selectors in that time ... Jul 03 14:34:46 Justin_T, I think you mixed up the terminology. Jul 03 14:34:47 but Jul 03 14:34:51 I don't WANT to write selectors!" Jul 03 14:34:54 They are very inefficient! Jul 03 14:35:08 yes I know, Mavrik, what I want to do is a crazy stuff Jul 03 14:35:13 Jalak: that are sure as hell more efficient than rambling about how inefficient they are Jul 03 14:35:16 I want one image, drawn over multiple different buttons Jul 03 14:35:22 sorry for my english by the way, is not my native language Jul 03 14:35:27 Siyb, are you able to help me extend imagebutton correctly? Jul 03 14:35:35 Jalak: i told you how to do that without selectors already ... Jul 03 14:36:17 pm me what you said? I must have missed it Jul 03 14:36:34 I have a videoview started with runOnUiThread, when I hit the back button is closing my app, and I want to go back to the main app, or like a restart the app Jul 03 14:36:52 I dont know how to call it, I just want to go back to the main page of the app Jul 03 14:37:35 hi Jul 03 14:37:46 I tried finish() and onBackPressed() and do the same thing: close my app Jul 03 14:37:51 i got this error when build android Jul 03 14:37:54 build/core/base_rules.mk:130: *** prebuilt/darwin-x86/toolchain/arm-linux-androideabi-4.4.x/lib: MODULE.HOST.STATIC_LIBRARIES.libbfd already defined by prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.7/lib32. Stop. Jul 03 14:38:04 can someone help me? Jul 03 14:38:58 Justin_T, pastebin the code that starts the video view. Jul 03 14:39:07 okay Jul 03 14:39:47 Hmm. Does anyone know why AudioRecord records precisely nothing (silence) after being interrupted by a GSM call (after hanging up the call) on the Galaxy S? I know there are issues with recording from the mic when in a call, but I would hope that state would be reset and it would continue recording like other devices :/ Android 2.3.6 Jul 03 14:40:39 it seems to be setting the audio mode back correctly, which was my first guess Jul 03 14:40:46 and logcat isn't showing any disasters Jul 03 14:41:03 e.g. not ALSA standby Jul 03 14:41:29 Mavrik, http://pastebin.com/ZhrjUYM1 Jul 03 14:42:08 Hi all, does somebody know a good open source library for caching images? Other question: can the volley api cache images? Jul 03 14:42:11 Justin_T, wth is that :D Jul 03 14:42:17 lol Jul 03 14:42:28 Justin_T, you're killing the contents of your previous activity, there's nowhere to go to with the back button Jul 03 14:42:40 hmm okay Jul 03 14:42:47 you're replacing all your activity content with the video player Jul 03 14:43:00 start the video player in new activity, not the same one, that's silly :) Jul 03 14:43:14 FrancescoV, I think square's Picasso is the most popular and well-made one Jul 03 14:43:29 tnx i will check it out! Jul 03 14:43:57 Be sure to check their G+ Community for questions, too. Jul 03 14:52:07 adb shell am broadcast -a android.intent.action.PHONE_STATE command execution leads to my emulator reboot(4.1 and 4.2 versions of android) according to logcat it cause a crash in one of system services Jul 03 14:52:32 is that an emulator bug or what? Jul 03 14:53:58 never tried it, but I'd take a look at android's issue tracker Jul 03 14:55:37 i have a ListView inside a LinearLayout. i modify the the height of an item inside the ListView but the problem i have is that the LV does not expand to take up the available space, rather it starts scrolling. any ideas? i'd like to have the LV expand with the child to take up the available space Jul 03 14:56:52 maybe you could use layout_weight instead? Jul 03 14:57:09 it'd be difficult to do it otherwise imo Jul 03 14:57:33 karlo|w: i've got it set to layout_weight=1 Jul 03 14:58:30 and it doesn't occupy available space? Jul 03 14:59:21 it does, but when the item expands it does not expand with it Jul 03 15:00:40 where should it expand to if it already takes up all available screen real estate? Jul 03 15:00:59 well some of them do some of them don't Jul 03 15:01:06 when i add a new item to it it *does* update Jul 03 15:01:42 Mavrik, can i pm you? Jul 03 15:01:55 not sure I follow, could you link some screenshots? Jul 03 15:02:16 karlo|w: let me draw up some stuff Jul 03 15:03:57 I'm accessing strings from strings.xml in a layout, but when the layout is displayed on the phone I'm getting things like @2130968676 instead of the string, anyone know how I can fix this? Jul 03 15:04:14 funkbox, havent found any issues Jul 03 15:04:41 karlo|w: something like this http://i.imgur.com/9r5RNNw.png . if i animate the height of an item in ListView 1 the bottom edge of the LV does not expand to accomodate the new height Jul 03 15:05:51 karlo|w, havent found any issues Jul 03 15:06:39 hi Jul 03 15:06:55 If I know the regId of a GCM Jul 03 15:06:59 and the sender_id Jul 03 15:07:03 can I intercept the messages? Jul 03 15:07:30 you can intercept and abort incoming push messages Jul 03 15:08:24 how can I specify the regId? Jul 03 15:08:27 on the xml prefs file? Jul 03 15:12:12 funkbox: still not sure what's actual screen height in relation to those examples, and what do you mean by "it starts scrolling" Jul 03 15:12:19 oles: what's the stacktrace? Jul 03 15:13:14 karlo|w: the screen being the gray area. expanding an item in LV1 pushes the children causing scrolling Jul 03 15:13:48 since the height is not updated. i have thought about updating the height of the list views myself but wondering if there's a simpler way Jul 03 15:14:06 then layout_height = "match_parent" + layout_weight = "1" should make ListView always take up all available space Jul 03 15:14:18 karlo|w, http://pastebin.com/AzXF5e1d Jul 03 15:14:20 even if it's empty Jul 03 15:14:52 karlo|w: ah, but i don't really want that. i want it to wrap the content. Jul 03 15:15:31 then I'm afraid you have to manipulate ListView's height manually Jul 03 15:15:49 sounds like a weird UI design though Jul 03 15:15:54 yeah Jul 03 15:16:57 oles: which api level? Jul 03 15:17:09 Hey guys, is it at all possible to merge an imageview onto a captured image into one bitmap? Jul 03 15:17:30 by dragging and dropping Jul 03 15:18:16 karlo|w, 16 or 17 no matter Jul 03 15:18:38 karlo|w, i mean 16 and 17 Jul 03 15:20:27 can i extend button to contain an imageview that will let me draw images onto the button? Jul 03 15:21:54 CocoStorm, hmm, can you explain your usecase more in detail? Jul 03 15:24:03 Jalak: you can override the onDraw method of the view and use canvas.drawBitmap Jul 03 15:24:09 Mavrik, The app currently takes a picture and has some images that can be dragged, dropped and rescaled. I'd like to have it so that when dragging and dropping one of the images onto the photo that has just been captured it merges the two together into one image.. if that makes sense Jul 03 15:24:43 so an image that overlays the photo Jul 03 15:24:50 (sits on top of) Jul 03 15:26:18 CocoStorm, hmm, I see Jul 03 15:26:22 you'd have to do it manually Jul 03 15:26:36 when dropped, draw the dropped image on main bitmap canvas, then remove the ImageView Jul 03 15:27:00 Mavrik, draw the dropped image? Jul 03 15:27:51 yes? Jul 03 15:28:56 oles: not sure what are you trying to achieve and I haven't touched telephony apis yet, but it looks like this intent has to have an extra provided, TelephonyManager.EXTRA_STATE Jul 03 15:29:05 ootinii: if I override ondraw will it still draw the button underneath the image? Jul 03 15:29:27 yeah just be sure to call super.onDraw Jul 03 15:29:37 could you pm me with more information? :) Jul 03 15:29:48 Mavrik, ah I see will try it out :) thanks! Jul 03 15:40:25 nseidm1: bug GCM gives me another diferente regId Jul 03 15:40:38 nseidm1: how can i force another regId? Jul 03 15:44:15 hi - is there a way to launch an intent to send an SMS then see if the user actually bothered to send the message? Jul 03 15:44:44 what's the trick, to get more than 1 frame from MediaMetadataRetriever ? whatever time i supply to getFrameAtTime(), i get the same img. Jul 03 15:58:04 Hello, I am playing videos in HLS with the MediaPlayer, do you know if there is a way to set the size for the stream buffer ? Jul 03 16:01:01 guys if i want to make game... how does one approach the graphic part of it?:< Jul 03 16:01:08 how characters for games are made? Jul 03 16:01:10 animations? Jul 03 16:01:13 backgrounds? Jul 03 16:01:38 you have such a long way to go Jul 03 16:02:51 but arent there ppl with graphic skills who could do that for me? Jul 03 16:02:57 where would i search for such people? Jul 03 16:03:01 Hi, I'm trying to get a multi select dialog using alertbuilder. I haven't been able to figure out how to gray out/disable parts of the selection while using setmultichoice. Is this possible? Jul 03 16:03:10 if you pay them, I'm sure Jul 03 16:08:17 is logical way to use HasMap for 50,000 number of data ?? or should i port its data to sqlite database ?? which is better for performance?? Jul 03 16:08:23 HasMap == HashMap Jul 03 16:10:24 weox: do you need all 50k entries in RAM at the same time? Jul 03 16:11:21 ciurkut: Think 'old school'.. Look up 'sprites' and how they were used on the early video games.. Jul 03 16:13:45 guys anyone that have galaxy s4 or htc one? Jul 03 16:14:06 Ge0rG : good question , no , i think you just answer my question and and i should use sqlite Jul 03 16:15:15 weox: do so; it allows for fine-grained filtering and sorting, and has easy integration with ListViews Jul 03 16:20:33 if someone could help me solve this problem I'd be so grateful. I;m using MediaPlayer to play back an url, but the url has very low bandwidth so the buffering takes up to 1 minute, which is a long time if you're expecting something to start playing. Ideas or thoughts on how to improve this? Jul 03 16:23:35 nownot: give it higher bandwidth? Jul 03 16:23:51 evanc: I don't have control of the stream :( Jul 03 16:25:48 nownot move to SF where internets are everywhere , messages and videos are instant … , etc ! Jul 03 16:26:27 g00s: that wouldn't make the stream be faster Jul 03 16:26:36 move the server to SF then ;) Jul 03 16:29:40 :/ Jul 03 16:30:14 lower the video quality? Jul 03 16:30:23 its an audio stream Jul 03 16:30:42 lower the audio quality? Jul 03 16:30:45 :D Jul 03 16:30:54 once again, I don't have control over the stream Jul 03 16:41:17 what type of objects are drawables? Jul 03 16:41:21 R.drawable.etc Jul 03 16:41:24 imageviews? Jul 03 16:41:31 or images Jul 03 16:41:32 or what Jul 03 16:41:54 Drawable extends Object Jul 03 16:42:10 so can i make a variable contain r.drawable.something Jul 03 16:42:28 i can Jul 03 16:42:29 ty Jul 03 16:42:41 any image you put in a density bucket, drawable, drawable-xhdpi, etc... will be in R.drawable Jul 03 16:42:49 'Object rlev2 = R.drawable.lock;' ? Jul 03 16:43:14 so now i can use rlev2 instead of typing R.drawable.lock every time? Jul 03 16:43:17 R.drawable.xxxxx are ID tags referencing the drawable in the relevant bucket Jul 03 16:43:28 R is not to be configured by you Jul 03 16:43:43 yes.. Jul 03 16:43:49 R.drawable are integers Jul 03 16:44:06 ty Jul 03 16:49:36 p_l there ? Jul 03 16:51:25 yes Jul 03 16:52:00 p_l quick q, have you used ragel recently enough that its still in your head? Jul 03 16:52:07 i mean, how it works Jul 03 16:52:25 not really Jul 03 16:53:03 ok. i was using the scanner functionality and see in the examples that '=>' construct is never used; its just machine { action } and wondered whats up with that Jul 03 16:53:16 k, thk then Jul 03 16:53:21 let me check, maybe I still remember something Jul 03 16:53:43 remember, there are regular fsm, scanners, and statecharts Jul 03 16:54:35 Is anyone free and can help me with a webview issue? Jul 03 16:55:09 scanners are machine := |* …… *| Jul 03 16:59:32 I am trying to retrieve shared preferences that have been set in the mainactivity class from a class that extends AsyncTaskLoader but am not having much success mode_private symbol cannot be resolved - any suggestions Jul 03 17:00:34 AsyncTask doesn't define a variable called mode_private, Context does Jul 03 17:01:04 g00s: lots of the examples (or stuff in the wild) is "plain machine", without scanner convenience Jul 03 17:01:57 p_l yeah … the docs say pattern => action but the examples never use => Jul 03 17:02:12 maybe i will try to email adrian Jul 03 17:02:16 thanks SimonVT Jul 03 17:02:19 g00s: because they are not scanner examples, most of the time :) Jul 03 17:02:33 p_l well, i mean in the scanner examples :P Jul 03 17:02:38 lol Jul 03 17:03:47 well, pullscal.rl and rlscan.rl examples use => but cppscan doesn't Jul 03 17:06:39 not sure if anyone was able to answer this, but is there a way to get a multiselect dialog with some grayed out/disabled components? Jul 03 17:07:51 Set your own adapter Jul 03 17:08:04 Might work Jul 03 17:08:13 hello, anyone with galaxy s4 or htc one? Jul 03 17:08:33 Or just supply your own content view to a Dialog Jul 03 17:09:04 SimonVT, dialog doesn't seem to respond to a custom adapter when set with setMultiChoiceItems Jul 03 17:09:43 my list of items is generated randomly, or the deselected item is chose later Jul 03 17:09:51 Don't use both Jul 03 17:10:09 don't use custom adapter with setMultiChoice? Jul 03 17:10:30 well multi choice doesn't seem to have an option to deselect certain items Jul 03 17:10:40 and my custom adapter doesn't seem to provide the checkboxes the way multi choice does Jul 03 17:12:57 Sixmsj, make it provide them Jul 03 17:13:50 Zharf: not sure how to do that, it seems the multiselect function is quite magic Jul 03 17:14:20 Sixmsj, frankly, it's crap :) Jul 03 17:14:37 id be happy to avoid it Jul 03 17:15:59 when is oncreate called? Jul 03 17:16:10 Everytime the activity is switched to via intents? Jul 03 17:16:51 so, who is having the unexpected map namespace prefix in android studio, with google_play_services ? Jul 03 17:16:52 :o Jul 03 17:17:22 When you use setMultiChoiceItems, the builder supplies the Adapter Jul 03 17:17:23 Zharf: would you know how i could achieve this? Jul 03 17:17:36 When you use setAdapter, you supply the views Jul 03 17:17:44 SimonVT: wouldn't i be able to set a new adapter then? Jul 03 17:18:20 Why would you call setMultiChoiceItems at all if you supply your own adapter Jul 03 17:18:44 The items aren't magically going to appear in your adapter Jul 03 17:19:49 Anyway, create your own dialog if AlertDialog doesn't do what you want Jul 03 17:20:21 argghh why is java so fucking difficult Jul 03 17:20:45 it's just a horrible, horrible language Jul 03 17:21:24 java isn't difficult Jul 03 17:21:28 it is a horrible language, though Jul 03 17:21:32 meh Jul 03 17:21:39 it's not that horrible, also it's so easy it's boring Jul 03 17:21:58 well, the stacktraces are horrible Jul 03 17:22:04 I miss macros and proper templates almost every day Jul 03 17:22:09 the stacktraces are *the* *best* feature of java Jul 03 17:22:13 indeed Jul 03 17:22:18 if you call them horrible, you really are not a programmer Jul 03 17:22:28 i come from python, where stack traces are to the point Jul 03 17:22:37 the same is true of java Jul 03 17:22:37 i don't need all the useless bullshit, just a line and a reason Jul 03 17:22:52 uh, python exception traces are far far more verbose Jul 03 17:22:53 pfn: not a good one at least Jul 03 17:23:01 they provide a line, reason and a stack leading to that line Jul 03 17:23:05 at least they don't tend to give you pages and pages of Jul 03 17:23:06 and "line and reason" makes it obvious this is the case Jul 03 17:23:07 "at at at at at at" Jul 03 17:23:13 Jalak, that's what a stack is Jul 03 17:23:18 <|0xD34D|> sometimes you need to follow the trace to find the real problem, so they are helpful Jul 03 17:23:32 anyone who's written any amount of nontrivial code realizes an error isn't necessarily on a single line and with a single reason :P Jul 03 17:23:48 SimonVT: it's because i want to disable certain items Jul 03 17:24:05 setMultichoice works great, except if you want to gray out certain items/disable them Jul 03 17:24:16 if i could emulate that with another adapter without using setMultiChoice, i would Jul 03 17:24:20 So it doesn't do what you want - don't use it Jul 03 17:24:23 most traces that start off in the framework aren't very useful, but that's ok Jul 03 17:24:43 i.e. it would be nice to trim off the initial framework pieces starting off at zygote, for app devs Jul 03 17:24:53 but that's not so difficult to do, either Jul 03 17:25:07 and really not that big of a deal Jul 03 17:25:10 well android development is very hard Jul 03 17:25:18 buh? Jul 03 17:25:22 Jalak, if you think that, you're not much of a developer :p Jul 03 17:25:27 oh come on Jul 03 17:25:32 compared to what, a page counter in php? vb? Jul 03 17:25:42 it pretends it's being a website Jul 03 17:25:50 no, it really doesn't even a little Jul 03 17:25:56 * pfn headscratches Jul 03 17:26:09 if you think in terms of websites, you're a crap developer Jul 03 17:26:12 I've having to use a table to align things Jul 03 17:26:27 it's so primitive Jul 03 17:26:30 hint: layouts have been around for a very long time Jul 03 17:26:42 hint: if you want primitive, go write native X11 Jul 03 17:26:55 * pfn headscratches some more Jul 03 17:27:03 SimonVT: that's my point, i'd like to figure out how achieve what i'm doing without setMultichoice if it's not going to work Jul 03 17:27:18 pfn: clear troll Jul 03 17:27:29 just a pretty bad one Jul 03 17:27:29 not my fault Jul 03 17:27:30 Supply your own adapter, and possibly listview Jul 03 17:27:38 going from python to java is possibly the worst thing i've ever done Jul 03 17:27:48 things that would take me one line now take me many Jul 03 17:27:55 because that's just how java is Jul 03 17:27:57 so don't write java Jul 03 17:28:11 all android does, unfortunately Jul 03 17:28:21 there are alternative languages Jul 03 17:28:21 so don't do android Jul 03 17:28:21 ;) Jul 03 17:28:22 come on, hello world is only like 20-50 lines in java, i don't know what you're talking about Jul 03 17:28:27 zinx: ;) Jul 03 17:28:37 * pfn writes stuff in scala on android all the time Jul 03 17:28:43 hi, when working with services, i know i can send startservice() to send message, but this is the only way to talk to a service ? Jul 03 17:28:49 apps? Jul 03 17:28:56 Halp. I have scavenged the internet for a webview mem leak fix (most notably when Javascript is turned on). But nothing has worked... Jul 03 17:29:04 zinx: though if you've seen the gnu hello world, 20-50 lines seems short Jul 03 17:29:19 daivyk, you can use aidl to communicate over your binder, you can use a local binder, you can use broadcasts, the list goes on Jul 03 17:29:24 SimonVT: lol, i think we're going in circles. Jul 03 17:29:25 pfn: Being discouraging to new devs isn't very helpful :S Please don't do that Jul 03 17:29:35 scala looks kinda fun to me, i was looking in to web frameworks and decided that if i were going to use one, it'd probably be Play! (i considered Lift but that dude's idea of security is laughable) Jul 03 17:29:39 not sure how to achieve that with list view + separate adapter Jul 03 17:29:52 zinx, play is awesome, lift is pretty dead Jul 03 17:29:54 I think Jul 03 17:29:59 i hope so Jul 03 17:30:12 pfn: ok, can i use local broadcast ? Jul 03 17:30:22 daivyk, yes Jul 03 17:30:30 doing everything in android just seems to take so many lines to do Jul 03 17:30:37 seriously, it's the most insecure thing ever, it does no security verification other than keeping N random numbers secret - that may sound ok, but it's really really not. Jul 03 17:30:41 I run tests where I constantly reload pages on a webview, then destroy it. In the meminfo of the device the Memory for the app keeps rising and rising, when I destroy the webview, only around 5mb of memory goes away, and it leaves behind the massive 70+ mb it created Jul 03 17:30:43 scala is loads of fun, just a little difficult for people new to functional programming Jul 03 17:31:02 scala isn't really functional though is it? Jul 03 17:31:07 just slightly Jul 03 17:31:14 if you're /really/ doing scala, it's fully FP Jul 03 17:31:19 if you're just dabbling, it isn't Jul 03 17:31:30 scala is just a buzzword for people who want to sound like they're doing something important lol Jul 03 17:31:43 it embraces both styles, but most people working with the language in-depth use it in more of a functional fashion Jul 03 17:31:55 Brian|CB: not really, if people were doing something important they wouldn't be writing JVM stuff Jul 03 17:31:59 Anyone think they can help ? Jul 03 17:32:16 * zinx knows quite a number of languages of various forms, so would have little trouble writing in it ;) Jul 03 17:32:24 but it's useful if you find java-the-language horrible (which it is) and want something less bad (which scala is) Jul 03 17:32:26 oGMo: Maybe so Jul 03 17:32:35 I just had this experience with the word where veryone used it as a buzz word Jul 03 17:32:42 and so now whenever me and my dev friends hear it we just giggle Jul 03 17:32:51 i reckon ios development is easier than android Jul 03 17:33:00 who the hell uses scala as a buzzword? Jul 03 17:33:01 troll keeps trolling Jul 03 17:33:03 Jalak: perhaps you should move to iOS? Jul 03 17:33:04 they don't have to have this "everything must work on everything" layout design thing Jul 03 17:33:05 Jalak, hahaha Jul 03 17:33:11 pfn: ok, right now i am sending intents with startService, i know that this it not a problem (it's not going to start a new service). But is this the better approach to work with services, or it is better to use a local broadcast ? Jul 03 17:33:12 if you say so Jul 03 17:33:12 zinx: yes, an excellent suggestion! Jul 03 17:33:13 YeomansIII: sorry, everyone in this channel is currently seeing who is smarter than the rest. You'll have to ask your perfectly reasonable question later. Jul 03 17:33:34 YeomansIII: maybe watch DDMS's allocation tracker and see where that memory is going? Jul 03 17:33:36 Jalak: I'm not so sure haha Jul 03 17:33:38 Jalak: yeah, it's so much better having a version of your app for every different Android device that exists Jul 03 17:33:43 having done both Jul 03 17:33:45 i had to try and extend a class just now simply in order to draw an image to the screen Jul 03 17:33:48 Jalak: iOS is a whole different monster Jul 03 17:33:55 when i should just be able to go image, draw at x,x Jul 03 17:33:56 and be done with it Jul 03 17:34:06 Dealing with Apple is less pleasant than digging out your own eyeballs Jul 03 17:34:14 Jul 03 17:34:15 done Jul 03 17:34:21 well, layouts and other bs, but whatever Jul 03 17:34:23 Jalak: you don't have to write any code to draw an image on the screen, just stick it in your layout.xml that you are probably already loading. Jul 03 17:34:27 ah yes, but that only worksin one case Jul 03 17:34:41 if you want something drawn to many buttons, that are all different, nope Jul 03 17:34:42 YeomansIII: are you sure you forced a full GC? (is dalvik gengc?) are you sure you hold no references to anything related? etc Jul 03 17:34:44 time for extending classes! Jul 03 17:34:51 Jalak: what? Jul 03 17:34:57 or having more code for each button controlling it's specific action Jul 03 17:34:58 Jul 03 17:34:58 done Jul 03 17:35:00 it's ridiculous Jul 03 17:35:02 Jalak: you can programmatically add views to a layout too. Jul 03 17:35:05 that's ridiculous? Jul 03 17:35:07 * pfn headscratches Jul 03 17:35:10 you really aren't a programmer Jul 03 17:35:12 pfn you miss the point Jul 03 17:35:14 if extending a class is too hard Jul 03 17:35:16 zinx: if you're an idiot .. so in this case it seems apt Jul 03 17:35:18 evanc: Haha, ok. And will do, ill look into that. Jul 03 17:35:21 Jalak: you aren't making one. Jul 03 17:35:22 maybe mobile development isn't your thing Jul 03 17:35:32 ForestJohnson, s/mobile// Jul 03 17:35:35 Jalak: i really don't understand what the need for the extra class is, sorry :( Jul 03 17:35:48 ? Jul 03 17:35:51 so i can have buttons with images drawn ontop of them Jul 03 17:35:58 it never feels like you're actually programming in java Jul 03 17:36:02 just tricking it into doing what you want Jul 03 17:36:11 Jalak: buttons can't already have images on them? Jul 03 17:36:12 with some roundabout stupid method that could be done in two lines in python Jul 03 17:36:18 troll keeps trolling Jul 03 17:36:27 Jalak, go ahead, write a ui and draw a button in 2 lines in python Jul 03 17:36:29 you can't have two images on them and control the visibility of one of them Jul 03 17:36:31 oGMo: Im sure there are no references, unless FrameLayouts holds anything after a view is removed. And what is a "Full" GC? I do regular System.gc() Jul 03 17:36:48 Jalak: do you want a togglebutton, perhaps? Jul 03 17:36:51 YeomansIII, System.gc is bad, and doesn't really ever solve problems, don't bother with it Jul 03 17:37:23 pfn: if your'e testing garbage collection/leaks, i'm sure it does, unless there's a better way to force GC? Jul 03 17:37:31 oGMo, ddms -> heap -> cause gc Jul 03 17:37:47 okay Jul 03 17:37:48 i want Jul 03 17:37:49 and as for forcing leaks, you don't need to force gc to test for it Jul 03 17:37:55 run your app for a few hours, take a memory dump Jul 03 17:37:58 and use mat or jhat to look at it Jul 03 17:38:03 there are ten imagebuttons in a roqw Jul 03 17:38:08 each with a different image Jul 03 17:38:09 pfn: not sufficient Jul 03 17:38:11 when you click on them Jul 03 17:38:17 i want another image drawn on top of them that is smaller Jul 03 17:38:26 e.g., you may not repeatedly do things that leak Jul 03 17:38:27 so setDrawableResource... Jul 03 17:38:34 yes? Jul 03 17:38:35 will what? Jul 03 17:38:38 replace the first image? Jul 03 17:38:41 which is not what i want Jul 03 17:38:43 When Im constantly reloading large javascript heavy pages the app only lasts 20-30minutes Jul 03 17:38:44 not make you less shit? Jul 03 17:38:49 then setDrawable with a drawable that composes the two Jul 03 17:38:56 and build the drawable yourself Jul 03 17:38:59 YeomansIII: hrm Jul 03 17:39:02 see Jul 03 17:39:06 i have to built an entire object Jul 03 17:39:09 just to draw an image Jul 03 17:39:12 on top of another image Jul 03 17:39:19 I have even tested destroying and removing a webview after each load and creating a new one Jul 03 17:39:21 oGMo, and how is that different from calling system.gc manually? you have to be actively screwing with your app in any case Jul 03 17:39:32 i keep looking around for the easy way but in java, there IS no easy way Jul 03 17:39:38 uh Jul 03 17:39:39 ok Jul 03 17:39:40 JakeWharton: Any idea how your iOS collegues do what you accomplish with tape on Android? Jul 03 17:39:44 write this same thing in python Jul 03 17:39:45 YeomansIII: well there may certainly be a leak, but you may want to ask where people who are familiar with the system-level stuff are heh Jul 03 17:39:46 it isn't easy Jul 03 17:39:56 pfn: no i mean running your app for hours Jul 03 17:40:32 oGMo, in any case, having system.gc there makes no difference in any cas Jul 03 17:40:34 e Jul 03 17:40:45 YeomansIII, take a heapdump, and check Jul 03 17:40:48 pfn: sure Jul 03 17:40:58 learn to use MAT and jhat Jul 03 17:41:12 or yourkit, or jvisualvm, take your pick Jul 03 17:41:21 Ive looked at 3 heap dumps with MAT and they all looked exactly the same... Not sure if i was doing somethign wrong or not Jul 03 17:41:34 "all looked exactly the same" wtf does that mean? Jul 03 17:41:40 "they all looked the same, they used 3gb" Jul 03 17:41:49 or "they all looked the same, they used 0mb" Jul 03 17:42:00 And the heap isnt what grows, the heap stays around 4mb, but the actuall application memory, which i see from meminfo goes outraguoes Jul 03 17:42:05 Or 'they were byte for byte identical' Jul 03 17:42:14 They all used exactly 3.4mb Jul 03 17:42:22 that's better Jul 03 17:42:33 recycle your webviews, or finish them or whatever the call is Jul 03 17:42:45 Destroy? Jul 03 17:42:46 any associated client or whatever objects as well Jul 03 17:43:36 so what exactly is the behavior you're encountering Jul 03 17:43:41 I destroy it each webview after each load and create a new one. I've tested it with one webview loading multiple times then destorying, after destroying the memory goes down a little, but not the 70mb it created Jul 03 17:43:41 "the app only lasts 20-30 minutes" also meaningless Jul 03 17:43:43 how does it die Jul 03 17:43:52 and how are you determining it's 70mb Jul 03 17:44:03 *is still there Jul 03 17:44:15 Fatal Signal 11 Jul 03 17:44:25 adb shell dumpsys meminfo Jul 03 17:44:34 and 70mb isn't really much Jul 03 17:44:41 not if you're talking webviews Jul 03 17:44:46 Thats with a small website Jul 03 17:45:08 look at the stack for the sigsegv, google for it Jul 03 17:45:08 Loading a Javascript intensive page goes up 20mb each load Jul 03 17:45:23 And the app fatal signal 11's around 400mb Jul 03 17:45:42 wow, took you longer than 5 minutes to get to details :p Jul 03 17:45:49 lol Jul 03 17:46:57 is it an ok idea (and possible) to use a SlidingPaneLayout as the fragment for the content from a navigation drawer? or will there be a conflict of interest between drawer and pane? Jul 03 17:47:00 how do you place an image DIRECTLY over a button Jul 03 17:47:13 why aren't you using an ImageButton? Jul 03 17:47:14 that's how Jul 03 17:47:17 no Jul 03 17:47:18 NO Jul 03 17:47:25 I do not want an imagebutton Jul 03 17:47:28 I want an image over a button Jul 03 17:47:30 or next to it Jul 03 17:47:31 whatever Jul 03 17:47:33 but you want an image, on top of a button Jul 03 17:47:35 that i can toggle the visibility of Jul 03 17:47:37 that's an image button Jul 03 17:47:40 a small image Jul 03 17:47:45 with the rest of the button visible Jul 03 17:48:11 so you want a normal text button, and you want an image to the side Jul 03 17:48:14 like a checkbox or something Jul 03 17:48:17 ..yes Jul 03 17:48:25 you should say so Jul 03 17:48:32 lets go with that anyway Jul 03 17:48:32 which is what a ToggleButton does Jul 03 17:48:47 android:drawableLeft="@drawable/your_stupid_image_button_resource" Jul 03 17:49:11 now, via code Jul 03 17:49:15 how do i toggle that on and off? Jul 03 17:49:45 by reading the docs and figuring out what method the attribute drawableLeft corresponds to Jul 03 17:49:49 and making the appropriate call Jul 03 17:50:22 setsetCompoundDrawablesWithIntrinsicBounds(int left, int top, int right, int bottom) Jul 03 17:50:36 s/^set// Jul 03 17:51:05 sigh Jul 03 17:51:07 i'd already tried that Jul 03 17:51:48 anyone using Android Studio? I'm pretty new to it, imported some code using GCM, having trouble building it Jul 03 17:53:32 i can't toggle setcompounddrawables from within the button's onclick method though Jul 03 17:54:52 you could toggle it by setting it to 0 and back again Jul 03 17:55:09 sure you can Jul 03 17:55:19 also it's causing outofmemory errors Jul 03 17:55:28 then you have a memory leak, fix it Jul 03 17:55:53 you could have images that are too big, if you use huge images, android isn't the best at handling that Jul 03 17:56:11 i would fix it, if java would tell me where it is Jul 03 17:56:17 just some stuff about an error inflating a class Jul 03 17:57:35 and yes, if your images are huge, it will break Jul 03 17:58:09 500x500 too big? Jul 03 17:58:58 they each take up 1mb each Jul 03 17:59:07 so if you have more than a few dozen, it will quickly be too big Jul 03 17:59:23 is that what a class inflation error is Jul 03 17:59:31 no Jul 03 18:02:05 well, something that worked yesterday Jul 03 18:02:08 despite being completely the same Jul 03 18:02:10 now no longer works Jul 03 18:02:13 thank you, java Jul 03 18:02:23 thank you crappy programmer that blames the tools Jul 03 18:02:39 java/android have a ton of problems, but those ain't them :P Jul 03 18:02:52 (and other platforms have a comparable amount) Jul 03 18:03:19 Out of memory on a 6018556-byte allocation. Jul 03 18:03:28 how da fuck can it be out of memory on that Jul 03 18:03:54 apps are limited to 32MB or less typically Jul 03 18:04:13 Jalak: sometimes you can have heap limit of 16MB... Jul 03 18:04:23 on high resolution devices that could actually make use of that 500x500 image, the limit is higher. Jul 03 18:04:33 i removed that image actually Jul 03 18:04:36 "it's embedded programming" Jul 03 18:04:36 the code is exactly the same Jul 03 18:04:37 BitmapFactory.Options are your friend Jul 03 18:04:37 yet somehow Jul 03 18:04:38 is broken Jul 03 18:04:40 LRU caches are your friend Jul 03 18:04:43 Jalak: sounds like you broke something :) Jul 03 18:04:44 for no reason Jul 03 18:04:48 the code is the same! Jul 03 18:04:59 Jalak: doesn't mean it isn't wrong. Jul 03 18:05:36 useLargeHeap, LRU caching, and proper bitmap Options are your best friend for image heavy apps. Scale your LRU caches based on the available heap. Jul 03 18:08:33 can java tell me what is causing the leaks? Jul 03 18:08:38 or memory failure Jul 03 18:08:39 or what Jul 03 18:08:48 instead of this useless trace that tells me nearly zilch Jul 03 18:09:29 I doubt you're leaking, your just using too high of a resolution image Jul 03 18:09:47 inflate the images programmatically, scale using options, and apply the decoded image accordingly Jul 03 18:09:48 Jalak also your memory can be fragmented Jul 03 18:09:49 Jalak, unless you have commit logs and resulting apks corresponding to those commit tags that worked, we don't believe you :p Jul 03 18:10:07 fragmented memory is rarely an issue when you're talking about small heaps Jul 03 18:10:07 but the images aren't high res Jul 03 18:10:17 they are mainly about 200x200 or smaller Jul 03 18:10:18 i have had tons of problems with it Jul 03 18:10:31 since my app is long lived, over time things go to shit Jul 03 18:10:44 I imagine that's more about memory leaks than fragmentation Jul 03 18:10:51 no leaks at all Jul 03 18:10:51 Binary XML file line #152: Error inflating class Jul 03 18:10:56 ah yes Jul 03 18:10:58 well done java Jul 03 18:11:05 thank you for telling me about the error in Jul 03 18:11:05 error inflating class, out of memory? Jul 03 18:11:09 what's the exception Jul 03 18:11:13 uh, it's line 152 of your xml Jul 03 18:11:14 that Jul 03 18:11:15 Jalak: stop blaming the tools and figure out what you're doing wrong. Jul 03 18:11:18 what xml? Jul 03 18:11:21 it says so Jul 03 18:11:23 read the stack trace Jul 03 18:11:24 the XML of the starting activity Jul 03 18:11:27 or the launching activity? Jul 03 18:11:28 seriously, your attitude is worthy of 0 help Jul 03 18:11:35 +1 Jul 03 18:11:45 I'm amazed you lasted this long, pfn Jul 03 18:11:45 pastebin your stacktraces or gtfo Jul 03 18:11:54 http://imgur.com/jacoj Jul 03 18:11:58 SimonVT, what can I say, I'm a sucker Jul 03 18:12:26 any idea why i have the sqlite browser icon and can click it in eclipse but it won't open the db file? Jul 03 18:12:42 I sat back and enjoyed the show about 2 lines in Jul 03 18:12:44 flipture, because your appdata is not worldreadable Jul 03 18:12:58 the Questoid sqlite browser blinks like it wants to open then just is blank Jul 03 18:13:12 flipture, because your appdata is not worldreadable Jul 03 18:13:16 pfn: ah, i tried pulling the file but don't know how to get it to open in sqlite browser from there Jul 03 18:13:28 shoudl i change permissions instead maybe? Jul 03 18:13:36 that'd be my guess Jul 03 18:13:38 anyone knows of anything like android VMs that allow different screen sizes, so that QA devs can test apps? Jul 03 18:13:51 FernandoMiguel, the emulator... Jul 03 18:13:54 FernandoMiguel: you can make the emulator have any screen size you want Jul 03 18:14:22 dumb it down for folks that have no idea what a CLI is Jul 03 18:14:45 how did they get jobs as qa devs.... Jul 03 18:15:16 sdk manager -> avd manager -> create avd -> set your screen size and android version -> start Jul 03 18:15:44 yeah Jul 03 18:17:17 if i have a button that switches between activities Jul 03 18:17:25 are those activities "created" each time Jul 03 18:17:27 calling oncreate? Jul 03 18:18:00 Jalak: depends if you are finishing any of them Jul 03 18:18:11 if you open a new phone, and press the back button it will finish it Jul 03 18:18:12 depends on lifecycle state and how you're moving between activities Jul 03 18:18:24 if you open a *new activity Jul 03 18:19:49 use the appropriate flag for startActivity Jul 03 18:19:57 http://androvm.org/blog/ Jul 03 18:20:35 also consider launchMode Jul 03 18:22:01 bbl Jul 03 18:22:08 so, start activity with button Jul 03 18:22:12 press button to launch another activity Jul 03 18:22:16 press back to go to first activity Jul 03 18:22:20 is that first activity.. ? Jul 03 18:22:23 if you have a strings.xml file, can you use any context to getstring() it? Jul 03 18:22:24 oncreate or onresume? Jul 03 18:22:32 onResume Jul 03 18:22:34 onStart Jul 03 18:22:35 mmathis, yes Jul 03 18:22:43 onStart is before onResume Jul 03 18:22:44 it's onstart too? Jul 03 18:22:52 And Onstart is after Oncreate Jul 03 18:22:57 yes Jul 03 18:23:01 so when you go back to it, it calls onStart Jul 03 18:23:01 and depending on how/when it went into the background, onStart may or may not be called Jul 03 18:23:05 pop logtags to see :-) Jul 03 18:23:06 damnity Jul 03 18:23:18 if i want code to be called both onresume, and oncreate Jul 03 18:23:20 Jalak, this is all documented clearly Jul 03 18:23:21 it should go in onresume Jul 03 18:23:26 not really Jul 03 18:23:29 yes, really Jul 03 18:23:31 hm, so a resoucenotfoundexception is probably just a burp? Jul 03 18:23:37 not me trying to use the "wrong" context Jul 03 18:23:52 mmathis, usually caused by desync between R.java and the res.apk Jul 03 18:23:58 mmathis, clean and rebuild Jul 03 18:24:06 ya, will do Jul 03 18:24:08 tyty Jul 03 18:24:09 mmathis, as long as it's a context in your package, it's ok Jul 03 18:24:09 Look in Managing the Activity Lifecycle: http://developer.android.com/guide/components/activities.html Jul 03 18:24:24 mmathis, of course you can't lookup resources from another app Jul 03 18:27:44 You can, but I doubt he's doing that :p Jul 03 18:28:39 I actually might be Jul 03 18:29:03 lol, I dunno I just joined this team and am an android newbie Jul 03 18:29:08 wrapping my head around this code is confussin Jul 03 18:30:43 even if i push the db file back to the emulator and it has good permissions questoid sqlite browser won't open it Jul 03 18:30:56 is there a better way, or maybe something common i might be doing wrong? This worked before :-\ Jul 03 18:31:14 do Jul 03 18:31:25 Button b1 = (Button) findViewById(R.id.blevel2); b1.setOnClickListener(new View.OnClickListener( Jul 03 18:31:32 have to be next to each other Jul 03 18:31:36 one above the other Jul 03 18:31:38 no Jul 03 18:31:41 because if i move the button declaration Jul 03 18:31:43 it gives me a NPE Jul 03 18:31:48 well Jul 03 18:31:48 yes Jul 03 18:31:53 your view can't be null Jul 03 18:32:09 Hello there Jul 03 18:32:11 if you call a method on a null b1, we'll poof Jul 03 18:32:12 I am new here Jul 03 18:32:30 Just starting to develope Android apps Jul 03 18:33:01 nekosama_: welcome to Android :-) Where years of life evaporate into thin air :-) Jul 03 18:34:31 nevermind i just got an exernal sqlite browser and it was able to open the file. weird that it doesn't work any more tho Jul 03 18:37:05 tI have a problem with datepicker...... Jul 03 18:37:39 In fact, as i have read, it seems that the datepickerdialog has a bug.. when you try to cancel it... Jul 03 18:37:52 So i implemented my self the positive and negative buttons, and handlers for them Jul 03 18:38:43 the problem is when i try to get the setted date in the datepicker... it says its only for API > 10.... and iwant to make it compatible from > 7 Jul 03 18:41:01 Make sure your using APIs that are 7+ only on 7+ devices. If you use an API 10+ API on lower than 10 it won't work. Jul 03 18:41:08 http://developer.android.com/guide/topics/ui/controls/pickers.html Jul 03 18:41:35 I am using a 2.2 emulator, and i have a 4.2.2 device Jul 03 18:41:36 See top right on the API docs where it says "Added in API Level" Jul 03 18:42:02 on the 4.2.2 it works ok.. but in the emulator, when i press the button to set the date it closes.. because the method getDatePicker is for API > 10 Jul 03 18:42:19 I set min to 7 and target to 16... Jul 03 18:42:35 In other words, whatever APIs your using will work on your 4.2.2 device but not on a 2.2 device. Jul 03 18:42:43 pfn, SimonVT: I printed the package resource path of two contexts that are 1)used to get the info I'm looking for and 2)trying to get the info I'm looking for and they aren't the same Jul 03 18:42:44 i know Jul 03 18:42:57 but there is a problem with the datepicker in Android 4.2.2.... Jul 03 18:43:06 it has a bug i thoough... Jul 03 18:43:30 Because when the user cancel the datepicker it execute the setDate anyway.... Jul 03 18:43:32 Not quite understanding, DatePickerDialog is API 1+: http://developer.android.com/reference/android/app/DatePickerDialog.html Jul 03 18:43:50 nekosama_: well that's another story Jul 03 18:44:12 yes.. and to "fix" the bug, i am trying to make the buttons and listeners myseflt.. Jul 03 18:44:21 *myself Jul 03 18:44:34 the problem is when i want to get the current date of the datepicker.. Jul 03 18:44:49 For example: int monthOfYear = picker.getDatePicker().getMonth(); Jul 03 18:45:57 getDatePicker() was added in API 11 :( Jul 03 18:46:20 So get it from the callbacks DatePickerDIalog offers Jul 03 18:46:55 Or make your own datepickerdialog Jul 03 18:47:15 yes, thats a good idea Jul 03 18:47:33 until they fix the original Jul 03 18:50:13 Hi, im trying to use addCircle() to the Path class, what is the 4th parameter? public void addCircle (float x, float y, float radius, Path.Direction dir) Jul 03 18:50:33 kakazza: probably core data Jul 03 18:50:41 In the docs it says "dir The direction to wind the circle's contour " Jul 03 18:50:55 What does wind mean and what does contour mean Jul 03 18:52:03 direction means clockwise or counterclockwise Jul 03 18:52:37 JakeWharton: Was afraid so. Make them release something like tape for iOS :p Jul 03 18:53:22 core data, haha Jul 03 18:53:39 ah, I was using the wrong context Jul 03 18:53:56 how many contexts does on app need D: Jul 03 18:54:25 why can't i override ornesume Jul 03 18:54:27 onresume Jul 03 18:54:36 it says it doesn't exist already in the super Jul 03 18:54:36 :S Jul 03 18:54:39 kakazza: I think core data offers the same guarantees though Jul 03 18:54:45 Jalak: you need to be in an Activity or Fragment to override onResume Jul 03 18:55:04 it's in an activity Jul 03 18:55:26 pfn looks like bruce eckel came out with a new scala book Jul 03 18:55:29 likely spelling "onResume" wrong Jul 03 18:55:32 extends activity { yada yada Jul 03 18:56:03 Any advantage of using an assert vs an if in a case like this http://pastebin.com/dJ5RTrXF Jul 03 18:56:05 it's probably just eclipse being stupid Jul 03 18:56:07 eckel must be hooked on the cash from selling books Jul 03 18:56:15 Jalak please , don't twitter us with every damn thing you are doing in your editor Jul 03 18:56:25 It took me about 30 minutes to convince eclipse I could override onNewIntent the other day :/ Jul 03 18:56:46 eclipse being eclipse Jul 03 18:56:56 capella you hater :) Jul 03 18:57:11 ouch! ya got me sherriff Jul 03 18:58:01 eclipse 4.x is so ugly on mac i had to give up on it Jul 03 18:58:10 \o/ Jul 03 18:58:15 i think the toolbars were messed up, i mean stuff was really screwed up Jul 03 18:58:54 but i'm still interested in xtext, its an awesome project Jul 03 19:00:24 well, all was neat and tidy with my little app; using event bus, nice patterns, etc. now people want to integrate with it (ipc) and shit has to be parcelable Jul 03 19:00:29 in the end, the Bundle will get you Jul 03 19:01:10 got a jni prob: http://paste.stejau.de/?387 i am creating a direct byte buffer for passing bytes to a c function, but i am getting the error documented in this paste.... what i am doing wrong? Jul 03 19:03:16 intelliJ with the dracula them is pretty nice ... Jul 03 19:03:18 err... darcula Jul 03 19:04:23 i wish it would let me choose the weight of my programming font. in eclipse i use a 'light' not medium weight Jul 03 19:05:43 why does declaring a button as a class variable give a NPE Jul 03 19:05:43 why Jul 03 19:06:10 .. Jul 03 19:06:34 well? Jul 03 19:06:37 It makes no sense? Jul 03 19:06:52 any channel to discuss .htaccess related issues ? ? Jul 03 19:06:56 Because you're doing it wrong Jul 03 19:06:58 no Jul 03 19:06:59 Did you point it @ anything? Jul 03 19:07:02 java is doing it wrong Jul 03 19:07:08 it's a button declaration Jul 03 19:07:13 it should just be there, and be a buttion Jul 03 19:07:18 just like a regular language Jul 03 19:07:23 oh dear Jul 03 19:07:31 ahh, Jalak, still at it Jul 03 19:07:46 declaring a button causes a npe Jul 03 19:07:48 for no reason Jul 03 19:07:56 Jalak: why are you programming? Jul 03 19:08:02 contructor instantiation issue Jul 03 19:08:12 and may I know about the latest update of the IDE war (Eclipse Vs Android Studio) Jul 03 19:08:30 intelli Good !!! eclipse BAD Jul 03 19:08:31 Intellij won Jul 03 19:09:57 better, worse, I stick with different Jul 03 19:10:07 both will make apps Jul 03 19:10:21 Whats wrong with eclipse? Jul 03 19:10:30 nothing at all Jul 03 19:10:42 the only reason why i switched for now from eclipse was becuase it was so ugly on os x; i guess SWT? but older SWT stuff looked 'ok'. dunno. Anyhow, 4.3 was much zippier than 4.2 and both as well as 3.8 use far less memory than idea still Jul 03 19:10:44 opinions will fly, but both will make apps Jul 03 19:12:30 i'm hoping they add the lint stuff to the android gradle build system soon Jul 03 19:12:40 Are there any real reasons to switch to intellij? Jul 03 19:13:02 aren't all reasons "real"? :P Jul 03 19:13:02 lots Jul 03 19:13:07 cool so Intellij is up ahead in lead so far just like last time I chekced Jul 03 19:13:07 Fair Jul 03 19:13:39 the eclipse guys did a poll recently and they got an ear full Jul 03 19:13:55 question - what is your preferred way of sharing to twitter from an app? Jul 03 19:13:57 and now I have your attention people, point me to room for discussing .htaccess related issues Jul 03 19:14:06 I was considering giving up and using web intents and a browser Jul 03 19:14:06 lots of people not happy with it any more. hopefully they can improve Jul 03 19:14:20 and is not working fine for me :-( Jul 03 19:14:22 but I want to be able to confirm that the user did complete the action for the process of tracking them and rewarding them Jul 03 19:14:28 Looney try #web or something Jul 03 19:14:34 #apache ? Jul 03 19:14:51 #httpd it is :-) Jul 03 19:16:52 rager did you try twitter4j or whatever its called ? Jul 03 19:17:16 i think the twitter app responds to ACTION_SEND but yeah, you never know what happened :) Jul 03 19:17:17 have not really tried many things yet - was wondering what you guys thought of the various ways to deal w/twitter Jul 03 19:17:20 rager, I have a small list of 5 most popular twitter clients Jul 03 19:17:33 rager, and just fire off an intent for them if I find them installed, otherwise I go to web Jul 03 19:17:39 I also wasn't able to find documentation on the Intent thing Jul 03 19:17:51 like... which parameters to target just Twitter apps Jul 03 19:17:53 since there's nothing more annoying than getting redirected to web when your twitter client is RIGHT THERE. Jul 03 19:18:09 rager, you can't since twitter never defined an intent category or mime type Jul 03 19:18:17 that's what I'd figured Jul 03 19:18:17 rager the official twitter app is just usual ACTION_SEND Jul 03 19:18:31 rager, that's why I said I use a hardcoded list of few most popular ones Jul 03 19:18:33 :) Jul 03 19:18:42 Just launch the intent to open twitter.com in the browser.. A decent twitter client should pick that up Jul 03 19:18:48 official doesn't. Jul 03 19:18:54 I said a decent Jul 03 19:19:15 well good thing most people don't use official client huh? Jul 03 19:19:54 i thought twitter was just for advertisers these days :D Jul 03 19:20:39 so do things like twitter4j work anymore or did they stop allowing that kind of client ? Jul 03 19:20:50 afaik they still work Jul 03 19:20:58 but it's usually the worse option Jul 03 19:21:20 twitter is for morons and celebrities who are incapable of formulating coherent sentences Jul 03 19:21:30 Mavrik is it buggy or just lend to poor UX? Jul 03 19:21:45 pragma++ Jul 03 19:21:51 g00s, UX is worse - the user has to login + reauthorize Jul 03 19:22:01 ok, thanks Mavrik Jul 03 19:22:07 is it inadvisable to go and see which apps are installed Jul 03 19:22:14 and use that hardcoded list of the most common apps Jul 03 19:22:27 cross-referenced against the list of known installed apps? Jul 03 19:22:41 you don't have to see which apps are on devie Jul 03 19:22:50 there's a reason there is an intent chooser... just use that, and fuck any apps that are too stupid to register properly Jul 03 19:22:52 you just have to check if your intent with target set will have a target Jul 03 19:23:53 ok Jul 03 19:24:26 rager, something like this works: http://pastebin.ca/2416062 Jul 03 19:24:35 if you get a null intent you fall back to web link Jul 03 19:24:43 it's not ideal (if user has several twitter clients) Jul 03 19:24:54 but beats most other ways of doing that Jul 03 19:26:34 rager, of course, usually is a very good etiquette to allow a person to share info over all other apps with general ACTION_SEND intent as well Jul 03 19:27:09 I'll add a general "share" button as well, then Jul 03 19:27:12 and that'll do ACTION_SEND Jul 03 19:27:24 the problem i had, was to reformulate the data for 160 chars when a twitter client picked it up Jul 03 19:27:25 Well I agree intellij's LogCat is way better than Eclipse's Jul 03 19:27:34 Miesco wat Jul 03 19:27:38 Miesco, wat? :) Jul 03 19:27:44 intellij's logcat blows chunks Jul 03 19:27:52 No its way better Jul 03 19:27:53 rilly? Jul 03 19:27:58 logcat in IntelliJ (at least 12) is probably the worst part of the IDE… Jul 03 19:27:59 I'm down with the thing Jul 03 19:28:00 it cant even follow the process Jul 03 19:28:13 I can actually copy stuff from it Jul 03 19:28:15 not even in columns, just a mess of bullshit Jul 03 19:28:21 And the text isn't so big and spaced out Jul 03 19:28:25 mhm + it tends to lag on some devices Jul 03 19:28:36 which DDMS doesn't for some reason Jul 03 19:29:25 oh, that reminds me - anybody know where the adb protocol is documented? i hope its not "the code" Jul 03 19:29:42 i was thinking about writing a dedicated logcat viewer like chainsaw/lilith for android Jul 03 19:29:48 i hate the existing stuff Jul 03 19:30:38 hmm Jul 03 19:30:43 monitor is basically eclipse, i want something lighter Jul 03 19:30:52 don't all logcats just pipe data from "logcat" binary in device shell? Jul 03 19:30:52 i can't run eclipse, intellij, and the emu at the same time Jul 03 19:31:00 you need more ram dude :P Jul 03 19:31:06 :( Jul 03 19:31:21 and browser for android docs, plus irc :D Jul 03 19:31:22 Can I open an android eclipse project with intellij? Jul 03 19:31:26 Will this mess up anything? Jul 03 19:31:30 g00s: use https://github.com/JakeWharton/pidcat Jul 03 19:31:37 Miesco, it'll try to convert it. Jul 03 19:31:52 codebutler, that also tends to lag on some devices :/ Jul 03 19:32:03 getting logcat output with 10 secs delay isn't fun. Jul 03 19:32:18 ./pidcat.py com.oprah.bees.android Jul 03 19:32:41 http://1.bp.blogspot.com/-Q3BDeDdkObY/UGNgOCyhs5I/AAAAAAAADQw/bXDbsZbJxDU/s1600/oprah-bees.gif Jul 03 19:32:53 JakeWharton +1 Jul 03 19:33:18 hah, i was using proclogcat + jeff's script Jul 03 19:34:31 I find that the less a person knows about computer science, the more likely they are to use tons of wrappers around wrappers to do things. Jul 03 19:35:29 actually some people prefer to get things done Jul 03 19:36:05 oprah is a perfect twitter user example Jul 03 19:37:08 shit though, the problem i had with sharkey's script was when log messages spanned multiple lines Jul 03 19:37:14 i wonder if jake fixed that Jul 03 19:37:53 i also hadded timestamps Jul 03 19:38:17 meh fuck, i'll just keep using what i have already Jul 03 19:41:18 If I do: setContentView(new View), will this view be height/width = match parent? Jul 03 19:41:29 no Jul 03 19:41:41 you need to set up the layoutParams Jul 03 19:42:00 How come when I do setBackgroundColor it colors the whole screen? Jul 03 19:42:10 Because g00s is wrong Jul 03 19:42:19 I am using sqllite! its awesome! Jul 03 19:42:22 SimonVT wut ? Jul 03 19:42:22 i love android :D Jul 03 19:42:23 Can anyone do a really brief explanation on Handlers? Jul 03 19:42:34 I use them for timing, but i have no clue how they work. Jul 03 19:43:17 YeomansIII: use a Handler to post a runnable to a thread, you can reference a particular thread by supplying the thread's looper if it has one Jul 03 19:43:33 g00s, it defaults to match parent Jul 03 19:44:00 ok, i'm used to setting LayoutParams explicitly , sorry Jul 03 19:44:15 Does a Handler not run on its own thread? Or does it? Jul 03 19:44:35 A Handler runs on the thread you created it on, or the thread of whatever Looper you passed it Jul 03 19:45:03 i'm all ears if folks have other suggestions though :D Jul 03 19:45:09 err, ww Jul 03 19:45:10 A Handler is a way to execute supplied runnables, or a way to process messages Jul 03 19:46:08 Hmm, im trying to determine the cause of a WebView memory leak, I have tried every suggestion from the internet to no avail. Im looking through allocation dumps and im seeing handler come up a few times Jul 03 19:46:19 Connected to webview drawstuffs Jul 03 19:46:59 Just trying to narrow down the issue. Thanks for the explanantion though Jul 03 19:50:35 is it an ok idea (and possible) to use a SlidingPaneLayout as the fragment for the content from a navigation drawer? or will there be a conflict of interest between drawer and pane? Jul 03 19:54:33 Why is my hexagon I made with Path all schewed? It looks like its being stretched Jul 03 19:55:14 Anyone seen unexpected results when using db.query in sqlite? Is there a gotcha with single quotes using selection and selectionArgs? Jul 03 19:56:37 Wait no, its just when I do a ShapeDrawable PathShape, then its schewed, if I skip the ShapeDrawable and do canvas.drawPath() it isn't distorted Jul 03 20:03:33 flipture: single quotes? Jul 03 20:05:39 Well, i'm tryig to do this: SELECT * FROM ITEMS WHERE is_completed=0 OR (completed_date >= datetime('now', '-100 minute') AND is_completed =?) AND cat=3 Jul 03 20:05:44 Can an app read texts? Jul 03 20:05:45 but i'm using args to replace the values Jul 03 20:06:09 Ask this a bit earlier but here it is again: if someone could help me solve this problem I'd be so grateful. I;m using MediaPlayer to play back an audio stream form a url, but the url has very low bandwidth so the buffering takes up to 1 minute, which is a long time if you're expecting something to start playing. Ideas or thoughts on how to improve this? Jul 03 20:07:14 Thorbear: I can execute that query manually against a copy of the DB i pulled off of the phone and get what i woudl expect. When i run it on the phone or emulator, it doesn't pull any of the entries matching the datetime bit Jul 03 20:07:22 so i'm wondering if i'm doing something wrong on the android side or Jul 03 20:07:31 if the 'now' or something is getting messed up along the way Jul 03 20:08:27 flipture: right, I remember running into that issue myself, let me check how I solved it ( I may have put the entire datetime() part as a single arg) Jul 03 20:09:53 seems I had some success with datetime('now', ?) and inserting the second part as an arg Jul 03 20:11:38 Thor sweet, thats the only way i havent' tried. i did the entire datetime bit in both places Jul 03 20:11:42 giving it a shot Jul 03 20:13:52 and the second part would obviously not need to be quoted... selection = "datetime('now', ?)"; args = new String[] {"-3 days"}; Jul 03 20:14:34 so is it days or day? or does it matter? i've not been clear on that :-\ Jul 03 20:15:24 days, hours, minutes, seconds... Jul 03 20:15:32 Thorbear: SWEET! that worked... removing the quotes from the -X minute seems to have worked Jul 03 20:15:52 at least according to the sqlite manual Jul 03 20:15:52 i left datetime('now',?) in the selection Jul 03 20:16:10 looks like minute or minutes will work Jul 03 20:17:07 it probably handles quite a lot of variants, I'd go with the manual though, to be sure :) Jul 03 20:17:49 Thorbear: agreed :) Jul 03 20:18:24 Thorbear: thanks for your help.. you ended a 18 hour struggle :) Jul 03 20:18:35 no problem :) Jul 03 20:19:29 I'm trying to disable an ActionBar menu item when a button is clicked, but I can't figure out how to do this. 'findViewById' doesn't work, and Google isn't helping. Jul 03 20:19:51 How come in Intelliji when I put my cursor over a method, it doesn't show the JavaDocs? Jul 03 20:20:18 Miesco: because you haven't enabled that option? I think it is off by default Jul 03 20:20:58 Hey there, i s it possible to call a method of an already running background service from a notification? Jul 03 20:24:50 I need a way of getting an ActionBar's Menu. Jul 03 20:24:56 Dynamically. Jul 03 20:24:59 asga: not directly, a notification doesnt really do anything Jul 03 20:25:04 a pending intent gets called Jul 03 20:25:18 that can send an intent to your service telling it to do something Jul 03 20:25:42 yeah i meant via pending intent Jul 03 20:26:04 But i only found getService() and the documentation says "start a service" Jul 03 20:26:11 but the service is already started? Jul 03 20:26:11 TacticalJoke: at the end of onPrepareOptionsMenu() in your activity call menu.findItem(R.id.my_action); save the resulting MenuItem and later call MenuItem#setEnabled and then call Activity#invalidateOptionsMenu Jul 03 20:26:47 I have to call Activity.invalidateOptionsMenu after enabling/disabling a menu item? Jul 03 20:26:59 I don't have an activity because the Services is defined by an aidl Jul 03 20:27:21 TacticalJoke: as i said Jul 03 20:27:49 I ask because it seems to work when I don't call Activity.invalidateOptionsMenu. Jul 03 20:27:50 Hmm. Jul 03 20:28:56 why is DrawableLeft drawing my image on the right of the button, while also stretching it out so that the whole image doesn't fit in the button? Jul 03 20:29:31 It seems broken Jul 03 20:30:04 How come my view takes up the parent, but this.getWidth is 0? Jul 03 20:30:37 hey guys Jul 03 20:30:52 mikedg_: is it still possible to use getService? which method from the service would be called? Jul 03 20:31:01 I added a little menu but forgot that newer Android devices remove the menu button Jul 03 20:31:15 and I guess on those devices I need that vertical "..." icon to replicate the button Jul 03 20:31:39 Is there anything I can google for to learn how to detect if the menu button is present and if not, add that "..." image? Jul 03 20:31:54 (and also, is there some stock "..." image to use?) Jul 03 20:32:18 Hey, does anyone here know a way to create an APK that will ONLY run on kindle devices? I was thinking of using "uses-library" in the manifest, but I'm not sure what libraries would be kindle only. Jul 03 20:33:17 …I tried using google, but any search of kindle + library or classes turns up info about books or education on kindle Jul 03 20:33:49 ProgramMax: https://developer.android.com/guide/topics/ui/actionbar.html Jul 03 20:34:00 The framework handles it for you Jul 03 20:35:25 Reading through it now. We need to support API level 8 and this was added in 11. Is there a compatibility thing? Jul 03 20:35:53 ProgramMax, ABS? Jul 03 20:36:05 sorry? Jul 03 20:36:37 The action bar replaces the title bar and menu Jul 03 20:36:41 You still get those on older platforms Jul 03 20:36:53 oh yeah, where is that appcompat thing google said new projects should be using ? Jul 03 20:36:53 The API for adding menu items is the same Jul 03 20:37:20 So you're saying I can use the action bar and it'll still work on older devices Jul 03 20:37:25 if I understand correctly Jul 03 20:38:57 I'm saying that your menu items will be available through the menu button on old platforms, and in the action bar on new platforms Jul 03 20:40:17 I'm saying that your menu items will be available through the menu button on old platforms, and in the action bar on new platforms Jul 03 20:41:45 can android show 50px images>? Jul 03 20:42:32 Jakal, what kind of question is that? Jul 03 20:43:00 i have a drawableLeft image Jul 03 20:43:12 image was too large so i shrunk it to 50px Jul 03 20:43:17 android can no longer seem to show it Jul 03 20:43:22 just acts like it isn't there Jul 03 20:45:10 hrmmm how much control does the action bar give me? My current icons have a drop shadow and my bar has a gradient Jul 03 20:45:21 can I have the "..." icon have that drop shadow? Jul 03 20:45:22 Jakal: yes it can chow 50px images perfectly Jul 03 20:45:30 then what's happening? Jul 03 20:45:43 it was my thought drawableRight puts the image right after the text Jul 03 20:45:48 but it doesn't Jul 03 20:46:06 Jakal: then it's container view is cropping the text view Jul 03 20:46:07 ensure your textview is wrap content Jul 03 20:46:18 it's a button Jul 03 20:46:20 and the container doesn't constrain it Jul 03 20:46:34 make it a textView Jul 03 20:46:36 image is small enough i should be able to place it in there despite Jul 03 20:46:40 if i make it a textview Jul 03 20:46:42 wiat Jul 03 20:46:57 what's the difference? Jul 03 20:47:08 will i lose button functionality? Jul 03 20:47:19 you'll need to supply your own selector, that's all a button is Jul 03 20:47:21 any View can be a button Jul 03 20:47:26 great Jul 03 20:47:30 more work to do a SIMPLE TASK Jul 03 20:47:35 ^ problem with android right there Jul 03 20:47:43 it only seems difficult because you refuse to read and learn Jul 03 20:47:46 lol, you'll be done in 30 seconds Jul 03 20:47:58 I've got to build a selector for fucks sake Jul 03 20:48:02 the layout should just work Jul 03 20:48:03 this is rudimentary work Jul 03 20:48:07 the layout does just work Jul 03 20:48:13 this is beginners stuff Jul 03 20:48:14 no, no it doesn't Jul 03 20:48:21 or adding a button Jul 03 20:48:27 and having it use drawableleft Jul 03 20:48:32 your in a chat room with top tier devs telling us the simple stuff doesn't work Jul 03 20:48:32 lol Jul 03 20:48:33 would make the image be drawn at the end of the text Jul 03 20:48:37 BUT it doesn't Jul 03 20:48:45 i'm pretty sure you're all just used to the idiocy Jul 03 20:49:02 yep its all 400 ppl in here, you're the only sane one Jul 03 20:49:51 then explain to me Jul 03 20:50:00 why can i not use drawableLeft and button together? Jul 03 20:50:00 hm? Jul 03 20:50:05 Why do i gotta fuck around with text views Jul 03 20:50:15 because there is no difference Jul 03 20:50:17 they are all views Jul 03 20:50:20 it doesn't matter Jul 03 20:50:24 it does to me Jul 03 20:50:26 buttons are designed for just text Jul 03 20:50:28 right, something you refuse to understand because ou won't read dude Jul 03 20:50:29 i shouldn't HAVE to change anything Jul 03 20:50:33 an image button you can put an image Jul 03 20:50:38 WHY are buttons designed for just text Jul 03 20:50:39 jesus fuck Jul 03 20:50:44 you are not using hte right tool for the job because you don't know what the right tool is, because you refuse to learn Jul 03 20:50:50 lol Jul 03 20:50:56 this is like an amalgamation of extremely, pointlessly generic stuff Jul 03 20:51:00 and super focused stuff Jul 03 20:51:04 but good luck figuring out which is which Jul 03 20:51:07 man, I don't want to see what ur app is gonna turn out like Jul 03 20:51:15 we went over this literally 7 hours ago Jul 03 20:51:16 can't code angry Jul 03 20:51:31 oh man is he/she/it still around Jul 03 20:51:34 you could be done by now if you would just take the time to learn how Android works instead of bitching that it doesn't work how you think it should Jul 03 20:51:50 your suggestion didn't work Jul 03 20:51:54 the drawable left failed with textview too Jul 03 20:52:00 then your container is cropping it Jul 03 20:52:02 constraining it Jul 03 20:52:05 how Jul 03 20:52:06 is Jul 03 20:52:06 that Jul 03 20:52:07 possible Jul 03 20:52:09 you need to fix your container Jul 03 20:52:12 The drawable didn't fail. You failed. Jul 03 20:52:14 if it places the image at the end of the text Jul 03 20:52:15 your container is broken Jul 03 20:52:19 and there is 70% of the container left Jul 03 20:52:26 it should be placed there Jul 03 20:52:30 get this, if i make the image bigger Jul 03 20:52:31 it's broken Jul 03 20:52:32 it starts appearing Jul 03 20:52:34 no Jul 03 20:52:41 the way android does layouts is broken Jul 03 20:52:43 broken Jul 03 20:52:44 broken Jul 03 20:52:45 broken Jul 03 20:52:48 android is broken Jul 03 20:52:49 ahhhhhhh Jul 03 20:52:56 if the layouts broken, tell me where? Jul 03 20:52:59 what are we doing here? Let's all jump ship to Windows 8 phone Jul 03 20:54:54 there's some fucking padding or some shit between the text and the image Jul 03 20:54:57 that I didn't put in Jul 03 20:55:09 calm down or GTFO Jul 03 20:55:59 agreed Jul 03 20:57:06 Gel Jul 03 20:57:45 Heh new keyboard fail Jul 03 21:02:47 Mechanical? Jul 03 21:06:50 I have a weird problem. My string's length is 0 but [myString == ""] is false. Jul 03 21:07:02 Wut. Jul 03 21:07:20 TacticalJoke: don't compare objects with == Jul 03 21:07:29 Wait, I'm using Java. Jul 03 21:07:31 use object.equals(otherObject) Jul 03 21:07:34 Okay. Jul 03 21:08:12 What's the best not-requiring-flashy-versions-on-Android way of checking whether a string is empty, by the way? Jul 03 21:08:53 Checking the length, I guess. Jul 03 21:08:56 Hmm Jul 03 21:08:56 . Jul 03 21:09:16 i believe theres textutils.isEmpty Jul 03 21:09:44 Okay. Jul 03 21:13:38 I've got to do a lot of parsing of very large strings of numbers seperated by a blank space. DDMS is showing that this line of code parsing may be responsible for some slowness to respond in my app after 20-30 minutes of interacting with a listview. The best I've been able to do is have 10~ threads parsing using string.split(). more slows it down badly. I've tried tokenizers, patterns, scanners, and i'm out of ideas. any Jul 03 21:15:03 use a single thread, and control the speed of the parsing strategically Jul 03 21:15:17 multithread as performance allows Jul 03 21:15:25 I have several different feeds coming in on different ports, that's not an option Jul 03 21:16:37 Should I return 'true' or 'super.onPrepareOptionsMenu' in onPrepareOptionsMenu? Jul 03 21:16:45 I do super Jul 03 21:16:52 I notice that onCreateOptionsMenu does 'true'. Jul 03 21:16:53 Okay. Jul 03 21:17:14 Would you do that in onCreateOptionsMenu, too? Just wondering. Jul 03 21:17:35 farkerhaiku whats the problem? is the parser not efficient? Jul 03 21:18:30 for example if a frag, extends another frag and both add items to the action bar, you'd want to it to propogate to all overrides of onCreateOptionsMenu Jul 03 21:18:44 if you only are one level deep with overrides returning true would do the trick just fine Jul 03 21:18:51 farkerhaiku dunno how complicated your parsing is; fwiw i use ragel and its been great for me Jul 03 21:19:07 dont create garbage :) Jul 03 21:19:52 Why do people return true in onCreateOptionsMenu? Just curious. Jul 03 21:20:07 Like, on the Android page thingamyjig. Jul 03 21:20:20 because the javadoc says to :-) Jul 03 21:21:39 Oh. Where does it say that? Jul 03 21:21:41 I can't see it here. Jul 03 21:23:33 The docs should tell you when to return true Jul 03 21:23:43 http://developer.android.com/reference/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu) Jul 03 21:24:11 In both cases, it says "You must return true for the menu to be displayed; if you return false it will not be shown". Jul 03 21:24:19 For both methods. Jul 03 21:24:55 I'm trying to get my Button to change background when it's clicked. Im using this code http://pastie.org/8107987. It works when I make the button an ImageButton, but not when ordinary Button. Can't I do this on an ordinary button? Jul 03 21:25:15 use a selector Jul 03 21:25:40 sry, didn't see the pastebin Jul 03 21:26:04 for a button use android:background Jul 03 21:26:05 hey nseidm1 Jul 03 21:26:11 hey man Jul 03 21:26:12 what's cookin Jul 03 21:26:37 not a lot Jul 03 21:26:48 we're delayed again Jul 03 21:26:55 shooting for the 15'th now Jul 03 21:29:01 nseidm1: sorry but I dont follow. How would android:background change the background on click? Jul 03 21:29:52 nseidm1: got it! Jul 03 21:29:57 nseidm1: thanks a bunch Jul 03 21:32:11 cheers Jul 03 21:32:32 Napalm: leaving the office now, catch ya laterzzzzzz man Jul 03 21:46:23 g00s, bruce eckel's tij books are good, but I don't know how well he'd translate to being a scala author Jul 03 22:05:48 I'm using an ArrayAdapter to manage a ListView. I've just realised that there is no way to remove an item at an index! Jul 03 22:06:02 ArrayAdapter.remove takes a T paramter. Jul 03 22:06:06 How can I get around this? Jul 03 22:06:14 parameter* Jul 03 22:06:30 um, remove(getItem(index))? Jul 03 22:07:12 What if there are multiple similar strings? Jul 03 22:07:53 then you make your own adapter. Jul 03 22:08:02 which you'll have to do sooner or later anyway. Jul 03 22:08:55 Why? Jul 03 22:09:04 I thought I could use an ArrayAdapter for all this. Jul 03 22:09:27 well you already hit the first limitation Jul 03 22:09:45 instead of hacking around it… making your own adapter that will have that functionality is rather simple. Jul 03 22:09:54 especially since sooner or later you'll need something more. Jul 03 22:13:02 arrayadapters cannot remove items Jul 03 22:13:11 you can remove all, or you can implement your own adapter Jul 03 22:13:53 How do I implement my own adapter? Jul 03 22:14:12 using a contentprovider, a cursorloader and a cursoradapter should eliminate any lag when opening an activity/fragment, right? The view shouldn't still wait for the data before opening or anything? Jul 03 22:16:04 is there perhaps any potential lag when the cursor is returned and the adapter loops through it to render all the views? Jul 03 22:16:13 Which class do I derive from to create a custom adapter here? Jul 03 22:17:35 TacticalJoke: just extend whichever adapter you feel will require the least amount of extra implementation Jul 03 22:19:33 I wonder how serious this is.... http://bluebox.com/corporate-blog/bluebox-uncovers-android-master-key Jul 03 22:20:37 "security is hard" Jul 03 22:21:34 So I just subclass BaseAdapter and use an ArrayList, basically. Jul 03 22:21:48 Ologn, not serious until claims are substantiated Jul 03 22:22:16 How do I actually add to the ListView, though, if I do the above? Jul 03 22:22:36 TacticalJoke, you add to the adapter and notifyDataSetChanged Jul 03 22:22:45 you never add anything to the listview directly Jul 03 22:22:49 Okay. Jul 03 22:23:04 How do I add to the adapter if I'm creating a custom adapter from BaseAdapter? Jul 03 22:23:09 I don't see an adding method in BaseAdapter. Jul 03 22:24:02 you don't add in the adapter Jul 03 22:24:07 the adapter is precisely that, an adapter Jul 03 22:24:11 it adapts your data, to the view Jul 03 22:24:37 you modify your underlying data, and use the methods available on the adapter (by implementing them) to give that information to the listview to render Jul 03 22:24:55 Okay. I just don't understand how I give any info to the ListView. Jul 03 22:25:20 go use the apidemo examples and play with them some more Jul 03 22:25:26 and any other samples that have a listview in the sdk Jul 03 22:41:32 man Jul 03 22:41:45 I just discovered TextView.setIncludeFontPadding(boolean) Jul 03 22:44:43 Why aren't the Android SDK samples available online? Is this 1998? :p Jul 03 22:49:56 anyone know what the default line spacing is between lines in a TextView? Jul 03 22:49:58 (in dp?) Jul 03 22:50:14 I'm trying to figure out what lineSpacingMultiplier or lineSpacingExtra to use to get it to 10dp Jul 03 22:50:20 TacticalJoke, because having them online is pointless Jul 03 22:50:23 TacticalJoke, and it comes with the sdk Jul 03 22:50:44 I'd way rather google. Jul 03 22:50:46 Personally. Jul 03 22:51:15 it is somewhat odd that they're not at least available on github, yeah Jul 03 23:24:18 Hey folks...I'm new to Android stuff (I've only been programming with it for about 2 months now) however I'm an old programmer..I'm having issues grasping the whole HTTP connections. I'm in need of accessing a PHP file on a server which will process a login and return a "key" that can be used to update a database...are there good tutorial type examples of doing something such as this? Jul 03 23:25:20 http://developer.android.com/training/id-auth/identify.html Jul 03 23:29:14 Interesting link TheDruidsKeeper...I'll read up on that more...it seems this is going to be one tricky part of the application....here is the link to the API that I'll be using....https://www.mediawiki.org/wiki/API:Login Jul 03 23:46:46 I'm having a problem building with the ndk, I get this error " *** target pattern contains no `%'. Stop." Jul 03 23:47:18 on windows Jul 03 23:47:48 from what I could find online it's due to having global paths with the ":" character on them Jul 03 23:47:55 is there a way to get around this? Jul 03 23:57:11 from what you could find, fix it according to that :p Jul 03 23:58:04 pfn, I tried using local paths but that was giving me the same error Jul 03 23:58:25 now I tried adding quotes around the file names and that seems to work Jul 04 00:58:22 What are the reasons to use sw- qualifiers over h- and w- qualifiers? Jul 04 00:59:30 * icetooth curses hindsight Jul 04 01:01:55 RyanM you mean these guys? http://developer.android.com/guide/topics/resources/providing-resources.html Jul 04 01:05:27 I realize what they do - I'm asking why I should restrict by the smallest width when I could restrict by whichever (width or height) actually matters Jul 04 01:05:54 so that when the device is rotated into a wider or taller configuration, I can take advantage of that. Jul 04 01:06:38 The only reason I can think of is if you want to show the same layout in both configurations. Jul 04 01:06:43 RyanM, because they're easier to use to determine class-of device Jul 04 01:06:54 e.g. 10" vs 7" vs 5" tablet Jul 04 01:07:43 Anyone know the difference between AdapterContextMenuInfo.position and AdapterContextMenuInfo.id? Jul 04 01:07:55 They seem to be the same. The docs don't help, and Google knows little or nothing here. Jul 04 01:09:41 It looks like perhaps there are ways to get full control over an action bar's styling Jul 04 01:09:51 not sure about styling the "..." icon that it inserts Jul 04 01:11:19 but more importantly, I'm reading that modifying the action bar style via the API won't be available for older devices because the ActionBar class isn't available Jul 04 01:11:36 however, you can still use the activity's layout to create an action bar Jul 04 01:12:42 maybe just use action bar sherklock? Jul 04 01:15:30 I don't get why ArrayAdapter doesn't allow removing items at a position. Jul 04 01:15:44 If I instantiate it with an ArrayList, I can remove items at a position. Jul 04 01:15:50 But it's so arbitrary. Jul 04 01:16:01 Why bother with the ArrayList for that one method? Jul 04 01:16:35 hello guys, how can I disable please an infinitely deep XML please? "com.sun.istack.internal.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML" Jul 04 01:18:07 detect a cycle in your object graph before trying to serialize it Jul 04 01:18:18 and that's a question for ##java, yes? Jul 04 01:23:09 didn't you ask this yesterday Jul 04 01:24:18 pfn, I don't know Jul 04 01:24:51 bankai_ I didn't yet find a solution to this problem Jul 04 01:25:16 you disable it by fixing your object graph Jul 04 01:25:22 or by detecting cycles in your xml serializer Jul 04 01:26:34 pfn, look please at the last post, there you'll find the classes into which the error occurs http://www.siteduzero.com/forum/sujet/hibernate-graph-cycle-xml?page=1#message-84492246 Jul 04 01:27:50 why are you asking a hibernate question here Jul 04 01:29:13 pfn, yes :/ Jul 04 01:30:47 Simple question, but why am I getting an error here? http://pastebin.com/xXGSWkzK Jul 04 01:31:10 Why can't I pass that field to the superclass? Jul 04 01:33:46 Anyone? Jul 04 01:35:00 because superconstructors must always be first thing called Jul 04 01:35:05 pfn, ##java couldn't find a solution to this yesterday Jul 04 01:35:07 your instance field will always be initialized after that call Jul 04 01:35:20 jayn, so? go back there and keep at it, because #android isn't #java Jul 04 01:35:33 TacticalJoke, logically, it's fail and will never work Jul 04 01:36:24 pfn: Am I gonna have to use encapsulation instead? Jul 04 01:36:53 pfn, okay sorry then. And thank you very much :D Jul 04 01:37:57 TacticalJoke, don't know what you're trying to accomplish, so can't answer that--a better approach is to not bother extending arrayadapter Jul 04 01:37:59 it's a trap Jul 04 01:38:11 arrayadapter is just a naive implementation for data that mostly does not change Jul 04 01:38:15 pfn: I just wan an ArrayAdapter that has removeAt(). Jul 04 01:38:50 easiest solution, copy/paste the source of arrayadapter, and add removeAt Jul 04 02:08:57 why not just extend it instead? Jul 04 02:15:36 pragma-: Was that to me? Jul 04 02:15:47 On a side note, I used encapsulation., Jul 04 02:15:50 .* Jul 04 02:16:02 just extend BaseAdapter :| Jul 04 02:16:10 That's way more complex. Jul 04 02:16:13 Check out my solution! haha Jul 04 02:16:16 You might love it. Jul 04 02:16:17 One sec... Jul 04 02:16:48 http://pastebin.com/Wdh6y1xB Jul 04 02:16:49 "Mastercard and Visa Start Banning VPN Providers" … getting crazy Jul 04 02:17:05 Damn, the word-wrap is harsh on Pastebin! Jul 04 02:17:27 TacticalJoke um Jul 04 02:17:49 I think it's very neat. Jul 04 02:18:02 What do you think? haha Jul 04 02:18:32 The calling code is remarkably simple. Jul 04 02:20:36 I would actually be interested in feedback, since I'm new to Android and all. Jul 04 02:20:40 Android programming* Jul 04 02:48:58 what's the benefit of using public static final ints instead of enums? **** ENDING LOGGING AT Thu Jul 04 02:59:58 2013