**** BEGIN LOGGING AT Wed Jan 28 02:59:59 2015 Jan 28 03:00:05 With custom Views, for example. Jan 28 03:00:55 TacticalJoke: the lack of overloading can be worked around, but yes, it's not super clean. Not a huge deal in practice though Jan 28 03:02:10 Is there a workaround for custom Views? Jan 28 03:03:29 You can pass nulls, you can specify default parameters or use a factory Jan 28 03:05:26 operator or method overloading ? Jan 28 03:05:31 so I'm still stuck :( http://stackoverflow.com/questions/28183552/how-to-animate-multiple-simultaneous-view-animations-with-differing-speeds-in-an Jan 28 03:05:59 NPE! Jan 28 03:06:18 if only I got a nickel for those Jan 28 03:09:50 any ideas why the scale down wont work? Jan 28 03:23:00 Kotlin's use of extension functions to enhance the Java API is pretty clever. Jan 28 03:23:20 Yes, very convenient Jan 28 03:24:27 I'd love to switch to Kotlin but it could take so much time away from my project. Hmm. Jan 28 03:24:48 deuteros__ using kotlin too ? Jan 28 03:25:24 g00s: I've been using on the server but getting very tempted to use it on android too now Jan 28 03:25:38 oh nice Jan 28 03:27:00 I'm writing some slightly complex code right now. Having extension methods would improve readability enormously. Jan 28 03:27:17 Using "Foos.bar(bleh);" really slows down the reader. Jan 28 03:27:56 TacticalJoke not like you have to go all or nothing, why not start off with some low-risk loh-hanging fruit ? Jan 28 03:27:56 hello everyone Jan 28 03:28:27 hi Jan 28 03:28:28 Yeah, was thinking of that. I'd still probably spend forever getting acquainted with Kotlin, though. :D Jan 28 03:28:45 you're going to spend the same amount of time wondering about it ;) Jan 28 03:30:30 TacticalJoke: it takes just a few days to get used to it, try it on a personal project Jan 28 03:30:46 It's really a minor incremental improvement to Java but it feels so good Jan 28 03:32:42 I don't know anything about Kotlin except that name sucks Jan 28 03:33:27 Levite: Yeah I thought the same thing the first time I heard about it, you get used to it :) Jan 28 03:33:48 is that pronounced with a hard "o" like Kotex? Jan 28 03:34:45 I think "Lucid" would be a cool name for a programming language. Jan 28 03:35:09 The best feature in naming a new language is making it easily google-able Jan 28 03:35:11 as in Lucid emacs? :) Jan 28 03:35:21 that's where "Go" and ".NET Jan 28 03:35:22 fail Jan 28 03:35:25 Levite: True, and kotlin is very googlable, as opposed to "go" :) Jan 28 03:35:33 he, yeha Jan 28 03:37:20 C, C++, and C# aren't great for googling, either (although Google does seem to treat them specially to some degree). Jan 28 03:37:23 google-ability is paramount imo Jan 28 03:37:34 "d" is clever but awful Jan 28 03:39:06 What do you think about Kotlin, groxx? Would you consider switching for Android stuff? Jan 28 03:40:13 TacticalJoke: looks very appealing, both in technique and first-class nulls. not touching it though. Jan 28 03:41:33 I prefer being able to switch editors, and I don't know how it works with crash reporting systems Jan 28 03:41:49 plus no annotations is a pretty tough pill to swallow Jan 28 03:42:55 Kotlin has annotations Jan 28 03:43:32 sorry, mistyped. no annotation processors. Jan 28 03:43:43 does it have annotations at all? o Jan 28 03:44:13 I must've missed that when I looked Jan 28 03:45:43 groxx: extension methods make annotation processors somewhat moot but time will tell Jan 28 03:46:05 I think I'll wait and see what happens. If 1.0 comes out and loads of people switch, I might switch. Jan 28 03:46:24 deuteros__: eh... not quite. what would you do for dagger? Jan 28 03:46:25 http://www.reddit.com/r/Android/comments/2tqc6c/marriotts_android_app_has_probably_been_leaking/ Jan 28 03:46:32 TacticalJoke: fair enough. It's interesting that Square seems about ready to take the plunge Jan 28 03:46:32 Not to follow the crowd but to play safe. Jan 28 03:46:45 groxx: Yeah the lack of Dagger worries me but it doesn't seem to worry Jake Jan 28 03:46:47 Yeah. I'll be curious to see whether they go for it. Jan 28 03:47:15 deuteros__: sure. it's very appealing, don't get me wrong there :) Jan 28 03:47:39 plunge onto kotlin? Jan 28 03:47:44 groxx: I'm with you, so close to recommending we switch at $work but not quite there yet Jan 28 03:47:56 all of which may seem weird, since I like retrolambda. but that's easy to undo if I ever need to. Jan 28 03:48:11 not so much with kotlin Jan 28 03:48:15 * pfn shrugs Jan 28 03:48:18 switching back is overrated Jan 28 03:51:54 deuteros__: well, I doubt I'd ever convince work to switch :) that might be part of my reluctance. Jan 28 03:52:14 Is the no-checked-exceptions thing a good thing or a bad thing? Jan 28 03:52:20 groxx: That's my dilemma, I don't need to convince anyone, I can just say "Now we use Kotlin". The problem is that I'm accountable for that decision down the line :) Jan 28 03:52:30 I actually have warmed to checked exceptions somewhat lately. Jan 28 03:52:37 TacticalJoke: mostly I think a convenient but bad thing Jan 28 03:53:17 If I choose to use only unchecked exceptions I find myself writing it all in Javadoc anyway. Those @throws comments end up being simply weaker 'throws' clauses. Jan 28 03:53:18 it seems like treating sniffles by removing your nose Jan 28 03:53:43 TacticalJoke: It's a bad thing. It's important to have the choice between checked/unchecked. That choice is sometime shard to make, though Jan 28 03:54:05 Yeah, and people get it wrong so often (including the Java designers :D). Jan 28 03:54:16 TacticalJoke: yup. We're still learning. Jan 28 03:57:58 The ability to create DSLs in Kotlin looks like it'd be really nice for unit testing. Jan 28 04:06:37 In retrospect, I suppose it would probably work fine with crash logging systems Jan 28 04:08:49 TacticalJoke: ever looked at MPS? Jan 28 04:11:49 First time I've heard of it. Looks pretty handy. Is it hard to set up the DSL, though? Jan 28 04:13:48 deuteros__ it would be nice if google said something like 'we're working with jetbrains to ensure seamless kotlin usage and provide 1st class alternative to java' Jan 28 04:14:25 then i bet even if google didn't contribute directly to anything, more risk averse would go ahead Jan 28 04:15:26 the 2 main factors are: is kotlin really worth it in terms of (1) what it gives and (2) what potential issues might come down the road Jan 28 04:16:58 TacticalJoke: no idea :) ran across it a while ago, it's an interesting idea. hopefully I'll try it some time, it gives me ideas. Jan 28 04:17:23 g00s: Google has been crystal clear that they are not working on anything but java support (and "old" java support at that) Jan 28 04:17:41 and if they ever decided to add a new language, you can bet it would be their own and not somebody else's Jan 28 04:18:03 first class go support would be interesting Jan 28 04:18:22 Not really to me. No exceptions, no generics, no thanks. Jan 28 04:18:43 go isn't really on my list either, tbh :) rust may be though Jan 28 04:19:07 go only seems to have a few interesting things Jan 28 04:19:15 not enough to get excited about ;) Jan 28 04:20:51 OH: "... we're a family owned business for X years..." nepotism! Jan 28 04:22:13 Seems to be working just fine for North Korea, another family owned business Jan 28 04:36:25 why is android 5.0 not shown on the dashboard? Jan 28 04:37:00 not enough penetration yet Jan 28 04:37:10 twss Jan 28 04:38:24 I want to have a table-like layout with rows that have a TextView and two ImageButtons. I got it working with TableLayout but the code was very messy and TableLayouts don't seem to be made for dynamic generation (overflow issues too). Can ListViews have inline buttons? Jan 28 04:38:53 Levite: http://i.stack.imgur.com/jiFfM.jpg Jan 28 04:40:07 pretty sad after 4 months, it does have 0.1% share Jan 28 04:40:19 seems google's issues are getting worse with version fragmentation Jan 28 04:40:36 duncannz: sure, just have a more complex row. you can put anything in listview rows. https://html5zombo.com/ Jan 28 04:41:04 thanks Jan 28 04:42:07 Whoa, it's in HTML5 now. Jan 28 04:42:21 TacticalJoke: the magic continues Jan 28 04:43:59 I'm just waiting for the html6 version. html5 is so this year. Jan 28 04:45:17 I'm getting "Bandwidth limit exceeded" on the original: http://www.zombo.com/ Jan 28 04:45:51 yeah, that's a big reason I linked to html5zombo :) Jan 28 04:46:12 maybe this is the year of the zombo apocalypse, and the horde has descended on the site Jan 28 04:46:40 though html5zombo has the benefit of working on most phones Jan 28 04:46:49 letting you do anything on your phone Jan 28 04:52:02 JakeWharton: apologies for the mention, but: just finished watching the devoxx dagger 2 presentation. something finally clicked when you hit scopes - will definitely be adopting, I have a section of my app that seems like it would fit perfectly \( ゚ヮ゚)/ thanks for the presentations, very helpful! Jan 28 04:52:28 groxx: glad to hear it Jan 28 04:53:34 it has been rather nebulously on my to-do list for a while, but yeah. a concrete idea landed rather hard today. Jan 28 04:57:15 F ME Jan 28 04:57:22 http://www.reddit.com/r/Android/comments/2txan1/dont_dmca_me_bro/ Jan 28 05:00:46 Agamemnus: 9 times out of 10 when I read a story like that, it turns out the person who complains was doing something fishy and/or not telling the whole story Jan 28 05:01:04 Maybe, but I can believe that story. Jan 28 05:01:29 deuteros__: 10 times out of 10 Jan 28 05:01:42 JakeWharton: I was trying to be charitable Jan 28 05:02:27 Haven't there been cases where the appeal was won and the app was reinstated with zero changes? Jan 28 05:02:36 I seem to remember reading about such cases. Jan 28 05:03:07 I'm sure there are such cases and equally sure they are a minority Jan 28 05:03:10 maybe if it winds up on androidpolice or people raise hell Jan 28 05:03:15 pretty often. google doesn't have a heck of a lot of options though, when it comes to dmca complaints. Jan 28 05:03:40 (pretty often in general. dunno about when dealing with google specifically) Jan 28 05:04:41 they filed a dmca complaint, the copycat app filed a dmca complaint back, and the original app got removed? Jan 28 05:04:46 sounds like Jan 28 05:05:59 oh man, lol, that's worse than expected. I do kinda wonder if someone just misread it and blocked the wrong app Jan 28 05:07:00 yea. perhaps that persons first language wasnt english Jan 28 05:07:05 pretty nuts Jan 28 05:07:25 right, night people Jan 28 05:10:13 yeesh. there's nothing like android dev + running an emulator to drain your laptop battery. Jan 28 05:10:55 Is using listViews alot in an application normal? Jan 28 05:11:03 sure Jan 28 05:11:11 or it's successor, RecyclerView Jan 28 05:11:21 Yeah, heared abotu that, hows it different?> Jan 28 05:11:50 it's more and better engineered Jan 28 05:11:54 but less well documented Jan 28 05:12:13 e.g. you get fancy animations for free Jan 28 05:12:29 oh do you? Jan 28 05:12:37 I think it's less simple, though. Jan 28 05:12:53 Something I could figure out? Or really crazy? Jan 28 05:12:57 For example, you have to =implement dividers yourself. Jan 28 05:13:12 hm Jan 28 05:13:18 I think it's something you could do. Jan 28 05:13:23 there's a github project that abstracts a lot of the complexity Jan 28 05:13:33 Something worth learning though? Jan 28 05:13:37 for sure Jan 28 05:13:47 Cool, thanks Levite Jan 28 05:13:49 especially if you want to use the new material design cardviews Jan 28 05:13:56 Yeah, those look really nice Jan 28 05:15:28 drose379: It has no onItemClickListener callback. You'd have to set onClick listeners on the View(s) yourself. Jan 28 05:15:37 Also, I'm not sure whether or how it interacts with context menus. Jan 28 05:16:03 I'm not a fan of the onItemClickListener pattern, though, personally. It's so limited. Jan 28 05:16:36 ugh. has anyone else had trouble with Studio's "export signed apk" dialog? I have a big random password, and I'm certain it was entered correctly, but the first few times I try it always fails. Jan 28 05:17:03 Im gonna look into it TacticalJoke , have you started using it yet? Jan 28 05:17:27 Not yet. Jan 28 05:17:33 I'll probably give it a try. Looks handy for my app. Jan 28 05:17:45 Do you use a lot of ListViews in the app? Jan 28 05:17:46 this is the github project I was talking about, though I haven't used it personally Jan 28 05:17:47 https://github.com/lucasr/twoway-view/ Jan 28 05:18:08 So far, I have one for the list of reddit posts and one for the list of comments. Jan 28 05:18:14 fwiw you get a fair number of animations for free with listview too. use stable ids, and set animateLayoutChanges=true. Jan 28 05:18:38 TacticalJoke what else does the app do? Jan 28 05:19:24 So far it simply allows reading reddit. You can view lists of posts in subreddits, submitted links, and comment lists. Jan 28 05:19:33 You can change subreddit; log in; download your list of subreddits. Jan 28 05:19:44 Sweet, cant wait to use it Jan 28 05:20:08 And you can do basic stuff such as collapsing comments. Jan 28 05:20:22 Do you design as you program or do all your backend programming and then work on design? Jan 28 05:20:42 I haven't done much design stuff yet. Almost entirely back-end. I'm about to do heavy UI stuff. Jan 28 05:21:26 speaking of apps. have I linked you people to my side project yet? Jan 28 05:21:28 Like what? Jan 28 05:21:33 groxx what is it? Jan 28 05:21:35 Not that I've seen, groxx. Jan 28 05:21:50 https://www.kickstarter.com/projects/471135636/comic-chameleon-the-ultimate-webcomics-app-android Jan 28 05:22:30 Which one is you, groxx? :) Jan 28 05:22:36 Did you write the iOS version? Jan 28 05:22:38 the (only) android dev Jan 28 05:23:21 Raised 22 grand, nice Jan 28 05:23:30 long story short, they're doing things right, and they only had the iOS app for a long time. then they blogged about the android-delay largely being because they don't know _how_ to build android apps. Jan 28 05:23:30 They hired you to make their android version? Jan 28 05:23:40 so I made a prototype over a weekend and emailed 'em. Jan 28 05:23:59 Their iOS app looks awesome. Jan 28 05:24:10 I'd love to use such a thing on Android. Jan 28 05:24:34 Good for you groxx Jan 28 05:24:34 I've been a webcomic addict for quite a while now. so far _every_ source I've seen either sticks to strict RSS, or scrapes websites, basically 100% of the time without permission Jan 28 05:24:56 this company, meanwhile, is exclusively doing things with permission, and with revenue sharing. Jan 28 05:25:15 I used to read web comics but gave up because it was so tedious. So, yeah. This makes sense. Jan 28 05:25:16 How much is the app worth? Jan 28 05:26:00 hi, does anyone know how to create a stacked full width action button for an alertdialog in android? Jan 28 05:26:19 so instead of cancel and ok being side by side, they can be stacked vertically? Jan 28 05:26:31 $10k. it's mostly for fun, tbh. Jan 28 05:26:39 full of awful code still Jan 28 05:27:03 groxx I know you said you didnt write the iOS app, but can you write iOS (Objective-C) Jan 28 05:27:04 ? Jan 28 05:27:16 yeah, my first mobile work was iOS Jan 28 05:27:26 And you switched to Java? Jan 28 05:27:57 groxx: The way I've implemented comment collapsing/expanding in ListView is such that I simply mutate the data source and call notifyDataSetChanged. Would animateLayoutChanges work there? (I'm guessing not.) Jan 28 05:28:19 tl;dr of it all is: started web, we experimented with iOS, found it _extremely_ valuable. experimented with Android. _way_ more valuable. now we're on a second project, Android only so far. Jan 28 05:28:40 groxx: but I heard there's no money in Android, only iOS Jan 28 05:28:42 TacticalJoke: _maybe_. I've only done simple things with it. Jan 28 05:29:08 When you say we do you mean you work with a team? And what do you mean by valueble Jan 28 05:29:27 Leeds: per user, it's largely true. we're a startup though, so we're funded - engagement is more valuable for us, and android had way more, and way more users. Jan 28 05:30:08 What is your startup? Jan 28 05:30:32 that, regrettably, work wants to keep quiet on. and I'm not the only one, so I'll respect that :) Jan 28 05:31:10 *it's an app for punching people across the internet Jan 28 05:31:14 I wish Jan 28 05:31:15 groxx Does the fact that Android users tend to spend less money on apps compared to iOS worry you (or your company)? Jan 28 05:31:38 deuteros__: not really. a) there are more android users. b) not really. Jan 28 05:31:53 "Support for running JUnit tests" has been merged in studio-1.1-release (). I'm guessing that means I can expect cool stuff in 1.1. Jan 28 05:31:59 ^ sweeeeet Jan 28 05:32:24 groxx is do you like using Java better then objective-c Jan 28 05:32:37 oops, didnt mean to say "is" Jan 28 05:32:42 I've never used Objective-C but, gawd, that language looks horrible. :D Jan 28 05:33:16 Syntactically. Jan 28 05:33:24 Semantically too Jan 28 05:33:36 there's no easy answer there. iOS's documentation is way better, and the framework is more sane. Java is stricter (in a good way), but it misses out on categories (extending existing classes). Jan 28 05:34:04 obj-c is... well, since ARC and the dot-notation, it's decent. Jan 28 05:34:21 Still dynamically typed though, a deal breaker for me Jan 28 05:34:39 I should say: ARC is flipping AMAZING, dot-notation reduces pain. the overall looseness of the language has a few upsides, but lots of downsides. Jan 28 05:34:43 I'm kinda perfectionistic with programming. I detest the idea of even something as basic as using a class named NSString. Eww. Jan 28 05:34:44 swift is stricter than Java tho Jan 28 05:34:53 but that learning curve is just whoa Jan 28 05:34:56 yeah, no namespaces is ew-worthy. Jan 28 05:35:01 "stricter" in what way? Jan 28 05:35:22 like, it enforces @Nullable for example Jan 28 05:35:39 it's reasonably kotlin-esque Jan 28 05:35:46 Dynamic typing seems like an absolute pain to me. Jan 28 05:35:48 it makes it hard to fuck up intentionally Jan 28 05:35:49 Anyone know diff between post and put? Jan 28 05:35:49 Yeah fair enough, we have @Nullable/@Nonnull but it's not as expansive as Kotlin or Swift in that area Jan 28 05:36:01 unintentionally Jan 28 05:36:13 lasserix: semantics only. but there are some things that take it a bit further, like caching layers. Jan 28 05:36:17 Only time I've used it was in python, and it was such a productivity killer. Jan 28 05:36:50 and Apples docs are light years ahead of android like you said Jan 28 05:36:51 Anyone recomend best RESTful library to use given I want to be comfortable using it in half a day? Jan 28 05:36:53 Having to run unit tests every time you rename a method isn't fun. Jan 28 05:36:54 lasserix: semantically, "put" is "create" (exclusively), "post" is "update" (exclusively) Jan 28 05:37:31 everybody's docs are lightyears ahead of android Jan 28 05:37:36 tru dat Jan 28 05:38:00 iOSes were legitimately very good though. can't speak to the last ~2 versions, but I doubt they've changed substantially Jan 28 05:38:03 They're Buzz Lightyears. Android is the Buzz Kill. Jan 28 05:38:21 iOS needs background services like Android though. I miss that Jan 28 05:38:24 groxx ahh thanks Jan 28 05:38:57 and Apple makes you work hard to design a shitty interface. Android is the opposite Jan 28 05:38:58 Though I'll forgive them for their sins when they give me proper unit testing. Jan 28 05:38:58 lasserix: part of the point of the separation is that, that way, "put" will _fail_ if something exists already. so it's safe to call any number of times (>= 1), since it'll only ever create it once. Jan 28 05:40:47 (sometimes people use PUT to overwrite. since IMO that negates the point above of separating the two, I would recommend never doing that) Jan 28 05:41:54 groxx: It'll be fun to try your app when it's ready. Jan 28 05:42:03 How much have you done so far? Jan 28 05:42:18 there's an alpha out, we're aiming to be "done" in march. Jan 28 05:42:53 Touch-once-to-fill-screen looks really good. Jan 28 05:43:02 plenty of wtf crashes, like touch events that have no beginning (but do have a 'move'), or happening after views are disposed, of course. Jan 28 05:43:12 groxxx so if the server is implementing correctly, a put on a duplicate should fail Jan 28 05:43:21 The async Android UI stuff seems crazy at times. Jan 28 05:43:39 groxx what's the app you are working on? Jan 28 05:43:42 lasserix: generally, yeah. also it shouldn't change existing items, because semantically you weren't asking for that. Jan 28 05:43:49 thanks Jan 28 05:43:50 It's understandable that they do it. But most (all?) of the asynchronicity isn't documented. Jan 28 05:44:16 lasserix: https://www.kickstarter.com/projects/471135636/comic-chameleon-the-ultimate-webcomics-app-android is the side project, work requests I keep quiet for reasons. Jan 28 05:44:17 TacticalJoke: Nothing really crazy there, async is pretty much the norm in all UI's (and node is giving this even more exposure on the server, although I think node is silly) Jan 28 05:44:51 I guess I come from Windows programming where async stuff just didn't happen by default (as far as I can remember). Jan 28 05:45:03 Well, outside of normal message-queue behaviour. Jan 28 05:45:47 But on Android even starting an activity is async. This totally makes sense, but I bet lots of people don't realise that. Jan 28 05:46:22 well, also desktops (and ios, fwiw) are more forgiving. blocking for a couple frames isn't really noticeable outside games, and you have a crap-ton of memory, so there's no need to partially load things. Jan 28 05:46:23 And even Google apps have race conditions where you can start an activity twice where they intended for it to be started only once at a time. Jan 28 05:46:28 e.g., Google Keep. Jan 28 05:47:14 ios disk access is dreamily fast. _most_ people build lists directly referencing bitmaps on disk, and you don't even notice. on android, it's janky as hell. Jan 28 05:47:19 groxx you making a game? Jan 28 05:47:24 Actually, I guess what I describe is reentrancy, not a race condition. Jan 28 05:47:47 the problem comes when the docs don't explain interesting corner cases of async timing, like : if you bind to a service in onStart() of an activity A, and you just returned from activity B using startActivityForResult, which gets called first: the service connection, or onActivityResult Jan 28 05:47:49 groxx: Is it guaranteed to be fast? Jan 28 05:47:53 there's tons of shit like that Jan 28 05:48:19 TacticalJoke: race condition kinda describes it... it's not a threading race, but "tapped button" -> "was allowed to tap again before second activity appeared" feels pretty close Jan 28 05:48:26 TacticalJoke: not guaranteed, just is in practice Jan 28 05:48:40 consistently very good hardware Jan 28 05:48:41 Yeah, true. Jan 28 05:50:10 ah - lasserix: nope. it would probably be fun to try (I did a bit of opengl in school, AI is fun, etc), but not doing anything of the sort now. Jan 28 05:54:41 oh what is TJ talking about> Jan 28 05:54:57 ah i see Jan 28 05:55:03 oh cool Jan 28 05:55:05 child view needs to hear touches that are near its left edge and be swipeable in and out of view. Child is smaller than touchable area. Adapter? What Kind? Jan 28 05:55:38 knapper_tech: set it on the parent Jan 28 05:55:49 unless its a viewgroup you can intercept Jan 28 05:57:40 there's also a "touch delegate" thing I've never used Jan 28 06:00:26 I'm pushing RxJava into use too. The Android touch bubbling seems pretty complete though Jan 28 06:01:40 I guess I can use Rx for processing the streams of events and delegate the touches to children selectively. Going to read the bubbling and API behavior again real quick. Jan 28 06:06:12 No need to make subscriptions between the objects and have to plumb observables all over the place in singletons or class members with lifecycles etc Jan 28 06:07:20 If I have a string defined as null outside of a try block Jan 28 06:07:27 then give it a value inside a try block Jan 28 06:07:39 will it still hold that value if used later in the method, outside of the try blokc Jan 28 06:07:44 block Jan 28 06:07:45 yes Jan 28 06:07:55 Perfect, thank you Jan 28 06:09:06 Anyone have line numbers permanently showing in AS? Jan 28 06:09:27 intent services have to be registered in manifest correct? Jan 28 06:09:31 drose yah Jan 28 06:10:04 Is there a way to turn them on for all pages, or just one page at a time? Ive tried View->ActiveEditor->LineNumbers Jan 28 06:10:18 lasserix: they're services, so yeah Jan 28 06:10:39 drose379: should be all pages either T or F Jan 28 06:11:16 what do you mean Jan 28 06:12:37 if you set it to on will be visible on all Jan 28 06:12:43 if not, will not be shown for all Jan 28 06:13:12 For me if I set it for one it is only applied to that one Jan 28 06:14:13 Settings > Editor > Appearance > Show line numbers Jan 28 06:14:14 . Jan 28 06:14:32 restart? Jan 28 06:14:38 Thanks Jan 28 06:16:15 pro tip: use search in settings Jan 28 06:16:57 Thank you Jan 28 06:18:26 or just go looking through Jan 28 06:18:30 there's awesome things in there! Jan 28 06:18:44 I like Ctrl+Shift+A a lot (not sure what the MacOSX version is). Jan 28 06:18:55 Whats it do? Jan 28 06:19:05 Searches basically everything. Jan 28 06:19:14 ah ok Jan 28 06:19:25 Oh, it says "Find Action". Jan 28 06:19:39 I use Ctrl+Alt+S to get to Settings. Jan 28 06:22:33 Anyone had an interview for android wherin they asked you to code an app in an hour or two? Jan 28 06:23:59 there's also double-shift Jan 28 06:24:29 lasserix: we give those, if that counts Jan 28 06:24:57 umm i am asking in case there is anything you had wished you had remembered/forgot that i should look over Jan 28 06:25:06 ours aren't pass/fail, just insight into problem solving. Jan 28 06:25:16 think i got all my bases covered Jan 28 06:25:29 yeah mentioned i probably wouldn't finish it, but that was the point Jan 28 06:25:40 groxx: do you give people the internet? Jan 28 06:25:53 yep Jan 28 06:26:03 anything they usually use Jan 28 06:27:07 the question on my mind is if they ask to me doing something involving rest what approach would be the best Jan 28 06:27:16 most haven't built apps from scratch in quite a while, but it causes interesting discussion / if they're at all providing, we have a better idea of where to look next Jan 28 06:27:25 use retrofit, android http task, or ground up from httpurlconnection Jan 28 06:27:31 providing -> promising Jan 28 06:27:48 oh cool Jan 28 06:28:31 one of the first things i tell people when i present my problem is "use any language you want, use any IDE or tool you want, use resource on internet you want, use any library you want." Jan 28 06:28:42 "Sure, you can use HttpURLConnection. *quietly stamps form 'denied'*" Jan 28 06:28:55 groxx any really common mistakes? Jan 28 06:29:07 *devs do in doing that Jan 28 06:29:18 TacticalJoke: how would you do it? Jan 28 06:29:24 what are you using for aqua? Jan 28 06:29:31 OkHttp. Jan 28 06:30:09 and this is perfered over android async http client? Jan 28 06:30:16 *preferred over (for why)? Jan 28 06:30:35 For this, I'd be more interested in hearing the candidate give me a list of all the options and explain the pros/cons of each Jan 28 06:31:31 hm, really? have we reduced the craft of programming to explaining how each api can be poked ? Jan 28 06:31:40 I don't know much about that one, lasserix. I guess I didn't discover it at first. Jan 28 06:31:49 TacticalJoke: no worries, just curious Jan 28 06:32:04 The craft of programming is making good decisions Jan 28 06:32:24 this is my 3rd interview ever (well in android devving anyways) so trying to be prepared as possible Jan 28 06:32:32 It looks like it doesn't support SPDY. I'm getting crazy speeds with SPDY for reddit. Jan 28 06:34:22 Having said that, reddit seems a lot slower lately (these past few days), so I'm not seeing it as much lately. Jan 28 06:35:16 JakeWharton: that's pretty much exactly what we have. it's not what you use, it's how and maybe why Jan 28 06:35:53 lasserix: most common is probably "I clearly have no idea how asynchronous anything behaves" Jan 28 06:36:36 hehe Jan 28 06:36:39 anything else? Jan 28 06:36:43 *thanks Jan 28 06:36:59 that can be worked with if it's just new, but it's not a great start for people who profess degrees in cs and multiple years of mobile dev Jan 28 06:37:14 nah i got my async down pretty well Jan 28 06:37:26 *or i should say, i think i can handle that type Jan 28 06:37:37 lasserix: tbh you're probably already better than 90% of those we've interviewed. Jan 28 06:38:18 I mean, the bad ones tend to recirculate a lot, but yeah Jan 28 06:38:31 oh thanks Jan 28 06:38:54 yeah i wasn't satisified with myself after my previous interview, so trying to pre-interview myself from all angles Jan 28 06:39:56 one question was how would you implement launcher screen? Jan 28 06:40:40 "we want to make sure you have your UX anti-patterns down!" Jan 28 06:40:52 I try to stay away from launcher screen and focus on showing the user some real data they can interact with ASAP Jan 28 06:41:09 the quesiton was more how would you emulate the existing launcher screen Jan 28 06:41:20 lasserix: fwiw we're a startup, so preferences are a bit different. but valuable to us tends to be... Jan 28 06:41:23 *emulate -> recreate Jan 28 06:41:34 lasserix oh launcher screen, i thought you meant splash screen Jan 28 06:41:46 groxx: ahh that's perfect, it is a startup too, think like 20 people Jan 28 06:42:01 g00s ahh ;p Jan 28 06:43:25 can clearly learn new things (hard to verify). asks valuable questions (we leave things vague for a reason). solves the problems that inevitably come up with reasonable choices. Jan 28 06:44:32 plenty of room for fuzziness, but we're pretty permissive. usually there are glaring "definitely would be worse that our team average" things. if not, on to round 2 Jan 28 06:45:50 or maybe "with reasonable process" is a better phrase. a bit tired :) Jan 28 06:47:40 depending on the company, I'd guess that the important things are either "we can train them and have net gain in productivity" or "they'll improve us". the latter is kinda hard to find. Jan 28 06:48:27 yeah Jan 28 06:48:44 if they're pressed for time/speed, training may cost to much, but hopefully other skills are valuable enough anyway. Jan 28 06:48:53 and hopefully they notice :) Jan 28 06:49:29 they have dedicated team for iOS but haven't had need for android, now they do, so they are starting andorid dev team more or less Jan 28 06:49:40 which should be pretty cool to get if i can Jan 28 06:49:51 no system is perfect, and they're usually optimized to minimize the higher levels, because going through multiple rounds with dozens of people is really expensive. Jan 28 06:50:13 interesting Jan 28 06:50:16 yeah, i already talked to founder we got along well so this is round two Jan 28 06:50:29 dedicated web / server team(s)? Jan 28 06:50:35 ? Jan 28 06:50:52 umm yeah i think they also have web /server team too Jan 28 06:51:02 are you aiming to be pure client-side android, or a jack of all trades that knows android Jan 28 06:51:18 either/or later is pref. Jan 28 06:51:36 fairly common for startups, I think :) Jan 28 06:51:52 The best way to become valuable as a mobile engineer is to learn about the back end Jan 28 06:52:01 people who know android are pretty rare, it seems Jan 28 06:52:08 No better way to differentiate yourself from others Jan 28 06:53:37 fwiw I think that would be true for smaller startups. 20 isn't very small, they probably have a mature site and don't need help from people who don't know more than them Jan 28 06:53:56 which could obviously be wrong, but ymmv Jan 28 06:54:41 server admins seem more common than decent android devs, from our pool of applicants Jan 28 06:56:52 back end is technically interesting, front end is fun (if frustrating) Jan 28 06:58:21 lasserix: I realised recently I can use stream-parsing for my JSON stuff. My app is way, way lighter on memory now. Jan 28 06:58:30 cool Jan 28 06:58:31 It uses something like 1/6 of the memory from before. Jan 28 06:58:34 do you have a link ? Jan 28 06:58:37 ah, I forgot to include earlier: deep-ish knowledge about at least one system is usually a very good sign, from what I've seen. Jan 28 06:58:39 When downloading comments. Jan 28 06:58:47 groxx what constitutes a system? Jan 28 06:58:57 A link to what? Jan 28 06:58:58 TacticalJoke: do you have a link on how to do that json streaming? Jan 28 06:59:25 This is probably the simplest: http://wiki.fasterxml.com/JacksonInFiveMinutes#Streaming_API_Example Jan 28 06:59:38 The second example is reading. Jan 28 07:00:06 language, framework, anything. it's not too hard to poke at dozens of things, but using something enough to have detailed thoughts about what works and doesn't, and why, can reveal a LOT about how you think about things. Jan 28 07:00:48 and just the fact that you *have* implies you can again Jan 28 07:01:18 ahh ok thanks Jan 28 07:01:36 'tell me everything you know about X-- i'll come back in 10 minutes' used to be a google question Jan 28 07:02:04 even if the interview is flop, maybe interviewers learn something :D Jan 28 07:02:20 not everyone has that luxury, but it helps give evidence that you're capable of it. Jan 28 07:03:35 TacticalJoke: Nice. This API is pretty horrible, though, like the early days of SAX. We can't be very far from someone inventing XPath for JSON Jan 28 07:04:00 (also, I've decided that Jackson is way too big for Android, I try to avoid it) Jan 28 07:04:57 there is always jackson-jr Jan 28 07:05:02 * g00s hasn't tried it Jan 28 07:05:03 The jackson-core library is pretty small. Jan 28 07:05:29 g00s: yeah, I've had some fascinating interviews. quite a few people use things I've never touched, sometimes never heard of Jan 28 07:05:56 The latest JAR is 224 KB. Jan 28 07:06:00 groxx: I would really love for a candidate to surprise me this way, I like to think I'm on top of things Jan 28 07:06:06 Note that it's extremely fast. Jan 28 07:06:36 Oh yeah I have no doubt streaming this way is the fastest (and most memory efficient) way Jan 28 07:06:43 I was building up a DOM in memory but it was way too memory-intensive. reddit sends so much noise. Jan 28 07:06:48 deuteros__: definitely rare :) even rarer that they have any reasons for using side from "it's the hip thing" Jan 28 07:07:34 Still hoping a candidate will convince me that RxJava is as revolutionary as claimed Jan 28 07:07:43 but most candidates don't even know what it is Jan 28 07:08:37 heh i tried to do that Jan 28 07:08:55 they used android anotations Jan 28 07:09:05 so i started asking about other libraries Jan 28 07:09:11 (not claiming this is you, just sayin) a good number of good devs aren't very active in the community, e.g. due to language barriers. not knowing isn't necessarily a negative. Jan 28 07:09:14 two of the guys didn't even know? Jan 28 07:11:11 deuteros__ i think on any tech topic, someone needs to be able to explain the weekenesses as well as the strengths. if they can't, they can not be trusted :) Jan 28 07:11:24 * deuteros__ nods Jan 28 07:13:18 Kotlin doesn't use type erasure, does it? (I can't seem to find a definite answer with Google, strangely.) Jan 28 07:13:42 g00s: yeah, having drunk too much koolaid is usually a sign they haven't actually used it for more than "hello world" Jan 28 07:13:56 TacticalJoke: it's on the JVM, so yes Jan 28 07:14:40 type erasure is a consequence of JVM, not java Jan 28 07:15:05 i keep having problems with the kotlin site - leftmost topics won't expand. if i close chrome and browse sometimes it works, until it doesn't - wth Jan 28 07:15:24 g00s: CSS isn't type safe? Jan 28 07:16:10 i dont know anything about css - this is the only site i've seen this on Jan 28 07:16:53 i just restarted chome and its working again lol Jan 28 07:17:23 TacticalJoke: it's the same VM Jan 28 07:19:07 * groxx must zzz - gnight all Jan 28 07:19:17 I believe Kotlin's generics are reified but the main page says absolutely nothing about that, puzzling Jan 28 07:19:49 Either way, it's not something most developers will ever encounter Jan 28 07:20:07 yes. i don't know why people care. Jan 28 07:20:08 Okay, I thought Scala got around type erasure somehow, but after googling I'm not so sure. Jan 28 07:20:10 TacticalJoke: why do you care? Jan 28 07:20:38 I guess it's awkward sometimes (e.g., consider something like List.toArray). Jan 28 07:20:42 No, Scala's generics are not reified, they use various hacks (3rd generation today) around that Jan 28 07:21:03 TacticalJoke: Show me a good example that can't be addressed with type tokens or with just plain common sense :) Jan 28 07:21:14 uh how do i specify that opengl 2.0 is required? I thought api 8+ did that but the description (that's not in production before I realized) says GL 1.0) Jan 28 07:21:15 TacticalJoke: reification doesn't solve that Jan 28 07:21:32 now* in production Jan 28 07:21:40 Wouldn't reification avoid our having to pass that parameter (so that the type can be determined)? Jan 28 07:22:05 you don't need the type Jan 28 07:22:08 Object[] will do Jan 28 07:22:17 TacticalJoke: No, this is strictly a type inference problem Jan 28 07:22:23 I mean being able to say "String[] array = someList.toArray();" instead of "String[] array = someList.toArray(new String[someList.size()]);". Jan 28 07:22:38 i can write that method right now Jan 28 07:22:42 TacticalJoke: Like JakeWharton, this has nothing to do with reification Jan 28 07:23:01 guava has had shortcuts for this forever (Maps.newHashMap(), ...) Jan 28 07:25:26 https://www.irccloud.com/pastebin/QC22SIXq Jan 28 07:26:01 * deuteros__ nods Jan 28 07:26:07 Maps.newHashMap() is just as easy to write Jan 28 07:26:08 needs a wildcard, but you get the point Jan 28 07:26:11 yep Jan 28 07:27:59 fakey it's a uses-feature i thinkl Jan 28 07:28:25 groxx: you mentioned asking the devs a quesiton, do you have examples of really good questions you were asked by the interviewee? Jan 28 07:28:36 Interesting. I guess I just assumed the issue was type erasure all along. Jan 28 07:28:44 So why do people hate type erasure? I'm confused now. :D Jan 28 07:29:10 TacticalJoke: Most people who do just don't really understand it Jan 28 07:29:43 TacticalJoke: http://beust.com/weblog/2011/07/29/erasure-vs-reification/ Jan 28 07:31:33 lasserix yeah i know there's this: but I published at minSdk at 8, and the android docs say gl2.0 is supported on 8+ so I was just curious if there are actually devices 8+ that don't support it ... maybe I should rush an update with the uses-feature? or am I ok to wait until more changes are made to update? Jan 28 07:31:55 deuteros__ i just read from his blog "From the feature set, I would say the language that Swift has the most overlap with is Kotlin, which is great news for Apple developers." Jan 28 07:32:08 fakey i dont think you need to worry about devices <14 Jan 28 07:32:13 g00s: Agreed, there is a strong paralle between Swift and Kotlin Jan 28 07:32:58 this looks cool (observable properties) http://kotlinlang.org/docs/reference/delegated-properties.html Jan 28 07:34:40 Their properties mechanism is very ingenious Jan 28 07:34:42 lasserix do you think i'm ok then to not rush an update? i have minSdk at 8 in the current production apk, but no uses-feature although it requires gles2.0. i worry about the rare 8<=device<=14 without gles2.0 (if that device exists) giving bad reviews Jan 28 07:34:57 it started as a simple property implementation and it morphed into something very elegant, allowing for laziness, etc... Jan 28 07:36:07 fakey idk you're probably fine its only like 6% of market Jan 28 07:36:30 just put a check and cancel out if they dont have it Jan 28 07:36:46 put a message like, "Looks like time to get a new phone!" Jan 28 07:36:52 0% of desirable market Jan 28 07:37:59 yeah, putting a check means rushing an update though.. i'm just trying to decide if i should put out an update with the uses-feature which would filter out automatically. maybe i'm overthinking the update process and i should just do it... Jan 28 07:39:19 TacticalJoke ohoh! http://shop.oreilly.com/product/9781941222591.do Jan 28 07:39:31 get a free copy for blog review or something :) Jan 28 07:40:19 Can't imagine a book is necessary just because of java 8. Java 8 has close to zero impact on testing, let alone junit Jan 28 07:40:31 but hey, whatever to milk the agile crowd Jan 28 07:40:56 yeah thats what i thought too Jan 28 07:41:05 I love books about unit testing. :D Jan 28 07:41:12 i figure :D Jan 28 07:41:18 Yeah, I don't get the Java 8 relevance. Jan 28 07:41:25 TacticalJoke did you read xUnit Patterns ? Jan 28 07:41:41 the black fowler series one Jan 28 07:42:13 xUnit Test Patterns? No; I hadn't heard of it. Jan 28 07:44:50 JakeWharton & deuteros__: Thanks for the info about type erasure. For years I've thought type erasure was a big issue in Java. (In fact, people all over the web seem to believe the same thing.) Glad to get the chance to improve my understanding. :) Jan 28 07:46:53 g00s: Did you ever read Clean Code by Bob Martin? Just curious. Jan 28 07:47:02 yeah but thats old Jan 28 07:47:03 TacticalJoke: okhttp you have to manually do in your own bg thread? Jan 28 07:47:29 lasserix: It has an async model, but their callbacks don't run on the UI thread (so you have to post a Runnable). Jan 28 07:47:41 TacticalJoke then there is 'the clean coder' Jan 28 07:47:47 Yeah, I never read that one. Jan 28 07:47:59 To be honest, one of my favourite books is TDD by Design -- even though I 99% hate TDD. Jan 28 07:48:03 Just the thought process is brilliant. Jan 28 07:48:19 s/Design/Example/ Jan 28 07:48:59 and you don't want the callback on the UI thread Jan 28 07:49:06 you need to read the response before posting to the UI thread Jan 28 07:49:08 The thought process takes three lines to explain, it baffles me entire books are written about it Jan 28 07:49:15 don't just post immediately and try to call body.string() Jan 28 07:49:31 Yeah, I was thinking that the other day. That other HTTP library (as far as I can tell) requires the callback to run on the UI thread. Doesn't seem very flexible. Jan 28 07:49:31 TacticalJoke i haven't read any programming books in a while. maybe some BT stuff Jan 28 07:49:50 TacticalJoke: define 'that other' Jan 28 07:50:03 This one: http://loopj.com/android-async-http/ Jan 28 07:50:31 right. it would have buffered the entire response into memory before calling you back. Jan 28 07:50:31 Same here, g00s. Takes me way too long to read books, so I just don't bother. :/ Jan 28 07:50:38 JakeWharton: Yah. Good point. Jan 28 07:50:46 That would suck for my app. Jan 28 07:51:48 TacticalJoke: this library doesn't appear to support WebSocket, is that right? Jan 28 07:52:26 Not sure. I know very little about that library (just quickly researched it the other day when someone was asking a question about it). Jan 28 07:53:03 I didn't know about it, making a note of it but I don't want to use two different libraries for ws and http, it makes the code base messy Jan 28 07:53:26 OkHttp has websockets! Please test them! Jan 28 07:53:40 deuteros__: What are you currently using for HTTP? Jan 28 07:53:42 I really need to get back and push them the last 10% Jan 28 07:53:44 JakeWharton: We're using a different library at the moment but OkHttp is on my radar Jan 28 07:54:20 TacticalJoke: I'm trying to remember, I remember trying three and only one actually worked right out of the box, I forget which one Jan 28 07:54:32 I can't remember if it was you I told about this... but the WS support is a public API inside the internal package. This lets you use it but it's not in the proper public API yet. I'm still working out what the API should be. Jan 28 07:54:42 and it's in dire need of people testing it Jan 28 08:00:54 TacticalJoke: okhttp executions must occur in a bg thread, or it does its own threading? Jan 28 08:01:27 One of my Litmus tests for all these libraries is whether they let me pass my own thread pool (but they should use their own by default) Jan 28 08:02:45 the three libs with threading that I work on pass that test \o/ Jan 28 08:02:56 JakeWharton: I would expect no less :) Jan 28 08:06:37 deuteros__ you mentioned earlier using kotlin on the back-end, and wanting to recommend its use at work for the android stuff (if i read this right) but you were still a bit heistant. what do you think could go wrong ? Jan 28 08:07:15 g00s: Introducing a new language at a work place is a very, very delicate decision Jan 28 08:07:32 even more so when the language is still beta Jan 28 08:07:40 Code wise I'm 100% confident it would be all fine Jan 28 08:07:49 but it might have consequences on hiring, for example Jan 28 08:07:51 oh, so its more a political thing than technology then Jan 28 08:07:57 Not just political, no Jan 28 08:08:16 I'm also convinced that JetBrains is serious about that but I could be wrong Jan 28 08:08:46 Basically, I'm being very careful precisely because I'm excited about Kotlin Jan 28 08:08:58 Being emotional about these things is not a good thing Jan 28 08:09:05 actually that could be a plus for hiring; finding android devs that know kotlin shows some initiative on their part. its kinda like PG's essay 'the python paradox' Jan 28 08:09:25 I have absolutely no illusion that we would never find Kotlin developers for years Jan 28 08:09:36 We would be more looking for talented Java developers who are not afraid to learn something new Jan 28 08:09:53 (so really nothing different from what we're looking for today) Jan 28 08:11:41 Do I seriously have to handle java.io.UnsupportedEncodingException on a hardcoded "UTF-8"? is there any way to not have to surround any URLEncoder.encode(string, "UTF-8") in a useless try-catch? or is there a legit case where a phone might not know UTF-8? Jan 28 08:11:59 duncannz: write a helper method Jan 28 08:12:14 yeah i put that in my doc: it might excite potential candidates, it's relatively easy to pick up (in comparison to Scala, for example), and it's not like we'd be 100% kotlin Jan 28 08:12:14 deuteros__: what's exciting about kotlin? Jan 28 08:12:43 lasserix: not going to go into that right now, bit tired. Ask me again next time :) Jan 28 08:13:05 the website does a pretty good job of selling it as well Jan 28 08:13:20 Yeah, or Jake's document too Jan 28 08:15:42 (actually read both, Jake touches on points the web site glosses over, especially the Android part) Jan 28 08:15:58 why can't I see the action bar ? I think getActionBar() returns null, any idea why? Jan 28 08:16:01 just created a new project Jan 28 08:16:08 I dont see it in the layout file's preview either Jan 28 08:16:52 shmoon_: what's your theme? Jan 28 08:17:06 the theme dictates whether or not the activity window gets an action bar Jan 28 08:17:15 This is what I have for tag in AndroidManifest.xml - android:theme="@style/AppTheme" Jan 28 08:17:31 ctrl+click on AppTheme Jan 28 08:17:36 Why should themes dictate actionbar? or atleast there should be a workaround? Jan 28 08:17:38 what does its parent="" have Jan 28 08:17:48 because the window is created before your code runs Jan 28 08:17:51 and the window uses the theme to style itself Jan 28 08:18:08 Theme.AppCompat.Light.DarkActionBar Jan 28 08:18:43 appcompat uses the toolbar API now Jan 28 08:18:46 hmm I see, I'm sure it can be made better or something Jan 28 08:18:56 that... means nothing Jan 28 08:19:11 it's fine as is, you just don't understand it so you feel that way Jan 28 08:19:20 ok Jan 28 08:19:44 i don't know a lot about appcompat. never used it. I know that the newest versions emulate the Toolbar and the Toolbar is not the ActionBar Jan 28 08:19:54 you can make a Toolbar sit behind the ActionBar API, but you have to opt-in to that Jan 28 08:20:10 ok, seems like complicated stuff Jan 28 08:20:50 i think you have to put the toolbar in your XML layout Jan 28 08:20:57 i don't know and thus i'm going to stop talking Jan 28 08:21:19 hmm, I'll try Jan 28 08:21:21 sorry i can't help more Jan 28 08:26:11 shmoon Jan 28 08:26:15 you do that Jan 28 08:26:16 add toolbar Jan 28 08:26:21 from appcompat into xml Jan 28 08:26:35 then if you want it to act as action bar you do something like setActionBar(toolbar) Jan 28 08:26:42 then access all things on it as the action bar, not toolbar Jan 28 08:26:57 imho easier just to use it as a toolbar Jan 28 08:27:04 huh, support-v4 has 6700 methods O.o Jan 28 08:27:20 dont bother making it the action bar, since it does everything it does anyways, you jsut explicilty call like inflate menu on toolbar instead of activity callback Jan 28 08:29:06 g00s: looking forward to when it passes Guava Jan 28 08:29:24 :( Jan 28 08:30:16 jack will be out with native unused code stripping by then Jan 28 08:30:25 Earlier today, one of my engineers was worried that our protobuffs might be too expensive method count wise. I put things in perspective for him :) Jan 28 08:32:34 I want to write Kotlin output for our Wire protobuf compiler. Named params + default values means no need to generate the builders which is where all the methods and remaining bloat is. Jan 28 08:33:17 at least as an experiment. calling could would have to be all Kotlin though which is not practical Jan 28 08:33:17 Will be interesting to see the final method count once with compiled kotlin Jan 28 08:38:04 this was gold from that paper "We have some back-channel hints and connections to those working on this at Google and the takeaway is waiting for Java 8 would not be wise." Jan 28 08:38:24 i was writing all this rx thinking , oh man maybe in the next few months i can replace this with lambdas ... Jan 28 08:38:26 not :D Jan 28 08:38:26 Yeah Google has been pretty clear about... well, not being clear Jan 28 08:38:57 g00s: the next lint is important, too Jan 28 08:38:58 What are the chances that Google will step up and say "We're working on integrating our tooling with Kotlin" or something? Jan 28 08:39:02 s/lint/line/ Jan 28 08:39:04 I'm guessing around 2.79%. Jan 28 08:39:06 yeah Jan 28 08:39:41 Like I said before, if ever Google one day decides to support a language on top of Java, it will most likely be their own language and not someone else's. Jan 28 08:39:44 lulzipop Jan 28 08:39:56 how does jake come up with these things :D Jan 28 08:40:15 lol -> lulz Jan 28 08:40:45 i always make sure to put humor in things like this Jan 28 08:40:59 Hey all. Can anyone recommend a decently priced/ next to free push notification service? Jan 28 08:42:23 Tricknology: Instead of GCM? Jan 28 08:49:28 lasserix: ok I don't know what adding toolbar from xml would mean but I'll read up on the toolbar api firs Jan 28 08:51:21 So Theme.Appcompact thing is Android 5.0 thingie? Jan 28 08:52:21 GCM is up to 1000? Jan 28 08:52:32 schmoon wat? Jan 28 08:53:05 deuteros__ i found this: https://gamethrive.com/ Jan 28 08:53:26 nvm Jan 28 08:53:46 ..which uses GCM i guess Jan 28 09:06:55 do you think i blacklist myself away from google's automatic promotions and featuring if my app makes a point to not include ads? Jan 28 09:07:01 free* app Jan 28 09:07:09 with iap* Jan 28 09:08:25 yeah that's speculation against their algorithms and secret filtering i'm sure. so any ideas are conspiracy theories i suppose. Jan 28 09:09:02 so, those who are affiliated with google and reading this, i'm sorry i didn't mean it! Jan 28 09:09:50 iap could be more profitable though at 30% so what am i saying? Jan 28 09:10:05 no idea Jan 28 09:10:14 Hey all Jan 28 09:12:05 I'm trying to integrate Google+ into my app. On the google developers console I can add new computers that can compile the app Jan 28 09:12:22 JakeWharton: lasserix: Thanks, integrated toolbar :) Jan 28 09:12:24 But on iOS I can set this in the code, so that I only need to add one account. Jan 28 09:12:37 But I can't see how to do that on android Jan 28 09:12:52 It seems that I have to add every single developer via the webpage? Jan 28 09:13:28 "Add new computers to compile the app?" What? Jan 28 09:14:33 is this dumb and/or overdone idea? well yeah overdone really but i couldn't help myself i guess... my snow live wallpaper https://play.google.com/store/apps/details?id=com.broken_e.snowpaper.android Jan 28 09:15:09 Mavrik: To integrate Google+ into my app, I'm following these instructions: https://developers.google.com/+/mobile/android/getting-started Jan 28 09:15:31 Mavrik: They require me to do: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v Jan 28 09:15:44 Mavrik: to get the SHA1 which is unique to my particular machine Jan 28 09:16:04 and then add this SHA-1 on the google website in the developers console Jan 28 09:16:27 so it seems that I need to repeat this step for every machine that I would compile the app for? Jan 28 09:17:25 johnflux, why Jan 28 09:17:38 johnflux, it's asking you to whitelist certificate with which your app is signed Jan 28 09:17:42 there are over 800 android devices api 8+ so i hope you don't need a separate apk for each! Jan 28 09:17:53 johnflux, just tell your devs to use the same debug cert -_- Jan 28 09:18:41 ...i mean over 800 models of devices, individually that number is way higher... Jan 28 09:20:52 Mavrik: meaning, I should put that key in the git repo, then ask the developers to copy it across? Jan 28 09:21:35 johnflux if debug key they should just uninstall and reinstall from the IDE and it will use the local debug key. are you having problems with that process? Jan 28 09:21:55 I wouldn't copy credential info into git ever. Jan 28 09:22:08 How do I implement the createScaledBitmap feature. This was my first attempt: https://bpaste.net/show/76692bf199bf . You can see how it used to be and how I added the line in the middle to scale it to a 5px by 5px bitmap. Is this correct? Jan 28 09:22:45 fakey: "reinstall" what debug key? I should email everyone my ~/.android/debug.keystore file? Jan 28 09:23:20 no, the IDE creates a debug key automatically. Jan 28 09:23:51 fakey: yes, but every developer is going to have a different debug key Jan 28 09:23:52 as long as it's not installed already with the same package name on the device with a different key, it can be installed with any debug key Jan 28 09:24:40 but what's wrong with different debug keys? developers are building from the IDE usually instead of running from a build apk right? Jan 28 09:24:57 built* Jan 28 09:25:12 fakey: if everyone has a different debug key, then I need to upload every single debug key to the google console website, right? Jan 28 09:25:32 no, google dev console is release keys only generally Jan 28 09:25:50 fakey: it means you can't share APKs Jan 28 09:26:15 check your debug key into your repo and never have to think about it again Jan 28 09:26:40 you can swap phones, swap APKs, and swap computers. everything will always just work Jan 28 09:26:46 JakeWharton: how do I then get my app to use the debug key in the repo? Jan 28 09:27:11 https://github.com/JakeWharton/Telecine/blob/8eda525746550512f2531e91e6a398023184550b/telecine/build.gradle#L54-L61 Jan 28 09:27:47 JakeWharton i've never had to do that as a developer, I just build from src and the src is in the source control. But if you really need to share a debug apk then I guess that works... Jan 28 09:28:13 JakeWharton: thank you very much :) Jan 28 09:29:54 just curious why you need that... if alpha/beta testing, a signed apk seems proper Jan 28 09:36:05 so basically actionbar is getting replaced by Toolbar? Jan 28 09:36:18 I wonder why did they not work on Actionbar itself heh :D Jan 28 09:38:38 rewrite over refactor i guess Jan 28 09:39:09 alright Jan 28 09:39:35 don't listen to me though i have no idea! Jan 28 09:44:29 you might need a debug cert for an API key? Jan 28 09:45:02 ..generally it's just one though Jan 28 09:45:45 fakey: From my app, I let the user sign in via google Jan 28 09:46:54 fakey: If I build the apk from a computer without the debug key, then the google plus integration doesn't work, and the app just crashes Jan 28 09:50:46 How do I implement the createScaledBitmap feature. This was my first attempt: https://bpaste.net/show/76692bf199bf . You can see how it used to be and how I added the line in the middle to scale it to a 5px by 5px bitmap. Is this correct? Jan 28 09:52:11 Hello , is there a way to check all the pendingintents in alarmmanager ? Jan 28 10:20:16 i want to switch my layouts with sliding animation, while screen dragged. How should i do that Jan 28 10:33:06 whether there is а way to test in-app purchase without play market dev account? Jan 28 10:33:26 sci-fi, ViewPager Jan 28 10:33:35 orium_, no Jan 28 10:39:13 i am extending ApplicationTestCase and implemented setup and tearDown to create a database with test data. But i need to run setup as first and tearDown after running all tests, someone can please give me an advise how to do this? Jan 28 10:49:57 Hello guys, I make a custom ImageView, but I need to know when the gets destroyed. Is there a standard callback function that is called when the view gets destroyed? Jan 28 10:51:50 Like an Activity has onDestroy, something similar I'd like to know for a custom View, so I can clean up some resources (like a Timer object). Jan 28 10:56:07 sci-fi: you can also use a single row gridview Jan 28 10:56:29 Number5: gets recycled when its context is gc'd Jan 28 10:59:00 Number5, it gets destroyed when activity gets destroyed Jan 28 11:00:14 The problem is, if I have a Timer object and an orientation change occurs, the Timer is still running. I can call a method of my custom View to remove the Timer object, but it would be much nicer if it does automatically when a callback is called so the Timer object gets removed in the class itself. Jan 28 11:00:40 Number5, there is no such callback afaik Jan 28 11:01:03 unless I'm mistaken, but I had the problem that those Timer objects keeps running. I could see it in the DDMS. Jan 28 11:01:27 is the timerobject inside the customview? Jan 28 11:01:41 danijoo, so I guess I have to clear it myself by explicitely call it. Jan 28 11:01:48 danijoo, yes. Jan 28 11:01:55 sounds like a memory leak. if you hold a reference to that timer somewhere and the timer has a reference to the view, the view cant get destroyed Jan 28 11:02:28 danijoo, voila, so I want to clear it if not needed anymore. Jan 28 11:03:17 I want to make a blink kind of animation for my own designed icons. Jan 28 11:03:18 can someone help me scale the image I am loading here with Universal Image Loader. I have this so far: https://bpaste.net/show/e1f832add6c7 As you can see I have defined the targetSize, but I am not sure where to use it Jan 28 11:03:32 Number5, you dont need a timer for a blink animation Jan 28 11:03:38 use Animations for that O.o Jan 28 11:04:04 most of the examples I have seen online use targetSize when using loadImage. I can't pass this into displayImage Jan 28 11:04:11 danijoo, yes I've read that. But I'm not so familiar with it, that's why I wanted to solve it that way. Jan 28 11:04:38 Number5, what kind of blink animation? a fade in and out? Jan 28 11:04:44 Number5: oyou coudl use ondetached Jan 28 11:05:05 no, just change color icon, as if it's blinking on relgular time base. Jan 28 11:05:06 and use actual animation, ie alphaanimation with repeat Jan 28 11:05:26 by setting the background Jan 28 11:05:41 Number5, you should read into animation :) Jan 28 11:06:03 hmmm, I guess I have to. Jan 28 11:06:14 They arent that hard Jan 28 11:06:57 I've used it once, but I did just copy/paste modified a bit and than did what I want,. Since than never looked back. Jan 28 11:07:34 I guess I have to give it a try again, hopefully I'll remember how to use it, Jan 28 11:14:28 can picasso be paused by pausing the executor backing it? Jan 28 11:16:41 Ok guys, is there a way to use Animation such that it keeps changing state? Jan 28 11:20:02 well Jan 28 11:20:06 thats kind of what an animation does Jan 28 11:20:18 but if you use the animation listener callback Jan 28 11:20:24 you have onstart onfinish Jan 28 11:20:34 then you can change start, and start it again Jan 28 11:20:36 for instance Jan 28 11:20:53 or you use the reverse mode to let it run infinitly Jan 28 11:20:59 back and forth,back and forth Jan 28 11:23:29 whats it called when i send a view along when opening a new activity? Jan 28 11:23:36 and is it supported in v4? Jan 28 11:24:13 you cand send views from activity to activity Jan 28 11:24:28 ye, whats it called Jan 28 11:24:31 so i can have a google Jan 28 11:24:32 activity transitions? Jan 28 11:24:59 if you mean the transitions from lollipop, thats just an animation pretending to look like sending the view Jan 28 11:25:10 and its not supported pre lollipop Jan 28 11:28:39 so I'm extending PreferenceActivity, now if I also want to use a Toolbar and want to have that back button, how can I achieve it? Jan 28 11:29:35 shmoon_, unfortunatly, preferenceactivity does not support that Jan 28 11:29:49 you can use a normal activity and a preference fragment Jan 28 11:30:02 (had to do the same switch recently because of that) Jan 28 11:30:11 Alrighty, so absically if I want that back button I HAVE to use a Toolbar as an ActionBar? Jan 28 11:30:33 I was wondering if I could stick the toolbar at the top and somehow show up a backbutton that would go to previous activity Jan 28 11:30:44 but do I HAVE to use it as an actionbar to achieve that? Jan 28 11:30:50 obviously without resorting to hacks Jan 28 11:31:03 shmoon_, no. you can use a toolbar and just put a back button on it Jan 28 11:31:19 but why would you want that if the system does it for you without coding effort Jan 28 11:32:01 alrighty, I'll do that then :) Jan 28 11:32:25 So for every page in which i want an actionbar, now I'll have to copy paste that Toolbar view code in xml to each layout file, hm Jan 28 11:32:55 shmoon_, why? OO Jan 28 11:33:05 if you don't do some custom stuff, why not use the normal actionbar? Jan 28 11:33:14 ^ this Jan 28 11:33:23 just extend actionbar activity and you don't have to do anything manually Jan 28 11:33:36 also if you have to copy and paste a lot, you are having design issues Jan 28 11:34:05 you could extend Activity and let it set the toolbar there, then extend that custom activity every time you need an activity with the toolbar you createed Jan 28 11:34:11 just override setContentView Jan 28 11:37:33 normal actionbar doesn't appear probably because of my theme Jan 28 11:37:50 getActionbar() was returning null, which is how I came to know about toolbar here a few hours back Jan 28 11:38:04 the theme has to extend the appcompat themes Jan 28 11:38:06 danijoo: ya good Idea didn;t think of that. So a customactivity overrdiign setocntentview that injects a toolbar and then extend that Jan 28 11:38:14 yup Jan 28 11:38:23 This is the theme I'm using Theme.AppCompat.Light.DarkActionBar Jan 28 11:38:24 have you disabled actionbar in theme maybe? Jan 28 11:38:31 and I think it doesn't supports the normal actionbar Jan 28 11:38:41 it should Jan 28 11:38:49 yeah it should Jan 28 11:39:20 I'll test again since you're saying that Jan 28 11:39:22 one sec Jan 28 11:41:43 ya I get null Jan 28 11:41:50 if your activity extends android.support.v7.app.ActionBarActivity and your theme is based on the appcompat themes it should give you an actionbar by default Jan 28 11:41:51 disabled in style? Jan 28 11:43:46 lol really? Jan 28 11:43:50 it wasn't showing up back then Jan 28 11:44:11 Now i reverted all the code to just ActionBar actionBar = getActionBar() and it shows up Jan 28 11:44:25 did you test it on the device? android studio doesn't show it in the preview right now Jan 28 11:44:27 you should use getSupportActionbar! Jan 28 11:44:52 shmoon Jan 28 11:44:55 just put toolbar in your xml Jan 28 11:45:02 dont override to setContentView Jan 28 11:45:17 err subclass, you might subclass to do something like set up toolbar as actionbar Jan 28 11:45:26 wait sorry I got it Jan 28 11:45:37 I was extending Activity back then, now it works because I'm extending ActionbarActivity Jan 28 11:45:52 I thought extending Activity should work fine as it did in my previous app which wasn't targeting API21 Jan 28 11:46:11 not with appcompat! Jan 28 11:46:27 sorry? I didn't get you Jan 28 11:46:37 extending ActionBarActivity and using getActionBar() seems to work Jan 28 11:47:25 sorry getActionbar() is not relevant Jan 28 11:48:13 got it sorry, am stupid :D Jan 28 11:48:14 thanks Jan 28 11:49:20 hi guys Jan 28 11:50:38 so its perfectly fine to use an action bar and its nothing like its getting deprecated or somethign in favour of toolbar? Jan 28 11:52:41 hmm, i remember back button would automatically wokr, have things chnaged with API 21 Jan 28 11:54:34 do you set the parent activity in the manifest? Jan 28 11:56:06 using android:parentActivityName ? nope, I just want it to perform the back button functionality Jan 28 11:56:52 the back button should work on its own but I tought you want the back arrow in the actionbar Jan 28 11:57:38 ya i am talking about that only, I thought the back arrow in the actionbar would automatically do what the back button does, atleast thats what I remember from my previousapp Jan 28 11:58:40 no it does what the "up" button on holo would do, which is navigate to the parent activity Jan 28 11:59:40 so for that I have to set the parent activity in manifest usig that attribute I mentioned? Jan 28 12:00:05 yeah, I'm pretty sure Jan 28 12:00:11 ok Jan 28 12:01:15 what's your min api? Jan 28 12:01:31 16 Jan 28 12:01:34 Hello friends.. Jan 28 12:01:50 ok, you're fine :D Jan 28 12:02:07 setHomeBUttonenabled(true) does nothing Jan 28 12:02:17 dunno whats happening, my experience is different this time heh Jan 28 12:03:00 i'm developing an Android AppWidget, please how can i listen to a click/pressed on the widget layout??? Thanks in advance Jan 28 12:03:19 you don't need code for the up button to work the xml should do it Jan 28 12:03:52 Memorion, are you talking to me? Jan 28 12:04:03 hackable no sorry Jan 28 12:04:22 alright... please do you've solution to my answer? Jan 28 12:04:28 i'm developing an Android AppWidget, please how can i listen to a click/pressed on the widget layout??? Thanks in advance Jan 28 12:04:54 hackable no, I never worked with widgets, I never even completed an app Jan 28 12:05:15 when you need to do a secure connection on a remote server. What the best to use php/https or a tomcat server ? Or the two are equivalent ? Jan 28 12:05:22 uhmmmm... kk, hope someone is out there to help Jan 28 12:05:41 Apache! Jan 28 12:05:57 ok thaks you Jan 28 12:06:15 and sorry but I've never done any widgt :/ Jan 28 12:06:50 apparently parentActivityName is only support since APi 16, now I know what you mean Memorion :D Jan 28 12:07:10 I have a website in an APK expansion OBB file. I want to load this website in a webview in my app. Can I somehow load the website from the OBB file directly or do I have to unzip it first? Jan 28 12:10:38 hackable: http://stackoverflow.com/questions/5395114/add-onclick-listener-to-predefined-button might help you Jan 28 12:11:07 sylflo: if you dont know the difference or the cross over between php/https and tomcat I suggest you get back to doing some homework. Jan 28 12:13:25 Hi there. Jan 28 12:13:40 I know the difference I sould say apache vs tomcat. (this are server) Php and java two different language and you can use https in the bot server. Jan 28 12:13:48 What is the best way fro sending image to a REST service? Using json and converting image to byte string? Jan 28 12:13:48 *should Jan 28 12:13:49 jesperj, its the same like asset files Jan 28 12:14:02 *both Jan 28 12:14:13 With usage of Bitmap? Jan 28 12:14:28 Or is there any other better way? And by better I mean easier Jan 28 12:14:44 json is your man. Jan 28 12:15:37 "use https in the bot server"? Jan 28 12:16:17 danijoo: That vague answer suggests that it is possible. Then how do I do it? I have only found the "APK Expansion Zip Library" sofar, and I can't see how that works to load into webview since it gives inputstreams and not filepaths like I need to define when loading an url in a webview Jan 28 12:16:39 can i detect which layout is currently shown in the activity ? Jan 28 12:16:41 rgr: I don't know what's the difference. It's not concluded yet. Jan 28 12:17:10 is there a overrided method in endless loop ? Jan 28 12:17:23 sci-fi, detecting which layout is in an activity? Jan 28 12:17:35 you set the layout, surely u would know? Jan 28 12:17:38 danijoo: perhaps you know a website explaining in more detail? Jan 28 12:17:55 sci-fi, take a look at Scalple by JakeWharton Jan 28 12:18:07 It's on his github Jan 28 12:19:36 Kevel1: im trying to do this (its not the best way i know maybe you can tell me what is good) I have 3 layouts and different backgrounds ,when the activity created i set first layout to screen Jan 28 12:19:47 jesperj, you can load the website as string into webview with loadData() Jan 28 12:20:03 and user clicks the button and sees second one and first one being gone Jan 28 12:20:20 i should do this with a timer Jan 28 12:20:23 for example Jan 28 12:20:45 every layout created timer must be reset Jan 28 12:21:12 i need something like onCreate method that Activities have Jan 28 12:21:25 whats the timer for? Jan 28 12:21:32 changing layouts Jan 28 12:21:38 its a tutorial screen Jan 28 12:21:42 use a transition or animation? Jan 28 12:21:57 every 5 secs it will change but also user can change by draggin Jan 28 12:22:35 i guess fragments is good but i havent get it work Jan 28 12:23:05 i have 4 screens and idont want to use 4x activities to do that Jan 28 12:24:11 use a viewpager Jan 28 12:24:58 sci-fi use fragments Jan 28 12:25:09 by using viewpager i can check which layout is currently shown in the activity ? Jan 28 12:25:32 Thanks for your answer jesperj Jan 28 12:25:47 viewpager is a little different. it will let you swipe fragments left and right Jan 28 12:26:03 danijoo: are you suggesting that I use the APK Expansion Zip Library to get an inputStream for the file I want from the OBB file? And then use that for getting the html file into a string that I load into the webview with loadData()? Jan 28 12:26:34 see this tutorial sci-fi: http://www.vogella.com/tutorials/AndroidFragments/article.html Jan 28 12:26:45 Tricknology: thanks mate Jan 28 12:27:32 jesperj, i suggest to use google Jan 28 12:27:39 morning! is there a way to check if an EditTextPreference is set to its default value without hardcoding against resource id's? Jan 28 12:27:46 no problem. also check the documentation about fragment lifecycle: http://developer.android.com/guide/components/fragments.html Jan 28 12:27:52 sci-fi ^ Jan 28 12:28:02 it took me 1 search to get working code for loading html from apk expansion Jan 28 12:28:23 stefancrs what do you mean? Jan 28 12:29:00 Tricknology: I'm using a PreferenceFragment, and have my own EditTextPreference class, inheriting from the default one. Jan 28 12:29:01 danijoo: may I see that code please? I have searched and have not found it Jan 28 12:29:22 Tricknology: the preferences are declared in XML Jan 28 12:29:36 Tricknology: and I want to know if the user has changed the preference or if it's its default value Jan 28 12:29:51 Tricknology: to style it's summary text in a different color if its the default value Jan 28 12:30:37 Tricknology: something like http://hastebin.com/ihoredigiw.coffee, but how do I know the value of isDefault? :) Jan 28 12:30:49 jesperj, http://bit.ly/1Lh1fm6 Jan 28 12:31:03 isDefault is a boolean Jan 28 12:31:07 you have to get that yourself Jan 28 12:31:10 buut. Jan 28 12:31:22 Tricknology: isDefault is my own variable Jan 28 12:31:26 EditTextPreferences etp; Jan 28 12:31:30 Tricknology: how do I know whether to set it to true or false? Jan 28 12:31:39 etp.getEditText().getText().toString() Jan 28 12:31:57 that will get the string of the editText Jan 28 12:32:14 Tricknology: I know that. How do I know if that string is the same as the default value declared in the preference xml file? Jan 28 12:32:17 who here works with android professionally? Jan 28 12:32:21 do a str.equals()? Jan 28 12:32:27 Tricknology: and compare with what? Jan 28 12:32:28 here <--- Jan 28 12:32:38 MartialLaw, what makes a professional professional? :) Jan 28 12:32:38 MartialLaw: a bunch of us I'd guess :) Jan 28 12:32:43 danijoo: making money Jan 28 12:32:49 yes Jan 28 12:32:53 <--- :p Jan 28 12:33:00 danijoo: that's pretty assholish Jan 28 12:33:04 i have a question about a contract can anybody PM me. quick question Jan 28 12:33:06 jesperj, what? Jan 28 12:33:23 MartialLaw: doesn't sound android related... ;) Jan 28 12:33:37 Tricknology: are you with me? Jan 28 12:33:37 stefancrs, i am kinf of confused as to what this xml is, or what it has in it Jan 28 12:33:44 ah Jan 28 12:33:57 if you know the default value then you can compare whatever value is in the editText() no? Jan 28 12:34:00 it is android related and im not asking in here im asking for help. can someone maybe be so kind? Jan 28 12:34:27 Tricknology: of course I can. But I don't know how to get the default value, which is declared in XML Jan 28 12:34:38 what does your xml look like? Jan 28 12:34:43 what tags are around the value? Jan 28 12:34:54 ..and where is it? Jan 28 12:34:57 my bad Jan 28 12:35:45 Tricknology: http://hastebin.com/wahayukuru.xml Jan 28 12:36:07 jesperj, its the first link Jan 28 12:36:35 Tricknology: as you can see, each preference has it's own default value Jan 28 12:36:54 Tricknology: and I'd like to style the summary differently if the preference hasn't been set by the user yet Jan 28 12:36:56 stefancrs, maybe also declare the default value in strings.xml and compare with this Jan 28 12:37:11 danijoo: it is declared there, but then I have to hardcode ID's for each preference Jan 28 12:37:23 whats wrong with that? Jan 28 12:37:45 danijoo: well, how do I know which ID to look for within my EditTextPreference class? Jan 28 12:37:49 you can add your own xml tag: defaultValue="stringRes" Jan 28 12:37:56 than compare with defaultvalue in xml Jan 28 12:38:14 danijoo: defaultValue is the tag used by the system Jan 28 12:38:17 danijoo: and what I use Jan 28 12:38:29 stefancrs, then name it something else Jan 28 12:38:48 danijoo: same issue though, how do I read that value in my EditTextPreference class? Jan 28 12:38:54 appName:myDefaultValueIWantToCompareWithToCheckIfItsDefault="@string/asdwqeqwe" will do it Jan 28 12:39:22 lol Jan 28 12:39:28 stefancrs, google how to add custom xml attributes to custom views Jan 28 12:39:45 you can receive them in the constructor after that, through a TypedArray Jan 28 12:40:31 danijoo: hm, I should be able to not use a custom one in that case Jan 28 12:41:27 well.. you need a value to compare with. you somehow have to set that value... Jan 28 12:41:42 and thats the usual way to do that Jan 28 12:41:57 maybe use attrs? Jan 28 12:42:22 danijoo: I want to compare getValue with defaultValue, so that seems fine, how do I access the attributes in the constructor? Jan 28 12:43:25 stefancrs, its in attrs Jan 28 12:43:38 extract the typedArray from it. The value is in that array Jan 28 12:44:22 Hello Jan 28 12:44:35 check this out stefancrs: http://androidbook.com/item/4169 Jan 28 12:44:50 Is it possible to create a rom which will be just plain console-mode linux? No gui etc Jan 28 12:45:00 afl_ext, wrong channel. Jan 28 12:45:11 oh.. Jan 28 12:45:15 i supposed to join root Jan 28 12:45:17 sorry! Jan 28 12:45:56 people are beheaded here when asking root questions. You are lucky this time Jan 28 12:46:01 Does anyone uses Android Studio 1.0.2 here? How can I get hardware buttons aliek skin for AVD? Jan 28 12:46:10 s/aliek/alike Jan 28 12:46:49 do something like: Jan 28 12:47:56 Tricknology: was this for me? Jan 28 12:48:00 actually, stefancrs, that link up there has everything you need to do what you wanted Jan 28 12:48:05 no frojnd, sorry Jan 28 12:48:13 Tricknology: no worries Jan 28 12:48:41 just ignore all the styling stuff, stefancrs Jan 28 12:48:47 frojnd, the stock avd is very limited. you cant change much there Jan 28 12:49:34 so it might be not possible. Jan 28 12:49:40 danijoo: how can I get those hardware buttons (buttons like, back home) Jan 28 12:50:00 danijoo: what do you suggest? Without at least "back" button avd is useless to me Jan 28 12:50:00 there arent any buttons for you at all? O.o Jan 28 12:50:04 Tricknology: not sure I follow you Jan 28 12:50:09 let me take a screenshot Jan 28 12:50:12 thats weird. Jan 28 12:50:14 Tricknology: this is not a standard layout with views in it Jan 28 12:50:24 Cant help much though. I dont use the avd because it sucks Jan 28 12:50:54 danijoo: you don't use any kind of avd at all? Jan 28 12:51:04 I do Jan 28 12:51:08 stefancrs don;t worry about the view stuff Jan 28 12:51:11 just not the android avd Jan 28 12:51:39 Tricknology:i did it finally Jan 28 12:51:47 appreciate Jan 28 12:52:09 frojnd, https://www.genymotion.com/#!/ Jan 28 12:52:32 sci-fi, grats :) Jan 28 12:52:41 danijoo: I thought that dealt only with images, and I yet don't fully understand what I'm looking at. However it may be an option. Involves a shitload of code and to include a http server library project in your project also... Strange that it would have to be so complicated. There was a post down there saying "It is a good alternative to use JOBB tools to pack expansion file and use StorageManager to mount it. After that the files inside expa Jan 28 12:52:41 nsion file should be accessible as regular files in the file system. The unpacking of expansion file is not needed in this case." < I might try that Jan 28 12:53:13 Tricknology: ok? :) Jan 28 12:53:18 stefancrs see this as well.. maybe it is a better example? https://stackoverflow.com/questions/15005461/get-the-name-of-a-custom-attribute-from-attrs-xml Jan 28 12:54:43 you want to see if the etp holds the default value.. so put the value in string.. which you have.. and in attrs.xml as a resource Jan 28 12:55:02 use the same name in attr as you use in string Jan 28 12:55:11 Do I really need to add _another_ XML? Jan 28 12:55:37 and if so, how do I know which attribute to look for there? different ones for each different instance of the edittextpreferene, remember? Jan 28 12:55:50 then String defaulVal = getResources().getResourceEntryName(theString); Jan 28 12:56:16 you have the R.id? Jan 28 12:56:17 Tricknology: theString is not a constant, so how do I know what theString is? :) Jan 28 12:56:32 Tricknology: did you look at the prerences.xml? Jan 28 12:57:02 briefly, so many tabs i lsot it Jan 28 12:57:14 hehe Jan 28 12:57:19 got it back Jan 28 12:57:23 in my EditTextPreference constructor, I know do Jan 28 12:57:25 defaultValue = attrs.getAttributeValue("http://schemas.android.com/apk/res/android", "defaultValue"); Jan 28 12:57:33 which seems to extract the integer ID actually Jan 28 12:58:23 getString(integerID) Jan 28 12:58:29 will get you that string Jan 28 12:58:39 yep Jan 28 12:58:52 should I hack it or is there a nice way to convert "@2131558463" to an int? Jan 28 12:59:30 not sure I'm just going theoretically here now. I've never done this Jan 28 13:00:10 I can probably just remove the @ and parse it, but seems hacky. will try. Jan 28 13:01:07 lol did it really come out with an @? Jan 28 13:01:09 i cant follow anymore. why dont you just declare a styleable, declare the value key, put it in and get it from attrs. Jan 28 13:01:29 that's what I'm trying to have him do naijoo Jan 28 13:01:31 danijoo* Jan 28 13:01:40 Tricknology: yep Jan 28 13:01:47 Tricknology, then there shoudnt be strange @123731123 things or stuff like that :D Jan 28 13:02:03 he should get the actual value from it.. Jan 28 13:02:06 well using that method he;s using he might Jan 28 13:02:14 now with the one i described Jan 28 13:02:19 not* Jan 28 13:02:23 ^^ Jan 28 13:02:29 not sure how your suggestion would be different Jan 28 13:02:42 if I'm referencing an ID in the attributes, which I would have to Jan 28 13:03:51 hah Jan 28 13:03:56 defaultValue = attrs.getAttributeValue("http://schemas.android.com/apk/res/android", "defaultValue"); Jan 28 13:03:57 defaultValue = context.getResources().getString(Integer.parseInt(defaultValue.substring(1))); Jan 28 13:03:59 actually works Jan 28 13:04:02 ugly as sin Jan 28 13:04:32 ha whatever Jan 28 13:04:33 you are doing it wrong Jan 28 13:05:12 danijoo: I didn't understand the alternative, care to go through it again? Jan 28 13:05:26 is it possible onbackpressed to get the backstack to go to a certain position? Jan 28 13:05:36 danijoo: great, genymotion has hardware buttons. The only problem now is RAM. I have only 4GB of it :( And genymotion uses more than avd from Android Studio Jan 28 13:06:00 stefancrs, this is an example of a custom view I created. Look how I extract a string from a custom xml atrribute in line 19 Jan 28 13:06:03 4gb of ram. i feel bad 4(haha) u Jan 28 13:06:05 https://gist.github.com/danijoo/360db77407ba5f74bd66 Jan 28 13:06:44 and in xml I just did the usual xml stuff together with app:titleText="@string/myTitleText" Jan 28 13:07:09 MartialLaw: I feel bad for me :( Jan 28 13:07:18 hi there Jan 28 13:07:20 poor guy Jan 28 13:07:35 I should have at lest +2GB Jan 28 13:07:42 is it possible to have tabs & menus inside a toolbar? Jan 28 13:07:48 gotta check if I can squize it in Jan 28 13:07:58 h4k1m, You can put everything you want in a toolbar Jan 28 13:08:25 danijoo: bcos for the time being I cannot see my menu when tabs are there Jan 28 13:08:43 even if when debugging menu items are there Jan 28 13:08:56 danijoo: I'm getting confused. are you getting different titles for each instance of TitledLayout Jan 28 13:08:57 ? Jan 28 13:09:10 stefancrs, sure Jan 28 13:09:15 wait Jan 28 13:09:21 let me show you an xml for that Jan 28 13:09:28 danijoo: thanks Jan 28 13:09:53 steffooo Jan 28 13:10:05 osxorgate: VEM ÄR DU Jan 28 13:10:25 ile Jan 28 13:10:37 osxorgate: I'm too old. I don't remember. Jan 28 13:10:41 :( Jan 28 13:10:52 stefancrs, https://gist.github.com/danijoo/1ad5074b5e6caf77106b Jan 28 13:11:17 in this example Im using TitledLayout and set the title to whatever string is defined as champion_overview_tips_header in xml Jan 28 13:11:32 and if I use the titled layout somewhere else, i can set another string in xml for that Jan 28 13:11:46 danijoo: very much what I want to do Jan 28 13:11:49 and for every instance it will get read out and can be used in the java class Jan 28 13:12:16 danijoo: key here being obtainStyledAttributes ? Jan 28 13:12:31 stefancrs, all you nead to do is add an attrs.xml file where you define the new xml attribute. like this: https://gist.github.com/danijoo/bd1e3254959b38646f9b Jan 28 13:13:20 It says, for the custom class "TitledLayout", I want a new attribute called "titleText" which is of the format string and will get localized depending on the users language Jan 28 13:13:25 danijoo: I'm open to doing that, but then I'll be declaring the default value twice. Can't I just get the value of android:defaultValue ? Jan 28 13:13:41 stefancrs, yes, if you know what key android is using Jan 28 13:13:48 then you can just use that one Jan 28 13:13:58 hm Jan 28 13:14:14 just look at the android source code and youll find it Jan 28 13:15:42 seems hacky :) Jan 28 13:15:47 will try your wat Jan 28 13:15:48 way Jan 28 13:15:52 not at all hacky Jan 28 13:20:41 i hate my boss Jan 28 13:21:32 This must be the #vent Jan 28 13:22:25 My boss let's me goof off too much. He should fire me. Jan 28 13:22:36 lets* Jan 28 13:23:30 danijoo: this works, what's your take on it? :) http://hastebin.com/otesojoleh.avrasm Jan 28 13:23:48 * capella doesn't want to work, he just wants to bang on the drum all day! Jan 28 13:23:54 danijoo: is actionbarsherlock easier to use than appcompat actionbar example? Jan 28 13:24:12 * FlipBill smiles Jan 28 13:24:40 h4k1m, theres no reason to use abs anymore Jan 28 13:24:56 abs(-1) Jan 28 13:24:58 it was build for support reasons that google did now implement with support actionbar from appcompat Jan 28 13:25:18 danijoo: ok so I'll stick to what Im using right now Jan 28 13:25:38 stefancrs, whats 0 Jan 28 13:25:52 danijoo: the first string in the set Jan 28 13:25:58 but I still cant figure out what is preventing the menu to show up in the toolbar (when tabs are there too) Jan 28 13:26:00 danijoo: that is, the index Jan 28 13:26:05 of the string I'm getting Jan 28 13:26:22 stefancrs, yes but how you know the first string is always the one you want Jan 28 13:26:36 danijoo: because I'm only obtaining one attribute? Jan 28 13:26:52 danijoo: as per attrsArray Jan 28 13:27:03 oh nvm yes Jan 28 13:27:06 should work Jan 28 13:27:13 but you dont need an array for that Jan 28 13:27:19 danijoo: can I attach menu to a toolbar that is on tabs fragment (the one containing the viewpager) instead of being in each tab fragment? Jan 28 13:27:33 you can do ta =context.obtainStyledAttributes(attr, android.R.attr.defaultValue) i think Jan 28 13:27:34 danijoo: I can give it just one id? Jan 28 13:27:38 ooho Jan 28 13:28:04 h4k1m, just but your tabs in a second toolbar under the first one Jan 28 13:28:32 danijoo: you mean tabs and menu cant share the same toolbar? Jan 28 13:28:33 danijoo: no, it won't have that. no such method body. Jan 28 13:28:47 dunno Jan 28 13:29:44 i wanna do wireless debugging, this doesn't work for me http://stackoverflow.com/a/10236938/2272910 Jan 28 13:36:05 can you make a MCU talk with an Android phone via USB? Jan 28 13:40:33 nicktaken, I don't understand what you ask for but yes, via usb host mode probably Jan 28 13:44:45 danijoo & Tricknology, thanks for all the help. in the end, it turned out quite decent :) Jan 28 13:47:46 good to hear its working Jan 28 13:49:40 hi all, if I am writing an android app in Qt( that is possible right) how do I get the list of apps running and how do I call the force stop on them ? Like how shut app does but I want it to do it for the htc apps I choose Jan 28 13:51:22 i dont think lots of ppl here know a qt solution for that Jan 28 13:52:25 well that I will figure out the qt part, I want to know how to call that force stop on an app Jan 28 13:53:19 meh ... blackphone got hacked already :/ Jan 28 13:53:42 Tazmain, ActivityManagerNative.getDefault() to get an activity manager Jan 28 13:53:52 this has the api to do this kind of stuff Jan 28 13:55:49 danijoo, is that api available for qt and c++ ? or writing a native app in c++ for android Jan 28 13:56:00 Its the java api Jan 28 13:56:10 you said youll figure the qt stuff out ;) Jan 28 13:56:31 haha yes, qt is just the look of it this is calls to the backend of it no > Jan 28 13:56:49 no idea Jan 28 13:57:14 its there a native api ? Jan 28 13:58:30 Oh I see there is called ndk Jan 28 14:03:06 meh ... blackphone got hacked already :/ <- since this summer Jan 28 14:03:25 Tazmain, I dont think so Jan 28 14:04:20 hello again everypeople Jan 28 14:04:20 qda, didnt took long .lol Jan 28 14:04:29 oh? I can't be that far behind the curve? Jan 28 14:04:31 whats MCU? Jan 28 14:04:46 danijoo, there is an ndk that is native and then I need to nornmal sdk Jan 28 14:05:04 stefancrs, clad it worked out for you :) Jan 28 14:05:21 Tazmain, i know what the ndk is. I just dont think there is an api for taskmanager in it Jan 28 14:06:19 ohh i see, there is a new vuln for blackphone Jan 28 14:06:48 danijoo, oh I see now what you mean Mmm that would kinda suck, but ActivityManagerNative is that not part of the ndk ? Jan 28 14:07:37 Is there a good example of a PreferenceFragmen in use where a profile pic or some sort of image can be upoaded? Jan 28 14:07:55 Tazmain, never worked with the ndk. its usually only used for low level stuff and graphix. Jan 28 14:08:41 danijoo, I am sure there should be a way, there are native apps for android Jan 28 14:09:02 you dont use assembler to write a windows program if possible. And thats why you dont use ndk if possible :p Jan 28 14:09:09 if you are programming for android Jan 28 14:10:20 yup yup Jan 28 14:10:39 danijoo, you dont use assembler for linux either, but you do use c# and VB for windows. Which is what is was built with now. you can write C applications for linux. So don't see your point Jan 28 14:11:07 yes. and for android, java is what C is for a desktop OS Jan 28 14:11:14 ndk is kinda low level Jan 28 14:11:26 and what does the delvik lie on ? Jan 28 14:11:57 The reason I want to use the ndk is because surely managing apps and unhooking them from memory is low level Jan 28 14:11:59 it's somewhere in finland, isn't it? Jan 28 14:11:59 I think dalvik is written in C like JVM is Jan 28 14:12:14 Tazmain, no there is a java api for that Jan 28 14:12:27 and even the built in task manager of android uses that java api. Jan 28 14:12:46 sorry, Iceland Jan 28 14:13:04 c++ can use C headers. Why would you manage apps with java ? That has got to be the slowest possible way. Besides the kernel still handles the jvm for each app Jan 28 14:13:19 I want to invoke kill -9 signal to that jvm Jan 28 14:13:29 Tazmain brah let it go... Jan 28 14:13:32 Tazmain: you can work with the platform, or you can work against it... one way is much easier and more productive Jan 28 14:13:40 also, you know there's no jvm, right? Jan 28 14:14:13 yeah its the dalvik Jan 28 14:14:18 plus, of course, sandboxing means you don't get to do that Jan 28 14:14:25 soon it wont be dalivik anymore :p Jan 28 14:14:38 -i Jan 28 14:14:48 on a lot of phones it already isnt Jan 28 14:15:02 Well I will request root if I need to on my phone but I am killing those HTC apps and google ones Jan 28 14:15:18 Tazmain, do that. but with java Jan 28 14:15:52 But gui's is such a pain in java, I know I had to write swing by hand without an IDE Jan 28 14:15:57 even if you open android app settings and klick the kill button, this is java Jan 28 14:15:58 I miss objective c.... Jan 28 14:16:09 meh Jan 28 14:16:16 it's not fucking swing Jan 28 14:16:21 had to say that heh Jan 28 14:16:59 swing or not its still a drag Jan 28 14:22:23 gui is a drag in any language Jan 28 14:23:33 C# its simple, qt + c++ simple as well. Jan 28 14:23:38 When using URI matchers you can choose to use * or a #, whats the use of it? Jan 28 14:24:18 i dont think xml layouts are that bad Jan 28 14:24:33 c# is not simple Jan 28 14:24:49 the forms designer is simple Jan 28 14:25:02 and it's qt not c++ Jan 28 14:25:16 C#.net pretty straight forward and if you know where to look you can delete the object as well Jan 28 14:25:22 Port qt to java and it's the same Jan 28 14:25:23 Hrmf, but Qt uses QML which is practically the same as ANdroid's XML layouts :P Jan 28 14:25:33 qt with c++ you use the qt framework with c++ Jan 28 14:26:55 Imo android xml solution isnt that bad.. Jan 28 14:27:06 once you get a hang on it Jan 28 14:27:08 maybe its better now Jan 28 14:27:31 what you want is a good forms designer Jan 28 14:27:33 it didnt change. so there is no "now" Jan 28 14:27:52 just newbie fud Jan 28 14:28:09 well ^ just the forms designer might be better Jan 28 14:28:55 Does anyone in real world actually use form designers? Jan 28 14:32:08 I use HTML_QuickForm2 from pear if that counts Jan 28 14:32:25 er.. sorry prolly not the answer you were looking for :) Jan 28 14:34:07 guys Jan 28 14:35:24 im planning to drag and drop my fragments, if my finger passes half of screen,next fragment will be shown or vice versa Jan 28 14:35:27 any trick ? Jan 28 14:35:30 or keywords Jan 28 14:36:41 i exactly want to do regular phone menu Jan 28 14:37:45 in app billing is just weird Jan 28 14:37:58 specially purchase cancellation Jan 28 14:38:37 what is the recommended way for Toolbar to cast a shadow on pre-lollipop devices? Jan 28 14:49:38 Is there a good example of a PreferenceFragment in use where a profile pic or some sort of image can be upoaded? Jan 28 14:51:13 is there a good example of a HorizontalScrollView in use with 3 fragments ? Jan 28 14:51:45 sci-fi, sound like you want a viewpager Jan 28 14:51:49 and not a scrollview Jan 28 14:52:04 yes i exactly want to do regular phone menus Jan 28 14:52:37 for example if my finger pass half of screen another menu slides in Jan 28 14:54:32 sci-fi, viewpager Jan 28 14:55:02 okay thank you Jan 28 14:55:33 ... wtf android Jan 28 14:55:39 i dont know what to do Jan 28 14:55:40 sci-fi: this - http://codetheory.in/android-swipe-views-with-tabs/ - might help Jan 28 14:56:50 i have 2 views in linearlayout. i want to one view, right, to have wrap_content, and the other one to fill remaining space Jan 28 14:56:59 ive been doing it in other projects and worked somehow fine Jan 28 14:57:06 but this time i cant get it to work Jan 28 14:58:01 the right has wrap_content, the left has 0dp width and weight=1 Jan 28 14:58:08 anyone here know much abuot exif format and exif viewer>? Jan 28 15:01:12 ok, apparently relativelayout shouldnt be the child then :s Jan 28 15:13:54 is there a reason I might be able to get push notifications in my app on a device, but not on genymotion? Jan 28 15:14:15 I have gapps installed on genymotion Jan 28 15:14:26 I can get push notifications from gmail and stuff Jan 28 15:14:33 just not for my app, it seems Jan 28 15:27:08 Can I do monthly reccuring subscriptions for everything? Or is there a limit on for what it can be used? Jan 28 15:27:30 Obviously it should only be used for sensible stuff, but is it actually limited in some way? Jan 28 15:54:24 hey guys.. im using the folders layout and layout-hdpi, but both my nexus 7 and my HTC ONE phone are using the hdpi… how can i use the regular one for all phones and hdpi for tablets? Jan 28 16:04:29 hi again Jan 28 16:10:00 I have an android 4.4.4 phone (w/ cyanogenmod), I'm running the latest chrome stable ( and chrome beta ). Jan 28 16:10:52 luist, everything with a resolution bigger hdpi will use hdpi Jan 28 16:10:52 A site I'm developing currently crashes the phone (I have to remove the battery). Is anyone here able to give me some pointers to find out what the problem is? Jan 28 16:11:15 if you want your table to use another one, make a layout folder for tablets, not one that depends on resolution Jan 28 16:11:28 danijoo: thats a problem because the HTC ONE and most phones nowadays have higher resolution than a nexus 7 tabled ¬¬ Jan 28 16:11:44 Not only does it crash the phone but when reopening the browser, the cached version reloads and the phone hangs again. Jan 28 16:12:13 luist, http://developer.android.com/guide/practices/tablets-and-handsets.html Jan 28 16:12:41 this suggests to use layout-large for tablets Jan 28 16:12:52 ldiamond, ouch. Jan 28 16:13:22 what causes the crash? javascript? Jan 28 16:14:48 danijoo: I'm not entirely sure, it's extremely hard to debug since the phone completely hangs. Jan 28 16:15:09 you could remove parts of the code until you find the part causing that error Jan 28 16:15:15 I believe I found the commit that creates the crash but unfortunately I can't pin-point the cause yet Jan 28 16:16:01 yea that's basically what I'm doing, however the behavior isn't 100% constant. I've managed to run the site successfully when I have the developer console open and I add a debugger instruction in the code. Jan 28 16:18:09 unfortunatly im not that familiar with webdevelopment and therefor wont be of much help on that Jan 28 16:18:28 JakeWharton: hi, do you know if it’s possible to plug google-http-client into retrofit? Jan 28 16:18:30 The site works fine on a 4.4.2 nexus 7 tablet Jan 28 16:18:44 danijoo: Do you know if there are any kernel logs that could help me? Jan 28 16:18:58 after all it's the entire system that freezes Jan 28 16:19:06 I'm wondering if it's at the kernel level or the vm. Jan 28 16:19:46 The 4.4.4 phone that crashes runs a 3.0.64 kernel. Jan 28 16:19:55 danijoo: thanks, ill take a look Jan 28 16:19:58 While the older 4.4.2 tablet runs a 3.4.0 kernel Jan 28 16:20:38 hey guys, how can i catch this timeout exception? just java.io.IOException will catch other stuff too right? : An error occurred while attempting to connect to server 172.16.0.1:389: java.io.IOException: Unable to establish a connection to server 172.16.0.1:389 within the configured timeout of 60000 milliseconds. Jan 28 16:26:37 Hi! Doing a video poker game with training and play modes. I may implement different types of poker eventually as well. Should I the common elements of my layouts, or use one layout with elements determined by a flag? Jan 28 17:06:55 omfg..... Jan 28 17:07:13 i spent so much time tryign to figure out why a ‘ has gone missing Jan 28 17:07:33 it wasnt showing up in regex pattern.. Jan 28 17:07:54 turns out it was a ’ Jan 28 17:08:03 no wai Jan 28 17:08:22 yeah.. ’ != ‘ Jan 28 17:11:04 boom, headshot Jan 28 17:13:50 I guess you weren~t looking at right. Jan 28 17:14:34 whats the best way to display an error from my fragment? i’m having problems displaying an error dialog from the fragment Jan 28 17:31:24 Anyone have this before? Jan 28 17:31:24 E/SwipeRefreshLayout? Got ACTION_MOVE event but don't have an active pointer id. Jan 28 17:33:34 samskiter: Retrofit certainly doesn't care. Just drop in your own Client implementation Jan 28 17:49:27 trying to do a listview with a custom adapter but im getting an error when i try to associate the adapter with the list Jan 28 17:49:40 whats the error Jan 28 17:49:41 listView.setAdapter(customAdapter) gives me Attempt to invoke interface method 'int java.util.List.size()' on a null object reference Jan 28 17:50:00 is this telling me my list has to be populated here? Jan 28 17:50:11 or can the list be empty ? Jan 28 17:50:21 i dont get data for this list till later Jan 28 17:50:41 then ur data is null Jan 28 17:50:44 and u trying to get its size Jan 28 17:50:57 try something like, while overriding the getCount() Jan 28 17:51:11 the error happens when i do "listView.setAdapter(customAdapter)" Jan 28 17:51:13 I440r: I'm guessing you implemented getCount() as `return list.size()` ? Jan 28 17:51:15 return (data == null) ? 0 : data.size() Jan 28 17:51:25 groxx let me look in my adapter Jan 28 17:52:07 nope i have no getCount() Jan 28 17:52:11 i should override that? Jan 28 17:52:18 can someone help me scale the image I am loading here with Universal Image Loader. I have this so far: https://bpaste.net/show/e1f832add6c7 As you can see I have defined the targetSize, but I am not sure where to use it Jan 28 17:52:22 pastebin ur adapter Jan 28 17:52:30 hang on Jan 28 17:52:33 most of the examples I have seen online use targetSize when using loadImage. I can't pass this into displayImage Jan 28 17:52:49 I440r: ah, it's some other kind of adapter? it probably expects you to give it a list at all times. _might_ be easiest to just give it an empty one until you have the data ready Jan 28 17:53:46 wgetpaste is being a bitch its telling me nothing was sent Jan 28 17:54:10 hey, i'm trying to get the button on the bottom here to stay at the bottom of the page http://pastebin.com/TJBPfXuP Jan 28 17:54:14 internal server error lol Jan 28 17:54:57 https://gist.github.com/548bc2d46f3541da334a Jan 28 17:54:57 despite the above linearlayout's weight set to 1, it shows up below the content, not at the bottom of the layout Jan 28 17:56:02 ur data is null Jan 28 17:56:04 most likely Jan 28 17:56:22 int l = q.getLength(); <-- i bet thats it Jan 28 17:57:08 q being a badly named variable lol Jan 28 17:58:09 bilb_ono: hm. hunting through its source, I don't see many places you can customize it... Jan 28 17:58:33 groxx, I can't change the size of the loaded bitmap? Jan 28 17:58:41 anyone here have espresso, powermockito working in gradle? last time i had it working was with powermockito 1.5, now its at 1.6.1: http://pastie.org/9868824 ridiculousness! Jan 28 17:59:12 bilb_ono: as far as I can see, you can only use that to make a NonViewAware load-target. I suspect it's not hard to make one that would just set a view's bitmap with the results Jan 28 17:59:30 bilb_ono: there may be other options. checking. Jan 28 18:00:24 I440r: no, it's probably part of ArrayAdapter that it expects you to give it a non-null list Jan 28 18:00:59 bleAdapter = new BleAdapter(this, serviceList); Jan 28 18:01:11 serviceList is empty here Jan 28 18:01:21 but that line doesnt cause the error, the next one does Jan 28 18:01:27 listView.setAdapter(bleAdapter); Jan 28 18:02:11 guess ill create a dummy entry just to get past here, not sure how it fits in with the overall design of the app tho Jan 28 18:03:27 bilb_ono: adding a PreProcessor to the DisplayImageOptions might fit (that'll let you crop it before it goes into the memory cache) Jan 28 18:04:09 this actually does not make sense to me Jan 28 18:04:26 groxx, I don't want to crop it, I want to resize it. Would I also use a preprocessor for this? Jan 28 18:04:50 i should be able to have an empty list associated wtih a list view Jan 28 18:04:59 and the view should simply be empty Jan 28 18:05:06 why is this a error at all? Jan 28 18:05:45 bilb_ono: ah, right. yeah, it should do that too. Jan 28 18:05:51 should let you do that* Jan 28 18:06:32 why resize, btw? and when? the imageview can scale the image to fit, and do you want to change the on-disk version, or just in-memory, or just for this one display location? Jan 28 18:06:52 what's a good practice for automatic versioning with gradle? Jan 28 18:06:57 groxx, just the display location Jan 28 18:07:06 I found this: http://stackoverflow.com/a/19184323/447934 Jan 28 18:08:20 bilb_ono: https://gist.github.com/Groxx/d56ffa23aabb9190ddab might work. otherwise I'd say just pass in the view and let it do its thing - it'll automatically resize to fit the view if it can. Jan 28 18:09:18 shekibobo: probably versionNameSuffix if you can use it. I personally use git SHAs. Jan 28 18:09:48 bilb_ono: https://github.com/nostra13/Android-Universal-Image-Loader/wiki/Task-flow and the rest of the wiki are moderately useful too, fwiw Jan 28 18:13:51 JakeWharton: have a sec to answer a Kotlin question? your post intrigued me so I started making an app with it last night, but can't find anything in the docs relating to my problem Jan 28 18:15:11 good evening Jan 28 18:15:18 groxx, Im not sure how to implement the BaseImageDecoder? I have this so far: https://bpaste.net/show/6c65d3710f59 Do I pass BaseImageDecoder to the imageLoader somehow? Jan 28 18:15:52 Guys, Im using EcoGallery (https://github.com/falnatsheh/EcoGallery) Jan 28 18:15:56 trevor-e: yes Jan 28 18:16:04 bilb_ono: it's one of the things you can add to DisplayImageOptions, which you can pass in when you loadImage() Jan 28 18:16:28 If I copy the source to my project and fix the R class, it works. But if I create a jar with it, it doesn't work. Can anyone help me on that? Jan 28 18:18:02 bilb_ono: ah, btw you generally just init the loader _once_. I'm not even sure if you're allowed to call init() more than once, or if it just ignores any later ones. Jan 28 18:18:58 loaders ftl Jan 28 18:19:06 SidFerreira: "fix the R class"? Jan 28 18:19:27 I'm not at my home computer, so trying to go off of memory, but I got a class cast exception last night Jan 28 18:20:01 saying something along the lines of "could not cast class android.app.Fragment! to " Jan 28 18:20:08 I couldn't find reference to what ! means Jan 28 18:20:16 I'm assuming it's related to optionals Jan 28 18:20:20 SidFerreira: ah, nevermind, I see it now Jan 28 18:21:16 java.lang.NoClassDefFoundError: us/feras/ecogallery/R$attr Jan 28 18:21:42 my method roughly did "return getFragmentManager().findFragmentByTag(MY_TAG) as? MyFragmentClass" and the method returned MyFragmentClass? Jan 28 18:22:08 SidFerreira: I think, if you're going to include resources (e.g. the styleable attrs, and others in that project) you have to use an AAR, not a jar. Jan 28 18:22:32 Hi. Can I exit the app and the OS kill it instead of putting it into background Jan 28 18:22:43 SidFerreira: I have never attempted this though. only thing I've done with libs that require resources (like appcompat) is to include the whole project. Jan 28 18:23:04 mm Jan 28 18:23:27 panda81: not really. in fact, even System.exit() won't kill your app in some cases. don't worry about it - if you don't have any services running, it'll just get removed when the system needs more space. Jan 28 18:24:55 do you guys also use broadcast receiver to let activity A (still alive) do something to reflect an event that happened in activity B (active)? Jan 28 18:25:45 panda81: basically, an app in the background that isn't doing anything costs almost exactly nothing to leave alone. but it'll speed up relaunching if they do so. there's no benefit to killing the process. Jan 28 18:26:14 Odaym: it's overkill and slow, that's basically what event busses are for. Jan 28 18:26:22 I know it's wrong Jan 28 18:26:30 it's so much for something so simple Jan 28 18:26:36 that too :) Jan 28 18:26:45 event bus then Jan 28 18:27:18 groxx: I'm letting user choose an option when app starts. I guess i have to catch some 'resume' event to display that option menu again? Jan 28 18:27:37 if you _like_ the broadcastreceivers, or want to reuse them internally and you have some external ones, you can use LocalBroadcastManager. but that's nearly as much boilerplate and still pretty slow (and has some weird / unexpected edge cases) Jan 28 18:28:17 Event bus is not part of Android API Jan 28 18:28:27 I think the best way is to use an interface that activity A implements Jan 28 18:29:01 groxx, Is this the basic idea? Somehow pass that newBaseImageDecoder to DisplayImageOptions (line 15). And then pass options to displayImage (line 20)? Jan 28 18:29:06 https://bpaste.net/show/bda15c32ad81 Jan 28 18:30:15 Odaym: it's a pattern. you have a central thing that holds a bunch of listeners, and then you 'broadcast' by sending a message to it, which sends a message to all registered listeners. Jan 28 18:30:32 Odaym: there are also libraries to make it easier, like Otto Jan 28 18:30:52 yea I saw that, but that's a library Jan 28 18:31:02 the logical thing is to do what this book I have about Android, says Jan 28 18:34:29 is it? Jan 28 18:35:01 depends on if the book is logical, I guess. not sure android books have a great track record there. Jan 28 18:36:00 bilb_ono: in the options chain of calls, add .postProcessor(the customized base image decoder) Jan 28 18:40:03 I dont know..you tell me Jan 28 18:40:15 library for implementing what I'm talking about? or BroadcastReceiver? Jan 28 18:40:59 the book was talking about interfacing between Fragments and Activities, and about how the fragment COULD use the reference to the Activity at any time to let it know of UI selections or whatnot, but that it was better practice to have an interface written in the Fragment that the Activity must implement Jan 28 18:41:44 groxx, like so? https://bpaste.net/show/90bbd836a73e does it have to be a certain type? Jan 28 18:42:02 Odaym: or just build it yourself. a simple single-purpose one is like 20 lines of code. Jan 28 18:42:50 android studio + os x developers: wich java version do you have installed? Jan 28 18:43:13 Odaym: yeah, in principle that's probably a better approach. personally, most fragments I deal with are instantiated in code, so we write 'newInstance(RequiredInterfaceActivity parent, ... other arguments)' methods to make it hard to mess up. Jan 28 18:43:44 I dont understand how the interface would fix it though, the interace doesnt make the code inside it ...listening to anything Jan 28 18:45:24 the fragment gets attached to the parent activity in onAttach - cast it to the interface, save a reference locally for simplicity, and use it in the fragment. just make sure you get rid of it in onDetach. Jan 28 18:45:24 ahhh right, like when I say implements onClickListener Jan 28 18:45:27 such noobness Jan 28 18:45:58 g00s: ? Jan 28 18:46:12 gdrc one sec Jan 28 18:46:35 it's a little more forgiving to use e.g. onAttach than to actually register a listener on the fragment itself explicitly, because you don't have to worry about the lifecycle as much (especially when you're being recreated after your process died) Jan 28 18:46:45 but both work Jan 28 18:47:56 it seems like it wants something of the form .postProcessor(BitmapProcessor BaseImageDecoder) but it still asks for "expression expected" Jan 28 18:48:12 does anyone know off-hand what network access gradle is trying to do? Jan 28 18:49:51 lewellyn: Whatever your computer internet is hooked up to? Jan 28 18:50:00 i mean hosts/ports/protocols. Jan 28 18:50:14 i'm trying to figure out if the corporate firewall is the cause of AS running dog slow. Jan 28 18:53:36 Is it me or android studio lagss like hell, and Google is slowling starting to make android closed and not open source? Jan 28 18:54:15 waaaat Jan 28 18:54:20 It's you Jan 28 18:54:22 lewelln: Gradle uses whatever Java uses Jan 28 18:54:33 or I could've said that to him :P Jan 28 18:54:35 ok, next time Jan 28 18:54:36 they are system properties Jan 28 18:54:54 gdrc i have apple java installed to run AS and oracle java 8 as the jdk Jan 28 18:55:22 borw3: How are they making it closed source? Jan 28 18:55:43 its clopen source Jan 28 18:55:49 apple java? what's that? isn't from oracle? is like openjdk on linux? Jan 28 18:57:15 maybe apple flash :v Jan 28 18:57:31 lewellyn, all http Jan 28 18:57:49 lewellyn, as for hosts, mostly maven central Jan 28 18:57:58 dunno what else gradle loads by default Jan 28 18:58:53 https://www.youtube.com/watch?v=HmcbKcf9VIc - TRAKTOR TERROR Jan 28 19:00:59 pfn: yeah. i just need a list of hostnames and ports, but i can't find one. and it doesn't exactly log why it's taking forever. :( Jan 28 19:01:28 lewellyn, set a proxy, run it locally, like through charles, then you have your list of hostnames and ports Jan 28 19:01:42 ah Otto by Square Jan 28 19:01:42 that's the problem... the system has an enforced proxy. :P Jan 28 19:01:54 so? doesn't mean you can't put your own proxy before it Jan 28 19:02:12 it does. it hooks all network requests. :P Jan 28 19:02:37 on your pc? Jan 28 19:02:42 uninstall that shit Jan 28 19:02:48 the most nefarious bit is that it seems to redirect all port 22 traffic to an internal ip. Jan 28 19:03:10 it's a corporate pc. if i uninstall it, i get a fancy brick that i have to send cross-country and explain what i did. Jan 28 19:03:33 lewellyn maybe look at http://gradle.org/docs/current/userguide/build_environment.html sec 20.2 Jan 28 19:03:35 then run it on another pc and get the log you need Jan 28 19:04:00 you should still be able to install a proxy before the system enforced proxy, regardless Jan 28 19:04:08 g00s: that won't help. that's *after* the network socket proxy has gotten involved. :P Jan 28 19:04:10 system enforced proxies generally never proxy localhost Jan 28 19:04:21 and if they do, it's broken Jan 28 19:04:25 pfn: it disallows all localhost. i found that out last night. Jan 28 19:04:25 but anyway Jan 28 19:04:34 yeah, time for a new pc Jan 28 19:04:39 that's a separate battle from "i need my tools to work" Jan 28 19:04:53 this is the stock image on a machine that i got last week. Jan 28 19:04:54 JakeWharton, what happens when this Event Bus is implemented and the option for Don't Keep Activities is selected? Jan 28 19:05:04 the activity dies Jan 28 19:05:07 Odaym, what does it matter? Jan 28 19:05:11 and the event? Jan 28 19:05:12 sounds pretty straightforward Jan 28 19:05:14 by stock, i mean "the same image they deploy to all systems" Jan 28 19:05:15 what about it Jan 28 19:05:17 is there an easy way to read all significant changes that went into 5.0.1 Jan 28 19:05:27 the event goes to whoever is listening Jan 28 19:05:41 of course, if you don't unregister youra ctivity from the event bus Jan 28 19:05:45 you now have an activity leak Jan 28 19:05:54 well before, when I used to use BR for doing this I was told that if my application stops functioning correctly when the Don't Keep Activities is selected then somewhere my communication between Activities is done wrong Jan 28 19:06:46 that's true. don't keep activities essentially just replicates things that can happen normally, but are rare while developing Jan 28 19:07:01 hm. i wonder if wireshark is prohibited by policy. Jan 28 19:07:50 amazingly not. at least not the home page. though my vpn seems to be flapping. but maybe i'll get lucky. :) Jan 28 19:10:35 well thanks a lot for that suggestion, using Broadcast Receivers for this purpose I mentioned above was really a huge drawback to how I wrote Jan 28 19:11:14 lewellyn usually wireshark has to install drivers to caputure packets, depends on your account permissions Jan 28 19:13:32 JakeWharton, Is there a plan to support inheritance with otto in the future? Jan 28 19:13:40 i don't know Jan 28 19:13:47 probably Jan 28 19:14:12 (that means no) Jan 28 19:14:21 (or rather, that means they've stopped developing it) Jan 28 19:14:39 okay. ill find a way to work arround it then.. looks pretty ugly to add Producers for every subclasses though :/ Jan 28 19:17:45 ok. found my culprit. thanks wireshark and MITMed SSL that lets me easily see which host is being requested. Jan 28 19:17:55 also thanks MITM SSL for being the problem. :P Jan 28 19:18:37 lol - is the vpn trying to be sneaky? Jan 28 19:18:44 fwiw, you need to able to access jcenter.bintray.com via https. Jan 28 19:19:05 groxx: no, there's a local web filter which connects to a corporate resource. even i vpn is not connected. Jan 28 19:19:12 haha this is awesome http://digg.com/video/weatherman-plays-it-cool-as-arizona-reaches-record-temps Jan 28 19:19:28 that "even without vpn" is what threw me at first when i was trying to figure out tooling issues. Jan 28 19:19:50 g00s: digg is still a thing? Jan 28 19:19:57 hehe Jan 28 19:20:12 i like it, no commenting. just voting Jan 28 19:21:30 cmon, i cant be the only one with kotlin website problems. that dam topic tree wont expand anymore and i have to keep restarting chrome Jan 28 19:22:11 hm. i wonder what other code hosting i'm missing from my list... github, codeplex, bitbucket, gitorious, google code, sourceforge... i feel like one's missing. :P Jan 28 19:22:54 lewellyn: gitlab Jan 28 19:23:38 sourceforge still aroun eh ? Jan 28 19:24:38 does some one know how i can test the onTouch with the emulator? Jan 28 19:24:56 alexfu: hm. i haven't needed anything off gitlab.com Jan 28 19:25:18 g00s: yup. it's still the best of a bad lot, if you need more than just code hosting, apparently. Jan 28 19:25:40 SimonVT: i made a release in the last three weeks! Jan 28 19:27:13 JakeWharton: Oh wow, you actually did Jan 28 19:29:15 You spend more commits merging, fixing build and releasing versions than you do on features/bugfixes Jan 28 19:29:17 john67: I'm guessing you mean with multiple fingers? it should work normally for a single touch, just by click/dragging Jan 28 19:29:38 that's because there are no bugs! Jan 28 19:29:46 #likeaboss Jan 28 19:29:48 groxx: yeah Jan 28 19:30:56 JakeWharton anyone still working on that rx persistence library ? Jan 28 19:31:02 john67: in theory I think this works: http://tools.android.com/tips/hardware-emulation - I'm testing it myself, would be useful at times. Jan 28 19:31:09 g00s: yes. we use it. Jan 28 19:31:14 :D Jan 28 19:31:25 Any dutch people around? Jan 28 19:32:41 rx persistence? Jan 28 19:32:48 library? Jan 28 19:33:06 ^ one question not two Jan 28 19:35:43 Hi guise !!! Jan 28 19:35:55 how would you implement the counter you can see on this gif ? Jan 28 19:35:56 https://d13yacurqjgara.cloudfront.net/users/107759/screenshots/1221770/passit-final.gif Jan 28 19:37:06 thats pretty slick. i wonder what the ratio is between code for bling vs code for function Jan 28 19:38:49 yeah that's soe nice shiny bling Jan 28 19:42:03 g00s: its quite a lot Jan 28 19:42:07 i know Jan 28 19:42:22 blusky: which bit are you looking at? Jan 28 19:42:23 Hey, quick question. I have a .key, but I need to add it to a keystore file Jan 28 19:42:41 the dial/counter thing in the middle? Jan 28 19:42:49 ugh, anyone else get hit by the blizzard? Jan 28 19:42:53 another 8-12 inches expected monday Jan 28 19:42:54 yeah Jan 28 19:43:01 the number, with the wheel Jan 28 19:43:12 yea, i might implement that now.. im bored Jan 28 19:43:28 oo Jan 28 19:43:30 like that ? :D Jan 28 19:43:32 loool :D Jan 28 19:43:41 john67: eh. same as last time, I can't get it to work. only real alternative I'm aware of is that iirc the paid version of genymotion has something similar _that actually works_. Jan 28 19:43:41 yea, just like that Jan 28 19:43:50 godlike style :D Jan 28 19:44:51 interesting counter. Jan 28 19:44:57 groxx: oki, so i need to use my phone Jan 28 19:45:14 what shall we call it? Jan 28 19:45:36 blusky: fwiw personally I'd probably have / generate a bitmap at runtime of the text, and animate that. easier than controlling text layout dynamically at a high framerate. Jan 28 19:45:42 i wonder if I should record my screen with me making it and stick it up on YouTube in fast-forward or something else just as fancy Jan 28 19:46:24 blusky: plus then you can get fancier, and add e.g. one level of motion blur to a second bitmap (or just use the same one), and swap to that when it moves really quickly. Jan 28 19:46:34 good advice Jan 28 19:46:47 so Ishould make 10 bitmap for each digit ? Jan 28 19:47:02 no need Jan 28 19:47:03 also: blur is typically _really_ expensive to do dynamically. definitely better to compute it once. Jan 28 19:47:07 1 bitmap with alpha Jan 28 19:47:17 when drawn over itself the alpha multiplies Jan 28 19:48:00 Hey, I asked the contractors for the key they used to sign the app, and they sent me a .key file and a password Jan 28 19:48:04 however I cannot sign the apk with this Jan 28 19:48:12 I need a keystore file? Jan 28 19:48:20 since it animates vertically, I'd use all 10 digits in a vertical strip. that'll also make it really easy to show two characters at the same time when you're partially "scrolled" between two values. Jan 28 19:48:29 *in a vertical strip in a single bitmap Jan 28 19:48:31 matt_j: yes, use keytool to import the key into a keystore Jan 28 19:48:44 okay, so I just create a new keystore then? Jan 28 19:51:25 I've registered to listen to the bus events and the singleton is fine and initialised without any parameters..the method to listen is annotated with @Subscribe but still no events Jan 28 19:52:02 the method that is supposed to have subscribed is marked as unused, too, which is I think natural since no one calls it explicitly from the code, but why no event? Jan 28 19:52:25 Napalm: all I have is a .key file. Is this sufficient? Jan 28 19:52:39 yes Jan 28 19:53:23 I don't have a .crt file or anything Jan 28 19:55:36 will be back Jan 28 19:55:37 ++ Jan 28 19:57:41 <_AleX_> hi all ! for prepare my app submission, i search a tool for automate screenshots (differents sizes and languages), how to do that ? Jan 28 19:58:10 could this be it? https://github.com/square/otto/issues/26 Jan 28 19:58:54 I've set the register target MyActivity.this instead of just this Jan 28 20:00:22 I think Otto is for activity B extending Activity A??? Jan 28 20:00:33 show code Jan 28 20:00:39 we're not psychics Jan 28 20:00:39 I thought this was for what I was asking about two activities not having any relation except for one being spawned infront of the other Jan 28 20:01:30 it's too minimal to grab and put together in a file. It's just the singleton, the Subscribe method, the calls to register/unregister in pause/unpause and the post(myClass("stringValue")) Jan 28 20:01:34 as per the sample on Github Jan 28 20:01:59 the listener method has log.d(tag, myClass.getMessage()) Jan 28 20:02:59 the listener method takes 1 parameter which is of type myClass, as the type that was used as a parameter to post() Jan 28 20:03:45 Napalm: don't I need a certificate or something to import a private key? Jan 28 20:07:05 it's like this http://www.recursiverobot.com/post/48752686831/playing-around-with-otto-on-android Jan 28 20:07:11 lol, too simple to fail Jan 28 20:07:42 oh shit I did it somehow Jan 28 20:10:28 somethin ain't right Jan 28 20:13:09 ah, suddenly, it works Jan 28 20:13:23 because of moving the register to onCreate... Jan 28 20:18:54 alright, here it is Jan 28 20:19:08 register in onCreate, unregister in onDestroy Jan 28 20:19:15 the message would not show otherwise Jan 28 20:19:25 I bet you Jan 28 20:20:31 if the unregister is in onPause, when going back and the activity that registered is destroyed, an exception is thrown "missing event handler for annotated method, is the host activity registered?" Jan 28 20:24:27 Ah otto! I tinkered with that Jan 28 20:25:05 http://simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ Jan 28 20:25:15 heh Jan 28 20:25:49 nice Jan 28 20:25:52 will read Jan 28 20:26:03 well, that Otto is fancy Jan 28 20:26:05 I'm happy Jan 28 20:26:20 no more broadcast receivers Jan 28 20:26:27 oh sweet, otto is getting codegen? +∞ Jan 28 20:26:28 night Jan 28 20:26:37 someday* Jan 28 20:26:55 Interesting part how it can pass messages around even through a destroy()/create() cycle Jan 28 20:28:08 yeah, I noticed that comment was from 2012 :) is the _technique_ relatively ironed out, and the trouble is improving the code, or is the overall approach still in flux? Jan 28 20:28:46 The problem is someone has to care enough to do it Jan 28 20:29:08 a perpetual problem, no doubt Jan 28 20:29:40 there's also https://github.com/greenrobot/EventBus which afaik does codegen, but I don't really know how good it is. haven't looked closely enough. Jan 28 20:30:24 that does not do codegen Jan 28 20:30:31 it uses stupid conventions to be "faster" Jan 28 20:31:20 gotcha. must've misread / blended it with greendao (whose code generation is... strange.) Jan 28 20:31:57 Otto could be code gen and it would crush every performance metric you throw at it, but there's little point Jan 28 20:32:18 the code gen implementation i wrote in 2012 did everything in <1ms Jan 28 20:32:53 1000 subscribers spread across 10 classes in a (ridiculous) activity type hierarchy... <1ms Jan 28 20:33:02 awesomeness Jan 28 20:33:13 but, you never have that. you have like two Jan 28 20:33:21 and that takes <1ms as well Jan 28 20:33:26 so if I'm changing numberPicker.setMaxValue(), and I also have displayedValues set, does one of those need to happen before the other? Jan 28 20:33:37 Don't you cache your reflection stuff? Jan 28 20:33:41 yes Jan 28 20:33:55 yea if you are using that many events at once then I think there's a design issue Jan 28 20:34:13 ah, and otto is smaller than I expected. the "guava-based" keeps giving me the impression that it requires guava, though on closer read it seems that's wrong Jan 28 20:34:16 But still, superclass subscribers! Jan 28 20:34:38 i'm tempted to do the code gen and superclass stuff just to shut people up Jan 28 20:34:47 especially those greenrobot apologists Jan 28 20:34:49 lol Jan 28 20:35:51 any idea on that Kotlin issue I posted earlier? not sure if you've had a chance to check it out but I'm assuming it's something basic I overlooked Jan 28 20:37:13 I cant seem to figure out how to store and edit a matrix, or just multiple arrays. Jan 28 20:37:57 trevor-e just noticed there is #kotlin, you can also try there Jan 28 20:38:11 oh cool Jan 28 20:38:19 and the room size just doubled! Jan 28 20:38:49 matt_j: no, just add your key to the keystore Jan 28 20:43:50 Jackson uses an underscrore prefix for non-public members (including methods). _stuffLikeThis. Ugh, it's ugly to read. Jan 28 20:44:47 javascript Jan 28 20:44:57 Napalm: haha, I have no idea how to do it, but somehow it has managed to build with the .key file Jan 28 20:45:03 maybe the .key was a keystore just named wrong Jan 28 20:45:11 probably Jan 28 20:45:32 Yeah. I guess Python too. Jan 28 20:45:58 trevor-e: i haven't looked yet, sorry Jan 28 20:46:57 no worries Jan 28 20:54:04 what's the best way to store, display, and edit an 8x16 array? I'm still new to android and am having some difficulty getting a handle on this stuff. Jan 28 20:55:42 i have a Worker class which extends Thread, has a public void run() which prepares and loops a looper. the loop calls my handler class. this works in one project, in another project things are not working out so well Jan 28 20:55:50 Worker.mHandler.getLooper().quit(); <-- getLoooper() is not known Jan 28 20:55:58 why? Jan 28 20:56:01 its exactly the same code Jan 28 20:57:12 I440r: well, if your error message is correct, you misspelled Looper Jan 28 20:57:32 i cut it out of one source into the other Jan 28 20:57:45 "getLoooper() is not known" - 3 o's Jan 28 20:58:02 no thats me mistyping it HERE, not in the sources lol Jan 28 20:58:07 i didnt cut/paste here Jan 28 20:58:09 yeah, that's what I figured Jan 28 20:58:14 but thought I would check :) Jan 28 20:58:43 but yeah, I have no idea Jan 28 20:58:49 getLooper() has been present since api 1 Jan 28 20:59:11 What is the definition of the mHandler field? Jan 28 20:59:20 Worker.mHandler.getLooper().quit(); <-this is a cut/paste Jan 28 20:59:32 let me paste that code Jan 28 21:00:55 https://gist.github.com/e41c30b4320d7c6206eb Jan 28 21:01:08 Can you mutate an arraylist that's being iterated from outside the iteration? I.E. without using iterator.remove() ? Jan 28 21:02:00 the v7 APIs don't come with sources — where can I get the exact source that was used for the jar compilation (what's in the android source code doesn't appear to match at this moment) Jan 28 21:02:21 I440r: what is a BleHandler? Jan 28 21:02:53 the wrong class i think hang on Jan 28 21:03:25 no its the right class. it implements a handleMessage() Jan 28 21:03:38 I440r: regardless, the handler shouldn't be static in this case Jan 28 21:03:42 I440r: but does it extends Handler? Jan 28 21:04:06 ugh no Jan 28 21:04:07 ty Jan 28 21:04:10 (I'm pretty sure the answer is "no", otherwise you wouldn't be getting that error) Jan 28 21:04:13 lol Jan 28 21:04:59 it does in the code that works, not in the code that doesnt :) Jan 28 21:05:42 man, getting a handle of RecyclerViews with custom LayoutManagers is fairly complex Jan 28 21:07:20 Is it better to use Inkscape than Photoshop for creating an application icon? Jan 28 21:07:22 Writing adapter-backed views is fairly complex Jan 28 21:07:27 gimp Jan 28 21:07:41 Does that support saving as SVGs, adq? I read that Inkscape does. Jan 28 21:07:56 yes, but it's not dedicated to vector thingies Jan 28 21:10:13 herriojr, the support repo has sources side-by-side iirc Jan 28 21:10:45 yep, -sources.jar Jan 28 21:32:19 Hey guys, how come a private property doesnt need to be declared 'final' to be used within an inner class Jan 28 21:32:26 This looks good: royalty-free clipart images: https://openclipart.org/ Jan 28 21:32:58 as opposed to an anon class? Jan 28 21:33:05 drose379: because it has a reference to the enclosing class instance Jan 28 21:33:24 Dont know what that means Jan 28 21:34:16 Thanks JakeWharton , Ill look into it Jan 28 21:35:37 If I pass a class an instance of an AlertDialog.Builder, can I use that same instance for multiple dialogs Jan 28 21:36:10 drose379: for builders, not usually Jan 28 21:36:25 So I need to create a new instance Jan 28 21:36:26 i mean, when you build something from a builder it should be making defensive copies Jan 28 21:36:38 but Android is not written by reasonable people Jan 28 21:36:40 should be. most builders I see don't though. Jan 28 21:37:06 So I have to pass my class 2 builders? If I want to build two dialogs Jan 28 21:37:10 drose379: Are you using DialogFragment, BTW? (I think you're supposed to use DialogFragment as a Dialog wrapper now.) Jan 28 21:37:18 No Jan 28 21:37:24 Just AlertDialog.Builder Jan 28 21:38:03 http://android-developers.blogspot.co.uk/2012/05/using-dialogfragments.html Jan 28 21:38:14 Thanks Jan 28 21:38:17 "In parallel, the showDialog / dismissDialog methods in Activity are being deprecated in favor of DialogFragments." Jan 28 21:39:13 the fragments are definitely more controllable / styleable / better if you need any of that. also a lot more code for a yes/no dialog :) Jan 28 21:39:55 Wait, so in order to create a new AlertDialog.Builder I just need the context Jan 28 21:40:09 So I can create them in my class as long as I pass the class my Context from the activity Jan 28 21:40:16 Problem solved :D Jan 28 21:40:16 yep Jan 28 21:40:58 So instead of passing an EditText, a ProgressBar Jan 28 21:41:16 I should really just pass context and make the View elements from within the class Jan 28 21:41:47 under the hood it's still just a Dialog so they're not any more styleable Jan 28 21:42:57 On second thoughts, that article doesn't look great -- it doesn't even mention overriding DialogFragment.onCreateDialog, for example. Jan 28 21:44:21 is there some tools to analyze layouts rendering from running rendering ? Jan 28 21:44:33 I got some "padding" I can't explain, I'd like to debug it Jan 28 21:47:08 tools/monitor in the sdk Jan 28 21:47:19 "Android Device Monitor" Jan 28 21:48:04 I'm wanting to have some kind of "Thanks to for " thing for my app, regarding the use of certain libraries, etc. Would it be bad form to put it somewhere in the app (e.g., in an 'About' screen)? Jan 28 21:48:14 I guess I could put it in the Google Play listing, but I'm not sure what's best. Jan 28 21:48:53 The YouTube app uses an 'About' screen to display relevant licences. I might copy that. Jan 28 21:49:07 I'd probably stick it at the bottom of the Settings screen if you have one Jan 28 21:49:34 about screens seem kind of pretentious unless it's a team effort Jan 28 21:49:58 not really worth cluttering up the UI for Jan 28 21:50:06 except that the licenses might require it Jan 28 21:50:08 it's a good place to put open source license info Jan 28 21:50:16 if I just want to create an application that displays network information (IP addresses, netmask, etc.) from either `ip addr show` or another command on this individual tablet, how would I go about coding a text field to display the output of a command? (a very simple app). I have the SDK and the Android Studio, just not sure where to start. Jan 28 21:50:54 I guess if I make it a settings section it won't (I hope) created a cluttered UI. Jan 28 21:51:22 i'd just put an "About" item at the bottom that pops up a dialog Jan 28 21:52:30 teward, look at the samples Jan 28 21:52:41 there is one that just says "helo, world" Jan 28 21:52:47 s/says/outputs/ Jan 28 21:57:02 are DialogFragment's removed from the fragment manager when the dialog is dismissed? Jan 28 21:57:39 because I keep getting a Fragment already added exception when trying to re-invoke a DialogFragment Jan 28 21:57:40 * JesusFreke .oO(GaiPan) Jan 28 22:01:08 It seems that they are removed: https://android.googlesource.com/platform/frameworks/support/+/master/v4/java/android/support/v4/app/DialogFragment.java#159 Jan 28 22:04:09 is it possible that "this" reference can be null? I am passing a reference to my service (this) to a static method and from within the onCreate(...), the "this" reference is null Jan 28 22:06:45 sleepster: I can't imagine 'this' ever being null. What makes you think that 'this' is null in your case? Jan 28 22:07:42 TacticalJoke: Inside of the Google Play Developer console, I get a crash report and from within this report, it shows a NullPointerException is being thrown Jan 28 22:08:24 when I go to the location in my source code, it shows that the service (this) is being used Jan 28 22:08:32 and causing a crash Jan 28 22:08:35 sleepster: are you sure it's the this reference? Is there some other dereference that's hapenning on that line? Jan 28 22:09:10 can you pastebin the line/method/class? Jan 28 22:09:52 huh, so there is Airpnp Jan 28 22:10:18 "The App For Bathroom Emergencies" Jan 28 22:10:43 blusky: ddms has a "dump ui hierarchy" button, which covers most of my needs. otherwise you can use hierarchyviewer with an emulator or on a (normal) device with https://github.com/romainguy/ViewServer Jan 28 22:11:42 blusky: or, "android device monitor". what used to be the ddms part of eclipse, and is now a button in the main toolbar, not the bottom tab in Studio. Jan 28 22:12:03 Romain said that you actually don't need ViewServer for normal devices anymore Jan 28 22:12:13 really? it never seems to see my devices... Jan 28 22:12:22 maybe there's a dev setting I haven't toggled though Jan 28 22:12:32 I couldn't get it working on mine, either. Jan 28 22:12:39 Though I didn't try ViewServer. Jan 28 22:13:02 https://github.com/romainguy/ViewServer/issues/14#issuecomment-41880194 Jan 28 22:13:13 ViewServer has problems at times, but sometimes it's the only option (older devices, if we can do this natively on new ones) Jan 28 22:13:41 Oh. The device I used is <4.4. Jan 28 22:14:19 re Jan 28 22:15:18 yeah, I don't know when they think that works, but changing settings I haven't tried tweaking yet still didn't bring up my debuggable app. maybe actually attached to a debugger....? Jan 28 22:17:46 (nope) Jan 28 22:21:49 JesusFreke: http://pastebin.com/F61nsWtH that's the simplest use-case I can provide that shows the problem Jan 28 22:21:58 it doesn't happen all the time of course Jan 28 22:22:03 this is a Google Play crash report Jan 28 22:22:05 Bill Gates's AMAs always get really popular. Jan 28 22:22:39 I wonder if it's possible that my app was being updated and midway through the GC started cleaning things up Jan 28 22:22:45 and therefore the context was null? Jan 28 22:23:22 No, that's not possible Jan 28 22:23:39 sleepster: The comment states that the NPE is in ComponentLoader.load. Is that right? Jan 28 22:23:42 sleepster: where is the NPE? Jan 28 22:24:00 the stack trace shows ComponentLoader.load(...) Jan 28 22:24:05 so the instance was retrieved correctly Jan 28 22:24:13 then the problem is definitely not context being null Jan 28 22:24:19 because context isn't being dereferenced there Jan 28 22:24:21 maybe getResources() is null? Jan 28 22:24:42 so the only thing that could be null on line 13 in the pastebin is if ComponentLoader.instance() returns null Jan 28 22:24:55 or rather, the only thing that could cause an NPE Jan 28 22:25:34 but I also don't understand how it could return null, based on the implementation you pasted Jan 28 22:25:35 oh sorry, the NPE is on the line context.getResources(...) etc.. Jan 28 22:25:39 oh Jan 28 22:25:58 so it's either context was null which doesn't seem possible since context = this Jan 28 22:26:06 must be getResources Jan 28 22:26:49 but then the stack trace would show the NPE inside Context class Jan 28 22:26:52 hmm. I can't see how getResources would return null though either :/ Jan 28 22:27:48 oh, this is in Application.onCreate()? Jan 28 22:27:49 hmm Jan 28 22:28:07 yeah Jan 28 22:28:11 and it's intermittent Jan 28 22:28:32 So I cannot create a toast using a class, even if I give it the activities context? Jan 28 22:28:47 maybe getResources() returns null before the application's onCreate has finished? Jan 28 22:29:21 sleepster: do you have any other static calls into there that could be occurring first? Jan 28 22:29:23 JesusFreke: that's a good point Jan 28 22:29:28 If you can reproduce it locally, even if intermittently, I would add some additional logging to see exactly what is null Jan 28 22:29:37 sleepster: "but then the stack trace would show the NPE inside Context class" < that's not true. Jan 28 22:29:50 getResources simply returns a field. Could return null. Jan 28 22:30:01 TacticalJoke: ah, yeah I spoke too soon Jan 28 22:30:05 yeah that's true Jan 28 22:30:20 drose379: How do you mean? Jan 28 22:30:32 groxx: no other static calls.. that's the first one Jan 28 22:30:51 Well in my class, im trying to create a toast inside a onResponse method (its in a new thread) Jan 28 22:30:51 I think it might be that super.onCreate is maybe not fully completed and therefore getResources is returning null? Jan 28 22:30:55 So usually I would use a runnable Jan 28 22:31:06 But here I have no view to .post the runnableto Jan 28 22:31:22 sleepster: possibly related (but still not very helpful): http://stackoverflow.com/questions/12823300/race-condition-between-application-oncreate-and-resources-loaded Jan 28 22:31:42 In my app, I have a global Handler (linked to the main thread) which allows any class to post runnables to the main thread. Jan 28 22:32:00 thanks JesusFreke, I'll take a look Jan 28 22:32:10 s/class/object/ Jan 28 22:32:23 TacticalJoke so a handler allows me to post a runnable? Jan 28 22:32:34 Yeah, you can use Handler.post. Jan 28 22:33:02 As far as I can tell, View.post is a convenience method for calling Handler.post. Jan 28 22:33:05 fwiw in my work-app we use resources in application.onCreate, never had a problem with it Jan 28 22:33:10 So I should instantiate the Handler in the activity where I want the Toast to appear Jan 28 22:33:24 Then pass it to the class? Jan 28 22:34:37 drose379: that's a relatively easy way to do it, yeah. handlers are quite cheap. Jan 28 22:34:47 groxx: Could the Handler leak, though? Jan 28 22:35:01 I guess it depends on what he's doing. Jan 28 22:35:10 Leak? Jan 28 22:35:17 if you just do `new Handler(Looper.getMainLooper())`, no. or, the handler could as long as there are pending messages, but that's it. Jan 28 22:35:33 to be honest, it's kind of addicting looking at the Google Play Developer Console.. not sure why Jan 28 22:35:33 What about new Handler(0 Jan 28 22:35:37 () * Jan 28 22:35:37 usually "handler leak" implies "handler is causing you to leak activity, thus views, bitmaps, etc" Jan 28 22:35:37 like to look at the crash reports Jan 28 22:36:18 Ah, okay. I think I'm remembering a lint message about Handlers leaking, but it might've been relating to inner classes or something. Jan 28 22:36:20 drose379: new Handler() makes a handler on the current thread. in onCreate, it'll work fine. _generally_ I'd advise you to be painfully explicit about threading though - pass in Looper.getMainLooper() and you _know_ it's correct. Jan 28 22:36:47 See I know nothing about the looper Jan 28 22:36:52 TacticalJoke: yeah, it's a warning that appears on non-static inner class handlers. Jan 28 22:36:53 So thats why this is confusing Jan 28 22:37:22 drose379: look at the source :) Jan 28 22:37:39 drose379: long story short: Handler is a thing that Messages are sent to. Messages are put into a MessageQueue, which exists if you have a Looper in your thread. Jan 28 22:37:51 "Message" Jan 28 22:37:53 ? Jan 28 22:37:57 but yeah, the source for handler / messagequeue / looper is actually pretty readable Jan 28 22:38:03 Would a message be like a toast? Jan 28 22:38:05 Messages are things like "The user clicked the Foo button". Jan 28 22:38:16 oh ok Jan 28 22:38:20 e.g. https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/android/os/Looper.java Jan 28 22:38:25 Or perhaps "The user touched the screen at [56:78]". Jan 28 22:38:33 Thanks guys Jan 28 22:38:47 @Provides @Singleton Handler provideHandler() { return new Handler(Looper.getMainLooper); } Jan 28 22:39:01 *provideMainThreadHandler Jan 28 22:39:13 drose379: Message is a specific class, in this instance. it's just an efficient, safe system to enqueue things-to-do and to do so from any thread to any thread. Jan 28 22:39:32 to any looper thread* :) Jan 28 22:39:36 yeah, true :) Jan 28 22:39:47 Ok, I just gotta look deeper into it Jan 28 22:40:05 "message" is an overloaded term. in this case, it's an `android.os.Message`, and _nothing_ else http://developer.android.com/reference/android/os/Message.html Jan 28 22:40:21 Ok Jan 28 22:40:37 You guys got any thoughts on a ThinkPad t440s vs a Macbook Pro Jan 28 22:40:38 drose379: thing of a Looper as a while(true) { somethingToDo = waitForSomethingToDo(); somethingToDo.do(); } Jan 28 22:40:55 Ok, makes sense JesusFreke Jan 28 22:41:12 and then when you send a message to a handler, it's actually adding "something to do" into a queue associated with the looper Jan 28 22:41:14 ^ that's how the main thread works in android, extremely-simplified. Jan 28 22:41:37 and in most applications, really :) Jan 28 22:41:44 Sweet Jan 28 22:41:50 hmm, LayoutManager really needs callbacks for RecyclerView.drawChild() Jan 28 22:44:04 ah, nvm, it looks like the ItemDecoration might do it Jan 28 22:45:00 yep Jan 28 22:47:00 well, it's not 100% what I want AFAICT — I need something in drawChild() so I can do rotations on a per-child basis Jan 28 22:47:31 so I will end up having to do a Custom RecyclerView, which I was attempting to avoid Jan 28 22:47:33 could you do it in the child view's onDraw? Jan 28 22:47:46 Levite: no, that requires every view to be a custom view Jan 28 22:47:52 or rather every child Jan 28 22:47:58 which is a PITA Jan 28 22:48:15 also, the rotation should really be handled at the manager level in my use-case Jan 28 22:48:35 ah Jan 28 22:48:50 I'll put in a request for it Jan 28 22:56:25 herriojr: seems like that might be a job for the layoutmanager? Jan 28 22:56:51 (disclaimer: I have not built anything fancy with recyclerview) Jan 28 22:58:23 herriojr: hello Jan 28 22:59:38 http://appleinsider.com/articles/15/01/28/google-play-downloads-are-growing-but-apples-app-store-commands-70-of-revenue Jan 28 22:59:51 can't get the paper unless you register though Jan 28 23:00:07 not surprising Jan 28 23:00:37 "Most of the revenue on the iOS App Store and Google Play comes from a trio of nations that App Annie calls the "app store superpowers": Japan, South Korea, and the United States. Together, these three countries generated more revenue in 2014 than the rest of the world combined" Jan 28 23:04:14 retailers in the US are adopting Apple Pay quite rapidly "Apple Pay now accounts for two out of every three dollars processed through contactless payment systems, a huge achievement for Apple's NFC-based solution that debuted less than three months ago. " Jan 28 23:05:45 even the retailers are going for apple users Jan 28 23:12:36 on libgdx is there a way to flip the y coord on getY? Jan 28 23:12:45 I'm just glad Apple Pay means retailers are finally turning on the nfc payment things they've had on their card readers for a couple years now. Jan 28 23:12:48 I've currently got this ugly code: spritePos.y = Gdx.app.getGraphics().getHeight() - (Gdx.input.getY() + img.getHeight() / 2); Jan 28 23:13:31 oh NM, there's a whole channel for libdgx >_< Jan 28 23:14:02 prior to apple pay landing, < 10% that i tried worked. after, >75%. it's quite nice. Jan 28 23:20:41 wth, reactivex.io is putting the docs for all languages together, so you actually have to click on 'java' for everything Jan 28 23:21:20 i just want to see the java stuff :| Jan 28 23:23:45 that's... an extremely strange UI decision for them to make... holy awful, batman Jan 28 23:29:36 groxx: https://lh4.googleusercontent.com/-PCmy4DBr-5A/UnBf-AfOQ0I/AAAAAAAABVg/DeQLKz88cPc/w600-h408-no/robin_batman1966.jpg Jan 28 23:30:13 Napalm: http://4.bp.blogspot.com/-UsVhz_4ldMg/UTdfMpdAWzI/AAAAAAAAH5Q/CX4_setDjTw/s1600/batman-bomb-run-o.gif Jan 28 23:30:31 :) Jan 28 23:31:09 speaking of which! I've been watching these lately: http://www.rifftrax.com/batman-takes-over-episode-1 Jan 28 23:31:20 batman is weird :| Jan 28 23:32:42 bah they took down flatmapthatshit.com Jan 28 23:32:50 john67: oh hello, sorry, missed that Jan 28 23:33:11 herriojr: np Jan 28 23:38:34 g00s: archive.org saves the day yet again https://web.archive.org/web/20141217091241/http://flatmapthatshit.com/ Jan 28 23:46:09 groxx \o/ Jan 28 23:54:35 are entries that are written into Logcat guaranteed to be displayed in the order they were written? Jan 28 23:55:29 from the same thread yeah, from different threads its probably order inserted into a queue Jan 28 23:55:36 bye Jan 28 23:57:45 ... = (RelativeLayout) roortView.findViewById(... Jan 28 23:57:48 roortView! Jan 28 23:58:18 i have a lot of those in my code Jan 28 23:58:24 budderknife Jan 28 23:58:26 its just too much work to rename variables. Jan 28 23:59:15 danijoo: Even with Refactor > Rename? Jan 28 23:59:25 TacticalJoke, yes. even with that! :p Jan 29 00:02:18 groxx, that image is awesome Jan 29 00:08:59 I'm having an issue where my fragment's onPause/onDestroyView/onDestroy/onHiddenChanged are not being called when I pop that fragment from the back stack. Any thoughts? Jan 29 00:09:12 I am using the support library fragment class. Jan 29 00:09:22 pfn: which? the bomb? Jan 29 00:10:08 flatmap Jan 29 00:13:09 ah. that's a g00s link, I just found the undelete button :) Jan 29 00:16:49 If I refund an inapp purchase for IAB v3, will it consume the item? Jan 29 00:26:13 g00s, so have you learned to flatMap that bitch yet? Jan 29 00:26:22 yep Jan 29 01:00:17 TacticalJoke youre gonna hate me for this one Jan 29 01:01:00 You know what Im not even gonna ask Jan 29 01:11:02 drose379: Of course not. :) Jan 29 01:11:18 Currently the only people I hate are customer-service reps who are rude to calling-in customers. Jan 29 01:11:43 Agreed Jan 29 01:12:01 haha, im trying to write a recursive method right now Jan 29 01:12:09 Though it's hard to hate people when you realise they have no free will. Jan 29 01:12:21 too bad java doesn't do tailrec Jan 29 01:13:40 drose379 be careful you don't blow up your stack in recursion Jan 29 01:14:16 Right yeah Jan 29 01:14:42 Im looking for a setError type message for AlertDialog.Builder Jan 29 01:14:45 Any ideas? Jan 29 01:14:58 for an edittext in the dialog? Jan 29 01:15:08 Yees Jan 29 01:15:09 Yes Jan 29 01:15:15 ohhh I could setError on that Jan 29 01:16:34 Im trying to figure out if I like listening to music when writing code or not Jan 29 01:16:39 Do you guys? Jan 29 01:16:57 ayup. drowns out minor distractions. Jan 29 01:17:00 I'm listing to Rach 2 right now. I don't think it's helping, though. Jan 29 01:17:11 de Jan 29 01:17:12 r Jan 29 01:17:22 i use white noise, rain / water noise, etc Jan 29 01:17:30 i use metalcore :/ Jan 29 01:17:32 Have you seen http://rainymood.com/? Jan 29 01:18:00 no - my ipod has some app which has a huge library of awesome sounds, i play it over the bt speaker Jan 29 01:18:16 TacticalJoke, im living under the roof so this is exactly what it sounds like when it rains :) Jan 29 01:18:16 'hail hitting rusty shack' Jan 29 01:18:26 danijoo: I love that sound. :) Jan 29 01:18:28 Best purchase ive ever made... Bluetooth adapter to my old stereo system Jan 29 01:18:33 g00s: just watch out for brown notes in your brown noise ;) Jan 29 01:18:38 its like living in a tent Jan 29 01:18:39 I actually feel slightly cold and wet when going to RainyMood.com. Jan 29 01:19:29 Im leaning more towards the side of sticking with the music Jan 29 01:19:57 Keeps me focused I think Jan 29 01:20:18 thats my every-day coding music: https://www.youtube.com/watch?v=HafGJQXGFuY Jan 29 01:20:50 I'm more of a http://is.gd/WVZvnI person Jan 29 01:21:20 Rush-Free Will right now for me Jan 29 01:21:25 This is the Rach 2 I'm listening to (and becoming obsessed with): http://youtu.be/rEGOihjqO9w Jan 29 01:21:33 but I also have times where I can listen to beatles or stuff like that for a day Jan 29 01:21:47 drose379: Talking of free will. ;o Jan 29 01:21:49 or maybe http://youtu.be/dQw4w9WgXcQ Jan 29 01:21:56 Dammit, groxx. You got me. :D Jan 29 01:21:57 haha yeah TacticalJoke Jan 29 01:22:51 xD Jan 29 01:23:19 Have I asked you guys about the ThinkPad yet? Jan 29 01:23:31 my tastes tend to waffle between electronic and neoclassical-type-stuff. Jan 29 01:23:48 after I get too much of one, I switch to the other Jan 29 01:23:51 I think Lenovo has a good reputation. Jan 29 01:24:12 t440s? Jan 29 01:24:21 8GB with a 128SSD Jan 29 01:24:37 Has me re-thinking my Macbook pro idea Jan 29 01:24:38 lenovo _used_ to. not so sure about now, aside from coasting on their brand recognition. Jan 29 01:24:39 i use a t440s all day urrday Jan 29 01:24:48 no way, you reccomend? Jan 29 01:24:50 to make roebutt appz Jan 29 01:25:03 Whats the specs on yours Jan 29 01:25:10 why is my ViewPager onPageSelected never being called? Jan 29 01:25:27 groxx: Did they lose their good reputation? Jan 29 01:25:29 re 8gb: I may actually recommend 16 at this point. 8 is relatively fill-able. Jan 29 01:25:29 drose379: full ram, biggest ssd Jan 29 01:25:46 drose379: i run ubuntu on it Jan 29 01:25:54 TacticalJoke: depends on who you ask, it seems. I hear a fair amount of griping about dropping quality. Jan 29 01:26:21 Hmm, should I stick with the MBP idea? Jan 29 01:26:38 eh. thinkpad is probably cheaper :) Jan 29 01:26:41 My opinion is that Mac hardware is way overpriced. Jan 29 01:26:49 Thats a face Jan 29 01:26:51 fact* Jan 29 01:26:52 if you're happy with windows / going to install ubuntu anyway, go for the cheaper hardware Jan 29 01:27:00 But Customer service is great Jan 29 01:27:16 Im a OSX user, havent used windows in a while Jan 29 01:27:21 So idk about windows 8 Jan 29 01:27:44 drose379: if you weren't aware / were considering it: don't buy a previous-generation MBPr. it doesn't have enough gpu horsepower to keep up. Jan 29 01:27:57 the current stock is pretty good Jan 29 01:28:16 If someone leaves an EditText empty and I call .getText().toString() will it be null or "" Jan 29 01:28:21 And thanks groxx Jan 29 01:28:41 I think edittexts always return "" at least? Jan 29 01:28:52 thats what I was thinking too Jan 29 01:29:04 is there a .length method Jan 29 01:29:16 someEditText.length() == 0 Jan 29 01:29:30 got it Jan 29 01:29:32 Thank you Jan 29 01:30:52 Im debating on whether to show you guys my attempt at recursion before or after I test Jan 29 01:31:13 should this work? http://hastebin.com/seroduvixu.java Jan 29 01:32:06 n^izzo: I think so. though reusing the filename for the key names is a bit odd. Jan 29 01:33:28 groxx, I figure I'm only going to have one set of prefs I may as well have only one constant string Jan 29 01:33:48 yeah, nothing wrong with it :) Jan 29 01:34:02 you may want to use .apply() fwiw - .commit() synchronously writes to disk. Jan 29 01:35:58 This is really picking up: https://android-review.googlesource.com/#/q/branch:studio-1.1-release Jan 29 01:38:30 I'm hoping they release 1.1 of the Gradle plugin at the same time. :) Jan 29 01:43:40 Ok, hows it look TacticalJoke http://pastie.org/9870012 Jan 29 01:45:43 TacticalJoke do any kotlin today? :) Jan 29 01:47:41 drose379: You're creating a whole new Dialog every time they click OK with no text? Jan 29 01:47:50 drose379: won't that open multiple dialogs on top of eachother if the user enters nothing? Also, aren't you supposed to do something like .create() before .show()? Jan 29 01:47:53 g00s: Oh, no. I'm gonna hold off till it gets popular. :) Jan 29 01:48:44 Hmm, yes.. Maybe I should instantiate the AlertDialog.Builder outside of the method? Jan 29 01:48:44 it'll get popular because of google's fumbling on java Jan 29 01:48:51 Or I could dismiss Jan 29 01:48:51 just because, android heh Jan 29 01:49:13 That'd be so cool if it got popular. Jan 29 01:49:26 then again, i thought WP would become popular too heh Jan 29 01:49:49 What you guys making Jan 29 01:50:13 "popular because of google's fumbling on java" Jan 29 01:50:13 nope Jan 29 01:50:15 not gonna happen Jan 29 01:50:50 drose379: That whole 'error' thing is a bad idea. Jan 29 01:50:59 Why? Jan 29 01:51:01 It makes more sense to simply call TextView.setError there. Jan 29 01:51:13 Nothing is gained from having that 'error' field. Jan 29 01:51:13 there are a lot of android devs, and i think an inflection point could be coming soon where they get tired of google's java subset on android Jan 29 01:51:38 theres always been a subset on Android Jan 29 01:51:49 its only recently since they have compliance Jan 29 01:51:49 Well when I call the method inside the method I need to know if there was an error Jan 29 01:52:25 What I mean is that { error = true; lessonDialog(); } could be replaced by { editText.setError("Enter a valid name"); }. Jan 29 01:53:00 i'm sure at i/o fireside, one of the first questions will be "so how's java 8 coming guys :)" Jan 29 01:53:06 and they won't give an answer Jan 29 01:53:12 But the method needs to be called again TacticalJoke Jan 29 01:53:14 and people will be like, fuck again already Jan 29 01:53:23 to re-evaluate what the user puts in Jan 29 01:53:31 drose379: When? Jan 29 01:53:40 After the .setError Jan 29 01:53:43 Anytime they click that button, onClick will fire. Jan 29 01:54:15 Yeah, g00s. People must be starting to tire by now. Jan 29 01:54:42 yeah, but people won't choose it Jan 29 01:54:46 and kotlin isn't the only game in town Jan 29 01:55:10 drose379: Your method is doing two main things: (1) creating a dialog and (2) showing an error state. Jan 29 01:55:30 You're calling it for both reasons, which is not really what you want. Jan 29 01:56:00 It also has to make a decision on whether to call the next method or not Jan 29 01:56:27 Yeah, that's in the onClick thing. Jan 29 01:56:39 That'll run every time the user clicks 'Save'. Jan 29 01:56:47 Until they get it right and the dialog is dismissed, I guess. Jan 29 01:56:50 g00s: and then they'll all be like "it's coming to all androids next week" and we'll all be like http://i.imgur.com/UmpOi.gif Jan 29 01:57:02 if I just .setError does that stop the code from moving forward Jan 29 01:57:13 followed, of course, by evil laughter Jan 29 01:57:28 Or does it set the error on the EditText and move on to the next line (What I dont want) Jan 29 01:57:56 Is your goal to prevent the dialog from closing if they haven't entered text? Jan 29 01:58:25 Its to prevent blank data to be sent to the DB Jan 29 01:59:03 * groxx has a new favorite character: 当 <- cake! Jan 29 01:59:07 Well, createLesson is called only if editText.length() > 0. Jan 29 01:59:13 s/>/!=/ Jan 29 01:59:29 Which is good Jan 29 02:01:29 Are you sure you want to show a dialog here, drose379? Often the UX is better if they go straight to the activity (and enter the lesson name on that activity). Jan 29 02:01:38 i think if square shows up under 'who's using kotlin' lots of devs will notice and be curious Jan 29 02:02:13 The other option would be just using a dialog in the next activity Jan 29 02:02:27 And I also want to keep them in this activity after they create the lesson Jan 29 02:02:29 (also, fwiw, using a dialog fragment, and doing whatev you want) Jan 29 02:03:04 what does fwiw stand for Jan 29 02:03:05 drose379: Is there any reason they can't simply enter the lesson name in an EditText in the second activity? Jan 29 02:03:06 Just curious. Jan 29 02:03:11 "for what it's worth" Jan 29 02:03:26 Oh, ok. Jan 29 02:03:35 it's also kinda fun to pronounce Jan 29 02:03:42 TacticalJoke There is no second activity Jan 29 02:03:52 This activity I am working in is like a dashboard Jan 29 02:03:53 The second thing is another dialog? Jan 29 02:04:09 No Jan 29 02:04:11 Oh, I see. Jan 29 02:04:15 Yeah Jan 29 02:05:29 So if an object is instantiated inside an inner class it can not be used outside the inner class Jan 29 02:06:37 no? Jan 29 02:06:51 hm Jan 29 02:07:12 there maybe other things preventing you from accessing it or something, not entirely sure what brought you to that conclusion Jan 29 02:10:50 im updating android studio... it says it is downloading SDK tools (platform tools, samples, images)... but it seems to be updating files in my android studio folder and not in the seperate SDK i downloaded seperatly... im a bit confused... is android studio now using an internal SDK again? Jan 29 02:13:22 oh wait.... it has created another SDK in AppData.... Jan 29 02:13:57 If you go to File > Project Structure you can see where AS is looking for the SDK. Jan 29 02:15:28 i can see it.....in the AS splash screen when i click SDK manager, SDK manager pops up and it shows the path is using the one in AppData Jan 29 02:15:44 but i clearly remember specifying the path to my own SDK before updating AS just now Jan 29 02:15:56 how do i change it back? Jan 29 02:16:34 The setting in File > Project Structure should stick. Jan 29 02:19:43 cool.... i just dont understand why the update decided to download a new sdk and change my path when i had already everything set up and working Jan 29 02:21:46 Kotlin looks cool Jan 29 02:24:45 Yeah, I'd much rather be using it than Java. Jan 29 02:25:14 What are the advantages that an experienced guy like you sees in that language over java? Jan 29 02:28:14 When it comes to Android and Java, I'm not very experienced, but I did spend a lot of time in other environments. I guess lambdas, extension methods, null being a first-class citizen, immutable variables without noise ('val' instead of 'final foo bar'). Jan 29 02:28:26 And I'm sure a bunch of other nice little things. Jan 29 02:29:26 another appealing thing is the kotlin runtime and library seems to be small Jan 29 02:29:32 relatively Jan 29 02:30:13 Someone once told me that Android Java is "Java-Like". Did they mean that Android is not actually java? Jan 29 02:30:20 Yes, drose379 Jan 29 02:30:32 how is it not actually java? Jan 29 02:30:36 It is using the Dalvik VM. Jan 29 02:30:58 or art, missing some classpath stuff, using harmony, etc etc etc Jan 29 02:31:11 So I wont be able to use what I learn when developing android in regular java? Jan 29 02:31:19 The Java is compiled into bytecode which is executed by Dalvik VM rather than the Java VM Jan 29 02:31:19 It's very similar to Java 7. Jan 29 02:31:41 No, your Java knowledge is still directly applicable Jan 29 02:31:43 It is java though right? Google didnt write the language? Jan 29 02:31:46 Oh, ok Jan 29 02:31:48 Compiliation is just different. Jan 29 02:31:53 It's basically the Java language, yeah. Jan 29 02:32:08 Where are big differences that I should know about? Jan 29 02:32:11 If any Jan 29 02:32:28 Java 8 has lambdas. That's a big difference. Jan 29 02:32:43 Anything else? Jan 29 02:32:51 Not really. Jan 29 02:33:06 So I am writing java Jan 29 02:33:14 Just using a different compiler Jan 29 02:33:18 Correct. Jan 29 02:33:43 Your Java code is compiled into a DEX file rather than a CLASS file Jan 29 02:33:55 Note that you're using the official Java compiler if you're using Android Studio with the default setup. Jan 29 02:34:04 I am Jan 29 02:34:15 I guess it defaults to language level 7. Jan 29 02:34:30 I thought it was using a Dalvik Jan 29 02:34:31 At least with how AS invokes it by default. Jan 29 02:35:01 Hm Jan 29 02:35:39 Does anyone know how to make a HTTPS POST request on Android? I'm trying to implement it securely and I'm getting a lot of answers that just disable certificate checking entirely. :\ Jan 29 02:36:01 Actually, yes :) Jan 29 02:36:11 I use OkHttp Jan 29 02:36:16 Very straightforward Jan 29 02:36:19 drose379: Dalvik is Android's runtime environment for <= 4.4. Jan 29 02:36:20 Oh really? Cool Jan 29 02:37:21 Entanglement here is a post request http://pastie.org/9870082 Jan 29 02:37:47 This is exactly what I needed! Thanks, drose379 :) I wasn't expecting that haha Jan 29 02:38:05 Glad I could help dude Jan 29 02:38:20 Likewise, take care Jan 29 02:38:28 You too Jan 29 02:41:41 Anyone ever done drag and drop? Jan 29 02:42:03 But the item that you drag actually gives data when you drop it in a certain place Jan 29 02:42:04 and calls a methods Jan 29 02:42:08 method* Jan 29 02:52:33 What about TabViews? Hows this tutorial look to start? Jan 29 02:52:33 http://nerdburglars.net/viewpost/8/Tutorial/android-tab-view-tutorial.html **** ENDING LOGGING AT Thu Jan 29 02:59:59 2015