**** BEGIN LOGGING AT Tue Jun 02 02:59:58 2015 Jun 02 03:00:53 after updating restart AS Jun 02 03:10:29 Napalm, may as I what gave away that I needed to update to those version or something from the last staktrace? Jun 02 03:10:51 so I can learn what to look for etc. :) Jun 02 03:16:02 hi all..i'm trying to convert a delphi vcl app to android and am having trouble deciding how to port a TStringgrid control... Jun 02 03:16:53 sydbarrett74: got a screenshot of the control in-action? Jun 02 03:17:29 yes Jun 02 03:17:49 in the final app, or the design mode within the delphi ide? Jun 02 03:18:05 both preferrably Jun 02 03:18:42 http://www.asiplease.net/computing/delphi/images/string_grid_demo_popstars.gif Jun 02 03:18:47 sydbarrett74: one of those? Jun 02 03:19:56 yes Jun 02 03:20:09 except non editable Jun 02 03:22:38 sydbarrett74 here are the material design guidelines for that sort of thing http://www.google.com/design/spec/components/data-tables.html#data-tables-tables-within-cards Jun 02 03:23:03 errhttp://www.google.com/design/spec/components/data-tables.html# Jun 02 03:23:07 damn it Jun 02 03:23:13 http://www.google.com/design/spec/components/data-tables.html# Jun 02 03:23:37 THANK YOU Jun 02 03:23:43 i was going batty deciding how exactly to do it Jun 02 03:23:47 they leave the implementation as an exercise for reader though :( Jun 02 03:23:59 that seems to be par for the course with android :/ Jun 02 03:26:13 great.. I've broken it completely now :P Jun 02 03:27:20 Help - http://pastebin.com/xxaunuiq Jun 02 03:27:37 so I did everything https://github.com/chrisjenx/Calligraphy said Jun 02 03:27:49 and my gradle is synced and no errors there, but then i get that one Jun 02 03:32:12 I found out what I did wrong! :) Jun 02 03:36:42 is there a way to use the gesture listener to scale and rotate a bitmap? or do I have to use the MotionEvent.ACTION_POINTER_UP, DOWN etc? Jun 02 03:45:06 Napalm, I tried doing this: http://pastebin.com/QaArDffw and then, see stacktrack below, happened.. Jun 02 03:45:52 look at the error message Jun 02 03:46:08 Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference at appdev.vercinger.n343.NavigateByFloor.onCreate(NavigateByFloor.java:36) Jun 02 03:46:12 but shouldn't it just set text to "it's empty"? Jun 02 03:46:36 Vercinger: your dist_ap variable is null Jun 02 03:46:39 you never set it to anything Jun 02 03:46:50 after setContentView(); add thisd Jun 02 03:47:08 dist_ap = (TextView)findViewById(R.id.your_id_from_your_layout); Jun 02 03:47:09 :P Jun 02 03:47:18 no go read the docs or open your eyes Jun 02 03:47:21 christ! Jun 02 03:47:31 I couldn't see the trees from pure forest.. Jun 02 03:47:33 or prey. your choice :P Jun 02 03:48:04 Think I'll go eat some food.. I need to get my mind off it :P Jun 02 03:48:21 that's was too low level a mistake :P Jun 02 04:04:22 hi, please help me Jun 02 04:04:48 I'm getting this build error: No resource identifier found for attribute 'menu' in package 'com.example.joao.navigationdrawertest' Jun 02 04:05:38 and the offending line is this one, on my NavigationView xml node: Jun 02 04:05:41 app:menu="@menu/drawer"/> Jun 02 04:06:06 however I do have an xml file called drawer.xml on my /res folder Jun 02 04:06:12 so what is happening? Jun 02 04:07:31 sorry, file path is actually res/menu/drawer.xml, which looks just right to me Jun 02 04:10:44 Napalm, everything is going smooth now ;) Thanks for your help and patience :P Jun 02 04:11:26 :) Jun 02 04:11:38 Napalm, help me! my job interview is tomorrow Jun 02 04:11:49 i have to be able to show this demo Jun 02 04:16:04 change @menu to @drawable Jun 02 04:16:24 oh, wait... what is drawer.xml? Jun 02 04:17:19 yes Jun 02 04:17:47 this is copied as is from this demo project, btw Jun 02 04:18:01 https://github.com/antoniolg/MaterializeYourApp/blob/master/app/src/main/res/layout/activity_main.xml Jun 02 04:18:50 there's something about the project config or xml namespace that is preventing the compiler to find this resource Jun 02 04:19:41 theres no problem with that code Jun 02 04:19:42 you have a job interview and you are just mimicking someone elses project, or you are trying to include certain aspects into your app? Jun 02 04:19:57 btw, I checked my api target and also the support lib version of my project and they match the other project Jun 02 04:20:11 JFlash: make sure you are using the latest versions of the tools from the sdk manager (but not the preview ones) Jun 02 04:20:33 JFlash: then edit your build.gradle and make sure you are using the latest gradle plugin 1.2.3 Jun 02 04:20:35 what do you mean specifically Jun 02 04:20:48 JFlash: open the sdk manager Jun 02 04:20:50 at the top Jun 02 04:20:50 latest gradle plugin hmm Jun 02 04:20:56 should work, some IDE/setup issue. Jun 02 04:21:07 is that the other build.gradle Jun 02 04:21:57 verify you have the latest sdk-tools, platform-tools, build-tools and Jun 02 04:22:02 in the sdk manager Jun 02 04:23:15 bi just have on item not installed Jun 02 04:23:19 20 Jun 02 04:23:26 but 24.3 is installed Jun 02 04:23:39 and build tuools 22.0.1 is installed Jun 02 04:24:09 JFlash do you have your project online? maybe post a link Jun 02 04:24:17 why can't the IDE auto complete these paths for me Jun 02 04:24:37 I start typeing them and they autocomplete. this works for ids, why doesnt it work for file names? Jun 02 04:26:28 canvs2321, uploading Jun 02 04:26:54 https://www.dropbox.com/s/pkwkxlkpndyyy1u/NavigationDrawerTest.zip?dl=0 Jun 02 04:28:05 if this is just a build issue, it's very frustrating Jun 02 04:29:42 Does anyone have an easy way to display images in a TextView with ImageGetter? I'm trying the accepted answer here (http://stackoverflow.com/questions/7424512/android-html-imagegetter-as-asynctask), but the images that get displayed are TINY, like 20x20 instead of something larger... Can someone help me out? Jun 02 04:30:27 t0astt: what are you trying to do exactly? Jun 02 04:31:46 Napalm: I tried your ObservableWebView solution, but it was cutting the top part of the text off. So I'm trying to just go with a TextView to display links and images within the text (from HTML) Jun 02 04:32:03 t0astt: it didnt for me Jun 02 04:32:21 t0astt: its because your html page isnt exactly valid for mobile Jun 02 04:32:23 but that can be fixed Jun 02 04:32:52 if that was fixed.. then you wouldnt need to do the html imagegette thingy? Jun 02 04:32:55 right? Jun 02 04:33:01 Yes Jun 02 04:33:14 Or, even better Jun 02 04:33:36 I could just use a single webview and get the featured image at the top to scale and size correctly Jun 02 04:34:01 I couldn't get the image to fill the width of the device, it was leaving white bars on the borders Jun 02 04:34:23 t0astt: if you did it in html? Jun 02 04:34:27 in a webview? Jun 02 04:34:48 then you either have padding/margin on the elements in your layout outside your webview Jun 02 04:35:16 and also.. you'll need to set the body's margin to 0px in your css for your html Jun 02 04:35:29 otherwise you'll get the browser default Jun 02 04:35:35 Napalm: Yes. I can use a Stringbuilder to do something like (pseudocode): new Stringbuilder, sb.append(image url), sb.append(title, author, date), sb.append(content) Jun 02 04:35:51 which is not correct Jun 02 04:35:59 the image then is outside the html tag Jun 02 04:36:08 and will not behave correctly Jun 02 04:36:32 Napalm, i think you nailed it Jun 02 04:36:50 JFlash: got your shits working? Jun 02 04:36:52 Napalm, I had graddle 1.0.0 set on my dependencies file Jun 02 04:37:12 graddle is updating iself right now Jun 02 04:37:26 Napalm: The HTML I'm displaying comes from JSON, and does not have an tag to begin with Jun 02 04:37:43 well thats why it also doesnt work correctly Jun 02 04:37:43 Napalm: All it has is styling tags, like

,
, etc Jun 02 04:37:52 https://gist.github.com/slightfoot/c470b49905b9d61c6cdc#file-test-html Jun 02 04:37:54 look Jun 02 04:38:07 use my header mines the title tag Jun 02 04:38:14 put it in as a string Jun 02 04:38:34 and put your ajax/json fetched html in between the body tags Jun 02 04:38:44 just use a StringBuilder Jun 02 04:39:20 new StringBuilder().append("....").append(jsonHtml).append(""); Jun 02 04:39:29 now load said data into the WebView Jun 02 04:39:30 :P Jun 02 04:39:43 Ok Jun 02 04:39:51 Let me pull that from version control Jun 02 04:41:36 JFlash: you might also want to check your gradle/wrapper/gradle-wrapper.properties file.. make sure its got the latest version Jun 02 04:42:31 JFlash: gradle-2.2.1-all.zip or gradle-2.4-all.zip Jun 02 04:43:28 Napalm: Ok, original stuff before I reverted back is now loaded. I'll try what you said and let you know what happens Jun 02 04:45:32 Napalm: Stuff is still cut off, let me make sure the rest of my code matches what you have Jun 02 04:45:52 Napalm, help me I'm getting this error now Jun 02 04:45:56 Error:Execution failed for task ':app:processDebugResources'. Jun 02 04:45:57 > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/joao/Android/Sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1 Jun 02 04:47:01 JFlash: so you have a sync issue in your resources Jun 02 04:47:14 what does that mean/ Jun 02 04:50:09 Wow.. I can't use scandinavian characters in a dialog alert?! Jun 02 04:51:46 JFlash: i mean you have syntax Jun 02 04:51:54 sorry i was thing of sync and typed it Jun 02 04:51:54 lol Jun 02 04:52:06 t0astt: figured it out? Jun 02 04:53:07 I'm working on it Jun 02 04:53:14 I had reoved the javascript enable setting Jun 02 04:53:35 Ok I think it's working Jun 02 04:53:41 lemme double check the website version Jun 02 04:53:58 IT WORKS! Jun 02 04:54:15 Ok, now can you help me get my toolbar added into that layout please? :) Jun 02 04:54:37 I think when I tried to get the toolbar in it last time, that's when I started making changes that borked your code Jun 02 04:56:33 Napalm, I'm stuck Jun 02 04:57:44 JFlash: what version of AS are you using? Jun 02 04:58:14 can I use: "@string/stringVarName" inside .java? Jun 02 04:58:15 Napalm, all the threads on stack overflow tell me the solution is to lower the skd version or build tools version, that's weird! Jun 02 04:58:51 Napalm, how can I tell the version of the sdk? Jun 02 04:58:54 JFlash: yes, and thats not it Jun 02 04:59:15 Napalm: Nevermind I got it!! Thank you so much for the help Napalm! Jun 02 04:59:16 I have this in my gradle file Jun 02 04:59:18 minSdkVersion 15 Jun 02 04:59:18 targetSdkVersion 22 Jun 02 04:59:20 You da man! xD Jun 02 04:59:28 Vercinger, yes Jun 02 04:59:46 t0astt: always ;) Jun 02 05:00:13 JFlash: thats fine Jun 02 05:00:16 Napalm: How long have you been working with Android for? Jun 02 05:00:19 canvs2321 I'm having trouble finding an example of how to do this.. can u elaborate? :) Jun 02 05:00:36 t0astt: since late 2009 early 2010 Jun 02 05:00:39 Napalm, glad to know it's fine, but now I'm stuck Jun 02 05:00:43 so about 5 years Jun 02 05:01:24 Napalm: Wow, that's impressive Jun 02 05:01:25 Vercinger, simply use getString Jun 02 05:01:29 Do you have any apps on the Play store? Jun 02 05:01:34 Vercinger: you do getResources().getString(R.string.startVarName) Jun 02 05:01:40 Napalm there's some extra info Jun 02 05:01:50 Vercinger: so things like textView.setText(getResources().getString(R.string.startVarName)); Jun 02 05:02:05 canvs2321, found one.. thanks :) Jun 02 05:02:07 JFlash: ? Jun 02 05:02:10 you too Napalm :) Jun 02 05:02:45 Napalm, please see the complete log here: http://pastie.org/10218717 Jun 02 05:03:15 Napalm, still getting no resourse identifer found, but just in different part of the log Jun 02 05:03:37 JFlash: pastebin your gradle script which contains your sdk version info Jun 02 05:04:36 JFlash Jun 02 05:04:38 fuck you Jun 02 05:04:40 android.support.design.widget.NavigationView Jun 02 05:04:47 your trying to use the design library Jun 02 05:05:04 and you didnt follow the instructions on the site and INCLUDE IT IN YOUR PROJECT Jun 02 05:05:11 hahah Jun 02 05:05:43 JFlash: add compile 'com.android.support:design:22.2.0' to your dependencies Jun 02 05:05:49 JFlash: now fuck off :| Jun 02 05:05:54 gttt Jun 02 05:05:56 grr Jun 02 05:05:58 :S Jun 02 05:06:17 JFlash your going on my naughty list :P Jun 02 05:06:50 what is that "R" in android.. Jun 02 05:07:04 your resources Jun 02 05:07:09 ^ Jun 02 05:07:15 Okay :) Jun 02 05:09:59 Napalm, actually I will continue to ask questions on the channel, just add me to your ignore list if I bother you :P Jun 02 05:10:03 t0astt: no personal apps. apps for lots of other companies :( Jun 02 05:10:24 I have an app on the play store.. Jun 02 05:10:28 1000 downloads Jun 02 05:10:29 JFlash: was joking.. and if i did that you wouldnt get any answers :P Jun 02 05:10:34 Napalm: Aw man. For work? Or contract-type stuff? Jun 02 05:10:37 it's useless :P Jun 02 05:10:54 some people tried to sue me for getting cancer due to that app Jun 02 05:10:55 work is contract type stuff Jun 02 05:10:57 jk jk Jun 02 05:12:05 Napalm, oh no!! Jun 02 05:12:06 t0astt: heres a popular one you might have heard of: https://play.google.com/store/apps/details?id=bbc.mobile.news.uk Jun 02 05:12:15 Napalm, you were right! Jun 02 05:12:16 Shit! No way Jun 02 05:12:41 Napalm: How'd you get the opportunity to do the BBC app?????? Jun 02 05:12:51 only 5-10 mill downloads.. pfff Jun 02 05:12:58 How many people have your app given cancer, eh? Jun 02 05:13:03 too many ;) Jun 02 05:13:06 :O Jun 02 05:13:38 its a shame they have not released the global edition yet. https://play.google.com/store/apps/details?id=bbc.mobile.news.ww Jun 02 05:13:44 still stuck on the old version I made Jun 02 05:13:48 lol Jun 02 05:13:58 You've made it single handedly? Jun 02 05:13:59 * JFlash wants to do the BBC app Jun 02 05:14:00 new version is wayy better Jun 02 05:14:24 me and a junior dev who was a university grad Jun 02 05:14:46 he had no previous android experience Jun 02 05:14:51 was good fun Jun 02 05:15:04 Just like working with us, then Jun 02 05:15:05 :P Jun 02 05:15:13 and educational.. got to do things that only a user base of millions has problems with Jun 02 05:15:37 I'd love to get in a work environment where there is a senior/junior partnership.. Jun 02 05:15:44 like a mentor/mentee ship Jun 02 05:15:54 i designed the back-end api and a prototype for it.. they had some team make the back-end for production though Jun 02 05:16:52 Vercinger: I prefer mentor/protégé Jun 02 05:16:54 :D Jun 02 05:17:34 Napalm, whats the difference? Jun 02 05:17:44 i was just hjoking Jun 02 05:17:48 oh okay :) Jun 02 05:17:50 https://play.google.com/store/apps/details?id=com.tdameritrade.mobile3 Jun 02 05:17:52 another one Jun 02 05:19:11 https://www.youtube.com/watch?v=O66GelWvFJA Jun 02 05:19:13 and another Jun 02 05:19:25 ah, fond memories of donut Jun 02 05:20:16 https://www.youtube.com/watch?v=gDbQqjdL8hc Jun 02 05:20:17 Napalm, I will try to postpone my senior dev job interview a couple of days because I don't feel 'senior' just yet :( Jun 02 05:20:18 aha Jun 02 05:20:28 its funny seeing some ceo describing the app i made Jun 02 05:20:33 Napalm, thank you so much for your help, now I can sleep in peace Jun 02 05:20:35 or whoever that dude is Jun 02 05:20:48 Hi all, quick design question. What's the preferred method for when to call interstitial ads? Basically: I want an ad to pop every 10th time a list item from my main menu is clicked. Should I be using sharedpreferences the keep track of the clicks or is there a better/more efficent way? Jun 02 05:20:52 Haven't he read your report on it, Napalm? ;) Jun 02 05:21:34 liuwenhao: sharedpreference is just fine for that. Jun 02 05:22:20 Should i just increment the preference until it hits 10, show the ad and then reset the counter? Jun 02 05:23:28 liuwenhao: you probably want to keep incrementing it and every modulo of 10 show the add.. this way you also have the total recorded for later stats retrieval Jun 02 05:23:48 liuwenhao: if((adCounter % 10) == 0){ showAd(); } Jun 02 05:24:12 liuwenhao: might want to do if((++adCounter % 10) == 0){ showAd(); } Jun 02 05:24:17 so the ad doesnt show the first time Jun 02 05:26:55 nah let it show, so they know rignt away what's in store for them :p Jun 02 05:30:01 if downloading from play store, it should be obvious, so.... Jun 02 05:31:38 you can tell it has ads, but you can't always tell in what way are they presented to you Jun 02 05:32:21 that's the best part about being the developer Jun 02 05:32:33 control :) Jun 02 05:33:10 control freak :p Jun 02 05:33:24 the weak just have to accept it Jun 02 05:42:37 I saw a way to show apps, was in a free version of a game.. You'd get in-game currency if you accepted to see an app.. Brilliant imo.. Jun 02 05:42:42 ads* Jun 02 05:42:44 damnit Jun 02 05:44:35 all my ads are app free ;) Jun 02 05:45:38 I hate ads myself.. If I could I would too.. I'd always try and make non-intrusive ads, if possible.. However I will accept ads (to a certain amount) on a free service/app :P Jun 02 05:45:48 gotta make them meta-moneez! Jun 02 05:47:10 I looked into it briefly but it didn't seem like you could make much money at all anyway Jun 02 05:47:28 unless you had like millions of users Jun 02 05:48:03 The guy from that scrabble app said he made more money on free-version w/ads than on the bought versions Jun 02 05:48:07 WordFeud Jun 02 05:48:11 but then again, millions of users Jun 02 05:48:23 The money is at the in-game purchases? Jun 02 05:48:29 in-app* Jun 02 05:48:31 did that include an option to pay money to remove ads? Jun 02 05:49:01 Levite, there was a free version with ads and a version that cost money, without ads Jun 02 05:49:30 https://play.google.com/store/apps/details?id=com.hbwares.wordfeud.free&hl=en Jun 02 05:49:32 10-50 mill Jun 02 05:49:45 everyone cheats in it.. annoying :P Jun 02 05:50:38 shmooz++ Jun 02 05:51:49 Vercinger, I hate ads myself too, no point in letting someone else hate them for me :p Jun 02 05:51:51 I think IAP to enable additional content is the best middle ground Jun 02 05:52:32 are donations considered in app purchase ? Jun 02 05:52:47 btw. quick general programming question.. in switch-cases, when I do "break;" I go out of the entire method, not just the switch-case, or what? Jun 02 05:53:01 ... Jun 02 05:53:09 just the switch Jun 02 05:53:11 just the switch Jun 02 05:53:14 makes sense Jun 02 05:53:31 how would you get out of the whole method? Jun 02 05:53:33 Pacma: C< . . . Jun 02 05:53:34 return Jun 02 05:53:42 Thanks for the game, wakelock :) Jun 02 05:53:44 what if the method returns non-void? Jun 02 05:53:45 but that would be bad programming style Jun 02 05:54:06 shmooz: depends how you implement it. If you use billing lib then of course it is an IAP Jun 02 05:54:29 Levite, return from a switch-case makes perfet sense sometimes Jun 02 05:55:01 more efficient than storing an intermediate result just to have a single return point Jun 02 05:55:15 it won't be maintainable though unless the function consists of just the switch statement Jun 02 05:55:28 because later some developer, maybe yourself, will come alone and overlook it Jun 02 05:55:40 damnit wakelock and Levite.. I just changed to storing in a result that would return it in the end Jun 02 05:55:53 wtf. Cyp__.. Arrownet.dk connection? Jun 02 05:56:01 attaboy Jun 02 05:56:05 then I'm not s very good dev if I can overlook that so easily, Levite Jun 02 05:58:44 hello Jun 02 05:59:06 Where can I post my Android Studio error so you guys can help me fix it? Jun 02 05:59:12 I can't even compile my first hello world app. Jun 02 05:59:27 txtsd www.pastebin.com Jun 02 05:59:29 gist, pastebin, pastie Jun 02 05:59:40 that seems quite trivial though... Jun 02 05:59:43 a !pastebin command would be useful Jun 02 06:00:04 ...hell no Jun 02 06:00:34 why not? Jun 02 06:00:52 it's perfect to give a quick command to people asking that question or people forgetting to use it :P Jun 02 06:01:24 no bots allowed, ever Jun 02 06:01:43 What if I told you, I've been a bot all along Jun 02 06:01:54 and all my questions are part of machine learning to train my classifiers? Jun 02 06:02:23 people would be like WOAH A TURING COMPLETE AI! Without even understanding with Turing Complete means. Jun 02 06:02:30 *what Jun 02 06:02:34 what if I told you *I*'m a bot? Jun 02 06:02:44 and don't like competition? Jun 02 06:02:45 !pastebin Jun 02 06:02:51 you're a shitty bot, wakelock.. Jun 02 06:02:54 * Napalm syntax error Jun 02 06:02:55 give me pastebin! Jun 02 06:03:11 Vercinger, it's part of my behavior algos to be shitty Jun 02 06:03:14 fight me bot-irl, 1on1.. Jun 02 06:03:27 sounds like cleverbot Jun 02 06:03:28 Oh don't worry about the link. I'm on it. Just waiting for Android Studio to throw the error again. Jun 02 06:03:54 * wakelock is not worried, is anyone else worried? Jun 02 06:04:08 txtsd, you running it on a abacus? Jun 02 06:04:30 how long can a "hello world!" take to run? :P especially if it's faulty Jun 02 06:04:35 meh, AS can make an i7 beg for its life Jun 02 06:04:51 Vercinger: old craptop. core 2 duo. AS uses 100% CPU and slows it down to a crawl. Jun 02 06:04:55 http://pastie.org/10218783 Jun 02 06:05:32 wow, I thought I'd been able to answer this question.. I can't :D Jun 02 06:05:37 also for some reason, kworker/0:1 uses like 25% cpu throughout the day lol. Jun 02 06:05:52 is that error from the gradle console? Jun 02 06:05:57 yes Jun 02 06:06:03 this hardly looks like a hello world... Jun 02 06:06:09 exactly :P Jun 02 06:06:21 Are you running by tutorial or? Jun 02 06:06:24 I think we've been lied to Jun 02 06:06:40 *overload* ERROR: Can't handle lies *OVERLOAD* Jun 02 06:07:18 http://hanhuy-acra.appspot.com/public/com.hanhuy.android.keepshare/b66e0526032b1566465714bcb78fd30118ee731e Jun 02 06:07:25 weird crash Jun 02 06:07:49 wakelock: http://i.imgur.com/YS4UUFm.png Jun 02 06:08:31 txtsd your mainactivity.java? Jun 02 06:09:46 sec Jun 02 06:09:54 Cyp__ is having some problems maintaining his connection, I think.. Jun 02 06:10:18 I used to work for his provide, afaics from his IP.. Jun 02 06:10:53 http://i.imgur.com/96Tk2dq.png Jun 02 06:11:03 Vercinger ^ Jun 02 06:11:19 I'm the mega noob here txtsd :P Jun 02 06:11:25 oh Jun 02 06:11:28 better if u use pastebin to post code etc. :) Jun 02 06:11:41 yea but this is just the default file that AS creates Jun 02 06:11:48 I haven't touched this one Jun 02 06:12:25 I haven't learned about Activities yet. I just learned about views and I was trying to make a Hello, World! TextView. Jun 02 06:12:38 txtsd: looks like you need to update gradle: http://stackoverflow.com/a/16726012/1048340 Jun 02 06:12:41 I used this: https://developer.android.com/training/index.html :) Jun 02 06:12:56 surf2b1: checking it out Jun 02 06:13:07 Vercinger: I'm doing the android dev intro course on udacity Jun 02 06:13:44 txtsd, ah :) Jun 02 06:13:53 surf2b1: how can I find my gradle version and whatnot? Jun 02 06:14:02 I don't know how to use any of these java/android tools yet. Jun 02 06:14:10 I've only done python in the recent past. Jun 02 06:14:49 also, that stackoverflow question is 2 years old Jun 02 06:15:32 txtsd: have you updated your sdk? Jun 02 06:16:19 that build log says yes Jun 02 06:16:48 yes, I installed the latest things from Android SDK yesterday Jun 02 06:17:27 what does your build.gradle look like? Jun 02 06:17:48 txtsd: File->Project Structure->Project pane->Gradle version Jun 02 06:18:13 gradle 2.2.1 Jun 02 06:18:31 razzledazzle: there are 2 of them. which one? Jun 02 06:18:48 one not with "app" :P Jun 02 06:18:56 txtsd: All I did was google ':compileDebugAidl' and that was the first result. :P Jun 02 06:19:14 and your android plugin version? Jun 02 06:19:24 2.2.1 is fine, same here I tell you Jun 02 06:19:52 android plugin version is 1.2.3 Jun 02 06:19:59 http://pastie.org/10218803 Jun 02 06:20:00 hmm.. Jun 02 06:20:21 txtsd: more recent and looks like your problem: http://stackoverflow.com/questions/30518750/android-studio-execution-failed-for-task-appcompiledebugaidl-failed Jun 02 06:21:13 there really is no need for appcompat/supportlib for a simple hello world... Jun 02 06:21:16 nothing out of the ordinary, try surf2b1's link txtsd Jun 02 06:21:27 whoever made this helloworld sample is weird Jun 02 06:22:23 he probably just created a new project Jun 02 06:22:35 I thought just creating a project in AS adds appcompat. A simple hello world on android adds around 25k methods. ha Jun 02 06:22:37 it gets included by default Jun 02 06:22:38 wakelock: this is default in AS Jun 02 06:22:55 holy shit guys Jun 02 06:22:59 it's going forward! Jun 02 06:23:10 success? Jun 02 06:23:15 hit the brakes! Jun 02 06:23:25 changing the build tools version did the trick Jun 02 06:23:33 it was using a release candidate for some reason Jun 02 06:24:24 txtsd: make sure to give this dude a +1 http://stackoverflow.com/a/30569432/1048340 Jun 02 06:25:40 I will, once AS stops using 100% CPU Jun 02 06:27:28 I did Jun 02 06:27:31 voteUp requires 15 reputation -_- Jun 02 06:27:37 thanks Obama Jun 02 06:28:11 I still remember the eclipse release they rekt Jun 02 06:28:26 Is there an alternative to AS that I can use so I don't have to deal with this ridiculous java RAM usage and CPU hog? Jun 02 06:29:30 laters peeps Jun 02 06:29:34 thanks for all the help today Jun 02 06:29:37 will be back ;) Jun 02 06:29:41 *shivers* Jun 02 06:30:20 seems like every I/O they release crap and fix it a month later Jun 02 06:30:58 <_rm> txtsd: you could just use a text editor Jun 02 06:31:13 <_rm> e.g. one that you can configure to handle your builds and such Jun 02 06:34:30 I like this article about the new Design Support LIbrary Jun 02 06:34:30 https://medium.com/android-bites/first-steps-with-the-design-support-library-8dcf06230ddd Jun 02 06:34:39 TLDR: It's both cool and completely broken Jun 02 06:35:03 _rm: I'm extremely new to android dev, so that's not something I can do without a guide. I've been using Sublime Text 3 for years now, but there aren't any dropin plugins that can handle android dev, like there are plugins that can handle python dev. Jun 02 06:35:24 <_rm> yep, it's a bit more complicated when it comes to android Jun 02 06:35:39 <_rm> but it's doable. there was a plugin for textmate some years ago Jun 02 06:35:46 link me to a guide if you know one. Or write one for me :D Jun 02 06:35:57 <_rm> can't help you there, i use android studio :) Jun 02 06:36:22 <_rm> it's a resource hog, yeah, but i have a decent enough computer :D Jun 02 06:37:01 ah Jun 02 06:37:03 <_rm> although it's sometimes funny/infuriating how much it slows down on an i7 with tons of ram Jun 02 06:37:11 what gen? Jun 02 06:38:10 <_rm> the i7? not sure, i'm not at work right now, but it's definitely a few years old at this point Jun 02 06:38:41 I wonder how it runs on 4th gen i7 computers Jun 02 06:41:15 <_rm> i doubt an any-gen i7 is that much of a bottleneck Jun 02 06:43:23 runs fine on my 4790k :) Jun 02 06:44:43 its janky on mobile version of i7, seen it get stuck for half a minute during build Jun 02 06:48:10 if I call PowerManager.newWakeLock with the same name twice, will I get the same WakeLock object? Jun 02 06:48:51 txtsd: if you find out how to fix AS hangs, message me Jun 02 06:49:42 I found some tutorial to increase AS heap size, but that doesn't help Jun 02 06:49:54 thepoosh: do you mean tag, on the docs its specified that it's just for debugging purposes Jun 02 06:50:14 squ: you can try disabling some plugins you don't use too Jun 02 06:50:25 can you be more specific Jun 02 06:50:36 have you encountered our problem, and fixed it yourself Jun 02 06:50:48 Settings > Plugins Jun 02 06:50:52 yes, I meant tag, if I use PowerManager.WakeLock lock = mgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, lockName); twice, will I get the same object? Jun 02 06:51:07 I want to release the wakelock without keeping a reference to it Jun 02 06:51:09 thepoosh no Jun 02 06:51:18 crap Jun 02 06:51:35 * wakelock is released Jun 02 06:51:35 there Jun 02 06:51:36 squ: see if there are plugins that you don't need Jun 02 06:51:40 no, https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/os/PowerManager.java Jun 02 06:52:08 razzledazzle: Plugin name: TestNG. Description: TestNG Integration Jun 02 06:52:11 why s5 action bar menu showing reversible Jun 02 06:52:13 W T F Jun 02 06:52:18 ? Jun 02 06:52:43 crap, thanks Jun 02 06:52:44 I have it disabled on mine, I don't use that Jun 02 06:52:49 wakelock: thanks Jun 02 06:53:27 so many, Terminal, Task Management, Subversion Integration, IntelliLang, hg4idea, Google stuff, JavaFX, and so on Jun 02 06:53:50 hahaha Jun 02 06:53:55 does anyboady have face this issue Jun 02 06:54:04 razzledazzle: thanks Jun 02 06:54:16 hope it helps Jun 02 06:55:07 razzledazzle: what is task management Jun 02 06:55:11 maybe I need it Jun 02 06:55:12 :) Jun 02 06:55:39 again, I don't use it, haven't cared for it :P Jun 02 06:56:35 try unchecking them and restart your IDE Jun 02 07:15:03 morning happy Android people! Jun 02 07:17:55 hey Mavrik Jun 02 07:21:24 Why isn't STATE_SKIPPING_TO_NEXT called? when play music go to next track, it calls STATE_PLAYING and then onMetadataChanged Jun 02 07:22:37 So, do we have any alternative to built-in javadoc? Something less of an eyesore / comparable to official Android reference? Jun 02 07:23:01 yoavst: is that MediaPlayer ? Jun 02 07:23:33 MediaSessionManager callback Jun 02 07:23:51 actually MediaController callback Jun 02 07:24:19 Maybe it is just Play music and not other playersd Jun 02 07:25:34 No, also CyanogenMod stock player do the same. Jun 02 07:25:38 cbeust there ? Jun 02 07:27:00 yoavst, on which OS are you testing that? Jun 02 07:27:12 Mavrik: Android 5.0.1 Jun 02 07:27:24 5.0.2* Jun 02 07:27:25 hmm Jun 02 07:27:30 Wierd. Jun 02 07:29:01 got a question, I have a Fragment that delegated network transactions to a Presenter, the Presenter has a callback that notifies the Fragment to update, the problem occurs when the Fragment isn't attached to the Activity, I've already used EventBus in my project, would that be a better solution? Jun 02 07:29:28 yes Jun 02 07:29:44 send an event and detach fragment from the bus in onPause Jun 02 07:29:50 it fixes bunch of those issues Jun 02 07:30:06 and when the Fragment is resumed, will it get the pending message? Jun 02 07:30:20 only if the message is sticky Jun 02 07:30:24 and you use registerSticky Jun 02 07:30:26 hmm.. I see Jun 02 07:30:36 just remember, that you need to clear sticky messages manually Jun 02 07:31:44 alright, but I feel its like avoiding the problem for some reason? Already got the reference to the Presenter, why not direct calls? :P Jun 02 07:32:11 helli Jun 02 07:32:15 hello Jun 02 07:32:23 can i ask ndk questions here Jun 02 07:32:25 stick messages sound very good Jun 02 07:32:27 razzledazzle, well, it doesn't work does it? :P Jun 02 07:32:38 dunno what your Presenter is supposed to do tho :) Jun 02 07:32:51 but I prefer having view logic and other logic decoupled Jun 02 07:32:57 linuxuz3r, you sure can :) Jun 02 07:33:05 linuxuz3r, if they get answered is a whole nother thing :) Jun 02 07:33:38 _rm: I found some crazy windows/BIOS guide to speed up AS. I run linux though so it makes no sense to me. http://www.codeproject.com/Articles/803935/How-To-Make-Android-Studio-Really-Fast-On-A-Window Jun 02 07:33:56 wait no it was squ who wanted it Jun 02 07:34:07 ? Jun 02 07:34:15 Sticky messages should work, will try them out. :) The Presenter doesn't do much, as the Fragment is very view heavy, and not much calls to network and pagination Jun 02 07:34:45 squ | txtsd: if you find out how to fix AS hangs, message me Jun 02 07:34:57 ok Jun 02 07:35:11 but I think it needs SSD Jun 02 07:35:39 that article suggests how to run emulator in a fast way Jun 02 07:35:39 Mavrik: I've also checked on stock LG Rom for LG G3, same behaveior Jun 02 07:35:40 I'm running AS on a i5 laptop, ain't that bad Jun 02 07:35:58 SSD would help in all cases :P Jun 02 07:36:09 razzledazzle: after xcode you will notice difference Jun 02 07:36:09 4 gigs of memory Jun 02 07:36:15 razzledazzle: 16 gb Jun 02 07:36:43 I've increased AS heap size to 2gb Jun 02 07:37:12 I'm on Linux, btw, not Ubuntu, threw away that crap Jun 02 07:37:42 razzledazzle: Ubuntu IS linux Jun 02 07:37:44 wait, you have i5 laptop, but not macbook? Jun 02 07:37:53 yes Jun 02 07:37:59 this isn't very smart ok? Jun 02 07:38:31 SpaghettiCat: oh yes, I meant Linux but not Ubuntu one, CrunchBang Linux to be precise, Debian based :D Jun 02 07:38:57 Ahh I see. Ubuntu is also debian-derived Jun 02 07:39:09 Development of CrunchBang has ended. Jun 02 07:39:15 oh?! Jun 02 07:39:18 omg again haha, yes, okay just not Ubuntu Jun 02 07:39:26 yoavst: true Jun 02 07:39:50 Well, I'm all for less distro fragmentation Jun 02 07:40:00 community is working on a new one in its spirit :P Jun 02 07:46:48 guys does a glsl wallpaper drain your battery faster Jun 02 07:47:00 Hello. I am getting this error while trying to create a key store from android studio: 'Key was created with errors: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar' Jun 02 07:58:51 Good morning, I'm confused by a line of code in the official Android tutorials: `Button myButton = (Button) findViewById(R.id.my_button);` the comment for this says "creates an instance of the view object and captures it from the layout".How does this *create* a `View` instance? `findViewById` just returns a reference. Jun 02 08:01:05 SpaghettiCat, it returns an id for the widget Jun 02 08:01:36 SpaghettiCat, but you have to create a main.xml file in /layout folder Jun 02 08:01:44 in /res Jun 02 08:02:01 cristian_c: But no instance is created right? Jun 02 08:02:39 either if you are using an ide as android studio or eclipse, it will create them Jun 02 08:03:13 SpaghettiCat, findViewById searches in the .xml file Jun 02 08:03:17 *that Jun 02 08:03:36 and it creates an instance Jun 02 08:05:15 Strange: there's nothing in the documentation of `findViewById` about it creating a view. It just returns "The view if found or null otherwise." Jun 02 08:06:09 SpaghettiCat, yeah, you can use that button in the code Jun 02 08:06:22 SpaghettiCat: it does not. you specify a rootview to search in, then find an id (this is an int) Jun 02 08:06:29 after created an instance by findviewbyid Jun 02 08:06:35 hi,can a status bar get my activity's background image as its bg img ? Jun 02 08:09:18 Yes `findViewById` doesn'tn instantiate or create anything: http://stackoverflow.com/questions/14801008/how-does-findviewbyid-initialise-a-view Thanks for the help Jun 02 08:18:39 God I hate Gradle. 2.3 broke shitloads of scripts again, and after fighting it for an hour or two, still nothing works. Jun 02 08:22:28 Chainfire: can you not stick with the older version? Jun 02 08:22:57 until the end of time? :) Jun 02 08:23:11 the issue has to be found and fixed sooner or later Jun 02 08:23:16 Until you start a new project Jun 02 08:23:24 making it a problem for Future-Chainfire(tm) is not a solution :) Jun 02 08:24:43 supposedly this version of Gradle is also a lot faster, something this project could use. Just weird that simple stuff like dependsOn suddenly stopped working, in all various forms and tricks I know of and can find on SO Jun 02 08:24:45 I mean when you start a new project you'll write new Girdle scripts for the project and this time you'll write them for latest Girdle Jun 02 08:26:40 thats still just postponing the work, isn't it Jun 02 08:28:25 Ahh I see you mean those aren't custom scripts. That those girdle scripts will be used for every project you make. Then that makes sense Jun 02 08:28:51 well they are custom, but they're used by many proejcts Jun 02 08:28:59 such as proper ndk builds and such Jun 02 08:29:20 (luckily this will finally be supported in the next AS version) Jun 02 08:29:41 Hello. I'm having some trouble importing an AAR file into a project built with gradle. The AAR file contains a classes.jar, some resources, and some .so files (it's a JNI project). My gradle configuration does not use the 'android' plugin because I'm not building an Android app: I'm merely building a library (in fact, a Crosswalk Android extension). I Jun 02 08:29:41 followed the instructions here: http://b2cloud.com.au/tutorial/using-local-android-library-packages-aar/ and all I get, is basically that the AAR file is appended to the classpath when gradle issues javac. But then the classes in there cannot be imported. Any tips please? Jun 02 08:30:29 Anyone got a Link to the adapter you need for a settings activity and a non decrapated example Jun 02 08:30:31 I've got a listener for music events. On each new song played, it returns the song name and album. How should I save the logs in the an efficient way (storage, performance)? store the names in different file and save the id of the name? save the original name in the logs? Jun 02 08:30:35 Am looking for a way to display two diffrent activitys on first startup of the app (onboarding). I am not sure if its called onboarding because I can't see to find any guide/tutorials how to set this up. Jun 02 08:32:14 Datasmurfen, why? Jun 02 08:32:37 why why , ulli909 ? :) Jun 02 08:32:50 Datasmurfen, why do you need 2 activities to start Jun 02 08:33:17 yoavst, what information of it do you need later Jun 02 08:33:36 No two, but have two diffrent activitys to be shown in the onboarding sequense. Not on the same time* Jun 02 08:33:51 ulli909: It is for music stats Jun 02 08:33:59 ? Jun 02 08:34:08 so I need to know how many times a song was played Jun 02 08:34:13 and also by album Jun 02 08:34:20 so song & album Jun 02 08:34:42 how to create actionbar like in these screens: http://picpaste.com/Screenshot_2015-06-02-11-31-37-yXYQuFTL.png, http://picpaste.com/Screenshot_2015-06-02-11-31-43-rrL7rofK.png Jun 02 08:34:45 ? Jun 02 08:35:36 ondroed, probably to complicated for what you want to do Jun 02 08:35:56 it is file explorer, that add current directory to actionbar. And when you click on it, you get to that dir Jun 02 08:36:09 ulkesh: why? Jun 02 08:36:10 ondroed, no idea Jun 02 08:37:00 yoavst, I'd save it in a file sth like: "songdir##songname##album##count Jun 02 08:37:46 ulli909: I would also like to show history Jun 02 08:37:57 ? Jun 02 08:38:21 save them in order or sth Jun 02 08:38:22 X was played at 22:30; Y was played at 22:34; X was played at 22:37 Jun 02 08:38:32 http://pastebin.com/GATRLKez Jun 02 08:38:35 then add the time Jun 02 08:38:38 or add an id Jun 02 08:38:39 here is the input that I get if it would help Jun 02 08:38:43 and a second file Jun 02 08:39:18 (it is the methods called on callback, where their params were written to file) Jun 02 08:40:12 how much of the history do you want to save? Jun 02 08:40:18 (how many songs) Jun 02 08:40:40 All the history, that is the idea of the app Jun 02 08:40:49 ok Jun 02 08:41:24 so I could save it in 2 files Jun 02 08:41:31 well for the history I'd make a file and just add new line at the bottom with the information you need Jun 02 08:41:41 yeah would make sense Jun 02 08:41:46 but here is the problem Jun 02 08:41:54 should I save in history the song name and album? Jun 02 08:41:58 or save it by ID Jun 02 08:42:38 If I save it by ID, I need to create a map, which is a problem) Jun 02 08:53:02 when updating AS to the new version it told me my startup params were not taken over, how can i specify AS to use more memory? Jun 02 09:01:43 hey guys Jun 02 09:04:18 hey all, recommendations for downloading large files? retrofit doesn’t support writing to disk Jun 02 09:05:10 anyone know how to include so librarys in the debug and release apks Jun 02 09:07:55 @JakeWharton you about? does this still hold? https://github.com/square/retrofit/issues/442 Jun 02 09:09:06 looks like someone was satisfied at the end of it Jun 02 09:11:44 satisfied with downloading to byte[]. just wondered if retrofit supported streaming to file yet Jun 02 09:12:35 you got any idea about how items in a gridview still persist to keep their square shape even though a background with corners is set on them? Jun 02 09:12:50 gridview or listview Jun 02 09:13:04 gridview itself must be taking care of it Jun 02 09:13:13 you still see a tiny spot at the bottom of every corner Jun 02 09:13:17 ah, not the item Jun 02 09:13:19 let me see Jun 02 09:13:32 yea, items will just be framelayours Jun 02 09:13:36 or similar Jun 02 09:14:02 android has no “squarelayout” which is one of the most annoying things missing from the layout apirs Jun 02 09:14:12 well they are square if you want them to be.. Jun 02 09:14:16 W == H Jun 02 09:14:20 you have a square Jun 02 09:14:37 yes but you cant specify in layout “make this view square” Jun 02 09:14:51 you actually have to write quite a lot of code to achieve it and it’s not reliable Jun 02 09:14:54 I have managed to cobble together a ‘fixed aspect ratio’ view we use Jun 02 09:15:03 I dont know what you mean Jun 02 09:15:03 there was layout aspect ratio extension by jake btw Jun 02 09:15:09 you set height same as width, you have a square Jun 02 09:15:14 Odaym: you cant do that from xml Jun 02 09:15:16 why would there need to be a different way of achieving this Jun 02 09:15:31 when do you set the height the same as width? Jun 02 09:15:34 meaning wrap content and wrap content but still come out as square? Jun 02 09:15:42 be naturally a square, you mean Jun 02 09:15:45 nice, yea you cant do that Jun 02 09:15:51 do you set the width the same as height or the height the same as width? what if the conrent changes? Jun 02 09:15:56 yes i mean that Jun 02 09:16:09 unless you are loading the image with Picasso and applying a square transformation on it Jun 02 09:16:15 you basically have to go and mess around with the onmeasure stuff Jun 02 09:16:15 that's what I do Jun 02 09:16:25 nope, just a transformation that you feed to Picasso Jun 02 09:16:30 you can make it any shape Jun 02 09:16:39 i wasn’t replying to that comment sorry Jun 02 09:16:48 you can have a square in xml Jun 02 09:16:57 i mean more generayy to achieve it you have to go in and override on measure Jun 02 09:17:01 squ how? Jun 02 09:17:15 Ive tried setting clipChildren to true on teh gridview Jun 02 09:17:24 cause Im trying properties cause I cant come up with the google query :P Jun 02 09:17:46 I think I need clipToPadding plus clipChildren Jun 02 09:18:07 newp Jun 02 09:18:36 samskiter: by using layout aspect ratio extension by Jake Jun 02 09:18:42 so anyone got any recommendations for downloading large files? Jun 02 09:18:45 squ: lol Jun 02 09:20:08 i’m actually quite please with my extension Jun 02 09:20:13 pleased* Jun 02 09:20:37 Odaym: you don't need that Jun 02 09:20:51 I've gathered Jun 02 09:21:22 I had this exact same conversation here with Jake Jun 02 09:21:31 and tried multiple things Jun 02 09:21:38 but it must be a similar property, because I cannot set rounded corners on the gridview/listview itself Jun 02 09:21:41 for fixed aspect ration? Jun 02 09:21:45 in result he made and extension Jun 02 09:21:46 you set those on the items Jun 02 09:22:15 http://a.pomf.se/ggkjzw.png Jun 02 09:22:17 there must be something that says, please wrap your children around the drawable only, dont make the whole item's selector draw on the whole thing Jun 02 09:22:37 its a selector issue Jun 02 09:23:30 about the selector, I've noticed that selectors (ripple) doesn't respect listviews rounded corners Jun 02 09:24:26 that's exactly the topic at hand Jun 02 09:24:33 be it listviews or anything else Jun 02 09:24:55 you set a drawable on the inside item, but you need to say some property that will make the listview not draw its selectors as if there is no drawable Jun 02 09:24:58 if you find a way to fix this, message me Jun 02 09:25:14 yea right Jun 02 09:25:22 I'll send it to you by email too Jun 02 09:25:28 with a video of how to do it Jun 02 09:25:30 just use /ms send Jun 02 09:25:33 you just sit there and wait Jun 02 09:25:35 and things will come to you Jun 02 09:26:04 it is quite easy, /ms send Jun 02 09:26:22 and it will be delivered as soon as user logs in Jun 02 09:26:48 can someone help me with how to use implements right? Here I have a class called in the activity definition with implements: https://bpaste.net/show/3f4781301a57 then in the java class I have the function, onRotationGestureListener. But android studio is telling methat it cannot resolve RotationGestureDetector.onRotationGestureListener Jun 02 09:27:22 I feel like Im doing something stupid. like it would be RotationGestureDetector.onRotationGestureListener() ? Jun 02 09:27:31 but ive never seen that Jun 02 09:28:23 it looks like you deal with java inner-classes Jun 02 09:28:48 and you need proper reference to outer class Jun 02 09:29:08 have you already heard that someone hates java? Jun 02 09:29:31 but they exist in the same package Jun 02 09:29:43 idk enough about java to hate it yet Jun 02 09:29:51 well Jun 02 09:29:58 go on, try to fix it yourself Jun 02 09:31:06 haha ok I believe you. So I need proper reference to the outer class. so RotationGestureDetector.onRotationGestureListener is not referencing the outer class Jun 02 09:31:25 or is onRotationGestureListener itself not referencing the outer class? Jun 02 09:31:48 if it cannot resolve then it needs right import or right reference to it Jun 02 09:32:42 so it can't find onRotationGestureListener inside of RotationGestureDetector Jun 02 09:38:45 in Rx, is there a method that will execute when the chain is complete, whether or not it was a success or error? Jun 02 09:39:39 this idiot says set listSelector to 0000 and you solve the problem Jun 02 09:39:39 haha Jun 02 09:39:40 wtf Jun 02 10:02:37 is anyone expericed with hosting widgets? Jun 02 10:06:50 hi guys, which is the recommended way to get an connection, with auth, between a webserver and an android application? are there any examples? Jun 02 10:25:11 Hi all. I'm doing some stuff with a canvas. I need to know the centered X position of the canvas. I know I can use the canvas.getClipBounds().centerX() to know the visible centerX but how about the space on left of my canvas? (user can scroll horizontally) Jun 02 10:26:34 in RxAndroid, how can i have an observable start doing its work, and wait for a subscriber to subscribe before emitting it? Or how is this usually done? Jun 02 10:27:42 i need FileUtils for test only, so i add "testCompile 'commons-io:commons-io:2.4'" in build.gradle, but idea does not compile Jun 02 10:28:08 but if i add "compile '...'" everything is fine Jun 02 10:29:07 people Jun 02 10:48:23 changed to androidTestCompile Jun 02 11:06:12 hey, how can i create thumbnail of large images without getting out of memory exception Jun 02 11:06:18 ? Jun 02 11:13:08 joroci: try Picasso and resize the image or use a custom transformation: http://square.github.io/picasso/ Jun 02 11:14:11 or some other image loading library: http://android-arsenal.com/tag/46 Jun 02 11:16:28 Hello folks! Jun 02 11:18:10 hi foxie Jun 02 11:20:17 surf2b1 i am usinng picasso Jun 02 11:20:52 I am trying to understand Master/Detail flow and I got this example out of Google repository : https://code.google.com/p/android-mt-tutorials/source/browse/tags/CirclesFragmentExample-1/src/com/mamlambo/circlesfragmentexample/CircleListActivity.java, but this code is showing me an error at line 45 where it says "Inconvertible types; cannot cast 'android.support.v4.app.Fragment' to 'android.support.v4.app.FragmentAct Jun 02 11:20:52 ivity'" Jun 02 11:21:06 squ: hey! hi! :D Jun 02 11:21:38 I know it is quite obvious the error message, but I still not sure what to do with it. Jun 02 11:22:09 fragment is fragment, fragmentactivity is what it is Jun 02 11:22:15 ? Jun 02 11:22:20 :) Jun 02 11:22:58 squ: yes, I understand it, but this is not my code. Shouldn't it be just working as a example? Jun 02 11:23:29 ircfox_: you can import code straight from Android Studio Jun 02 11:23:42 And if I change the cast from FragmentActivity to Fragment it misses the method setActivateOnClick(). Jun 02 11:23:48 File -> Import Sample ... Jun 02 11:24:17 squ: do you think I am doing something wrong when I am importing it? Jun 02 11:24:51 how do I know that :) Jun 02 11:25:04 try that android studio method Jun 02 11:25:48 squ: cool! I didn't know that. :D Jun 02 11:26:09 ok :) Jun 02 11:26:19 this is so annoying :| Jun 02 11:26:52 joroci: ? Jun 02 11:27:13 i'm using picasso to load a large image and getting an out of memmory exception Jun 02 11:27:20 and Jun 02 11:27:31 i used resize doesn't work Jun 02 11:28:47 so i found a way to decresase the size of the bitmap but you can't load bitmaps to picasso Jun 02 11:32:03 hey,im doing a congratz screen for user, i need to implement an explode animation. What is the best way of doing this ? Jun 02 11:32:25 i was looking for a particle editor but im not sure its the best way Jun 02 11:34:21 Is there an easy way to determinate if it' is the first time the user have opend a app, and open a class? Jun 02 11:35:10 Datasmurfen: pretty easy to just drop a flag in a sharedpreference Jun 02 11:38:28 aa thx Leeds :) I will try! Jun 02 11:40:19 <_rm> joroci: does your app have android:largeHeap enabled Jun 02 11:41:36 android:largeHeap should not be use to avoid an OOM with bitmap Jun 02 11:41:47 https://developer.android.com/training/articles/memory.html Jun 02 11:42:08 "Never request a large heap simply because you've run out of memory and you need a quick fix" Jun 02 11:42:47 meh Jun 02 11:42:49 need more ram! Jun 02 11:43:00 any idea of doing explode effect ? particle or gif or something Jun 02 11:43:22 If I have a png that fits well for mdpi, do I just have to to px*0.75 if I want to convert the png for ldpi? Jun 02 11:43:57 guidelines clearly explain this Jun 02 11:44:15 <_rm> *shrug* we use largeHeap Jun 02 11:44:22 no point in making extra graphics if all you're going to do is just reduce size Jun 02 11:44:27 the framework does that for you anyway Jun 02 11:44:44 <_rm> "our amazing new device has three gigs of ram but you can't use any of it lol" Jun 02 11:46:07 wakelock: When I use the pngs on a medium screen it displays fine. If I display it on a device with small screen the images are too big and overlap. Jun 02 11:46:22 that depends on how you use them Jun 02 11:46:30 And on a large screen they are too small. Jun 02 11:47:32 ok, then make dedicated ldpi graphics Jun 02 11:47:38 I just told you what the guidelines say Jun 02 11:51:00 wakelock: I use them in a layer list, and I would prefer if they scaled. Jun 02 11:56:50 Anyone tell me how to make a button in that has 5 horizontal squares with a different color in each, using layouts? Jun 02 11:57:05 I'm guessing it would be a button with a few linear layouts inside of it, if that is possible Jun 02 11:59:00 is anyone using espresso-contrib with recyclerview successfully? Jun 02 12:00:11 Is it even possible to change the size of a png from within a layer list? Jun 02 12:00:12 Accroding to this http://stackoverflow.com/questions/23079355/android-bitmap-image-size-in-xml it is not. Jun 02 12:00:43 I'm having a weird issue where if I include espresso-contrib, my tests fail with an error inflating recyclerview from xml, with causes like "ClassNotFoundException: Didn't find class "android.support.v7.widget.@2131296519" on path: DexPathList" Jun 02 12:00:49 technically you can make any view a "button", just use a stateful drawable for the background and set it to clickable Jun 02 12:04:01 Thx Leeds it worked :) Jun 02 12:04:45 Hi is anybody using http://www.codeiris.com/ in AndroidStudio? I do not know ho to initiate graph... Jun 02 12:05:18 wakelock: it looks like i can use android:clickable="true" in the linearlayout Jun 02 12:05:26 and it is a button.. Jun 02 12:06:22 so something like this android:clicable=trueandroid:background=color1android:background=color2..... Jun 02 12:06:28 ill try that Jun 02 12:07:35 in Rx, how can I convert a List to Observable ? Jun 02 12:08:20 Observable.from(myList) I think Jun 02 12:08:33 will emit each item from the list as a separate observable Jun 02 12:09:38 osxorgate: ^^ https://github.com/ReactiveX/RxJava/wiki/Creating-Observables Jun 02 12:10:16 joshkovach: so I receive a json containing a list using retrofit, this ultimately becomes a List as the returntype, and now for every item in this list I want to do something Jun 02 12:10:47 ahh, so you get an Observable>, right? Jun 02 12:10:53 Datasmurfen: yay! Jun 02 12:11:29 but apparently Iterable cannot be applied to List<> Jun 02 12:11:48 joshkovach: i could, if that's the returntype Jun 02 12:12:13 osxorgate: I think flatMap() will emit each item from an observable list individually Jun 02 12:13:13 Meowser, wow surprise :p Jun 02 12:13:46 osxorgate, first make retrofit return an observable Jun 02 12:14:01 alright Jun 02 12:14:11 so an Observable> Jun 02 12:14:49 yeah, then do a flatmap Jun 02 12:15:01 that just does Observable.from() Jun 02 12:15:18 but that is not allowed Jun 02 12:15:39 of course it is Jun 02 12:15:40 :) Jun 02 12:16:10 .flatMap(a -> Observable.from(a)) Jun 02 12:16:35 yeah, that Jun 02 12:17:06 but a is Observable> Jun 02 12:17:39 and? Jun 02 12:17:53 a should actually be List Jun 02 12:17:58 not an observable. Jun 02 12:19:13 ehhh Jun 02 12:19:41 so complexated Jun 02 12:19:57 let's take a step back, my json contains "[ {blah}, {blah} ]" Jun 02 12:20:10 so that translates to List yes? Jun 02 12:21:01 osxorgate: so you don't actually want to have an observable, you just want the list Jun 02 12:21:25 but i do want to iterate over this list, doing a new networkcall for each item Jun 02 12:21:47 so you get the index, then iterate over each item in the list to get more details? Jun 02 12:22:00 but i was hoping for a more Rx way of doing that iterating Jun 02 12:22:04 like using an observable of some sort Jun 02 12:22:24 Assuming your method signature is Observable> getThings... Jun 02 12:24:36 getThings().flatMap(things -> Observable.from(things)).flatMap(thing -> myService.getThing(thing.id)).subscribe(moreDetailedThing -> {}) Jun 02 12:30:01 hi Jun 02 12:30:33 hi Jun 02 12:30:56 I'm new to Android coding, just downloaded Android Studio and looking through a sample code Jun 02 12:31:06 "ActionBarCompat-Basic" Jun 02 12:31:42 There is a file called "base-string.xml" , the contents of this are displayed in the Android device in the emulator Jun 02 12:31:59 Re: recyclerview + espresso-contrib issue, here's the SO details: https://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception Jun 02 12:32:01 but I cannot find where this xml file is referenced in the Java files that set up the user interface Jun 02 12:32:28 Bokudesu, if you're a beginner, you are supposed to go through the google-provided guide before asking in any community Jun 02 12:32:35 Bokudesu, There should be a line like setContentView(R.layout.(...)). Jun 02 12:32:51 yeah android is too complex to learn from samples Jun 02 12:32:54 read the intro guides Jun 02 12:33:20 i see Jun 02 12:33:32 sublimate, there is that line yeah Jun 02 12:33:54 Okay just a general question then, why is Android Studio so laggy for me ? Jun 02 12:34:03 welcome to the world of IDEs Jun 02 12:34:10 Bokudesu, It takes a lot of beef to run it cause' it's an IDE Jun 02 12:34:10 joshkovach, Mavrik: this is sort of what i wish to achieve https://gist.github.com/xorgate/fdb76010d6239324cb84 Jun 02 12:34:11 I have used IDEs before Jun 02 12:34:12 consider using vim instead :^) Jun 02 12:34:14 You can turn off inspections Jun 02 12:34:32 Bokudesu, because AS is a huge enormous piece of bloat. get used to it, it will only ever get worse. Jun 02 12:34:35 osxorgate, honestly, what don't you get Jun 02 12:34:45 Darkwater, What's your build system without AS? Gradle still? Jun 02 12:34:46 wakelock, okay Jun 02 12:34:51 yes sublimate Jun 02 12:34:55 wakelock, Meh, 1.3 is actually more snappy IIRC Jun 02 12:34:56 Mavrik: i do not start with the network call, it is inside the .map() Jun 02 12:34:57 osxorgate, flatMap will transform your Observable> into Observable stream Jun 02 12:35:04 yeah, return the list Jun 02 12:35:14 make next step a flatMap that just does Observable.from() Jun 02 12:35:18 and you get a stream of thingys. Jun 02 12:35:46 sublimate, why don't I have 1.3, is that a beta release? Jun 02 12:35:52 (beta beta) Jun 02 12:36:02 Bokudesu, Yes, it's a beta beta :p Jun 02 12:36:10 ok Jun 02 12:36:22 of course it feels snappier, they removed half the things they will include in stable :p Jun 02 12:36:29 they probably removed* Jun 02 12:38:52 I can tell exactly what the guy in the other desk is listening to ;-; Jun 02 12:39:09 wakelock, is this the google-provided guide you meant ? Jun 02 12:39:37 oops link https://developer.android.com/sdk/installing/create-project.html Jun 02 12:40:17 Bokudesu, generally everything on d.android.com Jun 02 12:40:36 it kind of guides you through it anyway Jun 02 12:41:18 okay thanks Jun 02 12:43:18 hi everyone Jun 02 12:43:35 Iam currently facing a problem Jun 02 12:43:39 with gradle Jun 02 12:43:48 specifically with appcompact library Jun 02 12:44:06 enter is no substitute for punctuation. Jun 02 12:44:28 wakelock: :D Jun 02 12:45:20 wakelock: can you help me ? I get appcompact-v7 folder generated under /exploded-aar/com.android.support Jun 02 12:46:25 wakelock: I don't have it referenced in dependencies Jun 02 12:46:36 wakelock: I tried to delete it from app.iml Jun 02 12:46:46 this is not a helpdesk, you will not receive one-on-one tutoring or guidance Jun 02 12:46:55 you always ask the ENTIRE channel, not one single person Jun 02 12:47:20 and no I have no idea about appcompat, never used it before Jun 02 12:48:20 you're taking a dump over that thin line, brah Jun 02 12:48:26 it isn't showing anymore Jun 02 12:49:28 Odaym to whom are you refering ? Jun 02 12:49:35 wakelock Jun 02 12:50:08 guys anyone had bad experiance with appcompact-v7 ? Jun 02 12:50:13 how can I disable it ? Jun 02 12:50:24 first get its name right Jun 02 12:50:51 <_rm> harisk92: have you looked in all your build.gradle files Jun 02 12:50:57 ohai Odaym, how's your onStart animations? :p Jun 02 12:51:06 better than your attitude man Jun 02 12:51:32 I see nothing wrong with my attitude. did I offend you personally or something? Jun 02 12:51:38 you can't do that Jun 02 12:51:51 you have bad attitude Jun 02 12:51:53 I just see that it is, so im telling you Jun 02 12:52:08 _rm: I looked everywhere bro Jun 02 12:53:03 I tell it as it is, I don't hold back. those have always been the unwritten rules here. I really don't see the problem with pointing it out, so I have no regrets. Jun 02 12:53:29 wakelock: it's okay as long as you don't regret it :D Jun 02 12:53:36 sure you can tell it how it is Jun 02 12:53:41 but you never really end up helping Jun 02 12:53:43 anyone Jun 02 12:53:50 you just talk about how they shoudn't be asking for help Jun 02 12:53:59 you can't act as the channel's conscience ... Jun 02 12:54:04 choose another personality Jun 02 12:54:12 why? Jun 02 12:54:20 cause we have consciences Jun 02 12:54:30 ok, let them shine then ;) Jun 02 12:54:37 for what Jun 02 12:54:48 its showing off and its stupid and does nothing Jun 02 12:54:52 help someone is what's hard Jun 02 12:55:03 well I tought I ended up in android-dev channel Jun 02 12:55:48 Odaym, ok, help then. it's a legit question and I already said I have no experience with it. Jun 02 12:55:57 I dont know either.. Jun 02 12:56:05 I dont *have* to speak Jun 02 12:56:13 neither do I Jun 02 12:56:13 there's 500 users Jun 02 12:56:15 just nice Jun 02 12:56:36 lol, 400 of them have never said a word :D Jun 02 12:56:36 just niceness Jun 02 12:56:50 they do, just not as often because its useless to blabber Jun 02 12:56:54 like i do Jun 02 12:57:01 for 2 days Iam trying to solve this problem Jun 02 12:57:07 brb Jun 02 12:57:09 i tried everywhere Jun 02 12:57:22 and this channel was my last hope Jun 02 12:57:47 haha, you sound like a martyer Jun 02 12:57:49 martyr* Jun 02 12:58:32 <_rm> harisk92: does it end up in your apk as well? Jun 02 12:58:36 Iam really down Jun 02 12:58:43 these past few days Jun 02 12:58:45 <_rm> or is just an artifact somewhere that doesn't matter Jun 02 12:58:48 don't make it worse Jun 02 12:58:52 haha Jun 02 12:59:02 _rm: I can't build my apk Jun 02 12:59:14 <_rm> oh? Jun 02 12:59:29 _rm: my SDK got updated by mistake Jun 02 12:59:42 _rm: and since than I can't build project Jun 02 12:59:53 <_rm> what's the error? Jun 02 13:00:21 <_rm> this stuff can get complicated sometimes, and i really wish android studio had a "figure this crap out for me" button Jun 02 13:00:38 _rm: I noticed that under /exploded-aar/com.android.support I get appcompat-v7 and mediarouter generated Jun 02 13:00:47 <_rm> because more often than not, you just need to specify a newer gradle plugin version somewhere Jun 02 13:01:04 Error:(1) Attribute "background" has already been defined Jun 02 13:01:35 which points me to res/values/colors.xml Jun 02 13:02:01 but can't find a background attribute defined Jun 02 13:02:12 I think it's time you post some code Jun 02 13:02:15 too hard to tell otherwise Jun 02 13:02:45 also I see this Jun 02 13:02:46 Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/haris/Android/Sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1 Jun 02 13:03:47 Everything was fine before I updated SDK and appcompat-v7 wasn't generated Jun 02 13:04:15 Even if I try to convert my original project which is built for Ant Jun 02 13:04:23 it doesn't work Jun 02 13:07:34 I just installed Android Studio on Mac and got same errors Jun 02 13:09:22 the problem must lie in your code then, but like I said, it's impossible to investigate without some insight Jun 02 13:10:13 dude my project has over 10 000 lines of code Jun 02 13:10:18 and Iam desperate Jun 02 13:10:21 to fix this problem Jun 02 13:10:56 and the problem is that this app source code shouldn't be shared Jun 02 13:11:07 I can show you Jun 02 13:11:12 gradle files Jun 02 13:11:18 and other conf files Jun 02 13:14:33 _rm: my gradle plugin version is 1.2.2 Jun 02 13:14:43 _rm: I think it's newest Jun 02 13:15:29 since the problem is allegedly with some "background", I would guess it has something to do with your resources Jun 02 13:15:35 drawables/colors/values/layouts/something Jun 02 13:18:02 also, I was not kidding about overusing enter Jun 02 13:19:14 wakelock: you already won my heart Jun 02 13:21:05 I get this when I set my gradle plugin version too 1.0.0 /home/haris/HOMETV/Ant/android-home-tv2/app/build/intermediates/res/debug/values/values.xml:211: error: Attribute "background" has already been defined Jun 02 13:21:36 yes, so you said Jun 02 13:22:04 and this is the line Jun 02 13:22:04 Jun 02 13:23:26 could have something to do with other declarations and/or parent styles if any Jun 02 13:24:44 this is my colors resource to which it points me http://pastebin.com/UN14JCBE Jun 02 13:24:57 gradle console Jun 02 13:26:10 http://pastebin.com/DBHUwnr9 Jun 02 13:29:26 damn I solved the problem Jun 02 13:29:48 wakelock: you have inspirative influence on me Jun 02 13:30:10 I meant the XML that contains this declaration Jun 02 13:30:13 Hello, did there is a way to put severals view inside a SearchView for example adding a spinner next to the edittext Jun 02 13:30:31 I did search for that name="background over whole project Jun 02 13:30:36 I have a webview that opens a website with a mailto: link, however once that is clicked, i'm forwarded to an error webpage (in the webview) telling me that the webpage isn't available with the url mailto:somthing@something.som Jun 02 13:30:39 and I found duplicate Jun 02 13:31:02 how can I set the webview to handle mailto: and tel: links correctly? Jun 02 13:31:34 Instead of ordering the webview to open them as pages, start an ACTION_VIEW intent Jun 02 13:31:45 Override the URL loading, check for mailto, parse the url to a URI and turn the uri into an intent Jun 02 13:32:30 wakelock: too bad you are not a girl I would marry you right away :D Jun 02 13:32:38 seriosuly? shouldn't mailto: be default html behavior? Jun 02 13:33:45 or what is the best practice to search on list with different filter text, date, list of element\ Jun 02 13:33:52 harisk92, stop being wird and creepy Jun 02 13:34:00 It should be but it's not, just like tel: and market:// Jun 02 13:34:23 Syzygy, that is interesting, mailto links work in stock browser exactly as expected Jun 02 13:34:27 wakelock: you don't know how to handle a joke :D Jun 02 13:34:53 I don't have any webview apps handy to try the bare stuff Jun 02 13:36:37 wakelock, god damn it, I feel like webviews should implement that kind of behavior by default -.- Jun 02 13:38:04 Syzygy, not having used webviews before, according to my minimal research they in fact do :/ Jun 02 13:38:25 Syzygy, why should it? Jun 02 13:38:34 Syzygy, you're TELLING it to load that url Jun 02 13:38:37 not to open an intent Jun 02 13:39:07 WebView won't run other apps and jump outside your app by default Jun 02 13:39:22 Mavrik, sure, but the webview is supposed to display and use a website like a browser, including links Jun 02 13:39:31 I mean, mailto links work in simple (well, spanned) textviewa out of the box, exactly as you would expect Jun 02 13:39:40 textviews* Jun 02 13:39:41 Syzygy, yes, but not leave your app without your permission Jun 02 13:39:56 it's meant for full customization, if you need a browser, use a browser. Jun 02 13:40:33 Syzygy, but honestly it doesn't matter, since you're almost certanly ordering the webview to load an url in WebViewClient/shouldOverrlideUrlLoading Jun 02 13:40:58 and WebView doing something else there even though you explicitly call loadUrl would be wrong ;) Jun 02 13:42:26 well, guess I'll just have to implement it Jun 02 13:43:17 hi, is it possible to add a simple directory to an Android project? Jun 02 13:43:28 anyone use android studio, and know if there is a way to make it wipe an app with its data (in the emulator) before installing/running the new code ? Jun 02 13:43:31 or does it always need to be some sort of Android-specific dir ? Jun 02 13:46:04 b1101, I believe in the AVD settings for the specific device you can set it to wipe data Jun 02 13:47:09 Ok, i guess I can't find it. Jun 02 13:47:28 I know you can wipe the entire device Jun 02 13:48:29 I want the equal of going into settings>apps>myapp>clear data & uninstall Jun 02 13:48:51 Kanalia, in assets/ you can do whatever you want Jun 02 13:49:18 there is a plugin for android studio which does that (adb-idea iirc), b1101 Jun 02 13:49:26 otherwise, you can do it in one line with adb too Jun 02 13:50:38 thx adq Jun 02 13:52:00 wakelock: thanks, I'll check it out Jun 02 13:52:09 guys, is it possible to "Run app" from AS over WiFi instead of having my phone plugged in whenever I want to test my app Jun 02 13:52:24 txtsd: not really, IIRC Jun 02 13:52:28 why don't you use an emulator? Jun 02 13:52:31 drat Jun 02 13:52:56 of course it is txtsd Jun 02 13:52:57 wakelock: core 2 duo, 2GB RAM. I've got youtube videos and stuff going on for instructions. Jun 02 13:53:17 ouch, old comp Jun 02 13:53:18 adq: do tell Jun 02 13:53:29 you have to enable adb wifi on your phone, i will let search you Jun 02 13:53:43 * wakelock remembers happily using eclipse+adt on a very simular computer ;) Jun 02 13:53:47 this AS is such junk Jun 02 13:53:51 wakelock: where should I put assets/ ? Jun 02 13:53:58 Kanalia: ikr. I can't wait to feel the force of a 5th gen i7. Jun 02 13:54:08 I just started with a new base project in AS :) Jun 02 13:54:32 txtsd, hint: http://developer.android.com/tools/help/adb.html#wireless Jun 02 13:54:43 wakelock: the emulation software is still the same as it was in Eclipse, I think Jun 02 13:55:07 ~javadoc File Jun 02 13:55:12 :( Jun 02 13:55:44 wakelock: nvm I found an answer on SO about assets location Jun 02 13:55:47 whats the current UI best practice for displaying a very long list in android, an infinite vertical scroll or some kind of horizontal paginator ? Jun 02 13:55:54 Kanalia, ok cool Jun 02 13:58:19 I'm trying to make friends with AS and protobuf-nano Jun 02 13:59:39 adq: fucking sweet! It works over wifi now! Jun 02 14:02:52 yay Jun 02 14:04:27 Once I'm done with this android dev tut, I'm going to make a gui to control the arduino home-control solution I'm designing for my cousin. Jun 02 14:10:45 make sure you add a backdoor Jun 02 14:10:54 so you can f with him on halloween Jun 02 14:18:55 lolyes! Jun 02 14:19:08 wait no Jun 02 14:19:16 halloween isn't a thing here Jun 02 14:20:30 why do programmers confuse halloween with christmas? Jun 02 14:20:35 because 31 oct = 25 dec Jun 02 14:20:38 ba dum tss Jun 02 14:21:35 Ashiren: i didnt know that Jun 02 14:21:40 i lol'd a little inside Jun 02 14:21:50 youre so young Jun 02 14:26:54 how would i display a .dae file on my android device using a KML file that i wrote? ive tried using the android's local storage (file path file:///Download/shape.dae) but the shape does not display when i open the KML file Jun 02 14:28:58 Hey all - I have a base activity with a toolbar and a container which all activities extend. I'd like to add a shopping cart icon to this toolbar when the user adds a product to their cart. I have thought about using Observer/Observable, but i'm not sure what that'd look like in this situation Jun 02 14:29:02 does anyone have any good resources? Jun 02 14:42:18 so, according to this ART should have some kind of debugging api: https://source.android.com/devices/tech/dalvik/#Debugging_Imp Jun 02 14:42:28 however I haven't been able to find any more information on it Jun 02 14:43:59 VectorDrawable isn't backported in support libraries, is it? Jun 02 14:46:29 Hi.. I am trying to get the path to my external sd memory card. I have already tried android.os.Environment.getExternalStorageDirectory() but this returns me the path to the emulated memory Jun 02 14:46:34 can anyone help Jun 02 14:47:10 Trying examples from google for ListViewRemovalAnimation. Why is tools:context set to ".ListViewAnimations" in https://android.googlesource.com/platform/development/+/jb-mr1-dev/samples/devbytes/animation/ListViewRemovalAnimation/res/layout/activity_list_view_deletion.xml when there is no sing of use in whole project? Jun 02 14:50:22 I am trying to get the path to my external sd memory card. I have already tried android.os.Environment.getExternalStorageDirectory() but this returns me the path to the emulated memory Jun 02 14:52:38 androidgeek12, that is all you will ever get, don't count on anything else Jun 02 14:53:28 @wakelock sad... but thanks Jun 02 15:14:11 how would i display a .dae file (3D object) on my android device using a KML file that i wrote? Ive been able to display this object on google earth desktop but when i attempt to do it on GE mobile the shape does not display. ive tried using the android's local storage (file path file:///Download/shape.dae) but the shape does not display when i open the KML file Jun 02 15:17:15 do you include the google play 512x512 icon in your app resources anywhere? Or is that meant to live outside the app entirely? Jun 02 15:23:53 joshkovach: it's irrelevant to the apk afaik Jun 02 15:24:20 ok, just wondering if there was an actual location we could put it that android or GP could pick up on Jun 02 15:24:37 just putting it in root for source control Jun 02 15:25:00 /join #analyticaltranslator Jun 02 15:25:06 sorry Jun 02 15:39:30 how would i display a .dae file (3D object) on my android device using a KML file that i wrote? Ive been able to display this object on google earth desktop but when i attempt to do it on GE mobile the shape does not display. ive tried using the android's local storage (file path file:///Download/shape.dae) but the shape does not display when i open the KML file Jun 02 15:41:58 is it possible to see why you can't install an app on a specific device? (not compatible) Jun 02 15:55:01 What's good people Jun 02 15:57:36 Or not Jun 02 15:57:41 Guess it's too early Jun 02 16:10:54 Could anyone help me with a quick Java question? I just need to know how to implement some kind of listener function. Say we have Object A who contains Object B, something happens on Object B which triggers a function located in Object A without directly refering to it Jun 02 16:13:00 kanso, you can use observer, which comes with java. you could us Otto, a library written by square, you could just hold a list of listeners yourself Jun 02 16:13:04 or* Jun 02 16:13:06 eventbus Jun 02 16:15:09 I'll check out Observer. Want it to be super light weight, so dont want to use any lib Jun 02 16:19:08 kanso: 'Listener' (lightweight 'Observer') is a common pattern on Android. Jun 02 16:19:27 Involves declaring and implementing some simple interface. Jun 02 16:19:44 hey guys...I have the Stock ROM for my phone and I need to check if there is a way to increase the ear speaker volume from the ROM itself? Jun 02 16:19:53 if object a contains object b, seems pretty simple to tell the parent that something happened Jun 02 16:20:30 canvs2321: Yeah, but it's often best to decouple the interaction. Jun 02 16:21:43 TacticalJoke: Is this the pattern? http://stackoverflow.com/questions/2975935/java-correct-pattern-for-implementing-listeners Jun 02 16:22:51 kanso, use android studio to make a new fragment, it’ll shove a listener pattern in for you ;) Jun 02 16:23:25 Oh alright, thanks! Jun 02 16:25:22 This is it: http://stackoverflow.com/a/5942114 Jun 02 16:27:59 okay thats exactly what i was looking for. thanks Jun 02 16:29:20 The interface implementer could be anything: something that already exists (e.g., an Activity instance), an instance of an anonymous class, or whatever. Jun 02 16:54:34 nice http://stablekernel.com/blog/mvvm-on-android-using-the-data-binding-library/ Jun 02 16:56:03 where does openFileInput read from? Jun 02 16:56:28 hello, what am I doing wrong if my ServiceTestCase test methods are recognized as tests but never get executed and the test fails with "No tests were found" ? Jun 02 16:56:55 official docs don't mention classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' do they ? Jun 02 17:03:35 Hi, I'm playing around with Android layouts, and am hitting a stumbling block. Basically I want a horizontal linear layout, that contains 3 children. On the left, an ImageView of fixed width. On the right, another ImageView of fixed width. Then a center text view that fills the remaining width of the parent layout. I've tried specifying the widths of the two ImageViews, and then saying fill_parent for the text view, but its pus Jun 02 17:03:55 than the parent (and thus not visible). Suggestions on a more appropriate approach? Jun 02 17:06:48 has anyone ever even used a ServiceTestCase here ? Jun 02 17:07:13 Anyone have experience developing Android TV apps? I'm wondering how to share activities between my phone and TV app but specify different themes Jun 02 17:09:28 how do i create my own executor in android? Jun 02 17:09:37 like the same one as AsyncTask.THREAD_POOL_EXECUTOR Jun 02 17:10:00 oh that is literally just a ThreadPoolExecutor haha ok nvm Jun 02 17:19:09 how would i display a .dae file (3D object) on my android device using a KML file that i wrote? Ive been able to display this object on google earth desktop but when i attempt to do it on GE mobile the shape does not display. ive tried using the android's local storage (file path file:///Download/shape.dae) but the shape does not display when i open the KML file Jun 02 17:20:09 I think you are accessing the file as you do in Chrome Jun 02 17:20:19 Not sure if it´s the right way to access files Jun 02 17:20:27 I would use the File and the FileInputStream Jun 02 17:25:37 jesus, debugging a leak associated with google maps v2 is awful because of the obfuscation Jun 02 17:26:12 is this good for cross platform with ios? http://juniversal.org/ Jun 02 17:26:46 @DarkChaoz things like that usually depend on what you are trying to create Jun 02 17:26:47 herriojr did you try leak canary ? Jun 02 17:26:57 g00s: that's how I found the leak Jun 02 17:27:07 nice Jun 02 17:27:24 one of the more useful things out of square for sure Jun 02 17:27:26 g00s: it's basically not in my code — something to do with SupportMapFragment having something internal holding on to the view hierarchy after the activity has shut down Jun 02 17:27:59 unfortunately, all their code is obfuscated and makes it a pain to track down a possible workaround Jun 02 17:28:21 thats been a common problem with google code; webview, maps over the years, have all suffered from these things Jun 02 17:28:30 I made a simple feed app which uses json & rss with also some database activity stuff.. Jun 02 17:28:35 yeah, I just need to come up with a workaround Jun 02 17:28:49 so i was thinking i redesigned the app using juniversal Jun 02 17:29:04 herriojr have you found anyone else mention it on issue tracker ? Jun 02 17:29:09 @DarkChaoz if that's all it is, then it will probably suffice — just if you start doing more advanced stuff, you're going to be screwed Jun 02 17:29:20 g00s: the last thing I see is from last year unfortunately Jun 02 17:29:24 one problems is GMS guys have no official contacts, i have found bugs and posted them to the aosp tracker but they get rejected Jun 02 17:29:44 lol herriojr how so? :P Jun 02 17:29:47 how easy is it to add transitions? Jun 02 17:29:57 so they i started posting them to forums, but since nothing happened i assume they don't pay attention much Jun 02 17:29:59 I have a friend that works there, I'll get a sample created and ship it over to him Jun 02 17:30:07 and figure out what the hell is going on Jun 02 17:30:07 whether its activity to activity transitions or activity to fragment transitions? Jun 02 17:30:14 for advanced stuff i guess u have to make it from scratch? Jun 02 17:30:17 or vice versa Jun 02 17:30:34 DarkChaoz: when you use something like that, it's built for the lowest common denominator between both platforms Jun 02 17:30:56 i see. Jun 02 17:32:08 ah... getWindow().setXXXTransition Jun 02 17:32:16 anyone used that before here? Jun 02 17:35:27 the rules, IV https://medium.com/google-developers/developing-for-android-iv-e7dc4ce0a59 Jun 02 17:37:02 g00s: shhhhhh Jun 02 17:37:09 rule #1 is that you don't talk about the rules. Jun 02 17:40:55 Anyone on here know if it's possible to rip out and rebuild Android's media scanner? Or would that require the ROM to be rebuilt? Jun 02 17:43:54 Anyway to prevent views from activity transaction animations from overlapping the bottom nav bar? Jun 02 17:45:35 That would require a ROM rebuild Jun 02 17:45:44 You can´t rip out the media scanner Jun 02 17:45:55 has anyone ever read iTiunes ridiculous ToS? Jun 02 17:46:00 *iTunes Jun 02 17:46:07 Nope I haven´t Jun 02 17:46:11 What´s wrong? Jun 02 17:46:13 "You also agree that you will not use these products for any purposes prohibited by United States law, including, without limitation, the development, design, manufacture or production of nuclear, missiles, or chemical or biological weapons." Jun 02 17:46:18 -_- Jun 02 17:46:36 xDxDxDxDxDxDxDxD Jun 02 17:46:46 That´s about the books and the movies I think Jun 02 17:47:04 its defo on the terms and conditions though lol Jun 02 17:47:32 probably more than that :P Jun 02 17:48:19 Haha Jun 02 18:26:33 I think that yesterday's problem with that drawableview is because of a margin value that I've set on the view in xml and haven't even noticed for a long time, from the last time that I tried to resolve something with it Jun 02 18:26:40 :( Jun 02 18:28:37 doesn't mean that the guy behind DrawableView lib did a shitty job Jun 02 18:28:42 worst job is a half-assed one Jun 02 18:29:02 I'm facing a strange problem. When entering an activity where I change the toolbar alpha when the user is scrolling and then come back to the previous activity, the toolbar for the previous activities looses their style. This happens only for lollipop Jun 02 18:29:05 cause you dont know whether to put the effort on it or just dump it but you can't dump it because it kind of seems promising but not really Jun 02 18:29:09 man I would've punched his face Jun 02 18:36:51 Napalm dave Smith's Android book in 50% until 6/3 from apress. 780 page whopper Jun 02 18:37:23 also just noticed packt (usually terrible) has an Rxjava Android book Jun 02 18:37:37 http://www.amazon.com/RxJava-Essentials-Ivan-Morgillo/dp/1784399108 Jun 02 18:50:25 what is the most recent Android Studio version? Jun 02 18:50:51 g00s: do you have a link to Dave's book? Jun 02 18:51:10 sir_galahad_ad: 1.2.1.1 is latest stable.. 1.3 is still in beta Jun 02 18:52:19 ok i have 1.2.1.1, am having a problem someone on stack overflow claimed that as of 1.7 the issue i'm having doesn't happen any more Jun 02 18:52:20 sir_galahad_ad: Were you in Programming:2 on Yahoo! Chat? Jun 02 18:52:44 that was a long time ago :P Jun 02 18:52:46 haha Jun 02 18:52:47 but yes Jun 02 18:52:50 Totally recognise your name. Jun 02 18:52:56 I can't remember which name I used then. Jun 02 18:53:05 How long ago was it?? Jun 02 18:53:12 r0gue_code hangs around in ##csharp. Jun 02 18:53:27 That must've been over 10 years ago. Jun 02 18:54:03 O.O.O.O.O.O.O.O.O Jun 02 18:54:10 That´s a long time Jun 02 18:54:37 yeah, and i still haven't gotten any better Jun 02 18:54:55 Hahahahah Jun 02 18:55:04 I was using Delphi back in those days. :D Jun 02 18:55:06 And C++. Jun 02 18:55:29 sir_galahad_ad: I dunno whether you remember, but I was the one making that bot that played hangman in the chat room. Jun 02 18:55:38 I think it was giga_bot or something. Jun 02 18:55:41 anyway it seems that as soon as i make any kind of edit to a project in android studio it tells me that it can't resolve R Jun 02 18:55:56 That could be a xml error Jun 02 18:55:56 TacticalJoke: that seems vaguely familiar Jun 02 18:56:04 Try importing your R.java Jun 02 18:56:13 just like to import any other class Jun 02 18:56:25 I´ve had these issues to Jun 02 18:59:43 Hey Jun 02 18:59:56 Hay. Jun 02 18:59:59 Hellowww Jun 02 19:00:05 tim687: i'm not understanding import like adding a import statement to the java files that call R? or like importing into the project? Jun 02 19:00:40 Adding an import statement to the file itself Jun 02 19:00:55 I think it´s like this Jun 02 19:01:04 yourpackagename.R Jun 02 19:01:40 You have to import it if you're in a subpackage of the application package. Jun 02 19:01:58 Exactly Jun 02 19:02:08 But I think he´s not Jun 02 19:02:24 Yeah, it might be an XML error. Jun 02 19:02:26 But sometimes it doesn´t recognize the R.java file Jun 02 19:02:29 I think we should get a third opinion. Jun 02 19:02:51 Try to look at your console when you do a project build Jun 02 19:03:04 It might tell you some usefull information Jun 02 19:03:08 :) Jun 02 19:03:11 i don't think i am though, i'm more used to Eclipse + plugins, was trying to get even a hello, world kinda thing to work with Android Studio and it's been something of a pain Jun 02 19:03:44 I can understand you Jun 02 19:03:45 i have an error saying aidl is missing Jun 02 19:03:59 But once you get used to it Android Studio is one powerfull piece of software Jun 02 19:04:08 Have you change the api f Jun 02 19:04:26 I will not talk about my stats today. lol Jun 02 19:04:41 On SO they say that you´ll need to downgrade the SDK Build Tools to 22.0.1 Jun 02 19:04:46 i had the same prob with android studio with that error sir_galahad_ad Jun 02 19:04:49 Napalm http://www.apress.com/9781484204764?wt_mc=email.newsletter.3.EPR25469.internal_1_B_PRODUCT Jun 02 19:04:58 You can do that Jun 02 19:05:10 I upgraded to lollipop today Jun 02 19:05:19 sir_galahad_ad: Which version of the Gradle plugin are you using? Jun 02 19:05:21 But you can also try to update sdk trough the sdk manager Jun 02 19:05:29 But make sure to run the SDK manager as admin!! Jun 02 19:05:42 brb Jun 02 19:07:18 i bet it the api change Jun 02 19:07:40 I had the same prob with android studio. Jun 02 19:07:48 i changed my build tools that did seem to fix it. Jun 02 19:08:21 How you do that? Jun 02 19:08:22 Nice! Jun 02 19:08:30 I think under the settings Jun 02 19:08:43 Sorry still new to android studio. Jun 02 19:08:45 :) Jun 02 19:08:48 Np Jun 02 19:08:57 Will post the full path in a minute Jun 02 19:09:00 thanks tim687. Jun 02 19:09:09 file->project structure->properies->build tools version Jun 02 19:09:14 cool Jun 02 19:09:51 Jup Jun 02 19:09:56 That´s it Jun 02 19:10:00 thank Jun 02 19:10:15 i'm allowed to have a file located in my res folder right? Jun 02 19:10:23 I can't wait when android studio 1.3 come out to stable. Jun 02 19:10:23 Yes you are Jun 02 19:10:26 i want to have a .txt file that my application reads (it does not get modified) Jun 02 19:10:34 do i create a 'raw' folder in my res folder? Jun 02 19:10:43 Depens on the file type Jun 02 19:10:50 its just a .txt Jun 02 19:11:02 how do i reference that text file in my activity? Jun 02 19:11:05 Then you´ll need to put it in a raw folder Jun 02 19:11:19 R.raw.textfile Jun 02 19:11:22 I think Jun 02 19:11:32 where can i order/rent android tablets that have my app preinstalled, run in single app mode (ore pinned or kiosk mode) & have an sd card with activated internet connection. we're selling our app to companies with a monthly licensing model. we don't want to set this up ourselves for each customer individually. Jun 02 19:11:36 lol, that moment when you decompile someone's app and see that they use the same way/algorithm to do something that you do Jun 02 19:11:46 anyone from vimo labs over here? :D Jun 02 19:11:50 That sucks Jun 02 19:12:16 and how do i actually read that file Jun 02 19:12:31 or were do i even search for this kind of question? :D which stack exchange site would be suited for this? Jun 02 19:12:54 aspire here is a piece of code Jun 02 19:13:02 getResources().getIdentifier("raw/FILENAME_WITHOUT_EXTENSION","raw", getPackageName()); Jun 02 19:13:11 And to get it as an inputstream Jun 02 19:13:17 InputStream ins = getResources().openRawResource( Jun 02 19:13:17 getResources().getIdentifier("raw/FILENAME_WITHOUT_EXTENSION", Jun 02 19:13:18 "raw", getPackageName())); Jun 02 19:14:19 aspire Do you want it converted to a string? Jun 02 19:15:21 Use this piece of code to get it as a string Jun 02 19:15:23 / convert InputStream to String Jun 02 19:15:23 private static String getStringFromInputStream(InputStream is) { Jun 02 19:15:24 Jun 02 19:15:24 BufferedReader br = null; Jun 02 19:15:24 StringBuilder sb = new StringBuilder(); Jun 02 19:15:24 Jun 02 19:15:26 String line; Jun 02 19:15:30 try { Jun 02 19:15:32 Jun 02 19:15:34 br = new BufferedReader(new InputStreamReader(is)); Jun 02 19:15:36 while ((line = br.readLine()) != null) { Jun 02 19:15:38 sb.append(line); Jun 02 19:15:40 } Jun 02 19:15:42 Jun 02 19:15:44 } catch (IOException e) { Jun 02 19:15:46 e.printStackTrace(); Jun 02 19:15:48 } finally { Jun 02 19:15:50 if (br != null) { Jun 02 19:15:52 try { Jun 02 19:15:54 br.close(); Jun 02 19:15:56 } catch (IOException e) { Jun 02 19:16:00 e.printStackTrace(); Jun 02 19:16:02 } Jun 02 19:16:04 } Jun 02 19:16:06 } Jun 02 19:16:08 Jun 02 19:16:10 return sb.toString(); Jun 02 19:16:12 Jun 02 19:16:14 } Jun 02 19:16:16 and then do String textFileContents = getStringFromInputStream(ins); Jun 02 19:17:18 tim687 use pastebin next time Jun 02 19:17:20 tim687, can you use a paste service? Jun 02 19:17:25 lmao Jun 02 19:17:39 Sorry Jun 02 19:17:40 Is google Analyics same as apple Analytics? Jun 02 19:17:43 Yes I would Jun 02 19:17:49 Don´t know Jun 02 19:17:54 The company is differen Jun 02 19:17:55 t Jun 02 19:18:09 was doing some google on it. Jun 02 19:18:23 I preffer Google Analytics Jun 02 19:18:33 oh really Jun 02 19:18:35 :) Jun 02 19:19:13 Yes Jun 02 19:19:23 time687, i take it easy to use. Jun 02 19:19:38 Well it actuallly is easy to use Jun 02 19:19:52 cool beans thanks. Jun 02 19:20:02 But if you don´t have any experience setting things up Jun 02 19:20:11 It could be a real pain at the first try Jun 02 19:20:18 I got to go Jun 02 19:20:24 Speak to you tomorrow! Jun 02 19:20:30 i be here. Jun 02 19:21:30 looks like gradle is dexing a bunch of dependencies in paralell Jun 02 19:21:34 anyone know how to dial that back? Jun 02 19:21:42 Oh i forgot i need a web site for google Analyics Jun 02 19:21:56 to much coffee sorry. Jun 02 19:22:09 o.. Jun 02 19:22:12 ohhh i see Jun 02 19:22:30 this is what I want to do to my team when I become at a position of power in some company https://www.youtube.com/watch?v=71Lft6EQh-Y Jun 02 19:22:32 :D hahaha Jun 02 19:22:44 i talk to much when i drink coffee lol. Jun 02 19:23:11 ty tim687 Jun 02 19:23:34 I talk too much when I take cocaine Jun 02 19:23:35 haha Jun 02 19:23:54 lol Jun 02 19:24:59 Got alot to read:) Jun 02 19:25:26 random fact? Jun 02 19:25:36 yes Jun 02 19:25:51 I got the book call Pro android big book. Jun 02 19:25:55 got a lot of years to live :) Jun 02 19:25:58 or not :) Jun 02 19:26:01 might die tomorrow! Jun 02 19:26:11 You serious. Jun 02 19:26:44 its a random fact like yours Jun 02 19:27:03 i see Jun 02 19:27:08 you dont Jun 02 19:27:40 ok Jun 02 19:34:09 Is there any resource out on the web that covers popular android patterns? They seem to all be scattered throughout the web :/ Jun 02 19:34:23 what kind of pattern Jun 02 19:34:31 all of them Jun 02 19:34:37 what's their count? Jun 02 19:34:55 are they like 5? Jun 02 19:36:01 what do you mean lol? Isn't a pattern kind of like guidelines or boilerplate way of during certain things Jun 02 19:36:15 or do I have my android lingo mixed up Jun 02 19:36:33 pattern is a far too general term by itself Jun 02 19:36:33 pattern is a predefined path, yea sure Jun 02 19:36:40 but you want "all the android patterns" Jun 02 19:36:45 are you talking about design patterns, code patterns, ui patterns? Jun 02 19:36:49 interaction patterns? Jun 02 19:36:49 kanso, maybe start with the lifecycle guide on developer.android.com Jun 02 19:36:56 monetization patterns? Jun 02 19:37:06 feynman diagrams? Jun 02 19:37:12 come back when you have a question Jun 02 19:39:46 Well I did have a question, is there a site that has a collection good code pattern guidelines besides the default android documentaion lol. I'm just looking for a way to keep things structured and pragmatic Jun 02 19:39:56 wwakfhaskjfsakhjaks Jun 02 19:39:58 waaaaat Jun 02 19:40:07 throw some more words man Jun 02 19:40:12 so you’re looking for design patterns Jun 02 19:40:51 http://gameprogrammingpatterns.com/ Jun 02 19:41:07 that'll make you feel important :P open that site! Jun 02 19:41:11 the premise of the book is directed at games, but many of the patterns in there are applicable to general programming Jun 02 19:41:52 kanso if you go here and scroll to the bottom of the nav tree, you will see a bunch of "Best practice" http://developer.android.com/training/index.html Jun 02 19:43:07 thanks Jun 02 19:44:34 kanso another good article https://github.com/tehmou/rx-android-architecture Jun 02 19:45:52 Thanks, I think thats more of what I was looking for Jun 02 19:46:17 i just saw this one today its pretty good also http://stablekernel.com/blog/mvvm-on-android-using-the-data-binding-library/ Jun 02 19:46:34 yeaa that's what you wanted Jun 02 19:46:36 haha Jun 02 19:46:42 sorry ill be quiet Jun 02 19:48:50 I'm new to android, so just wanted to read up on keeping my code top notch ;P Beginner android tutorials don't show advanced structure architecture Jun 02 19:49:58 kanso check out that stablekernel article. it seems like good android app design is still something up for debate. a year ago it was all about adding rxjava, now its about MVP and MVVM and how to do that Jun 02 19:50:15 thank you kanso for being real :) Jun 02 19:50:20 mostly taking into account lifecycle complexities like rotation changes, going to the background, etc Jun 02 19:50:30 there really isn’t a whole lot of consensus around structure Jun 02 19:50:36 but you need to be more real Jun 02 19:50:47 :P Jun 02 19:50:51 g00s, wrong, now it's all about kotlin :p Jun 02 19:51:04 thanks g00s, will do Jun 02 19:51:10 kotlin doesn't effect your app's architecture Jun 02 19:51:27 affect Jun 02 19:51:28 maybe its design in the micro Jun 02 19:51:29 * JesusFreke twitches Jun 02 19:52:53 sorry JesusFreke, that wasn't effective Jun 02 19:52:53 :p Jun 02 19:53:08 I mean affective Jun 02 19:53:10 >.> Jun 02 19:53:38 I figure affect/effect will merge into æffect eventually, and we'll be rid of this particular twitch-inducer Jun 02 19:53:52 or we get English Jun 02 19:53:55 ez Jun 02 19:54:14 English EZ - is that like 23 characters, and phonetic? Jun 02 19:54:28 EZ English Jun 02 19:56:13 speaking of new-age english: http://pastebin.com/fTsdRHKi Jun 02 19:57:59 i like effecting twinges in people who think "effect" can only be used one way, and laugh when they tell me "no, affect!" when it would make absolutely no sense. Jun 02 19:59:41 dude Jun 02 19:59:43 affect is a verb Jun 02 19:59:47 effect isn't Jun 02 19:59:48 that's it Jun 02 19:59:50 lol Jun 02 19:59:54 its not science Jun 02 19:59:57 you make me laugh Jun 02 20:00:05 Both can be a verb; both can be a noun. Jun 02 20:00:10 They all mean different things. Jun 02 20:00:13 ^^ Jun 02 20:00:25 (that is, each of the 4 have different meanings) Jun 02 20:00:35 what are they Jun 02 20:00:39 #android-linguists Jun 02 20:00:40 i'd like to know Jun 02 20:00:58 English is a not an easy language. It can be understood through tough thorough thought, though. Jun 02 20:01:11 æffecting æffective æffects Jun 02 20:01:12 lol Jun 02 20:01:15 no. Jun 02 20:01:27 We need a standard natural language. And it should be simple. Jun 02 20:01:33 lojban FTW Jun 02 20:01:36 oh wait. simple. Jun 02 20:01:44 I weas just thinking of Lojban. :D Jun 02 20:01:48 I was about to mention lojban, but decided not to Jun 02 20:01:50 I didn't look into it much, though. Jun 02 20:02:08 It sounds like a Java framework. Jun 02 20:02:13 they say it's "logical", I feel it's like... mathematical Jun 02 20:02:16 scientific Jun 02 20:02:19 cold and clinical Jun 02 20:02:24 oh wow: http://jbo.wikipedia.org/wiki/ralju_ckupau Jun 02 20:02:28 "Lojban is a logging and banning framework for the JVM." Jun 02 20:02:50 we could use some rouge thread/service banning Jun 02 20:02:55 rogue* Jun 02 20:04:11 wonder what would the java language itself look like when translated to lojban Jun 02 20:04:18 Kotlin? :D Jun 02 20:04:26 j and/or k probably Jun 02 20:05:04 One of my biggest pet peeves lately is using 'login', 'layout', etc. as a verb. Jun 02 20:05:05 Makes no sense. Jun 02 20:05:15 login your account kplzthx Jun 02 20:05:21 what about backuping your stuff, TacticalJoke? :p Jun 02 20:05:26 "I logined yesterday." "I'm logining." Jun 02 20:05:27 it's like remindering someone of their password Jun 02 20:05:32 Yeah, that's another one. Jun 02 20:05:51 "when two become one" Jun 02 20:05:52 (words) Jun 02 20:05:52 We can't just make everything one word. Jun 02 20:05:52 TacticalJoke, I have a shirt that says "Science is a verb now" Jun 02 20:05:56 Wecan'tjustmakeeverythingoneword. Jun 02 20:06:09 I'msorrybutmyspacebarisbroken Jun 02 20:06:13 TacticalJoke, "I'm gonna science the shit out of this." Jun 02 20:06:16 Odaym: to effect is to put something in to action, to make it so, to cause it. an effect is something that happens. to affect something is to alter it, to change it. i rarely see the noun form of the raw 'affect', but it's the mental aspect of emotion Jun 02 20:06:16 :D Jun 02 20:06:29 dragorn, I'll verb your science Jun 02 20:06:29 TacticalJoke, of course it can't be, what do you think this is, german? Jun 02 20:06:51 I like using 'google' as a verb. So handy. Jun 02 20:06:59 you have an effect Jun 02 20:07:01 Though I feel the need to make the 'g' lower case. Jun 02 20:07:09 meaning, you have affected something Jun 02 20:07:12 EZ Jun 02 20:07:26 Odaym: presumably something affected something to cause the effect, yes Jun 02 20:07:33 and then we get into adjectives Jun 02 20:07:38 is it effective or affective? Jun 02 20:07:50 hang on a sec, I need to kleenex my nose Jun 02 20:08:05 'Affective' is about emotions. Jun 02 20:08:07 english is my 2nd language & i was never confused with the two. Jun 02 20:08:16 Odaym: someone may have effected the affecting of that something Jun 02 20:08:19 An affective song that leaves the listener in tears. Jun 02 20:08:32 so Jun 02 20:08:33 I'll just vote for Klingon as the universal language. seems like it would make life a lot more fun. Jun 02 20:08:39 an affective song can be pretty effective Jun 02 20:08:54 if it produces the right affects, anyway Jun 02 20:09:03 If it effects the right affects. Jun 02 20:09:09 pft, that's just an affectation Jun 02 20:09:10 :D Jun 02 20:09:45 Yo dawg, I put affects in your effects so that your effects can affect your affects. Jun 02 20:10:09 JesusFreke, what kind of pandora box did you just open Jun 02 20:10:16 BrainOverflowError. Jun 02 20:10:24 Exception* Jun 02 20:10:40 return -ENOCARE :) Jun 02 20:10:48 In .NET it's StackOverflowException. :D Jun 02 20:11:09 that's when you can't copy from stack overflow, right? Jun 02 20:11:11 (void)dragorn(); Jun 02 20:11:14 lol JesusFreke Jun 02 20:11:15 Stack collision with heap. Jun 02 20:11:24 StackOverflowIsDownException Jun 02 20:11:51 they were coming from the opposite sides, they were bound to collide at some point Jun 02 20:11:57 wakelock, i need to remember that. If I had an office I'd put it on the door. :P Jun 02 20:12:07 lol Jun 02 20:12:26 wakelock, and, yup. Was moderately common on ancient macs, since they had minimal ram and heap and stack grew towards eachother. Jun 02 20:12:30 shame you can't use it as a car tag :) Jun 02 20:13:00 yep I know, wasn't all that hard to get on realmode x86 either Jun 02 20:13:07 segments and all Jun 02 20:13:08 just name your car "stack" and wait until you hit a heap of junk Jun 02 20:13:33 groxx, nope, name your car stack and get REALLY fat so you can't fit in it Jun 02 20:13:41 now THAT's proper stack overflow Jun 02 20:14:03 and now we have yet another name for "muffin tops" Jun 02 20:14:21 aw but I like muffie Jun 02 20:15:08 so technically, stack overflow could also be called heap underflow Jun 02 20:15:59 my car is a truck, so all I really have to do is throw so much crap in the back that it falls out :P Jun 02 20:16:59 sooo... how much more crap do you need on top of whatever you already have? :p Jun 02 20:18:41 wakelock, I'm actually fairly well organized, in that respect anyhow. Jun 02 20:19:06 "You're no fun anymore" (c) Monty Python Jun 02 20:19:42 such unfun. wow. very displease. Jun 02 20:19:59 wakelock bepolite Jun 02 20:20:02 :D Jun 02 20:20:58 nevah Jun 02 20:22:33 Java is such unfun. Jun 02 20:22:37 I more "wow". Jun 02 20:23:03 is there any way to open a sketchup 3D model (a cube for instance) in google earth/maps mobile? Jun 02 20:23:16 file extension .dae Jun 02 20:23:54 Hello Jun 02 20:24:36 I used in my app the su command. But now I added my app as system app and I can't use su anymore. How can I use su? I get selinux problems Jun 02 20:26:45 wrong-ish channel, fire855 Jun 02 20:27:07 people here are adamant about not using anything but what's provided by the SDK/API Jun 02 20:27:51 Then other question. Is it possible to kill a process as system app? Jun 02 20:27:56 Then other question. Is it possible to kill a process as system app with api? Jun 02 20:29:05 AFAIK it's possible to kill a process as any app, if you request the right permission Jun 02 20:29:50 I thank that I only can kill process who are started from my app Jun 02 20:31:11 fire855, http://developer.android.com/reference/android/app/ActivityManager.html#killBackgroundProcesses%28java.lang.String%29 Jun 02 20:31:14 fire855, http://developer.android.com/reference/android/Manifest.permission.html#KILL_BACKGROUND_PROCESSES Jun 02 20:31:35 wakelock, But I can't kill with this the rild process or? Jun 02 20:31:48 no, you can't Jun 02 20:32:06 that doesn't change whether you're user app or system app or godgiven app Jun 02 20:32:39 Okay. But then I need a alternative. So I don't sign my app with platform signature and use su? Jun 02 20:33:08 su is not a part of the stock (hence supported) android Jun 02 20:33:19 there is nothing in the official SDK API to utilize su Jun 02 20:33:25 need a little help. When I'm changing a toolbar from one activity, all activities are being affected when running on Android 5.0. If I set the background alpha to 0 on a toolbar from one activity, all the others are affected too. Jun 02 20:33:50 I'm adding this app in cyanogenmod. So su is working. I will try to fix it. Jun 02 20:33:55 wakelock: actually.. it's part of Android, but not a part of any APIs... and normal android su can only be used from adb Jun 02 20:34:05 wakelock: specificly, the 'shell' user Jun 02 20:34:50 hmm whenever I tried to use the built-in su in an emulator, it never worked no matter what I do Jun 02 20:35:07 so I just replaced it with normal working su and the accompanying superuser app :p Jun 02 20:36:57 fire855: #anrdoid-root for root-related stuff. people there have more experience with it + that's the name of the room :) Jun 02 20:37:21 groxx, okay I will try it. Thanks. Jun 02 20:37:30 groxx, that's why I said wrong-ish ;) technically yes it belongs there but it's also app related so it's kind of moot Jun 02 20:37:54 yep. and killBackgroundProcesses might have worked :) Jun 02 20:38:02 but since nobody mentioned the room yet, figured I would Jun 02 20:38:38 Birk_: how are you setting the background alpha? Jun 02 20:41:01 groxx: I'm getting the toolbar from my layout and then I call toolbar.getBackground().setAlpha(0). When the user scrolls the view I set the alpha again. When a specific height is reached the toolbar is fully colored again. Jun 02 20:41:32 some AS extensive user? - is there solution for this answer? http://stackoverflow.com/questions/29316969/call-hierarchy-does-not-work-on-class-names-or-variables-android-studio Jun 02 20:41:45 Birk_: my guess is that getBackground() returns a Drawable, and you're using the same background in all toolbars. Drawables are shared instances, so changing one will change , therefore all. Jun 02 20:42:11 Birk_: I forget if just `getBackground().mutate().setAlpha(0)` is enough to fix it, but give that a try. Jun 02 20:42:49 groxx: will try that. Jun 02 20:43:20 groxx: It worked! Thanks a lot! Jun 02 20:43:34 groxx: Strange that this only happens in android L. Jun 02 20:44:41 Birk_: yeah, that's a bit odd. not sure why. might be a different Toolbar / background there? unfortunately I've barely touched AppCompat, not sure how to find out why either. Jun 02 20:45:24 groxx: Well, thanks again! Jun 02 20:45:59 np, happy coding :) Jun 02 20:46:53 im trying to use a KML file to open a sketchup model on google earth mobile. The KML file works for the tag (and the camera moves where i want it to) but the model doesnt display at all or a simple icon shows up, but not the 3D model. are they not supported or is the android just not finding the local file? Jun 02 20:48:10 I’m unable to receive a message on android from server, pressing the button hangs the android app… also when I send a message it doesn’t show up on the server till i exit out of the app: http://pastebin.com/Ryw867pK Jun 02 20:48:51 on the server side im using buffered reader .readLine() method, adding \n or \r does nothing either Jun 02 20:49:34 Gormandy: probably a few problems. 1) don't do that on the main thread. 2) it might be working when you exit the app because you're calling `flush()` in onPause. it may be being buffered on the device until that call. Jun 02 20:50:36 im not doing it in the main thread, i have a startServer() function where at the end I’m reading and then writining to in/out streams Jun 02 20:51:13 on the android side I have a method sendMessage() which writes to the outstream Jun 02 20:51:16 Gormandy: you have onClick() { sendMessage(data); } which starts pushing data through sockets, all on the main thread. Jun 02 20:51:28 that should exclusively be on a background thread of some kind Jun 02 20:51:47 oh. this was just a proof of concept thing i didn’t wanna use threading =/ Jun 02 20:52:33 Anyoneknow if there is a time utils plugin for intellij/android studio? Jun 02 20:52:58 bolovanos: dunno. I'm going to guess that it's because classes / variables aren't _called_, they're just referenced / accessed. (a fairly small distinction, but definitely something) Jun 02 20:53:17 groxx: how do I go about fixing my errors? Jun 02 20:55:10 Gormandy: well, typically you have (at least) two threads for socket communication. one for reading, one for writing. but anyway: as far as getting it to work, try just flushing at the end of sendMessage. and receive may(?) just block until it reads some data, which is why it needs to be on a different thread anyway. Jun 02 20:55:25 so if you time things correctly it might work out, but definitely not in general Jun 02 20:56:23 would anyone care to explain this to me? i feel like i'm taking crazy pills https://goo.gl/ySRDH2 Jun 02 20:57:10 treelzebub: which part? Jun 02 20:57:45 the part where it says isGooglePlayServicesAvailable is deprecated, use isGooglePlayServicesAvailable instead :| Jun 02 20:57:50 hehe Jun 02 20:57:53 i see that too Jun 02 20:58:11 maybe a method of teh same name on a different object? Jun 02 20:58:15 treelzebub: if you click it, it takes you to GooglePlayAvailability#isGPSA, instead of GPSUtils#isGPSA :) Jun 02 20:58:43 Ah! Same static method, different class. thanks. i need a break ;) Jun 02 20:58:46 I do wish they qualified that link a bit better though Jun 02 20:58:51 and/or more coffee! Jun 02 20:59:08 exactly right. thanks again. not sure how long that would have taken me at this point lulz Jun 02 20:59:16 coffee can not be had with breaks! Jun 02 20:59:30 but...but i'm a *closer* ! Jun 02 20:59:46 I'm a *further* ! Jun 02 21:00:34 How do you keep a Activity transition animation behin other views? It seems to jump it into the front of everything. Makes the animation look flickery Jun 02 21:00:47 Join #qt Jun 02 21:01:00 hahah Jun 02 21:01:13 Sorry Jun 02 21:03:41 groxx: since I don’t really need send and receive methods separately (the communication only needs to happen once) I added a write followed by a read both in the “sendMessage” method and flushed appropriately, but not it just hangs Jun 02 21:04:35 Gormandy: not sure, sorry :| I haven't done much with sockets directly. Jun 02 21:05:40 groxx: thanks anyway :) Jun 02 21:06:39 perhaps g00s would know, if there's something specific to bluetooth? Jun 02 21:07:57 I don't know if the next question is here right but it's app specific. Can I get something what is set in the settings app? Settings-> Developer options-> and there I will read the set things Jun 02 21:10:34 I saw the Settings things but I can't find there things for developer options Jun 02 21:11:05 fire855: not quite sure what you mean. you can't find developer options? Jun 02 21:12:13 I know that it's possible to get setting values. But how can I get something from developer options? Jun 02 21:12:33 ah. dunno. Jun 02 21:12:51 http://developer.android.com/reference/android/provider/Settings.html Jun 02 21:14:02 fire855: looks like some are under http://developer.android.com/reference/android/provider/Settings.Global.html e.g. ALWAYS_FINISH_ACTIVITIES is a dev-only setting Jun 02 21:18:55 calendar.setTimeInMillis(someepochtime); String date = Util.getPrettyDate(calendar.getTimeInMillis()); date = 6/1/2015. Calendar.add(Calendar.DATE, 1); String tomorrow = Utils.getPrettyDate(calendar.getTimeInMillis()); tomorrow is now euqal to like 2/26/2018 Jun 02 21:18:58 Anyone know why this is? Jun 02 21:25:39 lasserix: dunno. are you sure getPrettyDate is working? Jun 02 21:26:05 i.e. what's newTime - oldTime? ~ 24 hours in milliseconds, or something bigger? Jun 02 21:46:06 Dyeah Jun 02 21:46:08 it works Jun 02 21:46:23 the calendar add is not working Jun 02 21:46:38 maybe you can't set calender in epoch then add a day or something Jun 02 21:47:40 sorry it took me so long to repsond trying to get around damn us millinium digital copyright act Jun 02 21:48:21 Hey whats the best site to host a beta app as I dont want to pay the money google charge Jun 02 21:48:34 well fixed it by just adding a day of millseconds to epoch time and setting it that way Jun 02 21:48:45 * sir_galahad_ad didn't think google charged that much do they? Jun 02 21:50:46 satdav: could just email the apk to people. otherwise, Fabric's beta thing is pretty decent, as a user (dunno as a dev) Jun 02 21:51:22 do you have a link to Fabric's beta thing groxx Jun 02 21:51:56 https://get.fabric.io/beta Jun 02 21:52:16 a place to host and have it searchable like playstore or just a place to have people goto download it? Jun 02 21:54:13 canvs2321: well both would be good Jun 02 21:57:29 the problem is having users smart enough/brave enough to enable 3rd party apps. Jun 02 21:58:03 true lol Jun 02 21:59:38 is frabic beta thing free? Jun 02 22:00:19 canvs2321: I am looking at that one what groxx said or crashlytics Jun 02 22:00:36 Fabric == Crashlytics + a couple other things Jun 02 22:01:13 too bad there arent tools to port apps to ios Jun 02 22:01:17 beta thing sounds good Jun 02 22:01:25 I use app inverntor to make the apps the now Jun 02 22:01:39 DarkChaoz: or the other way about for apps port to android Jun 02 22:02:03 yeah Jun 02 22:02:23 twitter themselves deal in native apps for each platform. It makes sense that they’d only be interested in tools that do the same Jun 02 22:02:24 Crashlyics is comeout ndk for it if i rem right. Jun 02 22:02:47 cbb to redo apps in objective c since its simple Jun 02 22:02:53 a port would be just fne Jun 02 22:03:02 but there arent decent tools :| Jun 02 22:03:52 most ports are not fine. they work like crap, and they don’t adopt the native UI/UX of the destination platform Jun 02 22:04:36 mhmm Jun 02 22:04:53 then i might have to rule out an ios version lol Jun 02 22:05:07 no way im gunna buy a mac just to download iphone sdk Jun 02 22:09:11 why are you talking about ports anyway, then? You can’t submit an iOS app without a mac Jun 02 22:10:13 some require big macs too Jun 02 22:11:32 no, they don't Jun 02 22:41:24 Calendar.get(Calendar.MONTH) always returns 0 Jun 02 22:41:28 I need to read a single string over NFC from a tag when a user presses a button, how do I do that? Jun 02 22:41:37 if i look in javadoc says something about calling complete() first, wtf is that? Jun 02 22:41:38 is there like a library… nfc.readTag Jun 02 22:42:42 http://stackoverflow.com/questions/4694371/why-does-calendar-getcalendar-month-return-0 Jun 02 22:49:48 just downloaded android studio there Jun 02 22:50:03 is that the best if you dont want to add your app to the app store as they dont do paypal Jun 02 22:50:44 I have Calendar cal = Calender.getInstance(TimeZone.getDefaultTImeZone(()); then i do cal.setTimeInMillis(someEpochLong); now if i pass this cal off as a date for simple date format i'll get the right date Jun 02 22:51:00 but if i call any methods like cal.get(Calendar.MONTH) none of the values year, day, etc are correct Jun 02 22:51:03 why is this? Jun 02 22:55:02 satdav: The app store has little to do with the IDE. Jun 02 22:55:13 Android Studio is worth using regardless. Jun 02 22:57:05 does Android have a named tuple? Jun 02 22:59:12 only Pair<> Jun 02 22:59:18 class NamedTuple { private Foo foo; private Bar bar; } Jun 02 22:59:22 That's about the best, I think. Jun 02 22:59:24 java itself doesn't really have tuples Jun 02 22:59:47 for lack of variadic generics, and lack of semantic meaning of something that is just a tuple Jun 02 23:02:55 dang dragorn its chilly for June Jun 02 23:03:12 el nino Jun 02 23:10:23 java.util.Calendar is a pita Jun 02 23:11:21 leeerroooooooooyyy Jun 02 23:11:30 Odaym stfu Jun 02 23:11:42 well deserved Jun 02 23:12:06 .-. Jun 02 23:12:29 g00s_, yup Jun 02 23:12:55 I'm making something out of all this babble, by the way: http://imgur.com/a/zAWqg Jun 02 23:13:02 the talk is tomorrow Jun 02 23:14:00 I didnt pick the title Jun 02 23:14:57 mechatronics engineering sounds like a company that would build things to fight Godzilla Jun 02 23:15:20 they are wankers man Jun 02 23:15:35 its the university I graduated from, its really shit Jun 02 23:16:18 but a lot of people Jun 02 23:17:18 in that university we had 1 guy who taught 7 core courses in CS Jun 02 23:17:30 7 topics that he is EXPERT in, haha Jun 02 23:18:01 he once said that his doctorate was a compiler that understood any language Jun 02 23:18:24 Wut Jun 02 23:18:29 yea man Jun 02 23:18:49 my onclick in my fragment isn't going off. any ideas? i have two toasts. the one in the onclick doesnt work. http://pastebin.com/1saqc8Ck Jun 02 23:19:11 Thats the most garbage crap i ever heard Jun 02 23:19:21 that's easy Jun 02 23:19:23 Did he ever show his compiler? Jun 02 23:19:34 stringInLanguage(String str) { return true; } Jun 02 23:19:35 they didnt understand how to correct it Jun 02 23:19:39 is what he says :) Jun 02 23:19:48 lol Jun 02 23:19:49 it was ahead of its time you see Jun 02 23:19:54 those simpletons Jun 02 23:20:01 ahh Jun 02 23:20:06 lol Jun 02 23:26:46 my onclick in my fragment isn't going off. any ideas? i have two toasts. the one in the onclick doesnt work. http://pastebin.com/1saqc8Ck Jun 02 23:27:41 how is that even running Jun 02 23:27:46 infinite inflate Jun 02 23:27:51 lol Jun 02 23:27:59 Magic of android Jun 02 23:29:00 eghdk: change your return statement to return view; you have modified your "view" variable, but then inflated a new one with your return statement Jun 02 23:39:01 treelzebub: thank you! Jun 02 23:39:45 eghdk: no problem! it's nice when people answer your question instead of just making fun of you, isn't it ;) Jun 02 23:42:11 treelzebub: yes. I have been stuck on that for so long. so stupid. Jun 02 23:43:24 i know the feeling very, very well. Jun 02 23:44:47 yea answer his question cause its so beneficial Jun 02 23:45:38 It is lol Jun 02 23:46:00 to solving the thing now? yea Jun 02 23:46:02 it will solve it Jun 02 23:46:39 sorry, thought this was the android-dev channel Jun 02 23:46:48 I'd just google the answer first then ask here Jun 02 23:46:54 It is Jun 02 23:47:02 I usually come here and ask for help Jun 02 23:47:19 Generally i have to figure out the issue myself -__- Jun 02 23:47:36 Speaking of issue i have one more >.> Jun 02 23:47:46 But that is for another time Jun 03 00:25:54 Is it recommended to use ProGuard before releasing an app on the store? Jun 03 00:26:02 And if yes, then is it easy to use? Jun 03 00:26:36 warning: religuous war ahead Jun 03 00:27:24 t0astt doesn't hurt, as long as you know what to do with your libraries. often they need special directives Jun 03 00:27:57 here are some https://github.com/krschultz/android-proguard-snippets Jun 03 00:28:09 Oh, ok. I'll look into that then. Is there anything special I need to do to an app before releasing it on the store? I saw something in Android Studio about generating a signed apk? Do I need to do that? Jun 03 00:28:45 yeah you need to create your private key, and sign the apk in release mode Jun 03 00:28:57 its on d.android.com Jun 03 00:29:14 t0astt: make sure you store the private key somewhere safe. If you lose it, then you won't be able to update the application Jun 03 00:29:43 ok Jun 03 00:30:02 my client has an old version of the app on the store, we're launching the version I developed as an update. Should I get the private key from him? Jun 03 00:30:08 yes Jun 03 00:30:24 you're using the same package name, right? Jun 03 00:30:24 Ok. He says he doesn't have it... Jun 03 00:30:44 well, see above re: not being able to update :) Jun 03 00:30:49 Right ok Jun 03 00:30:56 if that is the case, you'll have to rename the package name, and upload it as a new app Jun 03 00:31:04 Ok Jun 03 00:31:11 and then somehow tell users of the old app they should uninstall that one and install the new one Jun 03 00:31:47 Ok Jun 03 00:33:08 when i try to use getParcelableArrayList it returns a ArrayList but i think i need it to return my object so i can set it. Am i using this right? Jun 03 00:34:08 i posted my code here http://stackoverflow.com/questions/30608681/getparcelablearraylist-returns-a-parcelable-but-i-need-it-to-return-my-object Jun 03 00:34:38 it can never return your object directly Jun 03 00:34:39 cast it Jun 03 00:36:26 i tried casting like (ArrayList) but it says its inconvertible, they both implement parcelable Jun 03 00:37:39 such is the wonders of Java’s generics system Jun 03 00:38:36 QuoteQuestion implements Parcelable? Jun 03 00:39:30 surf2b1 yeah and it overrides the 5 methods Jun 03 00:39:59 NateRiver_: Most big multi UI apps don’t bother with Parcelable for passing data between activites Jun 03 00:40:16 they have some kind of singleton data store Jun 03 00:40:35 hm. that kind of syntax works for me, at least when assigning to a `List` variable Jun 03 00:41:01 you only use parcelable if you're doing ipc, or state that persists beyond process lifecycle Jun 03 00:41:10 e.g. AlarmManager, etc. Jun 03 00:41:28 anything else is just pain Jun 03 00:41:29 or any startActivity / fragment.setArguments Jun 03 00:41:45 well, startActivity and fragment can all look up from a singleton Jun 03 00:41:53 if the process is still alive Jun 03 00:43:10 so if i have a user and im trying to keep track of their score through a bunch of fragments i should learn singletron? Jun 03 00:45:22 generally, you want to put a small amount of data into intents / bundles, nothing more. ideally _just_ enough to recreate your UI if necessary (e.g. an ID of a row in a database, instead of the row's contents). that's for recreating your app after your process has died. while your process is still alive, you can just use in-memory data like any other Jun 03 00:45:22 piece of Java code. Jun 03 00:46:27 there's a limit to how much you can store (~1mb iirc), and it can surprise you if you don't keep a tight reign on it, because it's not too likely to crash while you're building the app because there's no need to actually parcel stuff in manyc ases Jun 03 00:48:22 groxx, ive made games in java swing and usually ill pass classes into the contsructors of other classes to let them know about the model and connect everything, - what is in in-memory data? Jun 03 00:50:05 NateRiver_: variables, basically. but keep in mind that when someone leaves your app, you have a short window to save stuff (before onStop finishes, and/or onSaveInstanceState), and after that Android can (and will) kill your app whenever it feels like it. you don't get called before that happens. then, if they resume your app, it'll recreate _just_ the Jun 03 00:50:05 activity that's visible, and nothing else, from saved state. Jun 03 00:54:02 groxx so like static variables? i read about all the destroying and recreating stuff, but i thought thats why we need parcelables Jun 03 00:55:08 sry im confused, what should i google? Jun 03 00:55:11 it is why you need parcelables. but it's still Java, so e.g. rotating your phone won't destroy your static state Jun 03 00:56:36 I figured out what the problem was, in the library he has this line https://github.com/PaNaVTEC/DrawableView/blob/master/library/src/main/java/me/panavtec/drawableview/draw/CanvasDrawer.java#L32 Jun 03 00:57:33 it scales the canvas, so you have the drawableview set to whatever size, if you set the canvas that's sitting inside that drawableView (by means of setting the drawableView's config) to the same height and width of the drawableView, the canvas goes out of proportion cause it was scaled Jun 03 00:57:57 any idea how I can account for that scaling when feeding it the numbers? dividing by 2 didnt work :) Jun 03 00:58:22 and scale() doesnt say what it does exactly, where can I find the canvas class in the android source Jun 03 00:58:52 ah ok Jun 03 01:00:56 okay thanks i think i get it Jun 03 01:04:23 Can anyone tell me what JakeWharton meant by this on twitter? "New design support lib sheds the min API suffixed name in the realization of "duh" that the distribution of OS versions changes over time." Jun 03 01:04:33 means it's not named design-v7 Jun 03 01:05:52 I don't get why v7 still wouldn't be acceptable. I guess I don't get your "duh" statement. Please explain if you have a sec. Thanks JakeWharton Jun 03 01:06:10 because no one needs API 7 support in 2018 Jun 03 01:06:20 no one needs API 4 support in 2015 and yet we have support-v4 Jun 03 01:06:36 putting the minimum API in the name is a horrible, terrible, very bad idea Jun 03 01:09:34 not to mention the other naming problems of the support library suites Jun 03 01:10:27 support-v13 which is basically 4 classes that just add onto support-v4 Jun 03 01:17:36 gotcha. that makes sense. Thanks Jun 03 01:29:54 CedricBeust i read your sqlite on android last night. You have a method that creates a callables, not sure why you would do that vs uses Observable.just / Observable.defer Jun 03 01:58:11 oh oh, its here. Toothbrush with bluetooth and app Jun 03 01:58:18 http://www.oralbnordic.com/en-SE/product-detail/black-oral-b-pro-7000-smartseries-electric-toothbrush Jun 03 02:01:45 g00s_: I'll get back to you, you might be right Jun 03 02:02:27 g00s_: Ah wait no, I have an answer right now: Observable.just() will evaluate the result right now. Sounds like defer() won't? Jun 03 02:02:37 It needs to be lazy Jun 03 02:06:07 g00s_: defer() is not going to help either, you need to return a closure otherwise the value won't be lazy Jun 03 02:10:10 CedricBeust using defer here http://blog.danlew.net/2014/10/08/grokking-rxjava-part-4/ Jun 03 02:11:03 there are the rxjava async utils, which create observables from Actions, func, and a bunch of other things like method references but i haven't used them Jun 03 02:12:45 g00s_: Ah yes, maybe it would work. It boils down to the same, though, my Callable-based implementation also only runs if you subscribe to it Jun 03 02:12:59 so it's just a matter of preference, whether you want to be 100% using Rx functions or not Jun 03 02:15:45 no lead on this? :( http://stackoverflow.com/questions/30554824/how-to-reset-the-toolbar-position-controlled-by-the-coordinatorlayout Jun 03 02:21:37 razzledazzle: dunno. I haven't tried coordinatorlayout yet :| though does @string/etc work for a flags field like that? seems like possibly not? Jun 03 02:22:34 you mean on that FrameLayout groxx? Jun 03 02:22:42 yeah Jun 03 02:22:55 surprisingly, yes :D Jun 03 02:23:01 though since you say it's working up to that point, so yeah, I guess it probably does Jun 03 02:23:03 huh Jun 03 02:23:04 TIL Jun 03 02:23:10 it does! Jun 03 02:23:44 which is why it responds to the RecyclerView in the Fragment Jun 03 02:23:49 g00s_: Any other feedback on the article? Jun 03 02:24:04 razzledazzle: unless that's the default behavior, and it's just not throwing an exception (hopefully it would). but yeah :) Jun 03 02:24:30 razzledazzle: don't suppose you can just tell it to scrollTo(0,0)? Jun 03 02:25:26 I did, the RecyclerView goes to the top but the Toolbar shows no change Jun 03 02:26:02 that happens when you `toolbar.scrollTo()`? Jun 03 02:26:27 CedricBeust not at this time; i enjoyed reading it. its always been something that never seems right in my app; currently i have a mixture of Content Provider, Loaders, ContentObservers for the queries, and plain 'ol sqlite for insert / delete / update - and a smattering of rx on top of this. Jun 03 02:26:30 oh, haven't tried it on the toolbar Jun 03 02:26:49 g00s_: Let me know if you adopt some of my ideas, I'm sure we can increment on them Jun 03 02:27:06 maybe I'll get a chance to read coordinatorlayout some day here :| until then, unfortunately, I'm stuck guessing randomly Jun 03 02:27:10 content provides tend to turn code into spaghetti really quick, I stay away from it unless I need to export the data Jun 03 02:27:41 The async read design pattern has been surprisingly easy to implement, lightweight and super flexible Jun 03 02:27:59 So simple it's not even worth putting into its own library Jun 03 02:29:26 yeah i'm most interested in the design pattern, i dont think the solution is a library Jun 03 02:30:18 I can't help but wonder if there's a way-less-garbage-producing subset of rx that's still interesting :| every time I look at it I can't stop looking at `new { new { new { new { new { new }}}}}}}}}}}}` Jun 03 02:30:48 groxx: We have to live with that so far and trust that the GC is pretty good. The good news is that: it is indeed super good Jun 03 02:31:09 dunno if I'd claim that :) but for infrequent stuff, yeah, I produce way more garbage elsewhere. Jun 03 02:31:41 I would totally claim that, especially for short-lived objects, exactly the kind thar Rx creates Jun 03 02:32:06 CedricBeust my content provider is rather anemic; it doesn't even implement insert, update, or delete. And only a few uris for the query so I can use cursorLoader. However, i *do* like the Uri convention of topics and patterns for signaling changes, so my rx-ified code often does plain sqlite operation + ContentResolver.notifyChange(Uri) - you get a free topic based event bus of sorts Jun 03 02:32:32 ART specifically, or dalvik too? dalvik seems rather not-awesome at making lots of throwaway objects Jun 03 02:33:18 CedricBeust groxx yeah, when i read these articles, i wonder what they would all say about my rx https://medium.com/google-developers/developing-for-android-introduction-5345b451567c Jun 03 02:33:40 i think i know what they would say actually :( Jun 03 02:33:52 so much to read, try and test, overwhelmed Jun 03 02:38:59 CedricBeust: actually, is dalvik even a generational GC? or ART for that matter (I think so?). Rx on a generational GC is likely quite cheap, yeah, dunno if that maps to android though. Jun 03 02:40:05 dalvik is not Jun 03 02:40:47 i have screwed myself with cursors fragmenting the memory enough to OOM the device on crappy phones with CursorLoader Jun 03 02:41:37 over long period of time (updating once every 2 seconds) small/medium query Jun 03 02:41:55 g00s_: I get fragmentation ooms frequently on craphones. lots of big bitmaps + long sessions + no bitmap reuse = death. Jun 03 02:42:12 :( Jun 03 02:42:21 but that's the compacting GC pipe dream. Jun 03 02:43:06 + Gingerbread got rid of the large heap and methods Jun 03 02:43:19 groxx: scrollTo didn't work :\ well then, to ditch the hamburger now? :P Jun 03 02:43:23 blah autocorrect, wow Jun 03 02:54:57 razzledazzle: dunno :| wait for a bugfix release maybe, then retry? sounds like it has a couple issues Jun 03 02:55:07 CedricBeust this was good from today http://stablekernel.com/blog/mvvm-on-android-using-the-data-binding-library/ Jun 03 02:57:27 CedricBeust i was reading the other day that the data binding library had a dependency on kotlin O.o was kinda strange Jun 03 02:58:00 actually TacticalJoke pointed it out **** ENDING LOGGING AT Wed Jun 03 02:59:58 2015