**** BEGIN LOGGING AT Mon Dec 15 02:59:59 2014 Dec 15 03:00:19 I'll try. :) Hopefully it won't take too long to release. Dec 15 03:00:24 ;) Dec 15 03:00:30 hey Dec 15 03:01:12 jumping into the earlier convo, which is faster, LinearLayout with basedAligned two TextView's or single TextView with spannables then I can tell you its Spannables Dec 15 03:01:13 is there a good Linux tool to analyze saved logcats? Dec 15 03:01:30 I can explain why if people are interested Dec 15 03:02:01 Sure, Napalm. :) Dec 15 03:02:10 also, a TextView with spannables is obviously faster than a WebView with HTML.. and why is that.. its pretty much a similar situation Dec 15 03:04:15 I dont think so Dec 15 03:05:00 I got the traceview thing working, BTW. But it looks rather complicated. Dec 15 03:05:10 Might have to play around with it later. Dec 15 03:06:14 sorry went afk, back now Dec 15 03:06:24 gordon_: you disagree, but with what part? Dec 15 03:06:58 that it's the same situation (with textview) Dec 15 03:07:16 it doesnt need to parse whole DOM Dec 15 03:07:22 check for scripts, etc Dec 15 03:07:31 thats what I said Dec 15 03:07:39 TextView is faster than HTML Dec 15 03:07:44 Napalm: So spans will be much faster than LinearLayout with bold TextView + normal TextView. Dec 15 03:07:46 WebView with HTML Dec 15 03:07:55 TacticalJoke: yea, back to my point Dec 15 03:08:23 ok, so lets start with some basic premises, any problem solved on computer has two main areas that affect its performance.. cpu time and memory Dec 15 03:09:12 it is always a trade-off of these two things Dec 15 03:09:22 more time less memory, less time more memory Dec 15 03:09:41 * capella-s3 taking notes Dec 15 03:10:07 now, in the case of a LinearLayout with two TextView's basedAligned, one bold and one normal Dec 15 03:11:14 1. We have the time it takes to allocate and initalize multiple views and we also have the extra time its going to take for the view hierarchy to be processed Dec 15 03:12:23 2. Now we also have to consider the stack depth. Points mentioned in 1 have an increased of method calls and stack depth. Dec 15 03:12:24 * capella-s3 taking nap Dec 15 03:12:41 * Napalm wonders if my notes are that boring :) Dec 15 03:13:59 Now to resolve the positioning and alignment of the TextViews within the LinearLayout during the measure and layout of the views will take a longer route. Than the tightly coupled logic in the loop processing of textual content for Spannables. Dec 15 03:14:26 TextView treats all textual content the same, a CharSequence Dec 15 03:14:41 if you dont have spannables it will still process it as such Dec 15 03:14:55 but will not have to apply any changes during the drawing Dec 15 03:15:05 but again that is tightly coupled Dec 15 03:15:21 Napalm: but you wondered why, so I told you ;) Dec 15 03:15:38 Napalm: Will the difference be even bigger if the LinearLayout in question is in another LinearLayout in a ListView? Dec 15 03:15:57 Bigger than, say, a simple Activity with the LinearLayout in question as its only child. Dec 15 03:16:09 gordon_: wondered why what.. I was making a statement to TJ Dec 15 03:17:03 oh! we're discussing nanosecond differences in alternative view rendering methods Dec 15 03:17:20 TacticalJoke: yes, but thats not a case of generalization but rather that of the view heirarchy processing for those views specifically Dec 15 03:17:22 * capella :p lost the point Dec 15 03:17:51 Napalm: maybe I didnt catch it, whatever ;) Dec 15 03:18:11 capella: it also relates to object cost, a TextView with Spannables costs less than multiple Views Dec 15 03:18:36 BTW, there's no way to reuse a span (for different text), right? Gotta new it up every time, I think. Dec 15 03:18:39 Timings involved in native android view vs html / dom rendering would be more significant Dec 15 03:19:08 And yes, the the last case, view inflation would be the big issue Dec 15 03:19:10 TacticalJoke: take the case you make a single view that renders everything custom and does exactly what you want.. this is obviously the most efficient at runtime.. but at the same time it will take the longest to write Dec 15 03:19:21 TacticalJoke: what you want is a nice trade-off Dec 15 03:19:26 Yeah. Dec 15 03:19:44 trade your time for creating a smaller modular custom view that does some of the things you want, and let the framework handle the rest Dec 15 03:20:03 it also means your smaller custom view now can be reused in several different scenarios Dec 15 03:20:22 now back to WebView + HTML and TextView Dec 15 03:20:32 as gordon_ was saying earlier Dec 15 03:20:43 it harps back to the original point of cpu time and memory Dec 15 03:21:20 the WebView has absolutely massive rendering components to render everything on the web Dec 15 03:22:22 such as the XHTML parser into DOM tree, the Javascript engine, the CSS parser and then the object manipulation and rules to bring this all together to position and draw objects in a bitmap displayed on the screen Dec 15 03:22:47 its no simple feat, and its about as complicated as most operating systems Dec 15 03:23:46 they also have to have process/thread/memory managment and a ton of other accounting to manage all that content and tabs.. then even more support for those specialist things like plugins (flash) and whatnot Dec 15 03:23:47 Gecko ftw \o/ Dec 15 03:24:20 bonus, you now also have the chrome around the rendering engine, menus buttons and settings and whatnot Dec 15 03:24:34 and then that has add-ons aswell Dec 15 03:24:41 anyway, back to my point Dec 15 03:24:58 what we have is a massive engine ready to render anything you like Dec 15 03:25:10 what do you want to do, render some rich text Dec 15 03:25:54 its a little large for the job Dec 15 03:26:04 Heh, I didn't think anyone needed to seriously compare WebView vs Native :D Dec 15 03:26:04 and its size also means its 'heavy' Dec 15 03:26:28 capella: some people dont understand them Dec 15 03:26:41 Mmmm ... considers that Dec 15 03:27:16 TacticalJoke: so back to my point, have a TextView that renders some Spannables is ALWAYS going to better than a WebView with HTML.. because it simply 'does less' Dec 15 03:27:27 uses less memory, and cpu time Dec 15 03:27:33 I mean you're being very patient with your descriptions, but that this is new info to people surprised me Dec 15 03:27:40 Than a WebView? ;o Dec 15 03:28:15 * capella leans back a bit Dec 15 03:28:41 I've always wanted to rewrite Android's text rendering framework Dec 15 03:28:48 its a complex interesting topic Dec 15 03:28:57 and the current implementation is lacking, lots Dec 15 03:29:10 its a shame it wasnt a feature for L Dec 15 03:36:33 napalm: so how long will that rewrite take you ;) Dec 15 03:37:43 bankai_au oh my, i have to work with Observable> this is confusing O.O Dec 15 03:38:06 well I've not been asked to do it Dec 15 03:38:30 g00s: good luck with that -- tell me how it goes. I was contemplating doing something similar the other day, but it wasn't solving the problem i wanted Dec 15 03:38:45 but I would guess about a 8 months to a year if it was just me Dec 15 03:39:01 g00s: did Observable.from(Arrays.asList(obseravable1, observable2, observable3) exist or did i imagine that? Dec 15 03:39:26 you can create an observable from an iterable, yeah Dec 15 03:40:23 oh, thats not what you asked. hm, dunno Dec 15 03:40:57 g00s: we need to go deeper Dec 15 03:41:04 i've resigned myself to the fact that i'll suck at rx for some time to come Dec 15 03:41:45 but one thing that keeps getting in my way is lack of lambdas, once i get 3-4 nested levels my head explodes from the boilerplate. so i may have to do what Napalm is with retrolambda Dec 15 03:42:04 kinda worried about jack & jill though, but i guess we should be able to keep using the old java stuff for a while Dec 15 03:42:10 g00s: you mean your not using them? why the hell not Dec 15 03:42:46 i like keeping my build system as simple as possible :( rewriting the bytecode ... hmm Dec 15 03:42:55 does it fuck with proguard at all ? Dec 15 03:43:45 no Dec 15 03:44:00 I'd rather use scala than retrolambda ;) Dec 15 03:44:39 well, if you know scala already, that makes perfect sense Dec 15 03:44:49 I used to know some Dec 15 03:44:56 now... :D Dec 15 03:44:58 if you don't know scala, and you just want to use it on android - thats a tougher sell Dec 15 03:45:22 learn it hard way ;) Dec 15 03:45:39 or make some konas first Dec 15 03:45:48 but if you plan on using it outside of android , yeah - may as well reuse your knowledge and apply it to android too Dec 15 03:45:56 *koans Dec 15 03:46:53 Napalm why use retrolambda when you can use kotlin pretty easily ? Dec 15 03:47:08 that gets you even more goodies, like synthesised getters/ setters Dec 15 03:47:30 oh yeah, one of my favorite syntactic sugars is ?. Dec 15 03:48:14 otoh, who knows where kotlin will be 5 years from now. maybe not worth the risk Dec 15 03:48:15 kotlin is nice Dec 15 03:48:21 but compilation is slower Dec 15 03:48:38 it is? they boast it faster than scala Dec 15 03:48:45 g00s: never used it Dec 15 03:48:54 and annotation processing doenst work Dec 15 03:49:04 bankai_au: try it with intellij Dec 15 03:49:08 gordon_ yeah :( Dec 15 03:49:09 code completion is laggy Dec 15 03:49:21 I wrote some crappy code in kotlin Dec 15 03:49:26 xmpp client Dec 15 03:49:37 whole 2 activities and service Dec 15 03:49:39 ;) Dec 15 04:18:32 lasserix_: I think I can convert all those TextViews into one TextView. Dec 15 04:18:41 That'll probably help a lotl Dec 15 04:18:42 . Dec 15 04:18:43 yeah one step Dec 15 04:18:43 Oops. Dec 15 04:19:00 I just converted the "author" one and the "details" one (no idea why I made them separate TextViews; lol). Dec 15 04:19:07 Into CommentHeaderTextView. Dec 15 04:19:16 But I think I can just have CommentTextView. Dec 15 04:19:41 Also makes it easier to do custom drawing later: it means I'll already have just one *thing*. Dec 15 05:05:47 SpannableStringBuilder is such a let-down. I had to create this: http://pastebin.com/HN29CXBn Dec 15 05:05:58 And of course it'll have to grow over time. Dec 15 05:06:27 Unless I make it more generic. Dec 15 05:08:54 bankai_au, faster than scala isn't saying much Dec 15 05:09:30 TacticalJoke, I prefer the string format approach Dec 15 05:09:55 Yeah, that could be cool. Dec 15 05:10:47 An object with 30 string members to parcel and unparcel takes how long? Dec 15 05:12:26 not long Dec 15 05:12:37 it probably matters more what the size of the parcelable is. if i recall over 4K its much slower Dec 15 05:13:53 You know, Reddit really sucks in a way. If you're subscribed to over N subreddits (I forget what N is; it's something small like 25), the front page shows only posts from a handful of those subreddits. Dec 15 05:13:58 And which handful you get it basically random. Dec 15 05:14:17 So you could be subscribed to /r/worldnews and miss out on a huge story if you only visit the front page. Even if that story has thousands of upvotes. Dec 15 05:14:50 That's why when you go to reddit.com you won't see all your subreddits in the list (if you're subscribed to over N). Dec 15 05:15:10 What a flawed system. Dec 15 05:15:30 TacticalJoke, an example of colorizing shit with spans in qicr https://github.com/pfn/qicr/blob/master/common/src/com/hanhuy/android/irc/model/MessageAdapter.scala#L144 Dec 15 05:16:02 pretty dense crap though Dec 15 05:16:03 lol, hope TacticalJoke knows scala Dec 15 05:16:14 easy to convert to java Dec 15 05:16:47 I'm getting used to reading Scala now. haha Dec 15 05:17:42 bold(italics(colorNick(src))) ♥ Dec 15 05:19:01 👍 Dec 15 05:19:23 pfn are you hitchiking ? Dec 15 05:19:28 where too ? Dec 15 05:19:48 nope, I'm a yuppie, not a hippie Dec 15 05:20:02 Well the reason I ask is because I have to parse a file, and I load it into a database when one activity is opened: the user can start a second activity, of which the results of the parsing rely on an object with twenty or so String field members (not long strings, under 20 characters each). So I can either read from the database, or parcable the object and pack it into the intent. I could use a singelton but I'd rather avoid doing Dec 15 05:20:02 that. Dec 15 05:20:05 just bought a new wagon today Dec 15 05:20:34 6spd tdi, yay Dec 15 05:22:04 lasserix_: well that really depends on what you want to do Dec 15 05:22:05 who needs a hybrid when you get the same mileage out of conventional fuel Dec 15 05:22:33 lasserix_: say you want to modify those strings, then it makes sense to have a local copy of them and not query or have some active connection to the database in your second activity Dec 15 05:23:49 Napalm: I'd probably only write out the object to database when the user goes back / finishes configuration Dec 15 05:24:22 lasserix_: if on the other hand you want it to truely be async, then you might start some background process in the first activity and even if the parsing has not yet finished they can click on the first item and be taken to the second activity where you might want to have access to all the previous results.. in which case both activitys are monitoring the results independently and only Dec 15 05:24:22 the first starts the "update" process Dec 15 05:24:35 <_genuser_> woo, that was a long reboot. Dec 15 05:24:38 Napalm: parsing only takes 200-400 ms Dec 15 05:24:42 <_genuser_> hey d00dz Dec 15 05:25:20 lasserix_: is this like an list activity with a edit activity where you can edit each entry from the list or some such similar? Dec 15 05:27:34 Uh no, so this is for configuring a keyboard. The keyboard has some 15 settings which in memory live in a GlobalKeyboardConfig object. Originally they are parsed from a text file, which is used to build the initial keyboard view. After that, the user can configure aspects of the keyboard. So activity A is the IME settings, activity B the configuration. I load a preview of the current keyboard in A: so by this time the file has been Dec 15 05:27:34 parsed and the GlobalKeyboardConfiguration object already exists. Dec 15 05:28:35 The current configured keyboard gets dumped into a db since I need it each time the keyboard view is created, but the user can save the configuration which gets written out to a text file (so they can switch back to that particular one later) Dec 15 05:28:46 sounds to me like you want to startActivityForResult and pass it the configuration object for the configuration activity to edit and return in onActivityResult Dec 15 05:29:02 Ahh yeah so might as well make it parceable Dec 15 05:30:29 ahh i can also use it in the other activity where they load from the file or previousily saved preset Dec 15 05:35:05 lasserix_ so, the user can give you a custom file, and then can edit that in the program also ? Dec 15 05:35:12 yeah Dec 15 05:35:59 ahh. didn't know that. i think what i would do then, is just serialize the in-memory representation back to the same format it came from Dec 15 05:36:34 you mean write it back to a text file from the configuration activity? Dec 15 05:37:08 basically just overwrite the configuration file. ragel would be very fast at reading that file Dec 15 05:37:29 use AtomicFile or whatever it is for the switcheroo Dec 15 05:37:36 I don't want to overwrite the file Dec 15 05:37:44 a) dont want to WRITE PERMISSIOn Dec 15 05:37:49 b) dont want to alter their file Dec 15 05:37:52 erll Dec 15 05:37:55 well really just b Dec 15 05:37:57 but they altered the file. Dec 15 05:38:02 ? Dec 15 05:38:06 heh, if they fed the program X and changed it to Y Dec 15 05:38:16 it is only in memory Y Dec 15 05:38:22 why do they care ? Dec 15 05:38:30 because its their file Dec 15 05:38:36 they can chose to overwrite it Dec 15 05:38:36 but they edited it Dec 15 05:38:46 but I'm only going to write it to internal space Dec 15 05:39:01 they will have option to export it back to a text file Dec 15 05:39:02 you are making this complicated :) Dec 15 05:39:09 no not really Dec 15 05:39:23 when i open a doc in word, it doesn't (afaik) then save it to another file Dec 15 05:39:34 its the way programs have been working for decades Dec 15 05:39:48 preserve initial installation configure for reuse? Dec 15 05:39:52 yeah Dec 15 05:39:55 that's why Dec 15 05:40:10 g00s because you may want more than one file Dec 15 05:40:13 but this isn't a static configuration Dec 15 05:40:18 no Dec 15 05:40:23 you can have multiple layouts Dec 15 05:40:39 for instance, maybe you want the keyboard to always be as small as it can be, maybe you want it always to be as large as it can be Dec 15 05:40:49 maybe you want to make different color schemes Dec 15 05:41:03 with all other variables being the same Dec 15 05:41:33 so i'll add a export function, they can chose to overwrite it if they want Dec 15 05:41:52 but i dont want to overrwrite it automatically Dec 15 05:42:15 plus, i don't use the original file location except for the first time it's loaded from the location Dec 15 05:43:02 ListView's recycling causes real confusion when you have a bug pertaining to view binding. Dec 15 05:43:15 view recycling* Dec 15 05:43:25 at least you only have 1 view type to deal with Dec 15 05:43:39 I have at least three, I think. Dec 15 05:43:43 oh Dec 15 05:43:49 Comment, "load more" thing, progress bar. Dec 15 05:43:55 that viewhodller considered harmful pattern makes it a lot easier Dec 15 05:44:01 don't need multiple viewholder types Dec 15 05:44:02 Also header (which is a post). Dec 15 05:44:10 Yeah, ViewHolder is so horrible. Dec 15 05:44:35 hehe so horrible its de facto in recycler view Dec 15 05:44:46 Isn't the new one different? Dec 15 05:44:51 ? Dec 15 05:45:02 you MUST supply a viewholder when using recyclerview adapter Dec 15 05:45:03 It's its own class and everything. No more crazy SRP violations. Dec 15 05:45:16 TacticalJoke: you are too hardline on SRP Dec 15 05:45:30 The old ViewHolder just bloats classes. Makes a mess. Dec 15 05:45:36 have you ever look at TextView source? talk about SRP violation Dec 15 05:46:21 Yeah, a little. Some of the methods operate at, like, 15 levels of abstraction. :D Dec 15 05:46:27 God methods. Dec 15 05:47:43 Maybe, in some cases, they created huge methods for performance reasons. Though I dunno. Is there a performance reason with modern compilers? Dec 15 05:49:43 i think the size of a method is kinda like balancing a tree. you could have 1 method 100 lines long, or 100 methods 1 line long. both extremes are probably suboptimal. but the equilibrium point probably shifts based on (1) the level of intellect reading / writing the code and (2) the level of complexity Dec 15 05:50:28 well SRP is a guideline, plus responsibility is a locus, look at genes right? when they were "discovered' the principle was one gene one protein, now we know that there is a surjective mapping, not a bijection (1 to many, not 1 to 1) ... meaning one thing can be responsible for a lot of things, just depends on context Dec 15 05:51:35 I think a key thing about the SRP is that it doesn't just make code easy to change: it makes code easy to understand. Dec 15 05:51:51 This could apply to classes, methods... even changesets (in Git or Mercurial or whatever). Dec 15 05:53:47 * capella lost on the bit re: changesets, but meh Dec 15 05:54:40 Newbies create changesets that add three features and fix two bugs. They're basically unreadable. Dec 15 05:54:52 that's scope creep Dec 15 05:55:07 and unreadable, yah Dec 15 05:55:17 since it's ot logically cohesive Dec 15 05:55:19 I think experts tend to follow the SRP with regard to even changesets. Dec 15 05:55:23 Yeah. Dec 15 05:55:38 again SRP is a matter of context Dec 15 05:55:53 I agree, lasserix_. "Responsibility" could mean anything. Dec 15 05:56:08 A huge changeset could be said to be having one responsibility. Dec 15 05:56:20 It might, for example, convert bracing style from X to Y and touch 1,026 files. Dec 15 05:56:50 I just randomly pressed the number keys. :D Dec 15 05:59:34 I think it boils down to our goals. Dec 15 05:59:56 If our goals are to create code that is easy to read, we'll define "responsibility" in some sane manner. Dec 15 06:01:14 TacticalJoke for reddit stories, whats the difference between 0 and between the voting up / down arrows ? Dec 15 06:02:45 Oh, the dots are for posts younger than one hour, I think. The score isn't shown because they used to show the score right away and they believed it led to biased voting (e.g., someone got unlucky and got a few downvotes right away, and then everyone piled on the downvotes). Dec 15 06:03:05 heh Dec 15 06:03:15 anyone have the new moto x? Dec 15 06:04:12 Some subreddits do it for comments, too. It's a bit annoying, IMO. Dec 15 06:04:21 Though maybe it's worthwhile. Dec 15 06:04:34 I think subreddit admins can decide whether to enable that. Dec 15 06:06:15 reading about snackbar from http://www.google.com/design/spec/components/snackbars-toasts.html#snackbars-toasts-usage ... "They should not be persistent or stack" Dec 15 06:06:40 I'm not sure whether to use snackbar or roll my own. Hmm. Dec 15 06:06:51 I have NIH syndrome (or whatever it's called). Dec 15 06:06:54 so if i need BT in an activity, and the user has BT disabled, would it be appropriate to have a snackbar saying "Bluetooth Disabled | ENABLE" ? Dec 15 06:07:22 or is snackbar just toast on steroids Dec 15 06:07:54 The only one I've used that has buttons is Google Chrome's "You closed a tab [UNDO]" one. That goes away. But, to be honest, I don't like how quickly it goes away. Dec 15 06:08:12 Though I guess it's related to scrolling or something. Dec 15 06:08:34 TacticalJoke did you see https://github.com/nispok/snackbar Dec 15 06:08:47 i guess one dingleberry won't kill me Dec 15 06:08:54 Oops, yeah. I thought that was what you had linked to. lol Dec 15 06:09:00 I totally don't read URLs these days. Dec 15 06:09:19 That looks neat. Dec 15 06:09:39 I guess, otherwise, you could have a View in your layout. Dec 15 06:09:42 Maybe at the top. I'unno. Dec 15 06:09:56 I do feel that those things at the bottom won't persist. Dec 15 06:09:59 As a user. Dec 15 06:11:35 I was thinking of showing a message at the top. An example is if they're not connected to the 'net or something. "Unable to connect [TRY AGAIN]". Dec 15 06:13:15 so at the top would be a CROUTON ! Dec 15 06:13:23 we have silly names for ALL THE THINGS Dec 15 06:16:36 TacticalJoke: use snackbar Dec 15 06:16:45 But I want mine to persist. Dec 15 06:16:55 If I see something at the bottom, I think it's gonna go away. :D Dec 15 06:16:59 https://github.com/nispok/snackbar Dec 15 06:17:02 it will persist Dec 15 06:17:13 yeah i sent him an email about placement Dec 15 06:17:29 it will persist if you add action Dec 15 06:17:30 I think, in my case, it might make sense to show something in the ListView. Hmm. Dec 15 06:17:36 nah Dec 15 06:17:37 Then they can scroll away from the horror. Dec 15 06:17:40 that's a violation in SRP Dec 15 06:17:41 ;p Dec 15 06:17:51 My ListView's responsibility is "Show all the things". Dec 15 06:17:57 hehehe Dec 15 06:18:01 Oh Dec 15 06:18:09 (All the things relating to Foo.) Dec 15 06:18:11 in that case yeah don't listviews have that when no items available view? Dec 15 06:18:19 Oh, true. Dec 15 06:18:38 Then again, I might wanna show a cached copy or something. Dec 15 06:18:58 sounds like version 2 Dec 15 06:19:03 but i wouldn't do that Dec 15 06:19:17 = inconsistent state Dec 15 06:19:26 you don't read reddit for cached copies Dec 15 06:19:30 True. Dec 15 06:19:40 The client I currently use caches everything. It's so annoying. Dec 15 06:19:53 Even with cache settings turned down to their lowest, I'm having to refresh manually all the time. Dec 15 06:20:04 i think i like the snackbar over showing an error dialog tho, because the BT picker will already be a floating window . i don't what ghettos in my ghettos Dec 15 06:20:16 TacticalJoke: you should just load an xkcd comic Dec 15 06:20:16 Yeah, error dialogs are no fun. Dec 15 06:20:26 What if they have no connection at all? Dec 15 06:20:30 cache a few Dec 15 06:20:32 I guess I could ship one with the app. :D Dec 15 06:20:54 That actually is a fun idea. "Reddit is down, so here's xckd instead:" Dec 15 06:21:02 xkcd* Dec 15 06:21:08 just make sure its cool with xkcd people Dec 15 06:22:07 I don't want the app to violate the SRP, though. Dec 15 06:22:24 time for an intervention. Dec 15 06:22:39 In a way, I like the Unix philosophy. Dec 15 06:22:47 The only issue is that it doesn't apply well to Unix tools. Dec 15 06:22:56 (Okay, I'm exaggerating. Sometimes it applies nicely.) Dec 15 06:23:02 But it leads people to not use IDEs and stuff. Dec 15 06:23:21 "I can use vim for everything!" Dec 15 06:23:31 Then again, vim hardly follows the Unix thing. Dec 15 06:23:48 you can use emacs Dec 15 06:24:00 heeeere we go Dec 15 06:25:24 I swear, the universe would feature less total suffering (over time) if 99% of blog posts were removed. Dec 15 06:26:08 airheads are people too! Dec 15 06:26:28 Imagine if you had to qualify (somehow) before you were allowed to publish web material. Dec 15 06:26:38 Pass some kind of proficiency test. Dec 15 06:26:51 isnt that China? Dec 15 06:26:56 :D Dec 15 06:27:43 Though the UK is fond if licensing Dec 15 06:29:35 The people in here could create a shared blog. Dec 15 06:29:41 Of Android-development tips. Dec 15 06:29:52 It could be the unofficial Android documentation. Dec 15 06:29:58 damn, missed the 199 moto x deal on amazon Dec 15 06:29:59 Code examples of common (or not-so-common) stuff. Dec 15 06:30:27 Would your Reddit client need a new verification module? Dec 15 06:30:54 You mean with the proficiency thing? Dec 15 06:31:03 yah ;) Dec 15 06:31:30 I'm gonna sound moany and old (though I'm not old), but I swear that Reddit is full of kids these days. Dec 15 06:31:34 Not just kids: annoying kids. Dec 15 06:31:51 Why can't it just be mature nerds, or something. Dec 15 06:31:57 Sharing their awkward social situations. Dec 15 06:32:07 And how they managed to avoid having to talk to someone they didn't want to talk to. Dec 15 06:32:26 TacticalJoke: time to trash your Reddit App idea and make a Slashdot app Dec 15 06:32:36 Is Slashdot where the old people are now? Dec 15 06:32:39 I've hardly read it in years. Dec 15 06:32:55 hey! I remember slashdot... Dec 15 06:33:07 "ur rite bro ermeghurd the lulz " Dec 15 06:33:09 Slashdot could be awesome if its UI wasn't completely horrible. Dec 15 06:33:14 capella: :D Dec 15 06:33:17 Or xD Dec 15 06:33:53 slashdot still going strong, ui still horrible Dec 15 06:34:01 I don't get horrible UIs like that. It doesn't take much to just keep it basic and simple. Dec 15 06:34:11 Those UIs seem to *try* to be awful. Dec 15 06:34:17 It hasn't changed much Dec 15 06:34:31 Just avoid all complexity. Even if it then sucks, it doesn't suck *that* much. Dec 15 06:35:13 I used to read comments in ArsTechnica's site... so predictably one sided now... and all snark Dec 15 06:35:21 I saw that there was an Android app for Slashdot. Wonder if it's any good. Dec 15 06:36:14 you probably have to use some perl API from 1995 Dec 15 06:36:16 Comments on sites like that are hilariously bad. Dec 15 06:36:22 haha Dec 15 06:38:07 The worst subreddit lately, IMO, is /r/funny. Dec 15 06:38:15 This hadda happen part 2: https://www.thespainreport.com/13199/spanish-newspaper-publishers-association-now-asks-government-help-stop-google-news-closure/ Dec 15 06:38:30 It's literally posts like "Look at this dog sitting on top of another dog" with thousands of upvotes. Dec 15 06:38:38 TacticalJoke: hhope your client has a subredit suggestor browser something like that Dec 15 06:39:00 Yeah, I'm hoping to. Dec 15 06:39:09 I think there's an API for trending subreddits now. Dec 15 06:39:22 Or it might require HTML scraping. I forget. Dec 15 06:39:31 anyone has experience with creating notification keys as shown here https://developer.android.com/google/gcm/notifications.html#gen-server ? I'm trying to understand what is the project_id ? Dec 15 06:39:53 lasserix_: I think it's also easy to implement subreddit search with auto-suggestions. Dec 15 06:42:06 This is good: http://redditlist.com/ Dec 15 06:44:18 I am looking to write an android app to wake my device using volume button instead of power button for educational purpose Dec 15 06:44:28 anyone have any clue on this? Dec 15 06:47:15 dont think you can without customizing rom Dec 15 06:48:55 lasserix, btw, I managed to make Android Studio see my device. It has nothing to do with drivers or installing extra packages as you suggested. I had to manually add my device's vendor id to ~/.android/adb_usb.ini Dec 15 06:49:17 that would be "drivers" Dec 15 06:49:30 ahh sorry didn't know you were *nix Dec 15 06:49:59 and they don't say a thing about it on http://developer.android.com/tools/device.html :( Dec 15 06:50:55 they kinda do Dec 15 06:50:59 talk about vendor id Dec 15 06:51:50 but they don't say what to do if your vendor is not listed Dec 15 06:52:03 if it's an issue or not Dec 15 06:52:08 and what to do Dec 15 06:52:27 no information about what file to edit Dec 15 06:55:00 slidercrank this is just the beginning :) Dec 15 06:55:01 My current problem is that sample OpenGLES code from https://developer.android.com/shareables/training/OpenGLES.zip isn't working on a real device. the only command that is known to work is glClearColor(). Because the background colour changes. But no triangle is drawn. All I see is a background and I currently don't know how to diagnose it Dec 15 06:55:26 slidercrank: you know any linear algebra? Dec 15 06:55:31 yes Dec 15 06:55:33 it does work Dec 15 06:55:42 but you haven't set up your projection matrix correctly i would guess Dec 15 06:55:46 common first gl problem Dec 15 06:55:51 it works in an emulator (4.4, but not in Android 5.0) Dec 15 06:55:55 no it works Dec 15 06:56:00 if glClearColor is working Dec 15 06:56:09 then you haven't done your MVP matrix correctly Dec 15 06:56:49 the code is supposed to work on all devices. It's independent of device dimensions Dec 15 06:56:50 make sure you understand how the MVP matrix works Dec 15 06:57:09 ohyou are saying out of the box the code is not working? Dec 15 06:57:14 you sure you didn't change anything? Dec 15 06:57:14 yes Dec 15 06:57:18 absolutely Dec 15 06:58:47 in an emulator I see a square and a rotating triangle. On a real device it's just a black background. Dec 15 06:59:07 on 5.0? Dec 15 06:59:20 what ver is your device? Dec 15 06:59:24 lasserix, the real device runs 4.4 Dec 15 07:01:17 possible it doesn't have 2.0? Dec 15 07:01:53 the device definitely supports opengl2.0. the program wouldn't run otherwise. Because in the manifest it says 2.0 is needed Dec 15 07:02:26 it behaves like it's working. I can see events circulating and reaction to touches on the screen. But visually it's nothing Dec 15 07:03:32 slidercrank: you can still side-load.. the manifest opengl requirement is only a hint for the play store Dec 15 07:04:47 Napalm some come up yet ? Dec 15 07:04:50 *sun Dec 15 07:04:54 Napalm, lasserix: GPU: Mali-400 MP2 Dec 15 07:05:09 i'm using IDEA but i'm missing the Android Studio project creation workflow Dec 15 07:05:25 Mali-400 supports OpenGL 2.0 Dec 15 07:05:31 Any ideas? Dec 15 07:06:39 ReScO, you have one IDEA already:) Dec 15 07:09:14 ReScO: You mean the wizard? Dec 15 07:09:20 TacticalJoke: yeah Dec 15 07:09:53 Hmm, not sure. Maybe state the version so that someone who knows might be able to help. Dec 15 07:10:07 I'm using Intellij IDEA 14 and API 21 Dec 15 07:11:08 the wizard is 'very' different to AS Dec 15 07:12:34 capella-s3 http://manning.com/jongboom/ Dec 15 07:13:28 i had hopes for ffos, but now i'm pessimistic of anything relying on javascript Dec 15 07:14:14 sighs... I'm on the fence Dec 15 07:14:33 I'm going to develop an app to scan products in the supermarket Dec 15 07:14:49 But i want to use fragments and the drawer Dec 15 07:14:59 IntelliJ doesn't create such stubs Dec 15 07:15:16 and i've never worked with or understood fragments, i'm used to activities Dec 15 07:15:25 I don't care for dynamic languages for a couple of reasons Dec 15 07:15:27 ReScO you could grab AS and copy out the templates, they are in the bundle as human readable files Dec 15 07:15:55 g00s: where can i find everything? Dec 15 07:15:56 capella-s3 and asm.js seems like poop Dec 15 07:16:18 ReScO they changed the packagin for 1.0, depends on the platform i guess Dec 15 07:16:25 <_genuser_> ugh, "Running Android Lint" has encountered a problem. Everytime now on eclipse after I downgraded teh ADT. Dec 15 07:16:46 I'd love to spend enough time with asm. js to know if it's poop or not Dec 15 07:16:52 <_genuser_> googling says something got corrupted. would be fun chasing this. Dec 15 07:18:42 I'm afraid js being the one sized fits all approach of cross platform solutions won't ever match specialized solutions ore closely tied to the native hardware devices involved Dec 15 07:19:08 And their associated OS's Dec 15 07:19:48 Even FF O/s has to have a custom version of android / gonk to enable it's environment Dec 15 07:20:14 er, implementation Dec 15 07:20:43 But moz is very much vehind the effort ... internally it's the thing Dec 15 07:20:52 damn it. manning has 3 books on Rx coming out, and they are all in scala Dec 15 07:21:09 heh Dec 15 07:21:42 basically written by people at Typesafe i guess Dec 15 07:22:07 capella internally, whats the thing? ffos ? Dec 15 07:22:27 Yah, the big focus Dec 15 07:22:53 Though, iOS is fresh, we'll have to see how they prioritize that Dec 15 07:25:05 <_genuser_> you guys and your fancy gizmos and js frameworks! Dec 15 07:25:21 * capella "get off my lawn!" Dec 15 07:25:30 ReScO: don't use fragments Dec 15 07:25:33 <_genuser_> I still manually copy .apk to server and then copy to device instead of direct USB debugging, just because it seems like it will be work installing Samsung Kies software. Dec 15 07:25:43 * capella used to walk two miles a day to school in the snow uphill both ways Dec 15 07:26:16 <_genuser_> not barefoot? Dec 15 07:26:36 <_genuser_> you shoulda walked barefoot. that woulda built "character" Dec 15 07:27:36 <_genuser_> :) Dec 15 07:28:04 lasserix_: It's really easy to just use one TextView. Dec 15 07:28:28 Then I can have one LinearLayout with two children: one CommentIndentView and one CommentTextView. Dec 15 07:28:34 Way, way simpler. Dec 15 07:29:05 Thanks for pushing me in this direction, BTW. :) Dec 15 07:29:15 I'm learning so much about Android. Dec 15 07:29:27 <_genuser_> I just realized I only need to built "one" preference chooser dialog. then I just load it with different lists and simplify my code so much. Dec 15 07:29:46 yeah reuse is good Dec 15 07:30:14 Reuse too, but I'm mainly thinking of speed. Dec 15 07:30:27 <_genuser_> lasserix_: yeah, I had a "scene mode" select dialog. and was about to create a focus mode selector dialog. Dec 15 07:30:30 I had so much nesting before. lol Dec 15 07:30:34 Total n00b mistake. Dec 15 07:31:12 <_genuser_> lasserix_: also, the interface suggestion was great. I went that route. made the dialog transparent and now it's just an overlay on top of the camera preview. Dec 15 07:31:23 cool Dec 15 07:31:30 well that's the standard way to do via dev docs Dec 15 07:31:53 <_genuser_> and that's even better to learn the appropriate method. :) Dec 15 07:32:08 I caught mtself doing recursive calls when looping was all I needed once Dec 15 07:32:26 capella-s3: yeah fun when you do that in layout Dec 15 07:32:37 and you get an overflow layout in logcat Dec 15 07:33:08 <_genuser_> I also have a auto scrolling textview as an overlay on the preview that can show app log. Dec 15 07:33:09 i got stack overflow Dec 15 07:33:23 <_genuser_> which looks more cool to a dev than to a user. but since I'm using it for now, I like it. Dec 15 07:33:51 I prefer iterating, but some problem domains really suggest recursing. :) Dec 15 07:34:03 <_genuser_> eventually, I'd like to look into consolidating app logs. I heard about thigns like "flurry" which can upload the log and devs can view them via dev console. Dec 15 07:34:12 TacticalJoke: next time a user asks this, tell them they need to use the entry with Gradle: before it Dec 15 07:34:22 I spent another 20 mins trying to remember how to increase the stack size in the compiler nutil I realized it wasnt the inherent issue Dec 15 07:34:39 Okay. lol Dec 15 07:34:42 Database updated. Dec 15 07:34:58 capella: Gotta have dat check. Dec 15 07:35:04 tried to blame it on drugs, but I'd quit those Dec 15 07:35:19 hey that shit stays in your spine for years according to authorities Dec 15 07:35:20 My comment-parsing code arbitrarily stops recursing at 31 levels. Dec 15 07:35:24 I should probably find a sane number. Dec 15 07:35:36 yah, weed kills :D Dec 15 07:35:49 weed the ultimate bug killer Dec 15 07:35:51 (When it stops, later sub-comments just don't appear. But no sub-comments go that far, anyway.) Dec 15 07:36:47 god I hate all the commercials where giant fingers poke up on my screen to mash things on someone elses screen Dec 15 07:36:57 Napalm: Does setting a TextView's max lines to some arbitrary high number reduce the lag thing (when a variable-height TextView is used in a ListView)? Dec 15 07:37:01 heh - off topic Dec 15 07:37:09 Such as "1m000". Dec 15 07:37:12 1,000* Dec 15 07:37:15 <_genuser_> for all you know weed could one of those new frameworks. Dec 15 07:37:18 <_genuser_> weed.io Dec 15 07:37:25 well Dec 15 07:37:40 someone needs to come up with a hashing datastrcutre/algroithm and call it stickyhash Dec 15 07:37:56 after weed, you need to have crumbs and croutons Dec 15 07:37:58 <_genuser_> if you're martin fowler, you can just rename and existing algorithm. Dec 15 07:38:03 <_genuser_> and people will fall for that. Dec 15 07:38:10 It's one of his refactorings. Dec 15 07:38:25 <_genuser_> how does a guy with 5 years of actual experience become a guru. Dec 15 07:38:39 His book was good, to be fair. Dec 15 07:38:42 <_genuser_> don't we call someone with 5years of experience jr. software engineer and pay them peanuts? Dec 15 07:38:52 Create a shell sort gap variation and name it after yourself Dec 15 07:38:57 I loved Kent Beck's book, too. Dec 15 07:38:58 <_genuser_> well, his book was a rehash of existing stuff. he just created a dictionary of patterns. Dec 15 07:39:00 Even though I'm not a TDDer. Dec 15 07:39:37 I just liked the way Beck's book made the reader think. Dec 15 07:39:39 <_genuser_> lol, instead of books, I can only point to freenode users who are really helpful. Or to stackoverflow. Dec 15 07:40:28 <_genuser_> my graduate class on software engineer taught crap like there are 5 main patterns we'll discuss: client-server, object-oriented, MVC, etc etc. Dec 15 07:40:41 <_genuser_> which is when I zoned out. it was the first few weeks of class too. Dec 15 07:41:49 just join an open source project and ask where the bugzilla page is ... start fixing things ;) Dec 15 07:41:58 <_genuser_> I have learnt quite a bit via chat members' remarks here, tho. even the snarky/angry ones. Dec 15 07:42:25 <_genuser_> and a few real life friends/acquaintances. ones you force you to think. much like the Kent book TacticalJoke mentions. Dec 15 07:42:37 I like to play catch and release with the clueless ... Dec 15 07:42:45 have little fun Dec 15 07:42:52 then actually help a little Dec 15 07:43:31 <_genuser_> I have learnt greatly from asking even if google has a simple answer. Dec 15 07:43:52 <_genuser_> because if you say "how do I do X in android" you'll come across pages showing you different ways. Dec 15 07:44:08 Hmm. Can't I create an AbsoluteSizeSpan with 'sp' units? Dec 15 07:44:09 <_genuser_> but in a dynamic real convo someone will alwasy mentions problem with an approach, alternatives to their suggestions, etc. Dec 15 07:45:43 sometimes I like to play stupid ... announce "this is the best way and it always works' .... theeeeeeeennnnn get the passionate alternatives from the crowd :) Dec 15 07:46:17 That's how I learned to never use vim Dec 15 07:46:18 <_genuser_> heh, that can lead to quite an interesting debate sometimes. Dec 15 07:46:35 heh - ninja Dec 15 07:46:57 <_genuser_> somestimes, I'll ask something, and two separate arguments will break out. so then I just have to figure out what seems best. Dec 15 07:47:14 lol Dec 15 07:47:36 Sometimes that's how you delve into people's expertise. Dec 15 07:47:45 Basically create a war between the two factions. Watch and learn. Dec 15 07:48:36 <_genuser_> right, I'll just ask "so what is a good approach for writing a memory manager". and bam! Dec 15 07:48:47 :D Dec 15 07:51:24 TacticalJoke do the reddit apis give you all information about what users have submittied (stories), what they have commented, and what they have up and down voted ? Dec 15 07:51:53 Seems that I can do what I want using basically what TextView.setTextSize(int, float) does: "TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, size, r.getDisplayMetrics())" Dec 15 07:51:59 Where r is a Resource thingamajig. Dec 15 07:52:11 not interested in writing a reddit client, but maybe some ML, NLP, etc Dec 15 07:52:37 I think you can query what they've posted publically. I don't think you can figure out what they've voted on. Dec 15 07:52:49 bah, that sucks Dec 15 07:53:04 You can also probably see on which comments they were gilded. Dec 15 07:53:07 God, I hate that word. Dec 15 07:53:10 "Gilded". Dec 15 07:53:28 i'm more interested in ML for sockpuppet detection, etc Dec 15 07:53:55 hang on, I'm still googling gilded Dec 15 07:53:59 lol Dec 15 07:54:08 Something like "given gold for". Dec 15 07:54:08 * g00s gilds capella Dec 15 07:54:33 its basically an internet award Dec 15 07:54:42 oh, another term for likes Dec 15 07:55:01 If you give someone Reddit Gold for a comment, they get access to some special subreddit for a month or so. Dec 15 07:55:10 we had something sending email to git users offering "tips" for contributions Dec 15 07:55:13 Or for a post, I guess. Dec 15 07:55:26 allegedly tied to actual cash Dec 15 07:55:26 For contributions to Firefox? Dec 15 07:55:34 FF was part of it Dec 15 07:55:52 Why Git users? Dec 15 07:55:59 Just enter your bitcoin wallet here ----> Dec 15 07:56:08 And we'll transfer it *in* Dec 15 07:56:43 Wll the project was on Git I meant ... Dec 15 07:57:16 s/git users/open source contributors/ Dec 15 07:57:42 There's some guy from Mozilla who hangs around in #mercurial. Dec 15 07:57:47 Says that so many people are using Git there. Dec 15 07:58:01 And he complains about it. Dec 15 07:58:33 yah ... it's sneaking in Dec 15 07:58:50 A lot of the teams are working offsides then committing all at once Dec 15 08:00:41 oh, glandium is on #mercurial, about 3 others I recognize @ least a little Dec 15 08:00:47 capella so teams are using git locally, and then pushing to some hg master ? Dec 15 08:00:54 yep Dec 15 08:00:58 lol Dec 15 08:01:09 fucks up the trail on bugzilla Dec 15 08:01:28 sorry, fracks Dec 15 08:02:40 sighs .... guess I'll have to break down and tinker with git again ... can't hurt to know both Dec 15 08:04:24 they some python patches, then some servo patchs, then some asm.js patchs ... heh - I[m so far behind Dec 15 08:04:29 capella propose mozilla rewrite git in JS ^H^H rust Dec 15 08:04:44 hah- see above ---^ Dec 15 08:05:13 * capella is getting tired of patching the text selection code in FF mobile Dec 15 08:05:59 got sucked into Gecko/JS and not enough time for real Java code :( Dec 15 08:12:17 meow meow meow Dec 15 08:12:18 morning everybody, we have an application that popup the standard Windows pickup colour and saves the decimal value to a table, let's say the value is "16744448" but when I use it on ADT, it's not the same colour orderButton.setBackgroundColor(16744448); Dec 15 08:12:30 anyone gotten play store running on an AVD before? Need some halp ;< Dec 15 08:12:32 feel free to pm me Dec 15 08:12:42 trying to do user experience testing ;o Dec 15 08:13:00 we have a MSWindows application* Dec 15 08:15:01 zoraj_: maybe you should learn how to develop for android Dec 15 08:15:01 ;o Dec 15 08:19:28 zoraj_: did you read what setBackgroundColor actually takes as its arguement? Dec 15 08:20:17 doh forgot i started using git for this project Dec 15 08:20:43 god damn Dec 15 08:20:58 the 5.0 AVD image seems really freaking unstable Dec 15 08:21:24 crashed the settings app just by scrolling through the apps Dec 15 08:22:33 going to try again with kitkat Dec 15 08:23:26 I have a listview that contains elements enabling configuration of an widget. In the same layout, at the bottom there is a live preview of the widget so that as the user modifies an element, it is reflected in the live preview. Instead of having a dialog pop up when each item is selected, I just push that row to the top of the screen, and expand it with the input controls for that item: anyone think this is a bad idea versus the Dec 15 08:23:26 dialog way of doing things? Dec 15 08:26:33 heh-once the basic functionality works, the ui implementation gets boring to me... I let graphics guys make those decisions Dec 15 08:26:44 lasserix_, yeah I did Dec 15 08:27:08 capella-s3: i am all the guys for this project ;p Dec 15 08:27:58 I'd be dead XD Dec 15 08:28:04 Is there a way to switch out an animation for all activities without having to go through them manually? Dec 15 08:28:15 well that's why god put weed on this planet ;p Dec 15 08:28:23 c03 theme ? Dec 15 08:28:30 c03 or subclass your activities Dec 15 08:29:00 * capella-s3 has got to meet lasserix irl :) Dec 15 08:29:01 how can i reproduce the views in a preferences screen like google play has where you can clear local searches and also shows the app version? im trying to use a listpreference that has no entries or entry values however i have to define them Dec 15 08:29:28 lasserix_: I can do it with theme? Dec 15 08:30:37 capella-s3: just shoot me a msg anytime you're near the UCI campus in so cal Dec 15 08:30:56 c03 i'd imagine you could, if you can't just subclass all your activities use a superactivity to set the theme Dec 15 08:31:23 🌿 was in Portland last week... closest I've come :) Dec 15 08:32:54 lasserix_: oh, thought you knew. I'm not gonna subclass all activities. I would like to avoid that option Dec 15 08:32:57 <_genuser_> does anyone wanna code my app? and just tell me what you learned? Dec 15 08:33:07 <_genuser_> lol. instead of me coding and learning from it. Dec 15 08:35:56 I actually like finishing/polishing wire frames... Dec 15 08:36:59 <_genuser_> :), tying up lose ends it what teaches me the most about app dev on a given platform. so I gotta do this. :) Dec 15 08:37:08 one of our critcal resources tosses out wips and goes on to other things... i snag em Dec 15 08:37:12 <_genuser_> I just saw some repeptive stuff and thought a joke might kill the boredom. Dec 15 08:37:47 OK tell it! Dec 15 08:37:55 <_genuser_> yeah, for work that's what I wanna do. enterprise architecture/framework design. and hand over barebones stuff to jr. devs who can actually enjoy writing fun code. Dec 15 08:38:19 <_genuser_> oh, someone finishing my app and teaching me the lessons <---- that was the joke. Dec 15 08:38:24 on the developer console, ages ago on tax settings there was a long list of countries and it said something like "tick countries bboxs you want to apply tax to" i didnt know what this meant so i didnt touch anything.... now i logged in again and it looks different.. it says sales tax: Dec 15 08:38:33 heh oic Dec 15 08:38:36 Create and manage your tax settings. These tax settings will only be applied to cart posts that do not already specify tax calculation rules.. If you don't specify any tax information, Google Wallet will not apply taxes to your orders. Dec 15 08:38:55 do i need to do anything? i dont really understand it Dec 15 08:39:25 in what case am i required to make google apply tax to my orders Dec 15 08:40:09 <_genuser_> sorry, my only published app is free. didn't worry about taxes. Dec 15 08:40:25 isnt it more like a google tool you can use to find out what portion of a sale you're required to forward later as taxes? Dec 15 08:40:32 i havnt released any apps yet and i have no other source of income except very small freelance jobs here and there so i dont pay tax(i am under the lowest band in the uk) Dec 15 08:40:40 If you don't use it, you figure and pay taxs yourself Dec 15 08:41:03 You are solely responsible for specifying your own tax rates. If tax rates for your location change, you are also responsible for updating the tax rates that buyers are charged. If you don't specify any tax information, Google Wallet will not apply taxes to your orders. If you need tax assistance, please consult with a qualified tax professional. Dec 15 08:41:18 yes but it implies i should be charging the consumers tax or something Dec 15 08:41:29 Can any one answer this one? http://stackoverflow.com/questions/16963403/deleting-all-contacts-programitically Dec 15 08:41:48 In short: "Is there a way to adjust this to delete RawContacts instead of contacts?" Dec 15 08:44:57 also Google Payments must have complete and accurate tax information for all sellers using the Google Payments service. We are required to obtain specific tax information, including your legal business name and your corresponding Taxpayer Identification Number (TIN). A TIN can either be your Employer Identification Number (EIN) or your Social Security Number (SSN), depending on how you have regist Dec 15 08:45:08 im in the UK, i dont have a TIN, EIN or SSN Dec 15 08:46:15 what's preventing you from ignoring it Dec 15 08:46:46 i dont want to break any TOS or laws Dec 15 08:47:10 It's up to you to collect and pay any applicable taxes ... Google really doesnt need to be in the mix Dec 15 08:47:34 ok Dec 15 08:47:47 capella: not in the EU Dec 15 08:48:17 Google needs to enforce govt tax payments? Dec 15 08:48:57 I can see them offering to provide an estimation service Dec 15 08:49:09 For people selling on their platform Dec 15 08:49:13 "Beginning January 1, 2015, due to a change in Value-Added Tax (VAT) laws in the European Union (EU), Google will be responsible for determining, charging, and remitting VAT for Google Play paid apps and in-app purchases for EU customers. No action will be required on your part." Dec 15 08:49:18 email from a couple of weeks ago Dec 15 08:49:33 Oh ho Dec 15 08:49:39 <_genuser_> sites like Amazon are charged by gov't to track how much sales are generated by users, if the sales cross a certain threshold. I think the threshold is 10,000USD. Dec 15 08:50:02 <_genuser_> however, to avoid problems later, amazon collects your tax identification up front. Dec 15 08:50:07 Not in the US Dec 15 08:50:19 <_genuser_> that one is for the US> Dec 15 08:50:20 lou if you just delete all contacts then raw contacts will be invalidated and elgible for deletion Dec 15 08:50:33 is anyone in the UK here who published paid apps? and can you tell me if you needed to enter any tax info to google? Dec 15 08:50:56 I know here in the US "we're" trying to pass an Internet tax, but there's nothing in place yet Dec 15 08:51:06 <_genuser_> http://www.amazon.com/gp/help/customer/display.html?nodeId=200663310 Dec 15 08:51:12 * capella reads Dec 15 08:51:36 <_genuser_> so it's not internet tax. If you sell a certain amount, then gov't wants tax off your income. and requires amazon to report your sales if they cross 20K USD. Dec 15 08:51:39 ah, 1099 Dec 15 08:51:45 https://support.google.com/googleplay/android-developer/answer/138000 Dec 15 08:51:49 Misc income Dec 15 08:52:16 <_genuser_> yeah, stuff like that becoems all "tax related" stuff that you have to fill out. too much going on there, if you ask me. Dec 15 08:52:17 wait if an i publish sells more than 20k USD in the UK i have to pay the UK taxes? Dec 15 08:52:56 <_genuser_> if you're a U.S. citizen, you have to pay taxes on any income worldwide. Dec 15 08:53:05 sure Dec 15 08:53:15 but in addition i have to taxes to whichever country? Dec 15 08:53:21 yes Dec 15 08:53:26 yes and no... Dec 15 08:53:27 <_genuser_> sometimes, yes. Dec 15 08:53:33 hmm Dec 15 08:53:45 <_genuser_> on my dividends from Canadian stocks, I pay taxes to Canada. Dec 15 08:54:03 <_genuser_> however, due to a tax treaty between our two countries, the U.S. doesn't tax me again. Dec 15 08:54:10 Google will take the taxes off before they give you your payment Dec 15 08:54:10 again, "we're" trying to change that to avoid capital flight and etc ... but stuff you earn after tax is again taxed on repatriation to the us Dec 15 08:54:43 <_genuser_> capella: it's a mirace that we haven't solved hunger with all teh taxes we pay. Dec 15 08:54:53 Oh was there any resolution to developers must provide address? and if BO box is a valid address? Dec 15 08:55:01 so you will get *less money* from sales to EU users Dec 15 08:55:10 We're trying... a lot of US taxpayer assistance goes overseas Dec 15 08:55:23 what they're saying is that you should have been paying the tax all along - now they're going to pay it for you, so you'll get less money but you won't need to pay the tax Dec 15 08:55:24 _genuser_: hopefully you are not really that niave Dec 15 08:55:38 Leeds ahh thanks for clarifying Dec 15 08:55:38 of course, a lot of people weren't really paying the tax, so it just means more tax, less app income Dec 15 08:56:06 heh - yah ... they've got you now ! Dec 15 08:56:15 So can we use PO boxes as our developer addresses? Dec 15 08:56:18 so i have to pay income tax, + VAT% for every app Dec 15 08:56:36 ill just email google Dec 15 08:57:04 http://www.androidpolice.com/2014/09/18/google-will-now-require-all-app-publishers-with-paid-apps-or-in-app-purchases-to-have-an-address-on-file-in-google-play/ Dec 15 08:57:22 "Assuming Google accepts it" :D Dec 15 08:57:26 <_genuser_> lasserix_: I didn't say world hunger, because that might take the entire country paying the taxes. but the U.S. itself most of the welfare systems can be expanded if the gov't isn't wasting dollars. Dec 15 08:58:19 <_genuser_> lasserix_: I work as a contractor and every gov't project has one thing in common: gross spending - sometimes on thigns without any benefits. Dec 15 08:58:27 And we could give more to charities if the Govet didnt take it first and give "on our behalf" Dec 15 08:58:30 genuser: we already produce enough food globally to feed people globally, global hunger has nothing to do with availability of resources, has everything to with centralization of capitalizaiton Dec 15 08:58:52 charities solve no problems, just a bandaid Dec 15 08:58:53 njcomsec: afaik PO Box fulfills the requirements Dec 15 08:59:01 p_l ahh thanks cool Dec 15 08:59:07 ok:) Dec 15 08:59:07 mmm ... cant agree there Dec 15 08:59:11 <_genuser_> lasserix_: sure, the super rich keep geting richer and finding ways to make more money. no argument there. Dec 15 08:59:18 if not, one can arrange for "virtual office" Dec 15 08:59:27 <_genuser_> lasserix_: but that doesn't mean that whatever taxes the working class (and even the rich) pay, can't be used respnsibly. Dec 15 08:59:47 Yo! Dec 15 09:00:13 Anyone loves VIM + CLI please checkout https://github.com/zhchang/pand Dec 15 09:00:14 hey guys Dec 15 09:00:19 <_genuser_> charities are just a cause an individual may or may not care about. gov't stepping in and saying, "we'll give you money to this" is wrong. Dec 15 09:00:24 <_genuser_> whether charities solves anything or not. Dec 15 09:00:39 <_genuser_> *your money Dec 15 09:00:40 I got google play services running on a 4.4 KitKat AVD (android virtual device) Dec 15 09:00:48 but whenever I try to sign into my google account Dec 15 09:00:58 it just says there was a problem communicating with the google servers Dec 15 09:00:59 any ideas? Dec 15 09:01:03 I prefer to give directly to the charity of my choice Dec 15 09:01:06 but Dec 15 09:01:12 getting off topic Dec 15 09:01:24 MJCD: update your play services Dec 15 09:01:35 I cant update until I sign in Dec 15 09:01:36 but Dec 15 09:01:36 <_genuser_> back on topic, I'm loving having one dialog box and reusing it for all user options. Dec 15 09:01:44 it should be fairly up to date Dec 15 09:02:18 MJCD: there's not one play library anymore, its all different components now Dec 15 09:02:40 Er, the play store is still one apk Dec 15 09:02:55 I have 3 on there - and yes, it probably is a little out of date, but I cant update it until I sign in Dec 15 09:03:11 MJCD: wrong chat room Dec 15 09:03:12 there's the google login services apk, google services framework apk Dec 15 09:03:14 #android Dec 15 09:03:19 and the phonesky apk Dec 15 09:03:26 no, im using this for development in an AVD.. Dec 15 09:03:31 It's a development question Dec 15 09:03:33 4am ... time for a burger Dec 15 09:03:43 <_genuser_> fast food burger? Dec 15 09:03:50 I understand there's a velvet apk now too Dec 15 09:03:56 which I think is the updated playstore Dec 15 09:03:56 perhaps Dec 15 09:03:59 I might try that Dec 15 09:04:01 froze bubba burger ... toss it in a pan Dec 15 09:04:04 _genuser_: more like munchies burger Dec 15 09:04:17 in theory though if the play store is out of date it should still let me sign in Dec 15 09:04:20 and then update itself Dec 15 09:04:23 its done it once before Dec 15 09:04:35 but this is a new AVD Dec 15 09:06:59 <_genuser_> lasserix_: he just reminded me of the sourdough jack. Dec 15 09:07:20 <_genuser_> lasserix_: gives quite a bit of heartburn if you have it everyday. but mayo, bacon, mmmmmmmmmm. Dec 15 09:07:56 yes yes Dec 15 09:08:16 guess that's what tums are for? Dec 15 09:08:25 chronic ingestion of sourdough jacks Dec 15 09:08:33 ho ho ho, what’s up people Dec 15 09:08:36 no pun intended Dec 15 09:09:24 * capella cant get that nick clegg song out of my head Dec 15 09:09:27 <_genuser_> lasserix_: rolaid does the job. Dec 15 09:09:34 I had indigestion every day of my life for nearly 20 years Dec 15 09:09:41 then they came out with nexium Dec 15 09:09:45 shit has literally saved me Dec 15 09:10:09 <_genuser_> for me finishign dinner before 7pm helped me greatly. max 8pm. Dec 15 09:10:24 <_genuser_> I used to snack till 11pm. or even midnight. Dec 15 09:10:33 yeah I tried everything, and the pain was so bad it would incapacitate me Dec 15 09:10:35 so shit. Dec 15 09:11:02 argh this is really annoying me.. It's not even trying to connect to the google servers Dec 15 09:11:16 last time what fixed it was clearing the data from all the apps in settings Dec 15 09:11:19 and restarting the AVD Dec 15 09:11:32 no dice this time, just instantly fails again Dec 15 09:11:32 ;< Dec 15 09:13:32 <_genuser_> anyone of you using a samsung phone to develop against? Dec 15 09:13:48 <_genuser_> on windows? did you have to install the entire Kies software suite or were you able to find just the driver? Dec 15 09:13:49 I was, but recently sold it to get my OnePlus One Dec 15 09:14:03 you can just get the driver Dec 15 09:14:05 um Dec 15 09:14:06 but Dec 15 09:14:13 kies also has the driver included as a standalone zip Dec 15 09:14:21 so you can just get the whole thing and just get the zip out Dec 15 09:14:27 but its also on the samsung site standalone Dec 15 09:14:28 somewhereeee Dec 15 09:14:36 lol Dec 15 09:14:47 cause kies is the devil Dec 15 09:15:44 MJCD: how is developing on 1+? I’d guess the same as on a nex 5? :) Dec 15 09:15:48 or are there CM quirks? Dec 15 09:15:57 <_genuser_> kies is too bloated but last time I really need to have the phone hooked, I installd it. it was fine. I never used it. Dec 15 09:16:13 No quirks i've seen so far, identical as far as I can tell :D Dec 15 09:16:15 <_genuser_> I couldn't find the driver back then. was a while ago. I 2011 or something. Dec 15 09:16:43 well yeah its definitely available if you have a look, otherwise its in the kies setup extractable :) Dec 15 09:19:55 <_genuser_> I guess you can't disable listview items in oncreateview. Dec 15 09:25:50 <_genuser_> oh, overwride arrayadapter. Dec 15 09:27:32 man this is getting really annoying Dec 15 09:27:36 I just need to get the play store to work :< Dec 15 09:30:32 driver? sounds like windows problems ;) Dec 15 09:34:49 <_genuser_> hmmm, mListView.getChildAt(i), why would it return a null (in onViewCreated) if the listadapter has already been applied and view has been created. Dec 15 09:35:03 play store in an emu ... never thought about that Dec 15 09:35:07 <_genuser_> gordon_: unless you're using a modern OS, you'll be dealing with drivers. Dec 15 09:35:25 Does appcompat library switch buttons to be material? Dec 15 09:35:41 genuser created but not inflated Dec 15 09:36:55 <_genuser_> lasserix_: I inflated is in onCreateView(), so then in onViewCreated, shouldn't it be inflated already? Or do I need to look for another event in the lifecycle? Dec 15 09:42:26 view is created but not laid out Dec 15 09:42:45 there's no way to do macros in java so tired of declaring layout params Dec 15 09:44:53 <_genuser_> :) gotta find a place to hook into the create/inflate UI and modify the listitem. otherwise, I'd have to override the ArrayAdapter. nothing hard but if I can avoid it, better to have less classes. Dec 15 09:47:27 What kind of approach do I need to take, when I want to output text to the screen and then output more text to the screen, and not wait will all the text is output before actually showing it to the user? A View is apparently only shown after all text has been output. Trying to handle the text-output in a different thread is not allowed, because "Only the thread that created the view is allowed to touch it". Then I can runOnUiThread - w Dec 15 09:47:27 hich just results in the first scenario again: Text is only shown in the end. Dec 15 09:48:28 you're not making much sense Dec 15 09:49:08 I want to output "Hello"... then wait 3 seconds. Then output "Mavrik". Dec 15 09:49:18 App waits 3 seconds, then outputs "Hello Mavrik". Dec 15 09:49:46 That's not what I want. Dec 15 09:50:07 output where? Dec 15 09:50:09 how? Dec 15 09:50:15 Well currently I'm using a TextView. Dec 15 09:50:43 genuser: onActivityCreated Dec 15 09:50:56 hook your UI Dec 15 09:50:58 This TextView seems to only show itself after all output is done. I want to show the output as it is created. Not wait till all the output is done. Dec 15 09:51:02 onCreateView findViewbyId Dec 15 09:51:55 mr_lou: create a handler on UI thread then use postDelayed new Runnable / updateText Dec 15 09:52:02 mr_lou, well, why are you waiting until end of output to update the textview then? Dec 15 09:52:21 <_genuser_> thoguth, I'd try onInflate. :) Dec 15 09:52:38 <_genuser_> but ActivityCreated sounds like proper place where it would be. Dec 15 09:52:48 * Mavrik smacks _genuser_ for using ArrayAdapter. Dec 15 09:55:41 <_genuser_> Mavrik: eh? Dec 15 09:56:00 <_genuser_> onActivityCreated still shows it as null. Dec 15 09:56:55 Mavrik, I can't see any method to update my textview, other than refreshDrawableState(), but that does nothing. Dec 15 09:57:39 <_genuser_> Mavrik: what's wrong with arrayadapter? I have a simple String[] using which I want to quickly display a listview. it works fine. Dec 15 09:58:08 mr_lou, uh, what Dec 15 09:58:11 mr_lou, setText(). Dec 15 09:58:36 _genuser_, considering all the issues you're having with setting view state it seems it's not as simple right? Dec 15 09:59:13 <_genuser_> Mavrik: well, I'm using just that. but I could extend from it and override isEnabled(), etc. Dec 15 09:59:35 Mavrik, I'm using append() Dec 15 09:59:51 <_genuser_> Mavrik: main issue is that ListView.getChildAt(i) is returning at null when i is 2 and ListView.getCount() is 5. Dec 15 09:59:58 <_genuser_> Mavrik: do you have a different suggestion? Dec 15 10:00:00 Mavrik, I don't believe setText() does anything differently regarding making the TextView visible before the end. Dec 15 10:00:41 _genuser_, well, i'd have to know what you're trying to do first (didn't follow fulll converstaion) Dec 15 10:00:46 mr_lou, my point is Dec 15 10:01:00 you're supposted to call setText "before the end" (whatever the end is) Dec 15 10:01:02 lasserix, Currently I'm calling post() on my ScrollView (which contains my TextView), in order to make sure it always scrolls to the bottom (which seems crazy, but apparently the only way to do that). That doesn't seem to force the TextView of actually showing itself before the process is done. Dec 15 10:01:24 _genuser_, what's your main issue? :) Dec 15 10:01:51 mr_lou: i have no idea what you mean Dec 15 10:01:56 <_genuser_> Mavrik: dialogfragment with ListView. in onCreate using setListAdapter(String[]). Then iterating over and disabling certain items. Dec 15 10:02:29 <_genuser_> Mavrik: moved disabling logic to onActivityCreated, still ListView.getChildAt(i) is returning a null. Dec 15 10:02:35 mr_lou: you call oncreate, then you set text, then you postdelayed callign set text and scroll function, then rinse and repeat\ Dec 15 10:02:59 _genuser_: you dont do it that way Dec 15 10:03:03 lasserix, tv.append("Hello"); <-- what do I need to call after that command to make sure the TextView is actually shown on the phone right away (and not 1 minute later when all the append()s are done)? Dec 15 10:03:13 use a base adapter and ovveride isEnabled(int position) Dec 15 10:03:17 yes. Dec 15 10:03:24 _genuser_, you need to track enabled state in the adapter Dec 15 10:03:30 not on the views, since views get recycled Dec 15 10:03:30 dont disable by moidfying the listview via getChildat Dec 15 10:03:31 <_genuser_> yeah, I'm coming to that realization that I can' escape extending the ARrayAdapter. Dec 15 10:03:38 genuser get over it Dec 15 10:03:42 don't extend the friging ArrayAdapter Dec 15 10:03:46 it'll just confuse you more Dec 15 10:03:48 it's super easy once you do it once or twice Dec 15 10:04:00 <_genuser_> Mavrik: I see, so the enabled state must be in the adapter and not on the listview control itself. that makes sense Dec 15 10:04:03 extend a BaseAdapter and track enabed status per _data item_ Dec 15 10:04:17 _genuser_, mhm, because you only have views created for items currently displayed Dec 15 10:04:22 <_genuser_> yeah, I don't mind extending a baseadapter. Dec 15 10:04:27 and when a new item is shown the view gets repurposed Dec 15 10:04:37 getCount return size of items array getView return your view, for now you can inflate and ignore convertview and viewholder, getItem change return type to the type of your array getId return position voila Dec 15 10:04:42 so if you do setEnabled(false) the new view will stay disabled which will cause you issues :) Dec 15 10:04:44 now you have a customizeable arrayadapter Dec 15 10:04:49 <_genuser_> and I've done that before. I just thought if I could sneak this in without creating one more class, it would be cool. Dec 15 10:05:00 <_genuser_> otherwise, I'm fine with extending BaseAdapter. Dec 15 10:05:04 _genuser_, the way you do it is to track enabled/disabled status in adapter and call setEnabled in getView() of the adapter Dec 15 10:05:11 genuser just make your baseadapter a non-static inner class of your dialogfragment Dec 15 10:05:14 yeah, sadly it's not that easy :/ Dec 15 10:05:27 <_genuser_> lasserix_: hey that works too. Dec 15 10:06:13 mr_lou the textview is there before all the appends Dec 15 10:06:15 <_genuser_> I think now that I understand the state must be stored in the Adapter, it makes sense why .getChildAt(i).setEnabled(false) won't work. Dec 15 10:06:29 mr_lou your layout just has finished inflating, and if is taking 1 minute you are really doing something wrong Dec 15 10:06:39 lasserix, Here's my little "output" command: http://pastebin.com/41CyViPR Dec 15 10:07:05 genuser it would work except if you look at getchildcount of listview it is the same size of visible items, does not contain ALL items Dec 15 10:07:30 mr_lou that's useless post your whole activity class Dec 15 10:07:41 <_genuser_> lasserix_: I see. Dec 15 10:07:46 lasserix, No I'm not. It's because I'm reading an online file, which is being processed, and I output a "log" on the screen as it is processed. Currently though, I have to wait till the whole file is processed, before I get to see the log. I want to see that log, as the file is processed. Not wait till it's all done. Dec 15 10:07:49 don't worry everything will steal your code but this will only boost your own sales since it'll help it become a fad Dec 15 10:08:16 mr_lou then you need to pass it from the processor as its processed Dec 15 10:08:43 and if the layout is taking that long to load i am guessing you are processing on the UI thread which is blocking the layout from inflating Dec 15 10:08:59 genuser look at setTag(R.id.whatever, object) Dec 15 10:09:12 you can stuff you items in there and get them out later, very VERY useful for listviews Dec 15 10:09:43 ie if you have different classes for things you cans tuff your datastructure into a button in your listview and if your button click controler is in a seperate class you can just pull it out of the view passed in onClick Dec 15 10:10:23 or for instance ihad to make a circular listview so i just stuffed the position in getView then pulled it out while iterating over childCount to verify which row i was accessing Dec 15 10:10:36 (ie provided a map between absolute position and getChildAt) Dec 15 10:10:51 <_genuser_> lasserix_: very cool. Dec 15 10:11:09 <_genuser_> lasserix_: so I have to create a simple view xml layout for getView(), there's nothing generic available, correct? Dec 15 10:11:11 This app took me a day to make for J2ME..... Android dev is truly a maze of weird design decisions.... Dec 15 10:12:16 genuser you can do it lots of ways, you can manually create the views (i used to use layouts but i like manually doing it now) Dec 15 10:12:51 genuser: dunno if you've done compound views before, but http://blog.xebia.com/2013/07/22/viewholder-considered-harmful/ this is defintly a nice way to do it, you get the viewholder for free Dec 15 10:13:15 <_genuser_> lasserix_: programmatically create a view, create a textbox add to it and return that way manually? Dec 15 10:13:26 mr_lou well its one thing to make a compiler an entirely different thing to make an entire os Dec 15 10:13:46 genuser that's what i like to do, and if you have complex views (ie returning a viewgroup) i like to follow http://blog.xebia.com/2013/07/22/viewholder-considered-harmful/ Dec 15 10:14:09 they lay out from XML file, but it's just a matter of perference Dec 15 10:14:25 <_genuser_> lasserix_: I see. I just have a simple value to display. It's just that I'd like to disable the item if that item isn't supported on the system. so programmatic creation would be fine and fast. Dec 15 10:14:41 <_genuser_> yeah, my xml would be just one layout and textview. Dec 15 10:14:51 genuser there's no difference between programmatic and xml inflation Dec 15 10:14:58 genuser you can just return the textview Dec 15 10:15:19 if you need to set layout params to set size use AbsListView.LayoutParams Dec 15 10:16:41 <_genuser_> ah, I see. thanks. Dec 15 10:20:31 ahh gistbox is so baddass Dec 15 10:25:21 box for your gists? Dec 15 10:25:24 nice Dec 15 10:27:43 Im getting it Dec 15 10:28:21 more than that Dec 15 10:28:25 actually i never gisted before Dec 15 10:28:33 but i was looking for a snippet collections app Dec 15 10:28:42 I would do it if there was an app like that one for it Dec 15 10:28:50 and chrome has gistbox plugin so you can rightclick on selected text and add with labels Dec 15 10:28:54 cause having to go to github and look at all the gists is something that's not going to happen Dec 15 10:29:08 odaym apparently you can organize them with gistbox Dec 15 10:29:11 ie add labels and such Dec 15 10:29:18 yea I saw the video, really handy Dec 15 10:29:22 I'll add tons more now Dec 15 10:29:24 odaym why not goto github? i use many machines Dec 15 10:29:44 that means I have to open the browser Dec 15 10:29:58 sometimes I can't do that cause I lose concentration Dec 15 10:30:02 oh i dont know what developer doesn't have > 12 tabs open at all times Dec 15 10:30:06 hehe Dec 15 10:30:12 i have 6 moniters going right now Dec 15 10:30:17 yea when Im struggling there are many tabs Dec 15 10:30:21 when all's fine, there's no browser Dec 15 10:30:24 two space cam feeds, watching netflix irc as on two Dec 15 10:30:33 I just have a laptop! :( Dec 15 10:31:25 How do I pass a variable to runOnUiThread(new Runnable() {..... ? Dec 15 10:31:38 declare it final in the method that calls that Dec 15 10:31:48 or make it a member variable of class Dec 15 10:31:59 wait a god dong minute here Dec 15 10:32:04 there's no desktop app! Dec 15 10:32:08 yeah Dec 15 10:32:14 the way he had it open in the video it looked like a desktop app! Dec 15 10:32:16 that's the cloud for you Dec 15 10:32:23 no toolbar no bookmarks no nothing! Dec 15 10:32:33 ? Dec 15 10:32:36 hmm Dec 15 10:32:40 actually that would be fun to make Dec 15 10:32:48 I'll show you Dec 15 10:32:50 java app for gistbox on desktop Dec 15 10:32:58 lasserix, Thanks Dec 15 10:33:01 hmm isn’t there already a github app that has that? Dec 15 10:33:02 https://www.youtube.com/watch?v=VLgyY6lqpsQ Dec 15 10:33:08 that doesn't look like a browser! Dec 15 10:33:32 this is misleading Dec 15 10:33:34 you need chrome Dec 15 10:33:39 he is using chrome OS Dec 15 10:33:42 there's a desktop chrome app Dec 15 10:33:44 ohhhh Dec 15 10:33:52 well looks neat Dec 15 10:33:59 needs to be a desktop app Dec 15 10:34:05 not a website, else I'd just go to github.... Dec 15 10:34:31 it's easy to add gists from AS Dec 15 10:35:13 shit no api either Dec 15 10:37:02 lasserix, In case you're curious, the solution/rewrite of my previous paste: http://pastebin.com/yAqKtWiS Works now. Dec 15 10:37:24 great Dec 15 10:37:46 <_genuser_> lasserix_: ok, so that worked. a little more tweaking and this should be pretty good view. Dec 15 10:43:31 How long can I continue using ant for building Android apps? Dec 15 10:44:26 hey guys Dec 15 10:44:28 until you get a job developing Android Dec 15 10:44:34 can anyone help me setting up a predraw listener? Dec 15 10:44:42 never did one before since i mostly do backend stuff Dec 15 10:44:55 should i add items to my adapter inside the predrawlistener? Dec 15 10:44:57 or outside? Dec 15 10:45:04 before i set it Dec 15 10:45:46 jvrodrigues: predraw? Dec 15 10:47:00 yes Dec 15 10:47:04 explain Dec 15 10:47:08 i need to make some complex animations in a listview Dec 15 10:47:31 it seems that the best way to do this is to set a custom predraw listener on the viewtreeobserver Dec 15 10:47:32 in the listview or on the listview? Dec 15 10:47:57 i suppose its in the listview Dec 15 10:48:06 are your animations on animation the rows of the listview, or the content of the rows? Dec 15 10:48:12 the rows ofc Dec 15 10:48:17 i need to animate some rows in Dec 15 10:48:18 use recyclerview Dec 15 10:48:23 cant right now Dec 15 10:48:28 has dedicated component to animation Dec 15 10:48:32 why? Dec 15 10:48:35 recyclerview's ship has sailed for this project Dec 15 10:48:39 oh Dec 15 10:48:40 we have a highly modified listview Dec 15 10:48:47 that i now have to maintain Dec 15 10:48:51 that's fucked, it has built in animation complement class Dec 15 10:48:57 redo it Dec 15 10:48:58 :) Dec 15 10:49:03 i dont have the time for tha Dec 15 10:49:04 that Dec 15 10:49:10 so for now Dec 15 10:49:14 ok so if that ship has sailed, why do you believe you need to set items on predraw listener? Dec 15 10:49:23 i dont, im just asking Dec 15 10:49:26 what i think i have to do Dec 15 10:49:31 trust me, better find the time, listview is a bitch with animating specific views Dec 15 10:49:33 is add the items, notifydatasetchange Dec 15 10:49:42 so afaik your listview will start presenting as soon as you call setAdapter and the adapter has items Dec 15 10:49:46 get the list of positions to animate Dec 15 10:50:02 then animate the views i want Dec 15 10:50:05 well Dec 15 10:50:06 thats the point Dec 15 10:50:07 however Dec 15 10:50:08 if you call findlistview/setadapter but the adapter has no items it won't present Dec 15 10:50:19 also, listview has drawChild Dec 15 10:50:24 which is where you are supposed to do animations Dec 15 10:50:28 Hi, I'm trying to create custom adapter but it always fails on error column '_id' does not exist. But it does exists, it's even included in fieldname list. http://pastebin.com/uZXZ3uwc I tried google but didn't find anything useful. Could you help me, please? Dec 15 10:50:43 hum Dec 15 10:51:14 http://developer.sonymobile.com/2010/05/20/android-tutorial-making-your-own-3d-list-part-1/ Dec 15 10:51:20 here's a whole guide you can use Dec 15 10:51:29 don't do anything with predrawlistener that sounds super hacky Dec 15 10:51:37 it will be Dec 15 10:51:46 this will be the third predraw listener in this damned listview Dec 15 10:51:53 your paste won't help with anything in this case allart, see your DB Dec 15 10:52:16 and i wont even care about it, because i will rebuild the whole listview using recyclerview soon enough Dec 15 10:52:32 Odaym I'll paste DB structure as well but here is commented debug output I got Dec 15 10:52:48 why would you need such a field named "_ID" too Dec 15 10:52:52 just "id".. Dec 15 10:53:00 jvrodrigues: read that guide, you don't need to do anything with predraw listener Dec 15 10:53:07 lasserix_, i will, ty Dec 15 10:53:39 jvrodrigues: the first part is not as important as http://developer.sonymobile.com/2010/05/31/android-tutorial-making-your-own-3d-list-part-2/ Dec 15 10:53:49 what you want to do is override the listView (you need to subclass it if you haven't) Dec 15 10:53:53 and override drawChild Dec 15 10:54:00 do all your intro/outra animations there Dec 15 10:54:00 Odaym: It's because CustomAdapters needs it. It's from this post: http://stackoverflow.com/questions/4974816/app-crashes-on-startup-due-to-java-lang-illegalargumentexception-column-id-d/4974937#4974937 Dec 15 10:54:13 *you can do all your animations from there Dec 15 10:54:47 ah sorry, I thought another type of adapter being discussed Dec 15 10:55:26 allart when you query the column doesn't exist? Dec 15 10:55:43 show your create table and query string Dec 15 10:55:45 lasserix_, im afraid its more complicated than that. See, i have a listview where you can drag and drop shit and change its rows. What i need to do is, when the drag event starts i need to smoothly add some views with a neat animation without screwing up the drag event itself Dec 15 10:55:49 Odaym: Can I use another type? I'm learning to develop for Android right now and this was in example I found Dec 15 10:56:03 well depends what you're trying to do Dec 15 10:56:15 jvrodrigues: ahh you can use dispatchDraw Dec 15 10:56:19 never done cursor adapter dont even know what it does Dec 15 10:56:29 lasserix_: Yes, the column exists, Log.d(TAG, res.getColumnName(0)+ ',' + res.getColumnName(1)); returns _ID,CUSTNAME Dec 15 10:56:35 jvrodrigues: https://www.youtube.com/watch?v=_BZIvjMgH-Q Dec 15 10:56:39 <_genuser_> hmm, anybody try wrap_content on listviews? mine is pretty small less than 10 items. so preformance hit isn't an issue. Dec 15 10:56:39 drag and drop listview Dec 15 10:56:45 genuser DONT Dec 15 10:56:51 <_genuser_> however, the list isn't adapting to the size correctly, Dec 15 10:56:51 oh Dec 15 10:56:56 that's a very bad implementation of drag and drop listview Dec 15 10:56:57 lasserix_, that one uses a predraw listener :D Dec 15 10:57:04 I worked with it for 2 weeks Dec 15 10:57:09 <_genuser_> lasserix_: yeah, I understand it has to do a getView for each item multiple time so for large datasets, it's a no no. Dec 15 10:57:17 jvrodrigues: oh it does? i dunno i used it to make a drag n drop gridview Dec 15 10:57:24 never saw predraw just used dispatchDraw Dec 15 10:57:59 genuser yeah it is super slow, took me two days to figure out once.. terrible lost time. Dec 15 10:58:41 <_genuser_> lasserix_: yeah, it's a combination of included items having match_parent, fill_parent, wrap_content, playign with it still. Dec 15 10:58:45 yea, i need to hold positions so that basically means i need to add views to the adapter, get the new view positions then add a predraw listener to animate the new views and move the views above up and below down. Dec 15 10:58:48 jvrodrigues: but you could just drop your listview in a framelayout and draw you other views ondrageventtriggerd over the listview Dec 15 10:59:23 jvrodrigues: umm that sounds exactly like what that tutorial explains? Dec 15 10:59:31 "hold positions"? Dec 15 10:59:36 well yes Dec 15 10:59:48 so user drags a row and what happens? Dec 15 11:00:01 if you click an item in position 5, that same item has to remain in the same position relative to the screen while other views are added Dec 15 11:00:09 its a damn pain in the ass spec Dec 15 11:00:13 but i guess it makes sense Dec 15 11:01:48 wait is position 5 also being dragged? Dec 15 11:02:29 yes but before its dragged we need to add other views Dec 15 11:02:36 jvrodrigues: so this wouldn't be too hard to do actually, Dec 15 11:02:45 in getView set a position tag on each row Dec 15 11:02:55 then on click/drag event iterate over child using getChildAt Dec 15 11:03:02 swap model data appropiatly Dec 15 11:03:03 and voila Dec 15 11:03:05 you're done Dec 15 11:03:30 you can pull the position tag from the child to get which data item it is from the arraylist items Dec 15 11:03:50 when you iterate over listview children it is visible rows, Dec 15 11:03:52 i tried that Dec 15 11:03:58 i tried adding all views Dec 15 11:04:02 no no Dec 15 11:04:04 not add Dec 15 11:04:18 in getView you do row.setTag(R.id.position_tag, position) Dec 15 11:04:57 then on userclickevent or whatever you do for(int i = 0; i < childcount; ++i) int pos = child.getTag(R.id.position_tag); with position you can do Dec 15 11:05:06 diff from selected position Dec 15 11:05:15 then grab the corresponding element from your list Dec 15 11:05:31 so ie, the row above the selected row, you'd do items.get(selected - 1) Dec 15 11:05:56 then just cast the child as the view class , im assuming your view class has a method like presentData(DataItem item) Dec 15 11:06:02 and you're done Dec 15 11:06:08 with the swapping part anyways Dec 15 11:06:29 ahh behind the scenes you need to also alter the list Dec 15 11:06:49 but once you're done swapping / updating the list you can notify data set changed, or just wait till the user scrolls and do it Dec 15 11:06:58 anyone know where osmdroid contributers hang? it feels wrong to post questions on github issues Dec 15 11:07:28 ya the swap is working :) Dec 15 11:07:32 oh Dec 15 11:07:35 whats not working Dec 15 11:07:43 is the add new views when the drag starts Dec 15 11:07:53 crazy specs Dec 15 11:07:57 snowpong I've been using alot of osmdroid ... what kind of question do you have? Dec 15 11:07:57 ? Dec 15 11:08:05 but im doing exactly that on the swapping thing Dec 15 11:08:19 add new views when the drag starts? Dec 15 11:08:22 Sirolf: I'm wondering how to compine an onlineprovider and an archivefileprovider Dec 15 11:08:41 Sirolf: combine not compine :) Dec 15 11:09:18 lasserix_, yep! thats the whole tricky thing, when the drag starts and you have an hoverview i need to animate new items into the listview Dec 15 11:09:29 then remove them when the user drops the hover view Dec 15 11:10:13 oh you mean as the hovering row moves up and down, at each new position you have to add a row above it and a row below it? Dec 15 11:11:11 sorry i am not seeing where the "new views" fit in -- these are not the swapped views or they are the swapped views, but you have to swap them everytime the hovering row moves up or down a position? Dec 15 11:12:31 well basically Dec 15 11:13:09 lets say you have 5 views, you start dragging 1, before you start dragging i need to add 3 more views (because some are holders) Dec 15 11:13:22 Sirolf: If you look at https://github.com/osmdroid/osmdroid/blob/master/osmdroid-android/src/main/java/org/osmdroid/tileprovider/MapTileProviderBasic.java#L46 it only takes 1 tilesource, but it puts it into 4 providers - to me that seems like nonsense - shouldn't there be one tilesource per provider (at least)? Dec 15 11:13:24 but i think i already devised a plan to tackle this issue Dec 15 11:13:29 thank you very much for your help! Dec 15 11:14:53 np gl Dec 15 11:18:26 <_genuser_> lasserix_: you remember what you did to get it to force wrap_content? Dec 15 11:19:49 ahh fuck my air conditioner heater may litteraly explode in a huge fire bal guess time to bundle up tonight Dec 15 11:19:55 genuser what? Dec 15 11:20:27 the listview? i never did that, never had a smaller list view or something under it Dec 15 11:20:33 <_genuser_> lasserix_: do you remmeber what you had to do to get the ListView to respect wrap_content so it auto adjusts size for widest element. Dec 15 11:21:07 but if you know the num of rows and the rows all have a static height you can just set the height Dec 15 11:21:22 programmatically you can measure the height of a row, multiply by the number of rows and reset layoutparams Dec 15 11:21:34 do that each time notify dataset changed is called (override in the adapter) Dec 15 11:21:45 <_genuser_> width. so I guess I should work on programmatically finding the widest element. Dec 15 11:21:47 hello Dec 15 11:21:51 width? Dec 15 11:21:55 <_genuser_> yea. Dec 15 11:22:03 just use a fixed width Dec 15 11:22:16 you shouldn't have a listview whose width changes over and over again Dec 15 11:22:27 I have a problem with volley Dec 15 11:22:32 [177166] BasicNetwork.performRequest: Unexpected response code 400 Dec 15 11:22:34 <_genuser_> it kinda looks ugly because it's a multi use dialog so it will have elements in there that vary greatly in width. Dec 15 11:22:38 looking for a solution Dec 15 11:22:54 genuser just used a fixed a width Dec 15 11:22:57 for all your dialogs Dec 15 11:23:09 Does setting fontStyle to "bold" select the bold version of Roboto? Dec 15 11:23:16 of a TextView Dec 15 11:23:28 <_genuser_> lasserix_: I see. it will be fine this way. but if I can fix the width, I should focus on it later. for now the rest of the app should be finished, I suppose. Dec 15 11:23:34 or does it just manipulate the normal version of it? Dec 15 11:24:06 platzhirsch: you can check just get the font after setting to bold Dec 15 11:24:40 lasserix_: oh okay, how would I 'get the font'? :) Dec 15 11:25:30 sure the textview has a getter... Dec 15 11:27:06 lasserix_: alright, thanks :) Dec 15 11:27:58 Anyone know if there is a way to force a listview to push a row to the top even if it is no longer scrollable up? Dec 15 11:29:22 wow http://darkdust.net/writings/whyihateandroid Dec 15 11:31:15 lasserix_: that must be a troll Dec 15 11:31:27 definatly Dec 15 11:31:43 well hes a ios dev but that's like a really really long post Dec 15 11:31:48 guy needs to get a life Dec 15 11:33:55 so I can check the typeface with getTypeface() but it doesn't really tell me anything Dec 15 11:51:31 I remember turbovision Dec 15 11:53:22 " I was supported by an Android pro when I started developing for Android. He trained me for two days" Dec 15 11:55:30 a little disingenuous to complain about devving in an os you don't use :) Dec 15 12:00:22 anybody there had this problem with retrofit: 401 Unauthorized Dec 15 12:00:24 ? Dec 15 12:15:00 Hello. How to share using the market://..... URL ? Dec 15 12:15:08 Hi Dec 15 12:15:35 Is it possible to use a python library in my android app? Dec 15 12:16:49 <_genuser_> with teh exception of non-fucntional wrap_content in listview, this whole single dialog for multiple items is working great. Dec 15 12:17:07 now that google is pushing for android studio and gradle build system, is it still possible to use ant for building apps after the next android tools updates? Dec 15 12:17:51 <_genuser_> I saw Android Develop Toolkit version of eclipse showing api level 21 as avaialble. So that one might. Dec 15 12:18:19 <_genuser_> but I"m using the generic eclipse with ADT plugin and it only goes as far as 18. if there's higher api levels installed, it craps out altogether. Dec 15 12:43:03 MalekAlrwily: yes and no Dec 15 12:43:15 MalekAlrwily: there's a uhh something that will compile python but has to be installed Dec 15 12:43:20 not sure if you can bundle into app Dec 15 12:44:11 MalekAlrwily: ahh that was old news: https://ep2013.europython.eu/conference/talks/developing-android-apps-completely-in-python Dec 15 12:44:48 https://bytedebugger.wordpress.com/2014/05/21/tutorial-android-development-with-python-and-kivy-introduction/ Dec 15 12:48:55 hey, I am trying to integrate sync adapter with my app. However, ContentResolver.requestSync isn’t doing anything Dec 15 12:49:05 even when I set the parameters to manually trigger it Dec 15 12:49:26 then something else is wrong Dec 15 12:49:37 something bigger! Dec 15 12:50:11 yeah, I am sure I must have messed up setting it up Dec 15 12:51:21 but can’t seem to figure out :( Dec 15 12:52:02 never worked with sync adapters Dec 15 12:52:10 always thought they're the stuff of "later when I'm a pro" Dec 15 12:52:12 lel Dec 15 12:53:48 hey all I want to ask if I want to make an application that will be installed on clients phone and to send broadcast message to those who installed my app what should I use what strategy and how can I broadcast and receive Dec 15 12:56:37 xy broadcast? Dec 15 12:56:43 that's a specific keyword in android framework Dec 15 12:56:46 what do you mean? Dec 15 12:57:00 Like broadcasting news Dec 15 12:57:13 you mean Dec 15 12:57:16 from your server ? Dec 15 12:57:30 lets say you installed client app and I want you to receive a message from me so I send and you receive immideatily Dec 15 12:57:46 from your f-cking server or what? Dec 15 12:57:48 what is me? Dec 15 12:57:54 I dont know Dec 15 12:57:58 well Dec 15 12:58:06 then you are sol Dec 15 12:58:08 that's what I am asking should it be from server ? Dec 15 12:58:37 i dunno you have cybernetic telepathic abilities? Dec 15 12:59:00 anybody there could help me with Retrofit ? Dec 15 12:59:08 that question is kinda out the scope of android dev, but how else would you do it without some kind of server feeding news updates? Dec 15 12:59:33 ok then I should feed through server and how could I receieve? Dec 15 12:59:38 on android Dec 15 12:59:51 what tools should I use in the application Dec 15 13:00:02 have you read any documentation? Dec 15 13:00:19 if you have a webserver usually you'd setup some kind of restful api Dec 15 13:00:34 which means using an http client protocol to query the restful server Dec 15 13:00:53 if you want you can pay me and i can detail an entire plan for you otherwise you should do some research Dec 15 13:01:21 how much ? Dec 15 13:01:36 i used to use fat jar to export android sdk style project, but now it doesn't work. Dec 15 13:01:44 i don't want to use aar cuz maybe the client won't have it Dec 15 13:01:54 i was being saracastic, that's a lot of work sure if you put up an ad someone will respond Dec 15 13:01:58 i mean won't use gradle... or maven its best for me to just have a jar Dec 15 13:02:27 Nick-S: just require they use gradle Dec 15 13:02:40 aar enables bundling of resources Dec 15 13:02:49 since you are deploying style then why not? Dec 15 13:03:12 i have no resources in my project, only classes Dec 15 13:03:15 oh Dec 15 13:03:24 jar is fine then Dec 15 13:03:25 whats the best way to do it, is it jar xport? Dec 15 13:03:30 sure Dec 15 13:03:34 hmm, is there a recommended library for the floating action bar? Dec 15 13:03:37 its messed up somehow Dec 15 13:04:17 spots: i used https://github.com/makovkastar/FloatingActionButton worked well Dec 15 13:04:37 * capella is gonna need 'bout tree-fiddy Dec 15 13:05:03 capella sounds like you already done tree fiddy Dec 15 13:05:04 <_genuser_> nice, my baseadapter implementation is messed up. Dec 15 13:05:05 ohh Dec 15 13:05:09 i see what you say now heh Dec 15 13:05:17 gen post it up Dec 15 13:05:38 <_genuser_> lasserix_: I just need to fix my getView(). Dec 15 13:05:53 post it up anyways Dec 15 13:06:17 How can I make text in an EditText invisible without using setText("") ? Dec 15 13:06:23 <_genuser_> lasserix_: http://pastebin.com/dpc2y1eb Dec 15 13:06:30 barq set color to background color Dec 15 13:06:49 barq but you'd also have to make sure its not selectable Dec 15 13:07:02 _genuser_: the whole adapter Dec 15 13:07:12 I have it deactivated, but I don't want the text to show when it is deactivated. Dec 15 13:07:24 barq just set text to bg color Dec 15 13:07:39 if the edittext background is not opaque you can use parent background Dec 15 13:07:45 <_genuser_> lasserix_: http://pastebin.com/X3bVVQhq Dec 15 13:08:48 <_genuser_> lasserix_: only thing I am thinking of is that position is not absolute in the list. but rather in the view. Dec 15 13:14:11 <_genuser_> hmm, all these people saving a viewholder in the tag via .setTag(), I don't really see the value in it. Dec 15 13:14:47 <_genuser_> all the viewholder is storing is references obtained by .findViewById(int). and I skipped all that bit. and just get the references each time. position seems to be the position in the list. Dec 15 13:14:53 WAIT A MINUTE! what about google-play-services, can i have that in a jar or i have to put it in a library project? Dec 15 13:15:05 huh? Dec 15 13:16:18 lasserix_: seems to do the job :) Dec 15 13:16:35 where can i find the material design icons? Dec 15 13:20:07 <_genuser_> lasserix_: I got rid of the mPos that was being saved. Just using position now, it's working fine now. Dec 15 13:21:27 ? Dec 15 13:23:20 Nick-S upgrade to gradle Dec 15 13:23:33 oh genuser findViewById is slow Dec 15 13:23:37 it's an optimization Dec 15 13:23:45 <_genuser_> lasserix_: the viewholder bit? Dec 15 13:23:51 when you set the tag as the viewholder, you don't have to do findviewby id Dec 15 13:23:55 look at the link i sent you Dec 15 13:23:58 you can see the diff Dec 15 13:24:11 i added comments for why Dec 15 13:24:23 lasserix_: i can't really Dec 15 13:24:24 <_genuser_> lasserix_: oh I see, so it's just to avoid the findViewById, in that case it makes if there's a valid reason to avoid it. Dec 15 13:24:39 lasserix_: my boss insists... Dec 15 13:24:45 find a new job Dec 15 13:24:51 <_genuser_> lasserix_: I see, sorry didn't see the PM. Dec 15 13:25:02 you wouldn't work somewhere where they forced you to use windows 95 would you? Dec 15 13:25:14 genuser also note you can change return tyupe of getItem Dec 15 13:27:05 is there a way to disable cropping? Dec 15 13:27:05 so genuser you can avoid viewholder by using your own compound views, http://pastebin.com/kjUrHj4D Dec 15 13:27:06 <_genuser_> lasserix_: I see the comments. some nice input. :) funny bit about being OCD. Dec 15 13:27:12 the shadow of the fab gets cropped Dec 15 13:27:29 in this case you wait to set convertview to the compoundview until after you inflate/construct it, so that way you can do present Dec 15 13:27:38 present does setText etc Dec 15 13:27:39 peoples I have a problem with retrofit Dec 15 13:27:42 the problem is: com.google.gson.stream.MalformedJsonException Dec 15 13:27:55 spots with that library? Dec 15 13:28:16 yes Dec 15 13:28:18 I need post this json Dec 15 13:28:19 {\"Sala\":{\"usuario\":\"%@\",\"adversario\":\"%@\",\"atualizacao\":\"%@\",\"device\":\"%@\",\"device_tipo\":\"ios\"}} Dec 15 13:28:33 anybody can help me ? Dec 15 13:28:40 <_genuser_> lasserix_: makes sense. thanks. :) Dec 15 13:28:40 spots where? on the sides? Dec 15 13:28:42 wat kind of code is that? Dec 15 13:28:52 json Dec 15 13:28:57 escaped json Dec 15 13:29:02 spots: on my app i see no cropping Dec 15 13:29:02 yes, i aligned it to bottom,right Dec 15 13:29:08 0dp margin Dec 15 13:29:09 ohh Dec 15 13:29:17 just margin it? Dec 15 13:29:22 margin looks strange in my case Dec 15 13:29:35 use an invisible view underneath it? Dec 15 13:29:47 i use relaivelayouts so... Dec 15 13:30:04 where are the icons located that are used with fabs? Dec 15 13:30:05 you mght PR the dev tho Dec 15 13:30:09 spots wherever Dec 15 13:30:15 usually under the action bar Dec 15 13:30:22 or somewhere on the list Dec 15 13:30:31 http://pastebin.com/zqZauNqV Dec 15 13:30:41 or do i have to include every single icon? Dec 15 13:30:49 <_genuser_> lasserix_: so it's better to get teh inflater from enclosing activity instead of passing around context? Dec 15 13:30:52 i just need the send icon, like on gmail Dec 15 13:30:55 spots you load your own icons Dec 15 13:31:01 lookup material icons google github Dec 15 13:31:05 they released a whole set Dec 15 13:31:26 genuser they are equivalent, but why pass around variables? cuts down on number of variables Dec 15 13:31:32 = cleaner code Dec 15 13:31:46 usually i use parent.getContext if its not non-static inner class Dec 15 13:31:59 going to delete that gist okay? Dec 15 13:31:59 <_genuser_> ok, so it's same thing however the reason to omit is to reduce variables being passed around. Dec 15 13:32:09 yeah Dec 15 13:32:15 just personal preference but the code is cleaner Dec 15 13:32:18 <_genuser_> cool. you can delete teh gist. I'll save it. Dec 15 13:32:28 <_genuser_> yeah, I'm in favor of cleaner code. :) Dec 15 13:32:51 <_genuser_> and now that I learned this bit, I'll removing tons of function paramters where I pass around the context. lol. Dec 15 13:37:23 Hello! I am trying to get real file path to image. Device api level 19. It uses SAF. When i pick image from gallery i get uri id like "image:365" and use 365 like MediaStore.Images.Media._ID but when i pick from google drive, i get "acc=4;doc=22". How can i use this id to get real path to image? Dec 15 13:40:36 getActionBar().isShowing() requires API 11. Is there another way that supports earlier API's to get the action bar to see if it is visible or not? Dec 15 13:43:22 jesperj: You can use appcompat from api 7 Dec 15 13:43:26 jesperj, uh, ActionBar didn't exist before API 11 Dec 15 13:43:33 jesperj, if you're using a compatibility library, use call on that Dec 15 13:43:45 I don’t like syncronize with local database, anyone hier has experience make app with database server without local database ? Is that no problem?  Dec 15 13:44:18 I didn't know what appcompat was. Will check that out. Thanks Dec 15 13:51:29 my eclipse project already had "import android.support.v7.app.ActionBarActivity;" in the activity.... https://developer.android.com/reference/android/support/v7/app/ActionBar.html says "From your activity, you can retrieve an instance of ActionBar by calling getActionBar().". Yet eclipse complains about "if(getActionBar().isShowing() == true) {" saying it requires API 11. Is there a special way to call the appcompat version? Dec 15 13:52:24 appcompat_v7 Dec 15 13:52:28 ? Dec 15 13:52:50 fernandopaiva: yes it looks like it Dec 15 13:53:13 jesperj: getSupportActionBar Dec 15 13:53:28 jesperj, getSupportActionBar Dec 15 13:53:56 read docs and samples Dec 15 13:54:40 I thought I was reading the right doc. I guess Im not Dec 15 13:54:41 sorry Dec 15 13:54:55 but thank you Dec 15 13:55:27 if you create a CustomDrawerLayout for example you need make a Casting Dec 15 13:55:30 1minute Dec 15 13:56:47 jesperj, see http://stackoverflow.com/questions/27318013/hide-actionbar-in-fragment-throws-nullpointerexception Dec 15 13:57:18 fernandopaiva: thanks :) Dec 15 13:58:01 anybody there can help me with Retrofit API ? Dec 15 14:00:20 why are the play services needs to be stubbed in a library project? Dec 15 14:00:26 fernandopaiva: whats the problem? Dec 15 14:01:00 Nick-S, I want send a JSON to my webservice Dec 15 14:01:18 @fernandopaiva: http://stackoverflow.com/a/21423093/1331240 Dec 15 14:01:20 the json: {\"Sala\":{\"usuario\":\"%@\",\"adversario\":\"%@\",\"atualizacao\":\"%@\",\"device\":\"%@\",\"device_tipo\":\"ios\"}} Dec 15 14:01:31 fernandopaiva: you'll need a converter and a java object Dec 15 14:01:54 I'm trying this: http://pastebin.com/zqZauNqV Dec 15 14:02:18 fernandopaiva: gson is used by default, then just download the jar and add it to your project then describe your data with an object Dec 15 14:02:20 Nick-S, http://stackoverflow.com/questions/27485346/malformedjsonexception-with-retrofit-api Dec 15 14:03:42 i never used that @POST('url') thing Dec 15 14:03:44 just @POST Dec 15 14:04:22 but i guess its not that Dec 15 14:05:15 i would guess the problem is in the result Dec 15 14:05:26 you could see the result if you turned on logging Dec 15 14:06:07 always return: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 7 path $ Dec 15 14:06:13 .setLogLevel(LogLevel.FULL) on the build command Dec 15 14:06:33 and watch for the verbose log Dec 15 14:06:52 you could see what is sent as well Dec 15 14:07:11 the exception is probably thrown before Dec 15 14:07:14 do you know of any apps that have a sort of tutorial inside them? Dec 15 14:07:18 @fernandopaiva: Can you post the output of this (just after you create the object): Log.e("JSON", new GsonBuilder().create().toJson(chatObject, ChatObject.class)); Dec 15 14:09:24 also checkout this: http://stackoverflow.com/a/11488385/1331240 Dec 15 14:10:03 inspect your object's fields, at least one probably contains whitespace. Dec 15 14:10:55 {"adversario":"criacao@williarts.com.br","atualizacao":"Mon Dec 15 12:10:21 BRST 2014","device":"21f8cffb2d6593b3","device_tipo":"android","email":"fernando.paiva@williarts.com.br","usuario":"fernando.paiva@williarts.com.br"} Dec 15 14:11:27 my JSON need Sala:{ Dec 15 14:11:47 that doesn't look like the output from gson, it should spaces after commas. Dec 15 14:12:26 whats wrong with the built in json parsers? why does everyone feel the need to use external libs to work with json? Dec 15 14:12:59 jvrodrigues: with gson you get reflection magic Dec 15 14:13:28 but in documentation of Retrofit say @Body to send a JSON Dec 15 14:13:47 I think the problem is with JSON format because I need this JSON Dec 15 14:14:04 {\"Sala\":{\"usuario\":\"%@\",\"adversario\":\"%@\",\"atualizacao\":\"%@\",\"device\":\"%@\",\"device_tipo\":\"ios\"}} Dec 15 14:14:11 jvrodrigues, mostly the API is terrible Dec 15 14:14:22 jvrodrigues, and it's significantly slower than jackson for example Dec 15 14:14:26 and Retrofit is create Dec 15 14:14:38 {"adversario":"criacao@williarts.com.br","atualizacao":"Mon Dec 15 12:10:21 BRST 2014","device":"21f8cffb2d6593b3","device_tipo":"android","email":"fernando.paiva@williarts.com.br","usuario":"fernando.paiva@williarts.com.br"} Dec 15 14:16:00 fernandopaiva: i think its on the response, cuz the malfromed error can't happen when letting gson construct the request... it can't really fail Dec 15 14:16:06 so try to log Dec 15 14:16:33 avoid using strings as dates Dec 15 14:16:38 or use charles to listen to the request Dec 15 14:17:00 ah you're right Nick-s Dec 15 14:17:18 fernandopaiva: why are you using new Callback as the result type Dec 15 14:17:23 i think i have expirienced everything with retrofit... and read all its code Dec 15 14:17:37 it will use Gson to convert the response to JsonElement, which will fail. Dec 15 14:18:32 sharkbutcher: he wants async Dec 15 14:18:37 that's ok Dec 15 14:18:43 but he can't use JsonElement is the expected result type Dec 15 14:22:10 s/is/as/ Dec 15 14:22:55 yup thats true Dec 15 14:23:09 guys, I have an argument with my boss. How do modern client-server apps work? I prefer HTTPS+Restful+json as web-service. Am I wrong? Dec 15 14:23:09 it depends on the converter... Dec 15 14:23:24 woozly: you should win, then you ask for a raise Dec 15 14:23:36 Nick-S: :D Dec 15 14:23:39 woozly: or better, you switch Dec 15 14:35:30 hey there, i’ve got a question about bluetooth low energy and it’s advertise data package in lollipop. How can i determine the txpower level of my own device when i would like to use the ibeacon standard? Dec 15 14:44:12 <_genuser_> hate debugging bugs that shouldn't even be there. like code that clearlylooks like it shoudl work but doesn't. more Log.d's .... Dec 15 14:45:52 there are bugs that should be there? Dec 15 14:46:28 <_genuser_> yeah simple crap like looping thru an array and printing each value. then comparing it to something and the if statement never gets hit. Dec 15 14:46:39 lol Dec 15 14:46:41 <_genuser_> these are teh bugs where somethign really simple is overlooked. Dec 15 14:46:50 the function isn't being hit Dec 15 14:46:52 <_genuser_> so they just cause so much hassle and then you find the bug and laugh Dec 15 14:46:54 bam, that was just said. Dec 15 14:48:46 woozly that's the standard, unless he has good arguements for not using industry standard why would you subject developers to learn unconventional protocols? wastes precious money Dec 15 14:49:29 lasserix_: thank you, I agree with you. Dec 15 14:55:11 Is using a two radio button instead of a checkbox or sliding switch that bad? Dec 15 14:58:53 Depends on the context.. If one checkbox says "Yes" and the other says "No", then it would be kinda bad Dec 15 14:59:21 Or on/off, or whatever Dec 15 15:00:15 True False Dec 15 15:00:24 I had to roll my own PreferenceActivityList Dec 15 15:00:58 is it possible to tint a shape? Dec 15 15:01:08 Wherein when the user clicks into a row, it expands with the "input panel" (depending on type: number, string, color, two choice, three choice) with a bottom bar cancel, reset, confirm. Dec 15 15:01:27 sharkbutcher, even I using ChatObject instead JsonElement the exception com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 7 path $ throws Dec 15 15:01:33 So I could do a checkbox and not do the expand/collapse action, but then i couldn't do the confirm... and it'd break the consistency of the rest of the list. Dec 15 15:02:11 plus I am trying to reflect the raw values as they are in the text file (a text file is parsed for the values that this configuration list emulates, so a user can do it via GUI instead of texteditor) Dec 15 15:02:27 in the text file, it is TRUE FALSE so... Dec 15 15:02:56 Do what makes sense for each setting.. radio buttons for yes/no questions don't make sense Dec 15 15:03:15 The question is like Enable Full Screen Input Mode : true false Dec 15 15:03:36 guess i could still use the checkbox just put it in the input panel Dec 15 15:10:06 SimonVT do you know if someone has released a resources pack with all the new material metrics? Dec 15 15:10:20 ie http://www.google.com/design/spec/style/typography.html#typography-standard-styles Dec 15 15:13:06 Not that I know of Dec 15 15:13:15 huh maybe ill do that this morning Dec 15 15:20:33 lasserix_: cool doc Dec 15 15:20:43 I'll think of passing it to our graphics designer Dec 15 15:30:44 hey guys Dec 15 15:30:53 im using a 4.4 kitkat avd as I mentioned earlier Dec 15 15:31:03 but it wont let me increase the internal storage!!! Dec 15 15:31:19 MJCD: what have you tried? Dec 15 15:31:22 Its like, 127mb or something Dec 15 15:31:31 what device? Dec 15 15:31:32 just configured it in the avd manager Dec 15 15:31:52 avd = android virtual device, nexus 5 Dec 15 15:31:53 so edit it via the emulator Dec 15 15:31:58 manager Dec 15 15:32:03 I did lol Dec 15 15:32:07 its set to 4gb Dec 15 15:32:14 but it stays as 127mb Dec 15 15:32:36 did you set the SD card to 4GB? Dec 15 15:32:42 is there a way I can force an app or an android device to dump a traces.txt file - I get a segmentation fault in one of my glthreads and get no proper backtrace Dec 15 15:32:50 it's a nexus 9 Dec 15 15:32:51 I added an SD card too but that's not the issue Dec 15 15:32:56 I cant even open a browser right now Dec 15 15:33:00 after pushing a few APK's Dec 15 15:33:03 to system Dec 15 15:35:34 is there a color picker in lollipop? Dec 15 15:45:14 lasserix_: not that I'm aware of Dec 15 15:46:53 lasserix_, no, but https://android-arsenal.com/tag/18 Dec 15 15:46:54 hey guys, check out the android developer helpouts as well... https://helpouts.google.com/partner/ask?vertical=programming&tags=android-sdk-tools&origin=http:%2F%2Fdeveloper.android.com%2Fsdk%2Finstalling%2Findex.html Dec 15 15:46:57 that's the worst url ever Dec 15 15:47:08 Yeah using the olocolorpicker Dec 15 15:47:12 circular design is cool :) Dec 15 15:51:18 if im adding tabs to a viewpager, eavh tab containing a recyclerview, would it be better to inflate fragments containing them, or the views themselves? Dec 15 15:51:24 each* Dec 15 15:52:37 asking that question for like 3 days, coulda tested all possibilities by now Dec 15 15:59:22 drinfernoo: In general, there won't be any obvious performance impacts to any of the two. Depending on the use case, I'd probably go for Fragments, as it allows you to create a self-contained object for every tab, instead of having to manage the logic for all the tabs inside one controller (i.e. your Activity). Dec 15 15:59:42 Is there a good way to test that a message gets sent with EventBus + Robolectric? Dec 15 16:00:37 shekibobo: You can subscribe inside a new Object() { ... } and make the post right afterwards (in the same scope). Dec 15 16:01:28 and just assert some side-effect of the post on the object? Dec 15 16:01:46 that would be one way yes Dec 15 16:05:43 shekibobo: But why would you test that EventBus is working? :/ Dec 15 16:06:26 I guess I just want to make sure the right message is sent with the right content Dec 15 16:07:14 then you should probably test it without going through the event bus Dec 15 16:07:21 from wherever it is you are posting it Dec 15 16:08:03 what kind of assertion should I make for that? Dec 15 16:09:01 i'm on nexus5 once i've updated to lolipop i can't debug my app on eclipse.. what ahppened? Dec 15 16:09:06 example, Robolectric.clickOn(myButton); assertEquals(expectedMessage, messageSent); Dec 15 16:09:54 MyEvent generateEventWhenSomethingHappens() { return ... } and in your test assert that generateEventWhenSomethingHappens() returns an event with proper values Dec 15 16:10:24 unit tests are within one class Dec 15 16:10:48 I'd rather check the method onEvent(MyEvent blabla){} Dec 15 16:10:55 without EventBus Dec 15 16:10:57 it will come ;) Dec 15 16:11:07 argh they didn't enable simple constructor and all attr fields are private doh! Dec 15 16:11:09 is there a way to assert that that method gets called when a button gets pressed? Dec 15 16:11:34 for robolectric ? Dec 15 16:11:38 yeah Dec 15 16:12:09 dont know what you want to test but http://stackoverflow.com/questions/5896088/testing-that-button-starts-an-activity-with-robolectric Dec 15 16:12:59 I'd test what have to happen after button click Dec 15 16:13:05 not if button is clicked Dec 15 16:13:48 yeah, I want to test that a specific message gets posted when a button is clicked Dec 15 16:13:57 not an intent, but an Event Dec 15 16:15:40 You could possibly also use dependency injection to inject a mock Bus into the activity for this particular test Dec 15 16:16:41 ^sounds good to me Dec 15 16:16:48 monkeyisl: tried it using AS? Dec 15 16:20:05 I think I'm liking mock bus Dec 15 16:20:49 you are unit testing... Dec 15 16:21:23 well whatever Dec 15 16:21:27 I'm going to sleep ;) Dec 15 16:22:23 Can I give a view two ids? Dec 15 16:22:29 no Dec 15 16:22:40 why would you do that ? Dec 15 16:22:52 hey guys, I have a question. I have a couple of edit texts and I want each of them to modify real time if I enter a value ... take for example the way a converter works... you can modify the values on both sides and they modify based on each other.... can someone help me? I know I should use a textwatcher but damn if I'm able to make it work ... Dec 15 16:23:15 luci1093: what have you tried? Dec 15 16:23:22 TextWatcher tw = new TextWatcher() ? Dec 15 16:23:42 and set the same textwatcher on each TextView Dec 15 16:23:47 luci1093: I'd guess you are causing an infinite loop Dec 15 16:23:47 exactly what gordon_ said Dec 15 16:23:59 gordon_: add the TextWatcher Dec 15 16:24:06 one event triggers another and so forth Dec 15 16:24:07 sorry ;) Dec 15 16:24:35 well I need 5 of them to modify one after the other Dec 15 16:24:35 luci1093: make sure you don't try to change the text in the EditText that has the TextWatcher Dec 15 16:24:51 huh? but that's exactly waht I want Dec 15 16:25:27 so make some flag Dec 15 16:25:30 well for example if I set them and the edittexts are empty ... when I try to write anything in any of them I get an error NullPointerExeption which doesn't say much lol Dec 15 16:26:14 that NullPointerException would be a serious mystery Dec 15 16:26:17 unless you'd post some code Dec 15 16:26:19 luci1093: if you add a textwatcher to an editText and then change the text in the afterTextChanged (for instance) you end up recursively calling yourself and crashing Dec 15 16:28:43 holy mother of god, it’s finally fucking done Dec 15 16:29:20 two viewpagers, a pull to refresh listview all in a parallaxy listview with overflow that expands the first viewpager like a bouncy rubber Dec 15 16:29:23 gordon_: I'm trying to reduce the number of nested layouts. And in one case I have a layout inside of a layout just so that I can have two id's for it :-/ Dec 15 16:29:53 gordon_: I can't just use one id, because in another orientation it has to be two layouts Dec 15 16:30:04 well one second ... if I change the afterTextChanged I basically will get a loop no matter what , right? Dec 15 16:31:32 luci1093: you need to use flags in order to distinguish between cases where the text was changed by the user or by the application. Dec 15 16:32:05 well I havent heard about flags yet ... ugh >.< Dec 15 16:33:11 a flag is just a programming term Dec 15 16:33:18 nothing specific to anything Dec 15 16:33:32 well still havent heard of it lol Dec 15 16:33:43 yeah, a bit of a beginner :p Dec 15 16:34:08 well I'm self taught in all my programming ... :S Dec 15 16:35:16 that doesn't make you any less a beginner :p Dec 15 16:37:03 in fact, it means it's more likely that you've missed stuff Dec 15 16:37:45 well you know ... I acutally dont know a lot of things by the name but when I research I actually know how to do them ... Dec 15 16:38:43 bluecup: got to release it as a library project! Dec 15 16:39:47 lasserix_ probably going to when I get some time to refactor it, it is actually really cool looking, but sucked to make Dec 15 16:40:28 bluecup, youtube? Dec 15 16:40:33 bluecup, video that is, demo Dec 15 16:40:50 pfn: can’t yet, NDA until it goes public in a few weeks Dec 15 16:40:58 yuck Dec 15 16:41:25 I’ll put it in another random project and show it off, probably this weekend :) Dec 15 16:43:27 I'm caching web resources and fetching them recurrently (at each page load) from the assets folder with openFileInput; is there a chance I'll get a speed up if I save those assets in memory and directly serve them from here? Dec 15 16:44:02 assets isn't writable... how are you caching into there Dec 15 16:44:07 and yes, memory is faster than disk Dec 15 16:45:06 slmb: https://github.com/JakeWharton/DiskLruCache Dec 15 16:45:07 wrote too fast, saving them in app's private cache Dec 15 16:45:26 Does it work now? Dec 15 16:45:31 do you need it to be faster? Dec 15 16:46:08 yes it works and yes I'd like it to be faster, but maybe that wouldn't be a significant improvement Dec 15 16:46:28 are you reading it multiple times? Dec 15 16:46:40 Cause if you are only reading it once, having an inmemory cache wont help Dec 15 16:46:52 yes I'm reading it every time an user loads a webpage Dec 15 16:47:30 it seems that I'm spending ~500ms in loading all those files, including the time the webview needs to process them Dec 15 16:47:34 there you go. Dec 15 16:49:36 hum, okay, I'll try and see if it makes a difference Dec 15 16:51:33 I seriously think this TextWatcher is enither poorly made or I can't find the damn logic ...how the hell am I supposed to change 5 EditTexts which each one is based on the other without getting a loop? seriously now ? -_- ... Dec 15 16:51:51 infinite loop* Dec 15 16:54:16 Hi. If I have a definition in values/strings.xml which is not present in a values-eg/strings.xml will the value from values/strings.xml be used? Dec 15 16:57:16 Wulong: yes Dec 15 16:59:10 yiati: ok, thanks. Dec 15 17:01:44 luci1093: Do you want each of the 5 damn EditTexts to respond the same? If so have you considered the hell implementing a shared class implements TextWatcher Dec 15 17:02:00 luci1093: one approach would be ignoring the event inside TextWatcher if the view which received the event is not focused, hence was _probably_ modified programatically. Dec 15 17:02:28 See: http://developer.android.com/reference/android/app/Activity.html#getCurrentFocus%28%29 Dec 15 17:03:05 or even: http://developer.android.com/reference/android/view/View.html#isFocused() Dec 15 17:12:15 yiati: 1 of the edit texts is more important and based on taht one the other 4 change. And if I change one of the other 4 then the first one changes... that's how I intend them to work.... Dec 15 17:15:26 Sounds like you need two different listeners then Dec 15 17:18:21 yeah, I think I'll first make the functionality and make a button to do all the calculatons and things and I might make them work later... I'm wasting too much time on this thing... thanks for the tip anyway Dec 15 17:37:29 i need some help with an android app im programming... can someone PM me if they think they could help? Im basically executing runtime.getruntime.exec("su") and i need a way to check to see if it executes properly Dec 15 17:38:16 then ask away in the channel Dec 15 17:39:38 i did Dec 15 17:39:56 runtime.getruntime.exec("su") -this is an android thing? Dec 15 17:40:48 yes Dec 15 17:40:56 its for rooted phones Dec 15 17:41:02 ah i see Dec 15 17:41:03 running commands as root sucks Dec 15 17:41:14 it executes the su binary so you then can make root calls Dec 15 17:43:23 bynarie http://su.chainfire.eu/ Dec 15 17:44:15 Chainfire, i have absolutely read your "how to su".. sorry im still sort of new to this all.. but is executing su and then checking uid a valid method for verification? Dec 15 17:44:57 basically, yes. but still I'd recommend you just use the library ;) Dec 15 17:46:11 ok Dec 15 17:46:50 Chainfire, also, thanks for all your GREAT work man.. you are seriously the man Dec 15 17:46:57 i use all your stuff Dec 15 17:47:20 thanks :) Dec 15 17:47:33 yep! Dec 15 17:48:12 im glad you figured out how to bypass the se linux thing with the kernel.. i successfully installed supersu on 5.0.1 stock without needing to modify kernel Dec 15 17:48:27 supersu 2.37 Dec 15 17:52:00 Can anyone help me obtain a stock rom image for the Samsung Galaxy Avant SM-G386T1 (for MetroPCS) phone? Dec 15 17:52:34 Is there a way to move the logo button in the ActionBar so that it has 0 padding on the left? Dec 15 17:52:42 similar to DrawerLayout's nav bar Dec 15 17:54:45 Hi Dec 15 17:54:59 ohai Dec 15 17:55:50 If anyone had In-app purchase, Will I need the orderId in future, or discard it? Dec 15 17:58:58 anyone experimented with tmpfs/ramfs in order to accelerate slow build times? Dec 15 18:01:54 anyone is knowledgable about the updates? Dec 15 18:02:04 sorry about request single update of location managewr? Dec 15 18:04:12 get an ssd Dec 15 18:04:16 build times instantly fixed Dec 15 18:04:23 and if you have the ram for a ramdisk, do it Dec 15 18:04:30 jus tmake sure you save it off ramdisk frequently Dec 15 18:07:06 sadly, even with 32gb of ram, I don't have enough for a ramdisk ;-) Dec 15 18:08:40 hmm, so i mean to ask if i should use requestSingleUpdate on LocationManager or just remove updates subscription after the first response Dec 15 18:17:14 Chainfire, thanks for your help.. i got it working! Dec 15 18:18:39 Whats the story with something like xcf (gimp) files in an android project? They wont be packaged up will they if they're not in the assets directory? Dec 15 18:18:48 (gradle/ij/as) Dec 15 18:19:19 none of them will package it up Dec 15 18:19:31 stuff in non-source directories don't get packaged Dec 15 18:20:10 didnt think so, just wanted to be sure. If I did choose to store them in assets to be closers to my texture atlases etc how would I flag them not to be packaged in gradle dod you know? Dec 15 18:20:24 do you know... :) Dec 15 18:20:32 you don't Dec 15 18:20:43 you can exclude individual files Dec 15 18:20:49 but not by pattern Dec 15 18:21:41 I don't know if it works for project files though Dec 15 18:21:47 maybe only for library jars Dec 15 18:24:46 I am using MaterialDesignLibrary for its ProgressBarIndeterminate but I get this Exception: https://dpaste.de/QsCy Dec 15 18:24:56 Any ideas what's going on? Dec 15 18:27:35 ask the library maintainer Dec 15 18:39:37 astroduck you were struck by a dingleberry Dec 15 18:39:56 from outer space Dec 15 18:40:33 g00s: I do not get that reference ... :P Dec 15 18:41:13 a silly library stuck to your project soiled everything Dec 15 18:43:30 :( Why is material design so backward incompatible :{ Dec 15 18:47:04 what do you mean astroduck Dec 15 18:49:19 canadiancow: the material themes are not backward compatible in themselves, even AppCompatv21 doesn't contain everything Dec 15 18:49:31 appcompat contains quite a bit Dec 15 18:49:36 what specifically are you looking for? Dec 15 18:49:41 what's up with jcenter... Dec 15 18:50:08 Progress Bar and Sliders Dec 15 18:50:40 oh nevermind i was accessing jcenter.bintray.com instead of bintray.com/x/y/z Dec 15 18:51:31 once you submit your app to play store how long does listing take? Dec 15 18:52:07 it's pretty random... Dec 15 18:54:09 canadiancow: You know any library other than MaterialDesignLibrary that has ProgressBar and Sliders Dec 15 18:54:25 i do not, sorry Dec 15 18:55:17 No worries, Let's see if I can solve this bug. Ah, this is going to be boring :( Dec 15 19:01:36 how to I can block landscape mode ? Dec 15 19:01:42 my manifest is here: http://pastebin.com/Fv02X57s Dec 15 19:01:55 my app only works in Portrait Dec 15 19:02:10 [sorry if I asked twice, my client crashed] How do I pass -Xmx8192m to dex from an ant build? Dec 15 19:02:53 also sorry if I missed an answer as a result... Dec 15 19:09:13 fernandopaiva: Doesn't android:screenOrientation="portrait" work? It always works for me. Dec 15 19:09:32 astroduck, yep Dec 15 19:09:40 but I'm using Fragments Dec 15 19:09:55 I solved Dec 15 19:10:01 thanks ! Dec 15 19:11:19 Can anyone explain what's going on here? https://gist.github.com/shekibobo/bf3e18c39c3db96c7945 Dec 15 19:11:45 I can't seem to use a generic type in a custom class, but I can use it in a list just fine Dec 15 19:15:44 Hey Dec 15 19:16:04 Hello, I want to learn how to develop android apps. I've had no experience with Android or Apple apps before, and I have some previous knowledge with Java, but enough to know what's what. I can learn. Where do I start? Dec 15 19:16:09 I'm having trouble getting the number of a incoming call Dec 15 19:16:29 rhllor. Take a course. Google. Youtube tutorials? Dec 15 19:16:56 rhllor I'd recommend buying a good book from amazon Dec 15 19:17:02 learn the basics and work your way up Dec 15 19:17:10 and tons of trial and error Dec 15 19:17:13 http://pastebin.com/4q8eMZA0 Dec 15 19:17:41 Any ideas? Dec 15 19:18:26 My manifest: Dec 15 19:18:27 Dec 15 19:21:24 theonlyone: is there a recommended place for learning android development. Like, is there a w3schools equivalent. Dec 15 19:22:20 how long does it normally take an app to be listed once submitted to playstore? Dec 15 19:22:21 eh, just google around. i took college courses on it as i am majoring in software engineering Dec 15 19:22:29 If you're an experienced programmer, the udacity course is decent. If you're brand new, I can't really point you anywhere. Dec 15 19:26:00 Coding an interface using generics, I get: 'ThingContainer.this' cannot be referenced from a static context https://gist.github.com/shekibobo/bf3e18c39c3db96c7945 Dec 15 19:28:27 IS this an appropriate channel to ask questions related to GLESXX? Dec 15 19:28:41 Any ideas? Dec 15 19:29:42 rhllor: Commonsware, and the Android Example projects Dec 15 19:31:34 Guys can someone take a look in my code: https://bpaste.net/show/bfa68f1aac1a Dec 15 19:31:51 I am trying to create a dropdown menu inside a Dialog box with text fields etc Dec 15 19:32:10 however I am having issues making it work at lines 27-39 Dec 15 19:32:35 I think its because OnItemSelectedListener is abstract but I dont know how to solve this Dec 15 19:34:40 you mean it has any errors? cant compile? Dec 15 19:35:03 yeah this doesnt compile Dec 15 19:35:14 but i saw online people doing it in similar ways Dec 15 19:36:02 for setAdapter you provide DialogInterface.OnClickListener, not AdapterView.OnItemSelectedListener Dec 15 19:38:51 Ashiren, could u perhaps show me an example? Dec 15 19:39:07 I know I dont like my codes structure.. i should create this inside an xml and inflate it Dec 15 19:39:16 but i am just trying to make it work as it is for now Dec 15 19:40:37 or w8 i think i got it Dec 15 19:42:27 stupid question.. but its possible to create the layout from java instead of xml? Dec 15 19:42:32 per what cnap said Dec 15 19:43:21 yes, there's nothing you can do in xml that you couldn't do in code, albiet somewhat more verbosely and less clearly :) Dec 15 19:43:25 yes, it's possible to build view hierarchies programmatically Dec 15 19:43:54 ok Dec 15 19:44:01 ^^ what JF said. the XML is ultimately just read by some java code somewhere.. anything xml can do, java can do Dec 15 19:44:27 so my code now is https://bpaste.net/show/162de454375e Dec 15 19:44:44 but if the dialog opens.. and i try to select an item from the list it closes again Dec 15 19:44:48 thats not what I want Dec 15 19:45:10 I would like to both have an arrayAdapter list + some text fields Dec 15 19:45:17 and only when user clicks Ok close the dialog Dec 15 19:45:20 any clues? Dec 15 19:48:02 cnap: http://stackoverflow.com/questions/2620444/how-to-prevent-a-dialog-from-closing-when-a-button-is-clicked Dec 15 19:48:37 sorry just read your entire question that's actually not related Dec 15 19:49:19 its fine ill check that too Dec 15 19:50:35 if there is really no built-in way to do this you could provide a custom view to your dialog, i.e. ListView and then handle the events yourself. Dec 15 19:51:07 similar to this: http://stackoverflow.com/a/21351835/1331240 Dec 15 19:52:00 I believe that there should be a built it more native way to do this Dec 15 19:52:02 not sure tho Dec 15 19:52:02 hey, is there a way to share files between build flavors in Studio? Dec 15 19:52:07 its my 3rd android dev day :D" Dec 15 19:52:50 s73v3r anything under main/ will be shared Dec 15 19:53:19 I don’t want to share between all flavors, though. Dec 15 19:53:56 I have some debug features that I want to share between Dev and QA, but I don’t want them in Production. But Dev and QA need some separate files themselves, too. Dec 15 19:54:02 s73v3r: at worst, you should be able to make a new folder somewhere, and explicitly add it to both flavors in the gradle file. something like flavor.srcSets + "folder" Dec 15 19:55:21 s73v3r: ah, that's probably actually: android { sourceSets { flavor.java.srcDirs += "dir" }} Dec 15 19:55:26 * pfn builds all of his views in code these days Dec 15 19:55:29 when not writing in java Dec 15 19:56:07 that sounds like what I want. I’ll give it a try, thanks Dec 15 19:56:08 ^ this reminds me. I discovered yesterday that I can't apply a style to a view without re-creating it entirely. Dec 15 19:56:51 but nearly all of the style operations can be re-done without creating a new instance, and it's probably a lot more efficient for e.g. changing a text color and nothing else. Dec 15 19:57:17 /whois sharkbutcher Dec 15 19:57:19 I don't suppose there's a lib out there to do just that? It seems possible, though a bit messy / annoying / touches on yet more documentation flaws Dec 15 19:57:28 uhm Dec 15 19:57:33 Groxx, huh? Dec 15 19:57:39 g00s, stalker! Dec 15 19:57:54 lol, sharkbutcher - thought maybe you were nick butcher ? Dec 15 19:58:02 uh nope Dec 15 19:58:13 bummer :( Dec 15 19:58:16 :D Dec 15 19:58:28 pfn: basically I want to be able to inflate a view with style X, and then later on apply style Y. It seems possible for _nearly_ everything, though it would be a lot of work to set up, so I'm hoping someone has already done it. Dec 15 19:58:31 god, I hate debugging on emulator Dec 15 19:58:39 pfn: focus stealing? Dec 15 19:58:44 Groxx, ContextThemeWrapper ? Dec 15 19:58:57 pfn: sure. but there's no .setStyle method. Dec 15 19:59:04 so it's new-instance-only Dec 15 19:59:09 Groxx, you can't change style after inflation anyway Dec 15 19:59:48 :| yes. I know this. but in nearly all cases, all the styles can be applied at runtime after inflation in code, easily enough. Dec 15 19:59:58 Groxx, the individual methods can be applied Dec 15 19:59:59 all the style's values, I should say Dec 15 20:00:01 not styles in general Dec 15 20:00:20 there's no such "refresh my appearance from attributes" method Dec 15 20:00:39 that makes sense though Dec 15 20:00:47 damnit, my layout isn't respecting my wrap_content after onMeasure Dec 15 20:00:50 yes. but it should be possible to build one, at least for built-in widgets. I'm wondering if someone else has done it, because otherwise I might have to. Dec 15 20:00:56 it keeps giving me a 1:1 aspect ratio when I want 16:9 Dec 15 20:01:07 Groxx, it isn't possible to build on generically Dec 15 20:01:14 attributes don't map to the same methods Dec 15 20:01:19 not all the time Dec 15 20:01:21 pfn: so you write some glue code. it's not that hard. Dec 15 20:01:32 if you want to special-case stuff all over the place, sure Dec 15 20:01:32 and sure, not 100%, but what in Android is 100% anyway? Dec 15 20:01:36 Hello I get Error:(12, 0) Plugin with id 'com.neenbedankt.android-apt' not found. when trying to add AndroidAnnotations to build.gradle in Android Studio Dec 15 20:01:59 Groxx: You can bet 100% you're gonna be stuck with Java 7 for the next year or so :) Dec 15 20:02:07 sorry, partial Java 7. Dec 15 20:02:09 haha Dec 15 20:02:21 Has anyone successfully added AndroidAnnotations to Android Studio? Dec 15 20:02:46 sharkbutcher thats being pretty certain, but how would we know ? Dec 15 20:03:07 we don't, just use Kotlin. Dec 15 20:03:16 haha :D Dec 15 20:03:45 i'm trying to decide between retrolambda and kotlin atm, by the time i figure it out they may have java 8 support :) Dec 15 20:04:04 Kotlin has a lot more than just lambdas, though. Dec 15 20:04:16 extensions are an awesome addition IMO Dec 15 20:04:31 oh yeah, i agree - problem is i may license some of my code, not sure if being 'not java' will be a problem eventually Dec 15 20:05:14 sharkbutcher have you used kotlin on android already ? Dec 15 20:05:23 yes, not for anything public though. Dec 15 20:05:47 sharkbutcher ok, so you pretty much get to use the official google gradle-plugin, but then just add 'kotlin-android' right ? Dec 15 20:05:55 yap Dec 15 20:06:11 and add a dependency on their standard library Dec 15 20:06:33 yeah. i was thinking about playing with groovy on android, meh - but you had to use their plugin completely Dec 15 20:06:39 Kotlin compiles to JVM, right? are the lambdas any more efficient than e.g. retrolambda? seems like a Sufficiently Smart Compiler™ could inline them for great justice. Dec 15 20:07:17 but they can't be inlined Dec 15 20:07:32 if you can guarantee purity: why not? Dec 15 20:07:45 http://kotlinlang.org/docs/reference/lambdas.html#inline-functions Dec 15 20:07:46 i get hell lot of gc_for_alloc debug logcat lines Dec 15 20:08:25 I really need to get a new tablet some day Dec 15 20:08:38 my 7" is broken, and debugging against emulator is such a pain Dec 15 20:09:11 flan3002: cool, thanks. looks exactly like what I was hoping for :) Dec 15 20:11:05 i wish google kept a $200 nexus tablet around Dec 15 20:11:07 Why is my emulator disconnected from eclipse when launching a second one? Dec 15 20:11:25 need to use 2 because i need to make calls between them Dec 15 20:11:27 aceus: afaik it's because they both fight for the same adb port. which seems stupid. Dec 15 20:11:34 hm Dec 15 20:11:45 there might be something you can do with the launch options, but I dunno. Dec 15 20:11:48 they use different ports though, 5554 and 5556 Dec 15 20:12:26 I've never looked too closely :\ if you find something, I'd definitely be curious. Dec 15 20:12:39 wow this kotlin looks amazing Dec 15 20:12:54 reminds swift Dec 15 20:13:03 If you're interested here's an interesting read: http://blog.gouline.net/2014/08/31/kotlin-the-swift-of-android/ Dec 15 20:13:36 i think what most devs would like about kotlin is that you can learn the language in a day Dec 15 20:13:51 at least, going through the reference, thats what it seems Dec 15 20:14:43 And that's certainly a good point. Scala difference to Java can be intimidating... Dec 15 20:14:52 sharkbutcher but i'm a bit worries about how these things will work with jack / jill Dec 15 20:15:18 The biggest advantage IMO, at least before the recent announcements for multidex support, is obviously the low size of the runtime. Dec 15 20:15:52 yeah, that's a big part of what makes me meh on jack/jill. the existing compile flow seems to support pretty much every existing java tool, transparently. Dec 15 20:16:50 hehe, i'm notthe only one who thinks it then Dec 15 20:16:52 ^^ +1 Dec 15 20:17:15 theoretically it should probably work, but j/j have their own minimzation algos, so if we use the regular java -> .class -> proguard flow maybe some of us hit some edge cases google doesn't care about Dec 15 20:18:47 google will always care about the standard flow Dec 15 20:18:55 because libraries must always work Dec 15 20:19:11 jack and jill cannot obviate the standard flow unless google stops compatibility with all java libraries Dec 15 20:19:39 I hope so, but I'll believe it when I see it. they haven't been flawless on compatibility. Dec 15 20:19:44 google also cares about the NDK ;) Dec 15 20:19:49 the ndk works Dec 15 20:20:07 people that use the ndk often don't give a shit about using eclipse, or intellij, or any ide for writing code Dec 15 20:20:29 lol Dec 15 20:22:37 most googlers don't give a shit about using an ide for working with aosp Dec 15 20:23:23 * pfn starts to see out of his right eye again, yay Dec 15 20:25:27 Groxx, what library have you tried using that isn't compatible? besides stuff that depends on javax.* and sun.* which isn't shipped on android? Dec 15 20:25:37 and some things like jdbc for which there's only partial implementation Dec 15 20:27:08 none. I just mean the android team's backwards-compatibility in general. mostly good, some glaring flaws (asynctask, etc) Dec 15 20:27:47 that's kind of a separate problem Dec 15 20:28:09 sure. but we're making predictions about their future decisions :) Dec 15 20:28:28 how about a quick poll about the worse API in the SDK Dec 15 20:28:31 well, if google drops overall java support, I'm out of here :p Dec 15 20:28:31 I vote for Parcelable Dec 15 20:28:40 i vote AccountManager Dec 15 20:28:45 there's plenty of shitty api, parcelable isn't one of them Dec 15 20:29:09 Parcelable seems reasonable, given performance and Java limitations Dec 15 20:29:10 Wifi Direct Dec 15 20:29:26 bar none the worst Dec 15 20:29:36 sarbs i'm waiting for that opengarden library to come out Dec 15 20:29:40 I've been meaning to dick with wifip2p, never got around to it Dec 15 20:30:08 pfn don't bother, all you'll do is tear your hair out Dec 15 20:30:12 but opengarden devs basically said its flaky because android Dec 15 20:30:26 http://www.amazon.com/Motorola-Moto-32GB-Developer-GSM/dp/B00HOKAKYU/ref=sr_1_3?s=wireless&ie=UTF8&qid=1418675402&sr=1-3&keywords=moto+x&pebp=1418675365737 Dec 15 20:30:27 I'm gonna have to go with ContentResolver. sqlite-like API, but without "group by" or "having", no support for transactions of any kind (bulk operations get close, but they're a pain too, and even then it depends on _you_ writing transaction support - nobody does). Dec 15 20:30:31 damnit, still 250, bring it down to $199 again Dec 15 20:30:50 i thought the g2 was $150 for a while Dec 15 20:30:54 is there any reason for not using annotation processing with the SDK ? Dec 15 20:30:55 at least the white one Dec 15 20:31:00 g2 doesn't have lte/cdma Dec 15 20:31:18 us gsm, i'd just use it for dev Dec 15 20:31:35 I don't want it for dev Dec 15 20:31:39 sharkbutcher: slower builds, but that's probably it. unless you go nuts with it, because it can be a form of unintentional code obfuscation :) Dec 15 20:31:39 I want it to replace my shitty sgs3 Dec 15 20:31:41 why are we doomed for so much boilerplate Dec 15 20:31:51 sharkbutcher, because it's java Dec 15 20:31:54 yeah, java. Dec 15 20:31:58 kotlin, as you've seen is an obvious solution Dec 15 20:32:23 guys, i'm using location manager to get gps location, but i'm indoors, so nothing happens, and it doesn't even notify me on failure! Dec 15 20:32:33 gps doesn't work indoors Dec 15 20:32:38 duh Dec 15 20:32:42 and of course you get notified on failure Dec 15 20:32:48 or rather, you time yourself Dec 15 20:32:48 ?! Dec 15 20:32:49 Nick-S: afaik that's normal. GPS doesn't really "fail" it just "waits" Dec 15 20:32:49 where? Dec 15 20:32:58 i can timeout myself... Dec 15 20:33:04 you give it a max amount of time to obtain a lock Dec 15 20:33:08 no lock in x time = failure Dec 15 20:33:08 Nick-S GMS location framework or AOSP location framework? Dec 15 20:33:14 but when it stops trying... i wanna know Dec 15 20:33:20 it doesn't stop trying Dec 15 20:33:20 it doesn't stop trying Dec 15 20:33:23 cuz it also stops shoing the blinking location thing Dec 15 20:33:24 HAH Dec 15 20:33:52 well, paste your code and lessee if you're doing anything wrong just in case Dec 15 20:34:03 my code? Dec 15 20:34:03 awaybutcher it would be nice if we could mix .kt and java files in the same dir, i think we need main/kotlin now Dec 15 20:34:08 https://mobileaccessories.ventev.com/products/chargers/dashport-chargers/3458875__ventev-dashport-q1200-charger Dec 15 20:34:08 which all? Dec 15 20:34:11 hmm, I want one of those Dec 15 20:34:25 g00s, why would you put .kt in src/java Dec 15 20:34:26 :p Dec 15 20:34:29 that doesn't make sense Dec 15 20:34:56 i guess not. but if i have a package and one file is kt and the rest java, it gets split into 2 deep hierarchies :( Dec 15 20:35:06 sarbs: gms is play services? Dec 15 20:35:09 AOSP is what? Dec 15 20:35:10 Nick-S correct Dec 15 20:35:18 aosp is android.location.* Dec 15 20:35:19 i'm using the built in stuff Dec 15 20:35:23 aosp then Dec 15 20:35:27 g00s, in your ide, it doesn't matter Dec 15 20:35:31 ok, paste up your code Dec 15 20:35:42 g00s that's how aidl already is.. not too terrible, really Dec 15 20:36:13 oh yeah, i forgot about how the ide folds packages Dec 15 20:37:43 http://pastebin.com/jNMmpem5 Dec 15 20:38:37 is kotin bundled with android studio? :) Dec 15 20:39:18 no Dec 15 20:40:29 Nick-S: sounds like it's a plugin: http://blog.jetbrains.com/kotlin/2013/08/working-with-kotlin-in-android-studio/ Dec 15 20:40:45 yea i saw it Dec 15 20:41:09 its so tempting to use it Dec 15 20:41:29 sarbs: have you taken a look? Dec 15 20:41:31 just use it Dec 15 20:41:52 fall back to java when $employer absolutely demands java Dec 15 20:42:11 learning alternative approaches just makes you a better developer in any case Dec 15 20:42:26 hi internet Dec 15 20:43:38 pfn: my employer is totally against using less than most used things Dec 15 20:43:51 Nick-S i'm not seeing anything glaringly wrong with how you're using it Dec 15 20:43:51 not everyone learns a language in a week Dec 15 20:43:59 sarbs: i'll take that as a compliment Dec 15 20:44:06 hehe Dec 15 20:44:13 sarbs: did you even particularly like it? :) Dec 15 20:44:25 android.location.* methods can be finicky, unfortunately Dec 15 20:44:47 sarbs: problem is that if its not returning within some timeout constant i wanna know Dec 15 20:45:05 is it possible to call .setSelection on a spinner without it calling the onselecteditem listener? Dec 15 20:45:11 hey JacobTabak Dec 15 20:45:14 hey g00s Dec 15 20:45:36 you've taken care of the brain-fart type stuff like made sure GPS is enabled in settings, looked at logcat to see if any errors are popping up, etc? have you tried a GPS Status app to see if it's able to see satellites or having other troubles? Dec 15 20:45:40 spots remove the listener before setting selection, then re-add it afterward Dec 15 20:45:53 JacobTabak todays theme is 'should we use kotlin' :) Dec 15 20:46:02 annotation support? Dec 15 20:46:10 sarbs: i am in my room, and gps won't work here, this is a scenario which i want to handle... Dec 15 20:46:15 why are people interested in it, was there some big blog post or something? Dec 15 20:46:22 i mean, why are they interested in it today Dec 15 20:46:49 Nick-S well location frameworks work a little differently than we kind of might naively expect; we don't send a request and wait while it's actively spinning away calculating an answer.. basically we turn them on and start listening, and they post locations anytime they have something to say Dec 15 20:47:14 Nick-S gps has *trouble* indoors but it should still be able to at least see a few satellites, if not many Dec 15 20:47:38 usually, no Dec 15 20:47:47 JacobTabak because today we are one day closer to dying Dec 15 20:47:48 indoors, you might get 1 gps sat lock Dec 15 20:47:52 and there isn't enough time ... Dec 15 20:48:01 while you need 3-4 to get position Dec 15 20:48:27 I so fucking hate how you cant have a layout size change listener on gingerbread Dec 15 20:48:42 stop supporting gingerbread Dec 15 20:48:55 that is unfortunately not an option :( Dec 15 20:49:08 matt_j: can't use onGlobalLayoutListener? Dec 15 20:49:27 sarbs: how would you manually time it out? Dec 15 20:49:37 AlarmManager Dec 15 20:49:45 alarm manager is terrible Dec 15 20:49:52 pfn: why? Dec 15 20:50:01 because it fires even if your app isn't running Dec 15 20:50:02 since I assume your "request for gps access" dies when your process dies, alarm manager seems wildly unnecessary. Dec 15 20:50:09 pfn: it depends Dec 15 20:50:27 use alarm manager if you need to schedule things when your app is /not/ running Dec 15 20:50:31 yeah that's a good point, much too big for this Dec 15 20:50:32 not when your app is running Dec 15 20:50:40 thread + notifer callback Dec 15 20:50:42 so what should i use if my app Dec 15 20:50:50 handler is an easy way Dec 15 20:50:53 actually its important to state that my app is a service Dec 15 20:50:54 handler.postDelayed or Timer or something Dec 15 20:51:01 timer sucks in general Dec 15 20:51:01 use alarmmanager when you need to schedule things more than 2-5 minutes out, whether your app is running or not Dec 15 20:51:03 yeah Dec 15 20:51:03 handler works well Dec 15 20:51:06 handler? Dec 15 20:51:10 whats its called? Dec 15 20:51:16 it's a handler Dec 15 20:51:19 Handler Dec 15 20:51:23 there, spelled it out for you Dec 15 20:51:35 Groxx: hmm, I'll take a look, thanks. Dec 15 20:52:36 haha Dec 15 20:52:42 i never used it Dec 15 20:52:51 hows its implemented? Dec 15 20:53:07 a handler is a basic fundamental component in android Dec 15 20:53:09 learn it well Dec 15 20:53:22 where do i put the timer Dec 15 20:53:25 it processes a message queue Dec 15 20:53:40 Nick-S: handler.postDelayed will handle that for you Dec 15 20:53:49 nice of him Dec 15 20:53:56 can i cancel it ? Dec 15 20:54:04 Nick-S, read the apidoc Dec 15 20:54:10 the answers are in there Dec 15 20:57:53 solved it Dec 15 20:58:18 is it possible to show an app chooser which contains just the phone and send a text message? Dec 15 20:58:31 this shall popup when marking a phone number in my listview Dec 15 20:59:09 what i really wanna know if i were using gsm is i would get all that stuf for 'free' Dec 15 20:59:30 aceus: you can resolveActivities / etc and just make a view that contains those activities. afaik there's nothing built-in to restrict the list, but you can make it yourself relatively easily Dec 15 21:00:01 okey Dec 15 21:00:11 aceus: you probably could, but I don't think you'd want to. How do you know what phone or text app the user prefers to use? Dec 15 21:00:12 i'm using a context menu now with those two alternatives Dec 15 21:00:50 (you could, i suppose, have a preference screen that spawns that) Dec 15 21:00:51 dragorn : true... is there any way to pop up a default list of apps? Dec 15 21:01:15 aceus: if you're launching a phone or text event you can just make the share intent for it and let android prompt the user to pick one, with the optional "always use this" Dec 15 21:01:34 aceus: in which case your side of it would be a "call" or "text" and just generating the appropriate intent Dec 15 21:02:04 yeah, in general I'd say "don't, use the system one, because you don't know what they want", but there can be reasons. Dec 15 21:05:36 I am getting an error after importing a sample application in IntelliJ. It says that it cannot find the activity that I have defined in the AndroidManifest.xml. The activity name is MainActivity. It is specified in the xml like this: The ".MainActivity" section is showing an error that says "Cannot resolve symbol MainActivity". When I run the application on an emulator, it says: "Didn't find Dec 15 21:05:36 class "com.example.ActionBarCompat.MainActivity" on path". For some reason the activity class is not being recognised by IntelliJ and it's not being compiled into the apk. Any ideas why? Dec 15 21:05:58 The sample application is this one: https://android.googlesource.com/platform/development/+/master/samples/ActionBarCompat Dec 15 21:05:59 does transferring an app to a different dev account preserve all reviews and comments? Dec 15 21:11:29 is it possible to build an android project into an apk without using an IDE, gradle or ant? Dec 15 21:11:49 of course Dec 15 21:11:51 Sure, but that's stupid. Dec 15 21:11:54 spuz: yeah. javac + dex + apktool is all that's necessary I think Dec 15 21:12:10 reeeally you don't even need apktool Dec 15 21:12:14 not apktool. aapt Dec 15 21:12:34 and not "dex", dx Dec 15 21:12:36 obviously I haven't tried it :) Dec 15 21:13:14 I want to try to understand what IntelliJ is trying to do and therefore understand why it is failing... Dec 15 21:13:16 spuz: dx will convert the .class files into a dex file. aapt will handle packaging and processing all the resources and building the actual apk (iirc) Dec 15 21:13:39 spuz: if you're building with gradle, there should be an option to make it print out the commands its running Dec 15 21:13:49 although I don't recall what it is offhand :) Dec 15 21:13:50 --debug Dec 15 21:13:52 JesusFreke, the example app I have doesn't have a gradle file Dec 15 21:14:38 spuz: dx is pretty straight-forward, but the aapt commands in particular are somewhat involved and cryptic Dec 15 21:15:37 for the first time in history, the android emulator isn't bigger than my screen. thank you intellij Dec 15 21:15:43 or whatever they changed Dec 15 21:15:51 JesusFreke, I only need to get to the .class stage Dec 15 21:15:55 that is what is failing right now Dec 15 21:16:40 spuz: that one is relatively easy. The most basic invocation is just dx --dex --output=classes.dex myclasses.jar Dec 15 21:16:54 and I think you might be able to specify a directory with .class files instead of a jar Dec 15 21:17:05 and there are options for include other jars, etc. Dec 15 21:17:11 including* Dec 15 21:17:28 JesusFreke, I have no .class files, that is what I'm trying understand Dec 15 21:17:50 alright lets see how handler is doing Dec 15 21:17:51 spuz: are you sure about that? :) Dec 15 21:17:56 JesusFreke, yeah Dec 15 21:18:08 where are all you guys located? cuz 10 hours ago none of you were here... Dec 15 21:18:09 they should be somewhere in "out" or whatever Dec 15 21:18:09 unless they are precompiled which seems unlikely Dec 15 21:18:16 JesusFreke, how? Dec 15 21:18:32 because that's where they're put when the IDE compiles them.. Dec 15 21:18:44 JesusFreke, the point is the IDE is failing to create them Dec 15 21:18:46 g00s: don't suppose you know off hand what observeOn does (under the hood) ? Dec 15 21:18:51 that is why I'm trying to bypass it Dec 15 21:19:00 spuz: at that point, the android tools aren't even involved yet Dec 15 21:19:09 that's purely the java compiler Dec 15 21:19:11 JesusFreke, I guess not Dec 15 21:20:23 postDelayed didn't work Dec 15 21:21:56 Nick-S: what part of it isn't working? Dec 15 21:22:21 i had a Log.i in my runnable and it didnt show Dec 15 21:23:26 Nick-S: you can essentially be 100% sure it's working as it should. pretty much all of Android relies on it. so it should be something in how you're using it / how you're canceling it / your process died in the meantime. Dec 15 21:23:44 hehe Dec 15 21:23:51 my process is well alive and kicking Dec 15 21:23:53 let me try again Dec 15 21:24:34 maybe its me that have seized functioning after working for about 12 hours Dec 15 21:25:23 according to what you say services are always running and should not really use alarm manager Dec 15 21:25:35 this is a very important thing to know Dec 15 21:26:42 yes i confirm that i was the problem :) Dec 15 21:26:55 "always running" is not a thing that's guaranteed by Android, fwiw. if it's a foreground service: it's very likely running, but it's still less important than whatever app the user might be using. Dec 15 21:27:26 Groxx: so then an alarm manager would come in handy? Dec 15 21:27:59 Nick-S: only if you want it to wake your process back up at a specific time. I'm _guessing_ you don't, but I don't know exactly what you want. Dec 15 21:28:07 alarm manager is almost never the right solution Dec 15 21:28:10 bankai_au this is the best article i've seen for that http://www.grahamlea.com/2014/07/rxjava-threading-examples/ Dec 15 21:28:30 Groxx: what if i really want to run my app again? Dec 15 21:28:52 handler works like a charm Dec 15 21:29:55 g00s: interesting. this seems like it might make the whole article dubious, though: “The parallel operator proved to be a problem for almost all use cases and does not do what most expect from it, so it was removed in the 1.0.0.rc.4 release: " Dec 15 21:30:38 Nick-S: then yeah, alarms are basically the only way to do it :) Dec 15 21:30:55 Groxx is that untrue? Dec 15 21:31:21 services can use start_sticky, but a) I don't know how well that works (never tried), and b) it's not often what you actually want Dec 15 21:31:59 g00s: thanks for that, goign to need to do some testing (i have some weird crashing :() Dec 15 21:32:06 g00s: which part? I admit I'm skimming heavily, but http://www.grahamlea.com/2014/07/rxjava-threading-examples/#comment-387207 Dec 15 21:33:18 I'm creating a custom drawable subclass in Java code. Is it possible to do resolution-independent drawing in the draw() method? The canvas methods all seem to take pixels. Dec 15 21:33:18 though I guess most of the article doesn't seem to use .parallel(). still, seems odd that they're surprised by it when it seems relatively important for an article about threading. Dec 15 21:33:46 gauthierm: you can multiply by the screen density Dec 15 21:34:37 Groxx: That's what I though first but Drawable doesn't have a context to get the window manager. Dec 15 21:34:56 how do i enable network provider only for the location manager? Dec 15 21:35:18 JesusFreke, I found out why my activity wasn't being picked up, apparently the package attribute was wrong for some reason! Dec 15 21:35:23 my process is start_sticky Dec 15 21:35:36 service, sorry Dec 15 21:35:44 Is there anyway to tell what toolchain a rom was built with? Dec 15 21:36:15 JesusFreke, actually I know why now, it's because intellij helpfully changed it after importing the sample as a project Dec 15 21:36:44 gauthierm: ah. canvas.getDensity() looks like it should work? Dec 15 21:36:58 awsome! Not sure how I missed that. Dec 15 21:36:58 gauthierm: you just convert Dec 15 21:37:06 gauthierm: np, it happens :) Dec 15 21:37:10 thx Dec 15 21:37:27 gauthierm: throw your dp sizes in dimen then use context get a hold of them as getResources().getDimensionPixelSize() Dec 15 21:37:36 also there are like a hundred different ways to convert dp to px Dec 15 21:38:05 just be careful about rounding Dec 15 21:38:19 if you dont round correctly, you'll sometimes get unwanted gaps Dec 15 21:43:50 and if you don't rom correctly, you'll sometimes get unwanted gapps Dec 15 21:43:59 * sarbs will be here all week Dec 15 21:45:54 have you guys been getting notifications that play service needs to be installed, but it already is O.o Dec 15 21:46:31 g00s: almost every time when I start from scratch on a new device / new rom Dec 15 21:47:26 g00s, only on Hangouts. I had a sync error on one of the google accounts Dec 15 21:47:33 removed that sync error and it worked Dec 15 21:47:58 okay, maybe it will go away Dec 15 21:53:04 oh god, new problems Dec 15 21:53:14 i keep getting wifi scan results for no appearant reason Dec 15 21:53:25 bankai_au lots of stuff isn't on the wiki like http://reactivex.io/RxJava/javadoc/rx/Observable.html#nest() Dec 15 21:53:25 what defines if an app chooser dialog pops up when starting a new intent? Is it i.putExtra("tel:", nr); ? Dec 15 21:53:31 'you dawg; Dec 15 21:53:51 aceus, when there are multiple activities that can handle that intent Dec 15 21:54:05 g00s: you can edit it and add it ;) Dec 15 21:54:15 orly Dec 15 21:54:20 yep. but how do android know which activities that can handle those? Dec 15 21:54:28 for ie. if i've selected a phone number or URL Dec 15 21:54:36 is it some flag? Dec 15 21:55:19 because i want an app chooser dialog to popup when selecting a phone number, but can't get it to work... Dec 15 21:55:30 (without using a predefined context menu...) Dec 15 21:56:11 aceus: PackageManager#resolveActivities iirc Dec 15 21:56:43 there's also some "just once / always" control that I don't know if we have access to (beyond saying "start" vs "startChooser") Dec 15 21:56:44 huh Dec 15 21:57:14 how do you add a directory to a sourceSet in gradle? Dec 15 21:57:40 like is it supposed to be an absolute path, or how would you make it a relative path from the “src” directory? Dec 15 21:57:48 can i track the wifimanager on the logcat? Dec 15 21:58:32 s73v3r: other samples I've seen online seem relative to the app root, which is probably where the build.gradle file is (so it could be either). usually I see "src/main/java", for example Dec 15 21:59:01 Nick-S: there might be a dumpsys for it Dec 15 21:59:18 i don't really get it... Dec 15 21:59:33 shall i have two different intents for textmessage and call? Dec 15 21:59:43 Nick-S: though I don't quite follow what you're trying to do :) distracted. Dec 15 21:59:43 Groxx: it worked! awesome! Thanks Dec 15 22:00:27 aceus: yeah. they're pretty different intended-behaviors (Intents, get it?) Dec 15 22:00:37 yes Dec 15 22:00:53 but ok. so they can't be in the same app chooser? Dec 15 22:01:00 i have to first have a context menu Dec 15 22:01:03 not by default, no Dec 15 22:01:11 and then an app chooser depending on what to do? Dec 15 22:01:15 or shich app to use Dec 15 22:01:38 which is part of why e.g. Contacts/People shows both a [text message] and [phone] button on numbers Dec 15 22:02:31 ok Dec 15 22:02:40 good to know Dec 15 22:03:01 it would be kinda neat to have "do this, or fall back to this, or that", but tbh I suspect the list of apps would be enormous in most cases. Dec 15 22:04:35 groxx: i have discovered that the google play location service is firing a start scan whenever a location is enetered Dec 15 22:05:44 Nick-S: a wifi-scan? Dec 15 22:07:28 Guys I have an Add New marker on the map icon at my apps action bar. I want this to show a nice UI box like a dialog which will contain the markers title, description, category and other info Dec 15 22:07:46 In other words I want when the user clicks the Add New marker button to show a nice UI with textfields + dropdown lists Dec 15 22:07:47 Groxx: yes, they need the list of wifi aps to be sent to their servers Dec 15 22:07:51 what is the best way to do this ? Dec 15 22:08:35 its possible to launch directly into an activity? Dec 15 22:08:40 (that is not the launcher) Dec 15 22:09:06 lasserix_, of course Dec 15 22:09:17 lasserix_, you can launch directly into anything that is exported Dec 15 22:11:39 cnap: if you're not doing material, a dialog will suffice, i think Dec 15 22:12:04 bankai_au, yes I know, but I am looking for an easy way to achieve this in exact that I described Dec 15 22:12:09 already lost 1-2 hours with that xD Dec 15 22:12:30 I have tried to generate the whole dialog form programatistically but it fails Dec 15 22:12:37 I mean its not working as expected Dec 15 22:12:41 so I may go with the xml option Dec 15 22:12:42 use a diaglogfragment Dec 15 22:13:59 bankai_au, I was trying with AlerDialog.Builder for now Dec 15 22:21:46 uhg Dec 15 22:21:49 wt* Dec 15 22:21:53 hey guys does anyone use parse for storage? Dec 15 22:22:44 my code just stopped working without any reason Dec 15 22:23:01 any ideas? http://pastebin.com/ZpWNtsmu Dec 15 22:23:14 "without any reason" -> not knowing the reason doesn't mean there isn't one :) Dec 15 22:23:51 it worked for like 30 minutes ago. now nothing happens Dec 15 22:23:56 and nothing outputs in logcat Dec 15 22:24:38 aceus: try command-line logcat? it's more reliable Dec 15 22:24:39 no errors Dec 15 22:25:13 aceus: If I had to guess, your startActivity is being skipped because the condition in the if statement is wrong Dec 15 22:25:23 in any case, the usual debugging techniques apply ;) Dec 15 22:25:30 either attach with a debugger, or throw in some logging Dec 15 22:28:38 not sure what resolveActivity does with a chooser intent… never tried it :| Dec 15 22:28:55 uh solved it Dec 15 22:29:28 Intent.ACTION_SEND was wrong for some reasone Dec 15 22:29:31 reasonÄ Dec 15 22:29:32 * Dec 15 22:30:20 I wonder why I cannot enable the HDR option when I've got the default camera view open from my app Dec 15 22:30:54 I can only control the timer, grid overlay and which camera to use. Can't control Flash or HDR+ Dec 15 22:31:33 is it because by default it turns it off fearing I wouldn't know how to manage such large image sizes and run out of memory instantly? Dec 15 22:32:48 Odaym: interesting. I wonder if they disabled that, since HDR+ needs post-processing? Dec 15 22:33:07 my n7 doesn't have hdr, maybe it needs capabilities from the firmware Dec 15 22:33:17 like bursts , etc Dec 15 22:33:18 might be kinda an awkward flow. "take picture" -> "now wait several seconds…." -> "send you back to previous activity" Dec 15 22:33:32 flash seems weird though Dec 15 22:33:34 not the default that comes up when I open the camera app, the default that I've asked for in my app Dec 15 22:33:58 Im sure its just some more parameters to add to the take picture intent Dec 15 22:34:10 but I can't figure out what to google, all the queries are ambiguous Dec 15 22:36:10 this is the closest but I have no idea what they're talking about http://stackoverflow.com/questions/10605560/how-do-you-take-high-resolution-images-using-camera-takepicture Dec 15 22:36:28 ah, he's implementing the camera again Dec 15 22:38:24 Is there somewhere I can browse the available icons from the action bar icon pack? Dec 15 22:38:35 nobody answered whats your guys location Dec 15 22:38:41 i mean is it usa? Dec 15 22:38:50 i'm in seattle Dec 15 22:38:57 spuz holo or material? Dec 15 22:39:02 cuz i'm in eu and there's not as much activity in the daytime for me, its after midnight here now Dec 15 22:39:06 mattblang, holo I guess Dec 15 22:39:14 well, a question for a later day Dec 15 22:39:15 it makes the working expirience better Dec 15 22:39:16 night Dec 15 22:39:41 spuz holo is in the sdk somewhere I think, just search in the sdk folder for "ic_" and some should come up. the material pack is on github Dec 15 22:40:08 mattblang, I mean is there an easy to way to find under which name a given icon is? Dec 15 22:40:14 without searching through 100s of folders? Dec 15 22:40:19 spuz: http://developer.android.com/design/downloads/index.html Dec 15 22:40:31 hmm Dec 15 22:40:38 maybe I'm not explaining Dec 15 22:40:43 spuz for the material yes, not sure for the holo Dec 15 22:40:44 spuz if you are looking for material Dec 15 22:40:49 google github material icons Dec 15 22:40:52 google github material icons google Dec 15 22:41:09 they also exist for holo on developer site unless they replaced them with material ones Dec 15 22:41:36 the github page has a live preview broken down by folder Dec 15 22:41:43 fwiw the action bar icon pack includes holo icons, last I saw Dec 15 22:42:23 So, for example, this screenshot comes from a photoshop tool that does what I want: https://camo.githubusercontent.com/2cfcf5e03003ba982b2b1bb3fe2027e16fa1ed9a/687474703a2f2f646c2e64726f70626f782e636f6d2f752f35363937303233362f7073746f6f6c732f69636f6e732e706e67 Dec 15 22:42:58 i.e I can see the icon and the name of the icon next to it for all the icons available Dec 15 22:43:04 and ideally I can search too Dec 15 22:43:50 spuz http://google.github.io/material-design-icons/ Dec 15 22:44:00 spuz again though, that is the material (which I switched over to personally) Dec 15 22:44:17 mattblang, ah thanks hopefully holo has an equivelent though Dec 15 22:45:12 spuz: have you downloaded the action bar pack? the icons there look holo-ish to me, and the "core icons" is a flat list of them all Dec 15 22:45:17 how to horizontally center to things in a relative layout? Dec 15 22:45:23 two things next to eachother Dec 15 22:45:38 spuz use material icons,there are a bunch more to chose from Dec 15 22:46:09 spuz you need to read what people answer you http://google.github.io/material-design-icons/ Dec 15 22:46:18 ah, though it's not a complete list. oh well. Dec 15 22:46:20 Groxx, yeah I have downloaded it but I could not find a way to see them all in one place Dec 15 22:46:25 spuz you need to read what people answer you http://google.github.io/material-design-icons/ Dec 15 22:46:34 [14:41] the github page has a live preview broken down by folder Dec 15 22:46:55 Groxx, and lasserix_ yes I already saw that from mattblang Dec 15 22:49:37 spuz: does this work? from inside e.g. the holo_light folder: `find ./*/drawable-xhdpi/ -name *.png | xargs open` Dec 15 22:50:09 Groxx, heh, open all the high res pngs :) Dec 15 22:50:10 on android 5.0 after updating I don’t have a gallery app, only google photos. Is this gonna be true for everyone soon? Will photos be the default gallery? And the one gallery app that everyone has on their phones? Dec 15 22:50:49 in_deep_thought: I don't think "gallery" is even remotely guaranteed to be on older devices. it's just common. Dec 15 22:51:19 same thing probably applies to Photos. odds are some carriers will say "No. Only Verizon's crappy clone, and Samsung's, for you." Dec 15 22:51:43 Groxx: for displaying photos on a particular directory, does any uniform call exist on android. like I can have an intent that opens “the gallery app”. If so, what would this call be called? Dec 15 22:53:33 in_deep_thought: dunno. there's a whole "documents" thing in kitkat+ that i haven't investigated, otherwise does ACTION_VIEW + a gallery folder uri work? Dec 15 22:53:58 in_deep_thought: http://developer.android.com/reference/android/os/Environment.html#DIRECTORY_DCIM Dec 15 22:54:20 meh... Hitchcock.freenode.net dropped again Dec 15 22:54:22 anyone know of a github library that will turn a view, such as an EditText, Spinner, etc., red and display a message of some type? Dec 15 22:56:47 what? Dec 15 22:56:54 are you on drugs mattblang? Dec 15 22:57:25 'turn a view, such as an EditText,Spinner,etc. red and display a message of some type' sounds like your brain had contextual segfault Dec 15 22:57:48 this looks great http://shop.oreilly.com/product/9781680500387.do Dec 15 22:57:53 TacticalJoke will probably like :) Dec 15 22:57:59 what does it mean to turn a spinner 'red' and then dislay a message? Dec 15 22:58:25 Turn it into a communist, and then spread propoganda? Dec 15 22:59:28 Hmm, that does look good. Dec 15 22:59:50 TacticalJoke also from today http://ergoso.me/computer/science/github/software/evolutionary/couplings/2014/12/10/evsrc-evolutionary-couplings-reveal-poor-software-design.html Dec 15 22:59:51 oh not out yet Dec 15 23:00:17 so somebody can look through your hg history and learn the truth ... nooo ! Dec 15 23:01:25 hehe Dec 15 23:01:27 that's awesome Dec 15 23:01:29 la ftw Dec 15 23:03:02 quantifying SRP via the diff operator Dec 15 23:04:17 That's a clever idea. Never considered that before. Dec 15 23:06:28 I guess someone could create a new repository right before open-sourcing. Dec 15 23:06:40 Though future SRP violations might still be detectable. Dec 15 23:07:54 any good librarys for making the simplest possible photo gallery (flip through photos in a folder) in my app? Dec 15 23:08:18 Though I guess this is more about cohesion. Dec 15 23:11:16 lasserix_: I think I can remove all nesting from comment views and post views. Just a LinearLayout with two children (or three when I start showing thumbnails for posts). Dec 15 23:11:54 Might try to measure the performance later (of the no-nesting version and of the older nesting version). Dec 15 23:11:54 I dunno whether timing getView is enough, though. Dec 15 23:11:55 in_deep_thought: looks like google is going to help but you should be able to roll your own fairly simply Dec 15 23:11:56 Ideally, I could time the code where the ListView adds the child. Dec 15 23:12:02 TacticalJoke: and ultimaty you can just use custom class Dec 15 23:12:11 Yeah, I hope to do that. Dec 15 23:12:14 TacticalJoke: ocd intervention: move on Dec 15 23:12:18 been 3 day snow! Dec 15 23:12:25 I've been doing other stuff too. lol Dec 15 23:12:34 I have like seven active branches. Dec 15 23:12:48 talk about SRP violation of the coder :) Dec 15 23:12:52 haha Dec 15 23:13:19 seven branches all going to merge at some point? Dec 15 23:13:23 Yeah. Dec 15 23:13:38 I just rebase the remaining six when one of the branches becomes the main-line. Dec 15 23:13:44 Eventually, they're all rebased. Dec 15 23:13:58 sounds like you need to read the article g00s posted again Dec 15 23:14:35 so anyways whats next big milestone? Dec 15 23:15:10 lasserix_: would using picasso make sense? or is that just for fetching remote images Dec 15 23:15:11 Don't you ever do that? :) I think sometimes it's way more effective. Dec 15 23:15:11 Though sometimes it's a pain. Dec 15 23:15:18 No idea. I have comments looking fairly good. Doing collapsing next (shouldn't be too hard). Dec 15 23:15:36 in_deep_thought: you'll still have to roll your own adapter Dec 15 23:15:48 in_deep_thought: i would bet there is a sdk sample Dec 15 23:15:53 in_deep_thought: Picasso supports content provider Uris Dec 15 23:16:06 and i know for a fact there are 12! tutorials doing gallery adapter stuff Dec 15 23:16:40 TacticalJoke: thats kind of my modus operandi Dec 15 23:16:45 12! ? how can I find these sdk samples? are they online anywhere? or do I load them with the sdk manager? Dec 15 23:17:18 like reading half a dozen books at once Dec 15 23:17:30 12 x 11 x 10 x 9 and so on Dec 15 23:17:43 just good gallery image grid view base adapter tutorial Dec 15 23:17:46 *google Dec 15 23:19:34 https://code.google.com/p/android/issues/detail?id=32621 any comments on this mess? Dec 15 23:19:37 im sure theres some source you can pilfer, also you can brosse samples online http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android/ nav inside the version -> com -> android Dec 15 23:20:12 i don't understand why this SO hard. Dec 15 23:20:16 in_deep_thought: http://omapzoom.org/ Dec 15 23:20:32 pclover: its new Dec 15 23:21:21 Napalm: Does any performance boost come from setting maxLines=1000 to a variable-height TextView in a ListView? Dec 15 23:22:02 why would there be Dec 15 23:22:23 I guess I wouldn't expect it, but just curious because he talked about TextViews without maxLines set being problematic. Dec 15 23:24:17 I actually changed my BetterSpannableStringBuilder to have methods such as "startBold", "stopBold", etc. Way more powerful now. Dec 15 23:24:29 I guess another option would be to add them to a queue or something. Dec 15 23:24:33 TacticalJoke: hierarchyviewer might help there? it can profile draw/layout calls Dec 15 23:24:53 Oh, nice. Haven't tried it yet. Dec 15 23:25:14 otherwise: not nesting sounds best to me :) Dec 15 23:25:48 Yeah. I can just have a flat LinearLayout. Though ideally (I think) I'd use custom text-drawing (instead of TextViews). Dec 15 23:26:18 Then I could probably have one view that does simple drawing. Dec 15 23:26:18 maybe I'm missing something, but why custom text drawing? Dec 15 23:26:35 tis faster Dec 15 23:26:42 Right now, for example, a comment has a CommentIndentView and a CommentTextView in a LinearLayout. Dec 15 23:26:42 aah. so you can just have one view per row? Dec 15 23:26:48 The indent is for replies. Dec 15 23:26:54 And its size is set at run-time. Dec 15 23:27:16 Yeah. I'm guessing it's gonna be faster. Dec 15 23:27:29 I wonder if this could be done with a nine-patch + margins (or padding)... Dec 15 23:28:17 it would be harder to support the inevitable "OMG Unicorns!" theme, though Dec 15 23:28:28 Basically, a comment indent is transparent apart from having a line on the right. A comment has a background. As far as I can tell, it's tricky (or impossible) to do this with padding/margins unless you use nesting. Dec 15 23:28:47 I'm not sure about nine-patch images. Hmm. Dec 15 23:29:31 TacticalJoke: why can't you just use left margin? Dec 15 23:30:03 lasserix lol, for validation Dec 15 23:30:28 lasserix I'm doing some complex forms, need to highlight different views red and show a message if something didn't validate on the server Dec 15 23:30:33 mattblang: still you didn't explain what you mean? Dec 15 23:30:36 lasserix was hoping something existed like this Dec 15 23:30:43 oh so it is as simple as it sounded Dec 15 23:30:58 mattblang: just make an interface Dec 15 23:31:10 or subclass it Dec 15 23:31:14 reflect ALL the things! Dec 15 23:31:44 lasserix_ yeah, will probably do that. was just wanting to make sure something like that didn't exist already. seems like a common task with forms Dec 15 23:31:46 lasserix_: Honestly, I can't remember. I think there was a problem relating to setting margins at run-time. Dec 15 23:31:49 But I could be misremembering. Dec 15 23:32:18 Does anyone know how to modify how Android recreates the stack after a crash? Dec 15 23:32:39 Also, the line is to the left of the comment, rather than part of the comment (meaning that non-replies have neither an indent nor a line, which is the situation that I want). Dec 15 23:32:40 change the e.printStackTrace method Dec 15 23:32:46 or make your own Dec 15 23:32:52 If I crash the app in one activity, I want it to start at the beginning, not at the activity before the one that crashed Dec 15 23:33:21 catch your exception and start your activity in the catch clause Dec 15 23:33:21 umm Dec 15 23:33:21 margin should work fine Dec 15 23:33:21 just do it via layoutparams Dec 15 23:33:21 you probably only found setPadding Dec 15 23:33:21 but padding means the background extends, which you didn't want Dec 15 23:33:21 but you can set margins by calling getLayoutParams Dec 15 23:33:38 Anyone know how to initi a drawerLayout with stuff already in the drawer? Dec 15 23:33:47 or main content panel? Dec 15 23:33:47 http://developer.android.com/training/implementing-navigation/nav-drawer.html Dec 15 23:33:54 tricknology whats up man Dec 15 23:34:04 This just gives me a blank screen Dec 15 23:34:08 Hey mattblang :) Dec 15 23:34:15 finally got back to the drawer activity Dec 15 23:34:19 tricknology same issue from the other day? Dec 15 23:34:27 no that issue was fixed. Dec 15 23:34:44 I’m just wondering how to start the example with things already in the panel Dec 15 23:35:03 Yeah, I know margins are different from padding. There was a reason margins wouldn't work before. Still trying to recall. Dec 15 23:35:04 or do I have to just start a transaction after onCreate? Dec 15 23:35:19 tricknology I just load my nav drawer fragment in onCreate Dec 15 23:35:34 tricknology the nav drawer fragment loads its view in onCreateView Dec 15 23:35:39 yeah ok. I have a bunch of methods in my main activity but I gues sI’ll have to move them to a fragment Dec 15 23:35:56 tricknology I would. Dec 15 23:36:02 tricknology I did I should say Dec 15 23:36:11 no need for IdentCommentView ;) Dec 15 23:36:17 right.. I was still stuck on the activity scheme, with no way to get the views from the fragment.. so I’ll jsut move the methods :) Dec 15 23:36:20 thanks mattblang Dec 15 23:36:49 tricknology makes it easy to do authentication later too, just did that myself. swap the fragment out for NavDrawerAuthFragment or whatever Dec 15 23:36:50 showerthought : even though cooking is multitasking (parallelism) nobody ever writes cookbooks as flows of ingredients Dec 15 23:37:03 flatMap(butter, dough) ! Dec 15 23:38:08 which meme do you prefer? https://www.youtube.com/watch?v=g6GuEswXOXo https://www.youtube.com/watch?v=BNsrK6P9QvI Dec 15 23:39:54 lasserix_: I think I do need it. Dec 15 23:39:54 lasserix_: Non-indented comments don't have a line on the left; indent comments have a line. Dec 15 23:39:54 Groxx: Hierarchy Viewer isn't working here. "Inspect Screenshot" doesn't do anything. Weird. Dec 15 23:40:59 TacticalJoke: only works on emulated device unless you install a library in your app Dec 15 23:41:13 you should use genymotion Dec 15 23:41:13 while you are at it Dec 15 23:41:51 mostly so you can expect a variety of devices and see how your lay outs look Dec 15 23:42:45 Ah. Okay. Dec 15 23:43:05 Funny how the documentation doesn't tell me what you just told me. Dec 15 23:43:16 Not like documentation is intended to document stuff or anything. :D Dec 15 23:43:20 lasserix_ oh, TextViews have setError. Derp. Didn't realize that Dec 15 23:46:38 g00s, sure they do, it's just not worded that way Dec 15 23:46:38 lasserix_: Think I could achieve this with a margin? http://i.imgur.com/mvuBIJY.png Dec 15 23:46:49 g00s, take eggs, mix, add salt, etc. Dec 15 23:47:06 g00s, same operation, just english Dec 15 23:47:10 TacticalJoke: ah, sorry. I should've included a link for this: https://github.com/romainguy/ViewServer (lets you use hierarchyviewer on anything) Dec 15 23:47:38 or, anything v12+ Dec 15 23:47:40 Groxx: No worries. :) I'll check it out. Dec 15 23:48:33 lasserix_: Noting that top-level replies have no indent or line. Dec 15 23:49:16 I want a new thermostat Dec 15 23:49:20 and I'm opposed to buying a nest Dec 15 23:49:22 wat do Dec 15 23:49:45 lasserix_: And I dislike the idea of drawing over a ViewGroup. Dec 15 23:51:07 Bbiab. Dec 15 23:52:31 interesting, seems GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); is blocking for people Dec 15 23:53:12 Does anyone know what framework Twitch used for the mobile app? Dec 15 23:54:01 or Google for the new YouTube app? They look very similar. I like the look and want to create something similar using a mobile web framework Dec 15 23:54:12 jQuery mobile doesn't cut it Dec 15 23:56:54 It feels like Ionic, but I'm not 100% sure. Dec 15 23:58:03 bkboggy not sure what you mean. the new Youtube app is just Android with material design Dec 15 23:58:33 mattblang: it just has a feel of a mobile web app, rather than fully native... or am I off? Dec 15 23:59:17 bkboggy Youtube is definitely native. lol, would be pretty hilarious if GOogle used a non-native framework to make an official app Dec 15 23:59:23 bkboggy maybe the material design is throwing you off Dec 15 23:59:46 mattblang: perhaps... I really like it. What about Twitch? Not sure if you've used that one. Dec 15 23:59:55 bkboggy let me grab it real quick Dec 15 23:59:59 k Dec 16 00:00:12 bkboggy: which kind of "framework" are you referring to? media playing, or UI, or something else? Dec 16 00:00:21 Groxx: UI Dec 16 00:00:57 bkboggy yeah, those are both native. the material design is probably jsut throwing you off Dec 16 00:01:13 bkboggy one of the aims of material design is to unify the UI experience across Android, iOS, and web Dec 16 00:01:19 mattblang: Oh, thanks. It felt very web app like... like they used Phonegap with Ionic or something. Dec 16 00:01:20 yeah, it's just material, and some custom stuff like that floating preview when you hit 'back' while a video is playing. Dec 16 00:01:44 how can I clear the history stack on a crash? So that when the user tries to restart the app from the Recent Apps screen, it starts at the beginning? Dec 16 00:01:51 mattblang: Yeah, I really love the flat look... it's very slick. Dec 16 00:02:15 bkboggy yeah, I like the flat as well. the animations are super nice, gotta have Lollipop to see them though. They haven't backported them Dec 16 00:02:42 bkboggy the Twitch app is pretty simple actually Dec 16 00:02:49 s73v3r: try adding an "unhandled exception handler" that just calls System.exit() ? it's a bit yolo, but it might work. Dec 16 00:03:05 I think what threw me off the most was the fact that when I start up Twitch app again, it remembers the page I was on. That's not the behavior that was there in the old apps. It was always available with web apps. I guess they save the state now. Dec 16 00:03:45 bkboggy maybe it used to be a hybrid? not sure Dec 16 00:03:50 bkboggy that is typical behavior for an Android app Dec 16 00:03:58 mattblang: hmm, not sure Dec 16 00:04:04 bkboggy: that's pretty easy, actually Dec 16 00:04:25 bkboggy hybrid meaning a webview displaying HTML5, and some hooks into native functionality Dec 16 00:04:27 Groxx: Oh, I don't doubt that. It's just not the behavior I've seen from native apps. Dec 16 00:04:35 mattblang: Yep, that's what I'm going for. Dec 16 00:05:04 bkboggy oh, you meant that if you kill it and restart it remembers where you were? Dec 16 00:05:15 mattblang: I tried replicate Twitch app feel using jQuery mobile through phonegap shell, but that framework doesn't offer that feel, I might try Ionic next. Dec 16 00:05:21 mattblang: Yep Dec 16 00:05:40 bkboggy if you are still around when you do Ionic, let me know how it goes Dec 16 00:06:14 most definitely, I'll probably become a frequent visitor of this channel... migrating into app development from WPF enterprise space Dec 16 00:06:56 I love WPF to death... but everything is app this and that, so I need to learn it Dec 16 00:07:27 bkboggy cool! welcome. this IRC is definitely the best I've frequented. people are almost as nice as #java (that is a joke, that you woudl get if you've ever been to #java) Dec 16 00:07:55 mattblang: lol, I know exactly what you mean, when I read the first part of that sentence I was about to argue that, lol Dec 16 00:08:41 I think they're one of the reasons I delayed getting into Android for a while... I had a go at it about a year ago and was treated... "well" Dec 16 00:08:43 bkboggy never done any WPF stuff myself, or .net anything for that matter Dec 16 00:09:01 bkboggy man, they are complete aholes. I refuse to go there anymore Dec 16 00:09:08 mattblang: heh Dec 16 00:09:39 Groxx: System.exit() didn’t work. It’s still opening an intermediate activity instead of restarting Dec 16 00:09:42 bkboggy so are you considering again native development, or definitely going the phonegap solution? Dec 16 00:09:45 mattblang: WPF is neat, it's a shame Mono project will never adopt it (well, at least that's what they're saying right now) Dec 16 00:10:23 bkboggy does Mono matter anymore with the official change to open source? Dec 16 00:10:27 mattblang: probably both.. I think hybrid would be a nice way to ease into it, but if I need more functionality, it's hard to compete with native Dec 16 00:10:29 s73v3r: tbh that's surprising. are you sure that line is getting hit? Dec 16 00:10:54 mattblang: Oh yeah, very much so. Mono is being used for everything, from mobile development to Unity game development Dec 16 00:11:07 s73v3r: I wouldn't be too surprised if it quit the app + if you resumed, it resumed where it was. but it should unambiguously kill the app, unless I'm misunderstanding something about it. Dec 16 00:11:10 Groxx: I’ll double check, but I know it broke in the uncaught exception handler Dec 16 00:11:20 is mono used in Unity game development? Dec 16 00:11:26 barbs: yes Dec 16 00:11:35 It resumes in the activity before the activity where i invoke the crash Dec 16 00:11:36 cool Dec 16 00:11:45 barbs: If you opt to use C# over Javascript, you use Monodevelop Dec 16 00:11:50 well, maybe mono will support it eventually, now that MS is open-sourcing so much .NET stuff Dec 16 00:11:53 barbs, bkboggy interesting. this is definitely getting into foreign territory for me. i have wondered, how is the open source move going to affect the .net world? Dec 16 00:12:41 mattblang: MS realized that they can't be close-minded any longer, they're leaving apple in dust... they just released a public version of their professional edition for visual studio Dec 16 00:12:57 the new compiler is fully written in C# and is completely open source Dec 16 00:13:21 the days of closed doors are fading away Dec 16 00:13:25 bkboggy I find myself kind of rooting for Microsoft these days, Visual Studio has always been superb and I hear the new mobile tools are pretty awesome Dec 16 00:13:53 mattblang: Same here. I use that thing for so many things. I even use it for Arduino development. Dec 16 00:14:25 Yeah, it’s definitely hitting the System.exit() line Dec 16 00:14:37 errr, System.exit(-1); line Dec 16 00:14:39 now if Apple decides one day not to charge people for developing on their platform, that would be nice Dec 16 00:14:48 the heavy open-sourcing is pretty much the only reason I'm even remotely interested in .NET, fwiw. closed ecosystem = doomed in a few years, usually. Dec 16 00:15:12 bkboggy haha, yeah, just bought a Mini and learning Swift for a side project contract. They got me, curse you Appleee! Dec 16 00:15:14 Groxx ..... Dec 16 00:15:30 like how sun open-sourced all of java? Dec 16 00:15:31 oh, wait.. Dec 16 00:15:39 Groxx: well, .NET has been strong for over 10 years now and I know very few people that can dispute its strength as a solid framework Dec 16 00:15:49 mah, this snackbar library only allows one action ! wth Dec 16 00:16:04 Groxx don't underestimate .net in the enterprise world Dec 16 00:16:04 Edittext in listview row loses focus when you enter text, anyone know why? Dec 16 00:16:06 yeah, .net has been surviving pretty well. Dec 16 00:16:12 g00s: fork Dec 16 00:16:26 no, im not maintaining code Dec 16 00:16:29 clr >>>>>>>>>>>>>>>>>>>> jcm Dec 16 00:16:31 *jvm Dec 16 00:16:40 mattblang: I feel you... I swore I'd never buy an apple... guess what my developer laptop is for when I'm out in the field? freaking MacBook Pro 15 Retina... running Windows 7.... Dec 16 00:16:50 I'm not - it's huge. but without a healthy mono-like project you're still dependent on MS's support (which is historically very good, but still) Dec 16 00:16:59 bkboggy haha Dec 16 00:17:16 solid machine Dec 16 00:17:37 We are a Spring shop where I do Android dev. My coworker and I trying to find a project that we can convince management to let us do in Node Dec 16 00:17:43 "dependent on MS's support" is often a big selling point for businesses, but not individual devs who can't afford to pay for support when it's needed :) Dec 16 00:18:06 Also when MS decided to change directions every couple years Dec 16 00:18:17 mattblang: I almost cried when I tried Lenovo T440s... such garbage. IBM should kick Lenovo in their nuts. Dec 16 00:18:30 similar to how Oracle is ginormous, but I wouldn't ever touch the stuff if I can avoid it Dec 16 00:19:09 One thing I wish MS would do as well as Oracle is documentation... the two libraries are like day and night. Dec 16 00:19:36 headed out from work, y'all have a good one! Dec 16 00:19:40 If you want best practices in your code, MSDN is not going to cut it half the time.. Dec 16 00:19:45 mattblang: take care! Dec 16 00:20:33 bkboggy: heh. Android could probably stand to learn from MS still Dec 16 00:21:08 day vs night vs buried 6 feet under and is unaware of the day/night phase Dec 16 00:21:18 Groxx: Oh... Android could stand to learn from anyone... very sketchy documentation. However... it's probably a pain to maintain it, considering they're evolving so rapidly. Dec 16 00:21:55 yeah. therefore it should be shoved onto the 1000x more developers who work with it :) Dec 16 00:21:56 Heck, people claimed it wouldn't survive its infancy phase, yet now it's leading. Dec 16 00:22:21 Groxx: I agree... with Google's wallet size, I'm sure they could manage it. Dec 16 00:23:00 culture prevents wallet from making android better Dec 16 00:23:00 They just acquired that rocket hangar/field from USAF? I think that's who it was, not 100% sure. Dec 16 00:23:37 or was it NASA Dec 16 00:23:53 nasa Dec 16 00:24:01 Yep, NASA: http://www.theverge.com/2014/11/10/7190057/nasa-leases-moffett-airfield-to-google-60-years Dec 16 00:24:30 alright fellas, I'm going to check out Ionic, be back in a bit, pleasure meeting you all Dec 16 00:24:32 yeah. w00t hangar one Dec 16 00:31:30 thoughts on this? a tablelayout with stretchColumns doesn't play nice with a tablerow with dividers, the sum of the width of the dividers is cut off from the end of the last view, example: https://s3.amazonaws.com/f.cl.ly/items/3q3C2l1I0y0v0t3s1a27/Image%202014-12-15%20at%205.42.38%20PM.png Dec 16 00:32:45 Why does an AbsoluteSizeSpan take an int while TextView.setTextSize takes a float? Dec 16 00:34:17 JacobTabak: that's rather facepalm-inducing. Dec 16 00:34:25 indeed Dec 16 00:34:26 :( Dec 16 00:35:20 TacticalJoke, because setTextSize takes sp Dec 16 00:35:27 and fractional sp makes sense Dec 16 00:36:07 pfn: What I want to do is set the text size with a span, loading from a resource that's in sp (e.g., "getResources().getDimension(R.dimen.comment_header_text_size);"). Is that possible? Dec 16 00:36:24 getDimensionPixelSize Dec 16 00:36:39 come on, you should know to read the apidocs for that :p Dec 16 00:36:45 safe to assume you're talking to someone other than me pfn? Dec 16 00:36:46 Yeah, but that gives the wrong value. Dec 16 00:37:07 The sp values is this: 9sp. Dec 16 00:37:19 what do you mean it gives you the wrong size Dec 16 00:37:24 getDimensionPixelSize returns 14. getDimension returns 13.5. Dec 16 00:37:35 Wouldn't I need 13.5? Dec 16 00:37:48 are you talking to me Dec 16 00:38:43 JacobTabak, do you ignore people or something? Dec 16 00:38:53 yea :\ Dec 16 00:38:57 I see Dec 16 00:38:59 TacticalJoke: DisplayMetrics.scaledDensity * getDimension ? http://developer.android.com/reference/android/util/DisplayMetrics.html#scaledDensity Dec 16 00:39:14 its frustrating though maybe i'll delete them Dec 16 00:39:18 hate not knowing if someones talking to me Dec 16 00:39:51 Groxx: The issue is that AbsoluteSizeSpan takes an int. I need it to take a float. :[ Dec 16 00:40:07 TacticalJoke, the fractional pixel only makes sense for subpixel rendering, which doesn't matter for you anyway Dec 16 00:40:09 okkk ignore list is cleared \o/ hi everyone Dec 16 00:40:43 pfn: The thing is, getDimensionPixelOffset returns 13, getDimension returns 13.5, and getDimensionPixelSize returns 14. Which would I need? Dec 16 00:40:47 The text size is 9sp. Dec 16 00:41:06 hi TacticalJoke :D Dec 16 00:41:20 TacticalJoke, well, it's pixels, and they're effectively indivisible Dec 16 00:41:23 A wild JacobTabak appears. Dec 16 00:42:15 what are you working on these days tj Dec 16 00:42:31 oh gawd ... don't ask that he'll take three hours explaining it Dec 16 00:42:42 a reddit client Dec 16 00:42:43 :p Dec 16 00:42:44 i need to catch up on all i've been missing Dec 16 00:42:44 how hard is that Dec 16 00:43:07 screenshots TJ? Dec 16 00:43:37 I posted one earlier, but it's kinda ugly so far: http://i.imgur.com/mvuBIJY.png Dec 16 00:43:52 gets the job done Dec 16 00:44:07 pfn: So would 13, 13.5, and 14 all produce the same text size? Dec 16 00:44:18 no, 13 isn't 14 Dec 16 00:44:22 lol Dec 16 00:44:23 but if you round 13.5 it's 14 Dec 16 00:45:00 tj if something should have a non-zero size, use offset, otherwise, use size Dec 16 00:45:28 JacobTabak: The problem is that TextView.setTextSize takes a float but AbsoluteSizeSpan takes an int. Dec 16 00:45:35 how is that a problem Dec 16 00:45:38 do you read the docs? Dec 16 00:45:44 I have a value of 9sp, which getDimension reads as 13.5 pixels. Dec 16 00:45:51 it doesnt matter which you use Dec 16 00:45:56 end of story Dec 16 00:46:05 one rounds up the other rounds down Dec 16 00:46:10 getDimensionPixelSize returns 13 and getDimensionPixelOffset returns 14. Dec 16 00:46:30 pfn my problem is i always take the bait Dec 16 00:46:34 i can't resist it Dec 16 00:46:47 Sigh. Dec 16 00:46:57 JacobTabak: I will ignore you if you start this bullshit again. Dec 16 00:47:05 Only thing I'll say about that. Dec 16 00:47:19 hey TacticalJoke how do you get that period format? Dec 16 00:47:24 like 1 hour, 56 mins ago Dec 16 00:47:36 which lib is that? Dec 16 00:47:47 or are you formatting it yourself Dec 16 00:47:58 It's not a lib. It's some (simple) code. But it's a hack right now because it's not accurate for months or more (I'll have to switch to Joda-Time or something). Dec 16 00:48:08 prettytime is pretty nice too Dec 16 00:48:22 I also need to show "1 pt" instead of "1 pts". Just haven't gotten around to it yet. Dec 16 00:48:34 you know how to do that using resources right? Dec 16 00:48:37 Yeah. Dec 16 00:48:48 k just wanna make sure you werent gonna roll your own :P Dec 16 00:48:58 TacticalJoke: fwiw I Math.ceil fractional pixels for things like this, since (I assume) the sub-pixel rendering of text could extend into the fraction of a pixel. Dec 16 00:49:22 pfn: Ohh. setTextSize assumes sp units. I see what you mean now. Dec 16 00:49:30 that's what I said Dec 16 00:49:32 read them docs Dec 16 00:49:37 yeah that's such an annoying "feature" Dec 16 00:49:45 i've never wanted to set text size to SPs programmatically Dec 16 00:49:46 not once Dec 16 00:49:52 Yeah, it's a strange thing to do. Dec 16 00:51:35 you prefer DPs for text in code? Dec 16 00:51:48 px usually Dec 16 00:51:55 because getDimension() returns pixels Dec 16 00:52:18 ie getDimen(R.dimen.large_size) Dec 16 01:03:05 it seems like when i debug platform code (like TableLayout.java) the debugger is off by a few lines... any hints on how to fix? Dec 16 01:03:09 Okay, in this case, "whateverTextView.getTextSize();" returns 14.0, which is the float version of what Resources.getDimensionPixelSize returns. Dec 16 01:03:19 Note that this is why I was confused -- getTextSize returns pixels! Dec 16 01:03:26 setTextSize takes sps. Dec 16 01:03:31 Unless you use the overload. Dec 16 01:06:28 JacobTabak: you likely have to hook up the source for the exact api it's running on. also: that still may not be enough, since carriers can modify things / pull patches from other branches. Dec 16 01:06:47 So am I right in thinking that the following two *must* produce exactly the same result: 1. heck, if they even add a comment like "// wtf" it'll throw the lines off Dec 16 01:07:15 well i mean Dec 16 01:07:25 oh i see Dec 16 01:07:36 i need to debug it on a device running the target api version Dec 16 01:08:23 that might work. otherwise, you can (usually) change the debugger-source-attachment, just point it at the version that matches the device (and download the sources-for-sdk for that version, if you haven't) Dec 16 01:08:34 how do you do this Dec 16 01:08:37 change the debugger-source-attachment Dec 16 01:08:39 in android studio Dec 16 01:08:44 i think it just uses the source for the target api Dec 16 01:08:45 will check. I've done it in eclipse at lesat Dec 16 01:09:02 i mean its nbd, if it works on the target api tahts fine, ill just change my emulator version while debugging Dec 16 01:10:03 grr not hitting my breakpoints Dec 16 01:11:02 weird, was hitting them (albeit in the wrong place) on api 16 targeting 21, not hitting them at all on a nexus 5 running lollipop Dec 16 01:11:16 I'm confused about this subpixel-rendering thing. I notice that Paint has a getTextSize method which returns a *float*, not an int. When would a float be required instead of an int? Does TextView support subpixel rendering? Dec 16 01:12:57 yeah, time for you to research all the subtleties now Dec 16 01:13:07 and the answer is yes Dec 16 01:13:45 Hmm. Why does AbsoluteSizeSpan take an int and not a float? Dec 16 01:14:23 JacobTabak: hm. can't find it :| score another +1 for Eclipse Dec 16 01:14:28 because the authors of it didn't give a shit about subpixel rendering for it? Dec 16 01:15:31 Okay. Is there any case where would lead to a different text-size value than what getDimensionPixelSize(R.dimen.foo) would return? Dec 16 01:16:51 My only goal is to match what achieves, using AbsoluteTextSize. Dec 16 01:16:58 Oops, AbsoluteSizeSpan. Dec 16 01:17:37 TacticalJoke: dunno. check the source? if both set their textsize the same way, it's probably always the same. Dec 16 01:18:00 not that I expect that to be _easy_, but I dunno where else you'd find that info Dec 16 01:19:12 Yeah, I had a look. Kinda complicated. Hmm. Dec 16 01:19:41 It involves interpreting stuff such as "(data>>COMPLEX_UNIT_SHIFT)&COMPLEX_UNIT_MASK". Dec 16 01:19:43 yeah, textview is not one of the simpler ones. Dec 16 01:21:18 absolutesizespan lol really Dec 16 01:21:22 2 constructors Dec 16 01:21:27 one takes pixels, one takes DP Dec 16 01:21:35 why wouldn't it use SP Dec 16 01:22:06 because (╯°□°)╯︵ ds Dec 16 01:22:52 So far, I can't get the values to differ. Even if I define the dimen as something like "9.25sp", getTextSize still returns 14.0 (or whatever). Dec 16 01:23:21 And getDimensionPixelSize returns 14 for that same dimen Dec 16 01:23:22 . Dec 16 01:23:23 is it on a hdpi device? Dec 16 01:23:50 To be honest, I don't know for sure. This density stuff is my weakness. Dec 16 01:23:58 9.25*1.5= Dec 16 01:24:24 TacticalJoke: http://cl.ly/063t2H1U0t0M Dec 16 01:24:35 This phone has a 4" screen with resolution 480 x 854. Dec 16 01:24:46 lol graphitemaster Dec 16 01:24:47 Groxx* Dec 16 01:25:24 try a few l/m/h/xh/xxh/xxxh/xxxxh/tv-DPI emulators? Dec 16 01:25:27 you have density multipliers, mdpi = 1,hdpi =1.5 etc Dec 16 01:25:36 it'll only take like 5 hours for them to boot Dec 16 01:28:37 My only goal was to optimize my layout by converting a LinearLayout with two TextViews into one TextView. lol Dec 16 01:28:54 The issue being that they have a different textSize set in XML. Dec 16 01:32:11 My scaledDensity on my phone is 1.5, and yet getTextSize and getDimensionPixelSize seem always to return the same value. Dec 16 01:32:26 Hopefully that means that getDimensionPixelSize is the solution. Dec 16 01:33:15 Maybe setTextSize doesn't support subpixel rendering? Dec 16 01:36:56 9sp on a mdpi device should stay 9px, 9sp on a hdpi device should be 13px, xhdpi should be 18px. but guess sp also has factor of user set font sizes, but dont see how thatd be an issue Dec 16 01:39:25 whatitis-: Do you think I can rely on the assumption that doing [ my math was off, hdpi should be 9+4.5=13.5, so if returns int probably round up Dec 16 01:40:36 you should rely on what the docs tell you about what the methods of getting resource dimensions do Dec 16 01:42:19 just read up on how sp and dp are converted to px Dec 16 01:43:23 mdpi is baseline 1, so if your device is hdpi its at a multiplier of 1.5, so itll take your sp/dp and multiply by the density to get pixels Dec 16 01:46:08 Okay, this is interesting. If I define a TextView in XML with [android:textSize="17.5sp"], when I call TextView.getTextSize at run-time, I see 26.0. But if I set the text size at run-time ([setTextSize(TypedValue.COMPLEX_UNIT_SP, 17.5f);]), TextView.getTextSize returns 26.25! Dec 16 01:46:28 So it seems that the XML element doesn't allow subpixel stuff. Dec 16 01:47:10 Any theories on why that is? Dec 16 01:48:21 if you look at TextView.java you can see that the constructor uses getDimensionPixelSize Dec 16 01:49:11 https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/TextView.java line 708 Dec 16 01:50:13 Aha. Dec 16 01:50:15 Thanks, JacobTabak. Dec 16 01:50:36 Totally solves my issue. :) Dec 16 01:50:40 well there ya go Dec 16 01:51:11 any time you see an xml attribute you can find out how it's used in the source code Dec 16 01:51:16 i mean, of course that's obvious Dec 16 01:51:21 but its more accessible than you might think Dec 16 01:51:46 Right. Didn't know they just used the constructor, but it makes sense. Dec 16 01:51:55 I kinda assumed that setTextSize was being magically called. Dec 16 01:52:23 There is no magic in this world Dec 16 01:52:28 * gman23 broods Dec 16 01:52:45 Hmm. I do wonder, though, why they use getDimensionPixelSize rather than getDimension. Dec 16 01:53:35 You can also modify xml attributes on the fly Dec 16 01:53:41 in code Dec 16 01:54:26 That textSize value (an int) is passed to setRawTextSize(float). Weird. Dec 16 01:54:46 gman23: How is that done? Just curious. Dec 16 01:56:31 Depending on what kind of thing it is heh heh... Dec 16 01:56:58 You can get a Layout's LayoutParams, for example Dec 16 01:57:07 TacticalJoke it's probably for consistency Dec 16 01:57:26 Consistency with AbsoluteSizeSpan? Dec 16 01:57:39 no, consistency because textview takes an int for text size Dec 16 01:58:06 gman23 thats not exactly doing what you said Dec 16 01:58:08 :) Dec 16 01:58:18 Yes, thank you StingRay_ Dec 16 01:58:20 Hmm. setTextSize takes a float and "android:textSize" is defined as being a floating point value. Dec 16 01:58:32 That's why I said "heh heh" because I'm a bit embarrassed at how much I oversold it Dec 16 01:58:57 :) Dec 16 01:59:06 oh right TacticalJoke my mistake Dec 16 01:59:08 JakeWharton if i'm reading this right, to use rxjava in kotlin, you don't need ReactiveX/RxKotlin? Dec 16 01:59:10 maybe for INconsistency then Dec 16 01:59:14 :D Dec 16 01:59:21 That sounds like Android to me. Dec 16 01:59:27 g00s: i wouldn't think so Dec 16 01:59:33 thx Dec 16 01:59:42 never tried. it's just language specific bindings and I know they're very small. Dec 16 01:59:51 ok Dec 16 02:43:33 hey guys Dec 16 02:43:38 just for anyoen interested Dec 16 02:43:44 I got the play store working Dec 16 02:43:47 but only on 4.3 Dec 16 02:43:57 anything beyond there says it fails to communicate with the google servers Dec 16 02:46:28 how important is naming your package something stupid. I just named it some random thing I came up with, and now that there are downloads, i'd like to switch it before it becomes an issue. But would it become an issue for any reason? I can't really think of any. Is there anything im forgetting as to why good package naming is important? Dec 16 02:46:51 Does anyone think the implementation of RecyclerView.Adapter with ViewHolder is...annoying? Dec 16 02:47:11 There is just so much setup Dec 16 02:48:29 bilb_ono: If you change package name after uploading, you create a whole new listing for your app, I think. Dec 16 02:48:42 It's like uploading a whole new app, if I'm not mistaken. Dec 16 02:51:23 Good package naming is of course important because your package name is part of the (public) URL of your app's page. The package name is also presented to the user on Android itself (when they go to uninstall the app, for example). Dec 16 02:51:52 TacticalJoke, yeah thats what I want to avoid. but right now its call com.snappiesticker.frontcam. idk if frontcam (which isn't a very descriptive name or anything) is gonna cause issues in the future Dec 16 02:52:14 bilb_ono: Just a thought -- shouldn't we have been having this conversation *before* you uploaded anything? Dec 16 02:52:42 TacticalJoke, haha yeah well if this is the only mistake Im making, Im gonna be shocked anyways Dec 16 02:52:53 "Once you publish your application under its manifest package name, this is the unique identity of the application forever more. Switching to a different name results in an entirely new application, one that can’t be installed as an update to the existing application." Dec 16 02:52:56 http://android-developers.blogspot.co.uk/2011/06/things-that-cannot-change.html Dec 16 02:53:06 shucks Dec 16 02:53:07 tbh I don't think anyone really looks at the package name. if you own snappiesticker.com then nobody else should be making _anything_ with that prefix, so you should be fine. there are plenty of weird package names for apps out there. Dec 16 02:53:20 You can change package name, I think. Dec 16 02:53:32 It's just that it creates a new app listing. Dec 16 02:54:01 and then I would loose all my current subscribers though Dec 16 02:54:09 all 100 of them. haha Dec 16 02:54:10 Yeah, I think so. Dec 16 02:54:34 Do you own snappiesticker.com? Just curious. Dec 16 02:54:43 TacticalJoke, yeah Dec 16 02:54:54 What is it about the current name that you dislike? Dec 16 02:54:54 so do the current users of the app get the update if I keep the same name? Dec 16 02:55:01 Yeah, they should. Dec 16 02:55:01 I don't like the frontcam part Dec 16 02:55:10 it should just be app Dec 16 02:55:19 I mean yeah its not a huge deal I guess Dec 16 02:55:34 I get "Not Found" on https://play.google.com/store/apps/details?id=com.snappiesticker.frontcam Dec 16 02:56:05 u sure? it resolves for me Dec 16 02:56:36 Yeah, getting a consistent "Not Found". Dec 16 02:56:48 Did you try Ctrl+Shift+R-ing? Dec 16 02:56:53 (Full-refreshing.) Dec 16 02:57:35 yeah. weird Dec 16 02:57:39 not found here as well Dec 16 02:57:57 hmm yeah ok thanks guys. somethings amiss Dec 16 02:58:00 ill check it out Dec 16 02:58:07 Maybe the Play Store renamed it for you. :D Dec 16 02:58:17 haha that would be nice of them Dec 16 02:58:18 "Nobody would want to call their app 'frontcam' anyway." Dec 16 02:58:34 Kidding aside, I don't really think it sounds like a big deal. Dec 16 02:58:48 Some apps have weird package names. Check it out on Google Play when you browse stuff. Dec 16 02:58:49 ok thanks. Ill probably just keep it frontcam Dec 16 02:59:11 Since you own that domain name, I agree with what graphitemaster said: it shouldn't matter. Dec 16 02:59:14 Groxx* Dec 16 02:59:23 I keep pinging that other guy. lol **** ENDING LOGGING AT Tue Dec 16 02:59:58 2014