**** BEGIN LOGGING AT Wed May 06 02:59:58 2015 May 06 03:00:09 CedricBeust: I'll have to keep that in mind May 06 03:00:31 CedricBeust: majority of the reflection I do is `newInstance` calls for the little DI i made May 06 03:01:33 a little bit of reflection really isn't going to. bog down performance May 06 03:01:57 newInstance is negligible compared to a constructor call, so it's ok May 06 03:03:41 especially at the scale i'm using it May 06 03:15:51 burntcookie90: Probably ok at your scale but again, keep in mind that whenever you do that, you are disrespecting your users. You can do better :) May 06 03:26:04 that is quite an extreme stance May 06 03:26:31 layout inflation is an example of heavy use of reflection May 06 03:27:20 so is it disrespecting your users to use xml layouts May 06 03:28:59 All reflections are expensive. Some is avoidable, some is not. Avoid the one that's avoidable. May 06 03:29:51 Android performance is already hard enough as it is, there's no excuse not to pick up the low hanging fruits, there are enough high hanging fruits. May 06 03:38:19 Is it uncommon that, we may make a bad update app release, which causes numerous crashes report received. What I usually do is immediately "unpublish" the app. However, I realize, "unpublish" app will only make new user unable to find my app. I still cannot prevent existing users, from receiving upgraded version of bad app. How can I prevent existing user from receiving bad app update, temporary? May 06 03:39:33 upload the previous version as a new version May 06 04:44:07 http://www.fiercedeveloper.com/story/report-43-percent-enterprises-say-mobile-apps-are-top-priority/2015-05-01 May 06 04:44:09 Hello, I'm trying to get image from gallery but result code is always -1. where could be a problem http://paste.ubuntu.com/10994741/ May 06 04:52:59 <_genuser_> ugh dependency injection. why do people keep creating new terms and then start using them as if they mean something? May 06 04:53:39 _genuser_: What's the old term for it? May 06 04:55:06 I am trying to get a Color that is seeded from a String (i.e. a given String always produces the same Color). I have `int i = myString.hashCode(); int color = Color.parseColor("#" + Integer.toHexString((i >> 16) & 0xFF) + Integer.toHexString((i >> 8) & 0xFF) + Integer.toHexString(i & 0xFF));` but if myString is too short it returns less than 6 hex chars and hence crashes (invalid color string). What is an alternative that will May 06 04:55:06 work no matter how long myString is? May 06 04:55:43 <_genuser_> CedricBeust: I think it's kinda useful, tbh. It's just that a lot of these thing start describing a way of doing things - but then become buzzwords people latch onto and start using to promote their own codebases/frameworks that have nothing to do with the originally method necessarily. May 06 04:56:37 duncannz: myString.hashCode? May 06 04:56:43 There have been a lot of buzzwords to describe this, a lot of them mystifyingly meaningless ("inversion of control", "holywood principle", etc...). DI is actually very descriptive and right on target IMO May 06 04:57:27 <_genuser_> CedricBeust: exactly what I mean, inversion of control, etc. etc. martin fowlers need a new book and they rename an existing principle and publish it. he does that quite a bit. May 06 04:57:33 Even the FP people still don't understand what DI means and they think the Reader monad is a good implementation of it (it might be good but it's no dependency injection, it's dependency passing) May 06 04:57:42 descriptive is definitely nice May 06 04:58:25 I find "dependency injection" pretty unambiguous. "inversion of control" implies there's a normal direction. May 06 04:58:27 <_genuser_> CedricBeust: dependency injection or dependency separation are descriptive enough. it's just that eventually they get business-ified and everyone's using them to describe what they wrote. May 06 04:58:41 canvs2321: if myString is only 1 letter long then the hashCode is 3 digits long, which doesn't produce enough hex digits for a valid Color.parseColor argument May 06 04:58:58 I need a fixed length hashCode or an always long enough hashCode to work with May 06 04:59:04 <_genuser_> never mind that even if most designed are loosely coupled from teh dependency, they're not tightly coupled to an interface. and changing the interface requires recompiled _everything_ that ever used that interface May 06 04:59:07 hashCode isn't relevant to your string passed hashing the text, it isn't related to what the value is for using as a color May 06 04:59:13 <_genuser_> s/not/now/ May 06 04:59:46 duncannz: use the hashcode as a seed to Random? May 06 04:59:51 <_genuser_> apparently I type with muscle memory and get all tenses wrong butchering the english language horribly. May 06 05:00:00 though that's not guaranteed either. May 06 05:00:15 duncannz: if you're getting a value of "3" or something, pad it out to "003"? May 06 05:00:30 groxx: hmm that sounds like a good idea. The other thing I was thinking is take the first six digits of myString's md5sum May 06 05:00:36 groxx: but why the hashCode, is the actual string of no value? May 06 05:00:37 but that's a little overkill May 06 05:00:45 duncannz: which could also be "0000", but yeah May 06 05:01:27 I might just do the md5 route actually because it will never give me 000000 or whatever and it is guaranteed length. performance isn't a concern in this but if it was I would go a different route May 06 05:01:29 unless you come up with an algorithm to never produce "X", you probably want to pad the results somehow. prefixing with 0 makes sense, and is still the same _value_, so it's still unique. May 06 05:01:41 md5 can absolutely give you 000000 May 06 05:01:49 duncannz: but I guess yes, if the actual string is not of importance, just make sure to pad your use of the hash to give it the minimum May 06 05:02:00 groxx: true but equal chance as anything else, so it's OK May 06 05:04:36 duncannz: are you trying to accomplish something similar to GMail where, if the Sender/Receivers name starts with X it gives you a color based on that to encompass a link between a String name and color? May 06 05:04:52 canvs2321: correct May 06 05:04:58 cool :) May 06 05:05:10 but not based on the first letter, based on the whole nickname (in my case) May 06 05:05:10 sorry had to figure out your end game May 06 05:05:15 i got ya May 06 05:05:18 :) May 06 05:05:46 so yes, padding is most likely what you are needing if a short String May 06 05:07:42 duncannz: speaking from personal experience: I'd recommend an explicit palette of colors that work reasonably well together. generating colors based on rand(red) + rand(green) + rand(blue) rarely looks good together. or there are a few algorithms out there to do a mostly good job. May 06 05:07:53 But I guess padding can be a bit guided towards a green/blue value May 06 05:08:12 Hello, I'm trying to get image from gallery but result code is always -1. where could be a problem http://paste.ubuntu.com/10994741/ May 06 05:08:19 so you'll have to mix up an algorithm to spread the spectrum across the RGB May 06 05:08:52 groxx: that does sound like a good call, but I'd need a lot of colours. To give context, the colours identify each different person in a potentially large group chat. So they shouldn't ever be the same, ideally May 06 05:08:57 slani: -1 seems like a default value for error, google it May 06 05:09:19 canvs2321: i know. May 06 05:09:33 and...? what has shown you otherwise? May 06 05:09:43 duncannz: you can't guarantee that they're human-distinguishable when you don't have a limit to the number of colors. there's got to be a limit somewhere, or you've got to give up consistent coloring (same contact == same color, always). May 06 05:11:00 some handy links, btw: http://www.betaversion.org/~stefano/linotype/news/108/ May 06 05:11:22 duncannz: on what groxx is suggesting, creating a palette would be ideal, to keep colors in your theme. Can create a decent palette of default to keep a great user base in your scope May 06 05:11:31 so they are aming for 2016-09-22 Java 9 availability May 06 05:12:15 g00s: that's like saying i'll quit smoking tomorrow. Gotta live for today :) May 06 05:12:35 groxx: sorry that doesn't make sense to me. If I were to go ahead and take the first six hex digits of the nickname's md5, then the colours should be random enough that they will mostly be human-distinguishable, right? May 06 05:12:51 canvs2321 lol that logic doesn't make sense :D May 06 05:12:52 I do see the argument for a palette of good looking colours though May 06 05:13:15 duncannz: gotta remember your apps theme, keeping a wide open 100% 0-100 color spectrum can't be good May 06 05:13:17 duncannz: nah. separated by whitespace, 123456 and 123457 are the same. May 06 05:13:58 g00s: how doesn't it? Being excited about Java 9 now doesn't make sense :) May 06 05:14:01 you can really only generate a hundred or so before you can't tell them apart easily May 06 05:14:28 (in general, when they're not right next to each other. some people are more sensitive / trained than others, and some are colorblind, so it all balances out) May 06 05:14:32 g00s: for what it's worth, tomorrow never comes :P May 06 05:15:10 groxx: yes but md5 is highly unlikely to generate a first six chars that are almost the same May 06 05:15:25 you may be surprised May 06 05:15:58 and it doesn't matter that they're _different_, it matters that they're _close_. what are the odds that you get anything within about 10% of the same color for each value? May 06 05:16:03 duncannz: just don't worry about having 1000 users with 1000 different nicks needing 1000 different colors. Have a compromise May 06 05:16:31 add to that the birthday paradox, and it doesn't take long before you have visible-duplicates May 06 05:17:16 duncannz: the main thing is don't think so huge/unique as groxx is saying. Keep it small, keep it managable and usable May 06 05:18:39 by "not long" I mean "low double-digits". you're likely _worse_ with rand() than you are with something a bit more clever / a hand-rolled palette. May 06 05:18:45 maybe create buckets of space for colors May 06 05:20:22 if thinking in large scopes it seems you'd run out of colors for unlimited users, such as IPv4 is running outta IPs :) May 06 05:25:26 hi all! May 06 05:28:35 wow May 06 05:29:13 I can't find why resultCode == -1 May 06 05:38:46 singular or plural for database tables ? :D May 06 05:41:58 groxx have you used action modes & appcompat outside listview / gridview ? May 06 05:42:32 I've used neither of the former, and I hate both of the later :) May 06 05:42:43 lol May 06 05:42:57 i keep wondering if action modes is here to stay , or if they will be deprecated May 06 05:43:38 * groxx can barely resist correcting "later" to "latter", but manages to not type it out. whew. close one there. May 06 05:44:31 I kinda think they'll stay. the action-mode-bar has some significant advantages over inline controls. May 06 05:44:36 :D May 06 05:44:41 ohhhhh May 06 05:48:15 don't worry groxx, i hate both of the later too May 06 05:53:36 hm, DrawableCompat heh May 06 05:53:46 Compat this, Compat that ! May 06 05:54:03 then prefix everything with m - code size doubles :) May 06 06:01:31 hello android 4e is out, could be good for beginners May 06 06:02:23 what is a 4e? May 06 06:02:29 4th edition May 06 06:02:44 ah May 06 06:09:08 I have a chat interface and it was easy enough to get it to autoscroll when there is a new message (android:transcriptMode="alwaysScroll"). However this is frustrating if the user has scrolled up to read previous messages. So what I want it to do instead is autoscroll if the user is already at the bottom, otherwise vibrate. Anyone know a good way to do this? May 06 06:11:10 g00s, it's out? says release date is may 25th May 06 06:11:47 hm, you can add it to cart http://shop.oreilly.com/product/9781680500370.do May 06 06:12:08 actually better to check pragprog web site May 06 06:12:59 ooo "available in beta" May 06 06:23:54 duncannz: only by hand :| I haven't found a non-trivial way to do that either, though you can do it pretty smoothly if you're careful. May 06 06:53:48 <_genuser_> do you guys have any motivation type apps you use? May 06 06:54:10 <_genuser_> maybe pointers... May 06 06:54:41 <_genuser_> for example, you're speaking in public, you can have a few points punched in, and just scroll thru them before you have to give a speech. May 06 06:55:06 like, "quit procrastinating and do something"? I sometimes use Self Loathing™. May 06 06:55:30 <_genuser_> is that an app, or are you use capitalizing a trait..? May 06 06:56:08 <_genuser_> groxx: public speaking jitters, or maybe even going to a meeting and having notes jotted in. let's say 10 points. you can just open your "notes" and swipe thru each one while speaking. May 06 06:56:14 _genuser_ http://www.despair.com/demotivation.html May 06 06:57:05 <_genuser_> heh, I remember that site from years ago. my co-workers was big on it. May 06 06:57:12 <_genuser_> well her husband was, and she was just into whatever he was into. May 06 06:57:29 <_genuser_> g00s: anyway, a reminder sort of app that can remind you of x points. May 06 06:57:43 _genuser_ index cards :D May 06 06:57:58 <_genuser_> Pwnies: is that an app, are you are talking about index cards? May 06 06:58:08 i'm talking about just index cards May 06 06:58:23 <_genuser_> I"m looking for an app where I can punch in points and just review them when needed. May 06 06:58:38 during your presentation? May 06 06:58:47 <_genuser_> speech, meeting, presentation, or what I did today: talking to a recruiter. I kinda want to have selling points short and concise in that case. May 06 06:59:11 <_genuser_> index cards are hard to re-use and carry with you everywhere. a phone... you have it anyway. May 06 06:59:24 <_genuser_> I don't want to write this app, I'm hoping there's one. I should search play store too. May 06 06:59:34 phones during interviews sound ehhhhh May 06 06:59:45 <_genuser_> recruiter interview over the phone. May 06 06:59:54 <_genuser_> for real interview, I'd turn it off and mug them up. May 06 07:00:36 heh. well any flashcard app on the store sounds like it'd do what you're looking for May 06 07:02:06 <_genuser_> yeah, I'm searching thru playstore now. there's TONS of them. that's why I thought it'd be better to see if anyone has a recommendation. May 06 07:02:49 i'd pick the one advertised May 06 07:02:55 thats probably the best :P May 06 07:03:24 the only app i've ever bought was "flashcard machine" May 06 07:03:28 i'd use that one May 06 07:03:39 <_genuser_> you mean the dudes with money to spend.. heh, that's a good idea. May 06 07:07:00 groxx: could you give me any hints as to where to start? I can't find anything on google (probably bad wording) and wouldn't know where to start as I haven't worked with ListViews much May 06 07:07:25 <_genuser_> duncannz: are you working on ListView and regular lists? May 06 07:07:48 _genuser_: not sure what a regular list is May 06 07:08:09 <_genuser_> if you see a list on a screen (of any type of item), that! May 06 07:08:25 yes I am working with a ListView May 06 07:09:38 duncannz: the only way I've done it is complex, and I'm hopping offline for the evening very soon. but... May 06 07:09:59 <_genuser_> don't worry thepoosh isn't here yet. May 06 07:10:34 <_genuser_> http://www.vogella.com/tutorials/AndroidListView/article.html May 06 07:10:50 duncannz: you can get the top most row and its distance in pixels from the top edge of the list pretty easily. after notifying of change, scroll to that position + offset. then animate a scroll to show the new item. May 06 07:10:51 <_genuser_> this guy will teach you all you wanna know about lists, listviews, adapter. to get started. May 06 07:11:27 duncannz: you can add a scroll listener to lv.getViewTreeObserver().addOnScrollChangedListener(), you should be able to use that to determine if the user is at the bottom of the list and toggle setTranscriptMode() accordingly (disclaimer: I've not tried this) May 06 07:12:17 doc_savage: instead of setting the transcript mode on and off I can list.scrollTo(0, list.getHeight()) according to SO May 06 07:13:32 duncannz: iirc list view even has a "smooth scroll to position" thing that'll do it pretty much automatically May 06 07:13:45 yeah I remember View.DOWN or something like that, I'll try find it May 06 07:14:30 * groxx is offline for the night \o May 06 07:14:41 cya groxx thanks for the help May 06 07:15:03 ah no that was for ScrollViews, scrollView.fullScroll(View.FOCUS_DOWN) will animate it to the bottom May 06 07:19:31 <_genuser_> argh, so hard to pick one app. so many May 06 07:19:50 <_genuser_> the entire productivity section if quite full or apps. and some of these people have really spent lot of time on. May 06 07:20:01 duncannz: is the problem that the ListView is scrolling to the bottom when a new message comes in after the user has scrolled up? May 06 07:20:36 doc_savage haven't seen you hear in many years ! May 06 07:20:40 doc_savage: correct May 06 07:20:41 lol, here May 06 07:21:01 Hi May 06 07:21:02 so I want it to automatically scroll if the user was already at the bottom, but otherwise just vibrate to let the user know they can scroll down May 06 07:21:19 hey g00s, it has been a long time, not played with Android in a while, trying to catch back up :) May 06 07:21:31 doc_savage what were you working in the meantime ? May 06 07:22:25 duncannz: so how I see it, the scroll listener sets a flag for if the user is at the bottom, and when they are at the bottom, enable autoScroll, when they scroll up, disable autoScroll, and use an observer on the adapter to do the vibration May 06 07:22:49 doc_savage: sounds good May 06 07:23:18 I'll do my best at following those steps and let you know if I get in trouble I guess? May 06 07:24:57 g00s: mostly desktop Java/PHP stuff, playing a little with Node.js too (but that's more for fun), trying to get my head around this material design atm May 06 07:25:34 yeah , all 50 pages of material :D May 06 07:25:49 "here are the specs, you're own your own :D" May 06 07:26:03 doc_savage did you do anything with react native ? May 06 07:26:11 no kidding, it's insane, I like the idea, but damn, I was hoping for nice APIs for floating buttons and what not May 06 07:27:12 g00s: I hadn't no, I wasn't aware of it tbh, looking now May 06 07:27:45 doc_savage well now is a good time to get back into it, with I/o in a few weeks we'll probably get some good news :) May 06 07:28:22 <_genuser_> can already tell you what you'll hear at the i/o. May 06 07:28:34 _genuser_ entertain me ! May 06 07:28:50 ooh? me too! May 06 07:29:05 <_genuser_> someone else registered a .io domain and came up with a catchy name like graze or blaze and will release another javascript framework that does pretty much the same thing the others do. May 06 07:29:10 <_genuser_> like blaze.io May 06 07:29:17 <_genuser_> firebase... oh wait that one alreayd exists May 06 07:29:33 <_genuser_> something.io basically. it's all the rage lately. May 06 07:30:03 _genuser_ well that doesn't sound so exciting then May 06 07:30:07 XD May 06 07:30:15 <_genuser_> then a bunch of college grads will fall over themselves to quickly learn this new framework and put on their resume. May 06 07:30:21 <_genuser_> and market themselves as "full stack devs" May 06 07:31:12 <_genuser_> g00s: exciting or not, that's kinda my perception of it. it could be that more people just go to cons and drink beer and make friends and extra frameworks is just a plus. May 06 07:31:53 _genuser_: why do I need to get a beep just because you think i', not here May 06 07:32:18 thepoosh what are your predictions for I/O ! May 06 07:32:19 <_genuser_> lol does it beep when someone says your name? May 06 07:32:30 g00s: internet of things May 06 07:32:32 <_genuser_> g00s: oh so mine are boring so you move to his predictions? May 06 07:32:35 yeah me too May 06 07:32:36 our CTO is going May 06 07:32:56 i think they will get into the home space at least May 06 07:33:26 <_genuser_> oh that's another one, Internet of Things. as if before this terms things weren't connected via the internet. May 06 07:33:58 thepoosh it will be interesting to see if google follows Apple into the health arena May 06 07:34:36 idk, they have watches and cars for the past 6 months May 06 07:34:53 i wonder how it would work out; health, your connected home, these are all very private things. i dont know if people would trust google with all that May 06 07:34:53 doc_savage: yay it works, thanks for your help May 06 07:35:04 g00s: the average person really doesn't care May 06 07:35:09 from my experience anyway May 06 07:35:24 the people i talk to do, but they tend to be older May 06 07:35:32 the fb generation might not May 06 07:36:13 this is pretty crazy http://kernelmag.dailydot.com/issue-sections/features-issue-sections/12765/everything-facebook-knows-about-you/ May 06 07:36:47 duncannz: no problem May 06 07:37:41 <_genuser_> unfortunately, I don't think that's the direction society is going. May 06 07:38:18 <_genuser_> it all starts with younger generation not being so worried about their privacy. and now we're already seeing a move to push even the older generation into it. May 06 07:38:22 g00s: I'm with you on that, I'm disliking Google more and more sadly, even setup OwnCloud so I have more control over my data May 06 07:38:46 <_genuser_> forced phone number collection, etc. etc. it's all the rage. May 06 07:38:58 <_genuser_> doc_savage: personal cloud at home? May 06 07:39:12 <_genuser_> oh, I see owncluod is a service. May 06 07:39:24 _genuser_: yeah, provides contacts, calendar and file sync over cal/card/webdav May 06 07:40:09 only downside is it doesn't support push messaging, part of the reason I was looking into node - hook in a simple push service that'll trigger a manual sync on the device May 06 07:40:52 <_genuser_> doc_savage: so you install it at home? I do'nt it as a hosted service May 06 07:41:08 you can do either, I have it hosted at home, but I believe there are providers online too May 06 07:41:14 doc_savage maybe also mqtt May 06 07:41:45 doc_savage http://andreim.net/2013/07/my-rabbitmq-setup-for-notifications/ May 06 07:41:59 <_genuser_> doc_savage: interesting. I thought maybe they'd host it themselves. but you'd have to find third party hosting service. May 06 07:43:18 g00s: that looks interesting, although my reading list is growing by the minute! :) May 06 07:43:26 :D May 06 07:48:17 _genuser_: yeah, I was suprised they didn't offer it as a service, they're missing out on some dollars there May 06 07:48:20 thepoosh also maybe ARA ? May 06 07:49:59 also maybe gass 2 May 06 07:50:04 glass 2 May 06 07:54:01 <_genuser_> g00s: glass 2? as in google glass 2? May 06 07:54:39 yeah, they are alreadyworking on glass 3 May 06 07:54:52 <_genuser_> oh wow, I thought the glass project was scrapped. May 06 07:55:10 personally, thats cool for industrial uses, but i don't like interacting with people wearing those May 06 07:55:51 hey guys, are recommendations for cross platform mobile dev SDK? or should i go native route? May 06 07:56:00 <_genuser_> I wouldn't either. I alreayd don't like it when people start taking picture and you're in them. May 06 07:56:34 murosai, if you like .net maybe try xamarin (but its commercial), else id just go native May 06 07:56:36 _genuser_ yeah, especially since they often get uploaded to whatever fb, service - and then facial recognition ... May 06 07:56:50 or use HTML5 if its possible May 06 07:58:10 <_genuser_> g00s: there is this lady at one of the churches I go to. In the middle of worship music, she starts walking about taking picture from all angles. May 06 07:58:26 yeah, i have been looking at xamarin, looks promising, too bad no linux ide May 06 07:58:34 <_genuser_> g00s: if I'm there, I have to basically look down the entire time hoping she'll finally sit down so I can actually look at the big screen with lyrics. May 06 07:59:10 _genuser_ thats obnoxious May 06 07:59:20 you are there to worship, not be on fucking instagram May 06 07:59:54 i'd find another place :) May 06 08:00:24 <_genuser_> g00s: my sis-in-law, I told her please do'nt upload any picture with me in it on fb. it was her wedding. she goes, I'll be honest with you, if I like it i'm gonna upload. May 06 08:00:51 <_genuser_> g00s: well, you already know this about me, so you should have told me before the wedding so I avoid any picture that are not absolutely necessary. May 06 08:01:08 _genuser_ so fb set up a shadow profile for you maybe :D May 06 08:01:51 <_genuser_> g00s: yeah family posts a few now and then. mostly I just tell them ahead of time, please don't post this online. if you must, I'll move out of the picture. May 06 08:02:26 <_genuser_> g00s: I have a fb account for my music tho. trying to get friends on that one just to promote whatever I push out. May 06 08:02:47 <_genuser_> g00s: and appanretly, you can't just send random friend requets. you have to know them. otherwise, people don't accept those requets anymore. May 06 08:04:18 in distopian future you'll be penalized for not having Fb account; or having one with bad friends May 06 08:04:39 for examples, getting insurance rates, loans, etc May 06 08:05:25 <_genuser_> g00s: you already pay more as males for auto insurance. while women cry about being paid less for the same job. you can discriminate but only if it's in fashion, lol. May 06 08:05:55 How do you get google maps to work on an emulator? I tried the google maps api, but it didn't work May 06 08:06:13 _genuser_ i saw a commercial for car insurance, they were trying to sell the black boxes as "you shouldn't be lumped in with the averages, let us reward you" May 06 08:06:23 <_genuser_> g00s: I am curious about the research they do, since women are _always_ putting on makeup, causing traffic issues. Surely, "guys drive faster" can't be the only metric. May 06 08:06:52 jutsi hm, i think you need emu with play services right ? May 06 08:07:11 <_genuser_> g00s: heh, I think if you focus on this type of stuff too much, it has the potential to drive you mad. so I just try to notice it, pay attention, but then move on. May 06 08:07:13 g00s yes, i've been struggling, tried installing apks and even tried genymotion May 06 08:08:23 g00s: it can also be a unified design now that material is moving to the web as well May 06 08:10:23 <_genuser_> I really should pay attention to material design and get familiar with it. since I'm now thinking of moving to android dev. May 06 08:10:41 are ndk related questions allowed here? May 06 08:11:14 hey,android:clipChildren doesnt wor for relative layout.How can i get a rounded relative layout ? May 06 08:14:45 Hello May 06 08:15:14 When Iinstall my apk, I don't see appwidget in the drawer app widget list May 06 08:16:26 I don't figure out, logcat says anything usefult about: http://pastebin.com/yaS5vEvk May 06 08:17:32 this is the manifest: http://pastebin.com/DRbAcE8a May 06 08:17:35 Any ideas? May 06 08:20:16 anyone know what exactly is sigchainlib? May 06 08:25:05 I want to add a layout in the last page in SetupWizard.apk.How can i do it? May 06 08:26:30 oqq5518_, not your app I guess? May 06 08:27:15 So does anyone know how to get google maps to work with an emulator? May 06 08:27:38 jutsi, use genymotion with arm translation and google apps May 06 08:28:10 danijoo i tried that, but couldn't get it to work.. got setup failed spam on startup after installing google apps May 06 08:28:27 yeah thats normal May 06 08:29:07 after install you must register an account (and will get a lot of error spam while doing that). After that, you must update google+ from appstore and restart the phone May 06 08:29:13 then the error goes away May 06 08:29:26 no, i got mine on startup May 06 08:29:32 couldn't access anything during May 06 08:29:45 yes. until the setup is finished May 06 08:29:53 and everything is updated May 06 08:30:05 no, it updated and then the spam occured May 06 08:30:34 then you did it wrong :p May 06 08:32:20 Maybe i used outdated files.. is there like a set of updated files? May 06 08:34:22 danijoo: our company's phone. May 06 08:36:10 jutsi, you must use the correct version for your system May 06 08:36:19 danijoo: so i want to add a layout for user to install our app. May 06 08:36:24 ie lollipop apps for lollipop ophone May 06 08:37:12 danijoo i was using 4.2.2, but it failed when i tried to install the 4.2 files, so i tried 4.1, which installed, but gave me error spam at start after the updating was done May 06 08:37:26 danijoo: do you know how to realize it? May 06 08:38:14 jutsi, you cant use 4.1 gapps on 4.2 May 06 08:38:59 that's probably it, but i couldn't use 4.2 either May 06 08:39:50 wait. did you install the arm translation package first? May 06 08:39:58 of course May 06 08:40:26 then I dont no. A lot here (including me) do what you want on multiple android versions May 06 08:40:46 i guess i could try again May 06 08:41:25 but wasn't the new google api option on emus supposed to support maps? May 06 08:41:54 dont know. I dont use avd because it is as slow as a gameboy May 06 08:42:21 yeah it really is, a bit better with haxm, but still slow May 06 08:55:13 danijoo got it working with 4.1.1.. but does the emu not print to logcat? May 06 08:56:25 it does May 06 09:30:36 hey tetris works just fine on a gameboy! May 06 09:34:00 Hello, ive a question. I want to make a screenshot using adb (ddmlib) in landscape but its 90 degree rotated to potraitmode. how can i take a screenshot of a landscape device May 06 09:34:22 by landscaping it before taking the shot :o May 06 09:34:36 the game is landscaping the device. taking a screenshot is still in potrait mode May 06 09:35:38 i could rotate the image (BufferedImage) which is taken by ddmlib but this is an additional step and takes huge loads of memory in a 1920xNNN device May 06 09:52:21 I get an error inflating a fragment for google maps and I'm not sure as to why May 06 10:39:04 you can use debug keystore for testing google maps as long as you generate an api key for it, right? May 06 10:58:49 I believe so May 06 10:59:02 how else would you test your app before shipping it? May 06 11:00:24 alright, i got it working May 06 11:01:51 hi guys, i'm working as a web developer but i have some background on Java too. I want to make an android project for these reasons: 1. Learn Android APIs. 2. Make an useful app. 3. Use the app into my CV for the future when i will apply for Junior Android Developer. At the moment all i have in my mind is to write an app for archives ( based on public libraries ). What's your advice? Thanks. May 06 11:03:33 raskel: go ahead and write one. May 06 11:16:15 Hello. I am retrofit without OkHTTP. is it a bad idea? I do not need OkHTTP directly for my app May 06 11:16:58 don't they do the same thing really? May 06 11:17:34 ravilov: not at all. "Retrofit will use OkHTTP if it is available: May 06 11:18:14 it should be automatically pulled in if you add it as a gradle dependency, should it not? May 06 11:18:25 at least the retrofit pom.xml lists okhttp as a direct dependency May 06 11:18:41 and it is not marked as optional May 06 11:19:09 then that remark makes no sense May 06 11:19:09 sonOfRa: Yes *If* it is available. Should I add it. What are the drawbacks of not adding it May 06 11:19:16 will use it if available? what if not? May 06 11:19:25 https://github.com/square/retrofit/commit/f044a78ed5b137f1e750d238f4e49803cf83636b May 06 11:19:37 ravilov: they will use the default java HTTP library May 06 11:19:43 If that version isn't already released, you NEED okhttp. Because it is the only http client still in it. May 06 11:20:31 well then any possible drawbacks should be pretty obvious, vedu May 06 11:20:59 pretty sure the built-in http support is not as fancy May 06 11:21:05 It's also /GONE/ May 06 11:21:29 so it's up to you to decide whether simple built-in support will do for you or not, based on your specific use case May 06 11:21:32 yeah. I am getting error in android strict mode. May 06 11:21:54 sonOfRa, interesting May 06 11:22:22 That's the commit I linked above. You can't use retrofit without okhttp in any version that is released after that commit was made May 06 11:22:39 I might be wrong, but JakeWharton is in here, and he's the authoritative source on this :) May 06 11:24:00 raskel: Or, you can create an app that uses your web developement knowledge. Like creating a WebView wrapper as your app and displaying your website on it. This is really fast to create and deploy. Is cross platform as well. But not as performant as a native app May 06 11:25:08 it only serves as a play project, I would advise against such approach for anything that is to be actually useful ;) May 06 11:26:29 ravilov: you might be surprised ;) I was too May 06 11:27:15 ravilov: this is one fine example: https://play.google.com/store/apps/details?id=com.tourlandish.chronos&hl=en May 06 11:27:16 vedu, all I know is my wife laughed so hard (and then mocked them lots) when it turned out a certain "pro" app was nothing more than a webview to one of their "hidden" pages May 06 11:28:00 ravilov: haha. Ok now I know your reason May 06 11:28:38 vedu, I don't see the point of that app if I can just load the same page in the built-in browser and get the same effect May 06 11:28:51 what is the right way to maintain the webview between configurationchanges if the webview is in a fragment (not leaking the first activity)? May 06 11:29:50 ravilov: it makes business sense. Not developer sense. Mainly for small businesses and especially for startups May 06 11:30:15 eh, it's just so they can say "here, we even have an app" May 06 11:30:35 nevermind the app is just a glorified bookmark May 06 11:31:05 ravilov: thats the thing! they say we have app. then they say, you can also open it in your mobile browser :D May 06 11:32:02 ravilov: yeah it is a glorified bookmark. but that glorification makes a lot of difference. Plus you can some addons like push notifications May 06 11:33:08 well in any case, this is a dev channel, not a business one. hence, I will always advise against such an approach May 06 11:35:47 yeah. I too have a native app ;) May 06 11:37:27 _genuser_: are you still awake? May 06 11:37:39 bah, I just got a unicorn on github May 06 11:39:48 me too. First time I am seeing it May 06 11:40:45 I guess they're doing maintenance May 06 11:41:35 oh look at that May 06 11:41:36 " May 06 11:41:36 11:40 UTC "We're doing emergency maintenance to recover the site". May 06 11:41:50 updated 2 minutes ago May 06 11:42:43 github.io is working fine May 06 11:42:58 <_genuser_> thepoosh: yeah, what's up? May 06 11:43:13 separate servers/farms I guess May 06 11:43:14 https://status.github.com/ May 06 11:43:25 <_genuser_> I wonder how people hosted anything before the .io domain. May 06 11:43:32 <_genuser_> it seems like everyone is on the .io train right now. May 06 11:43:52 <_genuser_> diapers? crappy. diapers.io? smart!!! sounds cool. must buy May 06 11:43:54 Wrt native, versus webview type of apps, my journey has been first Android native, then Cordova (cross-platform and responsive web). As said, for business reasons being on all platforms was more important than being native on one. May 06 11:44:14 (meaning I first made an Android native one, THEN a Cordova one) May 06 11:44:18 vedu, spoke too soon it seems May 06 11:44:42 The next one up is probably react-native for iOS, and possibly later react-native for Android (if that becomes an option). May 06 11:44:44 kjeldahl, yeah business always kills proper coding May 06 11:45:24 ravilov: And "bandwidth". Being an expert Android, iOS _and_ web developer at the same time isn't childs play... May 06 11:45:34 hm, personally I don't find .io any more or less appealing than any other tld May 06 11:45:50 what about .me ravilov :pp May 06 11:46:28 _genuser_: catharsis May 06 11:46:33 just released to 100% May 06 11:46:39 kjeldahl, yeah that's a problem, businesses always want EVERYTING ALL AT ONCE, instead of taking time to develop a solution properly before moving on May 06 11:46:43 a version that was in the works for about 5 months May 06 11:46:51 it's always all about the money sadly May 06 11:46:58 danijoo, those can be cool :p May 06 11:47:48 ravilov: Yup. When you are "growth" hacking your next viral app, having one platform simply does not cut it. Makes all marketing twice as expensive. May 06 11:48:27 fuk.me May 06 11:48:39 danijoo, fellat.io :p May 06 11:48:42 <_genuser_> thepoosh: man, I haven't done anything on my project for last two days. just pissing online watching shows reading random articles.... May 06 11:49:04 <_genuser_> you guys, stop.it May 06 11:49:32 hey there are cool uses too... portfol.io May 06 11:50:49 <_genuser_> srs.ly that's cool and not cool at the same time. May 06 11:51:15 From now on, you're only allowed to speak domainish if it's available! May 06 11:51:23 https://www.namecheap.com/domains/new-tlds/explore.aspx - 27 pages of newly invented TLDs... May 06 11:51:40 <_genuser_> kjeldahl: nev.er ! May 06 11:51:49 Ok, Ive been using Android Studio and just created a signed apk. I found a bug and switched the build variant back to debug. However, it still keeps telling me the apk is unsigned. What do I do? I'm dead in the water May 06 11:52:07 <_genuser_> altho, wikipedia says .er (eritrea) registrar offers no services to register domains. May 06 11:52:19 bummer May 06 11:52:35 uudruid, try cleaning your project May 06 11:52:41 oh wait May 06 11:52:45 _genuser_, bumm.er May 06 11:52:46 :p May 06 11:52:58 <_genuser_> nice! May 06 11:53:14 ravilov already tried that May 06 11:53:28 <_genuser_> all these extras like .cab, .ceo, .tv, .mobi, .clothing, .cleaning.... that's a bit much. May 06 11:53:47 really? cleaning? May 06 11:53:53 <_genuser_> I think the whole point of using domain names instead of IPs was ease of use and easy to remember stuff. May 06 11:54:12 not anymore apparently :p May 06 11:54:12 <_genuser_> danijoo: not kidding. from wikipedia http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains May 06 11:54:28 <_genuser_> altho, .build is kinda cool for using build tools. May 06 11:54:39 and .app for apps :) May 06 11:54:43 er, I just linked an extensive list of the new ones May 06 11:54:45 <_genuser_> but then again, build.dumbass.com works just fine. May 06 11:54:55 * ravilov wonders if .gradle will ever become a TLD May 06 11:54:55 any other ideas? May 06 11:54:59 _genuser_, you mean dumb.ass ? ^^ May 06 11:54:59 <_genuser_> ravilov: yeah, I'm reading that list too. May 06 11:55:04 <_genuser_> danijoo: lol. May 06 11:55:07 vedu, thanks but it is not what i want to do... i'm a fan of native apps with KISS in my mind. Also for that kind of project i could use easily a framework like PhoneGap... May 06 11:55:18 uudruid, can't think of anything else, sorry May 06 11:55:20 <_genuser_> the whole point of sub domains was to get into specialty. May 06 11:55:32 <_genuser_> www.domain.com, etc. etc. May 06 11:55:42 grrrr May 06 11:55:48 <_genuser_> so instead of firebase.io, it really should ahve been io.firebase.com. May 06 11:55:50 <_genuser_> or .org. May 06 11:55:57 .blackfridy May 06 11:56:04 this is going to far.. May 06 11:56:09 .cancerresearch O.o May 06 11:56:31 i love .foo May 06 11:56:35 <_genuser_> or .blog May 06 11:56:41 <_genuser_> or .bar May 06 11:56:49 lol .website May 06 11:56:58 what else is it most likely to be? May 06 11:57:13 <_genuser_> for example a bar called drunks is still a business. so drunks.com would be fine. adding a .bar now requires these guys to buy .com and .bar May 06 11:57:18 <_genuser_> and all the others that may apply to them. May 06 11:57:26 .ninja :D May 06 11:57:26 keeps saying app-debug-unsigned. apk is unsigned. Well, no shit! May 06 11:57:34 <_genuser_> like taylor swift buying .porn before anybody else could. May 06 11:58:09 www.geta.life May 06 11:58:18 <_genuser_> lol, .kim May 06 11:58:31 <_genuser_> the north korean dictator would be flattered. May 06 11:58:51 i should check if danijoo.rocks is available May 06 11:58:56 <_genuser_> lol, .link (for links), because teh entire web isn't a link already. May 06 11:59:25 .vodka Vodka-related businesses and interest May 06 11:59:30 there should be www.android.rehab May 06 11:59:58 .wtf :D May 06 12:00:07 man.. I should really invest in some domains May 06 12:00:09 <_genuser_> lol .ss (south sudan) removed from root DNS zone in apr '13 May 06 12:00:52 women.kitchen anyone? May 06 12:01:05 * ravilov slaps danijoo May 06 12:01:10 :x May 06 12:01:32 android.guru May 06 12:01:53 <_genuser_> lol women.kitchen will have all the tech women DDOS'ing it. May 06 12:02:33 just forward to .diamonds and it will be fine May 06 12:02:56 <_genuser_> haha, you're shooting your self more and more in teh foot with women stereotypes!! May 06 12:03:12 :p May 06 12:03:21 <_genuser_> altho, you could put white backgroudn and white font and they'd never know. May 06 12:03:48 techies discussing off-topic, nothing much to do here :-P May 06 12:04:09 <_genuser_> if you have android question don't let us stop ya. May 06 12:04:09 danijoo, I don't know about .rocks but danijoo.sucks should be available soon :p May 06 12:04:23 :D May 06 12:04:36 I see. Im making friends today :D May 06 12:05:08 <_genuser_> samur.ai! ment.al! m.an! f.aq! May 06 12:05:18 <_genuser_> some good options. May 06 12:05:38 <_genuser_> f.at! May 06 12:06:00 im wondering why there is no .faq May 06 12:06:32 <_genuser_> honestly, faq.company.com works just fine. and it's easier to track stuff on your own domain instead of routing to a different domain. May 06 12:06:57 <_genuser_> sub domain help organize. but I think ICANN or whoever is more into making money by opening about new TLDs May 06 12:07:06 btw m.am shoudnt work May 06 12:07:21 too short i think May 06 12:07:29 <_genuser_> m.an? May 06 12:07:36 <_genuser_> single letter domains would be allowed, no? May 06 12:07:44 are they? I thought they arent May 06 12:08:03 it is up to the registrar to decide on that May 06 12:08:07 They are, but reserved for the well known domains. May 06 12:08:12 many countries disallow it because it is too generi May 06 12:08:13 c May 06 12:08:43 <_genuser_> probably right. mm.com works but m.com doesn't. May 06 12:09:39 https://en.wikipedia.org/wiki/Single-letter_second-level_domain May 06 12:10:00 <_genuser_> and it says netherlands antilles were dissolved on oct 10, 2010. so probably .an itself isn't avaialble. May 06 12:10:10 cool, w.org redirects to wordpress.org May 06 12:11:30 the descriptions are so awesome too May 06 12:11:36 .black those who like the colour black[43] May 06 12:11:41 lol May 06 12:11:50 <_genuser_> it's also cool how some countries still allow single letter second-level domains. May 06 12:11:59 er May 06 12:12:00 Which top level domains offer one character domains? May 06 12:12:02 .ac .af .ag .ai .am .asia .biz .bo .by .bz .cm .cn .co .com.ar .com.br .co.at .co.il .co.uk .cr .cz .cx .dj .de .dk .fm .gd .gg .gl .gp .gs .gt .gy .hn .ht .im .io .je .kg .ki .kw .la .lb .lc .ly .md .mk .mp .ms .mw .mx .mu .nf .nz .pe .ph .pk .pl .pn .pw .ro .sh .st .tc .tl .tt .to .tv .travel .ua .ws .vc .vg .vn .vu May 06 12:12:25 i.travel :) May 06 12:12:37 i.am May 06 12:13:04 is there an i.think? if so it should redirect to i.am May 06 12:13:20 unless apple copyrighted everything starting with "i" May 06 12:13:30 lol ^^ May 06 12:13:42 <_genuser_> not everything, otherwise you couldn't refer to yourself. May 06 12:14:02 yourself doesn't have an "i" :p May 06 12:14:10 and I doesn't *start* with I, it just is I May 06 12:14:51 <_genuser_> since when has that kind of common sense prevent people from trademarking/copyrighting stuff? May 06 12:15:12 <_genuser_> I mean microsoft was suing MikeRoweSoft.com because they said regular peopel are too stupid and would be duped thinking it's microsoft.com May 06 12:15:13 tru dat May 06 12:15:34 <_genuser_> and the Mike Rowe guy was actually able to keep it. May 06 12:15:53 well currently it redirects to microsoft.com May 06 12:16:03 I'm opening a cursor to MediaStore.Images.Thumbnails, and loading all thumbnails in a GridView, using a custom Adapter class. The GridView essentially consists of ImageView's, where I'm just setting the thumbnail. If all photos are *landscape* this looks nice, but how do I automatically crop "vertical" thumbnails? May 06 12:16:08 l.ua not redirectig to lua.org :( May 06 12:16:32 what's the easiest solution? Is there some setting I can configure in XML (layout)? May 06 12:16:39 <_genuser_> ravilov: so they either got it when he let it lapse, or finally sued him, or just bought it. May 06 12:17:00 <_genuser_> but the question remains how would anybody with an IQ over single digits every think MikeRoweSoft is microsoft May 06 12:17:22 well if he calls people and say I am from mikerowsoft i can understand it May 06 12:17:33 but the domain itself shouldn't cause problemes May 06 12:17:57 _genuser_, "In late January 2004, it was revealed that the two parties had come to an out of court settlement, with Microsoft taking control of the domain." May 06 12:18:07 <_genuser_> but anyone (neither from microsoft OR mikerowesoft) can call someone and say they're from microsoft. May 06 12:18:17 If my name was rosoft, i definitly named my child mike :D May 06 12:18:38 <_genuser_> ravilov: I'm generally a microsoft fan, but that kind of persistent badgering is kind of annoying. May 06 12:19:07 _genuser_, please leave this room and join #microsoft-lovers :p May 06 12:19:18 that stuff probably happens when somone in ms has too little to do May 06 12:19:25 * _genuser_ refuses May 06 12:19:33 typical for MS fans May 06 12:19:35 * ravilov hides May 06 12:19:48 * _genuser_ sends ravilov some free windows vista install media May 06 12:20:11 i'll take vista over windows 8 any day May 06 12:20:19 * ravilov burns it May 06 12:20:20 <_genuser_> ugh, have you used both? May 06 12:20:23 yes May 06 12:20:31 <_genuser_> I'm using 8 and really liking it. May 06 12:20:48 then you open something from control panel and it goes full screen metrocrap May 06 12:20:49 but seriously, I think some people here are trying to ask genuine dev questions, and there is also #android-offtopic... May 06 12:20:52 <_genuser_> the only requirement was to get used to teh schizophrenic start screen popping in and out. May 06 12:21:06 the start screen si fine other than going full screen May 06 12:21:12 <_genuser_> ravilov: yeah, we should probably cool it. May 06 12:21:23 <_genuser_> on that note, I'm gonna take a timeout from here. :) May 06 12:21:27 =) May 06 12:22:02 (he's probably going to go upgrade his win8) May 06 12:22:14 <_genuser_> no it's already at 8.1 May 06 12:22:24 <_genuser_> dangit, stop baiting. you're a master at it. May 06 12:22:36 :-X May 06 12:28:22 http://ilike.beer << click it :D May 06 12:32:07 still making friends I see :p May 06 12:32:56 Doesnt this count as a compliment? May 06 12:33:55 um sure :p May 06 12:37:49 I' May 06 12:38:20 hehe May 06 12:39:08 I'm using zxscanlib to scan a QR code. i'm finding the back button isn't working (that is to say it's not triggering OnBackPressed() ) anyone know what might be up? or how to diagnose? May 06 12:53:01 Hello, there! May 06 12:54:03 I wonder if someone would give a reccomendation for (not) using python? Like Kivy / PySide. please? May 06 12:54:38 for ? May 06 12:55:01 for subj? May 06 12:55:14 Fuyou: What does Python have to do with Android development? May 06 12:55:30 I mean I'm total new for android dev, but I have some exp with python May 06 12:57:21 What is your goal? If your goal is to write an Android app, the answer is to use Java and Android's UI framework. May 06 12:57:40 (Or some JVM-targeting language, I guess.) May 06 12:58:04 first google hit: https://ep2013.europython.eu/conference/talks/developing-android-apps-completely-in-python May 06 12:58:25 no idea if useful, but looked the most promising from a quick glance May 06 12:59:53 Troffel, I did some quick googling, now I wondered for a professional opinion if I should dive into trying\reading manuals for some tools or forget the thing May 06 13:00:51 unless you specifically want to make apps for both IOS and Android with something like Titanium, i'd May 06 13:00:58 you do that and you basically promise to make your final app overbloated and heavy May 06 13:01:00 I'd recommend just going with java d: May 06 13:01:08 It doesn't actually needs to be completely in python I'm fine with some java or C++ May 06 13:02:13 Well, I would actually love to make apps for every single mobile platform possible May 06 13:02:23 ofc, primary target is android May 06 13:02:24 including MIDP? May 06 13:02:36 old monochrome nokias? May 06 13:04:01 nah, I mean somewhat nowadays platforms - tizen, firefoxos, sailfishos, ios, windows for mobiles maybe May 06 13:04:28 Not sure you'll find a framework that ports to all those :D May 06 13:04:52 maybe you should set more realistic goals May 06 13:05:02 Well pyside should be able to do for many May 06 13:05:12 how about you make *an* app, just any app May 06 13:05:22 try one with your python whatever and one in real java May 06 13:05:24 then see for yourself May 06 13:05:42 For starters I want to make an App using somw of my python skills May 06 13:05:50 ok then go do that May 06 13:05:51 ravilov, you seem biased :o) May 06 13:06:20 Troffel, yes I am, but also making him see for himself May 06 13:06:28 I know :D May 06 13:07:33 My point was to ask for some recomendations. I already mentioned 2 projects which allow python apps for android and some other platforms May 06 13:07:56 you won't find many python fans in here May 06 13:08:02 I wanted somethibg like (it's fine, try it) or (those are crap forget) May 06 13:08:04 at least not when it comes to android development May 06 13:08:34 Hi all. Question. I got a RuntimeException; requestFeature() must be called before adding content. Here´s the strange part, I recieved this crash report after using the exact same setup for almost a year. May 06 13:08:51 Fuyou: So your question is "How should I write an Android app in Python that also supports Tizen, FirefoxOS, SailfishOS, iOS, and Windows Phone?"? May 06 13:08:52 ofc. I first tried #python. but didn't find any android fans there May 06 13:08:54 It crashed on my main activity, an then the first lines (line 6 in this example http://pastebin.com/9bcrn3Z7) May 06 13:08:57 searchable activity is not starting when search is pressed on keyboard May 06 13:09:22 I never use a RequestFeature in all of the script, and it has never happened before on Any device. Anybody any ideas on whats going on? May 06 13:09:35 TacticalJoke, no, I wrote what my question is and what is my first goal May 06 13:10:06 Fuyou, so. no android fans in #python, no python fans in #android. that should be your first clue. May 06 13:10:07 hi anyone have sample code of map v2? i'm newbi. I have read and try some tutorial but still error, error on fragment and sometime when i fix some code and running it works, but i get blank screen -_- i have updated my sdk but no effect. Help me... May 06 13:10:11 You didn't ask any specific question. You just talked aboout a bunch of things and hinted at a bunch of things. May 06 13:11:00 Fuyou, new platforms usually require new skills, at least if you want to do it right May 06 13:11:10 harencode_ im using map v2, but my code is too large to give a sample of May 06 13:11:50 ThomQ: Are you able to reproduce this crash right now? May 06 13:12:02 Fuyou, if you want to do it quick&dirty style (by trying to reuse whatever existing skills you might have), that's exactly what you'll end up - a quick&dirty app May 06 13:12:08 end up with * May 06 13:12:23 tacticalJoke, nope. And it has never occured before either May 06 13:12:35 i just got this 1 crash report from this afternoon, which Baffled me May 06 13:13:13 only thing I could come up with, is that the theme requests something? But nothing changed in that May 06 13:13:29 Ok, let's make it more exact. I want to build simple android App that will be comunicating with server on user request. I would like to use python in development (not nessasary _only_ python). 1. Should it try Kivy? 2. Should i try Qt + PySide? 3. Should it try something else? 4. Should I forget it and go with SDK May 06 13:13:57 ThomQ: large? i just want sample simple code... just show map. i have downloaded many sample in some tutorials but still not work -_- maybe can you give me good reference tutorials? May 06 13:14:10 harencode_ googling for you now May 06 13:14:38 ThomQ: yes, i have do it :( but still not work May 06 13:14:39 what IDE do you use harencode? May 06 13:14:59 Fuyou, like I said, not many python fans in here. which means most of us never even heard of any of those things. how are we supposed to make recommendations? May 06 13:15:15 ThomQ: my tool, eclipse with genymotion 4.2.2 emulator May 06 13:15:38 Fuyou, java is the only officially supported android development platform, anything else is probably just an experiment or a toy language/lib May 06 13:16:02 vast majority of people in here work with what is officially supported only May 06 13:16:06 anyone using Shippable? I can use it to build but 'gradle check' fails with this problem saying gradle 2.1 is used, and it needs 2.2 . My gradle wrapper does specify 2.2 : https://gist.github.com/xorgate/c103ca22f8f6a8b173c9 May 06 13:16:15 Ahhhh, well, it could be because of the Emulator. They dont play nice with Google Services. May 06 13:16:30 Harencode_ take a look at this example: http://www.vogella.com/tutorials/AndroidGoogleMaps/article.html I always like the Vogella tutorials May 06 13:16:30 ThomQ: Not sure, but google "requestFeature must be called" for more info on this kind of problem. May 06 13:16:45 ravilov, I understood you. But there are many users, some may happen to be. Also TacticalJoke wanted specific question May 06 13:17:12 lol, most are idlers though May 06 13:17:15 TacticalJoke, yeah I did. All I could find was that you have to do requestwindowfeature bedore you setContent May 06 13:17:23 anyway good luck, hope you find the info you're looking for May 06 13:17:26 ThomQ: yes sure sir, actually i have stay on there and androidhive, but still not work. Owh it because my emulator? May 06 13:17:38 I know, I'm not first time to IRC ) May 06 13:17:51 harencode_, whats the exact error you´re getting? May 06 13:18:24 ThomQ: i have follow all tutorials, but when i'm not get error i will get blank screen :( May 06 13:18:33 it something like fragment May 06 13:21:48 ThomQ: maybe you or anyone in here can give me sample code google map v2? May 06 13:22:01 harencode_ i just did :D May 06 13:22:12 We need a specific error to be able to help you May 06 13:22:44 ThomQ: okkay, wait a minute i will copypaste my error May 06 13:23:40 Ok, there are almost 100 users on #kivy, not too shaby, I'll try there then. Thanks for hearing me out. May 06 13:24:40 ThomQ: 05-06 19:56:55.193: E/AndroidRuntime(12849): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jiahaoliuliu.android.samplegooglemapsv2/com.jiahaoliuliu.android.samplegooglemapsv2.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment May 06 13:25:18 ThomQ: i have followed https://github.com/jiahaoliuliu/SampleGoogleMapsV2 May 06 13:26:00 owh ya everybody know how i can join androiddeveloper.slack.com? May 06 13:26:40 silly issue, do you know why android:headerDividersEnabled="true" on a listview will not show any dividers where the header is? May 06 13:27:08 I mean I've explicitly done listview.addHeaderView(View) and the view is right there, but I cannot for the life of me get it to have more space between it and the first item of the list May 06 13:27:22 more space than their is between each of the items below it in the list, that is May 06 13:28:55 harencode, I´d use another tutorial if I were you. May 06 13:30:23 ThomQ: are you still there? May 06 13:30:41 yes sir May 06 13:31:38 ThomQ: i have followed https://github.com/jiahaoliuliu/SampleGoogleMapsV2 but still error May 06 13:31:42 hereś the thing: There are multiple ways to add a fragment. Doing it in XML is in my opinion not the best way to do it, and I too had a lot of errors because of it. May 06 13:31:52 Try to follow this tutorial: http://www.vogella.com/tutorials/AndroidGoogleMaps/article.html May 06 13:32:08 They make the fragment in code, which is far more usefull for you in the long run, and more stable in the short run May 06 13:33:04 ThomQ: okkay, i will try again vogella tutorial. Wait a minute i will back to report the result May 06 13:33:43 sure thing May 06 13:35:04 come on guys, headerDividers on Android, Im sure you know this! May 06 13:35:06 go! May 06 13:35:59 ...and the world comes to a standstill suddendl May 06 13:36:00 y May 06 13:36:49 it seems so trivial, its pissin me awf May 06 13:41:41 hi all, How can get access to the gyro's log file ? May 06 13:43:45 Tazmain, http://developer.android.com/reference/android/hardware/Sensor.html May 06 13:44:02 i'm not aware of a log file for gyro (or any other except FIT maybe) sensor May 06 13:44:45 isn't the gyro a seperate processor on the phone ? May 06 13:45:33 might be, so? May 06 13:45:40 doesn't mean it has its own log May 06 13:45:58 an average phone is full of all kinds of specialized chips/cpus May 06 13:46:38 doesn't that mean you can missuse that ? May 06 13:47:04 the only access to the gyro is through the APIs android provides. Even if there was a separate sensor handler (which android usually doesn't have) it's not going to be storing log files (or even have flash storage, or a file system) May 06 13:47:17 you make the assumption that everything is a programmable general purpose cpu May 06 13:47:28 yes, gyro is a single processor May 06 13:48:03 there's no reason a sensor asic should be doing anything other than reading the sensors and sending it over i2c or spi to the main processor. It's not going to allow you to run custom code on it. There's practically no reason to do anything but use mask rom in it. May 06 13:48:11 thats why pedometers even work when phone is not awae May 06 13:48:12 its still an embedded processor is it not ? May 06 13:48:14 awake* May 06 13:48:29 danijoo, on some phones May 06 13:48:59 danijoo, it's beginning to trickle into android, in the last year or so May 06 13:49:11 yeah. most up to date phones I guess May 06 13:49:20 a lot still don't have it; like the voice when off stuff, it's still a premium feature May 06 13:49:22 for iPhone its like that since years May 06 13:49:28 Okay then let me ask this question is it possible to change the information the gyro and gps sends the apps that use it ? May 06 13:49:35 sure, but iphone is a different beast :P May 06 13:49:38 Tazmain, no. May 06 13:49:50 without rooting the phone? no. May 06 13:49:57 with root May 06 13:50:01 maybe with a custom rom May 06 13:50:03 not a question for here May 06 13:50:17 you could change the api and make it return actualValue + x everytime ^^ May 06 13:50:20 we're app-dev here. #android-root might have answers for doing custom rom hackery like that May 06 13:50:38 or + Randim.nextInt ^^ May 06 13:51:02 one thing I am still a little fuzzy about, android uses the linux kernel for the hardware control right. Does that mean you can write C code to directy talk to the kernel ? May 06 13:51:39 Tazmain, thats a question for #android-root or #cm May 06 13:51:48 what do you mean talk directly to the kernel May 06 13:51:53 why so ? May 06 13:52:01 too broad man, what're you talking about exactly May 06 13:52:23 because this is android app development and not #android-kernel-hacks May 06 13:52:59 Odaym, well I know you can write native C code apps May 06 13:53:19 danijoo, btw that channel is empty May 06 13:53:30 lol ofc May 06 13:54:01 Hi guys May 06 13:54:03 Help me, i have followed this tutorial http://www.vogella.com/tutorials/AndroidGoogleMaps/article.html but still error on binary xml line 7 and something in metadata value, how i can fix it? May 06 13:54:06 theoretical question. May 06 13:54:18 How will android apps function with java 9 though , when they move away from jars May 06 13:54:21 ThomQ: i'm back :) May 06 13:54:32 did it work? :D May 06 13:54:33 Tazmain, android doesnt even support all of java 7 May 06 13:54:39 If I have an image in /drawable/, I should be able to somehow render that image onto a canvas. Correct? May 06 13:54:44 also android doent use jars anayways May 06 13:55:23 also you can still write in java 3 and run it if you want. Theres nobody forcing android to support java version x May 06 13:55:39 I see May 06 13:58:26 ThomQ: no sir, still not work? :( #confused May 06 13:58:47 #confused May 06 13:58:48 lol May 06 13:58:59 #conFUELED May 06 13:59:03 harencode_ it should give you more specific errors now, right? May 06 13:59:03 harencode_, this is not twitter or facebook, dude May 06 13:59:03 lol May 06 13:59:06 Paste the errors May 06 13:59:13 #confused is allowed... :D May 06 13:59:22 only as a reference to a channel :p May 06 13:59:23 hashtags on IRC, dear lord May 06 13:59:29 might get you kicked elsewhere May 06 13:59:43 ThomQ: okkay wait a moment May 06 13:59:56 or rather: String stateOfConsiousness = ¨Confused¨; May 06 14:00:04 ravilov: hahaha, i forget May 06 14:00:22 Tazmain, yes, code that talks to kernel is written in C even in Android core May 06 14:03:40 ThomQ: http://pastebin.com/JYnixPu3 May 06 14:04:05 ugh May 06 14:04:11 Can't you read the error message? May 06 14:04:17 It tells you EXACTLY what to do to fix it. May 06 14:04:25 Tazmain, android makes use of JARs but does not exactly depend on them May 06 14:04:45 EXACTLY May 06 14:04:48 YOU May 06 14:04:52 TELLING May 06 14:05:06 CAPITAL May 06 14:05:49 I gotta run out guys May 06 14:05:58 Be nice to Harencode, he´s new May 06 14:06:17 explain to him how to adjust his meta-data tags May 06 14:06:42 no May 06 14:06:50 the IDE already did that May 06 14:09:19 yes, i'm newbi. May 06 14:09:30 Hello guys, I have an issue on showing title on Actionbar correctly. Sometimes it just doesn't show the complete name on the action bar. It shows Android like "Andr..." I use support compatibility actionable. any idea? Just setting actionable with setTitle() is not enough apparently. May 06 14:09:31 and join here from learn May 06 14:09:43 to learn May 06 14:11:22 again - this is not a good place for beginners and those wanting to learn the basics May 06 14:11:38 all those tutorials and guides all over the internet are made for a reason May 06 14:12:53 once you've done all of those and made a first app or ten, THEN you come here and discuss the specifics May 06 14:13:52 as for your exception log, I've never used fragments before, but even I can see the problem is explained in great detail right there in the log, along with exactly what you have to do to fix it May 06 14:17:15 ravilov: Okkay, actually i have follow another tutorials and today i want to learn map v2 and i have read another tutorials but still getting error, so i'm find community with fast reply. I think here is good place, yeah really good place, but not for newbi like me. So where i can ask my question? maybe have another forums? i will ask on stackoverflow but still get error and slow respon, maybe it because my question have not q May 06 14:18:14 stackoverflow.com/questions/19724113/google-play-services-update May 06 14:18:55 er, http://stackoverflow.com/questions/19724113/google-play-services-update May 06 14:24:03 capella: thanks capella, actually i have read that in this morning, but still error when i change to like that i get error API_KEY May 06 14:25:22 harencode_, that is all fine. so did you fix your meta-data error yet? I mean you just got at least two people telling you where the solution is May 06 14:29:54 Yo. May 06 14:30:31 Does anyone know how to disable copying the current line if nothing is selected when pressing Ctrl-C? May 06 14:32:19 my Eclipse is smarter than that ;) May 06 14:33:15 why in the world would you use Eclipse??? Is it a legacy project? May 06 14:34:48 no, it is my preferred IDE May 06 14:35:15 Oh. Sorry to hear that. May 06 14:35:17 why in the world would I use slow sluggish overbloated thing that is AS? (yes I've tried it, it really is stupendously slow) May 06 14:36:34 No time for flame war, gotta work :) May 06 14:36:50 psh May 06 14:37:06 I know, I'm disappointed too :-/ May 06 14:37:14 with RxJava, I have a process that depends on a ViewObservable.clicks(). When my activity starts up, I call AppObservable.bindActivity(this, ViewObservable.clicks(button, false).map(s -> new UserCredentials()).*.subscribe(doStuff). My thought was that it would wait for the click event to actually perform all the subsequent transformations, but it doesn't seem to wait, and clicking the button doesn't a May 06 14:37:14 ppear to do anything May 06 14:37:49 Newby.. I put a Jar file in Libs, is that all I have to do to add a lib to a project? becuase I cannot see the lib when I try to import May 06 14:39:08 Hi guys, the following code : http://privatepaste.com/2de9d53fb3 what does exactly return ? is it related to CERT.SF file from META-INF ? May 06 14:39:27 IrishGringo, gotta add it to the gradle file too May 06 14:39:32 gradle imports* May 06 14:41:03 Troffel: this does not do it... compile fileTree(dir: 'libs', include: ['*.jar']) May 06 14:41:06 ? May 06 14:42:34 compile files('myfile.jar') should do it May 06 14:42:50 yes, it does IrishGringo , just make sure it's the correct libs folder! May 06 14:43:45 It's happened to me before that my lib folder was not in the correct place. May 06 14:44:12 I have only one libs folder that I can find... /app/libs May 06 14:44:15 and I notice a cap difference in Libs vs libs May 06 14:44:30 looks correct to me May 06 14:44:34 at same level as /build and /src May 06 14:44:53 all lowercase libs May 06 14:45:08 did you rebuild the gradle file? May 06 14:45:25 "sync project with gradle file" May 06 14:46:07 MikeWallaceDev: no... May 06 14:46:15 oopsies :) May 06 14:47:05 not sure how May 06 14:47:52 first off, there should be a bar that appeared at the top of your file, asking you to sync now May 06 14:48:25 or, on the toolbar, where the android icons are, there's a gradle icon with a down arrow May 06 14:49:19 I'm trying to load all thumbnails on my device into a gridview, but I'm unsure how to handle portrait vs landscape photos/thumbs. Please see: http://stackoverflow.com/questions/30076982/landscape-and-vertical-images-in-gridview-how-to-auto-crop-scale May 06 14:49:20 or Menu Tools->Android->Sync May 06 14:49:30 MikeWallaceDev: no bar... but I do see this... Gradle build finished with 2 warnings(s) in 4s 265ms May 06 14:50:19 IrishGringo, aarrgh, I hate that thing. It doesn't show up to date information. Maybe that was there for an hour :) May 06 14:50:32 also, on my Sony Xperia, all portrait images (thumbs) are automatically rotated...? Is this something my app is doing wrong? I essentially just want a regular grid of rectangular thumbs, where each thumb is cropped to same size, regardless of orientation May 06 14:50:32 It will actually say that WHILE you are building! May 06 14:50:55 ok... then just make a change in your gradle file, that bar should appear May 06 14:54:54 MikeWallaceDev: I have it working now... your bar was a good hint, but not exactly right... there is a side border marked Gradle with option to rebuild.... I am running on AS btw... May 06 14:55:00 thanks for the hint... May 06 14:55:31 I can garantee that I was exactly right ;) But glad that you got it working :) May 06 14:58:13 MikeWallaceDev: well, you know what I mean,... your help.. helped a lot... just trying to pass along how I resolved issue... at least so far. May 06 15:07:52 Hi, I'm new to android testing, is there a way to do a pure java testing (JUnit) but with context? (need to get resources). Is junit 4 supported? and with context? May 06 15:17:23 yoavst: To my knowledge Mockito is the best for that, I am also new to testing period, and trying to get started with it recently May 06 15:17:44 yoavst: oh but with context idk May 06 15:18:05 Mockito is good for pure java testing, and Espresso is good for Android View testing May 06 15:18:17 I just want to test my logic :/ May 06 15:18:20 and it uses resources May 06 15:18:33 Can't you break the code up so that the logic is easy to test in isolation? May 06 15:18:41 I have loads of JVM unit tests for my app. May 06 15:18:59 It is seperated from UI May 06 15:19:13 but separate it from context will be shard May 06 15:19:24 It uses resources May 06 15:19:34 It's easy to break code away from Android resources, usually. May 06 15:19:46 Though I guess it depends on the details in this case. May 06 15:20:11 It is for a timetable May 06 15:20:19 and it need string array of hours May 06 15:20:36 Can you make your code-to-best-tested take a String[] rather than a Resources? May 06 15:20:41 (the timetable is hardcoded in resources since it is for one school only) May 06 15:20:58 looks like I can get context in InstrumentationTestCase May 06 15:21:37 Passing a Resources or a Context to something just so that it can get a String[] seems like suboptimal design. May 06 15:22:00 Well, It is a very big array May 06 15:22:12 It is actually json of string[][][] May 06 15:22:40 (it is for the whole school) May 06 15:22:52 It doesn't matter how big it is; passing it to a method is simply passing a reference/pointer. May 06 15:23:24 How do I print text in TestCase? It doesn't show list of tests so I want to print on each test finished May 06 15:23:56 System.out.println May 06 15:24:31 it doesn't print May 06 15:24:53 http://i6.5cm.ru/i/nVI9.png May 06 15:25:33 I guess it prints to LogCat if it's an instrumentation test. May 06 15:26:03 IrishGringo, you're welcome mate :) May 06 15:26:13 good morning TacticalJoke ! May 06 15:26:24 Hey, MikeWallaceDev. :D May 06 15:26:40 TacticalJoke: so is there a way to print to that window and use context :/? May 06 15:27:10 You can easily print to that IntelliJ window if you run JVM unit tests. May 06 15:27:19 Don't know about instrumentation tests (since I never seem to do them). May 06 15:28:18 Passing a Context to Timetable looks like way TMI for Timetable and death for testing. May 06 15:30:21 hello. can _id for providers be strings? May 06 15:31:11 I didn't know there existed a log level named Log.wtf(); May 06 15:31:21 virmundi, that depends on if you want to use the values in Adapter/ListViews May 06 15:31:21 pretty cool May 06 15:31:39 yeah, what do they say that wtf means again? May 06 15:31:40 MikeWallaceDev: yes, I want to use them in ListViews. May 06 15:31:49 What a Terrible Failure May 06 15:31:49 then no. :) May 06 15:31:54 RIGHT! hahahaha May 06 15:31:56 It's a shame that Log.wtf doesn't always seem to work (crash the app). May 06 15:32:31 ok. so the _id should be an integer. Interesting. have to figure out how to tie that into the backing service. May 06 15:32:48 thanks May 06 15:33:11 My linux loves to crash :/ May 06 15:33:49 yoavst: I think the issue here is that Timetable depends on Android Contexts when it shouldn't even know what Android is. May 06 15:33:56 virmundi, I use two ids... One local which is a an int. And one for the network which is a UUID May 06 15:34:26 MikeWallace, that’s a good idea. I’m just in the planning/screen mock phase now. May 06 15:34:35 Right now, Timetable is actually AndroidTimetable. May 06 15:34:40 TacticalJoke: Yea May 06 15:34:51 speaking of Time... I'm trying out JodaTime... May 06 15:35:02 I'm mostly happy May 06 15:35:05 So in testing, should I use hardcoded File("") and get its content? May 06 15:35:16 everybody is happy May 06 15:35:18 except me May 06 15:35:28 Well, in AndroidTestCase, it written "Extend this if you need to access Resources or other things that depend on Activity Context." May 06 15:35:38 but context is null. I don't get it :/ May 06 15:36:26 yoavst: Personally, I'd just use a JVM test. A thousand times simpler May 06 15:37:06 TacticalJoke: is Junit's ActivityInstrumentationTestCase2 runs on device? May 06 15:37:13 Actually, I've counted and it's only 997 times simpler. May 06 15:37:18 Speaking of JodaTime, I have two major libraries in my mind to port. One is moment.js and the other is mathJax. I don't know when I'm gonna work for it though. :) May 06 15:37:56 yoavst: Yeah. May 06 15:38:12 That's not a JUnit thing, BTW; it's an Android thing. May 06 15:38:16 so what is the diff between androidTest and test? May 06 15:38:27 Android tests run on devices; tests run on your machine. May 06 15:38:42 MikeWallaceDev: :D May 06 15:38:46 yoavst: try to get as much as your code to be Android agnostic as possible. May 06 15:39:09 virmundi: it is bit a problem. I was written my code using Kotlin that got tons of android enhancements May 06 15:39:18 i've wrote* May 06 15:39:32 *I've written :/ May 06 15:39:51 I see. May 06 15:39:53 :( May 06 15:42:08 this is timetable code: http://pastebin.com/NDDepHxT May 06 15:43:05 Why all statics? Just create a single instance if you don't want more than one. May 06 15:43:54 yoavst, should be pretty easy to remove android from that May 06 15:43:55 TacticalJoke: for testing, I write testing using Java May 06 15:44:06 yoavst, you only make use of context May 06 15:44:07 so it will be ugly to use Timetable.$Instance May 06 15:44:28 pfnQ: I should init those resources also in testing May 06 15:44:55 yoavst: Yeah, but you can avoid statics entirely. May 06 15:44:56 don't write tests in java May 06 15:45:03 #1 solution May 06 15:45:08 pfnQ: I don't think kotlin is supported May 06 15:45:18 it is, or should be May 06 15:45:31 I write tests in Scala without problem May 06 15:45:56 yoavst: If you do JVM unit tests, you can write the tests in Kotlin. May 06 15:46:02 Not sure about instrumentation tests. May 06 15:46:45 TacticalJoke: So I'm still stuck with the context stuff. Should I load those resources using File()? May 06 15:46:49 both instrumented and jvm tests May 06 15:46:56 Class not found: "com.yoavst.ohelshem.TestTimetable" May 06 15:46:59 should just work fine May 06 15:47:00 when using kotlin May 06 15:47:17 public class TestTimetable : AndroidTestCase() { throws(javaClass()) public fun testTimetableLoading() { } } May 06 15:48:06 ugh, kotlin didn't get rid of. checked exceptions? May 06 15:48:09 Update appcompat. Breaks Android Studio's ability to preview layouts with Toolbar. May 06 15:48:19 Pretty tired of fighting these updates. May 06 15:49:13 pfnQ: it got, but it still support it for java May 06 15:49:52 so the conversion from java to kotlin file added it May 06 15:50:13 yoavst: It looks like you can just replace the Context parameter with String[] and so on. May 06 15:50:22 I don't know precisely what your 'readRaw' method does. May 06 15:50:31 s/method/extension function/ May 06 15:50:34 read from raw file May 06 15:50:45 "Unfortunatly, kotlin-gradle plugin doesn't support Junit tests for Android at this moment. http://stackoverflow.com/questions/28671696/experimental-junit-support-in-android-kotlin-not-working May 06 15:50:59 Just make Timetable dumb. Make it require everyone else to provide the stuff it depends on. May 06 15:51:01 sucks May 06 15:51:12 yoavst: Then use JVM tests! :p May 06 15:53:38 is there an easy way to partially serialize an object with Retrofit? eg I have a User object, but I don't need (want to) send all the fields on first registration May 06 15:53:49 just the email and password May 06 15:54:42 TacticalJoke: so how would I feed this class in testing? May 06 15:55:14 yoavst, sounds like you can't, crappy plugin May 06 15:55:49 I should add kotlin support to my plugin fir shits and giggles May 06 15:57:03 Mike Wallace: There's a part on http://square.github.io/retrofit/ under "FORM ENCODED AND MULTIPART" that says "Multipart parts use the RestAdapter's converter or they can implement TypedOutput to handle their own serialization." May 06 15:57:10 Maybe that helps? May 06 15:57:28 yoavst: Oh, Gradle + Kotlin is the problem there. Hmm. (I read it as Android testing + Kotlin at first.) May 06 15:57:29 let me check that out, thanks May 06 15:58:00 TacticalJoke: So how should I send the data to the test if there is no context? May 06 15:58:43 Is your class reading the JSON from an InputStream? May 06 15:59:09 I'm messing around with responsive UIs, with a GridView. android:numColumns="@integer/number_thumb_columns" lets me vary this according to screen size and orientation. But what about the ImageView in each "cell" of the GridView? So far I'm locking this to layout_height="100dp" and layout_width="100dp", to force May 06 15:59:14 TacticalJoke: val json = JsonParser().parse(context.readRaw(R.raw.timetable)).getAsJsonArray() May 06 15:59:16 square thumbnails May 06 15:59:27 it uses JsonParser, so it would support InputStream I guess May 06 15:59:32 What does readRaw return? May 06 15:59:46 but is it possible to scale the thumbnails to something like, width = screenSize / numColumns ? May 06 15:59:50 ... in XML? May 06 16:00:48 String May 06 16:02:35 You could pass the String to Timetable or even the JsonArray. May 06 16:04:16 TacticalJoke: but How do I get this string on testing May 06 16:06:15 damn, javadoc.io is broken, I wanted to see the docs for kotlin-* May 06 16:06:43 finally loaded May 06 16:06:57 wow, didn't know this site May 06 16:07:14 org.jetbrains.kotlin:kotlin-project:0.11.91.4: Javadoc is being downloaded for the first time. Normally this will be completed in 10 minutes. Please refresh page again later. May 06 16:07:16 Ironthighs, I think your suggestion is going to work, thanks! May 06 16:08:50 Np May 06 16:12:56 yoavst: Loading test resources wasn't supported (in the context of JVM tests and Android stuff) the last time I checked, so that's the tricky part. May 06 16:13:09 Some supported was added to the Gradle plugin in 1.2, and IDE support will be added in AS 1.3. May 06 16:13:18 Do you need the exact same string? And is it a huge string? May 06 16:16:07 TacticalJoke: huge May 06 16:16:29 67k chars May 06 16:17:33 * pfn puts sbt-kotlin on the backburner for now May 06 16:17:42 since javadoc is taking forever, and I don't care about kotlin May 06 16:17:54 I've installed roboelectric. The only problem is that they do not support typedArray May 06 16:18:05 pfn: they got great website May 06 16:18:08 yoavst, just do not care about Context May 06 16:18:13 yoavst, that easy May 06 16:18:22 inject the values you need into your model class May 06 16:18:30 and use a testwrapper to mock your context data May 06 16:18:50 I'm so close to fix it with context ;) May 06 16:18:58 you aren't May 06 16:19:02 robolectric is an endless pit May 06 16:19:28 well, the getString worked :) May 06 16:19:38 https://github.com/zbsz/robotest May 06 16:19:39 ooh, nice May 06 16:19:46 dude updated it to work with 2.4 May 06 16:26:45 How do I hide the Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar ? May 06 16:45:58 It takes something like 10-15 seconds for my GPS to get ready when I need it. I can sort of predict before it's going to get needed (by being in the activity that leads up to the GPS activity) May 06 16:46:06 can I somehow prepare the GPS, get it started up and finding satellites and all that jazz, but without attaching a locationlistener? May 06 16:46:28 if I do that in the previous activity, I was hoping to reduce the wait time in the actual activity that uses the GPS May 06 16:53:48 kba: maybe consider using other location types than just gps. May 06 16:54:03 How would you store store in a gson object? Just use the Date object? I can't really find something specific for time (H and minute only) May 06 16:58:22 JesusFreke: it's for measuring walking distance, so it has to be fairly accurate May 06 17:00:29 you could attach an empty location listener, and then switch it when you actually need stuff May 06 17:00:44 however, this would cause the user’s battery to be drained more May 06 17:00:49 s73v3r: that was my initial idea, too, I just figured maybe there was a better method May 06 17:07:00 has anyone done nxp Mifare SDK stuff yet... I am having an issue with http://pastebin.com/97yzzP6e May 06 17:11:52 o/ I'm trying to step into 'com.android.okhttp' but it's not in the Sdk/sources/, why and how to add it ? any idea ? )o: May 06 17:12:10 (My origin problem is a setup a response cache, it worked, I have date in it that I can see using `adb shell`, but now I only have gateway timeouts from the cache) May 06 17:12:23 Hi, I'm encountering a problem with installing an app from android studio to a physical device ... The app runs okay, but when i try to eropen it, it's not among the other apps. How can I fix this ? May 06 17:21:38 Tuly-, category launcher May 06 17:21:55 I've already set the intent-filters May 06 17:22:53 both the category and the action May 06 17:22:53 that is your only answer May 06 17:23:08 mandark: you can probably find the source in AOSP May 06 17:24:16 pfnQ, is there anything else I can try ? May 06 17:24:39 being more specific is the best thing to try May 06 17:25:16 What would you like to know ? May 06 17:25:51 The thing is that I haven't always have dat problem May 06 17:25:55 not my job to ask May 06 17:26:02 Ok Ok May 06 18:02:58 Does anyone know a good website to leave up while i catch a few minutes of rest ? May 06 18:03:19 http://rainymood.com May 06 18:03:31 http://www.theuselessweb.com/ May 06 18:03:53 oh it redirects do developer android May 06 18:05:08 TacticalJoke: and while that is playing, anything to cover my scren to make it look as if im working? May 06 18:06:23 I've seen sites like that. I can't remember the URLs. May 06 18:07:42 * JesusFreke remembers "boss" screens in old dos games May 06 18:09:49 TacticalJoke: thanks for the url May 06 18:15:40 Could someone please help me understand this Gradle Build error? http://pastebin.com/SwXfBQus May 06 18:16:53 here comes Android M May 06 18:18:33 eh, a talk on "Android Application Architecture" .. i still havent figured that one out so i better watch it May 06 18:19:53 Updated my Tesco Hudl 2. Now it won't boot or charge. May 06 18:20:03 oh no TacticalJoke May 06 18:20:14 TacticalJoke was it OTA or some manual update May 06 18:20:20 OTA. May 06 18:20:27 jesus May 06 18:20:29 Tesco is gonna fix it though. May 06 18:22:51 so I read somewhere that adding retrolambda to your project breaks your static code inspection with lint May 06 18:22:52 I’m looking through the schedule, and unfortunately it looks like half the sessions i’d be interested in aren’t streaming :( May 06 18:23:05 is that just for the parts with the retrolambda or is it the whole project? May 06 18:28:33 jephillips i thought files with lambdas May 06 18:33:43 oh application architecture is a sandbox event, so i guess thats not filmed May 06 18:33:56 that sucks :( May 06 18:34:34 g00s: you thought files with lambdas? May 06 18:35:01 do you mean just the entire files with the lambdas within them will break? Wording has me a little confused May 06 18:35:02 thats what i read on /r/androiddev a week ago May 06 18:35:17 yeah the files with lambdas May 06 18:35:44 hmm that is unfortunate May 06 18:37:47 ohh May 06 18:37:48 GCM 3.0 May 06 18:45:37 Ashiren: ah yes. I remember this one: http://www.staggeringbeauty.com/ May 06 18:49:58 there is time to read the docs May 06 18:53:20 Mavrik: GCM 3.0: now with new bugs! May 06 18:53:25 anything interesting though? May 06 18:54:36 I heard that the bugs now use Rx and Java 8. May 06 19:01:23 so. loaders suck. has anyone seen any good articles or libraries for replacing loaders with.... something else? May 06 19:04:24 Wavesonics there is a new article every day, because its a difficult problem to solve ;) May 06 19:04:45 g00s: any ones you'd like to share? May 06 19:05:22 Wavesonics for db or in general ? May 06 19:06:09 in general, mostly network loading. I just need the ability for them to survive orientation change and still get their callbacks May 06 19:08:42 pfn I've finished writing the testing - http://pastebin.com/aJJsuNQD May 06 19:13:35 hello May 06 19:13:36 anyone utilising the youtube 2.0 api atm? May 06 19:17:36 sorry to keep asking this, but does anyone know a “best way” to force a camera preview into a certain aspect ratio? May 06 19:17:45 my method keeps working on some phones but not on others May 06 19:19:48 right now I basically have this: May 06 19:19:48 https://bpaste.net/show/f8033efb6cd6 May 06 19:20:18 “forces” it into 4:3 May 06 19:23:10 Wavesonics: hooray another anti-loader! any reason in particular? May 06 19:23:38 is that better or worse than a free-loader? May 06 19:23:54 it prevents cancer May 06 19:23:55 any advice at all? May 06 19:24:06 at this point i’d settle for a “hello” May 06 19:24:19 in_deep_thought: don't stick a fork in an electrical outlet May 06 19:24:32 JesusFreke: ahhh thank you! I do exist! May 06 19:24:37 good advice May 06 19:24:47 I thought so :) May 06 19:25:07 unfortunately, that's about the extent of my knowledge about the camera apis :) May 06 19:25:47 but if you are in_deep_thought , how can you stick a fork in an outlet? May 06 19:26:02 I haven’t tried May 06 19:26:09 Ive thought about it May 06 19:26:15 maybe contemplate sticking the fork in the outlet May 06 19:27:17 well, if you did, I think there would be some pretty deep thinking along the lines of "OOOOOOOWWWWWWW!" May 06 19:28:03 I am sometimes so deep in thought that I lose all senses May 06 19:28:11 in_deep_thought: there's really only two ways, or one if you need to support gingerbread. 1) + make the surfaceview the preview's actual size, scale to fit inside the framelayout. make sure you cover the outside though, because surfaceview won't crop. or use a textureview instead (same technique). May 06 19:28:21 so maybe I would just be thinking and pondering what is happening without feeling May 06 19:28:32 in_deep_thought: alternatively, you can make a textureview the size and shape you want, and set a transformation matrix to correct the stretching. May 06 19:28:36 that's it. May 06 19:29:07 thanks groxx May 06 19:30:05 so the surfaceview holds the camera preview, but don’t I have to force the camera preview to return the correct ratio? May 06 19:30:21 out of its “getSupportedPreviewSizes”, I have to choose 1 right? May 06 19:30:44 eeyup May 06 19:31:44 hey TacticalJoke http://pitest.org/ May 06 19:31:47 in_deep_thought: it may not be available, so you'll _have_ to have a fallback, which means you'll _have_ to handle weirdly-sized ones. May 06 19:31:53 Ashiren is Hodor :D May 06 19:32:03 doesn't matter what size you pick, it might not exist on device X. May 06 19:32:51 groxx: right but I can compare it against a ratio right? loop through the reported sizes and check them against 4/3 May 06 19:32:57 and get the ‘closest' May 06 19:33:18 in_deep_thought: sure, but there might only be one, and it might be 16x9, for example May 06 19:33:53 groxx: several known bugs have bit us in the ass, the whole index paradigm is crappy May 06 19:33:54 there's no guarantee any particular one exists, regardless of what you're looking for. do it right, and it works in all cases, or don't do it right, and guarantee it won't work on some devices. May 06 19:34:11 there's no middle ground here, sadly May 06 19:34:18 so if i were to pass a 16 x 9 resolution into my transformation matrix into a 4:3 sized textureview, it would stretch no matter what right? May 06 19:35:04 if you found one, yes. May 06 19:35:20 Interesting, g00s. May 06 19:35:42 for who-knows-what-reason, both stretch to fill the surface/texture. and textureview doesn't give you the transformation matrix that it's using, so you have to figure it out and undo it (not too hard) May 06 19:36:56 groxx: are you speaking from experience or is there somehwere I can read more about this? May 06 19:37:30 groxx speaks with authority ! May 06 19:37:46 no i know that, its just hard to take it all in like this May 06 19:38:05 you have to use either a textureview or a surfaceview to display it, and they're both pretty restricted (so there are only a few possibilities, try them all) and have immediately-visible behavior. as far as preview sizes, experience, plus documentation _implies_ all that, though I don't remember specifically. May 06 19:38:36 hey guys, howdy? May 06 19:39:07 Captain Howdy said he's sleeping. May 06 19:39:27 I'm trying to set an event on soft keyboard show so that I can scroll a scrollview to its bottom when the keyboard appear May 06 19:39:30 preview sizes get even worse in experience, because some devices lie, and e.g. the largest preview simply doesn't work. or crashes. or preview size X doesn't work with capture size Y. or crashes. and _literally_ every call into the camera API can crash, even ones that obviously can't, like getSupportedPreviewSizes, so you may want to wrap everything or May 06 19:39:31 just allow the crash because the device is having problems. May 06 19:39:31 have you tried that? May 06 19:39:39 it may not be the best idea to acchieve this May 06 19:40:03 Hey guys. Anyone have any pointers on implementing camera stuff now that there are two separate APIs? I guess it makes most sense to have an abstract "wrapper" type class which uses one or the other API in the backend depending on SDK version? May 06 19:40:07 custom cameras are _hard_ on android. May 06 19:40:59 why are there so many different androids? everyone should only be allowed to buy Nexus’ May 06 19:41:09 so we only have to deal with 1 set of hardware May 06 19:41:19 blame the commies May 06 19:41:33 Chamooze: yeah, that's a pretty common pattern. personally, because the internals are pretty different, I'd make your wrapper as high level as possible. e.g. "capture picture at size X -> async callback providing the final image", and share code where able behind the scenes. May 06 19:43:35 groxx: yeah, that's what I was thinking. I actually "only" need to show the camera preview for my app, so should be fairly easy to create a high-level interface... implementation on the other hand, might be trickier. :D May 06 19:44:20 groxx: any idea if this problem is gonna get better once everyone is on android 5/camera2/? May 06 19:44:23 Chamooze: yeah :) I haven't played with Camera2 yet. not enough users. May 06 19:46:01 in_deep_thought: ¯\_(ツ)_/¯ I sure hope so, but the only way I can see things really improving is if Google adds/has added a LOT of conformance tests for camera implementations. the API can be worked with regardless of what it is, the problem is bugs. Camera2 _mostly_ speeds things up and gives finer-grained control - you can do almost everything (more May 06 19:46:01 slowly) with the older API. May 06 19:46:22 anyone utilising youtube v2 api? May 06 19:47:19 I think camera2 also adds some newer built-in assumptions, like autofocus / etc. but it's still loose enough to allow lots of weird future tech changes, so _really_ fine tuning things will probably always be a lot of work. May 06 19:48:07 Is there a reason why geolocation works on every browser except the mobile version of chrome on android? May 06 19:48:12 groxx: only about 4% of my users are running android 5 so far, but i'm seeing a pretty decent increase in installs on v5 last month, so... might as well, since the old API is deprecated. May 06 19:49:17 MetalHead77 which Chrome for Android? there are at least 8 :) http://www.quirksmode.org/blog/archives/2015/02/chrome_continue.html May 06 19:49:37 Chamooze: good luck :) it's likely to be a fair bit of work to handle the 96% though, I'd probably start there unless camera2 offers something really compelling May 06 19:50:27 groxx: oh, I've already implemented it using the old API.. I'll have to redo some of the work though, to stuff my existing code in a wrapper May 06 19:50:50 aah, cool. yeah, I'd certainly be curious myself. other projects are more pressing, otherwise I'd have looked into it already May 06 19:51:28 g00s: This one May 06 19:51:29 https://play.google.com/store/apps/details?id=com.android.chrome&hl=en May 06 19:57:29 "incompatible types: int cannot be converted to String" I get at on line case R.string.menu_settings, what's wrong ? May 06 19:58:01 Narzew, something is expecting an int and you're just giving it the id of the string in your resources. May 06 19:58:07 Expecting a String* May 06 19:58:31 R.string.menu_settings returns int? May 06 19:59:06 Yes. everything in R.*.* is an int May 06 19:59:11 Yes... May 06 19:59:15 Narzew: Check this document: http://developer.android.com/guide/topics/resources/string-resource.html May 06 19:59:18 it contains the resource ids for all the various resources May 06 19:59:36 It would use a lot of memory if it had to keep that all in memory. May 06 19:59:41 getResources().getString(R.id.menu_settings) will return settings ? May 06 19:59:47 Yes May 06 19:59:47 string* May 06 20:00:28 doubtful. May 06 20:00:45 maybe getString(R.string.menu_settings)? :) May 06 20:02:19 These uses of "string" must sound so weird to non-programmers. May 06 20:02:36 both getResources().getString(R.id.x) and getString(R.id.x) not worked May 06 20:07:11 R.id.x is for _ids_. identifiers. not names. if you want to get a string, use R.string.x. May 06 20:08:28 Hmm, I keep getting several calls to my surfaceChanged when starting/returning to my app. Is there any way to know when Android is done laying out stuff? heh May 06 20:10:37 any idea guys? how do you scroll a scrolview so that its bottom is always visible, even when the soft keyboard appears May 06 20:10:40 I tried 3 methods, no one worked for me. I want to use it in switch-case statement as String value. R.id.menu_settings => bad; getResources().getString(R.id.menu_settings) => bad; getSTring(R.id.menu_settings) => bad; what I'm doing wrong ? May 06 20:10:43 Chamooze: eh... not really. ultimately anything can cause another round of layout changes, and if you do that multiple times it'll usually do two layouts, then try again after whatever the current state is is rendered. May 06 20:11:02 R.string* May 06 20:11:07 Chamooze: fwiw I'd highly recommend building a custom view to do anything layout related. it's easier to deal with the layout system from the inside. May 06 20:11:48 Mattx: on layout change, if height < previous height, and previous-distance-to-bottom == 0, then scroll to bottom? May 06 20:12:19 Narzew: I really don't know what you're trying to do there. pastebin some code? May 06 20:13:48 groxx: https://pastebin.com/CPTyxFQp May 06 20:13:50 Mattx: that'll also handle "stay at bottom if leaving full screen mode", for instance May 06 20:13:51 groxx: hmm, not sure what you mean. I'm subclassing SurfaceView to show the cam preview and added it to my layout xml (in a FrameLayout, match_parent x match_parent) May 06 20:15:02 Using nineoldandroid, I set my toolbar's translation on scroll of a RecyclerView, but it looks like only the canvas of the Toolbar is translated, not the RecyclerView. How do I get the RecyclerView to take up the space "left behind" by the moved toolbar? May 06 20:15:05 surfaceview specifically I'd recommend subclassing FrameLayout, and placing the surfaceview at the size and place you want in onLayout May 06 20:15:24 subclassing surfaceview to try to control its size is the wrong level of control. that's the parent's job. May 06 20:16:40 groxx, what layout change are you talking about? I think it could work May 06 20:16:50 never setted such a lisener, I'll try, thanks May 06 20:18:38 groxx: oh, I'm not trying to control its size at all. what happens is, when you return to the activity from any activity that's in portrait layout (my activity has screenOrientation="landscape"), surfaceChanged gets called twice - first with the width and height as if it's being laid out in portrait mode, then with the "proper" width and height. May 06 20:18:43 anyone who knows retrofit: How do I get a List object from this JSON? http://pastebin.com/Fj4UhVVX May 06 20:18:44 I made a Game POJO that fits with each field for every object in the response JSONArray. May 06 20:19:21 You don't need to do anything special. May 06 20:19:27 Return type = List May 06 20:19:36 just says you want a List in your callback May 06 20:19:57 I did, but i'm getting a null response. H/O, i'll post stacktrace May 06 20:20:02 pwnies, did you use http://developer.android.com/reference/android/util/JsonReader.html May 06 20:20:23 didn't use JsonReader May 06 20:20:24 groxx: it's even better when using IMMERSIVE_STICKY, then surfaceChanged gets called thrice - third time being after it has hidden the navigation keys. :D May 06 20:20:45 pwnies, how are you converting the json string to object then? May 06 20:21:10 there are other libs, JsonReader comes with android so your install is smaller. May 06 20:21:12 groxx: and it does this every time you return to the activity, not just on first creation. a bit odd behavior IMHO. :) May 06 20:22:04 all, should we be using Pojo’s at all? It seems like Android is geared to the cursor/provider pattern. May 06 20:27:10 anyone? I’ve been wondering about it for a while. It seems like using List and the like really cuts against the grain in Android. May 06 20:27:46 stacktrace + relevant classes --- http://pastebin.com/5eizGjE3 May 06 20:29:01 idk virimunid, i'm just trying to find something that works. May 06 20:29:08 virimundi* May 06 20:29:20 Hello, looking for advice, I have a very big app, 50 different screen types which display something similar to different catalog pages, each has it's own unique layout. I want to design a refresh mechanism that if a given screen registers for periodic refreshs, then the app will go to the server and fetch new content for that screen if anything was added. not sure where to start... any advice? May 06 20:29:30 That’s fair. That question is actually why I logged in just now. Happy occurance. May 06 20:30:18 what do you mean "cuts against the grain"? May 06 20:30:18 good day everyone, quick question, if i have a path that is created by drawing a figure on the canvas, i can get the distance of it with PathMeasure, and i can get points along the path with PathMeasure.getPosTan() but can i get a start/end point of a path somehow? May 06 20:30:31 Pwnies, could you include the whole class for the DownloadService? May 06 20:31:21 Pwnies, I’m in the process of taking the free Udacity Android course from Google. They recommend the cursor pattern. I’ve never seen them use Pojos. Infact, it looks as if few Google internal applications use Pojos for data transfer. May 06 20:31:41 viran, you can setup a timer that will refresh each page in order (maybe a linked list of those screens) and if the refreshed version is not identical to previous fetched version, update with the newly downloaded version May 06 20:31:47 By cutting against the grain, I mean that the process of using Pojo is harder since Android provides nice things for Cursors. May 06 20:32:25 http://pastebin.com/02yK5q8B May 06 20:33:33 Pwnies, could you include the imports? I’m trying to line up where the NPE is occuring based on the stack. May 06 20:33:35 is there such a thing as a Composible List Adapter? May 06 20:34:43 Pwnies: I'd try writing methods toContentValues, fromContentValues for your Game class May 06 20:34:48 http://pastebin.com/b94XxPqV May 06 20:35:17 Pwnies: or fromCursor() for that matter May 06 20:36:03 DmitryS: How such a timer would be implemented? May 06 20:36:51 icedp, can you shoot me some docs on how to do so? May 06 20:37:21 use java.util.Timer and java.util.TimerTask May 06 20:37:27 pretty sure you can find good code examples May 06 20:39:44 got disconnected, viran... should I use alarm manager? May 06 20:39:47 When is onCreate() called in an Activity? I am not sure if I understand how Android's multitasking works... When I close an app with back button, opening it would create a completely new Activity instance? May 06 20:39:51 Pwnies, it looks like you might have a threading issue. May 06 20:40:22 dimitrovskif: It depends. The Activity might remain in memory, in which case OnResume would be called May 06 20:40:26 Pwnies: I mean just put into your Game class method: public ContentValues toContentValues() {....; return value } where .. is your code in for circle in your paste May 06 20:40:28 ugh May 06 20:40:34 Pwnies, the variable mGameSeasons looks to be getting reset during iteration. May 06 20:40:42 Or, if the system has killed your app to reclaim memory, then it would be recreated May 06 20:40:46 s73v3r: So should I initialize Fragments inside onResume()? May 06 20:40:47 Pwnies: that you can just call resolver.insert(..., game.toContentValues()) May 06 20:40:55 DmitryS: maybe I missed you reply about implementing a timer, alarm manager? May 06 20:40:57 Pwnies: you probably has a lot of that stuff repeated May 06 20:42:15 well, if your Activity hasn’t been killed, then you wouldn’t need to re-initialize the Fragment May 06 20:42:19 s73v3r: What's the purpose of Activity.onCreate? I can't understand when to set content views, when to initialize class variables, what is restoring... May 06 20:42:35 Pwnies: also, should you create a new ContentValues in the loop? May 06 20:42:41 it’s where you do the initial setup of your activity May 06 20:42:57 s73v3r: Why the f*** is there a saved instance state? Is that to recover an old state after app got killed? May 06 20:43:07 yep May 06 20:43:10 Ohh May 06 20:43:12 or after Activity gets killed May 06 20:43:32 virimundi: alright, i moved the new contentvalues creation in the loop May 06 20:43:46 So, pressing Home button wouldn't need a saved state right? (Unless there is no memory and android force closes the activity) May 06 20:44:16 When I press home button and then click the app, only onResume() gets called, the stack is the same, all variables are same right? May 06 20:44:17 virmundi how would mGameSeasons be getting reset in the loop? May 06 20:44:38 i believe so May 06 20:45:17 Pwnies, it depends on when your intent is firing. Screen rotations might trip it. Another back ground task. May 06 20:45:17 So should I save instanceState? Like, filling a form. Do you usually save the state or just make the activity blank if you open it after it getting killed? May 06 20:45:18 icedp: I'm trying to make a List object; May 06 20:45:35 depends on the needs of the application May 06 20:45:59 s73v3r: Ex. a login form, you don't have to add user/pass to the state right? May 06 20:46:20 i explicitly would not save the instance state for that May 06 20:46:47 setTranslateY sets the Y-translation where it sits POST layout, can I change that position pre-layout? May 06 20:46:59 I'd need to update layout parameters, wouldn't I? May 06 20:47:03 pwnies, May 06 20:47:53 pwnies, sorry. The reason it’s null is probably because getNiceTimeApiClient is probably creating a new thread to get the list and Android just plows on through your code. May 06 20:48:14 Move everything from line 48 to the end of the method into the succes method. May 06 20:48:27 bye May 06 20:55:18 that worked beautifully virmundi!! May 06 20:55:24 thank you May 06 20:56:45 s73v3r: This is bad , right? http://paste.ofcode.org/uHX9cQ2UBMh4zANtDJ9mn6 May 06 20:57:28 s73v3r: frag1 and frag2 will be null the first time May 06 20:57:49 I think for fragments, you would consult the Fragment Manager, not the saved instance state May 06 20:58:05 ?? May 06 20:58:46 Fragments have a different lifecycle than Activities. For one, they aren’t destroyed on rotation like Activities are May 06 21:00:05 the fragment manager should hold on to them if needed May 06 21:03:55 s73v3r: So? May 06 21:04:32 you wouldn’t need to hold onto them again in your saved instance state May 06 21:05:33 I dislike that IO site. It feels so slow and annoying. May 06 21:05:50 I realise I'm supposed to react like "Wow, that's no neat. Material design is amazing". May 06 21:05:58 But it's just weird. May 06 21:06:27 it’s not slow for me May 06 21:07:17 It's CPU-slow on my phone (but not on my laptop). Though the slowness I'm referring to here is how slow it feels when changing tabs at the top. May 06 21:07:28 There's no instant feedback; I have to wait. May 06 21:08:32 It's like they feel that animations are more important than content. May 06 21:09:13 I'm trying out MVP and Rx. I have a presenter that I call from a view to do an async operation with RxJava/Android, that then calls back to view to set a a TextView. If I rotate during the async operation the operation still completes and calls back to my view, which now has a null TextView. The NPE is caught by Rx though. Why is this? May 06 21:10:11 1) How do I handle config changes with MVP like this, but two I thought it would bomb out. May 06 21:10:12 TacticalJoke: yeah, and buggy. I hit a fair number of spots where the UI wouldn't be synced right, or clicking would do nothing (when it obviously should), etc May 06 21:10:25 this annoys me to great lengths... java.lang.ClassNotFoundException: android.support.v7.cardview.R$styleable May 06 21:11:49 Anyone know how to solve that? May 06 21:11:53 Is there a reason why HTML5 Geolocation works on every browser except the mobile version of chrome on android? May 06 21:13:08 ReScO: dunno. more context would probably help. proguard? should you be using com.your.app.R.? are you using it through gradle or in Eclipse? May 06 21:16:41 groxx: http://pastie.org/private/jmmppddjvbklqdhzu8wpng May 06 21:16:53 Stacktrace, trying to use the Visual editor as preview May 06 21:21:07 ReScO: ah. make sure you've triggered a build, and you might need to use your application's theme, if you're not? May 06 21:21:38 groxx: using AppTheme, but it seems Android Studio is using deprecated and old stubs May 06 21:22:06 could be. I dunno beyond that, unfortunately :\ May 06 21:22:34 http://explod.io/hosted/toolbar.mp4 This is the problem I'm experiencing with hiding the toolbar on scroll - please enjoy ;D May 06 21:23:27 The background of the activity is cyan to demonstrate the empty space that appears May 06 21:23:54 groxx: what do i need to use the appcompat-v7 lib? what would be the min. sdk? May 06 21:25:10 I needed to install all android sdk versions available from the SDK manager May 06 21:25:16 any min sdk should be fine, though the appcompat stuff won't work below v7 May 06 21:25:16 * ReScO facepalms May 06 21:25:39 no, you should just need to install your target sdk, and maybe the newest for appcompat May 06 21:26:19 and either way I think that would be a build-time error. May 06 21:26:44 Surely someone is interesting in a screencast :U May 06 21:26:59 ping me if you have any ideas- I'm gonna have to rest on this one May 06 21:27:05 Hmmpf, having a lot of trouble understanding how CardViews work and Fragments... May 06 21:27:06 explodes: what's the bounds on your listview? May 06 21:27:19 match/match May 06 21:27:26 below toolbar May 06 21:27:42 and I assume you're just setting translationY or something on the toolbar? May 06 21:27:53 "below toolbar" in a relativelayout? May 06 21:28:01 http://pastie.org/10174626 May 06 21:28:03 yea May 06 21:28:19 I tried it with LinearLayout (vertical) also and got the exact same results May 06 21:28:45 yeah. so if you're just translating the toolbar, the top edge of the listview hasn't changed. it's avoiding the listview's layed-out position. translation isn't included in that. May 06 21:28:52 What I've read about the setTranslation method that I'm using is that it sets translation post-layout May 06 21:28:58 yes May 06 21:29:37 Is there a way to make the translation "pre-layout" ? May 06 21:30:01 try a framelayout instead of relative, add paddingTop to the listview, and clipsToPadding=false. that'll start it padded down, but let it draw all the way to the top as you scroll. May 06 21:30:24 huh May 06 21:31:02 as long as the padding == the toolbar, and you don't move the toolbar away faster than the list scrolls, you'll never see the background. May 06 21:31:59 unknown attribute clipsToPadding May 06 21:32:09 clip, not clips, sorry May 06 21:32:16 ayy cool May 06 21:34:51 all that did was removed the cyan (with the adjustment that the toolbar was listed 2nd) May 06 21:35:01 *typo May 06 21:36:37 you've got padding on the list, not on the container? May 06 21:45:12 yea May 06 21:45:29 hey guys May 06 21:45:34 oh hey buddy May 06 21:45:39 I've question bout listview item clicked May 06 21:46:19 I have a listview with custom selector and if I click on a item I want that this item stay highlighted till I click the next item May 06 21:46:34 k May 06 21:46:35 I used this code but it did not work May 06 21:46:36 http://pastebin.com/9wLcacfq May 06 21:46:59 anyone an idea why? May 06 21:47:21 use view.setSelected May 06 21:47:33 the checked/selected API is really kind of crappy: they mix up the words or something May 06 21:47:48 I have some code that does exactly what you're trying, let me pull it up for reference May 06 21:49:12 TIL: activity.onStart is apparently when fragments resume. in some cases or something. it just happened on a gingerbread phone :| May 06 21:49:30 if I use view.setSelected the highlight colour changes to orange but does not stay highlighted May 06 21:49:49 shiiiit son May 06 21:50:04 ChampS_: I remember it being a pain in the ass May 06 21:50:35 oh yes May 06 21:50:52 Oh you're not going to like my solution May 06 21:50:57 I don't like my solution May 06 21:51:09 seaching for hours without a result May 06 21:51:16 xD May 06 21:51:27 changed the colour programatically? May 06 21:51:48 no, and actually it drills down to something not so terrible May 06 21:51:56 view.setActivated May 06 21:52:11 and May 06 21:52:24 android:state_activated="true" May 06 21:52:27 in your selector May 06 21:52:28 and May 06 21:52:49 thats what i tried first May 06 21:53:01 cause activated is the best solution May 06 21:53:06 but that does not work too May 06 21:55:30 in my selector file May 06 21:55:51 so I have a User object in the db. With restraints on certain fields (i.e phone number not empty). I create the User using a Wizard. But on the first page of the wizard, I don't have a complete object yet. But I do want to send that info to the server. How would _you_ go about this? (yes, you!) May 06 21:55:56 and view.setActivated(true); in my setOnItemClickListener May 06 21:56:06 you also need to May 06 21:56:09 i'm trying to find it May 06 21:56:13 but there is one last piece May 06 21:56:40 yeee May 06 21:57:09 on getView you need to reset the activated state May 06 21:57:10 is there something in Android that would allow for adapters to be componentized? I have a bunch of lists, each with different kinds of cells. But they all are made up of some combination of background images, titles, subtitles, overflow menus. May 06 21:57:56 Rather than write several adapters that are similar, except for not having a subtitle, or for having a menu, I’d like an adapter that can be composed of other adapters, each one taking care of one part of the cell May 06 21:58:04 MikeWallaceDev: if you really really need to send it before it's complete, then it's clear you only have two options.. represent an empty phone number with something like 0 (which is undoubtedly going to be the cause of bugs) or remove the not null May 06 21:58:06 ChampS_: somwhere you need to record the activated state, say boolean[] mActivated = new boolean[mItems.size()]; or whatever and when you setActivated() record that in mActivated, and in getView() do view.setActivated(mActivated[position]) May 06 21:58:21 explodes: if i set the view activated i got a blue highlight but it does not stay blue May 06 21:58:40 One adapter for the images, one adapter for the titles, etc. They would all come together and produce one finalized cell May 06 21:58:40 s73v3r: ListView or RecyclerView ? May 06 21:58:41 ah ok i will try thx May 06 21:58:47 either or May 06 21:59:10 wabz, well, I already have another option... Create a temp table that doesn't have the restrictions... Then when the object is complete, move it over to the real table. May 06 21:59:20 so there are at least 3 options :D May 06 21:59:29 ChampS_: what does your look like? I see those messed up a lot May 06 22:00:09 there you go then :p May 06 22:00:35 I'm looking for a 4th option ... That one doesn't seem clean to me May 06 22:00:45 groxx: http://pastebin.com/9wLcacfq May 06 22:01:01 (well, no, it DOES seem clean to me. It's doesn't seem clean to my partner. So I'm looking for options) May 06 22:01:16 s73v3r: maybe get list view's adapter: getItemViewType method will help? or RecyclerView parent classes and subclasses could help May 06 22:01:29 s73v3r: adapters of adapters isn't really a clean solution, though. May 06 22:01:44 what database are you using? May 06 22:01:56 ChampS_: and it doesn't stay... when you scroll it away and then back? or other times? May 06 22:02:03 s73v3r: oh wait, I see what you're saying, you have multiple lists that all apply to one cell? May 06 22:02:06 wabz, on the server, MySql May 06 22:02:12 find out if it supports a conditional not null May 06 22:02:14 s73v3r: create a POJO that combines the values, IMO May 06 22:02:18 in some way May 06 22:02:35 multiple lists that apply to similar cells. One might have a background image, title, and subtitle May 06 22:02:44 another might just have a background image May 06 22:02:49 funny, I thought of that, but then didn't think that existed... May 06 22:02:56 i see, yea, that would fall under getItemViewType May 06 22:03:07 s73v3r: ^ May 06 22:03:09 a third might have a background image, title, and menu May 06 22:03:13 [00:01:56] ChampS_: and it doesn't stay... when you scroll it away and then back? or other times? <<< I click on my item and I see just the highlight and then the item is going back to transparent colour May 06 22:03:43 ChampS_: immediately? May 06 22:03:49 s73v3r: return 0 to get/create a header, 1 for a background image only view, 2 for a menu view, 3 for whatever else, ad infinitum May 06 22:04:12 that seems messy for adding new cell types May 06 22:04:31 groxx: yes May 06 22:04:39 MikeWallaceDev: I think you could do it with a before insert trigger May 06 22:04:52 especially because, inside one particular list, all the cells would be the same May 06 22:05:18 groxx: what kind of common mistakes? maybe I'm making them May 06 22:05:57 ChampS_: when the view comes in, you need to mark it as selected somehow. May 06 22:06:09 wabz, I don't follow.. How? May 06 22:06:11 ChampS_: it's not going to remember selected indices for you May 06 22:07:07 you could have a field that indicates that the object is incomplete - if it's true, don't worry about null items May 06 22:07:16 ChampS_: have you set a choice mode on the list? May 06 22:07:25 yes groxx single May 06 22:07:49 e.g. have phone number allow null fields, but enforce not null it in the trigger if the complete field is set May 06 22:08:03 wabz, right. I think I'll look into that May 06 22:08:32 I don't think your solution is bad though May 06 22:09:40 explodes: generally, people setting "state_x=true state_y=false" (not usually necessary) and having "state_x=true" entries but no "" entry. I forget if not having a "default" state _leaves the current state_ or clears it, but it's not _usually_ what you want. in the case of a temporary highlight, it might be. May 06 22:10:23 Is it possible to center a framelayout within a RelativeLayout or should I use something else? May 06 22:10:40 F1skr: layout_centerInParent=true May 06 22:11:24 groxx: doesn't seem to work? Maybe because I set the width and height of the framelayout in my activity's Oncreate? May 06 22:11:28 F1skr: check RelativeLayout.LayoutParams for your options. or let your IDE autocomplete, and browse them. May 06 22:11:58 F1skr: could be. if you're doing stuff outside the normal layout options, anything's possible May 06 22:12:22 groxx: he makes it sound like the highlight resets after it leaves the screen and returns, is that right, ChampS_ ? May 06 22:16:21 How can i make action view in toolbar the same size as the menu item? May 06 22:18:52 explodes: I click this item, i got that highlight and then the item is transparent again May 06 22:21:28 wait i'll capture a video May 06 22:22:05 yeah, video sounds good. I've seen like a dozen different kinds of behavior that could all be described as that. May 06 22:22:26 the exact timing and anything else that is done / happens on the device is _hugely_ important. May 06 22:25:05 Guys I need to return a property in a method May 06 22:25:16 Im creating the property outside of an inner class inside the method May 06 22:25:27 But I want to assign the value to the property inside the inner class May 06 22:25:41 Problem is: to access a variable inside an inner class, needs to be final May 06 22:25:48 But if its final, I cant add value to it May 06 22:25:52 So im stuck May 06 22:26:15 Best thing I can think of is making it a class private property May 06 22:26:28 or just returning the value of the property in the method May 06 22:26:39 or use a temp var May 06 22:26:43 drose379: sounds like you're making an anonymous class? May 06 22:26:49 then assign that to the final var May 06 22:27:14 You cant assign a value to a final var May 06 22:27:25 i = 3; final j = i May 06 22:27:33 really, ok May 06 22:27:43 what if i do May 06 22:27:47 final j = null May 06 22:27:49 then later in the method May 06 22:27:54 j = "3" May 06 22:27:55 then it's already assigned May 06 22:28:19 drose379: so do you have `method() { int x; new Runnable() { run() { x = 5; } }.run(); }` or something equivalent? May 06 22:28:30 you can do final int j; then assign j in a constructor May 06 22:28:39 groxx want a pastebin May 06 22:28:44 Its a okhttp request May 06 22:28:47 will probably help May 06 22:28:54 I am getting the value inside a inner class May 06 22:28:56 Ok one sec May 06 22:29:37 Notice the iBytes var: http://pastie.org/10174692 May 06 22:30:02 ah. well that won't run until "later". your method will return and end before it's ever called. May 06 22:31:04 what do you mean May 06 22:31:13 It doesn't make sense for your "iBytes" variable to be a local variable. May 06 22:31:19 not sure what you are trying to do here... May 06 22:31:30 It could take 30 seconds before iBytes is set. Why would the method still be running? May 06 22:31:38 drose379: I mean .enqueue is an asynchronous call. it doesn't happen immediately, and your code doesn't wait for it to run before continuing. May 06 22:31:49 what TacticalJoke said. May 06 22:31:59 and what groxx just said :D May 06 22:32:16 Its in an AsyncTask May 06 22:32:25 throw new StackOverflowError("What MikeWallaceDev said."); May 06 22:32:31 :D May 06 22:32:42 so itll wait until evertything is loaded and then I make a callback with all data May 06 22:33:01 errr... no. May 06 22:33:29 Why? May 06 22:33:39 that's what the call back is for May 06 22:33:54 because enqueue is async May 06 22:34:06 I know, I show a loading dialog until I get the callback form AsyncTask May 06 22:34:21 Which will tell me that all my data has been grabbed May 06 22:35:39 you can either make iBytes a member of your class, or even make an instance of Callback and make that a member... May 06 22:36:05 I have a static method in the parent class that im using as a callback May 06 22:36:12 and I made iBytes a member of my class May 06 22:36:22 But, does onPostExecute get caled when doInBackground is done? May 06 22:36:31 yes May 06 22:36:35 yes May 06 22:36:36 but May 06 22:36:43 The request may still be running... May 06 22:36:45 shit May 06 22:36:53 doInBackground is going to finish way before the request May 06 22:37:07 not may, WILL :D May 06 22:37:12 and it's not even "may still be running", it's "probably hasn't even started" May 06 22:37:28 Ok, so that all because of .enqueue May 06 22:37:36 yep May 06 22:37:41 Theres another method instead of .enqueue May 06 22:37:43 Ummm May 06 22:37:48 .execute May 06 22:37:49 I think .execute()? May 06 22:37:50 Yes May 06 22:37:57 well, not BECAUSE of enqueue, because you're not using it correctly May 06 22:38:03 Right May 06 22:38:12 So .execute() is syncronous May 06 22:38:36 "Just use a Thread :D" May 06 22:38:38 you can also make your Class implement Callback May 06 22:38:46 How would that help May 06 22:38:55 and then those methods would be directly accessible May 06 22:39:13 so onResponse and onFailure would be members of your Class May 06 22:39:24 (like when you implement onClickListener) May 06 22:39:29 true... May 06 22:39:51 But execute is synchronous, so the program waits until its finished, or until a response comes May 06 22:39:52 That's probably the easiest way for you right now May 06 22:39:54 Is that correct May 06 22:39:57 --^ May 06 22:40:01 drose379: ThreadPoolExecutor.execut is asynchronous. May 06 22:40:05 execute* May 06 22:40:15 I mean OkHttpClient.execute May 06 22:40:25 Call.execute is synchronous, yeah. May 06 22:40:25 yes, your correct, but you are overcomplicating it May 06 22:40:45 if you implement Callback, you can lose the whole asynctask May 06 22:41:04 But lemme get one thing straight May 06 22:41:22 sure, but imma gonna finish first May 06 22:41:25 :D May 06 22:41:28 Go ahead May 06 22:41:30 * groxx runs for coffee May 06 22:41:34 I was kidding :D May 06 22:41:37 Oh May 06 22:41:38 lol May 06 22:41:39 * groxx wasn't! May 06 22:41:39 Kanye... May 06 22:41:45 No idea.. May 06 22:41:47 Anyways May 06 22:41:47 run ! May 06 22:41:52 groxx is trying to leave. Security! May 06 22:42:11 you'll never take me decaffeinated! (╯°□°)╯︵ ┻━┻ May 06 22:42:25 seriously drose379 , if you don't know what I'm referencing you're luckier than me. Cause I saw it... May 06 22:42:26 So calling .execute() instead of .enqueue() will make the program wait until I get a response from the server to continue May 06 22:42:40 I dont know what your referencing haha, what is it? May 06 22:42:43 no, it will make the thread wait May 06 22:42:54 drose379, no!!! forget it!! :D May 06 22:42:57 Which is what I want May 06 22:42:58 * groxx ε=ε=ε=ε=┏(; ̄▽ ̄)┛ May 06 22:43:00 (The thread to wait) May 06 22:43:16 you don't even need the thread at all May 06 22:43:23 drose379: Call.execute does network stuff on the current thread. Call.enqueue starts a new thread and does network stuff there. May 06 22:43:31 that's what engueue is! May 06 22:43:42 so .postExecute wont get called until I get a response when using .execute() May 06 22:43:46 Yeah, Call.enqueue creates a new thread for drose379. May 06 22:43:57 forget postExecute! :D May 06 22:44:05 you can remove the whole asynctask May 06 22:44:05 Only for drose379, though. May 06 22:44:17 why?? I spent so much time setting up the AsyncTask and now you want me to get rid of it :P May 06 22:44:42 well, you didn't set it up very well now, did you? :P So ditch it! :D May 06 22:44:53 What the alternative? May 06 22:44:57 you do your post processing in onResponse May 06 22:45:10 enqueue IS the alternative May 06 22:45:22 ok. let's back up. May 06 22:45:25 So I should just use a regular class insted of AsyncTask May 06 22:45:33 forget everything that is asynctask May 06 22:45:42 Fine, lemme see if I understand you May 06 22:45:44 forget it. Now. do it. May 06 22:45:54 is it forgotten? then we can proceed May 06 22:45:57 Yes May 06 22:46:00 :D May 06 22:46:01 hahaha May 06 22:46:03 But I think I know what you want me to do May 06 22:46:04 haha May 06 22:46:09 Can I try to explain May 06 22:46:21 sure, that would be great :) May 06 22:46:24 Ok May 06 22:46:37 you want me to make a regular utility class May 06 22:46:46 with a method that makes a request May 06 22:47:07 and do all processing of the response data in onResponse (including calling back to parent activity) May 06 22:47:17 That way, nothing moves until I get my response May 06 22:47:20 '/breal May 06 22:47:23 break* May 06 22:47:25 you don't even have to complicate it that much... May 06 22:47:37 Where did I complicate it? May 06 22:48:31 have your Activity implement Callback. remove the onResponse and onFailure, add them to your class. call call.enqueue(this) May 06 22:48:34 the end. May 06 22:48:44 Am I wrong in thinking that this doesn't *need* to be a compile error? http://pastebin.com/dZFnN9Ur May 06 22:48:49 Like, in a theoretical world. May 06 22:49:16 Not bad, thanks MikeWallaceDev May 06 22:49:23 Shit, dinners here May 06 22:49:25 Be back soon May 06 22:49:29 you got it? I was going to pastebin May 06 22:49:36 I think I got it May 06 22:49:41 Thanks for all the help May 06 22:49:41 awesome :) May 06 22:49:46 no problemo May 06 22:49:48 Ill be back soon May 06 22:50:04 no problemo, I'll be back. I sense a pattern.... May 06 22:50:12 hmm May 06 22:51:17 funny TacticalJoke , my first thought is that it should ALWAYS be an error... May 06 22:51:23 still reading/thinking May 06 22:52:13 Why is AS & ADB such a piece of shit May 06 22:52:23 Outer.Inner inner; seems ok to me, normal that it would work May 06 22:53:28 Inner in that case is the definition in Outer, and you're not referencing it statically May 06 22:53:57 but trying to refer to Inner, from within Nested (which is static) won't work... May 06 22:54:18 however, you could make Inner static May 06 22:54:34 Yeah. May 06 22:54:40 also, I want pizza. May 06 22:54:45 I find it odd that I get the error only with the type parameter, though. May 06 22:54:50 ok, maybe that part ain't relevant May 06 22:55:10 I mean, I get it, but it seems inconsistent. May 06 22:55:16 that's what I meant earlier, imo you should always get the error May 06 22:55:23 Yar. May 06 22:55:54 ^^^ which is freakishly close to my old nick : yartiss May 06 22:56:48 so android emulator does not support screen recording, good to know May 06 22:56:57 thanks for help and good night :) May 06 22:57:25 it might in raw mode ChampS_ May 06 22:58:04 huh. so I just tried it. Does exactly what you said May 06 22:58:10 ChampS_, try something like: adb shell screenrecord --o raw-frames --verbose /sdcard/test.raw May 06 22:59:17 adq: android emulator does not support the command screenrecord May 06 23:00:07 ok, I did it in the wear avd emu, I assumed other regular avd were just lacking of codec May 06 23:02:12 TacticalJoke, I don't get it. I understand why it doesn't work. I don't understand when it does work! May 06 23:02:39 ChampS_: I assume you're on a recent (4.4+ or something) emulator image? I forget when that command came out. though I suppose it makes some sense that it wouldn't support it, especially with gpu acceleration... May 06 23:03:24 I'm wanting to use Retrofit, but want to intercept the request (I'm aware of request interceptor) and do some custom stuff with the data thats passed in the request. For each request (not my decision) I essentially have to create the Authorization header based on the data being passed into the request. For POST requests I have to do a md5 hash on the json being passed in before executing the request as well. May 06 23:03:44 use an OkHttp interceptor May 06 23:03:49 Retrofit provides no mechanism for that nor will it May 06 23:04:12 https://github.com/square/okhttp/wiki/Interceptors May 06 23:04:15 groxx: 5.0 May 06 23:04:18 or just provide your own okhttpclient? May 06 23:04:28 Thanks, Jake! May 06 23:04:48 groxx: I found this http://android.stackexchange.com/questions/106060/adb-android-emulator-unable-to-record-video-screenrecord-not-found-with-an May 06 23:04:51 TacticalJoke + MikeWallaceDev: have either of you tried Outer.Inner inner; ? May 06 23:05:08 no May 06 23:05:28 wasn't really trying to make it work, just wondering why it does May 06 23:06:26 Outer.Inner bellybutton; May 06 23:09:06 Good day everyone I was asked to do the following with a user input (path captured while drawing on canvas) "convert it to smooth curves, that is, subsample the points, and then use the midpoints between each pair of points to add quadratic curve segment to a path." May 06 23:09:07 MikeWallaceDev: have you figured out why, or not yet, or not really that curious? May 06 23:09:23 I am confused, i think it refers to Path.quadTo() but i am not sure if that what it means May 06 23:09:30 Nested { Outer.Inner } also works, as a clue. May 06 23:10:03 groxx, I was curious... but I'm over it now. Now I'm onto bigger and better things. Pizza. May 06 23:10:14 I tried reconstructing the captured path, by breaking it down to segments and using Path.quadTo() to reconstruct a smoothed out curve, but it does not seem to make much of a difference or am i not understanding the specification right? May 06 23:11:00 groxx, oh, that is interesting though. May 06 23:11:12 sup guys May 06 23:11:15 DmitryS: it's probably talking about these http://www.sitepoint.com/html5-canvas-draw-bezier-curves/ May 06 23:11:58 i think quadTo() is a similar way to draw Bezier Curves with android.graphics.path May 06 23:12:12 but yeah i am uncertain if thats what it is talking about May 06 23:12:51 DmitryS, if you can get the points on a path, let me know how. I've been wanting to do that for a while May 06 23:12:57 DmitryS: possibly you're capturing so many points it doesn't make much of a visible difference? try like 1/10th of them. May 06 23:13:37 so groxx , it's like without the Outer it doesn't know which Outer to use... Kind of makes sense now May 06 23:14:31 MikeWallaceDev: yeah took me a bit to figure it out, you can use PathMeasure pm = new PathMeasure(yourPath, false) to get measurements, and than create a float array "float cords[] = {0f, 0f}" and execute pm.getPosTan(pm.getLength()*0.1, coords, null) May 06 23:14:44 that will store the point along the path which is 10% along the path May 06 23:15:00 in the cords[0] cords[1] for x,y May 06 23:15:26 groxx i tried the following, here ill post a code on paste bin (to not spam it here) May 06 23:15:36 wait, wut? along the path which is 10% along the path?? :D May 06 23:16:07 http://pastebin.com/42HFCAxS May 06 23:16:49 as in to get a point which is x distance from the path start, you can either do absolute distance say, 100 or you can do a percentage of total lenght May 06 23:17:47 so to get for example 9 points from your path equal distance from each other along the path you would do something like this: May 06 23:18:14 MikeWallaceDev: Lol. May 06 23:18:21 My brain is too tired to process anything now. May 06 23:18:54 It seems arbitrary. May 06 23:19:07 Anyway, I'd better run. Have fun May 06 23:19:39 MikeWallaceDev so I have more then one request I need to make May 06 23:19:47 so, it's not the actual points. It's calculated dots on the curve May 06 23:19:56 So in on-response, I may not be ready to move on May 06 23:20:02 drose379, that's cool. My car needs washing... May 06 23:20:11 lol May 06 23:20:13 :D May 06 23:20:24 But im trying to think of how I can work with that to have onResponse be the callback May 06 23:20:31 Cause onResponse will be called more then once May 06 23:20:42 Maybe keep track of the length of the array im looping over May 06 23:20:44 onResponse is the callback May 06 23:20:46 DmitryS: hm. not sure why you're resetting the linePath if the raw path is more than 10% different than a straight line between and , but I'll assume there's a reason. May 06 23:20:47 Right May 06 23:21:09 MikeWallaceDev I know its the callback, but I only want to advance to another method after all my requests have been made May 06 23:21:22 drose379, I think it would be best to just pastebin your real code and what you want to do May 06 23:21:36 ah, ok May 06 23:21:38 I see May 06 23:21:46 I didn't know that. May 06 23:21:57 me? May 06 23:22:03 then.. what a sec. May 06 23:22:06 yes May 06 23:22:12 I think I have an idea for it May 06 23:23:39 http://pastebin.com/UYXy2m3u May 06 23:23:49 here is quick example i compiled May 06 23:23:55 DmitryS: hm. though the more I think about it, the more that task doesn't make much sense. finding the midpoint between two points and using it as a bezier curve handle will just give you a straight line. repeat that for each (sequential) pair of points, and you'll just be making straight lines between things. May 06 23:24:32 groxx, reseting linePath so it will not draw, my OnDraw will draw it if its not empty, so if i dont need a line i reset it after using it for comparison to avoid double drawing May 06 23:25:09 DmitryS: maybe they mean: given points 1, 2, 3, 4, use the pair [1,3] and the bezier curve point [2], and [2,4] + [3]. doing _that_ will give you a smooth interpolation between all points. May 06 23:25:23 DmitryS: ah May 06 23:25:24 yeah thats what i end up getting groxx, think i am not using quadTo right, so trying to figure out how to actualy convert a raw input into a smoothed out curves with quadTo or Bezier Curves May 06 23:25:49 you're wanting to do smooth interpolation of a curve between points, with a bezier curve? May 06 23:25:56 hm maybe i am not feeding the points in a right order than to quadTo function? May 06 23:25:57 I rememeber seeing a great algorithm for that May 06 23:25:58 let me find it May 06 23:26:26 DmitryS: ah, yeah, that does look like what you're doing. May 06 23:26:39 drose379, hopefully this is clear to you http://pastebin.com/vgJkaz3k May 06 23:26:47 from what i understood quadTo uses initial point, the x1, y1 point as mid poing and x1, y2 as end point of the segment to smooth it out but does not seem to do so May 06 23:27:14 DmitryS, you might enjoy this short video: https://www.youtube.com/watch?v=6ON6fYO4FbY (IO Lightning Talk: Dual Cubic Splines) May 06 23:27:21 DmitryS: what's the length you're getting? if it's super large it might not be noticeable May 06 23:27:36 it also illustrates why finding a point in a bezier curve is inefficent May 06 23:27:52 depends on the distance of the drawing usualy around 1000-15000 May 06 23:27:56 Thanks MikeWallaceDev May 06 23:28:04 and thank you adq, ill watch it May 06 23:28:10 no problemo, tell me if you 'get it' May 06 23:28:20 Theres another thing though May 06 23:28:32 drose379, note: there are no AsyncTasks in there. May 06 23:28:37 Im sending this class a List of JSONObjects May 06 23:28:47 And for each of them, I need to grab a picture May 06 23:28:57 only, some are saved locally, and some and saved on a web server May 06 23:29:09 so some of them, I dont need to make the http request for May 06 23:29:11 DmitryS: I assume you're sure curvedPath is being drawn? different colors or something? May 06 23:29:16 well, that's a whole other ballgame May 06 23:29:21 yes groxx May 06 23:29:27 Heres what im thinking MikeWallaceDev May 06 23:29:33 think away! May 06 23:29:38 Get the number of items in the List that need to be grabbed with a HTTP request May 06 23:29:51 (just do it before my pizzer buzzer buzzes) May 06 23:30:13 Have a number saved in the method that makes the request that marks the amount of items that need to be grabbed May 06 23:30:30 Each time the method is called, count how many times it has been called May 06 23:30:32 DmitryS: not sure. I haven't used these methods before, but you do seem to be using it correctly, as far as I read anyway. do you get a visible difference if you e.g. use only 4 points, on a crazy path? May 06 23:30:48 drose379, ... just use a for loop :) May 06 23:31:04 I am using a loop, but that doesnt solve the problem of waiting for onResponse to be called May 06 23:31:46 you absolutely what to call them all serially? May 06 23:31:52 serially? May 06 23:31:57 you can batch that... May 06 23:32:07 batch it? May 06 23:32:11 say download 10 images at a time May 06 23:32:31 serially means one after the other May 06 23:32:41 Oh, I can make a batch request? May 06 23:33:00 don't know about that. sorry. May 06 23:33:14 but you can have a few threads going at the same time May 06 23:33:28 i.e. download from the web, and locally at the same time May 06 23:33:42 Well maybe instead of sending all URLS to the server serially (one at a time) I can just send a request with a list of all the URLS to grab May 06 23:33:45 wait...... are you only downloading images??? May 06 23:33:50 yeah May 06 23:33:51 im at GBG Boston Mobile UX meetup, will update learnings May 06 23:33:54 drose379: subclass imageview so that it lazy loads the image, if the imagview gets invalidated (say, the row is recycled) just cache the image so the next time its already there May 06 23:34:09 then look into UIL! Universal Image Loader May 06 23:34:13 Well, im gonna be grabing other image too May 06 23:34:18 info* May 06 23:34:46 *lazy load = check if it is on disk, if not do a bg request with a reference back to the imagview, make sure to cancel any pending callback (thought, still cache the image) in getview May 06 23:35:22 groxx/DmitryS: belated, but here's the algorithm I was thinking of (just took me a while to dig it up :p) May 06 23:35:30 http://www.efg2.com/Lab/Graphics/Jean-YvesQueinecBezierCurves.htm May 06 23:35:52 I've used it before to excellent effect May 06 23:35:55 Jean-Yves QueineBezierCurves is a weird name. May 06 23:36:16 tweeting with #whyUX May 06 23:36:27 blame the french :p May 06 23:36:39 (Do you American type folk get that Jean-Yves is a first name?) May 06 23:37:00 I blame the French for most things. May 06 23:37:12 JesusFreke: that does make some nice curves. and conceptually clean too. how's the performance though? May 06 23:37:14 Like NetFlix taking West Wing off the air. May 06 23:38:05 groxx: well, anything with bezier curves is fairly slow. but just calculating the control points isn't bad May 06 23:38:59 UX is where the competition is at May 06 23:40:11 thank you JesusFreke, ill take a look at it as well May 06 23:41:17 woohoo http://openjdk.java.net/projects/panama/ May 06 23:42:56 g00s: is that at all going to be android-friendly? "new data layouts in JVM heap" sounds kinda "requires modifying your jvm" May 06 23:43:28 Pwnies, glad to hear it. May 06 23:43:51 btw anybody know how to join androiddeveloper.slack.com? May 06 23:43:54 yeah above my head not knowing jvm internals; i wouldn't be surprised if oracle is considering breaking changes; and i wouldn't be surprised if jack & jill were contingency for oracle making breaking changes May 07 00:07:42 Hello. Anyone here developing on ArchLinux? May 07 00:16:18 to test the UX, get a tester drunk to test the use cases #whyUX May 07 00:17:05 monkey May 07 00:18:10 what is your fav app? May 07 00:19:11 mine May 07 00:19:22 yes g00s May 07 00:20:32 the apps I write are the ones I use the most May 07 00:20:50 the only exception for me really is feedly and bacon reader May 07 00:22:09 cool pfnQ May 07 00:22:49 the only apps i use are kindle, play books, gmail, MS OneNote May 07 00:23:57 kindle app is pretty shitty actually May 07 00:24:35 but play books is so damn slow on epubs ... May 07 00:28:00 Wire framing is: HIERARCHY: sense of information, FOCUS: layout/functions/colors, ESTIMATION: devs work around the scope & provide estimates May 07 00:33:06 When taking a picture with the Android camera it seems different than the camera preview. For example the preview has a lot of light, seems good etc and the actual picture is pretty dark and so. Any idea what am I might doing bad ? May 07 00:34:21 <_genuser_> g00s: kindle app you hate? May 07 00:35:07 _genuser_ really 2 things: its janky as all shit, maybe i just have too many books, but scrolling my library reminds me of how things used to be on froyo May 07 00:35:26 the other thing, is that i don't really think amazon has been innovative with the ebook experience May 07 00:35:47 hwne you read articles about why people prefer physical books to ebooks, some of these things are pretty easy to mimic in SW May 07 00:35:55 <_genuser_> I kinda see some issues with the poems books I have. May 07 00:35:59 but its like they dont even try to be awesome May 07 00:36:05 <_genuser_> you're reading thru the poem, and it's all left aligned. May 07 00:36:13 yeah, and the ebooks themselves can be pretty crappy May 07 00:36:16 <_genuser_> later you open it and it's all centered. it's disorienting. May 07 00:36:29 they have no rating for ebook conversion specifically May 07 00:36:37 <_genuser_> also it will have random numbers in between lines sometimes. it makes it so hard to read those. straight up books tho, seem fine. May 07 00:36:56 I love actually reading on my ebook reader - my main gripe is with the maps and artwork and what-not. May 07 00:37:10 <_genuser_> lot of these businesses have their main focus, and then site revenue streams. May 07 00:37:27 <_genuser_> like google with android, they don't even try. (unless you count material design as trying). May 07 00:37:30 <_genuser_> same with amazon. May 07 00:37:35 so if it's a book that has really great/important artwork, I'll usually read on my ebook reader, but have the actual book handy, so I can look up the artwork May 07 00:37:36 pigiman: the preview tends to automatically do whitebalance / brightness / etc, the camera may not. check its features, you probably want to turn on the automagic stuff. May 07 00:38:13 Like the artwork in brandon sanderson's stormlight archive books May 07 00:38:14 <_genuser_> JesusFreke: the poems and etc are the big crappy ones for my reading. May 07 00:38:33 _genuser_: yeah, I could definitely understand that with poem. Fortunately, I hate reading poems anyway :) May 07 00:38:57 groxx - what's automagic stuff? May 07 00:39:11 <_genuser_> JesusFreke: it started with, "what the was keats talking about in Lamia, etc. etc." then I got to reading it. it's basically a story. so you kinda get interested in it. May 07 00:39:44 pigiman: e.g. stuff in https://developer.android.com/reference/android/hardware/Camera.Parameters.html May 07 00:39:48 <_genuser_> JesusFreke: my main gripe with ebooks is, not being able to loan to your friends, family. May 07 00:40:07 yeah. barnes and noble have the "lend me" thing, but meh. May 07 00:40:33 it's not really a big use-case for me anyway. May 07 00:40:39 pigiman: also, some cameras are just different. depends on the device. if you _really_ want it to match, you may need to post-process it before you show it to the user, to e.g. fix its brightness / contrast / etc. May 07 00:41:03 <_genuser_> amazon has lend ability only a) if author/publisher allows it, b) once ever to a given person and only for 7 days. after that you can never lend it to them again. and you can't read it in those 7 days either. May 07 00:41:26 <_genuser_> JesusFreke: for me it was a big use case, because my brothers and I could buy whatever books and then swap them around. May 07 00:41:42 <_genuser_> but now we were thinking of having a central account with all our devices added and buy all the books under that. May 07 00:42:01 <_genuser_> but you know how that goes, you'll be signing in/out for ebooks, music, shopping, etc. May 07 00:52:37 _genuser_ and then there is the whole tracking what you are reading thing, privacy, etc May 07 00:53:25 most of my books are kinds though. i think i sold around 8 book cases of my personal collection, now i only have ebooks. and a few edward turft books May 07 00:54:25 lol s/kinds/kindle May 07 00:55:11 only a few publishers can do ebooks for photography it seems, focal press screws everything up May 07 00:55:30 and then the rest, peachpit, oreilly, informit drm-free May 07 01:11:27 i have a 2d game i am making. the whole UI is made in Java, no xml, so for the menus and stuff I made linearlayouts in java code, and i use a canvas for drawing game stuff, but the canvas also has menus and touchscreen navigation... so i have a combination of events and logic for widgets/buttons and touchscreen stuff.. i am thinking of rewriting everything and just making the whole screen a canvas May 07 01:12:04 this should make my code cleaner and maybe cut the code size in half even... the only downside i can see is having to redraw the UI parts when i refresh the canvas every frame May 07 01:12:26 are there any other factors i should consider? May 07 01:15:12 actually maybe i wouldnt even need to redraw the buttons on the canvas every frame May 07 01:16:28 yeh i think ill make the whole screen a canvas May 07 01:20:46 go ubuntu! http://www.pcworld.com/article/2919552/ubuntu-may-beat-windows-10-to-phone-pc-convergence-after-all.html May 07 01:23:31 im actually excited for windows 10 May 07 01:24:39 yeah me too May 07 01:24:50 apple is really going after the health aspects http://www.technologyreview.com/news/537081/apple-has-plans-for-your-dna/ May 07 01:25:12 njcomsec looks like MS will have a flagship phone (Cityman) May 07 01:25:36 i would expect for continuum to work there would need to be strict minimum requirements in horsepower May 07 01:25:46 (at least 2 horses required) May 07 01:27:52 the health stuff seems very gimmicky to me May 07 01:28:23 but then i smoke and eat fast foood so i guess im not te target market May 07 01:28:31 it could seem that way, but they are working with top notch medical institutions May 07 01:28:47 and research programs, even IBM watson is involved May 07 01:33:10 if they made a watch that made my hands sweat less id buy it May 07 01:42:43 Our startup got funded! We're going to Shenzhen, China to build a personal gaming drone. This is a flying robot that you can play with. It mostly uses computer vision and Artificial Intelligence. We're looking to hire one or two more linux C++ programmers to join us during the summer. If you know any good programmer available from July to October (inclusive, preferably), please let me know! Send a resume at roitman@cs.stanford.edu or May 07 01:42:46 message me. May 07 01:47:58 stanford_drone: What does this have to do with Android? May 07 01:49:09 we're looking for programmers. May 07 01:49:55 stanford_drone did you see http://www.gizmag.com/phonedrone-smartphone-drone/37227/ May 07 01:50:10 but yeah, topic says no advertising May 07 01:50:38 Aren't you looking for c++ programmers, anyway? May 07 01:50:52 yes May 07 01:53:50 Guys is there a way I can test my Bitmaps May 07 01:54:07 I have a List of 3 bitmaps but only 1 of them is showing up in my listview May 07 01:54:35 Which setup should I use to work with NDK on Linux? May 07 02:05:43 guys im passing a byte[] to BitmapFactory.decodeByteArray() and for some reason its returning me null bitmaps May 07 02:08:35 hmm how to launch an activity with just the string? Is it something like startActivity(new Intent("com.example.activity.EditTextActivity"))? May 07 02:08:37 one thing i always wondered .. without any kind of package manager, how did google ever expect all these apps to talk to each other (IPC via Content Providers, bound services, even Intents) without being able to version interfaces ? May 07 02:09:51 for example, seems like if app X talks to app Y there should be some :requires minimum Y version rule somewhere May 07 02:10:30 AP computer science exam is tomorow. cant decide if i should code or study for that haha May 07 02:11:06 probably not much you'll learn in next few hours ;) May 07 02:11:29 just get good sleep :D May 07 02:12:15 good point. theres some stuff i forget sometimes though. Like if I do View v = new Button(); Will I get a views methods or a buttons May 07 02:12:24 View's right? May 07 02:14:21 DadFoundMy that doesn't seem like a CS question to me ... May 07 02:14:31 lol May 07 02:14:41 why not? May 07 02:14:49 a huge part of the test is inheritance May 07 02:15:03 just used android classes as an example :D May 07 02:15:04 O.o May 07 02:15:06 Because it's Android Science May 07 02:15:37 talking about inheritance implies some kind of object model May 07 02:15:47 so do they just assume Java's object model ? May 07 02:15:53 yeah it uses java May 07 02:16:06 sure this isn't Java certification ? May 07 02:16:09 For some questions they will give you a class declaration or two May 07 02:16:14 g00s: AP computer science :D May 07 02:16:29 my AP computer science was a bit different i guess May 07 02:16:48 http://apcentral.collegeboard.com/apc/public/courses/teachers_corner/4483.html May 07 02:16:50 * BrianHV did AP computer science in pascal... May 07 02:16:58 DadFoundMy I think you would get Views May 07 02:17:01 it's been a java for a while May 07 02:17:19 but i think b4 that it was c++ May 07 02:19:30 looks like it changed from c++ to java in 2003 May 07 02:29:59 Hi, i'd like to know what happens when an application needs to access a resources in it apk file? May 07 02:30:57 Does the system unzips the apk file to allow the file to be accessed? May 07 02:34:06 hm, this will sound crazy but - is there a way to attach custom attributes to a stock view? the view doesn't need to be custom; i just need the ViewHolder / Adapter to be able to read the attributes on the view May 07 02:37:34 ? tag? May 07 02:37:48 but....my viewholder is the tag.... May 07 02:38:18 wabz no, tag won't work May 07 02:38:42 they are basically drawables i want to pass into the adapter to use for decorating a stock view May 07 02:38:59 but i'd like to set those on the view itself, the adapter retrieves them May 07 02:39:02 where do you want to set them? May 07 02:39:07 xml May 07 02:39:17 ah heh May 07 02:39:28 no one for my question? May 07 02:39:41 g00s, are you "decorating" the stock view in getView? May 07 02:40:02 seems like an issue solved with multiple view types May 07 02:40:09 kinda. well, looks like I can't get the AttributeSet passed to the view's ctor so ... seems helpless May 07 02:41:19 canvs2321 was kinda trying to 'inject configuration, which were drawables' :D May 07 02:41:40 ok, nm May 07 02:42:23 Yeah, you should re think it. Or atleast break your question down to something easier to visualize, or make a mockup. You are probably going about it in a complicated way, if only wanting to add some drawables May 07 02:43:17 canvs2321 this was for action modes in recyclerview. in default, i wanted to use ?selectableItemBackground or whatever it was, but in action mode, use ?activatedBackground May 07 02:43:42 its more of a design flaw in the way they handle ripple touches and activated May 07 02:43:44 can use multiple view types May 07 02:43:59 and retrieve whatever you want based on the mode you are in May 07 02:44:29 yeah but they are all the same view. its just that their background drawable changes based on selection mode May 07 02:44:39 but yeah, all kinda of hacks are possible May 07 02:44:41 does anyone happen to have an example of a test set for an authenticator/LoginActivity? either espresso or combination of espresso+junit May 07 02:44:44 ok? May 07 02:44:47 it isn't a hack May 07 02:45:19 https://developer.android.com/reference/android/support/v7/widget/RecyclerView.Adapter.html#getItemViewType%28int%29 May 07 02:45:35 canvs2321 yes i'm aware of that, and thats not the solution :) May 07 02:45:40 nm May 07 02:45:44 ok May 07 02:46:28 it's pretty simple, in your adapter have a flag for what mode you are in. and return the appropriate view to use May 07 02:47:17 has anyone messed around with LifecycleObservable in RxAndroid? May 07 02:48:08 canvs2321 i'm just going to put 2 custom theme attributes; and resolve those in the adapter and apply the BG according to which mode May 07 02:48:30 they aren't different view types - but going that way doubles the recycler capacity May 07 02:48:47 g00s: guess i'm just trying to stress that don't do the checking in getView, have everything you can predetermined as much as you can May 07 02:49:06 sure that is good advice **** ENDING LOGGING AT Thu May 07 02:59:58 2015