**** BEGIN LOGGING AT Wed Dec 17 02:59:59 2014 Dec 17 03:06:26 TacticalJoke: just use GL surface view, or do it in pure ASM, and then you can stop asking if it will be faster Dec 17 03:07:07 TacticalJoke & lasserix: I don't know if I found exactly the same thing as last time, but this looks promising (as well as other text widths): https://developer.android.com/reference/android/graphics/Paint.html#getTextWidths%28java.lang.String,%20float%5B%5D%29 Dec 17 03:07:38 Groxx how do you know how to populate the array? Dec 17 03:07:48 you give it an array, it populates it Dec 17 03:07:52 it's an out-param Dec 17 03:07:54 you have to break the line each time, because the next line relies on where you broke the previous line... Dec 17 03:08:03 Yeah, that could be fast. Dec 17 03:08:05 yeah. not saying this is the easy route. Dec 17 03:08:14 it doesn't work! Dec 17 03:08:27 how do you know what [1] is? where did you break the string to get [0] ? Dec 17 03:08:32 you have to know that to populate [1] Dec 17 03:09:52 there are also a bunch of other things in the text package that e.g. compute lines of text, paragraphs, etc. since the problem is computing all of it up-front is too slow, break it apart, and render it by hand in pieces. Dec 17 03:10:59 you have to breazk it up Dec 17 03:11:02 and do it per line Dec 17 03:11:28 I think the problem may simply be asking a ListView to resize a child. Dec 17 03:11:28 TacticalJoke: although Nalpam mentioned he used BreakIterator to tokenize the lines Dec 17 03:11:32 lasserix: True. Dec 17 03:11:41 Napalm: Are you here? Dec 17 03:11:42 but I haven't gone further than "get glyphs + widths" in any of my poking. ultimately I just decided to make a new view on each \n, which has the benefit of partial measuring and easy integration with listview. Dec 17 03:11:58 so super-large paragraphs still suck, but everything else works great. Dec 17 03:12:03 that would be much slower Dec 17 03:12:10 you might be surprised :) Dec 17 03:12:11 thats exatly what he is trying to solve Dec 17 03:12:21 super-large paragraphs are specifically what he is going after Dec 17 03:12:41 If only Reddit had Twitter's character limit. Dec 17 03:12:43 you could force a newline after 1000 characters + find whitespace. Dec 17 03:13:08 Groxx: But isn't the problem the sizing of a ListView's children? Dec 17 03:13:16 is it super-large _single_ paragraphs, or super-large _comments_ which may have multiple paragraphs in them? Dec 17 03:13:16 Groxx that doesn't work for a handful of rreasons Dec 17 03:13:21 As far as I can tell, it's just ListView taking ages to show a new height. Dec 17 03:13:22 https://helpouts.google.com/partner/landing/provider/googledevelopers?utm_source=devsite_pb&utm_medium=banner&utm_campaign=devsite_pb_banner Dec 17 03:13:25 interesting Dec 17 03:15:35 TacticalJoke: maybe you can override where it sets the height and optimize it Dec 17 03:17:23 on a somewhat different note: does Paint count as part of the "view system", meaning you can only use it on the main thread? Or could you measure in the background as things are retrieved? You know the view width + your padding-per-nesting level, you might be able to just do that. Dec 17 03:18:00 doesn't really solve the problem when it's displayed (unless that can be cached somewhere), but might be a start Dec 17 03:23:48 you can draw it on a buffer Dec 17 03:33:16 well now there's not much point in using an inner asynctask anymore Dec 17 03:33:24 might as well make it outer Dec 17 03:46:59 gordon_ helpouts heas been there for about 1 month, but i don't hear much about it Dec 17 04:00:15 heh, "For VLC on Android, we need the READ_PHONE_STATE permission, in order to stop the music when a phone call is coming in" ... "on the play store it's written "read phone status and identity" and that's really really scary for the users" Dec 17 04:09:05 Hmm, this is weird. Dec 17 04:09:24 So I've done all this "custom view with custom drawing" stuff, and the new code feels as slow as the old code. Dec 17 04:09:35 But now my getView is returning almost instantly. Taking 0 or 1ms every time. Dec 17 04:09:41 Even when I'm seeing lag on-screen. Dec 17 04:10:16 I'm guessing that requestLayout is async or something. But I wonder what my code is doing differently than LinearLayout with regard to getView returning instantly here and not with LinearLayout. Dec 17 04:10:20 * g00s is actually worried for TacticalJoke now Dec 17 04:10:39 lol Dec 17 04:11:12 I will go to great lengths for performance. Dec 17 04:11:29 Though this freaking code should be performing well. :/ Dec 17 04:11:30 go to great length for MVP, worry about that later Dec 17 04:11:46 g00s: The issue is that I will hate the app if it's slow. Dec 17 04:11:54 My attitude will become "Eh, what's the point". Dec 17 04:12:20 So, in a way, this is an essential part of the MVP. Dec 17 04:12:35 g00s: I cannot register from my country ;( Dec 17 04:13:11 gordon_ O.o weird there are such limits ? Dec 17 04:13:19 seems so Dec 17 04:14:18 TacticalJoke lol, i was looking for an example of something and found https://github.com/mutexkid/redditbrowser/blob/master/app/src/main/java/com/joshskeen/redditbrowser/SwipeRefreshExampleFragment.java Dec 17 04:14:27 redditbrowser Dec 17 04:14:34 how many of these things are ther ? Dec 17 04:15:37 lol Dec 17 04:16:54 Is there a way to style the native ActionBar to look more like the native Toolbar? Specifically, I want to move menu items closer together like they are on API 21+. Not interested in appcompat-v7. Dec 17 04:18:02 Man, I am so disappoint. Put all that effort in for performance and I can't even tell which is faster. Dec 17 04:18:22 On the plus side, I learned all about Views. Dec 17 04:18:59 ++ til Dec 17 04:19:21 TacticalJoke: get old phone ;) Dec 17 04:21:09 yeah, i used my droid-1 up until 2013. if it worked good there, it was awesome everywhere else Dec 17 04:22:59 I got galaxy s1 on desk Dec 17 04:25:40 TacticalJoke: declaring it static fixes that problem I was having, since it's just one boolean var it should be ok I guess :P Dec 17 04:26:31 shmooz: Hmm, not sure why that would fix it. Dec 17 04:26:46 it makes it the same in all scopes Dec 17 04:27:13 Based on what you described earlier, an instance field should be in scope for everything. Dec 17 04:28:22 shmooz: that actually crossed my mind earlier ... should have said something, you'd think I was a genuis Dec 17 04:29:42 So you have multiple instances and are using the global as the flag Dec 17 04:30:20 well the doInBacground was recognizing the global variable and setting it, but it was only being set within it's own scope Dec 17 04:30:37 right Dec 17 04:31:53 I made that mistake in reverse last week, used static when I didnt want it and had object collisions / consurrency issues Dec 17 04:32:10 I don't understand that. If some code can touch X, X is within that code's scope. Dec 17 04:32:26 shmooz: Is there anything you could post? Maybe snippets. Dec 17 04:32:42 It sounds to me *exactly* like you have issues relating to multiple threads mutating/accessing memory. Dec 17 04:33:08 TacticalJoke: I'd have to build a short version to paste Dec 17 04:33:12 it's pages long Dec 17 04:34:33 I'll try making a short case for you Dec 17 04:46:05 TacticalJoke: something like this ... http://pastebin.com/TkvvHY54 Dec 17 04:48:47 Okay, it's been years since I've done serious multithreading stuff, but from what I remember scanComplete has to be volatile there. Dec 17 04:49:07 If it's not volatile then the value can be cached and so one thread might never see any updates (it'll always see it as false). Dec 17 04:49:20 But you said that setting it to volatile didn't make a difference, which surprised me. Dec 17 04:49:44 You used "volatile boolean scanComplete = false;", right? Dec 17 04:49:49 yeah, and setting it to static worked Dec 17 04:49:56 yes Dec 17 04:50:09 I tried that, it had no effect Dec 17 04:52:24 BTW, another option would be to have two AsyncTasks. When the first finishes, it calls back to MainActivity, which spawns the second. Dec 17 04:52:31 NOOOOOO Dec 17 04:52:54 g00s? Dec 17 04:53:10 no ping-pong asynctasks Dec 17 04:53:51 yeah I was trying to use a single background thread to do all the work Dec 17 04:54:10 all the scanning work at least , for the audio and video file info and images Dec 17 04:54:15 shmooz sharing mutable state like that is prone to problems anyhow, you could try AtomicBoolean but ... why not just call onProgressUpdate() so your activity knows whether the scan is done or not ? Dec 17 04:54:55 g00s: yeah I should do it that way, but I was lazy and static works for now Dec 17 04:54:59 I'll get around to it though Dec 17 04:58:25 it has 2 modes video and audio and when the user starts the app it starts in the mode they left the app in Dec 17 04:59:01 so I try to load one before the other depending on where their mode is selected Dec 17 04:59:42 why are you even using static when you pass your activity to the async. just cast it to MainActivity in constructor and access the instance variable there. or do what others have suggested with publish progress etc. you keep dicking around with your ideas instead of listening Dec 17 05:00:25 yeah those were leftovers actually from when I had the asynctask outside of the mainactivity Dec 17 05:00:52 and then I thought I could easily access and set the global variables of MainActivity by making it inner Dec 17 05:01:27 but yeah I could still use that Dec 17 05:01:29 it isnt global, its instance Dec 17 05:01:58 oh no, I don't need no instance Dec 17 05:02:33 no im saying its not called global variables, its an instance variable of your class Dec 17 05:03:02 ok but it's scope is global to the activity Dec 17 05:07:57 got it working. http://stackoverflow.com/questions/10255858/how-do-i-continue-music their code works Dec 17 05:08:05 yay, only took two days. Dec 17 05:09:36 I'd be so happy if my issues took only two days. Dec 17 05:09:53 what objects or libraries would i use to manage apps in programming an app? for example, i want to programatically uninstall an app? Dec 17 05:15:28 Howdy all. I've got an issue with the fragment backstack I'm hoping you can help me with. Dec 17 05:15:44 I'm trying to clear the back stack, before performing a replace transaction.. Dec 17 05:16:07 I can do so by calling popBackStackImmediate for however many back stack entries there are Dec 17 05:16:16 But I don't want to actually see these transactions being performed. Dec 17 05:16:35 Any ideas? Dec 17 05:34:00 hm, so this snackbar library won't let me keep it up indefinitely Dec 17 05:34:12 when i send an email in gmail it stays up until 'something happens' Dec 17 05:35:04 so send a patch Dec 17 05:37:26 if the user has bt disabled, not sure if i should show this as an error with a snackbar, action : enable --- or a dialog Dec 17 05:37:54 this was fun http://simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ ... til "otto" is a thing Dec 17 05:38:13 i don't think i've seen snackbar used for errors hmm Dec 17 05:38:20 Just turned on my old phone. Oh my god, that thing is slow. Dec 17 05:41:47 UI Design is way too hard :( Dec 17 05:43:07 * capella leaves it to the graphics guys :) Dec 17 05:46:13 capella: what are the costs :P Dec 17 05:47:34 priceless ... I can *not* do that work professionally ... assemler language bit twiddling? love it! Animation sequences? not so much Dec 17 05:48:35 capella: I suck at UI Design for android, and i'm currently building an app for which i definately need a designer :P Dec 17 05:49:15 Is there something I could call other than View.requestLayout? That's where all my slowness is. Dec 17 05:49:30 In fact, my slowness is ultimately in ListView.onDraw. Dec 17 05:50:56 this is contradictory. http://www.google.com/design/spec/patterns/errors.html#errors-incompatible-state-errors says "Consider displaying an unintrusive but persistent indicator" and shows a snackbar, but then snackbar docs says "They should not be persistent or stack" Dec 17 05:51:34 well, no wonder why the gapps are so inconsistent :D Dec 17 05:52:36 Napalm: You around? Dec 17 05:53:38 ReScO: yeah. and sadly, the people who would be able to help you tend to not hang out in here since they don't dev and there's a no advertising rule in the topic. so that doesn't help. :/ Dec 17 05:53:47 TacticalJoke: i can scan products! :D Dec 17 05:54:01 And start activities and pass intent extras! Dec 17 05:55:03 can you instantiate a singleton with double checked locking? Dec 17 05:55:33 Nice. Dec 17 05:55:40 heh - teasing resco -^ Dec 17 05:56:07 capella: can you interface the gewgaw on the hootenanny? Dec 17 05:56:17 ;) Dec 17 05:56:21 If I use a who-what wherenow Dec 17 05:56:42 Chuck Norris can break an indefinite deadlock. Dec 17 05:57:07 i hear he provides his own men for the deadman timer. Dec 17 05:59:07 I can't finish my OA Hastable quadratic probe though, cause it needs to degrade to a linear probe where c₂ ≠ 0. If c₂ = 0, then h(k,i), etc... and I don't know what that means :) Dec 17 05:59:49 doesn't it mean if there is a collision, it just has to scan the bucket which is a list ? Dec 17 06:00:10 OpenAddress hashtable? Dec 17 06:00:12 Napalm: Are you alive? :) Dec 17 06:00:35 TacticalJoke probably sleeping, but then again ... Dec 17 06:00:54 sleep is for the weak! and undercaffeinated. both of which are unacceptable. Dec 17 06:01:05 Actually, i think it means how you detect table overflows when length is a multiple of your current quadratic Dec 17 06:01:13 napalmThread.interrupt(); Dec 17 06:03:02 TacticalJoke: what's the proper way of communicating with the internet these days? i used to run it on the main thread Dec 17 06:03:25 Using a background thread and posting results to the main thread's message queue. Dec 17 06:03:41 TacticalJoke: any documentation on that and code examples? Dec 17 06:03:41 what, no await? Dec 17 06:04:26 ReScO: AsyncTask makes it easy. Its onPostExecute callback runs on the UI thread. Dec 17 06:04:37 Groxx: I guess I just became pessimistic after today. Dec 17 06:04:52 Just interrupt and leave. Kinda like knocking at someone's door and running. Dec 17 06:05:02 * Groxx has flashbacks to halloween Dec 17 06:05:14 ReScO: http://developer.android.com/reference/android/os/AsyncTask.html Dec 17 06:05:22 granted, the running is usually _after_ the candy is handed out, but still. Dec 17 06:05:25 To be honest, I don't use AsyncTask, but I think it does simplify stuff. Dec 17 06:05:48 I think you don't have to run if they give you candy. :D It's when you TP their house that you have to run. Dec 17 06:05:56 I never did that, for the record. Dec 17 06:06:09 ReScO: yeah, asynctask works reasonably well. you might end up wanting to switch to a request-helper library to simplify things a bit further, but it's not necessarily worth it for something simpler. Dec 17 06:06:39 TacticalJoke: I fall in the "everything is more fun with running" camp :) always run. Dec 17 06:06:53 :D Dec 17 06:07:28 ReScO: I used to like making CLI apps because for certain use cases you could do it all in one thread. Dec 17 06:07:31 Even with crazy blocking. Dec 17 06:07:36 That cursor carried on blinking. Dec 17 06:07:57 They don't make UIs like that anymore! Dec 17 06:09:21 protip: never do nameservice requests on your ui thread. even in a cli app. ;) Dec 17 06:14:21 oooh ... NOC operator job here in town ... hmmmm Dec 17 06:17:03 * capella . o O ( could I man a help desk ticket system for 6 mos. wOut becoming the bastard operator from hell? :p ) Dec 17 06:27:31 Man, I'm so bummed out. I was hoping to make my app extremely fast. Dec 17 06:27:37 I don't wanna release yet another slow, pointless app. Dec 17 06:27:45 It seems impossible. Dec 17 06:30:13 I guess my only hope is to try RecyclerView and see whether that's faster. But I'm not very optimistic. Dec 17 06:36:38 Facebook on this topic: "Writing a Custom ListView Recycler: View recycling speeds up scrolling performance. The stock Android ListView has view recycling support, but it is not efficient for list elements of very different row heights, such as in news feed stories. We wrote a custom view recycler, which detached heavy content views once they were added to the recycling heap. We also Dec 17 06:36:39 recycled substories in more complicated aggregated feed stories." Dec 17 06:36:51 Is it a policy violation to name an app "Samosa" when an app with name "Social Samosa" already exists google play store? (My app with name Samosa is removed as an Intellectual property and impersonation provisions) Dec 17 06:40:03 bhai1289: I would imagine so. Dec 17 06:40:16 Are you saying "My app was removed -- is the reason the name?". Dec 17 06:44:37 TacticalJoke: this is my first submission on play store. Images I've used can be seen here: http://app.getsamosa.com/ Dec 17 06:45:21 whoosh seems a little harsh Dec 17 06:46:02 The email I received from Play support seems automated and very cryptic. http://pastebin.com/caLjkDMF Dec 17 06:46:52 when I responded to their contact form asking for more details I got this: http://pastebin.com/Xa8DLVTr Dec 17 06:49:14 Hmm. Dec 17 06:51:29 bhai1289: Maybe post on /r/androiddev if you haven't already, too. Dec 17 06:52:04 People post there when this kinda thing happens and sometimes they figure out what was wrong. Dec 17 06:52:55 is using same size icon for FAB as in action bar okay, or should i use the smaller ? Dec 17 06:55:09 can i use recyclerview adapter and a cursor together soemhow? Dec 17 07:01:27 do you own samosa.com? Dec 17 07:03:53 yeah. they seem to be very much complaining about the package id there... Dec 17 07:04:10 and a vague hint to make sure to not screw up those in the future. Dec 17 07:04:59 pfn: Nope. I don't own it. Dec 17 07:05:30 then why would you give your app that package or name Dec 17 07:05:44 if you don't own it, you don't have a right to publish with it Dec 17 07:07:03 Hmm. If I enable fast-scroll and scroll my list like that, there is no lag whatsoever. Does that feature do something weird under the hood? Dec 17 07:24:59 Anyone here have experience with repacking Kernels using the mkbootimg tool? I need help!! Dec 17 07:27:18 pfn: Facebook Messenger is com.facebook.orca (but http://orca.com/in-en isn't related to Facebook) Dec 17 07:27:43 That's not com.orca. Dec 17 07:30:48 TacticalJoke: thanks for clarifying. Is there a place I read up these and more? Dec 17 07:36:10 I guess this is as good as anything: http://stackoverflow.com/questions/6273892/android-package-name-convention Dec 17 07:39:42 TacticalJoke: caching Dec 17 07:40:14 I added an issue to my issue tracker about that, but it didn't seem to help. Dec 17 07:58:15 bhai1289: the domain part is com.facebook => facebook.com which I'm certain that facebook does own Dec 17 07:58:38 You Never Know... Dec 17 07:59:00 lasserix: I'm just gonna move on. Maybe RecyclerView will save me one day. Who knows. But performance is as good as that of any other Reddit client, so I guess it's okay. Dec 17 07:59:28 lasserix: In the worst-case scenario maybe I could pay some genius to create a super-fast ListView. Dec 17 08:01:38 giving up already?!? Dec 17 08:01:42 lol Dec 17 08:01:53 what blocks you? Dec 17 08:02:06 Blocks me from what? Dec 17 08:02:10 Oh. Dec 17 08:02:12 to give up Dec 17 08:02:16 This: https://m.facebook.com/notes/facebook-engineering/under-the-hood-rebuilding-facebook-for-android/10151189598933920/ Dec 17 08:02:32 "View recycling speeds up scrolling performance. The stock Android ListView has view recycling support, but it is not efficient for list elements of very different row heights, such as in news feed stories. We wrote a custom view recycler, which detached heavy content views once they were added to the recycling heap. We also recycled substories in more complicated aggregated feed stories." Dec 17 08:02:42 That was the nail in the coffin. Dec 17 08:02:54 also did you look at listview source to see what face scroll does? Dec 17 08:03:11 Note that I spent basically an entire day on this, trying *everything* (apart from RecyclerView). I had a free day today, basically. Dec 17 08:03:21 lasserix: Please don't encourage me. lol Dec 17 08:03:33 oh well there are easy ways to do what you want Dec 17 08:03:38 Such as what? Dec 17 08:03:44 Dude, I tried everything. Srsly. Dec 17 08:03:45 Everything. Dec 17 08:03:47 well did you finish the custom text painter? Dec 17 08:03:51 Yeah. Dec 17 08:03:55 That took hours, BTW. Dec 17 08:03:57 and no luck? Dec 17 08:04:00 Right. Dec 17 08:04:06 can you post the class? Dec 17 08:04:10 or send me a link Dec 17 08:04:14 the lag was still there? Dec 17 08:04:14 It's such a mess. lol Dec 17 08:04:20 It's literally throwing code onto a screen. Dec 17 08:04:24 lasserix: Did you read what Facebook wrote? Dec 17 08:04:34 " The stock Android ListView has view recycling support, but it is not efficient for list elements of very different row heights, such as in news feed stories." Dec 17 08:04:48 They have super-geniuses. If they can't solve it, I can't. Dec 17 08:04:50 yeah fucking idiots everything they list on perfomance challenges makes me think they hired someone who knew nothing of android for version 1 Dec 17 08:04:55 moving photos to native heap well duh Dec 17 08:05:01 writing a custom event bus who hasnt? Dec 17 08:05:11 reducing garbage collection thats like android 101.1 Dec 17 08:05:19 the only interesting thing is d Dec 17 08:05:27 TacticalJoke once, there was a fella from fb here that worked on the android stuff. i believe him, their code is huge. probably because the rewrote everything that android provided but wasn't good enough Dec 17 08:06:46 oh Dec 17 08:06:51 so detect when scrolling Dec 17 08:06:56 I thought of that. lol Dec 17 08:06:57 if scrolling cancel your custom view drawing Dec 17 08:07:06 resume when scrolling stops Dec 17 08:07:37 "We also deferred performing allocation-heavy code (like feed story parsing) until scrolling stopped and moved them off the UI thread." Dec 17 08:07:41 seems they did that too Dec 17 08:07:51 async custom view, that's what i was trying to say about lazy loading the text Dec 17 08:07:52 I'm not sure it'll help, though. Dec 17 08:07:54 Hmm. Dec 17 08:08:00 the problem is scrolling lag right? Dec 17 08:08:04 Yeah. Dec 17 08:08:10 so if scrolling, just don't do the parsing/drawing Dec 17 08:08:15 wait till the scrolling starts again Dec 17 08:08:43 if it looks weird just throw some kinda greyed RRRREDit overlay Dec 17 08:09:49 Does the activity have to be the one that detects the scrolling? Dec 17 08:09:54 no Dec 17 08:09:54 I don't wanna subclass ListView, I guess. Dec 17 08:09:58 ScrollListener Dec 17 08:10:01 you can make it adapter Dec 17 08:10:05 Oh, true. Dec 17 08:10:06 but you have to pass the listview to adapter Dec 17 08:10:11 so you can setOnScrolLListener(this) Dec 17 08:10:38 Anyways upload the apk already Dec 17 08:10:46 curious to see if you are just needling a scab Dec 17 08:11:16 also very curious to see how you implemented the class if you dont mind Dec 17 08:11:58 also you could return like 5 view types, preset the heights Dec 17 08:12:10 check the text throw it in one of the buckets Dec 17 08:12:38 in fact you could break the text as part of the parsying before you throw it to the adapter Dec 17 08:12:38 Hmm. What would I pre-set the heights to? Dec 17 08:12:49 then you could assign it a bucket Dec 17 08:12:56 hell even if you needed 10 view types Dec 17 08:13:00 that would be another way to speed it Dec 17 08:13:09 solve the problem entirely since no resizing Dec 17 08:13:20 if you divide the screen like Dec 17 08:13:33 I don't understand that. Dec 17 08:13:43 I don't know what heights I'm dealing with until the last moment. Dec 17 08:14:08 Incremental keylines http://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylines-ratio-keylines Dec 17 08:14:19 they partitiont he screen into a grid Dec 17 08:14:28 what i am saying is define 10 grids Dec 17 08:14:37 based of a "unit" Dec 17 08:14:46 Dude... Dec 17 08:15:01 You're saying I should have a bunch of arbitrary heights and force the comments into that? Dec 17 08:15:03 then parse the text in the async task from downlaoding, to determine which bucket Dec 17 08:15:13 not arbitrary, i bet you could easily make it fit Dec 17 08:15:19 What sizes would I use? Dec 17 08:15:19 with ten Dec 17 08:15:27 you determine when you parse Dec 17 08:15:35 BEFORE the adapter gets it Dec 17 08:15:35 I have to measure the text? Dec 17 08:15:38 sure Dec 17 08:15:47 This will create a total mess. lol Dec 17 08:15:58 you couldeven insert delimiters into it Dec 17 08:16:00 yeah yeah Dec 17 08:16:07 well at least try the scroll listener idea Dec 17 08:16:07 I need maintainable code. Dec 17 08:16:45 yeah yeah yeah Dec 17 08:16:51 prove you are better than fb :) Dec 17 08:16:54 anyways i got to sleep Dec 17 08:17:00 talk to you later good luck! Dec 17 08:18:19 I don't think I am better than Facebook. I started Android programming several months ago. Dec 17 08:18:23 Okay, later. Dec 17 08:18:45 Yeah, this scrolling idea just confuses ListView. Dec 17 08:18:53 It inserts empty items now and then. Dec 17 08:30:34 One thing I can do is defer the View.requestLayout call until scrolling has stopped, but it looks so bad. Dec 17 08:30:46 The moment scrolling stops content suddenly appears out of nowhere. Dec 17 08:31:49 Furthermore, it's still pretty laggy, since heights are still varying if I do this. Dec 17 08:33:03 And if I miss a single onDraw then ListView gets confused and inserts blank elements. Dec 17 08:33:50 hmm any ideas on easiest way to make a divider? trying to replicate google's card view with buttons at the bottom below a divider Dec 17 08:37:25 ok. was overthinking it. just create a View with height of like 1dp, width match parent and set background color to grey Dec 17 08:39:15 aaearon: I think you can actually set the divider color in the list xml Dec 17 08:40:00 aaearon: http://developer.android.com/reference/android/widget/ListView.html#attr_android:divider Dec 17 08:40:48 Note that you must also set dividerHeight if you set divider. Dec 17 08:41:06 I think the default dividerHeight is 0. Dec 17 08:41:59 TacticalJoke: nope! it's 1px Dec 17 08:42:11 and @android:color/black Dec 17 08:42:12 i think Dec 17 08:42:25 I thought it was a drawable. Dec 17 08:42:45 nah Dec 17 08:42:52 argb color Dec 17 08:43:01 thanks for the link. i did a poor job explaining i guess. i wanted to create a divider within my card view, not my list view Dec 17 08:43:21 so a 1px View with a background should do it Dec 17 08:44:07 yep Dec 17 08:45:08 Hi all, I have a lot of drawables in my project but want to know if this is possible: every drawable (png) is black, is it possible to change the color to red without changing the drawables? Dec 17 08:47:47 yes, use a colorfilter Dec 17 08:51:14 Mavrik, thanks! Dec 17 09:07:03 Hmm. If I want to use the static-factory-method pattern in an interface, is it sensible to define a public static nested class inside the interface? Dec 17 09:07:29 Mavrik, setColorFilter fills the whole drawble to the new color, my images have red pixels and a transparant background. I just need to change the red pixels to another color Dec 17 09:07:47 FrancescoV, then use the right porterduff and mask mode. Dec 17 09:08:27 I changed apk destination in build.gradle. I know I need to run zipalign manualy, but is there something else I missed? I get Parse error after downloading apk Dec 17 09:16:05 'morning all Dec 17 09:16:15 Anyone with launcher programming experience here? Dec 17 09:16:21 (and awake?) Dec 17 09:24:50 i am awake, but have zero launcher xp Dec 17 09:25:22 but this should help - http://code.tutsplus.com/tutorials/build-a-custom-launcher-on-android--cms-21358 Dec 17 09:25:28 LoialOtter: ^^ Dec 17 09:25:53 Well, maybe someone watching can come up with an answer; I'm trying to make a stand-alone app or kiosk app. The app is actually written in Kivy using their python-for-android but it's backend is java and such. Dec 17 09:26:05 thanks, read already while trying to find how to fix the issue Dec 17 09:26:17 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.3_r1/com/android/launcher2/Launcher.java Dec 17 09:26:19 also this Dec 17 09:26:44 The issue I'm having is that the application isn't being started as soon as Android finishes booting, instead it starts when I long-press the power button; before then it's a blank black screen Dec 17 09:27:30 do you have a register on boot permission? Dec 17 09:27:43 are you getting the broadcast for boot_complete? Dec 17 09:28:10 Launcher2 doesn't seem to need it... I've tried hooking into that broadcast but that's where Kivy really throws a wrench in things as I don't know how to start it with an intent like that Dec 17 09:29:16 I do have my application selected as the default home application Dec 17 09:29:21 you need to register the receiver for that intent in the manifest Dec 17 09:29:30 in order to get the intent Dec 17 09:29:41 how does launcher2 work without it then? Dec 17 09:30:12 bad permissions and build.prop don't mix well Dec 17 09:30:56 Mavrik, how can I use mask mode? Dec 17 09:34:38 LoialOtter: it has a list of com.android.launcher permissions Dec 17 09:34:50 here is the full source - https://android.googlesource.com/platform/packages/apps/Launcher2/+/master Dec 17 09:35:31 I can't find a way to get the scroll position of a webview. Surely there must be a way? "webView.getScrollY" doesn't seem to work since it always returns 0. Is there another way? Dec 17 09:36:06 what about inner a tags? Dec 17 09:36:12 Pass it on from javascript to the WebView Dec 17 09:36:24 link Dec 17 09:37:52 Were those suggestions for me? Dec 17 09:38:25 Mine was Dec 17 09:38:49 Oh ok. I don't understand how you mean though. Dec 17 09:39:48 same here Dec 17 09:40:54 JavaScript can communicate with Android through an interface, or you can simply spam it in your javascript console and read it without an interface Dec 17 09:42:58 mannnn build time is sloow Dec 17 09:43:03 please fax! Dec 17 09:46:29 Odaym: get a better machine Dec 17 09:46:41 ha! i have the latest mac! Dec 17 09:46:44 and build specific tasks instead of all Dec 17 09:46:46 VnM: That sounds interesting. I wonder if javascript can fetch the scrollposition then, and I can fetch it somehow through the webView. *googles* Dec 17 09:46:48 ssd? Dec 17 09:46:53 yea Dec 17 09:46:58 AS? Dec 17 09:47:00 yea Dec 17 09:47:04 hmmm Dec 17 09:47:05 better build times are coming Dec 17 09:47:16 im sure Dec 17 09:47:20 look for gradle configurations to allow building only the debug version Dec 17 09:47:31 and don't run proguard when running from the IDE Dec 17 09:47:37 should make things faster Dec 17 09:47:39 only the debug version? Dec 17 09:47:54 you mean right now it builds for both but only outputs 1 apk? the debug one? Dec 17 09:47:55 what are the existing tasks? Dec 17 09:48:09 when I want a fast version I run assembleDebug Dec 17 09:48:15 or something similar Dec 17 09:48:17 2 minutes Dec 17 09:48:30 and our project is fucking huge Dec 17 09:48:38 62K methods Dec 17 09:48:39 let me see where I can put that Dec 17 09:48:41 8 libs Dec 17 09:48:46 enable incremental build, gradle daemon, and you should be sub-10 seconds for running the app Dec 17 09:48:52 that to Dec 17 09:48:57 gradle daemon should help Dec 17 09:54:13 Hi all Dec 17 09:54:19 yo Dec 17 09:54:36 What could cause a push notification to arrive at my device but not show up in the system tray? Dec 17 09:55:17 When I send a push through GCM (http) the notification appears in the system tray just fine (with sound and vibration) Dec 17 09:55:25 brahmana: code? Dec 17 09:55:32 But if I use parse.com it doesn't appear. Dec 17 09:55:55 thepoosh: What part should I put up? Dec 17 09:56:22 you are not getting incoming information or the notification is not showing? Dec 17 09:57:24 If my app is in the foreground my callback is invoked when a push arrives. But in other cases when the notification has to appear in system tray, it is not appearing and hence no way for my app to get notified. Dec 17 09:58:01 how does the information get to the device? Dec 17 09:59:00 I am sorry I don't understand the question. What information are you referring to? Dec 17 09:59:14 I changed apk destination in build.gradle. I know I need to run zipalign manualy, but is there something else I missed? I get Parse error after downloading apk Dec 17 09:59:42 brahmana: how does the information from Parse.com gets to the device? Dec 17 10:00:18 thepoosh: I believe it is through GCM. Because I do not have any parse specific code in my app. Not using their SDK. Dec 17 10:00:37 thepoosh: I say the push is coming through because I see log messages related to that in `adb logcat` Dec 17 10:00:38 so you need to figure it out Dec 17 10:00:47 ah yes now I remember where I know "assembleDebug" from, this is what shows up on my status bar every time I build "assembleDebug" Dec 17 10:00:47 push != gcm Dec 17 10:00:56 the build takes a max of 8 seconds Dec 17 10:01:10 is that fast? cause that's what I meant by slow Dec 17 10:01:11 Odaym: no proguard makes everything faster Dec 17 10:01:31 8 seconds build is long?! Dec 17 10:01:37 thepoosh: Looks like I am missing something. Aren't push notifications to Android devices sent via GCM? Dec 17 10:01:41 Odaym, yeah, 8 secs is decent Dec 17 10:01:52 usually 4 - 5 Dec 17 10:01:53 no Dec 17 10:01:55 max is 8 Dec 17 10:01:59 ok great then Dec 17 10:02:15 brahmana: NotificationManager == system notification (notification tray) Dec 17 10:02:17 brahmana, parse.com doesn't use GCM, they rolled something of their own Dec 17 10:02:17 https://parse.com/questions/gcm-support Dec 17 10:02:38 they probably use websockets or something like that Dec 17 10:02:51 a normal socket is quite enough :P Dec 17 10:03:22 That was old. They now do it through GCM. Dec 17 10:03:51 Otherwise I wouldn't be able to receive any pushes at all. Because I do not have their polling component in my app. Not using their SDK. Dec 17 10:03:54 brahmana, anyway, see the logcat message and check if there's an error Dec 17 10:04:14 that should give you at least a basic idea why your BroadcastReceiver isn't triggering Dec 17 10:04:28 (maybe they're doing something funky with package / category flags) Dec 17 10:04:34 Mavrik: What should I specifically look for? And can I make logcat write the entire payload that was received? Dec 17 10:04:51 or... is there a way to reload a webkit webpage but keep the scrolling? Dec 17 10:04:55 (I dont think so) Dec 17 10:05:48 Mavrik: I too suspect they are messing with the data format or flags. But I am unable to pin-point it. Any suggestion on making logcat put out more info would be great. Dec 17 10:09:46 Mavrik , thepoosh : here is the corresponding log : http://pastie.org/9785925 Dec 17 10:10:29 ok Dec 17 10:10:44 are there specific keys you should be looking for? Dec 17 10:10:44 brahmana, that looks like the message makes it to your app broadcast receiver Dec 17 10:10:48 and you mess something up in there Dec 17 10:14:43 Mavrik: This is what I see when I send the same through GCM directly : http://pastie.org/9785929 Dec 17 10:15:10 I see differences but I do not know what they mean Dec 17 10:15:33 brahmana: code for GCM onReceive? Dec 17 10:15:48 And about the BoradcastReciever, this is a cordova app and I am using the PushPlugin : https://github.com/phonegap-build/PushPlugin Dec 17 10:15:54 brahmana, this is your app: D/GCMIntentService( 5542): onMessage - context: android.app.Application@41f33e78 Dec 17 10:16:04 onMessage was triggered in your apps GCMintentService Dec 17 10:16:08 debug that. Dec 17 10:16:28 ok.. looking through that pushplugin code.. Dec 17 10:17:17 brahmana: make sure you give information that looks like this - https://github.com/phonegap-build/PushPlugin/blob/master/src/android/com/plugin/gcm/GCMIntentService.java#L82 Dec 17 10:18:49 thepoosh: You mean point to code like that in future when asking questions? Dec 17 10:19:10 you need your values to match what they use to make a notification Dec 17 10:19:43 oh.. ! ok.. Dec 17 10:19:50 I think this is the problem point : https://github.com/phonegap-build/PushPlugin/blob/master/src/android/com/plugin/gcm/GCMIntentService.java#L75 Dec 17 10:20:23 I think they put the "message" Dec 17 10:22:45 They probably are not... adding a log line there to see what the plugin is receiving Dec 17 10:23:03 gl Dec 17 10:24:54 all of the sudden Windows can't recognize my nexus 7 and the adb in AS will see it but keeps saying its offline Dec 17 10:25:01 is it the stupid microusb cable? Dec 17 10:26:42 VnM: http://pastebin.com/MkVCH585 < Strangely, this gives back the scrollvalue of the webpage prior to pressing the backbutton and going back one page, instead of the scroll value for the page one step back... Dec 17 10:27:07 perhaps it is fired too quickly before android has gone back one page... Dec 17 10:27:53 MartialLaw: if it's listed in adb at all i doubt it's the cable. You could try 'adb start-server' in a administrator cmd prompt and see if that fixes it... that's what i needed for my devices here Dec 17 10:28:07 but i'm a newb so YMMV Dec 17 10:28:24 jesperj, maybe it's because you're adding the javascript interface again, should only have to do that once during the initialization, so try moving that line elsewhere for starters Dec 17 10:28:42 but windows doesn't recognize it... i meant sometimes windows does for a short period of time and then i can see it otherwise nothing Dec 17 10:28:46 ill try tho Dec 17 10:29:48 windows not recognizing it does point more toward cable, ya... just if it's listed in adb it's got something for drivers Dec 17 10:30:03 VnM: Will do it and see thanks :) Dec 17 10:30:06 faaauck im at work Dec 17 10:34:29 VnM: Nope. Still same effect. Oh well. Dec 17 10:35:49 jesperj, you could try it all on JavaScript side and save the value to localStorage and use it again when you come back Dec 17 10:39:06 VnM: Yeah... that's an option. Thanks. Dec 17 10:39:40 Can somebody help me with this, error with Android Studio: http://pastebin.com/D8dwNwrL It's from an existing android studio project (colleague) Dec 17 10:39:57 Or you could just never navigate away from that page and load the next things in another WebView but that's a bit.. too much I think Dec 17 10:42:28 VnM: Well at least I have some options to consider :) Dec 17 10:43:23 You'll manage if you're controlling both ends Dec 17 10:45:31 Mavrik , thepoosh : It is because of the missing "message" key : http://pastie.org/9785972 Dec 17 10:46:59 Now is it wrong for Parse.com to not send "message" key or is it wrong for the plugin to expect that? Dec 17 10:59:38 my viewholder has a mapview that is shown after a button is clicked. it is also zoomed into specific coordinates. after the view is recycled, pressing the button no longer zooms to the coordinates. am i missing something? http://pastebin.com/buVpNrwQ Dec 17 11:08:15 hey, i can't seem to google what i'm looking for, so here goes: I've implemented a IntentService, to create Notification's. When I create a Notification, and add en Intent with some extras, it works nicely. Dec 17 11:08:22 But when a new Intent arrives, i can't seem to find a way of getting a hold of the old and the intent data from the existing Notification - to update it. I might just not understand the documentation very well, but can someone point me in the right direction? Dec 17 11:25:35 does multidex works on android 2.x ? Dec 17 11:25:40 s/works/work Dec 17 11:37:15 hi guys Dec 17 11:37:46 I get this error “Android Studio was unable to find a valid JVM.” when i try to launch Android Studio on my mac Dec 17 11:39:29 I googled for your error message and there seem to be serveral suggested solutions. Dec 17 11:39:32 you tried all of them? Dec 17 11:39:52 topriddy: did you set the path to the JVM? Dec 17 11:39:55 JRE Dec 17 11:40:08 i tried some Dec 17 11:40:19 I am working on a custom rom for an embedded system, which implements a new system service. Are there any good resources on how to build an sdk addon package for app-developers to use this new system service? Dec 17 11:40:19 doing java -version in terminal gives me 1.8.0_11 Dec 17 11:40:45 thepoosh: like setting environment and stuff? my other IDEs work just fine Dec 17 11:41:10 they auto set a lot of those things Dec 17 11:41:40 thepoosh: so what should i do? edit ~/.bash_profile? Dec 17 11:41:55 wat?! Dec 17 11:41:56 no Dec 17 11:42:00 initial install? did AS used-to work and now it doesn't? Dec 17 11:42:13 http://askubuntu.com/questions/467870/how-to-set-the-jdk-for-android-studio Dec 17 11:42:50 http://stackoverflow.com/a/16824891/1056359 Dec 17 11:45:51 thepoosh: i dont know if you are following me at all. first link is an ubuntu link, second one assumes the app is launched and i am changing java settings Dec 17 11:46:07 thepoosh: in my case, app is not even launched at all Dec 17 11:50:59 What's the state of action bar customization? Can I put my own elements into it? Dec 17 11:51:10 or is that only a thing for action bar sherlock Dec 17 11:53:39 Hey folks Dec 17 11:54:16 Ankhwatcher: ! Dec 17 11:54:56 How do I detect a user typing into a textfield that is full? I've logged every state of TextWatcher but none of them seem to get called (presumably because it's not changing the text) Dec 17 11:55:16 thepoosh: how's Wednesday treating you? Dec 17 11:55:26 not that good Dec 17 11:55:47 hmmmm Dec 17 11:55:49 thepoosh: what gives? Dec 17 11:55:58 tired, kids are not sleeping well Dec 17 11:56:34 thepoosh: bummer. sick? Dec 17 11:56:37 unbelivable, I just found an answer by Mike Murphy that has negative upvotes Dec 17 11:56:41 teething Dec 17 11:56:42 http://stackoverflow.com/a/2836754/1056359 Dec 17 11:56:57 yikes Dec 17 11:57:06 yeah, it's a bitch Dec 17 11:57:45 My app plays multiple audio streams at the same time - up to 10 in the most extreme case. I'm getting reports from users experiencing issues streaming the audio over bluetooth. Sometimes the entire app won't work, sometimes the wrong sounds play, etc. The problems are completely limited to bluetooth, other audio output works great. How can I diagnose what's going on? Dec 17 11:58:21 I don't use soundpool, I use multiple mediaPlayers because my sounds are > 2 minutes long Dec 17 11:59:27 up to 10 streams > min eah?! Dec 17 11:59:31 WTF?! Dec 17 11:59:44 well, that's the purpose of the app Dec 17 11:59:59 cacophony? Dec 17 12:00:00 to mix together different types of ambient sounds Dec 17 12:00:16 thepoosh: well the general principal of SO is answer the question no matter how daft it is. Dec 17 12:00:28 whatever Dec 17 12:00:29 as I said, that's the most extreme case. Typical use is somewhere between 2-4 sounds at once Dec 17 12:00:42 I'm just baffled that it happened to him Dec 17 12:00:51 the guy writes android books Dec 17 12:01:28 thepoosh: he's generally right but his answers can be a bit wordy Dec 17 12:01:36 yeah Dec 17 12:01:52 I know, read dozens of them Dec 17 12:01:59 me too Dec 17 12:02:09 I usually act on the answer underneath them Dec 17 12:02:18 LOL Dec 17 12:03:33 platzhirsch: http://www.101apps.co.za/index.php/articles/using-toolbars-in-your-apps.html Dec 17 12:04:09 thepoosh: t Dec 17 12:04:10 ta Dec 17 12:16:02 mehn, still doesnt work Dec 17 12:19:39 Hello friends... please help. I'm working on Android Sync Adapter, is it possible to use volley to download data from the user? Dec 17 12:19:48 or what's the best option Dec 17 12:20:45 how to use volley for android sync adapter??? is this the best option? Dec 17 12:38:04 Is there any lib to replace asynctasks? Dec 17 12:38:30 I use them for loading bitmaps, resizing and showing Dec 17 12:39:58 something lightweight Dec 17 12:41:11 picasso? Dec 17 12:41:45 Anyone familiar enough with proguard who can tell me whether I can do the opposite it is doing now, rather than obfuscate all classes, cherrypick the classes I want to obfuscate and leave the rest? Dec 17 12:42:23 thepoosh: he can be obnoxious Dec 17 12:42:24 so can i Dec 17 12:42:26 VnM: http://stackoverflow.com/questions/17880565/with-proguard-how-do-i-obfuscate-just-one-class Dec 17 12:42:37 VnM: google is your friend! Dec 17 12:43:02 and parts of his answer are wrong and yet he did not update it Dec 17 12:44:34 Ahah thanks kozko2001, not 100% with it today was reading through the proguard docs and wasn't finding what I was looking for I forgot to check the obvious place Dec 17 12:45:59 xgearx: have you tested picasso? there are a lot of libraries fthat work with images (featch and transform) Dec 17 12:46:06 but I really like the picasso from square Dec 17 12:48:23 kozko2001: i know about it, maybe my question is incorect. I need lib for longterm async operations with ability to post result in main thread but without async task pitfalls. So i can use handlerthreads and handler but i want something with high level api like async task Dec 17 12:48:54 it is not critical, but maybe some one know good lib for it Dec 17 12:49:55 xgearx: there is the rxjava which I use but might be a too radical change Dec 17 12:50:21 xgearx: also you can that a look at groundy Dec 17 12:50:23 mikedg_: are you mike murphy? Dec 17 12:50:28 kozko2001: do you use rxjava android extension? Dec 17 12:50:37 you're both Mikes Dec 17 12:50:43 https://github.com/telly/groundy Dec 17 12:50:45 it's mark murphy Dec 17 12:50:47 i am not hmm Dec 17 12:50:50 no really the android extensions Dec 17 12:50:58 mmmmkay Dec 17 12:50:59 but yes, I'm starting using rxjava Dec 17 12:51:02 i am mikedg Dec 17 12:51:09 yes you are Dec 17 12:54:23 hi Dec 17 12:54:38 hi Dec 17 12:55:03 :) Dec 17 12:58:43 I changed apk destination in build.gradle. I know I need to run zipalign manualy, but is there something else I missed? I get Parse error after downloading apk Dec 17 12:59:36 anyway to find the playstore link from the application package name Dec 17 13:03:47 Haxxa: http://developer.android.com/distribute/tools/promote/linking.html Dec 17 13:04:06 first result for: "play store search package name" Dec 17 13:04:17 yer I can't download this https://play.google.com/store/apps/details?id=com.netflix.ninja Dec 17 13:04:30 its android tv version of netflix Dec 17 13:04:38 no downloader will let me install it Dec 17 13:04:51 nor will play store allow install on nexus player due to locale Dec 17 13:08:08 Haxxa: you're working on the netflix app? Dec 17 13:08:23 yes Dec 17 13:09:01 just some basic changes - more relevant here than android root or android channels Dec 17 13:09:11 uh... not if you don't have the source it isn't Dec 17 13:10:12 It seems its near impossible to obtain apk anyway I will end this disscussion if you want me to Leeds? Dec 17 13:10:27 it's off-topic, and you know that Dec 17 13:13:35 Haxxa: maybe if you have a genymotion tv device Dec 17 13:13:59 maybe Dec 17 13:16:01 Leeds btw did not mean that in any condescending or passive aggressive way I understood it was offtopic and was happy end disscussion - its hard to describe context and tone sometimes via pure text - sorry Dec 17 13:16:30 fair enough... I did mean it in a somewhat condescending way :) Dec 17 13:16:41 how to use volley for android sync adapter??? is this the best option? Dec 17 13:17:27 hackable: what are you trying to request in the syncAdapter Dec 17 13:17:28 ? Dec 17 13:17:34 volley is bad for large requests Dec 17 13:17:51 thepoosh: requesting json Dec 17 13:19:41 large one? Dec 17 13:19:52 volley is fine for requests in general Dec 17 13:20:13 thepoosh: not very large but is going to be update 5mb Dec 17 13:20:32 so, what do you suggest i should do... Dec 17 13:21:20 what do you mean when you say 5mb? Dec 17 13:21:58 i mean the data to download by the user... upto 5mb Dec 17 13:22:02 also, for every request make to the api, i need to pass an Authorization header and other parameters... please how can i achieve this Dec 17 13:22:03 the reason Volley is bad for large requests is that the request queue has only 4 execution threads, so if you're taking up threads for downloading a lot of info you stop all other requests Dec 17 13:22:21 you should probably use HttpUrlConnection Dec 17 13:22:27 also, for every request make to the api, i need to pass an Authorization header and other parameters... please how can i achieve this Dec 17 13:22:27 and block only one thread Dec 17 13:22:47 if you use Volley, there is the Request.getHeaders Dec 17 13:22:56 what about passing request header metadata Dec 17 13:23:07 metadata? Dec 17 13:23:14 headers are key/value pairs Dec 17 13:23:33 libWTF is webkit right Dec 17 13:23:41 i know and thats the reason why i want to use but since it can't handle large file.. Dec 17 13:23:58 Yes... you are right, key/value pairs Dec 17 13:24:06 1. you can make a request queue only for the syncAdapter Dec 17 13:24:07 so i need to pass it for every request Dec 17 13:24:13 2. you should probably use something else Dec 17 13:24:38 like gjson, jackson or ? what do you think Dec 17 13:24:59 depends if you're parsing or creating json Dec 17 13:24:59 but i really need the one i would be able to pass headers information Dec 17 13:25:09 yes, both Dec 17 13:25:14 hmmm Dec 17 13:25:28 Seriously, i'm stock and i need help Dec 17 13:25:29 Hi, how can I change layout params of a gridview's listitem? I did something like this (line 16-19): https://dpaste.de/1TZT Dec 17 13:25:45 hackable: http://rick-hightower.blogspot.co.il/2014/04/new-json-serialization-benchmark.html Dec 17 13:25:50 *gridview's griditem, i guess :P Dec 17 13:27:43 Thanks thepoosh but what i found there are the analysis Dec 17 13:32:40 wow, just saw my best image for the day Dec 17 13:32:41 http://www.haaretz.co.il/polopoly_fs/1.2513966.1418809871!/image/3770183949.jpg_gen/derivatives/size_1846xAuto/3770183949.jpg Dec 17 13:32:48 I figured out why the OpenGLES example from https://developer.android.com/shareables/training/OpenGLES.zip doesn't work on my real device (while it works in the emulator and some users claimed it works on their real devices). All I could see was a black screen. To put it short, it turns out that the square and the rotating triangle in the code are located exactly on the camera's cutting plane de Dec 17 13:32:48 termining what should be visible/drawn. If we slightly displace the camera's position or its near cutting plane to make sure that the plane is between the objects and the camera, everything starts working fine on my real device. Dec 17 13:40:59 thepoosh, i'm thinking maybe it'll be a better solution to pass the data through the request url Dec 17 13:41:50 is that beef tenderloin? Dec 17 13:42:24 uhmm... Dec 17 13:44:34 hackable, have you looked at Retrofit? Dec 17 13:46:19 capella-s3: dunno, it's from an article about a documentry about steak Dec 17 13:46:32 there was also this: http://www.haaretz.co.il/polopoly_fs/1.2513965.1418809844!/image/3770183949.jpg_gen/derivatives/size544xAuto/3770183949.jpg Dec 17 13:46:59 I have an EditText that has a popup dialog when it is clicked. When I return from the dialog I don't want the focus to be in that EditText. I tried android:focusable="false", which works, but I want the dialog to still pop up when selecting next on the keyboard. How can I do this? Dec 17 13:47:22 yah ... meat GOOD :) Dec 17 13:47:36 AGREED! Dec 17 13:48:42 Kevel1: no... what all aout? Dec 17 13:49:55 hackable, probably something you want to look at Dec 17 13:50:04 ez web requests for REST interfacing Dec 17 13:50:14 attach headers easily for requests Dec 17 13:50:15 etc Dec 17 13:50:39 Kevel1: what i want to achieve is to make a json request and also pass header information Dec 17 13:50:48 it can do that. Dec 17 13:51:18 Seriously? Dec 17 13:51:35 http://square.github.io/retrofit/ Dec 17 13:51:54 ok, i'm checking... Dec 17 13:52:35 capella-s3: images taken from PR for this movie: http://www.imdb.com/title/tt2827708/ Dec 17 13:53:45 :D Dec 17 13:54:41 yeah, glad I found that Dec 17 13:54:45 i might see it now Dec 17 13:56:05 hey all how can I edit action bar to have an image instead of text Dec 17 13:58:14 xyz87: http://www.101apps.co.za/index.php/articles/using-toolbars-in-your-apps.html Dec 17 13:58:41 Kevel1: I really appreciate.. i can see a green light Dec 17 13:59:12 using anotation but where is the starting point? Dec 17 13:59:31 or just declare like that with anotation? Dec 17 14:00:14 anyone have experience with recycling a mapview? getting odd behavior after its recycled: http://stackoverflow.com/questions/27524404/movecamera-triggered-by-button-onclicklistener-not-moving-camera-after-view-that Dec 17 14:00:52 maybe??? Dec 17 14:14:27 I just want to display image instead of text i dont want icons is there is simpler way Dec 17 14:21:34 what library/api would i use for managing apps? for example, uninstalling an app, listing all the apps.. etc Dec 17 14:21:34 ? Dec 17 14:23:05 packagemanager? Dec 17 14:23:47 what do you mean?.. Dec 17 14:23:52 let Android manage your apps Dec 17 14:25:04 bynarie: http://developer.android.com/reference/android/content/pm/PackageInstaller.html Dec 17 14:25:31 Is that what you are looking for? Dec 17 14:26:10 pretty cool Dec 17 14:26:48 possibly thanks... i dont really know what im looking for.. im looking for the api that deals with apps... list apps.. remove apps.. etc Dec 17 14:26:52 i think this is it though Dec 17 14:26:55 thanks! Dec 17 14:27:09 seems useless though! Dec 17 14:27:10 :P Dec 17 14:27:26 unless you're writing another Android I'd guess...? Dec 17 14:31:09 http://www.materialup.com/ Dec 17 14:31:32 How can I make a TextView read only? Dec 17 14:32:28 a TextView is read only Dec 17 14:32:34 true Dec 17 14:32:35 yea Dec 17 14:32:36 put some tape on screen Dec 17 14:32:39 unless you are talking programtically immutable? Dec 17 14:32:40 :D Dec 17 14:32:40 a textview is basically a label Dec 17 14:32:43 then ppl can't type with the on-screen keyboard Dec 17 14:33:47 BBC News public beta now open Dec 17 14:33:49 https://plus.google.com/+SimonLightfoot/posts/iF6HWNDzz4U Dec 17 14:34:01 is tape gonna block heat sensitivity? Dec 17 14:34:17 Napalm: is it open source? Dec 17 14:34:32 altcp: better use some thick insulation tape then. Dec 17 14:34:41 is the *.apk file format identical to *.zip? Dec 17 14:34:49 VladolfPutler: yes Dec 17 14:35:02 hokkaido, so you can craft an *.apk package using standard zip tools? Dec 17 14:35:30 wtf would u wanna do that for? Dec 17 14:35:36 yes, but theres some additional shit to do like aligning and signing Dec 17 14:35:50 apk is an archive file but its not a zip file Dec 17 14:36:03 bynarie, I can extract it with zip Dec 17 14:36:10 i know that! Dec 17 14:36:19 apk is a ZIP file :) Dec 17 14:36:20 it is an archive file Dec 17 14:36:27 Sorry I meant TextView. How can I make a TextView read only? Dec 17 14:36:29 bynarie, I used to program for Android two years ago, but now I forgot which tools I used back then Dec 17 14:36:30 it's a zip format file, but the contents have to be stored in a specific way Dec 17 14:36:32 so its "like" a zip file Dec 17 14:36:32 VladolfPutler, yes you could (remember to zipalign it) Dec 17 14:36:56 VladolfPutler: would there be a good reason for you not to use the standard SDK? Dec 17 14:36:58 saying an apk file is a zip file is like saying a tar.gz file is a zip file Dec 17 14:36:58 barq, uh, textview is always readonly O.o Dec 17 14:36:59 zipalign just puts the data in zip to 4 byte boundaries. Dec 17 14:37:09 bynarie, what the heck are you talking about Dec 17 14:37:10 but it doesn't make it less of a zip. Dec 17 14:37:15 bynarie, every APK is a valid ZIP format file Dec 17 14:37:21 bynarie: er, no... zip is a specific format, it's doesn't just mean "archive file" Dec 17 14:37:31 Leeds, I just like to examine details Dec 17 14:37:40 figure out how the apk format exactly works Dec 17 14:37:54 it's a valid archive and can be opened by winrar Dec 17 14:37:54 I still have the sdk installed I see now Dec 17 14:38:02 my point is ppl dont pack data in apk files for distribution... apk is used for android apps Dec 17 14:38:16 bynarie: what the fsck are wibbling about? Dec 17 14:38:22 nuthin Dec 17 14:38:44 VladolfPutler, android studio is very easy to use Dec 17 14:38:57 or intellij, which is the exact same thing almost Dec 17 14:39:23 bynarie, I just used the command line tools back then Dec 17 14:39:27 oh ok Dec 17 14:39:28 I'm a linux command line user Dec 17 14:39:38 me too!! =] Dec 17 14:39:47 you can use any zip tool to open up an apk file... but you should use the SDK tools if you want to (re)build one Dec 17 14:39:55 cept im not hard core just know my way around Dec 17 14:40:17 but I'm definitely going to use the proper tools eventually if I'm going to get serious with Android, but right now, my question was more curiosity ;) Dec 17 14:40:38 Mavrik: I need the View to get focus though, so I need to use an EditText. Dec 17 14:40:54 yea you can definitely browse an apk file with zip prog, but i dunno about re packing it Dec 17 14:41:25 i suppose its possible if everything is correctly in its place and whatnot Dec 17 14:41:52 barq, either use a TextView and make it selectable Dec 17 14:41:58 barq, or use an EditText and disable it Dec 17 14:42:28 bynarie, I still don't get which part of "APK is a ZIP file with a different extension" isn't clear :) Dec 17 14:42:32 I'm going to see what zipalign precisely does, and figure out if and why it is necessary for a proper *.apk file Dec 17 14:42:42 any zip capable archiver will make a valid APK :P Dec 17 14:42:48 k Dec 17 14:43:02 VladolfPutler, it's not necessary, it's just a performance thing Dec 17 14:43:05 zipalign puts stuff into 4 byte alignent Dec 17 14:43:09 its not neccessary Dec 17 14:43:16 VladolfPutler, google started enforcing it on play store somewhere around Android 2.3 Dec 17 14:43:35 VladolfPutler, see this description: http://developer.android.com/tools/help/zipalign.html Dec 17 14:43:41 VladolfPutler, yea, if you going to publish to store, it must be zipaligned Dec 17 14:44:34 Mavrik: If I disable the EditText it is no longer clickable. Dec 17 14:45:09 im still tryin to understand odex and de-odex... i get that odex=speed, de-odex=custimization Dec 17 14:45:14 but i dont know what it actually does Dec 17 14:45:45 barq: why do you need a read-only view to be focusable? Dec 17 14:46:47 Leeds: I have a Dialog that pops up, that is how the selection is made. I want to disable manually editing the View though. Dec 17 14:47:18 that's thy the selectable property on textview is for Dec 17 14:47:24 I have a String c = "#33A785" , I use Color.parseColor(c); I got the color on my screen, If i take a screenshot and send it to my pc, I got another hex value with a colorpicker, how is that possible? Dec 17 14:48:32 what's the other hex value? Dec 17 14:48:38 FrancescoV, screenshot is JPEG :) Dec 17 15:02:04 Mavrik, thanks Dec 17 15:07:32 Mornin'! Dec 17 15:11:46 hello Dec 17 15:12:03 anybody can help me ? Dec 17 15:12:05 http://stackoverflow.com/questions/27528653/listview-add-message-from-bottom-to-top Dec 17 15:18:10 fernandopaiva, stop using ArrayAdapter Dec 17 15:18:20 extend BaseAdapter, use your own ArrayList inside which you can control Dec 17 15:18:26 getting the order right then will be trivial. Dec 17 15:30:54 ArrayAdapters can be sorted, though. Dec 17 15:33:29 can i use an AutoCompleteTextView more like a spinner, suing an adapter that has an N/V pair structure in it? Dec 17 15:34:16 I need to allow a user to type in it AND be able to choose from a list, but the list is actually an arrayadapter of Pairs Dec 17 15:35:16 normally the actv has no index to the selected item Dec 17 15:35:38 so no getSelectedItem() Dec 17 15:43:28 having commons-io in jar is normal ? Dec 17 15:43:40 or some dependency is adding this ? Dec 17 15:48:21 Mavrik, I extended the BaseAdapter Dec 17 15:48:31 see http://pastebin.com/3jG6iSEG Dec 17 15:48:55 use viewholder pattern Dec 17 15:50:44 mikedg_: no Dec 17 15:58:57 hi. I am using this code on the following link to check if a file is truly a database file. http://www.coderanch.com/t/553604/Android/Mobile/Check-SQLite-DB-present however, my app crashes if it does not pass the check. and if it passes the check it works just fine. so what should I do? Dec 17 16:02:41 superlinux-hp: some kind of traceback from the exception on logcat? Dec 17 16:02:51 ok Dec 17 16:02:55 just a sec Dec 17 16:05:41 kozko2001, http://pastebin.com/LE29378S Dec 17 16:06:07 this is only the error messages.. not everything. Dec 17 16:08:59 E/DefaultDatabaseErrorHandler( 2753): deleting the database file: /mnt/sdcard/arial.ttf Dec 17 16:09:00 Dec 17 16:09:12 sounds like you are pointing to a bad file? Dec 17 16:11:33 but the app crashes because is calling recursively the openDatabase method Dec 17 16:23:01 kozko2001, all I am trying to do is disallow opening/using a file which is not really an SQLite file. Dec 17 16:23:34 so I hope you have a solution to that. Dec 17 16:27:46 hi Dec 17 16:27:50 Hey-o! Dec 17 16:28:08 i have this http://pastebin.com/PjpPP43h Dec 17 16:28:23 but my file is not saved on my Enviroment, how i can solve this? Dec 17 16:34:02 Napalm: then why are you spamming devs? Dec 17 16:34:04 When using the Google Services Location API - is there a new way to detect if the user has turned off their GPS and might need to be reminded to turn it on again? Dec 17 16:37:29 does anyone know of a opensource file manager? I am only looking for basic functions, set base folder, share, delete Dec 17 16:37:37 module ^^ Dec 17 16:40:38 ok, so.. I'm downloading an image using DownloadManager and a broadcast receiver to called when ACTION_DOWNLOAD_COMPLETE. When I query the status, I get a value of 7, which is none of the class constants for statuses Dec 17 16:40:53 does anyone have any idea what that means? Dec 17 16:42:48 Viperz28, I have my own Activity.. but it's only for browsing file paths Dec 17 16:43:03 you can if you want edit it to your needs. Dec 17 16:43:11 is it on github? Dec 17 16:43:16 nope Dec 17 16:43:23 just gimme your email Dec 17 16:43:39 mikecarr007@gmailDOTcom Dec 17 16:46:13 Viperz28, I can give you a preview.. see it on this app : https://play.google.com/store/apps/details?id=net.superlinux.htmleditor Dec 17 16:46:45 ok, checking Dec 17 16:48:06 Viperz28, what you have to edit actually is at after line 81 of the activity.. and the file path that you'll select will be set in the String variable "file_name_to_open" Dec 17 16:48:19 I have sent you the Activity Dec 17 16:48:27 superlinux-hp: that will give me a good start, I wrote one as well but need dir traversal Dec 17 16:48:31 thanks Dec 17 16:48:47 welcome Dec 17 16:48:57 is there a way to 'pre-serialize' a large object i need to store in my app's resources? I don't need a database, I just need to load up an arrayadpter on startup with an array that has 10,000 items in it Dec 17 16:49:24 thinking if I could load it, then serialize it out and then stick in my resources to load at runtime Dec 17 16:50:17 Viperz28, you may if you want add a long click listener to open a menu that will manage the selected file (Edit/Delete..etc) Dec 17 16:50:29 regreddit, maybe use protobufs? Dec 17 16:50:37 aggh ok Dec 17 16:50:42 regreddit, or even flatbuffers, it's very very fast and compressed serialization format Dec 17 16:50:45 or is SQLite THE proper way to load an adapter Dec 17 16:50:48 store is as a raw byte file Dec 17 16:51:04 regreddit, it also depends if you are able to load all the data into memory or not Dec 17 16:51:54 Mavrik, it's about 300k as plain text Dec 17 16:51:59 with lots of CRs Dec 17 16:52:33 A single item in the file looks like: Dec 17 16:52:34 {state: 'WY', st_code: '56', co_code: '025', county: 'Natrona'}, Dec 17 16:52:40 I am working again on rewriting a project about Merging a number of Sqlite files in a single file. I wrote it first using Tcl/Tk, now I am porting it to android. Dec 17 16:52:50 its the entire FIPS database of US sates and counties Dec 17 16:53:27 and on the server it's json, but the FIPS databases changes so infrequently it makes sense for me to just store it in the app Dec 17 16:54:26 regreddit, first of all, I would seriously reconsider showing 10.000 items in a single listview Dec 17 16:54:33 that sounds like UI from hell Dec 17 16:54:37 it will be filtered Dec 17 16:54:44 then use a database with cursor Dec 17 16:54:58 or you'll kill the device by running out of memory Dec 17 16:54:59 so, the list view is actually a set of lists, one filters another Dec 17 16:55:14 ok it Dec 17 16:55:23 it's not normal to have apache commons in jar Dec 17 16:56:58 yeah i think a DB is best since there is a relational component here Dec 17 16:56:59 thanks Dec 17 16:58:01 regreddit, so probably bundling a sqlite db file as a raw resource would be reasonable Dec 17 16:58:28 yeah, they are pretty tiny, and sqlite is already included, so no overhead there Dec 17 17:01:32 just looked back at the FIPS file and it has 190k rows Dec 17 17:01:41 way bigger than I thought Dec 17 17:01:59 10 MB, so sqlite is the proper way Dec 17 17:02:09 I am having a wierd problem. Some of my imports are not working anymore. Even though I have cleaned all changes using it. It happened after I un-did a create activity action. My whole code is full of errors. I am using anroid studio Dec 17 17:02:29 invalidating caches, cleaning project, nothing works Dec 17 17:02:56 post some of the errors Dec 17 17:02:56 vedu Dec 17 17:03:21 try going to your project settings and importing via there vs editing the gradle file Dec 17 17:03:32 that has been a HUGE PITA the past few releases Dec 17 17:03:55 also make sure you are on the latest android studio Dec 17 17:04:20 in the canary releases, not stable Dec 17 17:05:23 another wierd thing. My code is compiled and ready to be deployed but it is full of errors in editor Dec 17 17:06:12 that means android studio is not resolving some of your imports Dec 17 17:07:05 mattblang, regreddit: http://snag.gy/tGuGt.jpg Dec 17 17:08:16 regreddit: i should update to canary? Dec 17 17:09:04 how to list dependency list in gradle ? Dec 17 17:10:36 vedu go through the File->Project Structure dialog and delete, then re-add your dependencies Dec 17 17:10:53 to the supprot lib and gms lib, then rebuild all Dec 17 17:11:25 regreddit: right Dec 17 17:11:35 hmm Dec 17 17:11:45 no idea where that apache commons came from Dec 17 17:12:12 How might I make a relative layout in a list item view act like a button (where it disables whole item clickable, has a state background)? Dec 17 17:12:18 is there something other than clickable="true"? Dec 17 17:12:19 regreddit: right now it is just updating gradle http://snag.gy/CLiPf.jpg -_- Dec 17 17:12:56 mine did all that again just yesterday Dec 17 17:13:57 i did a git clean -fdx in the app root dir :-P Dec 17 17:14:11 phew. all's good now Dec 17 17:15:39 vedu show me your gradle file Dec 17 17:16:37 my problem is solved. mattblang you want the build.gradle ? Dec 17 17:16:40 focusable="true" will disable onItemClicked for the view... Dec 17 17:17:07 vedu oh good, what solved it Dec 17 17:17:21 i did a git clean -fdx in the app root dir :-P Dec 17 17:17:35 hence the updating gradle Dec 17 17:17:50 vedu are you comitting your libs to repo? Dec 17 17:18:10 mattblang: nope. I have a lean gitignore Dec 17 17:18:38 vedu I wonder what was happening. haven't run into this personally. glad you got it fixed Dec 17 17:19:20 But i still like studio ;-) Dec 17 17:20:42 if I have a regular view (not a button) and it's clickable, should a state-list background work properly or is there something else I need to do? Dec 17 17:21:37 nm, I was being dumb Dec 17 17:21:41 gotta be more observant Dec 17 17:23:48 a Handler sends and receives message. it also sends runnable, but does it also receive runnable or is a runnable executed on its own ? Dec 17 17:24:45 shmoon a handler is bound to a synchronized message queue Dec 17 17:25:33 true Dec 17 17:25:47 you post a runnable to it via a handler, and when the looper iterating the queue gets to your message, it'll execute the runnable you passed Dec 17 17:26:01 alright cool thanks Dec 17 17:26:08 so its a little different from messages Dec 17 17:33:21 Hi, I'm a developer looking into Android. Is Android Studio the consensus IDE to use looking forward? Dec 17 17:35:34 shmoon? Dec 17 17:35:41 lemmin2: yeah Dec 17 17:36:05 lemmin2: make sure you also get genymotion for emulator Dec 17 17:36:28 I was just about to ask about the emulators, thank you. Dec 17 17:36:57 lasserix: I mean in the case of a Message, Handler posts to the message queue and then Looper sends the message to the Handler itself in handleMessage Dec 17 17:37:00 I've been struggling to find a smooth experience with the AVD Manager Dec 17 17:37:12 shmoon oh yeah Dec 17 17:37:16 but in case of Runnable, handler just posts to the message queue. I guess it doesn't get back but the Runnable is straight away executed by the Looper Dec 17 17:38:15 yeah i believe so, no reason to post it back to the handler since the handler doesn't care Dec 17 17:38:32 handlerthread a good way to do animated effects on custom views Dec 17 17:39:17 gonna look into handlerthread in a bit Dec 17 17:40:11 Is there a standard for rapid prototyping in Android development? Something like Cordova seems like it would have application in that respect. Dec 17 17:42:47 lasserix, Do you recommend Genymotion with or without VirtualBox? I'm assuming that is for compatibility issues? Dec 17 17:43:04 O.o Dec 17 17:43:10 Genymotion always uses virtualbox Dec 17 17:43:37 it's just asking you if you want a bundle of both or not Dec 17 17:43:37 lasserix, yo. I got opengles example code working. If you remember I had a black screen Dec 17 17:43:54 Thank you. It must allow you to download a standalone version if you already have VirtualBox installed. Dec 17 17:44:18 slidercrank: yeah what was it? Dec 17 17:44:44 lemmin2: dunno about prototyping depends on level of functionality--guess theree are lots of options Dec 17 17:44:47 lasserix, I think it's a bug in the code Dec 17 17:44:57 the android api code? Dec 17 17:45:05 yes Dec 17 17:45:08 lasserix, it turns out that the square and the rotating triangle in the code are located exactly on the camera's cutting plane determining what should be visible/drawn. If we slightly displace the camera's position or its near cutting plane to make sure that the plane is between the objects and the camera, everything starts working fine on my real device. Dec 17 17:45:48 umm that sounds like you just have to set up your view frustrum correctly? Dec 17 17:46:15 camera position or frustum Dec 17 17:46:28 either Dec 17 17:46:33 but in the code it it such that some devices do not display objects Dec 17 17:46:46 it looks like it's realisation dependent Dec 17 17:46:55 by moving the camera you move the near cutting plane of the frustrum by changing the near cutting plane you change what is visible to the camera Dec 17 17:47:04 yes Dec 17 17:47:09 yeah that's really weird Dec 17 17:47:20 not sure why the MVP matrix should be like that inconsistently Dec 17 17:47:23 lasserix: I've another question why does line 14 always seems to get executed before line 5 https://gist.github.com/anonymous/845db54ad04aae1bf84b ? Dec 17 17:47:29 is there some rule or message queue in play there? Dec 17 17:48:20 shmoon you just created a thread and started it, that takes time --its not a cheap operation, it happens on a different thread but the current method keeps executing on the current thread (the current cpu context) so its executally immediatly next while the thread has to start and execute Dec 17 17:48:28 and that has nothing to do with message queues Dec 17 17:48:43 threads don't naturally have message queues--thats only when you use handlers/loopers Dec 17 17:48:56 hmm alright, so is this order of execution sorta guaranteed? Dec 17 17:49:04 no Dec 17 17:49:05 (I understand what you said) Dec 17 17:49:09 yah cool Dec 17 17:49:14 so its not I guess Dec 17 17:49:31 but new thread thread.start is not a cheap operation, and the cpu has to switch context to that thread after the fact so most likely Dec 17 17:49:46 but say you had a fast hardware with high bus speeds and multiple cores Dec 17 17:49:54 true Dec 17 17:49:58 5 could happen almost as fast as 14 Dec 17 17:50:18 shmoon, there is absolutely no guarantee the order will stay the same as you see Dec 17 17:50:19 or say you were using a threadpool instead of new thread, then it wouldn't have to initialize it.. Dec 17 17:50:32 shmoon, do not _ever_ _ever_ rely on that :) Dec 17 17:50:35 unless you use a looper, since its message queue is synchronized Dec 17 17:50:53 <_Auron_> the part that makes threads so difficult is that they're very indeterminate on when anything is executed Dec 17 17:51:04 btw what does synchronized mean in this case? Dec 17 17:51:19 it blocks acquiring more from the queue while working on the recent message/runnable? Dec 17 17:51:28 <_Auron_> and you have to be extremely careful and know -exactly- what you're doing. additional threads should only be used when absolutely necessary Dec 17 17:51:41 Mavrik: yeah got it Dec 17 17:51:55 but yeah, it's probably due to thread startup overhead :) Dec 17 17:52:16 shmoon a synchornize queue just guarentees causality.. ie if you do offer / poll in that order poll will block until offer is finished Dec 17 17:52:25 in other words it means you can rely on order of your calls Dec 17 17:52:50 you'll know that if you do X then Y since its a queue X will occur before Y Dec 17 17:53:00 alright thanks a lot Dec 17 17:53:08 there's no change Y will sneak in before X since it is sync'd Dec 17 17:53:11 *chance Dec 17 17:55:02 Hey quick question about activity layouts. I want a layout 200dp in height fixed to the bottom of my full-screen activity. I want the remainder of space above it filled filled with another layout. I can only get the top layout to fill the entire screen, and the bottom always gets pushed below the screen. what do I need to know to do this? Dec 17 17:56:01 layout weight Dec 17 17:56:35 blndidiot, make a vertical linearlayout, set top layout height to "0" and weight to "1", set bottom layout height to 200dp Dec 17 17:56:37 linear layout with vertical orientation set top height to 0dp and layout weight to 1 set bottom height to 200 dp (and no layout weight) Dec 17 17:56:46 draw! Dec 17 17:56:53 argh mavrik you got me the gut Dec 17 17:56:57 ;p Dec 17 17:57:31 thanks guys! Dec 17 17:57:40 lots of layouts can achieve the same thing Dec 17 17:57:47 mhm Dec 17 17:57:52 you could do it with framelayout, linearlayout, relative layout, etc. Dec 17 17:58:11 framelayout with a child at gravity bottom, height 200dp, the other gravity top, margin bottom 200dp, etc. Dec 17 18:00:37 working wonderfully. i actually ditched the 200dp idea and did weight:3 on top, weight:1 on bottom .. works better rotating the screen. thanks again Dec 17 18:05:23 hey Dec 17 18:06:04 out of all the results that would turn up on google, is there one NDK set up tutorial you would trust…? Dec 17 18:06:18 NDK set up in the past for me has been flakey at best Dec 17 18:06:36 This method http://developer.android.com/reference/android/os/Handler.html#postDelayed(java.lang.Runnable, long) - does it posts to the message queue after the delay or it posts immediately and when its time to execute it sleeps for the delaymillis? Dec 17 18:07:20 shmoon, it's posted immediately and queue will try to execute after delayed time Dec 17 18:10:18 Mavrik: so lets say the delay is 4 seconds but queue took 2seconds cuz of other previous operations to reach to the runnable. then will it take 2 more seconds of delay or 4 ? Dec 17 18:11:45 is it possible to program for android using python,... practically speaking Dec 17 18:17:42 shmoon, queue took 2 seconds of what? Dec 17 18:17:51 and when? Dec 17 18:17:52 Google Play is pulling my apps Dec 17 18:18:01 * regan says fuck you Dec 17 18:18:08 lets say there were some runnables before the one that has a 4s delay Dec 17 18:18:18 Mavrik: and those runnables take 2s to execute Dec 17 18:18:53 then those runnables will run for 2 seconds, looper will park for 2 seconds and then your task gets executed. Dec 17 18:19:14 alright cool got it Dec 17 18:25:37 For licensing, is it sufficient to include a link or must I include it verbatum (mit and apache 2) Dec 17 18:26:01 Windstorm: yeah just google it Dec 17 18:28:00 Could anyone possibly tell me why my multiline edittext contents appear in the middle? I'm trying to get it at the top-left but it is vertically centered http://i.imgur.com/ljwggDz.png Dec 17 18:28:40 blndidiot: use gravity setGravity="top|left" Dec 17 18:28:58 android:gravity="top|left" Dec 17 18:29:38 oh i'm dumb.. i had layoutGravity Dec 17 18:29:57 worked, thanks Dec 17 18:30:04 its all in your name Dec 17 18:31:12 anyone know how to refactor if-else to switch in android studio Dec 17 18:31:24 i was able to do it with alt-enter, but now it's not working for somet reason Dec 17 18:42:56 ooh, new hangouts dialer Dec 17 18:43:02 now if only they'd fix bluetooth integration Dec 17 18:43:13 so that turning on and hanging up from the headset worked Dec 17 18:45:44 can I set application wide that my app will ignore screen rotations? Dec 17 18:47:13 Does anyone know is a link to the apache 2 license sufficient or do I need to include the actual text? Dec 17 18:48:13 vedu yes in manifest Dec 17 18:48:49 man, cyanogenmod fucked over oneplusone good, didn't they Dec 17 18:49:12 lasserix: I have done `android:screenOrientation="nosensor"` in my application tag but it doesn't help Dec 17 18:49:33 IAMAL but I think you need the full license text included. I think it explicitly says "a copy of the license must be included" Dec 17 18:51:20 I have my kernel repacking correctly now, but the kernel does not seem to be proper. I am enforcing selinux. Does the toolchain impact the reliability of having a good kernel that will boot or is the issue something else? I am using the gcc 4.7 as described in the samsung docs I believe. Dec 17 18:52:48 trevor-e: can i include the license sans the names from their licenscing? Dec 17 18:52:49 sorry, meant to say IANAL Dec 17 18:55:58 ? Dec 17 18:56:13 can I set application wide that my app will ignore screen rotations? I have done `android:screenOrientation="nosensor"` in my application tag but it doesn't help Dec 17 18:57:27 lasserix: (I am not a lawyer) I would just copy what major apps on the market do. I think Google Music has a licenses page in their app Dec 17 18:58:06 vedu: Supported application attributes are documented: http://developer.android.com/guide/topics/manifest/application-element.html Dec 17 18:58:25 seems i can just link it http://stackoverflow.com/questions/8258687/android-app-multiple-apache-licenses-how-to-comply Dec 17 18:59:00 i have attributed and linked so i think its fine Dec 17 18:59:06 keep in mind that's just that user's opinion, not actual legal advice Dec 17 18:59:31 aye Dec 17 19:05:48 I am trying to create a share intent with an extra text record. I have it so that the intent creates the share activity with the text record in the share message for some apps, like instagram and google inbox. But not for others, like facebook. Where would I look to see if apps like facebook support this, and if so, what type of record/content to include in the intent to use it Dec 17 19:06:06 either I am doing this right for some apps and not others Dec 17 19:06:15 or it just works for some apps and not others Dec 17 19:06:43 apps register their intent filters Dec 17 19:07:10 lasserix: where do they do this? so that I can check Dec 17 19:10:01 not available usually Dec 17 19:10:08 you just have to make your intent filter Dec 17 19:10:18 and the os will give you a list of who supports what you are asking for Dec 17 19:12:12 lasserix: ok. well I would like to have all options show up as possible, even if this one feature (the text record) does not work. Does it make sense that any of them would only work with a extra shareIntent type that wasn’t just EXTRA_TEXT Dec 17 19:12:45 like some secret shareIntent.setType(“facebook/message”) Dec 17 19:13:05 undocumented, unversioned loose coupling ftl Dec 17 19:14:01 in_deep_thought i was in the same place, except twitter. with the char limit, i wanted to single that one out for a special shortened message Dec 17 19:14:13 in_deep_thought: Facebook has largely shunned the intent system. if you want to share something on facebook, you either have to use their SDK, or you have to accept it looking funky Dec 17 19:14:53 what is correct way to change apk name in grade ? Dec 17 19:15:23 s73v3r: that is very good to know. thanks Dec 17 19:15:51 i accidentally deleted stock browser on my droid 4 and cant get it back. can anyone give me a hand? Dec 17 19:16:12 g00s: so did you just use an EXTRA_TEXT record as well? or something special? Dec 17 19:16:50 I do it like this http://pastebin.com/raw.php?i=irUGttBe, but then for some reason I can't deploy, apk gives parse error when installing Dec 17 19:16:50 alot of nicks matching their words today Dec 17 19:17:19 in_deep_thought yeah, i had 2 options, share, share abbreviated or something like that and used EXTRA_TEXT Dec 17 19:17:58 g00s: ok thanks. I guess Ill just use that and hope that its accepted by those apps :/ Dec 17 19:20:14 vegetablesalad19: try new File(output.outputFile.parent, newName); Dec 17 19:20:53 Hi guys, I try to check sha1 checksum of the android studio bundle installer file, but it doesn't match Dec 17 19:22:35 berong91 it could be malicious, it might wind up deploying to WP or iOS instead ! Dec 17 19:22:46 berong91 also, google & details Dec 17 19:23:05 wreckluse: #android-root Dec 17 19:23:34 ok sorry Dec 17 19:23:42 Hey, I'm trying to dynamically change a layout.. the event is firing properly, but the layout visibly isn't changing at all. any idea what I am doing wrong here? http://pastebin.com/NBNB4QGG Dec 17 19:23:56 hey, what’s the current accepted best way to get unit testing working with the release version of Android Studio and Robolectric? Dec 17 19:24:45 Great. They just forget to update sha1 checksum code on download page. Dec 17 19:26:07 blndidiot: so when you work with dimensions in code the raw values are always in pixels Dec 17 19:26:26 ohh Dec 17 19:26:28 also i dont know why you are findingbyviewid twice Dec 17 19:26:36 oh nm i see Dec 17 19:26:50 anyways Dec 17 19:26:54 yeah the header is clicked, to make the parent layout change Dec 17 19:26:54 instead of doing that Dec 17 19:26:56 why dont you just do Dec 17 19:27:14 setVisibility(View.GONE / View.VISIBLE) Dec 17 19:27:38 instead of manipulating the height like that? Dec 17 19:27:52 just because of how my layout is set up, I dont think that will work Dec 17 19:28:30 oh you dont want to hide it completly just partially? Dec 17 19:28:34 yeah Dec 17 19:28:35 yeah your layout is funky Dec 17 19:28:46 you should split thenotes part into the partially visible and rest Dec 17 19:28:49 then use visibility Dec 17 19:28:53 and not do it this way Dec 17 19:29:03 yeah good idea.. I'll try Dec 17 19:29:12 thanks Dec 17 19:36:02 damn Ap CS Principles Dec 17 19:36:07 that would have been fun in high school Dec 17 19:44:34 Question about webview and website scaling Dec 17 19:45:04 I have a webview locked to a website but the website scales like a pile of shit Dec 17 19:49:43 yellomango: you can disable zooming, but personally I hate that. but that's beside the point - what part of the scaling is bad? Dec 17 19:50:34 The website itself is all messed up. Dec 17 19:50:39 hey guys. i have some real advanced matter regarding AOSP Location manager Dec 17 19:51:12 Its suppose to be on a monitor, but i want it to just go offscreen instead of forcing everyrhing on this tiny screen Dec 17 19:51:17 it seems i get into some race condition with GSM, he wants to get wifi... Dec 17 19:51:37 yellomango: so, you don't want it to start zoomed in? Dec 17 19:51:50 lasserix: yo Dec 17 19:51:54 or, zoomed out. Dec 17 19:52:01 No i want it zoomed all the way out Dec 17 19:52:43 yellomango: http://developer.android.com/reference/android/webkit/WebSettings.html#setLayoutAlgorithm%28android.webkit.WebSettings.LayoutAlgorithm%29 Dec 17 19:53:14 I have tried thr default zoomout Dec 17 19:53:27 yellomango: look at what i just sent you Dec 17 19:53:27 I think i need to chamge the apperent aspect ratio Dec 17 19:54:05 also maybe setLoadWithOverviewMode Dec 17 19:54:14 Napalm any particular spot? Dec 17 19:54:25 Ah thanks groxx il try that and report back Dec 17 19:54:47 yellomango: i sent you a link to setLayoutAlgorithm on WebSettings Dec 17 19:56:49 yellomango: also http://developer.android.com/reference/android/webkit/WebSettings.html#setUseWideViewPort%28boolean%29 Dec 17 19:56:51 how to add HTML in a TextView ? Dec 17 19:56:57 i'm trying this: http://pastebin.com/vtLVVMMp Dec 17 19:57:02 but doesn't works Dec 17 19:57:19 fernandopaiva: fromHtml is very limited Dec 17 19:57:58 fernandopaiva: change your function to return a CharSequence and then change your last line to return Html.fromHtml(builder.toString()); Dec 17 19:58:15 fernandopaiva: ignore that Dec 17 19:58:23 i looked like you were not using Html.fromHtml Dec 17 19:59:09 Napalm, Spanned sp = Html.fromHtml(texto()); Dec 17 19:59:13 fernandopaiva: well you've done your best.. justify align is not supported on Android anywhere it is however supported in WebView Dec 17 19:59:17 fernandopaiva: yea, read up Dec 17 19:59:58 fernandopaiva: yeah, align=left/right/center is I think all that's available in fromHtml Dec 17 20:00:24 fernandopaiva: it's really poorly documented, but afaik it hasn't changed since the first release: grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.0_r1/android/text/Html.java Dec 17 20:01:35 Groxx: I know the text framework like the back of my hand.. it just isnt designed to support Justified text. Dec 17 20:01:37 alas, there are some changes through the years. oh well. Dec 17 20:02:08 another reason why the text framework needs redoing Dec 17 20:02:15 on my custom adapter how do i clear a filter that ive set? Dec 17 20:02:30 aaearon: its not on the adapter is on the ListView Dec 17 20:03:03 Napalm: hm, mind if I ask you if there's a good way to get the bounding box of characters in a string then? partially personal interest, partially trying to collect info for TacticalJoker (enormous text blobs = slow layout) Dec 17 20:03:11 the listview is getting the data from the adapter and im calling adapter.getFilter().filter("whatever") so i am setting the filter on the adapter arent i? Dec 17 20:03:34 aaearon: its the View's job to work with the filter Dec 17 20:04:06 Napalm: tl;dr I've had an idea for incrementally laying out and drawing text so huge textviews don't freeze the UI for a long time. Dec 17 20:04:21 and it seems like anything that works there would also make justified text pretty easy to create Dec 17 20:04:31 I've already done that Dec 17 20:04:36 and justifying of text Dec 17 20:04:46 i want to release it all as open-source Dec 17 20:04:50 but its going to take some time Dec 17 20:04:52 so html doesn't work with TextView there's any way ? Dec 17 20:05:02 Does NSD work with >2 devices? Dec 17 20:05:15 fernandopaiva: i bloody said.. if you want to Justify text then use WebView Dec 17 20:06:19 http://developer.android.com/reference/android/webkit/WebView.html Dec 17 20:07:27 Napalm: mind if I ask you what your basic approach was? A brief skim a day or two ago led me to getTextWidths which seems like it would work, though I don't know of an efficient way to use that info to draw text. Dec 17 20:11:05 aaearon: ListView.clearTextFilter(); Dec 17 20:11:19 If player.png is available for nodpi and xhdpi and I'm on an xxhdpi device, would it use nodpi or xhdpi? Dec 17 20:11:53 yes Dec 17 20:12:05 ah ,nice Dec 17 20:13:05 well you could test it Dec 17 20:13:52 If I make assets for all dpi's, would it increase the size of the end user apk or does Google have some kind of smart solution? Dec 17 20:13:58 Groxx: yea, getTextWidths works and well. But it wont necessary work well with all the Unicode options and BiDi RTL text Dec 17 20:14:22 Groxx: if your interested, you can be involved Dec 17 20:15:09 Kake_Fisk: hm? Dec 17 20:15:27 Kake_Fisk: if you make like 72x72 for xxhdpi, it will use this 72x72 Dec 17 20:15:34 i need help creating a timeout in java Dec 17 20:15:40 i have something but it is malfunctioning Dec 17 20:15:49 welcome to java Dec 17 20:16:08 http://pastebin.com/NNtDP58W Dec 17 20:16:10 seems crashy Dec 17 20:17:53 Ashiren: Yeah, but supporting multiple pixel densities would clearly increase project size because of more assets. But will the apk on user end also be bigger in storage size? Or does Google do something smart to install a version with only the correct dpi assets? Dec 17 20:18:34 (Agamemnus) i have something but it is malfunctioning Dec 17 20:18:47 Welcome to programming hahahaha Dec 17 20:18:56 Kake_Fisk: you could provide drawables only for xxhdpi. the android would scale down automatically then Dec 17 20:19:03 thanks Napalm Dec 17 20:19:12 ah, I see Dec 17 20:19:21 Kake_Fisk: hmm i think xxhdpi is API >= 11, so you would want to check for that Dec 17 20:19:35 I've been using nodpi to prevent scaling Dec 17 20:19:47 I really don't what what I /should/ do Dec 17 20:22:03 Napalm, thanks a lot. WebView works fine :D Dec 17 20:22:49 Does anyone know why it crashes? Dec 17 20:23:01 Hello. Is it okay to write my state to the database in an onDestroy or is that too slow? Dec 17 20:23:04 Is this the right way to do a timeout in java? Dec 17 20:23:56 Agamemnus: no its not right, and yes theres a better way Dec 17 20:24:25 what is the right way? Dec 17 20:24:47 i saw some stackoverflow posts but they are old and hopelessly complicated Dec 17 20:25:13 Agamemnus: you need to cordova.getActivity().getWindow().getDecorView().postDelayed(new Runnable{ /* blah */ }, 250); Dec 17 20:25:23 Agamemnus: that should work Dec 17 20:26:19 thanks, i'll try it Dec 17 20:26:25 Agamemnus: the bug in your code is that you post your runnable to a background thread and that runs the testIsReadyToShowAd() function which wants to touch the UI.. which you can only do from the UI thread Dec 17 20:26:47 I meant saveInstanceState of course Dec 17 20:28:10 should it be Runnable () ? Dec 17 20:28:15 "new Runnable () {"? Dec 17 20:28:30 Napalm: yeah, I was wondering how that would handle bidi text. especially mixed-direction. I'm interested, but I'm not quite sure what you're implying :) Dec 17 20:28:57 i am getting some errors now Dec 17 20:29:17 http://pastebin.com/P2pmNN8d Dec 17 20:29:43 illegal start of type Dec 17 20:29:50 on fireDocumentEvent Dec 17 20:29:53 Not sure why Dec 17 20:30:21 oh Dec 17 20:30:26 do I still need '@Override public void run () {' ? Dec 17 20:30:52 :P ok thanks Dec 17 20:38:13 is a LinearLayout.isFocused() == true whenever any of the views in it have focus? Dec 17 20:40:48 Groxx: I was implying.. if you want to contribute I'll add you too the repo (when I get it setup) Dec 17 20:53:52 Napalm: as long as you know I have little free time: I'd be interested :) seems like something we-the-community need, and I like hard stuff. Dec 17 20:54:09 Groxx: same here, thats the problem Dec 17 21:06:07 how does SlidingTabLayout.setSelectedIndicatorColors() work? i cant seem to get the indicator to change colors no matter what color i pass to it :/ Dec 17 21:06:33 which has primarily been changing R.color.colorAccent, and passing that to it Dec 17 21:06:44 https://plus.google.com/u/0/+KirillGrouchnikov/posts/DGxQP6U3baa Dec 17 21:06:45 lol Dec 17 21:08:25 wat Dec 17 21:09:14 If I have a class that uses a generic, and has a method that returns a list of said generic, why might I get an unchekhed assignment warning when assigning it? Dec 17 21:10:58 MyClass { @Getter List listOfThings; }; List list = new MyClass().getListOfThings(); // unchecked assignment List to List Dec 17 21:11:25 hi Dec 17 21:11:27 any of you have had trouble with leadbolt and proguard? I can't make it work no matter what I do Dec 17 21:11:54 you haven't done everything yet :p Dec 17 21:12:00 shekibobo: pass in Class clazz as a parameter and at your return statement do return clazz.cast(yourvar); Dec 17 21:12:55 or just tell the compiler to ignore it. Dec 17 21:12:56 @suppresswarnings("unchecked") Dec 17 21:12:57 #1 answer Dec 17 21:13:21 Napalm: Yesterday I wrote a custom view that drew text itself (well, it used Layout) in an attempt to improve the performance of my ListView. Performance was still just as bad. The biggest performance issue is comments with large heights. Dec 17 21:13:48 TacticalJoke: yes, because you use Layout Dec 17 21:13:48 Napalm: Compared to showing a couple of TextViews. Dec 17 21:13:48 lol Dec 17 21:14:12 TacticalJoke: as I said, set the maxLines to 5 Dec 17 21:14:24 or somesuch limit Dec 17 21:14:37 then toggle in on selecting the item Dec 17 21:14:42 I tried that, but I concluded that it's too restrictive for a Reddit client. Dec 17 21:14:48 It is a nice idea, though. Dec 17 21:14:54 toggle is an interesting idea… would make browsing easier. Dec 17 21:14:58 Napalm: Do you think RecyclerView will improve my performance? Dec 17 21:15:21 I would just suppress it, but the problem comes when i'm using FluentIterable. FluentIterable.from(list).transform(t -> t.toOtherThing()), t is passed as Object Dec 17 21:15:26 Rather than Thing Dec 17 21:15:27 possibly.. but then I don't know your code, and it could be plenty of other things Dec 17 21:15:42 Napalm: I profiled, and with my custom-draw code it was ListView.onDraw. Dec 17 21:15:49 shekibobo: ick. why is it passed as Object? Dec 17 21:15:50 With TextView, it's TextView.setText calling layout stuff. Dec 17 21:15:52 shekibobo: you can still set the type Dec 17 21:15:59 i find that textview's setText() can be extremely slow. Dec 17 21:16:01 yeah, I don't know Dec 17 21:16:20 if there are a lot of spans, you are doomed to see considerable slowdowns Dec 17 21:16:20 my guess is because of the unchecked assignment of the list that gets passed in Dec 17 21:16:33 Yeah, spans were quite slow in some of testing, too. Dec 17 21:16:39 maybe if it's unchecked, it loses the type info somewhere? Dec 17 21:16:43 But the bottleneck was the ListView laying stuff out. Dec 17 21:16:43 shekibobo: FluentIterable.from(list).transform(List t -> t.toOtherThing()) Dec 17 21:16:46 TacticalJoke: did you do method tracing Dec 17 21:16:49 Yeah. Dec 17 21:16:55 :< Dec 17 21:17:06 layouts are evil Dec 17 21:17:08 With my custom code (which used spans), 99% of CPU time was the ListView drawing. Dec 17 21:17:10 shekibobo: you will not loose type info Dec 17 21:17:23 Object is never the answer :( but it is what it is. What happens if you define the getter as `public List getThing()` ? it might not work with your class setup, but that'll implicitly cast to match the assignment. Dec 17 21:17:23 99% is way too much tho Dec 17 21:17:24 TacticalJoke: then you messed something else up Dec 17 21:17:52 in my adapters, that's mostly 2-3 spans per line of text, about 30% of cpu goes to setText Dec 17 21:17:56 Napalm: I simply called Layout.draw(myCanvas) and View.requestLayout. Dec 17 21:17:57 shekibobo: paste your method declaration for MyClass().getListOfThings(); Dec 17 21:18:19 squirrel: I wasn't using TextView anymore. But, yeah, if I use TextView I get a huge amount of time in setText. Dec 17 21:18:43 TacticalJoke: what are you using? Dec 17 21:18:48 ;o Dec 17 21:19:01 A custom view that uses a StaticLayout to measure and draw the text. Dec 17 21:19:07 I removed all ViewGroups. Dec 17 21:19:19 but do you, like, draw text yourself? Dec 17 21:19:25 I ask the StaticLayout to. Dec 17 21:19:28 TacticalJoke: wait what? why are you calling requestLayout? and when.. not in onDraw i hope Dec 17 21:19:31 mhm Dec 17 21:19:37 * squirrel looks up staticlayout Dec 17 21:19:44 Not in onDraw, no. Dec 17 21:19:49 In the method that the adapter calls to bind data. Dec 17 21:19:59 dont need to do that Dec 17 21:20:08 thats part of your slowdown Dec 17 21:20:15 Hmm. Dec 17 21:20:23 How could I avoid doing that? My views change size every time. Dec 17 21:20:37 yes, and its accounted for by the ListView Dec 17 21:21:19 Napalm: My custom View has to change size every time it's given a new Reddit comment to display. How could the ListView know of the new size if I don't call requestLayout? Dec 17 21:22:05 I mean, I tried not calling it, but of course this makes comments appear in random locations. Dec 17 21:22:06 its already going to get called Dec 17 21:22:19 then you probably have other issues Dec 17 21:23:38 RecyclerView is specially good with views that change size every time Dec 17 21:23:47 Napalm: My adapter calls CommentView.showComment(Comment). This creates a new SpannableStringBuilder with the comment stuff (author, time, etc.). It then calls requestLayout. Then onMeasure is called, which creates the StaticLayout. Then, ultimately, onDraw is called, which asks the StaticLayout to draw stuff. Dec 17 21:24:02 I don't see how any other workflow is possible. Dec 17 21:24:54 Napalm: https://gist.github.com/shekibobo/52db27ecdd16875acfe2 Dec 17 21:27:33 shekibobo: ah your using Guava Dec 17 21:28:16 Napalm: Facebook wrote that variable-height ListViews are slow. They had to create their own View recycler to work around this. Dec 17 21:28:52 lol facebook write their own everything Dec 17 21:28:52 TacticalJoke: have a link? I can think of some _tiny_ slowdowns, but I'd be curious if there are some surprises Dec 17 21:28:53 " The stock Android ListView has view recycling support, but it is not efficient for list elements of very different row heights, such as in news feed stories. We wrote a custom view recycler, which detached heavy content views once they were added to the recycling heap." Dec 17 21:29:00 https://m.facebook.com/notes/facebook-engineering/under-the-hood-rebuilding-facebook-for-android/10151189598933920/ Dec 17 21:29:34 shekibobo: why dont you just do: public List getTranslatedOptions() { return FluentIterable.from(getOptions()).transform(s -> translate(s)).toList(); } Dec 17 21:29:50 That's the issue I have: when comments vary in height a lot, there is lag. When they vary a little, there's almost no lag. Dec 17 21:30:29 TacticalJoke: no its not the same thing Dec 17 21:30:38 I was, but it returns immutable lists Dec 17 21:30:49 which was also giving me unchecked warnings Dec 17 21:31:04 Napalm: Everything I've tried leads to the same result: large comments cause lag. Dec 17 21:31:11 but the problem is that the 's' in translate(s) is passed as an Object instead of a String Dec 17 21:31:24 so pass it as a String Dec 17 21:31:51 I could cast it, but I'm hoping there's a way to maintain type knowledge through the whole process Dec 17 21:31:56 sounds more like an issue witrh FluentIterable to me Dec 17 21:32:11 that reminds me. is there any good explanation of inPurgeable and the caveats associated with it? I don't totally understand why it works / why it works as reliably as it does when I've been yolo about using it. Dec 17 21:32:15 shekibobo: public List getTranslatedOptions() { return FluentIterable.from(getOptions()).transform(String s -> translate(s)).toList(); } Dec 17 21:32:27 serious people why is the information on creating a dt.img (device tree) image for new Qualcomm ARM cpus and how to rebuild it into the boot.img so sparse? Dec 17 21:32:38 is there some secret database to find phone number from SIM card number? Dec 17 21:32:50 #yolo programming: catch (Throwable t) { // do nothing } Dec 17 21:32:50 seriously* Dec 17 21:33:12 gbit86: wrong channel Dec 17 21:33:24 story of my life bankai Dec 17 21:33:41 start reading topics then Dec 17 21:33:48 TacticalJoke: Why don't you use RecyclerView? Dec 17 21:33:56 apparently it would have to be .transform(s -> translate((String) s)).toLIst(); Dec 17 21:33:57 Yeah, I'll probably end up doing that,. Dec 17 21:33:58 I did and I've got it now. Dec 17 21:33:58 .* Dec 17 21:34:21 drkfdr: no, because they dont work that way Dec 17 21:34:49 TacticalJoke: by all means use it.. but thats not your direct cause Dec 17 21:34:58 so will RecyclerView make staggered grids automatically if the content differs in size? Dec 17 21:35:06 Napalm: How do you know? :) Dec 17 21:35:12 otherwise I get incompatable parameter types in lambda expression Dec 17 21:35:22 or complaining about a missing ; or ) Dec 17 21:35:26 RecyclerView does nothing automatically. if you want staggered grids you'll need a LayoutManager that does that. Dec 17 21:35:36 also, anyone have any input on SlidingTabLayout.setSelectedIndicatorColors)(? Dec 17 21:35:37 ok Dec 17 21:35:51 TacticalJoke: sounds like you might be doing more measure and layout passes than you need.. you defintly do not want to create a new Layout in onMeasure every fricken time its called Dec 17 21:35:54 blah balh balh Dec 17 21:36:03 drinfernoo: if you're looking for staggered grids, maybe try TwoWayView? Dec 17 21:36:05 But I don't see any alternative. Dec 17 21:36:14 When using Layout, anyway. Dec 17 21:36:23 drinfernoo: use SlidingTabLayout.setSelectedIndicatorColors(getResources.getColor(R.color.accentColor)); Dec 17 21:36:34 Groxx, youre always so helpful lol Dec 17 21:36:36 Using DynamicLayout isn't a solution, because we *do* have to resize every time the adapter calls through to us. Dec 17 21:36:51 TacticalJoke: PM me a link to your view code Dec 17 21:37:06 drinfernoo: I don't know the progress on the RecyclerView rewrite, but recyclerview doesn't give you very many benefits over listview _in general_, aside from more flexibility. Dec 17 21:37:09 Okay. Dec 17 21:37:09 no :) let everyone see Dec 17 21:37:29 (we've been hearing about if for like 4 days now :p ) Dec 17 21:37:30 Groxx: you said this yesterday.... i haven't touched it, but if that's the case why bother? Dec 17 21:37:38 about recyclerview? Dec 17 21:37:41 yeah Dec 17 21:37:48 hey capella Dec 17 21:37:51 I would, but it's horrible code. The kind of code you write as a first draft before refactoring. lol Dec 17 21:37:56 :) Hey Dec 17 21:38:06 Napalm, that worked :) Dec 17 21:38:11 i know Dec 17 21:38:13 :P Dec 17 21:38:22 TacticalJoke: ok, one moment, i'll rustle up an Async TextView Dec 17 21:38:54 basically ListView works fine, but it's hard to customize. you can be smarter about recycling views, but ListView controls recycling internally and throws exceptions if you try to tweak it. It's hard to write your own layout logic, because ListView does a lot of it internally, and throws exceptions if you try to tweak it. Dec 17 21:39:04 ugh ive never used tabs before and i feel like tabs with the toolbar are more complicated than they need to be lol Dec 17 21:39:59 RecyclerView is mostly about inverting control of everything in ListView so you can replace it. You write a lot of code to replace some of those parts, because it's inherently complicated, but it's actually _possible_ to do so. Dec 17 21:40:08 drinfernoo: true, the next compat view to be added should be a tabview Dec 17 21:40:09 Groxx, im going to be making grid views, and staggered grids look like they might be a fun way to break up the monotony, thats all Dec 17 21:41:07 In theory it also improves some of the animation handling problems that ListView has, but that's unimportant if you're not doing animations. Dec 17 21:41:07 If you're already implementing custom views, recyclerview is the way to go. Dec 17 21:41:31 renanferrari_: Do you know whether there are any stats showing that it's faster than ListView with variable heights? Dec 17 21:41:36 I tried googling but found nothing. Dec 17 21:41:53 so i should be able to simply inflate a fragment into my viewpager in order to do logic on my grid view, right? Dec 17 21:42:13 or is that needlessly complicated too? Dec 17 21:43:20 TacticalJoke: It should be faster just because you can customize it in a deeper level, to couple better with your custom views Dec 17 21:44:02 There's no recipe for that, it varies greatly from case to case Dec 17 21:44:15 renanferrari_: Do you think it's faster with variable-height TextViews? Dec 17 21:46:00 TacticalJoke: I would think it's probably easier to make a RecyclerView faster with it. Not that it would work right out of the box. Dec 17 21:52:01 capella: Here's the code: http://pastebin.com/mSAYWZ2b It's an unrefactored mess, though. :p Dec 17 21:56:01 TacticalJoke: Hey man, have you ever read this post? http://lucasr.org/2014/05/12/custom-layouts-on-android/ That part about Async Custom View could be interesting for you. Dec 17 21:56:30 Oh, yeah. Napalm linked me to that. I haven't tried the async thing yet, though. Dec 17 21:57:06 I don't like the sound of it, though. Dec 17 21:57:07 To be honest. Dec 17 21:57:46 TacticalJoke: Oh, I don't like the sound of any of that too. Dec 17 21:57:53 But hey, it might work Dec 17 22:02:22 TacticalJoke: heh. BetterSpannableStringBuilder. is that a public thing, or did you make it? SSB seems like the sort of thing everyone wraps somehow. Dec 17 22:02:30 Oh, I made it. lol Dec 17 22:02:50 It uses a stack (well, a deque) to build up and remove spans. Dec 17 22:03:02 SpannableStringBuilder is so half-done. Dec 17 22:03:07 yeah Dec 17 22:03:37 The constructor takes an argument for a suggested initial deque size, but that's probably a horrible API in itself. I don't use that in my main code, really. Dec 17 22:03:39 <_Auron_> ugh crunch time week Dec 17 22:03:40 More of an experimental branch. Dec 17 22:03:41 makes sense. I ended up making a wrap(span, text) helper method and calling it done Dec 17 22:05:15 at some point I need to build something to handle essentially String.format for spannables + I18n. it's a bit of a pain when the order and number of arguments can change. since we don't have one, we usually just avoid making such strings, which isn't quite ideal Dec 17 22:08:58 Yeah, it's annoying. More complexity --> more to worry about. Dec 17 22:09:54 Groxx, I already have such a thing implemented in my Commons library Dec 17 22:10:46 pfn: link? Dec 17 22:11:01 https://github.com/pfn/android-common/blob/master/src/main/scala/AndroidConversions.scala#L272 Dec 17 22:11:26 Oh yeah, I'm a werewolf hunter http://stackoverflow.com/users/1747491/mattblang Dec 17 22:12:42 Groxx, translate to java as appropriate Dec 17 22:13:05 pfn: browsing. thanks :) btw it's pedantry but: "toRicProgresshDialog" is misspelled Dec 17 22:13:15 yeah Dec 17 22:14:27 trying to figure what I want to do with all my implicit convrrsions Dec 17 22:14:31 Haven't decided Dec 17 22:14:41 hoping intellij adds sam support soon Dec 17 22:17:45 pfn: as far as I read it, it seems like that's just a less-capable String.format that returns a Spanned? does it do something different than new Spannable(String.format("blah%1", arg)) ? Dec 17 22:18:18 though quite possibly a lot more memory friendly - String.format is surprisingly hungry sometimes Dec 17 22:18:56 it works completely with spanned objects Dec 17 22:19:48 Groxx, https://github.com/pfn/qicr/blob/master/common/src/com/hanhuy/android/irc/model/MessageAdapter.scala Dec 17 22:19:51 ooh, i think I see it now. so you give it %1 pre-spanned things and it fills in the placeholders Dec 17 22:20:44 Hello, how can I make this GridLayout containing the ImageViews to stretch all over the screen.... increasing the size of the images ? http://pastebin.com/HfaHBhi2 Dec 17 22:25:18 is it not possible? Dec 17 22:37:18 Hi. Inside a Runnable's run(), if I do Looper.prepare() and Looper.loop() without a handler, do they have any effect Dec 17 22:38:32 panda81: you _probably_ want to use a HandlerThread instead of doing that by hand. but Looper.loop will make that thread wait forever for messages, so without a handler it doesn't do anything but waste resources by keeping the thread around. Dec 17 22:38:51 hey guys Dec 17 22:38:58 i use this code to start an ongoing notification http://p.samuraimanpurse.com/SaGHHKez.txt Dec 17 22:39:01 it doesn't work Dec 17 22:39:52 OverCoder: you need an icon: https://developer.android.com/guide/topics/ui/notifiers/notifications.html#Required Dec 17 22:40:03 that's necessary? Dec 17 22:40:14 * OverCoder reads Dec 17 22:40:22 "A https://developer.android.com/reference/android/app/Notification.html object must contain the following: " is pretty explicit Dec 17 22:40:45 you can however use a 1x1 transparent square pixel Dec 17 22:40:51 bleh. I guess that's how adium expands linked text :( Dec 17 22:41:17 eeh Dec 17 22:41:36 can i use any of the android defined drawables in R.drawable? Dec 17 22:41:41 no hidin running services for you :P Dec 17 22:41:45 like those starting with abc Dec 17 22:41:58 Groxx: I have something like http://textuploader.com/o879 I'm not sure if the Looper and Handler (which is local) do anything Dec 17 22:42:35 * OverCoder hugs Groxx Dec 17 22:42:37 it worked Dec 17 22:45:51 panda81: it feels like a weird construction (maybe it's not, I've just never done that), but it also seems like that's unlikely to work the way you want. messages the sensor sends will go into your looping thread, which will probably just be dropped because you're not handling them at all. Dec 17 22:47:51 Groxx: Well, the mSensorEventListener which extends SensorEventListener handles sensor events coming in? Dec 17 22:48:22 Groxx: or do you mean hypothetical messages sent to handler.post()? Dec 17 22:49:33 Groxx: but if that's the case, the handler object is invisible outside of this block, and thus there is no way to post() to it Dec 17 22:51:21 panda81: kinda a strange-looking API… I wonder if it's shoving runnables into the handler, which call your listener? I'm skimming the documentation at the moment. Dec 17 22:52:45 How do I disable selinux/seandroid? I am trying to follow this for my new kernel, but I keep getting stuck on "Kernel is not seandroid enforcing" on bootup. http://forum.xda-developers.com/showpost.php?p=49371728&postcount=93 Dec 17 22:52:52 panda81: if it's doing that, then it seems like it should work. the listener's calls will just happen on the thread you created there. Dec 17 22:53:26 panda81: and yes, the handler is invisible outside the block (but you gave it to the manager, so it's probably still being used). do you need to post messages to it? Dec 17 22:53:32 gbit86: wrong channel Dec 17 22:54:02 If there is a right channel then please share it with me bankai_ Dec 17 22:54:20 i don't know/care what the right channel is. this isn't it Dec 17 22:54:45 Groxx: I see. Good point on the handler Dec 17 22:54:48 try one of the ones listed in the topic Dec 17 22:54:55 looks like it's #android, according to http://source.android.com/source/community/index.html Dec 17 22:55:00 A channel called "android developers" is not here for technical questions that is in the realm of developing? Dec 17 22:55:16 guys, any idea? How can I make this GridLayout containing the ImageViews to stretch all over the screen.... increasing the size of the images ? http://pastebin.com/HfaHBhi2 Dec 17 22:55:34 android 'application' development Dec 17 22:55:39 gbit86: this is _app_ developing, not OS. but yeah, the channel name is non-specific. Dec 17 22:56:23 ok... I guess I can accept that. Dec 17 22:56:55 there are also more-specific mailing lists fwiw Dec 17 22:57:12 hello Dec 17 22:57:51 the topic says "Root/custom ROMs, head to irc://irc.freenode.net:6667/#android-root" not sure if that applies to your SELinux question though Dec 17 22:58:06 guys strange Calendar behavior, cal.setTimeInMillis(), hhMMDateFormat.format(cal.getTime()) is incorrect Dec 17 22:59:13 I would like to use Material Design (and 5.0) theme for ToggleButton and make it compatibile with <21 versions. How can I do that? Dec 17 22:59:17 shipit: where are the milliseconds coming from? Dec 17 22:59:24 <_Auron_> what in the hell? I've not had issues for weeks but now all of a sudden, LocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) always returns null. Dec 17 22:59:53 I have been asking the same questions in root... I am guessing it is pretty much dead though Dec 17 22:59:56 hello Groxx Dec 17 22:59:58 another calendar object where cal.add() from timepicker has been performed Dec 17 22:59:58 PabloAngello: try the compatibility library Dec 17 23:00:07 Groxx another calendar object where cal.add() from timepicker has been performed Dec 17 23:00:10 s73v3r: v7? Dec 17 23:00:38 Google's kernel error doesn't really cover what I am trying to do very well Dec 17 23:00:39 _Auron_: user turned off GPS? Dec 17 23:00:45 kernel area* Dec 17 23:00:54 shipit: how far off is the time? hundreds of years, or a few hours, or something else? Dec 17 23:01:04 Groxx the minute value is incorrect Dec 17 23:01:19 when I inspect the Calendar object, it has the correct minute value Dec 17 23:01:50 ie cal.get(Calendar.MINUTE); Dec 17 23:01:57 <_Auron_> shipit: My GPS is definitely on Dec 17 23:01:58 unfortunately everytime I google "kernel is not seandroid enforcing" all I see are idiot newbs that are flashing the completely wrong kernel or OS version to their device -.- Dec 17 23:02:27 shipit: I don't suppose "hhMMDateFormat" actually uses "hh:MM" as the value? "MM" is month, "mm" is minute. Dec 17 23:02:37 Groxx: shit! Dec 17 23:02:41 lol Dec 17 23:02:43 Groxx: I'm an ass!!! Dec 17 23:03:09 :D Dec 17 23:03:51 Groxx: works! man, you're a wizard w bugs! Dec 17 23:03:54 y Dec 17 23:04:23 lol - I don't know how many times I've gotten those reversed Dec 17 23:04:45 usually my paranoia kicks in before I actually run it and I re-read the format docs, but yeah Dec 17 23:05:01 PabloAngello: This should help: https://developer.android.com/training/material/compatibility.html Dec 17 23:05:16 Groxx: what a great catch! mad respect :) Dec 17 23:06:08 s73v3r: ok thanks Dec 17 23:06:58 <_Auron_> this makes NO SENSE Dec 17 23:07:51 _Auron_ location is sometimes lost if the device hasn't moved and/or you're not using network provider Dec 17 23:08:15 I have been able to fix it although don't recall what I did Dec 17 23:09:01 _Auron_: I have no clue, but some rubber-ducking: a) are location services turned off? b) did you just reboot the device (maybe == no recent location)? c) have you tried rebooting? maybe it's borked. d) it seems like this is _possible_ behavior when it's working correctly but has no connection. could it be normal behavior, and you're just sitting in the magical nexus of gps-unavailability? Dec 17 23:09:26 <_Auron_> if I pull up google maps it's able to find me just fine Dec 17 23:09:32 <_Auron_> I don't know why my app can't get that information Dec 17 23:09:58 _Auron_ a technique is to use geocoder Dec 17 23:10:01 <_Auron_> I've rebooted, I've toggled location services off and on for all of my google accounts just to be sure. Dec 17 23:10:07 if latlong isn't available Dec 17 23:10:10 gmaps uses their "fused location provider" iirc. unless you're using that, it probably doesn't mean much that gmaps can see something. Dec 17 23:10:11 heya guys Dec 17 23:10:54 i want to make an app that uploads files to dropbox, what i want to know is, if th user doesnt have dropbox, how can i sign them up easily? Dec 17 23:11:11 send them to the site Dec 17 23:11:33 cant i just use oauth to sign them up, so that i can oauth with dropbox? Dec 17 23:11:35 yeah. don't do it in-app. site or app store (since their app allows signup, iirc) Dec 17 23:11:57 but i need a behind the scenes cloud to upload large files Dec 17 23:12:11 transparent may i say Dec 17 23:12:22 ? Dec 17 23:12:42 It's not quite an answer to your question, but I think google drive does that - is that an option? Dec 17 23:12:53 yip, any cloud Dec 17 23:13:45 im basicly making a camera app that syncs the pics when on wifi, to the cloud, i can make them choose which cloud, but what happens when they dont have a cloud account? Dec 17 23:14:38 save it locally? or if you require e.g. dropbox, it seems sane to require them to have the dropbox app installed (since it'll handle login / uploading / syncing for you) Dec 17 23:15:34 I don't know any _technical_ reason why you couldn't start an oauth sequence -> have them sign up -> connect to their account. but I also have no idea if dropbox has built support for that. Dec 17 23:17:23 TechEffigy: Someone who’s signed into Android with a Google Account is going to have Google Drive Dec 17 23:17:26 Groxx, indeed Dec 17 23:18:16 thanks guys Dec 17 23:18:26 I would have them choose at first startup. If they don’t have one, then your only real options are to save locally or tell them to go get one Dec 17 23:18:32 s73v3r: is that actually a guarantee? it would be nice if so... Dec 17 23:18:47 whats the best android programming book, you have read? Dec 17 23:18:58 developer.android.com :) Dec 17 23:19:06 sadly Dec 17 23:19:13 I’m not 1000% sure, but I believe that if they have a Gmail account, they have a Drive account Dec 17 23:19:22 the Big Nerd Ranch book is pretty good Dec 17 23:19:42 I've had BNR books before, they've been decent, yeah Dec 17 23:20:15 thats the one where they build the detective app? Dec 17 23:21:05 yeah Dec 17 23:21:40 s73v3r not good to assume, use play services for Drive auth Dec 17 23:28:03 http://stackoverflow.com/questions/827557/how-do-you-validate-a-url-with-a-regular-expression-in-python/835527#835527 Dec 17 23:28:05 this is a lie right? Dec 17 23:28:11 ooo.ooo Dec 17 23:28:39 also, how can i validate url/ip Dec 17 23:28:40 OverCoder: That wouldn't surprise me. Dec 17 23:28:45 If that were the reality. Dec 17 23:29:30 Regexes become unmaintainable so quickly, from what I've seen. They're useless for anything complicated. Dec 17 23:29:42 OverCoder: that's probably the regex generated by the URL RFC (unless it's 100% fake) Dec 17 23:29:58 mhmm Dec 17 23:30:21 Is it possible to set a View's background drawable and, at run-time, re-position that drawable? Dec 17 23:30:26 for validating URLs / IPs: ping them (somehow). if DNS doesn't know it / you can't contact it, it might as well not exist. Dec 17 23:30:30 now i *think* no body should use a regex with ~7k character long Dec 17 23:30:31 Shift it to the right, for example. Dec 17 23:31:11 Groxx, i need that to happen to quickly Dec 17 23:31:11 TacticalJoke: you can add padding to xml drawables. not sure what to do beyond that though. Dec 17 23:31:26 Groxx: Can we change the padding at run-time? Dec 17 23:31:28 i just don't want to validate if the site exists or not Dec 17 23:31:33 just valid shit Dec 17 23:31:43 new URL() and catch the exception? Dec 17 23:31:54 does URL() takes IPs? Dec 17 23:31:59 OverCoder: ah. then tbh I'd recommend being EXTREMELY permissive. something like /[^\.]+\.[^\.]+/ is probably sufficient. Dec 17 23:32:21 TacticalJoke, i think everything can be changed to views at runtime Dec 17 23:32:21 but unsure though Dec 17 23:32:21 i think the layout will re-render Dec 17 23:32:26 nearly every other (non-100%-compliant) validation scheme I've encountered fails on some valid urls. Dec 17 23:32:40 including stuff like non-ASCII domains, which are perfectly acceptable Dec 17 23:32:47 ah k Dec 17 23:34:40 You'd think somewhere on the forever21.com web page they'd tell you where their stores are Dec 17 23:35:07 mhmm Dec 17 23:35:15 how about.. no validation at all Dec 17 23:35:24 and the user faces the problem when connecting Dec 17 23:35:26 is that ok? Dec 17 23:35:49 Ah, there it is, after scrolling all the way down hidden on the bottom amidst many other things Dec 17 23:36:00 some simple validation is often good, because you prevent obvious mistakes like going to "androidcom", but that is pretty much the only way to guarantee handling anything possible. Dec 17 23:36:26 heck, even my (flawed, don't use it) simple regex will fail if they're running a custom dns or something Dec 17 23:36:35 like you can get in business networks Dec 17 23:40:20 <_Auron_> wow, I think GPS is broken on my phone Dec 17 23:40:24 <_Auron_> I can't get it to update at all Dec 17 23:41:45 _Auron_: heh. could be. does something like GPS Status show anything interesting? ( https://play.google.com/store/apps/details?id=com.eclipsim.gpsstatus2 ) Dec 17 23:41:46 so apparently progress bar is not drawn in battery saver mode? Dec 17 23:41:48 lol Dec 17 23:42:37 Afzal: not at all? or just not animated? Dec 17 23:42:56 not at all from my experience, I only noticed in my app though Dec 17 23:43:10 <_Auron_> wait I may have fixed it Dec 17 23:43:13 could it be because it has alpha? Dec 17 23:43:18 huh. could it just be using e.g. the first frame of the animation, which could be blank? Dec 17 23:43:33 that's weird, progerss is an important thing Dec 17 23:43:37 indeterminate btw Dec 17 23:43:51 (I'm not asking for a fix, just sort of complaining about it) Dec 17 23:43:55 hm. I would expect alpha to keep working, it seems like that would break too many things. Dec 17 23:44:06 yeah, and i'm just curious :) I haven't played with battery saver mode much. Dec 17 23:44:09 <_Auron_> no, didn't fix. I even have a location listener and the GPS icon shows on t he notification bar at the top, but I'm still getting a null location.\ Dec 17 23:44:16 <_Auron_> FML. Let me try that app, Groxx Dec 17 23:44:33 _Auron_: or any other app. I just assume other people build better niche apps than I'm capable of :) Dec 17 23:45:12 _Auron_, you're using the new gms location stuff? Dec 17 23:46:57 android sdk tools 24.0.2 bugfix Dec 17 23:47:08 who knows what bugs Dec 17 23:47:14 maybe google doesn't even know Dec 17 23:47:15 <_Auron_> Afzal: not that I'm aware of? Dec 17 23:47:27 try that then Dec 17 23:48:28 <_Auron_> I really don't have time to dig into another API right now Dec 17 23:48:31 <_Auron_> ugh. Dec 17 23:48:42 <_Auron_> I'll do some more testing with this to figure it out and swim in SO for a while. Dec 17 23:50:29 g00s: fixed bug: minor version number too small Dec 18 00:02:28 hi, when i open android studio, it automatically download maven repo which is kinda huge, if i stop the download, it doesn\t respond. is there anyway to turnoff download check from settings, cause i can;t seem to find one. Dec 18 00:03:13 question... if I compile with compileSdkVersion "Google Inc.:Google APIs:19", do I get maps? Dec 18 00:08:23 <_Auron_> magically fixed my GPS problem. hrm Dec 18 00:10:25 Groxx lol :D Dec 18 00:11:04 Hello Dec 18 00:11:10 Does location data increase ad revenue? Dec 18 00:14:23 speaking of gps Dec 18 00:14:30 does location data increase ad revenue? Dec 18 00:16:27 I wouldn't be surprised if it had some minor effect, as you could in theory get more targeted ads. in practice though, no clue. Dec 18 00:24:01 :-| Dec 18 00:24:10 i am thinking of removing it Dec 18 00:24:15 as a requirement Dec 18 00:24:44 less permissions, the better Dec 18 00:24:55 yeah, I'm not fond of permission bloat. Dec 18 00:25:05 can't be helped sometimes, unfortunately Dec 18 00:25:30 My concern is that it's actually hurting things Dec 18 00:25:32 and isn't helped by android's seriously crappy grouping of permissions Dec 18 00:25:43 because I can't set the content rating to "Everyone" Dec 18 00:25:49 but not even sure if I should Dec 18 00:25:57 location prevents "everyone"? Dec 18 00:26:00 yes Dec 18 00:26:14 huh. /me did not know that. Dec 18 00:26:42 https://support.google.com/googleplay/android-developer/answer/188189 Dec 18 00:27:17 Also Dec 18 00:27:21 Here's another fun one Dec 18 00:27:23 "Apps that host any user generated content or enable communication between users" Dec 18 00:27:35 can't have it for anything but medium maturity Dec 18 00:28:14 pretty ridiculous Dec 18 00:28:27 i think i will remove location permissions and see if that increases my rank Dec 18 00:28:30 it's all about rank for now Dec 18 00:29:15 interesting. communication apps seem split on whether they are for everyone or maturity. dunno if google actually cares :\ Dec 18 00:29:49 I don't like the vagueness in this policy Dec 18 00:29:51 it's stupid Dec 18 00:29:53 Agamemnus: hopefully! it would be nice if Google cared about that Dec 18 00:30:17 it's like "P.S.: we can legally shoot you.. but we won't... unless we really want to." Dec 18 00:30:28 yeah. kinda leads you to do whatever and hope you're not noticed, or hope you're big enough to get personal attention when they do Dec 18 00:41:41 so when you say 'adb tcpip 5555' is that telling the device to do something, or the local adb service to switch modes ? Dec 18 00:42:19 g00s: afaik it's telling the device Dec 18 00:42:36 because then you can disconnect the device and `adb connect :5555` Dec 18 00:43:09 hm, k Dec 18 00:43:52 i regret leaving my device plugged in so much, probably killing the battery. and i want to use this 2013 n7 for a while longer, since they didn't come out with any new devices i'm interested in Dec 18 00:44:06 (nexus devices) Dec 18 00:44:26 g00s: yeah, I know what you mean :\ plus I plug in / unplug so many times daily I fear I'll break the usb plug eventually Dec 18 00:44:41 yeah the one on the 2013 n7 is pretty wimpy Dec 18 00:44:44 I use wifi adb fairly often though. works pretty well as far as I can tell. Dec 18 00:45:09 /nick $altnick n4n0byte Dec 18 00:46:08 how does logcat work over wifi adb? Dec 18 00:46:28 can i have some help with compiling a kernel for my g2? Dec 18 00:46:44 not really. we’re app devs, not rom devs Dec 18 00:47:06 s73v3r: just `adb connect` and everything works the same way Dec 18 00:47:11 do you know what the channel is for rom devs? Dec 18 00:47:13 debugging, logging, etc Dec 18 00:47:35 it is a bit slower though in my case Dec 18 00:47:42 we don’t think there really is one, but I think earler someone posted #android-root ? Dec 18 00:47:50 android-dev569: apparently #android or #android-root Dec 18 00:47:53 android-dev569: see also: http://source.android.com/source/community/index.html Dec 18 00:48:14 thx ill check it out Dec 18 00:49:01 g00s: tbh I haven't noticed much slowdown. `adb install` still reports e.g. 4mb/s upload rates regardless Dec 18 00:49:09 g00s: though I'm generally on N networks Dec 18 00:49:30 nice Dec 18 00:49:31 plus, the overall build -> install -> launch cycle is so slow, what's another fraction of a second Dec 18 00:50:00 if there _is_ a slowdown, it's probably visible when debugging + expanding a huge object. but that's horrifically slow already. Dec 18 00:50:25 i wish they would do something about AS memory usage, every time i build it and the gradle daemon grow in memory. after about 20 builds or so i have to retart the ide Dec 18 00:50:46 I'll have to watch for that. I haven't noticed... Dec 18 00:51:01 only have 4 G, so I basically run out of memory Dec 18 00:51:10 yeah, that's a little rough for android dev Dec 18 00:53:26 Groxx everything was great with eclipse / adt - the way i had it set up it never took more than 700mb. but that damn gradle daemon itself bloats up to 700mb Dec 18 00:54:13 but its all good, i'm glad they build system is more powerful now Dec 18 00:54:47 I like this quote " Knowing how to code is like knowing a foreign language. It doesn’t matter much if you have nothing to say." :) Dec 18 00:58:52 what does this mean? "12-17 16:55:29.215 E/AndroidRuntime(24172): java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first." Dec 18 00:58:53 cli; jmp $ Dec 18 00:59:20 im trying to set up a recyclerview for the first time Dec 18 01:00:13 Damn, Napalm is helpful. I ask him a question about something complex and he gives me the code to an entire functioning app in reply. :) Dec 18 01:00:20 how necessary is the viewholder? it seems to be overly complicated Dec 18 01:00:41 drinfernoo: This is way better, IMO: http://blog.xebia.com/2013/07/22/viewholder-considered-harmful/ Dec 18 01:00:49 recyclerview required a viewholder Dec 18 01:00:55 stop peddling that fucking post Dec 18 01:00:59 Some people hate the title of that, but I think the pattern there is nicer than the typical "ViewHolder". Dec 18 01:01:25 JakeWharton: Noobs can learn a lot from that. Dec 18 01:01:39 The typical ViewHolder used by noobs is not a JakeWharton ViewHolder with advanced features. Dec 18 01:01:41 i'm not sure why its so polarizing Dec 18 01:01:46 Their ViewHolder is an unmaintainable mess. Dec 18 01:02:56 why? they have literally the same exact code in both the view holder example and the custom view example Dec 18 01:03:06 im just working off of this: https://developer.android.com/training/material/lists-cards.html Dec 18 01:03:08 the otehr day someone suggested a better crash tool than Crashlytics, but I cant remember what it was. Does anyone know of one? Dec 18 01:03:18 regreddit: bugsnag Dec 18 01:03:28 what's better about it? Dec 18 01:03:40 and ive never used a viewholder or a custom viewgroup before when writing an adapter Dec 18 01:03:45 better exception grouping, mapping, UI, custom metadata Dec 18 01:03:45 yeah! there are /r/android-dev Dec 18 01:04:04 also open source sdk Dec 18 01:04:04 i meant there YOU are Dec 18 01:04:08 nice Dec 18 01:04:18 looks nice, not free, which is fine Dec 18 01:04:25 interesting, does it map obfuscated code back? or is that what you meant by mapping? Dec 18 01:04:31 crashlytics has way too much black magic and voodoo Dec 18 01:04:52 but gives me pretty lame stack dumps that I cant event select parts of Dec 18 01:05:00 i have to copy the whole theing :( Dec 18 01:05:02 regreddit, I'll agree with that. It's a bit too simplistic Dec 18 01:05:11 oh there is "The free plan includes 2,000 errors a month with a 1 user, 1 project limit." Dec 18 01:05:25 and they don't allow a lot of things that could be a manual option, like manually create an issue in github Dec 18 01:05:31 ohhh its probably because ive always just used ArrayAdapter Dec 18 01:05:39 i hope i never see 2000 errors in a month Dec 18 01:05:42 and im guessing that doesnt work with RecyclerVie Dec 18 01:05:45 w? Dec 18 01:05:57 anybody used mixpanel or localytics? Dec 18 01:06:10 g00s: is free, read closer Dec 18 01:06:14 * g00s waiting for squarelytics Dec 18 01:06:29 We use mixpanel right now but localytics' free plan is better and they have A/B testing for Android Dec 18 01:06:47 Afzal: I use Mixpanel Dec 18 01:06:49 JakeWharton: The Adapter.getView override in the first example is much harder to read than that of the second (where it delegates to ContactView.showContact). Dec 18 01:06:52 it's awful, but works Dec 18 01:06:58 I also suspect that it's much easier to maintain. Dec 18 01:07:00 TacticalJoke: so put a method on the view holder Dec 18 01:07:05 JakeWharton, haha, you checked out localytics then? Dec 18 01:07:23 2.5+ years ago. not recently Dec 18 01:08:21 hmm, well I guess then we're both in the same boat then. We are considering switching to it because of higher event limit and android a/b testing. Not sure how other features compare, like user profiles Dec 18 01:08:32 JakeWharton done any more android + kotlin lately ? Dec 18 01:08:36 g00s: no Dec 18 01:08:36 mixpanel is analytics right? not crash detection/reporting Dec 18 01:08:40 regreddit: eys Dec 18 01:08:56 yup Dec 18 01:09:06 i understand that this is for app development however i couldnt find anyone willing to to help me out with understanding how to build an android kernel for my device. if anyone has an up to date guide that they know of, can they pls link it? Dec 18 01:09:44 android-dev569, probably not going to find that here Dec 18 01:09:56 TacticalJoke: https://gist.github.com/JakeWharton/20ec718cd412a75474a6 Dec 18 01:10:01 same. exact. thing. Dec 18 01:10:10 i do run a custom ROM, but have never successfully compiled AOSP and had it boot Dec 18 01:10:32 ok, i just wanted to take a shot at it Dec 18 01:11:19 android-dev569: there's a cm channel that might help... maybe Dec 18 01:11:42 TacticalJoke, does ViewHolder (or a custom ViewGroup) just let you have persistent references to views in a layout? Dec 18 01:11:57 lol Dec 18 01:12:02 ill try that as the rom it is running is cm based, thx Dec 18 01:14:16 and RecyclerView has to have a ViewHolder doesnt it? Dec 18 01:14:57 what real benefit do i get for using recyclerview?? Dec 18 01:15:07 drinfernoo: yes, basically. it enables a logical separation of view lookup (findViewById) and view manipulation (setText, setVisibility, etc.) Dec 18 01:15:24 you can incremental adapter updates, update animations, non-linear layouts Dec 18 01:16:00 what do you mean by "incremental adapter updates"? Dec 18 01:16:46 How can I make and button that looks like this: http://imgur.com/IfFm5Zd I would like the red background stretchable but the black line always 1px thick and start/end 20px in from the sides. Dec 18 01:17:03 because all i really plan on doing is a gridview, possibly staggered, and im not sure how im going to implement animations yet Dec 18 01:17:04 drinfernoo: you can add one item and instruct recyclerview to add one item Dec 18 01:17:05 JakeWharton: Okay, I see your point. Though I think getView is a little different, right? It has to use setTag/getTag with the ViewHolder but not with the custom ViewGroup (though that's probably no big deal). Dec 18 01:17:29 whereas an adapterview is required to recreate and re-bind all views that are visible Dec 18 01:17:48 I think I'll definitely switch to RecyclerView at some point (though not for animations :p). Dec 18 01:18:07 so for lists that arent dynamic, its not really a huge improvement? Dec 18 01:18:29 it is if you want a non-linear, non-uniform-grid layout Dec 18 01:18:34 e.g., a staggered grid Dec 18 01:19:10 Is it a big deal getting list dividers in RecyclerView? Dec 18 01:19:15 I guess they have to be self-drawn. Dec 18 01:20:02 man I'm jealous of whoever made SoundHound Dec 18 01:20:21 app of the century Dec 18 01:22:03 I think another difference between that ViewHolder and that custom ViewGroup is that the latter gets an AttributeSet passed to it. Dec 18 01:22:18 Which can be handy for parsing custom properties, I think. Dec 18 01:23:07 Or is it easy to get the atts thing from a context? I dunno. Dec 18 01:23:09 attrs* Dec 18 01:24:02 I dunno but if I was you I'd listen to JakeWharton Dec 18 01:24:14 that's orthogonal. AttributeSet is those which are defined directly in the XML and yes, you should use a custom ViewGroup for those Dec 18 01:24:32 otherwise, context.obtainStyledAttributes will let you query things on the style/theme/etc. Dec 18 01:25:41 that's true of all views everywhere, regardless of being used in an adapter or not Dec 18 01:25:52 I see. Dec 18 01:26:15 shmooz: Of course I listen. Listening requires analysing. Otherwise it's just, as they say, hearing. :) Dec 18 01:27:02 now where's that reddit app ? Dec 18 01:27:29 we must be real masochists Dec 18 01:28:39 yeah tactical what gives? where be the apk Dec 18 01:28:42 Programming seems pretty masochistic. Dec 18 01:28:48 users look at what you spent years of sweat on and take for granted the good parts and criticize other good parts Dec 18 01:28:49 lasserix: Oh. Forgot. ;o Dec 18 01:29:12 I dunno where to upload, though. Plus, right now, it sucks, and I'd be embarrassed for others to try it. Dec 18 01:29:18 and you gotta compete with other magicians that have millions of apps on the market Dec 18 01:29:46 nobody wants to pay us Dec 18 01:29:46 It sucks mainly in its limited feature set, though. I kinda like how it looks so far. It's "cosy". Dec 18 01:30:32 I was thinking, earlier, that programming could drive someone to insanity. Dec 18 01:30:36 It's enormous stress at times. Dec 18 01:30:40 most mobile dev jobs still expect you to know iOS inside out and android with NDK with 20 years experience Dec 18 01:31:42 they keep wanting more experience than the life of the language itself Dec 18 01:32:40 and they want to pay us peanuts compared to the value we bring in Dec 18 01:32:53 yeah 14 bucks an hour Dec 18 01:33:02 yall getting dogged Dec 18 01:33:36 want $ w/o too many hours? get a corp mobile job Dec 18 01:33:47 matter of fact, any sr. ios need a job? Dec 18 01:33:57 lol Dec 18 01:33:58 how much does it pay? Dec 18 01:33:58 i might be able to help a jr ios too Dec 18 01:34:03 and where is it? Dec 18 01:34:09 palo alto, ca Dec 18 01:34:21 la, ca or seattle, wa might suffice though Dec 18 01:34:36 sure I'll take the job, except I don't know a cent of iOS Dec 18 01:34:55 i missed where the part where I did NOT say "iOS" Dec 18 01:35:10 oh Dec 18 01:35:10 i might be able to do la Dec 18 01:35:20 glendale to be specific Dec 18 01:35:28 remote work? Dec 18 01:35:31 nope Dec 18 01:35:36 *corp* Dec 18 01:35:50 also means not getting gyped on salary too though Dec 18 01:35:58 how much? Dec 18 01:36:06 jr or sr? Dec 18 01:36:14 both Dec 18 01:36:24 sr might not be able to for glendale Dec 18 01:36:46 i'm not in charge of this deicison, but anywhere between 80-115k Dec 18 01:36:53 jr ^ Dec 18 01:37:13 what does a jr do? Dec 18 01:37:23 code? Dec 18 01:37:40 implement stuff, but doesn’t have a lot of input into design or architecture Dec 18 01:37:51 not the final deicison Dec 18 01:38:06 i mean, they’re usually welcome to give their input, but final decision is made by sr guys Dec 18 01:38:53 no takers it seems Dec 18 01:39:19 yall complaining, and everything i see says it's *very* hard to hire qualified guys Dec 18 01:39:42 there's a shortage definitely. i can't think of one qualified guy that's looking for work Dec 18 01:39:44 if I was there and liked what kind of work it would be, maybe Dec 18 01:40:12 i dunno. corportate stuff pays better, but it’s also corporate stuff Dec 18 01:40:19 I’m also not sure if I wanna move that far. Dec 18 01:40:22 but corp mobile stuff Dec 18 01:40:31 not as if it's corp java or corp c# or something Dec 18 01:41:06 oops, forgot the channel i'm in, yeh... android is java... but i meant not corp java server ish Dec 18 01:41:06 where is the position? Dec 18 01:41:18 eh, i’m in a corp mobile gig right now. It’s not like it’s those, but it’s not like indie Dec 18 01:41:29 glendale and palo alto, ca. and seattle, wa Dec 18 01:43:41 s73v3r, true Dec 18 01:49:11 one more question: why am i getting this? 12-17 17:48:27.174 E/AndroidRuntime(3465): Caused by: java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.support.v4.widget.DrawerLayout$LayoutParams Dec 18 01:49:55 ill put up my layout in a second Dec 18 01:49:57 gotta git it Dec 18 01:51:34 It's probably the code that calls LayoutInflater.inflat. Dec 18 01:51:36 inflate* Dec 18 01:51:48 https://github.com/drinfernoo/Cuber/blob/master/app/src/main/res/layout/activity_main.xml Dec 18 01:53:15 its happening when i initially selectDrawerItem(), and it closeDrawer()s Dec 18 01:54:37 drinfernoo: the full stacktrace probably shows useful info Dec 18 01:54:42 it didnt do it until i surrounded that listview with a linearlayout Dec 18 01:57:40 Groxx, https://www.dropbox.com/s/mqutlxxwrxyjpt6/2014-12-17-17-54-49.txt?dl=0 Dec 18 01:58:11 Should I be using Paint.ANTI_ALIAS_FLAT always? Dec 18 01:58:14 FLAG* Dec 18 01:59:35 not sure if it matters for text... Dec 18 02:00:43 In this case, I'm drawing a line and a rectangle. Not sure whether I need it. Dec 18 02:01:52 Groxx, i only added the linearlayout trying to put the drawer under the status bar Dec 18 02:03:13 how do i use a maven project in a gradle project, without maven? Dec 18 02:08:09 drinfernoo: huh. not sure. I haven't done much with drawerlayout though :\ Dec 18 02:08:45 ugh i even took out the linearlayout and its still doing it wtf Dec 18 02:09:09 TacticalJoke: it might make a difference on different resolutions? if you're always doing pixel-aligned stuff with that paint though, I would assume it's faster without it. Dec 18 02:09:22 (since I assume you're drawing lines / boxes in dp) Dec 18 02:20:52 drinfernoo, you don't, you write a new gradle build for it Dec 18 02:21:14 drinfernoo, shouldn't be hard if you don't do anything special in the maven build though Dec 18 02:21:24 pfn, like import into a new project? Dec 18 02:21:37 well, im coding in AIDE, so no maven Dec 18 02:21:53 no gradle either then Dec 18 02:21:59 yeah gradle Dec 18 02:22:23 its had a lot of updates recently, just no maven yet Dec 18 02:23:27 is there some maven thing that isn't handled by adding mavenCentral() as a repository + adding a `compile "maven:artifact:string"` ? Dec 18 02:24:24 it's all voodoo to me, but it appears to download something that at least behaves similarly to the code I requested. Dec 18 02:27:22 TacticalJoke: you can email me the apk Dec 18 02:27:36 AIDE doesnt support pulling from maven idk why Dec 18 02:30:04 oh, right, AIDE. that had only partial gradle support iirc? Dec 18 02:30:38 is it possible they're just pattern-matching gradle scripts, and not actually running groovy code / a "real" grdale? Dec 18 02:31:42 i think youre right, but im not super familiar with gradle, as ive been using eclipse for like 10 years lol Dec 18 02:32:09 all i know is i have a build.gradle, and my project is structured like a gradle project Dec 18 02:32:26 yeah, I'm a gradle n00b too. doesn't help that it takes a year or more to read the gradle documentation, so you can start understanding the android plugin. Dec 18 02:34:08 whenever i add a gradle dependency in my build.gradle, it just says i need to make a local maven repo Dec 18 02:34:20 it doesnt have maven central support i guess Dec 18 02:35:32 how do i make a local maven repo from source then? Dec 18 02:36:15 If I have a custom View, and the user has set android:padding on my view, what's the simplest way of getting that value in code? Dec 18 02:36:55 I'm guessing it involves referring to android.R.attr.padding at some point, but I'm not sure whether to be using Context.obtainStyledAttributes (and, if so, what to pass to it) or not. Dec 18 02:40:26 Oh, I can just use getPaddingWhatever. Dec 18 02:49:12 Hi. Newb here. Any good links for beginners to start? Dec 18 02:49:38 d.android.com :) Dec 18 02:50:05 or more specifically http://developer.android.com/training/index.html Dec 18 02:50:58 g00s thank you, Dec 18 02:51:07 Will check it out Dec 18 02:55:21 cant believe sony caved Dec 18 02:58:19 Ah, man. Need a front-page Reddit posts with huge comments but can't find. ;| Dec 18 02:59:02 post* Dec 18 02:59:46 Ah, AskReddit. :D **** ENDING LOGGING AT Thu Dec 18 02:59:58 2014