**** BEGIN LOGGING AT Wed Apr 22 02:59:58 2015 Apr 22 03:00:16 are the gradle-samples located at http://tools.android.com/tech-docs/new-build-system still the official samples ? Apr 22 03:00:20 they seem out of date Apr 22 03:00:25 DadFoundMy: BTW, if you do do this, make sure that you cancel the post when the activity goes down or whatever. Apr 22 03:00:31 Or in onStop or something. Apr 22 03:00:45 im not using gradle when i develop android apps Apr 22 03:00:48 should i be Apr 22 03:01:06 Are you not using Android Studio? Apr 22 03:01:10 nope Apr 22 03:01:12 im using intellij Apr 22 03:01:20 intellij 14 Apr 22 03:01:22 hm. not sure, then. Apr 22 03:01:25 Are you using Maven? Apr 22 03:01:25 when the xhdpi drawable image resource is resized on my xxhdpi devicie? Apr 22 03:01:28 nope Apr 22 03:01:37 when the xhdpi drawable image resource is resized on my xxhdpi device? Apr 22 03:01:50 aspire: What are you using as a build system? Apr 22 03:01:59 when a app is launched? for app is installed? Apr 22 03:02:22 when a app is launched? or app is installed? Apr 22 03:02:31 TacticalJoke im not sure how to answer that question Apr 22 03:02:39 is nothing an acceptable answer or nah Apr 22 03:02:42 :D Apr 22 03:02:57 You should probably be using Gradle. Apr 22 03:03:00 apktool :| Apr 22 03:03:03 We've reached the "YES" part of the flow chart. Apr 22 03:03:09 haha Apr 22 03:03:36 how come Apr 22 03:04:02 Let's say that you want to use AppCompat. With Gradle, it's very easy. Apr 22 03:04:23 it's "copy/paste compile 'com.android.support:appcompat-v7:21.0.3'" easy Apr 22 03:05:20 Gradle is this big awesome thing. Apr 22 03:05:23 And you're missing out! Apr 22 03:07:23 if i put the image resource only to drawable-xxhdpi, the performance of hdpi or xhdpi device is affected by that? Apr 22 03:07:30 https://imgur.com/KMM8q Apr 22 03:07:37 Using Gradle is like being a toddler on a bouncy castle. You just don't want to leave. Apr 22 03:07:40 crazy_rudy_ maybe, for low end devices Apr 22 03:07:46 But it does get tiring. Apr 22 03:07:58 g00s : Apr 22 03:08:57 g00s: then, is that huge performance lose? Apr 22 03:09:00 g00s: then, is that huge performance loss? Apr 22 03:09:11 crazy_rudy_ is your irc broken :| Apr 22 03:09:34 nope Apr 22 03:09:46 why keep asking things twice? Apr 22 03:09:48 why keep asking things twice? Apr 22 03:09:53 it's probably not Apr 22 03:09:54 huge Apr 22 03:09:55 why not? Apr 22 03:09:56 why not? Apr 22 03:10:20 b3sides you can just scale down in photoshop and save to ldpi, mdpi, etc Apr 22 03:12:34 They don't call him crazy_rudy_ for nothing. Apr 22 03:16:00 "Mesa woman guilty of running over husband after '12 election" ... so AZ Apr 22 03:17:04 so i wonder how much larger this appcompat is compared to the other in # methods Apr 22 03:17:16 hrmm, find script Apr 22 03:19:07 how do i detect when a wifiAP hotstop is disabled ? it doesnt seem to throw any intent Apr 22 03:19:32 am I left with a check method being called regularly ? Apr 22 03:25:13 Marlinski pretty much all those APIs are stochastic Apr 22 03:28:23 g00s: I think you just described android development in a nutshell Apr 22 03:28:43 g00s: that's my feeling from the beginning Apr 22 03:29:03 g00s: but actually my bluetooth and wifi (managed mode) works well right now :) Apr 22 03:40:23 Guys when using BitmapFactory.decode() what should the offset be Apr 22 03:40:29 Thats passed into the decode method Apr 22 03:40:55 Trying to decode a byteArray into a bitmap, but I passed in 0 as the offset and im getting a OutOfMemory exception Apr 22 04:03:39 how can a foreground service run in its own thread ? Apr 22 04:03:46 speech after long silence, it is right... Apr 22 04:04:26 I just started going through the modern Android tutorial. It is as fscked up as the old Android tutorial from three years ago. Apr 22 04:04:45 I wonder how the hell they think any newbie will ever learn Android from it. Apr 22 04:08:02 Ologn: There are hundreds of thousands of Android devs out there, I guess they get by Apr 22 04:08:48 if anything, the biggest problem I see is people who obviously _haven't_ gone through the tutorial(s) on the site, and instead Vogella'd everything and have no idea how anything works Apr 22 04:09:09 CedricBeust, they are getting by, but going on the basis of how often apps of major companies like Fandango crash for me, their users are not getting by Apr 22 04:09:25 hey Ologn haven't seen you around in a while Apr 22 04:09:42 that really doesn't compute. therefore ? Apr 22 04:10:22 Ologn still have the MS database app ? Apr 22 04:10:48 g00s, yaa, I think it's breaking for Android 5.0, I guess I have to fix it Apr 22 04:12:10 Ologn did you take a break from android? working on other things ? Apr 22 04:12:46 Ologn btw, since you seem to read these, 'Art of the Start 2.0' came out recently Apr 22 04:13:03 I started learning android 6 months ago, at first I was a bit lost but I found it pretty easy to get along, easier than I would have thought Apr 22 04:13:18 Ologn also, did you see https://news.ycombinator.com/item?id=9369577 Apr 22 04:13:29 android-studio and gradle took me by the hand also :p Apr 22 04:13:51 g00s, yes and no. I've been doing more Python stuff, but am back to doing more Android stuff now. Apr 22 04:15:23 g00s, oh cool! Although this is what my /etc/hosts file looks like Apr 22 04:15:45 $ grep news.ycombinator.com /etc/hosts Apr 22 04:15:52 127.0.0.1 news.ycombinator.com Apr 22 04:16:08 probably a good idea :) Apr 22 04:16:13 lol Apr 22 04:16:15 yeah i haven't done any python in a while; i did just read an article about why so few migrated to Python 3; the consensus seems to be lack of concurrency + GIL Apr 22 04:16:27 Ologn: tl;dr bit.ly/theleadersguide Apr 22 04:17:02 g00s, I have been doing a lot of work porting Xscreensaver to Android Apr 22 04:17:29 Ologn oh yeah, now i remember you were working on that Apr 22 04:17:40 btw i use this for my /etc/hosts http://someonewhocares.org/hosts - highly recommended :) Apr 22 04:17:41 jwz's app? Apr 22 04:18:00 He included it in the last version...next version may have my newest patches...and I'm writing even more patches Apr 22 04:18:14 CedricBeust, yes - https://www.youtube.com/watch?v=_cZA51FXm-4 Apr 22 04:20:40 g00s, it's a number of reasons...I mean Ubuntu has lots of package support for python2, less for python3...although I use pip3 for things Apr 22 04:23:56 Guys I got a question Apr 22 04:24:07 Im storing images in a database as Base64 strings Apr 22 04:24:17 yeowza Apr 22 04:24:20 Then to show the images in the app I decode into byte array Apr 22 04:24:24 Then into bitmap Apr 22 04:24:36 Is that ok? The base64 string is _wicked_ long Apr 22 04:24:55 keep the images out of the database Apr 22 04:25:22 Right Apr 22 04:25:27 Im just keeping the string in the databaser Apr 22 04:25:31 store a uri, put the image on the filesystem. there are a variety of good reasons to do so. Apr 22 04:25:32 database* Apr 22 04:25:41 Store them on a server, store the url in your dv Apr 22 04:25:42 db* Apr 22 04:26:09 I was having trouble moving from an image Uri I got from a chooser intent to a file to upload to server Apr 22 04:27:22 Base64 string is simple enough, just crazy long Apr 22 04:28:44 hey I have an issue with networking on the mainthread. How can I have a service running in its own thread, receiving intent (such as link goes down or up) Apr 22 04:29:06 because right now the network service is initiated from the main thread Apr 22 04:29:21 but if I use a Thread, I will have to block somewhere to avoid exiting the thread Apr 22 04:29:34 but as far as I know there is no blocking for receiving intent Apr 22 04:29:46 what? Apr 22 04:29:54 Marlinski: Do the heavywork on a background thread and when you're ready to update the UI, post on the main thread Apr 22 04:30:03 you might want to look at an IntentService Apr 22 04:30:16 my service run in foreground Apr 22 04:30:26 that's a bit too high level for someone who doesn't understand threads, suggest a book, jcip Apr 22 04:30:35 I understand thread Apr 22 04:30:41 or use something easier like intent service Apr 22 04:33:10 hmm Apr 22 04:33:55 right now I have a service which when started register for some connectivity intent and when it does receive some, it start/stop some network thread Apr 22 04:34:21 for instance if it detects the wifi link goes up, it starts a server thread Apr 22 04:34:30 right now this service is a foreground service Apr 22 04:34:53 but it actually runs from the main UI Thread because it has been called when the app started Apr 22 04:35:13 services all run on the main thread Apr 22 04:35:16 Marlinski: Are you sure it's running on the main thread? Are you printing the thread id? Apr 22 04:35:18 exactly Apr 22 04:35:30 use an intent service Apr 22 04:35:30 no i am sure because i have a mainthreaduiexception Apr 22 04:35:34 or a thread Apr 22 04:35:39 or an async task Apr 22 04:35:45 pfnQ: a thread to do what exactly ? Apr 22 04:35:52 what would be the while loop Apr 22 04:35:53 Yeah then AsyncTask if you like to live dangerously Apr 22 04:36:00 since it only register a broadcast receiver Apr 22 04:36:04 and waits to receive intent Apr 22 04:36:31 Marlinski: you could use a HandlerThread, and send a message to it with a handler Apr 22 04:36:41 .. or use an IntentService, which essentially does just that. Apr 22 04:37:35 JesusFreke: no because it is not a one-shot intent Apr 22 04:37:53 JesusFreke: the service shall run in foreground as long as the app is not shutdown Apr 22 04:38:09 when link goes up, it starts some thread, when link goes down it stop others, etc. Apr 22 04:38:44 So start a HandlerThread, and when you need to do some work off of the main thread, send a message to it. Apr 22 04:43:57 dragorn nice :D http://arstechnica.com/information-technology/2015/04/this-machine-catches-stingrays-pwnie-express-demos-cellular-threat-detector/ Apr 22 04:53:29 ok, I just coated the "start/stop" calls into a Thread object :) not the best design but it's effective Apr 22 05:07:51 <_genuser_> heyo ppl. Apr 22 05:11:10 hi Apr 22 05:12:44 <_genuser_> told the recruiter to talk more about the job descriptions... Apr 22 05:16:50 ugh, parameterized tests in junit 4 ... Apr 22 05:16:56 gaaahhhh Apr 22 05:17:14 <_genuser_> wait somebody uses those junit tests? Apr 22 05:20:12 i thought i saw a blog post on using junit4 on android Apr 22 05:22:13 well shit; i have to test 60 things which are all ... parameters really of the same test. i'm not writing 60 methods Apr 22 05:22:26 i guess i can just do it it a loop Apr 22 05:22:29 lame Apr 22 05:25:43 screw it, no test. this is android. Apr 22 05:28:52 hey anyone here have exp and looking for a job in the LA area? Apr 22 05:29:01 oh shit Apr 22 05:29:18 * Tricknology kicks self Apr 22 05:29:29 JakeWharton does this still support android https://github.com/square/burst ? i saw 'drop junit 3 support' Apr 22 05:29:40 BurstAndroid Apr 22 05:34:53 <_genuser_> g00s: I think I"ve always done unit testing but without using junit/nunit type packages. Apr 22 05:35:38 <_genuser_> g00s: I write a class/object, add methods, test them out with all sort of inputs (my fellow engineers tell me I could have written that as junit tester class once and re-used over and over). Apr 22 05:35:57 <_genuser_> I figure, if my method doens't change, I don't have to runing the unit test over and over on it. and etc. Apr 22 05:36:23 <_genuser_> I'll do something similar with process flow, where I'll try calling functions out of order or without proper initialization to make sure it works ok. Apr 22 05:38:38 if your method doesn't change? That's one of the big benefits of tests - ensuring that everything still works when things change. Apr 22 05:39:20 i dont understand why google couldn't start shipping android with junit 4 like - 5 years ago Apr 22 05:39:50 so is 5.1 still using junit 3 ? Apr 22 05:39:51 <_genuser_> right, if the method doesn't change no use running unit testing on it over and over. especially exhaustive testing. Apr 22 05:40:42 <_genuser_> but if it does change, I'll have to test it again with all the input. this is the point my friends tell me where I can save time by having written the test cases once so I can re-use them here instead of re-writing them. Apr 22 05:41:17 give it time :) Apr 22 05:41:21 Hello Apr 22 05:41:29 as you get more experienced, you'll figure out the value of tests. Apr 22 05:41:33 bepolite go away Apr 22 05:41:33 wich good book can you guys suggest on android app development Apr 22 05:41:46 jk :D Apr 22 05:42:04 <_genuser_> not devaluing tests in anyway. I am explicitly stating that on initial completion and on any changes, I test it thoroughly. Apr 22 05:42:22 bepolite this is a bad time for android books, if you want something totally up to dats your only choice is commonsware Apr 22 05:42:31 <_genuser_> the different is, instead of using a package like junit/nunit where I write tests once and re-use many times, I write the test cases when needed everytime. Apr 22 05:42:43 _genuser_: you're making my point for me :) Apr 22 05:43:03 g00s: commonsware? Apr 22 05:43:05 whats that? Apr 22 05:43:15 you can google it Apr 22 05:43:17 <_genuser_> JesusFreke: I think I missed your point then. Are you saying that the time wasted in re-writin them could be saved? Apr 22 05:44:24 thanks g00s Apr 22 05:44:27 junit4 can be shoe horned into instrumentation tests Apr 22 05:44:37 it's somewhat painful though Apr 22 05:46:04 _genuser_: that's like saying "instead of writing a common method that I can call when needed, I just write the same code every time I need to do that operation" Apr 22 05:46:35 <_genuser_> JesusFreke: I see, you're saying that write once, reuse anytime has great advantage. Apr 22 05:46:43 <_genuser_> I haven't actually ever denied that. Apr 22 05:46:58 I just hate testing because of the need for making mock data Apr 22 05:47:07 <_genuser_> my reason for not using unit testing packages was that I never started. Apr 22 05:47:37 <_genuser_> I have nothing against the unit testing packages actually. But I haven't needed it badly so far. Apr 22 05:48:00 they're easy to use Apr 22 05:48:06 <_genuser_> I'll typically have a method that passes all sorts of data to an object function and tests it. Apr 22 05:48:09 nothing about needing it. badly Apr 22 05:48:28 <_genuser_> then I'll leave this method in my test project/harness for when I need to re-use it. Apr 22 05:48:50 <_genuser_> but main disadvantage of this approach is that I can't do stuff like, "run all unit tests again and tell me which one fails". Apr 22 05:49:14 * g00s has no idea what _genuser_ is talking about :) Apr 22 05:49:54 <_genuser_> g00s heh, I've been doing unit testing a hacky way forever and now discussing it here. I have been thinking of looking into the nunit package for my work stuff. Apr 22 05:50:27 sbt ~testQuick is fucking awesome Apr 22 05:51:23 but i dont get why in 2015, google would be using junit 3 with the latest android Apr 22 05:52:51 is it hard for them to change it without breaking all the things ? Apr 22 05:55:10 <_genuser_> so that brings me to the question I was going to ask. Are you all usign the test project in AS. Is that a JUnit project or just a project you're supposed to use for testing, regardless of the package you use? Apr 22 05:55:13 hmm. android:keepScreenOn doesn't work if the view is in a fragment Apr 22 06:02:24 _genuser_: not really. I think you just have to create the parallel test source tree Apr 22 06:02:31 so you have like src/main/java, and then src/test/java Apr 22 06:02:40 and you put your junit tests in thet src/test/java tree Apr 22 06:05:05 just noticed https://plus.google.com/+AndroidDevelopers/posts/Asi9hzcmCJo Apr 22 06:05:11 <_genuser_> JesusFreke: I see. I think I'll try to read up on junit stuff sometime so I can at least have an idea of what makes a junit test package. Apr 22 06:05:18 "a set of Junit4 rules that replace ancient framework APIs like ActivityInstrumentationTestCase2 and ServiceTestCase" Apr 22 06:06:11 just writing a basic test is pretty simple. it gets complex when you start needing to mock out parts of the system, etc. Apr 22 06:06:12 "AndroidJUnitRunner: JUnit 4-compatible test runner for Android" Apr 22 06:07:07 I have a ListView to show messages currently using a SimpleAdapter. However I want a different layout for the messages the user sends than for messages other people send. (user on right, others on left). How can I do this? Apr 22 06:07:08 "This class replaces the InstrumentationTestRunner class, which only supports JUnit 3 tests." omg, are we saved ?! Apr 22 06:16:51 JesusFreke where i am, atm - there are so many trains, with their stupid air horns - i think they should be replaced by didgeridoos Apr 22 06:17:45 I wouldn't mind something like https://www.youtube.com/watch?v=_2VEYIKbiX8 being blasted from the trains Apr 22 06:18:51 JesusFreke now imagine putting that on a bullet train, what that would sound like with doppler ! Apr 22 06:20:42 thepoosh ! Apr 22 06:20:47 sup? Apr 22 06:20:55 released to 0.5% last night Apr 22 06:21:08 slow rollout ? Apr 22 06:21:32 <_genuser_> thepoosh: what are you releasing? Apr 22 06:21:41 slow slow Apr 22 06:21:44 _genuser_: glide Apr 22 06:21:53 <_genuser_> ok, next question: what is glide? Apr 22 06:22:00 lol Apr 22 06:22:06 http://glide.me Apr 22 06:22:07 <_genuser_> https://www.glide.me/ Apr 22 06:22:13 that is us Apr 22 06:22:19 <_genuser_> oh, cool, so I googled the right thing. Apr 22 06:22:26 <_genuser_> you work for glide then? Apr 22 06:22:32 yeah, there is also glide the library :) Apr 22 06:22:34 sure do Apr 22 06:22:42 g00s: yes, the image lib Apr 22 06:22:54 <_genuser_> thepoosh: is it a small company just doing the glide app? Apr 22 06:23:00 thepoosh how do you do slow rollouts ? i thought once you publish the apk, its up for everybody Apr 22 06:23:14 Is there a guide to effectively debugging native apps (C++) on Android? Apr 22 06:23:23 _genuser_: not as small now, but we only do this Apr 22 06:23:27 Zeno` you can get rich doinf something like that Apr 22 06:23:29 g00s: there is a staged rollout Apr 22 06:23:37 thepoosh from the dev console ? Apr 22 06:23:44 0.5,1,5,10,25,50,100% Apr 22 06:23:46 yes Apr 22 06:23:48 At the moment I'm just adding the equivalent of printf()'s Apr 22 06:23:56 oh wow, i haven't noticed thanks thepoosh Apr 22 06:24:22 <_genuser_> thepoosh: is this a san fran area small outfit? Apr 22 06:24:22 np Apr 22 06:24:27 it's a good idea Apr 22 06:24:33 _genuser_: israel Apr 22 06:24:42 <_genuser_> thepoosh: you're in israel atm? Apr 22 06:24:42 but our CEO is now in san fran Apr 22 06:24:48 atm? Apr 22 06:24:52 <_genuser_> at the moment. Apr 22 06:24:57 oh Apr 22 06:24:59 yes i am Apr 22 06:25:04 Some kind of debugging over USB (or whatever!) would be nice :( Apr 22 06:25:08 <_genuser_> pretty cool. someday I'll visit! Apr 22 06:25:21 let me know and I'll buy you dinner Apr 22 06:25:33 <_genuser_> nice!! Apr 22 06:25:39 Zeno`: http://www.kandroid.org/ndk/docs/NDK-GDB.html Apr 22 06:25:55 oh, wrong site Apr 22 06:25:56 hmm Apr 22 06:26:18 <_genuser_> now, I just need to go focus on finishing my project, lol. Apr 22 06:26:27 what are you working on? Apr 22 06:26:54 Zeno`: look at the "docs/NDK-GDB.html" documentation in the ndk Apr 22 06:27:05 JesusFreke, thanks. I certainly will read them Apr 22 06:27:42 <_genuser_> thepoosh: multiple projects, some work and some personal. among personal ones that I'd like to work on is a service idea that my friend was telling me about. He's in real estate Apr 22 06:27:57 cool Apr 22 06:28:04 3D augmented reality? Apr 22 06:28:05 i powered up my droid-1 from 2009; i see the notification light is blinking - that is scary Apr 22 06:28:12 <_genuser_> He'd like to put together a web portal that can do everything his website does but as one seamless process and than provide that to landlords are a monthly service. Apr 22 06:28:43 JesusFreke, looks like what I'm after. Thanks! Apr 22 06:28:48 <_genuser_> 3D augmented reality. I we can put random girls with big boobs behind dorks, I think that app would be a good sell. Apr 22 06:29:06 lol Apr 22 06:29:28 _genuser_: you sound like Duke Nukem Apr 22 06:29:47 <_genuser_> heh, as long as it sells!! Apr 22 06:37:46 it works! Apr 22 06:37:53 what would be the exact filePath, that is created using openFileOutput(,mode) ? Apr 22 06:38:11 Amazing. The first android-related thing of done that worked first try :) Apr 22 06:38:16 s/of/I've Apr 22 06:38:57 what's the view called where you side scroll pages? Apr 22 06:39:49 ah nvm found it, it's called a viewpager Apr 22 06:42:19 Hi, how do i override EditText.onError(CharSequence) in my custom EditText? I can only override onError(CharSequence, Drawable) Apr 22 06:43:20 http://www.google.com/design/spec/components/lists.html#lists-specs Apr 22 06:43:35 at the bottom it gives details about the sizes for various lists but it doesn't specify the size of the avatar Apr 22 06:43:40 what size should it be?? Apr 22 06:44:46 astroduck: well, the same way you override onError :? Apr 22 06:45:42 Not working ... onError(CharSequence) is in TextView with @android.view.RemotableViewMethod decorator, I dont know what that means Apr 22 06:46:37 I get method doesn not override method from superclass :/ Apr 22 06:46:50 PS: I meant setError* not onError Apr 22 06:47:55 so try to do the same instead of @Override Apr 22 06:52:26 Anyone know of a app that will auto translate application? Apr 22 06:52:53 ronkrt there are services Apr 22 06:52:53 http://stackoverflow.com/questions/28749176/android-material-design-confusion-in-listview Apr 22 06:53:06 I had a read of this and apparently sticking to the descign specifications is really difficult.. Apr 22 06:53:19 so knowing this how can I achieve a design that follows the specs Apr 22 06:54:23 I'm talking live as i open a app translation for the user who had a foreign language app the developer didn't translate Apr 22 07:02:12 it's funny, ListView option stackFromBottom doesn't behave similarly on different phone. On one phone it does actually stack from bottom (api19) on the other it doesn't (api 18) Apr 22 07:03:39 my bad Apr 22 07:03:45 ronkrt: automatic translation for software generally ranges from appalling to unusable Apr 22 07:10:29 Can you name any? Apr 22 07:11:15 Does anyone here have experience with viewPager? I'm new to view fragments and would like to know how they work Apr 22 07:12:50 Anyone see http://techcrunch.com/2015/04/20/how-facebooks-react-native-will-change-mobile-apps/#.yz1fn3:fbgd ? Apr 22 07:13:23 jutsi -> viewpager uses a PageAdapter or one of its cousins which is like a simplified BaseAdapter Apr 22 07:14:09 lasserix ok i get that, but do i create a separate fragment for each "view" so to speak? Apr 22 07:14:42 if you are using the fragment based viewpagers, you'll instantiate a fragment per page Apr 22 07:15:01 Hi, I have a activity with ViewPager, the activity have tabs bar, and its RTL Forced!. when I swipe from right to left its get me into the next fragment, I want the opposite: when i swipe from left to right i want it to get me into the next framgent, how can I do that? Apr 22 07:15:43 lasserix im guessing the fragment object will inflate the .. uh.. xml file, so to speak? Apr 22 07:16:55 soomsoom just take the uhh additive inverse Apr 22 07:17:09 soomsoom: at zero take 10 at 1 take 9 etc Apr 22 07:17:35 jutsi: the fragment behaves exactly the same way a fragment in a layout would Apr 22 07:17:48 tho there is a difference between fragmentpageadapter and fragmentstatepageadapter Apr 22 07:17:58 lasserix it would probably help if i told you im new to fragments? Apr 22 07:18:51 jutsi: if you can, instead of using fragments just use compound/custom view/groups Apr 22 07:18:54 much easier to work with Apr 22 07:19:12 plus you can use jakewhartons salvage library to implement convertview style recyclign in the page adapter Apr 22 07:19:48 lasserix can you use those with a viewpager? And are they well documented? Apr 22 07:19:48 be sure to look at http://stackoverflow.com/questions/18747975/difference-between-fragmentpageradapter-and-fragmentstatepageradapter Apr 22 07:19:51 if you use fragments Apr 22 07:20:00 a pageradapter just returns a view Apr 22 07:20:14 a fragmentpageradapter and fragmentstatepager adapter returns fragments Apr 22 07:20:28 they both use viewpager as the "list" view Apr 22 07:31:52 guys i have a weird problem,i've implemented that project https://github.com/Todd-Davies/ProgressWheel yesterday Apr 22 07:32:07 it was working good,today i removed my app , and complied again Apr 22 07:32:56 it creates a spinner demo same name with my app and my app changed, some textviews display Schooltraq for android Apr 22 07:33:08 is it a virus or what is this Apr 22 07:35:11 you should destroy the phone before it spreads to your computer Apr 22 07:35:34 i burn them all Apr 22 07:35:39 or :D Apr 22 07:35:48 what is this u know ? Apr 22 07:35:56 dunno Apr 22 07:36:09 lasserix: I implement this solution with onPageChangeListener? Apr 22 07:36:27 i removed gradle link and my project is good now Apr 22 07:36:45 well people hi Apr 22 07:37:54 soomsoom: no in the adapter getView/getItem/whatever, just implement the numbers backwards ? Apr 22 07:38:07 soomsoom ahh Apr 22 07:38:08 yeah Apr 22 07:38:11 sorry you would do that Apr 22 07:38:38 err no, all you need to do is when you initialize call setItem to LENGTH Apr 22 07:38:42 i want to make long running task in IntentService, and send results back to activity. So i decided to pass Messenged to intentService and on task complete, send message back to activity via that messenger. Is it ok, or there is simply scheme? Apr 22 07:38:59 soomsoom: and just keep in mind your 2nd page is actually n-1 Apr 22 07:39:02 *Messenger Apr 22 07:39:07 lasserix: oh I see thanks :) Apr 22 07:39:59 ondroed, thats ok Apr 22 07:40:23 you basically described the #1 usecase for a service :p Apr 22 07:40:33 ondroed: you could also use a broadcast reciever Apr 22 07:40:52 or a bus Apr 22 07:40:53 ;) Apr 22 07:41:01 _simple_ Apr 22 07:41:01 thanks Apr 22 07:41:04 what is bus? Apr 22 07:41:23 ondroed: more formalized message passing system Apr 22 07:41:26 check otto Apr 22 07:41:29 or eventbus Apr 22 07:41:29 http://square.github.io/otto/ Apr 22 07:41:31 this is a bus Apr 22 07:41:43 *it'll be a third party library, so simple once you are familiar Apr 22 07:42:16 thanks i'll watch Apr 22 07:44:15 or greenrobot Apr 22 07:44:38 or a subject obserable in rxjava Apr 22 07:48:35 watchout not to overuse the bus Apr 22 07:48:51 so you will end up in event hell Apr 22 07:49:03 also otto has nice intellij / AS plugin Apr 22 07:53:11 guys anyone used this https://github.com/Todd-Davies/ProgressWheel ? Apr 22 07:53:58 or any suggestion instead Apr 22 07:54:17 sci-fic, suggestion: use progress bar Apr 22 07:54:48 Is overscroll how refersh layouts work? Apr 22 07:55:02 What is the principle behind being able to pull down at the top? Apr 22 07:57:27 danijoo:i have to use circle, it has that feature by default ? Apr 22 07:57:36 yes Apr 22 07:58:08 ok letme check then Apr 22 07:58:10 sci-fi it should be fairly simple to make yourself Apr 22 07:59:50 if its up to me,i'll do everything myself, but you know bosses -.-' they wants faster and this is my first experience in android Apr 22 08:00:30 sci-fic, reinventing the wheel sucks Apr 22 08:00:50 dont do everything yourself if you dont have to ;) Apr 22 08:01:00 thats why there are libraries :p Apr 22 08:01:54 yes yu are right but i just want to learn myself which is better for me i think Apr 22 08:03:17 for learning better implement it yourself, yeah :) Apr 22 08:03:53 :D Apr 22 08:04:08 but if you have a boss or an EDT, its the wrong time to learn :p Apr 22 08:04:32 anyway they just hired a consultant which is going to help me :D Apr 22 08:04:54 :p Apr 22 08:04:58 make sure to look at source of progresswheel Apr 22 08:07:44 soooo. findFragmentBy() is slow. we all know that Apr 22 08:07:56 what about getActivity() from fragment? thats fast, isnt it? Apr 22 08:09:26 nvm. ill dig into the source >.< Apr 22 08:10:07 ok. its fast. Apr 22 08:25:38 <_genuser_> I wonder if my latest kaka-mimi scheme is introducing mem leaks. Apr 22 08:26:30 kaka-mimi? what is this? Apr 22 08:27:50 <_genuser_> caca mimi maybe. Apr 22 08:27:58 <_genuser_> people typically say it when they mean random crap... Apr 22 08:28:05 <_genuser_> as in caca mimi idea Apr 22 08:28:12 ah ok. must be an american thing ;) Apr 22 08:28:18 <_genuser_> yep. Apr 22 08:28:35 <_genuser_> I is American all the way. America rules! red-white-and-blue! Apr 22 08:28:45 <_genuser_> am I coming across as "American" yet? Apr 22 08:28:49 <_genuser_> lol Apr 22 08:29:02 ^^' Apr 22 08:50:12 if I have a map inside the layout of a fragment I'm loading into another activity, how do I fetch that map from the fragment's onCreateView/onActivityCreated? Apr 22 08:51:00 having to reach for the Activity to get that map means that the map has to reside inside that Activity's layout file, not in the fragment's layout file and I don't want to do that because when you replace that fragment container with something else and the map is inside the Activity's layout, it doesn't get replaced! it's always there of course Apr 22 08:51:35 hi all, i have my android pad and i would like to play music on it by choosing music on my android phone, for example i choose from my mobile phone to stream music on my android pad and choose the music i want, i then hear the music from my pad any application that does this? Apr 22 08:51:57 wrong channel Apr 22 08:52:14 pagios, head to #android Apr 22 08:52:33 I need to do something other than the ordinary getSupportFragmentManager findFragmentById, I need something like rootView.findFragmentById Apr 22 08:53:26 Odaym, why? you can get the root views fragment by findFragmentById Apr 22 08:54:09 yea but calling it from where? Apr 22 08:54:19 whereever you want :p Apr 22 08:54:28 I have to be calling it from inside the fragment, to get the map from that fragment's own layout Apr 22 08:54:38 the one that's now loaded into rootView Apr 22 08:54:45 huh Apr 22 08:54:55 you know there is getView() in fragment, dont you? Apr 22 08:55:09 getView().findViewById(R.id.myMapsId) Apr 22 08:55:22 of is it a map fragment in another fragment? Apr 22 08:55:26 you cannot cast View into a GoogleMap Apr 22 08:55:38 its a fragment whose layout has a fragment inside it (my map) Apr 22 08:55:41 ah its a mapfragment from google Apr 22 08:55:52 oh, yes Apr 22 08:55:59 I didnt know there was anything else Apr 22 08:56:05 fragments also have getFragmentManager() Apr 22 08:56:27 it needs SupportFragmentManager, and I cannot call that unless I say getActivity().getSupportFragmentManager Apr 22 08:56:29 you can do myFragment.getFragmentManager().findFragmentById(R.id.idOfMapFragment) Apr 22 08:56:35 because it happens that Im using supportFragment Apr 22 08:56:49 let me think Apr 22 08:56:54 if it is a supportgragment, getFragmentManager method of it will return the supportFragmentManager Apr 22 08:57:03 because a supp-fragment only knows about support managers Apr 22 08:59:09 map = ((SupportMapFragment) getFragmentManager() .findFragmentById(R.id.map)).getMap(); Apr 22 08:59:23 this is what I already have and it's perfectly logical Apr 22 08:59:28 excellent stuff Apr 22 08:59:30 amazing Apr 22 08:59:37 although.. Apr 22 09:01:18 casting getFragmentManager.getFragmentById(R.id.map) into a SupportMapFragment is coming up null Apr 22 09:01:27 crashing when you go ahead and do .getMap() on that afterwards Apr 22 09:01:49 maybe its not attached yet? Apr 22 09:01:56 where do you call that method? Apr 22 09:02:00 hmmm Apr 22 09:02:05 if it ain't one thing, it's another Apr 22 09:02:10 onActivityCreated Apr 22 09:02:18 should be in onAttached Apr 22 09:03:31 nah man, onAttach is way before onActivityCreated Apr 22 09:03:50 inner fragments are always a bit tricky Apr 22 09:04:03 how did you add the map fragment? via xml? Apr 22 09:04:08 yea Apr 22 09:05:26 try add it promatically Apr 22 09:05:34 programmataically Apr 22 09:05:55 from stack overflow: "So nesting fragments inside another fragment is not possible with xml regardless of which version of FragmentManager you use." Apr 22 09:06:15 it can't be like that Apr 22 09:06:37 its too basic Apr 22 09:06:53 well in onAttach is not able to get the fragment either Apr 22 09:06:56 ok I will try programatically Apr 22 09:06:59 well. nested fragments if a big hack in the android framework Apr 22 09:07:18 I used to hear about it here Apr 22 09:07:20 its something that was not intended to be possible from the start. they added it later and its not really well implemented Apr 22 09:07:35 well it's great that I've reached a place where I can say someone else is wrong Apr 22 09:07:47 :p Apr 22 09:23:19 now come up with a workaround for the hack :p Apr 22 09:23:59 nailed it Apr 22 09:24:07 nailed of the it Apr 22 09:24:11 the it of nailness Apr 22 09:24:15 brb cancer break Apr 22 09:33:53 ok so it's someone else who nailed it, but I copied it very well Apr 22 09:34:07 http://stackoverflow.com/a/16047729/764897 Apr 22 09:38:15 <_genuser_> gridview - enabling multiview... I'm googling but not finding much. anybody have any pointers? Apr 22 09:38:32 <_genuser_> s/multiview/multiselect/ Apr 22 10:00:41 <_genuser_> dang, the youtube comments on my chrome be broken. works fine in IE but not so much on chrome. Apr 22 10:10:09 you should be slapped for still having IE installed :p Apr 22 10:21:28 ugh haven't had coffee today and i have to start programming something new Apr 22 10:22:59 Slides you over a cup ☕ ... gotta get the priorities right :p Apr 22 10:25:47 You're a strong black woman, you don't need no drugs Apr 22 10:33:10 _ Lorenz9 Apr 22 10:33:12 +* Apr 22 10:34:14 COFFEE Apr 22 10:34:26 hi all Apr 22 10:34:57 Has someone use jococo for coverage an external library ? Apr 22 10:37:07 coincidence Leeds, i'm drinking a coffee ;) Apr 22 10:45:18 <_genuser_> man, I really bonked my chrome. Apr 22 10:45:25 <_genuser_> it's acting all crazy now. Apr 22 11:00:00 Nah - it's buggy ... I got STR on one yesterday ;) Apr 22 11:01:50 acting crazy? as opposed to what it does usually? Apr 22 11:04:01 stock browser got it right ... unfortunately FF has it too :/ Apr 22 11:14:39 <_genuser_> argh!!! dumbass chrome. who writes this automagic thinking for you artificial crap Apr 22 11:18:28 Guys, trying to use Item.ClipData,however it doesn't seem to recognize the symbol 'Item'. I already imported android.content.ClipData Apr 22 11:19:35 I always fail to recognize what needs to be imported methinks. Apr 22 11:26:09 Is it normal to have to import R class file in extended widget? Or something is wrong? Apr 22 11:26:39 I want to use the uiautomatorviewer but get the exception ClassNotFoundException: org.eclipse.jface.window.ApplicationWindow when I run from console. I saw this seems to be a bug and found a solution for creating symlinks here: https://bugs.launchpad.net/ubuntu/+source/androidsdk-tools/+bug/1438629/comments/3 However, after creating the symlinks I still get the error. Any ideas how I can fix this? Apr 22 11:35:45 Hi, someone is developing to diydrones tower? Apr 22 11:36:06 for this android app Apr 22 11:41:13 hey not sure why i Keep getting this error http://pastebin.com/naQgYpZt Apr 22 11:41:51 when I am working on the up navigation for an action bar... it was working before I added the drawer navigation (which is its parent) that uses ActionBarActivity Apr 22 11:49:23 Hi! How can I get a "square" preview window for the camera ala. Instagram? I found a stackoverflow answer which stated "masking" the full preview, but how would I do that? Apr 22 11:53:56 onto: probably it just means to hide camera preview below two views Apr 22 11:57:05 icedp: I understand that, but how exactly would I manage the z-depth? (I'm sorry if I sounds very dumb, I just started learning this). Is there a sample code that I can refer to? Apr 22 11:57:39 http://stackoverflow.com/questions/29796825/getting-null-on-object-reference-for-up-navigation Apr 22 11:57:45 that is the SO question I posted Apr 22 12:00:18 Hello, I'm using this https://developer.android.com/training/wearables/ui/exit.html in my Wear app, but I use a GridViewPager with fragments in my app. The problem is the onTouchEvent does not seem to go off in the Activity. How do I make this work? Apr 22 12:04:22 anybody use EventBus here ? Apr 22 12:04:36 What is the best practice for writing onClick events for a holder in RecyclerView.Adapter? As in, is it better to write them in onBindViewHolder, or is it better to write them inside the Holder class? (I feel like it is better to write them in onBindViewHolder, but I saw an example where it was mentioned it would be better to put them in the Holder class.) Apr 22 12:05:26 Marlinski: I use otto, but not the specific greenrobot's EventBus if that's what you are asking. Apr 22 12:06:39 I wonder, if I send an Event from a HandlerThread (which has its own looper), will it be received by another thread with another looper ? Apr 22 12:06:53 cause it looks like it doesn't Apr 22 12:08:48 do you confirm ? Apr 22 12:10:54 Can anybody in here tell me whether or not Square Retrofit allows me to set a request's priority? Apr 22 12:11:57 MrMaffen: Why do you care about a request's priority? Apr 22 12:12:57 claint: because I need to sync datasets in the background while still being able to fetch other data from my API Apr 22 12:13:17 as of right now the syncing operation completely blocks retrofit Apr 22 12:14:41 I'm trying to install/update Android SDK and ADT but it fails giving me this log .. can anyone tell me what is wrong? http://pastebin.com/7LwN3SXL Apr 22 12:15:24 on eclipse IDE Apr 22 12:17:45 MrMaffen: Ok, so you are not actually chaining requests. You really have long requests in the background that block your more priority requests. Apr 22 12:18:21 anahumar: "Failed to create directory C:\Program Files\android-sdk-windows\temp Apr 22 12:18:22 claint: yup Apr 22 12:19:11 yes I created it now but still giving me Nothing was installed Apr 22 12:19:12 anahumar: the sdk can't create directories in that place and can't update without have this path Apr 22 12:19:35 How do you make a viewPager circle back around after it reaches the end? Apr 22 12:19:44 anahumar: paste the new log Apr 22 12:20:26 Guys, trying to use Item.ClipData,however it doesn't seem to recognize the symbol 'Item'. I already imported android.content.ClipData... but I think I fail to recognize what I need to import here. Apr 22 12:20:26 MrMaffen: maybe having different ThreadExecutor would work? I am not sure. I think Retrofit uses one that already has unlimited threads. look at setExecutors while you are creating the rest adapter. Not 100% sure on this. Apr 22 12:22:57 now started installing with some failures .... As a partial sonlution, I ran eclipse as administrator. Apr 22 12:24:23 claint: ty. I actually thought I could avoid implementing my own ThreadExecutor, but it seems that Retrofit indeed does not provide a simple way to set a request's priority. Apr 22 12:28:18 Lorenz9: AS? just press Alt-Enter and import it Apr 22 12:29:53 Alt + Enter just transforms Item.ClipData into ClipData.Item.ClipData Apr 22 12:29:54 icedp Apr 22 12:30:04 that's why I'm so confus Apr 22 12:30:49 anyone used facebook rebound ? Apr 22 12:31:07 http://facebook.github.io/rebound/ Apr 22 12:31:08 what is that Apr 22 12:31:11 oh, ok Apr 22 12:31:27 Lorenz9: what is Item.ClipData? Apr 22 12:31:32 Lorenz9: I don't know that Apr 22 12:32:13 Lorenz9: if you imported ClipData you refer to it as ClipData.Item Apr 22 12:32:25 Lorenz9: if you imported ClipData.Item you refer to it as Item Apr 22 12:32:28 wow Apr 22 12:32:31 dat massivel dyslexia Apr 22 12:32:38 thanks mate, this is so embarrassing :D Apr 22 12:32:54 np Apr 22 12:33:59 here is the new log ... http://pastebin.com/UrsU7NEn Apr 22 12:38:01 using RecyclerView, how can i have removals animate the remaining items into place? I tried DefaultItemAnimator but it's not really doing anything Apr 22 12:39:50 Any idea what the P(,) and W(;) is? Also, is there a way to get rid of all the extra characters? I just want to be able to add decimal numbers (with , or .) http://i.imgur.com/NwXjUUh.png Apr 22 12:39:53 nothing else Apr 22 12:40:58 xorgate: There is a good example at https://github.com/devunwired/recyclerview-playground Apr 22 12:46:12 Syzygy: pause and wait Apr 22 12:47:30 Hello! How much animations can be executed if they running simultaneously? Apr 22 12:48:02 I have xml with animation set (scale + alpha) Apr 22 12:48:38 And i animate 10-20 view on screen Apr 22 12:48:51 But it looks like some animations dropped Apr 22 12:54:05 This damn ActionBarActivity... ruined everything with the new way the Navigation drawer has to be implemented Apr 22 12:55:54 icedp I don't think that would work for the keyboard. Apr 22 12:55:58 ah, nevermind. Apr 22 12:56:09 but why pause and wait for a number keyboard? Apr 22 12:57:20 claint: i was using notifyDatasetChanged where i should have used notifyItemRemoved Apr 22 12:57:50 Syzygy: maybe it's not a number keyboard but a phone keyboard Apr 22 12:58:44 InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL Apr 22 13:01:49 Syzygy: do you use standard keyboard? Apr 22 13:05:34 Syzygy: doesn't look like standard. probably custom keyboard doesn't support it. try entering those symbols p and w - they should not appear anyway Apr 22 13:25:48 bonjour Apr 22 13:26:00 need help Apr 22 13:26:45 #android Apr 22 13:28:20 Any example of reusing toasts? Apr 22 13:31:19 hi, need help with google play publishing Apr 22 13:33:18 warlordattack: try asking a real question Apr 22 13:42:00 anyone know of an opensource/free "file open dialog" type class i could import and use in my app? Apr 22 13:42:20 ive seen a couple of old ones but it didnt work out Apr 22 14:00:44 icedp, sorry, got forced into a meeting or two. "HTC sense version 6 copy of swipe" is the info i have... I guess there's just not that much I can do against it as a developer Apr 22 14:01:05 anyway, off to the next meeting Apr 22 14:01:10 @all: I am trying to implement the Android REST Design Pattern presented at Google I/O 2010 https://www.youtube.com/watch?v=xHXn3Kg2IQE Apr 22 14:02:02 one thing that is not clear is when the POST/PUT/DELETE happen. for example, if i modify a data locally, when should and how should i push it to the rest endpoint? Apr 22 14:02:03 Syzygy: yeah looks like that and still those symbols shouldn't be added when pressing them. so it's ok I guess Apr 22 14:02:19 yeah, but it's annoying clutter. Apr 22 14:03:00 is there any event broadcasted by the sqlite that may be listened to trigger my syncadapter? Apr 22 14:15:58 anyone have an idea of what the constants in android.system.OsConstants really mean? Apr 22 14:17:41 i've got a bunch of web UI content i want to bundle with my app. if i put it under the res folder can i access that content by path in my code? Apr 22 14:21:34 thebishop: yes. Apr 22 14:21:51 claint, thanks Apr 22 14:23:47 thebishop: provided, that is basically the links (strings) to your actual content or whatever. Apr 22 14:24:53 claint, yeah, the problem is i want to access it from native code, so having the files bundled in the APK is either unworkable or cumbersome (at least as far as i can tell). it seems like saving my html tree to storage would be easier Apr 22 14:29:37 hello people. I'd need a design tip: I'm making an app where in the main activity there's a big imageview and some sliders (seekbars). As now I put the sliders in a small 150dp scrollview just under the imageview, but it doesnt feel quite right, where could i put those sliders instead? Apr 22 14:31:37 gabmus, it depends on what the app provides to the user. Apr 22 14:38:52 avinashrbhat: it's a photo editor with filters. i know, the idea isn't particularly original, but it's for a competition on ability, not originality. Apr 22 14:39:47 the sliders are used to "tune" the various filters that are selected from a listview in a navigation drawer. Apr 22 14:40:56 http://android-developers.blogspot.ch/2013/02/using-cryptography-to-store-credentials.html says that using MODE_PRIVATE is secure enough to store credentials (entered by the user). Is this post still up to date or are there new better ways to store for example API keys? Apr 22 14:41:15 gabmus, how about categorizing the filters (e.g., hue and saturation as a set,..) and using a ribbon/toolbar in the bottom; which just shows the categories? Apr 22 14:41:56 define a ribbon toolbar please :\ Apr 22 14:42:56 also, the filters are already categorized Apr 22 14:45:27 memoryleak: consider accounts Apr 22 14:45:37 Accounts? Apr 22 14:51:29 memoryleak: AccountManager Apr 22 14:53:22 memoryleak: OTOH it seems it doesn't encrypt credentials either Apr 22 15:04:13 is there any parameter i can put on the AndroidManifest.xml file that instructs the service to be start when the app is opened? Apr 22 15:08:52 ventura: These are all of your options for service tag in the manifest, http://developer.android.com/guide/topics/manifest/service-element.html Apr 22 15:09:09 ventura: I'm not aware of a way, pretty sure you have to kick it off with startService in code, but don't quote me Apr 22 15:10:02 anybody here have experience with the google play developer API and querying it for in-app subscription/payment information? Apr 22 15:17:38 I have an object that implements Runnable which I give to postDelayed, but removeCallbacks doesn't seem to remove my instance, even though I override equals and hashcode Apr 22 15:17:54 you don't need to override equals and hashcode Apr 22 15:17:56 and it removes by identity Apr 22 15:17:58 not by equality Apr 22 15:19:15 damn Apr 22 15:19:32 hmm, I try to maintain a list of "neighbour" Apr 22 15:19:46 when I don't hear about a neighbour for too long I remove him from the list Apr 22 15:20:09 nevermin, I'll use a Map Apr 22 15:24:12 <_genuser_> yo yo Apr 22 15:28:28 hey everyone Apr 22 15:33:44 got a question about touch events: is there a way to capture all touch events/gestures on the device (with a service, overlay, etc.) and then pass them on? I know that it was possible in versions 2.x but because it's a security hole it was fixed. is there still any way of achieving this, say, in dev mode, without rooting/flashing the device? Apr 22 15:34:15 I don't really care how many steps the user needs to perform to install this on their phone, as long as it's not rooting/flashing. Apr 22 15:34:40 no Apr 22 15:34:43 Anyone know if there's any way to synchronously wait for an activity to finish from an InstrumentationTestCase? Apr 22 15:35:04 Can anyone help with this code? I need to pass the student_id value from one fragment to another fragment (http://paste.ofcode.org/dfkfB4ngaXK9phvM52Aa5C) Apr 22 15:35:19 drewbug, use standard notify/wait mechanisms Apr 22 15:35:32 What if I can't alter the activity's code? Apr 22 15:35:49 drewbug, use Application's listeners for activity lifecycle events Apr 22 15:36:01 pfn, thanks so much, I'll look into it. Apr 22 15:36:07 FragStudentDetail Apr 22 15:38:36 alguien habla español???? Apr 22 15:39:17 pfn, awesome, that'll work nicely. Thank you. Apr 22 15:41:46 Someone to program java / android ??? Apr 22 15:42:36 I have problems sending a value from one fragment to another fragment Apr 22 15:42:48 http://paste.ofcode.org/dfkfB4ngaXK9phvM52Aa5C Apr 22 15:42:58 Joaquin83: http://developer.android.com/training/basics/fragments/communicating.html Apr 22 15:43:15 Hi all Apr 22 15:46:33 Hello, how can I add left and right padding to a linear layout Apr 22 15:46:36 in order to center elements Apr 22 15:46:46 use layout_gravity Apr 22 15:46:48 not adding padding Apr 22 15:46:49 working any size creen Apr 22 15:47:26 pfn then what should I get for layout_width Apr 22 15:47:29 ? Apr 22 15:48:04 whatever is appropriate for what you want Apr 22 15:48:10 typically wrap_content or match_parent Apr 22 15:48:40 look, I got this http://www.hastebin.com/kitumejavo.xml Apr 22 15:48:55 for the last LinearLayout, which contains two buttons Apr 22 15:48:55 time to rant again, still doing some renderscript stuff, AS is pain in the #@! no completion at all (not even able to align parenthesis), src\\main\\rs\\lfo.rs:13:2: warning: implicit declaration of function \u0027initVCO\u0027 is invalid in C99" invalid is only warning, wtf these utf8 char in gradle console, if you rebuild just after these warning, they disappeard like it magically created headers & Apr 22 15:48:56 prototype satisfying the linking Apr 22 15:49:03 etc... (time ellipse) Apr 22 15:49:05 I need those to be centered Apr 22 15:49:33 centered how Apr 22 15:49:42 What is the best layout to use if I ultimately want to use if I want to dynamically place view's at a specific x,y coordinate? Apr 22 15:49:49 so it's nice to force ppl to move away from eclipse, but then you realize traceview and all monitoring for perf is not there or cumbersome, same goes for RS, i don't want to talk about the NDK, unit test is very new too Apr 22 15:49:49 etc Apr 22 15:49:55 hello Apr 22 15:49:57 diegoaguilar, last linearlayout width = wrap_content, gravity = center Apr 22 15:50:13 i'm not feeling better, but nuf said. Apr 22 15:50:18 my code is inside a CanvasView class. is it possible to get a reference of the activity holding it? Apr 22 15:50:37 that was worded poorly... What is the best layout to use if I want to dynamically position view's at a specific x,y coordinate? Apr 22 15:50:44 paulo_, getContext Apr 22 15:50:45 (that is, CanvasView extends View) Apr 22 15:51:02 pfn: then? Apr 22 15:51:24 paulo_, Activity is-a Context Apr 22 15:51:29 you figure out the rest yourself Apr 22 15:51:33 eemgr: http://developer.android.com/reference/android/view/SurfaceView.html Apr 22 15:51:38 pfn: ok, thanks Apr 22 15:51:47 yiati: this is better than framelayout? Apr 22 15:52:01 or is framelayout not even feasible Apr 22 15:52:08 eemgr: completely depends on what you want to do Apr 22 15:52:21 eemgr, absolutelayout, framelayout, etc. Apr 22 15:52:21 okay, i'll research both, thanks Apr 22 15:53:31 basically, i have to place textview's in specific coordinates, and i have to draw (in onDraw) around them. Apr 22 15:55:46 absolute layout was deprecated? Apr 22 15:56:10 I can't imagine why, but that was probably want I wanted. Apr 22 15:56:31 eemgr: if you need to do it once you can just use margins, but if you need speed you should draw child views in dispatchDraw Apr 22 15:58:05 so adding a margin doesn't effect the result of view.getWidth() right? Apr 22 15:58:17 how is getLeft() effected by margins? Apr 22 15:59:48 because i draw around the textview's so i need to know their positions and sizes Apr 22 16:00:20 eemgr: Getting the exact bounds of the actual text within the textviews is difficult Apr 22 16:00:55 okay but lets say i have a 30x30 text view... if i add a left margin value fo 50 Apr 22 16:00:56 of* Apr 22 16:01:21 why use a textview instead of just drawing text yourself to a canvas? Apr 22 16:01:34 unless you want textview features Apr 22 16:01:44 I'm new to android development, and i honestly had no idea that something so trivial would be so difficult Apr 22 16:01:54 but it's not difficult Apr 22 16:01:58 you're just doing something weird Apr 22 16:02:06 how is drawing a circle around a text view weird? Apr 22 16:02:10 eemgr: what are trying to do? Apr 22 16:02:23 one second, i have an image of what im doing Apr 22 16:02:26 drawing a circle around a textview is trivial Apr 22 16:02:29 you're doing it wrong Apr 22 16:02:36 create a background drawable Apr 22 16:02:48 and extend textview so that it's minimum width/height accomodate the circle Apr 22 16:02:50 done Apr 22 16:02:51 http://i.imgur.com/mHm8YPR.png Apr 22 16:02:53 that braedcrumb widget Apr 22 16:02:56 is what i need to do Apr 22 16:03:02 the text at each stage is variable in length Apr 22 16:03:03 textview background Apr 22 16:03:07 sometimes 1 line, sometimes 2 Apr 22 16:03:10 not custom drawing Apr 22 16:05:04 thoughts after seeing that image? Apr 22 16:05:27 eemgr: same as what pfn said after seeing the image Apr 22 16:05:50 textview background? Apr 22 16:05:53 eemgr: a lot of ways to achieve it. I would set drawableRight for each TextView Apr 22 16:06:02 basically what pfn suggested Apr 22 16:06:34 now drawable could be an image or your own custom view in which you draw a half-circle with one command Apr 22 16:06:42 okay because what i was doing now was placing the textview, drawing lines/arcs around it and storing the start position for the next draw Apr 22 16:07:35 so this could in theory just be a linear layout of textview's? Apr 22 16:07:46 without overloading onDraw Apr 22 16:07:47 yep with TextViews built in compound drawable, all you need is an asset for the background. You could even make an xml shape. No coordinate knowledge necessary Apr 22 16:08:40 i'll just create a class that extends textview and go from there then Apr 22 16:08:51 thanks Apr 22 16:09:00 sad i spent days trying to get the other method to work Apr 22 16:09:00 Does someone know how to disable touch events from checking a checkbox? I have a custom even listener for a recycler that gets triggered when a section is clicked and it needs to update the checkboxes of every checkbox. The problem is that when I hold my finger on a checkbox, the event is not being fired, but the checkbox is being checked. Apr 22 16:10:35 I want to start an activity, but I don't want to go back to the previous one when I close it. I want to go to the previous-previous one Apr 22 16:16:06 paulo_: http://developer.android.com/guide/topics/manifest/activity-element.html#nohist Apr 22 16:18:01 adq: I think you'll find that the reason renderscript warnings disappear on your second compile is because the first compile was successful despite the warning and the second compile was never executed. Apr 22 16:19:02 could be, also it's a warning because no -Werror Apr 22 16:19:04 And can't you tweak your editor to tell it a .rs extension is a C99 file? Apr 22 16:19:21 android studio does not understand C it seems Apr 22 16:19:31 and the only intellij plugin does not support latest version of AS/Intellij Apr 22 16:19:34 I tried, belive me Apr 22 16:19:36 believe* Apr 22 16:19:42 So even if you're editing a .c file, it'll still fail? Apr 22 16:19:42 funny, it interprets .rs as rust Apr 22 16:20:10 So even if you're editing a .c file, it'll still fail? <- what do you mean? Apr 22 16:20:21 i just edit "blindly", build to compile and see errors Apr 22 16:20:35 very annoying when its a typo Apr 22 16:21:02 I've never used android studio. I would have assumed that if you loaded a .c file in it, it would make some kind of effort. Apr 22 16:21:13 Even if it doesn't support NDK development. Apr 22 16:21:13 :/ Apr 22 16:21:43 So normally I'd expect to go into settings and tell it that a .rs file is C. Apr 22 16:21:50 the road is long i guess, it does not even align a parenthesis Apr 22 16:22:25 i digged ALL the settings Apr 22 16:22:28 without any success Apr 22 16:22:37 In my day we had to align our own parentheses... that's if we could even afford two of them together. Apr 22 16:22:42 this is how i find it interprets .rs as Rust Apr 22 16:23:11 eheh sh1 Apr 22 16:23:52 I'm sure there's somewhere you can file a feature request for AS to get them to sort it out. Apr 22 16:23:59 oh i did already Apr 22 16:24:01 submitted a ticket Apr 22 16:24:07 but it's hopeless Apr 22 16:24:38 i could be busy filling tickets the whole day, there are so many issues Apr 22 16:25:34 Is this any help? http://stackoverflow.com/questions/21336963/wrong-file-association-one-file-in-intellij-android-studio Apr 22 16:26:14 nop i tried, this is where i attempted to make AS believe c file template comprise of .c .cpp etc.. are also .rs and .rsh Apr 22 16:26:28 it just change a nice icon Apr 22 16:26:33 (RS) <- in blue background Apr 22 16:26:38 to something else Apr 22 16:27:34 what i really need is code completion, and pre processing checks, which requires parsing C, following headers, etc Apr 22 16:27:41 and that's not present, simply Apr 22 16:27:54 thank you however sh1 Apr 22 16:28:20 This? https://plugins.jetbrains.com/plugin/1373?pr= Apr 22 16:28:27 I'm just googling, here. Apr 22 16:28:42 and the only intellij plugin does not support latest version of AS/Intellij Apr 22 16:28:57 ah Apr 22 16:28:59 i think i will cover all your suggestion since I tried everything ;) Apr 22 16:29:34 adq: just wondering, what are you using RenderScript for? Apr 22 16:29:49 i'm doing audio DSP :p heavy Apr 22 16:29:55 http://i.imgur.com/53j9l82.png Apr 22 16:30:05 it's a virtual analog synth engine Apr 22 16:30:21 it's very interesting to benefits of the speed of RS, the parallel processing etc Apr 22 16:30:54 originally everything was in java, which put the vm on its knees Apr 22 16:31:07 now i have a tremendous amount of processing resources, to be honnest Apr 22 16:31:36 so i keep the ui part in java, and process the audio in real-time via Renderscript Apr 22 16:32:49 there are few drawbacks, but it's still better than doing everything in java (performance matters ;)) Apr 22 16:33:26 Was it you I saw asking about latency somewhere? Here or SO? Apr 22 16:33:41 nope Apr 22 16:33:47 yiati: to place those images around a textview that will vary in length, would i use setCompoundDrawables or setCompoundDrawablesWithIntrinsicBounds? Apr 22 16:33:52 but i'm aware of latency troubles on android Apr 22 16:34:26 adq: have you considered OpenCL? I'm not very knowledgeable in it, just asking Apr 22 16:34:36 yes, renderscript is very close to opencl Apr 22 16:34:46 even the kernel prototype functions are similarly expressed Apr 22 16:34:54 lot of same philosophy shared Apr 22 16:35:02 but openCL is far from being well supported on android Apr 22 16:35:24 icedp, i might move the NDK at some point Apr 22 16:35:43 eemgr: withIntrinsicBounds is probably what you want Apr 22 16:35:49 because there are few issues with renderscript, for instance the chip manufacturer must give to google their renderscript driver Apr 22 16:35:50 okay thanks Apr 22 16:36:02 which leads to some device not supported RS at all Apr 22 16:36:06 or with strange behavior Apr 22 16:36:20 they brought a compatibility mode few year(s?) ago Apr 22 16:36:29 which helps a lot but still, many devices are not supported Apr 22 16:36:38 because .. no driver Apr 22 16:36:47 adq: well with NDK you can't use GPU power right? and shouldn't RS fall back to CPU if it can't support GPU? Apr 22 16:36:54 it also starts being more complex when you think of architecture Apr 22 16:36:58 x86, neon arm, etc Apr 22 16:37:05 icedp, true! Apr 22 16:37:14 no, it cannot fallback on the cpu without any driver Apr 22 16:39:14 icedp, in fact the description in the rs doc page is very optimistic about being able to use your CPUs, your GPUs, your DSP, or any chip Apr 22 16:39:23 most of the time, you benefit of the CPUs, mainly Apr 22 16:39:52 still, the guys working on RS (tim murray per example) are doing an excellent job Apr 22 16:40:13 i suspect there are just undersized in amount of ppl Apr 22 16:40:52 they are also active on stackoverflow iirc Apr 22 16:41:26 adq: I have in mind an app which applies effects to camera preview. I know GLSL and it works fine, however it's unclear if it's possible to apply this effect to large photo image like 3000+ x 2000+ and save it Apr 22 16:41:40 I keep thinking renderscript is so underutilized Apr 22 16:41:50 but then someone contributed a pretty big update to renderscript support in my build plugin Apr 22 16:41:55 * pfn shrugs Apr 22 16:41:59 * pfn has never used renderscript :( Apr 22 16:42:30 icedp, oh i saw recently something showing rotation on bitmap in RS is efficient, better (faster) than using a matrix in java Apr 22 16:42:37 yeah, I keep forgetting it exists :/ Apr 22 16:42:40 pfn, agreed, except this blur example you see everywhere... Apr 22 16:42:53 which tends to really angry me lol Apr 22 16:42:53 mostly because moving data to an Allocation is such a hassle Apr 22 16:43:02 yeah they still need a 0 copy for that Apr 22 16:43:02 and mostly it's too expensive to copy bitmaps around all the time Apr 22 16:43:10 it should be in their todo, but i asked one year ago Apr 22 16:43:19 cause the copyto copyfrom has a non negligeable cost Apr 22 16:44:54 adq: yeah, I saw the example. Main advantage is not even speed, but avoiding java heap (NDK too) Apr 22 16:45:04 yup Apr 22 16:45:07 exactly this one Apr 22 16:45:28 I don't recall where I saw it, sorry :/ Apr 22 16:48:02 ahh found it Apr 22 16:48:19 https://plus.google.com/+%D0%92%D1%96%D0%BD%D0%B4%D1%80%D1%96%D0%B9%D0%9B%D0%B0%D0%B2%D1%80%D1%96%D0%BD%D0%B5%D0%BD%D0%BA%D0%BE/posts/ERpMr2HmeNz wow Apr 22 16:48:43 ukranian in url lol Apr 22 16:48:49 ukrainian* Apr 22 16:50:26 why lol?) Apr 22 16:50:50 i was afraid the url would be very long, nothing geopolitically related :) Apr 22 16:51:09 добре =) Apr 22 16:51:23 last time i copied an image link from google image (it was a piano) Apr 22 16:51:37 pasted it in a chan... it was the whole picture which got paste and me got kicked ;) Apr 22 16:51:45 never throw a piano in irc Apr 22 16:52:44 anyway, back to RS :> Apr 22 16:56:50 i have a question about Notification.Builder. The previous form of initializing a Notification with a constructor was deprecated in API 11 in favor of Notification.Builder. However, the build() method on Builder wasn't added until API 16! How are you supposed to use Builder without the build() method? Apr 22 16:57:25 ah, nm. answered my own question. getNotification() Apr 22 16:58:24 zerowaitstate, NotificationCompat.Builder Apr 22 16:58:35 or use that Apr 22 17:01:40 it'd be nice if there were4 some drawable variant that could take an 'android:name' to point to a drawable implementation class Apr 22 17:02:33 rather than requiring the multitude of different tags (, , , etc) Apr 22 17:03:24 I have a webview in my app that uses javascript. On the loaded page I have a function at "window.sp.cgb" The function returns an object. in my android app I want to use that function with evaluateJavascript. I can't seem to find the namespace to target the call however, I only receive null as if it's never been accessed. How do I correct this? Apr 22 17:07:06 material dialogs! Apr 22 17:09:57 that feeling when you refactor, and wonder if the result is worse than before :( Apr 22 17:10:18 g00s, git reset --hard :p Apr 22 17:10:34 one weeks worth of work, i'm just not sure its better or worse Apr 22 17:11:44 you gone done it wrong Apr 22 17:11:45 :p Apr 22 17:13:41 i had a DSL in xml that represented all unit quantities, units, and measurements my program would accept. but i didn't have anything in the db about unit conversion. so i converted each unit to Enums to make it easier to convert FooEnum.convert(double quantity, FooEnum other) etc Apr 22 17:14:04 so i gained ease in implementing conversions, tradeof maybe inflexibility to extend without adding source code for new enums Apr 22 17:16:36 got rid of 2 xml parsers though, i guess thats a win heh Apr 22 17:16:53 unless unit conversions are user-defined, it doesn't matter Apr 22 17:17:11 and if they are, you gone done it wrong Apr 22 17:17:21 pfn user defined ? Apr 22 17:17:42 i dont let the user implement their own conversions Apr 22 17:17:53 all the conversions are built in, if thats what you mean Apr 22 17:18:36 then it doesn't matter, since you have to edit source to add conversions regardless Apr 22 17:18:56 whether source being an xml dsl or enums Apr 22 17:19:01 yeah Apr 22 17:19:23 and the enums are type-safe, and static, if it compiles, ship it Apr 22 17:19:24 unlike xml Apr 22 17:19:25 ;-) Apr 22 17:19:37 :wq -> it saved, publish! Apr 22 17:19:41 the idea was if there was a secondary source of information available from the web that the software didn't see befrore, it could download an xml file that described the device / unit, measurements, etc Apr 22 17:19:53 yeah maybe thats 2.0 Apr 22 17:20:17 you could always download a dex with a new enum library ;-) Apr 22 17:20:39 :D Apr 22 17:20:44 I wonder how that works in art anyway Apr 22 17:21:40 probably optimized behind the scenes Apr 22 17:21:58 is there a way to query the window manager if a flag is set ? i only see add and clear Apr 22 17:22:04 http://stackoverflow.com/questions/29453358/dexclassloader-run-on-art-erroris-there-some-method-instead Apr 22 17:22:06 what an asshole question Apr 22 17:22:12 getWindowFlags? Apr 22 17:23:13 i dont see getWindowFlags :P Apr 22 17:23:37 wtf isn't there getWindowFlags ! or am i doing it wrong Apr 22 17:23:38 getAttributes Apr 22 17:23:55 getAttributes.flags Apr 22 17:23:58 thats the layoutParams Apr 22 17:24:02 ah Apr 22 17:24:28 thanks Apr 22 17:32:57 <_genuser_> new flstudio out today!! Apr 22 17:44:49 Hi everyone, yesterday I have some problems with context, in my mainactivity (toolbarActivity) (Activity A) i have my context = getApplicationContext, i also have a fragment, in the fragment i get my context with getActivity() and this fragment have a recyclerview that onclick init another activity, so the problem was that in the new Activity (Activity B) to access the context i was using getApplicationContext and everything wor Apr 22 17:45:12 with autoLink="all" o use a progressDialog Apr 22 17:45:25 I solve the problem today using in Activity B context = this Apr 22 17:45:50 why is this happen?, why is crashing with context = getApplicationContext but not with context = this Apr 22 17:46:21 why is what crashing Apr 22 17:47:21 by the way, and Activity IS a Context Apr 22 17:47:34 Activity instanceof Context == True Apr 22 17:48:35 this was the crash log yesterday https://gist.github.com/Alevsk/04babfa1eb173b79c4e2 Apr 22 17:49:07 i was doing some research and in stackoverflow says that was a problem with the context Apr 22 17:50:34 Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag, I set the flag on the intent i call from the fragment Apr 22 17:51:13 It tells you why in the log Apr 22 17:51:45 "Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?" Apr 22 17:53:15 yeah, i set the flag and everything Apr 22 17:53:26 and the app didnt crash when loading the new activity Apr 22 17:53:39 only when i use the context in some view Apr 22 17:54:08 but as I said, I solved using context = this, im doing some research to understand why it works like that Apr 22 17:55:18 still don't know "what" is crashing Apr 22 17:55:53 ah I see no "loading the new activity"? Apr 22 17:55:57 s/no/now/ Apr 22 17:57:07 Alevsk: Because you are trying to start an activity with the application context instead of the activity context Apr 22 17:57:19 yiati, if you don't have FLAG_ACTIVITY_NEW_TASK it's /supposed/ to crash Apr 22 17:57:25 yep Apr 22 17:57:45 Alevsk, don't use the wrong context Apr 22 17:57:46 Alevsk, simple Apr 22 17:58:31 sounds like you created a view from code and passed getApplicationContext() for the constructor Apr 22 17:58:37 Alevsk: you are technically starting the activity 'within the Activity', but that's not what that log is trying to tell you. It's trying to tell you that the context you gave it is not 'within the Activity' Apr 22 17:58:59 e context i was using getApplicationContext and everything wo Apr 22 17:59:01 WRONG Apr 22 17:59:18 ApplicationContext IS NOT an Activity Apr 22 17:59:25 correct Apr 22 17:59:55 Activity IS A Context, but not ApplicationContext Apr 22 18:00:11 java basics... Apr 22 18:01:00 I understand, thanks for your advices Apr 22 18:10:04 i'm becoming very sceptical of this gradle build stuff. i'm convinced that there are some nondeterministic aspects to how its ordering its tasks. I can have a build working fine for days, and then - in the ide or command line, i get an error like "Error:(5, 5) uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library" when nothing has changed in a long time Apr 22 18:11:46 g00s, using snapshot dependencies? Apr 22 18:11:50 using + versions? Apr 22 18:12:16 i am , but only for rxjava which hasn't changed in a while either Apr 22 18:12:57 for the gradle plugin? Apr 22 18:13:02 no Apr 22 18:14:55 i also had that weird funky bug in AS where it put error markers everywhere on startup (clean slate!) . invalidated caches, restarted, gradle sync, clean - nothing helps - except actually telling it to build - then once it does that everything goes OK Apr 22 18:15:09 heh Apr 22 18:16:17 i have a clue whats going on there though; i have a code gen step which works - but for some reason its not being added to the IDE model, so the errors cascade Apr 22 18:16:48 just add the codegen dir into your project structure Apr 22 18:17:22 yeah, there is a specific DSL for that ... one sec Apr 22 18:17:36 variant.registerJavaGeneratingTask(task, sourceFolder1, sourceFolders2,...) Apr 22 18:17:44 I mean in AS Apr 22 18:18:13 I really don't care much for gradle, as I obviously don't use it Apr 22 18:18:26 I only know about it insofarasmuch as I need to in order to maintain my own system Apr 22 18:18:51 originall i tried something like src += [ my added code ] but that didn't work for AS, i think thats why they added that method ^^^ Apr 22 18:19:20 i guess now i have to find out if they deprecated it, i don't see it mentioned anywhere except the release notes for an ancient version Apr 22 18:23:30 wow AS just gets stuck :/ Apr 22 18:23:34 every time I run the app Apr 22 18:24:10 Afzal it still feels very 0.9 to be (using 1.2 rc) Apr 22 18:24:20 honestly wtf, 1.1 was better than this Apr 22 18:26:01 Afzal: I see you complains about last AS here often. Which are perfectly valid. But why not use stable version like me=) Apr 22 18:26:23 icedp you bet I'm going to go stable as soon as 1.2 goes stable :) Apr 22 18:26:25 I promise Apr 22 18:27:47 Hello. I'm using Android Studio and I press the play button to run my app, but how do I stop running it? Apr 22 18:29:58 tpayne: stop it in what way? hit the home button? ¯\_(ツ)_/¯ Apr 22 18:30:15 Afzal BUILD SUCCESSFUL Total time: 4 mins 55.823 secs Apr 22 18:30:16 well it's it "attached" Apr 22 18:30:24 yeah, under 5 min ! Apr 22 18:30:24 isn't it* Apr 22 18:30:55 g00s, will you watch the match? Apr 22 18:31:06 i hit run from Android Studio, pressing the home button stops it? Doesn't that just background it? Apr 22 18:31:44 tpayne: you have to call finish() in onBackPressed() Apr 22 18:31:44 tpayne: yeah, it backgrounds it. do you actually need the process to stop? it's not really "attached" in any way, any more than any other app running on the phone. Apr 22 18:32:09 i want it to stop because if i hit run again, i don't want another one running Apr 22 18:32:23 i'm going through tutorials so i'm making small changes and testing them often Apr 22 18:32:54 it'll stop the current one, install the new one, and run the new one. it's a full replacement. Apr 22 18:33:11 the only time it doesn't is if nothing has changed, then it just starts / resumes / does nothing to the app already on the device. Apr 22 18:34:58 ok Apr 22 18:34:59 thanks Apr 22 18:35:03 g00s wow, that's nuts Apr 22 18:35:36 5 minute build? zomg Apr 22 18:35:53 groxx 4min 58 sec :D Apr 22 18:35:54 and last, i'm going through the tutorial and it says that i should by default have a file called ic_launcher.png in my drawable folder. I don't have any files in my drawable folder. Any clue? Apr 22 18:36:03 rounding error. it might be using floating point! Apr 22 18:36:26 i just migrated to the new appcompat, some of the colors of things changed i guess that was expected Apr 22 18:36:32 tpayne: it's probably in the drawable-hdpi (or -xhdpi or others) folders Apr 22 18:37:01 oh yeah, it's in mipmap-hdpi Apr 22 18:37:11 ah, right. they updated to the mipmaps. Apr 22 18:37:22 old tutorial :) Apr 22 18:37:32 if i swipe the notification it does not properly remove the data or text on that notification and in next notification the previous data is present in it.. how should i fix this? Apr 22 18:37:33 relatively speaking, at least. Apr 22 18:38:32 shit old tutorial? Apr 22 18:38:42 Made Nov. 2014! Apr 22 18:39:06 tpayne: not necessarily. the mipmap change was fairly recent, and it doesn't really impact anything (except confuse people looking in drawable/, that is :) ) Apr 22 18:39:18 haha ok thanks i'll just proceed Apr 22 18:39:55 has anyone had that issue where you use SwipeRefreshLayout on fragments. If you hit back while the fragment is refreshing, it will overlap the 2 fragments? Apr 22 18:39:56 http://stackoverflow.com/questions/29773876/swiperefreshlayout-refresh-conflict-with-fragmenttransactions Apr 22 18:41:05 anyone here using appcompat 22.1? so in layouts we get rid of app:theme --- but what about menu.xmls ? Apr 22 18:41:31 menus have themes? Apr 22 18:42:09 with appcompat some menu attributes needed app:theme too Apr 22 18:42:17 funky. TIL. Apr 22 18:42:21 then you would use MenuItemCompat. Apr 22 18:44:08 how'd appcompat 22.1 get rid of app:theme for toolbar/layout? Apr 22 18:44:26 didnt they just allow app:theme everywhere now? Apr 22 18:44:35 pfn chris banes talks a little about it in his blog Apr 22 18:44:49 I don't see how they got rid of it... Apr 22 18:44:50 dont have enough memory to start chome :( Apr 22 18:45:02 g00s, how do you not invest in your development setup? Apr 22 18:45:22 g00s: have you tried forgetting things? Apr 22 18:45:24 half the time i dont even have food, nm buying nice HW Apr 22 18:45:44 g00s, how have you not found a job, in that case? Apr 22 18:45:54 * g00s sighs Apr 22 18:46:24 well, long story. my project was going to be acquired, i was going to be hired, and live happily ever after Apr 22 18:46:30 but no Apr 22 18:46:34 bummer Apr 22 18:46:37 :/ Apr 22 18:47:10 I should pester people at typesafe to get them to care about android, and get my plugin acquired Apr 22 18:47:21 pfn sure Apr 22 18:47:28 * pfn shrugs Apr 22 18:47:36 i suspect though, typesafe doesn't want to limit themselves to android vm Apr 22 18:47:42 So I had to email the contact at the ad company whose sdk had a bug, I've since figured out that the version of the sdk i was using they had hardcoded somethign that was causing the problem. However their sdk is kind of, ... err aggravating-- it requres you to pass in your ui, which it temporary takes over, and then releases once its finished. Apr 22 18:47:43 Is suggesting that they simply add their own view to a parent (which you already pass in) and removing it once finished a bad idea? Apr 22 18:47:49 g00s, there is no limiting at the moment Apr 22 18:47:50 pfn switch to firefox then Apr 22 18:47:58 guys... ifyou ever think "my keyboard is pretty dirty, I'll vacuum it!" - FORGET THAT ! Apr 22 18:47:59 g00s, especially with dotc Apr 22 18:48:19 danijoo you have to take out each key first Apr 22 18:48:20 danijoo bleach or rubbing alcohol :D Apr 22 18:48:22 <_genuser_> danijoo: what did you find? chips? nuts? cocaine? Apr 22 18:48:27 even better ... fire ! Apr 22 18:48:31 _genuser_ all of the above Apr 22 18:48:37 and hair Apr 22 18:48:37 Afzal, how is firefox related? or do you mean g00s Apr 22 18:48:41 so much hair Apr 22 18:48:48 yes I mean g00s my bad Apr 22 18:48:57 I just lost my F7 key .... Apr 22 18:48:59 you both have the same colour for some reason >_< Apr 22 18:49:05 I like firefox, but pentadactyl is so slow... Apr 22 18:49:06 danijoo lmao you vacuumed the key? XD Apr 22 18:49:11 yep.. Apr 22 18:49:12 <_genuser_> Afzal: I keep a can of compressed air around to keep it clean and yet so much of the stuff (nuts, chips) still makes it into the keyboard. Apr 22 18:49:14 Afzal oh yeah i do mean to switch over to FF again, once they add that feature that tells me which of my 200 tabs is eating my CPU Apr 22 18:49:18 danijoo, get replacement keycaps Apr 22 18:49:27 <_genuser_> lol "LOST THE F7 KEY?" Apr 22 18:49:47 it's okay though, I doubt I even use F7 Apr 22 18:49:55 I'll give you mine. lol Apr 22 18:50:07 <_genuser_> I use mine regularly. Apr 22 18:50:20 some AS shortcut? Apr 22 18:50:23 <_genuser_> f7 - code view. shift-f7 designer view (visual studio). Apr 22 18:50:42 now I have to disassemble the whole thing and pick it out of 100 vacuumed spiders Apr 22 18:50:50 lol Apr 22 18:50:51 danijoo, just order up some new keycaps Apr 22 18:50:52 anyone have any advice on my question? Apr 22 18:50:54 <_genuser_> danijoo: lol. Apr 22 18:50:56 Hey guys, so the MediaStore class holds _meta_ data about files on the device? Apr 22 18:50:59 danijoo, or take it as an opportunity to get a bling keyboard Apr 22 18:51:14 pfn, I should really check if there are some available for it Apr 22 18:51:18 i wonder if those new apple keyboards will be available standalone - the ones in the new machines Apr 22 18:51:24 I love it. No way I get another one Apr 22 18:51:37 g00s, which ones? Apr 22 18:51:45 The terrible ones in MacBook? Apr 22 18:51:55 Mavrik the new keyboard they added to the last macbook Apr 22 18:52:00 oh you dont like them i gues Apr 22 18:52:03 Ah, doubt it Apr 22 18:52:17 <_genuser_> danijoo: http://www.amazon.com/Rosewill-Mechanical-Keycaps-Keyboards-RIKC-13003/dp/B00K8CDQLA/ref=sr_1_4?ie=UTF8&qid=1429728701&sr=8-4&keywords=keyboard+replacement+keys Apr 22 18:52:18 Since the reason they went with it was the fact they had to make the chasis thinner Apr 22 18:52:21 lasserix_: Is the SDK open source? Apr 22 18:52:26 g00s, they'll probably make a full-sized version eventually Apr 22 18:52:29 danijoo, https://lh6.googleusercontent.com/-iuBniRyldtA/VTft0Q-atEI/AAAAAAAAPP4/YjZFcwEId-I/w345-h613-no/15%2B-%2B1 :p Apr 22 18:52:32 with more key step Apr 22 18:52:43 pR0Ps: no Apr 22 18:52:48 but they don't look like they care about desktop much lately :P Apr 22 18:53:29 danijoo, tenkeyless mechanical, yum Apr 22 18:53:38 I'll spare you the "open source soapbox" and just say that you can email them but I doubt anything would come out of it. Apr 22 18:54:24 I dont know if I like those large mechanical keyboards.. Apr 22 18:54:35 danijoo, it's not large Apr 22 18:54:48 heavier, though, certainly Apr 22 18:55:00 pR0Ps: just dont want to get fired Apr 22 18:55:54 pfn, I mean those keyboards with big keys. Apr 22 18:56:11 danijoo, standard-size keys... are you using something non-standard? Apr 22 18:56:32 yeah. The ones they usually put in laptops. where the keys are more flat Apr 22 18:56:52 thats mine. Coudnt find an english link: http://www.amazon.de/Cherry-eVolution-MultiMedia-Keyboard-G85-23100/dp/B001PMRB1S/ref=sr_1_1?ie=UTF8&qid=1429728788&sr=8-1&keywords=cherry+g230 Apr 22 18:57:01 seems to be a german manufacture Apr 22 18:57:02 lasserix_: By all means, suggest it to them, I'm just saying don't be surprised if they totally disregard your ideas. Apr 22 18:57:32 danijoo, yeah, yuck :p Apr 22 18:57:42 pR0Ps: tbh i hope i never have to use their stuff again Apr 22 18:57:44 ;p Apr 22 18:57:56 Companies have process. Some architect inside it came up with the idea and they took a long time to implement it. A random dev saying "do it this way" probably won't cause them to rethink everything Apr 22 18:58:18 Its one of those "you can put beer over me and Ill still work"-keyboards. Apr 22 18:58:31 Guess they didnt expect someone to vacuum it :D Apr 22 18:59:40 pR0Ps: yeah i know what you mean, their sdk is a mess tho Apr 22 19:00:04 for instance: they have onFinished and onError, if there is an an error you get onError and onFinished, Apr 22 19:00:09 imho terrible design! Apr 22 19:00:11 I have compileSdkVersion=21 and buildToolsVersion="20.0.0" and it's all good, when I switch build tools to 21.0.0 I get a weird build error: http://pastebin.com/Mwt37r9i WTF... Apr 22 19:00:22 either say completed with success or make them mutually exclusive, but not both Apr 22 19:05:25 Anyone tell me what MediaStore.Images.Media.Data returns? Apr 22 19:05:29 Are Fragments good for switching views? I want to replace a View with another one at runtime, probably with some transition... Apr 22 19:06:43 dimitrovskif: That's supposed to be the point of them yes, but you can also do the same thing with just an Activity Apr 22 19:07:33 yiati: I know it's possible, I have some android dev experience but I don't know the new patterns Apr 22 19:08:34 dimitrovskif: Fragments are the new Google standard for switching views, but plenty of people don't like the complexities brought on by them, https://corner.squareup.com/2014/10/advocating-against-android-fragments.html Apr 22 19:09:20 dimitrovskif: new* since 3.x+ for tablets, and 4.x+ for all devices Apr 22 19:15:17 DAE think that Android wear SDK should let the app know when the message was successfully delivered to the app on the watch? Apr 22 19:15:32 Instead of what it currently does "Tell if the message was successfully delivered to the watch" Apr 22 19:16:36 dimitrovskif: the other point of Fragments is to be able to render multiple application "windows" in a single screen, such as a side-by-side view of email headers vs email contents Apr 22 19:16:54 zerowaitstate: I know, but I don't really need that Apr 22 19:24:54 when you set id you can pass a number ? Apr 22 19:24:55 "A small propeller-driven drone possibly tainted with radioactive cesium was discovered Wednesday on the roof of the prime minister’s office" :O Apr 22 19:25:32 Folks, what can i use to finish all activities but the current running activity? Apr 22 19:26:03 how can i convert an int into a "resource id" for checking in code id of view? Apr 22 19:26:58 RishabhTatiraju: nothing that I know of. why do you want to? your activity-lifecycle shouldn't matter outside of the current one, because they're not even guaranteed to be running. Apr 22 19:27:02 does Android emulators show an on screen keyboard? Apr 22 19:27:23 not if you have a physical kb Apr 22 19:27:26 tpayne: yeah, modify the emulator to disable keyboard input. Apr 22 19:27:27 groxx: i have a listview that loads multiple activities Apr 22 19:27:38 on click Apr 22 19:27:44 ok Apr 22 19:27:47 *sigle activity per click Apr 22 19:27:51 *single Apr 22 19:27:57 how can i compare an int to an id in android? Apr 22 19:28:06 lasserix_: ids are ints. == Apr 22 19:28:06 lasserix_, an id is an int :) Apr 22 19:28:11 no Apr 22 19:28:11 but they just stack up, and the user has keep pressing the back key to exit Apr 22 19:28:16 lasserix_, yes Apr 22 19:28:17 getId == int value doesn't work Apr 22 19:28:27 he has to go through all background activities Apr 22 19:28:37 lasserix_, what are you trying to do? Apr 22 19:28:51 RishabhTatiraju: to leave the app? or to get back to the list? Apr 22 19:28:52 I am supressing an sdk from adding views except one textview to a viewgroup Apr 22 19:29:01 ids are just static ints. look into your.project.R.java if you dont believe Apr 22 19:29:05 lasserix_: it works Apr 22 19:29:09 lasserix_: show the code Apr 22 19:29:13 i know they have hardcoded the id as 10013 so i just pass them a viewgroup with addView suchthat it only ads view with that id Apr 22 19:29:29 if (child.getId() == 10013) { Apr 22 19:29:30 lasserix_: android.R.id..... Apr 22 19:30:05 i believe you, i know it is. but getId == int value is causing an error Apr 22 19:30:16 lasserix_, i have no idea why anyone would need to do what you are trying.. :s Apr 22 19:30:17 "expected resource of type id" Apr 22 19:30:34 danijoo: because the sdk is stupid, you pass in a relative layout with your videoview and it ads a bunch of views Apr 22 19:30:38 for instance a skip button Apr 22 19:30:58 my employers don't want a skip button, so i am supressing adding those views Apr 22 19:30:59 lasserix_: that sounds like an inspection warning, not a compilation problem. disable it for that statement. Apr 22 19:31:07 how to? Apr 22 19:31:18 lasserix_, dont use it then :p Apr 22 19:31:26 danijoo: not my choice, Apr 22 19:31:57 groxx: thanks Apr 22 19:32:20 click the lightbulb, press 'right', pick 'suppress for statement' Apr 22 19:33:08 though in general it's correct. if you want to ignore certain IDs e.g. when inflating your view, you should probably declare a styleable attribute that accepts IDs, and pull the value from that. Apr 22 19:34:28 lasserix_, can't you look up the next id from MediaController and set it to be invisible? Apr 22 19:34:52 quinnjn: the sdk takes a relativelayout and a videview (in that relativelayout) ads a variety of widgets Apr 22 19:34:58 of which i want none, Apr 22 19:36:08 like it is _really_ aggravating to have an sdk take over you ui Apr 22 19:36:13 which screws up the layout Apr 22 19:36:43 lasserix_, cant you just fork the sdk? Apr 22 19:36:49 its not open source Apr 22 19:36:50 or make the view View.GONE Apr 22 19:37:07 again, they add the views and not right away Apr 22 19:37:15 ok ^^ Apr 22 19:37:16 lasserix_, what components are you using? Apr 22 19:37:19 much easier to supress the views from being added Apr 22 19:37:22 hat a fucker sdk Apr 22 19:37:23 components? Apr 22 19:37:28 danijoo: seriousily Apr 22 19:37:39 lasserix_, VideoView, MediaController, something else? Apr 22 19:37:45 they should just take a viewgroup, and their own sub-hiearchy and remove it once the ad is finished Apr 22 19:38:01 quinnjn: the sdk requires a videoview and relativelayout. i can't even use those i have to use textureview and exoplayer Apr 22 19:38:25 as a result i have a subbranch overlaying my textureview, toggling the visibility when the ads play Apr 22 19:39:26 lasserix_, why can't you use a VideoView? Apr 22 19:39:41 it is very limited in what media types it can play Apr 22 19:39:52 can't do hls, can't do rtsp unless specifically configured Apr 22 19:39:58 lasserix_, ah yeah you were using some streaming thing right? Apr 22 19:40:04 you can't get a bitmap from it Apr 22 19:40:09 when you need to pause Apr 22 19:40:12 lots of reasons Apr 22 19:40:19 but yeah the streaming was the main one Apr 22 19:47:30 Does anyone have experience with the SYSTEM_UI_FLAG_IMMERSIVE_STICKY flag? I've been using it in one part of my app, but if I background my app when I'm not in immersive and then go to another page in immersive, it no longer draws the area that the soft nav occupies Apr 22 19:47:44 thanks for the help Apr 22 19:47:49 This doesn't repro on KitKat and only happens on Lollipop Apr 22 19:48:18 I'm thinking I need to reset some window flag onPause or something, but nothing works so far :( Apr 22 19:58:37 In a Fragment's Lifecycle, the onAttach() method is called before the onCreate() method. I can't wrap my head around this. Why would you attach a Fragment first? Apr 22 19:58:38 hey guys I've got a meta question Apr 22 19:59:31 simon228_: because you need a context in order to inflate views Apr 22 20:00:02 "attach" isn't "attached layout" / "attached to window". it's just "has activity". Apr 22 20:00:43 yiati, thx Apr 22 20:00:48 at work, say you are responsible for Android apps. Are you supposed to just code what they tell you to code? Apr 22 20:00:55 groxx: Is that also why onDetach is called after onDestroy? To release the context at the last possible moment? Apr 22 20:01:23 like say the designer has made up a Settings screen that looks nothing like what Android Settings screens look like, do you say "this isnt the way its done on Android"? Apr 22 20:01:43 ventura: welcome back :D Apr 22 20:01:45 it's basically an Activity called Settings Apr 22 20:02:32 simon228_: probably also because you typically do lifecycle calls like onion layers. you undo in the reverse order that you do. but in this case, it's probably also because views have contexts, so removing the context _before_ the views doesn't really make sense or match reality. Apr 22 20:02:41 SimonVT? Apr 22 20:02:46 care to comment? Apr 22 20:03:06 personally, I hate the built-in settings styling. Apr 22 20:03:19 groxx: the new one? Apr 22 20:03:34 alright, that's an opinion Apr 22 20:03:46 also re alternate settings: is it better? or just different with no benefit? Apr 22 20:03:52 what about other elements that you believe "should look like this if it's to be implemented on Android"? Apr 22 20:04:07 Odaym http://shop.oreilly.com/product/0636920037422.do Apr 22 20:04:14 well yes, that argument, how do you argue this way? what is your proof of what's better, compared to someone who is arguing with the belief that "they know UX"? Apr 22 20:04:28 like a spacing between the last two items of a listview Apr 22 20:04:37 step one: look at the google style guidelines. Apr 22 20:04:47 Odaym: step two: don't get fired Apr 22 20:04:49 if the answer is in there, that's the google way of doing it Apr 22 20:05:05 .... profit ! Apr 22 20:05:08 what about the need for apps to look the same on Android and iOS Apr 22 20:05:11 "they know UX" _is_ the claim that they know better for UX. not necessarily true in reality, of course, but that's kinda the point of a designer. Apr 22 20:05:40 well in the company I'm in the designer gets called in again after they're done with the design, and anything we don't like gets changed Apr 22 20:05:43 Odaym, The premise that you should ignore the platform style guidelines and look the same on both is flawed at it's core Apr 22 20:05:48 he is basically a photoshopper of what we see is "correct" Apr 22 20:05:50 same on ios and android I personally find creates confusing UI on one or the other, because android has a back button. Apr 22 20:06:12 these are all valid points and I face them, all of them. what do you do about them? Apr 22 20:06:18 right now I just stopped arguing Apr 22 20:06:24 Odaym, I don't hire designers that stupid? heh Apr 22 20:06:31 for example, Save button inside the settings activity Apr 22 20:06:38 I dont even....... Apr 22 20:06:57 groxx: thanks for the response! Do any of the factors mentioned in the answers to this question (http://stackoverflow.com/questions/29677812/why-is-onattach-called-before-oncreate) matter as well or is the only reason why onAttach is called first is so you have a context? Apr 22 20:07:16 thanks for the book suggestions it seems to be very spot on Apr 22 20:07:21 depends, I suppose, but I'll generally claim "added button" implies "less user-friendly" Apr 22 20:07:24 Odaym sometimes they are confused, what they really want is consistent branding - not looks , but they don't know that :) Apr 22 20:08:07 I am not pushing my ideas a lot because there is a huge barrier between what I want to express and where they still are thinking about Apr 22 20:08:29 cause for such a designer, he must be treated as the portrayer of rough ideas of what's need, what he delivers gets morphed into what should be happening on each platform Apr 22 20:08:45 a GOOD designer does this for you and makes you feel just like a programmer, that's what a good designer does Apr 22 20:09:05 The point I would make is that there are tangible differences between the way the Android and iOS interfaces function. For a user that has only a single device, using the visual metaphors of a different device is confusing Apr 22 20:09:09 Odaym also it says right there on d.android.com (somewhere) don't use other platform l&f Apr 22 20:09:35 simon228_: kinda. there's also that you can remove a fragment's view without detaching it (or have no view), and it's a reasonable separation of concerns. "is given context" is often separated from "do things with context". Apr 22 20:10:42 There are some interface designers that like to draw attention to how cool their interface is. that's wrong thinking Apr 22 20:11:11 If I am thinking about the interface, I'm not thinking about my task. The interface should be streamlined enough that I don't think about it. Apr 22 20:12:19 If they want to drop a logo on it to mark their territory that's fine, but moving the OK button around like your a product placement specialist at a grocery store is just annoying to users Apr 22 20:13:21 yiati: new settings is a bit nicer looking, but so much wasted space, and so hard to do even slightly non-standard things. massive PITA. Apr 22 20:13:36 groxx new settings ? Apr 22 20:14:10 i notice calendar has a distinctly different looking settings, i hate it of course Apr 22 20:14:16 sorry DC, could you please repeat what I missed from a GOOD designer does this for you and makes you feel just like a programmer, that's what a good designer does Apr 22 20:14:25 calendar is "distinctly different" from a lot of things on android :) Apr 22 20:15:01 cause you know people tend to do a lot of "think of me as the user, I open this and I do the thing you're suggesting, what happens then? I get confused! So that thing you're suggesting isn't going to work!" Apr 22 20:15:02 The point I would make is that there are tangible differences between the way the Android and iOS interfaces function. For a user that has only a single device, using the visual metaphors of a different device is confusing Apr 22 20:15:10 it's so amateur and based on nothing! Apr 22 20:15:16 There are some interface designers that like to draw attention to how cool their interface is. that's wrong thinking Apr 22 20:15:20 If I am thinking about the interface, I'm not thinking about my task. The interface should be streamlined enough that I don't think about it. Apr 22 20:15:24 If they want to drop a logo on it to mark their territory that's fine, but moving the OK button around like your a product placement specialist at a grocery store is just annoying to users Apr 22 20:16:21 they also hit you with the argument that "if you havent seen it before you can start the trend by doing it yourself!" Apr 22 20:16:31 so you're like met with different boilerplate arguments for every angle Apr 22 20:16:44 all based on nothing, just theory and assumption Apr 22 20:17:03 Odaym: then split-test it Apr 22 20:17:19 no you're talking about meeting decisions, they want to get out of that room done with the topic Apr 22 20:17:25 inferior level Apr 22 20:17:36 just upgraded to support v22.1, now I'm getting some illegal state exception: A factory has already been set on this LayoutInflater Apr 22 20:17:43 and they dont help themselves come out of this inferiority by relying on real DATA, real proof of these theories Apr 22 20:18:00 not "inferior", just "lower standard" Apr 22 20:18:27 nothing kills excitement more than that, feeling that your good ideas are hitting walls because of some business person who takes himself as an example Apr 22 20:18:33 him/her/etc Apr 22 20:18:49 Odaym: well, it's their money Apr 22 20:19:05 true of course Apr 22 20:19:08 Odaym: if they want to spend it building a frankenstein monster, it's their business Apr 22 20:19:26 sadly, the frankenstein'd app goes on your resume :) Apr 22 20:19:35 true, that is the essence of the question zerowaitstate. do you submit to that or what? Apr 22 20:19:44 what do YOU do at YOUR job, that's the question I wanted to ask Apr 22 20:20:03 Odaym: I express my displeasure, then take care of business and get paid Apr 22 20:20:11 yea, same Apr 22 20:20:16 meh Apr 22 20:21:12 these companies man, they tell you you are responsible for the whole party Apr 22 20:21:19 you're just a programmer Apr 22 20:21:27 das it, and if you have anything to add, go ahead Apr 22 20:21:33 ah. here: startup. strong opposition by anyone in the group causes more discussion. sometimes prototyping to see how it actually feels, since mockups aren't always sufficient. ultimately we usually go with our designer-guy (who is good), but he can be swayed. Apr 22 20:21:47 I was in a place like that, but little money Apr 22 20:21:50 so I came here Apr 22 20:22:30 Odaym: you can't possibly be responsible for decisions you aren't allowed to make Apr 22 20:22:35 Odaym: end of story Apr 22 20:22:48 boy he meant that Apr 22 20:22:50 lol Apr 22 20:22:58 stormed out Apr 22 20:22:59 previous job, whose website was a pile of inconsistency, and I wasn't really invested in the company (financially or mentally): don't really care, just built it. when they complained about things I pointed out earlier, I fixed it. Apr 22 20:23:35 yes groxx, I got a similar answer today when I asked someone who is good but had been there before me, he answered the same Apr 22 20:25:31 I should probably add to that "did side projects to maintain sanity" and "occasionally yolo'd behavior into parts of the site that had no design, doing things I had previously mentioned". the latter gave me something to point to when saying "this works, you've tried it, you liked it". Apr 22 20:25:49 I think groxx you are older so that feeling of not being completely self-fulfilled by the work you're doing has simmered, until it found its place in another company Apr 22 20:26:10 i.e., when building an internal tool, do something slightly fancy. Apr 22 20:27:32 dunno. am I older? 28 :| Apr 22 20:28:05 maybe more exp. I do the same as you, always a side project at night Apr 22 20:28:19 Need Help im getting During kernel conpilation, when i do a full build using 'brunch galaxysmtd' i get cant read from initramfs.list Apr 22 20:28:28 #android-root Apr 22 20:28:32 I'm primarily motivated by annoyance though, i think. "this sucks" until I get annoyed enough that I try to fix it. and there's an infinite amount of suckage in software, so I always have something to do :) Apr 22 20:28:32 JesusFreke whats up with this comment http://stackoverflow.com/questions/17094094/showing-dex-method-count-by-package#comment24735714_17094094 Apr 22 20:28:34 :P Apr 22 20:28:44 2^16 = 65536 Apr 22 20:28:51 No Ideas Apr 22 20:28:53 .... Apr 22 20:29:03 wrong channel Droidwall_ Apr 22 20:29:11 Which Channel Apr 22 20:29:12 Then Apr 22 20:29:26 i think #android-root Apr 22 20:29:33 Yep thanks MAte Apr 22 20:29:38 maybe #android too? Apr 22 20:29:55 probably mostly -root though Apr 22 20:30:08 Yeah Apr 22 20:30:19 Because its Custom Rom and and Apr 22 20:30:19 is it common for apps to neglect the Action Bar? Apr 22 20:30:30 JacobTabak: in general, 64k is 2^16 and 65k is 65000 :p Apr 22 20:30:54 oh yeah Apr 22 20:31:03 the ki vs k Apr 22 20:31:12 tpayne: "neglect"? Apr 22 20:31:20 you nerds and your side projects :p Apr 22 20:31:22 like, i want to get rid of it completely Apr 22 20:31:31 is this unheard of? Apr 22 20:31:31 tpayne, use a no action bar theme Apr 22 20:31:37 JacobTabak: :p Apr 22 20:31:37 not unheard of Apr 22 20:31:40 ok thanks Apr 22 20:31:43 ah. depends :) personally I don't use it anywhere. Apr 22 20:31:52 No One is answering there #android-root Apr 22 20:31:52 ...... Apr 22 20:31:54 got it, just trying to grasp that android style! Apr 22 20:31:58 groxx, in favor of? toolbar is basically actionbar for all intents and purposes Apr 22 20:32:09 groxx, http://www.amazon.com/Articulating-Design-Decisions-Communicate-Stakeholders/dp/1491921560 Apr 22 20:32:13 why does it say pre-order? Apr 22 20:32:15 it's not there? Apr 22 20:32:22 oh, it says so, nvm Apr 22 20:33:14 Odaym you can get early draft from oreilly Apr 22 20:33:23 yea.....Im looking at that Apr 22 20:33:28 pfn: only somewhat. it's a useful pattern when you have something that fits what it provides. and since toolbar can more easily scroll out of the way, it's more widely applicable. but it's not always best, and on big devices the controls are a long way away from fingers. Apr 22 20:33:39 not sure I want that, its going to cost some so I'd better get the final version in all its freshness Apr 22 20:34:05 if you can make an android-y UI that makes things reachable on all devices and _not need_ actionbar / something like it, I generally think that's better. Apr 22 20:34:22 * g00s hates actionbars that scroll away Apr 22 20:34:34 I like actionbars that scroll away Apr 22 20:34:39 I need to implement that Apr 22 20:35:24 if they don't scroll away, they eat up a lot of screen real-estate in large content areas. is the title of the thing _that_ important? you have a back button, so that button isn't necessary. and the overflow menu buttons are by definition not usually used. Apr 22 20:35:51 in the 90%+ case, it wastes space. so 90%+ of the time I'd rather get rid of it. Apr 22 20:36:16 "content is king" and all that. it's not content. Apr 22 20:36:33 i agree with uneccessary chrome and all that Apr 22 20:36:34 pretty much, I agree with grox Apr 22 20:36:56 if you have essential navigation that is brokered by the toolbar, then you obviously shouldn't hide it Apr 22 20:37:00 but on my tablet, all the apps that implement that have very janky shit with scrolling their content and toolbar Apr 22 20:37:06 ha Apr 22 20:37:24 well, tablets it's a WAY smaller percentage of space wasted :) but yeah, poorly done is poorly done. Apr 22 20:38:13 now , i need to find out what weird crap bugs will happen if i try immersive mode Apr 22 20:38:14 g00s: could that be because they're actually changing the layout on scroll? that's kinda almost necessary with actionbar (I think?), though not toolbar. Apr 22 20:39:41 I guess I'll suffix all this with "I primarily do phone dev" :) tablets I don't really use, nor have I really developed for. I will eventually though. Apr 22 20:40:14 and I have minsdk = gingerbread-something. so I have to deal with phones like this: http://www.gsmarena.com/samsung_galaxy_y_s5360-4117.php Apr 22 20:40:24 hmm , that good ol appcompay & samsung crash thing - need to fix that one too Apr 22 20:41:40 I need to get around to getting a nexus 9 Apr 22 20:42:41 this is funny https://code.google.com/p/android/issues/detail?id=78377 Apr 22 20:42:53 somebody re-opened it, and chris closed it right away Apr 22 20:43:17 somewhere in these 200 comments is ... an answer Apr 22 20:44:43 i wonder if comment 189 is true : user asks for help because devs say 'out of luck' Apr 22 20:47:22 Okay guys, I have a question involving RemoteView's setPendingIntentTemplate, and launching applications that a user chooses that's installed on their phone (This is for the Samsung Galaxy S6 Edge, when the screen is off, and you turn on the feeds). Apr 22 20:48:24 If anyone thinks they have knowledge involving Intents and setPendingIntentTemplates, I'll open a pastebin with what I have, what I tried, and hopefully we can figure it out! Thank you in advance! Apr 22 20:51:09 why do Android variables sometimes start with m? Apr 22 20:51:21 g00s: personally, I agree with #197 (though half of it is unnecessary) Apr 22 20:51:26 tpayne: CedricBeust_ is the reason. :D Apr 22 20:51:30 downgrade -> bam, fixed! Apr 22 20:51:37 TacticalJoke: huh? Apr 22 20:51:37 I think, anyway. Apr 22 20:51:57 I think they've claimed blame for that one, yeah :) Apr 22 20:51:58 tpayne: It's a convention that's used in some programming contexts. It's rare in Java, I guess. It stands for "member [variable]". Apr 22 20:52:08 ok thanks Apr 22 20:52:20 probably because java IDEs typically style member-variables differently than others Apr 22 20:52:43 though alas, that does not work in diffs Apr 22 20:52:54 tpayne: Note that the Android guidelines suggest using that for code contributing to the AOSP. Your code doesn't have to use that convention. Apr 22 20:53:21 groxx hm, 197 says don't use newer appcompats though :( Apr 22 20:53:26 g00s: yup! Apr 22 20:53:45 groxx thats crazy, this bug is from Oct 2014 Apr 22 20:53:59 Is that the Samsung bug? Apr 22 20:54:06 alas that they didn't close it as "working as intended" Apr 22 20:54:10 TacticalJoke yeah, do you know of an official workaround ? Apr 22 20:54:12 TacticalJoke: yeah Apr 22 20:54:16 proguard. Apr 22 20:54:18 Nah. I only heard about using ProGuard. Apr 22 20:54:47 I also have an issue on my tracker dedicated to figuring out whether I need to worry since I'm not using AppCompatActivity.setSupportActionBar. Apr 22 20:54:47 officially, their only options are really "a) proguard, b) downgrade, c) fuck samsung users" Apr 22 20:54:50 i dont want to use proguard :( damn it, i want my cake and eat it too ! Apr 22 20:55:14 ok, well using proguard, is there an official recipe Apr 22 20:55:17 Is it a setSupportActionBar-specific bug? If so, you can get around that. Apr 22 20:55:53 and if i use proguard, does that mean that my app will actually wind up using the older samsung shit on the classpath ? Apr 22 20:56:28 ah. that I don't know. I don't suppose anyone has a device that causes this? seems like you should be able to figure out what problems could arise by finding everything they included, and what version, through reflection or odex-dumping or something.. Apr 22 20:56:29 (at runtime) Apr 22 20:56:53 Okay, maybe it's not setSupportActionBar-specific. The first stack trace doesn't mention that. Apr 22 20:57:20 this bug is classic, really all google had to do was say 'well, samsung fucked up and we recommend you do this: xxx" somewhere in the docs Apr 22 20:57:30 it's "anything that doesn't match the version they packaged" related. so the space of problems will _grow_ over time, as things get added to appcompat. Apr 22 20:58:02 i bet somebody asks them about this at fireside :D Apr 22 20:58:11 i always wish fireside would go on for like 2, 3 hours Apr 22 20:58:23 ha, hopefully someone will :) Apr 22 20:58:24 when its over they are all like "phew, lets go! Apr 22 20:58:40 though I half expect them to have a "declined" sign ready to hold up Apr 22 20:58:44 I notice that Chris Banes was posting on /r/androiddev yesterday. Maybe he'd answer if you started a thread? Apr 22 20:58:49 Then again, maybe even he doesn't know. :D Apr 22 20:59:08 TacticalJoke oh i'm sure he knows about the bug Apr 22 20:59:43 I mean about an official work-around. Apr 22 20:59:47 ah Apr 22 21:01:42 I don't suppose samsung has said anything about it? last I saw was a mostly-dead forum thread with no answers. Apr 22 21:02:12 imagine you are a user with one of those samsungs though Apr 22 21:02:20 i wonder if half the things are crashing now Apr 22 21:03:19 I think danijoo can reproduce this. Apr 22 21:03:38 He mentions so in #120. Apr 22 21:04:22 So maybe he is the guy with the answers. :D Apr 22 21:05:05 Chris Banes suggests this in #150: http://code.google.com/p/android/issues/detail?id=78377#c150 Apr 22 21:05:10 But it sounds untesetd. Apr 22 21:05:12 untested* Apr 22 21:06:13 "I think the DEX class resolver in Android should be improved. The classes from APP should have higher prio than framework classes." Apr 22 21:06:21 yeah, without knowing more that seems busted to me Apr 22 21:06:53 The last two comments are interesting. Apr 22 21:07:03 comedy Apr 22 21:08:44 TacticalJoke then look at #162 Apr 22 21:08:56 "app > framework" does make sense to me. doesn't fix existing devices though, and existing devices are the only problem :\ Apr 22 21:09:09 http://puu.sh/hnipi/27f45bd01a.png I seem to be stuck on a coding challenge, it's asking me to make a member string inside of a public class named mTitle. Apr 22 21:09:19 public String mtitle() is not the proper syntax? Apr 22 21:09:33 Doh! Apr 22 21:09:53 I've been on this one for 10 minutes now, I can't figure out why this is wrong Apr 22 21:10:35 I fixed the compiler error, it was a missing return statement Apr 22 21:10:36 Anyone have a decent amount of experience with RemoteViews, Intents, or know someone on here that they can refer me to? :) I'm so close to getting this to work I can taste it! Apr 22 21:10:38 mentok: You're defining a local variable called 'mTitle' inside a method called 'mTitle'. Apr 22 21:10:39 mentok: member variable to a class not function scoped locale variable Apr 22 21:10:46 You're also strangely putting semicolons after the method and class definitions. Apr 22 21:10:55 groxx: that sounds amazingly horrible :). the implementation of framework classes are device specific. If you overrode one of the classes in your app, it could do Very Bad Things when another framework class not in your app attempted to use it. Apr 22 21:11:13 implementations change between devices, between versions, etc. Apr 22 21:11:26 you can't just swap out the implementation and have it work on all devices Apr 22 21:11:46 well, except that so far all those framework class changes have been utter shit. memory leaks, random crashes deep in the stakc, etc. Apr 22 21:12:06 why would they have to be device specific? Apr 22 21:12:16 oem customizations Apr 22 21:12:25 like theming? good riddance :| Apr 22 21:12:27 So I'm trying to make a command in mac bsd linux terminal to find all apks and ipas, and sort them by size then print to console. Apr 22 21:12:32 I'm able to get one or the other Apr 22 21:12:37 but not both in one go Apr 22 21:12:50 find . -name "*.apk" -print0 | xargs -0 du | sort -nr | cut -f2- | xargs du -hs Apr 22 21:12:50 TacticalJoke: I think I'm still not getting. Apr 22 21:12:59 That command works fine for apks Apr 22 21:13:00 I'll try some more googling and let you know if I remain stuck Apr 22 21:13:16 Trying to understand the problem versus just getting the answer and moving on. Apr 22 21:13:20 find . -name "*.ipa" -o -name "*.apk" -print0 | xargs -0 du | sort -nr | cut -f2- | xargs du -hs Apr 22 21:13:31 That only prints out apk files still Apr 22 21:13:32 groxx: it's the exact same argument as to why you shouldn't use hidden apis in your app. Apr 22 21:13:33 JesusFreke: I mean, in principle, yes. good point, totally agree. but why are they device specific in the first place? they have to conform to the API, so swapping them out should work, unless their device changes e.g. break the security model to do their dirty work. and then your app could too. Apr 22 21:13:45 mentok: I don't understand why you wrote what you did. Apr 22 21:14:12 TacticalJoke: What do you mean Apr 22 21:14:28 also: if you can make an NDK app, can't you make an NDK app that starts a VM with your framework classes, and wouldn't that work? Apr 22 21:14:35 groxx: the framework classes aren't limited to the public api. they can and do use the "hidden" (implementation-specific) methods Apr 22 21:14:47 mentok: It's asking for something very simple. Your response is bizarre and complicated. Apr 22 21:15:00 groxx: yes, the vm is running in your process, you can theoretically do whatever you want Apr 22 21:15:16 So as I understand the problem, it wants a public string inside of the class Apr 22 21:15:26 public String mTitle(); yes? Apr 22 21:15:28 it's certainly possible, but also certainly not supported. Apr 22 21:15:34 Why the parentheses? Apr 22 21:15:43 Variables are not functions. Apr 22 21:15:53 ! Apr 22 21:15:57 (Or "fields are not methods".) Apr 22 21:16:09 It just clicked hang on Apr 22 21:16:21 YES! Apr 22 21:16:27 http://puu.sh/hniUc/f5d2b3b7c3.png Apr 22 21:16:43 JesusFreke: yeah, but it should be able to function as a "complete" app, shouldn't it? everything you have to do has to run through APIs accessible in the security model (unless they break it). obv you can't backport lollipop because of system-service changes, but replacing Gingerbread with Gingerbread? Apr 22 21:16:48 I think I just glimpsed a light-bulb apppear over your nick. Apr 22 21:16:50 Note that it's usually a bad idea to use public fields, and (IMO) it's probably not a good idea to use an 'm' prefix (but that's slightly controversial). Apr 22 21:16:56 the minute you said "variables are not functions" I realized what I was doing wrong, what you said jogged the answer out of my head. Apr 22 21:17:07 Yeah, I tried hard not to give the answer. :D Apr 22 21:17:14 Understood, just following along with the course Apr 22 21:17:20 Thanks a ton dude Apr 22 21:17:20 groxx: I'm not talking about security model. I'm talking about public apis vs. hidden apis Apr 22 21:17:38 Have you done much programming stuff before? Apr 22 21:17:38 but that's all in-process or protected by the security model. Apr 22 21:17:48 not really. Apr 22 21:17:49 if it's in-process, it can be replaced wholesale. Apr 22 21:17:50 Got it to work, need to use escaped parens to wrap the -names Apr 22 21:17:52 Find all apks in a directory, sorts them by size, and outputs it in human readable byte sizes Apr 22 21:17:56 groxx: java access protections have nothing to do with security Apr 22 21:17:58 <-- help desk jockey Apr 22 21:18:00 find . \( -name \*.apk -o -name \*.ipa \) -print0 | xargs -0 du | sort -nr | cut -f2- | xargs du -hs Apr 22 21:18:09 exactly. so why can't you replace the framework? Apr 22 21:18:26 groxx: for the exact same reason you shouldn't call hidden apis Apr 22 21:18:26 I mean, I learned QBasic a LONG fuck time ago, and then went without a computer for the next 15 years growing up Apr 22 21:18:32 Okay. Wasn't sure whether you were new or whether your brain was morphed by some weird programming language from the past (in which functions and variables conflate into one). Apr 22 21:18:39 you *can*, technically. but it's a bad idea, and it shouldnt be supported. Apr 22 21:18:47 Makes sense Apr 22 21:18:48 I started with QBASIC. :) Apr 22 21:18:57 e.g. those hidden apis aren't in the SDK, for your calling convenienc. Apr 22 21:19:09 I had gotten pretty good with it when I was....10 or 11 on a tandy 2000. Apr 22 21:19:20 by bundling framework classes in your app, you've introduced a dependency on hidden apis Apr 22 21:19:29 JesusFreke: I can see piecemeal replacements having problems, because e.g. they may change internal calling patterns or use custom methods or something. but replacing the whole stack should work. Apr 22 21:19:30 Made this little chat bot that would "talk" to you using a ton of complex cases and ifs Apr 22 21:19:33 That's a great age to start. I think I started at around 13. Apr 22 21:19:47 nice Apr 22 21:19:56 heh okay, back to the course. Thanks again! Apr 22 21:19:58 You gotta get 'em when they're young. :D Apr 22 21:20:14 groxx: if every app replaces the entire stack, then memory usage will suffer drastically Apr 22 21:20:24 All right, have fun. Apr 22 21:20:38 I feel like that with my niece: I want her to learn the piano or something, but she's more interested in Peppa Pig. Apr 22 21:20:41 yeah, that I know :) which is probably why Samsung decided to add appcompat. Apr 22 21:20:51 because now the apps can't use the same shared memory that contains the framework classes. Apr 22 21:21:23 and I haven't even started in on native dependencies yet, which would be a whole 'nother can of worms Apr 22 21:22:24 would native dependencies (called by the jvm) not be callable by a replaced-jvm? but yeah, external-to-your-app services would be an endless problem, just like they are now (y hello thar, sms API. nice documentation you have. ) Apr 22 21:22:25 and do you *really* want to be using a gingerbread framework on a lollipop device? :) Apr 22 21:22:31 been using zsh+ohmyzsh for the past couple days. I wouldn't says there's anything specific to mobile that it's helped me with, but it has a handful of nice subtle improvements over bash that I really like Apr 22 21:22:42 no, but fixing some of gingerbread's bugs _on gingerbread_ would be wonderful Apr 22 21:22:48 Not sure whether to download AS 1.2 RC and also update to AppCompat 22.1. Apr 22 21:22:58 It feels like a suicide mission. Apr 22 21:22:59 groxx: but it wouldn't only be on gingerbread Apr 22 21:23:12 I'm fine with that. separate APK for each API. Apr 22 21:23:15 groxx: those classes would be included in your app, which should be able to be run on higher versions Apr 22 21:23:28 hahah, yeah. no. :) Apr 22 21:23:46 future portability is explicitly desirable and required. Apr 22 21:23:59 future compatibility* Apr 22 21:24:38 not claiming this wouldn't be endless pain :) _am_ claiming it should work. (though I concede the point with e.g. just replacing the specific classes in appcompat that are breaking. internal APIs used by those classes, totally agree). Apr 22 21:25:32 groxx: there isn't anything preventing you from using renamed versions of the classes in your app :) Apr 22 21:25:39 yeah. hence proguard. Apr 22 21:25:45 proguard ftw Apr 22 21:25:48 or jarjar Apr 22 21:26:04 jarjar doesn't rename, does it Apr 22 21:26:14 I thought that was the whole point of jarjar Apr 22 21:26:16 it renames. I assume it doesn't handle the resource files though? Apr 22 21:26:17 hmm, guess it does repackage Apr 22 21:26:31 dunno what proguard does there actually. Apr 22 21:26:31 Yeah, probably not. I don't think it is android-aware. Apr 22 21:26:49 Ugh, AppCompat 22.1 looks buggy: http://www.reddit.com/r/androiddev/comments/33gqmg/support_libraries_v2210_in_detail/ Apr 22 21:26:57 consistency++ Apr 22 21:27:31 groxx, proguard renames the class Apr 22 21:27:32 well, at least appcompat can be fixed :| Apr 22 21:27:47 pfn: how does that work with classnames mentioned in layout files? Apr 22 21:28:17 groxx, usually you have aapt spit out the list of classes that are mentioned in layout, so proguard doesn't mangle them Apr 22 21:28:26 aapt generates proguard rules Apr 22 21:28:40 ah. just ignores them. that's kinda what I figured. Apr 22 21:29:01 so if appcompat includes a layout file, we're screwed? Apr 22 21:29:06 no? Apr 22 21:29:21 the problem isn't with public /widgets/ Apr 22 21:29:33 groxx, another solution is to override onInflate in your activity Apr 22 21:29:37 to remap to a renamed class Apr 22 21:29:51 hm. true Apr 22 21:29:52 *if* the widget were colliding Apr 22 21:29:53 but it isn't Apr 22 21:30:00 it's internal impl that's the problem Apr 22 21:30:04 and so they're not in layout Apr 22 21:32:01 currently, yeah. but as the two versions diverge, other problems are possible Apr 22 21:32:17 maybe this can't happen with the version samsung included though, i dunno Apr 22 21:32:58 Is anyone happily using AS 1.2 RC? Apr 22 21:33:18 semi. after the first launch or two it seems to be working normally now. Apr 22 21:33:24 first launch was horribly busted though Apr 22 21:33:41 Yeah. I uninstalled the first one. Apr 22 21:34:44 groxx: Based on what you've experienced, would you recommend moving to the RC or just waiting for the release? Apr 22 21:34:57 i'm still having problems with RC but i think its my code gen step, so you are probably ok Apr 22 21:34:57 I'm trying to figure out whether to kill a few hours doing that or doing something else. Apr 22 21:34:59 now I think my problems are just that I haven't restored a higher max-ram value. sometimes it locks up for a few seconds, but it's always when it's almost fully using memory Apr 22 21:35:04 Okay. Apr 22 21:36:08 I dunno. for a reasonably simple-setup large app it seems to be working fine. my more-complex-setup side project has had a couple other problems, but I haven't spent enough time using it to say if that's actually a change in behavior or not. Apr 22 21:36:24 I see. Apr 22 21:37:08 I kinda lean towards "wait for RC1", tbh Apr 22 21:37:17 the last pre-RC seemed more stable Apr 22 21:40:34 Let's say i wanted to see all the types possible options for a EditView's inputTypes... in Android Studio how do i do that? Apr 22 21:42:56 put your cursor in the `=""` quotes, hit alt-enter / whatever your autocomplete command is Apr 22 21:43:35 ctrl-space :| it's more muscle memory than brain, apparently Apr 22 21:44:07 hey, quick question - is it possible that an android device will return true for: getPackageManager().hasSystemFeature( Apr 22 21:44:08 PackageManager.FEATURE_CAMERA_AUTOFOCUS Apr 22 21:44:08 ) while it won't contain the focus mode in cameraParameters.getSupportedFocusModes(); ? Apr 22 21:45:36 groxx: i did that and i get two options that don't make a lot of sense Apr 22 21:45:54 Inject Language/Reference or Apr 22 21:46:09 Try the second one he said. Apr 22 21:46:12 override resource in other configuration Apr 22 21:46:31 TacticalJoke: ahh Apr 22 21:46:33 thanks! Apr 22 21:46:41 pigiman: yeah, I would assume so. if nothing else, the front-facing camera is different than the rear-facing one. Apr 22 21:47:29 ok i'll be back later Apr 22 21:58:20 ohh boy i f------ love it when f---- people are like yeah that's great except make it do everything in the exact opposite way Apr 22 22:02:29 groxx - thank you, make sense! Apr 22 22:11:45 is it safe to upgrade to yosemite yet ? Apr 22 22:16:05 bankai_: has been working for me. no more or less buggy than other versions, overall Apr 22 22:16:44 nice thanks... a bit worried coz a lot of people were complaining about java bugs in the first (few?) releases Apr 22 22:17:05 ¯\_(ツ)_/¯ I haven't hit that Apr 22 22:17:59 is it any faster/slower? Apr 22 22:18:44 iirc it has been visibly better about battery life. beyond that, not significantly enough for me to remember. Apr 22 22:19:22 you will, unfortunately, have to survive with semi-transparent lists of things in some places :( e.g. your email folders in Mail.app Apr 22 22:19:52 looks awful IMO, but at least they a) blur _heavily_, and b) adjust the font color to be readable at all times. Apr 22 22:20:10 so it at least functions, unlike other attempts at semi-transparent views that I've seen. Apr 22 22:20:46 the whole thing looks ugly to me, but meh that's apparently what people want Apr 22 22:21:23 eh. the rest of yosemite is a fairly small increment from ML. spotlight is dramatically better though. Apr 22 22:21:50 at least for day-to-day launching/searching. I actually uninstalled Alfred. Apr 22 22:34:47 danijoo you around ? Apr 22 22:41:32 I'm using IabHelper from sample app in play_billing/ and suddenly on a phone this thing crashes 20 times in a row https://gist.github.com/mlatu/bbc1a77d43fa01846b50 wtf.. Irony is in this case I actually don't mind if service won't work on the phone, just don't crash my whole app. I feel like we've gone the wrong way with exceptions Apr 22 22:42:16 Hi! How would I go about creating a square camera preview? Apr 22 22:42:46 I am doing some image-processing and it is important that the image is square to estimate illumination. Apr 22 22:43:54 onto: you asked that Apr 22 22:44:50 I did, but I've been trying to get this to work the whole day. I did not expect the camera to be so complicated. Apr 22 22:47:40 do you need it to just appear square or to get an actual square image? Apr 22 22:48:24 icedp: I want it to appear square in the preview and get an actual square image so that I can process it further. Apr 22 22:51:47 looks like two problems. we discussed first today. you could try overlaying views over camera preview to appear it square Apr 22 22:53:19 onto, could you use Bitmap to resize your image? Apr 22 22:53:20 second - you need to search how to crop an image, there are a lot of methods. some very memory consuming Apr 22 22:55:33 icedp: from my experiments, I have a few questions regarding that: 1) How do I determine the exact coordinates of how to "crop" the image afterwards. 2) How do I calculate and set the dimensions of the mask (across different screen sizes) and 3) How do I handle orientation changes to the camera. The cropping isn't that big of an issue but the camera preview is a very complicated object with so many orientations (both of the camera and the Apr 22 22:55:37 Trying to change the background color of the action bar, but for some reason I end up with either 2 outcomes: 1) You need to use a Theme.AppCompat theme (or descendant) with this activity 2) No errors, but no change of color. Here is my styles.xml file: https://gist.github.com/anonymous/6fa8c9312b0b0eefd089 Apr 22 22:56:09 Anyone have any idea what I could be doing wrong? Apr 22 22:56:29 One issue I am having currently is that the camera preview is rotated 90 degrees counterclockwise by default and I have to "correct" it. But when I flip the phone, it stretches the image and I'm back to square one. Apr 22 22:57:16 mendozao: I think you have to use 'actionBarStyle' rather than 'android:actionBarStyle'. Apr 22 22:57:21 With AppCompat. Apr 22 22:57:49 that's right^ Apr 22 22:58:11 You might also have to use 'background' instead of 'android:background' there, but I'm not sure. Apr 22 22:58:20 TacticalJoke i just asked that question http://www.reddit.com/r/androiddev/comments/33gqmg/support_libraries_v2210_in_detail/ Apr 22 22:58:28 Yeah, I saw that. :) Apr 22 22:59:07 man , its like ... christ, i'm not looking to debate who's faut it is - where is the fucking answer ! Apr 22 22:59:10 pandanomic's answer doesn't make sense. Apr 22 22:59:22 i think you can add colors to the theme in the same manner. ex: @color/colorPrimary Apr 22 22:59:23 You ask for an official method; he talks about unofficial methods. Apr 22 22:59:26 too often that seems to be the case with that guy Apr 22 22:59:56 the answer is proguard Apr 22 22:59:56 onto: probably you would use OrientationEventListener to handle this. there are examples, I'm sure. To be honest I've probably just disable rotation like most camera apps does it e.g. Instagram Apr 22 23:00:05 the reason there's no official answer is because fuck samsung Apr 22 23:00:08 TacticalJoke: wow thank you so much Apr 22 23:00:09 but Google can't say that Apr 22 23:00:25 JakeWharton so this is the closest i've come to http://stackoverflow.com/questions/24809580/noclassdeffounderror-android-support-v7-internal-view-menu-menubuilder Apr 22 23:00:31 TacticalJoke: that is so not obvious. just wasted several hours on this :\ Apr 22 23:00:37 do we need to do the alternate layout if using a spinner though ? Apr 22 23:00:43 i don't use appcompat or proguard Apr 22 23:00:45 so i have no idea Apr 22 23:00:49 mendozao: Yeah, it's confusing, especially now that AppCompat has a new purpose. Apr 22 23:01:03 icedp: The activity orientation is disabled, yes but not the cameras, unfortunately. Apr 22 23:01:09 mendozao: FWIW, it's probably better to use Toolbar nowadays. Though ActionBar still works. Apr 22 23:01:28 Toolbar is just more flexible (it's a normal View in the hierarchy). Apr 22 23:01:45 TacticalJoke: I'll keep that in mind Apr 22 23:02:01 icedp: And all the examples, I found were either very simple (almost an exact copy of the official guide) or complicated beasts which is too many new things for me. Apr 22 23:02:07 I think a lot of the answers in this channel save people hours. Sometimes I think people should just ask here. haha Apr 22 23:02:22 onto: camera probably qualifies as a complicated beast :) Apr 22 23:02:37 I feel like a such an idiot taking hours changing a damn background color Apr 22 23:02:44 smh Apr 22 23:02:44 haha groxx , how is the state machine coming :D Apr 22 23:02:51 g00s: shelved! Apr 22 23:02:57 groxx: so it seems. Apr 22 23:02:59 g00s: instead I'm backporting things to gingerbread. Apr 22 23:03:17 groxx O.o Apr 22 23:03:23 g00s: it doesn't make things any _worse_, so fixing the camera isn't a prerequisite Apr 22 23:03:32 g00s: also animations Apr 22 23:03:32 onto: "mask" I would do like this: create a LinearLayout with [maskview | SquareSpace | maskview] where SquareSpace is extended Space class which is always square (it's not hard) and two maskview has layout_width=0dp and weight=1 Apr 22 23:03:44 mendozao: Only reason I even remember some of these things is the trauma that is associated with the memory formation. Apr 22 23:03:56 TacticalJoke: lmao Apr 22 23:04:01 groxx backporting to GB .. you must be working on one of those apps with 10M+ installs ... Apr 22 23:04:24 not yet :) in progress! but a couple, yes. Apr 22 23:04:29 icedp: And Maskview is a custom view? Apr 22 23:04:34 lol Apr 22 23:04:40 onto: anything you want to have there Apr 22 23:04:52 I see Apr 22 23:05:34 onto: question! is this only for ICS+? Apr 22 23:05:44 icedp: Do I set the camera aspect ratio to width/height? Apr 22 23:06:12 groxx: If it makes my life, easier. Yes! It's an academic project. Apr 22 23:06:25 woo. you picked a hard one for school. Apr 22 23:06:32 groxx: and I can shape the requirements as I wish. Apr 22 23:06:43 and in at least one area, it does, yes. ICS can use TextureView. Apr 22 23:06:48 groxx: I didn't know what I was stepping into. Apr 22 23:07:26 ./r/androiddev's new theme is pretty cool. I didn't notice it till juts now because of disabling themes. Apr 22 23:07:29 icedp: How would I then populate the SquareSpace with the preview? Apr 22 23:07:36 just* Apr 22 23:07:42 groxx: Do you have any examples? Apr 22 23:09:05 onto: so! I would strongly recommend: 1) mimic the sample camera code, but with textureview (nearly the same callbacks, it's easy). 2) have the view (or a parent) control the size of your preview so it's always square. 3) either modify the texture's transform matrix, or resize and center (by hand, in e.g. onLayout) the textureview to fit within the square Apr 22 23:09:05 box. that'll get you a square preview. Apr 22 23:09:24 onto: you set whatever preview size you need. like .... Apr 22 23:09:49 does anyone know what property I would need to change the text color in the action bar? android:textColor doesn't seem to be working Apr 22 23:10:10 groxx, icedp: I'll try both ways and report back. Apr 22 23:10:45 Can anyone take a quick look at this album and let me know if this textview alignment behavior is a bug? https://imgur.com/a/suCrD Apr 22 23:10:45 I think it's this: https://developer.android.com/training/basics/actionbar/styling.html#CustomText Apr 22 23:10:53 "For Android 2.1 and higher" Apr 22 23:10:54 onto: 4) when you capture an image, Math.min(width, height) -> Bitmap.createBitmap(captured, a,b,c,d, matrix, true); to create a new bitmap with (a,b,c,d) = the points on the original bitmap to read from/to to crop it to a square. Apr 22 23:11:01 I guess this: @style/MyActionBarTitleText Apr 22 23:12:13 onto: the rest can be figured out by reading the docs / reverse-engineering the weird textureview transform matrix when in a square / etc, though it'll take some time, guaranteed. Apr 22 23:13:44 onto: ah. to clarify on 3: if you have a "viewport" of 100x100, and the preview is 150x100, you want to make the textureview 150x100 and position it at -25px on the left. the parent-view's dimensions will hide the extra stuff for you. Apr 22 23:14:18 and all this will have to be updated on layout and/or device orientation change. hooray custom views. Apr 22 23:14:54 A simple (and maybe incredibly dumb question), how do I set the aspect ratio of the camera, especially on orientation changes when they end up being stretched? Apr 22 23:15:39 you can set the _orientation_ and _which preview size you use_, but you can't pick an arbitrary aspect ratio. and orientation change -> use an orientation change listener, because layout changes won't be fired for 180 flips. Apr 22 23:17:29 onto: you'll want both http://developer.android.com/guide/topics/media/camera.html#custom-camera and http://developer.android.com/reference/android/hardware/Camera.html for camera stuff (e.g. setDisplayOrientation for your orientation changes) Apr 22 23:18:43 onto: http://pastebin.com/CUtAZk9i Apr 22 23:18:53 this will give you absolute orientation Apr 22 23:18:55 onto: and I think I found http://arpitonline.com/2012/07/01/creating-custom-layouts-for-android/ most helpful for making custom layouts Apr 22 23:20:04 Wow, thanks. I'll try putting everything together and hopefully get everything working before I lose my sanity. Apr 22 23:21:06 onto: heh. good luck :) I'd strongly recommend trying as much in isolation as possible (e.g. make an ImageView act like the preview, with a rectangular image instead of a live camera preview), because otherwise you're diving headfirst into a LOT of complex areas at once. Apr 22 23:22:04 get the layout working first, then get the preview working (ignoring layout), then make the preview work in the layout. otherwise it's hard to know what the source of the problem is. Apr 22 23:22:19 groxx: Good idea. Apr 22 23:22:42 Is this a bug with textviews and linearlayout? https://imgur.com/a/suCrD Apr 22 23:23:30 eemgr: probably not. how do you want it to look? Apr 22 23:23:40 and I assume that's a horizontal linearlayout? Apr 22 23:23:42 centered, despite there being 1 line or 2 Apr 22 23:23:45 yes Apr 22 23:23:56 it works if and only if the other text views contain the same # of lines Apr 22 23:23:58 then make the textview wrap_content, and layout_gravity="center_vertical" Apr 22 23:24:05 i have wrap content Apr 22 23:24:11 and gravity=gravity.center Apr 22 23:24:40 "gravity" will center the text contents in the textview, layout_gravity will center the textview in the parent. Apr 22 23:25:00 unless Toolbar, than whateverthefuck Apr 22 23:25:02 hm Apr 22 23:25:03 you can use one/both, but they serve entirely different purposes Apr 22 23:25:12 how can i do it programmatically ? Apr 22 23:25:27 mTv.setGravity(Gravity.CENTER); is all i've got now Apr 22 23:25:37 get the layout params from the textview, cast it to a LinearLayout.LayoutParams (or whatever it uses) Apr 22 23:25:54 ah yes, one sec Apr 22 23:25:56 i'll test that Apr 22 23:27:14 layoutParams.gravity = Gravity.CENTER_VERTICAL; with mTv.setGravity(Gravity.CENTER); should do the trick? Apr 22 23:27:26 groxx for signing release config, do you parameterize the alias/pw/file in gradle.properties (not in VC) or somewhere else ? Apr 22 23:27:59 g00s: I looked into that a while ago, ended up (╯°□°)╯︵ ┻━┻. I just leave it out of gradle and run it through Studio's UI. Apr 22 23:28:18 I'd love to make it show a dialog or ask at the prompt, but that seems to be super hard. Apr 22 23:28:36 you can ask at prompt pretty easy Apr 22 23:29:33 eemgr: probably, yeah Apr 22 23:30:26 groxx from d.android.com storePassword System.console().readLine("\nKeystore password: ") Apr 22 23:30:40 g00s: yeah, but then you have to handle android studio's building too. I gave up part way through, it didn't seem worth the effort. I kinda assume there will be an easier all-in-one solution eventually. Apr 22 23:31:08 i keep thinking there will be some all-in-1 solution for a lot of things ... Apr 22 23:31:23 but they never come to pass. SO :) Apr 22 23:31:53 yeah :) and in the meantime, "export -> paste passwords from 1password" is pretty simple and gets around the whole thing. Apr 22 23:33:05 i cant get myself to do release builds from the IDE ... Apr 22 23:33:14 shame on you groxx Apr 22 23:34:10 I do all other builds from the IDE. seems odd to toss all that for release Apr 22 23:34:51 i'm still quite certain AS builds submodules differently than CLI for debug Apr 22 23:35:59 i notice on cli, all submodules will have *release* tasks but in AS, it uses *debug* tasks Apr 22 23:36:12 except for the root project Apr 22 23:36:16 whatever Apr 22 23:40:28 hey g00s Apr 22 23:40:55 after a week, i've decided to finally give up on calling my api with volley Apr 22 23:40:59 i've now switched to retrofit Apr 22 23:41:01 i see the light. Apr 22 23:42:33 it's pronounced "drink the kool-aid" Apr 22 23:42:47 damn is that kool-aid tasty Apr 22 23:43:06 but now i can't feel my arms and legs Apr 22 23:43:20 lol Apr 22 23:44:24 Pwnies: you can get new ones. those old limbs were holding you back. Apr 22 23:44:27 lasserix_: How would I go about using AbsoluteOrientationEventListener? Apr 22 23:45:25 groxx: we have the technology. Apr 22 23:45:30 register and set the callback Apr 22 23:45:36 groxx: that was the fix, thank you. Apr 22 23:46:12 eemgr: glad to hear :) Apr 22 23:46:15 eemgr: you got new limbs? Apr 22 23:46:31 That feeling when you update Android Studio, import your project, and your app still works. Apr 22 23:46:41 AKA amazement. Apr 22 23:46:57 And unit tests are working in 1.2 RC. Apr 22 23:47:04 TacticalJoke been like that for a while :) Apr 22 23:47:09 lol, i heard JakeWharton's name outside of this channel before, and i was like... why does this guy in chat look so familiar... Apr 22 23:47:14 https://github.com/JakeWharton Apr 22 23:47:21 then that^ Apr 22 23:47:43 Yeah, jake is.. rather well known :) Apr 22 23:49:45 speaking of which! I discovered a way to get a logcat in android studio that doesn't lag by a second or two / get overloaded by too much output. Apr 22 23:50:41 solution: open the terminal tab, run pidcat http://is.gd/EsDg3B Apr 22 23:51:11 it does (finally) make me miss having timestamps, though. Apr 22 23:53:18 Why do you miss them? Apr 22 23:54:02 Or rather, what would you use them for? Apr 22 23:54:16 because I'm not even looking at the logcat tab any more, and it seems to have gotten worse lately / my devices are spamming more, so I have to wait for a minute (if it ever works) to see timing differences Apr 22 23:54:44 Sometimes I get confused about whether a message occurred just now or several minutes ago, and timestamps are a life-saver. Apr 22 23:55:08 yeah, mostly that. I can press 'enter' to add a blank line, but that requires changing focus, and I usually forget. Apr 22 23:55:16 Usually it's a debug-related thing my app is temporarily printing to LogCat (such as "Got 54 items" or something). Apr 22 23:55:17 heh yeah, never know with adb, wth is going on Apr 22 23:55:34 although - we don't need date and milliseconds like AS logcat Apr 22 23:55:44 All the PRs adding timestamps were terrible Apr 22 23:55:55 sometimes to see relative timing between loading X and loading Y, since I have a template for "log method and arguments" but not "log method and arguments and time difference from previous call" Apr 22 23:56:00 I do like milliseconds, personally. I know it's not guaranteed to be perfectly accurate, but it can give a hint of how fast things are goinfg. Apr 22 23:56:01 going* Apr 22 23:56:20 I once noticed a delay in my code just from the ms thing. Apr 22 23:56:24 lol Apr 22 23:56:26 And profiling confirmed it. Apr 22 23:56:50 (It was related to something posting a message to the main looper multiple times rather than just *running*.) Apr 22 23:57:06 Yeah I'm not sure of the precision, but it definitely can't be trusted for ~50ms delta Apr 22 23:57:19 TacticalJoke did you see http://instagram-engineering.tumblr.com/post/114508858967/improving-comment-rendering-on-android Apr 22 23:57:25 Yeah. I bookmarked that. Apr 22 23:57:50 On first read, to be honest, I hardly had a clue what they were talking about. All I got from it was that it seems to be possible to cache those Layout things. Apr 22 23:58:01 Which I guess is relevant to my interests. Apr 22 23:58:59 After 1.0 Apr 22 23:59:22 1.0 of what? Apr 22 23:59:30 Your app Apr 22 23:59:35 Oh. lol Apr 22 23:59:41 JakeWharton i consulted telecine for where to put signing key/alias/pw but they were all "android" - what do you guys do? local.properties, gradle.properties, something else ? Apr 22 23:59:56 We have a remote signing service Apr 22 23:59:58 Yeah, I probably won't micro-optimize much more before RELEASE_VERSION. Apr 23 00:00:02 oh yeah, that thing Apr 23 00:00:13 Gradle plugin that uses LDAP credentials and 2FA Apr 23 00:00:33 well for us mere mortals, what do you recommend ? Apr 23 00:00:44 Just to confirm - there shouldn't be any complications adding two separate listfragments to an activity right? (assuming they both use their own adapters) Apr 23 00:00:51 Telecine has a script Apr 23 00:01:01 And just does it manually Apr 23 00:01:43 The Mercurial integration in 1.2 is nice (though maybe it's the same as that of 1.1; I never used it). Apr 23 00:01:52 It picks up all my bookmarks and stuff. Apr 23 00:02:51 hm, release.sh i see Apr 23 00:02:57 Anyone need a web site or hosting for there app? Apr 23 00:03:38 there app ? Apr 23 00:03:52 i doubt it :) Apr 23 00:04:05 :D Apr 23 00:04:29 g00s: https://github.com/JakeWharton/Telecine/blob/master/release.sh Apr 23 00:04:43 I need it for yonder app. Apr 23 00:04:43 not the most reliable means, but i like the prompts for password rather than having it somewhere Apr 23 00:05:09 ok thanks Apr 23 00:05:19 not sure why the android plugin doesn't support password prompting Apr 23 00:06:01 JakeWharton they show console prompting here http://developer.android.com/tools/publishing/app-signing.html Apr 23 00:06:18 i think groxx said something about it not working in AS tho Apr 23 00:07:25 I meant for generating an "input keystore / alias password" popup at build time Apr 23 00:08:07 i don't care much about AS Apr 23 00:08:18 release builds should never be done in AS Apr 23 00:09:00 ew. no, that prompt would happen at build configuration time. Apr 23 00:09:26 if they took a Closure to those two vars you could defer execution Apr 23 00:09:46 I mean apps there making Apr 23 00:09:55 is the SQLiteOpenHelper still needed if I'm going to use some other framework to handle database migrations? Apr 23 00:10:37 JakeWharton: by "build configuration time" you mean prior to the unsigned APK existing? or something else? Apr 23 00:11:07 yes Apr 23 00:11:12 it happens when Gradle is configuring itself Apr 23 00:12:43 I'm guessing that happens right near the beginning of `gradlew :assembleRelease` then? Apr 23 00:13:04 last time I tried was way too early in my gradle experiences :| too many problems, abandoned before I got anything interesting. Apr 23 00:13:09 Do you guys use the Git/whatever integration in AS? Apr 23 00:13:31 no. it happens at Gradle configuration time Apr 23 00:13:45 TacticalJoke: only for blame views + I have come to like the "file has been changed" coloring. nothing else :| Apr 23 00:14:06 I don't think it happens during gradle sync, though I might just be misremembering Apr 23 00:14:55 that is when gradle executes that code to get the value Apr 23 00:15:14 I must've forgotten :| yeah, that's a horrible time for that to happen. Apr 23 00:16:51 anyone have any idea how to change the text color of the action bar? This is what I have in my styles.xml: https://gist.github.com/anonymous/4cf3ee65f47ce58be3e7 Apr 23 00:18:32 So i managed to code this game in like 2 hours of coding. Im not sure if my morals are low enough to publish it Apr 23 00:19:06 DadFoundMy: the pool has already been pissed in by others. pretty sure the additional harm is minimal. Apr 23 00:19:26 g00s, i am creating a google endpoint that requires authentication and is consumed by browser, android, ios apps Apr 23 00:19:31 yes, submit your creation to the vat of toxic waste Apr 23 00:19:42 what is the best approach for signing at the android using facebook? Apr 23 00:19:44 DadFoundMy ^ Apr 23 00:19:45 but then im no better than them :( Apr 23 00:19:48 1. obtain the access token at the android, send it to the endpoint, and return an accesstoken/renew token? Apr 23 00:19:55 2. use the facebook android access token as a valid token to consume my API directly Apr 23 00:20:05 i guess ill do it just to get some more apps out there Apr 23 00:20:12 also i think its kinda fun lol Apr 23 00:21:19 mendozao: Not sure (since I've never done this), but the docs use 'parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"' here. Apr 23 00:21:36 https://developer.android.com/training/basics/actionbar/styling.html#CustomText Apr 23 00:22:25 DadFoundMy: What kinda game is it? Apr 23 00:22:36 A quiz with pre-loaded questions? Apr 23 00:23:03 TacticalJoke: basiclly a arrow points in a random dirrection. If the arrow is green you swipe in the dirrection of the arrow, if it's red you swipe in the opposite dirrection, if its black you dont swipe Apr 23 00:23:19 And it's a race against time? Apr 23 00:23:34 in easy mode you have a second for each Apr 23 00:23:34 TacticalJoke: hmmmm that didn't work Apr 23 00:23:40 in hard mode .5 seconds Apr 23 00:23:47 hard mode is fucking hard Apr 23 00:23:54 in "throw your phone across the room" mode, 0.3 seconds Apr 23 00:24:04 Sounds like a fun idea. Only downside I'm seeing so far is that it took the author only two hours to make. :D Apr 23 00:24:42 TacticalJoke: well im sure that llama or duck game people in my grade play didn't spend much longer :D Apr 23 00:25:10 also im sure it could have been done much quicker if i understood .postDelayed() fully before hand Apr 23 00:25:50 Are the results saved? Apr 23 00:25:53 maybe it'd be the next flappy bird, who knows Apr 23 00:26:02 TacticalJoke: yeah Apr 23 00:26:11 TacticalJoke: well just the high score Apr 23 00:26:50 mendozao: Hmm, it sounds like this should work even in AppCompat 21: http://stackoverflow.com/a/26871541 Apr 23 00:30:00 TacticalJoke: that worked..wow Apr 23 00:30:25 styling an android app seems to be hell Apr 23 00:30:46 ugh. wtf. single edittext + clearfocus = refocuses itself. Apr 23 00:31:01 why does that even. Apr 23 00:31:31 mendozao: FWIW, Toolbar is easier here. Apr 23 00:31:54 DadFoundMy: You might as well publish it. YOLO, and also YOGEBD (You Only Get Experience By Doing). Apr 23 00:32:20 i would publish but im kinda addicted to playing it right now Apr 23 00:32:29 its oddly amusing Apr 23 00:33:06 groxx: I'm guessing "Gingerbread". Apr 23 00:33:13 TacticalJoke: lollipop too! Apr 23 00:33:39 clearFocus results in a search for focusable views, which finds the edittext, which refocuses it. Apr 23 00:34:44 while (true) { view.clearFocus(); } Apr 23 00:35:02 I like how you think Apr 23 00:35:29 Actually, maybe it'd be more "while (view.hasFocus()) { view.clearFocus(); }". Apr 23 00:35:43 But that wouldn't work because of async stuff, I guess. Apr 23 00:36:05 it's synchronous actually, it might work to cause an infinite loop :) Apr 23 00:36:12 Oh, cool. :D Apr 23 00:36:52 While this is a poor solution, I suspect that it does solve the problem: the EditText no longer has focus. Apr 23 00:40:18 groxx: Just curious -- why do you want to clear the focus of a single EditText? Apr 23 00:43:03 did i read somewhere that if i have a release signingConfig, i need a debug one too ? Apr 23 00:45:19 TacticalJoke: it's not focused when it first becomes visible, and it leaves the cursor blinking even though the keyboard is gone. so I want to reset it to its "default" state. Apr 23 00:45:41 little did I know that focus was a one-way trap Apr 23 00:47:33 i have traps set up everywhere for little groxxes Apr 23 00:49:43 g00s: https://33.media.tumblr.com/tumblr_m003unsHCD1r0n8sxo1_500.gif Apr 23 00:50:07 groxx haha thats awesome, where is it from Apr 23 00:50:23 dark crystal :) I've used it as an avatar for quite a while. Apr 23 00:50:28 I'm amazed when I update Android Studio, the Android SDK, etc. and everything works. Apr 23 00:50:34 oh man, i loved dark crystal Apr 23 00:50:34 I feel like I could do anything now. Apr 23 00:54:17 It's weird that you have to tell Android Studio where its Gradle installation is when you import a project from a build.gradle file. Apr 23 00:54:26 Feels like it should know this. Apr 23 00:54:39 that is a groxx if i ever saw one Apr 23 00:55:59 http://googleblog.blogspot.com/2015/04/project-fi.html Apr 23 00:56:00 does anyone know where to get the retrofit annotation docs? Apr 23 00:56:09 if I'm using a SQLiteOpenHelper is there a way to get it to spit out a jdbc url for the db? Apr 23 00:56:27 I want to use a different sqlite driver than the standard android one Apr 23 00:56:44 no Apr 23 00:56:48 youd have to so it in Apr 23 00:56:55 and write your own sqlite helper Apr 23 00:57:26 wait nvm Apr 23 00:57:55 lizzie you dont' want to use the jdbc stuff Apr 23 00:57:58 just remembered that retrofit uses gson annotations Apr 23 00:58:04 g00s: I want to use scala slick Apr 23 00:58:11 ah, k. nm Apr 23 00:58:27 I guess I'm trying to figure out whether I should bother with SQLiteOpenHelper at all Apr 23 00:58:50 is there anything it does for me besides a tiny bit of automation of creating a db if it doesn't already exist? Apr 23 00:59:11 lizzie hm, well it looks at a versioncode Apr 23 00:59:19 and you may need to update the schema Apr 23 00:59:34 may as well use it Apr 23 00:59:48 Pwnies: Retrofit uses Gson Apr 23 01:00:02 saying "uses Gson annotations" is a bit misleading Apr 23 01:02:01 g00s: I won't mind using it but I do need to figure out how to get a jdbc url that I can use to initialize slick... I don't think I can feed slick the android-specific SQLiteDatabase handle Apr 23 01:02:31 lizzie as long as you know, android's supplied jdbc stuff is very out of date, and doesn't perform well Apr 23 01:02:37 but if you are using scala ... Apr 23 01:02:38 :D Apr 23 01:03:40 I'm not actually sure whether slick uses jdbc or just parses the jdbc url Apr 23 01:04:05 lasserix_: I've heard that from multiple people now. including those who have met me. I'm not quite sure what that says D: Apr 23 01:04:14 but yes I very much like scala... and what I'm going to do isn't likely to be performance-critical Apr 23 01:05:13 hm, gradle dsl method not found: storeFile() wut Apr 23 01:05:27 lizzie: I would caution against using ORM's on Android, especially an ORM 1) designed for the server and 2) designed for Scala. I predict a lot of slowness and pain Apr 23 01:05:39 i am not good with maven, is anyone able to shade some light on this? http://stackoverflow.com/questions/29811558/where-would-this-maven-dependency-be-coming-from Apr 23 01:06:34 sylon maybe #maven :P Apr 23 01:06:39 CedricBeust: may I ask why? Apr 23 01:06:48 g00s: already tried there not much help or even people Apr 23 01:06:50 sylon: try running the "androidDependencies" gradle task Apr 23 01:06:55 is there any way to cancel a call in retrofit? Apr 23 01:06:56 also slick isn't really an orm but your criticisms might still apply Apr 23 01:07:02 lizzie: Because it just wasn't designed for mobile (neither was Scala, and Scala is completely unsupported by Typesafe) Apr 23 01:07:09 unsubscribe lasserix_ Apr 23 01:07:12 groxx: no gradle on this project, though Apr 23 01:07:18 doesnt cancel it but whatevs Apr 23 01:07:28 i want to actually cancel the call Apr 23 01:07:29 sylon: ah. sorry, dunno then. #maven is probably a better target :) Apr 23 01:07:33 or abort it Apr 23 01:07:40 System.exit() Apr 23 01:07:50 CedricBeust: but what exactly should I be concerned about? high ram use? Apr 23 01:08:20 lizzie: for starters, the Scala runtime is 50k methods, which pretty much only leaves room for toy apps. And that's not counting the Slick runtime Apr 23 01:08:42 lasserix_ terminate the thread Apr 23 01:08:46 lasserix_ easy right? Apr 23 01:09:01 (don't terminate the thread) Apr 23 01:09:07 lizzie: ^ plus ram, plus memory thrashing. GC on android is pretty painful compared to desktop, and many desktop/server libraries don't seem to care. Apr 23 01:09:15 CedricBeust: so are you saying I'm gonna have trouble running scala based apps at all? :( Apr 23 01:09:26 lizzie: Yes, very much so Apr 23 01:09:28 anyone got any tips on speeding up viewpager swiping for complex pages? Apr 23 01:09:35 aww butts Apr 23 01:09:41 it appears mvn is shit for android Apr 23 01:09:43 lasserix_: speeding up how? is it stuttery? Apr 23 01:10:02 I haven't forgotten how to write java, but I have forgotten how to enjoy it Apr 23 01:10:11 scala is so much nicer Apr 23 01:10:13 lol Apr 23 01:10:18 yeah Apr 23 01:10:26 each page is really, really complicated Apr 23 01:10:31 and it has to make a network request Apr 23 01:10:32 lizzie: Try Kotlin Apr 23 01:10:43 a) those are cached b) the pages are optimized as much as can be done Apr 23 01:11:03 lasserix_: stuttery at start (e.g. could be due to preparing the next view), or through the whole thing (e.g. could be layout while animating, or a costly animation, or whatev) Apr 23 01:11:24 CedricBeust: is there anything comparable to slick for kotlin? Apr 23 01:11:31 lizzie: https://docs.google.com/document/d/1ReS3ep-hjxWA8kZi0YqDbEhCqTt29hG8P44aA9W0DM8/edit?hl=en&forcehl=1 Apr 23 01:11:36 how do you parse data with retrofit in a response that gives two series of the same object? Apr 23 01:11:36 groxx a combo of the network request and the layout inflation Apr 23 01:11:46 im already using jake wharton's salvage to recycle the pages Apr 23 01:11:46 List Apr 23 01:11:49 lizzie: Don't try to fix a problem before you have that problem. ORM's are not as useful on Android as they are on the back end Apr 23 01:11:52 List Apr 23 01:11:52 also debouncing the load Apr 23 01:12:06 *the network call/inflate Apr 23 01:12:15 JacobTabak: was that for me? Apr 23 01:12:18 yes Apr 23 01:12:30 there are lots of examples of how to use gson Apr 23 01:12:32 Whoa, code completion feels way faster in AS 1.2. Apr 23 01:12:34 this is not a retrofit question Apr 23 01:12:44 TacticalJoke: can you move your floating windows? Apr 23 01:12:55 The documentation windows? Apr 23 01:13:11 CedricBeust: "Don't try to fix a problem before you have that problem" I could apply this to your performance concerns :P Apr 23 01:13:27 lizzie: What do you mean? Apr 23 01:13:32 lasserix_: hm. I assume that'll help with gc, but it probably still has to lay out, if that's expensive. Apr 23 01:13:51 CedricBeust: I want to make a podcast managing app and I don't expect there to be any heavy load on the database Apr 23 01:14:00 CedricBeust: again, slick isn't an orm... and I think type safety for queries is always a major benefit Apr 23 01:14:04 groxx: yeah Apr 23 01:14:05 lizzie: All the more reason that using an ORM is overkill Apr 23 01:14:19 yeah slick is not an ORM, I've read the arguments, whatever Apr 23 01:14:28 Oh, man, this is way better. Apr 23 01:14:30 Start writing your app and see what needs appear Apr 23 01:14:31 well anyways it's not for performance that I want slick Apr 23 01:14:39 I always had "auto-show code completion" enabled before, but it had an annoying delay. Apr 23 01:14:42 Now it's instant. Apr 23 01:14:43 it's to minimize refactoring pain Apr 23 01:14:46 lasserix_: I forget, does viewpager create a new 'page' as soon as you start paging? maybe there's a way to stop that... Apr 23 01:14:56 I've made enough software using mishmashes of database queries to know I don't even want to go down that road Apr 23 01:15:00 lizzie: What Android refactoring pain are you referring to? Apr 23 01:15:07 groxx that's what i mean by salvage: it implements a convert view in the pager adapter Apr 23 01:15:08 lasserix_: I should probably mention though that although I've used viewpager several times, I utterly despise it. difficult to optimize. Apr 23 01:15:39 not android-specific. just database stuff. like if I ever coalesce two database columns into one. Apr 23 01:16:19 lizzie: Look, don't listen to me. Install Scala, install Slick, learn your lessons. Report back Apr 23 01:16:20 without slick, you have to go rewrite every query ever. with slick, you can easily add fake derived columns to your table definition and your existing code will work fine Apr 23 01:16:26 what do you use instead? Apr 23 01:16:31 gridview ? Apr 23 01:16:36 *specialized gridview Apr 23 01:17:01 CedricBeust: well ok. it will be a learning experience. I have a 512MB ram device for testing, so if there are issues I will find out quickly enough Apr 23 01:17:08 JacobTabak: hm. you sure? I want to overload my pojo constructors. the first 50 responses will give me series one of the data (e.g. rain); which i'll use with list, but the 50 responses after that will give me series one AND two (e.g. rain and snow) with the same title; i'd like for my object to have an option to store each one, but they both use the same title ("values") Apr 23 01:17:09 lasserix_: ah, yeah, I meant that if it still creates the page, it's still running whatever layout / startup / networking / anything _when it's animating_, instead of waiting until it settles, which is just plain bad design. Apr 23 01:17:28 lizzie: I'm betting some money you'll give up after a few days, but yes, it will be a learning experience. Do report back, I'm curious Apr 23 01:17:29 lasserix_: and I use viewpager :| just unhappy with it. Apr 23 01:17:33 Pwnies sample json Apr 23 01:17:42 lizzie: And then, take a look at Kotlin Apr 23 01:18:20 afk omw home Apr 23 01:18:24 Kotlin all the things. Apr 23 01:18:25 CedricBeust: so Kotlin has no performance issues on android? Apr 23 01:18:35 i'm wondering if Ceylon 1.2 will have android support (due this june) Apr 23 01:18:47 I have high hopes for ceylon Apr 23 01:18:49 lizzie: None that I've seen, and it's fully supported by JetBrains and its runtime is just 5k methods. Read the document I linked Apr 23 01:18:53 I will probably like it even more than scala Apr 23 01:18:57 g00s: Gavin has zero interest in Android so far Apr 23 01:19:12 lizzie: Kotlin is really neat, and it seems definitely viable for Android stuff. Apr 23 01:19:15 You should check it out. Apr 23 01:19:30 lizzie: it's basically syntactic sugar for java. you can construct things that have runtime performance, but there's no "runtime" per se. Apr 23 01:19:32 Every other language seems to have major drawbacks. Apr 23 01:19:33 CedricBeust i guess i should ask him when he pops into #ceylon Apr 23 01:19:42 CedricBeust: if you're anti-orm, how about sqltyped? have you heard of that one? Apr 23 01:19:50 lizzie: I never said I'm anti-ORM Apr 23 01:19:55 :P Apr 23 01:20:04 well anyways have you? Apr 23 01:20:04 I just said using Slick on Android is nuts Apr 23 01:20:05 lizzie maybe also j00q if you can get that to run Apr 23 01:20:21 sqltyped is a macro that infers the types of your queries at compiletime using a live db Apr 23 01:20:27 I actually was part of the EG that gave you JPA Apr 23 01:20:28 maybe that will have less overhead and still give me the type safety I want Apr 23 01:20:45 I'm really starting to like AS. It feels like a nice IDE now. Apr 23 01:21:09 every time i sync gradle in AS a kitten dies Apr 23 01:21:20 i mean, i lose like 50mb ram Apr 23 01:21:25 blame Gradle and Groovy for that nonsense Apr 23 01:21:31 Yeah, I wish Gradle were less heavyweight. Apr 23 01:21:40 JacobTabak: http://pastebin.com/fZhR1xk5 Apr 23 01:21:57 so lightweight it stopped existing, preferably Apr 23 01:22:03 lol Apr 23 01:22:41 You don't like Gradle now? Apr 23 01:22:47 CedricBeust: I was poking around, and I saw something that said proguard can strip all the unused functions from the scala libraries Apr 23 01:22:54 did I like it at some point? Apr 23 01:23:02 i wonder if writing gradle in a type safe language like kotlin would make it easier to use Apr 23 01:23:06 lizzie: It will shake off a few Apr 23 01:23:19 you think it'll still be pretty heavy? Apr 23 01:23:24 i don't see why gson would have a problem with this Pwnies Apr 23 01:23:31 I guess I just assumed you had drunk the Kool Aid. Isn't the one-liner thing cool, though? Apr 23 01:23:40 JakeWharton: Did you ever try to minify the Scala runtime? Apr 23 01:23:50 the progression of build tools is: 1. you hate [XYZ] because it's not the build tool your use, 2. you enjoy [XYZ] because you're a noob and don't fully grok it, 3. you hate [XYZ] because you fully grok it Apr 23 01:24:06 CedricBeust: by the way I'm not trying to say I know better than you... I probably don't... I'm just clinging to hope that I can keep the things I love :P Apr 23 01:24:15 g00s: I was actually just pondering that. dream world: gradle becomes kotlin-based, android toolchain supports kotlin, ???, profit! Apr 23 01:24:17 Yeah, I'm at stage 2 with Gradle. Apr 23 01:24:18 CedricBeust: no. i have only used scala on the desktop. i do not hate myself enough to use it for Android Apr 23 01:24:25 Pwnies are you saying you want the objects to be of a different type for series1 and series2? Apr 23 01:24:40 lizzie: I'm just trying to set your expectations right when it comes to using Scala on Android, I don't want you to be disappointed later Apr 23 01:24:45 i really dont like it because the language / dsl seem so wishy washy, ambiguous, etc to me. don't know how to word it Apr 23 01:24:49 g00s: well, minus the "gradle exists" part perhaps. it's overly fancy. Apr 23 01:24:51 Is there something better than Gradle that could be used for Android? Apr 23 01:24:51 I'd like for the objects to be the same JacobTabak Apr 23 01:25:13 JacobTabak: can you explain? Apr 23 01:25:15 I have a conceptual question. So this is the flow I currently have: A user takes a picture, then is taken to a tabbed activity with 2 tabs - step 1 and step 2. After a user prefills some information in step 1, the user is taken to step 2. In step 2, the user hits submit and the picture data along with text field data from steps 1 and 2 is collected and saved to a 3rd party. How should the flow of data be handled here? Apr 23 01:25:19 TacticalJoke: plenty of things Apr 23 01:25:29 Gradle is the most appropriate though Apr 23 01:25:32 Pwnies pm, too much noise here Apr 23 01:25:44 i also dont really want to use gradle outside of android, so i don't invest much in learning it i guess. i'd just use maven Apr 23 01:25:56 oops I meant JakeWharton Apr 23 01:26:33 Maybe I should just enjoy my blissful Gradle ignorance. :D Apr 23 01:26:46 It feels nice (usually) right now. Apr 23 01:26:51 gradle ignorance doesn't work when you have to get down and dirty Apr 23 01:27:00 g00s: gradle is actually quite a bit better outside of android, imo Apr 23 01:27:22 JesusFreke well - i guess its nice they have the standard java task Apr 23 01:27:34 i guess ours is kinda based on it Apr 23 01:27:50 it's the same exact task Apr 23 01:27:53 not based on Apr 23 01:28:01 JavaCompile Apr 23 01:28:13 oh i thought we used a tweaked version Apr 23 01:28:23 I guess Groovy's dynamism (dynamicness?) is part of the reason for Gradle's slowness. Apr 23 01:28:40 That's an interesting though about Kotlin, g00s. Apr 23 01:28:41 TacticalJoke: and the fact that your build configuration has to be run Apr 23 01:28:42 thought* Apr 23 01:29:10 I'm hoping that'll improve when they get the watcher thing implemented. Apr 23 01:29:32 they can call it kradle Apr 23 01:29:59 AS 1.2 has a test-coverage thing. Really neat. Apr 23 01:30:08 TacticalJoke: https://github.com/fkspro/android-tinyasync/issues/1 Apr 23 01:30:45 Nice. :D Apr 23 01:32:44 Not many people do this, but I quite like the "for (String line = reader.readLine(); line != null; line = reader.readLine())" construct there. Apr 23 01:32:57 It one-line-izes everything. Apr 23 01:33:20 s/there/in that situation/ Apr 23 01:34:39 myke: Is that code correct, though? Your resultant string will have no new-lines in it. Apr 23 01:35:06 yeah that's not great Apr 23 01:35:43 yeah, one-lining that is kinda nice. it does seem to imply `reader` should have a `lines` iterator though. Apr 23 01:35:57 groxx: Yeah, that'd be nicer. Apr 23 01:36:41 I suppose it's not really safe though, without buffering the whole thing. hm. Apr 23 01:37:16 Doesn't Java 8 do that with streams and stuff? Apr 23 01:37:27 To be honest, I'm kinda clueless about Java 8. Just going on what I've read. Apr 23 01:38:10 streams have been around for a long time Apr 23 01:39:23 myke: I guess the best solution would be to read it into a byte array (maybe using a ByteArrayOutputStream) and getting a string from that (perhaps with BAOS.toString). Apr 23 01:40:57 or result.append(line).append("\n"); Apr 23 01:41:50 Yeah, I guess that'd work. Apr 23 01:43:45 Or you could use OkHttp which is better and which has ResponseBody.string. Apr 23 01:43:49 Which does all the work for you. Apr 23 01:49:46 embrace the laziness Apr 23 01:50:20 CedricBeust: well I've googled around and read a bunch of things, and I think I'm still going to try for scala, but I'll skip slick. I'm now thinking of going with sqltyped. I know you disagree with using scala at all, but ignoring that part, does sqltyped seem reasonable for android? Apr 23 01:50:57 lizzie: Not familiar with sqltyped to offer an opinion. My reaction is to always start with very little DB help and only use libraries when I actually need them Apr 23 01:51:17 if I did need something like this, it would most likely be Rx enabled, like SQLBrite (not really an ORM though) Apr 23 01:51:46 CedricBeust: sqltyped lets you execute plain queries and looks a lot like a barebones sql driver, but it uses a macro to infer type information at compiletime Apr 23 01:51:47 Also in my experience, schemas on mobile clients change a lot less than they do on the server Apr 23 01:51:55 what's Rx? Apr 23 01:52:16 lizzie: If it uses Scala macros, I'd say the odds of it running well on Android are considerably lower but go ahead and try Apr 23 01:52:30 CedricBeust: but the macro won't run on android, it'll run on my pc when I compile it, right? Apr 23 01:52:51 all that goes into the bytecode is a plain old sql call and the inferred type information Apr 23 01:52:53 lizzie: https://github.com/ReactiveX/RxJava Rx is on pretty much all languages, I use the Kotlin one myself Apr 23 01:55:30 thanks, I'll look Apr 23 01:56:07 lizzie: I wrote a series of articles about it: http://beust.com/weblog/2015/03/23/android-rx-and-kotlin-a-case-study/ Apr 23 01:56:55 neat! Apr 23 02:00:49 This is an AppCompat dialog: http://imgur.com/llCx6IE Apr 23 02:00:53 Love that. Apr 23 02:01:07 anyone know the default backround color from lolipop? Apr 23 02:01:09 Better URL: http://i.imgur.com/llCx6IE.png Apr 23 02:01:10 you spelled AppCompat wrong Apr 23 02:01:12 the greyish color Apr 23 02:01:43 JakeWharton: Yeah, it was some guy from the comments here: https://chris.banes.me/2015/04/22/support-libraries-v22-1-0/ Apr 23 02:03:12 it's just the same layout XML. did you expect it to look different? Apr 23 02:05:26 No, I'm just glad it looks material finally. Apr 23 02:05:43 DadFoundMy: The material-light background? Apr 23 02:05:50 It should be #eeeeee. Apr 23 02:05:54 TacticalJoke: yeah, i think i got it Apr 23 02:06:03 Dark is #303030. Apr 23 02:06:13 i just used layout.getSolidColor() Apr 23 02:07:06 im impressed that you memorized that though :D Apr 23 02:07:45 I remembered only the second one. Apr 23 02:07:53 Only because I've been fiddling so much with it lately. Apr 23 02:09:10 BTW, it's all here: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/colors_material.xml Apr 23 02:09:27 Though that's not necessarily the best way of finding stuff (sometimes it's easier to use auto-completion in AS). Apr 23 02:16:16 Interesting AppCompat 22.1 bug: https://code.google.com/p/android/issues/detail?id=169760 Apr 23 02:16:23 There are so many AppCompat landmines. :) Apr 23 02:19:44 JW got nominated: http://www.reddit.com/r/androiddev/comments/33j14u/who_is_considered_the_best_android_programmer/ :D Apr 23 02:21:27 ugh, this is heinous - i'd never find a bug like this. https://groups.google.com/forum/#!topic/rxjava/_tRfKPeftIk Apr 23 02:21:57 i'd probably wind up crying myself to sleep Apr 23 02:22:22 wow, AS logcat is so delayed under heavy pressure Apr 23 02:22:40 This is why ProGuard is scary. :[ Apr 23 02:23:13 Yeah, that delay is annoying. Apr 23 02:23:15 hah, I made proguard my bitch some months ago. Ever since then, it's tame Apr 23 02:23:19 Not sure if code is super-slow or LogCat is super-slow. Apr 23 02:23:36 (Where code is async.) Apr 23 02:23:49 TacticalJoke terminal > adb logcat Apr 23 02:23:52 the fastest logcat Apr 23 02:53:42 is you us proguard, and have dontoptimize and dontobfusicate - is there any point ? Apr 23 02:53:48 *if you use proguard Apr 23 02:55:46 g00s lol no Apr 23 02:56:05 Afzal lol indeed Apr 23 02:56:26 Afzal so it won't strip unneeded files unless its optimizing ? Apr 23 02:56:30 I think it's just a flag to check if obfuscation is causing some issue or optimization is Apr 23 02:56:58 I don't know that for sure but I'd say say Apr 23 02:57:00 yes* Apr 23 02:58:17 hm, i thought optimizing was rewriting the bytecode Apr 23 02:58:39 pfn halp Apr 23 02:58:51 don't worry g00s, i'll save you Apr 23 02:59:01 i thought optimizing was doing things like renaming variables n other such stuff **** ENDING LOGGING AT Thu Apr 23 02:59:58 2015