**** BEGIN LOGGING AT Mon Mar 23 02:59:59 2015 Mar 23 03:00:12 41.4% according to AS Mar 23 03:03:01 As I said anyway, I don't know a lot, but Im not convinced by Kotlin, although some of the syntactic sugar is nice, (I like the ...println("Hello, ${name}!") example ) its not a reason I would change. Mar 23 03:03:21 And on that uninformed bombshell, I am off to bed, I bid thee all farewell! Mar 23 03:03:35 learn a good language, makes your java better Mar 23 03:03:46 I did, I know HTML Mar 23 03:03:54 (a joke for you, pfn) :D Mar 23 03:03:57 html doesn't make your java better Mar 23 03:03:58 Anthaas: But it seems that people who *do* know a lot *are* convinced. We shouldn't ignore that. :) Mar 23 03:04:18 Well, apparently they aren't, but think it could be good. Mar 23 03:04:24 But of course. Mar 23 03:04:48 I'm seeing people who are so convinced that they're seriously planning to switch to Kotlin. (Note that it's pre-1.0 so far.) Mar 23 03:04:49 Although, I would ask what language you might define as good, pfn? Mar 23 03:04:54 Kotlin is not an accepted answer. Mar 23 03:05:00 haskell Mar 23 03:05:05 ocaml Mar 23 03:05:07 So, go functional then? Mar 23 03:05:09 etc Mar 23 03:05:22 yes Mar 23 03:05:26 at this point Mar 23 03:05:27 brainfuck. Mar 23 03:05:29 But I have no use for a functional language. Mar 23 03:05:32 At the moment anyway Mar 23 03:05:42 I would even know when one should be used if I am honest. Mar 23 03:05:52 Its not a paradigm I was taught at University. Mar 23 03:06:08 haskell is usable for daily programming tasks Mar 23 03:06:16 seems one language design trend these days is to go functional + OO, something like scala / ceylon Mar 23 03:06:20 As such, I havent come across a time when I recognise I could/should use one Mar 23 03:06:20 not useful for android, unfortunately Mar 23 03:06:58 if i was doing windows phone i'd pick up f# Mar 23 03:07:12 I never got around to using F#, but I srsly wanted to. Mar 23 03:07:17 It's said to be well worth it. Mar 23 03:07:18 I'd love an example of when a functional language can and has been used for something daily? Mar 23 03:07:22 g00s: I'm not seeing a lot of functional concept adoption in mainstream languages beyond closures (and some limited nod to immutability) Mar 23 03:07:30 Just so I can understand and maybe play with a little bit. Mar 23 03:07:48 I was taught procedural, OO, and declarative paradigms Mar 23 03:08:11 So, things like C, Java, C++, Prolog, PHP were taught. Mar 23 03:08:13 Anthaas: Spend some time sniffing around, the value proposition from Kotlin is really hard to resist Mar 23 03:08:25 CedricBeust_, mainstream languages? ruby, python, perl etc all borrow functional concepts, albeit poorly Mar 23 03:09:11 pfn: My point, what do these languages adopt from FP exactly beyond closures? Mar 23 03:09:21 There's no static typing, no higher kinds Mar 23 03:09:26 what do you consider mainstream besides java? c# borrows many functional concepts, linq is entirely functional Mar 23 03:09:27 no immutability enforcement Mar 23 03:09:37 CedricBeust_: Yeah, I guess I should. I generally come on here to try and absorb some things you guys all say, learn better ways of doing things, looking at things, and appraoching things, and to understand new ideas, but sometimes I feel so out of place, uninformed, and like I will never know enough its unreal haha Mar 23 03:10:09 CedricBeust_, functional doesn't demand strictly static typing.. Mar 23 03:10:33 pfn: Yes, Linq is interesting. Erik was already bashing my head with it ten years ago when it was still in its early shape. It grew on me. Mar 23 03:10:39 Anthaas: thats better than me, i just come here to ask shitty questions Mar 23 03:10:50 DadFoundMy: Made me laugh haha thanks Mar 23 03:11:04 Asking shitty questions is how some of us learn though Mar 23 03:11:15 pfn: Technically, no. Practically... go say that to the FP extremists and see what happens :) Mar 23 03:11:19 I used to ask shitty questions in school etc to learn, and my teacher restricted me to 3 questions per class. Mar 23 03:11:49 (it's one of the few things where I'll agree with these FP purists by the way, I see less and less relevance in dynamic typing these days) Mar 23 03:12:01 Anthaas: Why only three questions? Mar 23 03:12:11 * pfn has always hated dynamic typing Mar 23 03:12:11 (That should've been your fourth. :D) Mar 23 03:12:25 To stop me asking questions to understand more because they often didnt know the answer Mar 23 03:12:30 other than keeping maintenance programmers employed Mar 23 03:12:55 Anthaas: I always try to ask some hard questions in my cs class to mess with my teacher since its a pretty low level class i dont think i should be in Mar 23 03:13:18 From what I've seen, it's not very common for a teacher to be really good at their subject. Mar 23 03:13:26 its a high school ap cs class and half the kids dont know how to instaniate a class 2 years into learning java Mar 23 03:13:36 Its not that I was trying to be a dick or whatever, I was just inquisitive, and figured a teacher would be the best person to ask. My questions were always on topic and non-disruptive. Mar 23 03:13:49 CedricBeust_, anyway, purity and laziness in fp is hard to use in general Mar 23 03:13:53 Anthaas: To me, a shitty question is a question that the person could have found an answer for with a Google search. Anything else is a fair question. Mar 23 03:14:05 pfn: Totally agree Mar 23 03:14:21 CedricBeust_: Where would you place a question where the answers on Google were not understood? Mar 23 03:14:23 CedricBeust_, unfortunately that's the vast majority of questions here :-( Mar 23 03:14:26 CedricBeust_: in a cs class sometimes those arent even shitty questions if the teacher can explain how and why Mar 23 03:15:05 Anthaas: Then it's fair to point out to a response you got and ask for clarification Mar 23 03:15:17 Just show you did some research before asking and I'll be happy to help you further Mar 23 03:15:42 These days I find myself asking few code questions and more design questions. Yesterday I asked people to explain Delegates to me, because after a silly amount of Googling I didnt understand. It often seems a lot of answers aren't people trying to explain their way, but copy and pasting something someone else said. Mar 23 03:15:57 CedricBeust_: Thats a fair stance. Mar 23 03:16:02 im looking at some fo the comments in my code. I have a setListeners() method and my comment is: // sets all listeners Mar 23 03:16:13 i should be better at this... Mar 23 03:16:18 delete that comment Mar 23 03:16:30 JakeWharton: i did Mar 23 03:16:38 realized it pretty self documenting Mar 23 03:16:38 One thing worse than no comment is a meaningless comment Mar 23 03:16:58 Your code explains how, your comment explains why. Mar 23 03:17:07 i saw a post yesterday saying comments should expalin why you do things, not how Mar 23 03:17:12 CedricBeust_: goddamnit you beat me Mar 23 03:17:18 I get that a lot. Mar 23 03:17:21 I was always told with comments as well, the comment should explain what the method SHOULD do, not what the code DOES do. Mar 23 03:17:23 :D Mar 23 03:17:25 unless perl, comments explain what O.o Mar 23 03:17:38 now im trying to change all my commenting to use the principle Mar 23 03:17:41 I've found that even "why" comments can be replaced with better code. Sometimes, the presence of a "why" comment is a sign that the class design is terrible. Mar 23 03:17:51 Though not always, of course. Mar 23 03:17:54 Don't say "Calculate the inverse square root", say "Alternate implementation for inverse square root because the system function fails with NaN for certain values" Mar 23 03:18:26 DadFoundMy: IMO, you should be trying *not* to comment. Mar 23 03:18:27 TacticalJoke: I've just realised Ive had this (https://www.youtube.com/watch?v=zApP_q1G2WI) playing - Im at the end now - and have really enjoyed it. Mar 23 03:18:31 If I review your code, I will beat you on the head if I see the first comment and I'll give you thumbs up with the second comment Mar 23 03:18:33 And commenting only when you simply can't express it in code. Mar 23 03:19:01 "I understand what this code does but why is it there?" Mar 23 03:19:08 Anthaas: Nice. :) Mar 23 03:19:25 TacticalJoke: well in my opinion its better to have too many comments than too little Mar 23 03:19:38 Too many could easily confuse the reader Mar 23 03:19:47 so can too little Mar 23 03:19:48 I find with most things you should be as clear and concise as possible. Mar 23 03:19:50 Comments are clutter, and they get out of date really quickly. Mar 23 03:19:51 They are a pain. Mar 23 03:20:06 Yes "too many" is not the answer either Mar 23 03:20:58 Beginners comment way, way too much. I think we should be teaching beginners "Rarely comment your code". Mar 23 03:21:03 They use comments as a crutch. Mar 23 03:21:25 how else are you supposed to hold up the opening brace? Mar 23 03:21:35 Seems like it should be more of a WHY comment rather than HOW comment Mar 23 03:21:35 Or follow the saying "If it was hard to write, it should be hard to read" Mar 23 03:21:42 I think solving the why would fix the how Mar 23 03:21:57 Anthaas: Yeah, but then they'd start inventing reasons to use "Why" comments. :D Mar 23 03:22:06 Invalid reasons. Mar 23 03:22:30 i cant get over how awful android studio's error handling is :/ Mar 23 03:22:44 ive been using it for a few weeks and everytime it pisses me off Mar 23 03:22:55 everything else about it is pretty great Mar 23 03:23:04 what do you mean error handling? Mar 23 03:23:10 like, when an error happens in the IDE itself? Mar 23 03:23:26 no like when you have a compile error Mar 23 03:23:29 or even warnings Mar 23 03:23:41 * JesusFreke has never had a problem with it Mar 23 03:23:52 eclipse well show a 'x' on the line, as doesnt Mar 23 03:24:15 it shows a red squiggly, and a red bar on the right, iirc Mar 23 03:24:17 You also have to compile or open the file in Android Studio. Saving was sufficient in Eclipse. Mar 23 03:24:30 DadFoundMy: I'm with you, I find with stupid things on AS on a daily basis, missing Eclipse so much Mar 23 03:24:35 I fight* Mar 23 03:24:41 Yeah, this is one place Eclipse was just better. Mar 23 03:24:54 JesusFreke: yeah it shows on the right in context of the whole program which kinda sucks Mar 23 03:24:57 Gradle is nice, though. Mar 23 03:25:09 AS is so bad at telling what it's doing on a general basis Mar 23 03:25:09 s/program/file Mar 23 03:25:12 Eclipse also had a neat "Error Messages" window. Mar 23 03:25:32 TacticalJoke: i miss the saving to show errors sooooo badly Mar 23 03:25:38 Eclipse's display of TODO comments and its general Find results were also better. Mar 23 03:25:38 Sometimes there are minuscule indicators somewhere on the status bar, but often not, you just know "Oh ok just need to wait 20 seconds and the app will start on my device. I'm sure" Mar 23 03:25:46 In fact, Eclipse's tool windows are way better! Mar 23 03:25:54 Consistent close buttons (rather than IntelliJ's all-over-the-place ones). Mar 23 03:26:13 I want an Errors view that gets updated as I type and which applies to ALL source files, not just the ones I have currently open in AS Mar 23 03:26:18 TacticalJoke: i use a vim plugin, and would have eclipse to only show errors on save. :w :w :w :w for days Mar 23 03:26:21 The shortcuts are the main one for me Mar 23 03:26:23 And *some* IntelliJ windows will close with Ctrl+W, while others won't. Mar 23 03:26:36 Eclipse, most shortcuts require only your left hand Mar 23 03:26:40 The "Find References" one, for example, won't. (I mean the "Close Active Tab" shortcut; I forget the default.) Mar 23 03:26:44 AS, you need both hands and a foot. Mar 23 03:26:48 if only eclipse could use gradle Mar 23 03:26:52 Yeah, I heavily edited my key mapping. Mar 23 03:26:59 I will be shortly. Mar 23 03:27:02 * DadFoundMy realizes he has no idea if that is possible at all Mar 23 03:27:07 A foot :P Mar 23 03:27:17 Anthaas: really? source? Mar 23 03:27:31 Im pretty sure I've come up with a new yoga position before just trying to use an AS shortcut. Mar 23 03:27:38 I also hate how IntelliJ shows so many dialogs. "Process with refactoring?" and stuff. Mar 23 03:27:42 i find as also handles emulators and running the app better Mar 23 03:27:49 DadFoundMy: Source for what? Mar 23 03:27:53 TacticalJoke: i hate that godamn refactor dialog Mar 23 03:28:03 Anthaas: gradle on eciplse, unless you meant something else Mar 23 03:28:07 Even after clicking OK I sometimes still have to choose between Refactor and Preview. Mar 23 03:28:15 Like, how many times do I have to tell it to refactor that code? :D Mar 23 03:28:15 TacticalJoke: 100% agree, the anal retention is so annoying. Just refactor already! Mar 23 03:28:20 DadFoundMy: Ahh was talking about something else Mar 23 03:28:30 TacticalJoke: and they dont auto focus "ok" so you have to either tab down or use your mouse Mar 23 03:29:01 God, yeah. Mar 23 03:29:11 now im mad because my eclipse set up was soooo perfect :/ Mar 23 03:29:38 I think I prefer Android Studio on the whole. Gradle is great, the debugger is better, the memory monitor is nice. Mar 23 03:29:45 I like that with Eclipse my projects didnt take 2 score and 10 days to build too. Mar 23 03:29:53 gradle is so worth it tho, for example i just found a library i want to test out for like 5 minutes. In eclipse that wouldnt really be possible Mar 23 03:30:17 Importing "libraries with resources" was so horrible in Eclipse. Mar 23 03:30:20 And that workspace view... ugh. Mar 23 03:30:21 Anthaas: i also find that eclipse does a better job of telling when projects are done building Mar 23 03:30:43 And the fact that Eclipse felt like a student's hobby project. Mar 23 03:30:51 So much bloody synchronising to be done with AS too! Mar 23 03:30:58 Gradle can be added to Eclipse Mar 23 03:31:10 importing in general is sooo much better in AS. i could never seem to import eclipse projects without hours of troubleshooting Mar 23 03:31:11 I actually liked the workspace view Mar 23 03:31:47 i have mixed feelings about the workspace. sometimes i found files would open in the wrong sections Mar 23 03:31:48 I remember it being tedious to just view a single project. I had to fiddle with stuff or else I'd see everything I'd ever created. Mar 23 03:31:49 Workspaces are so misunderstood. How hard is it to realize you want a different window configuration for editing than for debugging? Mar 23 03:32:13 Besides, you don't like that? Just use one workspace and you're done. Basically, Eclipse's window management model subsumes IDEA's Mar 23 03:32:17 all of this AS hate is distracting me from my code! Mar 23 03:32:43 Different window perspectives was good with Eclipse. Mar 23 03:33:07 How did you guys just view your current project? Did you create custom workspace perspectives? Mar 23 03:34:21 One minor thing that drives me crazy with AS is how it messes with my Alt+Tab order seemingly at random. Mar 23 03:34:45 I'll Alt+Tab to Google Chrome from IRC, Alt+Tab, Alt+Tab to Google Chrome again, Alt+Tab again and -- bam -- I'm randomly at Android Studio. Mar 23 03:34:49 Drives me insane sometimes. :D Mar 23 03:35:07 And I can't Alt+Tab away sometimes when it happens. Mar 23 03:35:10 also auto code formatting and imports are wayyyy better in eclipse Mar 23 03:35:41 wait, you kept everything in one workspace? Mar 23 03:35:49 i always have one workspace per app, usually Mar 23 03:36:02 in eclipse ctrl+shift+o will import any class needed. AS you need to go to each one Mar 23 03:36:04 I wish Alt+Enter would work like Ctrl+!. Mar 23 03:36:05 1 * Mar 23 03:36:16 Alt+Enter is so pedantic: gotta be on the identifier in question or whatever. Mar 23 03:36:33 yeah alt+enter is obnoxious Mar 23 03:36:57 its a lot of the little things that piss me off with AS, and a lot of the macro things that piss me off with eclipse Mar 23 03:37:04 neither get everything right Mar 23 03:37:23 Yeah, AS is death by a thousand cuts. Eclipse is disembowelment. Mar 23 03:37:46 I'd rather it was over and done with quickly. Mar 23 03:37:46 DadFoundMy: you should enable "import unambiguous" and "optimize imports on-the-fly" and then use the keyboard for "go to next error" and alt+enter for quick actions to import Mar 23 03:38:31 JakeWharton: that sounds interesting, ill check it out Mar 23 03:38:54 Probably what annoys me most about AS is the little delays. I have intellisense set to auto-appear, but there's a delay, so I have to slow down my typing. Mar 23 03:38:59 Another small thing - just created a LoginActivity through the Wizard (I know, don't use the wizard - it was my first class!) and it already has problems with the Sign in wiht G+ button... Mar 23 03:39:10 Another example is the Alt+Enter thing: if you time it right, you don't have to move the caret. But it's another little delay. Mar 23 03:39:24 It feels like I'm constantly waiting, in tiny increments, for it to catch up. Mar 23 03:39:46 i forgot about my bigest gripe with AS! Mar 23 03:39:54 fucking parameters Mar 23 03:39:56 Oh, gawd, I gave up creating activities with the wizard (in both IDEs). Mar 23 03:40:03 They destroy my strings.xml and other files. Mar 23 03:40:17 All my whitespace disappears. Mar 23 03:40:19 have more than one parameter to enter? Oh we're going block everything you type! Mar 23 03:40:25 yeah, i basically say "new file" and never let any wizard kick in for anything Mar 23 03:40:59 what do you mean dont use the wizard? i just make a new java class, is that not right? Mar 23 03:41:04 One thing I loved in Eclipse was its auto-suggestion of parameters names (with the ability to Tab through them). Mar 23 03:41:04 through the wizard i do that Mar 23 03:41:13 TacticalJoke: yup that was great Mar 23 03:41:21 Like "someMethodWithLoadsOfParameters(" and then you'd get them all, and the names were often good. Mar 23 03:41:22 also recomending methods in eclipse Mar 23 03:41:30 TacticalJoke yeah i still miss that Mar 23 03:41:45 sometimes AS doesnt even show any paramenters Mar 23 03:41:49 JakeWharton: It still feels weird to me the cursor needs to be precisely on the error before I can alt-enter it Mar 23 03:41:52 Oh I never use the wizard, but for crying out loud, if AS can't even add the G+ button, how are the rest of us meant to! haha Mar 23 03:41:52 Yeah, I have to Ctrl+P a lot. Mar 23 03:42:04 CedricBeust: yeah agreed Mar 23 03:42:08 TacticalJoke: whats ctrl p? Mar 23 03:42:13 Show parameters. Mar 23 03:42:23 you just saved me so much time Mar 23 03:42:44 In past IDEs, it's always been Ctrl+Space, but IntelliJ is different (which I kinda like). Mar 23 03:42:47 Now ctrl-p is one of the few things where IDEA is superior to Eclipse Mar 23 03:42:49 Ctrl+Space is so ambiguous. Mar 23 03:42:54 Yeah. Mar 23 03:43:07 I hated it at first but now I see its utility. Mar 23 03:43:12 i liked ctrl+space, it seemed natural as i typed Mar 23 03:43:22 I used ctrl-p a lot, and on top of that, IDEA is very good at suggesting the correct types, which are especially helpful when you use kotlin or Java8 + closures Mar 23 03:43:27 and ctrl+space still recomended methods i beleive in AS Mar 23 03:43:48 One thing I dislike is that you can use Ctrl+Shift+Space instead of Ctrl+Space and yet, after months of using Android Studio, I can't easily figure out the difference. Mar 23 03:43:54 Sometimes I know; sometimes I don't. Mar 23 03:44:03 Seriously? From a quick Google the "Sign in with Google+" button will only display with play-services 4.4.52, not the version in AS by default which is 7.0.0?? Mar 23 03:44:31 ctrl+shift+f in eclipse is wayyyy better than ctrl+alt+l in as Mar 23 03:44:32 Yeah, I think IntelliJ's intellisense is better than Eclipse's. It seems a bit smarter. Mar 23 03:45:00 I also like alt shift s in Eclipse Mar 23 03:45:09 Anthaas: whats that do? Mar 23 03:45:26 Open up a window showing override/implement, add getters/setters, etc. Mar 23 03:45:39 oh thats neat Mar 23 03:45:49 Fuck it Mar 23 03:45:51 in general i think i find myself using the mouse way more in AS Mar 23 03:45:52 Lets all go back to Eclipse. Mar 23 03:46:05 * Anthaas gets pitchforks and torches Mar 23 03:46:18 What's frustrating is that it feels like IntelliJ only needs to fix a few simple things to be brilliant. Mar 23 03:46:19 Anthaas: I believe Ctrl-n does that in AS (part of the whole "generate code for me") Mar 23 03:46:20 Anthaas: i think i would just get pissed off without gradle Mar 23 03:46:29 Such as the tool windows. Give us consistently placed close buttons already! Mar 23 03:46:31 TacticalJoke: right? they all seem so simple Mar 23 03:46:45 And consistent shortcuts for closing (not just hiding) a tool window. Mar 23 03:47:21 how hard can it be to show errors next to line, tab through parameters. shows errors on save may be a little more difficult i guess Mar 23 03:47:36 Also, some parts of IntelliJ are just weird. Look at the Commander, for example. Why is that enabled by default? I bet nobody in here uses it. Mar 23 03:47:48 what is it? Mar 23 03:47:49 It's like part of their UI is designed at random. Mar 23 03:48:02 It helps to copy files from one directory to another. Mar 23 03:48:13 yeah im looking at it now, looks dumb Mar 23 03:48:14 Haha Mar 23 03:48:15 Well, supposedly. It just looks weird to me. Mar 23 03:48:20 As you mentioned it I literally opened it. Mar 23 03:48:23 Thinking "wtf is this?" Mar 23 03:48:25 lol Mar 23 03:48:40 I disabled a lot of the plugins. Mar 23 03:48:43 That was #1 to go. Mar 23 03:48:49 CVS Integration? Goodbye. lol Mar 23 03:48:53 Oh how Mar 23 03:48:56 Teach me the ways Mar 23 03:48:59 yeah as has a lot of plugins by default i never touch Mar 23 03:49:10 Hahah this IDE Mar 23 03:49:11 Ctrl+Alt+S --> "plugins" Mar 23 03:49:20 Ive been talking on here on a project Ive just created. Mar 23 03:49:22 android plugin? lol goodbye to you too ... Mar 23 03:49:22 Nothing wrong with it Mar 23 03:49:23 oops ! Mar 23 03:49:29 look back, and theres an error. Mar 23 03:49:33 I haven't even done anything! Mar 23 03:49:44 g00s: Lol. I tried that with Maven. ;| Mar 23 03:49:59 TacticalJoke: ...i was about to disable maven Mar 23 03:50:03 Anthaas: One of the plugins detects you bad-mouthing IntelliJ online. Mar 23 03:50:04 ...show i not? Mar 23 03:50:07 *should Mar 23 03:51:13 DadFoundMy: It's needed for the build system. Mar 23 03:51:14 I think. Mar 23 03:51:58 TacticalJoke: Thanks for the tip, wonder why I didn't do that earlier :) Mar 23 03:52:04 TacticalJoke: i wont touch it then. it makes sense then that there is a tab by default Mar 23 03:52:18 :) Mar 23 03:52:25 one small thing about as that is nice is the bar that apears at 8 characters Mar 23 03:52:28 *80 Mar 23 03:52:42 Yeah, the "visual indent guide". It's neat. Mar 23 03:53:00 Unimformed question Mar 23 03:53:03 Why is that good? Mar 23 03:53:04 Wait, "vertical indent guide". Mar 23 03:53:09 thats nice too but i mean the one on the right Mar 23 03:53:17 the one that tells you when code is too long Mar 23 03:53:22 Ooh. Haven't seen that. Mar 23 03:53:39 really? mines enabled by default Mar 23 03:53:40 Oh I get that, I guess its nice to have a guide though. Mar 23 03:53:47 I must've insta-disabled it. Mar 23 03:53:50 80 is way too small, IMO. Mar 23 03:53:59 (On a side note.) Mar 23 03:54:05 idk if its 80, but thats always been the standard i think of Mar 23 03:54:19 Maybe =it's 120 or something on IntelliJ. I seem to remember that. Mar 23 03:54:31 seems to be 100 Mar 23 03:54:34 now that i look Mar 23 03:54:49 yeah its 100 Mar 23 03:55:28 i think i might set it lower simply due to the fact that stackoverflow's line limit is less than 100 Mar 23 03:55:50 Right, I was distracted. I was off earlier. I didnt go. Mar 23 03:55:52 See ya all! Mar 23 03:55:59 seeya Mar 23 03:56:08 See ya. Mar 23 03:57:08 The new unit testing is really nice. I like that we can easily mock android.jar now. Mar 23 03:57:18 Or just have it return default values, etc. Mar 23 03:57:27 i havent tried any testing, i really should Mar 23 03:58:25 For me, possibly the two most important programming tools (other than required ones such as compilers) are revision-control systems and unit-testing frameworks. Mar 23 03:59:02 well i started using revision control last week so testing is naturally the next step! Mar 23 03:59:04 I guess I should add IDEs and stuff. Mar 23 03:59:11 Are you using Git? Mar 23 03:59:16 yeah now i am Mar 23 03:59:38 Yeah, distributed ones such as Git and Mercurial are just awesome. So much better than the old days of fake-branching. Mar 23 03:59:42 after spending several hours fixing my projecct when i wasnt using it Mar 23 04:00:00 what was it like before lord torvalds saved us? Mar 23 04:00:10 how did big companies colaborate/ Mar 23 04:00:11 ? Mar 23 04:00:20 TacticalJoke: and by unit testing frameworks, you mean TestNG of course, right? Mar 23 04:00:24 Subversion wasn't absolutely horrible, but we didn't have real branching or real merging. Mar 23 04:00:50 CedricBeust: To be honest, I haven't used TestNG yet! I am stuck on JUnit for some reason. But I do think that TestNG is better. :) Mar 23 04:02:33 DadFoundMy: Collaboration was definitely possible, but there was only one repository. This made things way less flexbile (e.g., everyone had to have commit access, all changes were potentially inflicted upon everyone, etc.). Mar 23 04:03:23 Also, branching was fake. On a distributed system, if one branch changes a file and another branch renames it, the system knows exactly what happened. With something like Subversion, it doesn't have a clue what went on. You then have more manual merging (and harder-to-review changesets). Mar 23 04:03:24 TacticalJoke: so after an employee finished work would he just commit to a master branch type thing Mar 23 04:04:43 DadFoundMy: I guess (I'm trying to remember) he'd commit to some "branch" (which was actually a directory on the server), the work later being merged (and merges were often horrible because of the fake branching). Mar 23 04:05:03 And of course no rebasing or anything like it. Mar 23 04:06:21 DadFoundMy: Note that, for some of us, Matt Mackall, not Linus Torvalds, saved us. :D Mar 23 04:10:24 fuck im really tired but i want to code a little tonight :/ Mar 23 04:10:40 i cant do this shit tired, im off for tonight seeya Mar 23 04:11:06 Later. Mar 23 04:22:04 Leeds wow, HTC CEO Peter Chou steps down Mar 23 04:23:06 looks like he'll keep doing product development though Mar 23 04:26:29 this is interesting http://phandroid.com/2015/03/20/tesla-android-wear-app/ Mar 23 04:26:41 Google approached Tesla to write the app Mar 23 04:26:50 Tesla guys like dthe platform a lot ... Mar 23 04:27:10 but in the criticism section, one thing i thought interesting was "Thin documentation — not a knock on the platform itself, but certainly something that can mar the development experience." Mar 23 04:27:33 what is it with google and documentation, they must realize they are fucking themselves over - here is one example of that Mar 23 04:30:07 what's the easiest way to handle a Button onClick event without convoluted code? Mar 23 04:30:18 g00s: from everything I've seen, people seem to think it's a good thing - he's better in a product position, Cher Wang is going to be better at running the company Mar 23 04:30:53 Hi Mar 23 04:31:03 stanford_drone_ lol what Mar 23 04:31:07 Anyone is taking a Android Course here? Mar 23 04:31:31 stanford_drone_ are you really from Stanford? Mar 23 04:31:35 g00s, can I double click somewhere on the button? Mar 23 04:31:45 AndroidNewb, yes I am. currently at stanford right now Mar 23 04:31:59 okay, Are you a student there? Mar 23 04:32:05 yes. undergrad Mar 23 04:32:19 I love Stanford Mar 23 04:32:29 Stanford loves you back <3 Mar 23 04:32:47 Thanks! I saw it on "The Intership" movie Mar 23 04:32:54 haha Mar 23 04:33:42 you love a place you've never been to coz of a movie? :/ Mar 23 04:34:29 bankai_: Yes! I saw it on youtube toohttps://www.youtube.com/watch?v=KkMDCCdjyW8 Mar 23 04:35:01 is just to hard and expensive to get in Mar 23 04:35:58 Stanford is pretty cool Mar 23 04:37:38 not as cool as RIT :D Mar 23 04:37:43 right capella ? Mar 23 04:38:25 RIT was fun :) Mar 23 04:38:47 but its cool, like literally freezing ass there :D Mar 23 04:39:02 My frat was PHT ... right next to the main Lunch room in the center quad Mar 23 04:39:07 er, PKT Mar 23 04:39:38 is it really cool to be in a Frat group? Mar 23 04:39:40 netween the quarter mile and >everything< Mar 23 04:40:03 We had a soda machine that dispensed beer cans Mar 23 04:40:14 i remember i lost my keys with one of those shark beer bottle openers on the quarter mile one winter ... in some snowstorm. i found it months later like may or june when the snowpack started melting. the shark was sticking his nose out of the snow :D Mar 23 04:40:22 for .25cent :) and of course, our own cafeteria and bar inside Mar 23 04:41:07 isn't it illegal for most US university students to drink? Mar 23 04:41:20 is that new or something ? Mar 23 04:41:22 :P Mar 23 04:41:25 not to my knowledge Mar 23 04:41:41 Leeds: as long as it's not public place, its safe Mar 23 04:41:46 given that most students are presumably under 21 Mar 23 04:42:00 drive at 12, drink at 21 hehehe love america Mar 23 04:42:02 Varies by State, NY was 18 Mar 23 04:42:17 bankai_: own your first assault rifle at 8 Mar 23 04:42:39 with your first bank account, right? ;) Mar 23 04:42:40 Gotta get your permit first but yah Mar 23 04:42:45 "the New York Legislature raised the drinking age from 19 to 21, effective December 1, 1985." Mar 23 04:42:50 capella: how old are you??? Mar 23 04:43:03 er, um... Mar 23 04:43:21 dang ... busted myself Mar 23 04:43:44 lol Mar 23 04:43:47 haha Mar 23 04:43:52 dont worry I was young too ;) Mar 23 04:43:57 can we talk about immigrants taking US tech jobs and what you think about it? Mar 23 04:44:09 move away from the keyboard and come out with your hands up Mar 23 04:44:11 against ... H1B should be cancelled Mar 23 04:44:18 capella why? Mar 23 04:44:21 AndroidNewb i watched that at BigCo for years, it was criminal Mar 23 04:44:43 H1B hire talented individuals that make google possible Mar 23 04:45:06 my parents started me drinking at, oh, 15 or so Mar 23 04:45:08 Microsoft and etc.. Mar 23 04:45:19 And you think there's no talent here? Mar 23 04:45:22 stanford_drone_: android:onClick in XML. Mar 23 04:45:29 i dont understand the incentive, but we had the following always happening: infosys/wipro would qute us a price, or give us a discount if they could have 'more people' on site. of course, these people had no idea what they were doing in anything - so it ammounted to training Mar 23 04:45:36 they reckoned it was a useful skill to be able to have a beer/wine or two with a meal, socially Mar 23 04:45:39 TacticalJoke, what function do I add for that? Mar 23 04:45:49 public void foo(View view) Mar 23 04:46:13 We gotta talk about immigration stuff guys Mar 23 04:46:13 ohh okay Mar 23 04:46:26 TacticalJoke, why do people give crappy solutions online? :( Mar 23 04:46:29 this is a perfect place to talk about it :) Mar 23 04:46:46 What did you google, stanford_drone_? Mar 23 04:46:56 button onClick Mar 23 04:47:39 Sometimes, SO has good answers. Other times, it has terrible answers with 77 upvotes and a checkmark. Mar 23 04:47:59 stanford_drone_: unfortunately to see the solution you usually have to study someone's mistake first, like on SO Mar 23 04:48:19 ./r/androiddev is pretty bad for terrible answers having many upvotes. Mar 23 04:48:25 It's hard to answer strangers questions with out understanding the entire issue context Mar 23 04:48:38 so people answer in generalities Mar 23 04:49:03 shmooz, yeah everyone was providing pretty bad solutions. TacticalJoke had a good one :) Mar 23 04:49:11 TacticalJoke i'm reading this http://www.reddit.com/r/androiddev/comments/2zw9jn/what_are_some_commonly_ignored_best_practices_in/ Mar 23 04:49:16 irc is better at back and forthinging Mar 23 04:49:21 Yeah, I was reading that earlier, g00s. :) Mar 23 04:49:21 i'm looking at #1 like ... really ? Mar 23 04:49:26 ing Mar 23 04:49:27 ing Mar 23 04:49:34 capella you ok ? Mar 23 04:49:37 I use that pattern but I hate the name "newInstance". Mar 23 04:49:43 repeatinging Mar 23 04:49:43 It's not a verb phrase and it sounds like reflection. Mar 23 04:49:52 :D Mar 23 04:50:06 is there anything better than OpenCV for computer vision on android ? Mar 23 04:50:56 That Mushroom guy -- I think he had a point. Mar 23 04:51:27 Everyone goes on about using strings.xml because of i18n, but holy sheesh is that not the epitome of YAGNI. Mar 23 04:51:30 So few apps are gonna need it. Mar 23 04:51:39 (I do use strings.xml, but I don't buy the typical explanation.) Mar 23 04:52:26 which is ? Mar 23 04:52:40 The typical explanation is "Use strings.xml so that you can translate your app into other languages". Mar 23 04:52:42 Well, that's part of it. Mar 23 04:52:46 How many apps actually do that, though? Mar 23 04:53:09 TacticalJoke, 93020 apps Mar 23 04:53:22 it's also just better organized if you are not hard coding your strings, for editing Mar 23 04:53:31 Yeah, I agree. Mar 23 04:53:57 I just hate when people repeat stuff they've heard when they don't even know whether they believe it themselves. Mar 23 04:55:38 I use strings.xml. What do you have for alternative ? Mar 23 04:56:41 I support using strings.xml. I just agree with that downvoted guy -- the explanation "You should do this so that you can translate your app" is the epitome of YAGNI. Mar 23 04:57:03 I've noticed a lot of apps have a string called 'Hello World' which the developer forgot to remove from the example they copied ;) Mar 23 05:01:29 they forgot to change it to "goodbye, cruel world!" Mar 23 05:06:26 hello, I am trying to upload some files to the emulated device I am running Mar 23 05:06:30 I am using android studio Mar 23 05:06:32 any advice? Mar 23 05:07:26 yes? Mar 23 05:07:28 No? Mar 23 05:07:49 ajoul: I'd use adb Mar 23 05:08:22 Leeds: you mean through the command line? Mar 23 05:08:29 of course Mar 23 05:08:42 ajoul: could you please wait for the answer and not spam ? Mar 23 05:08:46 thank you Mar 23 05:08:56 There used to be a utility with eclipse that had an interface Mar 23 05:09:06 with a file explorer Mar 23 05:10:01 just use adb push /sdcard/whereever_you_want_your_file Mar 23 05:10:59 gordon_: how do I explore the sd card? Mar 23 05:14:30 adb shell Mar 23 05:18:17 Can I run DDMS in the new android studio? Mar 23 05:27:04 Tools > Android > Android Device Monitor. Mar 23 05:43:43 Just got a 1 star review: "What is this app?" Mar 23 05:44:19 1* irc review: Well what is this app? Mar 23 05:44:43 i understand their confusion Mar 23 05:44:45 well it's in the app description Mar 23 05:44:59 it a readable language? Mar 23 05:45:13 yes, it a readable language. Mar 23 05:45:44 Haters gonna hate, aren't you able to respond to reviews, or no? Mar 23 05:46:10 Yeah I will respond to it Mar 23 05:47:22 Hates gonna hate; creators gonna create regardless. Mar 23 05:47:25 Haters* Mar 23 05:47:46 That should be your reply. Mar 23 05:47:54 haha Mar 23 05:48:27 JakeWharton so with the Kotlin Android Extensions + synthetic properties - would it be possible to extend this to preference keys? i hate duplicating the key constants in java and xml Mar 23 05:48:48 sure. there's nothing special about it Mar 23 05:50:49 would you guys say that developer.android.com is the best resource for learning android development? the reason I'm asking is that a few years ago when i attempted to use that website, it was rather painful, due to gaps in "tutorials," outdated information, etc. Mar 23 05:51:01 yes Mar 23 05:51:04 wonder if that has changed Mar 23 05:51:07 its still great for all your Holo needs Mar 23 05:51:13 Holo? Mar 23 05:51:25 heh yes, there are still out of date things Mar 23 05:51:32 It seems to me that there are no great tutorials and that d.a.c is probably the lesser of various evils. Mar 23 05:51:38 probably better than a few years ago though Mar 23 05:52:34 probably... i'm currently reading through the fundamentals and crossing my fingers that when i get to the actual non-theoretical portions, it'll go smoothly Mar 23 06:11:42 #1 suggestion, be well acquainted with Java and programming in general prior to embarking on android Mar 23 06:12:17 pfn, well, it's been a few years for me as far as Java as confirmed, but I'm very fluent in C#, so it should be okay. Mar 23 06:12:31 I didn't have issues with it before, so I don't expect any issues. Mar 23 06:13:09 i find it easy to pick up new languages once you become good at one Mar 23 06:13:12 Remember to use String.equals and you can't go far wrong. Mar 23 06:13:19 bkboggy did you use rx extensions for .net ? Mar 23 06:13:21 i picked up python in a few days for OSM map generation, so it's cool Mar 23 06:13:34 g00s, what rx extensions? Mar 23 06:13:41 nm :) Mar 23 06:13:53 Languages using the same paradigm(s) end up being so similar. Mar 23 06:13:56 TacticalJoke, lol ha, i remember that one for sure... Mar 23 06:14:26 bkboggy: if new languages are all OOP so it's not hard... Mar 23 06:14:27 I remember not being too fond of Java... but it just feels odd using C# with Xamarin for Android development... Mar 23 06:14:35 it would be harder to move from OOP to functional Mar 23 06:14:42 Java has grown on me. (I too came from C#.) Mar 23 06:14:52 gordon_, mmmm i don't necessarily agree, but k Mar 23 06:14:57 I like Java's simplicity now. C# has become pretty complex. Mar 23 06:15:06 Simplicity? Mar 23 06:15:15 it's verbose as hell Mar 23 06:15:15 lol Mar 23 06:15:15 :D Mar 23 06:15:24 Yeah, but it's fundamentally simple. Mar 23 06:15:26 those are not correlated Mar 23 06:15:30 it's like moving from c# to java Mar 23 06:15:33 it's almost the same Mar 23 06:15:38 at least not in a significant way Mar 23 06:15:39 to make they are, but to each is own, i'm not here to put down Java in any way Mar 23 06:15:42 ok, you have parallel extensions Mar 23 06:15:46 and delegates Mar 23 06:15:49 to me* Mar 23 06:15:57 but it really looks like java Mar 23 06:16:03 bkboggy, I'd stick with xamarin if it's free Mar 23 06:16:08 g00s, what did you mean by rx extensions, i'm curious Mar 23 06:16:25 bkboggy: I predict that you'll end up liking Java, even if it's just Stockholm Syndrome setting in. Mar 23 06:16:34 pfn, well, it's free to a certain point, but i don't like the limitations it imposes Mar 23 06:16:47 I don't like the look of Xamarin. Looks too hacky to me. Mar 23 06:16:48 c# was a java ripoff to begin with Mar 23 06:17:07 Is it possible to have two launchers with different names and opening the same application Mar 23 06:17:21 TacticalJoke, i'm agnostic... i honestly don't discriminate against any technology... I don't mind Linux, I enjoy Windows, I like Microsoft as a company, I like Google for what they do... I just use whatever I need in a particular scenario. Mar 23 06:17:28 I never understood those one-sided people.. Mar 23 06:17:45 bkboggy: After you master Java you can consider moving to Kotlin (a really nice language). But first things first. :) Mar 23 06:17:57 TacticalJoke, lol, if I ever have a need. Mar 23 06:18:04 i make my living as a .net developer Mar 23 06:18:05 so.. Mar 23 06:18:27 i actually enjoyed going the html/javascript route with Ionic for Android Mar 23 06:18:29 pretty darn neat Mar 23 06:19:48 Oh, gawd, I hated JavaScript. Mar 23 06:19:48 Am I the only one? :D Mar 23 06:20:15 dunno, i didn't mind it one bit, it did what it did for me Mar 23 06:20:21 everyone hates everything Mar 23 06:20:28 it's just different degrees Mar 23 06:20:30 True. Mar 23 06:20:48 but yes, JavaScript has few actual redeeming factors Mar 23 06:21:11 i honestly have hard time of thinking of a technology that i can say that I "hated" using.. Mar 23 06:21:16 i never got to use Vista, so.. Mar 23 06:21:40 bkboggy you ever do COM or ActiveX :P Mar 23 06:21:45 I loved C++ and half of the c# community are ready to burn it at the stake.. so Mar 23 06:21:45 That's funny. I totally get JW's point here -- I think I hate every technology I've ever touched. But the amount of hatred varies significantly. Mar 23 06:21:50 g00s, yeah, i've done COM Mar 23 06:21:59 i hates that shit Mar 23 06:22:04 I hated C++ beyond measure. Mar 23 06:22:04 g00s, a bit painful, but... you got to do what you got to do Mar 23 06:22:08 It's a monster. Mar 23 06:22:16 TacticalJoke: you learn to live with, and sometimes appreciate, the faults of everything. Mar 23 06:22:17 g00s, i had to do COM with pdf stuff a lot Mar 23 06:22:23 i think don box was like the only person who knew how it worked Mar 23 06:22:30 bkboggy: Did you ever use MFC? Mar 23 06:22:52 TacticalJoke, don't think so, at least not directly Mar 23 06:22:53 JakeWharton: Yeah, that's truth. Mar 23 06:23:00 bkboggy: Ah, okay. That was another monster. :D Mar 23 06:23:09 TacticalJoke: for all JavaScripts faults I really enjoy using it because I don't have to master it and it's completely forgiving Mar 23 06:23:11 COM is a remarkable piece of technology which only became tractable with C#. I did COM with C and C++, it was ugly Mar 23 06:23:22 TacticalJoke, would you use that as part of managed C++? or Mar 23 06:23:31 Oh, no. This is before the .NET days. Mar 23 06:23:35 oh Mar 23 06:23:36 what about OLE "D Mar 23 06:23:49 It was a thin wrapper over Win32, but it was so bad that Win32 itself was arguably more desirable. Mar 23 06:23:51 TacticalJoke, my programming days are quantified in 2.5 years, so.. Mar 23 06:24:40 i tell you what... this channel is friendly than Java channel Mar 23 06:24:41 lol Mar 23 06:24:47 those guys... man, troll-fest Mar 23 06:25:06 friendlier* Mar 23 06:25:15 Yeah, that channel isn't always the friendliest. Mar 23 06:25:47 i made a mistake of venturing there a few years ago when i was doing some java... i haven't been back there since then Mar 23 06:25:47 They give good answers, but I've seen crazy admin-related drama in there. Mar 23 06:27:17 I think the hardest technology-related question is this: Is PHP somehow worse than C++? Or is that impossible? Mar 23 06:27:35 Where 'worse' is defined as something like 'more horrendous'. Mar 23 06:28:10 It's a difficult comparison. :D Mar 23 06:28:20 it's an unfair comparison Mar 23 06:28:26 apples and oranges Mar 23 06:28:46 Sorry, I just love talking about how much I hate C++. Mar 23 06:28:51 lol Mar 23 06:29:03 TacticalJoke remember all the __stdcall :D Mar 23 06:29:09 Yeah. lol Mar 23 06:29:14 well, if it's good enough to operate satellites, it's good enough for me Mar 23 06:29:15 Was that when using MFC? I forget. Mar 23 06:29:20 I remember that in Visual C++ somewhere. Mar 23 06:29:23 plain win32 Mar 23 06:29:26 Ahh, okay. Mar 23 06:29:42 what about C? you can't hate C Mar 23 06:29:46 it's the daddy of most languages Mar 23 06:29:55 I don't mind C. It's pretty simple; it has a clear purpose. Mar 23 06:30:09 its purpose is assembly :) Mar 23 06:30:15 Yeah, pretty much. :D Mar 23 06:30:29 and buffer overflows Mar 23 06:30:38 my physics professor created a balloon satellite that detected Russians dumping old nuclear satellites into higher orbits, thinking no one would detect them Mar 23 06:30:48 he used C Mar 23 06:30:55 detected gamma rays Mar 23 06:31:20 i dont remember any gamma ray functions in stdlib Mar 23 06:31:28 lol Mar 23 06:31:36 was that like, #include or something Mar 23 06:31:47 oh i'm sure that's it Mar 23 06:32:02 #ifdef communist Mar 23 06:32:11 he had these crazy platters... every time a particle went through it would trigger a flag Mar 23 06:32:50 he saw an odd pattern which could not be a cosmic anomaly, so he contacted the u.s. navy... it's a pretty neat story Mar 23 06:33:02 NASA actually ended up adopting his technology Mar 23 06:33:16 Do you remember that Borland conio thing, g00s? Gave us pretty colours and everything. Mar 23 06:33:40 no i don't :( i use borland turbo pascal - hmm, i little OWL ? Mar 23 06:33:54 Oh, cool. I was into Delphi for a long time. :) Mar 23 06:34:15 Borland were smart guys. They didn't do anywhere near as well as they should have. Mar 23 06:34:50 hm yeah, Philippe Kahn... Mar 23 06:35:03 timing, timing, timing Mar 23 06:35:06 theirs was poor Mar 23 06:35:17 Yeah, and Anders. Mar 23 06:36:21 is building a new type of Android ROM feasible? Mar 23 06:36:30 like a completely different type of ROM Mar 23 06:37:02 i want to make one and make that one popular Mar 23 06:37:30 instead of baking it, you could try steaming Mar 23 06:37:57 roast rom. mmMMmm Mar 23 06:38:02 wat Mar 23 06:38:05 romroast lol Mar 23 06:40:37 I get this error: SQLiteLog﹕ (2067) abort at 14 in [INSERT INTO `rate_configurations` (`id` ,`modified_at` ,`seconds_step` ,`valid_from` ,`valid_from_local` ) VALUES (?,?,?,?,?)]: UNIQUE constraint failed: rate_configuratio Mar 23 06:41:12 Syzygy: are you trying to insert a value of id that already exists in the db? did you mean to use NULL instead? Mar 23 06:41:12 However, the only unique field is the ID, which is initialized with an UUID in the constructor. Mar 23 06:41:31 also look at 'on conflict replace , etc' Mar 23 06:42:03 Syzygy: how is id defined? Mar 23 06:42:46 @DatabaseField(unique = true, id = true, columnName = ID) private String id; Mar 23 06:42:50 Using ormlite Mar 23 06:43:13 and in the constructor I do this: id = UUID.randomUUID().toString(); Mar 23 06:44:54 i'd suggest firing up sqlite and looking at the actual db Mar 23 06:45:19 in any case you're probably trying to reinsert the same uuid Mar 23 06:46:13 that table is empty for now actually Mar 23 06:46:47 one second, everything is empty for now. Mar 23 06:50:50 alright, different exception this time... weird Mar 23 06:51:16 was that the one in a billion chance where the UUID overlaps? Mar 23 06:56:04 how do I 'adb push' as root? Mar 23 06:57:22 qmr: probably adb push and then chmod Mar 23 06:59:10 thepoosh ! Mar 23 06:59:37 https://www.1starmy.com/media.ashx?id=65900&w=448&h=448&q=85 Mar 23 06:59:38 ! Mar 23 06:59:59 :D :D Mar 23 07:00:02 thanks Mar 23 07:00:07 i was gonna explain that Mar 23 07:00:35 sup g00s Mar 23 07:00:46 oh boy debugging stuff Mar 23 07:01:16 well, i have an image for that as well Mar 23 07:01:41 its normal for all the BT device names to be unaccessible when the BT adapter is off Mar 23 07:01:46 https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xfa1/v/t1.0-9/11070786_10153217623605917_907752400566863147_n.jpg?oh=473a00db388ae6e4fdba20ea3865f82c&oe=55767C88&__gda__=1438417667_d18bf3f826b53c03f71a8b32f492eae6 Mar 23 07:01:51 thepoosh: not sure where I can push it to. r/o / permission denied everywhere Mar 23 07:02:07 when i re-enable it, the br/edr devices are ok but the BLE devices lost their names :| Mar 23 07:02:14 qmr: push it to /sdcard/ and then chmod it and move it to wherever you want Mar 23 07:02:27 so the stack fucked something up. i have to start a LE scan just to get their names back Mar 23 07:02:43 i know nothing about BT Mar 23 07:03:09 thepoosh dude, my logs are filled with play services strictmode violations :D Mar 23 07:03:29 thepoosh: can't even push there :\ Mar 23 07:03:42 thepoosh: I used netcat :\ Mar 23 07:03:44 g00s: wat?! Mar 23 07:03:49 that never happens Mar 23 07:03:54 qmr: why not adb? Mar 23 07:03:57 thepoosh what movie is that from ? Mar 23 07:04:03 topgun Mar 23 07:04:12 the name of the character is Goose Mar 23 07:04:48 thepoosh lol, i know THAT Mar 23 07:04:53 i mean, the log one Mar 23 07:04:57 thepoosh: I already said what happened when I tried adb Mar 23 07:05:10 http://en.wikipedia.org/wiki/Top_Gun#Cast Mar 23 07:05:23 this one dammit https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xfa1/v/t1.0-9/11070786_10153217623605917_907752400566863147_n.jpg?oh=473a00db388ae6e4fdba20ea3865f82c&oe=55767C88&__gda__=1438417667_d18bf3f826b53c03f71a8b32f492eae6 Mar 23 07:05:35 qmr: if you cannot use adb push to /sdcard/ there is something wrong with your connection Mar 23 07:05:47 maybe auto-mount of the sdcard Mar 23 07:06:12 g00s: indeed Mar 23 07:06:37 g00s: it seems like your log is saying "ring ding ding ding ding" as well Mar 23 07:06:52 thepoosh lol! i'm going to starngle you Mar 23 07:07:04 what movie is that mouse boy from Mar 23 07:07:08 hallo Mar 23 07:07:10 my app crashes Mar 23 07:07:12 i can't figure out why Mar 23 07:07:16 where do i debug this? Mar 23 07:07:21 ProLoser: what does the logs say? Mar 23 07:07:23 your app is a Loser Mar 23 07:07:40 just turning Pro :) Mar 23 07:07:53 logs say nothing about the crash Mar 23 07:14:28 this is the end of the log http://hastebin.com/enawukozoy Mar 23 07:33:48 I'm trying to import org.opencv; in my app, but org.opencv is in another module next to my app module, and so my app is not finding opencv. What should I do? Mar 23 07:34:51 i'm assuming something as simple as right-click import won't do it Mar 23 07:35:18 ProLoser, I tried that. but the module is already imported. What else would I import? Mar 23 07:41:57 people Mar 23 07:42:19 how can i fill 20% of button with color? Mar 23 07:42:42 can i do this without extend button class? Mar 23 07:42:53 ondroed look at how progressview does it Mar 23 07:43:11 err, ProgressBar Mar 23 07:46:48 thanks i will look Mar 23 08:03:43 hi,i want to show to user old image and new image side by side but it will be dynamically, can i do that with listview ? Mar 23 08:04:00 yes if you want Mar 23 08:04:24 so is it good for this ? Mar 23 08:04:39 sci-fic: just create a layout file with two images view's side-by-side and your ListAdapter's getView can inflate and populate it Mar 23 08:04:48 sci-fic: yes that, or RecyclerView Mar 23 08:05:15 ty Mar 23 08:18:47 hey I've got a little one-liner that reads the true-name and version of an APK from it's manifest file... Mar 23 08:18:56 python -c "import sys, axmlparserpy.apk as apk;ap = apk.APK(sys.argv[1]);print ap.get_package()+' '+ap.get_androidversion_name()" file.apk Mar 23 08:19:02 it's great - but I was just wondering... do the manifest files contain an architecture as well? e.g. all (not specifically x86 or arm), arm, x86 ? Mar 23 08:20:29 i have an activity_main.xml Mar 23 08:20:52 and a MainActivity.java, how do i call the MainActivity method from the xml? like a button Mar 23 08:21:28 what are you trying to do? Mar 23 08:24:57 uh Mar 23 08:25:04 i'm sorta hacking around (and sucking at it) in my first app Mar 23 08:25:32 i am playing with the spotify api to create a player and have it start playing. i just want to make a pause button, populate a dropdown with some playlists i retrieved from their api, etc Mar 23 08:28:09 let the XML draw the UI, then access elements from your main activity. you'll need to make sure the XML is inflated and access the elements with findViewById() Mar 23 08:28:59 stevenm: no that I believe so.. as fast as I remember the supported architectures for an APK are from the so libs included Mar 23 08:29:09 stevenm: if no libs, then all architectures are supported Mar 23 08:30:07 Napalm, hmm ok - so how does an instance of android that is running on arm - realise that an inbound apk to install is incompatible? does it check the arch of all the files inside it one at a time? Mar 23 08:30:36 or is the presence of libs at all a sign that it needs to check some extra value? if no extra libs then it's arch-agnostic? Mar 23 08:31:56 stevenm: that package manager service does it. it checks the APK. but ofc, the play store does it and stops you even downloading an APK to an incompatible device Mar 23 08:32:21 stevenm: yea, doesnt look like the manifest has anything on arch.. http://developer.android.com/guide/topics/manifest/uses-feature-element.html#hw-features Mar 23 08:33:27 Napalm, so in theory it's possible to side-load an x86 app on an arm device - but you'll just find the app doesn't work Mar 23 08:35:08 I believe i've done that.. but ofc the app might crash if it cant load its native code.. (if it has any) Mar 23 08:36:48 stevenm: https://android.googlesource.com/platform/frameworks/base.git/+/master/services/core/java/com/android/server/pm/PackageManagerService.java Mar 23 08:36:57 stevenm: search for ABI.. you should fine the related code Mar 23 08:37:28 thanks Mar 23 08:39:30 INSTALL_FAILED_NO_MATCHING_ABIS Mar 23 08:39:33 stevenm: ^ Mar 23 08:39:57 search for that.. notice maybeThrowExceptionForMultiArchCopy uses it.. now search for uses of maybeThrowExceptionForMultiArchCopy Mar 23 08:40:32 it's ok - i just wanted to know if it's in the manifest is all Mar 23 08:40:58 ah Mar 23 08:41:00 stevenm Mar 23 08:41:10 open that source and search for stevenm: well now you've started me hunting.. looks like Mar 23 08:42:01 oopsy Mar 23 08:42:02 it was just for a decent name for the files I have here.... e.g... com.company.app_5.1.2_armv7.apk but most I understand now won't have an arch Mar 23 08:42:14 got this to rename them properly... Mar 23 08:42:17 python -c "import sys,os,axmlparserpy.apk as apk;ap = apk.APK(sys.argv[1]);os.rename(sys.argv[1],ap.get_package()+'_'+ap.get_androidversion_name()+'.apk')" file.apk Mar 23 08:43:04 I'm gathering a few useful apk's together to run them on chrome Mar 23 08:44:08 stevenm: the only way I can see is to use python to extract libs to a tmp dir and call objdump -i on them to determine the arch Mar 23 08:44:30 yeah I'm not going to go that far :) Mar 23 08:44:43 yea, cool dont blame you Mar 23 08:44:50 right now im way down the rabbit hole Mar 23 08:45:02 thanks anyway Mar 23 08:45:43 I'm working on compiling my own system firmware to do some specific tasks Mar 23 08:45:45 :S Mar 23 08:46:51 FreeRTOS base + Custom WiFi Driver + Custom Ethernet Driver + Custom RF Driver + lwIP stack + MicroHTTPD server = win Mar 23 08:46:52 :| Mar 23 08:48:34 i create custom button that extends button, and i draw custom background, but there is no borders :( Mar 23 08:49:09 ondroed: the default buttons borders come from the background Mar 23 08:49:15 ondroed: its called a 9-patch Mar 23 08:50:19 Napalm, what do you mean by custom? Mar 23 08:50:27 You wrote them? Mar 23 08:50:33 Or modified Mar 23 08:50:51 +1 for 9-patch! I'm new and saw that while skimming... makes sense now. :) Mar 23 08:52:03 kdarknight: write the myself probably by the looks of things Mar 23 08:55:35 kdarknight: looks like im lucky on the WiFi front.. MIT license YAY! Mar 23 09:11:37 hi guys, can somebody point me to a best practice example on using rsa in android, with key storage etc? Mar 23 09:12:26 Napalm, awesome :) Mar 23 09:12:58 kdarknight: i see a dark future ahead of compiler makefile nightmares :( Mar 23 09:14:09 long coffee-filled nights ahoy :p Mar 23 09:14:42 * Napalm agrees with ravilov Mar 23 09:16:06 asperon: you mean secure storage of client side keys? Mar 23 09:16:31 Napalm, yes, generation of keys, storing them on the client, and the encrypt/decryot Mar 23 09:17:02 asperon: first read http://android-developers.blogspot.co.uk/2013/08/some-securerandom-thoughts.html Mar 23 09:17:08 i have read up on http://android-developers.blogspot.se/2013/08/some-securerandom-thoughts.html Mar 23 09:17:21 oh, but i am at loss to where/how to store the keys etc Mar 23 09:17:23 asperon: ok then you might want to store in obb storage Mar 23 09:18:26 Napalm, ok, any referens examples on how to use it? want to get this right as to not compromise the app ;) Mar 23 09:20:04 asperon: whats your minSDK? Mar 23 09:20:34 any, i would say 11 but i will probably go lower at a later point unless it isn't possible Mar 23 09:20:51 i just want to do it "by the book" given the users sdk level Mar 23 09:22:11 hello, any one has the common interest in opencv finger count? Mar 23 09:23:44 asperon: there is plenty of info about doing rsa public/private key crypto for Java.. follow that.. and use the obb for storage Mar 23 09:24:25 Napalm, thanks Mar 23 09:31:54 Napalm, the keystore isn't a good idea to use, or? Mar 23 09:40:57 hi,im using ormlite and i try to persisted = false a field which is a bitmap and I dont want to put to my database Mar 23 09:41:21 i tried persisted = false with a string variable and it works, but bitmap has a problem like this because we got an error finding its definition: Landroid/graphics/Bitmap; Mar 23 09:43:31 cant you just not annotate the field to make it not persisted? Mar 23 09:43:52 i tried and it skips class Mar 23 09:44:10 oh ok Mar 23 09:44:37 without annotation or with @Databasefield(persisted = false) Mar 23 09:45:02 isnt there something like transient keyword ? Mar 23 09:45:44 maybe it's time you switch to real proper sql ;) Mar 23 09:48:26 hey, whatever happened to Stingray? Mar 23 09:49:08 sci-fic, can you show the class? I never used persisted but maybe I can spot something Mar 23 09:49:14 someone commited ormlite config.txt without bitmap field and after that put bitmap field and uses without commit :D Mar 23 09:49:35 oh haha :D Mar 23 09:51:58 (how) can i turn off the screen programmatically? Mar 23 09:52:26 Ashiren, have you googled that ? :) Mar 23 09:52:33 of course Mar 23 09:53:21 are you sure? :) Mar 23 09:54:45 yes, im sure Mar 23 09:54:59 http://bit.ly/1G3LKvG Mar 23 09:55:33 :s Mar 23 09:56:02 are you still sure? :D Mar 23 09:56:43 i get only somethings about proximity sensors and keep_screen_on flags Mar 23 09:57:31 nothing about wakelocks? Mar 23 09:57:35 what all have you tried so far? Mar 23 09:59:31 well for starters to clear keep_screen_on from getWindow(), set brightness to 0 Mar 23 09:59:41 and powerManager gives deprecated warnings Mar 23 10:00:15 danijoo:http://paste.ubuntu.com/10659455/ Mar 23 10:00:18 thats it Mar 23 10:00:51 what happens if you remove DatabaseField at all from bitmap Mar 23 10:00:55 that should make it ignored Mar 23 10:02:11 same , skips class cause cant find definition for Landroid/graphics/bitmap etc Mar 23 10:02:56 that should not happen oO Mar 23 10:03:12 yeah i thought so Mar 23 10:03:22 anyway brb lunch time :P Mar 23 10:05:30 clean project? Mar 23 10:05:42 clean the project* Mar 23 10:15:21 Hello. anyone worked with RxJava? I want to know overhed of RxJava on an android app Mar 23 10:16:14 vedu, its 42 Mar 23 10:16:20 for your information, none of the googled solution work Mar 23 10:16:31 either its unavailable or just doesnt work Mar 23 10:16:50 so one cant just turn screen off when one wants to? Mar 23 10:17:09 Ashiren, have you aquired the permissions for wake lock correctly? Mar 23 10:17:23 eeyup Mar 23 10:17:46 danijoo: I wanted some feedback on it in order to decide whether I shuold use it or not. Not sure exactly what question to ask Mar 23 10:18:07 vedu, you can savely use it Mar 23 10:18:22 savely? Mar 23 10:19:04 safely :) Mar 23 10:19:48 even readily Mar 23 10:20:51 nice :) Mar 23 10:21:47 I wanted to read more about it. There not many blogs about RxJava+Android. Because it is totally a different way to code Mar 23 10:22:18 the learning curve is pretty tough i think Mar 23 10:22:22 but its worth Mar 23 10:22:24 Hard to include in an existing project, and harder to remove later Mar 23 10:22:44 danijoo: where have you used it? Mar 23 10:22:59 vedu, I dont have it in production Mar 23 10:23:08 savely = you can use it if you remember to save your project Mar 23 10:23:08 :p Mar 23 10:23:17 ravilov: :D Mar 23 10:23:46 danijoo: why not, if it is so good :P Mar 23 10:23:50 When I build a release APK (with proguard), the app looses persistent data when its closed. Why can this be? Example: I use loopj async http library with a persistent cookie store. Every time i re-open the app, the cookie store is empty. This does not happen in debug builds Mar 23 10:24:04 because of what you already said Mar 23 10:24:18 its hard to include it in an already existing project without rewriting half of the stuff Mar 23 10:24:20 Hard to include in an existing project? Mar 23 10:24:23 and Im not doing something new atm Mar 23 10:24:28 yeah seemed like it Mar 23 10:24:41 This is why I always write a 'Storage' class. Mar 23 10:29:53 lasserix: are you there? Mar 23 10:30:09 I want to use retroft+RxJava. Seems like a very audacious step Mar 23 10:30:33 huh why Mar 23 10:30:54 just use Observable<> instead of Callback<> Mar 23 10:30:58 and you're done :) Mar 23 10:31:21 danijoo: despite your sarcasm, i managed to get workaround. but it wasnt google, it was my brain idea Mar 23 10:31:56 Ashiren, good to hear. And sorry for being an asshole in the moring :) Mar 23 10:32:00 morning* Mar 23 10:32:15 I only had one coffee so far. shoudnt IRC with that Mar 23 10:32:28 closing your eyes doesn't mean the screen is off Mar 23 10:32:57 lol Mar 23 10:35:39 shmooz, seems to work for ostriches... :p Mar 23 10:35:59 ello Mar 23 10:36:46 ravilov, but they dont just close their eyes Mar 23 10:36:59 shmooz, have you tried plunging your head into the floor? Mar 23 10:37:04 that will help Mar 23 10:39:03 actually, to properly emulate an ostrich, you'd need to also kick the crap out of whatever happened Mar 23 10:39:25 and win a war against Australian Army Mar 23 10:39:58 seems hard, is there an app for that? Mar 23 10:40:24 and dodge a box full of ACME dynamites Mar 23 10:40:53 um Mar 23 10:40:58 A quick question....can the same application be opened from multiple launchers. ie I will just change the launcher icon and the string but clicking on them will show the same application Mar 23 10:40:59 that'd be the roadrunner Mar 23 10:41:18 I was going through the android developer site and found taskAffinity Mar 23 10:41:34 But this is working for the activities in the application Mar 23 10:41:45 whoa way to overcomplicate Mar 23 10:41:46 define "multiple launchers" Mar 23 10:45:46 p_l:I meant this.When I install the application it should create 2 launcher icons with different name but will open the same application Mar 23 10:46:17 may be my question is still not clear :( Mar 23 10:46:42 launcher icons are based on intents, not activities, so you can define two different intent filters and I suspect an activity-alias and you should get that behaviour Mar 23 10:47:47 question is, why have two icons that do the same thing? Mar 23 10:49:12 ravilov: you can make the two intents differ and trigger different operation in the same activity Mar 23 10:49:51 for example the OpenVPN client I use creates shortcuts to VPNs in such way Mar 23 10:49:53 oh wait... open the same application, not the same activity Mar 23 10:49:56 that makes more sense Mar 23 10:50:07 and yeah tons and tons of apps do that Mar 23 10:50:15 ravilov: even the same activity makes sense if you trigger a different behaviour in said activity Mar 23 10:50:24 eh true Mar 23 10:50:28 I suppose Mar 23 10:50:40 different extras Mar 23 10:50:43 for example, an activity that edits something, one shortcut is the general one and another opens some predefined category Mar 23 10:50:52 right Mar 23 10:52:31 p_l: yes I did that and also used android:taskAffinity Mar 23 10:52:35 and it worked Mar 23 10:59:59 hey guys, does anyone know a good source about actual security topics about android and what to watch out for during development phases? maybe books or articles that are good? Mar 23 11:03:38 Any reason why Log.d("something", "something"); Something(); Log.d("something2", "something2") wouldn't always show up the 2nd log.d !? Mar 23 11:04:28 Something throws an exception perhaps? Mar 23 11:04:58 because your app crashed? Mar 23 11:05:09 because somthing() dont finishes? Mar 23 11:05:18 or you had an exception that you caught in an inappropriate way Mar 23 11:05:39 ravilov: no, the app is ok ! no exceptions .. Mar 23 11:05:48 it just doesn't always show all the Log.d's .. Mar 23 11:05:57 because you have a filter set on logcat? Mar 23 11:06:00 nope Mar 23 11:06:03 no filters :| Mar 23 11:06:06 ok, I give up. why? Mar 23 11:06:13 No idea, that's why I'm asking here. Mar 23 11:06:20 maybe someone else hit this problem.. Mar 23 11:06:24 nope Mar 23 11:06:30 this makes no sense Mar 23 11:06:33 now would be a good time to post some actual code Mar 23 11:06:33 it should show up Mar 23 11:06:38 ^ Mar 23 11:06:55 sure, one sec. Mar 23 11:07:57 time's up :p Mar 23 11:08:14 https://d3xbucharest.go.ro/git/asandu/DRPCIV Mar 23 11:08:39 don't hate ! I know I have tons of issues but this little thing with log.d is driving me crazy .. Mar 23 11:08:42 should we search your whole project for the correct file? Mar 23 11:08:56 danijoo: https://d3xbucharest.go.ro/git/asandu/DRPCIV/blob/master/app/src/main/java/tk/d3xt3r01/drpciv/TestActivity.java Mar 23 11:09:31 last time I ran it ( a couple of minutes ago ) the log.d on line 81 showed up .. the one on 83 didn't Mar 23 11:09:45 but the app worked just fine. no exceptions no nothing Mar 23 11:12:47 replace the complext second Log.d() with something simple, like Log.d("WATCH", "test2"); Mar 23 11:13:46 if that doesn't help, add this after the second Log.d() Mar 23 11:13:54 throw new RuntimeException("test"); Mar 23 11:13:59 and see if it crashes there Mar 23 11:15:17 ravilov: it doesn't always happen to not show up Mar 23 11:15:27 just once every .. 10 actions or so !? Mar 23 11:15:36 same goes for others .. not this one in particular ! Mar 23 11:15:47 can't help you there Mar 23 11:15:52 run it as many times as necessary? Mar 23 11:16:08 ok, trying it out. Mar 23 11:16:14 but the fact it's so random could indicate you have some much deeper issues going Mar 23 11:16:45 that's what I'm thinking .. maybe Log.d has some buffer !? or it dismisses stuff it doesn't like sometimes for various reasons .. Mar 23 11:33:32 no... that would mean Log.d() has issues, which it doesn't Mar 23 11:34:20 ravilov: I think it's something adb related ! Mar 23 11:34:38 dunno Mar 23 11:39:57 yep, it's adb related ! If I ctrl+c and re-run the adb logcat it shows all the messages ! Mar 23 11:45:42 actually, not really adb as logcat itself ( tried running it in a adb shell ) Mar 23 11:45:45 same thing Mar 23 11:48:36 do you have concurrent adb installations maybe (for example due to genymotion) Mar 23 11:49:14 When I build a release APK (with proguard), the app looses persistent data when its closed. Why can this be? Example: I use loopj async http library with a persistent cookie store. Every time i re-open the app, the cookie store is empty. This does not happen in debug builds Mar 23 11:49:30 nope, just one adb server ( dexter 29202 0.1 0.0 31544 3228 ? Sl 12:05 0:06 adb -P 5037 fork-server server ) and one client Mar 23 11:50:38 hmm I guess a 2nd one would be the android studio Mar 23 11:51:20 prinsen, have you checked what happens in a release build without proguard (just to check if its really a proguard issue) Mar 23 11:53:36 Napalm, don't suppose you know which magic file inside an apk stores the icon? i don't mean the icon for the launcher - but the icon for the apk - it seems they all have one Mar 23 11:54:15 danijoo: the only difference in the targets in gradle is that release has minifiedEnable = true Mar 23 11:54:35 danijoo: or does android studio add some settings by default? Mar 23 11:54:55 prinsen, maybe you (or one of your libraries) is doing something with reflection or annotations and proguard removed one of your methods/classes that is needed for the persistance Mar 23 11:55:25 for example if a method is only called because its annotated with something Mar 23 11:55:41 and you dont explicitly tell proguard to keep it, proguard will remove it Mar 23 11:55:57 and the caller will not find it but also throw no exception because its called by reflection :) Mar 23 11:59:13 if your app relies on annotated methods, you should at least add -keepattributes *Annotation*,Signature Mar 23 11:59:47 and -keep class ** { @YOUR_ANNOTATION public *; } to keep all methods annotated with YOUR_ANNOTATION Mar 23 12:00:33 danijoo: great info! I found a github issue for AAH Mar 23 12:00:41 regarding proguard Mar 23 12:00:43 trying nw Mar 23 12:09:57 Hi! Can I use API 22 with my phone running 5.0.2 ? Mar 23 12:10:23 yes Mar 23 12:11:26 also true for my nexus 7 on kitkat ? Mar 23 12:12:43 you can always use an api level bigger then your phone if you code properly Mar 23 12:14:26 I see Mar 23 12:15:03 you only have to set minSDK properly at gradle/manifest Mar 23 12:18:52 people Mar 23 12:19:46 i have relative layout with: button and imageView. Can i set imageView size to be equal button size? Mar 23 12:20:08 any "adb logcat" alternatives !? Mar 23 12:20:19 in xml or programmatically Mar 23 12:21:14 i`m working on my first app. now facing "out of memory" after restarting activity. I have many imagebuttons,textviews,layouts and drawables on many pages (PagerAdapter). After first start i use about the half of available heap, after second restart it gets to much and crashes. Mar 23 12:21:19 Afaik the activity doesnt get completely released from memory after onDestroy and i can see in MAT that all these ressources are multiple times in memory. So no wonder that it crashes. I`m not 100% sure if i should release all these ressources myself in onDestroy or Mar 23 12:21:21 if all the ressources should be released automatically and i`m leaking context or something (But i cant find that). any help? Mar 23 12:22:20 adkins, http://developer.android.com/training/displaying-bitmaps/index.html Mar 23 12:23:02 danijoo: so you are sure that its the bitmaps? Mar 23 12:23:21 no Mar 23 12:24:09 danijoo: MAT says the largest consumer are the imageButtons (which do have drawables) Mar 23 12:24:31 adkins, images are usually the biggest chunk of memory Mar 23 12:24:39 because they get huge when put in it Mar 23 12:24:46 it used to say that bitmaps were also consuming a lot, but i`ve fixed that and its not saying anything about bitmaps anymore Mar 23 12:24:51 thats why you should recycle, release etc them Mar 23 12:25:45 640x400x32bits literally takes just shy of 1MB of ram when unpacked Mar 23 12:25:55 if you have a ton, that's the metric you're dealing with Mar 23 12:26:05 iirc Mar 23 12:26:31 that why you should always decode bitmaps to match the size and screen density Mar 23 12:26:44 and consider using Picasso for easy image caching Mar 23 12:28:12 soupnanodesukar: the images are scaled pretty tiny with createScaledBitmap but maybe thats not enough? Mar 23 12:28:58 making bitmaps tinier is just one part of the solution Mar 23 12:29:05 if you leak something, it doesnt matter how small it is Mar 23 12:29:14 it will just delay the problem to a later start Mar 23 12:29:39 thx Mar 23 12:31:34 Would you say this is good to do in the PagerAdapter-Class: http://pastebin.com/narXd1w3 Mar 23 12:32:35 I am using FacebookSDK in my app, it compiles fine and I am able to login and it asks for permission but as soon as I click to allow access, it crashes silently with this in console, "W/IInputConnectionWrapper??? showStatusIcon on inactive InputConnection". Mar 23 12:32:58 I have tried all I can think of, has anyone faced this problem? Mar 23 12:42:02 I am using proguard in an application but having a strange problem. There is some random number appended after some of strings used in the application e.g. This is some message.2126428982 . when i searched for this number i found them in proguard dump.txt but unable to figure out how to remove them. any clue? Mar 23 12:53:19 people, how to draw rect on button background? Mar 23 12:57:34 Could you just set the background of the button? Mar 23 12:57:41 ..to a drawable that has a rect Mar 23 13:01:01 yea as Troffel said Mar 23 13:01:06 Im doing that right now actually Mar 23 13:01:13 get rect Mar 23 13:04:34 ok Mar 23 13:04:38 so my app is bugging Mar 23 13:04:42 and for some reason i have one device Mar 23 13:04:53 that adds a listview item ABOVE the actionbar Mar 23 13:04:58 completely out of place Mar 23 13:05:02 when the keyboard is opened Mar 23 13:05:14 does anyone ever encountered such a thing? Mar 23 13:09:47 is there a way to temporarily change the navigation icon on a Contextual Action Bar? Mar 23 13:10:40 you asked that same question yesterday MooGoo Mar 23 13:10:42 like have it be a checkmark on one section and a back arrow on another Mar 23 13:10:45 and noone answered Mar 23 13:10:53 you still didnt figure it out? Mar 23 13:11:06 the question is really unclear Mar 23 13:11:13 how so Mar 23 13:11:23 far as I can tell the only way to change the icon is through styles Mar 23 13:11:27 but that would not be temporary Mar 23 13:11:40 why would you want to place anything instead of the back arrow Mar 23 13:11:58 in this situation, a checkmark would be more appropriate Mar 23 13:12:14 since it would be confirming some action instead of just canceling it Mar 23 13:12:31 look at Google Keep Mar 23 13:12:33 their back saves Mar 23 13:12:38 easy, simple Mar 23 13:12:44 anyone uses loopj here ? Mar 23 13:13:05 MooGoo: google is actually pretty strict with what they allow you to modiffy in teh action bar Mar 23 13:13:18 the back button is never replaced with anything, unless its a drawer that's being pulled out and the back button is there to push it back in Mar 23 13:13:29 MooGoo: what you could do, is remove the back button and inflate a menu with a checkbox on the right side of the actionbar Mar 23 13:13:30 meaning you are not at an activity where you can go back Mar 23 13:13:38 you shouldn't do that! Mar 23 13:13:46 do not think about changing anything on the left though Mar 23 13:13:55 that's what he means, on the left side Mar 23 13:14:01 on the right side you can have anything you want Mar 23 13:14:02 well...I'd like the checkmark to be on the left Mar 23 13:14:08 ya, no. Mar 23 13:14:12 thats so wrong Mar 23 13:14:17 why Mar 23 13:14:18 but you can do it, Im sure :) Mar 23 13:14:20 look it up Mar 23 13:14:22 I've seen it before Mar 23 13:14:24 there are design rules you should follow Mar 23 13:14:25 checkmarks Mar 23 13:14:26 yea sure do it Mar 23 13:14:28 on the CAB Mar 23 13:14:44 let me thing Mar 23 13:14:47 think* Mar 23 13:14:57 what I was thinking of doing was creating another Toolbar, overlaying it over the default one, then doing what I want with that Mar 23 13:14:58 What you could do Mar 23 13:15:03 is go to the manifest Mar 23 13:15:06 since Toolbar is more flexible than ActionBar/CAB Mar 23 13:15:07 and change the logo of the activity Mar 23 13:15:15 to a checkmark Mar 23 13:15:23 but that would be global Mar 23 13:15:26 ohhhh the CAB Mar 23 13:15:34 like here http://developer.android.com/design/patterns/selection.html Mar 23 13:15:36 most of the time I want the back arrow or the hamburger icon Mar 23 13:15:37 MooGoo: no, its the logo of the activity Mar 23 13:15:50 that checkmark Mar 23 13:16:04 I thought you meant to do that on the actionbar Mar 23 13:16:17 yea something like that Mar 23 13:16:21 time wasted successfully Mar 23 13:16:31 but there are other uses of the CAB where I prefer the back arrow Mar 23 13:16:36 Hi!, I'm newbie to android and I'm in this situation: http://stackoverflow.com/questions/12058849/do-i-need-a-content-provider-with-a-cursor-loader , how is the way to do it today? any update? because documentation say one thing (is not needed) but answers say that is a best practice to create ContentProviders and exclude them from public access Mar 23 13:16:38 so I dont want to change it permenantly Mar 23 13:16:46 then look it up, its there in the same page Mar 23 13:17:02 I have...and I cant find a way to change the icon without using styles Mar 23 13:17:12 you got something against styles? Mar 23 13:17:30 its because they're black isn't it Mar 23 13:17:37 well...how would I make it so the icon is a check in some cases and an arrow in others Mar 23 13:17:40 styles are global Mar 23 13:18:24 MooGoo: you can not use ActionBar instead Mar 23 13:18:37 ? Mar 23 13:18:49 just make your action bar a LinearLayout Mar 23 13:19:18 or a Toolbar Mar 23 13:19:23 and you won't be limited by such inconveniences Mar 23 13:19:46 well that's kinda what I was thinking, make my own CAB by creating a new Toolbar and overlaying it on top of the default one Mar 23 13:20:29 How does Google+ detect when a screenshot is taken and where it is saved? Any pointers that I should look into Mar 23 13:20:57 but I was hoping there was an easier way with the CAB Mar 23 13:27:52 hey danijoo: i removed all drawables from my app just to exclude these. After restarting app once i get out of memory error too. The largest memory consumer is some AutoResizeTextwiew now (Also having a lot of them): http://pastebin.com/CY8krKwv Mar 23 13:27:54 can you see something critical there which could cause a leak or what could cause that huge memory ammount? Mar 23 13:32:53 I'm trying to replicate the CardView from the material design docs (http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7ZnNIdWJFUEpFNkU/components_cards10.png). Is that a toolbar used for the buttons or something else? Mar 23 13:39:00 rioch https://developer.android.com/training/material/lists-cards.html Mar 23 13:44:07 memorion: that page just lists some xml and is done. Mar 23 13:44:43 rioch first sentence: "CardView extends the FrameLayout class" you can put whatever you want in there Mar 23 13:45:37 override fun getItemPosition(`object`: Any?) Mar 23 13:45:49 why does kotlin put those ` there? Mar 23 13:45:52 what do they do Mar 23 13:47:39 memorion: I get that. I'm asking how that specific example was done. Mar 23 13:48:50 rioch ok, sorry, probably just textviews Mar 23 13:50:30 rioch, I tried to find the joke in that image... I've been on the internet too long Mar 23 13:55:55 * ReGiStRaS Singapore’s first Prime Minister Lee Kuan Yew dies aged 91 - http://www.channelnewsasia.com/news/singapore/singapore-s-first-prime/1720740.html Mar 23 13:57:16 memorion: how about the grey divider line. How is that achieved? Mar 23 13:57:43 rioch http://stackoverflow.com/questions/5049852/android-drawing-separator-divider-line-in-layout Mar 23 13:57:55 danijoo cause object is a reserved word? Mar 23 13:58:06 memorion: thanks :) Mar 23 13:58:13 and using ` ` you can freetext var names Mar 23 13:58:19 rioch np Mar 23 13:58:20 and even use reserved words Mar 23 13:58:39 There we go Mar 23 13:58:42 IRC at Uni Mar 23 13:58:46 Killing off the last of my productivity Mar 23 13:59:01 In for a penny and all that... Mar 23 14:00:04 yay started my new job today .. still setting up my dev env .. so going to be a bit slow for a bit Mar 23 14:00:33 Hi all. I have a LinearLayout, the width is match_parent. For the height, it must be 1.33 * the width. any suggestions what the easiest / best solution is? Mar 23 14:00:59 lemonxah, wrong channel :) Mar 23 14:01:07 wasnt about java Mar 23 14:01:18 kotlin Mar 23 14:01:27 you were asking about kotlin? Mar 23 14:01:56 I wonder if FrancescoV's problem could be solved using weights. Mar 23 14:02:08 I suspect not... Mar 23 14:02:23 yes. and already figured it out. you are right on reserved word Mar 23 14:02:44 yeah i know :) soz i was a bit late with that Mar 23 14:02:48 wasn't really reading Mar 23 14:02:54 still setting up dev env Mar 23 14:13:25 Using what might be the best web IRC client's I've seen to date. Mar 23 14:13:45 Its just so....clean and pretty. Mar 23 14:14:23 what client? Mar 23 14:14:37 yeah what client? Mar 23 14:14:41 Kiwi IRC: https://kiwiirc.com/client Mar 23 14:15:58 Im usin irssi and i am quite happy though Mar 23 14:16:32 +1 Mar 23 14:16:48 Fair enough - Just seems cluttery. This is very easy to follow. Worth a shot if you have 5 minutes, but by all means use the client you enjoy the most. Mar 23 14:16:52 and installed "shoud" for some of my friends Mar 23 14:17:03 *shout Mar 23 14:17:12 https://github.com/erming/shout Mar 23 14:17:16 I use KVIRC at home, but at Uni I use a web client. Mar 23 14:17:21 Is Kiwi open source (asking because i am too lazy to just google it myself) Mar 23 14:17:27 Hello. In my app, I need a view of a social post + comments under it. I currently have scroll view for the entire thing + listview for comments, nested inside the scrollview. Nesting listview in a scrollview is not a good Idea, so I thought maybe I should put my post as the first item in the comment listvie. I'm not very familiar with layouts, is there any better way than that? Mar 23 14:18:30 Why not have the comments appear in a linear layout, but have some button expanding it changing its visibility from VISIBLE to GONE where necessary? Mar 23 14:18:53 So you have a post, and button that says "Comments", and when they press it you change the comments linear layout from GONE to VISIBLE. Mar 23 14:19:23 creitve: Not really sure. Depends on how you want it to look. I would make the comments be in a seperate window. Another activity or a custom popup like facebook Mar 23 14:20:59 What is wrong with the setVisibility(GONE|VISIBLE) approach? Mar 23 14:21:12 Could even have a floating window appear for collapsing. Mar 23 14:22:12 Usually you dont want to inflate a whole lot of views inside a list view. Just seems to me like it would lagg Mar 23 14:22:29 I have infinite scroll loader Mar 23 14:23:01 You could maybe have the comments load in an AsyncTask when you expand them. This would reduce the lagg Mar 23 14:23:19 Whether or not you inflate a window or change visibility, you will still have the issue of a lot of comments in a listview... Mar 23 14:23:57 But listviews are for a lot of items, aren't they? Mar 23 14:24:21 Not necessarily. Just a collection of items. Mar 23 14:24:52 Correct. But nested ListViews just seem a bit cluttery. That is why i sugest opening a new custom dialog with a list view of the comments Mar 23 14:25:56 Anthaas: should try IRC Cloud Mar 23 14:25:59 No, I currently have a ListView nested in Scrollview. I want to put the main content as a first item in listview, so I could get rid of nested layout and make the listview the root element Mar 23 14:26:19 so there will be no nested listviews Mar 23 14:26:48 I just want comments start where content ends seamlessly Mar 23 14:27:02 JakeWharton: Ooooh, I like the look of that. Nice how images are inflated etc, and I like the fact it has mobile clients. Mar 23 14:27:40 Not sure if i follow. From what i understand you have a ScrollView with posts and each post has a ListView with comments or are you just showing one post? Mar 23 14:28:25 no, the entire thing is the "detailed view of one post". post's contents and comments Mar 23 14:28:35 Aaah i c Mar 23 14:30:20 Not really sure how other apps does it. Could be just one list view with the first item being the actuall post Mar 23 14:30:29 creitve, btw, ListView can have a HeaderView and a FooterView Mar 23 14:30:42 those two are separate from content and are meant for your exact usecase :) Mar 23 14:30:56 Mavrik: Aren't they fixed in-place? Mar 23 14:31:00 nop Mar 23 14:31:20 Okay, I feel silly now. Thanks, I will start from there. Mar 23 14:31:21 Ah there you have your answer. Nice one Mavrik! Mar 23 14:32:13 I actually have a full fragment as a header view in one app and works ok :) Mar 23 14:32:38 the only limitation is that I think you have to set it before you set the adapter Mar 23 14:33:00 Cool. The more you know :) Mar 23 14:33:16 Thanks, guys/gals! Mar 23 14:39:22 sorry for ask it again, but.... Mar 23 14:39:26 I'm newbie to android and I'm in this situation: http://stackoverflow.com/questions/12058849/do-i-need-a-content-provider-with-a-cursor-loader , how is the way to do it today? any update? because documentation say one thing (is not needed) but answers say that is a best practice to create ContentProviders and exclude them from public access Mar 23 14:40:04 content providers and cursor loaders suck Mar 23 14:44:58 why? seems a "good practice" Mar 23 14:47:53 because a cursor loader doesn't buy you anything Mar 23 14:49:03 Not true, it once got me a beautiful dress. Mar 23 14:49:52 jaja Mar 23 14:50:46 for me it could free me lot of work Mar 23 14:51:08 but seriously, is recommended ? Mar 23 14:51:15 yeah but it's like selling your soul to a sugar daddy Mar 23 14:51:31 cursor loaders add work Mar 23 14:52:14 so why android developers guides say that is not needed to create a ContentProvider for the current app? Mar 23 14:52:38 well.... Is "not needed" but "recommended" should say? Mar 23 14:52:43 and yes, cursor loaders only work with content providers Mar 23 14:53:24 hey, I'd like some input on what navigation patterns to use for my application Mar 23 14:53:34 it's documented to require a content provider explicitly Mar 23 14:53:37 Standard Android Navigation please. Mar 23 14:53:49 it's an application for students and teachers to view their schedules Mar 23 14:54:03 I don't want to load a bunch of apps from Google Play where back does a different thing each time. Mar 23 14:54:15 so there's an activity to select your class, and there needs to be a way to select a week Mar 23 14:54:54 I was thinking about a floating action button that opens a dialog to jump to a specific week in addition to swipe gestures, but I have no idea what to use for the class selection Mar 23 14:55:21 http://developer.android.com/guide/topics/providers/content-provider-creating.html -> "Before you start building" -> point 1, "You don't need a provider to use an SQLite database if the use is entirely within your own application. " Mar 23 14:55:40 feathersanddown, that says nothing about cursor loader Mar 23 14:56:42 feathersanddown, what you pasted doesn't contradict anything Mar 23 14:57:04 cursor loader requires a content provider Mar 23 14:57:26 using a content provider is a crappy experience if ipc is not involved Mar 23 14:59:46 but when creating a CursorLoader it need an URI, that URI is defined inside a ContentProvider Mar 23 15:00:05 YOU DO NOT USE CURSORLOADER WITHOUT A CONTENT PROVIDER Mar 23 15:01:53 * ReGiStRaS Singapore’s first Prime Minister Lee Kuan Yew dies aged 91 - http://www.channelnewsasia.com/news/singapore/singapore-s-first-prime/1720740.html Mar 23 15:02:18 uhm.. so how to fill a ListView with database data ? Mar 23 15:02:26 ReGiStRaS that didn't belong here the first time you posted it Mar 23 15:04:08 he wants another moment of silence Mar 23 15:06:41 I have a list view with progress views in it. I'm receiving a broadcast intent every 1/5 of a second and updating the views + some text, but the view is only redrawing about every 2 seconds on my phone. Is there some trick I'm not getting? Mar 23 15:07:14 because https://developer.android.com/guide/topics/ui/layout/listview.html say that the standard way is to load data using CursorLoader... to use CursorLoader must exists a ContentProvider too Mar 23 15:07:42 feathersanddown: Have you tried Googling this? Mar 23 15:07:49 yes Mar 23 15:07:51 Really? Mar 23 15:08:04 in stackoverflow appear links to same question Mar 23 15:08:41 http://www.vogella.com/tutorials/AndroidSQLite/article.html <--- here is an example that use content provider Mar 23 15:08:45 So your search went: Google -> First StackOverflow Result -> Cant do it -> IRC Mar 23 15:09:45 feathersanddown, cursoradapter Mar 23 15:09:53 Because I found a number of tutorials without using ContentProvider straight away Mar 23 15:10:00 Exactly the same result pfn just gave. Mar 23 15:10:03 On exactly the same website. Mar 23 15:10:07 Its like you just didn't look. Mar 23 15:10:08 http://www.vogella.com/tutorials/AndroidListView/article.html#cursor Mar 23 15:10:26 yes but my question is how is the prefered way to use it Mar 23 15:10:42 This way. Mar 23 15:10:49 directly to database? or using content providers ? Mar 23 15:10:56 pfn said several times that content providers are bad Mar 23 15:11:23 Do it using CursorAdapter. Mar 23 15:11:25 There. Mar 23 15:11:26 some people just refuse to accept the correct answer Mar 23 15:11:27 haha Mar 23 15:11:28 yes use content providers only when you have to Mar 23 15:11:29 but why? because "doesn't buy me anything"? is that an answer ? Mar 23 15:11:33 Yes Mar 23 15:11:40 You get nothing extra from doing the extra work. Mar 23 15:11:44 So why would you? Mar 23 15:12:28 Content providers work better when you need to share data between processes, right? Mar 23 15:12:30 but you say that are bad because are bad designed? are bad because is not useful? or is not proper to fill ListView only Mar 23 15:12:45 Im going to need a new keyboard shortly. Mar 23 15:12:54 My head wants to attack it haha Mar 23 15:13:29 feathersanddown: Use CursorAdapter, it is easier to develop/maintain, you get nothing out of doing the extra work with a ContentProvider. Mar 23 15:13:39 CursorAdapters take a Cursor object. Mar 23 15:13:53 CursorAdapter are to show data using layouts, not to fetch data from Mar 23 15:13:56 A cursor object can hold the result set from an SQL query. Mar 23 15:14:04 READ THE LINK I GAVE YOU!!!! Mar 23 15:14:46 Someone's got a case of the Mondays. Mar 23 15:15:00 Yep hahaha Mar 23 15:15:17 Its a stupid day of the week and whoever invented it should be sacked. Mar 23 15:15:38 managedQuerys are deprecated or not? Mar 23 15:15:59 Wouldn't then be Tuesday the stupid day? Mar 23 15:16:11 Yup Mar 23 15:16:16 Then we'd just be left with the weekend. Mar 23 15:16:24 Which would be really cool Mar 23 15:16:30 To top it off, someone keeps ringing someones desk until the phone cuts out when the person isn't at their desk. Mar 23 15:16:37 They havent been at their desk for the past 2 hours Mar 23 15:16:40 BUT IT DOESNT STOP THEM RINGING! Mar 23 15:16:48 What's the difference between "Android Instrumentation Tests" and "Unit Tests" in Android Studio 1.1? What can you do in one that you can't do in the other? Mar 23 15:17:09 eghdk, on device vs not Mar 23 15:17:11 I had this situation one time, I've simply pulled out the cord out of the phone Mar 23 15:17:22 the latter cannot use android api Mar 23 15:17:37 good reason to bring out the baseball bat Mar 23 15:17:37 feathersanddown: http://developer.android.com/reference/android/app/Activity.html#managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String) Mar 23 15:17:47 Read. It says "This method was deprecated in API 11 Mar 23 15:17:51 You aren't even trying now. Mar 23 15:18:29 shmooz: You'd think the numerous "This person isn't at their desk, we will get them to call you when they are" would help. But nope. Mar 23 15:18:50 I need a mint. Mar 23 15:18:56 hey can i change time zone to millis ? for example gmt +5 or gmt + 3.3 to millis Mar 23 15:19:05 Trebor Extra Strong. Mar 23 15:19:17 sci-fic, timezone offset Mar 23 15:19:37 Anthaas: can you be more polite please? Mar 23 15:19:37 it gives me really long result Mar 23 15:19:44 is it normal ? pfn Mar 23 15:19:50 feathersanddown: You aren't even trying to help yourself though. Mar 23 15:19:54 tutorial you gave me use a deprecated function Mar 23 15:19:58 sci-fic, yes Mar 23 15:20:02 Find an alternative tutorial? Mar 23 15:20:07 that also uses CursorAdapter Mar 23 15:20:12 When I create a new app in Android Studio, isn't it supposed to be able to be played directly without compile errors? Mar 23 15:20:14 Hmm, getting JAVA_HOME / jdk dir isnt correct error while starting AS, eg http://i.imgur.com/4znR8YG.png Mar 23 15:20:31 lord_rob: if you use one of the templates, yeah. Mar 23 15:20:33 Just updated from Preview 2 to 3 Mar 23 15:20:40 feathersanddown: https://www.google.co.uk/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=CursorAdapter+tutorial+android Mar 23 15:20:40 So it worked before, didnt update java Mar 23 15:20:48 lord_rob: that's RUN not PLAY Mar 23 15:20:50 pfn: So unit tests can't use Android API? But the unit tests run on local jvm? Mar 23 15:21:01 yes Mar 23 15:21:03 Hey everyone! Mar 23 15:21:10 yo Mar 23 15:21:31 How's the world of android development?! Mar 23 15:21:46 goin alright Mar 23 15:21:58 pfn: Can I unit test to make sure that a resource string .equals("App name")? Or that would be the perfect example of doing something in an instrumentation test? Mar 23 15:22:05 Moter8: Should JAVA_HOME really point to the bin directory? Mar 23 15:22:06 Anthaas: have you ever used CursorAdapter ? Mar 23 15:22:09 eghdk, latter Mar 23 15:22:14 Yes. Mar 23 15:22:32 Moter8: it should be the dir above bin. Mar 23 15:22:35 how do you fetch data using CursorAdapter ? Mar 23 15:22:38 gahh Mar 23 15:22:46 Not sure what changed it then Mar 23 15:22:56 Thanks. Mar 23 15:23:03 okay, so pfn unit tests are really just basic method/class tests that run locally. Mar 23 15:23:12 yes Mar 23 15:23:33 Hmm I wonder why there is no changetip for irc Mar 23 15:23:38 shmooz: yeah that's what I wanted to say Mar 23 15:23:39 feathersanddown: I'm not helping you any more. Mar 23 15:23:43 (or there is and I havent seen it yet) Mar 23 15:23:55 feathersanddown: The very FIRST result of that Google Search link I sent you has an example of how. Mar 23 15:23:58 feathersanddown: Put your question into a google search field Mar 23 15:24:02 You are not reading, you just want us to write the code for you. Mar 23 15:24:18 Anthaas, probabbly he's trying to troll Mar 23 15:24:20 * Anthaas rocks backwards and forward. Mar 23 15:24:21 any input on my navigation problem? (should I ask again?) Mar 23 15:24:50 ask again Mar 23 15:25:00 Darkwater: If you mean how should you implement application navigation, then please leave it to Android to do that. Mar 23 15:25:17 I rarely see a good enough reason to modify the default Mar 23 15:25:18 no, it's about navigation patterns, ie. where to place buttons etc Mar 23 15:25:20 AND THE PHONE IS RINGING AGAIN! Mar 23 15:25:42 I'd like some input on what navigation patterns to use for my application Mar 23 15:25:42 it's an application for students and teachers to view their schedules Mar 23 15:25:45 Initech Enterprizes, How may I help you ? Mar 23 15:25:45 Initech Enterprizes, How may I help you ? Mar 23 15:25:45 Darkwater, use some android apps then decide Mar 23 15:25:47 Initech Enterprizes, How may I help you ? Mar 23 15:25:47 so there's an activity to select your class, and there needs to be a way to select a week Mar 23 15:25:50 I was thinking about a floating action button that opens a dialog to jump to a specific week in addition to swipe gestures, but I have no idea what to use for the class selection Mar 23 15:26:05 pfn: I've never really seen a (decent) application like this Mar 23 15:26:11 no reason to use fab Mar 23 15:26:25 Okay pfn last question. Any reason why I CAN create unit tests for Activity class? I guess it doesn't actually do anything with Android api, so it'll allow me to test methods that may have nothing to do with Android api? Mar 23 15:26:26 Darkwater: a list view? Mar 23 15:26:31 How about when they select a class, a date dialog pops up, whatever date they pick, it opens that week? Mar 23 15:26:40 eghdk, huh? no Mar 23 15:26:46 feel free to not answer, sorry not to be so smart as you. I'm will try to read the whole internet to find the answer. I really apreciate your time, I'm new to this and all answer are welcome Mar 23 15:26:58 Anthaas: I think it should default to the current week. besides, the schedule is the main view of the application Mar 23 15:27:09 pfn: any other suggestions then? Mar 23 15:27:20 feathersanddown, read eric raymond's smart questions guide Mar 23 15:27:25 gauthierm: it's a grid-ish view, similar to the calendar app Mar 23 15:27:40 feathersanddown: the internet starts a A.com, let us know when you're finished Mar 23 15:27:41 Darkwater: without pictures it's hard to make suggestions :) Mar 23 15:27:57 feathersanddown: Its none of the things you have just said. Its the fact you were given an answer numerous times, and chose to ignore it. You were then given links to tutorials which answered your questions, and you never read those. then you read them and found an issue and rather than looking for a similar more recent tutorial you asked again, an Mar 23 15:27:58 d then when given the google results, you didnt even read the top result Mar 23 15:28:08 gauthierm: coming up Mar 23 15:28:08 shmooz: HAH! I'll remember that one! :P Mar 23 15:28:25 gauthierm: http://novaember.com/s/298643292.png Mar 23 15:28:35 that's how it looks right now Mar 23 15:28:38 pfn: He will come back asking does anyone know of a good questions guide. Mar 23 15:28:41 I want to get rid of the appbar spinner Mar 23 15:29:01 Darkwater: How about when they select a class, a date dialog pops up, whatever date they pick, it opens that week? Mar 23 15:29:14 Anthaas: I think it should default to the current week. besides, the schedule is the main view of the application Mar 23 15:29:20 does anyone know of a good questions guide ? Mar 23 15:29:32 pfn: Told ya so. Mar 23 15:29:55 A troll. Now all my anger has just faded. Mar 23 15:30:10 Wheres that ringing phone - I sort of miss it now. Mar 23 15:30:11 class selection only pops up on first run, and when the user wants to select another class Mar 23 15:31:55 Darkwater: so from this screen you need to be able to pick an arbitrary week and it refreshes the screen with the selected week? Mar 23 15:32:13 exactly Mar 23 15:32:29 How many weeks are there? Mar 23 15:32:30 and there should also be an option to select another class Mar 23 15:32:47 limited; probably only the current school year Mar 23 15:33:02 so from like 2014/40 to current Mar 23 15:35:49 pfn: why would a fab not be a good idea for this? Mar 23 15:35:54 Darkwater: I'd make the back button (and appbar back icon) go to a previous activity where you select the class Mar 23 15:36:10 I'd imagine it's about as frequent as adding new files to google drive Mar 23 15:36:24 Darkwater: and make the menu thingy in the app bar select the week or put a button at the top of the schedule to select the week. Mar 23 15:36:52 Using the fab for navigation seems wrong. Mar 23 15:36:56 Darkwater: why not just a listview for both class and week Mar 23 15:37:22 I see Mar 23 15:37:44 Darkwater: or you could use a dropdown spinner for one of them Mar 23 15:37:57 shmooz: the problem is not how to display the week selection, it's how to initiate the action of changing weeks Mar 23 15:37:59 and a listview for the other Mar 23 15:39:24 well I currently have an appbar spinner, but it's kind of annoying Mar 23 15:39:27 also deprecated Mar 23 15:40:18 Why not display the schedule for their class, and have an action in the actionbar that says "Change Week", at which point display a DatePicker Dialog, and let them change. OnDateSelected (or whatever) refresh. Mar 23 15:41:09 fab isn't a navigation tool Mar 23 15:41:15 it's an /action/ Mar 23 15:41:17 yeah, I guess that'd be best Mar 23 15:41:38 Fab? Mar 23 15:41:41 pfn: I see your point Mar 23 15:41:47 floating action button Mar 23 15:41:51 Ahh Mar 23 15:42:05 Id go with what I just said anyway. Mar 23 15:45:39 pfn: I created a bunch of testclasses for unit testing. How do I run them. I was able to run each class 1 by 1, but right clicking and then "Run UtilUnitTest" but there has to be a way to batch them right? Mar 23 15:45:55 eghdk, create a run config Mar 23 15:47:01 Okay, that's just another jUnit file that I create right? Or is there some gui way to do it (multi select test files or something?) Mar 23 15:47:50 Hello, when I register debug and beta release in API keys my package name has com.my.project.beta and com.project.debug - question: will release wrsion have .release at end of it ? Mar 23 15:48:05 eghdk, press the drop down next to the run button... Mar 23 15:48:14 vegetablesalad19, yes Mar 23 15:48:24 Right, Im off to meet with my supervisor to remind myself how thick I am. See you all later! Mar 23 15:48:51 pfn: Oh. so just "Edit Configurations"? Mar 23 15:48:56 AIzaSyCm-cJhktBq0h4nKtZ29Word4SOMXXpRjw, thank you Mar 23 15:49:22 eghdk, yes Mar 23 15:52:46 sweet thanks pfn. big help Mar 23 15:53:27 Is it a standard to possibly just run unit tests while building your apk pfn ? Is there a way to say, Mar 23 15:53:38 run all unit tests, before compiling my build apk? Mar 23 15:57:38 also, pfn is there anyway to see ALL of my unit test configurations? Mar 23 16:00:43 do I need opengl v2 to use google maps v2 ? I set it to GL 1 and it still seems to work on my nexus, I dont have any phones with open-gl 1 to test on Mar 23 16:02:33 vegetablesalad19, yes Mar 23 16:02:42 Maps v2 use OpenGL ES 2.0 Mar 23 16:02:51 Phones without OpenGL ES 2.0 probably don't exist anymore Mar 23 16:03:05 At least they're certanly not capable of running Android 3.0+ Mar 23 16:03:27 Mavrik, thanks, good to hear that Mar 23 16:03:55 vegetablesalad19, I actually doubt that there is a phone that has Android 2.3 and no OGL 2.0 support Mar 23 16:05:09 my app works from api 9+ , I think that's 2.3.3. When publishing beta it told me that open gl 2 removes 23 devices Mar 23 16:06:02 I wouldn't worry about that. Mar 23 16:06:12 Current practice is doing API15 or API16 anyway Mar 23 16:06:23 so there are 23 devices with android 2.3 and open gl 1, but yes, I'm not worried about that Mar 23 16:07:13 Mavrik, well my country has bit lower conversion rate, so I have quite a lot old phones for my app Mar 23 16:07:36 mhm, more than 25%? Mar 23 16:08:07 2.3 - 4 is about 14% Mar 23 16:08:56 yep, I have an app where 2.3 just went down to 9,8% Mar 23 16:08:59 and I had 150 2.2 clients :) Mar 23 16:09:19 probably still have like 200 Nokia symbian customers :P Mar 23 16:10:12 Happy to see 15% 5.0, 5.1 Mar 23 16:11:08 ok, shared wisdom of #android-dev Mar 23 16:11:21 good reason to NOT checking signing key into private company Git repo? Mar 23 16:11:26 when doing release by CI? Mar 23 16:13:17 I have it up in repo Mar 23 16:16:17 same here ^^' Mar 23 16:19:53 eghdk, what configurations unit tests don't have Mar 23 16:21:43 hey guys does anyone know how to force an application to cache mode. I'm trying to simulate what happens when you leave an app in the background for a while and come back to it, except that i want to control when it happens to replicate a few crashes i've been getting when the app caches Mar 23 16:22:00 Mavrik, key management dictates, private keys must be under strict lockdown Mar 23 16:22:12 Mavrik, limited access, etc. all that buzzx Mar 23 16:22:17 fb go to developer options Mar 23 16:22:20 of course, if you don't care about security Mar 23 16:22:25 hmm Mar 23 16:22:25 and check "dont keep activities" Mar 23 16:22:30 danijoo: ty Mar 23 16:22:37 pfn, it's a demo app not meant for publish or release :) Mar 23 16:22:49 in that case, who cares, just release debug signed Mar 23 16:30:51 noo, the trello update ditched all the material icons in the toolbar Mar 23 16:30:51 pfn: I tried adding AssertJ but compiling always fails. Ideas? Mar 23 16:31:02 no Mar 23 16:31:08 I don't read minds nor have clairvoyance Mar 23 16:31:57 Just including normal assertJ should work though... right? It should just play nice with gradle? Just asking because I'm curious if you have used it. Mar 23 16:34:16 Hey guys. If I shutdown and reopen an android emulator (similar to a reboot) shouldn't the contents of RAM have vanished ? Mar 23 16:35:41 eghdk, presumably yes Mar 23 16:35:51 cnap, depends if you have snapshoting on Mar 23 16:38:13 Mavrik, at my emulation options the checkbox Snapshot is not checked Mar 23 16:54:34 Trying to use AssertJ. Getting this error msg. Ideas? Warning:Gradle: org/assertj/core/api/Assertions.class(org/assertj/core/api:Assertions.class): major version 51 is newer than 50, the highest major version supported by this compiler. Mar 23 16:57:22 AssertJ 2.0 targets Java 7 Mar 23 16:57:35 you are using JDK 6 (and presumably targeting Java 6) Mar 23 16:57:40 use JDK 8 and target Java 7 Mar 23 16:57:54 Ah. So my project has to be changed to target j7 as well? Mar 23 16:58:06 yes Mar 23 16:58:13 the tooling supports most of Java 7 Mar 23 16:58:39 Where do I make these changes? JakeWharton ? Mar 23 16:58:58 It's not in my build.gradle? Mar 23 16:59:31 https://github.com/JakeWharton/u2020/blob/07a5464da7b99e788d8b603f3d1060d681f6bebf/build.gradle#L84-L87 Mar 23 17:00:19 SoOkay, I wouldn't change the JDK location in Studio JakeWharton ? Mar 23 17:00:43 no Mar 23 17:00:49 it depends on what JDK you are building with Mar 23 17:00:52 hopefully it's 8 Mar 23 17:01:10 My JDK location is set to 1.6.0 Mar 23 17:01:20 ugh, wtf does intellij keep suggesting that I use Object.equals when I want to replace == with equality Mar 23 17:01:22 So I would set that to JDK 8 location? Mar 23 17:02:23 er, Objects.equals Mar 23 17:02:24 ugh Mar 23 17:03:03 oh, set language level to 6 Mar 23 17:03:08 level 7 has objects, meh Mar 23 17:04:49 java has objects? no wai Mar 23 17:10:07 Hello, trying to apply a span to a button... No go. What am I missing? Mar 23 17:11:30 http://pastebin.com/4NieqWpZ Mar 23 17:11:52 and I set the button's android:bufferType="spannable" Mar 23 17:14:52 I swear I was able to run my tests last week Mar 23 17:15:16 now robolectric is telling me it can't run api 22, even though my emulated sdk is set to 19 Mar 23 17:15:36 @MikeWallace did you apply AbsoluteSizeSpan in your Spannable to make different size of Text in same content?? Mar 23 17:16:42 how do you update a snapshot library with gradle? Mar 23 17:16:51 Why doesn't the postData function here work?: https://github.com/Chetic/Phishpic/blob/master/app/src/main/java/com/phishcave/phishpic/CameraPreview.java#L145 I'm trying to replicate this very simple form: http://phishcave.com/dumb Mar 23 17:17:08 I get a 500 internal server error, and I don't have access to the server Mar 23 17:17:18 but the form works so I just need to know what my app is doing differently from it Mar 23 17:18:20 http://i.imgur.com/D0sdshv.png Hmm any idea? System variables are trolling me Mar 23 17:18:26 path should be correct Mar 23 17:19:43 Moter8: did you restart yet? Mar 23 17:19:53 at the very least you should close and reopen the program Mar 23 17:20:01 cmd should pick up user variable changes after that Mar 23 17:20:05 restarted cmd. Mar 23 17:20:27 So many people on so just want you to spoon feed them. its ... saddenning and irratating Mar 23 17:20:42 @MikeWallaceDev did you apply AbsoluteSizeSpan in your Spannable to make different size of Text in same content?? Mar 23 17:20:45 spoon feeding is how babies grow to adults Mar 23 17:20:46 c:\Users\Carsten\AppData\Local\Android\sdk\platform-tools> adb works fine Mar 23 17:20:49 spend like a good half hour answering someone's question providing a clear example, and they are like but how do i do it for me me me me Mar 23 17:20:50 :( Mar 23 17:21:15 Moter8: give it a restart dude maybe it'll work after that Mar 23 17:21:18 windows is weird sometimes Mar 23 17:21:26 rajjo, I did not. Mar 23 17:21:52 PowerShell doesnt see anything either Mar 23 17:22:08 rajjo, the button the apply the actual text ("Italic") but does not apply the style... Mar 23 17:22:09 Moter8: did you restart your computer yet? Mar 23 17:22:18 no, I cant right now Mar 23 17:22:41 there's a high chance it'll pick up the variable after a restart Mar 23 17:22:59 is that the only path in your Path variable? Mar 23 17:23:05 to the build tools directory? Mar 23 17:23:26 if you have more than 1 path in the variable it has to be semi-colon delimited Mar 23 17:23:35 c:\path1;c:\elsewhere\path2 Mar 23 17:23:35 yeah i did that Mar 23 17:23:53 c:\Users\Carsten\AppData\Local\atom\bin;C:\Users\Carsten\AppData\Local\atom\bin;c:\python;c:\ant\bin;c:\Program Files\Java\jdk1.7.0_76\bin;C:\Users\Carsten\AppData\Local\Android\sdk\tools;C:\Users\Carsten\AppData\Local\Android;c:\Users\Carsten\AppData\Local\Android\sdk\platform-tools Mar 23 17:23:56 ugh Mar 23 17:24:12 first one is redundandt Mar 23 17:24:56 python, ant, java work fine it seems Mar 23 17:25:21 try taking out all the other paths except the platform tools one for now Mar 23 17:25:24 and see if that'll work Mar 23 17:26:42 MikeWallaceDev, try out this link http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview Mar 23 17:27:55 rajjo, which answer? Mar 23 17:28:19 the very first answer Mar 23 17:28:41 mBox.setText(Html.fromHtml("" + title + "" + "
" + "" + description + "" + "
" + "" + DateAdded + "")); Mar 23 17:28:58 that doesn't use Spannables... Mar 23 17:29:19 I'm trying to apply my spannable to a Button. I can't see why it's not working. Mar 23 17:29:22 does someone know if its possible to move a view above the top boundary of a listview? Mar 23 17:29:35 yes it does not .. its a way to use different styles in a button . thats what you are aiming for right ? Mar 23 17:29:38 Button derives from TextView. It should work the same. Mar 23 17:29:47 okay.. Mar 23 17:29:58 nope, i'm aiming to apply a spannable on a button :D Mar 23 17:30:21 i got your question wrong then , sorry Mar 23 17:30:41 for an event bus, should I put my events in a subdirectory within my com.yadayada.yada directory? Mar 23 17:30:49 what is common practice? Mar 23 17:31:00 no problem rajjo , thanks for looking at it :) Mar 23 17:31:10 (y) Mar 23 17:31:15 mention not Mar 23 17:31:24 too late, I did! :D Mar 23 17:31:50 I see examples on the net, I'm writing the same code... I'm perplexed. Mar 23 17:42:22 Html generates spanned stringd Mar 23 17:43:10 does anyone know of a library for ratings (stars, etc.) aside from the native star rating widget? It's not customizable enough for my needs. Mar 23 17:43:22 buffer type is always implicitly spanned Mar 23 17:58:13 Hi all, I'm trying to create a search function in the action bar of my app. I currently have it to expand upon clicking the search icon but I cannot get the keyboard to open automaticaly. Mar 23 17:58:36 I've tried to requestFocus and a few other things that I've found online, any suggestions? Mar 23 18:00:40 CSI you can try http://pastebin.com/thzh1gyv Mar 23 18:00:43 works most of the time for me Mar 23 18:01:14 I'll try that now, thanks. Mar 23 18:01:21 *you might have to add a dummy transparent edittext to pass as Mar 23 18:01:28 I'm using an AutoCompleteTextView, assuming that won't be a problem? Mar 23 18:01:32 is the SearchView widget unable to use the back button properly when attached to a Toolbar that is not set as the Action Bar Mar 23 18:01:44 CSI just change the final EditText to whatever Mar 23 18:01:48 i have no idea Mar 23 18:01:56 Usually the SearchView uses the back button to cancel, but when attached to an arbitrary Toolbar it does not seem to Mar 23 18:02:07 CSI should work since edittext is parent, no need to modify Mar 23 18:02:19 Ok great I will try that and report back Mar 23 18:02:25 MooGoo how would it know? just override on back Mar 23 18:02:36 I am looking for a simple android project that makes simple use of retrofit. Anyone got one? Mar 23 18:03:05 well I was hoping for the automatic functionaltiy to work Mar 23 18:03:14 it works when attached to an action bar Mar 23 18:03:30 there’s one in the samples, it’s not an android one but you can pretty much copy paste it in your app and it will work Mar 23 18:03:42 hmm, what's a good pattern for encapsulating binary flags Mar 23 18:04:02 I'm using retrofit to talk to a rest server. I have different kinds of get requests going on (some for some data, other data, other data, in different activities). Is it better to use one rest client or should i split it into each? Mar 23 18:04:17 In particular, I need to archive the log of some of the calls, but not others. Mar 23 18:04:57 lasserix_ it worked, thank you! Mar 23 18:07:08 pfn does Gravity class use any? Mar 23 18:07:27 lasserix_, gravity has no encapsulation Mar 23 18:12:08 pfn use enum? Mar 23 18:12:30 enum isn't flags Mar 23 18:13:24 EnumSet Mar 23 18:14:22 Effective Java, Item #32 :D Mar 23 18:14:23 yeah, not quite, looking to encapsulate binary flags Mar 23 18:14:33 in a redesign, that might work Mar 23 18:15:19 if ferengi wrote java.. Mar 23 18:15:57 there would be a Currency class Mar 23 18:16:15 danijoo, hi Mar 23 18:16:17 oh lol, there is Mar 23 18:16:20 And many rules of effective java. Mar 23 18:16:36 you use this library danijoo, don't you : https://github.com/futuresimple/android-floating-action-button Mar 23 18:17:00 I am unable to import it given the gradle line provided under Usage Mar 23 18:17:33 the issue that's coming up is an issue you've already helped another user with some time ago here https://github.com/futuresimple/android-floating-action-button/issues/42 Mar 23 18:18:53 hmm tried using jitpack? Odaym Mar 23 18:18:55 claint: https://github.com/JakeWharton/u2020 Mar 23 18:19:02 jitpack? Mar 23 18:19:05 let me see Mar 23 18:19:18 compiles github repos and lets you gradle them Mar 23 18:19:24 but it makes no sense that this won't import, it's probably just a wrong version number that the guy placed on Usage Mar 23 18:19:37 too much learn Mar 23 18:19:43 uh no Mar 23 18:20:02 can you rely on the guy having the repo in the appropriate shape to be gradled? Mar 23 18:20:11 https://jitpack.io/#futuresimple/android-floating-action-button/1.9.0 Mar 23 18:20:29 Not sure what the guy is doing (wrong) :| Mar 23 18:21:06 not sure if I can debug by removing all others and keeping his, all sorts of compile errors will arise Mar 23 18:21:24 but Im sure that it isnt a conflicting dependencies issue because I know what those errors say Mar 23 18:22:07 Odaym I used it like 2 days ago (removed it swiftly) and it worked fine using the line in usage Mar 23 18:22:22 hmmm wait Mar 23 18:22:42 the guy says that he builds on floating action button library by melnykov, the bare one Mar 23 18:22:55 and I also have that in there, I think that maybe it Mar 23 18:23:07 I used both the other day with no issues Mar 23 18:23:13 JakeWharton: when using Retrofit in android app. If I have disparate network requests to make (totally unrelated) should I access them through same singleton? Specifically, I need archive the logs from one set of calls, so I wanted to implement a logger for that set and just have those call go through one rest adapter and the other go through a common one, or their own. Mar 23 18:23:13 then what! Mar 23 18:23:24 can you do it now CSI? Mar 23 18:23:28 just one line can you try? Mar 23 18:23:37 compile 'com.melnykov:floatingactionbutton:1.2.0' & compile 'com.getbase:floatingactionbutton:1.9.0' Mar 23 18:23:39 nvm im sure it will work with you anyways Mar 23 18:23:40 I'll try for you sure Mar 23 18:24:49 runs fine Mar 23 18:25:05 can you show me the gradle file? Mar 23 18:26:10 http://pastebin.com/e0HWxThK Mar 23 18:27:18 maybe minSDK needs 15? Mar 23 18:27:52 "This library is minSdkVersion=14 and if that changes, the version number will be increased, not decreased." Mar 23 18:28:20 that's not his library, that's the other guy's library that is maintained for that lower version specifically, no? Mar 23 18:28:38 oh, no nvm Mar 23 18:28:58 No that is his Mar 23 18:29:05 same error Mar 23 18:29:10 lasserix_: it's reasonable to make multiple RestAdapters provided they aren't created multiple times Mar 23 18:29:38 Hmm, odd Mar 23 18:29:48 lasserix_: and since logging is tied to the RestAdapter you probably have no choice Mar 23 18:29:53 im sure its an obvious thing but where is it Mar 23 18:29:58 JakeWharton: thanks Mar 23 18:31:05 let me try it in a separate project Mar 23 18:33:07 what version of build tools do you have CSI Mar 23 18:33:09 coursera android development course starts on 25 march, does someone is going to take the classes? Mar 23 18:35:05 buildToolsVersion "21.1.2" Mar 23 18:35:25 it was a build tools version issue Mar 23 18:35:35 its fine now Mar 23 18:35:36 thanks Mar 23 18:35:40 You're welcome Mar 23 18:36:11 I get this error when trying to use DDMS Mar 23 18:36:16 to upload files to emulator Mar 23 18:36:17 "Failed to push selection: Permission denied" Mar 23 18:45:25 How long should the android emulator in android studio take to load? Mar 23 18:45:38 I keep getting nothing but a black screen Mar 23 18:45:49 Also ""It can take a few minutes for the emulator to load itself. You may have to unlock the screen. When you do, My First App appears on the emulator screen.""" Mar 23 18:46:03 How do I unlock the screen Mar 23 18:46:05 install HAX Mar 23 18:46:12 then run it again, it should be much better Mar 23 18:46:56 why did you remove that lib, CSI Mar 23 18:47:20 You mean HAXM? Mar 23 18:47:26 yes rexbutler Mar 23 18:47:40 Didn't really need the functionality. I was thinking about having a floating button menu but once I implemented it I didn't like it at all Mar 23 18:48:12 JakeWharton: I saw that Square Cash was a payment method for a food truck at a beer festival in Tupelo, Mississippi. That led me into a discussion with my tipsy non-programmer buddies about how awesome Square is for the Android community. lol, I'm sure they didn't totally get my excitement Mar 23 18:49:01 theblang, open Uber and Trello, go to the About page > software licenses Mar 23 18:49:18 you will be amazing'ed Mar 23 18:50:40 Odaym: dling Trello now, been meaning to get it anyway (started using it for a side project) Mar 23 18:50:46 This may be a stupid question, but will a textview automatically expand to fit the content within it? Mar 23 18:51:00 Uber has it too Mar 23 18:51:12 with this new app im working on at work im going to add a similar page Mar 23 18:51:15 everyone should Mar 23 18:51:31 t0astt: isn't that what using wrap_content as width and height does? Mar 23 18:51:40 you can get 6 months trello gold here https://www.appsumo.com/trello-freebie/buy/ Mar 23 18:52:00 Odaym don't certain licenses require a page like this? even google now does it Mar 23 18:52:05 myke: I have my textview (in the android studio designer) as wrap_content, however it's not wrapping the content, it has a static size Mar 23 18:52:45 I dont trust that page. Trello gives gold all the time, last time was a week ago just for tweeting something they written they gave you gold Mar 23 18:52:46 Hi!, letters items in a ListView appears lighter and can't view correctly with the white background, I'm using "@android:style/Theme.Holo.Light" in manifest file, what else I must check? Mar 23 18:53:08 memorion, Odaym Nice, yeah I want to beef up our about page some. I created one currently to at least cite the material design icons Mar 23 18:53:22 and Picasso... Mar 23 18:53:27 and many other things :P Mar 23 18:53:54 t0astt: check the enclosing container, and then mess with it. if i've learned anything about android layout elements its that they don't work like you might think. Mar 23 18:53:57 theblang trello just stopped using the material icons :( Mar 23 18:54:11 myke: yeah, it seems to have reset itself now. weird. but thanks! Mar 23 18:55:17 Am I the only one that doesn't like the new search bar on google play? Mar 23 18:57:46 CSI: almost definitely. it has been proven to be the optimal search experience in all situations by this algorithm: `public boolean isOptimal(Object thing) { /* TODO */ return true; }` Mar 23 18:58:18 lol Mar 23 18:59:26 lol groxx Mar 23 18:59:28 funneh Mar 23 19:00:28 Is it possible to select an area to draw from drawText ? I mean from : canvas.drawText(charString, width, height, textPaint); to draw just a portion Mar 23 19:01:28 if it draws letter "E" I need just the 2nd half of it . Mar 23 19:03:37 SO is making profiles liked LinkedIn Mar 23 19:04:07 they send you an email telling you how much they love you and how SO would not have been the same without you and your contributions Mar 23 19:04:13 I loled Mar 23 19:04:38 bbl Mar 23 19:05:44 Hello Everyone Mar 23 19:07:24 if I'm interested in getting the best user location present, do I have to use Fused location or can I get by with using Location Manager. It seems that Fused location won't always give the best location but rather the easiest one to get. (Correct me if I'm wrong) Mar 23 19:08:13 Hi! Mar 23 19:08:31 hi peeps, quick question. are there any arguments against sending objects to an activity using BroadcastReceivers? Mar 23 19:08:52 wrapped in Intents, of course Mar 23 19:09:12 Have you ever tried ViewPager with FragmentPagerAdapter? I don't know if it's possible, but I wonder if you can increase somehow its performance, it gets stuck when you change from one fragment to the other. Mar 23 19:10:18 Mattx it is possible Mar 23 19:10:19 should I change the OffscreenPageLimit? Mar 23 19:10:26 memorion, tell me how please Mar 23 19:10:49 Mattx well it should work by "default" you must be doing something wrong Mar 23 19:11:03 it works memorion, but it's really slow Mar 23 19:11:22 sometimes the application stops and android ask you if you want to wait or kill it Mar 23 19:11:27 then after a few seconds it continues Mar 23 19:11:42 Mattx that's not the fault of the viewpager itself that's something you did Mar 23 19:11:43 sometimes it works just fine, but you can feel it's heavy and slow, the animation is not smooth Mar 23 19:11:54 Mattx here's the doc http://developer.android.com/training/implementing-navigation/lateral.html Mar 23 19:11:55 to answer my question : thats where I can use clipRect() Mar 23 19:12:07 memorion, that's why I'm asking. maybe there is some param to tweak that make it faster Mar 23 19:12:13 like offscreen page limit Mar 23 19:13:05 Mattx show some code, otherwise noone can help Mar 23 19:14:03 memorion, I'm using a viewpager the normal way, did you get what I'm asking? I repeat, is there any good practice to make it load faster? it has nothing to do with my code, which is already working Mar 23 19:14:18 heya, recently I have been playing around with otto, and am finding the whole event bus to be very singleton-esque. Everyone seems to like otto, but in my mind that contrasts sharply against the generaly concensus that singletons are evil (introduces global state. bad for testing.) Mar 23 19:14:28 Am I missing something here that differentiaes the two cases? Mar 23 19:14:56 differentiates* Mar 23 19:15:02 Mattx if you use it the normal way it's fast, that it's working means nothing in itself, your pager adapter probably does something weird or you leak memory somehow Mar 23 19:17:12 What Google-Play-Services library is required to get the bloody Sign in with Google+ button to show in AS? Mar 23 19:18:12 Anyone know of a resource showing some nice transition animations? Mar 23 19:18:36 Programming Mar 23 19:18:40 derp Mar 23 19:18:44 ignore that Mar 23 19:19:04 csst0111: you can get font metrics from a Paint object, iirc, which would let you know the boundaries of each letter if you wanted. Otherwise, I think if you set the clipPath on the canvas to be only the area you want to draw, and then drawText, you'll only get output inside the clip area. Mar 23 19:19:26 csst0111: ah, just noticed that you found clipRect :) Mar 23 19:19:58 groxx, thnx anyway!! :) Mar 23 19:22:12 Mattx: the only reason it would be pausing like that is if you're doing something slow on the main thread. If you don't know where, try turning on strict mode (which will crash your app when you try to do some slow things on the main thread, which makes them easier to find), or kill the app when the dialog pops up and `adb pull /data/anr/traces.txt` to see Mar 23 19:22:12 a stack trace for where it's stopped. Mar 23 19:25:51 Oh seriously, Android is taking the piss now. Mar 23 19:26:33 Anthaas: I think that's why you get a waterproof phone Mar 23 19:26:35 How so? Mar 23 19:26:49 Cant use SignInButton, so as recommended I lower the Google Play Services library I am using, and then there are issues with wallet_colors.xml, so I should raise it which would cause the first thing to be a problem again.... Mar 23 19:27:01 I would never trust a waterproof phone in water Mar 23 19:27:13 Is there a way to make Retrofit only log when errors occur? Mar 23 19:28:02 lasserix_, you could make a custom logger in OkHttp using interceptors Mar 23 19:28:03 lasserix_: you can filter your logcat output (at least in android studio) to only show errors Mar 23 19:28:16 i need to archive errors Mar 23 19:28:38 so quinnjn i have to make custom logger in retrofit, then custom interceptor too? Mar 23 19:30:23 lasserix_, haven't played around with retrofit logging but I do know that interceptors are pretty clean + powerful https://github.com/square/okhttp/wiki/Interceptors Mar 23 19:31:38 hello, I have a network unlocked samsung galaxy S3, I want to flash the stock rom again, if I flash the stock rom of the same number then will the phone become network locked again? Model number of samsung s3 is SGH-T999V (Canada) Mar 23 19:32:01 Has anyone managed to get the SignInButton from Google+ working? Mar 23 19:32:17 jennie, you'd prob have more luck asking in #android or maybe #android-root Mar 23 19:32:34 thanks quinnjn Mar 23 19:36:02 Hi, I have a wierd issue, and I don't know if this is the right place to ask, but here goes. I have a webpage with some javascript on if, and it works in the browsers I have testet, but it does not work in my Android WebView App. But some of the other javascript running on the same page work fine. Mar 23 19:36:12 Does anyone have a ideer what is causing it? Mar 23 19:36:49 Mnemonic: dunno. have you tried debugging the webview remotely to see if there are any errors? Mar 23 19:37:07 groxx, great idea! thanks Mar 23 19:37:18 quinnjn: JakeWharton: have any suggestions on linking a query parameter to a set of log messages? (specifically, in the case of error for a particular query, need to send off logs for that request) Mar 23 19:39:02 lasserix_, using those interceptors you could easily check the query and response. Mar 23 19:39:25 ahh yeah i see Mar 23 19:39:26 thanks Mar 23 19:41:25 groxx, I am a newbie. Can I do that in Android Studio? Mar 23 19:42:14 Mnemonic: somewhat, but mostly no. you can either read console.log messages like this http://developer.android.com/guide/webapps/debugging.html or I'd suggest debugging it with chrome like this https://developer.chrome.com/devtools/docs/remote-debugging Mar 23 19:43:48 groxx, Thank you. But it works from my phone if I use the chrome browser. Only when using the app with webview trouble comes. Mar 23 19:44:07 Okay, I'm back. (I asked earlier why my emulator was always showing up with a black screen.) Mar 23 19:44:11 Mnemonic: you can use desktop-chrome to debug in-app webviews (the second link) Mar 23 19:44:17 Is installing HAXM the only solution? Mar 23 19:44:22 Should it work out of the box? Mar 23 19:45:10 rexbutler: it's the only reasonable solution, but: try turning off GPU acceleration, and if it's a decently large device (e.g. nexus 4 or larger in pixel count), and depending on your computer, I've had it take up to 10-15 minutes to boot. Mar 23 19:45:30 groxx, Many thanks.. I will give it a try. Mar 23 19:45:35 So I have a problem. My recyclerview is not showing data from its adapter, and my recyclerview has an onTouch listener set that I never set on it. Any ideas? Mar 23 19:45:39 groxx: Is there any indicator that it's booting? Mar 23 19:46:43 rexbutler: part way through it should show a boot animation / "android" text. but depending on the emulator image, that can be pretty late in the boot sequence. you should definitely be seeing CPU use though - if that drops off, there's probably something else going on. Mar 23 19:49:14 rexbutler: I used to have problems with black / non-booting emulators, but that has cleaned up a LOT in recent versions. the general magical fixes before were: a) turn off GPU acceleration (fixes rendering problems), b) boot fresh instead of restoring from a saved image (fixes reloading problems), c) make a brand new image and boot that (fixes image Mar 23 19:49:14 problems (pretty frequently I had to do this)). Mar 23 19:50:15 rexbutler: haxm is definitely worth it though. booting a device takes _seconds_, and it runs faster than essentially any real device. Mar 23 19:50:39 rexbutler: or, try genymotion, or some other emulator project. sometimes they work better. Mar 23 19:51:01 groxx, you sure android kills your app in strict mode? I tried with that option checked and the app is restarted, no errors are logged Mar 23 19:51:35 Mattx: not sure which option you used, but was it this? http://developer.android.com/reference/android/os/StrictMode.html Mar 23 19:51:55 the description of the option "strict mode enabled" says "flash screen when apps do long operations on main thread" Mar 23 19:52:07 groxx: Yeah, it looks like an easy install. I'm working on it now. Thanks. Mar 23 19:52:28 Mattx: ah. yeah, that'll just put a red border or something around your display if it violates strict mode policy. enable it in code. Mar 23 19:52:44 Mattx: also, strict mode doesn't catch everything, just most things Mar 23 19:52:49 okay, I'll try it now Mar 23 19:52:58 groxx: Do you mean disable GPU accelation system wide? Mar 23 19:54:56 rexbutler: it's an option when booting the emulator. on the current android studio it looks like this: http://cl.ly/image/3S203i041D1h Mar 23 19:55:29 how often does getsupportedpreviewsizes and get supportedpicturesizes return a common pair for the highest one supplied? like both would return a 1280 x 960 for example.... Mar 23 19:55:37 or are they pretty much always different/random Mar 23 19:56:28 in_deep_thought: like, that the highest of each are the same size? Mar 23 19:56:44 groxx: yeah Mar 23 19:57:41 in_deep_thought: _frequently_ the highest are the same aspect ratio, but I don't know that I've ever seen them the same exact size. you can often find the biggest preview size in the picture size list, but _literally nothing_ is guaranteed to exist, so you'll have to have some fuzzy "pick the best one" logic no matter what. Mar 23 19:58:46 heck, on some devices, some of the supported picture sizes fail 100% of the time. Mar 23 19:58:51 it's crazy Mar 23 19:59:25 groxx: so if I wanted to use a picture size closest possible to the preview size chosen (highest), what would be the best way. I could mupltiply the 2 numbers in every case and pick the one that is closest… Mar 23 19:59:49 I basically just want them to match as close as possible so I want to choose the most similar one to the preview size Mar 23 20:01:57 in_deep_thought: dunno if there's an unambiguous best way :| personally: figure out the smallest pixel-size you want, and cut off everything below that (for round 1. they may work as a backup). then find the aspect ratio matches, and use one of those. if you can't find any, maybe try to find the biggest close-to-the-same-ratio. Mar 23 20:02:35 has anyone had any luck using robolectric + assertj-android with the new android studio unit test support? Mar 23 20:03:16 it seems assertj-android doesn't like being imported in unit tests Mar 23 20:03:29 Is AssertJ-Android even a JVM thing? Mar 23 20:03:29 in_deep_thought: I've wondered if a more-correct approach is to decide what number of pixels you want, find any picture size that can fill your requirement after cropping, and pick any of them. but I haven't actually tried that out - I don't know if it could result in not catching the same thing the preview showed. Mar 23 20:04:00 in_deep_thought: so generally I aim for the same / similar aspect ratio first Mar 23 20:04:13 I don't know, but it works with robolectric just fine outside of the android studio unit tests Mar 23 20:04:17 The new unit-test support is about running unit tests on the JVM on your computer, and nothing else. Mar 23 20:04:50 Why not use AssertJ? Mar 23 20:05:32 So it is possible to add caching headers with interceptors and fix a server that doesn't use them client side with ok http interceptors? Mar 23 20:05:46 I don't think the problem is with assertj, just the assertj-android parts Mar 23 20:06:12 I read somewhere that it doesn't let itself get imported in unit tests, or something to that effect Mar 23 20:06:21 I don't understand why you're using that at all, sheki. Mar 23 20:06:33 using assertj-android? Mar 23 20:06:44 Yeah. Mar 23 20:06:58 because I inherited a large test suite that was already using it Mar 23 20:07:28 and it would be a huge pain to change it all around to something else Mar 23 20:08:24 lasserix_: I think that's one of the uses, yeah Mar 23 20:08:49 lasserix_: yeah, there's an example in the interceptors wiki Mar 23 20:25:44 Is it possible (or realistic) to install the SDK/AS on an usb stick? (to be used with linux systems?) Mar 23 20:26:08 Can't install software on some PC but I can boot from an usb stick. Mar 23 20:26:37 sure, just do a normal linux install on a usb stick, and install whatever you like Mar 23 20:29:20 how to show EditText's backgroundTint always, not only when EditText is in focus? Mar 23 20:37:58 how to show EditText's backgroundTint always, not only when EditText is in focus? Mar 23 20:39:34 anyone competent here? Mar 23 20:40:03 lxknvlk: Ask your question and wait for an answer. If noone answers within 20-30 minutes, try again Mar 23 20:42:55 Well snot. HAXM is not compatible with Linux Mar 23 20:43:35 Is developing for Android under Linux even feasible? Mar 23 20:43:35 rexbutler not true https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager Mar 23 20:43:49 rexbutler of course Mar 23 20:44:01 huh Mar 23 20:44:12 rexbutler, that's because you get KVM in Linux kernel. Mar 23 20:44:23 rexbutler, genymotion is better anyways :p Mar 23 20:44:23 also, use Genymotion. Mar 23 20:44:41 heh, this is pretty interesting about alarm manager http://commonsware.com/blog/2015/03/23/alarmmanager-regression-android-5p1.html Mar 23 20:44:53 i think common sense - most wouldn't use below 60000ms anyhow Mar 23 20:45:07 but as he says "However, also as a developer, I am once again dismayed to see that there has been a fundamental change to a key piece of Android that went unannounced and undocumented." Mar 23 20:45:23 yeah no kidding, mark that because google ... yeah nm Mar 23 20:46:39 they should better filter their own log output to save some battery... it's incredibly noisy Mar 23 20:47:03 g00s, that explains why my tablet is starting to get crazy idle battery life Mar 23 20:47:52 but yeah, giev documentation Mar 23 20:48:04 on android wear, they disabled 3 of the 4 cores.... Mar 23 20:48:05 Okay, I'm going with genymotion. :) Mar 23 20:48:13 made me rage when i discovered that few monthes ago Mar 23 20:48:14 Mavrik yeah , until the "fix" is to star a service and use CountDownTimer XD XD Mar 23 20:48:20 I approve of that change Mar 23 20:48:33 developers will find a way around hehehe Mar 23 20:48:44 as natural as water flowing downhill Mar 23 20:48:59 *shrug* Mar 23 20:49:03 i approve of the change too, i'mnot debating that Mar 23 20:49:08 as long as they make them use foreground services Mar 23 20:49:19 so I know which software is developed by monkeys :) Mar 23 20:49:45 Most of it Mar 23 20:49:49 all software is developed by monkeys Mar 23 20:50:07 My stack: Mar 23 20:50:18 Capture network traffic of android app Mar 23 20:50:19 appium Mar 23 20:50:24 android development Mar 23 20:50:27 g00s, I'm an ape thank you very much. Ook. Mar 23 20:50:32 andoid development Mar 23 20:50:37 genymotion Mar 23 20:50:39 :) Mar 23 21:09:20 why is android leaving activities that were "destroyed" or better said: ran through onDestroy so long in memory? And why does it not kill the last activity and its views if a new activity is being created? Mar 23 21:09:42 adkins: they are not killed until the memory is needed for something Mar 23 21:09:59 the prediction is that users will use the apps that they use Mar 23 21:10:08 seems like fairly solid logic Mar 23 21:10:32 *until GC runs Mar 23 21:10:45 *if you're not keeping references Mar 23 21:11:29 well if i recreate an activity, what should i need to old one for? I think it could already kill the last one then Mar 23 21:11:33 adkins: if you want your activity to be replaced set the flags or change the launch mode so that android knows not to show the existing activity Mar 23 21:12:07 adkins: think of actvities as a bunch of browser windows, every time you click a link it opens a new window Mar 23 21:12:23 but the old window is still behind unless you told it to finish() Mar 23 21:12:49 Mavrik: are you saying that if i restart an activity and i have two in memory then i keep references to the old one alive? Mar 23 21:12:51 when you press back, you close your current window and you can see your old window Mar 23 21:13:14 adkins, not "then", "if" Mar 23 21:13:28 Activites are just java objects and it's not that hard to leak the reference Mar 23 21:13:28 if you have a strong reference to your activity it cannot be garbage collected Mar 23 21:14:26 adkins: http://www.curious-creature.com/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/ Mar 23 21:14:51 if i write a hello world app, created by eclipse, and restart that 5 times, i then have 5 activities in memory. Is that because of memory leaks and references that cant be garbage collected? Mar 23 21:15:06 i guess not, and assume its normal right? Mar 23 21:15:31 no, that's because your app is in foreground and has priority, unless you are passing references around Mar 23 21:15:59 adkins, either the GC hasn't run yet or you're leaking references, hard to say Mar 23 21:16:32 Weird things can happen with debug builds Mar 23 21:16:32 Mavrik: well this^ was an example of a simple hello world app ;) Mar 23 21:16:45 Find your gc roots Mar 23 21:16:53 adkins, a simple hello world app can easily leak a reference :P Mar 23 21:17:13 I've had 20 instances of my Activity in memory, according to MAT.. All kept there by the blinking cursor runnable in EditText Mar 23 21:17:17 Apparently.. Mar 23 21:17:28 Mavrik: yes but do you think the hello world app, created by eclipse does? Mar 23 21:17:32 SimonVT: lol, that sounds awesome Mar 23 21:17:39 adkins, it does not matter what we THINK Mar 23 21:17:41 Didn't seem to cause excessive memory usage, nor any issues Mar 23 21:17:42 Everyone, I installed genymotion as suggested. Mar 23 21:17:43 adkins, go find out Mar 23 21:17:50 we need a bot to tell people not to use eclipse Mar 23 21:17:55 that too :P Mar 23 21:17:56 lol Mar 23 21:17:57 It's asking me what folder to use as my genymotion folder Mar 23 21:18:01 SimonVT lol what ! and release mode solved that ? Mar 23 21:18:27 Even with debug builds it didn't cause memory issues Mar 23 21:18:34 But MAT told me they were kept in memory Mar 23 21:18:41 Mavrik: well i started investigating memory usage and trying to get a long with MAT. So these questions come up ;) Mar 23 21:18:54 SimonVT, it's possible, it's not like the activity is heavyweight if you don't keep bitmaps around :) Mar 23 21:19:10 * groxx just wishes something MAT-like would get added to Android Studio soon Mar 23 21:19:27 that and a traceview that doesn't suckass Mar 23 21:19:33 and incorporates systrace as well Mar 23 21:19:39 Odaym did you ever notice with BLE, if you disable the BT adapter, even when its is re-enabled BLE devices return null for BluetoothDevice.getName()? Mar 23 21:19:45 Mavrik: or a working hierarchyviewer :| Mar 23 21:19:52 and that :P Mar 23 21:19:59 and a GPU profiler worth a damn Mar 23 21:20:00 :D Mar 23 21:20:34 yes Mar 23 21:21:07 Odaym i get null when the adapter is disabled, thats fine - known that for a long time. but the only way for me to get the names of the ble devices again is to do another LE scan Mar 23 21:21:19 of course Mar 23 21:21:30 I always scan, regardless if I've just been inside that device a minute ago Mar 23 21:21:39 simply cause easier to do Mar 23 21:21:52 this is not thw way it was for br/edr - getName() null when disabled, valid when enabled Mar 23 21:22:08 Oh, apparently I just installed the plugin. Mar 23 21:22:24 hm, i'll do that Mar 23 21:23:16 oh i wonder if the behavior changes if they are bonded, lets see Mar 23 21:23:21 i dont understand how to find out if i have a leaking reference with MAT or something else. I understand how to see how what is connected to what instance at some certain point in time. But how do i find out it is a leak? Mar 23 21:23:57 adkins, you do a path to GC roots Mar 23 21:24:06 Mavrik: yes Mar 23 21:24:06 adkins, and you see what's keeping your activity instances alive Mar 23 21:24:16 ideally only one activity of same type should be referenced Mar 23 21:24:39 Using wifi tethering while driving on a highway in ohio isnt working out too well Mar 23 21:24:51 3003ms ping Mar 23 21:25:05 Mavrik: but as we discussed there can be more than one activities in memory at one time if they arent garbage collected yet.... Mar 23 21:27:46 Hi, I see occasionally someone on the web mentioning that nested fragments are a no-no. I've used it once and haven't noticed any troubles, the project was simple though. Comments? Mar 23 21:28:41 hey guys i have an android app doing authentication via OAuth. What is the most secure way to store the refresh token? Mar 23 21:29:05 Question: does Appium rely on a particular emulator? Mar 23 21:29:23 adkins, yes? what's not clear? :) Mar 23 21:29:31 Mavrik: the background of my question is: I create imagebuttons and other views dynamically in my app. The user can determine how many he wants until some certain limit. For testing to find leaks i used a ton of views and after a few restarts: Out of memory. I could see more than one activity of my MainActivity in MAT and each one had all its many views.... Mar 23 21:29:55 fb|: accounts can be used for that, if it makes sense to use it for you Mar 23 21:29:58 icedp, nested fragments are a cesspool of bugs and lifecycle issues. Mar 23 21:30:01 how do i know if one of these instances are there because of a leak? Mar 23 21:30:24 adkins, again, you look for what's holding reference to them Mar 23 21:30:41 all objects that are referenced cannot be garbage collected, no? Mar 23 21:31:08 no they cannot Mar 23 21:31:30 well then :) Mar 23 21:32:17 Mavrik: so i have to wait a lil and watch if they wont go away? ;) Mar 23 21:32:26 adkins, no. Mar 23 21:32:34 adkins, what's unclear? Mar 23 21:32:45 the activities that aren't needed anymore and can be GCd won't have any references to them Mar 23 21:32:55 if you have more copies of same activity referenced you do have a leak Mar 23 21:33:03 since that reference prevents GC from cleaning it up Mar 23 21:34:32 Mavrik: if i do a GC-Root i dont see every activity in memory but any activity that cant be garbage collected? Mar 23 21:37:29 You see any activity that's still referenced. Mar 23 21:38:16 Mavrik: I just don't see how a lifecycle of fragments and activity is any less confusing then a lifecycle of parent fragment and nested fragments per se. Example would be nice. Or do you simply mean having less levels is better from design point of view? Mar 23 21:38:20 Any appium mavens in here? Mar 23 21:39:12 icedp, no, I mean that having several layers of lifecycles with different bugs leads to a hellhole of restoration and performance issues after your app gets a tiny bit complex Mar 23 21:39:20 icedp, fragment lifecycle is just awful. frag in frag is even worse Mar 23 21:39:50 icedp, especially when you actually have to talk to the containing activity and change it's global element state Mar 23 21:39:59 e.g. actionbar, other resources Mar 23 21:40:14 it's doable, but dear god it's a shitty API :) Mar 23 21:40:16 Fragment Lifecycle: https://raw.githubusercontent.com/xxv/android-lifecycle/master/complete_android_fragment_lifecycle.png Mar 23 21:40:36 I have a custom attribute defined for resource. It's format is "dimension|fraction". When I"m trying to extract the file from the AttrributesSet/TypedArray, how do I detemine which format was specified? (dimension or fraction) Mar 23 21:41:00 quinnjn, child fragments are missing here :P Mar 23 21:41:23 i dont want to know how this would look with child frag :D Mar 23 21:41:43 Mavrik: ok. i started my app, pressed back-button, restarted it and now want to find out if there is a leak reference. I did a dump in DDMS and selected "Leak Suspects". First question: Is any suspect i see there an issue? Mar 23 21:41:55 hard to say Mar 23 21:42:02 dcorbin_, you'd be best to split them into 2 attributes Mar 23 21:43:02 its noted in the docs that fine location is provided by GPS, but for coarse location, it only says "network provider". what does this mean? is it based of the telecoms cell location? what happens if the device has no cell signal? Mar 23 21:43:14 Mavrik: "hard to say" was that the answer to me? ;) Mar 23 21:43:48 kline, thats one part of it Mar 23 21:44:12 its based on cell tower locations and wifi access point locations Mar 23 21:44:29 adkins, yes. Mar 23 21:44:32 :) Mar 23 21:44:33 Mavrik: can you help me out a lil in pm? Mar 23 21:44:44 when google maps cartographed cities, they also cartographed wifi access points and cellular towers Mar 23 21:44:46 I'm going to sleep, some other time. Mar 23 21:45:08 Mavrik: ok, no problem, i should do that too Mar 23 21:46:01 so, if theres no cell signal and the device is not on wifi, a location listener just never gets updates? im looking to do location for wider travel, by truck into the country. by names, i only need coarse location, but i do need GPS since theres no guarantee of cell signal (and definitely no wifi). would i be right to use fine location and GPS? Mar 23 21:46:25 Anyone use AppNexus ad SDK ? Mar 23 21:46:44 well. if you dont have gps, wifi and cell, your phone is just a pretty expensive gameboy Mar 23 21:46:50 so how should it get a signal then ;) Mar 23 21:47:23 Mavrik: only one question: When you open MAT, where do you go first? Histogramm? Dominator? where do i see most easily if there is an activity alive, which shouldnt? Mar 23 21:47:58 sorry, what i mean is, i will only have GPS, but at the same time, its easier to justify coarse than fine location for the resolution i need. shame theres no option to get GPS via coarse permissions and just have android degrade it before passing it to the application. but thats for you help, i think im clear now, danijoo Mar 23 21:48:29 ("coarse", and "fine", rather than the actual permissions coarse and fine, that is) Mar 23 21:48:39 if its possible, use both and decide accuracy on whats available Mar 23 21:48:45 like google maps does it Mar 23 21:49:00 maybe showing a dialog "location might be not accurate" when gps is disabled Mar 23 21:49:44 i dont really need accurate location is the thing, which is why its counterintuitive to ask the user for fine location. ill just need to justify it technically in my report Mar 23 21:51:55 so I gather current recommendations are to use fragments everywhere avoiding single activity per single screen approach but also to avoid nested fragments at all costs. that's just a little bit contradictory. Mar 23 21:53:25 quinnjn: then why do the offer the multi-format definition? Surely there is a way. Mar 23 21:54:16 icedp rest assured, whatever recommendation is current will be obsolete tomorrow Mar 23 21:55:36 dcorbin_, you could do checks for keywords like "x" in "WxH". IMO its easier to just check for one of the properties. If both properties exist you could set priority on a property or just throw an exception Mar 23 21:57:09 icedp, its kinda like taste Mar 23 21:57:14 and also depends on the usecase Mar 23 21:57:28 for example I kinda only use fragments for viewpagers Mar 23 21:57:37 and one activity per "task or page" Mar 23 21:57:56 then there are people that dont use fragments at all (JakeW) Mar 23 21:58:42 square just launched a new app https://play.google.com/store/apps/details?id=com.squareup.cash Mar 23 21:58:49 false Mar 23 21:58:53 ok update Mar 23 21:58:55 sorry Mar 23 21:58:56 square cash is new ? Mar 23 21:59:11 didnt u say that once? :o Mar 23 21:59:12 cashtags are new Mar 23 21:59:22 sorry for the missquote then ;) Mar 23 21:59:36 lolwhat https://lh4.ggpht.com/XmCVjgGudQ-mHSMNbiz977spHpInmHc-Advie7dQzZhpLzVVkBCbO5jQupRDvf6kqwY=h900 Mar 23 22:00:05 yeah thats a weird url for sure Mar 23 22:00:21 danijoo I think that false was addressing me Mar 23 22:02:14 g00s: what's-her-face apparently prefers Tahoe over Tickets Mar 23 22:02:18 nested fragments just make sense for me in complex layouts because they let manage it in modal way. e.g. activity depending of the screen size shows either single fragment at once or master + details fragments. Details fragment decides itself depending on the screen size if to show fragments altogether or to page them Mar 23 22:03:05 icedp nested fragments means fragments in fragments, for a detail master page you don't need to nest them I think Mar 23 22:03:09 icedp yeah, if you find that compared to alternatives it reduces complexity and fits the way you think, its probably a good thing ;) Mar 23 22:03:21 Hahah she only cares about Tahoe Mar 23 22:03:27 ha, nice find Mar 23 22:03:27 Da hoe only cares about Tahoe Mar 23 22:03:28 There we go Mar 23 22:03:49 theres also custom views which can do a lot of things a fragment can do too Mar 23 22:04:58 icedp, https://corner.squareup.com/2014/10/advocating-against-android-fragments.html Mar 23 22:05:01 for a school project my group needs to make a somewhat simple board game. In the android code I have a GridView that is being instanaited with a 2d array. In a class called Board i have a move() mathod. This method moves pieces, and in the method everytime a piece is moved i have a updateDisplay() method that should update the grid. I cant think of a good way to update the gridview without moving the move() method to the MainAct Mar 23 22:05:06 thats a really good read on the cons of fragments Mar 23 22:05:15 showing a nice alternative Mar 23 22:05:16 quinnjn: Thanks for you suggestion to avoid the Android framework. Mar 23 22:05:27 I have some NDK code in $module/src/main/jni, and if I run ndk-build while in that directory the build succeeds, but if I run gradlew assemble from the app root, it fails because it isn't using the include rules defined in the Android.mk file. Why Mar 23 22:05:31 is that? Mar 23 22:07:06 quinnjn: that may have come off snarkier than I meant. I know a lot of ways to "get done" what I want. Bur I want to do it using this feature if it works. Mar 23 22:07:11 sorry Mar 23 22:08:21 dcorbin_, I didn't take it as snarky. Lots of people have different opinions. My opinion is not to use a property multiple ways. Mar 23 22:14:19 Hi Mar 23 22:15:29 pfn: http://pastebin.com/50HA8JbF Mar 23 22:16:02 is there anyway to update a view from a java class? Mar 23 22:16:09 for example a textview? Mar 23 22:16:11 AutoCompleteTextView is the worst Mar 23 22:16:25 oh nm Mar 23 22:16:36 DadFoundMy: i,, Mar 23 22:16:42 DadFoundMy: umm sure... Mar 23 22:16:50 lasserix_: not an activity Mar 23 22:16:51 :D Mar 23 22:17:02 textView.setText? Mar 23 22:17:30 CSI: not in an activity Mar 23 22:17:35 danijoo: I've read that article and enjoyed it. Very though provoking. But with custom views they check whether listview is attached anyway. So how is it different from checking if fragment container is present. Also they split code into DualPaneContainer and SinglePaneContainer. I guess you can refactor inside activity as well Mar 23 22:17:54 Where from? Mar 23 22:17:58 DadFoundMy: sure... public class Foo { public void updateView(View v, int visibile) { if (v.getVisibility != visible) v.setVisibility.visible) } } ... in another class Foo f = new Foo() f.updateView(mTextView, View.VISIBLE) ? Mar 23 22:18:16 icedp, just wanted to show another point of view. I dont agree with all of that. Mar 23 22:18:18 lasserix_: just realized i could pass it as a parameter as you sent that Mar 23 22:19:22 Damn Mar 23 22:19:27 time to apply to square Mar 23 22:19:29 danijoo: sure, thanks Mar 23 22:23:28 lasserix_, what? Mar 23 22:23:34 nm Mar 23 22:38:59 Why won't setOnItemClickListener work with AutoCompleteTextView? Mar 23 22:40:27 hi, any of you familiar with xposed dev ? Mar 23 22:40:35 Damo2k wrong channel Mar 23 22:41:15 hmm #xposed don't exist, can you point me to the correct channel ? Mar 23 22:41:32 Damo2k no idea :( Mar 23 22:45:07 Does anybody have experience with using AutoCompleteTextView and feel like shedding some light on why setOnItemClickListener won't work? Mar 23 22:48:49 whats Mar 23 22:48:58 what's a good site to get free icon pack for my android app Mar 23 22:49:51 developer.android.com Mar 23 22:50:06 They have a design section where you can download the icons Google recommends using Mar 23 22:51:56 This is better: https://github.com/google/material-design-icons (see https://google.github.io/material-design-icons/ for previews). Mar 23 22:53:01 CSI: I guess you're gonna have to post code. Mar 23 22:53:02 JakeWharton: are you working on squarecash? Mar 23 22:53:18 CSI post your code Mar 23 22:53:35 hey dudes Mar 23 22:53:58 how can i make a gradle link to my library over the github? Mar 23 22:55:24 abara: you have to upload it somewhere Mar 23 22:55:42 lasserix_: but where? :( Mar 23 22:56:10 http://www.vandalsoftware.com/post/52468430435/publishing-an-android-library-aar-to-a-maven Mar 23 22:56:20 http://pastebin.com/d7praR1B Mar 23 22:56:31 if I have a Parceable object that contains an arraylist of another custom object, do I have to implement parceable on both to ship them around? Mar 23 22:56:33 The adapter works fine, provides suggestions from JSON Mar 23 22:56:44 When I click on the dropdown suggestions, nothing happens Mar 23 22:56:51 right now that array list is getting trashed when I bundle up my parceable Mar 23 22:57:08 mrfu: probably on the custom object Mar 23 22:57:18 found nice critique of fragments http://delyan.me/android-s-matryoshka-problem/ but it's two years old. Problem one is fixed by this for example (it's the same problem with as fragments in ViewPager) http://stackoverflow.com/a/22673871/1056386 Mar 23 22:57:22 mrfu: but i like to user implements serializable, more easy Mar 23 22:58:42 any good icon packs ic an dowlnoad for freee? Mar 23 22:59:26 CSI: I don't know, but try 'throw new RuntimeException("It worked!");'. Mar 23 22:59:47 abara: but with Serializable I wouldn't be able to pass an arraylist correct? Mar 23 22:59:58 which is how my customs objects are stored Mar 23 23:01:37 mrfu: sure about that? i need say i didn't try it, but can you try it for both of us? Mar 23 23:01:46 CSI: How is "Log.d(R.string.app_name, "Hello, anything here????");" even compiling? Isn't R.string.app_name an int? Mar 23 23:02:00 hehe Mar 23 23:02:37 Still nothing Mar 23 23:02:39 I am, it is one of the reasons I switched from Serialize to Parcelable abara Mar 23 23:02:53 Can only do a single object unfortunately Mar 23 23:03:06 CSI: An attempt to call Log.d(int, String) should not compile, so I wonder whether you're even compiling at this point. Mar 23 23:03:07 I suppose you can pack it with some sort of for loop Mar 23 23:03:09 I just replaced that quickly so I don't give away my app name... :) Mar 23 23:03:11 I love bluetooth keyboards for my laptop (which is plugged into my TV) Mar 23 23:03:20 I am messaging you from the toilet hahaha Mar 23 23:03:24 Not even ashamed. Mar 23 23:03:25 LOL Mar 23 23:03:43 Anthaas are you submitting something to the store :P Mar 23 23:03:52 g00s: HAHAH!!!!! Mar 23 23:04:01 Nah, Im printing a log Mar 23 23:04:05 I'm way too germophobic to use my phone in the bathroom. ;| Mar 23 23:04:16 I'd end up washing it 17 times. Mar 23 23:04:27 TacticalJoke you're probably like me with bleach stations in all areas Mar 23 23:04:32 lol Mar 23 23:04:49 Bleach is a germophobe's best friend. Mar 23 23:04:54 if i could i'd just have everything stainless steel and wash the house in bleach from the sprinklers Mar 23 23:04:55 To be fair, I havent touched myself yet and its only sat on my lap. Mar 23 23:05:01 just to be sure Mar 23 23:05:19 I feel like we're intruding, Anthaas. Do you want us to leave? Mar 23 23:05:30 Hahaha, its cool. Im not a proud person. Mar 23 23:05:50 holy crap. Preparing my spannables talk for tomorrow (pre-DroidCon), I'm going to post a video soon, you guys are going to freak out. Mar 23 23:05:55 I know, because I did! Mar 23 23:06:11 Did you accidentally submit porn? Mar 23 23:06:16 I hate it when that happens... Mar 23 23:07:41 Okay, I'm trying to get HAXM hypervisor working, it's not working out so well: Mar 23 23:07:49 First from https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager Mar 23 23:08:00 I went to the Linux instructions Mar 23 23:08:19 g00s: a lot of microbes love stainless steel btw. Mar 23 23:08:31 Bacl Mar 23 23:08:33 Back* Mar 23 23:08:50 icedp yeah, i guess thats why hospitals use copper for door handles Mar 23 23:09:10 They may like stainless steel but it's just easier to clean Mar 23 23:09:17 http://en.wikipedia.org/wiki/Antimicrobial_copper-alloy_touch_surfaces Mar 23 23:09:41 so we need copper phones :) Mar 23 23:09:46 When I run $ /tools/emulator-x86 -avd Your_AVD_Name -qemu -m 2047 -enable-kvm Mar 23 23:10:02 I get : SDL init failure, reason is: No available video device Mar 23 23:14:10 rexbutler: you need to install some package Mar 23 23:14:23 rexbutler: for your distribution Mar 23 23:16:35 check this out! This is a stock TextView, all I'm doing is animating spannables : http://scrapeshare.com/?vid=1427152520980-05ymlb Mar 23 23:17:23 MikeWallaceDev interesting, is it smoother on the device ? Mar 23 23:17:37 maybe because of the video, seems pretty janky Mar 23 23:17:42 It's smooth as silk on my Galaxy Nexus! Mar 23 23:17:49 wow Mar 23 23:18:01 Damn, I never think of upping the quality. Mar 23 23:18:16 I think I'll try again Mar 23 23:19:20 when do the con videos go up MikeWallaceDev Mar 23 23:19:27 MikeWallaceDev: nice. that's just changing the font size in a loop? Mar 23 23:20:44 either way: <3 spannables. it's a nice abstraction. Mar 23 23:20:50 lasserix_, I'm guessing AFTER DroidCon ;) Mar 23 23:21:02 I have no clue mate... They don't talk to me about that stuff.. Mar 23 23:21:16 groxx, Yes! Mar 23 23:21:31 Changing the font size, and centered text. Mar 23 23:22:01 when do you give your talk? Mar 23 23:22:06 I added a _bit_ of baselineShift, but that's it Mar 23 23:22:37 groxx really i thought the api was crazy, ran away crying Mar 23 23:22:54 lasserix_, I'm giving a GDG talk tomorrow as a pre-DroidCon thing. and DroidCon Montreal is April 9th Mar 23 23:22:59 icedp: any specifics? Mar 23 23:23:04 ah cool Mar 23 23:23:26 I've been playing with Spannables all day, so cool... Mar 23 23:23:28 g00s: for making spans, sure. but it's really easy to wrap it into a more sane form. Mar 23 23:23:42 making spanned strings* Mar 23 23:24:03 rexbutler: something like this http://stackoverflow.com/questions/4841908/sdl-init-failure-reason-is-no-available-video-device Mar 23 23:25:17 I don't know what I'd do without this channel. Mar 23 23:25:24 Even with it I'm barely making progress Mar 23 23:25:42 Is there a screencast api ? Mar 23 23:28:15 MikeWallaceDev: hmm interesting. I guess I would use custom view and camera.rotateY for that Mar 23 23:28:16 I think this is better : http://scrapeshare.com/?vid=1427153253458-bz5kux Mar 23 23:28:37 icedp, not the point, I'm giving a talk on Spannables. Mar 23 23:29:31 MikeWallaceDev: oh I see. would love to watch it when available Mar 23 23:29:49 I'm guessing that it will be available next month Mar 23 23:30:48 rex@rex-500-420qe:~/Android/Sdk/tools$ sudo apt-get install ia32-libs-sdl: Mar 23 23:30:52 Unable to locate package ia32-libs-sdl Mar 23 23:30:57 Hmm... Mar 23 23:32:35 TacticalJoke: So, any more dev name ideas? :P Mar 23 23:34:13 rexbutler: try packages starting with libsdl. I'm think you will receive better help on #debian or #ubuntu about this. Mar 23 23:35:59 I put it on YouTube, it looks pretty smooth there : https://www.youtube.com/watch?v=3Cz5I0g_A6k Mar 23 23:37:14 is there way to swap videoviews of mediaplayer? Mar 23 23:37:32 MikeWallaceDev: Naive person here. When would I use that? Mar 23 23:37:49 Anthaas: Sorry, I can't really think of much. Mar 23 23:38:03 Anthaas, that specific effect? Who knows... The point is that you can do amazing things... Mar 23 23:38:15 Anything like that with text. Mar 23 23:38:17 I made a simple text editor in a few hours Mar 23 23:38:32 it's freaking awesome :) Mar 23 23:39:41 Oh, I just remembered, I want to do another effect. I'll show you later... Mar 23 23:40:03 Anthaas: super-precise text placement, text animations, custom glyphs / emoji / etc, making text render like this http://hitfilm.com/forum/discussion/4353/see-through-text , all works pretty well with spannables. Mar 23 23:41:02 they're awesome. Mar 23 23:41:23 clickables, hints, urls Mar 23 23:42:02 also, it's the fact that you can style any part of the text. You can do a lot of styling with TextView, but it applies to the whole text Mar 23 23:42:03 Off topic maybe, but since most android devs seem to be using osx... what irc client do you guys use? Mar 23 23:42:25 HexChat. Mar 23 23:42:30 on Linux :P Mar 23 23:42:38 my own client Mar 23 23:42:53 still debugging it Mar 23 23:45:02 eghdk: weechat (on Linux, but available on OS X) Mar 23 23:45:49 eghdk: irccloud Mar 23 23:50:09 Seems like no one is using the same irc client. hahaha Mar 23 23:50:26 regan: you wrote colloquy? Mar 23 23:51:16 nope, I am on multiple sites, colloquy helps me watch what my app does on other channels and I can talk to myself. Mar 23 23:51:53 eghdk, Limechat is awesome Mar 24 00:03:15 regan, they have medication for that now Mar 24 00:03:31 ha-ha Mar 24 00:03:36 :D Mar 24 00:14:28 Wheres that website with all the Android colour palettes on, with numbers on them like 500 (for main colour) etc? Mar 24 00:16:01 Anthaas: http://www.google.com/design/spec/style/color.html#color-color-palette ? Mar 24 00:16:36 lasserix_: yes Mar 24 00:16:41 ErnestG: Bingo! Thanks :D Mar 24 00:17:11 JakeWharton: have you heard of the bitcoin marking project? (marks?) seems like it might be cool way to promote both square cash + marks to do something with that project Mar 24 00:17:29 i have not Mar 24 00:17:30 JakeWharton: you could enable marking from your bankaccount to whomever Mar 24 00:17:37 *marking is like tipping with bitcoins Mar 24 00:17:53 so you could for instance use squarecash to mark a blog author you like for a given post Mar 24 00:18:42 you can ask in #bitmark Mar 24 00:18:44 for more info Mar 24 00:18:56 here's an article http://bitcoinbarbie.com/marking-capturing-a-vast-untapped-economy/ Mar 24 00:18:59 can't find the main web Mar 24 00:19:01 *page Mar 24 00:19:53 since my guess is marking is going to be the next google gross profit from thousands of cents revenue stream Mar 24 00:20:19 and you guys already have the exchange system set up Mar 24 00:22:01 hey guys, super noob question: what's the best strategy to persist a list of data from a server if I'm requesting for data every hour or so and that the data may not change all the time??? Mar 24 00:22:47 rburgosnavas: use cache headers Mar 24 00:22:49 lasserix_: i have no idea what you are proposing or really talking about Mar 24 00:23:06 perhaps my complete agnosticism towards bitcoin isn't helping Mar 24 00:23:06 Err, what about SyncAdapter? Mar 24 00:23:14 lasserix_: yeah... YEAH! Mar 24 00:23:31 rburgosnavas: yeah, definitely cache headers. etags are pretty much made for that. Mar 24 00:23:36 Anthaas: considering... I'm using SyncAdapter for something else Mar 24 00:24:21 JakeWharton: so marking the philosophy is you would be able to virtually tip someone, anyone. forget that it uses bitcoin, underneath. what if i could use squarecash to for instance, support authors of blogs I like, or programmer on SO who help me, etc etc? I was saying you might talk to the guys behind that project and set up something that would enable users of square cash to do something like that Mar 24 00:25:36 They would want a cut. Mar 24 00:26:49 rburgosnavas: in principle that sounds right to me. I've never used sync adapters, can't really say how well it works out in practice :| Mar 24 00:27:14 Anthaas: not sure, they just want to promote it, sure there are lots of ways to make some profit from the system, but the system has to become wide spread enough before you make much Mar 24 00:27:56 virtual currency exchange it definatly where it is at tho Mar 24 00:28:07 and p2p form of that is the future Mar 24 00:31:01 rburgosnavas: you can use SyncAdapter for several things separately. It's not difficult to expand. If you need regular updates in background it seems reasonable Mar 24 00:31:14 Dunno, if someone owes me money I'd rather they give me £5 than some whim. Mar 24 00:31:23 rburgosnavas: providing you already have it anyway Mar 24 00:31:29 lasserix_ did you see http://scrapeshare.com/?vid=1427152520980-05ymlb Mar 24 00:31:35 I dont know of a single place where bitcoins can be spent in the UK Mar 24 00:31:48 g00s yeah thats pretty cool Mar 24 00:32:04 I do have a SyncAdapter running to check for access_token with refresh_token Mar 24 00:33:54 thing is, I'm trying to wrap my head around how to persist data coming from this server so that I don't have to pull it all the time since the data may not change all the time or may change marginally Mar 24 00:34:03 and the server is not mine Mar 24 00:35:07 I was considering getting the data, matching it with what *may* be stored in a SQLite db, and if there's anything not stored, save it... Mar 24 00:35:10 My usual go-to method is to use timestamps. Send the server the timestamp I last accessed it and pull all (if any) data added since then Mar 24 00:35:20 but feels inefficient Mar 24 00:36:03 Do that every [user-defined-preference] minutes or on refresh (pull to refresh or whatever) Mar 24 00:36:27 rburgosnavas: I think it depends on whether you gonna store this data in database or not. If yes syncadapters make sense. If it's just something you parse and display on the go - can cache it Mar 24 00:37:44 Which itself depends on the data itself Mar 24 00:38:07 If each object is large then I'd say database, if its just a bit of text, then cache Mar 24 00:38:21 large or complex* Mar 24 00:38:39 rburgosnavas: for sqlite you have ON CONFLICT IGNORE / REPLACE clause, so you don't to check manually. only make sure that you have a unique id Mar 24 00:39:19 Ooooh, handy, didnt know that. Mar 24 00:39:30 icedp: Mar 24 00:39:33 ah Mar 24 00:42:22 rburgosnavas: is the data completely replaced each time? Mar 24 00:42:44 groxx: no Mar 24 00:43:35 looking at the data returned, the list of objects I get may change slightly a few time during the day Mar 24 00:43:58 and by change I mean i get a list with *new* data appended Mar 24 00:44:21 ah. so you need to keep adding the new data, and retain the old stuff? Mar 24 00:44:31 SyncAdapter definitely. Mar 24 00:44:35 so if at point A I get [1,2,3], then later during the day I will get [1,2,3,4,5] Mar 24 00:45:12 groxx: I'm thinking of retaining the data for a while but not for an eternity :) Mar 24 00:46:11 so let's say after a week I update the db to just have [4,5] and then i'll pull data again and get [4,5,6,7,8] Mar 24 00:46:33 I'm basically trying to recreate a twitter feed if that makes it more clear Mar 24 00:46:35 lol Mar 24 00:46:37 SyncAdapter Mar 24 00:46:56 You can compare time data was put in to current time and decide to remove or not. Mar 24 00:47:27 Anthaas: you're convincing me. Currently I'm using IntentService Mar 24 00:49:28 rburgosnavas: yeah :) sqlite makes sense imo for the storage. were I feeling adventurous, I'd probably give https://github.com/SimonVT/schematic a shot finally :) not sure if that's what you're after though Mar 24 00:50:55 huh, glide loads animated gifs into ImageViews. i think somebody asks about that maybe once a week Mar 24 00:56:51 anyone know of a good way to build a listview that's kinda like what spotify does here? http://cl.ly/2b452m193K2x ("slides" up to fill the screen, then scrolls). or a blog post or something that covers this kind of UI? Mar 24 00:57:09 I'm trying to figure out a good way to do it without e.g. causing a bunch of layout events due to resizing a listview Mar 24 00:59:21 groxx do you want https://plus.google.com/+ChrisBanes/posts/J9Fwbc15BHN Mar 24 00:59:46 g00s: assuming it's not a wildly specific implementation, that'll probably work :) thanks, reading Mar 24 01:04:36 hey all. Anyone know how to get around the fact that alpha on a parent will affect the children? Mar 24 01:04:48 tried setting alpha channel to FF Mar 24 01:04:51 and setting alpha to 1 Mar 24 01:05:07 best not to have any children in there? Mar 24 01:12:28 g00s: well, at least one of my ideas wasn't too far off. though I was kinda hoping to avoid having to pad my listviews with spacers :\ Mar 24 01:13:27 groxx i tried to understand how it worked. tried. i keep my app simple and avoid those things generally ;) Mar 24 01:13:44 g00s: interested in a tl;dr? Mar 24 01:14:03 CedricBeust in your android + rxjava + kotlin experiments - are you using vanilla rxjava, or rxandroid ? Mar 24 01:14:13 groxx sure Mar 24 01:14:22 g00s: rxandroid Mar 24 01:14:30 Just for the wrappers around views Mar 24 01:14:34 groxx oh, a tldr of the tehnique - no thats ok Mar 24 01:14:49 g00s: k Mar 24 01:15:00 i'll forget it before i use it, which will be never :D Mar 24 01:15:03 CedricBeust: i'd be interesting in your opinions of rxandroid Mar 24 01:15:16 groxx getting old, gotta keep that heap unfragmented you know Mar 24 01:15:24 JakeWharton: I sent you a draft of my article for review Mar 24 01:15:33 i'm replying Mar 24 01:15:36 slowly Mar 24 01:15:37 I don't really have an opinion on rxandroid right now, it's just a very thin wrapper Mar 24 01:15:52 i guess the question is: can it be more Mar 24 01:16:00 It's useful to turn EditText or Button into an Observable Mar 24 01:16:11 bindView and others seem useful as well but for corner cases of lifecycles Mar 24 01:16:15 g00s: don't suppose you happen to know of any implementations that translate the listview, rather than adding a header == the expanded header size, and drawing the collapsing-header-thing over the top? Mar 24 01:16:28 groxx sorry , no Mar 24 01:17:21 JakeWharton: I was about to post it but I'll wait for your reply then Mar 24 01:18:59 i don't really have any comments having seen your last statement Mar 24 01:19:24 JakeWharton: So nothing obviously wrong or dumb? :) Mar 24 01:19:49 Hey guys, I'm looking to get started with some Android development. Any IDE recommendations? Mar 24 01:20:02 well you're not flatMap-ing under the "name" section Mar 24 01:20:08 happyowl: There is only one recommendation now. Mar 24 01:20:11 I see Eclipse, Android Studio, and IntelliJ seem to be the most popular Mar 24 01:20:19 TacticalJoke: Oh yeah? Mar 24 01:20:22 JakeWharton: I was initially until I realized this one has to be on the main thread Mar 24 01:20:23 Android Studio. Mar 24 01:20:26 Anyone here on OSX? What irc client is recomended by my fellow android devs? Mar 24 01:20:38 EdLin i like textual Mar 24 01:20:38 eghdk: irc cloud Mar 24 01:20:49 lol, sorry EdLin Mar 24 01:20:52 TacticalJoke: Ah cool, why's that? Mar 24 01:21:03 The developer-tools team is focusing all its effort there. Mar 24 01:21:13 It also has nice things such as Gradle. Mar 24 01:21:21 Well, Gradle integration. Mar 24 01:21:29 JakeWharton: Basically, when you wrape a View with rxandroid, everything needs to happen on the main thread, so your only choice is to put your logic in the subscriber and run that subscriber in a background thread Mar 24 01:21:54 happyowl: For Android, Eclipse is old news now, BTW. Mar 24 01:22:05 JakeWharton: Do you use the paid version by any chance? Mar 24 01:22:05 They aren't even continuing development on ADT. Mar 24 01:22:16 eghdk: yes Mar 24 01:22:35 TacticalJoke: Oh I see, so are most companies using Android Studio? Mar 24 01:22:46 Not sure. If not, though, they should be. Mar 24 01:23:02 Or at least IntelliJ. They should be switching from Eclipse at this point. :D Mar 24 01:23:03 at this point, it might be most. Mar 24 01:23:08 Android Studio is officially the official version now. Officially :) Mar 24 01:23:18 *official Android IDE Mar 24 01:23:31 obviously there will be a lot of businesses sticking with Eclipse because they don't want to rearrange everything. Mar 24 01:23:52 CedricBeust: we still flatMap with two observeOn s Mar 24 01:24:50 Ok cool, Android Studio it is then! Cheers TacticalJoke, groxx, and barbs! <3 Mar 24 01:26:47 and these flatmaps run in a background thread even though you are wrapping a view with rxandroid? Mar 24 01:27:30 CedricBeust: Are you gonna post it to /r/androiddev? :) Mar 24 01:27:51 Me or somebody else :) Mar 24 01:27:55 :D Mar 24 01:28:22 that crowd isn't very bright though Mar 24 01:28:36 I'd rather see it on /r/programming, more exposure for kotlin Mar 24 01:28:54 Alright the post is up: http://beust.com/weblog/2015/03/23/android-rx-and-kotlin-a-case-study/ Mar 24 01:29:51 CedricBeust: we subscribeOn main thread, observe on background thread flatMap the API call, and then observe on main thread Mar 24 01:30:12 (ugh, why can't I ctrl+up and add a comma) Mar 24 01:31:36 JakeWharton: Because this is irc, not slack :) Mar 24 01:32:10 JakeWharton: Can you pastebin? I wasn't able to get that to work with WidgetObservable Mar 24 01:32:42 (besides, I think there is a point in the article in having two different observers, one on main thread and one in background thread, but I'd still like to find out a way to flatMap with rxandroid) Mar 24 01:36:38 CedricBeust i notice you subscribe to chains in your subscribers ... is that good form ? Mar 24 01:37:55 g00s: Why wouldn't it be? Kinda of the point of composition Mar 24 01:38:18 You have to be careful if you're going to have multiple subscribers, though, be careful what you subscribe toi Mar 24 01:38:45 TacticalJoke: Feel free to post this to /r/programming, I'll upvote :) Mar 24 01:39:06 you can do composition with compose() operator Mar 24 01:39:13 https://www.irccloud.com/pastebin/5Vlovqlt Mar 24 01:39:15 CedricBeust: ^^^ Mar 24 01:39:29 https://www.irccloud.com/pastebin/aCZsNbGb Mar 24 01:39:30 output ^^^ Mar 24 01:39:45 JakeWharton: Right, now replace Observable.just(1) with WidgetObservable.text(editText) Mar 24 01:39:57 well this is Java so I can't Mar 24 01:40:04 that's why I main a fake main thread Mar 24 01:40:09 s/main/made/ Mar 24 01:40:27 Understood, try it next time you're in an Android environment, you'll see it won't work Mar 24 01:40:39 The rxandroid need to subscribe on the main thread Mar 24 01:40:40 it will. we ship code like this constantly Mar 24 01:40:52 i have .subscribeOn(main) for that Mar 24 01:41:07 mmh Mar 24 01:43:21 https://www.irccloud.com/pastebin/sS9ahMPt Mar 24 01:45:05 Yes I understand the chain, I just couldn't get it to work on android. Let me fire up geny Mar 24 01:46:18 i actually meant subscribeOn in the flatMap, i think Mar 24 01:46:18 CedricBeust did you ever see http://www.grahamlea.com/2014/07/rxjava-threading-examples/ Mar 24 01:46:40 g00s: I did, yes Mar 24 01:53:50 Hey guys. Is it possible to "Run..." without building one of the erronous files? Mar 24 01:56:56 heh, I totally forgot about trying to register for IO Mar 24 01:56:57 fuck it Mar 24 01:57:04 I don't need no google ios Mar 24 01:57:33 they will probably recap material :D Mar 24 01:57:52 I mean I want free shit really :p Mar 24 01:57:54 JakeWharton: This is what you get if you try this with rxandroid: http://pastebin.com/pR16pSRw Mar 24 01:58:25 you don't have a subscribeOn(AndroidSchedulers.mainThread()) Mar 24 01:59:00 Ok let me try Mar 24 01:59:45 JakeWharton: But then flatMap runs on the main thread too Mar 24 02:00:16 but you can tell it not to Mar 24 02:00:28 How? Feel free to modify my pastebin, I'll be your proxy emulator Mar 24 02:00:33 hah Mar 24 02:02:15 http://pastebin.com/zjpXQGnD Mar 24 02:02:45 Oh you do this in the body of the flatMap Mar 24 02:02:52 I missed that in your original pastebin Mar 24 02:04:36 Retrofit actually does that automatically with its API calls Mar 24 02:05:16 a likely mistake on my part due to being a bit green with RxJava a long while ago, but it turns out to be useful in most situations Mar 24 02:06:01 Yes I figured retrofit would do that but my next trick in the series will be to update tables, and things become fun very quick Mar 24 02:07:04 i just implemented a real-time search last week Mar 24 02:07:13 so many pitfalls Mar 24 02:08:49 great fun though, learned a lot Mar 24 02:08:54 switchMap is my new BFF Mar 24 02:09:06 Haven't used that one yet Mar 24 02:09:30 Why am I getting a nullpointer when running `PreferenceManager.getDefaultSharedPreferences(this);` ? Mar 24 02:09:49 I'm doing that inside a onPostCreate in a SettingsActivity Mar 24 02:09:58 dont use default Mar 24 02:11:20 that non-static method can't be referenced from a static context.. Mar 24 02:11:46 lasserix ^ Mar 24 02:12:05 wha? Mar 24 02:12:31 change this -> getActivity ? Mar 24 02:12:37 getApplicationContext ? Mar 24 02:13:13 Hi, I'd like to create a service with a notification icon in the top right of the screen, is there any way to do it? I know that its possible on the left using the Notification api, but I have the requirement about putting it on the rigth Mar 24 02:13:43 lasserix: Thanks Mar 24 02:13:55 np Mar 24 02:14:03 I read about the activity overlays, but not sure I can draw in that area of the screen? Mar 24 02:14:27 jjardon sure Mar 24 02:14:33 but it wont be a notification at all Mar 24 02:14:38 itll just be annoying floating window Mar 24 02:14:49 that will make you users uninstall your app Mar 24 02:16:15 lasserix: :) Mar 24 02:17:01 Any other way to do this then? I know its a pretty special thing Mar 24 02:17:27 I want to create different fragments depending on the data from a CursorLoader. However, creating a fragment in onLoadFinished is frowned upon due to "bad UX" and possible state loss. What is the recommended way to do this? I can't find any good alternatives. Mar 24 02:17:35 jjardon: just do normal notification? Mar 24 02:17:52 lasserix: Actually, I am still getting that NullPointerException.. Mar 24 02:18:01 amarein: just load different views into your fragment with addView removeView Mar 24 02:18:12 wilornel: using getApplicationContext? Mar 24 02:18:18 yeah Mar 24 02:18:30 this is in a fragment? Mar 24 02:18:41 in a PreferenceActivity Mar 24 02:18:48 1 SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); Mar 24 02:18:53 lasserix: I'd like to, but its a requirement of the project that the icon is on the right, not in the left Mar 24 02:19:07 s/1/`/ Mar 24 02:19:44 How can one investigate those nullpointerexceptions?... Mar 24 02:19:46 lasserix: I have different fragments because they do very different things based on the data. Separating the fragments encapsulated not only views but different logic behind the views. I've considered this approach, but would appreciate a different one. Mar 24 02:19:53 jjardon: explain to whomever the reqs come from that they're breaking the Android canonical design pattern for notifications and it'll only piss users off Mar 24 02:20:11 wilornel: try doing Context c= getApplcationContext() and see if it is null with debugger Mar 24 02:20:18 jjardoncan i ask why they want that ? Mar 24 02:20:19 put a break point after it, then debug Mar 24 02:20:27 jjardon ^^ Mar 24 02:20:45 Hi! Is it ok if I run something that takes time and processor in a callback with new Handler(Looper.getMainLooper()).post(callback) ? Mar 24 02:20:46 thanks Mar 24 02:20:57 I'm not sure if it's the same as running the same code in the main thread Mar 24 02:21:01 amarein: if you need to switch your view state AFTER on load finished there really is no other way? at some point you are going to have to switch Mar 24 02:21:08 in which case it's an awful idea Mar 24 02:21:15 amarein: and you can add/removeview at any point so.. Mar 24 02:21:39 Mattx: yeah itll be on ui thread Mar 24 02:22:03 this code I wanna run doesn't need to be in the UI thread actually, but I'm creating a webview Mar 24 02:22:11 and so it crashes saying it needs to be in a ui thread Mar 24 02:22:26 you need to do Thread t = new Thread(new Runnable() { //youcode XXX }l); t.start() where XXX is Handler(Looper.getMainLooper()).post(new RUnnable() { // callback to UI } Mar 24 02:22:50 Mattx: do what you need to do in the BG then callback to the UI for the call that touches the view Mar 24 02:22:53 lasserix: There are other ways, such as checking if the activity has been destroyed and committing the fragment transaction with activity state loss. I am unfortunately leaning towards this approach, because it hopefully ensures that there will be no state loss. Mar 24 02:23:16 why? Mar 24 02:23:22 Mattx: What is this slow task you're needing to do? Mar 24 02:23:37 amarein: just use custom veiw group, that's what they are for! Mar 24 02:23:44 lasserix, I was trying to do that, I had a AsyncTask for almost everything, and at the end new Handler blah blah in the UI thread. but it crashes saying I cannot create the WebView like that Mar 24 02:23:54 lasserix: g00s this is meant to be in a special device, not a regular phone/tablet, and they want to put some "system" info with the rest of system icons Mar 24 02:23:59 amarein: no state loss, simpler life cycle Mar 24 02:24:20 MatX yeah you can't do that with views Mar 24 02:24:27 Ach. It has to do with my EditTextPreference. What's wrong with it? http://paste.ubuntu.com/10665716/ Mar 24 02:24:28 jjardon then i'm sure you saw this? http://stackoverflow.com/questions/18350016/how-to-create-a-notification-status-bar-icon-on-the-right-side Mar 24 02:24:35 Mattx: you can preview information and even render a bitmap but you can't set that bitmap or create the view Mar 24 02:24:54 lasserix, ok, so I'll create a new Thread with a new Handler inside Mar 24 02:25:27 wilornel: wait so getAppCntxt works now? and you need to be more specific Mar 24 02:25:37 lasserix: That is an interesting suggestion. I'm curious, when would you recommend using a (visible) fragment instead of a view? Mar 24 02:25:56 Mattx, you just put whatever calls that touch views inside the handler LooperMainLooper but everything else you can do on that thread Mar 24 02:26:01 amarein: never Mar 24 02:26:11 amarein: :) Mar 24 02:26:19 lasserix: Haha, may I ask why? Mar 24 02:26:22 fragments are overcomplicated, and i would only use them if i need to Mar 24 02:26:28 It might be better to use a thread-pool (via Executors.newSingleThreadExecutor or something) than to instantiate Thread directly Mar 24 02:26:48 they are overcomplicated life cycle, they have compatbility bugs, and everything they need can be done more simply in a custom view/viewgroup Mar 24 02:27:02 what's wrong with my EditTextPreference? http://paste.ubuntu.com/10665716/ Mar 24 02:27:04 TacticalJoke: baby steps :) Mar 24 02:27:18 wilornel: not enough information Mar 24 02:27:36 what is it missing? Mar 24 02:28:01 lasserix: or do you mean you don't have enough context around the EditTextPreference? Mar 24 02:28:22 this is just xml Mar 24 02:28:25 not very helpful Mar 24 02:28:53 well, the "setupSimplePreferencesScreen" only fails when this xml is present Mar 24 02:29:05 amarein: another way to say that is, why are you so hung up on fragments? Mar 24 02:29:17 Ach, nevermind me! Mar 24 02:29:25 lasserix: I'm actually sitting here trying to think about the pros and cons haha. Mar 24 02:29:55 everything you like about your fragment that encapsultes whatever, can more simply be done inside custom viewgroup Mar 24 02:30:00 g00s: seems exactly what we need, thanks! Wonder if a overlay can achieve the same effect without the need of modifying the system though? Mar 24 02:30:08 then you only have two callbcks -- onAttachtowind and onDetachedfromwindow Mar 24 02:30:15 lasserix: One thing that I do like about fragments is that they allow me to write logic to control the view. For different case I want to display, there is different logic. Mar 24 02:30:31 amaerien, you can do that ina custom viewgroup! Mar 24 02:30:39 lasserix: I'm trying to think of a counter example! Hahah Mar 24 02:30:48 and you can even use a single fragment to switch between custom viewgroups if you want Mar 24 02:31:06 for instance, you can't recycle fragments Mar 24 02:31:36 lasserix: Hmm, interesting. You said before that you wouldn't use fragments unless you needed to. Can you tell me some cases where you would be required? Mar 24 02:31:41 I hate code that takes days to mentally refactor. Mar 24 02:31:50 The only thing I can think of that requires fragments is maybe a ViewPager Mar 24 02:31:51 amarein: non-ui fragment with set retain instance, maybe Mar 24 02:31:56 It's like "Not sure if dumb or code is just really complex". Mar 24 02:31:57 amarein: but haven't used them for a long time now Mar 24 02:32:17 amarein: viewpager is the worst with all the backwards compat issues Mar 24 02:32:21 just use a viewpager Mar 24 02:32:21 lasserix: Ah, I saw an article about using fragments for retaining state across configuration changes. I honestly felt like it was a bit of a hack. Mar 24 02:32:39 lasserix: with vies, and you can even use jakewhartans salvage library to recycle the views of the viewpager adapter Mar 24 02:32:45 Yeah, retainState() should be used very rarely Mar 24 02:32:58 amarein: Seems like a hack to me, too, although I'm no Fragment expert. Mar 24 02:33:27 salvage! Mar 24 02:33:30 i forgot about that thing Mar 24 02:33:54 JakeWharton: heh thanks for posting it, helped my overly complicated viewpager implementation tremendously Mar 24 02:33:58 Why is that fragment transactions are not allowed in onLoadFinished, but setting/changing views is okay? Mar 24 02:34:11 Grrr why does AS keep flashing in the task bar when I just stopped the debugger. And it's not telling me why it requires my attention Mar 24 02:34:24 Overly attached IDE. Mar 24 02:34:39 amarein: has to do with the fragment lifecycle Mar 24 02:34:42 TacticalJoke: I was surprised to see that it was recommended by Android, but maybe I've been thinking about fragments the wrong way. Mar 24 02:34:55 amarein: where do you see that being frowned upon? Mar 24 02:35:04 lasserix: Which part? Mar 24 02:35:47 amarein: Some of the officially recommended stuff is just a bad idea, if you ask me. Mar 24 02:36:18 Gotta be so skeptical on this platform. :D Mar 24 02:37:02 fragment in on load finished Mar 24 02:37:06 TacticalJoke: Honestly this is one of the first instances where I was surprised at the recommended strategy Mar 24 02:37:29 lasserix: It's not only frowned upon, but an exception is thrown. Hold on I'll find the link Mar 24 02:38:17 lasserix: https://groups.google.com/d/msg/android-developers/dXZZjhRjkMk/QybqCW5ukDwJ Mar 24 02:38:47 TacticalJoke like https://screen.yahoo.com/bad-idea-jeans-000000942.html Mar 24 02:39:21 "Sorry! The content provider has not given us the rights to play this video in your location." Mar 24 02:39:34 Hello. If very fast push hardware button (i use volume down), application not recieved KeyEvent in dispatchKeyEvent. But after stop push, all events recived at one time (delta time 0 ms). How to recive events in real time? Mar 24 02:39:34 amarein: there's no way to know what kind of data you're going to get from the loader before hand? Mar 24 02:39:49 That reminds me of those websites that "close" at 9pm. That is not how the Internets work. Mar 24 02:40:13 TacticalJoke ddg "Bad Idea Jeans" saturday night live Mar 24 02:40:16 lasserix: unfortunately not. Although I do not find that abnormal. It seems normal to me to only know the data you need after the loader has done it's work. Mar 24 02:40:32 but you are requesting it Mar 24 02:40:48 well dianes point is radical shifting is bad Mar 24 02:40:56 so for instance if you put up a progress dialog LOADING Mar 24 02:40:59 while it is loading Mar 24 02:41:06 then switching fragment onloadfinished is fine Mar 24 02:41:25 since you're not tripping up the user by not causing a radical shift in the UI Mar 24 02:42:02 :D Mar 24 02:43:27 lasserix: Hmm, I take back what I said about not knowing anything before the loading finished. The activity that controls the fragments is started by an onClick from an adapter. This adapter passes the content Uri. I can also have it pass in the basic data that I need to choose the fragment to create. Then load the data and set the data in the fragment accordingly. Mar 24 02:43:54 lasserix: That was the long way of saying, I think I found a solution. Although I'm not sure how much I like it yet. Mar 24 02:44:01 lasserix, do you happen to know if it is possible to run some code in UI thread and inside that callback execute a non-ui thread to run the rest of the code? Mar 24 02:44:21 the problem is that I have Mar 24 02:44:48 Mattx: What exactly are you doing? Mar 24 02:44:56 so I'm doing AsyncTask ... new Handler ... Mar 24 02:45:44 Why couldn't your background thread post the runnable and then continue doing background stuff? Mar 24 02:46:00 * g00s slapps Mattx with a large RxTrout Mar 24 02:46:04 Mattx: sure Mar 24 02:46:17 TacticalJoke, I have some code that has 3 parts, the first part needs a few seconds to run, so I'm executing this in an AsyncTask. the second part creates a WebView, so I'm running it in a callback with new Handler Looper.getMainLooper(). the third part doesn't need to be run inside an UI thread, but it needs the previous part to finish Mar 24 02:46:36 Mattx: don't use async if you're going to call Handler.getMainLooper.post in doInBackground Mar 24 02:46:41 What are the first and third parts? Mar 24 02:47:15 can't you just make webview on ui thread? should be relatively fast Mar 24 02:47:38 amarein: sounds like the correct solution! Mar 24 02:47:51 lasserix: Thanks for talking it out with me :) Mar 24 02:48:09 i'm getting the first item (textview, top-leftmost) in a gridview losing the gravity when scrolling back Mar 24 02:49:25 https://gist.github.com/anonymous/2db7f1b0f6a8a8cd5baa Mar 24 02:49:27 there it is Mar 24 02:49:36 I'm sure it could be better, please tell me what you would do Mar 24 02:50:12 btw, PART3 needs the views from PART2, but it doesn't create any new view Mar 24 02:50:16 Mattx: What is part three? Mar 24 02:51:10 it runs some queries to the DB, set visibility depending on the results. get the AdView and request a new ad, etc Mar 24 02:51:29 So part 1 and part 3 are completely separate. Mar 24 02:51:50 yep Mar 24 02:51:55 Also, I would like to hear thoughts on using an AsyncTask versus AsyncTaskLoader. I currently have an AsyncTask that has a callback to the activity in onPostExecute. However, this is causing an IllegalStateException when the activity is destroyed. I was thinking that a loader could manager this for me better and would be interested in hearing other people's opnions. Mar 24 02:52:02 2 depends on 1, and 3 depends on 2 Mar 24 02:53:12 I don't use AsyncTask, but I think it would make sense for you to use onPostExecute here (rather than Handler.post). And two AsyncTasks, not one. Mar 24 02:53:24 Your code should probably make it crystal clear that these are two separate background tasks. Mar 24 02:53:29 Mattx: I agree with TacticalJoke Mar 24 02:54:19 can you prototype the code please? Mar 24 02:57:22 Mattx: One AsyncTask to perform Part 1 in doInBackground, and Part 2 in onPostExecute. Retrieve the value from this AsyncTask and pass it into a second AsyncTask that performs Part 3. Mar 24 02:57:58 TacticalJoke did you see this? http://www.reddit.com/r/androiddev/comments/300f6b/why_gplay_is_flawed_as_fuck_how_i_got_24k/ Mar 24 02:58:01 amarein: just hold a reference to the async task and in ondestroy set it to null Mar 24 02:58:06 Yeah, crazy. Mar 24 02:58:08 amarein: and cancel the async task Mar 24 02:58:17 amarein: or do something wit retained fragments to save state Mar 24 02:58:29 TacticalJoke i'm trying to understand this. so he named his app some arbitrary thing, which happened to be what some video was called ? Mar 24 02:58:41 amarein: or cancel publishing to ui but serialize it, then check when you come back if a serialized form of the data appears FIRST in the async task Mar 24 02:58:42 and that video was trending, so his app did too ? Mar 24 02:58:47 I think so, yeah. Mar 24 02:58:52 He just saw some trending thing and named it that. Mar 24 02:58:53 hehe Mar 24 02:59:03 ok, almost there Mar 24 02:59:08 I guess you could look on Twitter and stuff (I forget where he looked). Mar 24 02:59:18 lasserix: Nice and simple. Any reason not to use an AsyncTaskLoader besides it being a little more complicated? Mar 24 02:59:41 I'm trying to set up a long-press CAB on a ListView, and I've set the ChoiceMode and MultiChoiceModeListener as per http://developer.android.com/guide/topics/ui/menus.html#context-menu, but when I long press, the tap action is still the only one happening. Mar 24 02:59:48 I have also enabled longClickable in the XML for both the ListView, and the custom view for the row items **** ENDING LOGGING AT Tue Mar 24 02:59:58 2015