**** BEGIN LOGGING AT Fri Feb 19 02:59:58 2016 Feb 19 03:00:27 it’s 10pm, do you know where your child views are? Feb 19 03:01:14 have any keyword suggestions for searching? Feb 19 03:05:38 I possibly found the problem Feb 19 03:08:16 okay cool, I made a bit of a derp Feb 19 03:08:29 but still I have the issue where some items have more padding on the right than others Feb 19 03:11:58 it has 4 items correct, then the next 2 have extra space to the right Feb 19 03:12:02 and that pattern repeats Feb 19 03:14:00 ah, I have an idea… I think it is because some of the children are not resizing even though their contents shrunk Feb 19 03:18:18 I am quite sure this is what is happening, but I can't figure out how to fix the layout… I tried calling .ForceLayout() and .RequestLayout() on the parent view Feb 19 03:19:45 ah, .RequestLayout() on the particular TextViews worked Feb 19 03:19:57 It's `requestLayout`. This is Java. :s Feb 19 03:20:22 oh right, sorry, I forgot to apply the Java translation Feb 19 03:20:57 Why are you needingn to call View.requestLayout? Feb 19 03:21:03 needing* Feb 19 03:21:30 I don't know why Feb 19 03:22:05 I think something may be wrong. Feb 19 03:23:24 could be, but I'll just accept that it is working now Feb 19 03:28:18 A lightning bolt flies out of the sky. The Android gods are not pleased. Feb 19 03:28:48 haha, well, out of the gods I worship they are not among them Feb 19 03:59:18 DrDuck, any kind of education is worth it for a beginner Feb 19 04:00:46 a couple margaritas and I'm a happy camper Feb 19 04:04:29 hmm, is the Mosby lib a good fit for a basic MVP implementation? Feb 19 04:04:50 guess thats a rather broad question Feb 19 04:15:02 my personal preference; i dont like these 3rd party libraries that try to codify an architectural pattern like MVP ontop of something that didn't have MVP in mind Feb 19 04:15:25 its one thing if google designed something to be clearly opinionated, and MVP or MVVM to begin with ... Feb 19 04:15:35 like MS did with MVVM. its hard to avoid it even Feb 19 04:16:21 i'd rather reuse the pattern than a library in that case Feb 19 04:18:32 g00s: Guess thats a good point. Also, I wasnt a fan of how with Mosby it seemed like it was at the core of your application, everything had to extend or implement those custom Mosby interfaces etc.. Feb 19 04:18:47 though I guess its because it tries to handle things like viewstate easier Feb 19 04:20:15 i get "Plugin with id 'com.android.application' not found." and i tried a few google ideas but none worked Feb 19 04:20:34 aside from learning gradle well is there any other way to get past this issue? Feb 19 04:22:03 jdv79: post your build.gradle Feb 19 04:22:46 Does anyone here have experience on how to tag on an imageview, like what Instagram does? Feb 19 04:23:01 i didn't modify it. i cloned a repo and am just trying to build it. https://android.googlesource.com/platform/packages/apps/DeskClock/+/master/build.gradle Feb 19 04:24:41 jdv79: First SO results suggest to check your gradle version and update built tools, did you do that? Feb 19 04:27:07 br0mahn: What does that mean? Feb 19 04:28:24 TacticalJoke: It's like tagging on a photo itself (the imageview) say for example, "shoes" or "bag" Feb 19 04:28:34 not hashtags Feb 19 04:29:30 when the user touches the image on a certain coordinate, it has the ability to tag it. Feb 19 04:29:49 I haven't found much on stackoverflow. Might need to google more. Feb 19 04:30:04 I did get v2.11 and pointed android studio at it. Feb 19 04:32:51 br0mahn, sounds like an easy problem, handle touches, do work Feb 19 04:33:41 jdv79, android aosp doesn't build using gradle, even though they include a build.gradle, it is insufficient Feb 19 04:36:37 oh. so how does one build this stuff? Feb 19 04:43:49 is there a nicer way of interacting with sql lite than hardcoding awful strings in java? Feb 19 04:44:22 at a minimum i would like to be able to just read from a strings / queries xml file Feb 19 04:44:32 kommunicate not sure if something like jooq exists for android ... Feb 19 04:45:06 every time i see a tutorial with something like String query = "SELECT X "... my brain explodes Feb 19 04:46:16 sql is awful? have you seen other query langs? its not that bad. Feb 19 04:46:36 hello Feb 19 04:46:36 jdv79: i hate the hardcoded strings... total maintenance nightmare Feb 19 04:46:37 most attempts to avoid sql end up being way shittier Feb 19 04:46:39 well, embedding sql in java as strings kinda sucks ... not that sql is bad Feb 19 04:47:02 i would love something a bit more orm-like, but probably not that heavy Feb 19 04:47:09 how can I make a sort of button on the lock screen? i hear lock screen widgets have been retired Feb 19 04:47:14 no. its not a maint nightmare. Feb 19 04:48:54 i've worked on stuff that had sql strings all over, sql strings in a shared lib, and full out ORMS. i think just normal embedded sql is the easiest to work with. Feb 19 04:49:20 but people love making things hard. idk. good luck. Feb 19 04:51:17 jdv79: i respect your opinion, but having worked on systems with each of those approaches, embedded sql is by far and away my least favorite approach Feb 19 04:51:57 sql strings? everyday business milord Feb 19 04:52:05 standard part of any codebase Feb 19 04:56:14 kommunicate i agree with you; anyhow looks like jooq isn't available on android afaict Feb 19 04:56:54 i don't like ORM but find a type safe builder for SQL kinda neat Feb 19 04:57:01 mm.. looks like there's a few alternatives Feb 19 04:57:07 ever tried ormlite? Feb 19 04:57:32 well, now you are into orm territory ... good luck :) Feb 19 04:57:48 I would be all over a JPA-compliant interface Feb 19 04:57:52 that's all i really want Feb 19 04:58:01 oh well, looks like this is going to be a bit more.. involved Feb 19 05:01:29 might anyone know about lock screen custom button? ^ Feb 19 05:01:34 kommunicate Android is ... involved :D Feb 19 05:01:55 regedit 5.0 and above, no lock screen stuff Feb 19 05:02:27 g00s: none at all? come on, what's the workaround :) Feb 19 05:02:44 custom rom maybe :P Feb 19 05:02:49 heh.. Feb 19 05:03:21 on my device I sometimes have what appear to be persistent notifications Feb 19 05:04:04 i googled about that a bit, that seems to be a programmable thing, is it not? a notification that remains persistent until the related app releases it? Feb 19 05:04:45 and in this notification could I not place some custom button that is pressable and have some effect happen as a result? Feb 19 05:06:43 let me ask it this way: I am trying to create some convenient service/facility which ideally should be triggerable even without unlocking the screen. Is such an effect not possible to achieve somehow? Feb 19 05:07:47 at most you'd need to power on the device and tap something. But any more swipes/taps than that would defeat the desired ease of access / convenience factor Feb 19 05:08:22 is that a completely unreasonable requirement? Feb 19 05:13:28 official Volley is on jcenter Feb 19 05:15:36 g00s: was that for me? you're saying such an effect can be triggered via http request? Feb 19 05:15:44 no Feb 19 05:15:53 oh Feb 19 05:29:56 is it possible to have a PreferenceFragment, where a toolbar is ontop of its listview ? Feb 19 05:31:27 need to add it to its view hierarchy Feb 19 05:38:06 ah, easy :) Feb 19 05:41:44 android has support for pressure sensitive touch correct? Which API? Feb 19 05:42:22 whatsTheWord might be thinking of iOS Feb 19 05:43:10 nah, I thought android was supposed to have had support for it, for a long time. I downloaded a test app called markers by a google developer that's supposed to implement it, but using it doesn't show any functionality. Feb 19 05:43:27 I haven't dived in the code yet, but I thought the APIs were supposed to be there. Feb 19 05:44:38 not that i've heard of. requires special touch panels Feb 19 06:16:41 why would one use a Handler over an interface? Feb 19 06:16:53 flexibility? Feb 19 06:19:07 that's completely orthogonal Feb 19 06:19:20 you use a handler for message handling, queuing and processing Feb 19 09:01:59 I have an upload intentservice uploading images, if user selects more images to upload, how to I add more data to that service to upload or start a new service if its not running? Feb 19 09:06:03 Is there something like onNewIntent for intent services? Feb 19 09:26:20 dont activity communicated with interservice via broadcast Feb 19 09:28:13 Ashiren: Isn't it other way around, intentservice communicate with activity using broadcasts? Feb 19 09:28:36 Google docs show some bound service which uses IBinder for communication Feb 19 09:28:58 I wish there was a onNewIntent method in intentservices Feb 19 09:29:27 In IntentService you just override onHandleIntent.. IntentServices takes care of the rest Feb 19 09:33:41 SimonVT: but doesn Feb 19 09:34:05 SimonVT: *but doesn't that queue a new instance of service? Feb 19 09:34:18 No, Services are singletons Feb 19 09:34:33 SimonVT: Oh cool, you are a lifesaver Feb 19 09:34:46 Read the services documentation, it should explain this Feb 19 09:36:47 Or just look at the IntentService implementation, see how it queues tasks Feb 19 09:46:08 Hey, any of you had problems setting control transfers to device connected through Usb? I get constant messages from connected Usb device which basically contain 2 bytes [1, 96] Feb 19 09:51:45 I'm sending HEAD request using HttpURLConnection on background Thread, but it fails on android 4; works ok for android 2.3, 5 or 6, anyone knows what is going on? Feb 19 09:52:51 magic Feb 19 09:53:54 maybe some logs would help :v Feb 19 09:54:26 whats the response when it fails @ Serpent7776 Feb 19 09:56:51 orbyt_, getResponseCode throws IOException, getHeaderFields returns null, haven't check response body, but it should be null or something - it's HEAD, right? Feb 19 09:57:29 Yea, its shouldnt return a body Feb 19 09:59:36 Pretty sure the IO exception should have the response code in it Feb 19 10:01:27 orbyt_, getMessage also returns null inside IOException catch block Feb 19 10:01:41 SimonVT: Didn't work, I just tried startService() twice on an image, it spawned 2 services running parellely Feb 19 10:02:05 oO Feb 19 10:02:21 It didn't Feb 19 10:03:07 orbyt_, maybe I should check getErrorStream, but I don't know how to send data from this stream to Log.d Feb 19 10:05:42 ok think I found how to get String from InputStream Feb 19 10:06:28 So, bind to that service? Feb 19 10:07:41 You don't bind to IntentServices. You send intents with startService, and it will handle them in order.. It does not spawn 2 instances of the same service Feb 19 10:10:51 SimonVT: It didn't. I called startService() twice with 10 images each time, and images from both lists were getting uploaded. Also I am showing progress in notification so I need to update total image count there as well Feb 19 10:12:16 weird, getErrorStream also returns null :/ Feb 19 10:21:53 I can see in server logs that server responds with normal 200 response code Feb 19 10:39:29 Anyone knows how to control number of concurrent upload requests in okhttp? Feb 19 10:54:30 I found a solution: http://stackoverflow.com/questions/17638398/androids-httpurlconnection-throws-eofexception-on-head-requests Feb 19 10:54:55 turns out it was really a EOFException, not a IOException and it's known bug Feb 19 11:05:40 Serpent7776: I think HttpUrlConnection also gives IOException when there's a 404 Feb 19 11:06:27 astroduck, thanks I already fixed this: http://stackoverflow.com/questions/17638398/androids-httpurlconnection-throws-eofexception-on-head-requests Feb 19 11:16:47 Hello everyone, I am trying to create a model that fetch Json data drom a url…. This is just a java class and i am using JsonReader. When i try to run my Test in Android studio.. i get java.lang.RuntimeException: Method beginObject in android.util.JsonReader not mocked… Can anyone suggest a native java class i can use to read json data from url into a Map? Feb 19 11:19:26 spykins, retrofit? :) Feb 19 11:21:55 wtf. suddenly d.android.com shows me japanese localized docs O.o Feb 19 11:22:48 Zharf: what;s retrofit? Feb 19 11:23:11 danijoo, didn't we talk about localization problems a few days ago? Feb 19 11:23:37 spykins, http://square.github.io/retrofit/ Feb 19 11:23:45 yes. And I was the one who said everything is fine with it >.< Feb 19 11:23:46 xD Feb 19 11:23:51 :p Feb 19 11:24:02 karma i guess Feb 19 11:24:28 Thak Feb 19 11:24:49 Thanks Zharf Feb 19 11:38:30 is there a way to change a certain color from an image into something else but keep everything else? Feb 19 11:38:44 I played around with color filters before but they were single color images Feb 19 11:40:21 (drawable) Feb 19 12:33:57 god Feb 19 12:34:04 there isnt one decent react-native app for android Feb 19 12:34:18 you can maybe attribute some faults to the app developers Feb 19 12:34:30 but not 1 is good? Feb 19 12:34:31 hum Feb 19 12:34:59 maybe its react ;) Feb 19 12:35:45 pretty much Feb 19 12:35:45 Well it's the mindset. Feb 19 12:36:02 If you wanna be cheap on dev time and do multiplatform. Feb 19 12:36:12 It probably means you're cheap on UX design and good interaction as well. Feb 19 12:36:25 well, true. Feb 19 12:37:02 but you go look into the featured react-native apps on the react page and every single one of them is a joke Feb 19 12:37:25 we were looking into a react-native hackathon here to get familiar with the tool Feb 19 12:37:56 but after looking into this godawful work im not so sure we can ever accept react projects Feb 19 12:44:46 I'm trying to execute integration tests for a specific build configuration from the command line. unfortunately just doing /gradlew cAT seems to execute them only for one configuration Feb 19 12:46:12 Syzygy, ./gradlew connectedYOURBUILDCONFIGAndroidTEst Feb 19 12:46:20 thanks Feb 19 12:46:27 ie connectedDebugAndroidTest Feb 19 12:46:59 I understand, thanks Feb 19 12:50:30 https://github.com/canelmas/let Feb 19 12:50:36 you boys know this? Feb 19 12:54:28 Nope, seems similar to the solution I wrote for permissions. Except I didn't do annotations. Feb 19 12:55:25 then how is it similar? they're both in java or design for android? Feb 19 12:55:28 :p Feb 19 12:55:50 but seems like a cool thing to use until JakeWharton releases his own version, then we all switch to that one Feb 19 12:55:50 they are both written on keyboards Feb 19 12:56:17 just saying Feb 19 12:58:25 For some reason one of my builds configurations can not run integration tests. it works in api 21+ but not lower, regular builds work as well. the problem is that CallSuper is included twice, once by the support library and once by renderscript. Any idea how I can prevent that issue? Feb 19 13:03:05 Anyone have experience with killing com.example.app : provider dying in process com.example.app? Feb 19 13:06:48 Syzygy: works on other build configurations? Feb 19 13:07:36 barq, I dont have experience with com.example.app :/ Feb 19 13:07:42 jvrodrigues: I can compile everything except the integration tests for lower api levels Feb 19 13:08:09 barq: unclosed cursor if I remember correctly Feb 19 13:08:27 not sure about details, but you can find stuff if you google it Feb 19 13:11:59 whats the best place to (un)subscribe to an observable that emits view events (clicks, edittext etc)? onResume/onStop? Feb 19 13:13:30 on Pause Feb 19 13:13:42 you want to subscribe either onCreate or onPostResume Feb 19 13:13:47 err thats what I meant. onResume/onPause :) Feb 19 13:14:30 subscribing onResume will occasionally lead to state loss Feb 19 13:14:45 (or could) Feb 19 13:15:17 its a fragment so theres no onPostResume Feb 19 13:15:37 ah Feb 19 13:15:41 then its all good Feb 19 13:15:43 onResume Feb 19 13:16:37 i currently have it in onViewCreated but I get some weired bug reports when unsubscribeing. I cant reproduce it :/ Feb 19 13:16:54 But I guess ill just move that code to onResume and see whats happening in production Feb 19 13:19:04 if I bindToLifecycle from onCreateView it unsubscribes in destroy view so that is likely the problem Feb 19 13:20:36 Yeah, onPause makes a lot of sense Feb 19 13:20:46 It's always called and your UI is inactive afterwards. Feb 19 13:20:47 are you subscribing/unsubscribing in onCreateView/onDestroyView? Feb 19 13:21:11 fragment can be in a paused state and its view not been destroyed though Feb 19 13:21:20 so it would still be subscribed Feb 19 13:21:25 and receiving UI updates Feb 19 13:22:10 im subscribing in onViewCreated right now and from the source of RxLifecycle it seems that means it unsubscribes in onDestroyView. Feb 19 13:22:38 what im doing is I swap cursors from a recyclerview depending on the text in a search box Feb 19 13:24:21 and crashlytics shows me some rare crashes I cant track down. I know they happen in this fragment ad the line where they happen is when I replace the cursor with null because of unsubscribing Fatal Exception: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{1cb71439 position=74 id=2031, oldPos=74, pLpos:74 scrap [attachedScrap] tmpDetached no parent} Feb 19 13:24:21 at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:4251) Feb 19 13:24:21 at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4382) Feb 19 13:24:21 at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4363) Feb 19 13:24:25 at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1961) Feb 19 13:24:28 at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1370) Feb 19 13:24:30 at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1333) Feb 19 13:24:32 at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:562) Feb 19 13:24:34 at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2864) Feb 19 13:24:36 at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3071) Feb 19 13:24:38 at android.view.View.layout(View.java:16924) Feb 19 13:24:40 at android.view.ViewGroup.layout(ViewGroup.java:5409) Feb 19 13:24:42 at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) Feb 19 13:24:44 at android.widget.FrameLayout.onLayout(FrameLayout.java:514) Feb 19 13:24:46 at android.view.View.layout(View.java:16924) Feb 19 13:24:48 at android.view.ViewGroup.layout(ViewGroup.java:5409) Feb 19 13:24:50 at android.support.design.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1037) Feb 19 13:24:52 at android.support.design.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:747) Feb 19 13:24:56 at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42) Feb 19 13:24:58 at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1156) Feb 19 13:25:01 at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:760) Feb 19 13:25:03 at android.view.View.layout(View.java:16924) Feb 19 13:25:05 at android.view.ViewGroup.layout(ViewGroup.java:5409) Feb 19 13:25:05 wew lad Feb 19 13:25:07 at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1043) Feb 19 13:25:09 at android.view.View.layout(View.java:16924) Feb 19 13:25:11 at android.view.ViewGroup.layout(ViewGroup.java:5409) Feb 19 13:25:13 at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) Feb 19 13:25:15 at android.widget.FrameLayout.onLayout(FrameLayout.java:514) Feb 19 13:25:17 at android.view.View.layout(View.java:16924) Feb 19 13:25:19 at android.view.ViewGroup.layout(ViewGroup.java:5409) Feb 19 13:25:21 if only someone had invented a website to paste shit to. Feb 19 13:25:21 at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702) Feb 19 13:25:25 at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556) Feb 19 13:25:27 at android.widget.LinearLayout.onLayout(LinearLayout.java:1465) Feb 19 13:25:29 at android.view.View.layout(View.java:16924) Feb 19 13:25:30 like a bin, where you can paste your shit Feb 19 13:25:31 at android.view.ViewGroup.layout(ViewGroup.java:5409) Feb 19 13:25:33 at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) Feb 19 13:25:35 at android.widget.FrameLayout.onLayout(FrameLayout.java:514) Feb 19 13:25:36 milion dollar idea boys Feb 19 13:25:37 at android.view.View.layout(View.java:16924) Feb 19 13:25:39 at android.view.ViewGroup.layout(ViewGroup.java:5409) Feb 19 13:25:41 at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702) Feb 19 13:25:43 at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556) Feb 19 13:25:45 at android.widget.LinearLayout.onLayout(LinearLayout.java:1465) Feb 19 13:25:47 dafuq Feb 19 13:25:47 at android.view.View.layout(View.java:16924) Feb 19 13:25:49 at android.view.ViewGroup.layout(ViewGroup.java:5409) Feb 19 13:25:51 at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) Feb 19 13:25:52 funny that his client has spam protection Feb 19 13:25:53 someone kick him? Feb 19 13:25:55 at android.widget.FrameLayout.onLayout(FrameLayout.java:514) Feb 19 13:25:57 at android.view.View.layout(View.java:16924) Feb 19 13:25:59 at android.view.ViewGroup.layout(ViewGroup.java:5409) Feb 19 13:26:01 at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2452) Feb 19 13:26:03 at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2156) Feb 19 13:26:05 at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1298) Feb 19 13:26:05 kick him ffs Feb 19 13:26:07 at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6982) Feb 19 13:26:09 at android.view.Choreographer$CallbackRecord.run(Choreographer.java:821) Feb 19 13:26:11 at android.view.Choreographer.doCallbacks(Choreographer.java:606) Feb 19 13:26:13 at android.view.Choreographer.doFrame(Choreographer.java:576) Feb 19 13:26:15 at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:807) Feb 19 13:26:17 at android.os.Handler.handleCallback(Handler.java:739) Feb 19 13:26:19 at android.os.Handler.dispatchMessage(Handler.java:95) Feb 19 13:26:21 at android.os.Looper.loop(Looper.java:145) Feb 19 13:26:25 at android.app.ActivityThread.main(ActivityThread.java:6872) Feb 19 13:26:26 the first line would have sufficed mate Feb 19 13:26:27 at java.lang.reflect.Method.invoke(Method.java) Feb 19 13:26:29 at java.lang.reflect.Method.invoke(Method.java:372) Feb 19 13:26:31 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) Feb 19 13:26:33 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) Feb 19 13:26:35 oh shit.. Feb 19 13:26:37 sorry Feb 19 13:26:39 wrong clipboard :/ http://pastebin.com/AEbQZvJy Feb 19 13:26:40 you are updating your ui after the fragment was dettached Feb 19 13:26:41 already had it in pastebin and forgot to strg+c again ;) Feb 19 13:26:41 too late Feb 19 13:26:53 jvrodrigues, yep that was my guess too Feb 19 13:27:13 which means you are not unsubscribing where you should be unsubscribing Feb 19 13:27:26 onResume/onPause are good options Feb 19 13:28:16 canvs2321, my client has spam protection? Feb 19 13:29:26 haha Feb 19 13:29:58 antiflood,so don't get spam kicked Feb 19 13:30:09 good to know ;) Feb 19 13:30:53 Get rid of the fragment :P Feb 19 13:30:57 But i think we dont have spam protection in here anyways Feb 19 13:31:11 Guys, please help me write some nicer codes :P Could someone code review a function for me ? I have it in gist :) Feb 19 13:31:14 Hello. What is the best practice these days for managing asynctasks spawned from an activity or fragment? Should I just keep a list of them and cancel them all on detach/destroy? Feb 19 13:31:42 suhas_sm: Don't ask to ask just ask. Feb 19 13:31:50 :| Feb 19 13:32:04 https://gist.github.com/suhas-sm/c870f311a54803b8f3d7 Feb 19 13:32:22 please tell me how can I possibly break this method down in smaller methods Feb 19 13:32:29 cordovafan8: Asynctasks should not perform long running tasks Feb 19 13:32:35 I hate watching such methods because of volley ( Feb 19 13:32:54 use retrofit Feb 19 13:33:03 move the listener to a seperate file Feb 19 13:33:11 that breaks it down to 17 lines Feb 19 13:33:47 hmm Feb 19 13:33:48 and then delete both files and use retrofit :p Feb 19 13:34:18 ahahaha the twist :D Feb 19 13:34:19 and then use broadcast listener to tell about response ? Feb 19 13:34:26 haha thats the future plan Feb 19 13:34:36 I fuckin hate volley Feb 19 13:34:45 too many lines of code Feb 19 13:35:21 You can also post this on codereview.stackexchange. Feb 19 13:35:54 I this community :) Feb 19 13:36:02 like** Feb 19 13:37:11 @danijoo I am correct about the listener ? or use callback or something ? #noRXPleaseForNow Feb 19 13:39:02 suhas_sm: EventBus Feb 19 13:39:06 please use an event bus Feb 19 13:39:10 please Feb 19 13:39:24 I have only 5 network calls. Feb 19 13:39:47 jvrodrigues: these are not long running tasks, but I still want to manage the asynctasks Feb 19 13:39:48 like it is absolutely impossible to have a stable android app if you dont use some form of the observable pattern Feb 19 13:39:54 To start the trip, to end the trip and couple of others apart from this in the gist which uploads locations. Feb 19 13:40:17 cordovafan8: let them finish, and if they have a listener the listener respondes to the result if not then all is good Feb 19 13:40:22 jvrodrigues, thats not right. What do you think did the people do before event bus? Feb 19 13:40:23 dont go down the road of trying to cancel them Feb 19 13:40:44 jvrodrigues: and if the calling activity is destroyed? Feb 19 13:40:49 danijoo the same thing i did, their own observables using singletons, thers not so much science behind event bus Feb 19 13:40:51 then I have memory leaks everywhere Feb 19 13:41:10 cordovafan8: if the activity is destroyed your async task will be destroyed within 5-10 seconds Feb 19 13:41:31 I don't think that is guarranteed anywhere from what I can see Feb 19 13:41:34 jvrodrigues, BroadcastReceiver are a solution too. But I dont like them too. But they arent unuseable Feb 19 13:42:22 cordovafan8: yes, yes it is, also you technically dont even need an instance of your activity inside the async task Feb 19 13:42:26 you can just use an event bus Feb 19 13:42:37 and post an event after its done Feb 19 13:42:47 Yep, I have location listener and gcm listner, both broadcast intents Feb 19 13:42:58 if in between the activity gets recreated the new one will get whatever the old one started Feb 19 13:43:00 or simple check if the passed activity is still valid or finished. Feb 19 13:43:20 or just dont pass an activity? Feb 19 13:43:23 for screen rotation you can also use a headless fragment Feb 19 13:44:05 I'm facing a weird bug [https://dpaste.de/zUix] if value of upload_status = "Uploaded %s of %s photos" notification doesn't show when uploadCount = 0 and totalCount = 1 changing upload_status to "%s of %s photos uploaded" fixes it Feb 19 13:44:18 BroadcastReceivers have their uses. None of them relates to this. Feb 19 13:44:18 jvrodrigues: that's if you use an event bus. If you're just relying on callbacks, the asynctasks will keep a reference to the activity with the callbacks right? That would mean the entire activity sticks around in memory until the asynctask is done. I'm sure there are cases where this will fail or take longer than expected (network problems etc) Feb 19 13:44:36 I am probably doing something dumb, but I have no idea what. Any clue? Feb 19 13:45:53 cordovafan8: yes. but 1- dont try to cancel a network request while its working. Seriously, dont go down that road, its like arguing with a crazy person. 2. Use an event bus instead, so that if the activity gets destroyed the result is still used Feb 19 13:45:58 astroduck, whats showing up instead? Feb 19 13:46:14 danijoo: no notification Feb 19 13:46:44 astroduck, did you attach a debugger to ssee why Feb 19 13:47:04 changing uploadCount / totalCount to any other value shows it again Feb 19 13:47:15 it showed nothing weird happening in my code Feb 19 13:47:19 didn;t look into android Feb 19 13:47:46 feels to me that your cause/effect relation is faulty Feb 19 13:47:54 astroduck, what makes you think its because of conttentText and not your if/else clause Feb 19 13:48:10 i guess one of those if/else branches doesnt lead to a visible notification Feb 19 13:48:30 danijoo: I tried removing all if else and writing notification part outside makes it work Feb 19 13:49:04 also, hardcoding setContentType to say "..." also shows notification as expected Feb 19 13:50:37 content...type? Feb 19 13:50:44 jvrodrigues: can you provide more information on why you recommend against trying to cancel asynctasks? It seems that event busses are not easily implemented without a library. Feb 19 13:50:47 Type, setContentText Feb 19 13:50:55 *typo Feb 19 13:51:01 :D Feb 19 13:51:01 typoception Feb 19 13:51:09 there doesn't seem to be a reason you can't just check isCancelled() at strategic points Feb 19 13:51:11 cordovafan8 there are several ways to go at it without implementing a library Feb 19 13:51:36 why not using a library Feb 19 13:51:45 Is it a bad idea for an Activity to implement a listener and then pass the Activity where the listener is needed? Feb 19 13:51:47 you can keep a collection of callbacks in an application singleton and add/remove within the activity lifecycle Feb 19 13:51:48 those are already tested solutions to your problem\ Feb 19 13:52:11 barq depends Feb 19 13:52:23 jvrodrigues: how is that different than doing the same with a list of asynctasks? Feb 19 13:52:39 cordovafan8: you dont hold activity in the asynctask? Feb 19 13:52:41 barq, thats done a lot - for exapmple as click listener Feb 19 13:53:15 barq: rule of thumbs: if whatever you're passing your listener to has a life expectancy bigger than that of the activity, dont do it Feb 19 13:53:25 and asynctasks are one of these things Feb 19 13:53:58 a view is bound to the activity lifecycle Feb 19 13:54:00 so thats fine Feb 19 13:54:57 unregistering listeners isn't that big of a deal Feb 19 13:55:56 why might findViewById() return null? Feb 19 13:56:08 it's not found Feb 19 13:56:16 RustySha1kleford, because your id is wrong Feb 19 13:56:19 because the view with whatever id is not a child Feb 19 13:56:46 guess that would make sense. I can't think of another reason it would be null Feb 19 13:56:57 ugh, too early to be tracking down null pointer exceptions Feb 19 13:57:06 cordovafan8, good read: http://simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ Feb 19 13:57:10 its 3 pm here Feb 19 13:57:22 danijoo: link is already purple :) Feb 19 13:57:36 cordovafan8, good re-read :p Feb 19 13:57:40 async tasks arent bad Feb 19 13:57:44 people just dont know how to use them Feb 19 13:58:05 jvrodrigues, dont judge a post by its click-bait title. Feb 19 13:58:11 at least before reading it Feb 19 13:59:41 danijoo: I'm already using the fragment setRetainInstance method to work around configuration changes. Feb 19 14:01:09 cordovafan8: use an event bus. Feb 19 14:01:19 the gods of development will thank you Feb 19 14:01:47 things would be so much easier if the application had an event bus implemented in it by default, you really cannot make a decent app without making use of some sort of observable pattern Feb 19 14:01:55 application class, I mean Feb 19 14:02:13 or the framework had a builtin bus Feb 19 14:02:25 jvrodrigues, ehm. Feb 19 14:02:53 jvrodrigues, you mean this one: https://developer.android.com/reference/android/support/v4/content/LocalBroadcastManager.html ? :) Feb 19 14:03:16 Even though it's more tedious to use than EventBus tho Feb 19 14:03:20 sort of like that one Feb 19 14:03:32 jvrodrigues: can you explain why this somehow gets around the need for AsyncTask to reference the activity? Does the eventbus not just send the activity reference to the asynctask when it calls getInstance()? Aren't we instead just keeping a reference to all active activities in the event bus instead? Feb 19 14:03:34 with the difference that it isnt a joke :/ Feb 19 14:03:46 cordovan imagine you have an object Feb 19 14:03:56 that holds a reference to the activity Feb 19 14:04:10 got it Feb 19 14:04:11 and the activity can remove/add a reference of itself to that object Feb 19 14:04:33 then the asynctask goes to that object and just grabs whichever activity is registered to it Feb 19 14:04:35 cordovafan8, the difference is the bus takes care that no already gone activity is held and gets the event Feb 19 14:04:49 not caring about lifecycle stuff Feb 19 14:06:06 hrmm Feb 19 14:06:56 would the event bus way be better than AsyncTaskLoader too? I've not investigated that, but it seems like another alternative. Feb 19 14:08:47 also, shouldn't you still cancel the asynctask if the relevant activity is destroyed 'permanently'? I mean, I know in the event bus model it won't hold a reference to the activity, but isn't it just a good idea to do cleanup? Feb 19 14:09:36 It is, otherwise the CPU will still be used. Feb 19 14:09:37 maybe I should be moving all my network requests to a service or something instead. Feb 19 14:09:42 Of course, if the operation is cancellable. Feb 19 14:09:58 What would that accomplish? :) Feb 19 14:10:27 well it would save me writing that code later if I need to do a network request that doesn't update the ui Feb 19 14:10:40 because I assume asynctask is not the right option for that (iirc) Feb 19 14:11:03 Another interesting read - http://stackoverflow.com/questions/22871206/otto-vs-localbroadcast Feb 19 14:12:56 cordovafan8, maybe bite the Rx bullet early Feb 19 14:13:04 and switch to sane concurrency management? :) Feb 19 14:13:16 why does everyone recommend this library all of a sudden Feb 19 14:13:24 I'll have to read up Feb 19 14:13:33 suhas_sm, yep, pretty much my experience as well Feb 19 14:13:44 haha Rx sounds super cool. Everyone is talking about it. Feb 19 14:14:01 So you went with Otto or stuck to LBM ? Feb 19 14:14:03 Hype, mostly, useful and good library aswel Feb 19 14:14:33 RxAndroid or RxJava, both are different libraries I believe Feb 19 14:14:45 Nop. Feb 19 14:15:00 I mean, RxAndroid is just a small lib that adds some Android specific niceties to RxJava. Feb 19 14:15:10 RxAndroid is 4 classes that make RxJava understand the main thread Feb 19 14:16:21 Oh Nice Feb 19 14:16:29 Straight from the horses mouth ;-) Feb 19 14:17:39 haha Feb 19 14:17:51 I'm just worried about adding dependencies early on that might bite me later Feb 19 14:18:01 when I can probably do all I need with Asynctask Feb 19 14:18:29 you can, ofc, if done right Feb 19 14:18:34 :/ Feb 19 14:29:38 anyone knows how to change the indentation when instantiating a new class http://i.stack.imgur.com/BRbpk.png ? It's too big, i can't stand that huge whitespace there Feb 19 14:30:05 is there any real noticeable difference in terms of performance between MBP 13 inch i5 vs i7 Feb 19 14:30:23 spent a while looking at the Editor -> Code Style -> Java and can't find any way to reduce that huge annoying white space Feb 19 14:30:40 maybe i'm starting to get OCD or something but that is ridiculous Feb 19 14:30:53 it's like 5 times the tab distance Feb 19 14:30:56 Twirl: it only started doing that recently to me, very annoying. Feb 19 14:31:19 love your visual presentation though Feb 19 14:31:20 jvrodrigues: have you managed to disable that wonderful feature? because it's really annoying Feb 19 14:31:30 I havent Feb 19 14:32:04 but then again i tend to create static inner classes instead of anonymous classes Feb 19 14:32:16 because I really dont like how the code looks with anonymous classes Feb 19 14:32:27 man that is really wrong Feb 19 14:32:40 having to change your program because the editor makes your code look ugly Feb 19 14:32:44 what a time to be alive Feb 19 14:32:48 ahaha Feb 19 14:32:53 not just the format of the code Feb 19 14:32:56 reading in general Feb 19 14:33:22 I've not seen this happening, Twirl. Is this 2.0? Feb 19 14:33:24 plus there arent any real drawbacks to an inner class compared with an anonymous one Feb 19 14:33:24 yea well i can't stand that huge whitespace Feb 19 14:33:42 as long as its static ofc Feb 19 14:33:42 jvrodrigues: more lines of code maybe? Feb 19 14:33:47 Yeah, an anonymous class *is* an inner class. Feb 19 14:34:02 TacticalJoke: it's 1.5.1 Feb 19 14:34:09 Same here. Feb 19 14:34:10 TacticalJoke: should i upgrade this? i'm on mint Feb 19 14:34:17 Twirl: Im a java developer, if I didnt like to write pointless code Id be in the wrong business Feb 19 14:34:25 haha Feb 19 14:34:41 hello, im using a searchview and coloring filter text like this http://paste.ubuntu.com/15131842/ , but these characters ÖÇİ etc. skipped and this causes problems. any suggestion for coloring chars or how i can fix this ? Feb 19 14:36:05 seriously, nobody knows how to fix that? Feb 19 14:36:19 TacticalJoke: u haven't seen this happen? Feb 19 14:36:37 it only seems to happen sometimes though Feb 19 14:36:42 its not with every anonymous class Feb 19 14:36:52 I don't think I've ever seen it. :s Feb 19 14:37:44 TacticalJoke: u on windows? Feb 19 14:42:01 alright, i kind of found a fix Feb 19 14:42:39 moving the new Class.. to a new line Feb 19 14:44:06 move the new class to a new file Feb 19 14:44:31 lol can't Feb 19 14:45:22 Reset your code style, I don't believe it happens by default Feb 19 14:47:17 it's one of the ticks in the styl settings Feb 19 14:47:27 I like it that way though Feb 19 15:02:15 Zharf: it looks like the setting "Use indents relative to expression start" it's evaluating the new as the expression start instead of the call.enqueue( Feb 19 15:02:37 yep Feb 19 15:02:53 it's semantically correct Feb 19 15:02:56 either case, the setting isn't doing anything and now i have a choice of having a huge white rectangle in my screen or having a line that looks like call.enqueue( Feb 19 15:03:57 i'm going to go with the second one i guess Feb 19 15:12:00 inner class? Feb 19 15:12:11 extend the interface? Feb 19 15:12:24 anything but an anonymoose class Feb 19 15:16:53 how to set DNS on android? Feb 19 15:21:05 how to set DNS server on android? Feb 19 15:43:01 java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack trace available Feb 19 15:43:04 nice Feb 19 15:46:09 Syzygy: not your day today haha Feb 19 15:46:54 I guess I was to stupid to increment a counter which would move the while loop that was supposed to create subsections of a list forwards by 1000 Feb 19 15:49:15 I just named a variable "childCollapseOnTouch" Feb 19 15:49:21 Well that's awkward. Feb 19 15:53:32 hi folks, my app already has an option to email logs to us via an ACTION_SEND intent. I'd like to add an option to the chooser so the user can save the logs to the sdcard. is there any easy system intent i can add for this? Feb 19 15:54:17 this is incorrect isnt it? Feb 19 15:54:37 android:layout_below="@+id/view_name" Feb 19 15:55:16 why would it? Feb 19 15:55:22 you use the + sign when assigning a new id Feb 19 15:55:26 not really Feb 19 15:55:46 oh really? alright Feb 19 15:55:53 I mean Feb 19 15:56:03 it works Feb 19 15:56:06 yea, its assigning a new id, but doesnt necessarily have to be in the id section Feb 19 15:56:24 well its referencing an id that already exists Feb 19 15:56:29 it generates that id in case it didnt already have Feb 19 15:56:33 you use the + to create a new id Feb 19 15:56:36 not assign Feb 19 15:57:07 doesnt always create one Feb 19 15:57:11 they're using @+id all over the place. I guess it doesn't create a new id unless you use it in android:id Feb 19 15:57:13 like in the afforementioned case Feb 19 15:57:43 that's false Feb 19 15:58:10 you could have layout_below="some_id" in an element thats above the some_id element Feb 19 15:58:19 it creates, of course, if it has already been created, it won't be created again Feb 19 15:58:22 if you dont add that id it wont inflate the xml and will throw an exception Feb 19 15:58:29 add as in create Feb 19 15:59:27 no, it gets ignored Feb 19 15:59:44 for relativelayout rules Feb 19 15:59:47 huh? not as far as I remember Feb 19 16:00:07 you remember wrong Feb 19 16:01:26 huh? Feb 19 16:01:35 Error:(12, 31) No resource found that matches the given name (at 'layout_below' with value '@id/tv_title'). Feb 19 16:01:41 i remember correctly lad Feb 19 16:01:47 you didn't + Feb 19 16:02:04 well yea Feb 19 16:02:13 you pretty much always must + Feb 19 16:02:14 thats what I was saying, if you dont add the plus it wont work Feb 19 16:02:33 you said relative layout ignores it Feb 19 16:02:40 er wait. You always need to use + when? Feb 19 16:03:07 I thought you only NEED to use it when you're declaring a view's id Feb 19 16:03:13 no Feb 19 16:03:26 unless you have predefined id, you must always + Feb 19 16:03:31 no again Feb 19 16:03:47 you need the plus when declaring a new views id Feb 19 16:03:51 yes, you can try to not +, but you'll encounter issues Feb 19 16:03:56 it's lexical Feb 19 16:03:59 so, no Feb 19 16:04:13 + creates a new constant, not a views id Feb 19 16:04:30 yea Feb 19 16:04:33 pfn: er thats my point. You define android:id in one view (using +) Feb 19 16:04:48 RustySha1kleford, no Feb 19 16:04:50 and then you reference it in another view with @id, not @+id Feb 19 16:04:50 you need to create a new one if it hasnt been created before Feb 19 16:04:56 always use + Feb 19 16:05:09 oh man I have no idea what i'm talking about :( Feb 19 16:05:09 anything else leads to confusion and error Feb 19 16:05:29 you should omit + for id that you do not create yourself Feb 19 16:05:41 if you have a textview element that defines an id, and another element after that that references that id, you dont need the plus Feb 19 16:05:59 that's the key points, it's lexical Feb 19 16:06:21 I don't follow. What does being lexical have to do with it Feb 19 16:06:28 so always use +, unless you want to be shuffling around + when you refactor xml Feb 19 16:06:37 yea, thats what he meant Feb 19 16:06:43 no harm can come from using + Feb 19 16:06:48 harm can come from not using it Feb 19 16:06:52 thus the statement always use it Feb 19 16:07:01 okay gotcha Feb 19 16:07:10 so it has to do with scope? Feb 19 16:07:39 whether or not you NEED the + Feb 19 16:07:50 the xmls are read vertically from top to bottom, thats how ids are generated, if you reference an id on top that is only created on the bottom theres problems Feb 19 16:08:02 if you dont use the plus Feb 19 16:08:05 its basically that Feb 19 16:08:08 :/ Feb 19 16:08:13 not hard to understand at all Feb 19 16:08:19 now I understand Feb 19 16:08:27 perfect thanks Feb 19 16:08:36 no worries :) Feb 19 16:08:39 why didn't you explain it like that before? :P Feb 19 16:08:59 mostly because im retarded Feb 19 16:09:07 same here Feb 19 16:09:10 I need more coffee Feb 19 16:10:07 I irc from a phone, the fewer words I type, the better Feb 19 16:14:36 @jvrodrigues "@+id" info is good ! Feb 19 16:18:40 genymotion is excellent Feb 19 16:18:49 I need to convince my manager that we need it Feb 19 16:19:06 we dev in the android emulator. It is such a waste of time Feb 19 16:20:48 huh. Feb 19 16:21:08 We decided to drop Genymotion after buying it :P Feb 19 16:21:27 why is that? Feb 19 16:21:42 Their licensing system and gmtool is pretty terrible. Feb 19 16:21:44 I almost like it better than dev on a physical device Feb 19 16:22:02 having devices is still the way to go i think Feb 19 16:22:02 And after 6th lockout due to their licensing server issue it stops being funny.- Feb 19 16:22:09 I'd rather tell my manager to buy me one of each device so I can test on them Feb 19 16:22:19 I have never had issues with genymotion though Feb 19 16:22:23 Plus the new emulator is comparable in performance and has some neat features. Feb 19 16:22:31 shmooooz, you need those anyway Feb 19 16:22:39 annoything to develop on hardware device tho Feb 19 16:23:00 jvrodrigues, if you don't have a license or a single license it's ok Feb 19 16:23:11 its rediculous. We try to get more devices Feb 19 16:23:11 I do have a license ofc Feb 19 16:23:14 if you wanna do something more with it like CI or deploy it in a company they get broek Feb 19 16:23:15 never ran into issues Feb 19 16:23:16 :/ Feb 19 16:23:18 I'm not sure why business won't go for it Feb 19 16:23:28 ah, yea, ofc Feb 19 16:23:30 do they not realize what an incredible waste of time this is? Feb 19 16:23:42 we bought it to test some tablet configurations we didnt otherwise could Feb 19 16:23:48 due to device limitation Feb 19 16:23:56 emulator problems make a 1 day story take 3 Feb 19 16:24:31 nothing like the feel of a real device imho Feb 19 16:24:58 I keep an htc, samsung, nexus and 1+1 on my desk Feb 19 16:25:24 nexus 5 I should say Feb 19 16:25:26 funny I said that Feb 19 16:25:34 htc one Feb 19 16:25:37 and S6 Feb 19 16:25:37 emulator crashed, I have to restart it for the second time today Feb 19 16:27:34 performance testing in samsung galaxy S and nexus S Feb 19 16:42:34 Huh, how is it even possible that an UP motion event get triggered without triggering DOWN and/or MOVE? Feb 19 16:42:44 I have a bunch of custom views in an linearlayout. I want to iterate through the children of the linearlayout and call a function on each one. Problem is I have a random that shows a horizontal rule and that View doesn't have the function that the other children have. How should I go about checking the type of the view that is returned by linearlayout.getChildAt(i) ? Feb 19 16:43:18 deadmund you can set a tag Feb 19 16:43:27 casadogg: What is a tag? Feb 19 16:43:36 it's a parameter of the view, every view has one Feb 19 16:43:54 android:tag at xml Feb 19 16:44:01 then getTag() Feb 19 16:44:05 casadogg: So I set the tag for my custom view in the xml and then in the java check the tag before calling the method? Feb 19 16:44:06 yeah Feb 19 16:44:07 thanks! Feb 19 16:44:16 np :) Feb 19 16:45:00 getTag returns an object? Feb 19 16:45:09 Yeh... and by the way you can simply use ID too Feb 19 16:45:31 if it's not a dynamic object, just compare getId() with R.id.yourview Feb 19 16:45:38 dynamic view* Feb 19 16:45:48 if you use getTag, just cast to string Feb 19 16:46:06 casadogg: Problem is that getChildAt(i) returns View so I have to cast it. I can't... Feb 19 16:46:16 oh, I can maybe look at R.id.myview... Feb 19 16:47:03 Tag parameter is from a view, you cast it like this (String) getChildAt(i).getTag() Feb 19 16:47:23 but just use the id, it's easier Feb 19 16:47:35 wait wait wait... my view is a custom view. there are several of them so they would have different IDs. Am I creating a attr name="tag" in the resources file? Feb 19 16:47:53 no, the View object already has the tag parameter by default Feb 19 16:48:26 if you extend View or any of it's subclasses, your custom view already has the getTag() and setTag() methods, as well as the tag parameter, android:tag Feb 19 16:48:30 but just compare the id :p Feb 19 16:49:32 casadogg: I have about 15 of these custom views (in a list) there could be arbitrary many. I don't want to have to set an ID on each one. Plus the ID's would have to be unique and my code to check the ID would have to take that into account which is messy! Feb 19 16:50:40 Oh ok, then use tag.. : p Feb 19 16:51:40 casadogg: Can I define the tag for all "customview" objects? Like a default value if it is not defined by the user? Feb 19 16:51:43 ugh, can't find my headset, have to buy another Feb 19 16:54:09 deadmund I suppose you could at your custom view's constructor Feb 19 16:54:19 setTag(defaultTag) Feb 19 16:54:38 how do you lay out all these custom views? Feb 19 16:54:40 xml? Feb 19 16:55:38 casadogg: yes. Feb 19 16:56:03 I love working from home Feb 19 16:56:16 my desk with a big ass monitor beats working on a laptop so much Feb 19 16:56:36 force your employer to provide a proper workstation Feb 19 16:56:54 they cram so many people into this room Feb 19 16:57:04 there are some, but I'm at the bottom of the totem pole Feb 19 16:57:07 for now Feb 19 16:57:31 deadmund then set the default tag inside the (Context, AttributeSet) constructor of your customview Feb 19 16:57:40 but hey, the almost encourage you to wfh. Great for a heads down coding day Feb 19 16:57:55 verify if the user has set a tag, if not it will be null, set your default tag. Feb 19 16:58:07 Anyone know where I'd find some code for applying a notch filter in java? Feb 19 16:58:17 casadogg: brilliant! Thank you! Feb 19 16:58:21 RustySh1kleford also noisy motherfuckers Feb 19 16:58:26 people won't shut up Feb 19 16:58:43 starting pointless arguments, etc. Feb 19 16:58:51 theres not really like assigned seating Feb 19 16:59:06 so i'll be working quietly when all of the sudden, flash mob meeting Feb 19 16:59:09 is there a built-into-AS way to retrace proguard mappings? Feb 19 17:00:02 casadogg: You the best! Feb 19 17:00:22 I'm not but thank you Feb 19 17:06:09 I have another strange question. I have a number picker that allows the user to select increments of 5. I have called setFormatter to return String.valueOf(value * 5) and likewise, whenever I use getValue() on the picker I have to * 5. Now, if I try to set np.setValue() I divide by 5 (makes sense) but when I scroll the number picker, the numbers immediately jump all around? what is happening? Feb 19 17:13:54 I'm going to try implementing the bandstop code at the bottom of this page as a static utilitiy method: http://digitalsoundandmusic.com/7-3-2-low-pass-high-pass-bandpass-and-bandstop-filters/ Feb 19 17:16:08 do you guys suscribe to google music? Feb 19 17:16:16 I'm so sad the ruined the app for free users like me Feb 19 17:16:29 i do Feb 19 17:16:55 s73v3r: worth it you think? Feb 19 17:16:59 I do too Feb 19 17:17:04 their selection looks pretty good Feb 19 17:17:22 it’s not bad. on par with most services. Feb 19 17:17:40 of course, I got in at the beginning, so I save $2/month Feb 19 17:18:35 now when I search for music, they display store results above the music I uploaded Feb 19 17:18:46 I have to scroll way down to find my music hah Feb 19 17:26:41 is there a nice way to import non-icon drawables in android studio? Feb 19 17:31:11 cool idea http://www.gizmag.com/nexdock-smartphone-laptop-dock/41891/ Feb 19 17:31:46 i think google should do that too, unify android / chrome and have the phone be the heart of it Feb 19 17:34:26 g00s: reminds me of the ubuntu phone Feb 19 17:34:41 I do love the idea of a phone you can dock and use like a desktop/laptop Feb 19 17:36:58 RustySha1kleford, yeah very much down for this Feb 19 17:39:23 RustySha1kleford, i saw a USB-C demo at CES that did this Feb 19 17:39:35 tablet with USB-C adapter to HDMI / USB3 Feb 19 17:42:40 desktops are faster but lately i'm all about portability Feb 19 17:43:00 I like that I can pick up my dev environent and go. I dust off the desktop only for video games now Feb 19 17:43:30 RustySha1kleford, i'm mixed. i have a Lenovo Y50 which is a fairly powerful 15", but it has terrible battery life, so I got a Toshiba Chromebook2 which has like 10 hour battery Feb 19 17:43:35 its too bad laptop docking stations fell out of style, I think that would be super useful Feb 19 17:43:57 RustySha1kleford, several companies are working on external GPU devices for laptops Feb 19 17:44:13 so maybe in the near future an ultrabook will be able to play high-end games Feb 19 17:44:28 it sounds like usb-c is fast enough to do it Feb 19 17:49:04 > coworkers complain about deadlines Feb 19 17:49:17 > talk 80% of the time instead of working Feb 19 17:51:19 casadogg, meh, have some solidarity ;) Feb 19 17:51:43 I get it, it gets boring Feb 19 17:51:56 Then go have a walk or talk outside Feb 19 17:52:08 It disturbs concentration Feb 19 17:52:09 casadogg, ah, agreed with that Feb 19 17:56:03 anyone using PreferenceFragmentCompat - is it broken with nested s? when i click on one, nothing happens Feb 19 18:00:17 great docs google "The preference framework handles showing these other screens from the preference hierarchy." Feb 19 18:00:40 yet ... "PreferenceFragmentCompat.OnPreferenceStartScreenCallback Interface that PreferenceFragment's containing activity should implement to be able to process preference items that wish to switch to a new screen of preferences. " Feb 19 18:01:37 This is driving me crazy. How can a move action be called without an action down being called in a touch event? Feb 19 18:02:31 motionevent action* Feb 19 18:02:37 yeh, move action Feb 19 18:02:39 lol. Feb 19 18:06:13 guys, could you please help me with this question http://stackoverflow.com/questions/35511883/android-appbarlayout-collapse-and-show-scrim-colors-without-delay Feb 19 18:12:05 ok, so I've been implementing my asynctasks in dummy fragments to avoid issues with configuration changes, but this requires calling setRetainInstance() on these dummy fragments. I've now learned that you can't use this function in nested fragments, which means all the asynctasks must be at the activity level. Is there a way around this restriction? Feb 19 18:15:23 are there guidelines on Material Design how to handle large texts? Feb 19 18:15:49 I can't avoid them, they need to be included, and a WebView is the last option IMO, are there others? Feb 19 18:21:49 belgianguy could you do something like Play Books ? would require pagination Feb 19 18:22:14 hmm, wonder if those pages are webviews though Feb 19 18:25:59 g00s: ah, thanks, I'd have to review Play Books then :) Feb 19 19:10:22 can I use RECEIVE_BOOT_COMPLETED to fully start my app? and do you guys think that's a bad idea? like background service might be a better idea than starting the whole thing, idk Feb 19 19:12:15 sounds like something I would want to block grekkos Feb 19 19:12:54 you know, it’s bad enough that gradle can’t handle duplicate classes in libraries. Would it honestly be that hard to tell me where all the duplicate instances that you’re complaining about are? Feb 19 19:13:25 missingno: I figured as much. Just doing some useful digging and checking for the reaction (which is what I expected) thanks! Feb 19 19:29:07 hmm new iterm beta... brb Feb 19 19:45:26 I know people have mentioned a java-specific concurrency book here before, and I’m now looking for one. I imagine pretty much any one will do (heck, online docs really will do, but I like to read paper sometimes). On Amazon I see “concurrent programming in java” and “java concurrency in practice” and I don’t recall the stated favorite. Feb 19 19:45:29 thoughts? Feb 19 19:45:41 duboisj JCIP Feb 19 19:45:48 Anyone know what to do when your Test APK runs over the Dex limit? Feb 19 19:45:54 ok. I thought it was one of those two. tx Feb 19 19:47:07 would be nice if JCIP was updated though ... kinda getting out of date Feb 19 20:01:46 it specifically says that multidex can’t be used for test APKs :( Feb 19 20:02:04 wow never heard that before Feb 19 20:02:16 it’s at the bottom of the page on multidex Feb 19 20:02:49 what's a test apk Feb 19 20:03:04 I've been instrumentation testing with multidex for awhile Feb 19 20:03:04 its the APK that gets built to run stuff like Espresso tests Feb 19 20:03:28 your app is multidex, or your tests are Feb 19 20:03:29 I did have silly issues with the actual adb install timing out due to apk size Feb 19 20:03:36 oh Feb 19 20:03:40 I see Feb 19 20:05:55 you can multidex test just fine, there's 2 things: if you're doing pre-api 21, you need support-multidex-test runner, if you're post-21 then you can just run as-is Feb 19 20:06:22 for cases where the test apk is multidex? Feb 19 20:06:34 not the app itself, but the test apk, which is running the tests Feb 19 20:06:37 multidex-instrumentation Feb 19 20:06:42 why would your test apk be multi-dex Feb 19 20:06:55 because it hit the stupidly low dex limit Feb 19 20:06:58 if you need your test apk to be multi-dex, bundle your test with your main apk (which is the default configuration to begin with) Feb 19 20:07:17 this all sounds like a headache that shouldn’t exist in the first place Feb 19 20:07:31 never heard of anyone running over method limit in a test apk Feb 19 20:07:40 I’ve got Espresso and Wiremock Feb 19 20:07:55 but then again, I haven't run a separate test apk in forever Feb 19 20:08:02 I always do debug+test together Feb 19 20:08:12 I’m using Espresso Feb 19 20:08:23 that doesn't prevent debug+test together Feb 19 20:08:32 your main apk isn't multidex but test apk is? so weird Feb 19 20:08:39 s73v3r at this point, i'd spring for a book that explained all the android testing nuances Feb 19 20:08:55 the main apk is multidex too, but that’s been taken care of Feb 19 20:09:02 i just do instrumentation tests though Feb 19 20:09:03 s73v3r, then just include your tests in main apk Feb 19 20:09:09 s73v3r, and your problem is solved Feb 19 20:09:27 like I said, it's the default configuration anyway Feb 19 20:09:38 how? They’re under src/androidTest Feb 19 20:10:42 the last time I checked, it was all bundled together automatically, I suppose that may have changed Feb 19 20:15:27 I guess it changed a while ago Feb 19 20:15:35 bummer Feb 19 20:16:21 I support both a debugIncludesTests and without tests configuration, but that's not gradle Feb 19 20:20:25 Is there an easy way to display a drawable on top of a fragment? I want to have a centered progressbar on a plain background display before the fragment loads Feb 19 20:21:03 And the drawable covers everything in the fragment Feb 19 20:21:07 yonatankoren just add it to the child of the FrameLayout you are attaching the fragment to Feb 19 20:23:41 g00s: Ah okay. I'm not 100% familiar with layouts yet. I'm using RelativeLayout. Is there a way to have a child cover all the other children? Feb 19 20:24:05 Tried doing a google search but perhaps my query isn't that good Feb 19 20:24:43 g00s: nevermind, I think I got it. Thanks for your answer though, lead me thinking in a better direction Feb 19 20:24:51 RelativeLayout and FrameLayout have z-order so you can Feb 19 20:24:51 led* Feb 19 20:25:08 just have to toggle view visibility (hidden/visible) etc Feb 19 20:25:08 thanks Feb 19 20:28:03 its so windy Feb 19 20:28:07 my lights keep flickering Feb 19 20:28:49 So, is there any ************* way to use the eclipse compiler with Android Studio 2.0, like it was possible in Android Studio 1.0? Feb 19 20:29:20 It’s faster than Instant Run, and actually works for me, so my work efficiency has decreased a lot since using AS 2.0 Feb 19 20:32:40 is there a way to find resource files that are never used/referenced? Feb 19 20:33:01 RustyShackleford lint should do that ... at least it used to Feb 19 20:33:04 in eclipse Feb 19 20:37:00 justjanne AS 2 beta fit for human consumption? i'm getting tired of 1.5 telling me there are no debuggable applications Feb 19 20:37:14 it was okay Feb 19 20:37:24 g00s: eh, I can’t really say. Feb 19 20:37:28 I still use 1.5 Feb 19 20:37:32 It crashes every 40min with a segfault for me Feb 19 20:37:33 it does feel like a beta Feb 19 20:37:42 my home folder has hundreds of coredumps now Feb 19 20:38:02 http://imgur.com/0LJTJLI Feb 19 20:38:07 Plus them disabling any compiler except for their own little hack with instant run Feb 19 20:38:11 heh, now with colorized passwords Feb 19 20:38:59 pfn, I’m sorry, but you really should think about following the style of Android a bit more :/ Feb 19 20:39:32 pfn probably isn't good for colorblind Feb 19 20:39:38 lol aquas Feb 19 20:41:06 g00s, not red, not green, good 'nuff Feb 19 20:42:30 so no, it's not a problem for the colorblind Feb 19 20:43:47 Yes, it is Feb 19 20:44:02 rather, it makes no difference to the colorblind, they just don't get to enjoy the usability enhancement Feb 19 20:46:27 hy all Feb 19 20:46:36 https://github.com/pfn/keepshare/commit/dad8d4848b59af946cf83b079599ce0e147a1301 Feb 19 20:46:41 easy enhancement Feb 19 20:47:12 do anybody have Xiaomi Redmi 3? (or any Xiaomi devices?) does the development for that device work as for any other? Feb 19 21:31:59 Hi, I have a question, I can't seem to get google play services to work with gradle.. it keeps breaking the build. Feb 19 21:32:22 just get to the question Feb 19 21:33:24 Well that's the question. I'm trying to use google play services in an app i'm making but when i add it to the gradle deps it causes gradle to produce errors on build and fail Feb 19 21:33:46 Any idea how to solve this? Feb 19 21:34:01 not without knowing what the errors are Feb 19 21:35:36 just a moment, generating them again Feb 19 21:37:18 Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 Feb 19 21:38:08 Any thoughts? Feb 19 21:41:08 make sure 'google repository' is checked in sdk manager Feb 19 21:42:30 finally received on the watch latest wear upgrade Feb 19 21:43:56 hm TIL about Zopfli Feb 19 21:45:36 so is there no way to make a VIewPager actuall reset its views so I can properly show new content Feb 19 21:46:36 adq: it's checked. not the issue. Feb 19 21:47:36 i have no idea, and your nick completion miserably failed Feb 19 21:48:15 wait fail. g00s: yeah it's definitely checked... Feb 19 22:05:43 Hello, may I ask a general question on some guidance? Feb 19 22:06:22 well I think i've spent 4 hours today chasing down compilation errors that were not mine Feb 19 22:06:29 I didn't get anything done and its 4pm Feb 19 22:06:49 Which means....... you are in the mood to answer some non compilation questions ? :) Feb 19 22:07:12 I know that feeling. Spent all day trying to figure out stupid problems with Android's ViewPager. Feb 19 22:07:39 Cheese_boy: just ask Feb 19 22:07:55 and if someone here can help they usually will Feb 19 22:08:43 what kind of jerk adds resource files to the repo and doesn't resolve all its dependencies Feb 19 22:08:59 I don’t think i’ve ever seen someone refuse to help because the person didn’t ask: “Can I ask a question?” Feb 19 22:09:07 Alright. I want to make a simple android app - tap an image, it goes to the next one and then the next one and so on. I've made some simple apps before in hackathons. I'm a fairly competent Java and C++ programmer I'd say, so I can get the coding part done Feb 19 22:09:45 the problem is....... I'm working in a team (because our teacher wants us to learn "team" development). One of my friends will set up a server using "REST APIs" (idk what that means) and I have to find a way to talk to that server Feb 19 22:10:06 Well, step one would be to research Restful APIs Feb 19 22:10:09 and another teammate will make a webpage that will talk to that server. (or so he says) Feb 19 22:10:12 and webservices in general Feb 19 22:10:19 Hmmm okay. Feb 19 22:10:19 rest is not as complex as it sounds Feb 19 22:10:31 using a rest api is usually not too hard Feb 19 22:10:32 no, it’s pretty simple, at least from the client point of view Feb 19 22:10:42 and they are used a LOT in app development Feb 19 22:10:55 I would also check out a library called retrofit Feb 19 22:11:20 The thing is, I've never worked with someone, and this whole concept of making the front end and back end separately is confusing for me. Like I wanna know how the pieces fit together and wanna get an overview of the process. Is there any good tutorial for that? Feb 19 22:11:40 Like not code based tutorial but something that gives you the process. Feb 19 22:12:03 you’re going to make a request of the server, and the server is going to run some methods on it’s end to fulfil that request. It will then respond to you with the results Feb 19 22:12:12 is the code of android virtual machine open ? Feb 19 22:12:37 this "request" that I'll make. Is this some method in a library? Feb 19 22:13:02 you know how you enter a url in a browser and send it off? Same thing Feb 19 22:13:16 Oh like with tokens? Feb 19 22:13:29 there can be, if you wish Feb 19 22:13:52 for your app, probably not necessary Feb 19 22:13:57 To learn all of this and get the concept down, should I learn what REST is or first learn what a server is and how server/client works? Feb 19 22:14:22 Well the app is simple but the whole point of this is not the app. We want to learn the process of developing in a team. Feb 19 22:14:38 start with REST, and if that doesn’t go deep enough, go to client/server Feb 19 22:15:19 Okay. From what I'm understanding... I'll do my coding on android and whatever I wanna send, I'll send to the server using the REST api Feb 19 22:16:28 pretty much. you and the backend guy will need to agree on a set of requests and what will need to be passed on Feb 19 22:16:35 and what you’ll get back Feb 19 22:16:55 "and what you'll get back" - you mean, from like a databse? Feb 19 22:16:57 REST API from a trivial perspective is a simple http get Feb 19 22:16:59 and that is all Feb 19 22:17:01 database* Feb 19 22:17:21 whatever the response is Feb 19 22:17:32 it may be from a database, but the point is that you, as the app, don’t really care Feb 19 22:17:39 do you want plain text? json? potato? Feb 19 22:17:58 its up to you and your teammates to agree in which format and what will be sent Feb 19 22:20:17 Okay...I'm getting a slight idea of it. Think if I read a bit about it it may make more sense Feb 19 22:20:48 trust us, it’s really not hard at all Feb 19 22:20:53 I suppose the process of getting and receiving the image/text or whatever is the same? Feb 19 22:20:55 I hope not. Feb 19 22:21:00 Would you suggest youtube videos? Feb 19 22:21:12 if that’s how you learn. i don’t have any to suggest Feb 19 22:21:42 Well I usually learn from books but not sure what the most active android learning medium is Feb 19 22:21:55 android isn’t special Feb 19 22:21:59 it’s no different from anything else Feb 19 22:22:07 it’s just software development Feb 19 22:22:12 Cheese_boy: look for talks on youtube Feb 19 22:22:29 Someone recommended me the Android Dev Summit 2015 YouTube playlist -- https://www.youtube.com/playlist?list=PLWz5rJ2EKKc_Tt7q77qwyKRgytF1RzRx8 -- I have no idea about them, so. Feb 19 22:22:37 if you like books, I like the Big Nerd Ranch book Feb 19 22:22:52 the Android Dev Summit videos are good, but I don’t know how much they’d help a beginner Feb 19 22:23:40 This whole talking to server bit is actually a problem of mine not just restricted to android. In general I have no idea how this works but I think starting with REST would be a good step and I'll take it from there Feb 19 22:24:01 Perhaps. Also, yeah, not so directly relevant to the more general question, now that I actually bothered look more than five lines up. Feb 19 22:24:45 But thanks guys!! :) Feb 19 22:33:30 where do you find avd profiles? I want to emulate a Pixel C. Feb 19 22:35:36 seems like google would release an avd for that to assist their developers. why can't I find one? Feb 19 22:39:38 there are no specialized pixel C emulators Feb 19 22:57:25 danijoo: what do you do to emulate a pixel c? Feb 19 22:57:38 i dont emulate pixel c Feb 19 22:57:57 what /would/ you do Feb 19 22:58:25 I wouldnt do it Feb 19 22:58:32 why not? Feb 19 22:58:42 why should I? Feb 19 22:58:56 to target that platform. Feb 19 22:59:09 isnt it just android? Feb 19 23:00:51 are you trolling me? Feb 19 23:00:59 no Feb 19 23:00:59 what do you think the emulator is for? Feb 19 23:01:20 everything is 'just android' and yet you can create different avds for different hardware. is this not useful? Feb 19 23:01:21 whats special on the pixel c that you cant test it on the normal emulator? Feb 19 23:02:05 those ¨different¨ avds dont differ in hardware. they just differ in screen size and maybe the allocated memory/cpu power Feb 19 23:04:04 so you're saying if I put in the right android version, screen size, ram, and cpu, that's about as good as it gets, and I can do that manually rather than downloading an image. Feb 19 23:04:42 its as good as you can get it without buying it Feb 19 23:05:13 alright, thanks Feb 19 23:29:30 avd are onlyu useful for testing different versions and screen configurations Feb 19 23:29:32 that's it Feb 19 23:29:41 there's no specific hardware emulation Feb 19 23:39:03 stupid question, but I checked out an android project from github. How do I open it in studio? Do I open the containing folder, or the top level build.gradle, or something else? Feb 19 23:40:40 s73v3r, import from toplevel gradle file works fine for me Feb 19 23:42:37 which gradle file Feb 19 23:42:47 root build.gradle Feb 19 23:43:08 and you said import? Keep in mind that I don’t want to add it to any project, i just want to open it Feb 19 23:43:26 sry i meant open Feb 19 23:43:51 weird, now it works. before it seemed to only open the gradle files Feb 19 23:43:54 thanks Feb 19 23:49:36 Has anyone here actually gotten Powermockito working with Android Instrumentation tests? Feb 20 00:14:48 Question: How did you implement edittext and spinners in your app? The guidelines specify they should have 1px (not dp) underline [1], but the AppCompat implementation doesn’t Feb 20 00:14:51 [1] http://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0Bzhp5Z4wHba3VGxlSGNVWmNJX3c/components_menus_behavior2.png Feb 20 00:15:11 typo in the guide? Feb 20 00:15:39 no, it’s even on the images. Feb 20 00:15:42 that’s the thing. Feb 20 00:15:57 dozens of images which were all changed explicitly from 1dp to 1px Feb 20 00:24:35 wow, never heard about postInvalidateOnAnimation but it looks promising (based on measurement) in terms of perf compared to postInvalidate Feb 20 00:25:47 Hi guys. Is there a standard solution/inplementation for RecyclerView cursor adapter? Feb 20 00:27:03 Or should I extend RecyclerView.Adapter and implement all the DB magic there? Feb 20 00:28:02 AlexBerdnikov, the latter. but there are already finished solutions for that on github :) Feb 20 00:28:51 danijoo: I found some solutions on Gist, but I didn't see any libs Feb 20 00:29:07 maybe thats the one i mean. Feb 20 00:29:29 kinda lame google never did one of those officially ... Feb 20 00:29:29 danijoo: Got it. Thanks. Feb 20 00:29:47 i bet 90% of stuff that goes in lists comes from db Feb 20 00:30:25 g00s: Lame indeed Feb 20 00:30:42 AlexBerdnikov you can also look at AsyncListUtil Feb 20 00:30:49 g00s: and the rest comes either from ObservableCollections or from the web. Feb 20 00:31:00 writing a recyclverview.adapter that uses a cursor is trivial Feb 20 00:31:13 AlexBerdnikov http://developer.android.com/reference/android/support/v7/util/AsyncListUtil.html Feb 20 00:31:33 g00s: Thank you Feb 20 00:33:28 that's interesting, part of recyclerview, I assume Feb 20 00:37:07 android studio is 1.5 now :) Feb 20 00:37:16 it has been for a long time now Feb 20 00:37:30 :) Feb 20 00:38:13 puppy monkey baby ! Feb 20 00:39:20 g00s, !!!!!!! Feb 20 00:39:26 i remember you!!!!! Feb 20 00:39:32 that commercial traumatized me Feb 20 00:39:40 so awesome!! Feb 20 00:39:47 so cute!!! Feb 20 00:40:14 i guess it could relate to all generations i suppose, that dancing baby meme Feb 20 00:41:10 i don’t know why people don’t like it. people love puppies, monkeys, and babies Feb 20 00:42:09 * puppyMonkey goes onto learn about this thingy called recyclerview Feb 20 00:42:42 lewl, i remmeber back , when the people used view holder classs Feb 20 00:42:47 i am so old, Feb 20 00:42:54 hope you kids are doing well, Feb 20 00:43:02 they still do Feb 20 00:44:07 yah i did, that only listview, but then i came across this recyclerview thing which has some manager, which i dunno what it doesn manages something gots to read Feb 20 00:44:12 ok brb Feb 20 01:00:21 is there a favoured library for downloading and displaying images in ImageViews? Feb 20 01:01:17 erisco, use glide Feb 20 01:01:24 thats what i used Feb 20 01:01:26 hella easy yo Feb 20 01:02:23 erisco, most use picasso or glide Feb 20 01:03:28 thank-you Feb 20 01:07:15 Can anyone point me to any resources for learning MVP on Android? Feb 20 01:08:17 erisco, my bad i thought picasso became glide i guess not, coz i used that before Feb 20 01:12:40 eghdk you can search on /r/androiddev for mvp and find probably hundreds by now Feb 20 01:15:26 cool f.lux coming to android Feb 20 01:19:35 * puppyMonkey bookmarks link Feb 20 01:24:28 what y’all nerds up to? Feb 20 01:28:15 I'm not sure if I need to use android.v4.app.Fragment or just the regular fragment class Feb 20 01:28:37 er thats not the right package name Feb 20 01:29:04 RustyShackleford probably use support one Feb 20 01:30:05 minsdk is 14 Feb 20 01:31:08 i'm not totally sure what the difference is. I guess I could just use v4 Feb 20 01:33:37 oh, need to add b4b to ignore list on this client, too Feb 20 01:33:58 is there much of a difference, besides that support fragments are supported on earlier api's Feb 20 01:34:14 pretty much always use support fragments Feb 20 01:34:16 regardless of version Feb 20 01:34:23 b4b always spouting nonsense Feb 20 01:34:25 just because of bugfixes that go into them Feb 20 01:35:44 why even have separate classes then? Feb 20 01:35:55 we should just have support fragments Feb 20 01:37:05 RustyShackleford indeed, but where does it stop :P probably tons of stuff could be unbundled into support and removed from framework Feb 20 01:37:39 we'll see what happens here with ChromeOS merging, sounds like google might take control of updating some stuff themselves outside of GMS Feb 20 01:38:16 all the IoT brillo things need to be able to get OTAs for secutity fixes as well Feb 20 01:39:29 RustyShackleford, it's been said numerous times, putting fragments in framework was a mistake Feb 20 01:39:35 at least from my armchair here Feb 20 01:39:46 and my armchair too :P Feb 20 01:40:58 i wonder if google will modularize java framework with jigsaw Feb 20 01:41:20 then we could just pull in modules like a regular library Feb 20 01:41:27 why would they Feb 20 01:41:30 they're on java6 forever Feb 20 01:45:05 android is kind of a mess Feb 20 01:45:22 I sorta doubt I can do better haha but still Feb 20 01:46:02 so do I want getSupportFragmentManager() or getFragmentManager()? Feb 20 01:46:42 can I avoid the support.v4 library all together? This android studio nav drawer template pulls in the support library Feb 20 01:48:52 no Feb 20 01:48:57 your app will always have support-v4 Feb 20 01:49:03 unless you refuse to use any libraries at all Feb 20 01:49:12 you always want to use getSupportFragmentManager Feb 20 01:52:44 again, besides the whole backwards compatibility angle, whats the difference? Feb 20 01:55:18 everyone hide some bullies just joined irc and i hear they’re heading this way Feb 20 02:00:31 RustyShackleford, the main difference beside compatibility is bugfixes Feb 20 02:02:13 lets say you use min api level 16 and fragments. If a bug in fragments was found after api level 20 release, all your users between 16 and 20 will have this bug. If you use support libs they are updated to the `latest version` and be fixed for every api Feb 20 02:03:23 ^ Feb 20 02:04:34 b4b, you're gonna just end up being banned, you're never asking for help or helping others but just adding noise Feb 20 02:05:16 dude u wanna get wedgied just lookin out Feb 20 02:05:52 i think b4b is bot Feb 20 02:06:22 good additional reason to be banned then Feb 20 02:08:00 sometimes I feel like I don't know how to program Feb 20 02:08:05 I'm just good at stackoverflow Feb 20 02:08:10 and IRC Feb 20 02:08:31 RustyShackleford how is the toe ! Feb 20 02:08:35 still attached ? Feb 20 02:08:41 much better, hasn't fallen off yet Feb 20 02:08:47 gonna get an xray tomorrow Feb 20 02:08:59 hopefully its all mended so I don't need this tape on my foot anymore Feb 20 02:11:01 RustyShackleford, http://www.theallium.com/engineering/computer-programming-to-be-officially-renamed-googling-stackoverflow/ :p Feb 20 02:12:33 theres even a chrome plugin that replaces all occurences of programming to that for chrome lol Feb 20 02:12:37 https://chrome.google.com/webstore/detail/programming-to-googling-s/cdfmakoamfdggejpagcaejcllihongbm Feb 20 02:13:13 how did people program anything before stackoverflow existed? Feb 20 02:13:26 you had to dust off your copy of K&R and read it, ugh Feb 20 02:13:30 api didnt do everything for them Feb 20 02:15:10 RustyShackleford but, i think to some degree, once SO came about companies / projects got lazy and just outsourced their documentation to it Feb 20 02:16:17 I'm working through the android course that google has on udacity. I have a question about the minimum/target api. I understand that the minimum api setting is what makes the application not visible to older versions in the play store. For the "target" api the course stresses "there is really no reason to target anything but the latest api". That confuses me. My understanding is that if I target the latest api, and actually Feb 20 02:16:17 use features that are new to this version, the app will not run, or malfunction on older devices without this functionality. How can it be otherwise ? Feb 20 02:16:45 minSdk takes care of that for you Feb 20 02:16:55 kinch, currently most people use minsdk 16 Feb 20 02:17:25 so if youre using minsdk 16, the compiler will make sure you don't use features that were not available in api 16 Feb 20 02:17:51 kinch, yes. if you try to use a feature thats not supported, the app will crash. you can workarround that by checking if that feature is actually available Feb 20 02:18:00 ok, so what's the point of having to explicitly choose a target api ? Feb 20 02:19:07 kinch: there isn't much point. I don't know of anything it affects Feb 20 02:19:16 target api tells the system what api you tested against Feb 20 02:19:25 hmm. ok. Feb 20 02:19:40 is there a pattern for switching between dynamic fragments? Feb 20 02:19:41 for example, if you target api 23, you ahve to deal with new M permissions Feb 20 02:19:49 like a fragment container in your main layout Feb 20 02:19:58 on the contrary with a lower API, you still have nothing to do like handling runtime permissions Feb 20 02:19:58 you can attach/detach from that reference Feb 20 02:20:01 there are some compatibility options the system can turn on if the api is unter target api (but above minSdk) Feb 20 02:20:20 read about target sdk online, and the diff with min sdk, etc Feb 20 02:20:37 yeah thats a good example actually adq Feb 20 02:21:08 if you set targetapi to below 23, android will switch on the old permission system as compatibility feature Feb 20 02:30:59 im good Feb 20 02:32:24 I'm looking for a "container" in my activity layout that I can display fragments in Feb 20 02:32:35 FrameLayout Feb 20 02:32:59 that was my question, is FrameLayout what I want? Thanks Feb 20 02:34:34 the instructions says to git clone the project which I have. Then it says to do a git checkout 1.01_hello_world, to which git says "Branch 1.01_hello_world set up to track remote branch 1.01_hello_world from origin". I have no idea if that means something has gone wrong. Feb 20 02:34:44 do you like the pattern where you have one main activity and then everything else is fragments? Feb 20 02:36:59 RustyShackleford hard to do if fragments all need different actionbars Feb 20 02:37:06 errm, ok i am confused, my adapter extends CursorAdapter, but i want to use recyclerview with it Feb 20 02:51:43 g00s: you can change the actionbar label though, right? Feb 20 02:51:56 yeah now there is something called toolbar Feb 20 02:52:08 i have too many things to learn... Feb 20 02:52:10 RustyShackleford yeah, and what actions show - but its harder when some things want collapsable toolbars, etc Feb 20 02:55:05 I'm trying this pattern out anyway, I need to practice working with fragments Feb 20 02:55:15 going to try learning recyclerview also this weekend **** ENDING LOGGING AT Sat Feb 20 02:59:58 2016