**** BEGIN LOGGING AT Fri Feb 12 02:59:58 2016 Feb 12 03:05:59 com.intellij.diagnostic.MessagePool$TooManyErrorsException: Too many IDE fatal errors. Monitoring stopped. Feb 12 03:06:50 adq you are todays winner ! Feb 12 03:07:02 i haven't even managed that one yet :D Feb 12 03:07:24 :)) Feb 12 03:08:54 adq you into computer vision at all ? Feb 12 03:10:39 not really, though i looked to buy the eyetribe (and another similar alternative), also suscribed to project tango but did "not win" Feb 12 03:11:47 i'm surprised chris banes would do this https://github.com/chrisbanes/cheesesquare/blob/master/app/src/main/java/com/support/android/designlibdemo/MainActivity.java#L104 Feb 12 03:11:53 thats pretty crappy Feb 12 03:12:39 sure he knows when the activity is recreated, the FragmentPagerAdapter has the tags + fragments from earlier, and he just new'd a whole bunch of new ones ... Feb 12 03:12:49 or does he ... Feb 12 03:26:43 he creates a new adapter, the old adapter is gone, of course Feb 12 03:28:04 sure, but the old fragments are still managed by the fragment manager Feb 12 03:28:36 they were never added by tag Feb 12 03:28:42 at least not explicitly Feb 12 03:28:50 sure they were Feb 12 03:29:07 the tag is something like containerId:position Feb 12 03:30:13 yeah, that doesn't quite work, the tag is hidden and unavailable Feb 12 03:32:30 the tag is not public to us, but it is being used Feb 12 03:32:44 indeed Feb 12 03:32:50 well, you really can't do much about that Feb 12 03:33:00 annoying edge case with fragments Feb 12 03:33:08 particularly in a fragmentpageradapter Feb 12 03:42:50 Found a way to pause polling the api using .takeWhile(boolean) and toggling the boolean when the fragment hits onPause(). Any thoughts on how to "resume" the requests/Observable? Feb 12 03:42:53 java.lang.VerifyError: Rejecting class com.google.android.gms.wearable.DataMap because it failed compile-time verification Feb 12 03:42:59 how to fix it Feb 12 03:43:43 pfn just verified, so when the device is rotates the old fragments are shown - but that code recreates the adapter, and recreates new fragments - but instantiateObject never calls through getItem() so they are never used Feb 12 03:43:51 *rotated Feb 12 04:00:35 is that for me? Feb 12 04:02:03 g00s, generally correct, just a little waste of memory, and manipulating the fragment from outside will result in lost behavior Feb 12 04:42:52 do any of you guys use an expandable recyclerview library in here? and if so, which one? thanks Feb 12 04:45:11 what OS do you use? Feb 12 04:45:31 for android development specifically. This is freenode, so can I assume linux? Feb 12 04:45:46 When I'm seeing duplicate ListView entries in Google's own Android Wear app... Feb 12 04:46:43 Controless how many are there? only familiar with big nerd Feb 12 04:47:06 RustyShackleford os x :D Feb 12 04:49:15 i just googled and there are quite a few lol. i tried the big nerd one but it was too complicated for a beginner like me :\ Feb 12 04:49:36 If you have a recyclerview and want to show additional information upon click, how do you personally do it? Feb 12 04:49:55 expandable recyclerview library, new fragment upon clicking, right navigation drawer upon click? so many options... Feb 12 04:51:25 Controless do you have Google Clock installed ? Feb 12 04:52:05 hmm nope i dont think so Feb 12 04:52:12 i use another clock app. Feb 12 04:52:14 im trying to convert my FragmentActivity to Fragment.. however im getting these errors http://pastebin.com/crin4r0b anyone mind taking a look? its just 4 :) Feb 12 04:53:32 g00s: yeah part of me wants to get a macbook Feb 12 04:53:37 thornekey time to strengthen java skills ;) Feb 12 04:53:44 mmyes Feb 12 04:53:51 RustyShackleford on windows side, i hear the XPS 15 got good reviews Feb 12 04:53:54 just solved the first 1 :) Feb 12 04:54:11 eh my cheap dell works Feb 12 04:54:21 I use it like a desktop when I'm home mostly Feb 12 04:54:42 screen/mouse/keyboard. But I appreciated that I can pack it up and take it with me Feb 12 04:54:58 i spank faces Feb 12 04:55:09 1st and third are solved. just the 4th and 2nd Feb 12 04:55:19 RustyShackleford this also got good reviews http://hothardware.com/reviews/dell-precision-15-5510-mobile-workstation-review Feb 12 04:57:18 g00s: my dad wants to buy a laptop and he absolutely insists on windows 7 Feb 12 04:57:30 heh Feb 12 04:57:35 but he wants my recommendation Feb 12 04:57:56 we'll see how long MS allows him to do that :D Feb 12 04:58:07 java.lang.VerifyError: Rejecting class com.google.android.gms.wearable.DataMap because it failed compile-time verification Feb 12 04:58:10 how to fix it Feb 12 04:58:21 g00s: I looked it up. At least till 2020 Feb 12 04:59:01 g00s, solved 3 / 4 Feb 12 04:59:08 just cant solve the 2nd one haah Feb 12 05:00:14 this is how I implemented an expanding recyclerview https://github.com/pfn/qicr/blob/master/src/main/scala/com/hanhuy/android/irc/ServersFragment.scala Feb 12 05:00:44 not sure id Controless means 'item gets bigger' or 'item has N children' Feb 12 05:00:50 results in this https://youtu.be/rbLZ1N_YbDM Feb 12 05:01:16 thank you pfn, i will take a look at this! Feb 12 05:01:43 basically the recyclerview should show minimal info and then if i click on it, it should display more. i was wondering what the best method for this was Feb 12 05:02:34 damn haha scala. didnt learn that yet Feb 12 05:06:02 Controless big nerd is something totally different :) Feb 12 05:06:40 damn really??? Feb 12 05:07:04 so whats my best course of action now? Feb 12 05:07:10 im finding this hopeless lol Feb 12 05:07:51 guys what about me? Feb 12 05:09:02 linuxuz3r verify error - class bytecode is damaged Feb 12 05:09:27 that means i need to clean right Feb 12 05:09:55 does anyone have good resources for audio on android? Feb 12 05:10:04 is opensl widely supported? Feb 12 05:11:32 g00s: wont allow (win7) Feb 12 05:12:09 g00s: how much are xrays? Feb 12 05:12:27 I need to figure out if I can afford this Nexus 6P Feb 12 05:12:27 RustyShackleford don't know what xray is Feb 12 05:13:04 lol Feb 12 05:13:23 RustyShackleford oh, for toe - eh, maybe $70 Feb 12 05:13:44 well thats is what mine cost, 2 slides i think Feb 12 05:14:00 g00s: how do i fix the verify error Feb 12 05:14:05 whats a good solutiong Feb 12 05:15:18 ah fuck it. If it feels this bad tomorrow I'm taking the day off work and going to the doctor Feb 12 05:18:39 I love upgrading facebook sdk Feb 12 05:19:20 gonna try genymotion Feb 12 05:20:42 Has any used such an approach where UI is customised according to settings fetched from server ? Feb 12 05:21:53 May be colors and some UI assets ? Feb 12 05:22:17 suhas_sm pretty common. you can use google tag manager for that too Feb 12 05:22:38 hi g00s Feb 12 05:22:44 :) Feb 12 05:22:45 hmm thanks Feb 12 05:22:54 will check it out Feb 12 05:23:16 thats also how you can do a/b testing, some people get this UI - others get that UI Feb 12 05:23:21 can tag manager be used for iOS as well ? Feb 12 05:23:30 Oh ok Feb 12 05:23:31 hrm i dont recall Feb 12 05:24:27 g00s how do i fix it? Feb 12 05:24:48 linuxuz3r i have no idea, only ran into that once in my life - and not on android Feb 12 05:25:14 something is wrong with your compiler, the classes you are bundling in Feb 12 05:25:19 something major :( Feb 12 05:26:04 ok so what java version should i use? Feb 12 05:26:10 jdk version Feb 12 05:26:20 hmm or is it android version? Feb 12 05:26:30 wrong build tools version & multidex Feb 12 05:28:12 thanks ill try a different version Feb 12 05:41:22 Can a full time android developer be full stack developer ? Feb 12 05:41:51 why not Feb 12 05:42:17 what do you mean by stack developer Feb 12 05:42:17 there is so much in the world of android itself :( Feb 12 05:45:44 suhas_sm in reddit, frequent question is can i learn both ios and android - i think its better to learn one and the back end too (if you had to choose) Feb 12 05:45:57 yep Feb 12 05:46:03 I would also prefer that Feb 12 05:47:59 I have a developer key for an api I want to use Feb 12 05:48:30 ?? Feb 12 05:48:31 how do I include it with the (closed source) app? Is a string literal secure enough? Feb 12 05:49:37 You can try to do some manual obfuscation (on top of Proguard which I assume you're already using) Feb 12 05:50:04 well no, not yet. But I will before I put this in the Play store Feb 12 05:50:06 but the bottom line is that it can be reverse engineered (the easiest is probably through a sniffer, e.g. Charles Proxy) Feb 12 05:50:44 I'm not that concerned Feb 12 05:51:19 so if a sniffer can be used to find the key, there isn't much I can do to prevent that Feb 12 05:52:42 RustyShackleford: so better write some integration tests and launch them after obfuscation ;) Feb 12 05:53:37 I don't understand what I would test Feb 12 05:53:38 RustyShackleford saw this blog recently https://medium.com/@fredgrott/android-secure-those-3rd-party-api-keys-f33cf1a1f465#.pikfabx0h Feb 12 05:53:50 anyway this is not sensitive information. I send the key in every request to the api Feb 12 05:54:47 doesn't look to good second thought Feb 12 05:55:41 The author of this article seems pretty angry at AndroidAuthority Feb 12 05:56:09 yeah saw that in the end Feb 12 05:56:51 RustyShackleford: actions ? Feb 12 05:56:54 @g00s can I use tag manager to customise my library which may be used by various apps ? Feb 12 05:57:16 suhas_sm uhm, that sounds like a bad idea ;) Feb 12 05:57:37 bad idea ? why so ? Feb 12 05:57:42 now everybody requires tag manager dependency Feb 12 05:58:51 not sure what kind of library you have there, but i like libraries i use to not do things like that in the bg O.o Feb 12 05:59:07 hmm Feb 12 06:02:17 that is that library for rest api's? Feb 12 06:02:27 handles the network requests/responses Feb 12 06:08:34 Retrofit Feb 12 06:10:42 CedricBeust rxjava twitter is dead these days ... Feb 12 06:10:55 Not sure what you're saying Feb 12 06:11:24 @RxJava hasn't tweeted much since ben left ... Feb 12 06:11:34 used to be several per day Feb 12 06:11:37 Ah Feb 12 06:11:55 always new blogs, articles, videos, whatever Feb 12 06:11:59 Yes there's some chatter surrounding the future and present of the library Feb 12 06:12:40 i think something is fishy. i know ben left netflix, but he was the driving force there, giving tons of talks at conferences ... Feb 12 06:12:46 and then he just dissapeared Feb 12 06:13:12 the project transcends netflix so it doesn't make sense to me Feb 12 06:15:25 if you were buying a 6P, how many gb's of storage would you get? Feb 12 06:15:31 32gb is probably enough Feb 12 06:19:05 I got the second gen Moto G and the manual says I can use a maximum 32GB sd card, but I see posts online of people sticking 128GB cards and formatting and it works for them, I want to try the 200GB or 256GB cards Feb 12 06:19:51 netflix just kinda disappeared a couple years ago Feb 12 06:20:11 I mean like they were at all sorts of conferences and such and now they seem to have vanished... Feb 12 06:20:27 no sd card in the nexus devices Feb 12 06:21:01 my s5 hates sd cards. It will work fine for a month or two and then filesystem is corrupted. Tried different cards, same result Feb 12 06:21:18 if it worked I'd have a 272 GB phone. whoaaa! Feb 12 06:21:35 shmoooz: hmm, I wonder why that would be...are sd cards all serial protocols or something? Feb 12 06:22:05 smaudet: no idea why they set that limit in the manual Feb 12 06:22:22 smaudet: but I have confirmed the sandisk 128GB one works Feb 12 06:22:47 looks like its just a serial protocol, so yeah, storage limite is endless Feb 12 06:23:01 stick a terabyte in there if you could make it fit Feb 12 06:23:11 and if you fs/kernel supports it I suppose Feb 12 06:23:25 for now the largest card is 256GB Feb 12 06:23:57 eh Feb 12 06:23:59 https://www.sandisk.com/about/media-center/press-releases/2014/sandisk-premieres-worlds-highest-capacity-sd-card-for-high-performance-video-and-photo-capture Feb 12 06:24:03 512 Feb 12 06:24:26 of course I suppose you maybe mean sd mini Feb 12 06:24:27 ok 512 then :) Feb 12 06:24:35 micro Feb 12 06:25:07 http://www.androidcentral.com/theres-512gb-microsd-card-coming-july-you-likely-cant-afford-it <- micro exists as well Feb 12 06:25:16 although at that price - I'll just buy a bunch of 128s Feb 12 06:26:50 You betcha 1 tb cards exist already I'm sure, probably only in military hardware etc Feb 12 06:27:35 1k is something like chump change when your average bill is in the millions... Feb 12 06:30:39 military technology lags behind, I thought Feb 12 06:30:53 they use older, proven technology Feb 12 06:36:35 yeah the android devices that get qualified for use are further behind Feb 12 06:53:24 gps accuracy to cm http://www.sciencedaily.com/releases/2016/02/160211111507.htm Feb 12 06:56:03 so they are integrating inertial and GPS, i guess they improved on kalman filters Feb 12 06:57:40 Hi Feb 12 06:58:46 I have been stuck into an issue using progaurd Feb 12 07:02:04 Can we send and receive simultaneously in a Wifi Direct P2P Connection ? Feb 12 07:04:23 I'm very suspicious why android progaurd obfuscating parameters inside an Interface Feb 12 07:04:53 So far I have use only Client-Server file send demo in Wifi Direct P2P. But haven't tried this one. Feb 12 07:06:03 public interface Interface1 { void fun1(Integer EmployeId); } Feb 12 07:06:57 I want to preserve interface parameters without being obfuscated, I am a newbie to android Feb 12 07:08:14 it only obfuscates the names Feb 12 07:08:44 if you dont depend on reflections and whatont you should be fine mostly Feb 12 07:10:13 Is there only uni directional data flow possible in Wifi Direct P2P or Bi-Directional data flow is possible too ? Feb 12 07:20:10 Can somebody help me with this question.... Feb 12 07:20:48 Hi Ashiren Feb 12 07:21:50 I do not want the method parameters to be obfuscated Feb 12 07:23:07 Why do you care? Feb 12 07:31:16 so just add rules to proguard Feb 12 07:32:07 i.e. http://stackoverflow.com/questions/12924425/how-do-you-stop-proguard-from-removing-type-parameters Feb 12 07:32:51 I have added respective rules in progaurd, which I can control obfusctaion but not the interface Feb 12 07:33:14 I have tried the same link from stackoverflow Feb 12 07:33:19 :O Feb 12 07:33:49 -keepparameternames Feb 12 07:33:49 -keep public interface packagename.classname$Interface1 Feb 12 07:33:49 -keepclassmembers interface packagename.classname$Interface1 { Feb 12 07:33:49 *; Feb 12 07:33:49 } Feb 12 07:34:15 still, why do you care Feb 12 07:35:04 The obfuscated code seems like thuis Feb 12 07:35:05 public interface Interface1 { Feb 12 07:35:06 void fun1(Integer var1); Feb 12 07:35:06 } Feb 12 07:35:44 I want to preserve parameters of the method fun1 Feb 12 07:36:35 I'm able to achieve this with classes and enum but not with interface Feb 12 07:37:27 -keepparameternames - Keep the parameter names and types of methods that are kept Feb 12 07:37:57 but why it's not keeping for interfaces alone? Feb 12 07:39:00 I have used Interfaces in my SDK. I want end user to know the parameters name. Feb 12 07:42:40 Libraries that obfuscate are annoying, it's good to be able to follow the code in case of bugs Feb 12 07:42:58 Or just poor documentation Feb 12 07:45:21 well proguard provides you a "map" between source code and obfuscated one Feb 12 07:47:40 yes Feb 12 07:48:33 I doubt they're going to provide that to the user, and it doesn't make it any easier to browse code in your IDE.. Also pointless to obfuscate it if you're shipping the mapping file as well.. Just let the user proguard if needed Feb 12 07:49:55 What's there to obfuscate anyway? Users don't use your library because they don't know how to write it, they use it so they don't have to Feb 12 07:52:37 If user implements methods from the interface of my Library, it would be like, Feb 12 07:53:08 @Override Feb 12 07:53:09 public void fun1(Integer integer) { Feb 12 07:53:09 } Feb 12 07:53:09 @Override Feb 12 07:53:09 public void fun2(Integer integer) { Feb 12 07:53:09 } Feb 12 07:53:32 Please use pastebin Feb 12 08:10:54 can anyone here recommend a value exchange ad service (user views an ad in exchange for an in app reward)? Feb 12 08:17:06 how do we call an animation that makes the view bigger and than back to its normal size with a jelly like motion? Feb 12 08:24:33 http://pastebin.com/84VUn1xL Feb 12 08:48:29 keestu: just don't obfuscate your library. Or I'll personally go and find tour library, decompile it, give everything a reasonable name, and release it again. Feb 12 08:48:39 *your Feb 12 08:49:14 I am getting an Activity leak with android.os.ResultReceiver$MyResultReceiver.this$0. In one of the referencing classes I have a constructor which contains an anonymous class. Could this be a problem for the leak? Feb 12 08:50:52 I do obfuscate my library , but not all the components. Feb 12 08:52:03 Whats wrong with google analytics ? It generates "my_tracking_id" in generated sources, and then gives me error that it is not translated in my other languages ! Feb 12 08:53:25 Error:Execution failed for task ':Wearable:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_65\bin\java.exe'' finished with non-zero exit value 1 Feb 12 08:53:28 hmm Feb 12 08:53:50 i un/install my AS now it gives me that error Feb 12 08:55:29 Hi, anyone has experience with avoiding java.awt classes when with Java library? is it possible to suppress the warnings when building? Feb 12 09:01:49 i get alot of dexer errors can someone help Feb 12 09:03:48 which ones? Feb 12 09:04:26 oh its not just one Feb 12 09:11:35 start with the first one Feb 12 09:11:42 have you tried multidex? Feb 12 09:12:46 or copy the stacktrace to some online editor or text sharing service like pastebin and post the link here Feb 12 09:18:20 androod-dev208: AWT classes are not implemented on Android, and you shouldn't use them. Feb 12 09:18:32 That's about all there is to them. Feb 12 09:28:26 well, I'm not using them actively, it's a part of the library that's not in use that needs them Feb 12 09:28:40 can I mock that missing class within my project? Feb 12 09:40:30 any thoughts about the location of spinner description text in terms of ui design? Feb 12 09:40:45 on top of the spinner? side? Feb 12 09:40:58 are there general guidelines for this? Feb 12 09:42:28 i noticed if it's on the side i immediately run into text alignment issues, nothing that can't be solved though Feb 12 09:51:13 murosai: well, Material Design discourages spinners in general, because they hide the options from the user in general. Feb 12 09:51:29 if you have no other options, put it at the top, aligned Feb 12 09:51:57 https://plus.google.com/+AndroidDevelopers/posts/JVAnmJMV7UY Feb 12 09:52:00 :D Feb 12 09:53:29 Also, murosai, you should, if possible, always use the android:hint as label: http://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0Bzhp5Z4wHba3VGxlSGNVWmNJX3c/components_menus_behavior2.png Feb 12 09:57:51 i have a more java or general algorithmic question Feb 12 09:57:59 i have object which has id and timestamp Feb 12 09:58:21 and the list. i sort list by timestamp Feb 12 09:58:41 using a list (not hashmap) i would like to efficiently get object by id Feb 12 09:58:51 can this be done in less than O(n) Feb 12 09:59:06 without resorting to id Feb 12 09:59:18 hmm Feb 12 09:59:32 the ids have no relation to the timestamp? Feb 12 09:59:38 no Feb 12 09:59:42 and they are unique Feb 12 09:59:45 okay. Feb 12 10:00:43 then it’s not easily possible. Unless you start using custom maps or similar, in which case you can get it down to O(log2(n)) with a binary search, or O(m+n), where m bucket size, n bucket count, with a hashmap Feb 12 10:01:00 i see Feb 12 10:02:14 is there anyway to speed up gradle? am on an ssd with an i7 and it still takes relative years Feb 12 10:02:27 ghosalmartin: yes, but not with Android Studio 2.0 Feb 12 10:02:33 only with the old Android Studio, Feb 12 10:02:39 use absolute years Feb 12 10:02:40 justjanne: how? Feb 12 10:02:46 there you can switch the compiler to the eclipse compiler, and use incremental builds Feb 12 10:02:53 your builds will be done is split-seconds Feb 12 10:02:54 would 1.4 do it? Feb 12 10:03:21 Ashiren: haha Feb 12 10:04:01 half my time is split between building and the other half is generally cleaning the project and rebuilding Feb 12 10:04:12 yeah, same here Feb 12 10:04:29 sadly 2.0 doesn’t allow you to use the eclipse compiler anymore. Feb 12 10:04:49 ghosalmartin: drop gradle ;) Feb 12 10:04:57 gordon_: in favor of what? Feb 12 10:05:09 no idea Feb 12 10:05:09 gordon_: the issue is not in gradle, but in javac, which is fucking slow as hell Feb 12 10:05:13 sbt, buck ? Feb 12 10:05:35 justjanne: can you link me to the version you mean please? Feb 12 10:06:35 gordon_, how does sbt or buck fix the fact that the java compiler is slow? Feb 12 10:06:59 wit suddenly became slow ? Feb 12 10:07:03 *it Feb 12 10:07:12 javac isnt all that slow Feb 12 10:07:15 normal files compile fine Feb 12 10:07:22 its the fact gradle takes the utter piss rebuilding Feb 12 10:07:36 also does buck do incremental builds? Feb 12 10:07:40 yes Feb 12 10:07:55 doesnt support flavors Feb 12 10:07:58 and stuff Feb 12 10:08:13 and learning curve is.. quite difficult Feb 12 10:08:35 havent checked buck for some time Feb 12 10:08:43 seems like a couple of new builds are out now Feb 12 10:10:28 and no idea about dagger2 Feb 12 10:10:43 (I mean annotation preprocessing) Feb 12 10:12:01 gordon_: ahh flavours are quite important Feb 12 10:13:29 you might look at sbt Feb 12 10:13:43 migration is quite easy Feb 12 10:13:47 although it seems to handle annotations now Feb 12 10:13:58 (like 4 lines) Feb 12 10:17:02 gordon_: do you know how buck deals with build dependencies? Feb 12 10:17:11 can we just define them and itll pull them in Feb 12 10:17:22 there was a script Feb 12 10:17:23 for that Feb 12 10:18:45 ah I wasnt using that Feb 12 10:18:52 https://github.com/charafau/buckgradle Feb 12 10:20:03 https://github.com/facebook/buck/issues/64 Feb 12 10:21:02 seems like there's buck fetch command now Feb 12 10:21:16 ahh it doesnt handle multidex apps yet Feb 12 10:21:17 :'( Feb 12 10:22:15 it should Feb 12 10:22:21 well, try sbt Feb 12 10:22:28 you can do it in like ... 5 minutes Feb 12 10:22:43 ill take a look at sbt Feb 12 10:22:45 https://github.com/pfn/android-sdk-plugin/blob/master/GRADLE.md Feb 12 10:22:58 whats the problem with gradle :P Feb 12 10:24:30 oh really :P Feb 12 10:42:24 is it possible to have the unopened spinner size different than when it's opened? Feb 12 10:42:54 now i have different sized spinners and it looks weird in the UI Feb 12 11:14:48 Hello guys, because of the limited flexibility the default NavigationDrawer template, I want to replace the NavigationView with my custom designed ListView. This means I have to manually tell the NavigationDrawer to hide on a ListView item click? Feb 12 11:15:36 Number5: instead take a look at https://github.com/mikepenz/MaterialDrawer, it is a custom drawer where you can actually hook into the recycler adapter for the items Feb 12 11:17:18 justjanne, the problem is, I started with a template and my app is almost finished. It would be a major modification to get rid of the template generated navigationdrawer and replace with the one you suggests. Feb 12 11:17:21 is it possible to override style properties? Feb 12 11:18:06 murosai, yes of course. that's how you you change colours and so on of your view. Feb 12 11:32:44 Hi Feb 12 11:32:44 What do you guys use for sockets ? Feb 12 11:37:24 is the question what sockets are used for or what libs we use for sockets? Feb 12 11:45:39 what libs ? Feb 12 11:45:53 @murosai Feb 12 11:52:03 Hi there. I have a loading in 2 or three activities. every activity I paste the same method that generates the a dialog object. What would be a pattern to share this code to activities? I was thinking about a Strategy, but I'm thinking too that it's too much to just one implementation. Any suggestion ? Feb 12 11:55:33 Inheritance? Feb 12 11:55:47 Define a common parent that contains that method. Feb 12 11:56:46 Like a BaseActivity Feb 12 11:57:01 HI Danijoo Feb 12 11:59:17 barq: don't sounds good. Feb 12 12:00:21 Then I would have different base Activities to different Activities Feb 12 12:00:27 wviana, what barq suggests is not bad at all. Feb 12 12:00:50 those activities would extend the same base activity Feb 12 12:01:01 wviana, are you familiar with intheritance? Feb 12 12:01:11 Number5: Yes Feb 12 12:01:32 wviana, so what's the problem? Feb 12 12:02:33 In your base activity you add the code for a dialog object. Than extend your activity from your custom base activity which extends the original Activity. Feb 12 12:02:51 Design Principle: Composition over Inheritance Feb 12 12:03:24 :? Feb 12 12:04:42 just added firebase to my app and it seems I'm hitting the dex limit.. 12k methods with dependencies from just firebase sdk. Suggestions on best course of action assuming I can't remove any libraries from the project.. multi-dex or proguard? Feb 12 12:05:27 no harm in multidex Feb 12 12:05:41 are you using play services ? Feb 12 12:05:50 So, if I have some activities that I could say that are ActivitiesWithProgressDialog, and there are other Activities that have a Rest client behavior. So not some ActivitiesWithProgressDialog would have this functionality too. Feb 12 12:06:15 suhas_sm ok maybe I'll try that first, nope not using play services Feb 12 12:09:29 wviana, I don't know this is in Java (never used it) but in Objective C you could do something like Activity+ProgressDialog.m I didn't know this concept was possible with Java. Feb 12 12:10:24 o.O Feb 12 12:11:23 Build your hierarchy of Activities depending on what they need. Feb 12 12:11:33 Draw it on a piece of paper so you can map it out. Feb 12 12:13:01 Not sure what's wrong with SpecialUseDialogBuilder.getDialog() Feb 12 12:13:13 Or if the dialog itself is a special class make a static creator Feb 12 12:13:28 Or make a static method in a package utility class :) Feb 12 12:15:47 Mavrik: It's just a simple dialog. In this case, but I don't want to repeat code in many classes. It's as dialog but it could be other things too. Feb 12 12:17:01 Having a Util class would break the principle that I class should have just one response and just one reason to change. Feb 12 12:18:16 I know there are a lot of easy ways to solve this. But I'm looking for a really good solution. Trying to apply design patterns. and decouple my code. Feb 12 12:21:38 I'd go with Mavrik's suggestion. Inheritance does not make a lot of sense in this case. Feb 12 12:31:13 wviana: if you’d use Java 8, you could use multiple inheritance. Feb 12 12:31:21 sadly, android doesn’t support that yet Feb 12 12:32:00 java8 introduces multiple inheritance? wtf Feb 12 12:32:03 lame Feb 12 12:32:13 Only for behaviour, but not for status Feb 12 12:32:21 interfaces now can contain methods with actual code Feb 12 12:32:39 so they are abstract classes, not interfaces Feb 12 12:32:42 for example, the sort() method on the List interface now contains a default implementation Feb 12 12:32:44 yes. Feb 12 12:33:12 multiple inheritance is such garbage. So many problems arises when you have to deal with it Feb 12 12:33:29 well, not really. Feb 12 12:33:31 hopefully they are doing it in a more sane way than c++ Feb 12 12:33:36 The Java8 way prevents any such issues. Feb 12 12:34:04 Because the code in the interface can never access any field from any class directly – only call methods Feb 12 12:34:16 additionally, if two methods conflict, you have to manually choose one Feb 12 12:35:17 hmm okay Feb 12 12:35:52 thats interesting. It sounds promising that they are trying to avoid implicit "magic" and forcing you to explicitly decide Feb 12 12:36:10 in implemented interface? whats is this sorcery Feb 12 12:36:31 Java 8 ;) Feb 12 12:38:32 wviana: Show some code. Feb 12 12:41:10 ehttp://cdn.meme.am/instances/500x/49125506.jpg Feb 12 12:45:55 liefer: multiple inheritance ? WTF 2 Feb 12 12:46:39 justjanne: So it's closer to the mixing concept than inheritance Feb 12 12:46:47 yup. Feb 12 12:46:58 but they call it "multiple inheritance of behaviour" Feb 12 12:51:25 why local db viewing in AS is not so simple like Intelij specially in debugging mode? Feb 12 13:00:37 How do I avoid conflicting view ids in my modules with the project view ids? Feb 12 13:01:18 supposing I have a view with this id in my module: android:id="@+id/recyclerv", if I have the same id in my project, they will be in conflict Feb 12 13:07:46 hi, what is the best way to get a directory of my application ? Feb 12 13:07:57 o need store a file inside Feb 12 13:08:41 this http://developer.android.com/intl/ja/reference/android/os/Environment.html Feb 12 13:08:58 and this http://developer.android.com/intl/ja/guide/topics/data/data-storage.html#filesInternal Feb 12 13:10:57 please don't link to localized d.android.com sites -.- they change the default language to that too Feb 12 13:11:26 thanks Ashiren Feb 12 13:17:35 Zharf: oh i didnt notice that lol Feb 12 13:18:12 why first link in google would choose those Feb 12 13:18:48 if I go to a localized d.android site, it forwards me to my localization :) Feb 12 13:19:12 if I go to a localized d.android site, I get that localization from there on Feb 12 13:19:25 weird. are you on chrome? Feb 12 13:19:58 firefox Feb 12 13:20:09 Problem found :p Feb 12 13:20:20 no, the problem is google's retarded implementation Feb 12 13:21:20 I also don't see the point of the localization since most of the stuff isn't even translated Feb 12 13:21:21 yup Feb 12 13:21:28 any US user automagically gets localized. Feb 12 13:21:43 Same everywhere with Google’s localizing: Feb 12 13:22:11 go as German user to google.co.uk: get british. go to google.com: get German. There’s no way, except for using ncr, to get US google Feb 12 13:22:25 i always get english no matter what Feb 12 13:22:38 but my OS is localized to US, so that might be it Feb 12 13:22:53 although im not english Feb 12 13:22:59 yeah, you get english Feb 12 13:23:02 I also get english, Feb 12 13:23:04 but not US google Feb 12 13:23:10 different search results. Feb 12 13:23:24 yeah but who wants US results anyways :p Feb 12 13:23:26 it's not OS... everything in my OS points to UK, except timezone and geolocation based on ip Feb 12 13:23:35 I still get random things in finnish Feb 12 13:23:40 it's really annoying Feb 12 13:24:26 localization in the early 00s was so much better Feb 12 13:24:37 at least they gave me an option to change languages Feb 12 13:25:37 well, localization is much better if you do it right Feb 12 13:25:43 the browser has a language setting, Feb 12 13:25:46 everything fine here. it always gives me english and thats what i want. Feb 12 13:25:50 the MOTHERFUCKING WEBSITE could just accept that Feb 12 13:26:03 thats all i care about Feb 12 13:26:17 sure, but no one does it right, also the problem exists outside of browsers as well Feb 12 13:26:48 languages itself are the problem. there shouldnt be more than one :/ Feb 12 13:27:13 nah, I enjoy a lot of languages Feb 12 13:27:16 but then please not english Feb 12 13:27:18 just not my own Feb 12 13:27:19 english is horrible Feb 12 13:27:47 we need a writing system like japanese (except without the kanji), a word compositing system like german, a grammar like latin, and an adoption like english Feb 12 13:27:55 better, Feb 12 13:27:57 use korean writing Feb 12 13:28:05 that is the best writing invented yet Feb 12 13:28:17 korean is pretty cool Feb 12 13:28:20 i dont like the german word composing.. Feb 12 13:28:25 you write the letters in each syllable on top of each other, each syllable next to each other Feb 12 13:28:35 I studied german but I can't stand how the language sounds Feb 12 13:29:42 I always find it hard to write assays in german because I became used to english in my studies that much :/ Feb 12 13:30:19 and still my english sounds like shit :p Feb 12 13:30:29 German word compositing is amazing, though Feb 12 13:30:49 Cooling-Closet instead of Fridge, Feb 12 13:30:56 Flying-Stuff instead of airplane Feb 12 13:31:17 yeah. super stupid :D Feb 12 13:31:22 finnish... Feb 12 13:33:10 danijoo_: it’s not stupid, it’s genius. Feb 12 13:33:21 In english, you need to learn millions of words. Feb 12 13:33:34 in German, with just 300 words, you can read even the most complex technical articles Feb 12 13:33:48 you also need to learn that its " Flying stuff" .. Feb 12 13:34:00 or we start calling everything "... stuff" Feb 12 13:34:14 like the writing-stuff i use to type messages in my computer :p Feb 12 13:34:22 but i get your point Feb 12 13:34:33 Well, that’s actually a word used for pencils and stuff Feb 12 13:34:35 Schreibzeug. Feb 12 13:34:50 the most arbitrary system I couldn't wrap my head around in my german studies was der/die/das -.- Feb 12 13:35:11 Zharf, because theres no rule :/ Feb 12 13:35:18 yeah Feb 12 13:35:24 actually, there are rules. Feb 12 13:35:27 and we have no such things in finnish Feb 12 13:35:40 for composite words, the gender of the last sub-word counts. Feb 12 13:35:54 but you need to know the word gender Feb 12 13:35:59 words don't have genders, it's stupid Feb 12 13:36:09 justjanne, but no rules for the gender of non-composite words Feb 12 13:36:20 for those there are also rules. Feb 12 13:36:28 based on the last characters of the word, roughly. Feb 12 13:36:33 that’s 95% of words Feb 12 13:36:43 by far not Feb 12 13:36:48 JakeWharton: Any idea how to espresso test a clear data button with ProcessPhoenix? It seems to kill espresso. Feb 12 13:37:06 well, danijoo_, yes. You just never learnt the rule ;P Feb 12 13:37:32 justjanne, tell me :p Feb 12 13:38:10 whats the rule for .. "Knauf" in "der Türknauf¨ Feb 12 13:49:56 hello my database tool is missing from intelij community edition, is it only for ultimate edition Feb 12 13:59:26 min2, yes Feb 12 13:59:58 min2: you can use Mozilla’s SQLite manager in some cases, too Feb 12 14:00:37 justjanne, this requires to pull the database first, though. Or did this change? Feb 12 14:00:40 that would be awesome Feb 12 14:00:56 well, you could use sshfs with adb... Feb 12 14:01:35 sshdroid, adb forward, sshfs Feb 12 14:01:37 the intellij plugin allowed to remote browse the sql databases even while the app is running. I miss that :/ Feb 12 14:02:17 Google should stop developing Android Studio, and just release a working plugin for IntelliJ 15 Feb 12 14:02:57 most of the plugins are available for intellij 15 Feb 12 14:03:12 most of the stuff is backported Feb 12 14:03:37 i think its only the ddms stuff thats missing (cpu bar at the bottom) Feb 12 14:04:22 oh and the theme editor might not be backported yet because its pretty new Feb 12 14:04:39 > backported Feb 12 14:04:42 that’s the issue Feb 12 14:04:50 that’s duplicating the workload Feb 12 14:04:59 nah i didnt mean backported :/ Feb 12 14:05:09 well, but that’s what it is. Feb 12 14:05:15 they develop first for AS, Feb 12 14:05:20 no its not Feb 12 14:05:21 and then copy it into the plugin Feb 12 14:05:22 its merged Feb 12 14:05:23 thats all Feb 12 14:05:24 wrong way round Feb 12 14:05:35 in AS its only a plugin too... Feb 12 14:05:44 its just INTELLJ with some android specific plugins Feb 12 14:05:54 and other plugins that normally come with Intellij are missing Feb 12 14:09:36 Hey. How can I use data binding to multiply resources values? Tried something like: android:layout_height="@{@dimen/height * 2}" Feb 12 14:11:30 i dont think datababinding works on attributes like that Feb 12 14:11:43 you can simple define a second height in xml and use that Feb 12 14:12:15 danijoo_, ugh. Thought so :/ Doing a static method instead then Feb 12 14:14:45 Ahh on the other hand your solution's better. I'll do that. Thanks :) Feb 12 14:30:31 Hello Feb 12 14:30:38 Anyone know what the URL schema for Google Play Games Services is? Feb 12 14:30:56 if it has one Feb 12 14:32:10 Also do I have to do something on my device to even activate game services to begin with? Feb 12 14:32:30 it logs me in every time i open my app which initialize to game services, but this particular device throws an ambiguous error on log in Feb 12 14:41:16 adjustPan is not working in an appCompatActivity with a DrawerLayout Feb 12 14:41:26 this happened to anyone here? Feb 12 15:08:14 does game services have a url schema? Feb 12 15:09:52 hello, wordtoSpan.setSpan(Color, iStart, iFinish); have problems with some characters such as İ,Ş,Ç,Ö Feb 12 15:09:59 it skips those characters Feb 12 15:10:46 i checked phonebook on my nexus 5x and google resolved this problem, and i have no idea how they did it :O Feb 12 15:26:19 GcmListenerService is not receiving push Feb 12 15:34:48 GcmListenerService is not receiving push Feb 12 15:35:11 on 4.4.4 Feb 12 15:42:28 when writing test cases, do you test your activity lifecycle methods? Feb 12 15:42:42 I don't really see how you could. I suppose you could test the members Feb 12 15:49:12 RustyShackleford: Yeah I don't see why you would care to test the Android Platform itself. Testing your code within it make sense though with stuff like Espresso Feb 12 15:53:26 I have a question about a android development, I am new into android development, I have a String that looks like this: public static String API_URL = "https://api.mydomain.com"; but how to I contenue it in another class like a PHP string like this: API_URL."/login/" ?? Feb 12 15:55:27 use strings.xml Feb 12 15:55:37 + Feb 12 15:59:24 yiati: well you're overriding those methods Feb 12 15:59:33 I can see why you'd want to test it Feb 12 15:59:53 it just seems difficult Feb 12 16:05:07 RustyShackleford: Yes, you are overriding them, but you'd want to test the state of your application around the platform. Not the platform itself Feb 12 16:36:19 How do I change action icons in an already existing notification? Feb 12 16:36:58 what better way to start Friday than with a PENDING INTENT Feb 12 16:37:40 Hogofwar, post a new notification Feb 12 16:37:40 one time facebook called me about an android position and they pop quizzed me on the phone - how do you setup the activity to be displayed when a notif is clicked - an intent, receiver, pendingintent, or broadcast or some other shit Feb 12 16:37:52 i'm like 'yo that is a pendingintent game set match' Feb 12 16:37:57 later got denied the job Feb 12 16:39:39 pfn, how would I set the new notitication in startForeground? Feb 12 16:39:49 Hogofwar, call startforeground again Feb 12 16:39:57 or just notify again using the same notification id Feb 12 16:40:37 achuinard and then you developed whatsapp and suddenly your winny was covered in honey Feb 12 16:41:33 I think one of the whatsapp developers got rejected by facebook, or something like that. Funny huh Feb 12 16:41:34 nah been workin on something else didn't get in the whatsapp game soon enough Feb 12 16:41:57 if you return to an actiity, onResume() is called Feb 12 16:42:02 is onStart() also called? Feb 12 16:44:34 RustyShackleford no Feb 12 16:44:36 RustyShackleford: Not necessarily, http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle Feb 12 16:45:05 depends if it's stopped or paused Feb 12 16:45:41 I can't remember what causes a pause and what causes a stop Feb 12 16:45:49 I think moving to a new activity causes a stop Feb 12 16:46:05 not necessarily Feb 12 16:46:32 pause/resume occur everytime your activity loses focus Feb 12 16:46:36 if you have activity A and translucent activity B comes in, only a pause may be triggered Feb 12 16:46:49 if activity A is completely out of scene then it is stopped Feb 12 16:46:51 start/stop occur whenever you're not longer at the front of your task stack Feb 12 16:47:07 and/or your task stack is no longer the one in focus Feb 12 16:47:25 weird, when the hell did I uninstall the appengine sdk... Feb 12 16:47:34 also shitty devices with low ram can make paused activities go to stopped state Feb 12 16:55:27 casadogg, are you sure? where is this documented? Feb 12 16:56:06 any reason my paid app is not compatible with my device but my free version is? Feb 12 16:56:21 pfn, so I have to create the notification from scratch again? Feb 12 16:56:30 Hogofwar, I suppose, yes Feb 12 16:56:34 If the device has low memory and there are too many apps running, the one with highest priority will be... well, prioritized Feb 12 16:56:40 Hogofwar, re-use the code that built the notification in the first place Feb 12 16:56:41 pfn, nevermind, hacked around it Feb 12 16:57:23 yes and app in foreground/only paused always has highest priority Feb 12 16:58:19 i have done a horrible thing Feb 12 16:58:27 notification.mActions.get(1).icon=android.R.drawable.ic_media_play; Feb 12 16:58:57 and you re-post that notification? that works, but yuck Feb 12 16:59:24 mActions also isn't a public field, so no, don't reflect on it, yuck Feb 12 16:59:55 it works... Feb 12 17:00:04 yuck Feb 12 17:00:16 another beta update.. wasnt the latest one only 2 days ago? Feb 12 17:01:01 weird, acra stopped working... Feb 12 17:03:19 this codebase is terrible Feb 12 17:03:34 RustyShackleford: then refactor it Feb 12 17:03:41 (if you have time) Feb 12 17:03:44 the devs use the mMember convention for local variables Feb 12 17:03:53 justjanne: working on it one class at a time ;) Feb 12 17:03:55 ah, you can automate that away Feb 12 17:04:04 also for statics Feb 12 17:04:33 things like singletons with public constructors. Methods such as public VOID getName() Feb 12 17:05:48 btw, I’m a bit annoyed that IntelliJ can auto-generate getters in the older styles (with name() instead of getName()), but can’t auto-complete them instead of assignments Feb 12 17:07:03 half of Java’s internal classes use that style, but IntelliJ can only deal with the beans convention Feb 12 17:07:08 also, What's the easiest way to check if the mediaplayer is preparing? Feb 12 17:11:14 Fixed that Feb 12 17:11:19 justjanne, can't autocomplete..? Feb 12 17:11:21 Now, my possibly worst question... Feb 12 17:11:37 Is it possible to just have an app, once launched, just start a service instead of opening the app window Feb 12 17:12:42 Hogofwar, start service in onCreate and finish, I think there's also a theme that has no UI, but can't check right now Feb 12 17:12:45 you can start the service via a broadcast receiver. then you dont need an activity at all Feb 12 17:13:01 but yes. simply dont set a contentView and finish directly Feb 12 17:13:42 Zharf, transparent? Feb 12 17:13:48 Zharf: imagine I first use an attribute, say "name". Then I make that private and create a name() getter. Feb 12 17:13:50 Hogofwar: there is a mediaPlayer.setOnPreparedListener() Feb 12 17:14:00 IntelliJ can’t auto-replace the direct access with the getter Feb 12 17:14:11 if I name the getter getName(), it can auto-replace it Feb 12 17:14:14 shmoooz, yeah, got that Feb 12 17:14:18 ah Feb 12 17:14:39 internal direct access? Feb 12 17:14:54 No, imagine I prototyped by making everything public Feb 12 17:15:08 then I use the template for generating getters and setting it private Feb 12 17:15:10 why would you do that! Feb 12 17:15:10 getters suck :o Feb 12 17:15:14 Even with a custom template, Feb 12 17:15:21 IntelliJ generates the getter, Feb 12 17:15:30 but doesn’t modify all accessing functions Feb 12 17:15:40 It’s dataflow analyzers also don’t see that. Feb 12 17:15:52 file a bug ;) Feb 12 17:15:58 *Its Feb 12 17:16:21 i think they want you to use the getter syntax with ´get´ Feb 12 17:16:33 if I’d file a bug every time I see one, I’d be (a) still working next year on this app, and (b) it wouldn’t be fixed anyway quickly Feb 12 17:16:43 IntelliJ would fix it in 15, Feb 12 17:16:49 then don't complain Feb 12 17:16:50 Android Studio wouldn’t ever get the update Feb 12 17:16:59 justjanne, current AS beta is on 15. Feb 12 17:17:17 well, then it’d at least be fixed some day in the future. Feb 12 17:17:50 stopForeground(true); Feb 12 17:17:50 stopSelf(); Feb 12 17:17:51 System.exit(0); Feb 12 17:17:53 Whoops Feb 12 17:17:59 other things, like the String::split bug, are useless to even complain about, because fixing them in older releases is impossible Feb 12 17:18:03 Anyway, i probably don't need all that to close a service Feb 12 17:18:06 dont use System.exit in android apps.. Feb 12 17:18:21 I’d just hope there was a simple way to replace system libs on Android Feb 12 17:18:34 Stackoverflooooow Feb 12 17:20:09 But yeah, Running stopForeground/stopSelf doesn't stop my service completely Feb 12 17:24:58 what do you mean 'completly' Feb 12 17:25:02 'completely' Feb 12 17:27:40 Zharf, I had music playing in the service, when I called stopSelf, the music did not stop Feb 12 17:28:12 When I got music to stop, which I should do anyway, it was still running in the background as far as I could tell (listed as a running application) Feb 12 17:28:22 considering my activity had already finished as well Feb 12 17:33:24 I guess you don't tear down properly in onDestroy Feb 12 17:38:17 Does this mean I hit my dex limit? Error:Execution failed for task ':app:transformClassesWithDexForAppBetaDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2 Feb 12 17:38:40 read the full log Feb 12 17:38:45 this is not the error Feb 12 17:39:53 Zharf, huh, haven't done anything to ondestroy Feb 12 17:40:48 capella damn http://it.slashdot.org/story/16/02/12/034206/pwn2own-2016-wont-attack-firefox-because-its-too-easy Feb 12 17:41:00 amazon sent me this https://www.modeemi.fi/~jms/amazom_lorem.txt Feb 12 17:41:02 Aha. thanks pfn and danijoo_ "Multiple dex files define Lcom/..." Feb 12 17:41:15 What's the easiest way to track that issue down? Feb 12 17:41:23 jar tf all your input jars Feb 12 17:41:45 it's really stupid how gradle/android studio present the above message as if it were the error Feb 12 17:42:52 pfn: jar tf all my input jars? Not familiar with that. Do I just run "jar tf" from the project/app root? Feb 12 17:43:03 no Feb 12 17:44:23 now need to figure out how to make my notification not ongoing... Feb 12 17:44:58 if you use startForeground, it'll be forced to be ongoing Feb 12 17:45:33 pfn: should I just google jar tf? Feb 12 17:45:35 if you don't use startForeground, and it's not bound to anything, it's free pickings for the OS to kill off if it runs low on resources Feb 12 17:46:22 I would love to handle notification dismiss as music stop in my player but I can't because I don't want to not use startForeground Feb 12 17:48:51 on the other hand it'd probably be too easy to accidentally clear all notifications in that case as well... Feb 12 17:52:15 pfn okay, I opened up the jar to see the classes. What am I looking for here? Two duplicate class names? Feb 12 17:59:48 yes Feb 12 18:00:05 g00s: taking your advice buddy Feb 12 18:00:13 pfn: No duplicates that I can see. Feb 12 18:00:13 got an appointment at 3 Feb 12 18:00:29 RustyShackleford good luck ... Feb 12 18:01:01 RustyShackleford podiatrist or primary care ? Feb 12 18:01:07 Multiple dex files define Lcom/app/gui/BuildConfig; pfn thats the error. That means I have multiple BuildConfigs? Won't I ALWAYS have multiple of those? Feb 12 18:01:19 no Feb 12 18:01:22 you should only ever have 1 Feb 12 18:03:43 g00s: podiatrist Feb 12 18:04:21 might be able to do xrays right in office then Feb 12 18:04:23 might as well go straight to the specialist Feb 12 18:04:27 yeah Feb 12 18:04:33 yes, I checked with them about that. xrays on site Feb 12 18:04:50 waiting for them to okay my insurance. Feb 12 18:04:59 lol you wouldn't believe how many of these offices are closed today Feb 12 18:05:00 RustyShackleford just don't let them amputate it :D Feb 12 18:05:13 that was my dad's joke whenever I got hurt Feb 12 18:05:26 "well, it looks like your foots got to come off" Feb 12 18:05:30 not a joke these days :D Feb 12 18:05:37 closed today? Feb 12 18:05:42 presidents day Feb 12 18:05:49 its funny if your doc says that after you wake up after an operation :p Feb 12 18:05:51 not just today, every friday Feb 12 18:05:52 but the holiday is monday... Feb 12 18:05:56 ¨amputation succesful ¨ Feb 12 18:06:07 some of these offices are open 3 days a week only Feb 12 18:06:28 RustyShackleford golf requires 4 days week min Feb 12 18:06:31 I guess that's what happens when you live in the boondocks Feb 12 18:06:47 "Amputation not successful" is even worse. Feb 12 18:06:51 I'm in chicago. not even a burb, but inside city limits Feb 12 18:06:56 hardly the boondocks Feb 12 18:11:22 hm... newest gradle plugin broke by build -_- Feb 12 18:11:41 i hate those backward incompatible changes.. Feb 12 18:11:42 heh Feb 12 18:11:53 danijoo_ did it mess up the kotlin plugin ? Feb 12 18:12:05 I see that tnorbye is quoting /r/androiddev even on their bug tracker now. Feb 12 18:12:48 g00s, no. I change the resulting apks name to include versioncode and name. And now if builds the apks and then screams it cant install it because its not found Feb 12 18:13:05 if = it Feb 12 18:15:54 I hate the Sun/Oracle recommendation of always saying `if ((foo == a) && (bar == b))` and never saying `if (foo == a && bar == b)`. Slowly removing that from my code. Feb 12 18:16:13 I don't think `&&` is that hard to notice. (`||` is even easier to notice.) Feb 12 18:16:24 Or that it's hard to know the precedence here. Feb 12 18:17:04 pfn: How do I get rid of those guys? It's coming from a lib that I created myself. Feb 12 18:17:07 you need to change it in a way such that the dependent task knows where to find it Feb 12 18:17:14 eghdk, your lib should not have the same package name as your app Feb 12 18:17:16 that is incorrect Feb 12 18:17:17 TacticalJoke, i´d try to build a regex to remove it all at once Feb 12 18:17:24 :D Feb 12 18:17:29 eghdk, and it should have created an aapt error before compile Feb 12 18:17:31 should be possible at least for the easy cases Feb 12 18:17:43 where its only 2 conditions with && or || Feb 12 18:18:02 pfn: Oh. So the issue is that there are multiple files with the same package name as my app? Feb 12 18:18:52 Another one I dislike is `return (foo == something);`. Not sure how that improves upon `return foo == something;`. Feb 12 18:18:55 soo... appcompat now also magically applies android:tint on lower api versions, right? Feb 12 18:19:06 danijoo_, no Feb 12 18:19:06 by replacing my imageviews with ImageViewCompat Feb 12 18:19:09 oh? Feb 12 18:19:12 hmpf Feb 12 18:19:18 i thought it does. let me check Feb 12 18:19:21 on imageview perhaps Feb 12 18:21:20 what do i need to compile this project into an .apk? https://sourceforge.net/p/droiddlnaplayer/code/HEAD/tree/ Feb 12 18:21:50 ¨On older platforms, AppCompat emulates the color theming where possible. At the moment this is limited to coloring the action bar and some widgets.¨ Feb 12 18:22:12 yep works Feb 12 18:22:17 ... on linux, with commandline, without eclipse ;) i got the linux sdk already installed... Feb 12 18:22:19 it even works with the android: namespace Feb 12 18:22:20 pfn: I found the issue. I have two libs of mine with BuildConfig with the same package name! Thats the issue I bet! Hooray! One more thing. I looked into timber, and it seems like it doesn't have a BuildConfig. Should my lib have a build.config or no? Feb 12 18:22:24 thats nice Feb 12 18:25:51 'ant debug' says 'Buildfile: build.xml does not exist!' do i have to write that myself or is there a command to generate one? Feb 12 18:26:44 android update project Feb 12 18:27:47 pfn: Should my libs include a BuildConfig? It seems like Timber doesn't. Feb 12 18:42:08 is there a way to guarantee that some code will be able to run before any other code runs when the application is launched? Feb 12 18:42:26 put in in the application class in onCreate Feb 12 18:42:31 that will run the very first Feb 12 18:42:37 ok, ty Feb 12 18:49:58 is there a method for checking whether this activity is focused? Feb 12 18:50:01 or in the background Feb 12 18:51:21 eghdk, if your libs don't use the BuildConfig there's absolutely no reason to include it Feb 12 18:51:30 RustyShackleford, if its not paused, its in focus Feb 12 18:51:39 you can set a boolean in onResume/onPause Feb 12 18:51:58 suppose theres like a dialog on top of the activity. Is it still paused? Feb 12 18:52:22 I Think yes Feb 12 18:52:23 pfn: Got it. Thanks man. super helpful Feb 12 18:52:27 But dont quote me Feb 12 18:52:37 dialogs don't pause activities Feb 12 18:52:44 pfn: BUILD SUCCESSFUL, thx :-) Feb 12 18:52:51 what about dialogfragments? Feb 12 18:53:21 (had to move lib/commons-codec-1.3.jar into libs/commons-codec-1.3.jar, then it worked) Feb 12 18:53:50 dialogs don't pause activities Feb 12 18:59:49 do dialogs pause activities? Feb 12 19:05:41 Hello guys, I have Android Studio 1.5.1 on a Mac with Yosemite and it drives me crazy because every time it can't recognise classes like ArrayList and TextView and so on... This is very annoying, anyone had this issue and found a solution? Feb 12 19:05:59 this cheap chinese bluetooth is great Feb 12 19:06:15 sound quality could be better, but for 25 bucks it works amazing Feb 12 19:06:26 people i've talked to say I come in clear Feb 12 19:08:19 arent they all from chinese? :p Feb 12 19:08:56 lol (although, realistically, a lot is from the chinese republic or similar countries, too) Feb 12 19:09:24 danijoo_: well yeah Feb 12 19:09:41 but they're branded under more well known brands Feb 12 19:09:51 WSound, ever hear of them? Me neither Feb 12 19:09:53 not everything’s from the People’s Republic of China, some stuff is also from the Republic of China, or Korea. Feb 12 19:10:50 I have a bluetooth sound box from china (p.r. of), which sounds awesome, but the manual features things like "Warm Reminder: do not..." Feb 12 19:17:35 justjanne: the manual that comes with no-name brand chinese stuff is hilarious Feb 12 19:18:00 Safeguard: If button is pressed unconsiously.... Feb 12 19:30:26 offtopic: porting one of my backends from parse baas to Rails and been hit by the imposter syndrome Feb 12 19:34:01 bitkiller, "oh god i knew how this worked once wtf"? Feb 12 19:36:53 do we have one copy of a static variable for each thread? Feb 12 19:37:06 I believe thats what happens with c++ threads Feb 12 19:37:28 no Feb 12 19:37:58 I can't remember if there are any pitfalls for threads Feb 12 19:39:34 RustyShackleford you need threadlocal for that Feb 12 19:40:07 https://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html Feb 12 19:40:15 if I can get this timer off the ui thread, I think i've got this finally solved Feb 12 19:40:54 actually g00s, thats the behavior i'm trying to avoid Feb 12 19:41:35 AsyncTask is outdated isn't it? Feb 12 19:42:18 no. its just used wrong very often Feb 12 19:42:23 Okay, I’ve now screenshotted the drawer, font choices, settings menu, etc of all apps preinstalled on the nexus devices, all updated to the latest version. Feb 12 19:42:38 I’ve not seen any two apps use the same font, or size, or background color. Feb 12 19:42:43 RustyShackleford: In theory I think the jvm is not required to expose a write on one thread to another unless they are synchronized or the variable in question is volitile. If you’re trying to avoid per-thread storage and seeing something that looks like you have it, I guess you might be getting hit by that. Not sure it’s likely, though. Feb 12 19:42:46 Some even lock layout to portrait. Feb 12 19:42:53 Some just display gingerbread-style loaders. Feb 12 19:42:57 WTF IS THIS SHIT Feb 12 19:43:16 justjanne, what is your point? ^^ Feb 12 19:43:18 Then random Holo UI in Play Games right now Feb 12 19:43:36 danijoo_: I’m trying to get inspiration for material, master-detail preference screens Feb 12 19:43:45 threadlocals suck Feb 12 19:43:54 if I move this Handler to another thread, am I going to screw a bunch of stuff up? Feb 12 19:44:10 justjanne, stock settings app :p Feb 12 19:44:13 but discovered that Google’s stuff is soooooooooooo ugly, if you want Material, don’t look at Google Feb 12 19:44:27 danijoo_: that uses a UI thing that I can’t use in my own apps Feb 12 19:44:33 why Feb 12 19:45:12 I can’t build a multi-panel preferenceactivity with actionbar if I want the master panel to also be settings, because for that I require access to a method that’s only available to com.android. ... Feb 12 19:45:34 In my last app I just copied the code the settings app uses, and used reflection to access that thing, but I wish to not do that again Feb 12 19:46:09 you can use preferencefragments and a normal activity Feb 12 19:46:25 not that easily :/ Feb 12 19:46:27 they are in support lib Feb 12 19:46:36 ok Feb 12 19:46:39 yeah, I’ll build something like that. Feb 12 19:46:46 currently first looking at UI inspiration Feb 12 19:47:03 but literally, every single google app uses different font weights, sizes, colors, and a different version of appcompat Feb 12 19:47:08 I feel like I’m going crazy Feb 12 19:48:40 I always just throw a settingsfragment in my activity and dont waste another thought on prefs :p Feb 12 19:49:59 well, I have 200+ settings in the end ;P Feb 12 19:50:18 for example, configuring the IRC networks you’re in Feb 12 19:52:51 justjanne yeah, what the hell is duarte doing over there :P Feb 12 19:54:36 I’m uploading screenshots now for public confusion Feb 12 19:54:37 my favorite google app is the Clock, my most hated is youtube Feb 12 19:54:46 I screenshotted all. ALL. Feb 12 19:54:53 All in landscape on 7" Nexus 7 Feb 12 19:55:06 both seem at extremes - clock is sublime and beautiful + functional, youtube is like a clusterfuck of navigation Feb 12 19:55:31 justjanne clock looks nice on landscape n7 :) Feb 12 19:55:57 http://imgur.com/a/eTz1G Feb 12 19:56:26 also nice the GPU errors in the Google Play Settings Feb 12 19:56:27 oh this is just Settings Feb 12 19:56:38 all were taken in landscape. Feb 12 19:56:40 (!) Feb 12 19:56:43 even the portrait ones Feb 12 19:56:58 also notice how some have status bar, Feb 12 19:57:00 some don’t, Feb 12 19:57:03 some have actionbar, Feb 12 19:57:05 some don’t, Feb 12 19:57:13 some are material with CAPS headers, Feb 12 19:57:16 Calendar settings screen is bizarreo Feb 12 19:57:19 some material with normal headers, Feb 12 19:57:22 some are holo, Feb 12 19:57:29 some are material with holo colors, Feb 12 19:58:00 And how all of them have different actionbar heights, and styles, and elevations Feb 12 19:58:11 Now, which follows the guidelines? Feb 12 19:58:28 justjanne Android: Different but together :D Feb 12 19:58:42 like I said, guidelines are made to be broken Feb 12 19:59:05 pfn: No, this is just ugly. Feb 12 19:59:14 It physically hurts to see this Feb 12 19:59:30 physically hurts? Feb 12 19:59:30 And then the guidelines say you should use no padding on the list, but 16dp on the items http://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0Bx4BSt6jniD7clprVXFrZGZ6QWM/patterns_settings_sliders.png Feb 12 19:59:31 ok Feb 12 19:59:34 hipster designer Feb 12 20:00:01 no, some people just have mental disorders with the need to have things always perfect and in order. Feb 12 20:00:28 yeah i'm like that Feb 12 20:00:48 stuff that is not perfect screams out Feb 12 20:00:52 yeah Feb 12 20:01:15 there is one pixel marging on the left which should not be there Feb 12 20:01:17 and the guidelines don’t have any proper definition here either. Feb 12 20:01:22 i'm kinda like that, <3 symetry Feb 12 20:01:49 most good designers are like that ;) Feb 12 20:01:56 but they made it very hard to implement their guidelines properly, and i'm glad guidelines are not rules Feb 12 20:02:04 yeah Feb 12 20:02:15 https://github.com/Taig/Parcelable Feb 12 20:02:18 hmm, sounds useful, I should use it Feb 12 20:02:21 maybe we should design our own, better, guidelines ;P Feb 12 20:02:22 i'm using PreferenceFragmentCompat or whatever its called, doesn't even seem to draw dividers at all Feb 12 20:02:46 g00s: per default, you can’t properly make elevated buttons either. Feb 12 20:03:08 guidelines are not standard a crime Feb 12 20:03:45 i think system components should have nailed L&F. what if ever "open file" dialog looked different Feb 12 20:03:57 what you do in your own app for other stuff is your own business though Feb 12 20:04:14 but Settings - lol the whole point of using Settings - was that it had consistent L&F Feb 12 20:04:18 g00s, omg, i was so tired with preferences styling last day.. now i'm always using an AppCompatActivity with PreferenceFragmentCompat or AppCompatPreferenceActivity Feb 12 20:05:07 i had to figure out how to set that silly preferenceStyle attribute right ... Feb 12 20:05:39 adq you dawg we put compat in your compat ! Feb 12 20:05:41 yeah something like @style/PainfulPreferencesTheme Feb 12 20:05:48 and then you have to set more things... Feb 12 20:05:49 wait, what? Feb 12 20:05:50 i'm so tired Feb 12 20:05:51 WHAT? Feb 12 20:05:58 https://android.googlesource.com/platform/development/+/master/samples/Support7Demos/src/com/example/android/supportv7/app/AppCompatPreferenceActivity.java This is not part of AppCompat? Feb 12 20:06:10 nope, it's a class you have to copy in your project Feb 12 20:06:12 it sux Feb 12 20:06:15 but it works Feb 12 20:06:19 i had to put @style/PreferenceThemeOverlay.v14.Material Feb 12 20:06:29 still not sure if i did it right though Feb 12 20:06:35 . Feb 12 20:06:36 . Feb 12 20:06:36 . Feb 12 20:06:46 the oldschool way :D Feb 12 20:06:48 Scheißverein Feb 12 20:06:57 looks right enough Feb 12 20:06:57 gordon_, i'm inheriting only from @style/PreferenceThemeOverlay Feb 12 20:07:00 that's all you need to do Feb 12 20:07:02 that means shit something ... Feb 12 20:07:05 oops g00s i meant Feb 12 20:07:06 translation ? Feb 12 20:07:37 shitsomething Feb 12 20:07:39 g00s: shit-club, it’s also the name of a song https://www.youtube.com/watch?v=eSANwJYYU5I complaining about how much of a piece of shit everything is, especially companie. Feb 12 20:07:41 *s Feb 12 20:07:44 adq, you need PreferenceThemeOverlay.v14.Material to look like non-shit on v14+ Feb 12 20:07:45 :D Feb 12 20:07:56 and you need preference-v14 to get that Feb 12 20:08:03 pfn, thx i will try to see if i spot a diff Feb 12 20:08:07 what ohhh Feb 12 20:08:12 more dependency then? :D Feb 12 20:08:13 the song complains about the fees for being able to pay the fees for the fees for something, or about how shitty the train companies are Feb 12 20:08:18 adq, yes, another dependency Feb 12 20:08:37 ok, i will note what i just read and test to see if it's worth it Feb 12 20:08:48 i'm targetting mainly api 18+ on this project Feb 12 20:08:52 thx Feb 12 20:09:22 then just add preference-v14 Feb 12 20:09:28 and use PreferenceThemeOverlay.v14.Material Feb 12 20:09:41 preference-v14 transitively pulls in preference-v7 in any case Feb 12 20:15:33 * g00s will be interested to see justjanne finished app, seems like it will be made with love :D Feb 12 20:15:45 perfectionists unite! Feb 12 20:16:01 and lots of frustrating hours :p Feb 12 20:16:31 g00s: btw, the first setup of the app atm: https://dl.kuschku.de/videos/device-2016-02-12-175645.mp4 Feb 12 20:17:47 justjanne wow that looks amazing so far Feb 12 20:18:14 It’s hard enough to write maintainable code that looks acceptable Feb 12 20:18:21 justjanne i'm curious to see when you finish the main information architecture of the UI, how the screens / spaces were organized Feb 12 20:18:38 well, that’s a problematic discussion, especially on tablet Feb 12 20:18:45 ooh. that is nice looking. Feb 12 20:18:55 the current idea for the main screen is https://dl.kuschku.de/docs/mockup.pdf Feb 12 20:19:13 in one place i wanted to use SlidingPaneLayout, but abandoned because Nav drawer slides, sliding pane slides, and I had a drawer on the right also Feb 12 20:19:29 well, I’ll have only 2 drawers, left and right Feb 12 20:19:43 that’s actually an idea Feb 12 20:19:49 slidingpanellayout for the left drawer Feb 12 20:19:53 wait, no, it isn’t Feb 12 20:19:56 :/ Feb 12 20:20:02 it’ll just be locked on the tablet Feb 12 20:20:50 yeah i had this master / detail scenario, where the majority of time would be in detail - and introducing to Activities for this hierarchy also in ways made things clumsy Feb 12 20:21:13 i think our apps have the same UI 'problem' or requirement, so i'm wondering how you solve it Feb 12 20:21:16 yeah, here you have channel list, chat screen, nick list Feb 12 20:21:27 except in my case, i'm not connecting to IRC servers but other bluetooth devices Feb 12 20:21:35 ah, interesting Feb 12 20:21:38 btw, brb Feb 12 20:22:42 Neck hurts after 11:36h of work on that Feb 12 20:23:01 yeah so instead of channel list, chat screen, nick list, i have BT device, device dashboard, device sensors Feb 12 20:23:14 I'll just give up on the settings for now and do the chat first Feb 12 20:23:20 Well, reimplement chatting. Feb 12 20:23:28 Well, reimplement channel list actually. Feb 12 20:23:41 The chat works, I just can't select channels currently. Feb 12 20:23:52 This is the third rewrite of that activity Feb 12 20:23:58 Wait Feb 12 20:24:00 Fifth Feb 12 20:24:09 Third since the rewrite of the backend. Feb 12 20:24:20 Every time I modularize more and more, and make the code cleaner Feb 12 20:24:50 justjanne did you get the setup wizard from android ? Feb 12 20:24:56 Nope Feb 12 20:25:00 Completely self made. Feb 12 20:25:01 * duboisj needs to get much better at making things look nice like that. At the end of the day, my goal is running Windows apps on an Android device, so there are limits to how “smooth” that’s going to be. But as much polish as possible in the Android UI components will make for a lot more comfort when things inevitably go a bit wrong running wine … Feb 12 20:25:09 But the idea is based on the Android thing. Feb 12 20:25:26 I can give you the code soon. Feb 12 20:25:36 Actually, I should push now Feb 12 20:25:49 justjanne more curious about UI design decisions, but yeah would be interested to see finished result Feb 12 20:26:15 justjanne: Have you ever implemented anything like a “discoverability” mode where your app does thigs on first-run like say “click here for this, there for that”, similar to how a new tablet behaves sometimes? Feb 12 20:26:31 Is there some standardized way of doing that, or would you roll that yourself if you wanted it? Feb 12 20:27:17 duboisj: actually, there is a standard for that Feb 12 20:27:51 There is https://github.com/amlcurran/ShowcaseView Feb 12 20:28:00 > The library is based on the "Cling" view found in the Launcher on Ice-Cream Sandwich and Jelly Bean. Feb 12 20:28:36 and https://github.com/deano2390/MaterialShowcaseView Feb 12 20:28:46 ah. yeah, that looks right. So nothing in the standard sdk, you have to get it from github. Feb 12 20:28:51 yup Feb 12 20:29:12 there’s also https://github.com/iammert/MaterialIntroView Feb 12 20:29:49 That’s another thing I’m not accustomed to. Of course we use third-party libraries, but not so often as it seems Android developers do, and usually not for UI. Feb 12 20:29:52 but it looks perfect. Feb 12 20:30:05 Also, there’s https://github.com/PaoloRotolo/AppIntro Feb 12 20:30:17 which is the new way Google apps deal with it, a simple intro before the first launch Feb 12 20:30:20 except youtube, Feb 12 20:30:24 that uses ShowcaseView Feb 12 20:31:18 literally showcaseview, or something that looks the same that google wrote? Are these so populare / common that google is using them in theor own apps? Feb 12 20:31:54 Google always writes their own Feb 12 20:31:56 always. Feb 12 20:32:08 worse, Feb 12 20:32:12 every Google team writes their own Feb 12 20:32:28 so, as a result, there are 10 different implementations, with different bugs and look Feb 12 20:35:00 fair enough, that’s exaclty what I’d have done … ;-) Feb 12 20:35:57 but it’s cool that the community tends to write & share so much of that kind of thing. Slightly disconcerting (to me, not for great reason necessarily) to use building blocks like that which aren’t maintained by a formal project nor by the sdk provider. I should probably get over some of that, though. Feb 12 20:36:47 anyway thank you for the pointers to discoverability projects. I will check them out. Feb 12 20:38:30 g00s: this is the activity: https://github.com/justjanne/QuasselDroid-ng/blob/master/app/src/main/res/layout/activity_setup.xml Feb 12 20:38:38 this is the slide container: https://github.com/justjanne/QuasselDroid-ng/blob/master/app/src/main/res/layout/slide.xml Feb 12 20:38:48 this is a slide: https://github.com/justjanne/QuasselDroid-ng/blob/master/app/src/main/res/layout/slide_account_user.xml Feb 12 20:39:07 And here you find the corresponding java code: https://github.com/justjanne/QuasselDroid-ng/tree/master/app/src/main/java/de/kuschku/quasseldroid_ng/ui/setup Feb 12 20:39:15 the UI has breakpoints at 600dp and 600dp-landscape Feb 12 20:40:17 justjanne: I was just going to ask how you were licensing your stuff and what the common situation was when re-using components in commercial apps, but it looks like yours is gpl … Feb 12 20:40:18 :) Feb 12 20:40:22 justjanne "Martin "Java Sucks" Sandsmark (sandsmark)" :D Feb 12 20:40:27 nah Feb 12 20:40:31 sandsmark is sandsmark Feb 12 20:40:41 he’s just a Qt guy Feb 12 20:40:43 lol Feb 12 20:41:10 he wrote important stuff for the original version of the app, before the big rewrite Feb 12 20:42:09 duboisj: I can re-release the slide stuff under MPL, if you wish Feb 12 20:42:27 but the whole IRC backend is GPL, so my end of it is also GPL Feb 12 20:42:58 Ah, I see. Feb 12 20:43:30 justjanne so is the left panel nav drawer or channels ? Feb 12 20:44:04 the nav drawer are the channels. Feb 12 20:44:26 hey guys, quick question. if I want to set the text color of the recyclerview items based on one of the item attributes, where do I call/place the code? http://pastebin.com/raw/48HdQcKt Feb 12 20:44:39 the aoo’s nvigation is literally setup menu, channel/chat/nicklist, channel topic, advanced editor, preferences, user detail. Feb 12 20:44:42 Um, wrt slide, I’m not sure it’s precisely something I’d need, plus I’d still feel a bit bad asking you to re-release just so I can put it in an app I’m getting paid to write. But it’s a very generous offer. Thank you. Feb 12 20:44:49 i tried placing it in the onBindViewHolder method but that just turned ALL the names to green, not the ones with the guality "good" Feb 12 20:45:20 Controless: just set it back to the default color if the item’s quality is not good Feb 12 20:45:20 not only the ones* Feb 12 20:45:45 do (pseudocode) if (...) setColor(Green) else setColor (whateverYouUseOtherwiseAsDefaultColor) Feb 12 20:46:13 because a view, which might have been a green item before, might be used to represent a non-green item later on Feb 12 20:46:14 ill try that out, thank you! and it should be placed in the onbindviewholder, correct? Feb 12 20:46:18 yes Feb 12 20:46:24 thanks! will report back in awhile :) Feb 12 20:46:30 afk for a little while. Thanks again for the pointers (and nice looking UI work) Feb 12 20:52:16 damn justjanne, for some reason it's not entering the other if loops and just going into 'else'. http://pastebin.com/raw/qWK0XNxH. ugh, no idea what the issue is. my object and its getters/setters are correct Feb 12 20:54:13 (a) why the for loop? Feb 12 20:54:25 (b) how about using an ENUM instead of a string there? Feb 12 20:54:52 c) how about colors.xml Feb 12 20:55:19 that’s yet another thing, yes Feb 12 20:55:30 sorry, i am a beginner. the for loop is there because i have an arraylist of 'items' and i want to change the color of each one Feb 12 20:55:32 even better would be attrs.xml and themes.xml, but that’s for later Feb 12 20:55:50 Controless, thats not how adapters work.. Feb 12 20:56:11 in onBindViewHolder you only change the item with the current position Feb 12 20:56:31 oh shit.... Feb 12 20:56:43 thats why it wasnt working properly Feb 12 20:56:49 if you want to change all you would have to set a flag and then notify the adapter to redraw everything (notifyDatasetChanged) Feb 12 20:58:34 ahhh okay thanks, ill look into that Feb 12 21:00:40 holy shit it worked!! this was my code: http://pastebin.com/raw/zHkvSTFn. thank you justjanne and danijoo_ :) Feb 12 21:01:16 Controless: now please try to learn about colors.xml, Enums, and so on ;) Feb 12 21:01:29 will do haha :) Feb 12 21:02:12 Is there a way to enforce that the intent to start a certain activity must contain a particular data? Feb 12 21:02:38 if(doesntHaveData) throw RuntimeException() ^^ Feb 12 21:02:45 that will kinda force it Feb 12 21:02:48 Well, Feb 12 21:02:55 you could also setResult with an error code Feb 12 21:16:42 im trying the colors.xml method and it says cannot resolve method getresources(). itemViewHolder.itemName.setTextColor(getResources().getColor(R.color.quality_normalrandom)); Feb 12 21:17:04 getResources() can only be called on a context Feb 12 21:17:12 tried googling but couldnt find any viable answers. Feb 12 21:17:14 oh Feb 12 21:17:17 you can get a context from any view like this: Feb 12 21:17:24 itemViewHolder.itemName.getContext() Feb 12 21:17:43 you may use the context from one view for the other views, but ONLY if they all use the same theme Feb 12 21:19:14 thanks justjanne!! Feb 12 21:33:50 justjanne sorry for all the questions, I promise this will be me last. when I implement this, http://stackoverflow.com/a/26196831, it works fine in the emulator but force closes on my device app. is there a way to see whats causing the issue? Feb 12 21:34:13 connecting my phone is not a solution sadly because my macbook cant seem to connect to my s6 Feb 12 21:35:56 hello, I need some help. I am about to build webview app (because html5 is my speciality), and I have knowloadge of working with webview and injected javascript to all java code, and I am in a situation to use an input field to recognize the picture take from camera and the ones stored on mobile Feb 12 21:40:35 g00s: my first working demo here: https://dl.kuschku.de/videos/device-2016-02-12-223614.mp4 Feb 12 21:40:42 this one has the full control flow in it Feb 12 21:42:53 http://imgur.com/Rwnes4n making a companion app on handheld for a wear app, which gives an animated preview similar to what you (would) see on the wear watch screen Feb 12 21:44:39 justjanne nice ! at 0:36 what happens if you press that spinner in the header view ? Feb 12 21:44:49 "All Chats v" Feb 12 21:44:54 g00s: you get a list of chat list Feb 12 21:45:20 For example, you could configure a chat list to only configure private chats on Freenode which have new messages Feb 12 21:45:35 or a chat list to only contain channels with no new messages Feb 12 21:47:25 g00s: the settings menu from the desktop client: http://i.imgur.com/WXX5ddD.png Feb 12 21:47:31 in the pic above, i hate the little padding in the "ok" button Feb 12 21:47:32 (for custom chat lists) Feb 12 21:47:39 it broke everything visually Feb 12 21:47:58 adq: well, you shouldn’t use raised buttons in dialogs anyway, right? Feb 12 21:48:00 half-an-hour spent to deal with these android:theme (yes, it was not style) Feb 12 21:48:14 which i will anihilate and replace that with a conventional background selector Feb 12 21:48:20 just to get rid of this horrible padding of few pixels Feb 12 21:48:54 justjanne, yeah maybe, did not even think of that, it's still too inconsistent across different api Feb 12 21:48:58 despite using appcompatbutton... Feb 12 21:49:18 i don't have elevation on pre-lolli and it's fine, and i'm not able to ged rid of on M... Feb 12 21:49:30 that’s weird Feb 12 21:49:34 M and L should behave the same Feb 12 21:49:47 btw, finally solarized theme works! http://i.imgur.com/EZFQAE8.png Feb 12 21:50:00 (very early build still) Feb 12 21:50:19 nice, maybe the chat background should contrast a bit more with the toolbar bg color Feb 12 21:50:23 or the contrary Feb 12 21:50:39 well, the theme guys can do that. Feb 12 21:50:49 I only care about the code working Feb 12 21:50:51 pain :p Feb 12 21:51:06 I never use that theme, I trust them to do their thing Feb 12 21:51:18 the interesting part will be reading .qss files into Android themes Feb 12 21:51:27 I wrote my own Context handler, my own theming system, Feb 12 21:51:36 but getting android to use it will be a fuckton of work Feb 12 21:52:37 years ago i made an (unpublished) irc client for android, at that time cleverbot api was open, and added a function to redirect highlight message to cleverbot and reply to the one who highlighted you with the answer from cleverbot Feb 12 21:52:40 it was pretty fun :p Feb 12 21:53:04 yeah, getting a working, good-looking, usable IRC client for android is lots of work. Feb 12 21:53:32 yeah, i cannot imagine, this is how i found the max number of line a textview can handle Feb 12 21:53:34 but (a) IRCCloud is in the US, (b) IRCCloud is expensive, (c) IRCCloud isn’t doing enough for what I need, (d) all other clients are even worse Feb 12 21:53:37 LOL Feb 12 21:53:40 textview Feb 12 21:53:41 ouch Feb 12 21:53:46 eh come on, it was 2011 Feb 12 21:53:49 still Feb 12 21:53:53 let me check... Feb 12 21:54:04 eh come on, i was a noob :) Feb 12 21:54:46 qicr and call it a day :P Feb 12 21:54:49 justjanne, what about weechat? Feb 12 21:54:53 adq: https://github.com/sandsmark/QuasselDroid/commit/ae332c0fe0b882ec4a4145817c94e040a78d8a24 Feb 12 21:54:55 2010 Feb 12 21:54:56 ;P Feb 12 21:54:58 ahah yeah forgot pfn is doing qicr too :p Feb 12 21:55:04 qirc* Feb 12 21:55:15 I specified well-working, good-looking, and gracefully handling disconnects Feb 12 21:55:21 justjanne, ^^ Feb 12 21:55:23 that automatically rules out qicr, Feb 12 21:55:34 and back in the days ruled out weechat, too. Feb 12 21:55:45 * adq grabs popcorn, android irc client war, maybet he guy doing andchat is here too and can join Feb 12 21:55:47 also, I want a webclient and desktop client that integrate Feb 12 21:56:30 Being able to do https://dl.kuschku.de/videos/2016-02-08%2018-56-57.mp4 is important for me ;) Feb 12 22:00:10 But seriously, pfn’s client just has its own design philosophy – in the same way as Microsoft’s old Outlook client had its own design philosophy. That can be amazing, it can also look out of place, fully depending on how it’s done Feb 12 22:00:43 automatically rules out qicr? Feb 12 22:00:45 you're an asshole Feb 12 22:00:53 it satisfies all of those criteria Feb 12 22:01:20 pfn: that’s the good thing about "good looking", it’s subjective. You can ask three people, and get four opinions Feb 12 22:01:37 * pfn just throws justjanne on the permanent ignore list Feb 12 22:02:24 hey guys. good night! is it possible to read custom attributes from the item tags from and string-array set over strings.xml? Feb 12 22:02:46 pfn: don’t take that type of banter seriously ;P Feb 12 22:11:53 ugh, time to build a new pc Feb 12 22:12:20 upgrading it piecemeal over the years has left it pretty cranky, that or maybe try updating to win10 Feb 12 22:21:31 :s Feb 12 22:24:27 I've been thinking about building a new one as well but the parts aren't that much more powerful so it feels a like a waste Feb 12 22:26:14 yeah, my pc was originally built in 2009, and I updated a few parts since then Feb 12 22:26:29 added 1tb of ssd, new core i7, mobo, more ram, etc. Feb 12 22:26:57 new mobo and cpu is like completely new pc Feb 12 22:27:06 well, didn't reinstall OS Feb 12 22:27:10 still the same windows 7 since 2009 Feb 12 22:27:18 impossibru Feb 12 22:29:01 I'll upgrade when star citizen is released Feb 12 22:29:14 latest anyway Feb 12 22:29:36 ah, that’s probably it Feb 12 22:30:05 I use a PC from 2012, manually upgraded. Sandy Bridge i5, 10GB RAM, 256GB SSD, 2TB HDD, GTX 750Ti, ARCH Linux Feb 12 22:30:31 boots in about 20sec, runs everything well enough that I have no need to upgrade or change things Feb 12 22:43:47 g00s: ouchies :/ Feb 12 22:44:42 hi, whats the android import for the send data over http? Feb 12 23:27:52 g00s: fractured Feb 12 23:27:59 no broken bones, everything is straight Feb 12 23:28:09 RustyShackleford oh no ... what now ? Feb 12 23:28:18 doc sits donw to look at it and says "Jesus Christ, you nailed the shit out of it" Feb 12 23:28:25 coding is danger Feb 12 23:28:48 nothing its fine. He taped it/wrapped it and gave me some meds for swelling Feb 12 23:31:33 :) Feb 12 23:54:35 RustyShackleford i remember breaking my foot; rolled it when jumping into the pool with my dog (pool was curved). damn thing was non-union for months, finally i decided with my boot on, to start doing squats and deadlifts again - healed quick Feb 13 00:02:05 if I wanted to display some images and some text, would it be better to use and inflate a popupwindow or a dialogfragment? Feb 13 00:09:56 yes! I have WireMock recording responses! Feb 13 00:12:45 hi, wanna dev for an galaxy 550. cant find wich sensors it has Feb 13 00:12:48 can anybody help? Feb 13 00:13:15 wrong channel. Try #android-root. This is app development Feb 13 00:13:53 ok thanks Feb 13 00:20:25 I have a RADIUS server authenticating all our users. Is it possible to use this server for authentication on a android app? I've read about android.accounts API but I'm not sure I could use a RADIUS server with it. Feb 13 00:21:33 sure, why not Feb 13 00:27:05 ugh, hate it when my espresso maker stalls Feb 13 00:34:01 is there an easy way to debug threads? something's changing my stuff to some weird values and I can't figure out where it's coming from Feb 13 01:07:51 This is kinda neat in Kotlin: `val nonNullReference = nullableReference ?: return`. Feb 13 01:07:59 Saw it on . Feb 13 01:08:41 On a side note, that guy says "I like [Kotlin] so much I have converted two of my Android applications to Kotlin to learn it (one was Java, one was Scala)." Feb 13 01:10:13 yuck, that's an ugly trick Feb 13 01:17:54 anyone have tips for me on a keyboard with an integrated touchpad like a macbook keyboard but standalone? Haven't found any good alternatives Feb 13 01:18:14 TacticalJoke http://49.media.tumblr.com/tumblr_mc8ulw4VQn1r3v6kfo1_400.gif Feb 13 01:18:19 seems silly I should need to move my hand to move the mouse.. Feb 13 01:18:55 or my arm, at least Feb 13 01:19:30 g00s: This concerns me, though: https://discuss.kotlinlang.org/t/fun-foo-unit-does-not-give-a-warning-or-error/1460/5 Feb 13 01:19:53 Oops, the link should be . Feb 13 01:20:19 The link changes as you scroll the page. I hate Discourse. :/ Feb 13 01:20:34 oh jolly this API is wonderful, they send json back which is a key that contains a list of objects containing key value pairs... literally.... { "key": "something", "value": "something" } Feb 13 01:21:23 I have seen that before grekkos. I *think* it's the standard JSON output from C# for Dictionaries. Feb 13 01:21:46 that makes sense Feb 13 01:21:49 they're probably using .net Feb 13 01:22:10 I just can't believe this is real Feb 13 01:22:24 and using the automated JSON facilities within ASP.Net Web Api versus manually constructing the JSON Feb 13 01:22:36 this seems extremely error prone Feb 13 01:22:57 it also sends me values which have null JSON objects Feb 13 01:22:58 I don't know if I would agree with that, but I do agree that it can be a pain to code around Feb 13 01:23:01 grekkos: You should see the stuff Reddit's API returns. It's insane. Feb 13 01:23:07 and wastes a lot of bandwidth Feb 13 01:23:13 yeah Feb 13 01:23:26 I've been tracing this bug for days trying to find where this "null" string is coming from Feb 13 01:23:48 apparently it's in some code that attempts to convert these key pairs into normal json Feb 13 01:23:58 but still I had no idea this was going on Feb 13 01:24:06 I saw a code utility on the web once that will generte your classes for you if you paste in the JSON Feb 13 01:24:30 may save some time over manually coding the classes yourself for stuff like that Feb 13 01:25:01 grekkos: Just create a java class with a key and value member and Jackson should handle it just fine (if you're using Jackson) Feb 13 01:25:54 Funny that you're dealing with JSON right now because I am too...with Jansson Feb 13 01:26:59 IronMike: this code was written probably close to a year ago Feb 13 01:27:04 heh Feb 13 01:27:15 we Feb 13 01:27:21 we're using org.json Feb 13 01:29:21 is it me or google's videos are just too goofy Feb 13 01:29:37 is the target 6-12 or something ... Feb 13 01:30:34 JakeWharton is Spoon DoA/ Feb 13 01:30:40 how do I get a Bitmap or Canvas of a CameraSource, I can't seem to get it from the SurfaceView its displayed on Feb 13 01:31:35 knapper_tech: Is he? :D Feb 13 01:32:11 In case this rings a bell for someone here :) I vaguely remember an app + site that would collect and aggregate apk hashes/metadata collected from the local device. I'm curious about the data - anything like this available? Feb 13 01:32:14 TacticalJoke, coincidence. I'm talking about the Square test-reporting tool Feb 13 01:48:24 I have a dictionary of ~430,000 words in a txt file. It's about 4MB in size. Is there any way to compress it into an array that is easy to search? I was thinking about encoding it using something similar to this solution: http://stackoverflow.com/questions/2276641/way-to-store-a-large-dictionary-with-low-memory-footprint-fast-lookups-on-and Feb 13 01:48:24 But the problem is that my max word size is 45 characters. Any suggestions? Feb 13 01:49:43 honestemu there are versions of tries that store the data compressed ... Feb 13 01:50:43 is 4MB too big to just drop in memory? Feb 13 01:51:08 Yeah, I'll be working with an old phone. Feb 13 01:52:35 how many queries do you need to handle? Feb 13 01:53:11 e.g.; maybe if you don't need too many, the dumb solution of just splitting it out into smaller files on disk (and loading just the part you need) might be simpler Feb 13 01:53:13 kbs: It's for a game. It needs to identify if a word is in the dictionary as I type. Feb 13 01:54:15 So for each letter I type, it should check if it is a word in the dictionary. Feb 13 01:54:32 ah, so a preix search. maybe it's feasible to just map the prefix tree onto a filesystem Feb 13 01:55:33 e.g. aa/* -> all words that begin with aa, with nested subdirectories as size permits. You'll just need to scan one directory at a time, so it should n't be too bad maybe Feb 13 01:57:37 (the stackoverflow idea still wants to use the same size; so if 4Mb is too much in your situation, maybe it wouldn't have worked regardless.) Feb 13 01:59:07 kbs: I see. I think I will do something like that. Or just make DAWG. But I'd rather not implement a data structure I don't fully understand. :P Feb 13 01:59:27 +1 :-) Feb 13 01:59:49 kbs: Also, I think the stackoverflow idea will have compressed it a bit, since each character will take up 5 bits, rather than a whole byte, right? Feb 13 02:00:46 oh, you're right. Feb 13 02:01:41 you could get it down to about 2Mbish that way Feb 13 02:02:28 though complicated, because you'll need to encode a stop character; and then you'll need to figure out how to binary search on it... think I'm firmly in your camp of finding easy solutions :-) Feb 13 02:13:40 I’LL SPANK YA FACE! **** ENDING LOGGING AT Sat Feb 13 02:59:58 2016