**** BEGIN LOGGING AT Wed Feb 25 02:59:58 2015 Feb 25 03:00:29 Damn TacticalJoke the dialog will not change Feb 25 03:00:37 lol that is just one more thing for me to solve, looks neat though Feb 25 03:00:47 Thanks Feb 25 03:01:09 drose379: Y'all are doing it wrong. Feb 25 03:01:17 I am? Feb 25 03:01:53 also: for anyone wondering, converting a project from itellij to eclipse was a really fun time. Feb 25 03:02:02 Trying to remember the steps. It's been a while since I used DialogFragment. Feb 25 03:02:29 shmooz yo usaw an xps 13 at the ms store? does that mean its MS certified machine ? Feb 25 03:02:55 g00s: probably Feb 25 03:03:06 they had both the touch and non-touch Feb 25 03:03:11 i got the impression, everything sold at the store is MS certified - no bloatware Feb 25 03:03:35 and the touch does look much nicer beside the non touch, but I think the non touch is worth the battery Feb 25 03:03:44 drose379: Are you using AlertDialog.Builder? Feb 25 03:03:54 MaterialDialog.Builder Feb 25 03:03:56 So yeah, basically Feb 25 03:04:25 I did this easily before, before I switched over to Fragment Feb 25 03:04:28 Dont know what the problem is Feb 25 03:05:57 God, that class is huge. Feb 25 03:06:02 MaterialDialog. Feb 25 03:06:26 I thought it was gonna be a thin wrapper or something. Feb 25 03:07:21 drose379: You might have to post your attempts. Feb 25 03:07:38 Post my code? Feb 25 03:08:17 Ok wait, Im getting somewhere, I tried addContentView Feb 25 03:08:22 No worries. Feb 25 03:08:37 And it adds an editText, but its not in the dialog Feb 25 03:09:17 Why would it do that Feb 25 03:09:34 Is the acronym ASDK or ADK Feb 25 03:09:38 Mittendeep: This is bad: catch (Exception e) {} Feb 25 03:11:13 TacticalJoke: it's used by pro coders all over the place Feb 25 03:11:45 It's terrible! It just hides bugs from you. :) Feb 25 03:14:37 you just pop a 'There was an Error!' box and call it a day Feb 25 03:15:33 TacticalJoke the simple .addView method works only if I use a LinearLayout from XML and not a programatically created one Feb 25 03:15:36 If there is a programming error (such as a NullPointerException), it's better for the app to burst into flames and die. The sooner that is noticed (whether by the programmer or the user), the better. Feb 25 03:15:44 Can I show you a few lines of code? Feb 25 03:15:53 Yeah. Feb 25 03:15:59 Ok, one min Feb 25 03:16:07 TacticalJoke, catch (Exception e) {tellUs(e); hideFromUser(e);} Feb 25 03:18:19 TacticalJoke whats the difference between the two sections here? http://pastie.org/9980359 Feb 25 03:19:19 I suspect that the key difference is elsewhere. Feb 25 03:19:39 Well If I use the LinearLayout from XML, the addView works Feb 25 03:19:42 knapper_tech: Hmm, do you have a specific example of that being useful? Just curious. Feb 25 03:19:45 If I use the one created with Java, it doesnt Feb 25 03:21:29 drose379: How are you trying to add the view? Also, are you using that ID (lessonDialog) when inflating the XML version? Feb 25 03:21:47 Actually, the second question isn't important. Feb 25 03:22:04 layout.addView() Feb 25 03:23:01 Which works great with the XML layout, but not with the other Feb 25 03:24:06 I think you'd have to post the "other" code here. So many things could be going wrong. Feb 25 03:24:46 TacticalJoke, bare minimum is ship the stack trace back to the creators to enable divine intervention. Feb 25 03:25:14 Ok TacticalJoke I will do that tomorrow, I gotta go for now though Feb 25 03:25:18 knapper_tech: But which code are we wrapping? It's not like we can wrap a main() function or something. :) Feb 25 03:25:24 Thanks for the help Feb 25 03:25:26 Talk to you later Feb 25 03:25:28 The UnhandledExceptionHandler thing might be useful, though. Feb 25 03:25:32 Okay, later. Feb 25 03:26:20 UncaughtExceptionHandler* Feb 25 03:26:38 TacticalJoke, that sounds like a useful class Feb 25 03:29:17 TacticalJoke, it's still good practice =D Saves lines of code, enables rolling back any ongoing UI state, and allows moving on to other 0% complete features before debugging the 37% complete one Feb 25 03:31:14 Maybe I'm unimaginative, but I can't think of a single case where "catch (Exception e)" would be good practice on Android. I'm tempted to say it is always bad. Do you have an example where you feel it's good practice? Feb 25 03:31:55 I mean "catch (Exception e) { /* do nothing */ }". Feb 25 03:32:51 Or the thing you specifically mentioned: "catch (Exception e) { sendReportToDeveloper(e); }" Feb 25 03:33:44 is my samsung s5 with sku smg900vzkv going to work with the "smg900vzkavzw" oem drivers from samsung's page? i cant find the oem drivers for my s5 and there is no perfect match on the model number>:( Feb 25 03:38:34 catch (Throwable t) { /* yolo */ } Feb 25 03:40:34 do you use throwable not exception? Feb 25 03:41:15 Just kidding. :) Though "catch (Exception e) { /* yolo */ }" is about as bad. Feb 25 03:51:06 the only time I ever do that is on an UnsupportedEncodingException for a hardcoded "UTF-8", never heard of that ever failing Feb 25 03:54:24 wow i am so glad i wasted all this time using the terrible AVD's. Trying to figure out why stuff like setText isnt working (when it is) is a really cool way to spend a tuesday night. Feb 25 03:56:10 actually ive been here 14 hours today. ugh Feb 25 03:56:18 wait why is catch (Exception e) bad? Feb 25 03:56:49 you can throw yolos instead like tacticaljoke did above Feb 25 03:59:41 TheKarlBrown: Ignoring all java.lang.Exceptions is dangerous -- it can hide programming errors from us. Feb 25 03:59:56 Ignoring specific exceptions is sometimes sensible, though. Feb 25 04:00:14 I'm still confused about how I should write a service that's performing some prolonged blocking task. Should I spawn a new thread from the service that does the work or should I do all the work in onHandleIntent. If I do all the work in onHandleIntent, will it block anything else from running, or will it block the service from handling other intents? Feb 25 04:18:54 jerkface03: since you mention onHandleIntent, you're probably using an IntentService, which is a little bit different than a normal Service Feb 25 04:19:24 jerkface03: the class description at http://developer.android.com/reference/android/app/IntentService.html describes the model Feb 25 04:19:50 it performs work on a single worker thread Feb 25 04:20:09 so it will handle any incoming work as if it were a queue Feb 25 04:20:32 "All requests are handled on a single worker thread -- they may take as long as necessary (and will not block the application's main loop), but only one request will be processed at a time." Feb 25 04:26:02 <_genuser_> darn it, can't you have a list<> or byte[]s? Feb 25 04:26:24 <_genuser_> any ideas? is there any linked lists, or other lists that will store byte[]? Feb 25 04:27:09 <_genuser_> hmmm, wait, I was wrong. now it's letting me store byte[]s in List<>. Feb 25 05:23:02 The latest version of Firefox has full support for HTTP 2. Feb 25 05:28:15 neat Feb 25 05:28:20 even faster Feb 25 05:34:50 Does videoplayer support rtsp? Feb 25 05:40:44 These buttons both work perfectly, but is there a better way to deal with them than using onClickListener? http://pastebin.com/DZQnn8rJ Feb 25 05:42:00 If you use named classes you can say "next.setOnClickListener(new NextOnClickListener());". Feb 25 05:44:43 I avoid anonymous classes unless the bodies are really short. Feb 25 05:46:36 like this? http://pastebin.com/5yHSQji5 Feb 25 05:48:18 nevermind class != method Feb 25 05:49:20 No, like this: http://pastebin.com/E1dtRBQS Feb 25 05:57:36 That looks a hell of a lot better. Thank you! http://pastebin.com/z5m25Rs3 Feb 25 05:58:27 mittens, why the try / catch ? Feb 25 06:00:23 leftover from my previous attempt at implementing buttons. I have only been looking at bad examples apparently Feb 25 06:01:30 You can replace "index = index - 1;" with "index--;". Same with the + one. Feb 25 06:02:24 is a global index the best way to navigate? Feb 25 06:02:34 not global, but classwide Feb 25 06:03:03 I think it'd have to be a class field, yeah. Feb 25 06:03:08 s/class field/field/ Feb 25 06:03:45 what do you mean when you do the "s/class/ field/field"? Feb 25 06:04:05 Search for "class field" and replace it with "field". Feb 25 06:04:08 In my message. Feb 25 06:06:10 Mittendeep: it comes from (among other things) the sed search and replace syntax Feb 25 06:06:46 (http://en.wikipedia.org/wiki/Sed) Feb 25 06:07:28 So my understanding of the GPL license is that if I modify the source I need to open source it and in it's compiled form it can be distributed however. Am I correct? If so, can I use a compiled dex of the code and not open source my whole app? Feb 25 06:08:12 surf2b1: It's a complicated question but the bottom line is that you should stay away from the GPL as much as possible Feb 25 06:09:34 g00s: Is there anything cool in 1.1.1? Feb 25 06:09:52 JesusFreke and TacticalJoke: That looks like it could be useful, I have never heard anyone use it before though. Feb 25 06:10:31 it's a common irc-ism, for "modifying" something you said earlier Feb 25 06:10:41 or something someone else said Feb 25 06:11:21 s/someone else/I/ Feb 25 06:11:23 :D Feb 25 06:11:34 It'd be cool if it worked on everyone's client. Feb 25 06:11:39 heh Feb 25 06:11:52 im using hexchat Feb 25 06:12:04 I've never seen a client on which it works, FWIW. Feb 25 06:12:06 running arbitrary regular expressions seems... a bit risky :) Feb 25 06:12:24 CedricBeust: yeah. I want to stay away from using it. However, I need to auto detect encoding and was thinking of using this project: https://code.google.com/p/juniversalchardet/ Then just adding it as a dex and using DexClassLoader to call the method. Feb 25 06:12:51 It's funny how the GPL *forces* freedom upon you. Feb 25 06:13:02 "But I don't want to be free!" Feb 25 06:13:07 surf2b1: The license on that project says Mozilla Public License, though, not GPL? Feb 25 06:13:11 "Too bad. You're free now." Feb 25 06:13:19 TacticalJoke: Yeah, GPL is the radical opposite of freedom Feb 25 06:13:20 Goodnight friends. Feb 25 06:13:33 Good night. Feb 25 06:13:55 Yeah.. IDK. License says: Version: MPL 1.1/GPL 2.0/LGPL 2.1 o.O Feb 25 06:15:39 I'm not familiar with MPL, but a brief perusing of the wikipedia article suggests you should be fine Feb 25 06:16:04 you only have to "release" the specific pieces of code that were under the MPL Feb 25 06:16:42 IANAL, side effects may include death, etc. etc. Feb 25 06:17:08 thanks Feb 25 06:17:18 TacticalJoke maybe we'll find out some day :) Feb 25 06:17:42 had to look up what IANAL meant. haha Feb 25 06:18:06 Anyone familiar with live streaming of video in android? If the videoview doesn't support a codec, is it possible to transform it so that it can play using ffmpeg or something? Feb 25 06:18:31 lasserix did you look at exoplayer Feb 25 06:18:45 Hmm, it might just be the top eight of these: https://android-review.googlesource.com/#/q/status:merged+project:platform/tools/base+branch:studio-1.1-release Feb 25 06:20:02 lasserix, the typical practice is to draw to your own surface Feb 25 06:20:09 rather than using video view Feb 25 06:20:15 pfn what do you mean? Feb 25 06:20:17 <_genuser_> JesusFreke: lol, a "lawyer" disclosing sideeffects... Feb 25 06:20:25 <_genuser_> I knew I liked this guy.... Feb 25 06:20:34 like read the stream into a buffer and push each frame into surface? Feb 25 06:20:39 lasserix, ie you don't just transcode to a format video view understands Feb 25 06:21:54 Haha. reddit has introduced new rules to prevent The Fappening 2.0. Feb 25 06:22:09 http://www.reddit.com/r/announcements/comments/2x0g9v/from_1_to_9000_communities_now_taking_steps_to/ Feb 25 06:25:58 g00s oh boy Feb 25 06:26:02 <_genuser_> TacticalJoke: what is the fappening. read about it on yahoo, never figured out wth it is. Feb 25 06:26:38 I forget the details, but basically a bunch of celebrities had nude pics of them leaked on the Internet. Feb 25 06:26:45 I guess it was 4chan or someone? Totally forget. Feb 25 06:27:04 <_genuser_> oh so basically the nude pic release is termed "the fappening" as an event? Feb 25 06:27:21 _genuser_: fap = jacking it Feb 25 06:27:24 It's this: http://en.wikipedia.org/wiki/2014_celebrity_photo_hack Feb 25 06:27:36 fappening = world jacking it to nudes released Feb 25 06:27:48 maybe a meme by southpark i think Feb 25 06:28:12 <_genuser_> lasserix: oh I see. that makes sense. I read it on the news and it always had a tone to it. fappening *snicker*. Feb 25 06:29:06 <_genuser_> I have never been to 4chan, altho read about it quite a bit from various events. Feb 25 06:29:12 Same here. Feb 25 06:29:46 <_genuser_> It always seems like a site that authorities are always targeting. I figured, do I really need to explain to the FBI why I was in a place where they were bullying some 12yo kid online.... Feb 25 06:30:58 <_genuser_> dang, my laptop has gotten so bad, just launching vmware on it overheats it and it shuts off. Feb 25 06:31:29 Is the vent blocked? Feb 25 06:31:34 Or is the fan dusty? Feb 25 06:31:47 maybe take some compressed air and blow some gunk away Feb 25 06:31:53 <_genuser_> TacticalJoke: someone mentioned that my heat sink solution might have melted off. Feb 25 06:32:07 I had a motherboard melt when mine kept shutting off because of heat. Feb 25 06:32:20 <_genuser_> I used it for virtualcoin mining for a bit, so it was constantly running _hot_. Feb 25 06:32:32 You can get "cool boards" to sit laptops on. Feb 25 06:32:34 <_genuser_> now, I have to blow a box fan on it, or it won't do anythign more than notepad. Feb 25 06:32:44 Or any board at all that elevates it so that the vent isn't covered. Feb 25 06:32:55 <_genuser_> TacticalJoke: yeah, that or someone mentioned redo-ing the heatsink paste on the affected areas. Feb 25 06:33:10 <_genuser_> it's vented nicely and has a proper laptop table for it. Feb 25 06:33:17 Ah, okay. Feb 25 06:33:25 You should just move to England. It's always freezing here. :D Feb 25 06:33:39 <_genuser_> heh, it's snowing here in Dallas this week too. Feb 25 06:34:01 Damn. We had only a little. Feb 25 06:34:13 <_genuser_> I remember when it was winter and I was mining, my room was constantly 92F. even if it was freezing otuside. Feb 25 06:34:28 i think DFW was one of the nastier airports i've been to Feb 25 06:34:36 <_genuser_> I used to be running the air conditioning just to cool off the room. Feb 25 06:34:46 <_genuser_> g00s: oh you hates teh dfw? Feb 25 06:35:03 its been a few years though Feb 25 06:35:23 If you hate the sun and blue skies, England is the place for you! Feb 25 06:35:45 <_genuser_> they're redoing is slowly. (DFW) Feb 25 06:36:23 <_genuser_> it's my home airport so I know the least about it naturally. I am familiar with other airports a lot more due to travelling for work. Feb 25 06:38:56 <_genuser_> oh? not enough physical memory is avialable to power on this virtual machine. and it used to work fine before. Feb 25 06:39:07 <_genuser_> wonder if the laptop mem is going out Feb 25 06:41:29 <_genuser_> lol available 1.5G. (It's supposed to have 2.86G usable). Feb 25 06:43:31 JesusFreke oh boy, i get to use ragel again :| this protocol is going to be a pain, have to ack/nack packets, catch sequence order problems .... Feb 25 06:44:18 for me its more fun than playing with android UI crap though Feb 25 06:44:23 g00s: Are you actually implementing the video streaming protocol? Feb 25 06:44:29 which is like, one step above web dev Feb 25 06:44:41 CedricBeust no, its a custom protocol tunneled through BLE Feb 25 06:44:57 g00s: Still crazy. Why not use something like webrtc? Feb 25 06:45:09 oh this is for sensor data Feb 25 06:45:37 i didn't make this protocol up Feb 25 06:46:34 basically the have 2 characteristics, a read buffer and write buffer, and thats about the extend of the BLE :D Feb 25 06:46:50 Hmm, my Activity's onWindowStartingActionMode override doesn't get called when the user long-presses text in an EditText. :/ Feb 25 06:47:04 I need to override their behaviour (because I'm using Toolbar without setSupportActionBar). Feb 25 06:47:56 Noob here. Why doesn't http://pastie.org/9980557 show any text when I run it? Feb 25 06:48:13 MainActivity is the one generated by Android Studio. Feb 25 06:48:39 tcmzeal: PACKAGENAME?!? Feb 25 06:49:09 Heh, that's just for the paste Feb 25 06:49:34 JesusFreke how hard to you think it would be to make a syntax highlighting mode for ragel / in IntelliJ? vim has one Feb 25 06:56:41 tcmzeal: You're not referencing your view subclass in your XML file. Feb 25 06:57:02 Does that throw an exception at run time? You're using "view". Feb 25 06:57:24 Unless that, too, was redacted. Feb 25 06:58:00 <_genuser_> great, run mem check, we'll show you results after boot. after boot? nothing. Feb 25 06:58:24 That reminds me of Gremlins: Gizmo can't eat after midnight. Isn't it always after midnight? Feb 25 06:58:39 no water too right ? Feb 25 06:58:52 Yeah. I think no water ever. Poor guy can't wash or anything. Feb 25 06:58:58 Or even exist, I guess. Feb 25 06:58:59 Nope, no runtime errors. Feb 25 06:59:18 tcmzeal: You need to replace "view" with "your.package.name.FieldView" in that XML file. Feb 25 07:00:03 Wait. Feb 25 07:00:05 I missed something. Feb 25 07:01:10 hey thepoosh Feb 25 07:01:40 I guess that class="" thing is the equivalent. Hmm. Feb 25 07:01:58 In that case, maybe it's the wrap_content thing. Feb 25 07:02:45 Still no errors afaict. Feb 25 07:02:58 tcmzeal: Are you seeing that background colour at all? Feb 25 07:03:18 Yup, I set the background to green to make sure it's displaying. Feb 25 07:04:22 I suppose it'd be better to describe my end goal - I'd like to tap the screen and have a circle or whatever pop up where I tapped. Feb 25 07:04:33 No idea if this custom view business is the right way to go about it. Feb 25 07:07:19 As for your current situation, I think I would try this: Replace 'view' with 'PACKAGENAME.edwardsfootballthing.FieldView' and remove the class= thing if you haven't already, and set layout_width and layout_height to match_parent. Feb 25 07:09:46 Okay, http://pastebin.com/iAuMDFFU is what I have now. Running now, just a sec... Feb 25 07:09:55 BTW, I'm running this in an emulator, not an actual phone. Feb 25 07:10:39 Remember to replace 'view' in the XML file. Feb 25 07:12:26 g00s: hey sup? Feb 25 07:12:28 Yup, aaaand... nothing. Feb 25 07:12:52 With onDraw, is the Canvas argument just sort of built in to the View, or should I actually instantiate a Canvas somewhere? Feb 25 07:12:54 tcmzeal: try genymotion Feb 25 07:13:03 thepoosh not much Feb 25 07:13:27 CedricBeust do you think using kotlin results in weird enough bytecode it becomes more difficult to understand than java (for reversing) ? Feb 25 07:13:34 tcmzeal: Is your colour filling the screen now? Feb 25 07:13:40 No, you don't need to instantiate a Canvas. Feb 25 07:13:47 Just use a real device, stay away from the emulator or whenever you see a bug, you'll never be sure if it's the emulator or your code Feb 25 07:14:05 Yeah, I get the action bar up top and then nothing but green. Feb 25 07:14:06 g00s: Hasn't been my experience, the debugger works just fine Feb 25 07:14:11 Okay. Feb 25 07:14:25 I would try adding Log.i("tcmzeal", "onDraw"); in onDraw. Feb 25 07:14:27 Then look at LogCat. Feb 25 07:14:34 See whether it's even running. Feb 25 07:18:20 Can't find it, but I'm not sure if I'm looking in the right spot. Feb 25 07:19:01 Disable all filters and search for onDraw or the other string. Feb 25 07:20:51 Nope, nothing. Hmm. Feb 25 07:21:25 I guess if you really wanna be sure you can do this in onDraw: throw new RuntimeException(); Feb 25 07:21:30 g00s: just syntax highlighting shouldn't be too hard Feb 25 07:22:57 Lol, giving that a go now. Feb 25 07:24:26 if an async task is running in an activity and that activity is paused, then what will happen to the async task? will it be cancelled? Feb 25 07:24:49 Okay, that's weird, I get the green, no runtime error. Feb 25 07:25:09 tcmzeal: Did you replace 'view' with 'foo.FieldView'? Feb 25 07:25:33 Feb 25 07:26:35 hey Feb 25 07:26:39 Oh, /that's/ what you meant... sorry, giving that a spin now. Feb 25 07:27:08 TacticalJoke question about version control - how do you handle long lived feature branches ? Feb 25 07:27:53 The Mercurial team uses named branching for that, but I prefer bookmarks (basically Git branching -- pointers to heads). Feb 25 07:28:06 Named branching = permanent branch-name metadata. Feb 25 07:28:40 as the rest of the project is going on, then do you back-merge integration branch back into the feature branch so it can track the project ? Feb 25 07:28:41 They use 'default' and 'stable' for 'master' and 'stable'. And they bake the names in. It's kinda cool, but I much prefer the simplicity of bookmarks. Feb 25 07:30:39 guys Feb 25 07:31:56 I am trying to get Marquee working on multiple scroll views Feb 25 07:31:59 https://github.com/ludkiller/Hackaday/blob/master/release/Hackaday-Debug.apk Feb 25 07:32:45 text views* Feb 25 07:32:57 g00s: Hmm, trying to understand your use of 'integration branch'. I basically always have loads of feature branches which are rebased on top of the master/stable branch. I rebase a lot and try to keep things as simple as possible. Feb 25 07:33:12 https://github.com/ludkiller/Hackaday/blob/master/app/src/main/java/com/rawcoders/hackaday/Utility/ScrollingTextView.java Feb 25 07:33:15 Nope, nothing, TacticalJoke Feb 25 07:33:19 TacticalJoke http://martinfowler.com/bliki/FeatureBranch.html Feb 25 07:33:32 https://github.com/ludkiller/Hackaday/blob/master/app/src/main/res/layout/blog_list_item.xml Feb 25 07:33:46 individual item layout Feb 25 07:33:57 I... yeah, I'm lost. If you were trying to implement that sorta thing from scratch, how would you approach it? Feb 25 07:34:41 help :P\ Feb 25 07:35:06 gmoro g00s Feb 25 07:35:12 i dont like kotlin :( Feb 25 07:35:21 tcmzeal: Would you mind pasting the Java and XML code again? It's bizarre that onDraw isn't being called at all. Feb 25 07:35:24 hey lemonxah :( what happened :( Feb 25 07:36:01 nothing really i just like scala more to be honest i dislike the way kotlin does pattern matching Feb 25 07:36:21 what i think is kotlin is better if you coming from java to get a better language Feb 25 07:36:24 you will pick that up faster Feb 25 07:36:34 TacticalJoke: http://pastebin.com/cmhXhRtN with MainActivity.java for good measure. Feb 25 07:36:43 I've stopped caring about removing my package name :P Feb 25 07:36:45 but as a langauge scala is more mature Feb 25 07:37:15 anyone? Feb 25 07:37:47 lemonxah yeah, scala has been around for a while now Feb 25 07:38:03 yeah just saying like i can feel kotlin isn't done yet Feb 25 07:38:12 it will get better i am sure Feb 25 07:38:17 kotlin is not 1.0 yet, but it's been in development for 4 years Feb 25 07:38:26 scala is older but I'm not sure how much more mature it is, to be honest :) Feb 25 07:39:06 feel free to comment Feb 25 07:39:21 ludkiller, will take a look just now .. Feb 25 07:39:48 :3 Feb 25 07:39:50 CedricBeust, it deffinately feels more mature right now Feb 25 07:40:01 i am not sure how much more but i do still prefer it Feb 25 07:40:15 tcmzeal: Hmm. One thing you could try is throwing a RuntimeException in the constructor of FieldView too. Feb 25 07:40:17 although getting into scala vs getting into kotlin i would say kotlin wins this hands down Feb 25 07:42:11 Exception-driven debugging. Feb 25 07:42:30 g00s, looking at http://kotlinlang.org/docs/reference/comparison-to-scala.html Feb 25 07:42:52 Doesn't everyone hate Scala because it's too complex? Feb 25 07:42:55 the first point the implicit paramters and implicit conversions .. i know its evil if used incorrectly but i do tend to use it Feb 25 07:43:05 TacticalJoke, i am a complex kinda guy :) Feb 25 07:43:12 honestly i love scala Feb 25 07:43:15 "It's complicated." Feb 25 07:43:26 Scala is an interesting intellectual tool but not exactly practical Feb 25 07:43:47 i tend to agree with that Feb 25 07:44:11 tcmzeal: I hate when people's problems aren't solved. Argh. :D Feb 25 07:44:14 It's like an OCD thing. Feb 25 07:44:14 but i am over writing mind numbing java code i cant get myself to do it Feb 25 07:45:40 ludkiller, ok i have looked at those 2 files you pasted Feb 25 07:45:46 i dont see any real code Feb 25 07:46:27 lemonxah, https://github.com/ludkiller/Hackaday/blob/master/app/src/main/java/com/rawcoders/hackaday/Blog/BlogEntry/BlogEntry.java Feb 25 07:46:45 check the getView Feb 25 07:46:51 Argh, same green rectangle with no issues, TacticalJoke. Feb 25 07:47:01 ScrollingTextView is supposed to be marquee Feb 25 07:47:09 I'm beginning to think it's Android Studio's fault for somehow not keeping track of the changes I'm making? Feb 25 07:47:11 tcmzeal: It's not even calling the constructor? Feb 25 07:47:31 Try changing the background to #FF0000. See whether it takes effect. Feb 25 07:47:33 No, apparently not. Feb 25 07:48:17 lemonxah, there's not much to it Feb 25 07:48:34 I just need multiple text views that can marquee Feb 25 07:48:36 CedricBeust, have you done scala yet? i like solving problems in a different way and with scala i have to solve more cause i tend to maybe overcomplicate the solutions but i am having so much fun doing it the functional way :) Feb 25 07:48:49 lemonxah: I started studying Scala circa 2007 Feb 25 07:48:55 ludkiller, i will have to try a demo of that :) Feb 25 07:49:00 cool yeah Feb 25 07:49:02 Funny... I found a preview pane for the XML file Feb 25 07:49:04 I love Kotlin's simplicity. Feb 25 07:49:07 i only started 2012 i thing Feb 25 07:49:11 and this is my first app so sorry for inconsistency of the code. Feb 25 07:49:17 I feel like someone could learn Kotlin in a day. Feb 25 07:49:19 think** but i have done haskel a bit and F# Feb 25 07:49:19 While rendering the preview, AS hits the errors, but in the emulator, nothing. Feb 25 07:49:25 lemonxah, https://github.com/ludkiller/Hackaday/tree/master/release Feb 25 07:49:36 is the latest packed apk Feb 25 07:49:38 Running now. Feb 25 07:49:55 not that kind of demo ludkiller :) i meant writing a quick example of marquee text to see if it works in its simplist form Feb 25 07:50:10 before puttin it in a containerview Feb 25 07:50:16 lemonxah, well my current version works but when the focus is lost Feb 25 07:50:19 and regained again Feb 25 07:50:23 which is weird Feb 25 07:50:23 :3 Feb 25 07:50:37 and yes marquee works you can try it out Feb 25 07:50:51 startActionMode and startSupportActionMode aren't being called when I override them in my activity. But onSupportActionModeStarted is. :/ Feb 25 07:50:53 so you saying when you loose focus it stops working? Feb 25 07:50:59 no Feb 25 07:51:19 I start the app, I pull down the notification bar , and slide it up again and it works Feb 25 07:51:32 so when it regains focus it works Feb 25 07:51:35 else it doesn't Feb 25 07:51:38 hmm Feb 25 07:51:44 So I deleted it from the XML file and tried to add another. Feb 25 07:51:59 This time it just won't render- I mean, I can position it, I just think it has a width and height of 0 Feb 25 07:52:04 have you tried setting focus programmatically? Feb 25 07:52:13 I'd remove the onMeasure thing. Feb 25 07:52:23 morning Feb 25 07:52:26 only one object can be focused at a time right ?> Feb 25 07:52:45 yeah but set it to something else and then to the container view Feb 25 07:52:51 or something like that to see if that is the issue Feb 25 07:52:58 sorry i have not had this issue before Feb 25 07:53:03 just trying to pinpoint the issue Feb 25 07:53:24 also why are you only calling super.onFocusChanged when it is focused? Feb 25 07:53:47 so when it looses focus you are not calling the focuschanged Feb 25 07:54:01 what is your reasoning behind that? Feb 25 07:54:16 Aaargh, screw it, I'm starting completely fresh. Feb 25 07:54:22 lemonxah, I copy pasted it Feb 25 07:54:41 Okay, back to the hello world. Feb 25 07:54:42 lemonxah, http://stackoverflow.com/questions/8455915/android-multiple-textview-marquee Feb 25 07:56:22 oh ok Feb 25 07:56:59 anyone who has experience setting up the Ivona service on an android app? Feb 25 07:57:02 as your activity / frament starts set the focus explicitly to the listview Feb 25 07:57:16 http://www.ivona.com/ * Feb 25 07:57:28 it does ? Feb 25 07:57:38 no i mean try it Feb 25 07:57:58 ok Feb 25 08:00:50 I added mLisView.requestFocus() in onCreateView Feb 25 08:00:56 doesn't seem to work Feb 25 08:01:32 hmm Feb 25 08:01:41 ok give me a few minutes to build this out Feb 25 08:02:17 oh wait Feb 25 08:02:36 nope nothing Feb 25 08:28:16 hey JakeWharton you're in this video http://realm.io/news/joaquim-verges-making-falcon-pro-3/ Feb 25 08:28:19 as Jake Warden Feb 25 08:28:20 haha Feb 25 08:28:47 hmm Feb 25 08:29:04 the guy talks about how he rewrote falcon pro in 3 weeks Feb 25 08:29:12 starts off with the 4 square libs Feb 25 08:29:41 then mentions you a little, thats it Feb 25 08:29:55 i saw the slides a week or two ago Feb 25 08:30:46 Odaym question, in the nordic semi "master control panel" app, they added "bulk operations". I notice that these are running faster than my reading one characteristic after another - do you think they did anything special ? Feb 25 08:31:09 i'm on 4.4.4 so they could not have set the connection priority afaik Feb 25 08:31:14 you are sending them read in the bulk? Feb 25 08:31:28 me? how do you read bulk ? Feb 25 08:31:51 I mean are you sending the same operations in bulk as you are when its not in bulk and in bulk it performs faster? Feb 25 08:32:00 the app - what they are calling bulk reads, i'm not sure about their implementation Feb 25 08:32:19 depends what it takes to do it, you'll know what its trying to do Feb 25 08:32:21 what do you give it Feb 25 08:32:31 Odaym see thats what i dont get - what is "bulk" is that just some bs thing in the nordic app ? Feb 25 08:32:45 i've never heard of bulk in BLE Feb 25 08:32:51 well nothing is really "bulk", the spec is 20 bytes Feb 25 08:32:57 cant go over that I think? Feb 25 08:33:04 oh sure, thats correct Feb 25 08:33:16 maybe it reads from all the characteristics Feb 25 08:33:39 this isn't about reading a bunch of data from one characteristic, they are enumerating all the chars on the device and reading them quicker than I can Feb 25 08:33:50 Odaym: the most useful thing from this is that I learned that I can synchronize speakerdeck slides to a video! Feb 25 08:34:10 good, something non-code learned Feb 25 08:34:14 :) Feb 25 08:34:21 thanks for the link though. will watch at some point (beyond the first 5m) Feb 25 08:34:40 you should give a talk like that; if he is adequate to lecture on how awesome he is, you should be too Feb 25 08:40:32 <_genuser_> lol asian dramas. a guy is tailing a secret service agent using a red mercedes. nothing suspicious Feb 25 08:44:41 derr herr, should I be using pointers in Java? just got an NPE while using a HashMap on an object I passed around all over the place Feb 25 08:45:13 you can't use pointers as a programmer in Java Feb 25 08:45:58 nullpointer means that thing was not initialized somewhere, or didnt get to be passed to the function inside which it failed Feb 25 08:46:01 <_genuser_> the man has a point. if there's not pointer, why does it say nullpointerexception. never thought about it before. that's kinda confusing for newbies. Feb 25 08:46:03 oops why bold Feb 25 08:46:15 its reporting what it faced Feb 25 08:46:38 <_genuser_> true that. just thought it might be confusing for new comers. probably NullObjectException would have been better. Feb 25 08:46:50 inside, it might very well have been using them, so it says that, but it shouldnt tell me what its doing, thats its business :P it should say how I should remedy it Feb 25 08:46:54 NullReferenceException Feb 25 08:47:15 <_genuser_> right, I like NRE too. Feb 25 08:47:38 <_genuser_> just goes to show it was designed by developers. never put ourselves in the users' shoes. Feb 25 08:47:42 "null object" is almost oxymoron. null is the absence of an object Feb 25 08:48:19 <_genuser_> yeah, that's why I like the NullRefrenceException because it's actually clarifies that your object references is null. Feb 25 08:48:47 maybe that's the billion-dollar mistake... naming it wrong Feb 25 08:48:54 But is it the reference that is null or what it points to ? :D Feb 25 08:49:04 Feynman says that, that people tend to name things wrong Feb 25 08:49:04 Tracking down where I sourced the object from. I'm throwing view models between the view and some controllers. Feb 25 08:49:10 everywhere Feb 25 08:49:30 <_genuser_> ugh, model view controller? Feb 25 08:49:46 That's what the renaming option is for in AS refactor menu Feb 25 08:50:15 I just got through cleaning up some code this weekend; "dawg, what name has thought thou semantic what?" Feb 25 08:50:51 he used to give the example of a computer, that it never really computes anything Feb 25 08:50:54 more like data handler Feb 25 08:51:14 <_genuser_> command executor Feb 25 08:51:22 he swould surely have called phones tracking devices :) Feb 25 08:51:50 + Feb 25 08:51:50 <_genuser_> Feynman? who be that? Feb 25 08:52:07 physicist who appealed to common people Feb 25 08:52:12 knew how to speak simply Feb 25 08:52:42 <_genuser_> oh I have missed out on all the Bill Nye, Neil Degrasse Tyson and other Britney Spears of TV education. Feb 25 08:52:57 nah Feynman is another class altogether Feb 25 08:53:03 <_genuser_> unless this feynman feller was a real deal. Feb 25 08:53:04 rarely spoke of science actually Feb 25 08:53:04 Feynman, phyicist who gave us quantum Feb 25 08:53:24 <_genuser_> shows you how narrow my knowledge strip really is. Feb 25 08:53:29 <_genuser_> I barely know who Stallman is. Feb 25 08:53:31 its just a guy Feb 25 08:53:32 .. Feb 25 08:53:38 Well, the object I think I'm passing in does indeed have an object where later I discover null Feb 25 08:53:45 not knowing him is not something mentionable :P he's already long gone Feb 25 08:54:07 <_genuser_> Odaym: sure. just nice to be aware of what's going on around. and who's contributing what, etc. Feb 25 08:54:40 here, see this https://www.youtube.com/watch?v=EKWGGDXe5MA Feb 25 08:54:50 he explains a computer to some people Feb 25 08:55:31 <_genuser_> so cool how the new generation that grew up with computer just takes it for granted and we don't have to explain the internet to them. Feb 25 08:55:36 _genuser_, Stallman is so far off course from being effective... Feb 25 08:56:05 the internet and the state of things right now is all simplified and made ultra user friendly.. Feb 25 08:56:15 Stallman is kind of just a crazy guy anymore. Feb 25 08:56:16 eyup Feb 25 08:56:18 doesnt mean this generation are smarter, things are just easier to understand at the outward facing level Feb 25 08:56:20 <_genuser_> knapper_tech: he's super paranoid. I read once he doesn't even use a proper browser because he thinks they're all tracking him. Feb 25 08:56:38 let your kid learn to program, hes not going to breeze through it :P hes gonn face the same shit programmers face Feb 25 08:56:39 <_genuser_> knapper_tech: but he did make some contributions towards c/c++ so I heard of him in that context. Feb 25 08:57:02 _genuser_, it's not paranoia. He's 100% glued to a set of principles that are incompatible with reality. Feb 25 08:57:15 <_genuser_> Odaym: easier to under and it's somewhat easier to program too. honestly all these people learning to program in "HTML" from online courses and then saying it's not too hard. Feb 25 08:57:37 <_genuser_> Odaym: give them an assignment to write something that can scale and watch it come back to "we need mroe servers" Feb 25 08:58:02 nah man Feb 25 08:58:09 doing anything significant with anything, is hard Feb 25 08:58:32 <_genuser_> knapper_tech: maybe. at least he has principles and sticks to them. but I only read about him that one time. that's about it. I don't really follow him. Feb 25 08:58:57 I'm incorrectly using some type parameterization Feb 25 08:59:27 Java != Haskell =D...just gotta figure out how to handle parameterization or punt and use Object Feb 25 09:01:01 Alright, I see what's up. I'm implementing command pattern and need a bunch of commands that are just holding objects so that I can find corresponding views in hashmaps and obliterate them with neat animations Feb 25 09:01:16 Type cast seems to be failing Feb 25 09:01:21 <_genuser_> patterns. seems like you're pretty high up in patterns. Feb 25 09:01:29 Command is actually useful Feb 25 09:02:24 <_genuser_> I suppose. I'm not really arguing against them. just heard you mention 2 different patterns and thought you might be a fan. Feb 25 09:02:46 I' Feb 25 09:03:20 I've read the GoF book, but can't forget that Observable and Iterable were given completely separate treatment in that book. Feb 25 09:03:50 and then ReactiveX and so on... those patterns were useful for a machine's kind of polymorphism present in C++ Feb 25 09:04:30 But okay. I want to have Undo commands that hold data models simply to use as HashMap keys back to views. Feb 25 09:04:47 <_genuser_> embarrassing, but the last book I read on computers was.... I think Delphi Graphics in early 2000s. That was only the second book I ever bought on CS outside of school. Feb 25 09:04:55 Is there any reason whatsoever to use parameterized types if I know for a fact I'm just HashMap spamming? Feb 25 09:05:11 <_genuser_> I quit buying and reading books on CS after that. Online resources really started picking up in late 90s. Feb 25 09:06:32 if my company is successful, I hope we can continue the trend of awesomely better info availability Feb 25 09:06:57 f&*@ types. Today my Java is Python Feb 25 09:08:16 ludkiller, sorry for the long wait i had to do actual work there for a bit but i will still trying this Feb 25 09:16:42 Presto Feb 25 09:16:49 Remove a dimension of the problem Feb 25 09:18:00 I had re-created some fields on a subclass so I broke the type cast Feb 25 09:18:14 Don't know why that's legal in the first place Feb 25 09:21:16 lemonxah, take your time Feb 25 09:24:34 Morning All Feb 25 09:28:59 ludkiller there is something else wrong Feb 25 09:29:14 lemonxah o/ Feb 25 09:29:19 hi kevel Feb 25 09:29:24 How much rxjava/rxandroid have you used? Feb 25 09:29:36 not that much since i use scala Feb 25 09:29:44 lemonxah, ? Feb 25 09:29:45 i know scala can use rxjava Feb 25 09:29:53 well I already told you how it works Feb 25 09:29:54 :3 Feb 25 09:29:55 :P Feb 25 09:29:57 but i use other constructs Feb 25 09:29:58 theres rxscala for u btw Feb 25 09:30:43 ludkiller, no i mean i made an example app and what seems to happen is focus going away at some point and i cant get it back at all Feb 25 09:30:51 sometimes it takes minutes other times seconds Feb 25 09:31:00 ah Feb 25 09:31:15 did you used TextView Feb 25 09:31:22 or the one I used ScrollTextView Feb 25 09:31:33 i made a scrolltextview similar to yours Feb 25 09:31:40 I see Feb 25 09:33:22 ludkiller, i got it to work Feb 25 09:33:27 if you dont touch the screen Feb 25 09:33:47 nvm this seems to be working Feb 25 09:33:49 ludkiller, try this Feb 25 09:34:16 instead of saying if (focused) super.onWin/Focu..(true/,..) Feb 25 09:34:31 take the if out make the value true Feb 25 09:34:49 hmm Feb 25 09:34:56 its very sketchy Feb 25 09:35:44 sketchy ? Feb 25 09:35:53 or is it lagging ? Feb 25 09:37:39 sketchy is not really working Feb 25 09:37:45 let me try something else Feb 25 09:38:17 https://gist.github.com/ludkiller/35bff720fc914cca5d97 Feb 25 09:38:27 yep I tried that Feb 25 09:38:30 it's not working Feb 25 09:38:47 although it works if I lose focus and regain Feb 25 09:44:36 hello. Any dagger experts here? Feb 25 09:45:34 itwenty: yes Feb 25 09:45:44 But going to bed Feb 25 09:46:02 Ask again in 6 hours? Feb 25 09:47:11 Ok. :( Feb 25 09:47:42 hi, does anybody know, is the shared preference storage "slow", ie, would it be worth my time to build a cache inside my app to only read the settings once unless they change? Feb 25 09:47:54 what is the best way to get the rootview of an activity? Feb 25 09:48:05 getWindow().getDecorView().getRootView()? Feb 25 09:49:03 ludkiller, so you can do this Feb 25 09:49:10 without having to use a custom view Feb 25 09:49:33 i was running view hierachy thing on the playstore app that has scrolling text Feb 25 09:50:09 so all you have to do is take a normal textview and then just do tv.setSelected(true) Feb 25 09:50:14 do it with database asperon Feb 25 09:50:24 it was only selected not focused Feb 25 09:50:30 it seems to work fine Feb 25 09:50:34 i agm going on lunch quick Feb 25 09:50:39 in the real world I've yet to find a real use for sharedpreferences Feb 25 09:51:15 Odaym, how about settings? Feb 25 09:51:18 asperon: shared preferences are already cached in memory so you don't need to. Feb 25 09:51:27 I see Feb 25 09:51:50 always the best choice is DB.. Feb 25 09:51:56 what if you have to move the app elsewhere and sync data Feb 25 09:51:57 not always Feb 25 09:51:59 need a DB Feb 25 09:52:01 dont fool yourself Feb 25 09:52:11 but I like to! Feb 25 09:52:34 appel1, thanks Feb 25 09:52:47 shared preferences are perfect for k,v pairs Feb 25 09:52:55 true I used to use it a lot Feb 25 09:52:59 why you would want to store that in a db Feb 25 09:53:02 i have no idea Feb 25 09:53:04 but in the work environment no ones wants you to put things there Feb 25 09:53:22 you already have a DB, and a Params table Feb 25 09:53:30 eh, just my experience I guess Feb 25 09:53:31 does the user want notifications? yes/no? better query the database Feb 25 09:53:39 write all these queries Feb 25 09:53:43 and then go through the result set Feb 25 09:53:45 true Feb 25 09:53:49 close my cursor Feb 25 09:53:53 YAY GOT MY SINGLE VALUE Feb 25 09:53:57 rejoice! Feb 25 09:53:59 really man, use sharedprefs. Feb 25 09:54:00 that is what I do Feb 25 09:54:02 In dagger, if I have two provider methods for same dependency distinguished by qualifier annotations, but both marked as @Singleton, aren't there effectively two objects of the same type being created? Feb 25 09:54:06 that is what I have to do, rather Feb 25 09:54:15 first I suggest Sharedprefs, they say no, I store in DB Feb 25 09:54:18 its really stupid Feb 25 09:54:29 who is they? Feb 25 09:54:36 whoever is above you taking the decisions Feb 25 09:54:50 do they know android? Feb 25 09:55:11 they don't, but they think that Android is just like any other platform where their decisions have also worked Feb 25 09:55:21 so they tell you what to do regardless of what it is you're working on Feb 25 09:55:30 tell them they are wrong, tell them why and tell them how Feb 25 09:55:44 why and how would probably convince them, yes Feb 25 09:56:03 if you didnt do that, then its ur fault u are in that mess Feb 25 09:56:15 wouldn't call it a mess Feb 25 09:56:33 I would go through a lot if someone is trying to fuck my code up or prevent me from writing something easier for me or for the next guy Feb 25 09:57:02 I was actually convinced with the DB solution, because no one really has the cost of both operations and scientifically can tell me why this is better than that Feb 25 09:57:15 you just assume that it costs more to go to the DB because it sounds longer Feb 25 09:57:37 lemonxah, that doesn't work Feb 25 09:57:47 I added that in gerView Feb 25 09:57:49 getView Feb 25 09:57:58 BlogEntry.getView() Feb 25 09:58:43 or do I need to do this in a different thread Feb 25 09:58:44 ? Feb 25 10:00:34 Odaym: depends on how frequently you read it, what the caching strategy is for the db and so on. Feb 25 10:01:02 I haven't implemented any caching Feb 25 10:01:11 I simply go there and read, come back with 1 value Feb 25 10:01:43 Odaym: sqlite most likely caches db pages :) Feb 25 10:02:09 for a preference that is read fairly frequently SharedPreferences is probably cheaper since except for the inital load it is just retrieving a value from an in-memory hashmap. Feb 25 10:02:27 nope, not scientific enough Feb 25 10:02:33 haha, jk Feb 25 10:02:39 good argument Feb 25 10:02:51 while the other is a file read? Feb 25 10:03:46 Odaym: with an sqlite database it is a bit more complicated because it might use memory mapped files, cached db pages and so on. Feb 25 10:03:57 Hi guys Feb 25 10:04:32 Does anyone knows how to block comment code on Android Studio using a mac? A cmd+shift+7 shortcut opens help dialog Feb 25 10:04:35 :( Feb 25 10:06:12 highlight all and then cmd + / Feb 25 10:06:35 or you want the /* */ ? Feb 25 10:07:13 the /* */ but line comment should work Feb 25 10:07:23 it does Feb 25 10:07:26 cmd + / Feb 25 10:07:46 its easy to highlight a whole function from beginning to end, just be anywhere inside the function and keep pressing option + Up until the whole thing is highlighted Feb 25 10:07:48 cmd + / Feb 25 10:08:04 honestly AS is the fastest Ive ever been on an editor Feb 25 10:08:10 never got into vim and whatnot Feb 25 10:08:20 The should work, bit it doesn't, maybe it's becaouse of my locale (es_ES) Feb 25 10:08:29 yea something is wrong with your setup Feb 25 10:08:34 it most definitely works here Feb 25 10:09:54 thanks Odaym :) Feb 25 10:10:32 anyone know if it's possible to connect to the adb of one device from another device with adb tcpip on? Feb 25 10:11:11 JakeWharton, I can't help but notice that Retrofit obserable callback calls next for a retrofit onFailure but error for an onResponse error. Feb 25 10:11:17 JakeWharton: https://github.com/square/retrofit/blob/master/retrofit/src/main/java/retrofit/RestAdapter.java#L235 Feb 25 10:11:28 observable * Feb 25 10:12:18 So basically, if it fails to deserialize an object response, it errors, else if there is a network error, it continues emitting Feb 25 10:12:21 is this by design? Feb 25 10:12:33 hey Feb 25 10:12:47 he went to sleep kevel Feb 25 10:12:50 I am trying to get text marquee working on textViews Feb 25 10:13:21 multiple textViews , I have a ListView with multiple items and I am trying to get the marquee work on each of them Feb 25 10:13:28 simultaneously Feb 25 10:13:37 Odaym, he is in cali right? Feb 25 10:13:48 2:13am Feb 25 10:13:54 no idea, he just said so above Feb 25 10:13:58 ill have to catch him tonight Feb 25 10:14:05 its 12:13pm here Feb 25 10:14:11 https://github.com/ludkiller/Hackaday/blob/master/app/src/main/java/com/rawcoders/hackaday/Blog/BlogEntry/BlogEntry.java Feb 25 10:14:17 https://github.com/ludkiller/Hackaday/blob/master/app/src/main/java/com/rawcoders/hackaday/Utility/ScrollingTextView.java Feb 25 10:14:42 https://github.com/ludkiller/Hackaday/blob/master/app/src/main/res/layout/blog_list_item.xml Feb 25 10:14:45 that's all Feb 25 10:28:54 lemonxah, still can't get it working Feb 25 10:28:55 :/ Feb 25 10:30:04 just got back from eating haven't looked yet sorry Feb 25 10:30:17 was it working for you ? Feb 25 10:32:21 it was for a few minutes then i went to get lunch then it froze when i got back Feb 25 10:41:16 sup guys I woul like to get some help to debug my device running cm12. It is a exynos5250 ( nexus 10). I have compiled with extra opt that leads sometimes google play services has crashed. adb logcat doesn't help me to trace the broken code. What should/can I do to trace this? thx Feb 25 10:51:34 khaon: wrong channel, try #android-root or the cm channel Feb 25 10:51:57 hi Feb 25 10:52:12 bankai_, ok i c this is more toward applications developpemnt? instead of rom building etC? Feb 25 10:52:20 correct Feb 25 10:52:37 thx you for noticing me ;) Feb 25 10:52:38 when will an uncaught exception lead to the "Unfortunately, has stopped."? i have the feelnig that SOMETIMES it simply leads to the app silently stop working Feb 25 10:54:42 thana, yea Feb 25 10:54:57 my app ends up just exiting Feb 25 10:55:08 but why and when? :D Feb 25 10:55:27 Probably when it stops responding Feb 25 10:55:37 it shows that dialog box Feb 25 10:56:08 where should i store access token in my app? Database or SharedPreferences? Feb 25 11:18:09 anyone here familiar with rxJava? Feb 25 11:26:00 many many people, just ask your question Feb 25 11:33:06 hi,i have a db located in data/data etc. I want to move this db to internal/external storage the way i can see them on the file system Feb 25 11:34:02 hi, is it possible to tell the uri.builder NOT to encode certain symbols? Feb 25 11:34:23 i need the '+' to stay decoded in certain places Feb 25 11:45:08 sci-fi do you want to access the db of your app? Feb 25 11:45:18 like copy it to your machine so that you can open it and debug it? Feb 25 11:46:26 lemonxah:i try to keep some settings and necessary datas after user if user clears datas Feb 25 11:46:55 Ok, http://pastebin.com/3vy9wfmH Feb 25 11:47:26 I want to have an observable which i can subscribe to whenever i want, and i want it to emit data when i call it. Feb 25 11:47:28 oh you want to move it using your app to move it? Feb 25 11:47:43 anything subscribed will A, update my sql cache, B, update UI if subscribed to Feb 25 11:47:49 i would put those settings in something else cause i dont think you would be able to move it Feb 25 11:48:31 bankai_ ping Feb 25 11:48:54 lemonxah:i only want to keep my database on the system after uninstall/clear data :D Feb 25 11:50:04 then you have to store the db on the sdcard not internal Feb 25 11:50:17 but that would expose the data to anyone Feb 25 11:51:29 for instance i have a nexus which doesnt has a sd card Feb 25 11:52:43 it still has "sd card" its just internal on the phone Feb 25 11:53:18 kevel have you looked at something like OTTO from square? Feb 25 11:53:24 or do you want it to be rxJava/ Feb 25 11:53:34 would like it to be rxjava Feb 25 11:54:15 My end result is, having an observable for each syncable data structure Feb 25 11:54:30 then just bind subscriptions for ui interactions Feb 25 11:54:39 and unbind when not needed Feb 25 11:54:43 basically an event bus? Feb 25 11:54:50 and have 1 sync mechanism Feb 25 11:55:08 well, rxjava uses the observer pattern Feb 25 11:55:14 which is pretty much like an event bus Feb 25 11:55:45 yeah that is why i was asking about otto since that is an event bus for android Feb 25 12:25:31 hi? Do you guys know any custom keyboard libraries apart from this one https://github.com/eyedol/kasahorow-Keyboard-For-Android or an easy way to bundle up an android app with any of the custom keyboards off the playstore. Feb 25 12:26:05 lemonxah:i created my database to /sdcard/ and it works the way i wanted.if user clears datas or removes app,my datas still on the phone. Feb 25 12:28:14 but i wonder if /sdcard/ location is same all the phones ? could be a crash (directory not found) problem for another phone ? Feb 25 12:29:45 does anyone have an idea why I can't type in my android studio terminal? Feb 25 12:30:17 heh Feb 25 12:30:18 ? Feb 25 12:30:56 when i press keys with the terminal selected nothing happens Feb 25 12:32:21 I can also not paste into it. Feb 25 12:32:48 the cursor blinks as if I had the insert button pressed, even though that's not the case. Feb 25 12:36:37 <_astroduck> Hi! Is there a way to get viewPager inside the fragment? I tried getActivity().findViewbyId(R.id.view_pager) but it doesn't work Feb 25 12:38:30 is it somehow possible to make listview items selectable (multiple choice)? somehow i can't find anything on this topic. at least when using a custom adapter Feb 25 12:45:03 anyone? Feb 25 12:57:44 dnano91 yes Feb 25 12:58:14 http://theopentutorials.com/tutorials/android/listview/android-multiple-selection-listview/ Feb 25 12:58:17 literally first link in google Feb 25 13:06:23 kevel: well it doesn't work. i've been to that site. the only thing that's done there, is .setChoiceMode() and then call getCheckedItemPositions(). but i can't select anything Feb 25 13:08:30 What is the best approach if I need a file stored in my app that I can reference with a path Feb 25 13:09:12 tried storing it in a RAW folder, but when I target the resource I get a filestream Feb 25 13:09:22 I need to be able to target the file with a uri Feb 25 13:09:29 Troffel, assets have URIs Feb 25 13:09:51 but if you need actual writable file you'll have to copy it to filesystem first Feb 25 13:10:07 I just need to be able to read from it Feb 25 13:10:36 well throw it in assets Feb 25 13:10:49 and access it with file:///android_asset/ Feb 25 13:11:59 is there a more decent way to read logs then executing logcat programmatically nowadays?@ Feb 25 13:15:00 okay, aparently it does work. however the ui doesn't indicate this in any way. how can i show checkboxes or different background for selected items? Feb 25 13:16:30 using Environment.getExternalStorageDirectory().getAbsolutePath() may causing path problem for a different phone ? Feb 25 13:17:19 sci-fi: depends on what you use the result for. Feb 25 13:17:40 creating database Feb 25 13:17:42 thana, what do you mean? Feb 25 13:18:43 whatitis: logs Feb 25 13:20:08 appel1: creating database :D Feb 25 13:20:19 sci-fi: you shouldn't create a database in the root directory of external storage. Feb 25 13:20:41 sci-fi: but what kinds of problems do you mean? Feb 25 13:21:18 sci-fi: and with external stroage you need to be aware that it might be a removable sdcard and handle when it is unavailable or has been removed. Feb 25 13:21:46 yup that is what i exactly want to know Feb 25 13:22:03 i have a nexus 5 and its good for me Feb 25 13:22:32 So retrofit you can define a service call like Feb 25 13:22:43 Observable doSomething() Feb 25 13:22:44 if a phone has removable sd card or there is no sdcard Feb 25 13:23:06 environment.getpath etc. can give me a solution without crash ? appel1 Feb 25 13:23:17 Is there anyway to turn that into a singleton Feb 25 13:23:20 and call it time and time again? Feb 25 13:23:27 adding and removing subscriptions? Feb 25 13:23:48 sci-fi: of course you can write code that uses external storage without crashing, you just need to handle the different error conditions. Feb 25 13:24:28 I've found when I add a maven repo to compile dependencies for the app, it takes +2min to compile it. Any way to cache / reduce the time? Feb 25 13:27:18 i'll keep a token(encrypted and its important to me) and some not that important statistics,and i don't want to handle if mounted or removeable or smth, i just want to keep my datas after if user clear datas or removes app Feb 25 13:30:51 sci-fi: nothing stops a user from deleting it, so if it really needs to be kept around you probably need to store it on your server. Feb 25 13:31:36 yes you're right i should talk to my boss :D Feb 25 13:31:43 thanks and have a nice day Feb 25 13:44:06 anyone else had a problem with NavUtilsJB not being found? http://stackoverflow.com/questions/28298453/android-studio-java-lang-noclassdeffounderror-android-support-v4-app-navutilsjb Feb 25 14:02:47 Hi Feb 25 14:03:10 How can I check inside a fragment of a viewpager if its in front or not? Feb 25 14:04:01 PS: I've disabled onTouchEvent and onInterceptTouchEvent Feb 25 14:04:01 astroduck: you could attach listener to the pager for when items are selected. would that be sufficient? Feb 25 14:04:38 samskiter: but that would be inside activity, right? How will a fragment know if its in front or not? Feb 25 14:05:05 you might have to just tell it Feb 25 14:05:20 how? Feb 25 14:06:09 also, will onpagechangelistener work if onTouchEvent and onInterceptTouchEvent return false? Feb 25 14:06:49 not sure exactly what you mean Feb 25 14:06:58 would onpause and onresume on the fragment work? Feb 25 14:08:00 im getting java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. can i ignore certificates or something like that? http://paste.ofcode.org/ssWPJUJuxFUDP4sXznSTjb Feb 25 14:12:15 samskiter: aren't they called with activities onResume/onPause? Feb 25 14:13:26 astroduck: i think when your fragment is visible and interacting with the user and the activity is resumed, you get a call to onresume Feb 25 14:13:32 luist: if you are using a self signed certificate why not use your on trust manager to trust that cert explicitly instead of ignoring all cert failures? Feb 25 14:14:23 appel1: well i did not developt the tools my app is POSTing to… how do i know about its certificate? Feb 25 14:15:19 luist: visit it using a web browser? =) Feb 25 14:15:48 Hi, I'm using OpenSL ES in my android app, is there anything special I have to do to make the volume buttons to work? Nothing happens when I press them. Feb 25 14:15:51 appel1: oh i dont think theres one yet Feb 25 14:16:27 Hello Feb 25 14:16:44 How have I to change the manifest if I use libsuperuser calls in java code? Feb 25 14:16:58 Any ideas? Feb 25 14:21:18 guys, why my app so damn LAGGGY with simple animation? I want to collapse header of view (some LinearLayout) when ListView scrolling down starts Feb 25 14:22:03 it is verrrry laggy, but I turned on Hardware Accelerated (device: Galaxy Note 4) Feb 25 14:29:53 woozly: are you using the Intel image? Feb 25 14:30:22 samskiter: I'm using real device Feb 25 14:30:48 ah ok. no idea. are you doing too much in your draw loop? Feb 25 14:30:50 samskiter: I mean Hardware Accelerated in manifest Feb 25 14:30:54 ah ok Feb 25 14:31:05 samskiter: not so much :((( Feb 25 14:34:14 is it possible to identify the data type of a shared preference? Feb 25 14:34:28 short of trying to read it with the different catch methods? Feb 25 14:35:30 get methods that is Feb 25 14:39:39 It's stored in an XML file with no type info, so the short answer is, no Feb 25 14:40:35 asperon: you could use getAll and see what type the object has in the map Feb 25 14:41:53 appel1, thats an option, not 100% user that all the values will be there though, perhaps its just easier to do my own logic Feb 25 14:42:24 asperon: why wouldn't they? Feb 25 14:42:40 asperon: doubt SharedPreferences randomly discards values. Feb 25 14:42:40 appel1, since they might not have been added yet Feb 25 14:43:07 if its a new instance, with not configuration done, they there will be values missing Feb 25 14:43:18 asperon: then your approch of trying all the differen get methods wont work either. Feb 25 14:43:58 appel1, ill have a look at the data, if its true/false, add as boolean, if it parses to an int, add as int, if not, add as string ;) Feb 25 14:44:21 how can i set the background for a list item when selected? tried using list selector, but then the animation (the expanding circle from touch position) dissapears. Feb 25 14:44:36 asperon: read the shared preference xml file yourself? Feb 25 14:45:06 still wont be there if its not already added Feb 25 14:47:45 you are using shared preferences as some kind of generic storage of untyped data? Feb 25 14:48:38 appel1, i am writing a settings import/export feature, so the user can export a complete set of their current settings (using getAll) and now i want to restore them, thing is i am storing them in a ini type file without type data Feb 25 14:49:00 anyone? Feb 25 14:51:45 asperon: so either store type info in the ini file, for example using XmlUtils from the AOSP source, or keep a hardcoded name->type map in your app so it can properly read an ini file back into the shared preferences. Feb 25 14:52:20 yea, ill go for the second option, i want the ini file to be easy to edit so having data type in there wont be no good Feb 25 14:52:45 in hindsight i should have stored everything as strings, but its hard to get checkbox preferences to play along with that ;) Feb 25 14:52:47 asperon: ok Feb 25 14:53:10 asperon: uhg, that'd be painful to work with everywhere else in your app Feb 25 14:53:47 yeah, but i have already wrapped the reading of my settings in a seperate class, so i can covert it to the correct data type there Feb 25 14:54:48 easier to put the type conversion and verification there instead of having to handle "corrupted" shared preferences everywhere else in your app. :) Feb 25 14:59:20 hi all Feb 25 14:59:29 im new to android programming (not new to programmin in general) Feb 25 14:59:45 im looking at making a calander connector... where can i leanr how is there a simple sample? Feb 25 15:04:14 darkdrgn2k: http://developer.android.com/guide/topics/providers/calendar-provider.html Feb 25 15:16:23 Hi guys, I'm having some trouble with maps v2, when I'm launching the app it's closing, it's saying that java.lang.ClassNotFoundException: com.google.android.gms.maps.MapFragment , I have the google map v2 installed and I have no errors in compilation time, Does someone could help me ? Feb 25 15:17:30 I also have the necessary permissions on manifest and my API key set Feb 25 15:19:19 I'm using this code in my layout file, this is where this class is called https://gist.github.com/anonymous/6f53da2f3aaa9096b982 Feb 25 15:25:41 wviana_: dont you need to add some library for googlemaps to java build path maybe? Feb 25 15:35:21 Hi!, I'm new and learning Android development. I'm looking how to create a UI but I don't know how is called or is something already made, is used in Wikipedia (among others) and is the "tree horizontal lines" buttons that display from left to right applications options in a layer that is over main activity **** BEGIN LOGGING AT Wed Feb 25 15:40:32 2015 Feb 25 15:42:14 I crack myself up : List theChosenOnes = new ArrayList<>(); Feb 25 15:43:02 feathersanddown, sidebar menu, navigation drawer, hamburger menu. On android it's usually called the navigation drawer, and google has some docs for it on the dev site Feb 25 15:43:24 feathersanddown, http://developer.android.com/design/patterns/navigation-drawer.html **** BEGIN LOGGING AT Wed Feb 25 15:46:16 2015 Feb 25 15:46:21 aahh bingo!!, thanks dragorn :) Feb 25 15:58:10 how do i actually open the webpage after doing a POST via HttpsURLConnection?? http://paste.ofcode.org/nJYP35FpQsNKGWkSxvUMX7 Feb 25 15:59:47 Hi, I'm using OpenSL ES to play audio in my android app, is there anything special I have to do to make the volume buttons work? Nothing happens when I press them. Feb 25 16:00:45 anyone experienced with graphics on android here? Feb 25 16:00:51 Yes Feb 25 16:00:55 anyone else using multidex in their application? Feb 25 16:01:16 I have tablet (1280x800 with dpi 214) and lg phone (960x540 dpi 240) and apparently both are considered as hdpi Feb 25 16:01:29 so I want to calculate desired graphic size for both, according to http://stackoverflow.com/questions/21144388/difficulty-to-understand-how-to-support-multiple-screen Feb 25 16:01:39 looks like lg graphic should have 705x480 Feb 25 16:02:02 but it is too small Feb 25 16:02:07 it looks very very small Feb 25 16:02:18 dianull: so you made a 705x480 graphic? Feb 25 16:02:31 and you put it in the hdpi folder? Feb 25 16:02:34 yes Feb 25 16:02:41 now both lg and tablet use hdpi Feb 25 16:03:00 but it cannot look good on both tablet and lg Feb 25 16:03:02 and what’s your xml layout of the imageview? Feb 25 16:03:26 I dont distinguish anything i the layout Feb 25 16:03:29 *in Feb 25 16:03:36 just put the drawable Feb 25 16:03:40 so you have “wrap_content” ? Feb 25 16:03:46 hm.. maybe, yes Feb 25 16:03:49 does it matter? Feb 25 16:04:04 yes Feb 25 16:04:07 should be fill parent? Feb 25 16:04:14 maybe Feb 25 16:04:29 an imageview is a view like any other Feb 25 16:04:38 you can set the options of imageview for how it should scale imaged inside it Feb 25 16:05:09 hm Feb 25 16:05:16 dianull: did you set a scaletype on the imageview? Feb 25 16:05:24 no I didnt Feb 25 16:05:30 I only set wrap_content Feb 25 16:06:21 dianull: also, you shouldn’t be worry about exact pixels like that. you should be thinking about how big your imageview needs to be.within your layout and how you should be scaling your image within that. then you can provide an appropriate image after…. Feb 25 16:06:57 how do i actually open the webpage after doing a POST via HttpsURLConnection?? anyone? Feb 25 16:07:13 huh, I thought that since I've got a proffesional graphic designer for this project I can use it to provide proper images to drawable and device would chose according to its preferences Feb 25 16:07:24 s/it/him Feb 25 16:07:25 dianull: yea it will. Feb 25 16:07:56 but imagine if I have in hdpi folder the same img of say 640x480, how it is supposed to render right when hdpi can differ so much! Feb 25 16:08:07 1280x800 and 960x540 are both hdpi Feb 25 16:08:07 ... Feb 25 16:08:19 so you say “i want this drawable in this imageview” and the system says” ok im hdpi, so ill get the hdpi version of that image and put it in the imageview" Feb 25 16:08:48 geez i just want to open the website logged in…. why is that so hard?? nothing works Feb 25 16:08:49 dianull: it will render it depending on your scaling settings. you can never get an exact pixel perfect image for every device in existance under every layout situation Feb 25 16:09:03 hm so how shoudl I scale it? Feb 25 16:09:05 why am i getting this error while obtaining datas from my database(ormlite) Feb 25 16:09:06 android.system.ErrnoException: chmod failed: EPERM (Operation not permitted) Feb 25 16:09:12 dianull: set the scaletype on the imageview Feb 25 16:09:27 luist: webview? Feb 25 16:09:47 ok will try that Feb 25 16:09:48 samskiter: webview is scoring 218 in html5test… it sucks Feb 25 16:09:51 thanks samskiter! Feb 25 16:10:03 luist: WHAT? Feb 25 16:10:07 thats not what you asked Feb 25 16:10:44 samskiter: i tried webview but i cant use it because it candle handle many features. it does not display html5 video/audio in many formats for example Feb 25 16:11:10 luist: send the user to chrome then? Feb 25 16:11:26 samskiter: thats what im trying.. please enlighthen me Feb 25 16:11:47 use an inent Feb 25 16:11:50 intent* Feb 25 16:12:12 samskiter: well i need to do a POST also, to login… i can’t do it with an intent Feb 25 16:13:37 oh dear. sounds impossible. you cant chare the users token in the url with chrome Feb 25 16:14:42 https://developer.chrome.com/multidevice/webview/overview but html5 is supported to some extent by webview. have you actually tested the site you want to visit? Feb 25 16:15:17 is anyone using multidexxing on android? i’ve followed the instructions, but im getting a classnot found exception when running on lollipop for the MultidexApplication class Feb 25 16:16:21 samskiter: yes… but the app is going to run on a 4.0.x device (API 15) and i cant get webview to support these features. When i run the app on an API 19 device, it works better Feb 25 16:16:57 luist: so you’re annoyed a device running an os from 2 years ago doesn’t support html5 ? Feb 25 16:17:28 samskiter: its not the device… chrome in the same device scores 500 in the html5test Feb 25 16:25:24 samskiter: anyways… im trying to find a way to either: 1) open an static HTML file in the browser (Intent.ACTION_VIEW doesnt seem to support that) or 2) POST the key-values and than open the page (not sure if it works this way) Feb 25 16:25:33 Hi, i am trying to implement this : https://github.com/jpardogo/PagerSlidingTabStrip in my app. I am using a Navigation Drawer as my main navigation and i would like to use this inside one of the drawer sections in a fragment. But i have a few questions, first is it possible ? Second, do i need to use a toolbar for this to work ? Feb 25 16:26:00 luist: the static file mus be accessible fromthe public directory , not the apps private directory Feb 25 16:26:11 I don't need the color changer, just the viewPager. Feb 25 16:26:29 samskiter: but will ACTION_VIEW accept a static file? Feb 25 16:28:25 luist: static file? Feb 25 16:28:28 anyone familiar to ORMLite ? Feb 25 16:28:37 alexfu: yes… static html file Feb 25 16:28:58 luist: oh gotcha. didnt know what the context was Feb 25 16:29:09 alexfu: can i run an Intent.ACTION_VIEW passing a static html file instead of an url Feb 25 16:29:20 luist: http://android.stackexchange.com/questions/4775/how-can-i-open-an-html-file-i-have-copied-from-pc-to-sd-card-of-phone Feb 25 16:30:11 luist: if you want to show some static HTML, consider using a WebView Feb 25 16:30:29 alexfu: oh gawd Feb 25 16:30:54 alexfu: again, i tried webview but i cant use it because it candle handle many features. it does not display html5 video/audio in many formats for example Feb 25 16:30:58 Hi Feb 25 16:31:10 alexfu: the app is going to run on a 4.0.x device (API 15) and i cant get webview to support these features. When i run the app on an API 19 device, it works better Feb 25 16:31:24 alexfu: thats why im trying to launch chrome Feb 25 16:32:28 yuck, why are you so dependent on html Feb 25 16:32:37 I'm not too familiar with WebView and Chrome. Do they run different verions of webkit or something? Feb 25 16:32:49 and that's because api19 changed the webview. backend Feb 25 16:33:24 luist: you may want to look into https://crosswalk-project.org/ Feb 25 16:35:21 rschmidt: does this work when im just trying to open html5 webpage on a webview? Feb 25 16:35:44 Hi, anyone taking Android development on Udacity? Feb 25 16:35:47 luist: sure, it's basically a drop-in replacement for the existing Android Webview classes Feb 25 16:36:03 rschmidt, that's a nice solution, too bad the. base apk size is 20mb Feb 25 16:36:04 rschmidt: sounds good Feb 25 16:36:04 lol Feb 25 16:36:45 rschmidt: theres no Mac host… i wonder if i can use the linux oen Feb 25 16:37:47 pfn: yeah, it is a bit big. it's basically shipping Chrome's webview as part of the APK, and there's no real way around that. Either you use the existing (crappy) webview that's available on the OS, or you ship replacements. Feb 25 16:38:54 just out of curiosity, what use case requires you to store HTML pages on the device? Feb 25 16:39:54 luist: probably, or just spin up a VM and use that. Feb 25 16:40:00 Hi, i am trying to implement this : https://github.com/jpardogo/PagerSlidingTabStrip in my app. I am using a Navigation Drawer as my main navigation and i would like to use this inside one of the drawer sections in a fragment. But i have a few questions, first is it possible ? Second, do i need to use a toolbar for this to work ? Feb 25 16:41:42 rschmidt, yeah, I'd just avoid using webview if possible Feb 25 16:41:52 can you view whole logcat on non rooted device from within app, or does it just show a filtered logcat with only that apps logs? Feb 25 16:41:52 pfn: that would be a good idea in general Feb 25 16:42:12 hate the webview, that's why I say it's a nice solution, for those that absolutely need it Feb 25 16:42:15 but it's heavy handed Feb 25 16:42:36 pfn: I agree. I have a hybrid app that runs HTML5 stuff on Android and it totally sucks. Feb 25 16:43:08 my current project uses some webview stuff, and it's so broken... Feb 25 16:43:14 and it's broken on api21 even Feb 25 16:43:17 crosswalk is a step in the right direction but basically, if you want something that's fast and stable, write native code. Feb 25 16:43:31 when I run my webview containing activity in landscape, but the activity itself is locked in portrait, the webview won't even appear! Feb 25 16:43:37 rather, the content doesn't render Feb 25 16:45:00 Hi all. I have a question about btle. I know that 'Estimote' has something in their iphone app, which allows the user to make the phone act like an iBeacon. I wonder if somebody knows how far you can catch that (in meters), does anybody know that? or something like this? Feb 25 16:45:12 pfn: yeah, basically, it sucks. I would avoid using web stuff on Android in general... initially, the development gains vs. writing Java look good, but it rapidly becomes a downward spiral of buggy, messy, hard to debug stuff Feb 25 16:45:27 development gain, fooey Feb 25 16:45:30 javascript is garbage Feb 25 16:45:32 alexfu: when you have to write the HTML file yourself, because you cant POST to a webpage Feb 25 16:46:00 * pfn says that having written a browser in javascript based on gecko over a few years Feb 25 16:46:20 pfn: I dunno about garbage, exactly Feb 25 16:46:27 nah, it's garbage Feb 25 16:46:46 I think lots of web developers are intimidated by Java, and they'd like to leverage their existing skills Feb 25 16:46:50 mozilla makes javascript slightly less garbage, but it's still crap (stuff that hasn't been accepted into ecmascript) Feb 25 16:47:56 oh, interesting? javascript hasn't progressed beyond 1.8.5 at mozilla? Feb 25 16:48:42 I dunno, I don't really follow JS development Feb 25 16:48:52 I used to follow it closely Feb 25 16:48:56 used every single bleeding edge feature Feb 25 16:49:18 made that shit slightly less painful to work with Feb 25 16:49:44 yeah Feb 25 16:49:50 transpilers help a little to ease the pain as well Feb 25 16:50:07 is there a list of default button icons within android I can use for imageButtons? Feb 25 16:50:41 I'm trying to solve a ClassCastException; RelativeLayout.LayoutParams cannot be case to AbsListView.LayoutParams in ListView.measureScrapChild. Can't replicate it but the users are able to :( Feb 25 16:50:49 mantas322, check platform sdk data/res/drawable* Feb 25 16:50:54 I assume it has something to do with one my adapters. Feb 25 16:50:58 see android.R.drawable.* Feb 25 16:51:22 quinnjn, simple, don't setLayoutParams(new RelativeLayout.LayoutParams) Feb 25 16:51:23 ty Feb 25 16:57:38 pfn: ... ugh. :) thanks Feb 25 17:02:53 hmm, what chromebooks come with free lte service? Feb 25 17:03:06 oh, it was only the pixel Feb 25 17:22:05 \join #android Feb 25 17:26:07 samskiter: this actually worked but it doesnt give any browser as options to open the HTML file lol: http://paste.ofcode.org/9rjsqHcaFrXyj43TF7C36X Feb 25 17:29:35 new moto E - if its any good with bluetooth maybe i should get one for dev Feb 25 17:33:53 under what situation findViewbyId returns null?, i am doing View Row=getLayoutInflater().inflate(R.layout.row_item,null); and then doing TextView txtName = (TextView) Row.findViewbyId(R.id.textView_name) ; here txtName is getting null so i cannot do txtName.setText()... Feb 25 17:34:03 i have checkeked in debugger that Row does get the inflated, but txtName remains null, have verified that Ids match Feb 25 17:34:17 in debugger is do see Row=android.widget.RelativeLayout{1d49253d V.E..... ......I. 0,0-0,0...... and given that layout starts with RelativeLayout i guess Row is getting loaded fine Feb 25 17:37:49 gosh fixed.. Feb 25 17:38:14 findViewById does a simple traversal Feb 25 17:38:16 what was the issue? Feb 25 17:39:15 layout naming ...silly mistake Feb 25 17:40:10 hey so I am trying to build a calendar, one that is a bit customizable based on a user's input, I am getting stuck on how to store the calendar exactly if I was thinking in terms of rows and columns Feb 25 17:42:29 Lonesoldier728, calendars are not stored as rows and columns. They are displayed that way. Feb 25 17:42:53 in fact, calendars are not stored. Calendar contents are stored. Feb 25 17:44:00 Calendar contents are usually synced with a backend that actually stores the content Feb 25 17:44:11 Ok so how would I go about storing the contents... I am trying to make a way to schedule a day based on hours... Feb 25 17:44:35 What's the content? Feb 25 17:45:36 basically shifts for workers Feb 25 17:45:59 So it's a list of time periods. Where do you want to store it? Feb 25 17:46:00 so 9am - 11am is Bob's shift, 11am - 1pm is Jims shift Feb 25 17:46:32 Is there a way to open a website when i click on a section in navigation drawer ? I tried using this : http://pastebin.com/ap9QYbDs with the error about using v4 fragment. Feb 25 17:46:40 I want to send it server side so everyone can see it essentially but I can store it clientside sqlite as well to avoid constant sending Feb 25 17:48:06 Why don't you push updates only to the client side, have changes diff'd against server side and just push the updateS? Feb 25 17:48:09 Define a table with three rows: Name, start time, end time. That's your shift schedule. Feb 25 17:48:29 Hey guys in my app the main activity is google maps. So the user requests for directions between 2 points and I draw the path on the maps. I would also like to add a directions view where they see in exact the steps needed to reach the destination Feb 25 17:48:52 So is it possible to make a View which will be dragged upwards and show information Feb 25 17:49:01 and if user drags it downwards it hides itself ? Feb 25 17:49:01 I don't think you are allowed to use google maps to make a directions app Feb 25 17:49:43 cnap what kind of app? Feb 25 17:49:47 trevor-e, 1) Google Maps return a xml with info regarding it 2) its a uni assignment Feb 25 17:50:09 I just need to display a fragment with the intermediate steps needed to go from A point to point B Feb 25 17:50:27 like a list with intermediate nodes info Feb 25 17:51:00 flipbill a person can have a shift 9am till 11am then again at 7pm till 9pm and there will also be two columns whether the shift is in the board room or takes place in the meeting room Feb 25 17:51:16 t0astt, I need to do something like this http://prntscr.com/69q2t8 Feb 25 17:51:19 and it will be different daily for up to a week at least Feb 25 17:51:38 is a fragment which will be shown when user clicks/drags it upwards Feb 25 17:51:40 and then hide itself Feb 25 17:51:56 Lonesoldier728, in that example, there will be two entries in the table, one for each shift, and you might want a fourth column for location. Feb 25 17:51:58 Because showing all these info in a smartphone while user has to be able to view map, is a lot Feb 25 17:52:29 is this how we hide a linearlayout => mLinearLayoutRowItem.setVisibility(View.GONE); Feb 25 17:52:44 i tired View.INVISIBLE also but no effect Feb 25 17:53:15 ServerCrash: linearlayout.gome Feb 25 17:54:29 hmmmm, is there a definite way to determine if an E.164 number is from the US or Canada? Feb 25 17:55:04 it seems like libphonenumber lies about this Feb 25 17:55:08 from their sourcecode Feb 25 17:56:59 How can you determine how tall your markers are in MapFragment? Feb 25 17:57:59 I'm using custom markers and I want to pad my camera animation to make sure that they are completely visible if they are at the top of the screen Feb 25 17:58:24 can I just measure the bitmap I'm handing to .icon ? Feb 25 17:58:53 rschmidt: hey… im trying to configure crosswalk here… any ideas if i android studio supports Apache Ant? Feb 25 18:01:34 luist: Android Studio uses Gradle as its build system Feb 25 18:02:11 it used to use Ant but they switched to Gradle sometime last year Feb 25 18:02:23 rschmidt: so that means i can’t use crosswalk? Feb 25 18:04:17 luist: no... you should be able to use crosswalk with Gradle. Let me dig up my old project and see what's up. Feb 25 18:04:52 luist: here's an example of someone using crosswalk with Gradle: https://github.com/twilly86/CrossWalkAndroidStudio Feb 25 18:05:09 rschmidt: oh i just found this… downloading already Feb 25 18:06:14 if you're planning on using Android Studio, you should get used to Gradle anyway Feb 25 18:07:17 FlipBill thanks man Feb 25 18:15:26 luist: oh, by the way... #crosswalk :) Feb 25 18:15:42 rschmidt: i joined lol Feb 25 18:15:50 figured since it was open source Feb 25 18:15:55 good, those guys are much better than me at providing answers :) Feb 25 18:19:53 I have got a small content package I would like to be able to periodically update (every month or so) without releaseing a new apk. I don't want to use expansion files because they require a new apk. Other than hosting the file somewhere myself, is there a built in mechanism in the android/google play framework to support dynamic content files. Feb 25 18:21:52 so I modify my httppost response with setHeader("Content-Type", "text/html; charset=UTF-8"); and loop through the headers of the response and see that it's using UTF-8 in header instead of the original nb_NO.UTF-8. But When I handle the response with ResponseHandler I get java.io.UnsupportedEncodingException: nb_NO.UTF-8 . Why is that? Source code of site says: Feb 25 18:21:59 is there any mistake in this LinearLayout lContainer= (LinearLayout) findViewById(R.id.container); lContainer.setVisibility(LinearLayout.GONE); Feb 25 18:22:54 visibility Gone doesnt get applied Feb 25 18:23:33 i usually use View.GONE Feb 25 18:23:43 does LinearLayout have the same constant? Feb 25 18:24:13 damien5314 yes View.GONE is default, i tried that too, still no result Feb 25 18:26:38 i have an if case for data, if(data!=null){ add view items to lContainer } else { hide/remove the lConatianer} i am able to add things to lContainer, but not able to hide it :( Feb 25 18:29:21 does anyone have some experience with libphonenumber? Feb 25 18:29:31 it's lying to me! Feb 25 18:31:48 these are the headers of the response: http://pastebin.com/QkHmPd97 Feb 25 18:32:16 how can the response handler still pick up nb_NO.UTF-8? Feb 25 18:32:57 Otto or eventbus? Feb 25 18:33:17 rxjava Feb 25 18:34:40 hey, how long does it take for the play developer console to update the total app installs? :/ Feb 25 18:35:22 yiati: but people use rxjava with an event bus, are you saying the bus is not necessary? Feb 25 18:36:21 Hi, im implementing facebook login in my app, and Im doing some research about best practices, im searching about if facebook notify my server once the user login in (like in a web app) but can't find anything, so what im doing is designing the following scheme, user connect via facebook, facebook return some user data to my phone like, username, email, id, then i send this data to my server and I check if the id is a valid face Feb 25 18:36:32 supay, a day I think Feb 25 18:36:48 proceed to check if the email exist in my db, if not, i create a new user, the problem here is that somebody can spoof the request, and insert fake data to my database Feb 25 18:37:59 by just sending a valid facebook id and different emails, is there a way to avoid that? I will be glad if you can share some good article about how to to this the best way, thanks Feb 25 18:39:01 supay: usually once per day Feb 25 18:39:08 sometimes it delays for another day Feb 25 18:42:51 Ashiren, Quacked: ah, okay.. i just released an app yesterday and it didn't update the stats yet so i began to freak out. thanks though :) Feb 25 18:43:30 lasserix: apparently people also use otto with detached fragments Feb 25 18:43:35 JakeWharton: is it possible to exclude gson from retrofit? i’ve already got jackson2… Feb 25 18:43:48 samskiter: yeah Feb 25 18:44:00 lasserix: how to? can’t make gradle play ball Feb 25 18:44:04 when you initialize your client you just pass the other transcriber Feb 25 18:44:26 ah, sorry, i mean at build time just leave the dependency out Feb 25 18:44:30 http://kdubblabs.com/java/retrofit-by-square/retrofit-using-jackson-json-conversion/ Feb 25 18:44:34 setConverter Feb 25 18:44:37 oh Feb 25 18:44:55 well gradle should do taht for you but there is a way to explicitly not include the embedded redudant dependency Feb 25 18:45:14 isn’t gson marked provided in the retrofit build? It should Feb 25 18:45:19 no Feb 25 18:45:51 No to which claim? Feb 25 18:45:53 did i read somewhere that library projects can't use provided ? Feb 25 18:45:53 gson is marked as a dependency right. you can remove transitive dependencies in gradle, but it doesnt seem to be supported in androids flavor/version Feb 25 18:46:06 lasserix: i dont think gradle can do that for you can it? Feb 25 18:46:11 jaana: both Feb 25 18:47:07 So there’s no way to use retrofit and not ship with gson.jar? Feb 25 18:47:15 use an exclude Feb 25 18:47:39 JakeWharton: can’t seem to get gradle to do an exclude for android Feb 25 18:47:45 “method not found” Feb 25 18:47:51 compile(foo) { exclude group: 'whatever' } Feb 25 18:48:07 yea, that’s the syntax i’ve been trying Feb 25 18:48:56 ah wait, specifying the group worked Feb 25 19:00:37 Ok, so even after I've replaced the header of the httppost reponse, response.getEntity().getContentType()); gives the wrong charset. How do I replace the content type entity on the response? Feb 25 19:05:28 wrap it Feb 25 19:11:38 guys, what would be a good way to promote an app if you're a new developer in the play store? Feb 25 19:11:45 are there services for this or something? Feb 25 19:12:24 JakeWharton, I am trying to do expand/collapse animation for a cardview. My animation is working almost 100%, except I am having a problem with expanding. The content in the view changes a little and I want the card to expand to accomodate, but I need to know the end height of the view. Is there a way to get the height before actually expanding the cardview? Feb 25 19:13:10 What I'm doing now is adding my content to the cardview, then doing view.measure, then view.getMeasuredHeight(), however that's returning HUGE numbers like 24000 Feb 25 19:15:34 I guess any lesser Android gods can attempt to answer my question as well Feb 25 19:15:58 Totally joking, you're all just swell. Feb 25 19:17:17 flippin' libphonenumber... Feb 25 19:20:10 gman23 i just use android:animateLayoutChanges :) -- thats the most i can be bothered with when it comes to animations ;) Feb 25 19:20:49 I kinda hate animations (even as a user). Feb 25 19:21:03 Not my call Feb 25 19:21:03 thepoosh what does it say when you plug in 867-5309 :) Feb 25 19:21:14 It needs to animate Feb 25 19:21:20 g00s: that is not an E.164 number! Feb 25 19:21:36 g00s: went on to create this and file a bug report Feb 25 19:21:37 https://github.com/yishai-glide/libphonenumberTest Feb 25 19:21:45 arrrg Feb 25 19:22:24 TacticalJoke: animations are spiffy, you cannot deny this Feb 25 19:22:34 thepoosh are you guys happy with the name (glide) i find it very unmemorable. i can never remember it when i'm talking to people Feb 25 19:22:53 it's better than glidetalk which was the original name Feb 25 19:22:53 They can look great, but IME they often feel slow. Feb 25 19:23:08 that's because they are bad animations. Feb 25 19:23:14 I love speed. :D Feb 25 19:23:15 look at the inbox FAB animation Feb 25 19:23:48 I understand that's your opinion, but do you have maybe an idea of why it would be like...expanding an entire list screen, then snapping back to the proper size? Feb 25 19:23:55 I haven't looked at that yet. Will check it out when I can. Feb 25 19:24:21 animations should be used to convey semantic (?) information, such as an expanding view hints that it can scroll vertically Feb 25 19:24:26 TacticalJoke: that is one hell of an animation Feb 25 19:24:42 if you need an invite, I have a few Feb 25 19:24:43 I agree, lasserix. Feb 25 19:24:53 lasserix: this cardview is expanding only vertically in a recycler view Feb 25 19:24:58 I'll probably just wait, but thanks. :) Feb 25 19:25:13 also the demos on the Activity transitions has beautiful animations Feb 25 19:25:13 too many animations in material are meaningless though Feb 25 19:25:19 true Feb 25 19:27:53 Here's some code: http://pastebin.com/f5fDVHSE Feb 25 19:27:55 thepoosh: since you linked to a libphonenumber test project, have you seen http://libphonenumber.googlecode.com/svn/trunk/javascript/i18n/phonenumbers/demo-compiled.html ? Feb 25 19:28:26 endHeight is numbers like 24000 Feb 25 19:28:48 groxx: yes, and I proved it there as well, but wanted to be as sure as possible Feb 25 19:28:56 perhaps you've angered it gman Feb 25 19:29:12 thepoosh: makes sense :) Feb 25 19:29:13 is it also turning green? Feb 25 19:29:20 Turning green? No. Feb 25 19:29:38 I always had a feeling Android was the Hulk. Feb 25 19:30:04 groxx: went ahead and reported this: https://github.com/googlei18n/libphonenumber/issues/636 Feb 25 19:31:02 gman23: I suspect it's because you're misusing .measure(). don't pass layout param constants, pass a MeasureSpec. Feb 25 19:31:13 gman23: you're probably telling it to assume that it's like 10px wide, so of course it's enormously tall after text layout Feb 25 19:31:18 NOOOOO, they closed it!!! Feb 25 19:31:57 groxx: Thank you very much for an answer. I actually am currently in the process of changing that Feb 25 19:32:10 So we'll see how it works out Feb 25 19:32:21 How do I read a raw XML file from a non-Android (Plain old Java) class in Android? I am using a SAXParser to read it, passing it parser.build(inputDocumentPath). However, in Android, it seems you should use getResources().openRawResource(R.raw.myfilename). Any ideas on how to read my XML file? Feb 25 19:32:28 thepoosh: er, what's the problem? does it return US or something? Feb 25 19:32:34 yes Feb 25 19:32:45 but maybe because i put in a toll free number Feb 25 19:32:48 trying again Feb 25 19:33:04 searched yellow pages for some random guy Feb 25 19:33:25 yeah, toll-free 888's aren't country specific. a "NANPA" result would probably be best, but it makes some sense. Feb 25 19:42:11 groxx: That solved the weird expanding problem I was having Feb 25 19:42:40 Now though, it's just snapping to the target height when expanding instead of nicely animating. Feb 25 19:42:54 This is the final piece, I think. Feb 25 19:43:14 Thanks for helping me though with that last part about MeasureSpec Feb 25 19:53:22 Does anyone know a reasonable way to use Theme.AppCompat and still use Holo? Feb 25 19:54:09 Apparently the word "support" is used very loosely in "Android Support Library" from what I can tell. Feb 25 19:54:23 I think that works if you used version <= 20. Feb 25 19:54:27 use Feb 25 19:54:55 The SDK Manager only allows you to download current versions, it looks like, even if you check the "Obsolete" box. Feb 25 19:55:07 Unless I'm doing something horrifically wrong. Feb 25 19:55:27 I did it. Holy shit I did it Feb 25 19:55:32 See you using Android Studio? Feb 25 19:55:37 Are Feb 25 19:55:40 I have expanding/collapsing CardViews inside a RecyclerView Feb 25 19:55:45 animating nicely,. Feb 25 19:55:52 Also with headers Feb 25 19:56:01 I am. Feb 25 19:56:27 You can specify "20" in the build.gradle. Feb 25 19:58:40 ocd: In any case, can't you use minSdkVersion=15/16? Feb 25 19:58:56 I'm stuggling to find where I can change the Title on a default menu. Is it possible to change the Title within the menu's xml? Feb 25 19:59:00 Then no AppCompat needed for Holo. Feb 25 20:00:08 The problem is I am trying to work with an app already set with AppCompat. Feb 25 20:00:27 I have discovered just how horrifically everything dies if you try to switch out Theme.AppCompat with Theme.Holo. Feb 25 20:00:54 (Someone needs to educate Google about good development practices, your entire codebase should not die when you change the theme.) Feb 25 20:02:42 Using AppCompat is way different than not. It's a whole framework. Feb 25 20:03:09 Yeah, but again, theme/code should not be tied together like this. Feb 25 20:03:43 Is there a way to open a web page when i select a Section in navigation drawer ? Feb 25 20:03:51 *when i click on Feb 25 20:04:20 Especially if they're then going to change the theme and force it on everyone. Feb 25 20:05:16 nothing was forced on you Feb 25 20:05:56 Anyone ? :D Feb 25 20:06:23 Night: WebView or external browser? Feb 25 20:06:26 JakeWharton: It feels pretty freaking forced, yes. Feb 25 20:06:34 TacticalJoke: external browser. Feb 25 20:07:03 then your feelings are broken Feb 25 20:07:24 Start an Intent with a URI and a view action. Google "android open browser" for details. Feb 25 20:07:48 You don't see anything wrong with updating the support library in a non-reversible way to a different style, and ensuring it's non-trivial to keep the existing styling? Feb 25 20:08:08 I mean "start an activity with such an Intent". Feb 25 20:08:21 TacticalJoke: Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com")); startActivity(browserIntent); ? Feb 25 20:08:28 Yeah. Feb 25 20:08:55 TacticalJoke: Do i put this on create or just in the root of the class ? Feb 25 20:09:04 well, 1) it's not "the" support library. it's a completely optional support library; 2) you don't have to update. nothing is breaking on the old version. Feb 25 20:09:42 ocdtrekkie: They have a vision they are pursuing, and give you an easy tie into that vision. If you don't want to accept that easy tie, then you are free to brach off and do your own thing Feb 25 20:10:09 You talking about Material ? Feb 25 20:10:10 s/brach/branch/ Feb 25 20:10:40 AppCompat, which provides a material look for < 5.0. Feb 25 20:10:56 Or kind of a material look. Feb 25 20:11:11 Yeah, i am using it for my app. Feb 25 20:11:25 Also TacticalJoke i get this error with this : http://pastebin.com/SJjCGjv6 Feb 25 20:11:29 Trying to move an app off of AppCompact is murderous. Feb 25 20:11:30 JakeWharton, did you take the time to answer my questions earlier today? I was offline Feb 25 20:11:42 didn't see Feb 25 20:12:03 damn it, i forgot what I had asked Feb 25 20:12:13 Oh, yes Feb 25 20:12:55 So retrofit returns an Observable for a request Feb 25 20:13:01 yiati: Their vision is moronic. But regardless, they shouldn't be tightly binding code and style together to the point that you can't have one without the other. Feb 25 20:13:20 And im trying to subscribe multiple subscribers to this observale Feb 25 20:13:23 Basically, whoever wrote 'such and such function requires Theme.AppCompat or a derivative' should be fired. Feb 25 20:13:26 but once called, i cant requery? Feb 25 20:13:42 My understanding of rxJava isnt too swell Feb 25 20:13:44 every subscriber triggers an API call Feb 25 20:14:26 And if a request is in progress, it won't requery? Feb 25 20:14:51 i don't know what that means Feb 25 20:15:07 the returned observable will make a single API call for each subscriber to it Feb 25 20:15:25 ah, thats not what I want. Feb 25 20:15:39 I want to be able to subscribe, unsubscribe as i see fit Feb 25 20:15:49 and then also make an API call as i see fit Feb 25 20:15:58 ok well that's not Retrofit's concern Feb 25 20:16:02 that's an application-level concern Feb 25 20:16:08 Yeah, well aware Feb 25 20:16:37 Was just looking for an architectual view on how to get something like that working Feb 25 20:17:57 ocdtrekkie: cool story Feb 25 20:19:06 Anyone understands what is going on here : http://pastebin.com/SJjCGjv6 ? I am trying to open a web page in external browser when i click on a section in a Navigation drawer : http://pastebin.com/wJ290ka1 Feb 25 20:19:41 Kevel: whatever it is, you can flatMap into a Retrofit Observable to trigger the API call when you want Feb 25 20:21:21 Night: The code and stack trace don't look related to me. Feb 25 20:21:42 I'm currently using Picasso to load images into an ImageView inside my RecyclerView.Adapter. I'm using the .fit().centerInside() options for Picasso to scale down the images; however, I'm noticing that just scrolling up and down really quickly I can get the memory to jump up close to 50mb quickly. Am I doing something wrong? Feb 25 20:21:50 TacticalJoke: Yeah, i think the same. But it only happens when i open that section. Feb 25 20:22:28 I just feel like smashing my phone. :S Feb 25 20:23:20 The stack trace will direct you to the code in question. Feb 25 20:24:34 codepete: probably not. I think by default there's an in-memory cache, and images are big. if it keeps growing, you may have a problem, but using memory isn't necessarily bad Feb 25 20:24:38 codepaste, did you write any code to pre-load the images? Feb 25 20:26:04 tricknology: nope I'm just constructing the URL and handing it off to Picasso to load my image. http://pastebin.com/MceMxdt2 Feb 25 20:26:55 groxx: So what I'm seeing is intended and not necessarily a bad thing? Feb 25 20:27:46 groxx: just seems strange that the same images are being scrolled over and over and the memory continues to grow. Feb 25 20:29:18 "continues to grow" could imply a problem, yes. by default it'll use a chunk of memory for the cache, so it should grow up to a point and then stop. if you haven't changed the caching behavior, and it's growing continuously, you probably have a leak elsewhere - Picasso is pretty solid. Feb 25 20:29:34 groxx: http://pastebin.com/MceMxdt2 this bit of code is being used in my onBindViewHolder method for RecyclerView.Adapter Feb 25 20:30:01 codepete: yeah, which looks fine. which probably means it's either the cache filling up, or you have a leak elsewhere. Feb 25 20:31:14 groxx: ah ok. Its something else I'm doing in the RecyclerView.Adapter is what your saying. Feb 25 20:31:39 Hey guys, can I use onAttach() in a DialogFragment as a constructor? Feb 25 20:31:51 Or would it be better to just create a constructor Feb 25 20:32:03 codepete: probably. though I still haven't seen a definite "it grows, then stops" - if that's the case, it's probably working as intended. Feb 25 20:32:03 onCreate can be used. Feb 25 20:32:07 groxx: Hmmm, I'll have to poke around. Any easy way to identify it? I was looking at ADM to view where memory was being allocated mostly and it was for android.drawable.bitmap nativeCreate Feb 25 20:32:24 Would a regular constructor work? Feb 25 20:32:58 groxx: does seem to hover around 50mb and no more. Feb 25 20:33:01 Even if it did, it'd be a bad idea. Feb 25 20:33:09 Oh, how come? Feb 25 20:33:16 Always onCreate in Android where available Feb 25 20:33:17 codepete: bitmaps take up huge amounts of space, it's pretty normal that they're the biggest consumers. in ADM there's also a "dump hprof" button that'll give you a snapshot of _all_ your memory, and will open in MAT which will let you find out _why_ things are in memory. Feb 25 20:33:26 codepete: how much ram does your device have? Feb 25 20:33:50 Ok, so onCreate is called when the dialog is created Feb 25 20:34:02 and onAttach is called when its attached to an activity Feb 25 20:34:49 Yeah. Feb 25 20:34:50 groxx: its galaxy s5 Feb 25 20:35:09 And you said the dialog is attached when .show is called()? Feb 25 20:35:22 After, yeah. Feb 25 20:35:36 codepete: yeah, that's probably a normal amount then. if it wasn't using that, then it would have to reload from disk when a view goes off screen and then comes back. the cache is useful. Feb 25 20:35:37 Ok, and onCreate is called right before it is created? Feb 25 20:36:58 codepete: the "dump hprof" + MAT stuff is super useful though, if you ever have memory problems. very much recommended. you may want to hunt some tutorials though, it's not particularly easy to jump in and start using. Feb 25 20:40:29 groxx: Thanks a lot for your help. I really appreciate it! Feb 25 20:41:31 groxx: Yeah since its on the backstack it seem when I navigate away the cache isn't wiped Feb 25 20:47:17 http://googleforwork.blogspot.com/2015/02/android-is-ready-for-work.html Feb 25 20:48:02 neat Feb 25 20:48:24 i'd be happy if i could find a plugin for firefox or chrome that encapsulates stored login info for multiple sites Feb 25 20:49:35 "Google Play for Work" i'd like to see that Feb 25 20:51:11 I'm writing to this file incorrectly because the data doesnt stick around next time I open the app. But I'm not sure where I'm going wrong. Could someone please take a look? http://pastebin.com/tPNy7wCi Feb 25 20:52:54 codepete: it won't be wiped, no. but newer things will push out older things. if you _know_ you need the memory / the images aren't useful, you can init picasso (the first time, only) with a cache you control, and you can manually clear it out (the LruCache can do that). Feb 25 20:53:15 getFileStreamPath? Wat. Feb 25 20:53:52 Just open as append every time. It's easy simpler than that code. Feb 25 20:54:01 codepete: generally though you're better off just leaving it alone. if they navigate back to where they were, it'll be fast because it's cached. if they have enough memory, the images they now see when you pop the backstack will already be cached. it's not perfect, but very simple and usually good enough. Feb 25 20:54:23 getFileStreamPath was how the tutorials I found handled that part. Feb 25 20:54:47 so How else should I handle checking if the file exists? Feb 25 20:55:57 Why do you need to check whether it exists? Feb 25 20:56:33 because if it doesn't exist, I want to create it with default data. Feb 25 20:56:54 groxx: gotcha, makes sense. Feb 25 21:00:27 and the createFile function doesnt seem to be working because whenever I try to use that file later, it gives me a "File is null" error Feb 25 21:02:00 groxx: just did the "dump hprof" you mentioned and did a Leak Report and it mentions this: One instance of "com.squareup.picasso.LruCache" loaded by "dalvik.system.PathClassLoader @ 0x42a50f68" occupies 17,375,032 (40.47%) bytes. The memory is accumulated in one instance of "java.util.LinkedHashMap" loaded by "". Feb 25 21:02:36 I don't know what I did wrong here. Feb 25 21:03:22 groxx: rest was 14.48% "android.content.res.Resources", 11.24% android.graphics.NinePatch, 10.81% android.graphics.Bitmap, 11.30% "26 instances of "byte[]" Feb 25 21:07:44 groxx: Looks like it maintaining the memory correctly i see it drop to clear more room and hovers around 50mb. I guess it just uses more since my device has a lot available. I'm guessing I'd see something else on devices with less memory. Feb 25 21:08:01 https://github.com/rudsonlive/NavigationDrawer-MaterialDesign Hi, i am using this, but i want to remove the icons and the counters, when i do that this.setNavigationAdapter(mListNameItem, mListIconItem, mListHeaderItem, mSparseCounterItem); shows an error after i delete the mListIconItem and mSparseCouterItem. How do i deal with this? Feb 25 21:18:37 When I create a new blank activity, it lets me define "Title" which appears on the defaul menu. Within an already created Activity, how can I change this title? Feb 25 21:18:47 Nightwalkerkg: dunno. what exactly do you mean by "delete", what's the error, and are you sure the library supports what you're doing? Feb 25 21:19:09 groxx: I don't need the icons on the navigation drawer. So i want to remove them. Feb 25 21:20:39 Nightwalkerkg: ah. skimming the project, it doesn't look like it's meant to do that. so probably either a) modify the source code, or b) give it a list of "empty" drawable ints so they're just invisible. I assume that won't change the spacing though. Feb 25 21:23:11 mantas322, AndroidManifest.xml :) Feb 25 21:23:31 codepete: yeah, that's pretty much what I'd expect :) iirc the cache uses 1/8 of the available ram (for your app, not total). resources always take up a lot too. Feb 25 21:24:24 mantas322, there is something like in the manifest. Feb 25 21:24:36 You can either set the name in the strings file or hardcode it Feb 25 21:24:47 codepete: apps on your device _probably_ have something like 192mb of room, 1/8th of which is ~25mb. ~20-30mb just to run your app is pretty common. Feb 25 21:25:16 Thank you! hurrMuhHexagons Moter8 ...... the only place I didnt look Feb 25 21:25:23 gawwwhhh, im such a noobie Feb 25 21:25:37 groxx: Is it possible to create a Material style navigation drawer without any adding an extra libraries and implement a sliding viewpager in one of it's sections ? The thing is, i am a complete newbie to the android development, i have tried using a few libraries to do this but only ended wanting to smash my phone. :| Feb 25 21:25:39 no problem :) Feb 25 21:27:17 groxx: What i want to do is this but with some changes : https://github.com/rudsonlive/NavigationDrawerViewPage-MaterialDesign I want to remove the account header and just use the logo, remove the icons, and for each tab one the page viewer have a specific fragment. Feb 25 21:27:42 Can you give me some directions where i can learn how to do this ? Android documents, or something. Feb 25 21:29:58 JakeWharton do you like okio Feb 25 21:30:03 of course Feb 25 21:30:18 g00s: https://github.com/square/okio/graphs/contributors Feb 25 21:30:30 JakeWharton you contribute to everything :| Feb 25 21:30:59 only the things i like Feb 25 21:40:45 why is it hard just to make a little alert() popup? Is there any easy way? Feb 25 21:41:55 lol lenovo.com Feb 25 21:42:24 Use toast? Feb 25 21:42:45 toast doesn't have an OK button does it? Feb 25 21:42:57 Nope. Feb 25 21:42:58 I need the user to confirm before continuing Feb 25 21:43:17 ej alertdialog Feb 25 21:43:31 I've got to use some kind of builder fragment dialog alertdialog?! Feb 25 21:43:59 you aren't going to last long as an android dev haha Feb 25 21:44:56 gdrc: the brokenness? http://cl.ly/image/3T2D1s3Z0s2M Feb 25 21:44:58 it would be easier to make an activity with an OK button Feb 25 21:45:43 Hello, I can not see my device with the command "adb devices" on my MacBook, but with the same phone and cable, I can see it on Ubuntu, anyone has an idea? Feb 25 21:45:49 groxx, http://www.theverge.com/2015/2/25/8110201/lenovo-com-has-been-hacked-apparently-by-lizard-squad Feb 25 21:46:23 gdrc: ah, I'm not seeing that Feb 25 21:46:28 may be fixed already :| Feb 25 21:46:29 groxx, they just fixed it Feb 25 21:47:09 hm. now I get it on another browser. might be a DNS trick. Feb 25 21:47:20 it is Feb 25 21:51:36 does AlertDialog dialog = builder.create(); display the dialog or just create an instance of it? Feb 25 21:52:33 show() will show Feb 25 21:52:55 Just create. Feb 25 21:54:07 jdsampayo: Why did you waste your money on a mac book? Feb 25 21:54:59 You realise it is just an intel Feb 25 21:55:29 phix: because I need to build apps for the two platforms Feb 25 21:55:51 they probably like to use their laptop to fend off attackers without it shattering into a million pieces by being gripped slightly too tight. Feb 25 21:56:17 the fine art of laptop gripping is tough to master Feb 25 21:57:02 indeed. it mustn't slip, lest it fall to its demise, yet you must restrain yourself so it's not crushed like a bag of (micro)chips. Feb 25 21:57:22 I recommend coating the device in grip-tape. Feb 25 22:02:49 If i close my bluetooth socket i get a java.io.IOException: bt socket closed, read return: -1. im running 4.2.2 and im using the bluetooth chat example pattern. anyone familiar with the problem have a workaround? Feb 25 22:03:08 teasp00n: believe that is what is supposed to happen Feb 25 22:04:10 lasserix: the app then crashes about 30 seconds later Feb 25 22:04:31 what's the actual crash? Feb 25 22:04:59 lasserix: let me trawl the logs, i see a helluva a lot of GC activity and then the app dies Feb 25 22:05:26 if it crashes (not ANR) then the logcat should have a error Feb 25 22:06:04 does anyone know how to encode emoji for strings resources? I'm reading through https://code.google.com/p/android/issues/detail?id=81341 and similar, but I can't find any workarounds. Feb 25 22:08:57 lasserix: it's not obvious from the log, let me keep looking and if it seems relevant ill post it back. thanks for your help so far though. thought that read exception was the problem. ill look at what i do with it - that might actually be the issue Feb 25 22:10:32 teasp00n: well when the socket closes the open stream throws IO exception since one end closed... so Feb 25 22:10:57 you might be reading/writing into something, but since its closed and you didn't handle it correctly, its corrupting memory and crashes Feb 25 22:17:37 lasserix: my catch block doesn't run, is that IO exception not bubbled up to me? Feb 25 22:18:25 umm Feb 25 22:18:39 what is the error crashing your app? Feb 25 22:18:42 go to logcat Feb 25 22:18:47 filter on your app tag Feb 25 22:18:52 select show errors Feb 25 22:31:40 lasserix: http://pastebin.com/5KRmAdfz Feb 25 22:31:49 rschmidt: hey… crosswalk worked perfectly Feb 25 22:31:53 rschmidt: thanks for the help :) Feb 25 22:32:13 luist: no problem, glad to hear it :) Feb 25 22:32:49 rschmidt: this is an amazing project.. noone should ever use the native webview lol Feb 25 22:34:26 Anyone used MaterialTabs from Neokree ? Feb 25 22:34:40 I need an explanation. :P Feb 25 22:35:17 luist: yeah, newer versions of Android are a little better on that front, but Crosswalk is a great way to get a decent webview into older versions Feb 25 22:36:13 scrollview can't have a scrolllistener ... what stupidity Feb 25 22:39:03 teasp00n: if it is not catching that Exception you need to put a catch for that exception Feb 25 22:40:55 I am using this as my viewPager : http://pastebin.com/YRqkG9X6 I need two tabs for my app, i just need someone to explane me how can i do this. :P Feb 25 22:43:53 lasserix: i notcied that logging the exception meant no subsequent calls in the catch were executed so i removed that Feb 25 22:44:19 lasserix: now the rest of the catch code runs and i dont see the GC spam i was seeing before, very peculiar but i think it might have fixed my issue... Feb 25 22:44:49 hmm maybe your log call had something that caused it to crash out Feb 25 22:51:54 good evening Feb 25 22:52:22 has anyone played much with bluetooth discovery intervals? Feb 25 22:52:51 ping g00s he's the bluetooth expert ;) Feb 25 22:53:41 okay, thankyou Feb 25 22:55:28 g00s: there isnt much out there concerning bluetooth discovery interval setting; is some form of change to the source and then compiling the module the right course of action? or is there an easier way? something like a conf file somewhere Feb 25 22:58:12 how is offsetTopAndBottom used to do parallax effects? Feb 25 22:58:30 if i move one view via that, how do i make the other view expand in size? Feb 25 22:59:02 TIL: don't try to put non-BMP characters in android xml. it explodes. YET MORE reason to be all (╯°□°)╯︵ ┻━┻ about the resource system :| Feb 25 22:59:48 is that a donut who just fell out backwards out of a swing? Feb 25 22:59:57 lol Feb 25 23:00:27 ┻━┻ ︵ヽ(`Д´)ノ︵┻━┻ Feb 25 23:00:38 the perils of double-swinging strike again Feb 25 23:01:05 one in a million odds so said he to the proctologist Feb 25 23:01:46 Text is freaking complicated. :\ Feb 25 23:03:12 TacticalJoke: yeah. I ended up diving around, learning how CESU-8 is encoded, encoding it by hand into an xml file, trying that, finally put the damn thing in a java string in source and it works. lesson learned: no surrogate pairs in android xml. Feb 25 23:03:56 Ugh. Sounds stressful. Feb 25 23:04:51 the official response seems to be "we should probably change our entire XML parsing structure / the entire VM to fix this bug". aka "wontfix": https://code.google.com/p/android/issues/detail?id=64892 Feb 25 23:06:00 also fun stuff like "that said, as we see with how easy it is to crash Settings by switching to Arabic, most code that uses NewStringUTF is pretty suspect to start with" ... erm. may be worth fixing some day, perhaps? Feb 25 23:06:58 * groxx wants a UTF8 JVM so badly Feb 25 23:19:17 so I have a viewpager that has some fragments in it Feb 25 23:19:28 sometimes those fragments have buttons Feb 25 23:20:08 I'd like to capture taps that are in the area of the viewpager Feb 25 23:20:14 but only if the fragment's buttons don't handle it Feb 25 23:20:18 any suggestions on how to do that? Feb 25 23:21:35 are the fragments just going to capture all taps? Feb 25 23:27:09 how hard is it to serialize my class into a bundle in onSaveInstanceState? Feb 25 23:28:27 Around 17.7 difficulty units. Feb 25 23:28:38 This makes it easier, though: https://github.com/johncarl81/parceler Feb 25 23:28:45 I want a view to expand in response to scrolling, how can i make a view expand? Feb 25 23:30:54 lasserix: um. going to need more detail Feb 25 23:30:57 same with you, ej Feb 25 23:32:16 I have a game with a load of nested classes, when I rotate it resets the activity, I want to save and load the instance state. Is it as easy as making everything implement serializable? Feb 25 23:33:28 I am trying to make a collapsing toolbar/header above a scrollview, so i need to expand the scrollview in size Feb 25 23:33:49 Serializable isn't recommended in general here, as it's said to be slow. Feb 25 23:34:25 What exact data do you want to persist? Feb 25 23:38:57 lasserix: I'm planning to simply animate the toolbar shrinking (and let the ListView beneath expand to fill the remaining space). Can you do something like that? Feb 25 23:39:17 how to make listview expand? Feb 25 23:39:27 they have libraries like https://github.com/ksoichiro/Android-ObservableScrollView Feb 25 23:39:31 Just with a RelativeLayout. Feb 25 23:39:40 It worked when I tried it. Feb 25 23:39:44 TacticalJoke: but the listview has a set height Feb 25 23:39:54 so when you shrink the toolbar, the listview still has a specific height Feb 25 23:40:17 meaning, there exists a gap between bottom of listview and bottom of screen, or something Feb 25 23:40:49 Ah. In my case, the ListView fills the screen (taking into account the Toolbar). Feb 25 23:40:50 you mean you put toolbar + listview(below->toolbar) and then shrunk the toolbar, so the listivew would move up? would it move up or expand up? Feb 25 23:40:58 Expand up. Feb 25 23:40:59 Brb. Feb 25 23:41:09 how did you shrink the toolbar? Feb 25 23:42:16 I found something on SO. Feb 25 23:42:24 I haven't implemented this feature yet; I was just doing a test. Feb 25 23:42:29 But it worked instantly. Feb 25 23:42:31 i think that would work can you post the code? Feb 25 23:42:45 TacticalJoke: what's SO? Feb 25 23:42:49 Okay, one sec. Feb 25 23:42:51 StackOverflow. Feb 25 23:45:14 oh haha! thanks :) Feb 25 23:48:31 I'm struggling to find the SO answer again now. Feb 25 23:48:36 It subclassed Animation, I think. Feb 25 23:48:38 It was pretty simple. Feb 25 23:50:13 This is what the XML looks like (really simple, of course): http://pastebin.com/WvjT830F Feb 25 23:50:33 Oops, that alignWithParentIsMissing thing should be on the ListView, not the Toolbar. Feb 25 23:52:39 so how do collapse the toolbar/ Feb 25 23:53:04 will Serializable work for almost any object or are there limitations? Feb 25 23:53:31 This was it: http://stackoverflow.com/a/13381228 Feb 25 23:53:35 God, I had to google everything to find that. Feb 25 23:53:47 Only found it by googling 'android "new animation" toolbar'. Feb 25 23:53:52 Because I remembered "new Animation()". Feb 25 23:54:45 oh so you just collapse it automatically, not proporationally to scroll? Feb 25 23:55:06 haha i was looking at this so the other day ;p Feb 25 23:55:16 That's the only one I found that worked. Feb 25 23:55:22 However, I only spent around 10 minutes on the problem. :D Feb 25 23:55:30 I just plan everything ahead. Feb 25 23:55:44 I'll obsess over the details when it comes time to implement the feature. Feb 25 23:55:50 so you just initiate collapse if the user scrolls down? the toolbar does not shrink as a function of the scroll? Feb 25 23:56:00 Yeah, if they scroll down. Feb 25 23:56:07 Or, in my case, if they collapse a comment. Feb 25 23:56:22 I can't remember how well it worked with scrolling. I think it seemed fairly good. Feb 25 23:57:54 Hmm, why doesn't Toolbar come with some kind of "hideWithAnimation" method? Feb 25 23:58:16 It's such a standard pattern. Why doesn't Android gives us this kinda stuff. Feb 26 00:17:46 hmm think i can pullit off with padding Feb 26 00:58:26 Hey, it's me again, i know i am boring as hell but i have some small issue i need to fix. I managed to do everything i tried to ask here today. :P Here is the video of the problem : https://vid.me/SGVe I am using this : https://github.com/jpardogo/PagerSlidingTabStrip and this is my code : http://pastebin.com/N4w6h54U . What am i doing wrong ? Feb 26 01:02:31 Nightwalkerkg: are you reusing the fragment, or creating a new one every time? Feb 26 01:02:44 groxx: Reusing. Feb 26 01:02:57 I know i forgot something, but i can't remember what. Feb 26 01:05:17 groxx: You have any ideas ? Feb 26 01:06:12 wow I actually made my app save and load state by serializing it Feb 26 01:06:26 didn't expect it to work Feb 26 01:07:13 Nightwalkerkg: too much code in there for me to read in depth at the moment :\ I _suspect_ it's just not built to support detaching or something. though there are some other oddities, like that the titles aren't what you have in code in the video (or was that just from older code?) Feb 26 01:07:51 Object a = new Object(); Object b = a; <- if that is serialized and unserialized does it end up with b still being the correct reference to the newly unserialized a? Feb 26 01:07:58 Nightwalkerkg: dunno though. when you drag-to-page, does the pager actually switch, and it's just a visual bug on the tabs? Feb 26 01:08:19 groxx: The pager dosen't show anything other then the tabs. Feb 26 01:08:20 ej: deserializing creates a new object with the same data Feb 26 01:08:26 It's like everything gets destroyed. Feb 26 01:08:54 groxx: yeah but see how b is a reference to a. Does the new b reference the new a when they're both unserialized? Feb 26 01:08:55 Nightwalkerkg: ah. does it never show the fragments you have in getItem? Feb 26 01:08:58 groxx: Also the video isn't mine, i found it on the stack : http://stackoverflow.com/questions/28386218/strange-issue-with-material-pagerslidingtabstrip-fragmentpageradapter-and-back Feb 26 01:09:06 But i don't understand how he fixed it. Feb 26 01:09:17 I tired changing it but it's not working for me. Feb 26 01:09:25 ej: no. the new B has no way to know that anything was referencing the original. Feb 26 01:09:53 Hi everyone! I came across this project, but I can't figure out a way to get Android studio to import it sanely since I want to try my hand on writing more parts of the GUI (since it's not gradle based, but isn't an eclipse project either). http://csclub.uwaterloo.ca/~dtbartle/pidroid/ Feb 26 01:10:21 ej: it's the same as if you deserialized the same data twice. you get two brand new objects, which have the same contents, but they're not the same object. and none of them are the same object as the original. Feb 26 01:10:55 I'm amazed it works then Feb 26 01:10:59 Nightwalkerkg: sorry, dunno :\ never used that lib, and can't devote much time to it now. Feb 26 01:11:03 ej: what works? Feb 26 01:11:20 serializing my entire game state and then unserializing it and reloading it Feb 26 01:11:49 groxx: It's fine. :D Thanks for trying at least. :P I couldn't get any help today here, but it made me search like crazy, at least i managed to implement this library. :P Feb 26 01:11:50 ej: are you _actually_ serializing it, or are you just putting it in a bundle? Feb 26 01:12:34 I'm using an ByteArrayOutputStream and putByteArraying it in the bundle Feb 26 01:13:41 so what you're saying is where I have multiple references to the same object, all the references become new individual objects? Feb 26 01:14:27 I should really just test it to find out for certain Feb 26 01:15:15 JakeWharton, got an annotation processor question for you Feb 26 01:15:28 hit me Feb 26 01:15:34 ej: ¯\_(ツ)_/¯ dunno. why (or why not) it's acting like you expect is coming from somewhere else, then. though putting something into a bundle doesn't immediately serialize anything, so you can get the same object out that you put in. Feb 26 01:16:00 yeah but it's a bytestream... surely it's the same as writing it to file and back Feb 26 01:16:05 Hello, how would I go about programatically adjusting the width and height of an object in DIP? Feb 26 01:16:31 I'm currently setting manually the width and height of it in pixels but this causing some issues on smaller screens so I want a way to specify it in DIP Feb 26 01:16:42 ej: no, I mean that "a = new Object();" and "a = deserialize();" are roughly the same for this purpose. so if "a = b; b = deserialize(serialize(a));", a will be the old b, b will be a copy of a's contents. Feb 26 01:17:30 my ide doesn't seem to support annotations. I'm trying to set it up manually, but I think its using an aidl(?) compiler, rather than straight javac. is there any way I can tell my idea to use a normal javac compiler for the annotation processing? Feb 26 01:18:55 Using AppCompat -- if the user long-presses text in an EditText or a WebView, the contextual action bar shows and pushes down my Toolbar. I want to override this, but MyActivity.startActionMode, MyActivity.startSupportActionMode, and MyActivity.onWindowStartingActionMode never get called. Any suggestions regarding what to do? Feb 26 01:19:04 (I don't want to use setSupportActionBar.) Feb 26 01:19:05 drinfernoo: what makes you think it's not supported? and what IDE? Feb 26 01:19:24 thanks for entertaining my question anyhow groxx Feb 26 01:19:28 on to the next one.. Feb 26 01:20:08 The only one that gets called is onSupportActionModeStarted, but by then it's too late. Feb 26 01:21:12 JakeWharton, they don't work lol Dagger-related things crashes at compile-time, ButterKnife injects nulls, etc... I'm using AIDE, which is an on-device ide. Feb 26 01:21:40 but I'm hoping there's some setting I can find to make it work Feb 26 01:22:38 i really have no idea Feb 26 01:22:43 do they have an issue tracker or support forum? Feb 26 01:23:45 Haha. I have an idea: I could hide the Toolbar in onSupportActionModeStarted and show it in onSupportActionModeFinished. Crazy, though. Feb 26 01:25:15 On the plus side, I wouldn't have to set that "overlayActionBar" flag (whatever it's called). Feb 26 01:27:08 can you have different strings.xml for landscape vs portrait? Feb 26 01:28:18 JakeWharton, haha not really. their community seems a little toxic tbh. what kind of things would I look for, if I was using eclipse, for example? I think AIDE is kind of a strange mix of eclipse and gradle projects. I don't have access to maven, so I have a local repo set up and working, but that shouldn't matter as I've got dagger/butterknife/etc as jars Feb 26 01:28:34 ej: https://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources values-port/ vs values-land/ Feb 26 01:29:00 heh I searched values-land and it didn't come up Feb 26 01:29:15 if you're using Gradle then the mere fact that the dependencies are on the classpath during compilation means that the annotations processors should run Feb 26 01:31:08 ej: it's a qualifier that you can add to any of the res/ folders. you can also have e.g. values-land-mdpi-v14/ Feb 26 01:32:12 I found a file at .idea/compiler.xml that looks like it controls annotation processing profiles, and I have enabled="true", and it seems to give me the same result Feb 26 01:32:14 will I have to clone the entire strings file or just add the entries that are different for land? Feb 26 01:32:17 JakeWharton: AIDE doesn't have complete gradle support, for some reason. my _guess_ is that it's not actually running gradle. Feb 26 01:33:53 my emulator freezes all the time (when I press run it maxes out cpu and fails), so I have to kill the process and restart it. Feb 26 01:34:06 groxx, I believe that's the case, and I haven't really figured that out either Feb 26 01:34:10 I keep a terminal window open just to kill it Feb 26 01:34:37 ej: at the very least I know it'll pull from the unqualified folder and then you can override them selectively in e.g. -land. I _think_ it pulls from all available matches, in priority order, though. Feb 26 01:34:55 sounds good, I'll be trying it later Feb 26 01:35:23 Dagger generates class files to compile into the working injection, right? Feb 26 01:35:44 yes Feb 26 01:35:48 Hmm, this is weird. Setting windowActionModeOverlay fixes my problem. I don't even have to use setSupportActionBar. Feb 26 01:35:56 It just knows to go over my Toolbar. Feb 26 01:37:22 Hello, how would I go about programatically adjusting the width and height of an object in DIP? Feb 26 01:37:24 I'm currently setting manually the width and height of it in pixels but this causing some issues on smaller screens so I want a way to specify it in DIP Feb 26 01:37:29 anyone know? Feb 26 01:39:04 dvass: just think of your pixel values as DIPs, and multiply them by the display density to get the same behavior https://developer.android.com/reference/android/util/DisplayMetrics.html#density Feb 26 01:44:22 Okay, the solution is just "set windowActionModeOverlay" because the contextual action bar simply appears on top. Way simpler than I was thinking (I was thinking it had to replace the original ActionBar). Feb 26 01:44:43 As long as my Toolbar is actionBarSize or smaller, it looks fine. Feb 26 01:45:08 Let's try again, maybe someone who knows joined : Here is the video of the problem : https://vid.me/SGVe I am using this : https://github.com/jpardogo/PagerSlidingTabStrip and this is my code : http://pastebin.com/N4w6h54U . What am i doing wrong ? Feb 26 01:45:18 that kinda makes sense (as long as you don't need access to the actionbar while showing the overlay) Feb 26 01:45:27 <_genuser_> anybody got a clear idea on how much memory space a single android process is given access to? I remember a convo on it a few days ago. Feb 26 01:45:29 Yeah. Feb 26 01:45:37 _genuser_: it depends. Feb 26 01:45:59 _genuser_: I believe it's http://developer.android.com/reference/java/lang/Runtime.html#maxMemory%28%29 though Feb 26 01:46:01 <_genuser_> groxx: eh, tell me more. Feb 26 01:46:11 _genuser_: you'll never get me to talk! NEVER! Feb 26 01:46:31 I love solving systemic bugs with one-liners. Feb 26 01:46:32 <_genuser_> groxx: so your lips a sealed? we'll have to bring in some interrogators... Feb 26 01:46:37 Simplicity FTW. Feb 26 01:47:22 _genuser_: as long as it's not also interrodiles, I think I'll be fine. Feb 26 01:47:41 * _genuser_ googles interroodil..... Feb 26 01:48:01 _genuser_: interro_gators_, interro_diles_ -> alligator / crocodile. Feb 26 01:48:04 How can i use picasso to show an image from the web if i dont know the image size beforehand? Feb 26 01:48:13 .fit().centerCrop(). Feb 26 01:48:15 * groxx joke fail Feb 26 01:48:26 <_genuser_> groxx: ah, I thought it was a refrence to some cool sci-fi show. Feb 26 01:48:26 It was pretty good. Feb 26 01:48:43 _genuser_: alas no. maybe they make an appearance in Sharknado or something though. Feb 26 01:49:13 that made it disspear Feb 26 01:49:27 <_genuser_> groxx: this this maxMemory/totalMemory()/freeMemory() thing is going to be tricky. I guess I can't really know how much to store in memory. Feb 26 01:49:49 <_genuser_> groxx: I don't wanna run out of memory, but I want some 2MB just loaded in memory all the time for fast access instead of computing it over and over Feb 26 01:50:09 _genuser_: you'll probably be fine. 2mb ain't much. Feb 26 01:50:38 <_genuser_> groxx: well, when combined with 2-3MB per task that the rest of the application is using, it was crapping out previously. Feb 26 01:50:45 I mean, if you're on a G1 it might be too big (16mb heap), but _most_ I encounter are >32mb, many >128. Feb 26 01:50:46 How should I accomplish this? Would I want to use google maps and then overlay buttons (if that is even possible)? http://pastebin.com/56hwvrd9 Feb 26 01:50:51 groxx: It reminded me of this: What do you call an alligator in a vest? An investigator. Feb 26 01:50:53 <_genuser_> groxx: one of the main reason I moved to picasso for all the bitmap memory management bits. Feb 26 01:50:59 TacticalJoke: xD Feb 26 01:51:10 _genuser_: ah. soft references perhaps? Feb 26 01:51:11 lasserix: does your view have a size? Feb 26 01:51:12 <_genuser_> TacticalJoke: good one. Feb 26 01:51:22 hey guys, I have a small problem with my layout. I am animating it, removing it, then inflating another in its place. onanimationend. but it is disappearing Feb 26 01:51:24 JakeWharton: nah that's why Feb 26 01:51:37 i mean, what do you expect it to do? Feb 26 01:51:42 something needs a size Feb 26 01:52:00 you can just load it at the raw size... but that's not going to end well for your heap Feb 26 01:52:23 <_genuser_> groxx: hmmm, softreferences, there's somethign to think about. Feb 26 01:52:33 don't use softreferences on android Feb 26 01:52:43 I was going to say I'm not sure how well they work on android, but in principle... Feb 26 01:53:00 JakeWharton: some reason in particular? Feb 26 01:53:08 <_genuser_> ah JakeWharton wanted for murder of a good idea. Feb 26 01:53:11 Android does not implement them in any reasonable factor Feb 26 01:53:17 They're basically WeakReferences Feb 26 01:53:29 they disappear before the heap expands? Feb 26 01:53:33 <_genuser_> so it's the dalvik people to blame then. Feb 26 01:54:16 sure, whatever Feb 26 01:54:46 <_genuser_> I guess it's back to old school. treat memory as precious resource and create compact object and load them carefully. Feb 26 01:55:33 groxx: Managed to fix the damn thing. :D https://www.diffchecker.com/diff Feb 26 01:55:42 Oh, wait. :D Feb 26 01:55:55 https://www.diffchecker.com/uthgt5u5 Feb 26 01:56:10 nvm :x Feb 26 01:56:56 capella http://venturebeat.com/2015/02/25/google-now-automatically-converts-flash-ads-to-html5/ Feb 26 01:58:59 ah, drat, SoftReference is less defined than I thought. so yeah _genuser_, not really good enough for your use. the android docs do occasionally recommend using them for caches, but iirc googlers have also repeatedly said it's a bad idea in their presentations / google I/O / etc. Feb 26 01:59:31 is there a way to pre-buffer videoview? Feb 26 02:01:53 lasserix: Are you using VideoView to play animated GIFs? Feb 26 02:02:00 No Feb 26 02:03:44 I just found a really funny bug in AppCompat. If you open a Spinner and tap an item, and then *immediately* tap outside to cancel the dropdown, when you open the Spinner again the item will be selected but with the *Holo* theme. Feb 26 02:03:54 Okay, not really funny, but kinda interesting. Feb 26 02:04:22 thats ... really wtf ... congrats TacticalJoke Feb 26 02:04:53 TacticalJoke: https://github.com/sbakhtiarov/gif-movie-view Feb 26 02:04:55 It's like when you go outside of the boundaries in a computer game. Feb 26 02:05:27 lasserix: Do you know whether that supports zooming? Feb 26 02:05:58 does not look like it Feb 26 02:06:13 Ah, yeah. The source is really short. Feb 26 02:07:11 hm. seems like it'll be kinda slow to draw things. and fwiw gif support with Movie is pretty bad, though basic ones work Feb 26 02:07:41 <_genuser_> groxx: at least my device is reporting 64MB of max mem. total reports 14MB (which should be current usage). so I guess it's got a ways to go. Feb 26 02:07:58 Thanks, lasserix. I'll probably use that technique (at least to start with). Feb 26 02:08:07 groxx: Oh. Feb 26 02:08:14 well the proper way is to use ndk split the gif then load it Feb 26 02:08:15 but.. Feb 26 02:08:21 groxx: I need a GIF player for this reddit app. What's the best way? Feb 26 02:08:37 TacticalJoke: afaik, webview. which is a horrible solution. Feb 26 02:08:45 Yeah. My current solution. lol Feb 26 02:09:01 I found a gif decoder a while ago, which works WAY better, but it's also pretty brutal to memory. Feb 26 02:09:22 eventually i want to build an off-thread decoder that draws to a surface :| but that's one of those "eventually" things. Feb 26 02:10:07 TacticalJoke: when Movie works, it works decently. it's just hard / maybe impossible to know when it will and when it won't. Feb 26 02:10:20 groxx: Do those Movie issues apply to 15+? I did see Romain Guy saying that Movie can be used here. Feb 26 02:10:36 TacticalJoke: everywhere I've tried, which includes 4.4 Feb 26 02:10:38 Ah. Feb 26 02:11:02 I know of a reddit app that uses this: https://code.google.com/p/android-gifview/source/browse/GifPlayer/src/jp/tomorrowkey/android/gifplayer/GifDecoder.java?r=3 Feb 26 02:11:14 But it fails every now and then with OOM exceptions. Feb 26 02:11:24 yeah, looks similar to what I've used, though I'd have to look a LOT closer to see if it's the same thing Feb 26 02:12:02 Maybe the user could choose. "WebView, Movie, or something that'll eat up all your memory?" What an awesome choice. :D Feb 26 02:12:41 definitely similar looking. check out the source - it keeps creating and tossing bitmaps, decodes entire frames rather than the regions that changed, etc. it _works_, but it's a heap-fragmenting nightmare, and the alloc pauses make it really stuttery. Feb 26 02:12:47 To be fair, WebView works and supports zooming. But I would like to avoid is as much as possible. Feb 26 02:12:58 Ah, yeah. Feb 26 02:13:50 ah, wait, that one seems to be caching everything up-front. Feb 26 02:14:32 so it'll be painful to init, but then fast, if it's small / short. I want to handle some big + long ones, so it's completely not an option Feb 26 02:14:55 You're looking for a solution too? Feb 26 02:15:45 s/looking/looked, gave up, hoping for something to appear before I have to build it myself/ Feb 26 02:15:54 lasserix: Are you still making one? Feb 26 02:15:55 would be fun though Feb 26 02:16:15 maybe depends on what i end having to do for work Feb 26 02:16:28 The fact that WebView works well makes me disinclined to try making one. Feb 26 02:16:36 I also am totally clueless about image formats. Feb 26 02:16:58 yeah, webview works pretty well. it can get really stuttery at times though. Feb 26 02:17:11 I guess I could sample the first few bytes and determine whether an image is an animated GIF, and if so show a WebView. Feb 26 02:17:12 but at least it functions + won't look any better in a browser. Feb 26 02:18:00 Now that I think about it, it would be fairly easy to hide the fact that WebView is being used, too. Feb 26 02:18:17 Though experienced users could tell. Feb 26 02:18:18 Hi. I'm working on an Android NDK application and for some reason I am unable to link to static libraries, only shared ones...Any thoughts as to what might be the cause of this? Feb 26 02:20:01 Thanks, groxx. This has been really useful info. Feb 26 02:21:28 TacticalJoke: np, good luck :) if I ever make progress I'll be sure to let ya know. Feb 26 02:21:35 but that's months away, minimum Feb 26 02:21:55 :) Feb 26 02:22:05 <_genuser_> groxx: what're you writing that's months away? Feb 26 02:22:48 Here's a dump of my compiler flags if it helps: Feb 26 02:23:08 http://paste.ubuntu.com/10419540/ Feb 26 02:23:29 _genuser_: I would _like_ to build a decent off-thread gif decoder. Feb 26 02:23:53 I need to handle huge animated images in some weird formats, so nothing out there now works for me at all Feb 26 02:24:04 <_genuser_> groxx: lol, if you need a break, can you right a jpeg exif header parser that also works on byte[] and doesn't require the file to be on disk.... Feb 26 02:24:20 <_genuser_> groxx: but it suck about the gif situation that you're talking about. Feb 26 02:24:45 <_genuser_> groxx: is there's a converter you can use to convert them to a move standard gif format? Feb 26 02:25:02 * groxx looks up ExifInterface Feb 26 02:25:10 String filename only? wtf Feb 26 02:25:12 groxx: Just curious -- does WebView handle everything you need, animated-GIF-wise? Feb 26 02:26:09 Can someone help me with some code? Feb 26 02:26:15 <_genuser_> groxx: you think if it at least took in a stream, you could generate one off of a byte[] somehow and send it in. Feb 26 02:26:29 I need to add an activity to my android manifest Feb 26 02:26:37 <_genuser_> ClassyCritic: you're best bet is to ask your question and whoever can help you will speak Feb 26 02:27:14 TacticalJoke: webview would require me to duplicate all my touch code in JS (doable, but still), and be way slower / less consistent framerate. by "big" I mean "a couple thousand pixels on each size, 100+ frames", and sometimes they want only 16ms between frames. not sure if that's possible, but I can get soooo much closer than webview. Feb 26 02:27:44 So what I have is an sms app. I have my main sending activity. Then I have the activity for putting texts into a list view. When I test run it doesn't add the list view. So how do I add that list activity to my manifest? Feb 26 02:27:46 Anyone able to help? Feb 26 02:27:55 I have an imgur link if you need to see Feb 26 02:28:10 Ah, okay. So do you have any solution right now? Feb 26 02:28:32 TacticalJoke: I just show the first frame and call it quits :) Feb 26 02:28:41 <_genuser_> ClassyCritic: you added a second activity to your project? it has a listview in layout? Feb 26 02:28:54 vast majority of my images are static. Feb 26 02:28:57 I have only activity_main.xml Feb 26 02:29:00 Eye sea. Feb 26 02:29:11 I have my MainActivity.Java Feb 26 02:29:22 And then my new Java Feb 26 02:29:28 ClassyCritic: It's hard to tell what you're asking. :) Feb 26 02:29:39 <_genuser_> ClassyCritic: and then are you adding a new activity to your project? Feb 26 02:29:46 <_genuser_> ClassyCritic: or are you asking how to add it? Feb 26 02:29:50 TacticalLink: Can I post imgur link? Feb 26 02:30:00 Of course. Feb 26 02:30:02 I just need to add it to my xml Feb 26 02:30:22 <_genuser_> you're trying to add listview to your exsiting mainactivity.java? Feb 26 02:30:56 http://i.imgur.com/jTTV2fb.jpg Feb 26 02:31:11 No I created a new Java for the list view Feb 26 02:31:57 FYI, you can press Prnt Scrn or whatever. :D Feb 26 02:32:27 Haha I haven't figured it out it doesn't work on my distro for some reason :D Feb 26 02:32:40 <_genuser_> my android keyboard doesn't show a "print screen" that you speak of.... Feb 26 02:32:59 TIL "Listlist;" is legal syntax. ;o Feb 26 02:34:20 whitespace--, environmentalism++ Feb 26 02:34:26 Save The Pixels™ Feb 26 02:34:37 <_genuser_> oh dont' launch a new campaign. Feb 26 02:34:40 I wonder whether that's legal in C#. I just assumed that'd not compile. Feb 26 02:35:03 So any ideas? Feb 26 02:35:04 ClassyCritic: To be honest, I still don't know what you're asking. Feb 26 02:35:29 Maybe you could ask in "expected: foo; actual: bar" format. Feb 26 02:35:45 Ok so basically... I have a main activity xml right? It has my send button and its supposed to have a list view. Feb 26 02:35:49 I have that all added. Feb 26 02:36:04 I have the send button and edittext fields in my main activity Feb 26 02:36:05 ClassyCritic: so um theres this new thing the kids are doing these days it's called pastebin.com Feb 26 02:36:17 <_genuser_> lasserix: lulz, harsh!! Feb 26 02:36:27 Lasserix: I'm away from my comp and didn't have an alternative sorry. Feb 26 02:37:25 TacticalJoke: I want to have the activity I just made appear in the list view. I read that I need to add the activity to the manifest, however I'm not quite sure how. Feb 26 02:37:32 ClassyCritic: yeah yeah we all know you are secretly obsessed with using snapchat and instagram Feb 26 02:38:04 ClassyCritic: works the other way around, listview is part of the view hierarchy which will be invoked by the activity Feb 26 02:38:14 usually your activity will have a listview and control it Feb 26 02:38:27 ClassyCritic: sounds like you need to read the basics Feb 26 02:38:49 Lasserix: I think I have that right now but I'm not positive... Feb 26 02:38:53 http://developer.android.com/training/index.html Feb 26 02:39:53 ClassyCritic: well yeah you do Feb 26 02:40:29 but you should a) close your cursor b) use the actual SMS api Feb 26 02:41:04 also did you remember to add READ_SMS to your manifest as a permission? **** ENDING LOGGING AT Thu Feb 26 02:59:59 2015