**** BEGIN LOGGING AT Fri Mar 11 02:59:58 2016 Mar 11 03:09:47 woho .. uploaded my library project to github and bintray.. let's see if it gets approved or if I messed up something... Mar 11 03:11:22 woho approved.. now I wonder what I have to do to make it possible for people to just include "compile '....'" :D Mar 11 03:15:08 divStar: hey Mar 11 03:15:15 hey there :)! Mar 11 03:15:34 divStar: did you put the library in your own bintray repo Mar 11 03:15:37 divStar: or jcenter? Mar 11 03:16:21 I am not sure.. it says "divstar/maven/ICO4A" at the top.. so I suppose I added it to a maven repository? But I also linked it to jcenter Mar 11 03:16:43 and I just got a mail it was approved..now I am wondering how to upload a version - it's a first time for me hehe Mar 11 03:17:21 divStar: you can use the web-interface Mar 11 03:17:49 yeah I just figured that out.. but it asks for a target repository path and I am not sure what that is supposed to be.. Mar 11 03:18:28 I suppose I only pick the AAR file itself? Mar 11 03:22:51 g00s, if they're black, it's usually because of png rasterization Mar 11 03:23:15 pfn there are no pngs in my intermediates/ folder :( Mar 11 03:23:22 divStar: try https://www.virag.si/2015/01/publishing-gradle-android-library-to-jcenter/ Mar 11 03:23:39 pfn but the stock xml drawables from google have android:fillColor="#FF000000" Mar 11 03:23:56 stock material icon downloads, etc Mar 11 03:24:44 g00s missed an informative Android talk at Square NYC Mar 11 03:26:31 well, actually the appcompat pngs are there ... abc_xxxxxx but i'm not using any of those Mar 11 03:26:49 g00s: what version of support are you using? Mar 11 03:26:53 23.2.1 Mar 11 03:27:05 Napalm so this blog https://chris.banes.me/2016/02/25/appcompat-vector/ Mar 11 03:27:16 there is a listing res/drawable/ic_search.xml Mar 11 03:27:18 why the hell does AS want to force me to use 24.0.0-alpha1 Mar 11 03:27:28 and he has android:tint="?attr/colorControlNormal"> in that xml Mar 11 03:27:52 they would only be black if you did rasterization Mar 11 03:28:05 or you fucked something up Mar 11 03:28:12 pfn: or his icon is black Mar 11 03:28:21 pfn like i said, there are no pngs in my build intermediates Mar 11 03:28:33 g00s: i'll try it out Mar 11 03:36:29 how can i downgrade my adb shell to user permissions if i already have root? Mar 11 03:40:10 Napalm try dark theme so its obvious that black icon is wrong Mar 11 03:40:20 on light theme its not so obvious :D Mar 11 03:44:19 http://www.androidcentral.com/moving-forward-what-we-can-learn-android-n-developer-preview Mar 11 03:44:49 possibly the beginning of some ability to update more parts independently Mar 11 03:50:17 D: so weird.. I now have my AAR and I am trying to include it in my own (different) project, but I can't seem to make it work.. Mar 11 03:55:30 Anyone here who could help with MPAndroidChart? I have it partially working the way I want. two problem I have are. Is there a way to auto scale Y Axis possibly with some % top/bottom padding from min/max point. Another one is to limit of points in graph. I would like to see 100 points (50 visible and 50 that off screen that I can scroll ) but if 101 point is added then point 0 is removed making it 100 point all the time Mar 11 03:58:41 g00s: that does sound scary, though. Instead of parting the system into pieces you can update separately, like a Linux distribution, they just added an API for people to modify it — like a modding API in games. Mar 11 03:59:01 The scary part is the fact that this gives Google more control. Mar 11 03:59:32 The hopeful part is that the system actually becomes open source again. Mar 11 04:00:26 Although that hope only exists in the form of "someone accidentally uploads all the sources to the public git repo", as Google would never publish open source again. Mar 11 04:10:32 well at least Google will want to ensure developers stay interested.. cause if google goes closed-source, everyone may just as well switch over to Apple Mar 11 04:21:29 divStar: nah Mar 11 04:21:34 apple shits all over their developers Mar 11 04:32:53 justJanne well you're in the EU Mar 11 04:33:21 this is the scariest stuff i read today https://www.washingtonpost.com/news/the-watch/wp/2016/03/10/surprise-nsa-data-will-soon-routinely-be-used-for-domestic-policing-that-has-nothing-to-do-with-terrorism Mar 11 04:33:27 worse then i thought Mar 11 04:35:37 why am I not surprised at all D:? Mar 11 04:36:18 I mean.. who in the world really thought the data was going to be collected to find terrorists? I sure did not - that data is to valuable to let it pass without spying into everyone's privacy first Mar 11 04:37:43 terrorists are just a reason to massively abuse privacy in every regard - just like child pornography.. of course it exists, but is collecting data or building web-filters going to help the victims or going to prevent anything? Paris showed clearly that massive privacy abuse does not lead to safety (not that I expected otherwise) Mar 11 04:39:34 the funniest sentence (other than that about safety and privacy) was: if you do not have anything to hide, you should not have an issue with decreasing privacy.. it makes me lol.. in reality everyone has something to hide Mar 11 04:42:18 so my webservice-calling-androidapp is going well, I have a few buttons, and I can call the login webservice, and get json back Mar 11 04:42:27 divStar snowden ""Arguing that you don't care about the right to privacy because you have nothing to hide is no different than saying you don't care about free speech because you have nothing to say," Mar 11 04:42:54 that's such a powerful sentence, g00s - need to remember that Mar 11 04:43:14 today, I went from never-androided to made an app that is like, not nearly done, but works in one small way Mar 11 04:43:16 victory Mar 11 04:43:39 well, never without xamarin anyways Mar 11 04:44:14 grats guideX - I am working to have an app retrieve json data from a website, serialize the data, show it and perhaps have someone edit something and send it back.. Mar 11 04:44:39 nice! Mar 11 04:44:45 currently all I have done is write a library, which enables people to decode / load ICO files of any (allowed) kind into a list of Bitmap-objects Mar 11 04:45:12 (that library is based on image4j, but does not use any AWT classes) Mar 11 04:45:21 Guys is there a way to set the focus of text to the right of my TextView whenever I change it's value? Mar 11 04:45:32 that sounds pretty cool, there's not enough neat icon utilities Mar 11 04:45:44 I know it's possible with EditText but I do want to use TextView Mar 11 04:45:54 uhm you can always use requestFocus.. ah Mar 11 04:45:54 I did this telecommunications website, and after it, they also asked me for matching android app, so it's perfect i'm just like using my websites services, the android app does basically nothing but front end Mar 11 04:46:14 hehe - got a REST API, guideXß Mar 11 04:46:40 yeah basically, calling restful api Mar 11 04:46:59 wcf services to be specific Mar 11 04:47:42 oh hum no idea what that is - I never wrote such an API before (except for some crippled attempts in PHP).. but I know how it works :D Mar 11 04:48:25 oh hrm, I've never tried to do services from php, interesting Mar 11 04:49:11 divStar, Wouldn't I get only the initial focus when I start my app with ? I'd like it to focus to the most right text possible whenever I enter new text into it. Mar 11 04:49:13 well to me it wasn't really a service, but rather a call to a certain php file and function, which - instead of generating front-end, generated XML or JSON Mar 11 04:50:18 Psychiatrist I am afraid I do not understand what you are trying to do.. there's a certain focus sequence that you get if you e.g. use "TAB" in the emulator Mar 11 04:50:23 is there a way to make FragmentTabHost show icons passed to setIndicator, without creating your own indicator views? Mar 11 04:51:21 one thing I don't understand yet, is how do you build and deploy android (preloaded with your app) to the phone, more quickly and easily Mar 11 04:51:23 like .. if you have a formular @ Psychiatrist, you could just have the most-right texts be focusable I think (I have never tried this so far) Mar 11 04:51:28 like what if you needed to do it with alot of phones Mar 11 04:51:33 divStar, I want to imitate a calculator textview where the text appears on the right and whenever the text gets bigger I only see the right most text, not the left most where the start of the text is. Mar 11 04:52:02 ahh.. there should be some RTL feature I believe, that you could perhaps exploit Mar 11 04:52:30 try android:gravity="right", Psychiatrist Mar 11 04:52:36 (on the TextView) Mar 11 04:52:59 for instance, with windows, when you want to have an easily deployable image preloaded with software, it's pretty easy to make an image for alot of pc's Mar 11 04:53:02 but what about android Mar 11 04:54:00 divStar, That did the trick! Thanks a ton! Mar 11 04:54:04 if that does not solve your problem, Psychiatrist, also try adding: android:textAlignment="gravity" :D Mar 11 04:54:13 happy I could help man :D Mar 11 04:54:27 I think I deserve a smoke now... *afks* Mar 11 04:56:23 guideX: you would need to root your phone for something like that, and although I don't know an app that deals with "images" on Android, there are apps that back up and restore your apps Mar 11 04:57:59 Hi, more specific question this today so hopefully someone responds. I had a developer write some code for me and in it they altered the manifest with Ideally I'd like to get rid of the neccessity to use android:configChanges="orientation|keyboardHidden|screenSize" but I have no idea how to handle that. Can I assert that configChange to only a particular fragment rather than all of them? Mar 11 05:01:50 I think you can only set that activity-wide, and I had to implement a lot of onSaveInstanceState and onRestoreInstanceState to fix problems after enabling configChanges too Mar 11 05:02:09 the next app I make, I'm going to stay away from fragments as much as possible Mar 11 05:04:16 is AsyncTask usually an inner class? If it's supposed to be used for updating UI Mar 11 05:05:51 hagabaka thanks Mar 11 05:06:09 hm I usually extend it in a normal class if I need it in more than one place Mar 11 05:06:33 in a top level class you mean? Mar 11 05:06:52 * guideX doesn't know all the oo tricks yet ;) Mar 11 05:06:53 I'm not 100% sure I need it, but it sounds like what I want... I was just going to make a regular thread but it didn't seem to be working as I expected hah Mar 11 05:06:57 .. in android Mar 11 05:07:19 basically something's taking too long and locking the UI, but accoring to this Async task doesn't require callbacks Mar 11 05:07:21 well .. top-level I suppose Mar 11 05:07:25 I reall like using Volley for network tasks Mar 11 05:08:02 I simply extended AsyncTask and did everything that takes a bit longer (loading image from URI, reading image using my icon library) in doInBackground Mar 11 05:08:08 but if it's not in the same file I don't see how I can do it without a callback Mar 11 05:08:33 I want to return a string asynchronously Mar 11 05:08:50 in theory I could update the UI directly if I pass the reference to an element but that seems kinda strange Mar 11 05:09:14 Anyone know if it is possible to have one keyboard shortcut for two actions in android studio? I'd like to toggle fullscreen and distraction free mode with the same hotkey if possible Mar 11 05:09:16 and when I've used AsyncTask in the past I always used it with callbacks for network calls or something Mar 11 05:09:20 hagabaka yeah it appears it's activity-wide. The issue is that the whole point of my app was that it could only have a single activity and multiple fragments in a ViewPager. Mar 11 05:09:50 right - so you would probably extend AsyncTask if you want to input a String and set a String Mar 11 05:10:10 I feel like the person who did the work just hacked it together with no concern whether it integrated in my existing app. Mar 11 05:10:18 right but then in my onPostExecute... I'd have to call a callback no? Mar 11 05:10:34 assuming it's a static nested class or separate top level class Mar 11 05:10:47 what I do is have a WeakReference (or TextView or ImageView) and then use that in your callback Mar 11 05:11:11 @hagabaka would you mind checking out the code and telling me if you think I could do away with enforcing that configChange ? Mar 11 05:11:25 divStar: you pass it to the constructor? Mar 11 05:11:27 I'm assuming it is just the laziness of the programmer. Mar 11 05:11:32 yes @grekkos Mar 11 05:12:06 interesting Mar 11 05:12:16 it is important to note that you should be using WeakReference-objects, because the view might not exist when your task is done Mar 11 05:12:24 right Mar 11 05:12:29 that's why I felt strange about passing the view Mar 11 05:12:35 so in order to not prevent garbage collection, use a WeakReference :D Mar 11 05:12:39 I was just reading about WeakReference Mar 11 05:12:45 neat Mar 11 05:12:56 I've run into a lot of issues like that doing async stuf where we have to check for nulls Mar 11 05:13:02 @hagabaka https://github.com/lukeallison/ViewPagerMasterDetail Mar 11 05:13:02 I didn't know either until I stumbled upon reading some stuff Mar 11 05:13:05 like an async thing is going on and the user switches to a new activity Mar 11 05:13:12 and then the network call completes Mar 11 05:13:15 and it has to display a message Mar 11 05:13:27 pretty neat Mar 11 05:13:31 yeah.. with a WeakReference you can check .get() != null Mar 11 05:13:41 oh Mar 11 05:13:49 so you still have to check it, but it makes it less likely to be collected? Mar 11 05:13:59 and if it's != null, then you use weakreference.get() as if it was the real view Mar 11 05:14:14 hmm i'll play with it a bit and try a few different things to see what feels best Mar 11 05:14:16 it makes it more likely to be collected Mar 11 05:14:55 like if the user switches to another activity and you check .get() != null on that weak reference, the object (what you'd get using weakReference.get()) will be gone Mar 11 05:15:14 so if that's the case, you won't have to draw anything / set anything Mar 11 05:15:55 anyone triend N preview ? how stable is that ? Mar 11 05:17:54 gordon_ bugs ontop of bugs ! Mar 11 05:18:04 pfn bricked his n9 Mar 11 05:18:33 x.0 releases are beta releases for nexus users ... Mar 11 05:18:41 i guess this is preview of the forthcoming preview Mar 11 05:18:53 like a .0.0.0.0.1 release Mar 11 05:19:09 :D Mar 11 05:21:10 any of your companies hiring entry level devs? Mar 11 05:21:24 lol but seriously. I'm stressed out :( Mar 11 05:21:55 Why's that? Mar 11 05:22:31 we're taking on roughly 220% capacity Mar 11 05:23:13 we were going to pilot unit testing in 3 weeks. Actually met with my team yesterday to discuss how we're going to prepare Mar 11 05:24:06 it was announced this morning that it starts today, completely ignoring that it takes 2x dev effort to also write tests. Coworkers are scared to speak up since there are layoffs. Its bad man Mar 11 05:24:31 Have a question about loading large lists. Right now, I have a messenger app. Works well until you have a SHIT ton of messages. Issue being, when you click on the conversation I load up all of your messages into a List<> and then display it in the listView. Any ideas on how to start to tackle this issue? Thinking about ObjectPool or LRUCache. Mar 11 05:27:41 these H1B's work so friggin hard. Their plan is to just work 70 hours or something and get it done Mar 11 05:27:58 RustyShackleford: so.. leave ? Mar 11 05:28:14 yeah I guess so. I have nothing lined up yet Mar 11 05:30:31 g00s: hmm... I wonder Mar 11 05:31:16 g00s, the Ota failed, that's all Mar 11 05:31:47 i dont want ota Mar 11 05:31:52 i want to flash image Mar 11 05:33:31 Have a question about loading large lists. Right now, I have a messenger app. Works well until you have a SHIT ton of messages. Issue being, when you click on the conversation I load up all of your messages into a List<> and then display it in the listView. Any ideas on how to start to tackle this issue? Thinking about ObjectPool or LRUCache. Mar 11 05:33:42 RustyShackleford this is whats coming next http://spectrum.ieee.org/view-from-the-valley/at-work/tech-careers/.VuHU1fevtY4.hackernews Mar 11 05:34:01 page not found is comming next - nice Mar 11 05:34:18 we all die in the end Mar 11 05:34:39 hm wtf Mar 11 05:35:03 some redirection bs Mar 11 05:35:48 http://spectrum.ieee.org/view-from-the-valley/at-work/tech-careers/is-this-months-ibm-layoff-for-rebalancing-or-is-it-really-for-offshoring Mar 11 05:36:05 eghdk: what about RecyclerView? Mar 11 05:37:29 hello experts, i am trying to run a emulated android device on my PC. and i only see a blacnk screen.. and when i initiate the emulator from command line with the -debug-init -logcat ':*v' i get this output http://pastebin.com/RccGPzVL Mar 11 05:37:43 i am not sure whats going wrong here.. there are no fatal errors Mar 11 05:37:56 Its more of a question of me loading everything from a certain convo from a sqlite db than displaying it in a list. If I have a convo with 100,000 messages in it, I'm currently trying to load all messages into a List, and then display. I can set the query to have a max, but then not sure how I load more data when needed Mar 11 05:37:58 is there a reason why the emulator would not show any content ? Mar 11 05:39:32 eghdk i think pfn did something in qicr for logs ... maybe he has idea Mar 11 05:40:31 tamarind: are you using system gpu ? Mar 11 05:41:01 I got this problem before I guess Mar 11 05:41:14 g00s: what? Mar 11 05:41:33 gordon_: thanks for replying.. i do not remember enabling gpu in the avd creation screen Mar 11 05:41:51 gordon_: just checked and there is no option called gpu on the avd creation screen Mar 11 05:42:14 gordon_: hwo did you solve it ? Mar 11 05:42:44 I *think* I launched emulator from terminal using emulator command Mar 11 05:43:02 which emulator are you using ? old one or new one Mar 11 05:43:14 you can try to upgrade or downgrade in this case Mar 11 05:43:27 if that will fail for you, try genymotion Mar 11 05:43:51 I'm trying to make my toast appear below my progressbar this is more frustrating than I anticipated haha Mar 11 05:44:14 gordon_: are there two versions of emulator ! Mar 11 05:44:18 thats news to me.. Mar 11 05:44:49 eghdk: how are you loading it? Mar 11 05:44:50 gordon_: genymotion is installed and works but i thought if i can get this working then its much better as the tutorials quote this and not genny motion Mar 11 05:45:23 tamarind: it doesnt matter if it's emulator or genymotion Mar 11 05:49:10 develop in N, and target M.. that's cool right? Mar 11 06:12:14 weird.. I implemented a custom adapter based on ArrayAdapter, but getView doesn't seem to ever be called... Mar 11 06:14:45 Are you returning the proper count? Mar 11 06:15:07 Oh wait, ArrayAdapter manages that automatically, doesn't it? Mar 11 06:15:17 hm I'd hope so.. Mar 11 06:15:32 actually let me try overriding getCount.. Mar 11 06:15:39 hi! any ideas why Android Studio does not see the jni.h header? (and all the other ones that are from Android ndk) I am using the experimental gradle plugin: 'com.android.tools.build:gradle-experimental:0.7.0-alpha1 Mar 11 06:16:00 NOW it works - thank you konk3r! Mar 11 06:16:09 ;) Mar 11 06:16:34 I think ArrayAdapter was somehow referring to its own array somewhere.. instead of my list Mar 11 06:17:55 hm, are we still supposed to use this on our toolbars android:theme="@style/ThemeOverlay.AppCompat.ActionBar" Mar 11 06:19:27 ahh .. seems I introduced a list into ArrayAdapter even though it has its own .. stupid me Mar 11 06:19:40 I think I use that, g00s Mar 11 06:20:16 divStar: you should extend BaseAdapter instead and think about making it lazy load with recyclerview or some way Mar 11 06:20:53 instead of hardcoding the count Mar 11 06:25:09 I just removed my extra-list and used the one provided by ArrayAdapter Mar 11 06:25:16 now I don't have to override getCount either Mar 11 06:28:38 there's no way to annotate @Visibility outside of the android sources? I want a convenience method that will take a boolean and give me one of the View values for it Mar 11 06:28:57 Anyone else find instant run incredibly broken, or just me? Mar 11 06:29:51 no idea @ grekkos and yeah @ rowan7 : InstantRun is known to seem a bit fragile.. though it does work for me so I am happy Mar 11 06:29:56 rowan7 from what i've read, yeah its still pretty buggy Mar 11 06:31:19 So I realize there's a real chance I'll have to do this manually, but... Mar 11 06:31:28 I just gave it another go. None of my changes showed up through multiple tries. Turned off instant run and everything works as expected (albeit a pinch slower) ¯\_(ツ)_/¯ Mar 11 06:31:46 Does anyone know if there's a good library to convert an html table into a java object? Mar 11 06:32:22 konk3r: sounds like you want to parse a dom Mar 11 06:32:40 konk3r: check for a dom parsing library Mar 11 06:32:50 Duh, I'm an idiot Mar 11 06:32:58 it happens Mar 11 06:33:02 lol Mar 11 06:33:03 This is what happens when you work for 14 hours straight :) Mar 11 06:33:11 heh Mar 11 06:33:24 I spent all night trying to find a solution to something, filed a bug with the library maintainers and then asked a friend if he wanted to take a crack at it Mar 11 06:33:35 he found another bug previously filed on the same bug tracking system with a solution in it Mar 11 06:33:40 Nice Mar 11 06:33:44 like I was right there Mar 11 06:33:46 and I didn't see it Mar 11 06:33:56 At the end of the day I usually end up struggling for 3 hours to get something, then I'll wake up and get it in 5 minutes Mar 11 06:34:08 it was closed so it wasn't showing up and the maintainers set it as a no-fix but there was a useful comment in the other ticket Mar 11 06:34:12 Especially when I'm dealing with Rx Mar 11 06:34:14 yeah Mar 11 06:34:26 that's why I try to give myself breaks often Mar 11 06:34:28 Okay, slight exaggeration on both ends, but you get it Mar 11 06:34:43 push yourself too hard and you write some really whacky code Mar 11 06:35:11 I try to, but my job situation is rocky at the moment and I really want to get out this side project to pad up my portfolio Mar 11 06:35:28 And just to help study up for interviews, keep me in the game Mar 11 06:35:58 But yeah, I end up going into spike mode at the end of the night and cleaning up my code in the morning hahaha Mar 11 06:36:54 yeah Mar 11 06:37:06 is it me or volley has terrible api Mar 11 06:37:08 for interviews you need to have your head buried in an algorithms book Mar 11 06:37:13 and doing some whiteborading Mar 11 06:37:35 whiteborading? Mar 11 06:37:41 grekkos: not really Mar 11 06:37:52 maybe at first Mar 11 06:37:56 and depends on the company Mar 11 06:38:03 "at first" meaning before you get the job? ;) Mar 11 06:38:16 before you have any experience Mar 11 06:38:19 depends on the company a lot but where I am they are crazy for the coding interview process Mar 11 06:38:23 even after Mar 11 06:38:28 Honestly, I don't care that much about algorithms Mar 11 06:38:36 I'm a senior level dev and they still give me 7 hour interviews Mar 11 06:38:44 it's good to have github account and be active in the community ;) Mar 11 06:38:50 companies like MS, Google Mar 11 06:38:53 I mean, I can do them, but I don't stress them when I'm conducting interviews Mar 11 06:39:00 architecture > algorithms any day Mar 11 06:39:13 yeah but they'll never ask you architecture questions on an interview Mar 11 06:39:25 They have at some interviews I've done Mar 11 06:39:35 Facebook has an entire interview dedicated to architecture Mar 11 06:39:41 they wanna see you solve your way out of a tough situation and they usually press there because they don't expect you to know it well Mar 11 06:39:47 that's interesting Mar 11 06:39:55 my google interview was all algorithms and scaling Mar 11 06:40:24 Well, if you're building an android app architectural scaling is going to come up much more often than algorithmic scaling Mar 11 06:40:30 At least with 99% of companies Mar 11 06:40:56 yeah in general I've never been asked too many specific questions about android (or ios) Mar 11 06:41:08 but I think it's kind of regional too Mar 11 06:41:14 Where are you interviewing? Mar 11 06:41:16 where I am now it's a lot of algorithms Mar 11 06:41:29 I mean, general region Mar 11 06:41:35 Seattle area Mar 11 06:41:52 Gotcha, I just had an interview out there and it was pure android Mar 11 06:42:06 there are a lot of big players here, so if you work for some other company chances are the people who are hiring you are from Microsoft, Google, Amazon, etc... Mar 11 06:42:14 so they stick to the traditional interviews Mar 11 06:42:35 I think it's great though, awesome practice for some stuff you don't really have to touch often (depending on what you do right?) Mar 11 06:43:35 I'm going to start studying up on algorithms again shortly, I have fun with them Mar 11 06:44:04 yeah I think the questions are great problems to solve generally Mar 11 06:44:05 hm.. I feel outdated since - in my job - I programm using traditional Java (1.7) along with the enterprise elements (maven, spring, hibernate and the likes) Mar 11 06:44:05 But how often do you have to know how to make a red/black tree from memory? That's just not very useful for an Android dev Mar 11 06:44:26 yeah Mar 11 06:44:31 I'd much rather have someone know the differences between MVC and MVP and what the benefits to each are Mar 11 06:44:34 what is a red / black tree o_O? Mar 11 06:44:36 bigger companies usually place you after you interview Mar 11 06:44:51 but smaller companies get you for what they want Mar 11 06:44:58 divStar: It's a self balancing binary tree Mar 11 06:45:10 lol I remember when I got into what was it.. c# I think.. and suddenly MVVM and MVC was getting mixed Mar 11 06:46:04 red/black trees... brings back memories :D Mar 11 06:46:14 "memory" Mar 11 06:46:19 huhu Mar 11 06:46:22 https://github.com/divStar/ico4a the project I made.. somehow I still don't know how to get jcenter / bintray to give me that compile-url.. but oh well Mar 11 06:46:50 yeah I don't think I've ever gotten to use a btree in practice Mar 11 06:48:37 grekkos: time to write own file system ;) Mar 11 06:48:58 haha Mar 11 06:49:15 I was thinking I should start doing some systems programming soon hmm Mar 11 06:49:18 don't think I'd go that far though Mar 11 06:52:49 hi! any ideas why Android Studio does not see the jni.h header? (and all the other ones that are from Android ndk) I am using the experimental gradle plugin: 'com.android.tools.build:gradle-experimental:0.7.0-alpha1 Mar 11 06:53:24 experimental:0.7-alpha ... lol Mar 11 06:53:33 bleeding edge Mar 11 06:53:46 was this expected? Mar 11 06:55:39 HunterD using ndk 11 ? Mar 11 06:55:57 ndk 10 Mar 11 06:56:05 could be from this? Mar 11 06:56:11 i heard some things moved around Mar 11 06:56:20 but i dont use ndk Mar 11 06:56:30 I see. I have it donwloaded, will extract and try again :) thank you bro Mar 11 06:59:20 HunterD: I tried my hand with ndk last night, ended up using a pure java library (which I had to fix before I could use on Android) Mar 11 07:00:07 I have no choice here. a game will have to be debugged using Android Studio. at least we try to see if is possible... Mar 11 07:00:14 so if you figure it out let me know Mar 11 07:00:26 sure man Mar 11 07:00:45 because I'm thinking maybe the C++ implementation might be faster than what I've got here... I have a similar app on ios which can do the same thing faster using the C++ library Mar 11 07:02:28 I am still searching for the performance of ART compared to NDK... someone here having some data/links ? Mar 11 07:02:49 is there a way to create a new module from vcs? I'm trying to include some code from git but I'd like to keep it separated from my code so updating it isn't a pain Mar 11 07:23:31 had no success.. the headers are still red (all android related ones: jni.h, android_native_app_glue.h). I am now using com.android.tools.build:gradle-experimental:0.6.0-beta6 with ndk 11 Mar 11 07:23:38 will give it a try with ndk10 also.. Mar 11 07:44:28 this has got to be without a doubt the worst written code I've ever seen ~_~ Mar 11 07:50:25 HunterD, i think it's a known bug (in the editor) but it should not prevent compilation Mar 11 07:51:18 the compilation does indeed work with no problems Mar 11 07:51:45 only in editor I do not have the headers as 'found' Mar 11 07:52:07 still, I cannot work with it like this -_- Mar 11 07:52:08 yup Mar 11 07:52:17 and this is not the only bug Mar 11 07:52:30 any work-arounds? I try to point to the headers using: CFlags.add("-I${file("F:/Utility/AndroidNDKr10/platforms/android-18/arch-arm/usr/include")}".toString()) Mar 11 07:52:36 but still no success Mar 11 07:52:52 also tried with: CFlags.add("-I${file("F:\\Utility\\AndroidNDKr10\\platforms\\android-18\\arch-arm\\usr\\include")}".toString()) Mar 11 07:52:55 same Mar 11 07:54:56 HunterD, submit a ticket on b.android.com Mar 11 07:59:24 adq: thank you, will try this also Mar 11 08:01:59 does N preview support java 8? Mar 11 08:21:44 back here. I made the headers vissible :) but now Android Studio feature for Collapse All is not working. (Ctrl + Ahift + -) shortcut Mar 11 08:27:30 why code folding is not available in .c files? :( Mar 11 08:28:53 it appears to be working now, thank you planet alignment :) Mar 11 09:01:33 Hello everybody. I have one question, is it possible to generate build.gradle file from an Android Eclipse project using the last Android SDK from command line? Thx Mar 11 09:02:51 vadmeste: I think android studio can do migration for you Mar 11 09:03:22 gordon_: yes it does, I just want to avoid downloading it Mar 11 09:03:35 also I prefer working from command lines Mar 11 09:03:38 eclipse had(?) the export to gradle (or was it import?) Mar 11 09:10:55 I think that was import Mar 11 09:12:28 vadmeste: too bad then ;) Mar 11 09:17:06 so I have created question on stack - there is a link to project that cannot be compiled, until now - for unknown reason. If anyone give it a try I would be happy http://stackoverflow.com/questions/35920209/android-preferences-numberpicker-and-preferencescreen-compile-errors-no-res Mar 11 09:47:22 scrollbar with collapsing toolbar behaves super strange :/ Mar 11 09:47:39 it shrinks and stretches depending on the toolbar state :o Mar 11 09:50:15 thats what she said Mar 11 09:51:10 lol ^^ Mar 11 09:51:54 danijoo, because the scrolling area size changes? Mar 11 09:52:01 isn't that to be expected Mar 11 09:52:42 I expected that it would happen because I know the quality of support lib yes Mar 11 09:52:51 but it shouldnt from a design perspective Mar 11 09:53:11 mh, I disagree but sure :p Mar 11 09:53:53 I think it looks weird to the user if the scrollbar changes size everytime he scrolls up and the toolbar reappears Mar 11 09:54:07 it should stay at the size of either expanded or unexpanded imo Mar 11 10:42:25 Hey all Mar 11 10:53:26 hi. i've this radiogroup: http://pastebin.com/05QNZSP2 the problem is that although they're radio buttons, i can select each one of them not only one, as radio buttons are supposed to work. Mar 11 10:56:37 LucaS05, my guess its because they are nested in the LinearLayout Mar 11 10:56:48 and therfor the buttons are not part of that group Mar 11 10:57:09 Anyone have prob download android studio today i been haveing prob for about 2 days so far? Mar 11 10:57:12 i was thinking to that too. but i need the linear layout Mar 11 10:58:21 danijoo: maybe i need to change them in buttons that behave like radiobuttons Mar 11 10:58:21 Hey LucS05 Mar 11 10:58:22 " If you do like this, RadioGroup will not work, because RadioButtons must be direct children of RadioGroup;" - stack overflow Mar 11 10:58:42 LucaS05, seems like you need to find anotherway to align them Mar 11 10:58:43 ok Mar 11 10:58:56 or reimplement the single selection logic on your own Mar 11 10:59:51 danijoo: anyway, i'm trying to achieve this layout: http://imgur.com/3vNSipp where the buttons can scroll horizontally and i can have only one button active (like radio buttons) Mar 11 11:00:22 they can scroll horizontally because they could be more than 4 Mar 11 11:00:29 perlsyntax: hey Mar 11 11:01:27 LucaS05, RadioGroup inherits from LinearLayout so you can use all the methods from this for alignment Mar 11 11:01:31 Does anyone know why on android developer web site i download android studio but when i try to download it it will not install the package odd? Mar 11 11:01:47 for example layoutgraviy or weights Mar 11 11:02:21 how would you achieve that with a single linearlayout though, danijoo :p Mar 11 11:03:46 I hope gogole slove the prob i have i have no idea who to talk to. Mar 11 11:04:35 perlsyntax, download works fine here so the issue is on your side Mar 11 11:05:39 it will not install the plateform-tools Mar 11 11:05:52 that my prob it with the install. Mar 11 11:05:58 what do you mean? Mar 11 11:06:02 install them via sdk manager Mar 11 11:06:17 i? Mar 11 11:06:30 yes Mar 11 11:06:41 i try ti install the full package with android studio. Mar 11 11:06:57 it wont automagically install all dependencies Mar 11 11:07:05 you can do that via sdk manager Mar 11 11:07:21 i just install the sdk tools you mean. Mar 11 11:07:32 you install what you need. you need sdk tools Mar 11 11:07:46 i try that Mar 11 11:08:39 danijoo,I hope that works. Mar 11 11:08:39 :) Mar 11 11:14:26 hast it always been like that if you load the bundle? that there is a popup at first AS start to let you chose required dependencies? Mar 11 11:48:25 danijoo: another problem i'm facing is aligning the floating action button at the bottom-middle of the toolbar. Here it is my layout http://pastebin.com/YdgziM07 Mar 11 11:52:16 hi Mar 11 11:52:28 wow its easy to disorganize an android code Mar 11 11:53:27 was it ever organized Mar 11 11:55:43 Java has Mar 11 11:55:47 organisational issues Mar 11 12:25:14 how do you collapse an expandablelistview after selecting a child Mar 11 12:59:54 is it necessary to recreate a database cursor if the database changes or do they refresh themself automatically? Mar 11 13:14:06 . Mar 11 13:14:07 Can someone please do me a huge favour and look at https://github.com/lukeallison/ViewPagerMasterDetail and tell me how to avoid using android:configChanges="orientation|keyboardHidden|screenSize" ? Mar 11 13:15:45 Mar 11 13:15:49 oops Mar 11 13:25:07 hi all, may I ask for your expertise? I want an action to happen if you reach 10~20 kmh, how can I achive this? Mar 11 13:28:42 hi! Mar 11 13:29:26 hi HunterD Mar 11 13:29:39 I need help on using 'org.apache.http.legacy' in my project. I use the experimental plugin: com.android.tools.build:gradle-experimental:0.6.0-beta6 and I dont know how to specify that library Mar 11 13:29:54 use gps for that Mar 11 13:31:13 with the previous plugin I had: useLibrary 'org.apache.http.legacy' inside android {...} in build.gradle Mar 11 13:32:15 SuperTyp: and read on Location. it has hasSpeed and getSpeed methods Mar 11 14:32:23 I want to find out if I have any rogue Services or Threads. What's the best tool for this? Mar 11 14:32:48 I'm trying to use Systrace, but I can't sem to get it to tell me what threads or Services are being run. Mar 11 14:32:50 whats that Mar 11 14:34:26 I think I am misunderstanding tasks ... If I am running an activity within my application, and I start a new activity and give the intent FLAG_ACTIVITY_NEW_TASK, how come pressing the back button takes me back to the homescreen and not the activity that started that task? Mar 11 14:34:56 Ultimately I would like to be able to start an activity that starts another activity, and pressing back from the second activity would return me to my original activity Mar 11 14:35:15 so activity A -> activity B -> activity C -- user presses back --> activity A Mar 11 14:37:19 android-dev785, http://developer.android.com/guide/components/tasks-and-back-stack.html Mar 11 14:41:25 android-dev785, back button press only navigates in task Mar 11 14:41:45 if you are at the bottom of the task it will get killed and take you to home screen Mar 11 14:42:30 right, but if I instead call moveTaskToBack shouldn't I go back to the other task which owns activity A Mar 11 14:42:56 I think I want task A which owns activity A, and task B which owns activity B & activity C Mar 11 14:42:58 why in last days seams that android:textColor="#ffffff" Mar 11 14:43:09 doesen't works? Mar 11 14:43:20 in some last update Mar 11 14:43:26 why it wouldnt Mar 11 14:44:17 in my app always works android:textColor="#ffffff", some days ago seams broken Mar 11 14:45:14 its not broken. Mar 11 14:45:15 it works Mar 11 14:46:52 in my app not. where i can found error ? Mar 11 14:46:58 if it's mine Mar 11 14:47:39 xan_IT: do you have a theme? Mar 11 14:47:51 is it overriding the textColor with a mask? Mar 11 14:48:14 yes but if i define textcolor in textview, i override color, no? Mar 11 14:48:16 do you have android:textAppearence attribute? Mar 11 14:48:18 what is the exact error. Mar 11 14:48:57 http://pastebin.com/3V4GYLWt i see this text black Mar 11 14:49:09 same code last week works Mar 11 14:49:13 i use last update Mar 11 14:49:22 appcompat theme Mar 11 14:49:27 and support 23.2 Mar 11 14:49:47 android-dev785: you could also possibly override onBackPressed in C and launch A with Intent.FLAG_ACTIVITY_CLEAR_TOP Mar 11 14:49:58 android-dev785: not ideal, since you're then coupling C to A Mar 11 14:50:07 xan_IT: and you are sure you dont change it programmatically Mar 11 14:50:14 yes Mar 11 14:51:26 it should work, nothing changed on this Mar 11 14:53:01 xan_IT, danijoo> what is the exact error. Mar 11 14:55:22 in textview i see text colored as default theme Mar 11 14:55:52 seams textColor doesent works anymore Mar 11 14:55:58 in all my app Mar 11 14:56:00 :D Mar 11 14:56:37 xan_IT: what changed? Mar 11 14:56:54 xan_IT: things don't just break overnight Mar 11 14:57:00 last update Mar 11 14:57:11 to android studio? to android itself? Mar 11 14:57:18 update of last support repository Mar 11 14:57:37 i update to last support repo but i use 23.2 Mar 11 14:57:50 seams a bug of 23.2 support Mar 11 14:58:00 i think Mar 11 14:58:49 that's possible, it's also possible that you were relying on undefined behavior of the old version Mar 11 14:59:23 it sucks to do that anyways Mar 11 14:59:27 use textAppearance Mar 11 15:01:41 could be the problem? Mar 11 15:05:50 i am trying to make my first android app , and i am unable to understand lots of things , can anyone here want to by my mentor ?: ) Mar 11 15:06:24 just ask your questions in here and youll get answers Mar 11 15:06:28 unless they are googleable Mar 11 15:06:31 then google Mar 11 15:07:16 danijoo: okay lets start Mar 11 15:07:46 should i use this library ? https://github.com/afollestad/material-dialogs , or should use Dialogs ? Mar 11 15:08:17 I'm looking at my method tracing results. I see a few threads listed. 1. "IntentService(DownloadService)" 2. "main" 3. "Binder_2" 4. "Binder_1" 5. "RenderThread" 6. "Timer-0" 7. "JDWP" 8. "IntentService(LoginService)". Which one of those are actually from me? The only thing I know Android does is "main" thread... but I don't recognize the others cept for IntentService Mar 11 15:08:17 yes Mar 11 15:10:56 danijoo: i want to add custom view in my dialog , and i want to use this library in that custom view https://github.com/supervital/SwipeNumberPicker , but i cant understand how to orgranize the code Mar 11 15:11:05 jackhum: It's a nice lib, but it has a lot in it. You're probably better off just implementing it yourself. Unless you're going to use all of those dialogs showcased and you really want their api. Mar 11 15:11:18 talking about material-dialogs not the number picker. Mar 11 15:11:36 eghdk, what? why is it a problem to use a library just because it has lot of stuff in it? Mar 11 15:12:05 eghdk: i dont know , i am not good enough to implement on my own right now i guess Mar 11 15:12:08 danijoo: Not really it's just that, he's new to Android, and he needs Dialogs, I wouldn't just jump right into a lib for it. But thats just me. Mar 11 15:12:33 jackhum: the api to create a dialog with the library and to create your own dialog are pretty similar. Mar 11 15:13:12 eghdk: i want a dialog that should have my custom view , and i want to have a swipe number picker in it , also , how to handle the code related to number picker ? its too confusing Mar 11 15:13:16 You have to start somewhere. Build your own dialog. Again, just my opinion. If you need to get a project up really quickly... then use the lib, but if you're LEARNING how to build android apps, just build your own. Mar 11 15:13:26 eghdk: also , i am totally new to OOP paradigm Mar 11 15:13:56 First start simple. Get a dialog up. Then put a dialog with a custom view. then put up a dialog that has the swipe number picker. Start small man. Mar 11 15:14:15 eghdk: yeah nice advice , thanks , Mar 11 15:15:08 eghdk: lets suppose i am able to get a customview in a simple dialog , then how to make swipe number picker change number Mar 11 15:15:45 eghdk: i watched some tutorials , and i cant understand when people start making classes , and overriding stuff . i am lost Mar 11 15:15:59 jackhum, do you know java? Mar 11 15:16:35 danijoo: well , i know a little of it . i have read java , but not worked with oops a lot Mar 11 15:16:55 jackhum, thats the reason why you are lost then I guess Mar 11 15:18:38 danijoo: should i use android's alertdialog instead of material dialog? Mar 11 15:18:43 jackhum: Read chapter 1 through 12 of "Head First Java" if you don't know java well... you're just making your life harder on yourself. You can get through those chapters in a weekend if you tried. Mar 11 15:19:21 Anyone have any ideas about my Thread question above? Mar 11 15:19:33 eghdk: http://developer.android.com/guide/topics/ui/dialogs.html , what is the difference between this and material dialog ? Mar 11 15:20:09 timer-0 might be from you eghdk Mar 11 15:21:27 The difference is that afollestad's version work on really old phones. Mar 11 15:21:41 (API level 8 vs API lvl 17 or something) Mar 11 15:23:40 I would start with the default Android stuff, targeting the version of phone you have (and later) and then worry about backwards compatability when you have something closer to release status. Most likely, more people will have the newer versions by then anyway Mar 11 15:24:34 afollstad´s is really great to get material dialogs for api < 21 Mar 11 15:25:39 danijoo: so you are saying that i should not use it now ? Mar 11 15:25:54 jackhum, i say learn java ;) Mar 11 15:26:20 danijoo: thats on my list now , but still i would like to discuss this library situation Mar 11 15:26:33 not with me then, sorry Mar 11 15:27:52 danijoo: one problem i often face is reading a book never helps me , because i find principle of android developement very different then given in any java book Mar 11 15:28:10 you cant understand android without understanding java Mar 11 15:28:10 danijoo: i think someone should write a book on using java in android Mar 11 15:28:20 jackhum, there are books like that Mar 11 15:30:45 wrong. "you can't write for android", java have nothing to do with understanding android Mar 11 15:31:23 you cant write an english book without knowing english. Mar 11 15:32:37 I talking about android concepts in general. like IPC, lifecycles and stuff Mar 11 15:32:54 doesn't matter really, I'm just bored :) Mar 11 15:33:23 ok. I agree that you can understand what a book page is without knowing english then :p Mar 11 15:33:28 wont help you much though ^^ Mar 11 15:35:05 well, if you making books that's all you have to know anyway. analogy not fit :) Mar 11 15:35:25 not if you want to write every page of that book. Mar 11 15:37:08 danijoo: so i have FAB in my activity , i want the dialog to popup when i click the FAB , also , i want that dialog to have a swipe number picker , and a radio button group and a button named "search now" , Mar 11 15:37:22 hi all. I want to create a Card view like this image (https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0Bzhp5Z4wHba3b1N2Q2swOFNuX28/components_cards_content4.png) the first one with bullets. is there any sample code? thank you. (Also, I am a newbie in android development) Mar 11 15:37:56 Now my question is , should i write all the code in fab onclick ? or should i make a seperated class Mar 11 15:38:01 Anyone here who is using MDAndroidChart library? Mar 11 15:54:48 how can I set a textview to use the same font color, size and style as the default title in the action bar? Mar 11 15:57:36 Probably these Mar 11 15:57:36 android:fontFamily Mar 11 15:57:36 android:textColor Mar 11 15:57:36 android:textSize Mar 11 15:57:36 android:textStyle Mar 11 15:57:44 Oops Mar 11 16:00:20 jackhum: DO whatever works. WHat's "best" takes time and practice. But please. just read a java book. You said you don't understand classes and Overrides and stuff. A java book will solve that in ONE weekend. then jump into android. The basic questions you're asking here aren't helping anyone. I would just post a question onto stackoverflow with what you attempted if you get stuck. Mar 11 16:01:33 I thought style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title" would work but no Mar 11 16:02:23 hagabaka, try android:textAppearance=¨...¨ Mar 11 16:04:09 dont confuse textappearance with style Mar 11 16:04:15 danijoo, didn't work either :* Mar 11 16:04:48 and I tried both Base.TextAppearance.AppCompat.Widget.ActionBar.Title and without Base. Mar 11 16:05:21 no idea what the right attribute is :/ Mar 11 16:08:47 oh actually I think you were right Mar 11 16:09:02 I was setting a textSize which overrode it Mar 11 16:09:40 Hi guys, i need a way to validate an edittext for non-blank input different than the classic edittext.gettext.getstring.lenght =0 Mar 11 16:09:50 is this possible Mar 11 16:10:00 why will length not work josh--spartan ? Mar 11 16:10:55 because the app create several edittext according to user answer Mar 11 16:11:11 and? Mar 11 16:11:47 i cant see why this is a problem Mar 11 16:12:22 the user needs 15 data or 20 or anything else, so the app creates what user asks, and this edittext are created edit1,edit2, bla bla bla Mar 11 16:12:46 what has this to do with checking the length? Mar 11 16:13:27 how can i put it in the if Mar 11 16:13:45 if( edittext.gettext.getstring.lenght == 0 ) Mar 11 16:13:57 whats the problem Mar 11 16:14:01 its not only one edittext Mar 11 16:14:04 i told you Mar 11 16:14:14 so you check if on multiple ones Mar 11 16:14:21 Anyway to watch a variable (static int) in my case, while debugging to see if it changes? Initially I was gonna write a Timer that prints out the value of the int. But there ahs to be a different way right? Mar 11 16:14:42 many edittext can be created so how can i call them in the if without knowing how many user will put Mar 11 16:14:49 eghdk, in the debugger window bottom rigth "watches" Mar 11 16:14:54 you can add a variable there Mar 11 16:14:59 in the if Mar 11 16:15:06 for the name??? Mar 11 16:15:10 josh--spartan, you loop through them Mar 11 16:15:27 example Mar 11 16:15:39 because i think its not possible Mar 11 16:15:40 for(Edittext et : arrayOf100EditTexts) { checkIfEmpty(et) } Mar 11 16:16:07 danijoo: And that just updates right there? Not bad! thanks Mar 11 16:16:41 so i need to put all the edittext in an array Mar 11 16:16:55 and then call them in the if to check if empty Mar 11 16:16:58 well. you need to access them.. Mar 11 16:17:32 yes, later Mar 11 16:17:36 in the program Mar 11 16:21:20 would be better to use an ArrayList danijoo Mar 11 16:21:25 ? Mar 11 16:21:36 whatever works for you Mar 11 16:21:50 ok, thnx Mar 11 16:22:10 just wanted to check what would be faster Mar 11 16:22:31 So I went to ANdroidDevSummit and had a converstation with Dianne Hackborne and ended up asking her "if theres no easy way to see if the user is in or out of an application, whats the recomended way to show a notification after a push from gcm only if I'm outside of the app". She recommended broadcasting that a push came in, and if any activity responds then don't post the notification. How would I do that though. Send a broadcas Mar 11 16:23:18 there is a way to see if the user is in the application Mar 11 16:24:08 danijoo: No? Not according to Dianne. You can see if theyre in an activity, but while switching between activities there is an overlap, and the amount of activities my app has. Mar 11 16:24:31 Her recomendation was if I NEED to know if the user came or left the UI to just build a single activity app. Mar 11 16:24:34 I meet some problem with Bluetooth low energy in android 5 and above, the GATT server has some customer report Mar 11 16:24:46 eghdk, you can count activity starts and stops in the application class Mar 11 16:24:51 which is not out of the service standard defined Mar 11 16:25:05 a simple int and for every activity onStart you increment and decrement onStop Mar 11 16:25:12 if its 0 the user is not in your app Mar 11 16:25:29 why wouldn't it be a onCreate onDestroy? Mar 11 16:25:36 eh. yeah I retract my question. Mar 11 16:25:48 it will work fine at android 4 serial, but in android 5 it will warning me that I need BLUETOOTH_PRIVILEGED Mar 11 16:25:54 because an app can be invisible without being destroyed Mar 11 16:26:04 So the count thing could work... hm. I'll have to give it a go now. I'll let you know how it works out. thanks danijoo Mar 11 16:26:10 is there anyway to make application work on android 5? Mar 11 16:26:21 eghdk, http://developer.android.com/reference/android/app/Application.html#registerActivityLifecycleCallbacks(android.app.Application.ActivityLifecycleCallbacks) Mar 11 16:26:59 eghdk http://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_UI_HIDDEN Mar 11 16:27:28 g00s, thats an interesting way too Mar 11 16:27:34 g00s: oooh. Mar 11 16:27:53 But that only gets called when UI is hidden huh? Mar 11 16:27:55 thats what I use in my Service, to know whether to shut down Mar 11 16:28:09 if checks to see if its idle then, and if so, it shuts down Mar 11 16:28:38 if you bind/unbind between activities ball gets dropped Mar 11 16:28:42 g00s, rasterized png don't go in intermediates Mar 11 16:29:02 wait so what do you have in your service while(!TRIM_MEMORY_UI_HIDDEN){//service code}? @ g00s Mar 11 16:29:02 pfn i did find . -name *.png and there was nothing :D Mar 11 16:29:23 never have a while loop in your service code Mar 11 16:30:00 I want to do exactly what it sounds like g00s is doing. I want something running in a service, only while my UI is up, working across all activities. Mar 11 16:30:29 eghdk this only make sense if the sevice must decide to shut down when UI goes away Mar 11 16:30:44 g00s: Yep. Thats what I want. Mar 11 16:31:15 I used setSupportActionBar with a Toolbar with a TabWidget inside. The problem is there is a gap on the left in the background color, and the status bar is also the app's background color. How can I fix those issues? Mar 11 16:31:34 in my case, i listen to that event and poke all the BT clients its babysitting, each one finishes their work and cleanly disconnects. once they disconnect, they remove themselves from a list of clients. once the list goes to 0, the service shuts down Mar 11 16:32:36 oh my, so 23.2.1 got lots of bug fixes Mar 11 16:32:46 they have been busy bees :) Mar 11 16:33:36 Howd you implement it g00s? You bind to the service in your Activites onStarts() and unbind() onStop()? I'm confused where you use TRIM_MEMORY_UI_HIDDEN. Mar 11 16:33:51 eghdk no i don't bind Mar 11 16:33:59 i used to but pfn beat me up Mar 11 16:34:33 bind when you need to actually use the binder Mar 11 16:34:38 don't otherwise Mar 11 16:34:39 eghdk i have BluetoothClient MyService.createBtClient(...) Mar 11 16:35:08 when that static method creates the BT client, it puts it in a List of other clients and registers callbacks Mar 11 16:35:23 if the list went from 0 to 1 it starts the foreground service Mar 11 16:35:30 for the notification and BS Mar 11 16:36:53 the service doesn't shut down until that trim event has been seen and the BT clients have all disconnected Mar 11 16:37:01 (and , the list goes to 0) Mar 11 16:37:14 its basically just a glorified reference counter Mar 11 16:37:18 oh. lol. So okay, I'm gonna go ahead and implement this, I'm going to create a new GameTimerService extends Service(). Inside of that I'm going to run a Timer and every second on the timer check if the TRIM_MEMORY_UI_HIDDEN and then if it is hidden, I'll stopSelf() on the Service. I know it sounds crazy, but product guys want me to mimic what iOS is doing for this game where timers are essential. But I don't want timer running w Mar 11 16:38:02 eghdk TRIM_MEMORY_UI_HIDDEN is an event, why would you need to poll it O.o Mar 11 16:38:04 I hate when timers run w Mar 11 16:38:07 ugh, I need to resize my vm disk for aosp Mar 11 16:38:10 @ g00s Oh. So in your case... your service will stay alive until the MEMORY TRIM callback. Mar 11 16:38:20 Morning Mar 11 16:38:23 when TRIM event comes, just ask yourslef if you need to keep doing work Mar 11 16:38:42 Is there a good way to add a HTTP header (like X-Auth-Token) to each requests a webview makes ? Mar 11 16:38:47 if no then shut down Mar 11 16:39:22 SimonVT: Yeah. iOS was able to handle it fairly easily so I'm being pressured to keep a timer in sync with the time from the server to prevent people from changing phone clock and cheating the system to get more coins before time has gone by. Mar 11 16:39:23 So far I believe the easiest and craziest way is to embed the auth token into the webview user-agent Mar 11 16:39:32 [pfnguyen@galactica1 android] $ du -s Mar 11 16:39:32 90351736 . Mar 11 16:39:34 jeez Mar 11 16:40:15 eghdk: Your long messages are being cut off Mar 11 16:40:40 qwebirc... no wonder, trash :P Mar 11 16:40:48 Find a better irc client Mar 11 16:40:52 then again... my client doesn't handle long lines either Mar 11 16:41:01 lol "iOS was able to handle it fairly easily so I'm being pressured to keep a timer in sync with the time from the server to prevent people from changing phone clock and cheating the system to get more coins before time has gone by." Mar 11 16:41:09 did that really not come through? Mar 11 16:41:21 eghdk, 512 character line limit Mar 11 16:41:34 http://cl.ly/273d1n1s403V Mar 11 16:41:36 w what? Mar 11 16:41:36 bah. SimonVT here you go: http://pastebin.com/zSTM6LPe Mar 11 16:41:58 oh! Mar 11 16:41:59 But I don't want timer running when I'm not in UI. Mar 11 16:42:04 That message did, just poking fun at your first message Mar 11 16:43:30 you know you can just substract longs for time, right ? Mar 11 16:43:52 check time once and when you need to know how much time passed you compare that to current timestamp.. Mar 11 16:44:00 he doesn't want people cheating the clock Mar 11 16:44:04 but you can use uptimeMillis Mar 11 16:44:27 eghdk: this seems like a problem that you'd solve serverside, but you could simply have a periodically scheduled job that connects to the backend and gets the server time Mar 11 16:44:33 I'm going to write my service with how danijoo recomended for counting activities. Going to keep a count in the App class. In my Service I start a timer, every second, I check (before anything else) if activity count == 0 then stopSelf(). Mar 11 16:44:54 eghdk: but why trust the client at all reporting the time of events? Mar 11 16:44:58 Maurits-: It syncs up with the server every time you open the main activity Mar 11 16:45:11 The timer is seeded with the server time Mar 11 16:45:46 What, so you query the server every second? Mar 11 16:46:12 No. I query the server when the user starts the app, and seed the timer with that. Mar 11 16:46:36 right, so report the offset from the seed time Mar 11 16:46:41 and store the seed time on the server Mar 11 16:46:55 The local timer just prevents the user from messing with their clock locally on the device Mar 11 16:47:26 or if you can't change your architecture you could use Mar 11 16:47:26 That's what uptimeMillis is for, the user can't mess with that Mar 11 16:47:27 http://developer.android.com/reference/android/app/job/JobScheduler.html Mar 11 16:47:38 offset from the seed time? Maurits- I think we thought of that solution... but the user could leave the app, change time, and come back into the exisiting Activity Mar 11 16:48:13 eghdk: well, ideally you'd not trust any client timestamps at all, or have a way to verify cheating serverside Mar 11 16:48:19 We were seeding the timer with a network Call from Application onCreate() so we wouldn't have to make a network call if the user leaves the app and comes back. Mar 11 16:48:20 Anyway, yeah, ref counter seems like a better choice than trim memory Mar 11 16:48:46 eghdk: you can, on the backend, see if a user is resetting his clock and penalize him accordingly Mar 11 16:48:46 SimonVT: Okay. Thats what I was hoping. Mar 11 16:49:07 eghdk: I mean, on a rooted device a user will be able to send arbitrary stuff to your server Mar 11 16:49:18 your solution will not work in such a case Mar 11 16:49:35 Maurits-: What do you mean. I keep checking to see if the offset? Is that what you want me to do? Mar 11 16:50:07 eghdk: well, your backend can detect whether a user has set the clock back, right? Mar 11 16:50:15 if you see successive timestampts that go back in time Mar 11 16:50:16 rooted device is game over anyway. So we don't care too much for that, but we don't want users to change their phone time ahead a month and get free game credits (they suck I know, not my app, sorry) Mar 11 16:50:41 SimonVT i noticed chris banes cheese square doesn't have android:theme="@style/ThemeOverlay.AppCompat.ActionBar" on his ToolBar, did something change where we don't need that any more ? Mar 11 16:51:08 Maurits-: Your solution seems like I need to do more constant network check ins... or am I understanding it wrong. Mar 11 16:51:44 I just want one check in at Application onCreate, once that works, I seed the timer, and we're good to go. Mar 11 16:51:53 g00s: If he removed it, and it doesn't look like he added it elsewhere, something probably changed Mar 11 16:52:04 I haven't updated the support library yet Mar 11 16:52:09 eghdk: well you can always do periodic checkins using the jobscheduler api that I linked to earlier Mar 11 16:52:39 or through a service, or through a GCM wakeup Mar 11 16:52:45 Is it one of those games that generate coins in the background, eghdk ? Mar 11 16:53:09 SimonVT: yes... =/ Mar 11 16:53:29 eghdk: but architecture-wise, the server should have the final say in whether coins are generated Mar 11 16:54:04 Assuming they want to keep track of every user on their server Mar 11 16:54:09 I'm just contracting with this company though cuz I need some more experience and some side money. I was essentially brought on board to mimic what iOS was doing. But I will bring up any weakness' and architecture criticisms you guys brought up. Mar 11 16:54:38 eghdk: but what you can do if your architecture is fixed is simply store a reference timestamp every, say, hour Mar 11 16:55:06 eghdk: and if the current time jumps more than, say, 10 minutes from the 'expected time' according to the timestamp Mar 11 16:55:08 Maurits-: Yeah their shit is fucked up. They do counting based on seconds as well. Its stupid. Mar 11 16:55:11 then you know something is wrong Mar 11 16:55:22 shit if effed. lol Mar 11 16:55:43 Do your time math based on server time + uptimeMilis.. Just never use device clock Mar 11 16:56:16 Or nah, guess that stops when in deep sleep Mar 11 16:56:38 elapsedRealTime Mar 11 16:56:41 SimonVT: I'm taking serverTime + 1 every time my Java timer goes off. Mar 11 16:56:59 But only while an Activity is up and running. Mar 11 16:57:47 what's your solution on iOS, btw? Mar 11 16:58:15 android is more permissive than iOS is, generally Mar 11 16:58:16 The solution in iOS is to have a thread that does a similar thing, but in iOS they can tell exactly when the app went into foreground or background. Mar 11 16:59:12 eghdk: right, well, android can do exactly what iOS can Mar 11 16:59:33 it's not the most elegant solution Mar 11 16:59:36 anyone here running N preview ? Mar 11 16:59:48 Yeah. SO thats why I'm going to go ahead and put it in a service in the way I talked about for counting activities Mar 11 17:00:50 SimonVT: any recommendation whether to use a Java timer in my service, or Handler.postDelayed() I heard was recommended to use in Android? Mar 11 17:04:22 Has anyone integrated Unit and UI tests through Sonarqube for their Android project. I am having a heck of a time getting it to work and would love to get some pointers Mar 11 17:04:30 scala-library-2.12.0-M3.jar failed: invoke-dynamic is not supported Mar 11 17:04:31 com.android.jill.JillException: invoke-dynamic is not supported Mar 11 17:04:31 bummer Mar 11 17:07:06 BooeyOH: Sonarqube? The hell is that? Mar 11 17:07:42 http://www.sonarqube.org/ Mar 11 17:09:17 Is that kind of like Jacoco BooeyOH ? Mar 11 17:10:00 I am using jacoco, but having a hard time getting both unit and ui tests Mar 11 17:10:23 I'm just using spoon for UI test results. Mar 11 17:13:58 yeah, we use that for visual reports, but I am trying to get the jacoco binary file for both Unit and UI to send to sonarqube (which then analyzes and reports on it) Mar 11 17:14:04 as far as coverage Mar 11 17:14:17 but everything hates me as far as getting that to work goes Mar 11 17:16:43 Microsoft has told Oracle customers: migrate to SQL Server 2016 and Redmond with give you free licensing for the lifetime of the product plus technical support." Mar 11 17:16:48 holy sh$# Mar 11 17:17:16 hi. do you have any idea why my cardviews don't fit the entire width: http://imgur.com/99s79C1 Mar 11 17:17:22 ? Mar 11 17:17:36 ""Data is the new electricity," that is true he Mar 11 17:25:32 i guess even though vector drawables have viewport dimensions, they require android:width/height - i would have thought that be unnecessary, since ugh, they are vector. for example, I should be able to use it in an ImageView, specify the dimensions of the imageview, and then just have android scale the vector to those dimensions Mar 11 17:28:02 http://stackoverflow.com/questions/34936590/why-isnt-my-vector-drawable-scaling-as-expected Mar 11 17:28:12 "For SDK versions less than 21 where the build system needs to generate raster images and as the default size in cases where you don't specify the width/height." Mar 11 17:28:16 thats not true any more though Mar 11 17:28:25 well, OK i guess if you use the old way it is Mar 11 17:28:50 g00s: are you talking to me? :D Mar 11 17:28:59 LucaS05 sorry no :) Mar 11 17:29:09 ok, np :) Mar 11 17:30:10 hm somebody else says "This is just the default size of the vector in case you don't define it in the layout view. (i.e. You use wrap content for the height and width of your imageview)" Mar 11 17:30:25 Hello! Are Java 8 language features only available for Android N? Mar 11 17:30:47 Meaning, you'll still need to use retrolambda for lambdas in And, the Jack compiler only generates valid code for N+? Mar 11 17:31:22 explodes lambdas go back to GB, not sure what else though Mar 11 17:31:36 the announcement said that language features go back to GB, but API features, like streams, are N+ only Mar 11 17:32:04 ah ha ! you don't need android:width/height if you specify the dimension in your ImageView width/height Mar 11 17:32:09 fucking docs useless Mar 11 17:33:17 explodes, no Mar 11 17:33:29 explodes, jack produces valid code for 2.3+ Mar 11 17:33:37 explodes, so long as you don't use N+-only features Mar 11 17:36:13 oops no actually that didnt work, changed wrong drawable. shit, i guess i should file bug Mar 11 17:41:30 danijoo: For the activity Counter onStart and onStop... does multi window in N do anything to mess that up? Basically. will I ever have two active activities? activityCount == 2 or more? Mar 11 17:41:56 eghdk, 2 can happen easily before N Mar 11 17:43:03 because activity starts are async. Mar 11 17:43:15 one can start before the other one is through his stop Mar 11 17:44:45 https://plus.google.com/u/2/+AndroidDevelopers/posts/BZgzpAqkd8G < Android Support Library 23.2.1 available now Mar 11 17:45:08 Napalm it was out yesterday :) Mar 11 17:45:17 yes, the library Mar 11 17:45:17 Is your name pronounced "Puffin" ? Mar 11 17:45:20 but now the docs are updated Mar 11 17:45:33 https://developer.android.com/tools/support-library/index.html Mar 11 17:45:34 Napalm is always at least 8hrs late ^^ Mar 11 17:45:50 danijoo: actually im ahead 8hrs :D Mar 11 17:46:08 Napalm, what are you doing in this 16 hours then?!?! :D Mar 11 17:46:20 coding like a beast Mar 11 17:46:37 fair enough Mar 11 17:47:45 Napalm what drugs are you using? Mar 11 17:47:58 caffine and nicotine.. the best two Mar 11 17:49:01 Geez Mar 11 17:49:48 Welp, I hope you come out as a millionaire after your codethon. Mar 11 17:49:57 Napalm i'm about to file a bug, but would like your opinion on this. I'm reading this http://stackoverflow.com/questions/34936590/why-isnt-my-vector-drawable-scaling-as-expected Mar 11 17:50:13 oh i read that the other day Mar 11 17:50:21 there is a bug already for it Mar 11 17:50:36 https://code.google.com/p/android/issues/detail?id=202019 Mar 11 17:50:45 Napalm do you have an ID ? Mar 11 17:50:52 oh thanks Mar 11 17:50:56 scaleType='fitXY' fixes it Mar 11 17:50:59 as a temporary fix Mar 11 17:51:32 g00s: says released.. i wonder if its fixed in 23.2.1 Mar 11 17:51:44 Version-Support-23.2.1 Mar 11 17:51:46 yup Mar 11 17:51:53 g00s: should be fixed now Mar 11 17:53:10 Napalm ok so next question - still in that SO post Mar 11 17:53:13 1) Why is there a width/height specification in the vector drawable? I thought the entire point of these is that they scale up and down losslessly making width and height meaningless in its definition? Mar 11 17:53:24 A: For SDK versions less than 21 where the build system needs to generate raster images and as the default size in cases where you don't specify the width/height. Mar 11 17:53:31 g00s: its for the initial scale Mar 11 17:53:50 Napalm you mean that drawable cache ? Mar 11 17:54:19 from b.android.com issue you posted "The technical detail is basically we are using a bitmap under the hook to cache the complex path rendering" Mar 11 17:54:21 g00s: no i mean you have your viewPort size which is related to the units in the data paths.. but then you need to know how that viewport relates to the view Mar 11 17:54:45 basically model->view matrix Mar 11 17:54:51 that conflicts with A: above, unless that guy is wrong Mar 11 17:55:06 i suppose that would also be used to generate pngs Mar 11 17:55:17 since the pngs are the view representation Mar 11 17:57:02 so is "A: For SDK versions less than 21" above correct or not correct Mar 11 17:57:11 danijoo: Are you sure? Hackborne said one activity woiuld not have onStop called on it until another activity fully covers it. Mar 11 17:57:38 g00s: not sure what your asking Mar 11 17:57:45 i'll just file the bug Mar 11 17:58:43 "Due to production schedule conflicts, v24-alpha doesn't contain any of the bug fixes in v23.2.1, just new v24 features." Mar 11 17:58:45 good to know Mar 11 18:01:54 eghdk, thats what I said. it might be that onStart is called before your onStop Mar 11 18:01:58 then the counter will be 2 Mar 11 18:02:20 oh okay. gotcha. misunderstood Mar 11 18:03:21 danijoo: Then how do I take my activity count to use it to know when I'm not in the app? Mar 11 18:03:51 you just check if its bigger 0 Mar 11 18:03:52 g00s, width/height is there for canvas size and such Mar 11 18:03:56 -1 cant appear Mar 11 18:04:20 g00s, images don't full bleed, so you require width/height Mar 11 18:04:31 if (activityCount > 0) then UI is active somewhere? Mar 11 18:04:36 pfn hm ok Mar 11 18:04:40 yes Mar 11 18:05:06 eghdk you are doing some shady stuff ... :) Mar 11 18:05:12 lol Mar 11 18:05:14 s/shady/hacky Mar 11 18:05:32 It'd be simple if this was a one activity application. Mar 11 18:05:35 g00s, theres no unhacky way for that afaik Mar 11 18:06:09 when I start my Service , because somebody called doSomething() on it, i set isInUse = true; and then false when TRIM_ comes in ... Mar 11 18:06:22 Hackborne basically said... if you NEED to start something at UI showing and stop something at UI gone, use a single activity. Starting to think that's a smart move. hahah Mar 11 18:06:24 still kinda lame i guess Mar 11 18:06:49 Yeah, everything is pretty hacky if you think about it. Mar 11 18:07:06 The fact that android is still duct taped together and it works is hacky. =) hahaha Mar 11 18:07:50 duct taped? no Mar 11 18:09:53 danijoo: Shit. On rotation the activity goes through a full tear down, before a new activity is started, so on rotation I hit the 0 case temporarily. Mar 11 18:10:53 of course Mar 11 18:11:15 danijoo: Ooh. isChangingConfigurations is a method. I can use that! Mar 11 18:11:36 Or just delay stopping the service Mar 11 18:12:29 SimonVT: Yeah, right now I was just calling stopService in onStop() of my BaseActivity if activityCount was == 0. Mar 11 18:13:00 I thought your Application was keeping track Mar 11 18:13:21 eghdk lol, might be time to take a break, step away, rethink all of this Mar 11 18:14:22 eghdk: why are you managing your service based on activities showing? Mar 11 18:14:35 Application is holding the activityCount as a static. BaseActivity onStart increments, and onStop decrements. SimonVT Mar 11 18:14:44 herriojr: long story... Mar 11 18:14:49 eghdk that awful Mar 11 18:14:57 yeah, that's not good at all Mar 11 18:14:58 ActivityLifecycleCallbacks Mar 11 18:15:03 let the framework keep track of that state Mar 11 18:15:03 use that Mar 11 18:15:04 it may never actually hit the onStop state Mar 11 18:15:13 ... Mar 11 18:15:24 ive shown him lifecyclecallbacks 3 hrs ago oO Mar 11 18:15:26 I know, I'm just trying it out in a sample app, and didn't set up an app class yet, but I had a baseActivity. Mar 11 18:15:57 herriojr: And in what cases does it not hit onStop? Mar 11 18:16:19 herriojr: It always hits onStop. I think I'm guranteed that since 3.0 Mar 11 18:16:30 eghdk: I never saw that change Mar 11 18:16:34 and if it doesn't. That means my whole process is hosed. In which case, I dont care. Mar 11 18:16:52 onStop is guaranteed Mar 11 18:16:56 eghdk: is it okay if your application gets killed and restarts with nohting? Mar 11 18:17:23 they need to update their diagram for Activity in the docs then Mar 11 18:17:37 because it still shows that the app can be killed after onPause Mar 11 18:18:02 herriojr, the one I see in their docs shows that onStop ios guaranteed Mar 11 18:18:26 http://developer.android.com/guide/components/activities.html Mar 11 18:18:39 onStop -> App process killed Mar 11 18:18:44 http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle Mar 11 18:19:00 yes. onStop is before a kill there Mar 11 18:19:04 look at the line to the left of onPause Mar 11 18:19:27 no app can have higher priority than the one in forground Mar 11 18:19:36 at least not practically Mar 11 18:20:11 so as long as he isn't persisting the count to disk, he should be fine I guess Mar 11 18:20:27 since if the process is killed, it will restart at 0 Mar 11 18:21:53 And that's why you read the context before commenting on whether something is a good approach or not Mar 11 18:22:06 I was asking for context :P Mar 11 18:22:07 Napalm should android:tint work on ImageView pre L ? Mar 11 18:22:16 g00s, yes Mar 11 18:22:24 thx danijoo Mar 11 18:22:30 thats what this new appcompat was introduced for Mar 11 18:22:33 just wanted to make sure ImageViewCompat was handling that Mar 11 18:22:40 all ImageView instances gets replaced by ImageViewCompat Mar 11 18:22:43 ueah Mar 11 18:22:46 yeah thx Mar 11 18:23:20 with AppCompatButton, not for ting but android:backgroundTint... i had to create custom button styles just for the bg color Mar 11 18:23:23 -__-" Mar 11 18:23:29 s/ting/tint/ Mar 11 18:25:49 adq: the compat library defo supports background tinting Mar 11 18:26:05 did not work on a 4.4 device Mar 11 18:26:31 do you guys think its weird that NavigationView handles icon tinting OK, but that Toolbar at least for me, either requires (1) modifying drawables to have tint or (2) doing it programatically Mar 11 18:26:32 danijoo: oh man, you're right, it is only in pre-honeycomb Mar 11 18:26:40 danijoo: I totally missed that Mar 11 18:26:42 adq: they all implement this new interface https://android.googlesource.com/platform/frameworks/support/+/master/v4/donut/android/support/v4/view/TintableBackgroundView.java Mar 11 18:26:47 I wonder what prompted the change Mar 11 18:26:56 herriojr, yeah. and nobody should support pre-honey anymore :p Mar 11 18:27:17 i believe you Napalm, just that on one device i tested it did not work Mar 11 18:27:17 adq: see https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/widget/AppCompatButton.java Mar 11 18:27:35 danijoo: that's about the time I went and did server dev for 2 years Mar 11 18:27:39 and i'm explicitly use android.support.v7.widget.AppCompatButton in xml Mar 11 18:27:41 danijoo: so I missed a bit Mar 11 18:29:19 anyway, it's not a blocker since i was able to mitigate this issue with a android:theme=[insert button style with a specific color accent for the bg] Mar 11 18:29:33 mornin' folks Mar 11 18:29:45 g00s: check https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/widget/AppCompatImageView.java Mar 11 18:29:56 g00s: looks like it doesnt support the attribute Mar 11 18:30:51 Napalm i never can tell whether AOSP git has latest version though Mar 11 18:31:01 g00s: i mean set ImageHelper doesnt do much apart from force setImageDrawable through it. https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/widget/AppCompatImageHelper.java Mar 11 18:31:03 that seems from 5 months ago ? am i reading that right Mar 11 18:31:05 danijoo: oh man, this makes me wonder what else I missed Mar 11 18:31:06 Napalm, aosp doesn't have latest version Mar 11 18:31:09 Napalm, always refer to sources.jar Mar 11 18:31:10 and thats just so it can theme the material ones Mar 11 18:31:21 pfn: thanks, good to know Mar 11 18:31:23 checking now Mar 11 18:31:24 herriojr, 2yrs? you missed a lot then :) Mar 11 18:31:24 this morning i tested 24.0.0-alpha1 lib for preference v7, they broke something near android:id="@android:id/list_container" << Error:(24, 21) No resource found that matches the given name (at 'id' with value '@android:id/list_container') Mar 11 18:31:29 :') Mar 11 18:31:45 adq, you can't use 24.0.0 unless you compileSdkVersion N Mar 11 18:31:52 ohh that might be the issue then Mar 11 18:32:02 always bitch about tools :P Mar 11 18:32:29 it was just a quick test, i should have thing about N... but then need to change gradle, then need to cha... errr Mar 11 18:32:34 g00s: still looks like even the sources.jar version still doesnt support it Mar 11 18:32:50 Napalm, it's not in appcompatimageview Mar 11 18:32:55 Napalm, it's handled in appcompatimagedelegate Mar 11 18:33:13 er, appcompatimagehelper Mar 11 18:33:14 whatever Mar 11 18:33:15 AppCompatImageHelper Mar 11 18:33:17 you mean that? Mar 11 18:33:32 yea.. its not in there Mar 11 18:33:40 doesnt handle android:tint Mar 11 18:33:54 hmm, something else does then Mar 11 18:33:55 oh well Mar 11 18:33:56 * pfn shrugs Mar 11 18:34:58 pfn: only the abc_ drawables are tinted to the theme in AppCompatDrawableManager Mar 11 18:35:18 hmm, still only a whitelisted bucket? that's irritating Mar 11 18:35:37 and even then its hardcoded Mar 11 18:35:38 tint = getThemeAttrColorStateList(context, R.attr.colorControlNormal); Mar 11 18:35:40 things like that Mar 11 18:36:00 wait waaa Mar 11 18:36:37 when I import a vector asset using a material icon, is there an easy way to add a padding around it? Mar 11 18:36:58 Napalm, no, it's tinted by getDrawable from theme automatically Mar 11 18:37:02 put it in a layer-list drawable? Mar 11 18:37:27 pfn: yea.. but what we were talking about is direct control over the tint with android:tint Mar 11 18:37:38 oh Mar 11 18:37:39 * pfn shruigs Mar 11 18:38:10 it should be possible to send a message to my phone from the desktop right? assuming we're on the same wifi network... I'm wondering if I could somehow trigger an intent from my desktop to my android phone Mar 11 18:38:20 pfn: played around with windowInsets with appCompat? Mar 11 18:38:23 have you* Mar 11 18:38:44 nope Mar 11 18:38:56 you know what pisses me off Mar 11 18:39:14 ViewCompat and the rest, when they NO-OP on earlier platforms.. when they could put workarounds in Mar 11 18:39:17 grr Mar 11 18:39:54 yes, that's a bit irritating Mar 11 18:39:59 grekkos, sockets Mar 11 18:40:01 I assume the Compat classes always do fallback behavior Mar 11 18:40:06 instead of no-op Mar 11 18:40:07 hate that Mar 11 18:40:10 no Mar 11 18:40:17 they hardly ever do Mar 11 18:40:22 I know Mar 11 18:40:22 only a fraction actually do anything Mar 11 18:40:29 that's why I avoid them and just write version-conditional Mar 11 18:40:31 and the docs are useless Mar 11 18:40:39 so I know wtf they're being used and not Mar 11 18:40:51 unless I know for sure that a compat class does perform fallback behavior Mar 11 18:42:40 just checked.. window insets do nothing pre-L in ViewCompat Mar 11 18:42:41 arg Mar 11 18:43:51 hopefully google can do something about updates and we can some day ditch all this compat stuff Mar 11 18:44:15 g00s: new N stuff looks like its moving that way Mar 11 18:48:28 is it just me or creating a close beta on the app store is a serious pain in the ass? Mar 11 18:48:56 DrBenway: its you Mar 11 18:49:05 DrBenway, I found Fabric to be better for beta Mar 11 18:49:07 half the time i publish something... the store listing isn't available to the testers Mar 11 18:49:22 DrBenway, playstore takes 1-2 hrs to update Mar 11 18:49:28 lol http://mjg59.dreamwidth.org/40505.html Mar 11 18:49:32 i've given it 1-2hrs Mar 11 18:49:43 i'll wait another 1-2hs... Mar 11 18:49:48 "I stayed in a hotel with Android lightswitches and it was just as bad as you'd imagine" Mar 11 18:49:56 i don't see the point of saying "published" and not processing update if it's not... Mar 11 18:50:48 oh nice, one of the most interesting things about java 9 http://www.infoq.com/news/2016/03/jigsaw-jdk-9 Mar 11 18:51:26 danijoo: yeah, I picked up on a lot of things in the last year I had missed, this one I just completely missed Mar 11 18:51:34 g00s: people are talking about it for YEARS and you now discoveed it ? Mar 11 18:51:48 gordon_ did you read the article ? duh Mar 11 18:51:54 no :D Mar 11 18:51:58 dumbass :) Mar 11 18:52:27 DrBenway, it says everywhere that it can take time Mar 11 18:52:38 DrBenway, if you cant live with that, there are alternative services Mar 11 18:52:39 that will be funny though, if the platform modules like java.util depend on Swing or some crap hahaha Mar 11 18:52:50 i've been playing with the play store for the past 2 weeks releasing different versions Mar 11 18:52:58 and seriously... its not just that it takes time Mar 11 18:53:07 sometime it just doesn't work Mar 11 18:53:16 play store is just not made to get a quick feedback Mar 11 18:53:32 it should be made to make quick releases... Mar 11 18:53:44 no its for long time test Mar 11 18:53:47 interesting "This split has had some casualties; the java.beans package, due to its tight coupling with AWT and Applets, has been migrated into the java.desktop module; which means classes in the java.base package that implemented listener registration methods for PropertyChangeListener have been removed." Mar 11 18:53:53 ie testing the app for one month before it goes into a full release Mar 11 18:54:32 well i dunno if anyone can answer this... i was using a manual list of emails before to sign people up and to add new emails... i literally had to unpublish and republish the app for the new emails to be accepted Mar 11 18:54:38 now i've switched to a google group Mar 11 18:54:46 can i publish... and then add people to the group? Mar 11 18:54:52 will they automatically get access to the closed beta? Mar 11 18:54:53 g00s: I hope that with jigsaw jvm will start as fast as python Mar 11 18:55:00 DrBenway, yes Mar 11 18:55:05 great Mar 11 18:55:11 you need to be in the group and then click that link Mar 11 18:55:11 and do they need to use the opt in link? Mar 11 18:55:13 at least for simple hello world in console Mar 11 18:55:14 and yu are in Mar 11 18:55:16 or do they automatically get access? Mar 11 18:55:23 link must be clicked Mar 11 18:55:27 cool thanks Mar 11 18:56:15 i'm really afraid of shipping the closed beta to a bunch of people and then no one can access the build. Mar 11 18:56:32 (we're about to switch off from email release) Mar 11 18:56:45 then use fabric instead Mar 11 18:56:58 i'll look into it Mar 11 18:57:25 with fabric you drag/drop the new beta apk into a window and every user will get a download notification on his phone at that exact moment Mar 11 18:57:48 gordon_, I doubt it will decrease startup time significantly, not for core javase Mar 11 18:57:50 + you can see who download it and stacktrace reporting for every crash Mar 11 18:57:58 jvm startup time is only roughly double that of python for something trivial Mar 11 18:58:08 modularizing the base won't do much to improve that Mar 11 18:58:19 yeah i was about to switch to crashlytics Mar 11 18:58:23 so i'm heading that way Mar 11 18:58:39 just havent had time for this milestone (finishes today) Mar 11 18:58:45 http://pastebin.com/rEzBzRdc Mar 11 19:00:19 stuff like removing compression from jar files, etc. will improve it further Mar 11 19:01:40 Napalm so for something like TextView android:drawableTop, which wrapper is easiest for that required indirection to use vector drawable, i guess state list with just one state (default) ? Mar 11 19:02:09 pfn: so... I need to wait for something on llvm... Mar 11 19:02:31 g00s: yea.. but then your part of the state change list.. so perhaps layer-list Mar 11 19:02:52 Napalm ok thanks Mar 11 19:04:00 pfn: I'm less worried about startup and more worried about runtime Mar 11 19:07:48 * g00s sighs - just put android:tint="?attr/colorControlNormal" and app:srcCompat="@drawable/ic_folder_black_24dp" .. but the tint is not working (6.0.1) Mar 11 19:10:13 (on ImageView) Mar 11 19:11:32 try setting tintMode as well? Mar 11 19:11:47 so hm ok, didn't have to do that on my TextViews Mar 11 19:12:03 I've not had good experiences with tint, it seems buggy Mar 11 19:12:59 Zharf hm that worked, wonder why i didn't have to use tintMode for TextView drawableTop, etc Mar 11 19:13:25 beats me, I had to set tintMode on lollipop but not on marshmallow for indeterminate progressbar Mar 11 19:19:12 Today is a special day! First basic app on the app store :). FINALLY. Mar 11 19:20:34 how basic .. ? :) Mar 11 19:20:38 Taios, congrats Mar 11 19:21:13 thanks :) Mar 11 19:21:17 pretty basic - Mar 11 19:21:35 my mum got diagnosed with liver disease through bad eating/diabetes, so I made a quick diary app for her Mar 11 19:21:40 to enter items by voice Mar 11 19:21:53 all the other diet apps are way too complex for her Mar 11 19:21:55 https://play.google.com/store/apps/details?id=passio.fastfooddiary.paid&hl=en_GB Mar 11 19:22:13 (promotional code if anyone wants one to download it for free and be nice and give me a review :) ) Mar 11 19:22:53 I don't do reviews since they made a g+ account mandatory Mar 11 19:23:17 Looks very nice Taios Mar 11 19:23:25 Oooh, shit did they? Mar 11 19:23:29 Thanks naise1 :) Mar 11 19:23:45 years ago Mar 11 19:25:18 I tried removing mine a while back and just realised it's reappeared -.- Mar 11 19:26:12 doesnt every gmail adress has an associated g+ acc by default? Mar 11 19:26:58 Dunno, I was definitely able to remove my g+ account - it was the only way to change my real name appear on on youtube comments. Not that i'm a dick, but I don't want everyone seeing my account like Mar 11 19:27:00 danijoo, not mine Mar 11 19:27:18 they try to make me make one quite often but I never will Mar 11 19:27:43 my accounts are preg+ Mar 11 19:27:55 i dont use mine but who cares if its there.. Mar 11 19:33:21 danijoo - it's like having all your information in one place for everyone to view Mar 11 19:33:22 I do, obviously :) Mar 11 19:33:50 video history, comments, and all sorts of other things Mar 11 19:34:00 I don't want to have accounts for things I never use and I certainly don't want my accoutns centralized Mar 11 19:34:01 Taios, g+ privacy settings are way more adjustable than from any other social network. you make make this all invisible afaik Mar 11 19:34:13 I don't use any social network crap Mar 11 19:35:42 how come I can't use classes in android Mar 11 19:36:02 I created a class, now I want to create an instance of that class in my MainActivity.java Mar 11 19:36:11 o.O Mar 11 19:36:15 you are doing it wrong Mar 11 19:36:25 it is the c# way :D Mar 11 19:36:31 i'm not sure how to do it yet in android Mar 11 19:36:37 missing a basic obviously :P Mar 11 19:36:42 learn java Mar 11 19:36:48 ^ Mar 11 19:37:13 but it's pretty much the same as in C# Mar 11 19:37:34 then why can't I create a "LoginModel model;" like per usual Mar 11 19:37:43 you have to instantiate it Mar 11 19:37:56 unresolved symbol Mar 11 19:37:57 hrm ok Mar 11 19:38:07 import Mar 11 19:38:07 did you import ther LoginModel package? Mar 11 19:38:20 oh Mar 11 19:38:22 no I didn't Mar 11 19:38:37 If you’re using AS, it should underline the LoginModel with a red squigly, and if you hit Alt+Enter, it’ll resolve the import for you if able Mar 11 19:38:56 yeah I ctrl-enter, but it doesn' thave the import option Mar 11 19:39:10 alt-enter is not ctrl-enter Mar 11 19:39:36 IntelliJ/AS’s magic combo is Alt+Enter Mar 11 19:39:52 I have create class/create enum etc Mar 11 19:40:15 if its in a different package, you need to import it. Mar 11 19:40:19 basic java :x Mar 11 19:40:29 ah ok Mar 11 19:40:50 C# is the same way Mar 11 19:41:34 oh that's wierd Mar 11 19:41:36 why is there two Mar 11 19:41:40 hrm, moved it Mar 11 19:42:06 yes, now I can use it like normal :) Mar 11 19:42:08 thanks for the pro tip Mar 11 19:43:39 somehow,m it's ending up in my test project Mar 11 19:43:45 whjen I create a new class Mar 11 19:43:49 (noob issues) Mar 11 19:48:39 also, there's no folders huh Mar 11 19:48:50 it's just your activity, and everything underneath? no subfolders? Mar 11 19:49:10 that's going to get junky looking fast :D Mar 11 19:49:55 no, there are packages Mar 11 19:50:14 seriously, go learn java Mar 11 19:56:51 read a little about it, java packages, got it Mar 11 19:58:52 read more about java while you’re at it Mar 11 19:59:29 well, I guess packages weren;t a thing when I learned Mar 11 19:59:40 huh Mar 11 19:59:43 I looked through my book, it doesn't mention packages anywhere as far as I can tell Mar 11 19:59:52 java always had packages Mar 11 19:59:54 oh hrm Mar 11 20:00:18 I don't know, just didn't learn about them I guess Mar 11 20:00:25 If i want to use Dagger to inject Retrofit instances for my api calls, but I have 2 different endpoints Im hitting (eg, 2 different .baseUrl(example.com)) how would I handle that Mar 11 20:00:29 how old is your book? Mar 11 20:00:34 1998 Mar 11 20:00:38 toss it Mar 11 20:00:38 "the object of java" Mar 11 20:00:42 um Mar 11 20:00:53 I also have an android book, which is new Mar 11 20:01:01 but my java syntax bgook is very old Mar 11 20:01:11 get a newer java book Mar 11 20:01:18 ok Mar 11 20:01:36 you might be able to get away with the free online version of Thinking in Java Mar 11 20:02:39 or screw books and read random chunks of tutorials :v Mar 11 20:04:58 I do really well with a book, remember I'm a 90's kinda guy :P Mar 11 20:06:00 and you develop for 90s phones as well Mar 11 20:06:07 used to :P Mar 11 20:14:50 uh, old java syntax book all talked about package organization Mar 11 20:14:51 so don't lie Mar 11 20:19:09 pfn: I am not lieing, but yeah just skimmed.. it doesn't seem to talk much about packages anyways Mar 11 20:19:20 I went to the classes and objects area, nothing Mar 11 20:19:28 but yeah all over the place online Mar 11 20:19:35 and which book is this? Mar 11 20:19:39 the object of java Mar 11 20:19:58 sounds terrible Mar 11 20:20:07 amazon users think so too Mar 11 20:20:28 maybe it is as bad as you say Mar 11 20:20:30 let me find a link to the correct edition Mar 11 20:20:42 heh Mar 11 20:21:02 http://www.barnesandnoble.com/p/object-of-java-david-d-riley/1101892539/2671408026619?st=PLA&sid=BNB_DRS_Marketplace+Shopping+Professional_00000000&2sid=Google_&sourceId=PLGoP2475&k_clickid=3x2475 Mar 11 20:21:31 1,99$ - thats the price of quality Mar 11 20:21:54 this cost like 85$ when I was in school D: Mar 11 20:21:59 was expensive Mar 11 20:22:12 2001? Mar 11 20:22:21 sounds about right Mar 11 20:23:39 I never really needed to use my java knowledge until yesterday Mar 11 20:23:58 pretty much forgot erverything Mar 11 20:34:49 you were blessed until yesterday then Mar 11 20:41:47 In landscape, on tablets, an icon is not drawing .. It draws every other time. I've never seen this before Mar 11 20:42:01 huh Mar 11 20:44:59 explodes: umm, need more information if you're asking for help Mar 11 20:46:18 Yea, I know. I don't really know where to begin on this one. At first I thought it was because I was using a @style/ to specify the image src/ or maybe the actual drawable.png was bad, but everything looks fine. Mar 11 20:53:04 For AppCompat users, the flags for enabling support vector drawables described in the 23.2 blog post (http://goo.gl/073Mpo) are no longer required for usage of AppCompat." Mar 11 20:53:27 wait what ? wouldn't it then rasterize stuff at build time ? Mar 11 20:56:31 explodes: do you have different layouts depending on orientation? How are you handling rotation? Mar 11 20:57:19 explodes: also, did you check hierarchyviewer to make sure at least the hierarchy is fine? Mar 11 20:57:43 g00s: Try it, see what happens Mar 11 20:57:55 rotation is "default," no configChanges are specified through the manifest, portait isn't locked or anything. there are some landscape layouts, but none of them include the view in question. hierarchy viewer is fine. if it's relevant, the ImageView is part of a view in a recyclerView Mar 11 21:04:10 SimonVT i'm baffled. i haven't changed my gradle plugin, but there are no rasterized pngs by the build system Mar 11 21:04:28 What, jack? TypedArray a = context.obtainStyledAttributes(attrs, set); a.getColor(1, defaultTextColor); Error:(71) Error: Expected resource of type styleable [ResourceType] Mar 11 21:04:49 so support lib 23.2.1 caused the build system to not rasterize my vector drawables? how the heck ,, Mar 11 21:06:07 I am retrieving weather data from an api in json and want to create a bunch of objects (that hold weather data) in my activity. Since I retrieve the weather data via an asynctask, and only want to display a progress dialog while I get and create the objects, what is the best way I can create the objects in the asynctask and use them in my activity? Mar 11 21:09:13 So you're saying the support library changed how resources provided by you are processed? I doubt it Mar 11 21:09:23 cbot`, gson Mar 11 21:10:15 SimonVT have you seen this https://plus.google.com/+AndroidDevelopers/posts/BZgzpAqkd8G Mar 11 21:10:29 "For AppCompat users, the flags for enabling support vector drawables described in the 23.2 blog post (http://goo.gl/073Mpo) are no longer required" Mar 11 21:10:34 Sure Mar 11 21:10:39 how did they make that change w/o new updates to plugins Mar 11 21:10:51 that was required just a few days ago Mar 11 21:10:54 By not using vector drawables in appcompat Mar 11 21:11:00 g00s, new plugin version, isnt it? Mar 11 21:11:13 danijoo i have been using 1.5.0 for months now Mar 11 21:11:35 Zharf, that won't work with what I want I believe. I would still need to parse the gson in the activity Mar 11 21:11:50 this blog says what you need to do for 1.5 & 2.0 plugins http://android-developers.blogspot.com/2016/02/android-support-library-232.html Mar 11 21:11:51 line 12, suddenly my build is failing after this has built for the last 8 months: http://pastebin.com/0JgRGv0S did i find a bug with something? any ideas for a workaround? Mar 11 21:12:00 cbot`, huh? Mar 11 21:12:07 actually I should just make it a sync task and stall out the UI thread anyway Mar 11 21:12:19 explodes, logs or it didn't happen Mar 11 21:15:23 yeah, they reverted appcompat libs from using vector drawables Mar 11 21:15:31 because of all the issues of rasterization Mar 11 21:17:41 It also wasn't obvious that AppCompat 23.2.0 required the flag.. Certain drawables just didn't work properly Mar 11 21:18:02 basically what I mean when I say "all the issues of rasterization" Mar 11 21:18:06 It was either reverting or somehow crashing at runtime Mar 11 21:18:40 q Mar 11 21:19:17 hmm, dunno about crashing Mar 11 21:19:39 It would be consistent with using wrong themes Mar 11 21:24:49 Zharf, basically what I want to do is create a viewpager w/ the information I received from the json, where each page is a piece of information in that json Mar 11 21:25:13 so I would need a way to create objects from that json and pass that into the fragments before I create them for the pager Mar 11 21:25:14 go on.. Mar 11 21:25:44 but the json is received from an asynctask, which is not on the UI thread Mar 11 21:27:13 and? Mar 11 21:27:46 so the fragments would likely end up being created before the task finishes, leaving the pages unpopulated Mar 11 21:28:49 I guess the only way around this is to either do a call from each fragment or block the UI thread until asynctask finishes right? Mar 11 21:29:05 or fill the fragments after they are created... Mar 11 21:29:18 Or don't create the fragments until the asynctask finishes Mar 11 21:30:51 if block UI whats the point of asynctask then Mar 11 21:31:23 yeah Ashiren I know which is bad Mar 11 21:31:36 or put some progress bars Mar 11 21:31:39 danijoo, I wouldnt know if the asynctask finishes before the fragments are created Mar 11 21:34:22 ehh I'll try a different question: is there a way I can keep the objects I create in the asynctask from the json in the activity? Mar 11 21:39:03 nvm nvm i got an idea thanks guys Mar 11 21:50:41 jdeferred Mar 11 21:50:42 use it Mar 11 21:50:43 love it Mar 11 21:55:54 "Android One First and Second Generation will get Android N" Mar 11 21:56:30 src? Mar 11 21:56:57 oh nvm. android One Mar 11 21:57:23 danijoo if they were available in the US i'd get one Mar 11 21:57:53 for that price - ofc Mar 11 21:58:03 cheap debugging hardware Mar 11 21:58:34 yeah i don't understand why google did not make those available for devs Mar 11 21:58:53 if anything, would be great low spec test device Mar 11 21:58:55 oh well. a variant is actually available here in germany Mar 11 21:58:59 but 180 euro lol Mar 11 21:59:10 http://www.amazon.de/Aquaris-A4-5-Smartphone-Quad-Core-interner/dp/B015XT8VPI?tag=chiponline Mar 11 22:00:47 pfn: yeah, that looks nice, I haven't used it in a project yet though Mar 11 22:02:10 herriojr, neither have I, I use my own Futures port Mar 11 22:08:41 I'll try it out in a future project, though Mar 11 22:15:02 git status Mar 11 22:15:06 oh man Mar 11 22:17:27 Hey all, throwing a ping out to anyone with OpenSL experience. Having some trouble with BufferQueues and none of the google resources or api's have been helpful Mar 11 22:19:49 otto people do you guys use otto to handle network async tasks? like when the response comes back publish it to the listeners and then have your UI subscribe to that event? Mar 11 22:20:34 otto -> deprecated Mar 11 22:20:47 were you the one who brought that up yesterday too danijoo lol Mar 11 22:20:49 (just saying) Mar 11 22:20:51 I don't use it Mar 11 22:20:54 I'm just curious Mar 11 22:20:57 no i wasnt the one Mar 11 22:21:02 I guess I could just change it to "bus people" Mar 11 22:21:08 I brought it up yesterday Mar 11 22:21:09 oh haha that's even funnier then Mar 11 22:21:11 lazy way is to just use otto to broadcast to your UI Mar 11 22:21:35 I usually use callbacks to handle everything Mar 11 22:21:55 everything is a callback at some point Mar 11 22:22:07 I'm okay with small anonymous classes Mar 11 22:23:33 eventbus removes the direct dependency though Mar 11 22:23:43 Audio in android just blows Mar 11 22:23:49 that's what this project has taught me Mar 11 22:24:01 obsidian1, it's ok for playing music but that's pretty much it ;) Mar 11 22:24:24 Yeah, I'm working on getting raw audio samples using opensl Mar 11 22:24:29 Even this is just a shitshow Mar 11 22:24:37 I should sleep, next alphago game in a few hours Mar 11 22:35:03 otto being deprecated doesn't make in non-functional or unusable Mar 11 22:39:08 hm. since i went to support 23.2 and started using vector drawables, my navigation drawer is very janky to pull out. only thing i can think, is it has a bunch of items vector icons ... Mar 11 22:39:34 JakeWharton, make a script that makes 1 whitespace changing commit every sunday to troll those people? :P Mar 11 22:39:42 "Not deprecated, still commits!" Mar 11 22:39:53 g00s, what does profiler say? Mar 11 22:40:24 pfn so how do i get the old behavior back, where the build system rasterized my vector drawables Mar 11 22:40:52 because ... even after reverting those changes we were supposed to add to build.gradle - they aren't coming back Mar 11 22:41:46 after you get over the foreign ide shock, the java syntax is nearly identical to c# Mar 11 22:42:40 I wonder if there's alot of c# -> java gotcha's Mar 11 23:12:10 g00s, should be automatic Mar 11 23:22:18 g00s, maybe clean Mar 11 23:34:11 thank god its friday Mar 11 23:47:59 does anyone here handle network calls themselves or do you guys all use libraries for that? Mar 11 23:53:09 grekkos: most people use libraries Mar 11 23:55:20 I’ve done both. I’ve used Volley, Retrofit, and just plain old HttpUrlRequests (or whatever it’s called) Mar 11 23:56:01 httpurlconnection Mar 11 23:56:09 that’s the one Mar 11 23:56:14 okhttp is a dropin replacement for it Mar 11 23:56:17 I'm not familiar with the -> |= syntax in this statement Mar 11 23:56:19 anyLocationProv |= locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); Mar 11 23:56:24 what does |= do? Mar 11 23:56:29 or-equals Mar 11 23:56:44 it’s the same as a +=, but instead of adding, it will do an OR Mar 11 23:57:05 ok thanks Mar 11 23:58:48 after using retrofit I don't see why you'd ever handle it yourself Mar 11 23:59:26 Declare your models and endpoints, build an adapter, boom network requests Mar 12 00:00:17 there is a certain kind of zen in making a small app with only a handful of requests without a library Mar 12 00:00:55 been there done that Mar 12 00:01:17 probably doesn't help that I'm a total noob. Mar 12 00:01:32 my own implementation of network calls was not pretty Mar 12 00:02:05 back in the day there really weren't any libraries — android didn't have good support for them, so you did everything yourself Mar 12 00:02:14 that's not really true Mar 12 00:02:21 android had great support for libraries Mar 12 00:02:35 that's the whole advantage of using the java ecosystem Mar 12 00:02:44 there just weren't libraries optimized for the android use-case Mar 12 00:02:47 yeah, you're talking about just jars Mar 12 00:03:10 I've been trying out lots of these libraries Mar 12 00:03:17 gave up on dagger2 yesterday lol Mar 12 00:03:34 and you used to have to manually drop the jars in Mar 12 00:03:41 pretty cool, it worked easily in my app. Sunk a week into trying to figure out my test cases lol Mar 12 00:03:57 and then they introduced android library projects (not aar yet) Mar 12 00:04:10 which took forever to compile if you had a few Mar 12 00:04:31 library projects were a thing in 1.6 Mar 12 00:04:39 then they introduced aars and that seems to be when the 3rd party ecosystem really blew up Mar 12 00:04:42 or maybe earlier Mar 12 00:05:02 nah, 3rd party ecosystem started blowing up with the arrival of the apklib Mar 12 00:05:49 aar improved it dramatically, though Mar 12 00:05:51 nah, they didn't have library projects in 1.6 Mar 12 00:06:16 would lots of modules explain retardedly long compile times? Mar 12 00:06:24 maybe not, I started developing at 2.0 and it was already there Mar 12 00:06:28 70k methods between 10 or so modules Mar 12 00:06:52 dexing and packaging resources are the slowest steps Mar 12 00:06:55 get faster disk and cpu Mar 12 00:07:11 hell, I remember back in the day on iOS, when the best way to add libraries to your project was to literally copy and paste the library’s files into your project Mar 12 00:07:20 pfn: yeah, I started at 1.0 and stopped right before 3.0 or so Mar 12 00:07:25 20 mins with the newest tools. When I first got here, 75 mins to compile no kidding Mar 12 00:07:34 20 mins to build? Mar 12 00:07:36 pfn: I think I missed the apklib period Mar 12 00:07:43 apklib was maven/sbt only Mar 12 00:08:04 pfn: yup. complete clean and rebuild Mar 12 00:08:18 I play lots of sudoku to kill the time Mar 12 00:08:18 suck ass :P Mar 12 00:09:29 sometimes xml will not be repackaged, I dunno what happens. Lots of rebuilding when I work on layout files Mar 12 00:09:54 pfn: ah ok Mar 12 00:10:42 or I guess I started at pre-1.0, back when they were R## Mar 12 00:11:11 anyway, my builds are highly optimized, usually take a minute or two for clean builds Mar 12 00:11:19 (for large company apps) Mar 12 00:11:26 I remember installing android on a winmo tablet before the G1 came out Mar 12 00:11:39 sorry i got sucked away there Mar 12 00:11:56 s73v3r: a lot of people I know are still copy/pasting on iOS Mar 12 00:12:55 pfn: how do you optimize it? Mar 12 00:13:23 I still have a feeling that our library modules make it slow Mar 12 00:13:51 like, google play services is a module lol. Mar 12 00:13:52 where I'm at now it's kind of hard to make use of any open source library due to some politics revolving around maintenance and contracts and things Mar 12 00:14:47 I also have a feeling if we kept our support library up to date we would see a lot fewer device specific bugs Mar 12 00:19:48 so iOS tabs don't let you hide icons, and Android tabs make it hard to show icons Mar 12 00:20:46 RustyShackleford, by not using gradle Mar 12 00:22:19 hagabaka: android is android, iOS is iOS they don't have to be exactly the same Mar 12 00:22:44 pfn: what do you use in place of gradle Mar 12 00:22:52 I'm not saying they have to be the same, but it's just funny how they're both weirdly inflexible in certain things Mar 12 00:23:00 oh yeah Mar 12 00:23:16 some things are really easy on iOS and painful on android and vice versa Mar 12 00:23:44 but I think for the most part most things are easier on android Mar 12 00:25:21 yeah. Reverse geocoding is easy as pie on iOS, but Android requires you to get google apps keys and stuff Mar 12 00:25:43 and, because I only do it maybe once every other year, I always forget how to go about doing that stuff Mar 12 00:26:22 is there any way to adjust the powermanagement via a java API? eg. disabling to standby some cores, and request a higher cpu frequency? Mar 12 00:26:53 I'm having some issue with a USB device which stops receiving data when the powermanagement is doing something.. Mar 12 00:27:13 it should work with non rooted systems (so manually adjusting the cpu scheduler is not an option...) Mar 12 00:27:32 i don’t think that’s something you have access to Mar 12 00:30:28 what do you guys do for loading? I have an asynctask for some kind of cpu intensive algorithm I have running on the phone, I don't want to block UI completely, but there's really nothing to do on this Activity while waiting (the operation takes usually 2-3 seconds in most cases) I'm just showing a ProgressBar in the center of the screen with a small caption. Should I raise it slightly and gray out the background screen? I just w Mar 12 00:31:00 s73v3r: yeah I've only done Geocoding on Android and I forgot what it's like Mar 12 00:31:39 from what I remember, once you actually get to the point of using the API, it’s not bad, it’s just getting to that point that’s a pain in the ass Mar 12 00:31:53 and I’m pretty sure it’s changed a little bit every time I’ve done it Mar 12 00:32:09 ah Mar 12 00:32:17 yeah I remember it being straightforward but I was using maps already Mar 12 00:32:28 I did some hacky stuff with street view to show you the address you searched for Mar 12 00:38:02 grekkos, sbt Mar 12 00:40:15 pfn: sbt? Mar 12 00:40:51 oh scala build tool I guess? Mar 12 00:41:34 pfn's github is the first result in google :) Mar 12 00:41:51 Anybody on the Android N preview have any issues generating bug reports? Mar 12 00:46:17 if something is is versioned "rc11", was rc1 really a release candidate >.> Mar 12 00:46:45 * g00s waiting until rc20 Mar 12 00:58:40 anyone delt with elevation? Mar 12 00:59:15 i set the elevation on a view and i get my drop shadow.. but it changes the translationZ essentially lifting the view out of the child render order Mar 12 00:59:26 meaning views i want on top go behind Mar 12 00:59:39 then ofc, i need to set an elvation on those.. but then they also get a drop shadow.. Mar 12 00:59:48 anyone know how to avoid this/ Mar 12 00:59:50 ? Mar 12 00:59:56 that's what elevation does Mar 12 00:59:58 it changes Z order Mar 12 01:00:37 use a container to contain everything you want elevated Mar 12 01:01:36 pfn: but then everything will get the drop shado Mar 12 01:01:38 shadow Mar 12 01:02:03 no, the container will get the drop shadow Mar 12 01:02:26 if you don’t set elevation on the things inside the container, then they should look as you want Mar 12 01:02:52 ViewGroup has setChildrenDrawingOrderEnabled Mar 12 01:07:00 i suppose i have to force the view on top not to have an outline Mar 12 01:08:00 anyone know how to increase output in logcat? Mar 12 01:08:15 logcat is already overly verbose Mar 12 01:08:19 there's nothing to increase Mar 12 01:08:36 depends on what log level you’ve got it at Mar 12 01:08:55 amdrewc you have to set logcat to 11 Mar 12 01:08:55 but the log level is how you’d adjust how much gets shown Mar 12 01:11:32 s73v3r g00s how do i set log level? Mar 12 01:12:20 in AS, there’s a drop down in the Logcat window Mar 12 01:13:16 s73v3r its already set to verbose Mar 12 01:13:22 it's max verbose by default Mar 12 01:13:24 that’s as verbose as it gets Mar 12 01:14:26 so if it ends here: "_onAnimationStart: { [Function] __reactBoundContext: [ " there is no way to increase the lines of code? Mar 12 01:14:57 nope. probably got interrupted or stopped Mar 12 01:17:36 increase what lines Mar 12 01:18:25 line of output Mar 12 01:18:50 ok Mar 12 01:19:13 figured it out. View defaults to ViewOutlineProvider.BACKGROUND.. setting that to null removes it Mar 12 01:19:26 with the data-binding library you can do this: android:getOutline="@{null}" Mar 12 01:19:26 yeah, that does it too Mar 12 01:19:37 databinding, yuck Mar 12 01:20:13 i really like it Mar 12 01:20:16 sorry pfn Mar 12 01:20:18 something like that seems less yucky than other users Mar 12 01:20:19 uses Mar 12 01:23:08 So... Is it unethical to just take the first image from a google image search to use on related pages in an app? I don't mean to hardcode an image, I mean to literally make the image search within the app and pull the first image Mar 12 01:23:31 My gut says it's fairly unethical, but it's for a proof of concept haha Mar 12 01:25:24 yeah, kinda. you don’t have the right to use the image in your app Mar 12 01:28:09 doesn't matter much for a prototype Mar 12 01:29:01 Yeah, any prod version would directly send URLs Mar 12 01:30:13 if i wanted to host a website on an android device so that the device can access a webapp w/o being connected to a network, what are my options and what server-side development options exist for them Mar 12 01:30:44 i know of PAW which has a PHP plugin and Ulti Server has PHP as well Mar 12 01:30:45 why wouldn’t you just code the app using something like Cordova? Mar 12 01:31:02 http://www.androidpolice.com/2016/03/11/otas-from-the-android-n-beta-program-are-soft-bricking-some-devices-but-google-has-a-fix/ Mar 12 01:31:05 neat, I wasn't the only one Mar 12 01:31:06 heh Mar 12 01:32:28 s73v3r, yes that is kinda what i was looking for i believe thank you Mar 12 01:39:51 hm, even with cordova i'd still be limited to using either a local or remote web server Mar 12 01:45:03 I keep getting this error android.os.NetworkOnMainThreadException I suppose I need to put my httppost on its own thread Mar 12 01:46:09 with line 29 http://pastebin.com/StK9z3z5 Mar 12 01:46:18 yus Mar 12 01:47:50 hmm, new split screen feature is pretty cool Mar 12 01:47:50 cbot`, isn't there a way to do something you would do with ui elements in java e.g. EventQueue.invokeLater(new Runnable() { public void run() {}}); ? Mar 12 01:48:05 but for network threads Mar 12 01:48:14 and i meant SwingUtilities* not EventQueue Mar 12 01:49:22 Drew|, u mean like a handler Mar 12 01:49:52 something like this right.. Thread thread = new Thread(new Runnable(){ Mar 12 01:50:31 hrm, everything in there is an unknown class Mar 12 01:51:28 oh wait nm Mar 12 01:54:59 idk how messagequeues work in android for sure but yeah i think so cbot` Mar 12 01:55:39 idc Mar 12 01:55:43 figure it out guideX Mar 12 01:55:45 ? Mar 12 01:58:58 I'm trying my solution now :D Mar 12 01:59:03 i'll post it in a second Mar 12 02:01:35 Question on tinting: do I need to use an Activity context for it? Mar 12 02:01:40 Excuse me Mar 12 02:02:00 Do I need to use an activity context to create a LayoutInflater in order for view tinting to work properly? Mar 12 02:03:01 when inflating views, you should always always use the activity context Mar 12 02:06:38 The dependence on Activity Contexts is really throwing a wrench into my current DI setup, I'm going to have to rethink my setup Mar 12 02:10:17 it takes forever for the android emulator to come up Mar 12 02:10:28 I suppose a real device will help Mar 12 02:11:01 takes around 10 minutes Mar 12 02:12:38 Have you tried Genymotion? Mar 12 02:13:46 http://pastebin.com/ZaTAYUZd this a safe way to change my data (the forecast object) ? Mar 12 02:38:17 i'm using this "empty view" technique on RecyclerView (like we used to have with ListView) https://github.com/googlesamples/android-XYZTouristAttractions/blob/master/Application/src/main/java/com/example/android/xyztouristattractions/ui/AttractionsRecyclerView.java#L74 Mar 12 02:38:47 but sadly, there is always some flicker. you can briefly see the empty view Mar 12 02:39:07 i even set it to "gone" in the XML Mar 12 02:39:23 wonder if anyone has a better idea Mar 12 02:39:23 what Mar 12 02:39:30 what Mar 12 02:39:33 what Mar 12 02:39:36 :S Mar 12 02:39:37 lol Mar 12 02:39:42 lol Mar 12 02:39:52 just realized lol looks like a tie fighter Mar 12 02:40:04 lol Mar 12 02:40:09 pew pew Mar 12 02:40:10 ok why would you do it like that? Mar 12 02:40:26 Napalm ugh why not, thats what google gave us :) Mar 12 02:40:29 seemed logical Mar 12 02:41:05 its pretty much what ListView does, just flips visibility of sibling views Mar 12 02:41:11 oh wait.. ignore me Mar 12 02:41:12 (a) the RV and (b) the empty view Mar 12 02:41:18 i thought it was just on setAdapter Mar 12 02:41:28 now i see it has a observer Mar 12 02:41:35 ok but you get flicker? Mar 12 02:41:39 rly? Mar 12 02:41:39 yeah Mar 12 02:42:31 g00s: paste your layout Mar 12 02:42:35 so when i show that fragment, and its not empty, there is a flash of the emptyview Mar 12 02:43:34 g00s: is empty view in your layout file set to android:visibility="gone" Mar 12 02:43:45 one sec, i'm going to try checking to see if the view is gone before setting it again Mar 12 02:43:50 Napalm already is Mar 12 02:44:19 well firstly Mar 12 02:44:29 do you null out the adapter at any point? Mar 12 02:44:37 does it ever have a null adapter Mar 12 02:44:52 because this example you linked fails to take null adapter into consideration Mar 12 02:44:54 no Mar 12 02:45:10 its just when the fragment first appears Mar 12 02:45:24 right, which means you set an adapter with zero items breifly Mar 12 02:45:52 that is if the empty view starts as gone in the layout file Mar 12 02:46:12 yeah the emoty view is default to gone, something must be flipping it to visisble Mar 12 02:46:16 *empty Mar 12 02:46:22 for just a few ms Mar 12 02:46:35 going to try something Mar 12 02:47:10 if you have an adapter set and it has > 0 items then this code is never going to make it visible, why not breakpoint it Mar 12 02:52:31 reading through View#setFlags() Mar 12 02:53:19 huh, if changed == 0 it should just bail Mar 12 02:57:30 g00s: Want to see my view for it? It's fairly similar, but I haven't noticed any flicker Mar 12 02:57:41 konk3r sure **** ENDING LOGGING AT Sat Mar 12 02:59:58 2016