**** BEGIN LOGGING AT Wed Jan 14 02:59:59 2015 Jan 14 03:00:08 "TacticalJoke: Hobby since childhood." - now I feel old :( Jan 14 03:00:27 TacticalJoke hahah Jan 14 03:00:43 I left my 20s last year. I'm starting to feel old now. Jan 14 03:01:06 Oh shit your not that much older then me Jan 14 03:01:07 Cool Jan 14 03:01:12 I thought you were 18? Jan 14 03:01:17 Correct Jan 14 03:01:20 3 years Jan 14 03:01:30 I left them, not started them. :p Jan 14 03:01:37 12 years. Jan 14 03:01:42 damn, I read that wrong Jan 14 03:02:01 haha, whatever Jan 14 03:02:01 JesusFreke: If it's any consolation, you don't seem that old. Jan 14 03:02:25 not much older than you. I thought you meant you started *android* programming in your childhood Jan 14 03:02:31 Oh. lol Jan 14 03:02:42 I started with QBASIC at around 13, I think. I guess "teenhood". Jan 14 03:02:53 yeah, it was around 6th grade for me Jan 14 03:02:55 I wish I started earlier Jan 14 03:02:57 and yeah, qbasic :) Jan 14 03:03:01 :) Jan 14 03:03:03 :| I started in college Jan 14 03:03:12 I started Android programming in about 1988 Jan 14 03:03:25 Leeds was always a visionary. Jan 14 03:03:35 hahaha Jan 14 03:03:47 you guys ever looked into iOS? Jan 14 03:03:52 Not saying im going to, just wondering Jan 14 03:04:10 I've seen people using it... Jan 14 03:04:11 yeah, I did iOS for about a year and a half Jan 14 03:04:12 I haven't. Curious, although I don't own any Apple devices, so I couldn't do much. Jan 14 03:04:30 groxx: How would you rate it relative to Android dev? Jan 14 03:04:33 well, a hello world app you wrote for way early versions of java would probably still run on android Jan 14 03:04:43 via the command line Jan 14 03:05:10 iOS is more sane, hardware is better so you can do stupider things without noticing, and ARC makes reference-counting _really_ nice to use. Jan 14 03:05:51 it certainly limits you though. that has improved in the past two OSes in particular, but it still has a way to go, and the new and fancy stuff isn't even remotely as widely used as Android's equivalents. Jan 14 03:06:13 TacticalJoke with that planner idea we were talking about, would you want your stuff to available to you on the web too? Or just local? Jan 14 03:06:40 I really liked ARC with Delphi strings. IIRC, it offered the convenience of garbage collection with the speed of manual memory management. Jan 14 03:07:07 yeah, pretty much. if you're making fancy data-structures it gets more complex, but that's legitimately rare. Jan 14 03:07:09 drose379: I guess that would be nice. That'd entail easy back-ups and easy editing (via a web browser). Jan 14 03:07:25 Right, yeah Jan 14 03:07:53 follow some basics religiously (like what you make weak-refs and what are strong), and even people who don't know what they're doing get it 90-something percent right. Jan 14 03:08:16 how do I find the equivalent of 'compileTask' for com.android.build.gradle.tasks.NdkCompile? Jan 14 03:08:40 I love the idea of a language having first-class support for using garbage collection and not using garbage collection (e.g., Nim has this). Jan 14 03:10:04 I love c++'s auto/smart pointer thingies. Heap allocation, but tying the object lifecycle to the stack. Jan 14 03:10:08 lifetime* Jan 14 03:10:12 yeah. personally I think garbage collectors belong in (I dunno the term, but I'll call it) "user-space". the one baked into the language is never as good as what you can optimize yourself. Jan 14 03:10:50 i.e. basically strong ownership semantics Jan 14 03:11:19 plus then you can have micro-collectors for areas with specific memory behaviors, or turn it off and use refcounting which is awfully simple (and with tagged pointers, awfully fast) Jan 14 03:13:39 I was looking at the material-design guidelines, and on the Menus page I see that some menu items had an ellipsis. There didn't seem to be any info on this topic, though; just images. Does anyone know if there are written guideliness here? Jan 14 03:14:08 In my app, I have a menu item "Log in". Not sure whether to use "Log in..." (since it goes to a secondary activity/dialog). Jan 14 03:14:28 Google's apps don't seem consistent here. Jan 14 03:15:17 ah. yeah, "log in" in particular I dunno Jan 14 03:15:46 usually I think of "..." as "there are more things to configure before doing ". login fits that. but login is SO common, and if it's the only thing with "..." it just feels out of place :\ Jan 14 03:15:50 Windows has that convention, but WINA. Jan 14 03:16:17 Yeah, it might look weird. Jan 14 03:16:41 Im out for the night Jan 14 03:16:53 TacticalJoke , thanks alot for the help today Jan 14 03:16:59 No worries. Have a good one. :) Jan 14 03:17:09 You too, talk later. Jan 14 03:17:17 TacticalJoke google's guidelines is less is more Jan 14 03:17:31 if I would make it Log In > Jan 14 03:17:34 s/if// Jan 14 03:17:44 which is how settings used to be... Jan 14 03:17:48 but then they changed it to drop the > Jan 14 03:17:50 which was dumb Jan 14 03:18:00 so pick one or the other but not .. Jan 14 03:18:15 * HevvyMetal throws out his $.00002 Jan 14 03:18:59 ">" does imply "clickable" pretty well, but it always feels to me like it should be accomplished some other way... but I don't really know of one :) divider lines + the Lollipop ripples do a fairly decent job perhaps. Jan 14 03:19:28 flat(-ish) is rough. hard to show what's clickable and what's not. Jan 14 03:19:40 Yeah. Jan 14 03:19:48 the ripples and animations are so laggy on my nexus 10 lollipop i can't believe it Jan 14 03:19:56 I wish Google's apps were consistent in their UIs. Then we could just copy them. :) Jan 14 03:20:01 what devices are you running on and are the animations smooth? Jan 14 03:20:09 is it just my nexus or what? Jan 14 03:20:26 yeah, gapps aren't exactly ideals of design :) Jan 14 03:20:35 I used to do that on Windows: the question was just "WWMD?". Jan 14 03:20:39 how do the divider lines denote clickable? pic groxx? Jan 14 03:20:40 N6 is generally completely smooth, as is my N4 Jan 14 03:20:49 i have a n10 Jan 14 03:20:52 choppy as fuck Jan 14 03:21:01 everything about it is choppy since upgrading actually Jan 14 03:21:12 divider lines just make it a bit more clear that it's not e.g. a header. that, plus the ripples, tends to feel like at least an _improvement_ over nothing, though not quite enough. Jan 14 03:21:13 but idle battery standby went from 3 days (lucky) to > 2 weeks it's amazing Jan 14 03:21:15 Ya, they're also far from ideal. Jan 14 03:21:32 now it's like my wifes ipad as far as standby i dont know what they were doing before Jan 14 03:21:38 or maybe i just turned off LBS i dunno Jan 14 03:21:56 afaik a big part of it is that Android keeps getting more and more aggressive about timer coalescing, and that's the big win Jan 14 03:22:22 what does that do groxx? Jan 14 03:23:34 in general, it means that background stuff doesn't happen at + , it happens at . that way the OS can do a bunch of stuff at once rather than stay "awake" for a few ms just to wait for the next. Jan 14 03:24:07 maybe that's why the animations are so slow now Jan 14 03:24:19 it does that while it's groggy and not fully awake i dunno Jan 14 03:24:25 hi ok everything is working now Jan 14 03:24:34 "we'll show those animations eventually" Jan 14 03:24:39 left entirely alone, apps can't coordinate, so you get a wake-up for each app, a network wake-up, activity, disk activity, then it sleeps. then the next app does it. then another. when you coalesce all those sleep-periods, you get _one_ series of events, and it's typically only barely longer than any one individual series. Jan 14 03:24:53 right once again choppy Jan 14 03:24:56 makes cpu spikes Jan 14 03:25:01 all the background things fire at once Jan 14 03:25:04 ok keeep going groxx Jan 14 03:25:10 that's background, and usually it's for maximizing sleep time Jan 14 03:25:10 it's all making sense now Jan 14 03:25:34 yeah but now when an app is in the foreground it lurchces while all background apps fire at once whereas before they were spread out over time Jan 14 03:25:39 hi, is there any sample using Material design with Android 5.0 Jan 14 03:25:46 so its like ccch ch ch THUNK ch chc hc THUNK right? Jan 14 03:25:54 if that makes sense groxx Jan 14 03:26:12 afaik some of the lurchyness in Lollipop comes from another rendering thread for e.g. the background ripples. maybe it's only a tiny bit, but it's another thread that's higher priority than your main thread, so it eats _some_ cpu time you could be using Jan 14 03:26:37 I would guest that it probably doesn't do coalescing, or doesn't do it as aggressively, while the device is on/in use. Jan 14 03:26:39 guess* Jan 14 03:26:42 but i'm amazed at the battery life now did your N4 or N5 battery life go up by 3x-4x after lollipop or just 1.2x or what groxx? Jan 14 03:26:51 that's mostly while the device is sleeping Jan 14 03:26:56 so if you're not doing layouts during animations, it stays really smooth. but if you do things a little worse, it can fight with the new render thread, and end up worse than 4.4 Jan 14 03:26:57 to avoid having to wake up multiple times Jan 14 03:27:17 but I'm not actually familiar with the logic there so, just a guess :) Jan 14 03:27:23 HevvyMetal: device-sleeping time has definitely increased. hasn't done anything for day to day use as far as I've seen though. Jan 14 03:27:46 so my secondary dev phone now lasts another couple days in my bag, but my personal phone is basically unaffected Jan 14 03:28:57 JesusFreke: fwiw cpus can sleep _really_ quickly. letting it do that does make a measurable difference, technically. but yeah, except for network activity, it probably doesn't make much of a difference while you're using the phone. Jan 14 03:29:19 the timer coalescing isn't for general timers... Jan 14 03:29:23 just for alarm manager and stuff Jan 14 03:29:36 so choppiness wouldn't be a result of that Jan 14 03:30:07 yeah, I wouldn't expect timer coalescing to affect animations. Jan 14 03:30:32 and lurchiness? haven't seen that... Jan 14 03:32:21 there are a couple I've seen that I might argue is new to Lollipop. in general though it looks and _feels_ smoother, which might make those few seem worse. Jan 14 03:32:44 though my 2012 N7 is seriously unhappy with it all :) Jan 14 03:33:38 2012 n7 is pretty crappy as I understand it Jan 14 03:34:11 yeah. don't touch 'em. 2013 is good afaik though Jan 14 03:34:26 haven't noticed any real choppiness in lollipop Jan 14 03:34:33 'cept when I enable accessibility... Jan 14 03:34:37 haha Jan 14 03:34:40 chrome becomes completely useless Jan 14 03:34:42 I have that on all the time Jan 14 03:35:52 there's some ugly bug in accessibility when it's enabled and using chrome Jan 14 03:36:03 e.g. I can't go to the desktop github site without totally destroying chrome Jan 14 03:36:08 I saw something about that. firefox ftw I guess? Jan 14 03:36:10 turn off accessibility and it works fine Jan 14 03:36:49 anyone using the great suspender in here? it's woring well for me g00s even with abp turned on Jan 14 03:38:11 http://www.quickmeme.com/img/05/05a1c8b7771193b3c6ab0ed8c6c573f5283899f370c70a98f107b80fcd52b8ba.jpg Jan 14 03:42:57 what vemacs? Jan 14 03:43:02 is that like vim+emacs? Jan 14 03:46:51 anyone used the shortest width stuff for resources? Jan 14 03:48:34 https://www.youtube.com/watch?v=DUdhfPh9V_s Jan 14 03:49:13 i think rxjava + lambda is pretty close to LINQ :) Jan 14 03:49:15 i'm stoked Jan 14 03:53:58 so the play store shows users when the app was last updated...is there anyway to see (or on other app searching sites) when the app was first introduced and it's date and version history? Jan 14 03:55:55 did you check this out tacticaljoke http://sfbay.craigslist.org/sfc/cpg/4837547951.html Jan 14 03:56:40 aww, how sweet - you guys are friends now :) Jan 14 03:57:03 yep it's official Jan 14 03:57:14 no shiz g00s chrome has over 100 tabs and only using 6gb Jan 14 03:57:23 you need to try this great suspender :) Jan 14 03:57:27 it werkz Jan 14 03:58:51 TacticalJoke http://arthurtw.github.io/2015/01/12/quick-comparison-nim-vs-rust.html Jan 14 04:00:01 Hi Jan 14 04:00:08 Could someone please see this: http://s13.postimg.org/op2meq0fr/ss1.png Jan 14 04:00:38 I am posting code on pastebin now Jan 14 04:00:47 basically I don't know why the text is not centred Jan 14 04:02:07 try this g00s and set your tabs to spend ~1hr Jan 14 04:02:09 https://chrome.google.com/webstore/detail/the-great-suspender/klbibkeccnjlkjkiokjodocebajanakg?hl=en Jan 14 04:02:11 here is the code: http://pastebin.com/i09kH0nt Jan 14 04:08:43 any ideas? Jan 14 04:14:37 what's the question ir7466 ? Jan 14 04:14:57 I'm not sure why the text is not centred - I also put it at http://stackoverflow.com/questions/27935757/textview-not-centred-in-android if it's clearer Jan 14 04:15:23 I thought android:layout_gravity="center_horizontal" should do it Jan 14 04:15:50 there is layout gravity and view gravity Jan 14 04:15:55 make sure you're setting the right one Jan 14 04:16:13 yeah there might be a textalignment as well Jan 14 04:16:17 been awhile Jan 14 04:16:33 I should be using android:gravity="center" ? Jan 14 04:16:38 html/css doesn't have that gravity stuff? Jan 14 04:16:44 no Jan 14 04:17:01 html/css doesn't have anything called gravity Jan 14 04:17:23 right so i dont know where android came up with this stuff Jan 14 04:17:42 change for the sake of change I guess Jan 14 04:17:52 they got a bunch of curses programmers to write the android view system it seems like Jan 14 04:18:01 someone who had never, ever, worked on an OOP GUI Jan 14 04:18:25 it's like apple's new programming language Swift, instead of making it more standard like C/Java/PHP and those sorts... they just do stuff randomly Jan 14 04:18:31 admittedly better than objective c though Jan 14 04:18:37 objective-c is puke Jan 14 04:18:42 i dont see how the mac hipster put up with it Jan 14 04:18:48 try android:layout_centerInParent="true" ir7466 Jan 14 04:18:56 change for the sake of change, lol Jan 14 04:18:58 scrubs Jan 14 04:19:00 all scrubs Jan 14 04:19:11 Objective-C was used in NextStep and then apple bought it so 30 years later, of cuorse, they base iOS on it Jan 14 04:19:14 it's retro change tho Jan 14 04:19:21 objective-c is like 1983? Jan 14 04:19:24 c++ 1985? Jan 14 04:19:28 smalltalk 1978? Jan 14 04:19:32 something like that Jan 14 04:19:45 iOS 2006 right? Jan 14 04:19:47 wtf Jan 14 04:20:04 someone replied on Stackoverflow Jan 14 04:20:04 well, you do realize objective C is used throughout OSX to begin with Jan 14 04:20:12 I needed: android:layout_width="match_parent" android:gravity="center" Jan 14 04:20:24 pfn it is, AFTER apple bought NextSTep which was objective c Jan 14 04:20:25 g00s: I keep conflating Nim and Rust in my mind, so it's nice to see a comparison like that. Jan 14 04:20:32 i don't know why they phear the C++ so much Jan 14 04:20:35 but anyways Jan 14 04:20:42 why? c++ is pretty shitty Jan 14 04:20:50 swipht i havent seen the syntax nor this klondike thing Jan 14 04:20:51 C++ is ok Jan 14 04:20:56 because C++ has lots of libraries you need to call Jan 14 04:21:08 objective C is the worst of smalltalk and C syntax combined Jan 14 04:21:11 but it has GC Jan 14 04:21:12 yeah Jan 14 04:21:16 TacticalJoke HevvyMetal can you guys see a login dialog at https://members.oreilly.com Jan 14 04:21:22 or does it error out Jan 14 04:21:23 Obj C was a misstep Jan 14 04:21:30 not sure why they were hell bent on reinventing the wheel Jan 14 04:21:40 there is a way of calling C++ from obj-c right? Jan 14 04:21:45 "There was a problem loading the login page." Jan 14 04:21:57 maybe objc made sense in 1983, BEFORE there as C++ , but it didnt make any sense in the 90s when apple switched to it Jan 14 04:21:59 ok, capella and I had problems too. thanks TacticalJoke Jan 14 04:22:07 but C++ was crap too trust me but at least it has it's momemnts Jan 14 04:22:11 I use(d) C++ for DSP Jan 14 04:22:19 g00s i get There was a problem loading the login page. Jan 14 04:22:20 Please check your browser settings for these possible blockers, and try again once you've made any necessary changes. Feel free to email accounts@oreilly.com if you have questions. Jan 14 04:22:34 she's dead jim Jan 14 04:22:37 yeah, damn it. wanted to but todays deal of the day Jan 14 04:22:48 * HevvyMetal gets out the tricoder Jan 14 04:22:52 and she is a he Jan 14 04:22:53 oreilly staff was like "works for me, he" Jan 14 04:22:54 Hmm, Nim's lack of braces doesn't seem wonderful for readability in that code (at least with its two spaces). Jan 14 04:23:40 i remember getting into a conversation with bjarne about C++ in 1985 or so and i wasn't a fan Jan 14 04:23:43 but he was pretty cool Jan 14 04:23:58 i'll take hjelsberg over stroustrip any day when it comes to scandinavians tho Jan 14 04:24:00 That's making me think about reddit comments. I wonder whether there's a good way to effectively show a close brace. Jan 14 04:24:17 which nim code TacticalJoke ? Jan 14 04:24:19 didnt see it Jan 14 04:24:31 guys Jan 14 04:24:37 what is your favourite coding language? Jan 14 04:24:39 they're both nice people but hjelsberg is more smalltalky Jan 14 04:24:48 ir7466 whatever pays the most Jan 14 04:24:54 also anything but PHP Jan 14 04:24:55 given this is an android room, am I right in thinking a lot of you like java? Jan 14 04:25:01 channel Jan 14 04:25:01 no Jan 14 04:25:04 why don't you like PHP? Jan 14 04:25:06 i'm just a whore for the money ir7466 Jan 14 04:25:14 i love mobile but i just tolerate java Jan 14 04:25:23 http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ Jan 14 04:25:28 but now that I can get lambda working and with rxjava i'm a little happier ir7466 :) Jan 14 04:25:34 it's getting better :) Jan 14 04:25:35 do you reckon native android development will move more towards web apps in time? Jan 14 04:25:42 ir7466 absolutely Jan 14 04:25:51 i think native dev is a bubble that will pop very soon Jan 14 04:25:56 (unfortunately) Jan 14 04:26:01 so PHP is well positioned Jan 14 04:26:02 for a variety of reasons Jan 14 04:26:06 along with js/html/css Jan 14 04:26:07 maybe no...fuck php Jan 14 04:26:16 but for backend stuff, php very well positioned surely Jan 14 04:26:19 its just goin to be javascript single page webshites ith rest services and webapps on mobile Jan 14 04:26:23 no, see above Jan 14 04:26:28 everyone is into single page apps now Jan 14 04:26:31 you dont need php Jan 14 04:26:38 you just need webservices and a busload of javascript Jan 14 04:26:49 and you can do webserice on parse.com or whatever Jan 14 04:26:51 no need for a backend per se Jan 14 04:26:58 thats what I think but what do others think? Jan 14 04:27:15 JS can do a lot, for sure Jan 14 04:27:33 but for heavy things, database interaction etc, PHP is very good Jan 14 04:27:37 i'm not sure how js tracks logings authentication but i'm not a web guy but i think Jan 14 04:27:41 I like PHP, in case it wasn't obvious :) Jan 14 04:27:47 the webservice handles database interaction or use parse Jan 14 04:27:52 it wasnt but good to know Jan 14 04:27:54 ir7466: Have you read that article I posted? Just wondering. :) Jan 14 04:27:55 frameworks like Symfony are very impressive Jan 14 04:28:05 TacticalJoke I am scanning it now Jan 14 04:28:09 I don't disagree with some of the things Jan 14 04:28:11 so php pays $30/hr and android is $100/hr which would you rather jave ir7466 Jan 14 04:28:22 like inconsistencies ala mysql_query vs strpos vs str_replace Jan 14 04:28:24 things like that Jan 14 04:28:57 i do like its flexibility though Jan 14 04:29:20 unfortunately that is probably at the expensive of things like predictability, in terms of strong typing etc Jan 14 04:30:03 Coming from PHP or JavaScript, Java would seem divine. Jan 14 04:30:11 and stuff like Appending to an array is done with $foo[] = $bar. which they say is a negative, I think is a positive Jan 14 04:30:23 if you use them wisely arrays in PHP can be very powerful Jan 14 04:30:42 I mean "Coming from PHP or JavaScript, someone would find Java divine". Misplaced modifier. :) Jan 14 04:39:00 Hmm, why is it that SharedPreferences.editor has putStringSet but not putStringList? Is there some technical reason I don't know about for disallowing duplicates? Jan 14 04:39:04 Editor* Jan 14 04:41:54 yeah well we should all phear javascript Jan 14 04:42:00 javascript is a crap language in a lot of ways Jan 14 04:42:08 but it's about to become the standard for backend (node.js) Jan 14 04:42:14 and front end (ionic et al) Jan 14 04:42:22 we'll all wish it was php when that happens Jan 14 04:42:41 how does FB scale their php anyway? zend? i'm pretty clueless on lamp stack Jan 14 04:42:47 s/ on lamp stack/. Jan 14 04:43:01 i can't believe that Kent Beck works at FB Jan 14 04:43:08 I think they have their own engine now... Jan 14 04:43:22 but they don't sell it Open source it or anything leeds? Jan 14 04:43:29 also, JS>php, pretty much *>php, but JS on the backend is still pretty faddish Jan 14 04:43:30 like everything, they roll their own (see HHVM) Jan 14 04:43:42 well ruby is such the fad Jan 14 04:43:59 and ruby is much more established already Jan 14 04:44:02 $200k/yr for ruby Jan 14 04:44:07 more established than what? Jan 14 04:44:12 php?javascript? Jan 14 04:44:20 it's established at bankrupting startups Jan 14 04:44:36 than JS Jan 14 04:44:42 no way man leeds Jan 14 04:44:49 ruby is NOT going to give you a dynamic web page Jan 14 04:44:55 only JS does that right now Jan 14 04:44:56 for the backend... Jan 14 04:45:03 so ruby is either for the static part or the webservices Jan 14 04:45:09 and I think ruby is way overrated for both Jan 14 04:45:17 asp.net and/or parse.com I think is better Jan 14 04:45:26 frontend... meh, it's got to be JS in the end, one way or another, since JS is the only language which is common in the browser Jan 14 04:45:36 yeah and that's sad leeds Jan 14 04:45:44 it is what it is Jan 14 04:45:47 i wish they had C# or Java or something on the browser besides JS Jan 14 04:45:53 could be a lot worse... Jan 14 04:45:55 it's amazing the web came out in around 1995 Jan 14 04:45:58 not much worse Jan 14 04:46:02 it's now 2015 Jan 14 04:46:04 er... they *had* Java in the browser... everyone hated it Jan 14 04:46:11 everyone STILL hates it Jan 14 04:46:13 that was too long ago Jan 14 04:46:23 now the memory footprint would be negligible Jan 14 04:46:26 and no applets Jan 14 04:46:35 if java was the language for the DOM like JS is it would solve a lot of problems Jan 14 04:46:47 at the time applets (crapplets) tried to BE the browser or a flash repalcement Jan 14 04:47:06 anyway it's why I focus on desktop/mobile I just can't stand the web html javascript bs Jan 14 04:47:30 but mobile dev is getting so expensive and bandwidth (to mobile) so cheap that I think it will turnover to web based very soon for everything but camera and flashlight Jan 14 04:47:59 what do you guys think? sorry for typing a lot like i said to one person i'm a piano player so it's easy for me to type fast and then that makes walls of scroll i'm sorry Jan 14 04:48:27 wasn't javascript written in 2 weeks or something? Jan 14 04:48:36 i thougth it was 2 days nesoi Jan 14 04:48:43 something like that..and it has nothing to do with java Jan 14 04:48:57 they prototyped it in lisp probably for a cheap and free parser Jan 14 04:49:05 it was called LiveScript Jan 14 04:49:08 originally Jan 14 04:49:11 rings a bell yeah Jan 14 04:49:16 then renamed for marketing porpoises Jan 14 04:49:18 who invented it again? AOL? Jan 14 04:49:21 netscape Jan 14 04:49:24 right just like BREW Jan 14 04:49:25 ah Jan 14 04:49:36 close Jan 14 04:49:46 lets hope Shingy invents a better web scripting language Jan 14 04:49:52 who's Shingy? Jan 14 04:50:01 JS is way too embedded now Jan 14 04:50:10 you all are too young to remember Jan 14 04:50:20 but the whole web/HTTP/JS is just like a 3270 terminal Jan 14 04:50:25 except now it can display jpegs Jan 14 04:50:32 would take a massive co-ordinated industry-wide effort to do anything about it Jan 14 04:50:37 total rewind going back to the 60s here with the server side stuff Jan 14 04:51:00 well google could lead the way here leeds Jan 14 04:51:19 but do you think that mobile webshites will kill native development? Jan 14 04:51:23 they tried with dart Jan 14 04:51:28 no, absolutely not Jan 14 04:51:34 most apps dont do anything without a connection like twitter..what can you do with it? Jan 14 04:51:46 and if you are a startup, you HAVE to do web, and then ios and android Jan 14 04:51:47 it's nothing like 3270. It's more like VT100 Jan 14 04:51:53 and it would take google and microsoft, at least, working together at an unprecedented level of co-operation Jan 14 04:51:57 no it is just like a 3270 and NOT like a vt100 Jan 14 04:52:05 do you know the difference nesoi? Jan 14 04:52:16 also, you absolutely don't have to do web if you're a startup Jan 14 04:52:17 a web form is like a 3270 and javascript is SORT of like a vt100 Jan 14 04:52:24 huh Jan 14 04:52:26 you mean in that there's local processing Jan 14 04:52:31 javascript not remotely like vt100... Jan 14 04:52:34 and each keypress doesn't go to the host Jan 14 04:52:38 ok in that case maybe Jan 14 04:52:38 :") Jan 14 04:52:44 sure you do leeds else how do the desktop people get to it? Jan 14 04:53:02 right nesoi 3270 is page at a time (just like HTTP) and Vt100 is character at a time (just like AJAX) Jan 14 04:53:03 HevvyMetal: what desktop people? who cares about them? everyone with money has a smartphone Jan 14 04:53:07 you got it :) Jan 14 04:53:17 but they still log in leeds to show their pretty graphs and print shit and all that Jan 14 04:53:18 what the fuck? VT100 is just like AJAX? enough... Jan 14 04:53:28 yeah, you guys are all smoking crack Jan 14 04:53:33 heh Jan 14 04:53:36 no I said AJAX is more similar in that it interrupts based on keystroke (or can) Jan 14 04:53:43 vt100 is 100% dumb terminal, minus basic cursor manipulation Jan 14 04:53:47 whereas typical HTTP is page at a time/form at a time Jan 14 04:53:59 but it sends to the server every keystroke pfn Jan 14 04:54:01 * g00s sighs Jan 14 04:54:10 http sends the whole form at a time like 3270 Jan 14 04:54:13 I agree with HevvyMetal Jan 14 04:54:16 :) Jan 14 04:54:22 good :) cuz I'm right Jan 14 04:54:30 perry is lucky to be young enough to not know those days Jan 14 04:54:33 i'm an old fart Jan 14 04:54:40 i mean pfn Jan 14 04:55:09 HevvyMetal: I once wrote a text editor for a VT100 Jan 14 04:55:13 3270 are still used daily around the world Jan 14 04:55:33 using "scrolling regions" Jan 14 05:02:33 HevvyMetal: you can also compare it to a telegraph then ;) Jan 14 05:06:00 I wonder why SharedPreferences doesn't return a Collections.unmodifiableSet (rather than shoving "Note that you must not modify the set instance returned by this call" into the Javadoc). Jan 14 05:06:18 SharedPreferences.getStringSet* Jan 14 05:08:56 21:01 well a telegraph is more like a vt100 Jan 14 05:08:59 herr Jan 14 05:09:12 shmooz a telegraph is more like a vt100 Jan 14 05:09:21 it's character at a time (or actually bit at a time but w/e) Jan 14 05:09:32 a 3270/webform is form/page at a time Jan 14 05:09:54 eg, on a 3270, when you edit (just like a webbrowser) the textfields, NOTHING is sent to the server until you hit send and then all of it is (just like HTTP) Jan 14 05:10:20 whereas, with JS, if you want, say, autocompletion, there is a server side round trip just like echoing the character back on a full duplex VT100 (emacs, VIM, etc) Jan 14 05:10:38 and...the big difference between the 3270 and the web is... Jan 14 05:10:47 in the 3270 days just ibm made them and they were all compatible Jan 14 05:11:09 in the web days, there are N vendors and they are all subtley diffent :) (chrome, ie, safari, and the mobiel variants) Jan 14 05:11:13 yadda Jan 14 05:12:50 Does anybody know of a good resource for putting ads on an android game that uses the NDK and libSDL? I'm not very familiar with java. Jan 14 05:14:25 what's libSDL thefryscorer ? Jan 14 05:15:22 bankai_ http://digg.com/video/today-in-happy-news-a-dog-that-can-ride-the-bus-all-by-herself Jan 14 05:15:41 Would it be sensible to create my own SharedPreferences.edit.putStringList method (which simply adds Strings one at a time)? I don't like how the only alternative is putStringSet, which of course loses my ordering. Jan 14 05:15:51 Editor* Jan 14 05:15:55 HevvyMetal: A C/C++ library for stuff like drawing images to the screen, getting keyboard/joystick inputs, timers. It's used for game development. Jan 14 05:16:03 why does the ordering matter TacticalJoke ? Jan 14 05:16:26 uhh hrrm well the ad getting needs a lot of background tasking and internetz stuff Jan 14 05:16:33 "Sony is reportedly open to the idea of selling off their mobile business" .. d'oh ! Jan 14 05:16:36 it probably can be done in the NDK if you want to deal with it Jan 14 05:16:48 it'd be maybe easier if you could wrap your NDK ith some java for that Jan 14 05:17:02 yeah I have a vintage vaio now g00s Jan 14 05:17:05 they don't make them anymore! Jan 14 05:17:09 sony is fucking dead meat Jan 14 05:17:17 but they are still hiring android devs in san diego Jan 14 05:17:21 for another week or two Jan 14 05:17:27 before they sell off xperia lulz Jan 14 05:17:30 TacticalJoke: sounds like you're approaching the line where you should be using sqlite rather than shared prefs Jan 14 05:17:33 g00s: that's pretty awesome (the dog video) Jan 14 05:17:35 put a fork in sony it's over Jan 14 05:18:20 which is a shame really but now all they do is sell parts to other vendors Jan 14 05:18:34 Hmm. I'm storing the user's subscribed subreddits (returned from the server) right now. Jan 14 05:18:43 they don't really sell finished product anymore but they sell the imaging chip and screens to apple or whatever Jan 14 05:18:58 right, that's exactly the sort of thing you shouldn't be storing in shared prefs Jan 14 05:19:22 what shouldn't be stored leeds? Jan 14 05:19:41 an arbitrary-length list of user data Jan 14 05:19:55 uh didnt see that? Jan 14 05:20:24 HevvyMetal: see, I wasn't talking to you at the time Jan 14 05:20:50 Is there any reason that's bad? I would've thought SharedPreferences would be fine for that (since, as far as I know, it's only an XML file in /data/data/). Jan 14 05:20:58 well i get that leeds but i didnt see what you were referring to either Jan 14 05:21:23 but if it's a TJ question it's all yours Jan 14 05:21:30 * HevvyMetal bows Jan 14 05:21:59 TacticalJoke: well... you just complained that it doesn't have ordered storage - which is the sort of thing a database is good at Jan 14 05:22:38 * HevvyMetal yawns Jan 14 05:22:49 i just hate it when people can't spell grammer correctly Jan 14 05:22:53 what were they thinking? Jan 14 05:22:56 * HevvyMetal goes back to sleep Jan 14 05:34:18 gradle-plugin 1.0.1 Jan 14 05:36:59 hi Jan 14 05:47:19 hi Agamemnus Jan 14 05:47:28 have you been shaking your clients? Jan 14 05:47:38 i had a nother business idea for Agamemnus Jan 14 05:47:47 when yer reddy 2pay Jan 14 05:47:50 * HevvyMetal shakes Agamemnus Jan 14 05:47:57 * HevvyMetal shakes harder Jan 14 06:10:07 You should have stirred ... Jan 14 06:15:06 "Google Throws Microsoft Under Bus, Then Won't Patch Android Flaw" Jan 14 06:15:26 haha, dont throw rocks when you've got a glass house :) Jan 14 06:23:51 As far as I can see, Resources.getStringArray hits the disk for every read. Is that right? Jan 14 06:24:05 If so, could that potentially need to go on a background thread. Jan 14 06:24:45 what flaw g00s? Jan 14 06:24:51 * HevvyMetal shakes JakeWharton and then stirs Jan 14 06:25:03 link g00s? Jan 14 06:25:37 GTFO Jan 14 06:26:57 :) Jan 14 06:28:47 hey JakeWharton chk ur pm rare but hey 1 time ok Jan 14 06:29:46 JakeWharton: Was that to me? Jan 14 06:30:16 I think so TJ Jan 14 06:30:53 so are you an indie TacticalJoke ? here in the states? let's be pals Jan 14 06:31:35 you seem like you have some chops sometimes so that's great Jan 14 06:31:42 HevvyMetal here's a link http://i.imgur.com/QMmTXL9.jpg Jan 14 06:32:08 err Jan 14 06:32:26 "Google Throws Microsoft Under Bus, Then Won't Patch Android Flaw" Jan 14 06:32:35 oh http://www.neowin.net/news/after-throwing-microsoft-under-the-bus-google-wont-patch-flaw-affecting-nearly-1bn-users Jan 14 06:32:43 ah Jan 14 06:33:23 yeah all these buffer ovreflow things never made that much sense to me Jan 14 06:33:33 maybe i'm a n00b and probably am in that area Jan 14 06:33:47 but when i started out, say, PDP-11, had seperate I and D space Jan 14 06:33:50 and so do intels Jan 14 06:34:15 so if the data (buffer) overruns, how is it interpreted as an Instruction (I) space (CS on Intel) and get executed? Jan 14 06:34:18 any haxxerz here? Jan 14 06:34:48 I'm deploying the same code on a N5 and an S5, on the S5 my breakpoint in a thread just doesn't trigger, while in the N5 it does, !? Jan 14 06:34:50 somehow they would have to make the CPU pointer jump to the address in the D space Jan 14 06:34:56 g00s as pfn i think said they did patch it its called 4.4 Jan 14 06:35:08 If it was to me, what a rude and pointless comment. Jan 14 06:35:14 lasserix you're funny :) Jan 14 06:35:29 darken if you are using thread pool it may not if the s5 doesn't have enough cores to allocate for the thread Jan 14 06:35:42 lasserix, the code is being executed though Jan 14 06:35:52 it's not triggering the breakpoint Jan 14 06:36:21 If it was to me, what a rude and pointless comment. Jan 14 06:36:30 a breakpoint on the UI thread triggers, just not on my worker thread Jan 14 06:38:08 My experience with using breakpoints in Eclipse suggests that it can be very hit-or-miss. Personally, I tend to just use Log.i or whatever for debugging. Jan 14 06:38:29 That can't be the solution though, D: Jan 14 06:39:00 a hit or miss breakpoint means your code hit or missed the breakpoint... Jan 14 06:40:18 breakpoints work for me Jan 14 06:40:25 mmaybe your code is hit and miss Jan 14 06:40:40 why don't you try AS instead maybe that will solve your problem TacticalJoke ? Jan 14 06:42:03 I'm a 100% certain my code is being executed Jan 14 06:42:16 restarting computer brb Jan 14 06:43:30 they should call that the college breakpoint deebo Jan 14 06:43:34 "well...whenever" Jan 14 06:43:42 how does that work with multithreading? Jan 14 06:44:52 I can't figure out what Resource.getStringArray (and so on) are doing because the key stuff is in native code. :/ Jan 14 06:45:20 Wait, maybe I can. Jan 14 06:46:49 dark can you post the code snippet with the breakpoint? Jan 14 06:47:38 lasserix: Do you have any idea how stuff like Resources.getStringArray work? Jan 14 06:49:17 lasserix, it's quite complicated with threading, a simple snippet won't do you any good, i've set 10 breakpoints just for kicks, it's not a single line issue Jan 14 06:50:19 darken the breakpoints will work, if it doens't it probably means that code is not executing Jan 14 06:50:20 i think something else is fucked up though, because now none of my devices show in ADB, i think the Samsung USB driver is at fault Jan 14 06:50:25 can you put the breakpoint on the log message? Jan 14 06:50:33 are you adb is connected Jan 14 06:50:39 TacticalJoke: nah sorry Jan 14 06:53:14 are you the guy using AIDE TacticalJoke or was that someone else? Jan 14 06:53:25 Not sure how to proceed. In my app right now, if the user isn't logged in then the list of default subreddits is read with Resources.getStringArray. If the user is logged in, their list of subreddits will be read from disk. The thing is, if I'm reading from disk (either via a database or a flat file) then I think I will have to do the read on a background thread. Jan 14 06:53:42 shouldn't they be log ed in? Jan 14 06:53:51 But if that's true then I wonder whether I'd also potentially need to use a background thread for Resources.getStringArray. (In both cases, the array size is gonna be about the same.) Jan 14 06:53:54 would it be sub-reddit? Jan 14 06:53:58 or sub reddit? Jan 14 06:54:23 subreddit is not grammatically correct Jan 14 06:54:50 So one of the following is true: (1) I need to use a background thread in both cases. (2) I don't need one in either case. (3) My assumptions of how Resources.getStringArray works are wrong. Jan 14 06:56:02 4 all of the above? Jan 14 06:57:18 i mean TacticalJoke i'm sure ur a nice guy but this isn't #spoonfeed Jan 14 06:57:41 i ask questions, too, but it isn't "oh which url should I browse too" Jan 14 06:57:51 TacticalJoke, it definitely isn't bad to put I/O operations in a BG thread Jan 14 06:58:41 Yeah. But I don't see anybody on SO talking about calling Resources.getStringArray in a background thread. Hmm. Jan 14 06:59:30 what speaks against doing it anyways? you said you have two ways of loading the list, so the architecture for BG loading exists in any case Jan 14 07:00:46 #nostudents Jan 14 07:00:50 #nohomework Jan 14 07:00:53 Yeah, it would be easy to do. I just like to know exactly what I'm doing, though. :) Could be, for example, that Resources.getStringArray uses a system wherein only the first read hits the disk and even that read is probably very fast because of the format. (Or I could be totally off-base.) Jan 14 07:01:34 well then look at the code it's somewhere online, even native code Jan 14 07:01:46 ./reddit/project/for/school Jan 14 07:01:47 Right. Looking at it. Dusting off my C++ memories. :) Jan 14 07:01:59 TacticalJoke you could store the list of subreddits on disk (the default) in the same format as from-reddit (as json). then you just read from network or disk, same parser. same bg threading, etc Jan 14 07:02:01 ./reddit/project/for/school?myprof_askedme Jan 14 07:02:23 will you just admit this is a homework project TacticalJoke ? please? Jan 14 07:02:34 i'd rather hear how you need it to feed your starving family Jan 14 07:02:57 * HevvyMetal stretches Jan 14 07:03:05 Yeah, I guess. Though one thing that's nice about using arrays.xml is that I can update that manually (unfortunately that's the only way with reddit -- they don't actualy have an API method for "get the list of default subreddits"). Jan 14 07:03:24 So I will actually have to manually update this list. ;| Jan 14 07:08:15 you can set up a paypal donation site if you want TacticalJoke Jan 14 07:08:47 * HevvyMetal sends TacticalJoke 32 lira Jan 14 07:09:52 ooh. can i dump my deutschmarks there? Jan 14 07:10:44 absolutely Jan 14 07:22:22 lasserix, the log is being printed, but the BP is not triggering Jan 14 07:38:13 Well, damn, StrictMode doesn't seem to work. Lets me do IO on the main thread without any error. Jan 14 07:41:16 Oh, it's a known bug (surprise, surprise) that it doesn't work if called from Application.onCreate. Jan 14 07:45:10 Okay, this is interesting. StrictMode doesn't complain about Resources.getStringArray (but does complain about SharedPreferences.getStringSet). Jan 14 07:45:10 So maybe Resources does something cleverer than just "read from the disk". Jan 14 07:48:37 DOes anyone know what the top/bottom of a view in a scrollview that is not currently visible will return? Jan 14 07:48:48 does it return something greater than the height of container? Jan 14 07:48:57 darken: sounds like adb is not connected Jan 14 07:49:10 cmd line adb kill-server / resetart-sert Jan 14 07:49:11 lasserix, it is, breakpoints on the UI thread, trigger Jan 14 07:49:18 idk Jan 14 07:49:31 I'm trying to create a custom autocompletecursoradapter. I have a dbadapter class that i've used which contains a private sub class called dbopenhelper. Inside the dbopenhelper are static constants for each of the tables' fields. Those constants are private as per recommendations of a youtube video (also why there is an adapter for the dbopenhelper). My question is: my custom autocompletecursoradapter needs access to the field names for bindView Jan 14 07:49:31 (). Should I not make the field names public? Jan 14 07:49:36 it doesn't trigger for background breakpoints in the S5, but does on the N5 Jan 14 07:55:32 Ok, i'll make them public. I can't think of a reason why that would be dangerous for me. They're constants after all. Jan 14 07:58:07 This is weird, though. I've cleared my SharedPreference files completely, and StrictMode reports an 87 ms delay on trying to read a String from there. Maybe it's inaccurate because of exceptions and stuff, but that's a long time. Jan 14 08:00:27 TacticalJoke: prefs have commit and apply or something Jan 14 08:00:32 one is in memory the other disk Jan 14 08:00:41 meaning that it could have a pending write or whatever Jan 14 08:00:43 TacticalJoke, don't prematurely obsess over something that isn't an issue Jan 14 08:00:46 which it has to schedule and then etc Jan 14 08:00:46 hi! running my fullscreen game on Lollipop I get notifications pop up at the top obscuring the screen a fair bit, is there any way to disable that? Jan 14 08:03:07 Hi all, if i go to another fragment and back to the previous fragment with popbackstack, will the onCreate method from the previous fragment fired again ? Jan 14 08:06:08 pretty sure it will call onResume only Jan 14 08:06:26 unless it was destroyed by android Jan 14 08:06:54 So , if i want to request from my API, then i need to do the request in the onCreate method Jan 14 08:06:58 http://developer.android.com/images/fragment_lifecycle.png Jan 14 08:07:29 * hesperaux is missing something Jan 14 08:07:30 wow I just heard on security news that WebView is very vulnerable below 4.4 and google is saying they won't do anything about it Jan 14 08:07:50 and I guess that's normal considering but Jan 14 08:08:02 that's a lot of sitting ducks Jan 14 08:08:23 shmooz: Do you have a link? Jan 14 08:08:42 TacticalJoke: I'm listening to audio but I'll show you which show , one sec Jan 14 08:09:19 here http://twit.tv/show/security-now/490 Jan 14 08:09:38 Thanks. Jan 14 08:09:44 there are probably links from the show notes Jan 14 08:10:15 Hope I won't have to provide an "Are you sure you want to open this link?" thing in my app. lol Jan 14 08:10:44 TacticalJoke: no, that site is very clean Jan 14 08:11:38 so that's 61% of android users using below 4.4, and google is inviting the public to patch it saying since it's open source, you fing the vulnerabilities, and you patch them, we will merge them Jan 14 08:11:58 s/fing/find Jan 14 08:12:01 xD guess they are pissed off ever since heartbleed happened Jan 14 08:13:36 TacticalJoke: there's ton more shows on that site that might interest you, like Coding 101, or All About Android, or Know How Jan 14 08:13:41 I feel like a laugh track should play when Google makes somse of the decisions it makes. Jan 14 08:13:42 some* Jan 14 08:14:03 Cool. Haven't been there before. Jan 14 08:15:06 fLm: Please ask in the room. Jan 14 08:15:35 Alright Jan 14 08:15:50 Do someone ever worked with Volley ? Jan 14 08:15:55 Do you guys use a randomly generated password for your keystores? Jan 14 08:21:06 fLm: you still trying to find out why your progress dialog sucks? Jan 14 08:21:20 thepoosh : nope, that's fixed! Jan 14 08:21:21 AndreYonadam: just choose a good one and never forget it Jan 14 08:21:27 what's the current issue? Jan 14 08:21:51 fLm: Just ask the question, for the sake of goodness. Jan 14 08:21:59 O hai, thepoosh. Jan 14 08:22:07 TacticalJoke: YAY!!! Jan 14 08:22:16 I was wondering if it should be strong. Like randomly generated. Or if it is something that you can remember. What can happen if someone found it out. Jan 14 08:22:29 yes it should be very strong Jan 14 08:22:32 thepoosh: well, i had to instantiate the progress dialog before adding the request to the queue Jan 14 08:22:43 mmmkay Jan 14 08:22:48 TacticalJoke: reddit? Jan 14 08:22:57 wow, the rxjava docs got a huge facelift Jan 14 08:23:09 AndreYonadam: you should hash it at least Jan 14 08:23:19 lasserix: For real? Jan 14 08:23:24 g00s: are they usable now? Jan 14 08:23:26 well Jan 14 08:23:27 reddit indeed. Jan 14 08:23:32 i twont be human readable at least Jan 14 08:23:46 lol Jan 14 08:23:54 I would have a 32 chars at least if possible with more than one language Jan 14 08:24:11 lol Jan 14 08:24:16 AndreYonadam: http://preshing.com/20110811/xkcd-password-generator/ Jan 14 08:24:17 here Jan 14 08:24:26 If you are using the Volley networking library, which is the best lifecycle method in a fragment to do the request once ? i guess the onCreate method ? Jan 14 08:24:53 fLm: you need to put requests in the wueue when you need to Jan 14 08:24:57 what's volley? Jan 14 08:25:08 don't let JakeWharton hear you said volley flm Jan 14 08:25:13 we don't talk about volley here Jan 14 08:25:16 just okhttp Jan 14 08:25:33 Anyone know good articles on MVC as it relates to Android API's for UI's and Activity/fragment? Jan 14 08:25:37 okhttp and volley don't have much to do with each other Jan 14 08:25:53 okhttp rules and volley droolz g00s Jan 14 08:25:58 i use volley because it also carry a nice caching mechanism! Jan 14 08:25:59 ugh Jan 14 08:26:03 are you a .Net programmer knapper_tech Jan 14 08:26:05 ? Jan 14 08:26:09 That's a pretty cool password generator. Jan 14 08:26:38 I got "exiting until fight person". Jan 14 08:26:39 But for JSON requests it works well! Jan 14 08:26:41 exciting* Jan 14 08:28:08 HevvyMetal, nope, but I would enjoy perspective information describing the relationship between Android UI programming and MVC* approaches to organization Jan 14 08:29:18 that's an easy question knapper_tech : the answer is 0 or pretty close to zero Jan 14 08:29:18 thepoosh: I'm currently adjusting my mind to the fact that I'm probably gonna have to use SQLite. Jan 14 08:29:24 Then again, I kinda expected that at some point. Jan 14 08:29:29 sqlite is not that bad Jan 14 08:29:37 there are a few shitty things (many) Jan 14 08:29:39 where did you come from that you want such high brow elegance such as MVC knapper_tech ? swing? C#? Jan 14 08:29:43 but it's not very bad Jan 14 08:29:56 I could potentially use flat files (since I don't need durability). Jan 14 08:30:03 depends on the sisze of your data ? Jan 14 08:30:04 And it is actually easy to have atomicity. Jan 14 08:30:11 size* Jan 14 08:30:20 Yeah, maybe, fLm. Jan 14 08:30:26 TacticalJoke: the worst thing I saw out there, was bad caching for images Jan 14 08:30:29 please fix that! Jan 14 08:30:43 Bad in what way? Jan 14 08:30:57 no caching Jan 14 08:31:03 Ah. Jan 14 08:31:04 bad webviewa Jan 14 08:31:07 noreddit Jan 14 08:31:07 webviews Jan 14 08:31:07 Oh, gawd. Jan 14 08:31:14 reddit/4chan Jan 14 08:31:16 I'm gonna avoid WebView as much as possible. Jan 14 08:31:26 HevvyMetal: 4chan scares me Jan 14 08:31:28 you're all about the webview TacticalJoke Jan 14 08:31:39 they go together the poosh and i avoid both Jan 14 08:31:50 Does someone also have tips about internet connection handling ? Jan 14 08:31:51 all about the base Jan 14 08:31:57 NO TREBELE Jan 14 08:31:59 reddit/4chan/tentacle Jan 14 08:32:01 thepoosh: I'm not sure whether to implement imgur's API. Then I can easily do fancy stuff such as showing albums in a GridView or whatever. Jan 14 08:32:04 in combination with user feedback ? Jan 14 08:32:05 fLm: use a library Jan 14 08:32:13 Only thing is, the tides could turn and everyone could start to hate imgur or something. Jan 14 08:32:16 nothing more scary than 14 year olds with pictures of dead people and scripts thepoosh? =) Jan 14 08:32:18 thepoosh: like ? Jan 14 08:32:19 did you see this thepoosh https://www.youtube.com/watch?v=RV5WqRnFejI Jan 14 08:32:34 asfdd: :D Jan 14 08:32:37 all about that base no rebels Jan 14 08:33:07 i need to get that 3d bg to paste hotties into on the greenscreen Jan 14 08:33:44 Regarding WebView, I feel that it has its place -- but it's more of a "lesser evil" kinda thing. Jan 14 08:34:13 The stuff it pumps out to LogCat is scary. Jan 14 08:34:36 isn't oauth webview based? how does it work against various browser/apps? im clueless on oauth Jan 14 08:35:02 sometiem i'll have to try fb logins more Jan 14 08:36:18 Whoa. Leo Laporte is on TWiT.TV. Jan 14 08:36:32 I remember that American show. Jan 14 08:36:37 Oh, he's the founder. Jan 14 08:39:19 HevvyMetal, My biggest preference is really just to separate my view and controller logic. I like for them to communicate via events. Views call controller API's to let them know what the user just did, but views are kind of dumb in my preferred style. Jan 14 08:39:41 think i need to tape COMMIT OFTEN COMMIT EARLY to my moniters Jan 14 08:39:57 Did you lose work? Jan 14 08:40:24 What I do is commit and amend like crazy. Once I'm done amending I rebase (or fast-forward merge). Jan 14 08:40:46 So I guess in this case it'd be "Rebase early; rebase often". :D Jan 14 08:50:29 TacticalJoke: yeah Leo is pretty famous, I used to see him on TV in the 90's Jan 14 08:50:45 or early 2000's Jan 14 08:52:12 knapper_tech, that's why people use either Rx or some kind of event bus (EventBus/Otto) :) Jan 14 08:53:00 sure knapper_tech me too and when you talk about communicate via events that loose coupling and all that are you using a binding framework like robobind or a notify framework like rxjava? are you a .NET person? Jan 14 08:54:57 * HevvyMetal shakes shmooz Jan 14 08:55:04 you need to buy sum jemz Jan 14 08:55:16 get ye sum jemz Jan 14 08:55:22 * HevvyMetal shakes harder Jan 14 08:56:03 you can get a chest of jemz for only $99.99 Jan 14 08:56:10 back baby! Jan 14 08:56:14 team sync Jan 14 08:56:18 it's 20% off our rack rate Jan 14 09:02:00 HevvyMetal: ??? Jan 14 09:02:09 @ Jan 14 09:02:09 [== must buy jems! Jan 14 09:02:09 ^ Jan 14 09:02:33 yes pleez Jan 14 09:02:54 if you buy a chest of jemz you can get to the next lvl Jan 14 09:03:03 and tweet about it on fb Jan 14 09:03:26 Hi guys. Using Device Owner and Screen Pinning feature of Lollipop is it possible to lock a specific app to a device? How people do normally if they want a device to only just show one specific app. Like when the user press the home button, the same app will come out or nothing will happen. p/s: this is for internal use device Jan 14 09:03:34 ok where do I receive my $99.99 ? Jan 14 09:03:49 you don't shmooz Jan 14 09:03:54 you pay me $99.99 Jan 14 09:03:59 pffft Jan 14 09:04:00 and goog gives me $66.66 Jan 14 09:04:06 and they keep $33.33 Jan 14 09:04:10 that's fair right? Jan 14 09:04:10 no you pay me $99.99 ! Jan 14 09:04:14 no Jan 14 09:04:26 what duz your app do for $99.99? Jan 14 09:04:42 no and then I can look at your jems Jan 14 09:04:51 i dont have jemz Jan 14 09:04:57 you pay me to look at the jems Jan 14 09:04:59 just mithril Jan 14 09:05:13 you have to pay xtra for mithril Jan 14 09:05:31 but if you act now, i'll give you this frodo avatar for use for 2 days only Jan 14 09:05:41 it's your choice pal Jan 14 09:06:03 if you don't want frodo -- fine Jan 14 09:07:57 TacticalJoke: i did a bunch of stuff, decided it wasn't okay, did a bunch more, now reverting, but did a bunch of intermediate stuff without commiting properly ;p Jan 14 09:07:59 ;/ Jan 14 09:08:03 :/ Jan 14 09:08:21 what kidn of stuff lasserix ? Jan 14 09:08:49 testing out on google ware? Jan 14 09:09:42 fairuz: I think it's meant to be much more casual than that - it's for handing your phone to someone and stopping them going through your emails... it's not a general-purpose lock-down Jan 14 09:10:03 Leeds: it's been forever! Jan 14 09:10:05 sup? Jan 14 09:11:06 We got our first look at Android 3.0 Honeycomb at CES in January 2011. Later that month, Google released the SDK preview, and we really got into the OS. Jan 14 09:11:12 was it really that long ago? Jan 14 09:11:34 HevvyMetal: we don't mention honeycomb Jan 14 09:11:50 i do Jan 14 09:11:55 thats when i got into android Jan 14 09:12:03 TacticalJoke: looks like they talk about that vulnerability here too http://twit.tv/show/all-about-android/196 , the new All About Android that just got released today Jan 14 09:12:05 not some namby pamba 2" cell phone Jan 14 09:12:07 thepoosh: starting to get excited/worried about my parents coming to visit me for the first time since I moved to Hong Kong almost 10 years ago Jan 14 09:12:33 Leeds: I just read this on their site. "..This could be used, for example, if you are developing an education app to support high stakes assessment requirements on Android, or a single-purpose or kiosk application. .." Jan 14 09:12:39 Looks like what I wanted though Jan 14 09:12:55 a single-purpose device Jan 14 09:12:56 fairuz: maybe I'm wrong then... first tiem for everything! Jan 14 09:13:05 Leeds: they're from here? Jan 14 09:13:18 Leeds: I'm discovering too. this is new neat stuff Jan 14 09:13:23 what does the vulnerability really allow tho? i havent seen any details leeds fairuz Jan 14 09:13:29 they jsut say "there is a vuln" Jan 14 09:13:32 thepoosh: they're from the UK - as I am... Jan 14 09:13:36 they dont say what it does Jan 14 09:13:42 idk, you said you lived in TLV Jan 14 09:13:47 heh. HC was the windows ME of android. Jan 14 09:14:14 GB was clearly windows 98 Jan 14 09:14:21 thepoosh: no... never lived there... spent a year living in Israel 20 years ago, but that was in Jerusalem and the Galil Jan 14 09:14:22 HevvyMetal: I don't get what you mean. What is this vulnerability? Jan 14 09:14:33 whatever! Jan 14 09:14:36 the android hack Jan 14 09:15:06 http://www.extremetech.com/mobile/197346-google-throws-nearly-a-billion-android-users-under-the-bus-refuses-to-patch-os-vulnerability Jan 14 09:15:09 that one fairuz Jan 14 09:15:16 but they never say what exactly is vulnerable Jan 14 09:15:25 for these 1 billionz users Jan 14 09:15:27 from what I understand, Google have officially announced that 1 billion Android users will be hacked by the end of the week, because they didn't buy a nexus phone Jan 14 09:15:48 well there we go it' sjust an i6+ for me then Jan 14 09:15:56 enogh with google Jan 14 09:16:02 'You should have bought a squirrel!!!' Jan 14 09:16:14 they weren't made in china by slaves Jan 14 09:16:30 if it's not slave labor it's just not a good value Jan 14 09:16:36 i want gorilla glass, made by prisoners Jan 14 09:17:12 or to put it another way, there's a vulnerability in webviews pre-kitkit which could potentially be exploited, but since webview was still coupled to the OS pre-kitkat, it would be up to vendors/carriers to roll out patches anyway Jan 14 09:17:25 and exploited to do what exactly leeds? Jan 14 09:17:28 noone has said what Jan 14 09:17:32 does it leak passwords? Jan 14 09:17:38 what is the issue really? Jan 14 09:17:41 Leeds: that's 61% of all android users currently Jan 14 09:17:52 it just seems like free advertising for google ala the kim jong interview sacre Jan 14 09:17:57 exploits generally means they can install some bots in there Jan 14 09:17:57 the point is that google can't push a patch Jan 14 09:18:01 so what odes it do? Jan 14 09:18:10 exploit can mean anything Jan 14 09:18:22 there's your answer then Jan 14 09:18:35 and google is paralyzed because their supply chain can't push out changes (verizon) Jan 14 09:18:42 yes and my answer so far is FUD fairuz Jan 14 09:18:53 if it posts fb pics of my harry nutz thats a problem Jan 14 09:19:15 if it just exploits the fact that, it can find my volume level, who the fck cares? Jan 14 09:19:43 so noone has said what this billion hack does and if google really cant fix it it just makes msft seems responsive almost Jan 14 09:19:54 I don't know the details yet, but I assume it ends up with the attacker being able to take full control Jan 14 09:20:05 come on full control is a real stretch Jan 14 09:20:14 most pc exploits dont give full control == root kit Jan 14 09:20:17 let's get hysetrical ok Jan 14 09:20:18 noone is interested in what the exploit is Jan 14 09:20:18 HevvyMetal: that's how it always is Jan 14 09:20:23 yes I am leeds Jan 14 09:20:25 everyone is interested in bashing google for not fixing it Jan 14 09:20:30 HevvyMetal: no you're not Jan 14 09:20:32 if the exploit does nothing than fuel sales of the daily mirror fuck them Jan 14 09:20:43 if it's a legitimate concern let's have some details Jan 14 09:20:49 i'm not interested in scaremongering Jan 14 09:20:54 yeah, maybe this is apple generated news ;) Jan 14 09:20:57 next week it will be 2 billion users Jan 14 09:21:03 probably shmooz Jan 14 09:21:03 that's what everyone who's writing about it is interested in Jan 14 09:21:06 my money is on BBY Jan 14 09:21:13 Mavrik, I'm learning Rx. How does this relate to the Activities vs Fragments conversation? Jan 14 09:21:17 show me a fact Jan 14 09:21:20 it gives up passwords Jan 14 09:21:22 here's a hint: never put your money on BBY Jan 14 09:21:36 I'm not sure where I would place my controllers to get their lifecycles to line up correctly with use Jan 14 09:21:38 its all on SAUD Jan 14 09:21:49 SRBA Jan 14 09:21:58 or harrods Jan 14 09:22:02 one of them anyway Jan 14 09:22:34 but it is bad they could do a sextortion racket and target tmobile customers Jan 14 09:22:47 or virgin mobile Jan 14 09:23:02 meh, US carrier crap Jan 14 09:23:13 excuse me Jan 14 09:23:17 Virgin is a UK carrier Jan 14 09:23:31 excuse me Jan 14 09:23:46 both Virgin and T-Mobile exist as brands in the US as well Jan 14 09:23:55 barely Jan 14 09:24:07 and they are both used by teenagers Jan 14 09:24:14 like i said it could be a sextortion racket Jan 14 09:24:23 only time will tell Jan 14 09:24:48 no, it probably won't Jan 14 09:24:49 * Leeds out Jan 14 09:24:53 lord knows they won't find any hot gals on Verizon or AT&T Jan 14 09:25:04 hi Jan 14 09:25:23 on samsung s4mini and 4.4.2 kitkat, SIM toolkit does not work Jan 14 09:25:27 why is it so? Jan 14 09:26:03 https://www.youtube.com/watch?v=LIfxV7uNZXQ Jan 14 09:26:09 chk that link elektrinis Jan 14 09:26:50 HevvyMetal: don't be a dick Jan 14 09:27:04 what? JSM rools leeds Jan 14 09:30:05 Leeds: http://james-iry.blogspot.co.il/2009/05/brief-incomplete-and-mostly-wrong.html Jan 14 09:30:08 a good read Jan 14 09:35:31 Hey, Napalm. Jan 14 09:35:42 You are up at a sane hour. lol Jan 14 09:36:10 (As am I.) Jan 14 09:53:55 Hello. How can I set 3 or 4 images in one ImageView? or similar implementation of Hangout App? Jan 14 09:57:13 lnoskhen: you need to take 4 bitmaps and draw them in an ImageView Jan 14 09:57:27 usually it's done with a custom drawable or a custome imageview Jan 14 09:57:30 *custom Jan 14 10:15:21 thepoosh: Thanks for the idea. I'll check it out :) Jan 14 10:16:48 it looks like the S5 just ignores non main thread breakpoints wtf Jan 14 10:34:24 hello Jan 14 10:39:07 hi, I'm trying to import the StickyGridHeaders project into Android Studio, so I did File > Import... clicked next on all the dialogs, but when I try to run it I get "Error:(7, -1) android-apt-compiler: [Example] [...]\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat'." Jan 14 10:39:50 this seems to be because I have to add the support_v7 library to the project. How can I do this? Jan 14 10:40:51 manix_, you could add it as gradle depency Jan 14 10:42:37 darken: ok let me check Jan 14 10:42:51 manix_, https://developer.android.com/tools/support-library/setup.html Jan 14 10:43:57 you could probably include the whole library via gradle dependency instead of importing it mannually Jan 14 10:44:17 compile 'com.tonicartos:stickygridheaders-example:1.0.1' Jan 14 10:45:28 darken: I added 'compile "com.android.support:appcompat-v7:18.0.+"' to Example/build.gradle but I get the same error Jan 14 10:46:17 version 18 is probably too old, but i think you are making this more complicated than it needs to be, add the whole stickygridheaders library via depdenency statement to your project Jan 14 10:47:40 darken: I just downloaded the project from https://github.com/TonicArtos/StickyGridHeaders and imported it into Android Studio, here's the build.gradle it generated after import for the "Example" project - http://pastebin.com/raw.php?i=Nv7dDbtq Jan 14 10:47:59 see, you don't need to do that Jan 14 10:48:13 if you add the compile statement for it to your own project gradle will download and do everything for you Jan 14 10:49:01 so I don't need to Import the project into android? Jan 14 10:49:10 correct Jan 14 10:49:32 ok, so I just downloaded the project from https://github.com/TonicArtos/StickyGridHeaders , now I need to open it in Android Studio Jan 14 10:49:39 do I use Open or Import? Jan 14 10:50:06 after I extract the archive of course Jan 14 10:50:07 what do you want to do? you want to use the library in a project, or not? Jan 14 10:50:39 darken: I want to compile the Example project from the archive onto my phone Jan 14 10:51:35 the archive contains the Library (the grid-view component) and Example (example project that uses grid-view component) projects Jan 14 10:52:07 and I want to build the example from the "Example" project Jan 14 10:52:15 ah, well then you would have to import it Jan 14 10:53:35 darken: ok, so I just imported it, and when I click the Run menu button it compiles for a bit then I get the error "Error:(7, -1) android-apt-compiler: [Example] [...]\StickyGridHeaders-master\Example\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat'." Jan 14 10:53:44 I'm not certain if it works automatically, the example project is maven based and android studio would have to convert it from maven to gradle Jan 14 10:55:13 darken: it kinda seems to work to me, both projects show up in Android Studio Jan 14 10:55:37 manix_, I'm not familiar with the specifics, look here: http://sgeb.me/articles/how-to-migrate-a-simple-android-app-from-maven-to-gradle/ Jan 14 11:09:44 hey guys Jan 14 11:11:10 the docs on Executor interface says, "the interface provides way of decoupling task submissiion from the mechanics of how each task will be run" - whwat does that mean? cuz I don't understand how i is different from new Thread(runnableObject).start() :S Jan 14 11:19:22 hey guys Jan 14 11:20:05 can anyone help me with achieving an optimal (up-to-date) automated testing setup with Gradle and Android Studio? Jan 14 11:20:44 with "new Thread(runnableObject).start()", you have to create a new Thread for each task. With an executor, all you'd do is enqueue a task, "executor.submit(runnableObject)" Jan 14 11:21:52 internally, the executor could be creating a new thread each time (same behaviour as with new Thread...), or only using one thread for all runnables, or use a fixed number of threads, etc. Jan 14 11:21:54 hey guys Jan 14 11:22:02 a little new to IRC Jan 14 11:22:08 anywhere I can read up on the etiquette Jan 14 11:23:02 ca9: to show your code to us use pastebin.com or similar Jan 14 11:23:24 you can see the Executors class to see which ones are built in, or of course create your own Jan 14 11:24:22 can anyone help me understand mobile app architectures? Like in Backend as a Service, how are two mobile devices supposed to talk to each other? The server is stateless. and I'm pretty sure millions of clients dont poll a db Jan 14 11:24:36 theres seemingly no notion of a session Jan 14 11:24:51 and im not sure i understand if there is any form of server to client communication Jan 14 11:25:16 well its not a code specific problem quite yet Jan 14 11:26:10 like when i send a message to a friend on whatsapp, how does the whatsapp server know which hardware / mobile to send my message to? Jan 14 11:26:56 or snapchat for instance, how do two mobile clients have any realtime communication in a BaaS architecture? or is there some other architecture that im missing entirely? Jan 14 11:27:31 is this even the right place to ask this ><; Jan 14 11:27:33 ca9: the server would keep track of assigned id's and IP's and whatever else to identify with Jan 14 11:28:12 I'm pretty sure most clients have dynamic IPs Jan 14 11:28:25 ca9: yes but their id's are the same Jan 14 11:28:46 is that enough for the server to be able to dispatch a message to the client phone Jan 14 11:29:02 it would be a way Jan 14 11:29:19 if you are saying there is no server then every client also has to be a server Jan 14 11:29:39 as in p2p Jan 14 11:29:57 hm. Yeah, but I am looking at something more centralized Jan 14 11:29:59 like a cloud Jan 14 11:30:10 i dont think I'd want the client app to have to deal with addressing Jan 14 11:31:10 most of it is just polling, some more sophisticated than others Jan 14 11:36:55 hm im taking a look at GCM now Jan 14 11:37:16 but im stil curious how it works Jan 14 11:37:44 Anyone who knows a pdf book that can assist in application development for gingerbred only, with strict documentation on gingerbread Jan 14 11:38:06 borw3: that's a pretty specific request Jan 14 11:38:15 why does it have to be pdf ? Jan 14 11:39:44 borw3: you should google that, and you can also convert pages into pdf's with tools Jan 14 11:42:37 if i start a new activity.. will the public static variables still be available to it? Jan 14 11:44:40 Makalak: yes if it belongs to the same package afaik Jan 14 11:45:06 shmooz: i meant, the values? Jan 14 11:45:35 yes Jan 14 11:45:42 ummm.. Jan 14 11:45:46 Thanks Jan 14 11:46:04 is there a way for them to be seperate? Jan 14 11:46:17 not have it static or volatile ? Jan 14 11:46:42 have them in different scopes Jan 14 11:46:49 they have to be since they're being access from a static function Jan 14 11:57:34 anyone using Robolectric here? Jan 14 12:02:10 yes Jan 14 12:04:12 hello Jan 14 12:04:28 I'm trying implement push notification to specific device Jan 14 12:04:43 I did create a project in google console Jan 14 12:04:57 and start GCM Jan 14 12:05:28 now I want knows how could I send the message to specific device using PHP Jan 14 12:05:39 anybody could help me ? Jan 14 12:18:21 fernandopaiva: what have you tried and what do you have trouble with? Jan 14 12:21:26 appel1, I want to send notification to specific device, for example this device: 26093d6bbddd0000 Jan 14 12:21:49 fernandopaiva: ok, and what in your implementation isn't working? Jan 14 12:23:38 the notifications goes to all devices you know ? example: 26093d6bbddd0000, 33393d6bbddd0000 and others Jan 14 12:23:47 1 minute Jan 14 12:24:03 I'm trying use this PHP script: http://dexxtr.com/post/46586478992/google-cloud-messaging-gcm-for-php Jan 14 12:24:44 you know how old that script is? Jan 14 12:24:46 haha Jan 14 12:25:00 I remember seeing it 1.5 years ago Jan 14 12:25:08 Odaym, ...kkk Jan 14 12:25:12 nice ! Jan 14 12:25:51 do you have any script to do send notifications with PHP ? Jan 14 12:26:42 Hm. I don't know how to elaborate my problem. I'm using Two ViewFlippers. One is made out of xml and one programatically. I collect data from second viewFlipper. The problem is I would like to show this data at the very last flip. It allways show 0. Only if I create a button and I click on it it shows proper data. Is it possible to store data when in viewflipper and calculate it and then show it again Jan 14 12:26:43 when in viewflipper? Jan 14 12:27:39 I use viewFlipper for getting user info to analyse user's radiobutton's choices Jan 14 12:28:34 fernandopaiva: are you sure you specify the correct registration id? does the response give any clues? Jan 14 12:28:42 hi Jan 14 12:28:58 the SwipeRefreshLayout is not work with v4.21? Jan 14 12:29:07 setrefreshing Jan 14 12:29:37 hello all. Question for the experienced. Should I implement a ContentProvider/ContentResolver for my application's database access? At this time I don't expect other applications to use my data, but it looks like Google recommends using them in leiu of custom CursorAdapters (if I understood this correctly). Jan 14 12:30:35 I guess it comes down to: ContentProvider with multiple URI's or multiple custom CursorAdapters? Jan 14 12:31:25 I'm trying to accomplish multiple AutoCompleteTextViews at the moment, which is how this was brought on. Jan 14 12:32:41 hesperaux, you dont need a Provider if your only wish is to get cursors. You can use loaders for that Jan 14 12:33:09 imho theres no point in fiddling with contentproviders if you dont want to expose your data to other apps. Jan 14 12:33:10 Ah, Loaders. And a LoaderManager as well, yes? I haven't read about those much yet. I remember seeing them as the other alternative on the docs Jan 14 12:33:39 danijoo, I suppose it is possible down the line that my app could provide data to external sources. I'm not really sure at this point... Jan 14 12:34:13 hesperaux, you can still change it then :) Jan 14 12:34:15 appel1, you said registration id in Google Console ? Jan 14 12:34:48 danijoo, that's true. And besides, I probably wouldn't want to expose all the database data through the Provider to the extent that I intend to use it now, within this app Jan 14 12:35:17 the SwipeRefreshLayout is not work with v4.21? setRefreshing Jan 14 12:35:18 Are the Loaders fairly easy to use, and is there a tutorial you would recommend? Otherwise, I'll just google them. Jan 14 12:35:56 does anybody know where to file bugs you see occurring on a specific nexus device (in my case nexus 9)? I would post it on the android issue tracker but it is really not an AOSP issue, rather than a device issue (albeit a nexus device) Jan 14 12:36:01 danijoo_, i'm guessing you missed my last if you're rejoining? Jan 14 12:36:14 fernandopaiva: the registration id your client receives and usually send to your backend to let you send messages to that client. Jan 14 12:36:15 yeah. had to connect to my vpn :) Jan 14 12:36:42 hehe, ok. Here's what I just said to you, danijoo_: that's true. And besides, I probably wouldn't want to expose all the database data through the Provider to the extent that I intend to use it now, within this app. Are the Loaders fairly easy to use, and is there a tutorial you would recommend? Otherwise, I'll just google them. Jan 14 12:37:17 Loaders are the spawn of satan. Jan 14 12:37:24 Horrible API :/ Jan 14 12:37:26 D: Jan 14 12:37:28 Mavrik, id say the same for content providers :D Jan 14 12:37:45 contentprovider seemed relatively simple to me Jan 14 12:37:46 ContentProviders require bunch of boilerplate and are annoying as hell to use Jan 14 12:37:49 hesperaux, dont have a good tutorial at hand :/ Jan 14 12:37:57 Loaders are just plain evil Jan 14 12:38:05 and will cause bunch of wierd issues -_- Jan 14 12:38:11 Do either of them handle synchronicity? Jan 14 12:38:41 fLM: ? Jan 14 12:38:47 Can I just get a poll on how many of you actually test your apps with the emulator? Jan 14 12:39:02 I have tried Jan 14 12:39:08 Also, will using Loaders bypass the need for me to write a bunch of CursorAdapters? Jan 14 12:39:11 but it didn't work Jan 14 12:39:17 Which library do i need to use for network connection error handling ? Jan 14 12:39:37 hesperaux, no. loaders just return you cursors. you still have to map them to views in your adapter :) Jan 14 12:39:50 sigh Jan 14 12:39:53 what a mess Jan 14 12:40:15 it feels like i've gotten to the point where I ahve to learn three things simultaneously to test one feature Jan 14 12:40:17 appel1, you say registration id of client is a device id ? Jan 14 12:41:24 is there a best practice for having tons of different queries for your DB, and handling them elegantly in relation to providing cursors to the rest of the app? Jan 14 12:42:25 I have this DBAdapter class with a DBOpenHelper private class. The DBAdapter has methods like insertEntry(...), insertLocation(...), queryEntry(), etc. Jan 14 12:42:27 fernandopaiva: I mean the id the client gets when it calls GoogleCloudMessaging.register, http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html#register(java.lang.String...). Jan 14 12:43:35 Hi folks, I have a question about GCM (google cloud messaging). Is this the best place to ask? Jan 14 12:44:30 no but its one place Jan 14 12:44:58 I'm a little frustrated cuz I don't know how to design this. I'm new to a lot of these particular things. I don't want to end up with a unique CursorAdapter for all of my AutoCompleteTextViews, only to have to write more for various ListViews later... Jan 14 12:45:13 Is there a way to write a more generic Adapter class that I could reuse? Jan 14 12:46:04 Is the convention correct if we request from API and set it directly in the GUI ? Or do we need a ContentProvider which delivers to the adapter ? Jan 14 12:46:51 danijoo_: thanks, I'm using notification_keys to send messages to users devices. If the user uninstalls their app, that registration_id becomes invalid. When I try to send a message to a notification_key that contains only invalid registration_ids, I get an unhelpful HTML 500 error from the google api. Jan 14 12:47:06 does anyobne here actually test their apps using the emulator? Jan 14 12:47:32 fLM, not sure what you're asking... you want to get web api data, then modify the UI? If so, an AsyncTask for the GET and modify the UI in onPostExecute Jan 14 12:47:47 MartialLaw, you cant test with the emulator if you want to get finished in time because it needs 1 week to start and run :p Jan 14 12:48:21 MartialLaw, i've been using it with a HAX emulator. that works fine for me. Some things you can't though... Jan 14 12:48:32 lol i know it takes forever Jan 14 12:48:51 peter_armstrong, never used GCM but if I remember the docs correctly if should tell you about what ids where invalid so that you can delete them from your database Jan 14 12:48:53 I made a bluetooth device last year and an app to communicate with it and save its data. This had to be tested in real life for obvious reasons Jan 14 12:48:57 hesperaux, i do my api requests with Volley but after parsing my data i directly add it to my listview adapter Jan 14 12:48:59 MartialLaw, Genymotion. Jan 14 12:49:13 danijoo: yep i kno Jan 14 12:49:23 Is this the right way to do ? Jan 14 12:49:35 fLM, thats fine. Jan 14 12:49:57 fLM, i'm afraid I don't have experience with that Jan 14 12:50:09 Alright Jan 14 12:50:36 It works well, but i don't know its the right way to do by convention Jan 14 12:50:49 so danijoo, any suggestions from my question above? Jan 14 12:51:01 fLM, no need to add extra complicated stuff to something like that :) Jan 14 12:51:30 hesperaux, Im not sure if I get you right. If all of your autocompletetextviews look the same, you can use one adapter for all Jan 14 12:51:31 fLM, a rule of thumb is if you're doing long running operations in a separate thread, and UI modifications in the foreground thread, you're doing it right Jan 14 12:51:38 danijoo_, alright thanks Jan 14 12:51:53 an adapter does nothing more than matching data to views, so, if its the same views, you can reuse the adapter Jan 14 12:51:56 appel1, I have this id Jan 14 12:52:26 I send gcm.register("00000") and does return asdhflejhreah ... Jan 14 12:53:00 danijoo_, thanks for the clarification. That helps me a bit. I guess I get confused because in bindView(), I have to get a value from the cursor, but the column index of the cursor may not be the same for different autocompletes Jan 14 12:53:09 danijoo_, do you ever worked with Volley ? Jan 14 12:53:41 fLM, no im using retrofit Jan 14 12:54:09 fernandopaiva: I'm assumg you don't actually have 00000 as sender id? If you specify the registered id correctly I don't know why that message would end up going to all your registered clients. Jan 14 12:54:13 if I guarantee that the column indices in the cursor are always the same for any particular view bind (for different autocompletes), I have the problem of having to write different cursor query functions for each autocomplete instead of using the usual query functions from the rest of the app. (if that makes sense) Jan 14 12:54:22 appel1, exactly Jan 14 12:54:30 danijoo_, oh thats another library i guess ? Jan 14 12:55:02 appel1, when my Activity start, I get my GCM register id = 0000, send to gcm.register("0000") Jan 14 12:55:35 and does return a cryptography id like this: ALJHELRHELR .... Jan 14 12:56:10 fernandopaiva: you should use the project number you got from the developer console as sender id. Jan 14 12:56:25 fernandopaiva: as it states for example here: http://developer.android.com/google/gcm/gs.html Jan 14 12:56:37 the only way I can think to minimize the code for this would be to require String[] columns as an argument to the DBAdapter query methods. Jan 14 13:00:48 o/ Jan 14 13:01:49 \o Jan 14 13:03:28 does anyone here use WakefulIntentService Jan 14 13:03:59 I'm using it in place with alarms, but my intent seems to be lost when i call it... since its not passed Jan 14 13:17:10 nvm, create a new intent and load the ones recieved by the alarm into it and call wakefulintentservice Jan 14 13:19:21 I'm starting to hate developing for android :( Jan 14 13:19:40 heh Jan 14 13:19:48 lfrdw: What happened? Jan 14 13:20:10 TacticalJoke: ah well, just some threading issues... nothing out of ordinary haha Jan 14 13:20:22 threading is so great... Jan 14 13:21:14 I'm using the mainlooper with asynchttp and somehow it still freeze my ui updates Jan 14 13:22:44 plz help, want assist with getting book on creating android apps and games for gingerbread only as key used. Jan 14 13:22:46 If it's blocking your main thread it sounds like you're doing something wrong. Jan 14 13:23:20 lfrdw: What exactly are you doing? Jan 14 13:24:46 TacticalJoke: Pretty much doing a async http request using new thread and after that a simple ui update Jan 14 13:24:58 nothing fancy Jan 14 13:26:01 And you're doing something like "new Handler(Looper.getMainLooper()).post(someRunnable);"? Jan 14 13:26:04 TacticalJoke: I can see the ui function was called but the visual changes doesnt occur. Jan 14 13:26:11 yep Jan 14 13:26:29 Handler mainHandler = new Handler(getApplicationContext().getMainLooper()); Jan 14 13:26:42 inside the new thread, since AsyncHttp needs that Jan 14 13:28:23 lfrdw: So is there actual lag in the UI thread? I mean blocking stuff. Jan 14 13:28:39 For example, would scrolling a ListView at that time be laggy. Jan 14 13:28:45 Im using android studio on mac, and my app builds and deploys OK from within android studio. But when i try to build from command line, i get the following error: https://bpaste.net/show/26cd04bead0c (The error with --info --debug is here: https://bpaste.net/show/bd1ca98a4c39 ). What am i doing wrong, since i can build from android studio but not from command line? Jan 14 13:28:56 TacticalJoke: yep, I can see everything beeing called on log but some images does not change Jan 14 13:30:23 plz help, want assist with getting book on creating android apps and games for gingerbread only as key used. Jan 14 13:31:07 borw3: What does "as key used" mean? Jan 14 13:31:57 TacticalJoke: Meaning gingerbread is the main refrence to the book Jan 14 13:32:20 Why? Gingerbread is ancient now. :) Jan 14 13:32:55 TacticalJoke: Thats the phone I have, and most people in my country use that version Jan 14 13:34:20 borw3: What exactly are you hoping to make? Jan 14 13:34:41 Your query is so particular: a book about apps or games for a very specific (and ancient) version of Android. Jan 14 13:35:51 TacticalJoke: A simple tutarial on game and application development based of gingerbread. :) Jan 14 13:56:23 I find it ironic that google would ask me if i wanna use a different account for dev registration yet have my home address on display for everyone to see. Jan 14 13:59:25 i'd really like to try out various things on the command line (linux box) as i code an android app. Jan 14 13:59:33 has anyone done this - linking in the android sdk but buiding for a local target (be it linux or os x or whatever)? Jan 14 14:04:04 Hello Jan 14 14:04:12 Please, Where is the function "glMapBuffer" on android ? Jan 14 14:13:55 I have a list view, and for some reason, when one (and only one) of the views is enabled (it's a different kind than the rest), it has a darker divider line above it than all the others Jan 14 14:14:12 it's a normal divider when it's disabled Jan 14 14:14:55 Hello House Jan 14 14:14:57 can't seem to see any difference except that one of the text views in it has a color state list Jan 14 14:16:18 right, so im trying to modify ImageButton to look same whether state is pressed or selected Jan 14 14:16:22 quite a nightmare Jan 14 14:17:37 i've seen the (answered) questions on stackoverflow that mention i should define a selector xml file in res/drawable and set a drawable for state_pressed and state_selected and default to @android:drawable/btn_default Jan 14 14:17:49 Please how can i update view after user click a button Jan 14 14:18:29 now ... it doesn't work :) because btn_default obviously is not the same background as rendered when no android:background is set for the ImageButton Jan 14 14:18:31 frustrating Jan 14 14:19:28 so I start messing around with introspection and code like Drawable d = view.getBackground(); d.getClass().toString() Jan 14 14:19:33 where view is the ImageButton Jan 14 14:19:49 productive as hell innit Jan 14 14:24:02 can I get a Drawable for a particular state from StateListDrawable Jan 14 14:24:52 Question, with glMapBufferOES, the only "access" that I can use is GL_WRITE_ONLY_OES Jan 14 14:25:03 Can I try to read these datas or not ? Jan 14 14:28:24 How can i update TextView when that change in the sqlite? please Jan 14 14:29:31 danijoo_ thanks, but the GCM docs are not good, particularly when using a notification_key to send messages to a group of devices Jan 14 14:30:04 Where should I report mistakes in the google GCM documentation? Jan 14 14:32:57 Off-topic, but this is awesome (hacking the old Zelda game): http://youtu.be/FolqIgQRtl0 Jan 14 14:33:11 Figuring out locations of variables in RAM and such. Jan 14 14:39:42 peter_armstrong, issue tracker maybe Jan 14 14:56:53 I was wondering if there was a method to slide text in the actionbar similar to example2 on this page: http://www.gopiplus.com/work/2012/04/07/wp-cycle-text-announcement-wordpress-plugin/#.VLaCBs3d-pc Jan 14 14:56:57 I am working on a google glass app where the while main app is taken by an imageview but I wanted to cycle a few things in the actionbar. I am looking for the animation part of it (if that is possible) Jan 14 15:01:55 Pinkamena_D, you could do 2 textviews Jan 14 15:02:00 animate one out and one in Jan 14 15:03:39 http://stackoverflow.com/questions/12891994/assign-holo-theme-to-custom-button-linearlayout Jan 14 15:03:41 srsly? Jan 14 15:06:19 well.. they really should be in the drawable folder :D Jan 14 15:08:05 http://stackoverflow.com/questions/14295894/how-to-set-background-of-button-back-to-default-holo-dark Jan 14 15:08:58 makes supporting more than one theme a nightmare Jan 14 15:09:20 or even changing a theme Jan 14 15:15:22 luv, if you set the main theme to something that inherits from holo dark, the buttons should be styled to it automatically Jan 14 15:16:19 indeed. though i would like to add selected state for a few buttons Jan 14 15:19:04 in ideal world, it should be just a matter of defining a new selector defining state_selected and a parent as "some_prefix/drawable/btn_default_holo_dark.xml" Jan 14 15:20:40 i undestand i can't set a parent for a selector, fine, i can just copy one simple xml file, no problem. But not permitting referencing the drawables from outside the theme is ... #$!@$#! ... causing a lot of problems. Jan 14 15:22:14 if you encounter such problems its usually an indicator for doing something in a bad/wrong/unsusual way that has better solutions Jan 14 15:22:33 or bad design of the underyling framework ;) Jan 14 15:22:39 underlying Jan 14 15:25:52 Hi danijoo Jan 14 15:26:17 well, i could define a custom ImageButton subclass which renders state_pressed drawable when state_selected==true Jan 14 15:26:39 still an needless workaround but much cleaner, true. Jan 14 15:26:43 I have a question about post request with volley someone ever did this ? Jan 14 15:46:26 Does Android Studio auto-save when you exit? Jan 14 15:46:48 yep Jan 14 15:47:03 Does it always autosave or only on exit? Jan 14 15:47:04 but i always click save anyway Jan 14 15:47:10 not sure about that Jan 14 15:47:49 Yeah, Eclipse doesn't auto save and it clearly shows when something is saved or not. Android Studio buttons are flat so it is hard to say if something is saved or not. Jan 14 15:48:52 well i just confirmed that android studio does save automatically Jan 14 15:49:10 so does intellij Jan 14 15:50:11 otoh i have to admit creating custom widget is quite straightforward :) Jan 14 15:51:23 there's an option somewhere in Android Studio to enable "not saved" indicators on tabs Jan 14 15:52:00 Hi! I compiled this ndk example on my device (samsung s3) : https://github.com/laurencedawson/native-activity-example I get frame times that jitters from 15ms to 17ms as shown in the graphic: http://imgur.com/zcxB9Sy shouldn't the frame times for an empty scene be more close to 16.666 ms ? Jan 14 15:52:25 f the ndk Jan 14 15:52:41 gcc-arm-linux-gnueabi is the way to go Jan 14 15:53:33 *internet went down for a second.. was there some reply ? :) Jan 14 15:54:36 Hi devs Jan 14 15:55:20 donniezazen, AS autosaves frequently. I concurrently edit files with emacs and auto-revert-buffer. Jan 14 15:55:26 all i said was i hate using the ndk.. id prefer to use gnu compilers Jan 14 15:55:49 donniezazen, siwtch between AS and emacs all the time, rarely a problem, never explicitly save in AS. Jan 14 15:56:04 but i dont think you could build an "app" with gnu cc Jan 14 15:56:06 Can all UI elements defined in xml files be generated programmatically? Or some have to be defined in xml? Jan 14 15:56:22 they can be inflated in the java Jan 14 15:56:34 they do not technically need defined in xm Jan 14 15:56:36 xml* Jan 14 15:57:24 bynarie, Including layouts and activities? Jan 14 15:57:43 honestly ive asked this same question and ive gotten the same answer Jan 14 15:57:50 you dont even need XML at all Jan 14 15:57:56 so i cant gaurantee Jan 14 15:59:23 I need to ship a bundle of resources with an app, a folder that contains audio and image files, is this something I put in the project and where exactly would i go? Jan 14 16:00:51 SquareDonut: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Project-Structure Jan 14 16:01:05 you can technically put them wherever but resources is a good folder Jan 14 16:01:18 you can organize it more within there if you want Jan 14 16:01:58 yiati, thanks Jan 14 16:03:49 FlipBill: It doesn't auto-save AFAIK. If you enable "Save files automatically if application is idle for x minutes" in Settings | General. Jan 14 16:04:41 FlipBill: I will have to check out auto-revert-buffer thing. I am learning Emacs (not sure if it is worth it). Jan 14 16:06:22 donniezazen, AS is auto-saving the instant my cursor leaves the edit window here. Jan 14 16:06:42 donniezazen, I don't recall if I selected any option for this to happen. Jan 14 16:06:59 FlipBill, auto-save is enabled by default Jan 14 16:07:03 I just confirmed by looking at time modified on file. Jan 14 16:07:24 pfn, then I guess that's why I don't remember. Jan 14 16:07:32 does anyone have an issue when debugging in android studio that requires you to step over one instruction before you can inspect locals? Jan 14 16:07:53 settings -> appearance & behavior -> system settings Jan 14 16:08:03 even if it's a log.d, I have to tep over /something/ before i can inspect variables Jan 14 16:08:19 Hey! Jan 14 16:08:48 donniezazen, Learning emacs is a long slog. You'll have to judge for yourself whether it's worth it. Jan 14 16:08:53 What is the best approach to download and parse data from a KML file stored on internet? Jan 14 16:09:04 well, depends on what you mean by learning Jan 14 16:09:07 pfn: wonder why auto-save is not enabled on my build. Jan 14 16:09:10 keybindings, not so much Jan 14 16:09:22 donniezazen, you probably unchecked it sometime in the past and don't remember Jan 14 16:09:32 regreddit: I too have experienced this Jan 14 16:09:49 I want to use Emacs for prose writing and org-mode. I am in it for long run. Jan 14 16:10:03 Shall I use java File and save it on the device first? Jan 14 16:10:07 pfn, even learning std the keybindings and all the modes is a chore, IMO. Jan 14 16:10:18 Anyone know anything about trademarking an app? Jan 14 16:10:19 the keybindings not so much Jan 14 16:10:25 and modes, you usually only use a handful of modes Jan 14 16:10:41 true, until tempted to use more Jan 14 16:11:18 like any editor, one can get by with very little knowledge Jan 14 16:11:19 the pain is all the elisp bullshit Jan 14 16:11:32 also ture. Very much Jan 14 16:11:36 you need to learn all the hooks and such Jan 14 16:11:42 not to mention lisp is pretty foreign for most Jan 14 16:12:17 foreign, yes. But at least it is structurally simple. Jan 14 16:12:57 of course, that makes the layers above more challenging in ways Jan 14 16:16:58 Mark modified tab with an asterisk can be an useful option. Jan 14 16:19:07 donniezazen, It certainly would be if you task yourself with saving your changes! Jan 14 16:19:17 MooGoo, did you resolve it, or did it just start working at some point? Jan 14 16:21:00 FlipBill: I have enabled both asterisk and auto-save. Being a cutting-edge linux user I am always afraid my system might crash so auto-save comes handy. Jan 14 16:22:35 donniezazen, AS also will show change history, somewhere (I forget where) Jan 14 16:23:00 that would be in addition to integration with a VCS of your choice Jan 14 16:23:03 right click -> local history Jan 14 16:23:18 fLM: You need to learn to just ask a question. Jan 14 16:23:55 As to crashes, I approve of your caution, but I haven't had any of my Linux boxes crash in many years. Jan 14 16:27:28 regreddit: just learned to live with it I guess Jan 14 16:30:50 FlipBill: True. Jan 14 16:33:56 I have my first test app code open. Just a blanck activity. I'd like to create my own class, import it and create an array of objects of this class. Where do I put the class file? How do I import it and where do i instantiate it? Jan 14 16:34:31 I have a button drawable all in xml using "rectangle" how can I shrink the rectangle by say 4 px on each sside? it has to be done in the drawable xml, and I struggle with these. Jan 14 16:34:49 SquareDonut: probably just create the class in the same directory as your main activity class. Right click on the package, and say new Jan 14 16:37:32 jeffol, thanks. Jan 14 16:37:48 Guys, what was your first app? Jan 14 16:37:53 SquareDonut: Np :) Its a little intimidating, but not so complicated really. Jan 14 16:38:35 qwhereami was my first. its sloppy but wass my first sstab Jan 14 16:39:56 jeffol, I know what I want to build, and just once step at a time I should get there. Learn as I go. It's just really helpful to drop a question and have someone answer right away, google isn't always helpful Jan 14 16:42:03 guys, OkHTTP vs Volley Jan 14 16:42:10 where is the party. Jan 14 16:42:19 both Jan 14 16:42:29 use Volley on top of OkHttp Jan 14 16:42:42 really, why. Jan 14 16:42:55 Jan 14 16:42:55 how do i shrink this by 4px on all sides? Jan 14 16:43:07 that's just like a 2nd networking library. Jan 14 16:43:26 can't I do everything with OkHTTP that volley can do Jan 14 16:43:36 well maybe, volley might have some built in parsers Jan 14 16:43:43 OkHttp is an HTTP client Jan 14 16:43:46 k Jan 14 16:43:49 Volley is a wrapper around an HTTP client Jan 14 16:43:52 they are not the same thing Jan 14 16:44:50 ok ,say i want to do lots of file transfers Jan 14 16:44:52 which should i use Jan 14 16:44:57 that supports streaming real well Jan 14 16:45:13 OkHttp is fully streaming Jan 14 16:45:16 Volley buffers things in byte[] Jan 14 16:45:24 you do not want to use Volley for large things Jan 14 16:45:46 JakeWharton: when you combine the two, are there any cacheing considerations that need to be made? I believe both have their own response caches Jan 14 16:45:59 Volley was made for the Play Store. Lots of little transfers (images, text, json, etc) Jan 14 16:46:24 qkzoo1978: I think you can use a layer-list: http://stackoverflow.com/a/3588976 Jan 14 16:47:08 sddamico: theoretically no Jan 14 16:47:17 well say, i want to create a file uplaoding service Jan 14 16:47:24 i would use okHTTP Jan 14 16:47:47 like a dropbox-ish app Jan 14 16:47:49 TacticalJoke thanks, I'll check it out. Is there any good docs on usinng/ cto find anything.ant seem defining xml drawables? I Jan 14 16:49:14 one more issue. i just made my app and, it has a normal edit text inside of a list view. um, when i click on the edit text field, my keyboard shows up but nowhere to type (its practically not working but, the keyboard is showing and you can press the keys) Jan 14 16:49:57 qkzoo1978: https://answers.yahoo.com/question/index?qid=20100317194351AAomYoj Jan 14 16:52:34 anyone know? the 'keyboard issue' Jan 14 16:52:37 is this a common thing Jan 14 16:54:08 What do you mean by "nowhere to type"? Jan 14 16:56:43 This sounds like the same kinda thing: http://androidtechnicalblog.blogspot.co.uk/2014/04/quick-trick-of-week-edittext-inside.html Jan 14 16:56:56 Are you sure you want an EditText in a ListView, though? Seems like a bizarre UI concept. Jan 14 16:59:56 Are you sure that the EditText has been scrolled above the keyboard? Jan 14 17:20:25 anyone else played around with Snackbar? Jan 14 17:20:45 Snackbar is serious business Jan 14 17:21:03 I'm finding LENGTH_INDEFINITE to be less indefinite, and more random, but definitely finite Jan 14 17:32:20 Hi all, i use an NavigationDrawer and 1 activity with several fragments, i replace the fragment when clicked an item in the navigation. Is this done right by conventions ? Jan 14 17:33:00 yes Jan 14 17:33:46 So its normal i have 1 MainActivity and more fragments which i replace by a click in the navigation drawer Jan 14 17:34:01 Ok Jan 14 17:34:25 Is there a way to see what package / activity / process has / is calling a method I wrote that's in a globally available class? Jan 14 17:34:55 deadmund, I'm actually trying to modify AudioRecord's constructor to dump what application called the constructor. Jan 14 17:35:22 Guys, so I'm making custom adapters. Instead of keep displaying my list views, how do I like break off form the current design and just have a heading inside of the list view? Jan 14 17:35:38 Like have something like PHOTOS Jan 14 17:35:42 than list view under that Jan 14 17:35:49 deadmund: you could try the “Find Usages” function in Android Studio Jan 14 17:35:49 than Videos Jan 14 17:36:00 have videos list under that Jan 14 17:36:46 s73v3r, I want to do it during run-time. But thanks for the idea :) Jan 14 17:38:01 I think I can do this: Thread t = Thread.currentThread(); t.getContextClassLoader() ? Jan 14 17:38:15 But I'm not familiar with a "ClassLoader()" Jan 14 17:43:01 What is the best approach to download and parse data from a KML file stored on internet? Jan 14 17:43:07 I want to have 3 "pages". One where welcome screen is with button to press "play". Second where the game happens and third that shows "Game Over". Is this done with Layouts? How does one switch between them? Jan 14 17:43:53 SquareDonut, those are all activities, each with it's own layout (that's the traditional way to achieve it) Jan 14 17:44:48 deadmund, so each activity has it's own layout? How does one switch between activities? Can an activity have multiple layouts? Jan 14 17:45:40 SquareDonut, You need to read the documentation from square one. Traditionally each activity has its own layout but they don't have to. An activity can switch between layouts, or generate them during run time (in Java) or modify them heavily during run time. Jan 14 17:46:03 SquareDonut, http://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html#getStackTrace-- Jan 14 17:46:14 deadmund, ok thanks, I'll go read Jan 14 17:50:46 I see that depending on device, different image would be used xdpi, hdpi ldpi etc... Does that mean the app in appstore holds all of that data? So download file has all these resources packed in it regardless of which device downloads? Jan 14 17:51:47 SquareDonut: unfortunately yes Jan 14 17:52:41 fun with canvas (as always) and drawPath: https://www.youtube.com/watch?v=5p7G2OfCAYg Jan 14 17:53:02 few numbers still lack of variant, but it's not an issue Jan 14 17:53:53 SquareDonut: Cyril Mottier wrote a good article on how to reduce apk size that talks about good ways to deal with that fact, http://cyrilmottier.com/2014/08/26/putting-your-apks-on-diet/ Jan 14 17:54:17 yiati, I'm not there yet, but will keep that link for later. Thanks Jan 14 17:55:00 I wish there was a video overview of how everything is tied together for someone who knows other programming languages. Even Java Jan 14 17:55:26 I just need like 10 minute video that goes over the structure and how it;s all done Jan 14 17:57:21 SquareDonut, I'm sure there are a million. Use Google. Jan 14 17:58:32 I gave up using perfect sized images for all resolutions, your apk gets huge and ppl dont give a ... Jan 14 17:58:48 look angry birds, totally screwed and ppl still love it... Jan 14 18:04:30 well, with gradle it's rather easy to split APKs over densities. Jan 14 18:04:37 l2use the tools or somethin :) Jan 14 18:12:22 Which is the most appropriate method to put button listener in in the activity? Jan 14 18:13:24 hey Jan 14 18:14:08 quick question: I have s-off, my bootloader is unlocked, i have root, i have super CID, but any time i try to change my MID it just shows up as the factory MID on the next reboot Jan 14 18:14:11 any ideas? Jan 14 18:18:33 I have a px image that I want to display in dp. Are these conversions correct? ldpi: dp = px * 1.33333, mdpi: dp = px * 1, hdpi: dp = px * 0.66666, xdpi: dp = px* 0.5 Jan 14 18:20:19 guys, im trying to inflate a view from the activity, i can't use View view = getActivity.getLayoutInflater.....wont work Jan 14 18:20:26 view = getActivity().getLayoutInflater().inflate(R.layout.pager_item, container, false); Jan 14 18:20:28 anyone know why Jan 14 18:20:35 that code works from fragment Jan 14 18:20:43 but not fromactivity Jan 14 18:21:56 because Fragment doesnt have getActivity method Jan 14 18:22:54 DragonPunch how so you mean "a view" Jan 14 18:23:08 DragonPunch, it’s because you’re in the Activity Jan 14 18:23:08 okay Jan 14 18:23:15 how do i inflate Jan 14 18:23:16 it Jan 14 18:23:17 what gdrc said but the other way around Jan 14 18:23:18 from activtiy Jan 14 18:23:33 you would just do getLayoutInflater() Jan 14 18:23:51 getLayoutInflater().blah blah blah Jan 14 18:24:07 explain what you have to do Jan 14 18:24:54 or LayoutInflator.from(context).inflate, which in an activity is LayoutInflator.from(this), and in a fragment is LayoutInflator.from(getActivity) Jan 14 18:24:58 If you want a view from the xml Jan 14 18:29:24 Is there a way to have a notification just switch to the app if it's already open? Jan 14 18:30:25 can anyone help me with changing my model id? Jan 14 18:30:26 dont do that Jan 14 18:30:42 matt_j: do you want to ge flamed by everyone? don't open app like that Jan 14 18:30:53 matt_j: that's like spam Jan 14 18:31:18 I mean when it's tapped Jan 14 18:31:23 not when it's received Jan 14 18:33:27 oh that makes sense Jan 14 18:33:42 not sure but, it would be a good feature. Jan 14 18:33:48 if you find out though, let me know for sure. Jan 14 18:34:08 well, I can have it start an activity Jan 14 18:34:16 but I don't want it starting the app from the splash all the time Jan 14 18:34:28 I believe you can choose the activity to start Jan 14 18:34:44 and it will start that activity. So if your splash is another activity, it won’t show it Jan 14 18:35:08 What if the splash has some init stuff that should be called if the app isn't currently active? Jan 14 18:35:50 hmm.... never mind. Jan 14 18:38:36 i need help :( Jan 14 18:38:45 is there maybe an android support channel? Jan 14 18:38:52 i'm aware that this is for devs Jan 14 18:39:06 #android for normal usage, this for developing Jan 14 18:39:44 thing is, my problem isnt exactly normal usage Jan 14 18:40:28 maxupp: #android-root Jan 14 18:40:43 you *might* be able to get a bit of support for say something like rooting in there, however, generally its for How do I do X in app Z. For root level stuff its generally #android-root Jan 14 18:40:48 oh nm, okmkz_ covered it Jan 14 18:41:43 Guys, I'm using a drawable shape as a background for a view. This view is used in a listview. BUT i want to have different colors for each item in the list. Jan 14 18:41:56 If I change the colour of the drawable in my code, will it change all of the views using that drawable? Jan 14 18:50:12 I have a ListView inside of a Fragment that I'm trying to manipulate from the activity. Jan 14 18:50:13 http://puu.sh/evZx5/0c949c82b5.png Jan 14 18:50:31 The app turns on and works (doesn't crash). However, no list view showing up. Jan 14 18:50:44 I linked the code that's sitting in the activity. Jan 14 18:51:27 Can I do anything other than "start" an activity? Can I switch to it if it was started before? Jan 14 18:52:18 And where do I put the onclick listeners for the button? Jan 14 18:52:32 SquareDonut: if it wasn't killed by you or the system then yes you can switch back to it Jan 14 18:54:02 yiati, I currently use startActivity(myIntent); so is there resumeActivity? So that onCreate is not triggered again? Jan 14 18:54:36 How do you manipulate a ListView that's inside of a Fragment from the activity. Jan 14 18:54:37 hey guys Jan 14 18:54:45 I havent done android dev in over 3-4 years. Jan 14 18:54:48 First you need to make sure your intent has the right flags so that you aren't killing the activity that you are leaving Jan 14 18:55:01 whats the default (free) development environment you guys prefer these days Jan 14 18:55:11 last time I used Eclipse Indigo. Jan 14 18:55:39 I prefer Eclipse Luna Jan 14 18:55:42 SquareDonut: http://developer.android.com/training/basics/activity-lifecycle/pausing.html Jan 14 18:55:49 mantas322, I'm new but I use Android Studio Jan 14 18:56:00 someone else mentioned that Jan 14 18:56:04 mantas322 http://developer.android.com/sdk/index.html Jan 14 18:56:04 yiati, thans Jan 14 18:56:24 Android Studio allows me to write java? Jan 14 18:56:30 and use AVD's Jan 14 18:56:44 oh wow this looks new Jan 14 18:56:51 SquareDonut is the hole square too ? Jan 14 18:57:17 SquareDonut this is a good diagram to bookmark. https://github.com/xxv/android-lifecycle/blob/master/complete_android_fragment_lifecycle.png Jan 14 18:57:38 g00s, unfortunately, yes. Jan 14 18:58:00 g00s, thanks for the diagram Jan 14 18:58:14 anyone? Jan 14 18:58:21 how to manipulate listview inside an activity Jan 14 18:58:28 inside a fragment *** Jan 14 18:58:30 from an activity Jan 14 18:58:35 That's not a very detailed question Jan 14 19:00:16 Well, I have a ListView that's in a View Layout and that View Layout is called on the screen from a ViewPager that sits inside a fragment. Instead of manipulating the view from the Fragment and writing the code there. I want to manipualte the code from Activity. Jan 14 19:01:02 so what i tried is http://puu.sh/evZx5/0c949c82b5.png that piece of code in the onCreate of my activity Jan 14 19:01:16 to see if I can manipulate the view from my activity Jan 14 19:01:43 when i run the app nothing breaks but, the CustomListView doesn't show up Jan 14 19:01:46 its drawing a blank Jan 14 19:01:50 like a blank page Jan 14 19:02:37 DragonPunch: So you have the ListView inside of a View instead of a ViewGroup in your xml? Jan 14 19:03:10 the list view is in a ViewGroup in the xml Jan 14 19:03:15 It's under a LinearLayout Jan 14 19:03:42 http://puu.sh/ew2hx/764fb7097a.png Jan 14 19:03:48 thats the code to the fragment Jan 14 19:03:55 if i write the manipulation of the code in there. Jan 14 19:03:57 it works just fine Jan 14 19:04:00 under case 0: Jan 14 19:04:04 for the first view Jan 14 19:04:11 but if i try to do the manipulation from my onCreate in the activity Jan 14 19:04:14 it wont work Jan 14 19:04:25 which is http://puu.sh/evZx5/0c949c82b5.png Jan 14 19:06:49 Did you trying setting the attachToRoot parameter to true Jan 14 19:07:30 what method is that Jan 14 19:10:35 yiati: what method is that Jan 14 19:12:15 DragonPunch: fwiw your pager-inflation is probably wrong. a) you should pass your current view root to it, and b) it doesn't appear to be added to your view hierarchy anywhere (so it and everything in it isn't actually displayed) Jan 14 19:12:58 groxx: how would i do that Jan 14 19:13:36 on the inflater Jan 14 19:14:02 ?? Jan 14 19:14:07 im not sure how to do that groxx, can you explain Jan 14 19:14:09 DragonPunch: typically you use something like `.inflate(R.layout.whatever, parentView, true)`. parentView would be whatever the view should appear in Jan 14 19:14:30 ahh Jan 14 19:14:32 um Jan 14 19:14:39 the view is appearing in Jan 14 19:14:52 a fragment sitting inside a view pager Jan 14 19:14:57 so shuold i say the fragment Jan 14 19:14:59 or the view pager Jan 14 19:15:32 the "immediate" parent, so the viewpager. Jan 14 19:15:59 view = getActivity().getLayoutInflater().inflate(R.layout.pager_item, container, false); Jan 14 19:16:07 it works Jan 14 19:16:08 back, sorry I did mean attachToRoot being true for that inflate function Jan 14 19:16:09 when i do that Jan 14 19:16:38 groxx: how do i tell the ViewPager Jan 14 19:16:38 ah, right, fragments get passed a container view. container is right. Jan 14 19:16:45 right Jan 14 19:16:46 so Jan 14 19:16:51 im doing this from activity Jan 14 19:16:57 what view would i pass down Jan 14 19:17:01 what would i type in that param Jan 14 19:17:08 in your emailAdapter Jan 14 19:17:11 change this line Jan 14 19:17:13 vi = inflater.inflate(R.layout.email_row, null); Jan 14 19:17:14 to Jan 14 19:17:26 vi = inflater.inflate(R.layout.email_row, parent, false); Jan 14 19:17:29 depends on where you want it to appear. after setContentView you can findViewById for the container to put it in. Jan 14 19:17:31 and try again Jan 14 19:19:46 I'm getting an EventBus error that I'm not really understanding. "Could not dispatch event to subscribing class", with a "CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views" Jan 14 19:20:35 hmm Jan 14 19:21:02 "Could not dispatch to subscribing class"... would that happen if the subscribing method failed due to an error? Jan 14 19:21:44 That would happen if called from wrong thread, such as not the original thread that created a view hierarchy Jan 14 19:25:17 They could at least have given the exception a name the clearly describes the issue Jan 14 19:28:14 ikr? that could mean anything Jan 14 19:31:45 shekibobo: if you haven't figured it out, and you're using the greenrobot EventBus library, try changing your method name to "onEventNameMainThread" Jan 14 19:33:12 Hi there. Jan 14 19:34:44 I'm trying to implement a simple survey / poll inside my app using viewFlipper. I have trouble getting answers from the poll. The last flip always gives me 0 as a result. But if I implement button for the last flip, and I tap it, the value is != 0. Should I use something else then viewFlipper for a simple poll/survey? Jan 14 19:36:22 frojnd: I'm not aware of any kind of "result" that viewflipper provides. what is the result, how are you getting it, and how are you setting it? Jan 14 19:40:37 anyone try out the FmReceiver sample? Jan 14 19:41:03 groxx: I programatically create radio buttons and then acoordingly save the value (using setters/getters). When user taps the answer (there are allways shown two answers) viewflipper flips and before that I use setter to set the value as in I increment value. So when there is no more answers left, I'd like to show results. So last flip should show results. I call getters to setText but it only shows Jan 14 19:41:05 default value (0) but if I implement onClick button textView shows correct results Jan 14 19:43:04 I really can't figure out what you're doing from that - "save the value" in what, where? and "call getters to setText" means...? Jan 14 19:43:39 hey all Jan 14 19:44:21 hey grobe0ba Jan 14 19:44:23 ahh Jan 14 19:44:26 i mean groxx Jan 14 19:44:40 SimonVT: how goes? Jan 14 19:44:42 darn those non-unique-three-letter-prefixes! Jan 14 19:44:50 lol Jan 14 19:45:34 groxx: for each radio button choice "hides" a category. And this is my Jan 14 19:46:26 groxx: way of knowing what user taped. I increment these taps for each category and at the end I'd like to show them as a result automatically. Jan 14 19:46:45 groxx: maybe if I show the code? Jan 14 19:47:21 frojnd: yeah, code would help. but that aside: you're telling me what you're trying to build, not how you've built it. "what" doesn't give me any info about why it's broken Jan 14 19:48:23 groxx: that all is already built. I successfully "fetched" user choices. I just don't know how to show them as a last flip. But if I implement a button and I tap it it shows reults Jan 14 19:48:33 le me upload the code Jan 14 19:52:32 what's the good pastebin service nowadays? Jan 14 19:52:52 is there something wrong with pastebin O.o Jan 14 19:55:57 oh herro g00s Jan 14 19:57:16 How can I have a notification's contentIntent run a block of code as well as start an Activity? Jan 14 19:58:20 matt_j: seriously? Jan 14 19:58:51 groxx: https://gist.github.com/frojnd/7d7b23cab5020df17bbb Jan 14 19:59:53 the activity doesn't actually start, but the app resumes Jan 14 19:59:58 which is what I want Jan 14 20:03:39 (due to PendingIntent.FLAG_UPDATE_CURRENT) Jan 14 20:05:52 matt_j: ok? it doesnt resume because of that flag. it resumes because your activity is singleTop Jan 14 20:06:38 matt_j: but why not simply add an extra or action to your PendingIntent that you will receive in your onNewIntent of your activity Jan 14 20:06:53 matt_j: you can then do a "block of code" based on the contents of the Intent Jan 14 20:07:14 onNewIntent doesn't get called Jan 14 20:07:23 (I want the app to resume) Jan 14 20:08:03 Anyone have a clue how to use ConnectivityManager.NetworkCallback? Jan 14 20:08:10 also, it isn't singleTop Jan 14 20:11:00 matt_j: it will get resumed Jan 14 20:11:18 I'll check onResume then Jan 14 20:11:27 huh? Jan 14 20:11:51 matt_j: onResume is always going to get called even if your Activity was previously the foreground task Jan 14 20:12:04 yeah, I'll check Jan 14 20:12:12 that could be what I'm looking for Jan 14 20:12:22 groxx: line 223 should show Test show words: different than 0. Instead I see 0. But if I press a button line 200, it shows proper number. Any ideas why? Jan 14 20:12:40 matt_j: what are you trying to do exactly Jan 14 20:13:20 When the user taps the notification, I want the app to come to the foreground, or start, and a block of code to run Jan 14 20:13:35 ok, then do as I said Jan 14 20:13:46 look, just read the docs. it explains it all. http://developer.android.com/guide/components/tasks-and-back-stack.html Jan 14 20:13:50 onResume does appear to work :) Jan 14 20:13:51 Thanks. Jan 14 20:13:57 omg Jan 14 20:13:59 lol Jan 14 20:14:04 good luck with that Jan 14 20:14:21 Napalm: is there something I should watch for? Jan 14 20:14:59 matt_j: well the code in onResume will be called when you load that Activity from any method, not just from a notification Jan 14 20:15:10 Yeah. Jan 14 20:15:25 It's just that the activity never becomes visible or anything, so I thought it was being ignored somehow Jan 14 20:15:44 never becomes visible? Jan 14 20:15:56 erm, sounds like your Intent is wrong Jan 14 20:16:04 That could be the problem. Jan 14 20:17:08 http://stackoverflow.com/questions/4047683/android-how-to-resume-an-app-from-a-notification Jan 14 20:17:21 It seems to me I still need to specify an Activity for the Intent, right? Jan 14 20:18:12 matt_j: omgggg.. ignore that answer Jan 14 20:18:30 gladly Jan 14 20:18:33 matt_j: yes, you want it to start an Activity, then give it the activity to start Jan 14 20:19:14 Yeah, it's not required to start a specific activity, just bring the app to the front Jan 14 20:19:25 (unless I get specific requirements, of course) Jan 14 20:20:39 http://stackoverflow.com/questions/12303663/android-resume-app-from-previous-position Jan 14 20:21:49 matt_j: again, the wrong answer Jan 14 20:22:09 yeah I'm realizing that Jan 14 20:22:24 matt_j: The answer to that SO should just be intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); Jan 14 20:22:30 job done Jan 14 20:23:41 do I need to specify an activity for taht? Jan 14 20:23:56 yes Jan 14 20:24:05 but thats what you want right? Jan 14 20:24:11 you want it to resume a specific activity Jan 14 20:24:18 no, I just want it resumed for now Jan 14 20:24:23 doesn't matter where Jan 14 20:24:34 ahh Jan 14 20:24:39 thats a different case.. Jan 14 20:24:44 you want it to resume a previous task Jan 14 20:24:52 Yeah Jan 14 20:25:03 can some one explain why you need the device’s density to compute dp from px? I thought dp stands for density independent pixels. If you need the screen density, clearly its not density independent...... Jan 14 20:25:05 as if I used the task manager to switch to the app Jan 14 20:25:05 hmm Jan 14 20:25:15 yea, theres a couple of methods that should work. Jan 14 20:25:57 in_deep_thought: you serious? that statement is so wrong Jan 14 20:26:12 Napalm: thats why I need explaining Jan 14 20:26:43 in_deep_thought: ok, perhaps not. it sounds logical but only because of the terminology Jan 14 20:26:46 in_deep_thought Jan 14 20:27:00 is dp density independent, as in, a 50 x 50 dp image will show up as 0.1 inches no matter the screen density. Is this true? Jan 14 20:27:55 in_deep_thought: pixel = picture element Jan 14 20:28:28 in_deep_thought: yes, basically Jan 14 20:28:33 in_deep_thought: 1dp = 1px at ~163dpi (mdpi, original iPhone) Jan 14 20:29:00 matt_j: back to you Jan 14 20:29:13 matt_j: right where was I. yea, restarting a previous task Jan 14 20:29:46 Napalm: and so is dp calculated from px and screen density via dp = px/(dpi/160)? Jan 14 20:31:51 Napalm: I think I have to go about this a different way, like using a broadcast receiver Jan 14 20:32:57 I'll keep experimenting for a while Jan 14 20:33:40 Hey all, I’m using Otto currently and it looks like annotations do not follow inheritance Jan 14 20:33:50 yes. as documented. Jan 14 20:34:48 Napalm= so lets say an image is 160px by 160 px. We want to know the dp right. So if the screen is a 240 dpi screen, then 240/160 = 1.5. So dp = px/1.5. So it should be at 240 dp x 240 dp right? Jan 14 20:35:10 but at a 160 dpi screen, it should be at 160 dp x 160 dp right? Jan 14 20:35:18 yes Jan 14 20:36:11 and then if they are sized as such, the images will take up the same physical amounts of space on each screen right (inches) Jan 14 20:37:38 but my source of confusion is: I thought that by giving sizes in dp, you take care of the whole “different screen densities” issue. However, it seems that in this case, a higher density screen needs a different dp size than a lower density screen. Jan 14 20:37:47 Napalm: actually, I do have a question. Jan 14 20:37:47 so its like the problem is back/wasn’t fixed at all? Jan 14 20:38:01 This app has a bunch of loading shit that happens in a Splash activity (that initially loads from launch) Jan 14 20:38:25 in_deep_thought: your thinking too deep Jan 14 20:38:27 lol Jan 14 20:38:27 however, if the app is killed, we can't just jump to, any activity without it being launched. Maybe my intent should specify what to do next? Jan 14 20:38:40 in_deep_thought, basically devices fit into different screen density buckets Jan 14 20:38:50 i.e. "after init, go to xyz" Jan 14 20:38:54 Mavrik: dont confuse him Jan 14 20:38:57 in_deep_thought, and they have different dp -> px multipliers Jan 14 20:39:01 in_deep_thought, that's about it :) Jan 14 20:39:18 if you say something is 100dp, it'll be about the same physical size on screen on most devices ;) Jan 14 20:39:26 Mavrik: multipliers computed by dp = px / (dpi/160)? Jan 14 20:39:37 in_deep_thought, multipliers set by the manufacturer Jan 14 20:39:44 no deep computation Jan 14 20:39:55 Mavrik: if you say something is 100dp, it'll be about the same physical size on screen on most devices ;) where did you find this!!!! this is what Ive needed to know all along Jan 14 20:39:58 someone's sittin in the dev lab goin "uhhh... errr... I guess it's hdpi." Jan 14 20:39:59 :P Jan 14 20:40:45 in_deep_thought, most phones have "640x360" dp screens Jan 14 20:40:59 in_deep_thought: 160dp on mdpi screen (1dp = 1px) = 160px, 160dp on hdpi screen (1dp = 1.5px) = 240px Jan 14 20:41:21 but still, where did you get 100dp = same physical size on most devices? Jan 14 20:41:31 in_deep_thought, what do you mean? Jan 14 20:41:48 in_deep_thought: there-by using more pixels meaning it now becomes the same physical size Jan 14 20:42:14 Mavrik: you said “if you say something is 100dp, it’ll be about the same physical size on most devices” Where did you find this out? and why is the magic value 100dp? Jan 14 20:42:24 in_deep_thought, huh. Jan 14 20:42:34 in_deep_thought: remember dpi is a function of the physical screen-size and the number of pixels Jan 14 20:42:50 in_deep_thought: he could say any dp size Jan 14 20:42:50 in_deep_thought, "1dp" is set on Android so that it's about the same physical size on all devices Jan 14 20:43:03 so a square where you say "make it 100dp big" will look about the same size on all screens Jan 14 20:43:15 100 isn't a magical number, it's just something arbitrary I made up -_- Jan 14 20:43:22 ah man now Im confused again Jan 14 20:43:41 ... Jan 14 20:43:41 ok fine, forget that 100dp thing Jan 14 20:43:43 in_deep_thought: remeber dpi = dots per inch, generally meaning pixels per inch Jan 14 20:44:07 in_deep_thought: read what I said again.. in_deep_thought: 160dp on mdpi screen (1dp = 1px) = 160px, 160dp on hdpi screen (1dp = 1.5px) = 240px Jan 14 20:44:46 in_deep_thought: in other words there are 0.5 times as many pixels per inch on the hdpi screen Jan 14 20:44:54 or 50% more Jan 14 20:45:41 in_deep_thought: so by specifying dp you are specifying a size relative to the density of the screen Jan 14 20:47:24 Napalm: so is like 100dp always gonna be a smaller physical distane than 150dp. Jan 14 20:47:30 yes Jan 14 20:49:05 160dp = 1 inch Jan 14 20:49:05 so if I wanted an image to appear the same physical size on a high density screen and a low density screen, would I supply 1 dp value for both screens to use, or a different value for each screen? Jan 14 20:49:11 more dp is more inches, less dp is less inches Jan 14 20:49:18 is there any way to get a RecyclerView to take on the correct height with wrap_content Jan 14 20:49:41 I have one inside a DialogFragment and it always expands it to the maximum available height Jan 14 20:50:45 I've been reading that there might be a bug in the default LayoutManager that makes the height be computed as 0 or something Jan 14 20:51:30 SimonVT: see thats why I feel uncomfortable supplying different dp values to different screens. I want the image to be the same size on all screens. So if more dp = more inches, I feel uncomfortable telling it to be more dp, because I don’t want more inches. does that make sense? Jan 14 20:51:32 MooGoo: RecyclerView does support wrap_content height, unlike ListView.. but that all depends on the LayoutManager implementation Jan 14 20:52:04 in_deep_thought: then specify the same dp size? whats your problem? Jan 14 20:53:20 Yeah, not sure how that is confusing Jan 14 20:53:21 I'm just using LinearLayoutManager Jan 14 20:53:54 Napalm: The formula: dp = px/(dpi/160) seems to indicate that a different dpi will affect the dp size. Jan 14 20:53:55 I actually assumed that it would work with a ListView.. Jan 14 20:54:25 you have it wrong Jan 14 20:54:45 Napalm: is that the wrong formula? I really hope so, because its whats been confusing me Jan 14 20:54:52 in_deep_thought: did you read any of my messages? Jan 14 20:55:24 Yes, dpi (dots per inch) affects how many px are in an inch (160 dp) Jan 14 20:56:03 Napalm: yes. Napalm: Jan 14 20:56:04 in_deep_thought: remember dpi is a function of the physical screen-size and the number of pixels Jan 14 20:56:20 basically, dp == px if dpi = 160 Jan 14 20:56:34 if dpi is less than or greater than 160, then dp is adjusted accordingly Jan 14 20:56:46 JesusFreke: no, px are Jan 14 20:57:01 Napalm: px are physical pixels, no? Jan 14 20:57:14 correct Jan 14 20:57:20 you can't adjust physical pixels Jan 14 20:57:45 not unless you have some new exotic screen or something :) Jan 14 20:58:22 Don't confuse eachother Jan 14 20:58:52 well, if he confuses me, and then I confuse myself, I end up back at a non-confused state, so it's all good. Jan 14 20:59:10 !!0 win Jan 14 20:59:39 so lets say I have a 160dpi and a 240 dpi screen, I am loading an image. When it comes in, turns out to be 100px. I want to display it as the same size on all devices. According to the formula, it should be 100 dp on the first screen and 150dp on the second screen, right? So, will the image show up as the same physical size on both screens? even though its a different dp? Jan 14 21:00:00 how fast are your adb push/pull speeds? mine are about 5 megabytes/sec and that's kind of slow when transfering big files ... Jan 14 21:00:05 *sigh* Jan 14 21:00:29 in_deep_thought, no, if you want it to display the same size, you have to set it to the same dp size on all devices. That's the POINT. Jan 14 21:00:47 azyr, mhm, about that Jan 14 21:00:51 160 dp is 1 inch.. density of the screen does not affect the definition of 1 inch Jan 14 21:00:55 Mavrik: so that formula is incorrect then? dp = px/(dpi/160) Jan 14 21:01:01 OMGGGGG Jan 14 21:01:09 in_deep_thought: your driving me insane Jan 14 21:01:17 Im driving myself insane Jan 14 21:01:20 That formula is correct Jan 14 21:01:30 If you want to convert px to dp Jan 14 21:01:31 do you guys have problems with AS wanting to replace symbols with their fully qualified names even if that symbol is defined in the same file ? Jan 14 21:02:06 in_deep_thought: so lets say I have a 160dpi and a 240 dpi screen, I am loading an image. When it comes in, turns out to be 100px. I want to display it as the same size on all devices. According to the formula, it should be 100 PIXELS on the first screen and 150 PIXELS on the second screen, right? Jan 14 21:02:13 see where i wrote PIXELS! Jan 14 21:02:14 g00s: do you have another conflicting import or something? Jan 14 21:02:34 hm, in other 3rd party jars yeah Jan 14 21:02:43 g00s, no Jan 14 21:02:57 g00s, but that happens when you already have something else imported under that name ;) Jan 14 21:03:04 yeah, if you have an import third.party.blah; Jan 14 21:03:12 its happening to static inner classes. wants to say com.me.Outter.InnerClass Jan 14 21:03:16 Napalm: ok cool yes. So now that I want to insert them, what do I tell android. Do I specify the layout in pixels then? Jan 14 21:03:16 then you can't reference a local "blah" Jan 14 21:03:19 without a full reference Jan 14 21:03:27 ok Jan 14 21:03:47 well, a local variable would be fine. but not an inner class Jan 14 21:04:06 Mavrik nothing else imported. i can change it manually and its OK, but something triggers the auto-import once in a while to go crazy :) Jan 14 21:04:33 in_deep_thought: Android still uses pixels.. this is probably your first misconception.. like a browser still uses pixels but in a browser your can specify alternive dimensions like EM so android has alternative dimensions like DP.. then end result is always going to be pixels Jan 14 21:05:06 Napalm: but in the layouts, it always asks for dimensions in dp Jan 14 21:06:34 in_deep_thought: so you have two options, simply have a ImageView that was placed in DP size and give it your image to size to itself.. probably preferable. the alterive is to take your Bitmap and resize it based on the screen dpi .. but this takes up more memory for no real gain Jan 14 21:07:09 in_deep_thought: it doesnt always ask for dp.. you can specify inches or pixels if you like Jan 14 21:07:09 Napalm: take the first option, How do I know what DP size to give it? Jan 14 21:07:25 roll a dice? :D Jan 14 21:07:35 in_deep_thought: you serious? Jan 14 21:07:41 yeah, you can actually say "show this image at 1 inch wide" Jan 14 21:07:42 in_deep_thought: are you just trollin now? Jan 14 21:07:47 if its only a few pixels, I want it to show up small. If its a lot of pixels, I want it to show up big Jan 14 21:08:00 in_deep_thought: wrap_content? Jan 14 21:08:05 in_deep_thought: then use wrap_contnet Jan 14 21:08:08 fdgkujdfshjg l;sadfhgkl;adsfg Jan 14 21:08:13 * Napalm goes insane Jan 14 21:08:31 groxx: yes like wrap_content would be perfect. Except for this, its not a layout. I am placing one bitmap on another bitmap Jan 14 21:08:49 * Napalm ignores this chat because he's scared for his sanity Jan 14 21:09:48 lol Im sorry, I truly am not trolling. Just confused Jan 14 21:09:57 in_deep_thought: since this seems to have gone down a few side-routes: what exactly are you trying to do? Jan 14 21:11:05 groxx: loading a pixel sized image as a bitmap. 2 requirements: 1) should show up as the same size on all devices (why i want to use dp. 2) show up bigger with bigger pixel sized image and smaller with smaller pixel sized image Jan 14 21:11:53 hi guys, noobie question Jan 14 21:11:59 Currently downloading Android Studio Jan 14 21:12:12 let us know when it finishes Jan 14 21:12:19 does it have everythign i need to spawn up a simple app in an emulator of my choosing? Jan 14 21:12:33 Nope Jan 14 21:12:37 I mean in an emulator with an AVD of my choosing Jan 14 21:12:44 what else do i need Jan 14 21:12:52 in_deep_thought: I'm guessing you're loading the bitmap into an imageviw? Jan 14 21:12:52 its about 1/4th done Jan 14 21:13:00 groxx: yes Jan 14 21:13:13 You will need an emulator and and avd, and jdk Jan 14 21:13:16 1/2 half done.downloading yiati Jan 14 21:13:21 sigh Jan 14 21:13:29 hmmm Jan 14 21:13:56 is there a tutorial I should know about regarding setting this up? or will Android Studio let me know what i need Jan 14 21:14:22 in_deep_thought: wrap_content should take care of that for you. by default, imageviews draw bitmaps as 1px = 1dp. so on a 320dpi device, 1 image-pixel will take up 4 display-pixels, which will mean it's displayed at the same physical size (e.g. always 1 inch wide) Jan 14 21:14:52 in_deep_thought: you may need adjustViewBounds=true also, otherwise I _think_ imageviews will only shrink-to-fit, not grow. Jan 14 21:15:22 groxx: hmm right now, the same pixel sized image is showing up as wildly different sizes (inches) for different screen densities Jan 14 21:15:47 is the image part of your /res folder, or are you downloading it or something? Jan 14 21:15:55 groxx: downloading something Jan 14 21:16:36 thats why I don’t know the # of pixels it is Jan 14 21:16:40 is it a "download and display" library or something? or just a normal file download -> load file as uri into imageview? Jan 14 21:16:53 also: is the image bigger than the display? Jan 14 21:16:55 the latter Jan 14 21:17:19 no its smaller Jan 14 21:17:19 than the display Jan 14 21:17:26 * mantas322 downloads jdk 7 Jan 14 21:17:56 in_deep_thought: hm. actually, I wonder if you might just need to set e.g. `scaleType="center"`. I forget what the default scaling behavior is. Jan 14 21:19:58 Im just gonna say 100dp x 100 dp. And hope that doesn’t force really big images to show up as small Jan 14 21:21:21 tbh it just sounds like either you're missing some piece of info (but you/we don't know what), or something in the layout is doing something you don't expect / aren't aware of Jan 14 21:23:14 so I just downloaded jdk7 and installed it. I'm on a windows machine and am looking for the .exe file within C:\Program Files\Java\jre7\bin, for the Android studio installer Jan 14 21:23:46 ooh oops Jan 14 21:23:50 in_deep_thought: I would _expect_ that layout_width/height = 100dp will force the images to fit that size (or, if you have a big image, and no scaling, it would be cropped). which probably isn't what you want? Jan 14 21:23:52 I thought I had to specify the locaiton Jan 14 21:24:30 OoOoOOoOo Android Emulator in "Accelerated" performance mode eh! Jan 14 21:24:35 thats new Jan 14 21:24:40 Guys, what is the general way to include images in my app. It's an app where users make entries and can attach an image to each one. Jan 14 21:24:56 mantas322: semi :) haxm has been around for a couple years now? Jan 14 21:25:04 someone point me in the right direction? Jan 14 21:25:09 I havent been around for 4 Jan 14 21:25:10 :) Jan 14 21:25:17 so im essentially relearnign everything Jan 14 21:25:29 hopfully the api and java are like riding a bike though Jan 14 21:25:32 :) Jan 14 21:25:32 groxx: basically I really wish I could just load it as is on the web. You know how on a website if you insert a huge image, it shows up as huge. However, when doing it on android devices, theres this whole thing with different screen densities. I am trying to make that not an issue for me. However, I certainely don’t want to force my image into a little box in the corner (like a 100dp box). If its big, let it be big! Jan 14 21:25:34 AKK9: that sounds like you want to allow the user to pick an image? Jan 14 21:25:39 AKK9: uh, you'll want to use an ImageView Jan 14 21:25:43 groxx, yup, exactly that Jan 14 21:26:12 in_deep_thought: which wrap_content should be doing. unless something else in your layout / how you're displaying it is constraining it, since it has to fit in its parent view Jan 14 21:26:36 oooh okay, I have a question Jan 14 21:26:40 whilst this installs Jan 14 21:26:51 so back in the day there was a preferred google phone to get for development Jan 14 21:27:02 what do you guys like for your test device? Jan 14 21:27:12 I forget the name Jan 14 21:27:19 genymotion Jan 14 21:27:20 but I have to tell my boss to buy somehting Jan 14 21:27:25 groxx: i'm pleading with you. please stop, its not your worth your sanity Jan 14 21:27:25 omegavesko, not talking about views, I want to be able to attach images to all each entry created by the user Jan 14 21:27:40 I want to know how and where to store images? How to reference them back to the relevant objects Jan 14 21:27:42 Yeah genymotion is p legit Jan 14 21:27:47 etc Jan 14 21:27:49 AKK9: Ah, I see Jan 14 21:27:53 genymotion pwns Jan 14 21:27:55 groxx: can I do wrap_content for the sizing of a bitmap? Jan 14 21:28:00 shame it has no sms smulation Jan 14 21:29:02 AKK9: well you could store the image as a blob in your database, if you're using a database Jan 14 21:29:14 in that case it would simply be another column in the row you use to store the entry Jan 14 21:29:30 AKK9: you _probably_ want to use a normal "pick image" intent, something like https://developer.android.com/guide/components/intents-common.html#Storage . that way they can get it from anywhere. Jan 14 21:29:57 AKK9: then you copy it to your app's directories, hang on to the uri of the copy, and use that to display the image. Jan 14 21:29:58 AKK9: use Picasso Jan 14 21:30:36 in_deep_thought: "for the sizing of a bitmap" = ? Jan 14 21:30:44 AKK9: yeah, if you aren't storing it in a database you could simply store it as a file and remember its location Jan 14 21:32:43 "Would you liek to start Android studio" yes. "SIKE! MORE DOWNLOADS!!!! XP" Jan 14 21:32:57 brx_ Jan 14 21:33:29 in_deep_thought: fwiw I'm not trying to be annoying, just extremely explicit. it seems like there's some miscommunication happening, or something. or, perhaps, if you have your layout + displaying code I could take a look and see if there's something obviously weird Jan 14 21:33:31 groxx, omegavesko, thanks dudes. are there any obvious pros/cons of storing them as blobs vs storing them as files? Jan 14 21:34:00 AKK9: generally, store big things as files. databases are typically optimized for small 'rows' of regularly-sized data. Jan 14 21:34:19 AKK9: "For BLOBs smaller than 100KB, reads are faster when the BLOBs are stored directly in the database file. For BLOBs larger than 100KB, reads from a separate file are faster." Jan 14 21:34:22 ^ from sqlite.org Jan 14 21:34:33 woah, "TV" and "wear" options for my project Jan 14 21:34:56 AKK9: also, sqlite won't ever shrink the database size. so if you save a bunch of images as blobs, then delete them, you won't regain the disk space. you can explicitly VACUUM, but that's easy to forget and requires additional space and is hard to do efficientl Jan 14 21:35:02 AKK9: so storing it as a file could result in higher read speeds if the images are large Jan 14 21:35:55 ^ faster read speeds: it's true, though it's pretty minimal. and you might get other benefits from a normal file, like letting the OS mmap it, which won't work if it's in the sqlite file iirc. Jan 14 21:37:07 groxx: Its kind of complicated. This is my “Camera Activity” https://bpaste.net/show/681b92939cd6 Look especially at the “combineImageIntoOne” function at the bottom Jan 14 21:37:33 I guess it actually draws both bitmaps onto the same canvas element Jan 14 21:37:53 in_deep_thought: ah. so you're actually drawing things onto a canvas by hand. I was wondering if that was what you meant earlier... Jan 14 21:38:06 woah Jan 14 21:38:08 so with this, its working great, EXCEPT: the same sized input images show up as different sizes for different dpi's Jan 14 21:38:14 theres a design view! Jan 14 21:38:21 gross, omegavesko, great thanks. i think ill go with files as ill probably let users addd multiple images and i dont want to bloat the db Jan 14 21:38:23 I want to stop that Jan 14 21:38:23 * mantas322 feels like a kid Jan 14 21:38:26 appreciate it Jan 14 21:38:34 AKK9: no problem, good luck :) Jan 14 21:40:18 damnit! Jan 14 21:40:19 emulator: ERROR: This AVD's configuration is missing a kernel file!! Jan 14 21:41:04 so.. Jan 14 21:41:07 how do I get an avd Jan 14 21:41:12 via android studio Jan 14 21:41:41 i havent used an avd in ages.. i prefer genymotion Jan 14 21:42:08 osxorgate: im HAVE to use it atm.. only way to simulate SMS Jan 14 21:42:10 :( Jan 14 21:42:18 in_deep_thought: fwiw in general preview size != image size, but you might be making them the same elsewhere. Jan 14 21:42:38 groxx: haha no I wish. thats todo #2 Jan 14 21:42:58 im just trying to get an emulator up Jan 14 21:43:06 Anyone have experience creating device owner app? Have any luck doing the nfc thing? Jan 14 21:43:12 im recently reborn to android development after a 3-4 year hiatus Jan 14 21:43:15 in_deep_thought: out of curiosity, are you e.g. taking two 100x100 pixel images, combining them, and getting a 150x150px output on a 240dpi device? Jan 14 21:43:43 from the combineImages method, specifically Jan 14 21:44:20 groxx: well 1 image is the captured photo. Thats whatever the camera preview can supply. Then there is the image loaded from the url. That image could be any different # of sizes, depending on the url. Usually something like www.snappiesticker.com/3.png Jan 14 21:44:20 both my monoforandroid api 10 and 12 "Failed to load Jan 14 21:44:22 :| Jan 14 21:45:12 are you using xamarin mantas322 ? Jan 14 21:45:21 no, android studio Jan 14 21:45:36 also im kind of talking out loud, so not need to respond to me Jan 14 21:46:17 nexus 5 api 21 seems to have worked Jan 14 21:49:32 in_deep_thought: I haven't done much density-independent stuff with bitmaps + canvases, unfortunately. but I'm _guessing_ at the moment that the bitmap or canvas is picking up the display's density, and working off that. it might be fixed by setting the tmp bitmap's density with Bitmap.DENSITY_NONE, I would assume before creating the canvas with it. Jan 14 21:50:17 or would this be "density-dependent"? ¯\_(ツ)_/¯ Jan 14 21:52:02 look a grasshopper Jan 14 21:52:05 in_deep_thought: or maybe DisplayMetrics.DENSITY_DEFAULT would work. not sure, unfortunately. Jan 14 21:52:18 yeah, Bitmaps can grab density at times Jan 14 21:52:25 and canvas/imageview will compensate Jan 14 21:52:36 even though, downloaded bitmap usually has density none Jan 14 21:52:45 this one is coming from the camera Jan 14 21:52:56 groxx: hmm ok. me neither. I will look into Bitmap.DENSITY_NONE and DispalyMetrics.DENSITY_DEFAULT Jan 14 21:53:49 Mavrik: and there's also some loaded from files (I'm guessing) and a temporary one for backing a canvas, since they're blending two. I haven't done that combination before, but I figure one or more of them are at a different density, and that's causing the problem(s) Jan 14 21:54:16 mhm Jan 14 21:54:31 whats monodroud then if you'r enot using xamarin? mantas Jan 14 21:54:32 if you load bitmaps from resources they get assigned density (unless you put them into drawable-nodpi or assets) Jan 14 21:54:56 am I being stupid using RecyclerView for a simple fixed text list Jan 14 21:55:01 I'm not totally sure I follow the problem precisely anyway, but that's how I read it so far (it's in progress, and had a couple false starts, and multiple people, so I'm not confident :) ) Jan 14 21:55:27 seems like even ListView would be a better choice Jan 14 21:55:43 Whats the general dp width of phones? 300dp about? Jan 14 21:56:41 in_deep_thought: _mostly_ I see xhdpi, which is I think 320, 2x the system default Jan 14 21:56:55 oh, wait, width. Jan 14 21:57:38 in_deep_thought: https://developer.android.com/guide/practices/screens_support.html Jan 14 22:00:15 the "sizes" like small / medium / etc have example DPs. it _might_ be that 320dp is the minimum, I think even the Galaxy Y is 320dp wide. Jan 14 22:00:18 in_deep_thought, as I told you before Jan 14 22:00:25 in_deep_thought, pretty much all phones are 360x640 Jan 14 22:00:39 with slight differences (e.g. softkeys take a bit away) Jan 14 22:01:33 uhh should it be 16:9 mavrik? Jan 14 22:01:43 yes? Jan 14 22:01:55 360/640 is not 16:9 Jan 14 22:02:13 oh it is derp Jan 14 22:02:15 sorry Jan 14 22:02:20 yah that sounds about right Jan 14 22:02:41 i dunno what the deal is with android wanting sp for font sizes tho it seems to automaticlly convert those to dp Jan 14 22:03:13 That's because if you read the doc, sp is dp with user's font scaling factor applied Jan 14 22:03:24 but both seem to work ok Jan 14 22:03:28 so they say mavrik Jan 14 22:03:30 of course they don't Jan 14 22:03:38 don't what? Jan 14 22:03:54 why is it that most apps have cut off text if you pick font size huge for instance? even googles own (demo) apps do that Jan 14 22:03:56 if you use dp you're pissing off all the older users which have sight problems and have larger font sizes set Jan 14 22:04:13 whats the best way to handle font scaling in a way that doesnt cut things off? Jan 14 22:04:16 the point of sp is that it scales with users font size settings so older/sight impaired people can see what it says in the app Jan 14 22:04:18 so you're saying dp does not scale Jan 14 22:04:20 HevvyMetal: because lots of apps set specific dp-based heights to their textviews, which is wrong. Jan 14 22:04:28 yes but if you do sp it often fucks things up Jan 14 22:04:38 then your layout is bad. Jan 14 22:04:40 so how should they set them groxx? sp heights wont work? Jan 14 22:04:43 it isn't my layout Jan 14 22:04:47 it's other peoples layouts Jan 14 22:04:47 wrap_content Jan 14 22:04:49 i just see the effect Jan 14 22:04:50 wrap_content Jan 14 22:05:09 it's context dependent Jan 14 22:05:16 what's context dependent? Jan 14 22:05:20 all text ever Jan 14 22:05:20 what do you do. Jan 14 22:05:32 if you have huge static title you handle it differently than body text Jan 14 22:05:38 especially once you i18nize. Jan 14 22:05:53 Mavrik handle it how in a way that makes it big but doesnt have problems if they set huge? Jan 14 22:06:14 right so if you have a huge title, then they pick blind as a bat in settings, then the title would take up half the screen and the buttons wouldnt be there groxx mavrik Jan 14 22:06:18 if they set huge, they want huge, probably because they can't read just "big" Jan 14 22:06:29 yeah. so let them have that. Jan 14 22:06:33 so it's not as simple as simply using wrap_content, that might just cause other things to disappear off the screen if that makes sense Jan 14 22:06:37 better than chopping off parts of the text Jan 14 22:06:43 no way so the submit button they now have to scroll to? Jan 14 22:06:56 well what i think is if someone alrady has a huge title, say, they should be able to specify, that scaling does not occur Jan 14 22:07:01 and thats probably what DP does Jan 14 22:07:06 what do you think about that? Jan 14 22:07:08 yes. if they can't read what the submit button says, then which is worse? not knowing what is on screen, or not seeing everything at once? Jan 14 22:07:35 you're going off a little bit on tangents but Jan 14 22:07:43 not really. use sp. Jan 14 22:07:44 basically i see it as it should be nonlinear Jan 14 22:07:49 yes really Jan 14 22:07:57 if the text is small, and can scroll, use sp Jan 14 22:08:11 if the text is already huge, and you dont want things to scroll, use dp for the font size Jan 14 22:08:19 they dont need huge text to be huger Jan 14 22:08:23 they need small text to be larger Jan 14 22:08:31 does that make sense? there is no need to make billboard sized things even bigger Jan 14 22:08:32 you basically can't guarantee "don't scroll". weird / super-small phones exist, as does e.g. a Note with splitscreen. Jan 14 22:08:41 i'm ignoring all the 2.2 phones Jan 14 22:08:56 but the basic principle that small text needs to be larger but huge text doesn't is a sound principle what do you think about that? Jan 14 22:09:04 HevvyMetal: how about Android One phones, which run kitkat, but are small and cheap Jan 14 22:09:12 never heard of them Jan 14 22:09:17 i'm not optimizng for zimbabwe Jan 14 22:09:23 i'm optimizing for american market Jan 14 22:09:25 Mavrik: oh yeah I remembered you saying some dimension like that. 360 it is then Jan 14 22:09:34 or 1st world market even Jan 14 22:10:02 then you're optimizing for multiple languages, and some are pretty much guaranteed to overflow and cause scrolling anyway :) Jan 14 22:10:17 don't fight it. adapt to it. Jan 14 22:17:59 Unless you have one word that spans the entire screen then making it sp and setting height to wrap_content should work fine with accessebility, and even then I think it's acceptable Jan 14 22:18:22 heyy Jan 14 22:18:25 what width and height should I use in an ImageView so that it's as big as it can without being covered by the ActionBar? Jan 14 22:18:31 actually it's ok if it has 100dp or something of margin above and below. I just don't want to hardcode the height of the ImageView Jan 14 22:18:38 ideas? Jan 14 22:19:35 In Retrofit’s RetrofitError object, how do I check if the Body is null? Jan 14 22:19:47 getBody() == null Jan 14 22:20:00 er, getResponse().getBody() Jan 14 22:20:26 getBody() attempts to run it through Gson, using getBodyAs() Jan 14 22:20:36 if there’s no json, Gson blows up Jan 14 22:21:34 Mattx: you probably want to use match_parent, so it fills all the available space. if you're using an ActionBarActivity, it won't cover the actionbar. Jan 14 22:22:08 right now the image has the size of the screen. it's covered by the actionbar and navigation panel Jan 14 22:22:13 I mean, navigation buttons Jan 14 22:22:41 it has wrap_content for width and height Jan 14 22:23:28 I’m trying to handle the situation in which the server returns a server error, like the kind .NET would throw up. The web service returns an HTML error page instead of the json that the call is expecting Jan 14 22:23:32 I am looking to add an ssh server to an embedded Android device; must be command line only, no GUI. Any references to such? None of the Google Play apps will do; they all have GUI config screens - I want to set it up via adb, and then run it using wifi. Jan 14 22:23:46 groxx, is it ok? Jan 14 22:23:51 Mattx: https://developer.android.com/training/system-ui/index.html Jan 14 22:23:54 Mattx: you might want to set scaleType="center" on the imageview? depends. Jan 14 22:24:21 or, sorry, scaleType="fitCenter" Jan 14 22:24:31 it has center_inside, let me check with fit center Jan 14 22:25:00 ah, center_inside might be better. I keep forgetting which is which. Jan 14 22:25:48 then it doesn't work, even with that scaleType Jan 14 22:25:49 :P Jan 14 22:26:41 Mattx: might be something odd with your layout, then. can you stick that in pastebin? Jan 14 22:27:13 one sec Jan 14 22:29:23 sometimes yiati it depends on the context of the whole app Jan 14 22:29:30 if you have a TV app, say Jan 14 22:29:38 with a Title and then some tiles below Jan 14 22:29:51 and then you scale the title so large, that the tiles below are not visible Jan 14 22:29:58 that breaks the app..you cant scroll down Jan 14 22:30:09 so all these "universal" predictions are not really universal Jan 14 22:30:11 why can't you scroll on the tv? Jan 14 22:30:23 I don't see how you would even get to that state Jan 14 22:30:24 because you can't it's not designed that way and even if it could, it would confuse the users Jan 14 22:30:43 well go make a TV app with the wizard in AS, scale the fonts, and you will immediately see why Jan 14 22:30:51 I have Jan 14 22:30:58 and what did you see there? Jan 14 22:31:05 Nothing you are describing Jan 14 22:31:32 that's right because in the TV app, it does what i'm talking about, which is use DP, and it cuts off the fonts on the title, if you make it huge, and it doesn't scroll, like you want Jan 14 22:31:42 so go change it so it uses SP, then tell me what happens :) Jan 14 22:31:57 I do have it set to sp like it should be Jan 14 22:32:05 for text Jan 14 22:32:09 groxx, https://gist.github.com/anonymous/eef5193c500aa0536940 Jan 14 22:32:10 there it is Jan 14 22:34:05 Mattx: I'm not sure, but I suspect `imageView.setAdjustViewBounds(true);` lets it resize to larger than the parent. try changing it to ViewGroup.LayoutParams.MATCH_PARENT and commenting out the setAdjustViewBounds call. Jan 14 22:34:56 so is there a way to dig the text out of a slideshare or not really? Jan 14 22:35:07 Hi, i'm very new to android programming, from what i understood an activity represents a screen with which a user can interact is that correct? Jan 14 22:35:30 JakeWharton has a lot of good presentations and just wondering if the code is easily extractable etc or if it's somewhere else Jan 14 22:35:44 soulisson: in essence, yes Jan 14 22:35:47 pretty much soulisson Jan 14 22:36:08 ok, thank you very much Jan 14 22:36:42 but also slideshares in general tho Jan 14 22:38:15 i'm glad to see so many things moving forward all we need is a new windowing system for 6.0 and we'll be set :) Jan 14 22:38:54 i'm surprised noone has built a better windowing system that uses the native android stuff under the hood but uses a more modern interface overall.....maybe xamarin does that Jan 14 22:40:33 but i think rxjava + oneway binding is probably enough.... Jan 14 22:40:48 now that i've thought about it awhile two way binding is not as important on android as it would be ona desktop Jan 14 22:41:00 so now I see why most toolkits just do 1 way binding Jan 14 22:41:17 has anyone noticed a flicker randomly when transitioning between Activities? (forgive me if you have seen me ask about this already) Jan 14 22:41:22 groxx, same result. no idea why :| Jan 14 22:41:38 flicker on what OS version and what hardware theblang ? Jan 14 22:42:33 HevvyMetal: KitKat and Lollipop, multiple hardware and emulator. watch five seconds of this video, it happens twice. https://www.youtube.com/watch?feature=player_videoeditor&v=yiIEFOpkS0M#t=19 Jan 14 22:42:57 HevvyMetal: Only started occuring, I believe, after updating to Lollipop support and appcompat Jan 14 22:43:01 theblang: is it ~ a single black frame? Jan 14 22:43:13 groxx: yup, just enough to annoy the hell out of me Jan 14 22:43:55 that's just lollipp and not kitkat right theblang ? Jan 14 22:44:10 HevvyMetal: I was hoping, but tested on Note 4 running KitKat and it happened Jan 14 22:44:19 I haven't done much with no-animation transitions, nor do I see them often :/ never noticed. Jan 14 22:44:22 HevvyMetal: I am using the new appcompat theme though Jan 14 22:44:56 groxx, HevvyMetal I wonder if there isn't something weird going on with me setting window animation to @null. Yeah, it doesn't happen when animation isn't turned off Jan 14 22:44:56 theblang: I assume you're not doing anything odd with view inflation? it's definitely happening synchronously, and in the right place? Jan 14 22:45:15 well google for a bug report and use animation in the meantime.... Jan 14 22:45:26 it hought the appcompat does not supprot the new animations but i guess the older ones still work right? Jan 14 22:45:44 groxx: yeah, it isn't to do with that. I set up a test with just two simple Activities here https://www.youtube.com/watch?v=BIBmvf-zTqk#t=19 Jan 14 22:45:47 theblang: does it happen if you overridePendingTransition(0,0)? Jan 14 22:45:50 groxx same thing, watch like five seconds Jan 14 22:46:10 groxx haven't tried that, let me do that. Jan 14 22:46:37 HevvyMetal: yeah, I looked for one and couldn't find. I tried making a post on the Google group but apparently it wasn't approved, I never saw it post anyway Jan 14 22:46:39 I would assume windowAnimation=@null is actually more efficient, but who knows if it's the cause. Jan 14 22:46:55 groxx yeah, I've had it @null for a long long time now Jan 14 22:47:01 (make sure you override _after_ startActivity or finish) Jan 14 22:47:08 groxx I am almost certain that this never happened though until I updated to Lollipop appcompat Jan 14 22:49:43 lollipop is very laggy on my N10 Jan 14 22:49:49 lots of missing frames in animations Jan 14 22:49:57 i havent tried appcompat Jan 14 22:50:03 either on 5.0 or 4.4 Jan 14 22:50:14 but i believe you not sure the solution tho Jan 14 22:50:42 everyone is trying to shoehorn material design on to 4.4 but i dont think thats really appropriate Jan 14 22:50:54 i think 4.4 devices should look like 4.4 devices not that some of the new apps look like 5.0 devices Jan 14 22:51:19 putting tesla styling on a yugo? wut? Jan 14 22:54:34 I have a few server adresses that should probably go in as a value, but I cant think of a good name for the file Jan 14 22:54:54 any recommendations Jan 14 22:56:49 nothing_to_see_here_move_along.rtfd.xml.biz Jan 14 22:57:09 groxx: LOL Jan 14 22:57:11 just to troll anyone checking out your app internals Jan 14 22:57:37 Constants.java Jan 14 22:58:25 or in a strings.xml file Jan 14 22:58:42 and switch based off a pref Jan 14 22:58:53 or heck, anything that shadyurl.com generates Jan 14 23:00:27 http://www.5z8.info/peepshow_f2m6lo_whitepower Jan 14 23:00:52 oh I don't think I described it well enough; I cant think of a good file name for a resources file that contains the server adresses and other constants that are used throughtout the app Jan 14 23:01:22 Hi. Is it possible to export the contacts *of a single account* to a vcf file ("export to storage")? Jan 14 23:01:23 n^izzo: if it's actually a _constant_ value, probably BuildConfig. you can generate it per flavor/variant/etc Jan 14 23:01:36 other constants being strings that are network addresses and shuch Jan 14 23:02:16 n^izzo: if it depends on the resources / device config / etc, personally I use a res/values/prefs.xml, which can easily be overridden in other values-es-v11-xlarge-omgwtf-bbq/prefs.xml files. Jan 14 23:04:53 n^izzo: I'd _probably_ recommend buildConfigField, visible here: http://tools.android.com/tech-docs/new-build-system (sadly it's not very well documented. basically you just write the type / name / value of a java field, and it gets added to com.ur_package.BuildConfig) Jan 14 23:05:00 ^ Jan 14 23:05:11 http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants Jan 14 23:05:16 to jumpt to build variants Jan 14 23:05:25 thanks for the reccomendations Jan 14 23:05:46 yeah. for some reason that user guide variants section doesn't mention buildConfigField. Jan 14 23:06:02 it's in the changelog on /new-build-system though Jan 14 23:06:50 how can i format my microsd card using adb? Jan 14 23:07:50 azyr: try #android-root Jan 14 23:13:00 can anyone think of a reason why a c++ string realloc would crash in Art, but not in Dalvik? Jan 14 23:13:32 I have a c++ object, always in memory, with a string data member (on the stack). If I set that string to anything other than "", it crashes on Art. Jan 14 23:13:43 even string("") crashes Jan 14 23:22:59 if I pre-initialize my string in c++ to be "adsflajdfjadsfkadlsfjadlskfajldsfjkkadjflajkdsfjlajdsfkjkladsf", and set it to be something smaller later, no crash Jan 14 23:23:05 but if it has to string realloc, it crashes consistently. only on art. Jan 14 23:23:24 and to reiterate, it's an std::string. Jan 14 23:23:48 anyone seen the "undefined reference to 'std::__throw_out_of_range_fmt ..." when linking with the ndk-build? Jan 14 23:24:08 try linking against libstd? Jan 14 23:25:10 yeah, tried that... hmm, let me try again anyways. Jan 14 23:25:44 yeah, no-go Jan 14 23:26:15 are you using android.mk or gradle proper? Jan 14 23:26:31 just an android.mk Jan 14 23:26:49 it's related to substr on c++ strings Jan 14 23:27:20 I removed those in part of my code to get around it, but on a new library I'm trying to incorporate, string parsing is important and I can't just comment it out. Jan 14 23:37:42 hi, I want to make a notification with a button that will dismiss an alarm... and for that i need an intent... Jan 14 23:37:42 intent reference a context and a class... but what's inside that class that gets called, so i can add my function to it? Jan 14 23:38:30 Makalak: for notifications, you have to use a PendingIntent, so you're stuck with an Activity, Service, or BroadcastReceiver Jan 14 23:38:55 what's the word for upfront that's polite? Jan 14 23:39:04 candid Jan 14 23:39:07 that's it Jan 14 23:39:42 groxx: oh ok.. Thanks Jan 14 23:40:58 i think you just wanted the method signature right tho? Jan 14 23:41:42 in XCode I hit esc to get recommendations how do I do that in android studio Jan 14 23:42:05 when using appcompat library, I want to make sure styles that currently have parents of "android:Widget.Holo.Light.TextView" are using the proper appcompat parents. But, I do not see "Widget.AppCompat.TextView" I only see "Widget.AppCompat.EditText" what style would be the proper parent? Jan 14 23:42:46 for example I have getResources().getString(R.string. and I want it to give me completion options Jan 14 23:43:53 did you try the command key n^izzo ? Jan 14 23:45:48 HevvyMetal: I'm on window$ :( Jan 14 23:46:26 try tab or ctrl-space n^izzo Jan 14 23:47:05 heater89: edittext is a text view, it'll probably work fine Jan 14 23:47:19 http://jesseliberty.com/2011/05/09/hot-and-cold-observables-in-rx/ Jan 14 23:47:43 HevvyMetal: many thanks Jan 14 23:47:53 textview and edittext should have the same styles? Jan 14 23:47:56 edittext has borders? Jan 14 23:48:16 yw n^izzo Jan 14 23:49:57 wow was rx invented at m$ft? Jan 14 23:50:26 https://rx.codeplex.com/ Jan 14 23:50:29 wow Jan 14 23:51:02 that's cool tho that explains why i was so impressed by msfts android->azure classes Jan 14 23:51:23 which were 100% pure java/android but extremely slick Jan 14 23:52:20 i'd like to find something like linqpad for rxjava so you can test out queries interactively Jan 14 23:52:57 it also explains a bit why rxjava came out of netflix Jan 14 23:53:27 groxx: right I know EditText extends TextView, but seems that i'd get more styling than i need for the edit text? Jan 14 23:54:07 groxx: I'll give it a shot though and see what the outcome is Jan 14 23:54:12 heater89: it might be, yeah. does it work tho? Jan 14 23:54:18 yo you guys. Jan 14 23:54:36 i click on edit text. it glitches out. i can type on keyboard however, text doesn't show up. Jan 14 23:54:45 the edit text is inside of a list view. Jan 14 23:55:00 groxx: trying now, i'll let you know the outcome :) Jan 14 23:55:21 if i call a broadcast directly "Intent intent = new Intent(this, Dismiss_Alarm.class);sendBroadcast(intent);" i dont need to define it in the manifest, right? Jan 14 23:55:58 Makalak: you do still need to. Jan 14 23:56:20 groxx: grrr... if i must then :/ Jan 14 23:56:21 Makalak: if you're just doing an internal one, you could use LocalBroadcastManager, which doesn't need that Jan 14 23:56:54 sendBroadcast is handled by the OS "outside" of your app though, so the OS needs to know where to send it Jan 14 23:57:18 groxx: ya its all within the same app/service to dismiss a song/alarm Jan 14 23:58:01 fwiw, if it's all in the same app / process, I'd recommend just avoiding broadcasts entirely (unless they make something easier - which can happen, it's just not very common in my experience) Jan 14 23:58:05 but will that still be valid with a pendingIntent from a notification Jan 14 23:58:26 ah. yeah, that's one case where it could be easier to use a broadcast :) Jan 14 23:58:33 will what still be valid? Jan 14 23:58:42 localbroadcast Jan 14 23:58:56 never used it... so im checking it out now Jan 14 23:59:05 LBM takes a "normal" intent and fake-broadcasts it within your process. Jan 15 00:00:44 though I forget if LBM works with 'normal' receivers without explicitly registering with the LBM. I usually avoid it. Jan 15 00:01:23 but im guessing that cant be used in the notification? Jan 15 00:01:24 what i'm doing is, giving the user the option to dismiss from within the app and from the notification... Jan 15 00:01:24 I'd image LBM would work from within the app.. but i'd need to use normal broadcast from notification. Jan 15 00:05:20 yeah, exactly. Jan 15 00:06:01 LBM is primarily useful if you wanted to reuse the receiver for e.g. an in-app stop button. Jan 15 00:06:13 sometimes it makes sense, sometimes it doesn't Jan 15 00:07:26 groxx: i end up getting the EditText text entry line Jan 15 00:07:47 heater89: heh. alas. Jan 15 00:08:35 groxx: ya that's how i'm using it. Jan 15 00:08:41 groxx: which I assume is a 9-patch as it's background, i'll see if I @null it out if it goes away Jan 15 00:08:48 its** Jan 15 00:09:45 heater89: since textviews don't have much in the way of visuals aside from the text's appearance itself, does setting the appearance to TextAppearance.AppCompat.whatever work? Jan 15 00:10:03 I unfortunately haven't done much with appcompat theming :| I will soonish though. Jan 15 00:10:50 groxx: that is a good point Jan 15 00:21:15 hey guys Jan 15 00:21:26 whats the simplest way to install volley lib Jan 15 00:21:32 w. android studio Jan 15 00:22:08 groxx: yup just removing the parent didn't have an effect. it was unnecessary... Jan 15 00:22:14 groxx: thanks for the help Jan 15 00:24:12 DragonPunch: huh. there doesn't appear to be an official gradle repository... Jan 15 00:24:33 ok. i will manually do it. Jan 15 00:24:36 DragonPunch: I'd probably try https://github.com/mcxiaoke/android-volley with `compile compile 'com.mcxiaoke.volley:library:1.0.+@aar'` in gradle Jan 15 00:24:42 ah, double compile, oops. Jan 15 00:24:52 will that work Jan 15 00:25:11 though I'd get rid of the +, the current version is 1.0.10 apparently Jan 15 00:27:32 is it possible to have edit text inside of a list view Jan 15 00:29:36 DragonPunch: hm. looks like it's a little problematic. http://stackoverflow.com/questions/2679948/focusable-edittext-inside-listview sounds promising though, for fixing it? Jan 15 00:29:46 thats what im hearing Jan 15 00:30:23 afterDescendents does sound about right to me, fwiw. I don't know how that'll interact with dpads though. Jan 15 00:38:46 anyone know why my camera preview is sometimes stretched when I'm putting it inside a surface view that I set to the same width / height as the preview? I've confirmed I set this measurement properly using debugger Jan 15 00:38:58 dbads? are you making a game or tv app? thats cool Jan 15 00:39:13 set your activity to android:windowSoftInputMode="adjustResize" Jan 15 00:39:16 what does that mean Jan 15 00:39:21 where do i set that Jan 15 00:39:37 in the xml Jan 15 00:40:44 I'm trying to authenticate with a node server using JSON and I get this org.apache.http.message.BasicHttpResponse@2a1299e7 when I try and response.toString() the response Jan 15 00:41:01 any ideas? Jan 15 00:41:15 google told me jack Jan 15 00:43:13 set a breakpoint there and inspect it instead of tostring n^izzo Jan 15 00:44:14 n^izzo: you probably want response.body or something along those lines Jan 15 00:44:23 response likely contains status code, headers, and a lot of other data Jan 15 00:49:06 how are you callin this n^izzo ? Jan 15 00:50:05 HevvyMetal: where in the xml i have 10 xml files Jan 15 00:50:11 do i set it on my edit text Jan 15 00:50:19 is it still necessary to use org.apache...net classes or is java.net or a different library better in android these days? Jan 15 00:51:06 ah http://developer.android.com/reference/org/apache/http/impl/client/DefaultHttpClient.html Jan 15 00:51:15 hevvy Jan 15 00:51:17 where do i set that Jan 15 00:51:29 it looks like google recommends java.net. Jan 15 00:51:37 on your edittext xml DragonPunch Jan 15 00:55:37 ok Jan 15 00:55:39 gochya Jan 15 00:56:03 You guys, what's the best way to launch something like a 'modal' or you know when you CLICK I want to launch like something over it. Jan 15 00:56:12 What UI element do I need. Jan 15 00:58:34 Anyone know why I get gradle DSL meathod not found? Jan 15 01:09:16 android 5.0 still supports the typical adb logcat right? Jan 15 01:09:22 yes Jan 15 01:09:52 hum wonder why i'm getting this logcat read failure: No such file or directory Jan 15 01:09:58 HevvyMetal: I'm calling it like this; http://hastebin.com/erereyumif.java and I'm not sure what I should be looking for in the debugger Jan 15 01:10:55 pjackson: would have thought so but I cant find any method like that for httpClient Jan 15 01:11:19 anyone? Jan 15 01:11:27 how to get a pop up window Jan 15 01:11:33 what UI element Jan 15 01:13:46 DragonPunch: have a read of this: https://developer.android.com/training/basics/firstapp/starting-activity.html Jan 15 01:14:29 AndreYonadam: probably calling something in the wrong place. what's the error + what's the code? Jan 15 01:14:49 groxx: Importing from eclipse for the first time Jan 15 01:14:56 I'm going to check up to see what the problem is Jan 15 01:15:02 Maybe I don't have that API level installed Jan 15 01:15:36 hm. seems like that should work. error message should give you some idea though, or double-click it to be taken to the line where the error happened Jan 15 01:23:16 Is there a div type element for XML? Jan 15 01:23:29 Im trying to center 3 check boxes on a layout Jan 15 01:23:59 not really. LinearLayout is probably closest to what you're thinking Jan 15 01:24:23 Never knew the difference between Linear and Relative Jan 15 01:24:28 I should look that up Jan 15 01:24:54 linear just == horizontal or vertical. relative = a rules-based layout system, so you can e.g. layout_toRightOf="id_of_other_view". Jan 15 01:25:21 hmm, ok Jan 15 01:25:27 Linear is better for centering items? Jan 15 01:25:43 it'll be faster, because the layout logic is simpler Jan 15 01:25:52 Is there a page where I can find that? Jan 15 01:26:44 find what? Jan 15 01:26:59 The logic for a LinearLayout Jan 15 01:27:20 grepcode has android's source code on it, and it's reasonably nice for reading + navigation. Jan 15 01:27:33 Thanks Jan 15 01:27:54 but it's also just partly common sense. laying things out in a line is easier than laying them out arbitrarily depending on any number of rules. Jan 15 01:28:41 Right Jan 15 01:30:19 has anyone done any midi on android with USB OTG? Jan 15 01:36:10 no hipster djs i guess :) Jan 15 01:36:43 i bet if this was #iOS 1/3 the questiosn would be about the best way to generate a tb303 Jan 15 01:38:19 I haven't really done any android development, and I was considering making a simple app just to get my feet wet, but I find myself a little bit put off by the fact that, please correct me if I'm wrong, the Dalvik VM seems to be stuck on a Java version akin to Java 6. It sounds a bit dated. Thoughts? Jan 15 01:38:54 java 6 was so great that that is all we need AndreasL Jan 15 01:39:14 what's your next question? :) Jan 15 01:39:26 HevvyMetal, hah. Well, I appreciate your input, nonetheless Jan 15 01:39:27 i think we need a faq on the googlewar with boracle Jan 15 01:39:40 there are some ways to work around it AndreasL Jan 15 01:39:52 HevvyMetal, are they worth it? Jan 15 01:40:28 not sure...i think 1.7 works and i'm still working with retro lambda on 1.8 Jan 15 01:40:37 AndreasL: it's essentially java 7 fwiw. but yeah, no java 8. Jan 15 01:40:49 but you can do retrolambda Jan 15 01:40:54 i havent got that set up yet tho Jan 15 01:40:58 so theres no wrapper to put elements in to center them? Jan 15 01:41:00 but it supposedly works Jan 15 01:41:08 I think I'd want the functional stuff from Java 8 in particular Jan 15 01:41:10 drose379: depends on how you're trying to center them Jan 15 01:41:35 the streams api andreasl or what in particular? functional=lambda? Jan 15 01:41:35 Well there 3 checkboxes with 3 different lengths, cause the words that describe the boxes are different lengths Jan 15 01:41:53 so I wanted to throw them in something and center that Jan 15 01:42:08 HevvyMetal, yeah, sorry, streams and lambdas Jan 15 01:42:12 ah. yeah, the lambdas you can kinda backport with retrolambda, but the framework isn't 1.8 Jan 15 01:42:50 drose379: try wrapping them in a linearlayout, then setting layout_gravity="center" on the linearlayout Jan 15 01:42:51 i havent looked into streams too much but lambda for sure you can get what about streams do you want in particular? android is already async AndreasL and there is rxjava/android Jan 15 01:43:01 does anyone have an elegant way of doing upserts in a custom ContentProvider? Jan 15 01:43:24 groxx I can put a linearLayout inside a linear layout? Jan 15 01:43:29 dynmeth: you control the database? Jan 15 01:43:30 drose379: yep Jan 15 01:43:40 Got it,thanks Jan 15 01:44:16 HevvyMetal, well, I just like the lazy evaluation of streams Jan 15 01:44:26 dynmeth: or, are you wondering if upsert is possible in android/sqlite, or if there's just a nice way to do it? Jan 15 01:44:28 groxx: yep. currently using the insertOrThrow, catching and then updating Jan 15 01:44:50 HevvyMetal, I find writing code in terms of map, reduce, filter etc. to be a nice pattern Jan 15 01:45:06 HevvyMetal, I have no idea what already exists for Android though Jan 15 01:45:12 dynmeth: two options. there's an on-conflict variant of insertOrThrow, or I personally add the update behavior to the sqlite table constraint so I don't have to worry about it. Jan 15 01:45:32 groxx: I started using ON CONFLICT REPLACE but need a bit more flexibility Jan 15 01:46:08 dynmeth: ie, 'insert x,y,z, on conflict with x only update z'? Jan 15 01:47:37 groxx: yes. if update only update column x, y, not z (e.g. if z is a 'new' flag) Jan 15 01:48:26 AndreasL do you come from a C#/.NET background? Jan 15 01:48:58 i personally agree with you but that line of thinking is somewhat heretical (or at least, wildly unfamiliar) in #android-dev and outright heretical/banworthy in #java Jan 15 01:49:01 so be careful :) Jan 15 01:49:30 HevvyMetal, no, I actually have very little experience with functional programming, but recently I've been thinking that I want to get more into functional programming and subsequently start using the things about it I like more in imperative code Jan 15 01:49:36 dynmeth: afaik there's nothing built-in. personally, I'd probably make a wrapper class for ContentValues that also accepts a true/false "update when conflicted", a wrapper for "insertOrThrow" that accepts it, and internally do the try/catch/retry. then it's at least only written once. Jan 15 01:49:41 I'm completely new at using gradle to build Andriod projects. Where would I put a "compile... " for building rxjava into my project? Jan 15 01:50:04 dynmeth: I'm not sure what you can do with triggers though, it's possible you can do something entirely sqlite-internal like that. Jan 15 01:50:25 knapper_tech: in your app/build.gradle, inside the `dependencies { ... } ` section Jan 15 01:50:29 HevvyMetal, but it seems to be the way things are going for Java too though, doesn't it? I haven't been following very closely, so perhaps the articles I've read have made my view rather biased Jan 15 01:50:39 groxx: that is what I'm doing, was hoping I wasn't overthinking it Jan 15 01:51:03 what is the way java is going too AndreasL ? yes I think java is going a little more like .net observables but android is stuck in the 70s Jan 15 01:51:11 but its getting a little better Jan 15 01:51:26 just stop asking and code some app already AndreasL :) Jan 15 01:51:35 then bitch about a specific thing Jan 15 01:51:44 dynmeth: dunno :) personally I have a fair number of database-operation-wrappers, relatively happy with it. Jan 15 01:51:54 HevvyMetal, well, the introduction of the streams api, optional etc. seem to be indicative of functional inspiration, I guess Jan 15 01:52:04 HevvyMetal, haha. Fair enough! Jan 15 01:52:20 groxx: well at least I'm not the only one! :) Jan 15 01:53:04 dynmeth: fwiw with databases I've been using greenDAO lately, it's pretty sane (at run-time) and fast. it won't do stuff like this, but for more 'normal' database use it's nice. Jan 15 01:54:09 dynmeth: otherwise, check sqlite triggers. they might be capable. Jan 15 01:54:35 groxx: true, I haven't looked at ORMs in the past 12 months. Jan 15 01:55:22 Would anyone recommend using a jar file off of search.maven.org when building the source locally via gradle dependency is an option? Jan 15 01:55:29 dynmeth: only recommendation if you try greenDAO is to immediately disable the cache. it's not threadsafe, and it's on by default :( no clue why they thought that was a good idea. Jan 15 01:55:33 What's SOP for people that like things to work? Jan 15 01:56:18 groxx: thanks for the tip Jan 15 01:57:21 groxx: It worked Jan 15 02:02:07 hello Jan 15 02:02:15 Hi Jan 15 02:04:27 anyone else get weirdness where the debugger in android studio is off by a line? Jan 15 02:05:12 i'm not sure if I am doing something that makes sense. I am working on an app that runs on glass as well as android API 15. right now there are two projects in our solution, one for glass and one for API15, and all of the activities are in a shared project. Jan 15 02:05:48 the glass project uses CardScrollView from the GDK and the API15 project uses ViewPager Jan 15 02:05:49 JacobTabak: in system source, or yours? Jan 15 02:05:53 my own Jan 15 02:06:14 JacobTabak: don't suppose you've added or deleted a line while it's running? Jan 15 02:06:41 whats the question literallycat Jan 15 02:06:43 nah it's happened enough times in the last few weeks, in several projects, that either i'm going crazy or there is a bug Jan 15 02:06:47 you there lasserix? Jan 15 02:07:09 anyone else get weirdness where the debugger in android studio is off by a line? Jan 15 02:07:10 JacobTabak: heh. one more sanity check: is it _stopping_ at the wrong line, or is it highlighting the wrong line as you step? Jan 15 02:07:17 deal with it? Jan 15 02:07:31 bugs in the android tooling? really? that must be something new @/ Jan 15 02:07:44 how do I create a custom view that can be either a CardScrollView or ViewPager based on which project it is?? Jan 15 02:07:56 groxx it's stopping at the correct line, but for example if i put a breakpoint on the first line of a method (in the body of the method), parameters aren't in scope yet Jan 15 02:08:03 right now I have a way to inject the dependency into the app at runtime Jan 15 02:08:06 test to see if the class exists or other identifiers literallycat Jan 15 02:08:16 if (isGlass()) etc Jan 15 02:08:47 JacobTabak: ah. _that_ specifically I have seen. I dunno if it's possible that it's legitimately not in scope at runtime due to the compiled code or something. Jan 15 02:09:12 it's infuriating Jan 15 02:09:19 HevvyMetal I would like to have an element in my xml called that will be a CardScrollView on Glass and a ViewPager on API15 Jan 15 02:09:37 it seems to be only affecting me as of late, like its a newly introduced issue Jan 15 02:09:43 sorry, I'm having a hard time explaining Jan 15 02:09:48 Is the difference between a radio button and a check box that each check box is seperate from eachother, but in a radio button group they are connected so only one can be chosen at a time Jan 15 02:09:54 is there a recommended way to create an independent library using Android Studio? Jan 15 02:09:55 maybe we should find a way to log a bug groxx :> Jan 15 02:10:05 so use two different layouts and load oen or the other literallycat Jan 15 02:10:13 maybe two activities as well Jan 15 02:10:37 what do you think lasserix? Jan 15 02:10:57 HevvyMetal right now I am using two layouts and one activity. I'd like there to be one layout and one activity, so that going forward it is easier to create and maintain new activities Jan 15 02:11:23 I already have developers complaining that it is complicated to maintain two different layout files Jan 15 02:11:43 are you a manager literallycat ? Jan 15 02:11:53 literallycat: fwiw you can reuse parts of layouts, and them in other ones Jan 15 02:12:11 HevvyMetal not by choice :) Jan 15 02:12:16 is the poor mans fragment/customview Jan 15 02:12:22 so you are the manager literallycat ? Jan 15 02:12:25 congrats :) Jan 15 02:12:39 I am not the manager at all :) Jan 15 02:12:55 what is your role on the project and what do you want to achieve literallycat ? Jan 15 02:13:44 my goal is to provide a way to continue sharing 100% of activity and layout code between the two platforms Jan 15 02:13:59 can i have what you are smoking literallycat ? Jan 15 02:14:16 you MUST be a manager Jan 15 02:14:18 after this project is done, of course! Jan 15 02:14:32 its a nonsensical request Jan 15 02:14:43 i'm not the manager Jan 15 02:15:02 so what are you doing? are you an android dev? Jan 15 02:15:05 we are sharing code now between two platforms, just not the layouts Jan 15 02:15:19 yes and that is normal literallycat Jan 15 02:15:20 we are using xamarin Jan 15 02:15:33 HevvyMetal that is true Jan 15 02:15:36 thats why they have different layouts per activity Jan 15 02:16:03 I have a slight itch to see if it is possible to have one layout for both Jan 15 02:16:11 so you have an iOS version of this google glass thing, right, that's why you're using xamarin on this literallycat ? Jan 15 02:16:12 both platforms Jan 15 02:16:28 what is both platforms? ios and android? android and wp8? what platforms :) Jan 15 02:16:32 no iOS version. its another glass type device that runs API15 Jan 15 02:16:51 so fucking specialize your layouts, or your activities until it works Jan 15 02:16:55 there is no golden goose Jan 15 02:16:57 get used to it Jan 15 02:17:11 literallycat: to answer your original question, you could make a custom e.g. FrameLayout that adds a CardScrollView or ViewPager to itself when it's created, depending on whatever conditions you want Jan 15 02:17:13 I'd like to tell the rest of my team that :) Jan 15 02:17:24 groxx that sounds promising Jan 15 02:17:46 yes groxx i agree and thats what i told him a long time ago Jan 15 02:17:51 if (isGlass()) Jan 15 02:18:03 you're bringing up (appropriately) where in the stack to bury it Jan 15 02:18:03 dudes Jan 15 02:18:06 i having a problem Jan 15 02:18:06 but it's the same solution Jan 15 02:18:07 android:windowSoftInputMode="adjustPan" Jan 15 02:18:13 i need to put this code in the 'activity' Jan 15 02:18:21 groxx if you want to star, https://code.google.com/p/android/issues/detail?id=97219 Jan 15 02:18:25 what is your role on the project literallycat ? either you ask them to get a clue or you tell them pick one and do it there is no other way Jan 15 02:18:29 HevvyMetal that makes sense I'm just not familiar with where that code goes Jan 15 02:18:30 literallycat: https://gist.github.com/Groxx/ec38ef08dd7b4bedb33c for example Jan 15 02:18:53 it goes somewhere depending wher you want to just like a try catch literallycat Jan 15 02:18:53 groxx beautiful Jan 15 02:19:09 groxx that is exactly what I needed Jan 15 02:19:19 groxx HevvyMetal thank ou Jan 15 02:19:20 you Jan 15 02:19:33 so a gist is like a snippet right groxx? Jan 15 02:19:41 that's cool i havev some android snippets i want to post Jan 15 02:19:43 JacobTabak: done. I'll try to keep an eye on it Jan 15 02:19:48 so I should use gist for that right? Jan 15 02:20:08 HevvyMetal: yeah. gist is nice because you can also edit them and it records the history and can be forked etc. it's basically a micro git repo. Jan 15 02:20:19 nice Jan 15 02:20:24 i'mma gonna try that out Jan 15 02:20:47 can you link me to some "canonical" gists so I can make mine adhere to the uh, flow or whatever groxx? Jan 15 02:21:02 if there are things that should be adhered to Jan 15 02:21:17 nah. they're just a github-hosted pastebin basically. Jan 15 02:21:54 what if it needs several classes all in one gist or they refer to other gists? groxx? Jan 15 02:22:01 like if i share a base class Jan 15 02:22:05 nvm Jan 15 02:22:21 do i put it all in one gist or how do most ppl deal with that on gist groxx? Jan 15 02:22:53 im so happy ^_^ Jan 15 02:22:59 my app Jan 15 02:22:59 xD Jan 15 02:23:25 HevvyMetal: "Gist is a simple way to share snippets and pastes with others. All gists are Git repositories, so they are automatically versioned, forkable and usable from Git." - Github Website Jan 15 02:23:51 HevvyMetal: usually I see multiple files done with the "add file" button on the bottom left, so they can be different languages and they diff nicer. also, since you can `git clone ` it can essentially form a full small project if they're separate. Jan 15 02:26:56 I need a front-end designer for my Android project. Jan 15 02:28:39 Hey TacticalJoke Jan 15 02:29:15 Hey. Jan 15 02:29:28 How you doing Jan 15 02:30:51 I was just about to ask a question, a radio button does not have to have a set onClick method right? Jan 15 02:31:27 If I have a series of questions and choosing a radio button is one of them, I can just get which button the user selected when they click a send button, right Jan 15 02:32:55 of course Jan 15 02:33:04 ok Jan 15 02:38:32 what does your project do DragonPunch ? what kind of front end designer? just basic widgets or photoshop or color schemes or what? Jan 15 02:38:54 i will have to pm u Jan 15 02:39:12 sure thats fine Jan 15 02:39:43 Not too bad, drose379. :) Jan 15 02:39:59 Good good Jan 15 02:40:24 so for the typical ios app, and then they say, hey, let's port this to android Jan 15 02:40:33 there are many ways to go there of course Jan 15 02:40:45 when the ios app has the typical button bar at the bottom Jan 15 02:41:11 what are the best approaches on android re actionbar and navdrawer etc Jan 15 02:41:24 how would you port that standard paradigm over groxx? Jan 15 02:42:24 iOS users find UX different from Android users - adapt to the market. tbh. Jan 15 02:42:49 in general if ios users prefer nav tab at bottom > navigation drawer Jan 15 02:43:55 nav drawers are fairly well hated on this channel DragonPunch but I don't know about the broader market Jan 15 02:43:57 thoughts? Jan 15 02:44:05 im saying for example Jan 15 02:44:14 realstically view pager Jan 15 02:44:21 i think view pagers are best Jan 15 02:44:25 and are offered on both platforms i belive Jan 15 02:44:46 well on a recent app i did dragon punch Jan 15 02:44:56 i had a combo of button bar on bottom + view pager Jan 15 02:45:05 it was kinda cool Jan 15 02:45:18 considering how hated button bars are on here Jan 15 02:45:32 but so you could you button bar and it might be.... Jan 15 02:45:48 [Nearby][Popular][Yadda] Jan 15 02:46:12 and then once you got there, you cuold swipe back and forth Jan 15 02:46:42 button bar bad Jan 15 02:46:45 button bar bad Jan 15 02:46:52 unless you use the new kinda button bar on bottom Jan 15 02:46:55 the one that fades Jan 15 02:46:57 other than that Jan 15 02:46:59 view pager Jan 15 02:47:00 tabs Jan 15 02:47:03 view pager tabs Jan 15 02:47:07 make for best UX/UI Jan 15 02:47:11 no nav drawer Jan 15 02:47:13 no clutter Jan 15 02:47:18 we should Jan 15 02:47:19 really start Jan 15 02:47:21 a support Jan 15 02:47:24 fund for Jan 15 02:47:26 people with broken Jan 15 02:47:28 return keys Jan 15 02:48:09 its not me, i swear. server Jan 15 02:48:11 side they aren't Jan 15 02:48:17 buffering my data and appending it properly Jan 15 02:48:20 before they Jan 15 02:48:20 send Jan 15 02:48:28 so it comes out like this, evn Jan 15 02:48:30 though i write Jan 15 02:48:33 full sentences on my screen Jan 15 02:48:38 what Jan 15 02:48:39 ever Jan 15 02:48:53 tcp prob Jan 15 02:48:54 -s man Jan 15 02:51:03 so groxx i dont have a public github pro yet but if I did, and I had some gists, could they find that from my github prof? I'm guesssing right yeah? Jan 15 02:57:46 HevvyMetal: public ones, yes. you can make private gists though. Jan 15 02:58:24 cool so what bout referring to files? Jan 15 02:58:31 if i want to paste say... Jan 15 02:58:41 HevvyBaseActivity groxx Jan 15 02:58:45 and it refers to Jan 15 02:58:51 HevvyProtoActivity Jan 15 02:59:03 could that be one gist or two? Jan 15 02:59:07 bleh Jan 15 02:59:10 yes Jan 15 02:59:12 should that be one gist or two? Jan 15 02:59:18 :) Jan 15 02:59:23 one gist for each letter Jan 15 02:59:25 yes is not the answer to an either or question!! Jan 15 02:59:32 k Jan 15 02:59:34 character* Jan 15 02:59:40 if I have ProtoActivity in gist Jan 15 02:59:48 JesusFreke: agreed Jan 15 02:59:50 meh, I wish my monitor arm could extend farther Jan 15 02:59:59 then can I link to it from BaseActivity? Jan 15 02:59:59 JesusFreke: and **** ENDING LOGGING AT Thu Jan 15 02:59:59 2015