**** BEGIN LOGGING AT Mon Apr 06 02:59:58 2015 Apr 06 03:01:25 onattach Apr 06 03:07:55 dialog, don't know Apr 06 03:08:13 in a viewholder you can use view.getContext() Apr 06 03:08:19 ttyl Apr 06 03:23:34 i need note edge emulator Apr 06 03:42:51 is there a performance loss when calling getIntent() lots of times inline rather than assigning it to a variable? Apr 06 03:45:06 not enough to matter Apr 06 03:48:49 I need to edit a "R.raw.notices" file (https://github.com/PSDev/LicensesDialog/blob/master/sample/res/raw/notices.xml), however I can't find it in my project. Where would it be? I've tried making a raw directory in res and putting notices.xml in there, but I get errors on the tag. Ideas? Apr 06 03:54:55 hey, can I test if an account exists and credentials are valid without bringing up the login activity? Apr 06 04:29:56 I am in the habit of doing things like if (someVariable > someOtherVariable) doSomeFunction(); as opposed to if (someVaraible > someOtherVariable { \n doSomeFunction(); \n } because it makes me easier to go through my code. But when working with other people, should I typically always expand things out? Apr 06 04:30:48 Ie the same thing for like setters if I get them on one line, i do. But since this is a bit unorthodox, just wondering if it is better to do standard, with more vertical space Apr 06 04:32:47 On Android, the standard is that if the statement fits on the same line (<100 characters) then you can put it on the same line without braces Apr 06 04:32:56 On Java in general, this is a bit frowned upon Apr 06 04:34:06 We had a lot of discussions about that rule but the exception won because of log statements Apr 06 04:36:11 ahh thanks Apr 06 04:36:14 what about setters? Apr 06 04:40:01 for instance something like: public void setAbsoluteOrientationChangedCallback(AbsoluteOrientationChangedCallback c) { callback = c; } Apr 06 04:40:35 or something like: @Override public void enable() { if (!enabled) super.enable(); enabled = true; } Apr 06 04:40:52 should I not do this, and instead expand them vertically? Apr 06 04:42:23 It's a bit unorthodox but I wouldn't mind it. IDEA folds these like this already Apr 06 04:42:39 Bottom line, if it's your project, it's fine. If it's somebody else's, use their conventions Apr 06 04:43:06 i do single line for logs, throws, and early returns Apr 06 04:43:22 and usually only at the extremes of the block (beginning or end) Apr 06 04:44:15 I have tried hard to get Brian to put properties on the table for Java 9 but failed once again Apr 06 04:45:05 In Kotlin, "data class User(val firstName: String, val lastName: String)" and you move on with life Apr 06 04:45:45 i think java 9 has huge changes coming with jigsaw Apr 06 04:45:50 maybe they have their hands full :) Apr 06 04:46:01 Yes they certainly do Apr 06 04:46:21 but properties are the cause for so much boiler plate Apr 06 04:46:26 even more than lambdas I'd say Apr 06 04:46:34 (although that might be rapidly changing with the rise of Rx) Apr 06 04:47:13 hope jigsaw will come this time Apr 06 04:47:30 They've crossed the point of no return for that Apr 06 04:47:38 good :) Apr 06 04:48:08 maybe now application start will be fast Apr 06 04:48:34 thanks Apr 06 04:48:46 Application start up time is yet another thing that's at the bottom of my concerns (both for Java and Android) compared to getters/setters Apr 06 04:49:17 well there's scala and kotlin ;) Apr 06 04:49:27 *there are Apr 06 04:49:41 So just Kotlin :) Apr 06 04:49:50 haha Apr 06 04:50:03 scala is not bad either Apr 06 04:50:35 I like Scala the same way I used to like C++: for intellectual pursuits. I don't think it has much practical value nor future beyond that Apr 06 04:51:44 I love those random android errors why do I get this "Fatal Exception: android.view.InflateException" ? I would get it if it would be every time but.. is it memory related ? Apr 06 04:51:57 look at the cause Apr 06 04:52:26 i highly doubt it's truly random Apr 06 04:53:13 CedricBeust JakeWharton have you guys ever evaluated google tag manager for your apps ? Apr 06 04:53:18 no Apr 06 04:53:22 isn't that the feature flag thing? Apr 06 04:53:30 No, but it's interesting Apr 06 04:53:35 its got that, yeah - and some other stuff Apr 06 04:53:44 I'm puzzled it seems to be multiple things: A/B testing, marketing, etc... Apr 06 04:53:45 like what? Apr 06 04:53:49 and I think the doc oversells it Apr 06 04:53:58 and I think the doc oversells it Apr 06 04:54:10 "Ship your app and then you can modify them without having to ship a new version"... yeah right Apr 06 04:54:17 https://support.google.com/tagmanager/answer/6102821?hl=en Apr 06 04:54:33 its - kinda confusing. at first, i thought it replaced GA - because they said you just throw events at the TM dataLayer and have macros hit GA Apr 06 04:54:41 JakeWharton: Caused by java.lang.reflect.InvocationTargetException => Caused by android.view.InflateException => Caused by java.lang.reflect.InvocationTargetException => Caused by java.lang.OutOfMemoryError Apr 06 04:54:48 we have feature flags, a/b, etc. as first-party things in our private API for normal user things Apr 06 04:54:54 g00s: Yeah this confuses me as well Apr 06 04:55:07 Most big companies implement all this themselves but I can see the interest for smaller developers Apr 06 04:55:12 gordon_: that means your app was low on memory and inflating a layout just happened to be the straw that broke your processes back Apr 06 04:55:42 the wrapping exceptions of an OOM are almost never to blame Apr 06 04:56:03 they're just the sucker that was in the wrong place at the wrong time Apr 06 04:56:43 JakeWharton: thanks for explaining. I though it was about memory. Apr 06 04:57:01 i mean it is, it's just not the fault of the person inflating that view Apr 06 04:57:38 It's like a relay race where the last runner always gets blamed for the loss Apr 06 04:57:40 I think it's because there are too many pictures on the view Apr 06 04:58:47 anyone from Japan here ? and going to Java Days on wednesday ? Apr 06 04:59:36 OOMs suck Apr 06 04:59:39 Is it possible to merge two preferences into one screen? Apr 06 04:59:45 thepoosh ! Apr 06 04:59:49 g00s: ! Apr 06 05:00:01 sup mate? Apr 06 05:00:02 One of the libraries I depend on has a preferences file (it is in a different application package / context) Apr 06 05:00:04 thepoosh Q; do you guys use straight up GA apis, or google tag manager -> GA ? Apr 06 05:00:08 thepoosh: G'day Apr 06 05:00:23 we just reintroduced ga into the app Apr 06 05:00:33 for now it's just session tracking Apr 06 05:00:46 ok - so no tag manager Apr 06 05:01:09 no Apr 06 05:01:41 thepoosh ughhh , do you know the difference between google analytics and universal analytics ? Apr 06 05:01:48 nope Apr 06 05:01:59 i think i'm caught in 3 years worth of google product marketing spin Apr 06 05:02:04 i remember that GA allow attributes to events Apr 06 05:02:26 is this your project? Apr 06 05:02:34 yes Apr 06 05:03:03 :S Apr 06 05:03:05 the decision i was trying to make, was use the plain GA apis for android, or use the tag manager apis (for android)... i wasn't sure if one was replacing the other Apr 06 05:03:25 tag manager is 2013 ... i dont hear much about it O.o Apr 06 05:04:10 the web configuration looked quite onerous though Apr 06 05:39:29 i hate annoying UI polishes made by anal designers Apr 06 05:41:29 examples? i suck at UI Apr 06 05:43:12 http://www.materialup.com/ Apr 06 05:43:15 i am now going over tickets that were opened by qa and graphics dept. Apr 06 06:01:08 thepoosh in your GA events, what did you use for category - the name of the screen the event happened on, or something else ? Apr 06 06:01:38 not doing GA events, just custom analytics events and appboy events Apr 06 06:02:22 i'd really like to see a blog on best practices implementing GA in android - my google fu did not turn up that much :( Apr 06 06:02:49 the best i found was http://cogitas.net/blog/2015/03/27/the-analytics-checklist-what-to-measure-and-look-for/ ... but no code, mostly ideas Apr 06 06:03:18 https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide#Categories Apr 06 06:03:45 in the example, they grouped the category by "videos", or "music videos" Apr 06 06:03:59 yeah, saw that. Apr 06 06:04:01 thanks Apr 06 06:04:14 in iosched they used the screen name for category Apr 06 06:04:20 Make your category something logical to your app's raison d'etre Apr 06 06:04:58 i think where i am getting confused, is whether to use "X" as a category, or custom dimension Apr 06 06:06:23 any emulator available for note edge device? Apr 06 06:07:28 theGraeme my qualm with their schema category/label/value thing is that i feel it should just be a UUID & value, which are then mapped to a hierarchy of events in some web interface. Apr 06 06:07:40 rather than codifying the hierarchy in the event itself, in the android code Apr 06 06:07:46 t2mkn, you can use the remote testing lab Apr 06 06:08:14 g00s, still dealing with ga? Apr 06 06:08:38 iprime: ya, but m looking for a netive one. need to do a lot of testing. Apr 06 06:08:44 theGraeme and naturally, the hierarchy should be arbitrarily deep / complex rather than cat / label / value Apr 06 06:08:59 iprime hm .. yeah Apr 06 06:10:12 t2mkn, oh, i don't think there would ever be a native one Apr 06 06:10:25 t2mkn, are you developing something that makes particular use of the edges? Apr 06 06:10:59 iprime: yes, and my existing app can serve to that too. need to update. Apr 06 06:11:32 well, unfortunately your best option is to get the device Apr 06 06:11:44 iprime: new edge users are asking me a lot to support that edge. Apr 06 06:11:44 if you got connections with samsung they can borrow you one, they do that for selected folks :) Apr 06 06:11:53 t2mkn, what does your app do? Apr 06 06:12:37 just checked our code - we're not even using events yet, just App / Screen tracking Apr 06 06:12:50 iprime: existing one which need update, just turs your device off :) Apr 06 06:13:05 theGraeme did you use automatic or manual tracking ? Apr 06 06:14:12 in other words , true ? Apr 06 06:14:23 iprime: https://play.google.com/store/apps/details?id=com.iglint.android.screenlockpro Apr 06 06:15:17 looks like manual Apr 06 06:16:23 t2mkn, looks pretty neat Apr 06 06:16:27 theGraeme ok, thanks -what was your strategy for timing tracker.send() ... oncreate, onstart, activity, fragment ? Apr 06 06:16:47 iprime: thanks. Apr 06 06:16:52 onResume Apr 06 06:16:56 handling rotation changes & multiple hits, etc Apr 06 06:17:13 t2mkn, someone at the office here will be getting the new edge, we'll try your app Apr 06 06:17:54 oh, and in the activity, not the fragment Apr 06 06:18:09 theGraeme ok thanks Apr 06 06:18:18 np Apr 06 06:18:23 i noticed in iosched they did onCreate Apr 06 06:18:45 iprime: ys seour, free one is available also. but right now, its not working for new edge system. let me know if widget and shortcut are working at home screen. Apr 06 06:19:39 t2mkn, well, whenever we can get hold of one, not available here yet Apr 06 06:19:51 there are only so many apps for the edges Apr 06 06:20:42 iprime: any time, any day, any help is appreciated. Apr 06 06:28:39 with regards to your point about event categories: I just checked our GA web console, and see that the graph can be filtered by category / action / label. Apr 06 06:29:53 maybe their decision to support just those parts of an event was a way to keep complexity down in the web console Apr 06 06:30:04 yeah Apr 06 06:30:15 and then they came up with tag manager lol Apr 06 06:30:36 theGraeme do you guys use TGM ? Apr 06 06:30:40 oops, GTM Apr 06 06:31:10 No. I looked into it briefly earlier, but I'm not clear on what it's for Apr 06 06:31:30 lol, i was like man thats ... super general / abstract / confusing Apr 06 06:31:39 haha same Apr 06 06:32:33 i even watched 2 hours of videos on it, it looks pretty powerful - but i alreasy have so many questions doing the simplest thing with GAV4 Apr 06 06:33:20 more along the lines of designing good questions and metric to answer those questions Apr 06 06:34:40 theGraeme thanks for helping me out Apr 06 06:34:50 np Apr 06 06:37:42 g00s, check out this blog post: http://dandar3.blogspot.ca/2013/03/google-analytics-easytracker-detailed.html Apr 06 06:38:20 overrides the default 100-character description of a GA exception, so you can get the full stacktrace Apr 06 06:39:35 theGraeme ah thanks. the one other question i can't find an answer to - if i have a service in the background sending events, do I need (1) two properties - one for UI, one for service or (2) just use non-interactive events Apr 06 06:39:53 not exactly necessary, but very handy when you start seeing exceptions coming in from the wild Apr 06 06:40:35 you could do either, I think. I saw something about multiple-tracker implementations on the GA site Apr 06 06:42:10 yeah the advanced config section has multiple trackers, but i don't know if using one for UI , another for service is misusing that Apr 06 06:42:26 Keep it simple at first Apr 06 06:43:12 sure - but i wonder if the stats will get messed up if the user isn't interacting with the UI but the service is sending events Apr 06 06:44:24 that's the thing with Analytics, it's wide-open how you can use it. I'd say just be selective about what actions are event-worthy! Apr 06 06:45:02 when the bluetooth device returns an error code, i'd like to pass that on ... Apr 06 06:45:10 it could be connected for hours Apr 06 06:46:19 ah, yeah, I see. That's really less of an "event", and more of a "state" Apr 06 06:48:12 theGraeme ah, k which leads me to next question about state / event. i'd like to know on average, how many of these bluetooth devices a user connects to. so once they discover them and add them to the UI, its a counter basically. whats the best way to represent that with GA ? Apr 06 06:49:09 maybe its an event , with a value being the total at that time ? Apr 06 06:49:18 hmm Apr 06 06:49:30 That could generate a lot of noise. So maybe instead, send events for whatever action the user takes to resolve the issue when bluetooth disconnects. If they did nothing because they weren't actively using it at the time, no event... Apr 06 06:50:13 well its to help be debug weird device behavior in the field. i guess it would be a 'caught exception' kind of thing Apr 06 06:51:06 the state machine recycles the connection to the device when an error hitCounter reaches a threshold Apr 06 06:51:33 yeah counter, we're not doing. Apr 06 06:52:37 but sounds like that counter would be central to your app, and not specific to the GA tracker itself. Apr 06 06:53:38 Is it possible to get a verizon note 3 working on tmobile? Apr 06 06:53:46 yes, this is the behavior without GA - the bluetooth code takes care of itself, but i would like to see if some model phone gives more GATT errors than others Apr 06 06:54:01 Verizon says its impossible but it has a sim card slot and im roetty sure its possible Apr 06 06:54:13 Atom138 off topic for here, ask verizon or tmobile Apr 06 06:54:16 see topic Apr 06 06:54:38 oops sorry Apr 06 07:00:06 g00s what kinda of work do you do? Apr 06 07:00:16 always see you around and I'm just wondering Apr 06 07:00:28 i work on my own projects Apr 06 07:00:44 this involves bluetooth data acquisition Apr 06 07:00:53 very cool Apr 06 07:03:04 theGraeme that link you sent earlier uses EasyTracker - i thought that was deprecated though Apr 06 07:03:10 http://dandar3.blogspot.ca/2013/03/google-analytics-easytracker-detailed.html Apr 06 07:04:08 ah doesn't matter i guess "public class AnalyticsExceptionParser implements ExceptionParser" would be the same regardless Apr 06 07:04:37 lol I was just about to say exactly that. :) Apr 06 07:04:53 :D Apr 06 07:06:57 theGraeme do you think its better to let Play handle the uncaught exceptions? Apr 06 07:07:10 what do we gain by having it in GA over Play ? Apr 06 07:07:58 oh man, the exception reporting in GA is my favourite thing. Apr 06 07:08:11 The client likes the screen views, I like the crash reporting. Apr 06 07:13:27 guys anyone has a source code about actionbar with searchview ? Apr 06 07:13:44 i tried a lot of things on the internet,i got different errors Apr 06 07:13:51 i couldnt run this Apr 06 07:15:10 theGraeme do you think its weird that HitBuilders.Hitbuilder doesn't have setScreen() ? actually a few examples show setting the screen on the hitbuilder, not the tracker Apr 06 07:15:31 not sure if that a doc bug or GAV4 bug Apr 06 07:17:54 what about HitBuilders.ScreenViewBuilder? Apr 06 07:18:09 it extends HitBuilder Apr 06 07:18:46 we're not using it, btw. We use MapBuilder.createAppView() Apr 06 07:21:13 theGraeme here https://developer.android.com/reference/com/google/android/gms/analytics/HitBuilders.html Apr 06 07:21:28 "You can override a value set on the tracker by adding it to the map." Apr 06 07:21:46 t.send(new HitBuilders.EventBuilder() Apr 06 07:21:46 .setScreenName("Popup Screen") <-- this is not valid Apr 06 07:22:28 AppViewBuilder was deprecated btw Apr 06 07:25:55 ah, I didn't realize version 4 was out. We're still on version 3. Apr 06 07:26:12 hi, i use setTextAppearance(mContext, R.style.twitter) i a textview and it does'nt work Apr 06 07:26:52 first i use a custom textview.. but i try normal textview and it doesn't work :( Apr 06 07:33:19 Hello Apr 06 07:33:45 Can anyone suggest me the good library to perform CRUD operations on System calandar through my App Apr 06 07:34:03 min2, what min sdk do you want to support Apr 06 07:34:42 4.0 Apr 06 07:34:48 4.0>= Apr 06 07:36:18 oh, then there's good-ish consolidated support for it, i'd use the system apis, but there might be a lib Apr 06 07:37:29 yes Apr 06 07:38:03 and must be opensource.. I am not able to find it Apr 06 07:40:09 min2, have you tried the system apis? Apr 06 07:40:43 min2: Calendar Intents can do that without needing a 3rd party lib - http://developer.android.com/guide/topics/providers/calendar-provider.html#intents Apr 06 07:41:48 theGraeme, not just intents, there's a provider, you can query the db direclty Apr 06 07:41:57 or do inserts/updates Apr 06 07:42:06 dependsd on what he wants to do Apr 06 07:42:18 the bigger problem with calendars is that you can have multiple independent calendars Apr 06 07:42:46 contacts and calendar providers are ... complicated Apr 06 07:43:13 wellp Apr 06 07:44:05 when i read over the code in AOSP for the providers, my reaction was mostly http://www.quickmeme.com/img/ff/ffa298071a0a136ab322cc1bffa56b660c52bcf5a3dd587f88e969e1e84fffe5.jpg Apr 06 07:44:41 lol g00s Apr 06 07:46:18 min2, btw, why does it have to be open source, what's wrong with paying for a lib that will save you time and effort Apr 06 07:47:54 calendar intents are way simpler than going with the content provider. Depends how much min2's app needs to do with that calendar info. Apr 06 07:49:33 here's a good blog post with the pros/cons of each: https://www.grokkingandroid.com/intents-of-androids-calendar-app/ Apr 06 07:53:44 you can't use calendar intents to read cal data Apr 06 07:54:33 but well, at least he targets 4.0, it can get messy if you need to support 2 and 4 Apr 06 08:05:51 I am trying to find a clean way to queue some of my retrofit requests in order. Anyone have any ideas? Apr 06 08:06:25 That is, some requests are dependant on other requests completing first, and that kind of thing. Apr 06 08:14:26 Need some help with a custom adapter for a listview in my app Apr 06 08:15:26 claint, are you calling them sync or async? Apr 06 08:23:23 async, at the time. Apr 06 08:47:06 meh, I lost connection. Apr 06 08:47:21 did I get an answer from you iprime? Apr 06 08:48:30 i'm not too familiar with retrofit, but generally why not execute them sync sequentially Apr 06 08:48:39 use an executor service maybe Apr 06 08:48:45 there could be a retrofit way, idk Apr 06 08:49:34 Sorry guyz for late reply but thanks for the information Apr 06 08:50:11 So we dont have any library Apr 06 08:50:26 @claint Apr 06 08:53:30 iprime: thanks for the tip. Apr 06 08:54:51 hello. how come google hasn't released the binary images for nexus 4 with android 5.1, but i can see them in the repo https://android.googlesource.com/device/lge/mako/ Apr 06 08:55:47 ivali, this channel is for app development Apr 06 08:56:39 Hello, I've written an app. i've built it and I've installed and executed Apr 06 08:57:11 it doesn't crash, but it doesn't work as I expect Apr 06 08:57:17 logcat Apr 06 08:57:24 helicopter176, i've tried logcat Apr 06 08:57:44 I see only some interesting messages Apr 06 08:57:57 what do you expect? what actually happened? what does it do? Apr 06 08:58:01 cristian_c: http://imgur.com/jacoj Apr 06 08:58:23 ivali: probably because its not ready Apr 06 08:58:30 bankai_, when I click on the button, I should see some messages in a textview Apr 06 08:58:50 cristian_c: is it a crash or just your code not working? Apr 06 08:58:50 set a breakpoint somewhere, see if your code is firing Apr 06 08:59:13 put a log like Log.e("thepoosh", "I'm here"); Apr 06 08:59:21 at the starting point of your code Apr 06 08:59:41 I/qtaguid ( 372): Failed write_ctrl(s 1 10077) res=-1 errno=1 Apr 06 08:59:42 W/NetworkManagementSocketTagger( 372): setKernelCountSet(10077, 1) failed with errno -1 Apr 06 08:59:50 thepoosh, no no, no crashes Apr 06 09:00:03 it doesn't crash, but it doesn't work as I expect Apr 06 09:00:03 that's not something coming from your app Apr 06 09:00:21 you need to filter by your packagename Apr 06 09:00:49 I/ActivityManager( 372): Start proc com.example.unmountusb for activity com.example.unmountusb/.UnmountUsbAppActivity: pid=2324 uid=10080 gids={50080, 1015, 1028} Apr 06 09:01:21 helicopter176, I've thought so, but the pid is the same Apr 06 09:01:32 set breakpoints Apr 06 09:01:56 bankai_, can I use a debugger? Apr 06 09:02:00 for android apps Apr 06 09:02:06 of course Apr 06 09:02:14 I make a search Apr 06 09:02:54 thepoosh, I can try also with Log.e but I think I've to import some libraries Apr 06 09:03:01 I'll try both Apr 06 09:03:06 go for it! Apr 06 09:03:10 ok Apr 06 09:03:27 thnaks for the tips, thepoosh bankai_ Apr 06 09:03:44 np, when things don't work the first thing to do is debug! Apr 06 09:03:49 then go to stackoverflow Apr 06 09:03:52 then google Apr 06 09:03:53 then here Apr 06 09:04:11 I'm not subscribed to stackoverflow Apr 06 09:04:36 now is the time to subscribe (also, you don;t need to be subscribed to the service in order to read there) Apr 06 09:04:43 I've made some search for those error messages, anyway Apr 06 09:05:00 I'll try to debug by method you have suggested Apr 06 09:05:10 thepoosh, ah, ok Apr 06 09:05:27 I meant subscription Apr 06 09:29:35 where can i find CLIENT_SECRET on developer console ? Apr 06 09:43:08 s9iper1: i copy-pasted your question to google Apr 06 09:43:09 https://developers.google.com/api-client-library/python/guide/aaa_client_secrets Apr 06 09:43:33 http://stackoverflow.com/questions/11295661/google-apis-console-missing-client-secret Apr 06 10:02:21 i'm curious about android blobs. Can anyone explain this for me. "This is a user build of Android 5.1 AOSP with 5.0.1 blobs," Apr 06 10:02:48 this was for nexus 7 2013 which got 5.0.1 as the last update Apr 06 10:23:21 Hi all. I have a question about the BackupAgent. I have followed the development guide and I have implemented my BackupAgent (not using the helper). If I force a backup through the adb bmgr, the backup is completed successfully. Also, the restore works (both manually and when the application is removed and reinstalled). However there's a think that doesn't works. When I change data in my application (and I have invoked Apr 06 10:23:54 think=thing* Apr 06 10:24:56 I mean, when one try to remove an application, Android shouldn't try to execute a backup (especially if it was requested)? Apr 06 10:31:41 Hi, I'm trying to make a simple barcode scannering using the zxing library and when a barcode has been scanned, post the value to a script on my server. the scanning etc. is going fine but whenever my app reaches the httppost it crashes? Apr 06 10:31:55 can someone take a look at my code please? http://pastebin.com/sdNGmSDj Apr 06 10:32:34 crashes why? pull the log..:) Apr 06 10:32:52 iprime: where from? I've never done this before Apr 06 10:33:05 from the android logcat Apr 06 10:33:09 what's your IDE Apr 06 10:33:16 android studio Apr 06 10:33:48 it probably crashes becauuse you're doing networking on the main thread Apr 06 10:34:08 try to do your networking asynchronously (e.g. using async task) Apr 06 10:34:14 I thought that was OK providing you're happy for the app to hang until it completes? Apr 06 10:34:23 not ok in higher android versions Apr 06 10:34:35 it would work in android 2 i think Apr 06 10:34:37 ah Apr 06 10:34:57 ok I can do it via asynctask Apr 06 10:54:06 iprime: still crashing :-( Apr 06 10:55:32 iprime: http://pastebin.com/5KdLy9xZ Apr 06 10:55:50 added a progress bar and that flashes up just as the crash notification comes up Apr 06 10:56:16 at the bottom left of your Android studio there is an Android button Apr 06 10:56:20 that's how you show the logcat Apr 06 10:56:26 check and see if it shows why it's crashing Apr 06 10:57:23 guys how can i filter a gridview's list adapter? im using searchview Apr 06 10:57:51 sci-fic: the adapter can implement FIlterable Apr 06 10:58:25 iprime: do I have to have my phone connected or somethign? Apr 06 10:58:47 sure, also it has to have debugging enablede Apr 06 10:58:57 I see Apr 06 10:59:02 I'll see if I can find a cable Apr 06 10:59:10 oh Apr 06 10:59:16 use an emulator then Apr 06 10:59:26 genymotion Apr 06 10:59:50 is it better to get a cable? How would an emulator scan a barcode? Apr 06 11:00:33 you can just start your networking method with a random string Apr 06 11:11:11 thepoosh:i have a lot of problems,do i have to handle all things one by one ? eg bringing old list back when searchview is closed or back button pressed ? Apr 06 11:11:59 look at SimpleListAdapter or ArrayAdapter's implementation Apr 06 11:12:02 it's very good Apr 06 11:12:37 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.2_r1/android/widget/ArrayAdapter.java#ArrayAdapter.ArrayFilter Apr 06 11:13:03 i shouldnt use baseadapter then ? Apr 06 11:13:49 that is NOT what I said Apr 06 11:14:02 the implementation of the Filter is what you should be looking at Apr 06 11:14:06 it's simple Apr 06 11:14:10 and understandable Apr 06 11:14:12 ok this is what i do http://paste.ubuntu.com/10749325/ Apr 06 11:17:46 iprime: argh Apr 06 11:17:47 found it Apr 06 11:17:55 what was it? Apr 06 11:18:12 a NPE? Apr 06 11:18:15 sci-fic: because you overwrite contacts in your publishResult you'll have an issue when someone clears the search Apr 06 11:18:20 you need 2 lists Apr 06 11:18:23 missing internet permission -_- Apr 06 11:18:56 omg Apr 06 11:18:58 omfg! Apr 06 11:19:02 that is annoying Apr 06 11:19:11 :) Apr 06 11:19:18 you can see it in the logs though Apr 06 11:22:15 glambert, i sometimes forget that for new projects Apr 06 11:22:35 iprime: :-) Apr 06 11:22:47 next problem.. it's done the post but then crashed :-( Apr 06 11:22:50 debug time again Apr 06 11:23:15 oh at least you got a crash Apr 06 11:25:10 java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() Apr 06 11:26:10 you're trying to do a main thread job on another thread Apr 06 11:26:21 i'm guessing it's your toasts Apr 06 11:26:35 yeah I was thinking the same thing Apr 06 11:26:37 irritating Apr 06 11:26:40 use Log.e and check your logcat Apr 06 11:26:55 how would you go about returning whether or not the post was successful or not to the main thread then? Apr 06 11:27:00 oh but you do Apr 06 11:27:24 return your result in onPostExecute Apr 06 11:27:47 ok Apr 06 11:27:50 return postData(params[0]) etc Apr 06 11:28:07 you might want to check rxjava Apr 06 11:28:23 as your app gets more complicated async task gets more annoying... :) Apr 06 11:28:58 iprime: thanks Apr 06 11:29:21 how do I assign new sendScanResult().execute(re) to a string? Apr 06 11:29:30 Java isn't really my "native" language if you like Apr 06 11:30:07 AsyncTask use String as the third parameter Apr 06 11:30:44 yeah changed that Apr 06 11:30:49 String sendResult = new sendScanResult().execute(re); Apr 06 11:30:49 doInBackground, return postData(params[0]), of course make postData return a string (your result), remove all toasts from post data and chagne onPostExecute to onPostExecute(String result) Apr 06 11:30:59 in onPostExecute you'll be on the main thread Apr 06 11:31:05 what's your native language then? Apr 06 11:32:35 most of my development experience is either web based or with nodejs Apr 06 11:32:45 and backend web development with PHP Apr 06 11:32:49 oh, interesting, what do you usually do with nodejs? Apr 06 11:33:01 currently working on a scraper Apr 06 12:37:31 is it safe to send logcat logs to someone? Apr 06 12:37:38 could it contain personal information? Apr 06 12:38:01 anyone knows disable gridviews refresh effect ? its annoying Apr 06 12:38:34 I'd filter the log to be only related to app being debugged ruukasu Apr 06 12:39:16 ah Apr 06 12:39:21 so just like Apr 06 12:39:23 grep for its name? Apr 06 12:46:30 yup, it's one possible option Apr 06 12:46:48 but adb lets you "logcat" on app basis as well Apr 06 12:47:01 you need to google for the switch/flag though Apr 06 12:54:41 lo, I'm a beginner with creating mobile-apps. And I'm currently having some torubles finding tutorials regarding how to load information from a website into my app I'm creating (and sending information for that matter) Apr 06 12:55:00 anyone know of any good tutorials / free reading on that subject? Apr 06 12:57:32 Xerxez, http://developer.android.com/training/basics/network-ops/connecting.html Apr 06 12:58:18 iprime, cheers Apr 06 13:03:15 with canvas.drawText(String text, int start, int end, float x, float y, Paint paint).....what is int start and int end? as i see float x and float y are xy origin Apr 06 13:06:09 njcomsec: have you tried consulting SDK Reference? Apr 06 13:06:18 i can use drawText(String text, float x, float y, Paint paint) ok. but the text is small... so im hoping the one with the int params affects the text size ut i dont know how Apr 06 13:06:22 you mean the developer website? Apr 06 13:06:29 njcomsec: yes Apr 06 13:06:36 yes im looking at it Apr 06 13:06:44 is Filter.performFiltering() blocking? Apr 06 13:06:59 meaning if i add more and more chars, is order forced on them? Apr 06 13:07:01 it says drawText(String text, float x, float y, Paint paint)... Draw the text, with origin at (x,y), using the specified paint. Apr 06 13:07:13 drawText(String text, int start, int end, float x, float y, Paint paint)...Draw the text, with origin at (x,y), using the specified paint. Apr 06 13:07:33 njcomsec: http://developer.android.com/reference/android/graphics/Canvas.html#drawText%28java.lang.CharSequence,%20int,%20int,%20float,%20float,%20android.graphics.Paint%29 Apr 06 13:08:20 njcomsec, there's TextPaint which is a sublcass of Paint Apr 06 13:08:45 ohh i see.. i didnt realize i was staring at the link with more data to the bottom)) thanks Apr 06 13:09:58 ahh i set the sze in the paint instance Apr 06 13:12:23 that's correct Apr 06 13:12:33 njcomsec, if you need better text drawing support you can check staticlayout Apr 06 13:14:17 Is there a difference between an ios push notification and an android notification? Apr 06 13:18:32 in terms of what? Apr 06 13:19:25 it's almost like saying if there were differences between ios and android Apr 06 13:20:43 If I have a server that sends a push notification after certain scripts are run, do I ahve to do it once for android and once for ios devices or is it the same process? Apr 06 13:22:19 jayjo, that question doesn't make alot of sense :) Apr 06 13:22:34 you need to handle push for each client anyway Apr 06 13:23:37 Mavrik: That's OK, I'm trying to explore this topic and don't know much about it. I've written ios & android apps (very simple) but I want to notify my own phone when my machine decides it's necessary (processing live data). My coworkers use android and I use ios, could I send a push notification to everyone from the same server? Apr 06 13:23:54 Is there like an 'anatomy of a push notification' that I should be looking into? Apr 06 13:24:22 jayjo: you must decide first what you want to choose. Google Cloud Messaging or parse.com or whatever Apr 06 13:24:25 jayjo: and yes you can Apr 06 13:24:45 jayjo, alternatively you can use a third party push notifications provider Apr 06 13:24:58 jayjo, push messages are sent by a rather simple rest request to a Google or Apple push server Apr 06 13:25:16 jayjo, your app must however have a way of sending the device ID to your server Apr 06 13:25:21 which you have to handle manually Apr 06 13:25:31 and of course your app must handle received push Apr 06 13:26:23 OK I think this is clearing it up. As long as I know which devices I want to send the push to, I just send a PUT/POST to apple's or google's servers and the rest is handled from there Apr 06 13:29:59 hey guys, how can i handle a http response (with pdf as body) using retrofit library? Apr 06 13:30:50 I've got an expandable list view, and my child view (the part that is displayed when a row is expanded), loads a view that contains a horizontal scroll view. The horizontal scroll view is a custom view I've created and in my init function I add a linear layout and 20 buttons. The goal is to have a bar of buttons that scroll left to right, however they don't appear. I've debugged and the horizontals Apr 06 13:30:50 crollview does in fact contain the linear layout and the 20 buttons, but they aren't appearing. Apr 06 13:31:12 Is it possible that since this is being loaded in a listview it needs to be refreshed? Apr 06 13:36:55 hi, I have written a small applicaiton that uses the camera to take pictures, but when I change the device orientation and the screen rotate, the camera preview becomes black and I can't use the camera anymore... Anyone can point me to some documentation on how to handle camera rotation please? Apr 06 13:42:35 zalg, you need to stop the preview before rotation Apr 06 13:42:39 and restart it on new surface after Apr 06 13:43:17 Mavrik: how do I do that? Apr 06 13:43:31 O.o Apr 06 13:43:41 O.o Apr 06 13:43:50 zalg, just like you did it the first time Apr 06 13:43:59 zalg: use onPause, and onResume Apr 06 13:44:47 can you point me to some documentation ? Apr 06 13:46:09 about what exactly Apr 06 13:46:20 you already had to do all those steps when initializing the camera Apr 06 13:46:28 you just have to repeat them Apr 06 13:47:39 oh ok Apr 06 13:47:44 ill try that then Apr 06 13:48:47 guys i have an index problem while filtering a gridviews adapter http://paste.ubuntu.com/10750039/ Apr 06 13:49:49 in getview contacts.get(position) returns me original list's position how can i get filtered lists element ? Apr 06 13:54:44 Using the "Tint" widgets does seem safe: https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/internal/app/TintViewInflater.java#77 Apr 06 13:54:53 It seems that we can just watch that file. Apr 06 13:56:13 Mavrik: ok it works, im closing the camera in onPause and calling mCamera.open() in onResume... but my camera is always in landscape mode... how do I make the camera rotate to match the device's orientation? Apr 06 13:59:16 Hey guys, what are the possible drawbacks of using a BufferedInputStream in android for large images Apr 06 13:59:46 OutOfMemoryException Apr 06 13:59:50 i guess Apr 06 13:59:55 but don't really know Apr 06 14:00:27 You can check the code: https://android.googlesource.com/platform/libcore.git/+/master/luni/src/main/java/java/io/BufferedInputStream.java Apr 06 14:00:44 Why are you wanting to use BIS here? Just curious. Apr 06 14:01:42 Anyone know of a good project example that uses retrofit and rxjava together? Apr 06 14:02:23 I am loading Pano images with sizes up 1.5mb. Sometimes I get this error: SkImageDecoder::Factory returned null. I saw several people recommend to use BufferedInputStream Apr 06 14:03:23 Yea I checked in the Android docs and it seemed that some extra space is the only issue. but it's supposed to help with the speed which I like Apr 06 14:03:46 android_sandwich, what platform are you testing on Apr 06 14:04:39 iprime, are you asking for the Android OS version? Apr 06 14:04:53 yes Apr 06 14:06:11 android_sandwich: Couldn't you just use a byte array? Apr 06 14:06:34 And BitmapFactory.decodeByteArray. Apr 06 14:06:38 iprime, anywhere from 3.0 to 5.0 Apr 06 14:07:31 TacticalJoke, yep byte array is one option but somehow BIS seems like a better option Apr 06 14:07:49 wat Apr 06 14:07:51 no! Apr 06 14:07:59 I don't see why that's better. Apr 06 14:08:02 why buffer it android_sandwich? Apr 06 14:08:07 that's double the mem Apr 06 14:08:28 Bear in mind that a lot of SO answers are terrible. Apr 06 14:08:36 Even ones with +70 and a checkmark. Apr 06 14:08:41 try an unsynchronized IS Apr 06 14:09:03 iprime: Why not a byte array? Apr 06 14:09:06 Isn't it simpler. Apr 06 14:09:23 I think he can't use a non-resettable InputStream here. Apr 06 14:09:35 i'm not sure where how he's loading it actually Apr 06 14:09:58 android_sandwich, how do you want to use the bitmap? Apr 06 14:10:42 TacticalJoke, if he wants to resample byte array won't be the better option I guess Apr 06 14:11:28 iprime, I resize the image to created a scaledBitmap and store it on disk. To show, I load it into a Gridview (using Picasso). Apr 06 14:11:43 why don't you let picasso resize it? Apr 06 14:11:50 ^^^ Apr 06 14:11:57 פןבשדדם ׳ןךך דבשךק ןא גם׳מ כםר טםו Apr 06 14:12:06 picasso will scale it down for you Apr 06 14:12:08 thepoosh, shalom uvaracha...:) Apr 06 14:12:15 :D Apr 06 14:12:18 iprime: Is there something wrong with using a byte array when you want to resample? Just curious whether there's something I'm unaware of. :) Apr 06 14:12:46 TacticalJoke, that you have to load the array in memory, if you read an input stream and resample the memory will be less depending on the resample factor Apr 06 14:13:20 iprime: But there's no way around loading the entire array into memory, is there? BitmapFactory.decodeStream has to load the whole thing into memory, AFAIK. Apr 06 14:14:02 hmm interested... my current method returns a bitmap. Apr 06 14:14:23 you can use decodeStream with BitmapOptions where you can set a resampling factor Apr 06 14:14:31 the sample size, that is Apr 06 14:14:42 it will read the whole stream but won't "save" it all in memory Apr 06 14:15:06 i've a view that generates an PDF document. It's works fine at the browsers (desktop). But my final objective is to deliver it over my android application. Right now i'm using retrofit library to handle my requests/responses (only json). So my problem is how can i handle/receive the pdf over android using retrofit. Apr 06 14:15:11 if the sample size is 2 you'll wind up with 4 time less memory Apr 06 14:15:48 iprime, yea I am decoding with BitmapOptions Apr 06 14:16:00 iprime: Right, but what is the difference between using a byte[] and using an InputStream there? Apr 06 14:16:04 i'm thinking picasso might resample too, haven't studied the code Apr 06 14:16:17 In both cases, as far as I know, you have to load the entire byte array into memory. Apr 06 14:16:24 can I get a bitmap back from Picasso? Apr 06 14:16:25 I say "as far as I know" because I'm going on memory. Apr 06 14:16:26 inputstream is like a pointer to a data that can be read, it's not loaded in memory Apr 06 14:16:48 I think Picasso figures out the inSampleSize automatically Apr 06 14:16:50 I guess the question is of whether BitmapFactory.decodeStream loads the entire thing into memory. Apr 06 14:16:55 (At one time.) Apr 06 14:16:55 if you resample it's like saying, save every 2nd bit instead of every bit into memory Apr 06 14:17:02 iprime: That's separate. :D Apr 06 14:17:07 how so? Apr 06 14:17:13 There's the bytes and there's the final Bitmap. Two distinct things. Apr 06 14:17:23 You're talking about the final Bitmap; I'm talking about the input bytes. Apr 06 14:17:51 the input bytes aren't loaded in memory Apr 06 14:18:21 unless you load them in memory, read them and write/save them to mem Apr 06 14:19:11 or are they? :D Apr 06 14:19:15 so for now if I stick to my solution then byte array is better? Apr 06 14:19:35 vs. BIS Apr 06 14:19:36 android_sandwich, is picasso not working well for you? Apr 06 14:20:14 hi Apr 06 14:20:24 iprime: hi Apr 06 14:20:32 john67, you all done with the app? Apr 06 14:20:40 iprime: not yet Apr 06 14:20:51 struggling with the alarm? Apr 06 14:20:53 iprime, I had been using it only to display but not to resize or store images. It's working great for showing but I will try using it for resizing and saving to disk as well Apr 06 14:20:54 iprime: left with the alarm Apr 06 14:20:56 yeah Apr 06 14:21:09 android_sandwich, i think it auto caches to disk Apr 06 14:21:53 iprime: will send it to u Apr 06 14:22:03 iprime, yea but we need to store in a seperate "app" folder from which we later send to the server Apr 06 14:22:04 oh, i'm just about the leave the office Apr 06 14:22:17 android_sandwich, oh i see Apr 06 14:22:31 wonder if you can get hold of a cached picasso file Apr 06 14:23:24 hmm that's an interesting point. it should store it in a location where my app has access to, but I haven't checked Apr 06 14:23:48 consult the sources Apr 06 14:23:57 yep I will Apr 06 14:23:59 "Resources, assets, files, content providers are all supported as image sources." Apr 06 14:24:09 you can load cached picasso image into anything Apr 06 14:24:34 hm wait Apr 06 14:24:47 icedp, as a bitmap, but probably not as easily as a "file" Apr 06 14:25:27 can Picasso return a bitmap? Apr 06 14:25:32 of course Apr 06 14:25:45 you use a Target instead of a say ImageView Apr 06 14:26:12 I am doing this right now Bitmap scaledBitmap = Bitmap.createScaledBitmap(b, (int) halfWidth, (int) halfHeight, true); how would I do that in Picasso? Apr 06 14:26:20 so then you can save the bitmap to a file you know of, but that'll be two files with the same content Apr 06 14:26:37 android_sandwich, half w/h is perfect case for resampling Apr 06 14:26:46 picasso has .resize Apr 06 14:27:06 Picasso.load(url).resize(w,h).into(..) or something Apr 06 14:27:21 yea but that won't return a bitmap Apr 06 14:27:26 oh it will Apr 06 14:27:36 is using Targets the only way? Apr 06 14:27:47 I guess, but what's wrong with that? Apr 06 14:27:59 you want it to happen synchronously? Apr 06 14:28:03 oh nothing, just wondering. Apr 06 14:29:14 no that's not the issue. I haven't Targets but I have looked at the interface and I guess it's not complicated Apr 06 14:29:52 just not wanted to introduce too much new code. I am refactoring the legacy code that someone else wrote Apr 06 14:30:04 how did they do it? Apr 06 14:31:03 by using Bitmap.createScaledBitmap and then having a simple BaseAdapter to show in ImageView Apr 06 14:31:33 no cache etc? Apr 06 14:32:30 nope :( Apr 06 14:32:50 I was looking at LRUcache but haven't worked on it yet Apr 06 14:33:16 why reinvent the wheel, just use picasso or whichever lib Apr 06 14:33:47 iprime, makes sense Apr 06 14:34:26 yeah, is your app published? Apr 06 14:35:04 Thanks a lot for your help, I will try to use picasso for the whole process. It really seems to be doing a good job with showing Apr 06 14:35:36 it's an internal app so we upload to a site for our users Apr 06 14:35:52 ah Apr 06 14:37:06 iprime, again thanks... Apr 06 14:37:33 sure Apr 06 14:44:14 iprime: it doesnt work, still Apr 06 14:47:35 iprime: it doesnt work http://pastebin.com/BcqmADq8 Apr 06 14:49:34 i Apr 06 14:49:35 hi Apr 06 14:49:57 how can I debug the app with sdk and see the println without having to upload the apk to my android? Apr 06 14:49:58 looking to resize some image views after picasso finishes Apr 06 14:50:03 running gradle or something? Apr 06 14:50:07 with the stacktrace? Apr 06 14:50:29 i want to test the code without having to run it in the phone Apr 06 14:50:34 iprime: i got no error but the receiver doesnt send the data to the activity Apr 06 14:52:56 rgpixeltech: You can't debug a program with printlns unless you run the program Apr 06 14:53:19 Depending on the part of your app you could write up tests Apr 06 14:53:22 and run those Apr 06 14:53:29 you have to run something Apr 06 14:53:48 rgpixeltech: emulator Apr 06 15:03:42 thns =) Apr 06 15:03:49 thnks Apr 06 15:08:17 Hi, i've made a custom view which extends a linearlayout Apr 06 15:08:32 when i call .removeAllViews(); Apr 06 15:08:46 i doesnt remove the views ive added Apr 06 15:09:02 it* Apr 06 15:09:08 Anyone knows why? Apr 06 15:09:57 If i call System.out.println(this.getChildCount()); it returns 0 Apr 06 15:12:28 KeizerDev: try using .invalidate() or .postInvalidate() after remove Apr 06 15:13:31 ViewGroup#removeAllViews calls requestLayout() and invalidate on the ViewGroup Apr 06 15:13:48 t2mkn: That was my first thought until I saw what removeAllViews calls Apr 06 15:15:04 KeizerDev: Child count seems to indivate that it DID remove the views, even though it doesn't "appear" so Apr 06 15:16:11 KeizerDev: Always helps to take a brief dip into the source, http://grepcode.com/file/repo1.maven.org/maven2/org.robolectric/android-all/5.0.0_r2-robolectric-0/android/view/ViewGroup.java#ViewGroup.removeAllViews%28%29 Apr 06 15:17:57 KeizerDev: so its not repainting the component. try inside a runnable. Apr 06 15:19:20 Anyone look into Stetho? Apr 06 15:19:36 Is android.support.v4.view.ViewPager incompatible with android.support.v4.app.Fragment ? Apr 06 15:19:41 Hi!, I'm have this issue http://stackoverflow.com/questions/2250770/how-to-refresh-android-listview ........ this is my code: http://pastebin.com/BE4LHcvq I can't do ListView refresh from db :( Apr 06 15:20:13 I currently have fragments that are: android.support.v4.app.Fragment should I convert them over to android.support.Fragment if I want a viewpager Apr 06 15:22:05 no Apr 06 15:24:30 pfn: if that's to me, then thanks - that does actually help Apr 06 15:24:53 pfn: I changed my activity to a FragmentActivity etc instead Apr 06 15:47:33 can you create a listview inside a view? rather than in an activity? Apr 06 15:49:31 eemgr: If a ListView is the child of a LinearLayout, it's already the child of a View, since a LinearLayout is a ViewGroup, which is a View. Apr 06 15:49:38 true Apr 06 15:49:42 Same with any ViewGroup. Apr 06 15:49:44 Why do you ask? Apr 06 15:50:02 I'm trying to nest a listview inside an expandable listview's child Apr 06 15:50:37 so its expandable list view -> child is a view (linear layout) -> contains custom listview Apr 06 15:51:37 i extended ListView to separate the code, and i'm having trouble inflating the view because i cant get the layoutinflator Apr 06 15:52:11 That doesn't sound like a good idea to me. Apr 06 15:52:21 why is that? Apr 06 15:52:25 And doesn't ExpandableListView already support this? Apr 06 15:52:36 You're asking about putting a ListView inside a ListView. ;o Apr 06 15:52:54 expandable listview is like a pseudo implementation... it doesn't allow the child-list to scroll separately from the parent. Apr 06 15:53:20 I see. Still, I've read that we shouldn't put ListViews inside ScrollViews, let alone ListViews. Apr 06 15:54:00 Well, I guess i'll find out the hard way then Apr 06 15:54:49 Isn't there a better way to achieve what you want? Apr 06 15:54:52 I'm getting really frustrated by the limitations on Android, in theory it shouldn't matter since the touch event to start the scrolling should be either on the child listview or the parent listview's groups Apr 06 15:54:57 i.e., a way that doesn't involve nesting a ListView within a ListView. Apr 06 15:55:39 Perhaps, but I don't have free reign with design, unfortunately. Apr 06 15:56:38 Are they requiring you to have a separate scrolling thing within a scrolling thing? Apr 06 15:56:58 guys simple question how can i do that button ? http://postimg.org/image/mozow0nct/ 0 to bottom and right/left , i tried gravity alignparent top true etc. it didnt work for me Apr 06 15:57:00 what i miss ? Apr 06 15:57:13 TacticalJoke: Yup Apr 06 15:57:32 sci-fic: Are you using RelativeLayout? Apr 06 15:57:43 TacticalJoke: From a design perspective, it makes sense. Its an organized method of displaying data. Apr 06 15:57:49 main relative and a child linear Apr 06 15:58:09 sci-fic: Within a RelativeLayout, it's just height=whatever, width=match_parent, layout_alignParentBottom=true. Apr 06 15:58:18 ty Apr 06 15:58:49 eemgr: I think it creates a poor UX in general, though. Apr 06 15:58:56 Scrolling things within scrolling things tend to feel bad. Apr 06 15:59:19 not at all, its a scroll view, you click a button, it drops down a smaller sub-list Apr 06 15:59:29 when i say scroll view, i mean listview, of course Apr 06 15:59:59 Is the sub-list intended to be some kind of context menu? Apr 06 16:00:37 think of it like this - you have a list of businesses, you tap a row and it expands to another scrollable list that shows the businesses locations Apr 06 16:00:52 tap it again and it contracts back to normal Apr 06 16:00:52 I don't see why ExpandableListView isn't enough. Sounds like it covers that use case well. Apr 06 16:00:59 because if there are 100 locations Apr 06 16:01:09 you dont want to lose your sense of context in the our list Apr 06 16:01:20 outer* Apr 06 16:01:28 I see. So a fixed height or something. Apr 06 16:01:34 right Apr 06 16:01:49 either way - like i said, i'll figure it out the hard way Apr 06 16:01:53 and maybe report back with my findings Apr 06 16:02:43 Hmm, I wonder whether a Spinner (basically a combo box) would work. I've never tried putting one in a ListView, though. Apr 06 16:02:56 anyone using retrolambda in their android projects? Apr 06 16:03:34 eemgr: What about even a dialog? Apr 06 16:03:54 The dialog pops up and shows a ListView. It's not perfect, but it may be better. Apr 06 16:04:13 TacticalJoke: that may be an option, i'll keep that in mind as a fallback. Apr 06 16:04:15 thanks Apr 06 16:04:55 I'll be making all my java projects use retrolambda Apr 06 16:05:03 whenever it comes time to update them Apr 06 16:07:44 brb Apr 06 16:07:57 retrolambda runs as part of my build automatically Apr 06 16:09:26 re Apr 06 16:31:06 What are some common things you'd find in a settings/preferences for an app? Apr 06 16:32:33 first opening, some user info, I suppose, makes sense to store everything that's not repeatable in the app preferences, stuff you only need 1 value of. Apr 06 16:32:38 like settings and whatnot Apr 06 16:32:46 maybe the user doesnt want notifications Apr 06 16:32:53 maybe wants a different color theme Apr 06 16:33:05 Ah, I like the notification idea Apr 06 16:33:13 Although they are pretty critical to my app Apr 06 16:33:29 I think I'll add it in anyway though Apr 06 16:33:30 Yeah, it totally depends on the app. Apr 06 16:33:57 t0astt: It's a good idea not to pollute the options menu, though. Apr 06 16:33:58 I have an option to reset tutorial screens Apr 06 16:34:01 Only add stuff with good reason. Apr 06 16:34:03 Simplicity FTW. Apr 06 16:34:14 and I have Open Source Software Licenses, as well as an "About this App" Apr 06 16:36:16 I never understood the motivation for the open source licenses section Apr 06 16:36:24 except for licenses that have an advertising clause Apr 06 16:38:01 Eh, I think it's nice to give credit where credit is due Apr 06 16:38:51 it's pretty meaningless for the vast vast majority of people Apr 06 16:42:27 hmm, are there any open source licenses that require acknowledgement? Apr 06 16:42:41 Oh, question. When my app pushes notifications, currently only the first notification shows. Is there a way to make them "stack" or show multiple under the same notification? Apr 06 16:43:53 Anyone want to chime in: http://stackoverflow.com/questions/29475425/determine-when-my-watch-face-is-being-displayed Apr 06 16:47:23 granted, I don't think any Apache 2.0 libraries are going to hunt you down to do so :) Apr 06 16:52:58 why this give me always Wi-Fi http://paste.ubuntu.com/10751644/ ? Apr 06 16:53:51 sci-fic, is wifi always available? Apr 06 16:54:09 it was and i turn off the wifi Apr 06 16:54:23 even airplane mode gives me wifi Apr 06 16:55:31 weird, looking at the source javadoc isAvailable returns false in the case airplane mode is enabled. Apr 06 16:56:34 sci-fic, try .isConnected Apr 06 16:57:28 why don't you start with 'positive' checks first... if (wifi.isConnected) { } else if (mobile.isConnected) {} else { } Apr 06 16:58:00 i'll, just testing :D Apr 06 16:58:17 all right Apr 06 16:58:23 thanks Apr 06 16:59:26 sci-fic, what device are you testing on btw? Apr 06 16:59:31 is there a way to get the resource ID (int) of the "hamburger" icon on a v7 supportActionBar? Apr 06 16:59:36 nexus 5 Apr 06 17:01:23 quinnjn, you can enable wifi with airplane mode on Apr 06 17:03:16 hey guys with video view can i record at particular time Apr 06 17:03:58 i mean the video which is playing on background to record it for example at 20 second till 25 second Apr 06 17:05:21 essentially trim/cut/split the video? Apr 06 17:05:59 yes now I have it like a local file, later I will have an internet stream Apr 06 17:06:15 i mean video stream from url Apr 06 17:06:23 not a local file Apr 06 17:08:22 don't think that's an easy job, but maybe you can try to have another app do that Apr 06 17:08:24 the camera Apr 06 17:09:01 what? Apr 06 17:09:15 what do you mean to use the camera to record the video from my video view? Apr 06 17:15:21 t0astt: heirarchyviewer if nothing else works Apr 06 17:18:54 pentarex, like there's a crop intent there might be a trim intent, but it probably won't work on every device Apr 06 17:19:03 if you're really enthusiastic you could use ffmpeg :) Apr 06 17:19:04 lasserix: I figured it out. Just need to get my ShowcaseView to recognized it :P Apr 06 17:19:16 iprime ive decided to use INDE from intel Apr 06 17:19:21 i will give it a shot Apr 06 17:19:21 g00s: !!! Apr 06 17:19:27 mornin Apr 06 17:19:38 pentarex, never heard of it, can you give me some link to read up on it Apr 06 17:20:00 iprime https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials Apr 06 17:21:02 iprime those are just examples but you can see that is working fine (at least with their examples :D ) Apr 06 17:21:37 but does it only work on intel androids? or arm too? Apr 06 17:22:21 iprime: ffmpeg is going to be a long process Apr 06 17:22:39 you have to do jni - ndk dev stuff, not to mention learn video encoding/decoding Apr 06 17:22:41 lasserix_, yeah, it's just that i don't know if other tools exist Apr 06 17:22:41 good night all Apr 06 17:23:01 good afternoon to you too Apr 06 17:23:02 i had to build it for android a couple of years ago, more like 3 years ago Apr 06 17:23:18 there was some open project of some chinese guy which was a great starting point Apr 06 17:23:20 iprime: there is as impler way Apr 06 17:23:26 lasserix_, what's that? Apr 06 17:23:28 iprime: you can capture surfaceview Apr 06 17:23:34 oh you can? Apr 06 17:24:41 yeah Apr 06 17:24:44 stackoverflow it Apr 06 17:24:46 i can't remember Apr 06 17:24:56 you might have to use a camera object so dont be misdirected Apr 06 17:26:08 oh all right, i'm in no hurry, but pentarex might be interesting Apr 06 17:26:09 fine, I'm pissed now Apr 06 17:26:23 cannot figure out why the softkeyboard is not pushing my layout up Apr 06 17:27:02 iprime: you might look at https://github.com/sourab-sharma/TouchToRecord Apr 06 17:27:14 thepoosh: wrong uitype in your manifest? Apr 06 17:27:38 nope, it's a fragment and in the other fragments in this activity it does push everything up Apr 06 17:27:44 lasserix_, it's pentarex who's looking for a solution, but he wants to trim a file not anything camera-related Apr 06 17:27:47 i feel stupid for falling on this Apr 06 17:27:58 oh Apr 06 17:28:26 Okay, I've been looking into this BitmapFactory.decodeStream thing for a long. It seems that it does use less memory at one time than BitmapFactory.decodeByteArray does, but it's generally pretty small compared to the size of the Bitmap that gets loaded into memory. Apr 06 17:28:36 lasserix_ ok thanks i saw it Apr 06 17:28:46 TacticalJoke, how does it use less memory? Apr 06 17:28:48 Given this, and given issues such as , I wonder why libraries such as Picasso and Glide don't just use decodeByteArray. Apr 06 17:28:48 iprime thank you too :) just checking inde but no luck to register... Apr 06 17:29:02 We have noticed a weird issue in our logs with SimpleDateFormat("yyyy-MM-dd"); sometimes we get outputs like: 2015-0011-0002, like how is that possible? Apr 06 17:29:06 TacticalJoke: because byte arrays are stupid Apr 06 17:29:08 and wasteful Apr 06 17:29:09 and slow Apr 06 17:29:43 and they should feel bad? Apr 06 17:29:56 lasserix_: any other thoughts? Apr 06 17:30:02 should i attach the file? Apr 06 17:32:20 I'm using decodeByteArray but considering changing. If I do change, though, I have to use some kind of BufferedInputStream for marking and so on, and I get the much greater complexity of the 1024 thing, the WebP thing that Picasso works around, etc. Hmm. Apr 06 17:32:28 thepoosh: in oncreateview: getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); Apr 06 17:32:50 been there, done that Apr 06 17:32:52 nada Apr 06 17:33:07 are you edittexts different? Apr 06 17:33:17 which one are you using for resizemode? Apr 06 17:33:18 just a sec Apr 06 17:33:54 https://gist.github.com/yishai-glide/e06d1e2333ced4e5d0f3 Apr 06 17:35:50 maybe the lines=4 Apr 06 17:36:00 since it knows et will be up to 4 lines it wont push it? Apr 06 17:37:00 it's not pushing the rest of the layout Apr 06 17:37:04 which is pissing me off Apr 06 17:37:52 https://gist.github.com/yishai-glide/8ab26e38939b704dc9c6 Apr 06 17:37:56 this is the layout Apr 06 17:38:13 BTW, I figured out that it's probably safe to use the Tint* widgets (e.g., for subclassing): https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/internal/app/TintViewInflater.java#77 Apr 06 17:39:59 That plus the Javadoc and the 'public' modifiers. Apr 06 17:40:24 thepoosh: fitsSystemWindows? Apr 06 17:40:35 is that true for your other layouts too? Apr 06 17:40:55 i saw it in one of the other layouts that actually does resize and tried it here Apr 06 17:40:59 doesn't work here Apr 06 17:42:11 thepoosh: id try the et in its own view see if it pushes Apr 06 17:42:18 just to see if its the edit text or the surrounding layout Apr 06 17:42:34 sounds good Apr 06 17:42:37 will try Apr 06 17:42:47 k, thanks Apr 06 17:43:07 Hey, im here again :$. I have a problem retrieving objects from parse backend. The objets have been store well and my problem its that seems they object that i retrieve from parse isnt stored in my "categoria" arraylist. Here its code, http://paste.ideaslabs.com/show/jKbwM811U3 the important its at " private void getCategoriasByUser()" at Log.d i can see all retrieve objets but seems itsnt add to my array list. Some help? (sorry for my bad english) Apr 06 17:45:53 try notifyDataSetChanged Apr 06 17:46:44 Hey Apr 06 17:47:22 codekK: did you confirm query.whereEqualTo("createdBy", ParseUser.getCurrentUser()); matches anything? Apr 06 17:47:24 iprime, for me? But my problem its that array isnt only with item i add in my constructor of adapter. Apr 06 17:47:28 lasserix_, Apr 06 17:47:29 yes Apr 06 17:47:41 In log.d i can get all results Log.d("CAT", c.getString("nombre").toString()); Apr 06 17:47:54 codekK, yes, after your for(ParseObject c : categorias) Apr 06 17:48:08 i get what i want but seems the categoria.add didnt take effect Apr 06 17:48:08 after the loop notify the adpater the data changed Apr 06 17:48:22 I'm making an app for android but I don't even own a cellphone. Can someone tell me what are those vertical lists of buttons/links/panels/text/whatever that you find literally everywhere in android apps that usually open another activity? Apr 06 17:48:46 codeKK there is a problem: you have categoria as your CLASS member, but then the callback also has a categoria list: you are adding to the wrong list Apr 06 17:49:01 odraencode, some keywords for you: drawer, drawerlayout, navigation drawer Apr 06 17:49:03 lasserix_, hmm no Apr 06 17:49:07 odraencode, get a phone Apr 06 17:49:10 codekK: sorry still waking up Apr 06 17:49:12 My class member its "categoria" and the callback its "categoriaS" Apr 06 17:49:24 and i add to my class member "categoria" Apr 06 17:49:34 odraencode, or. any android. device. at. all, like a tablet Apr 06 17:49:36 categorias actually has size > 0? Apr 06 17:49:48 Yes Apr 06 17:50:21 codekK, tried yet..? Apr 06 17:50:22 lasserix_, ty but like iprime said when i add "notifyDataSetChanger()" after of my for its works fine Apr 06 17:50:25 pfn: I don't have money to buy one :( Apr 06 17:50:30 iprime, yes Apr 06 17:50:33 with notifyDataSetChanger Apr 06 17:50:35 it works fine! Apr 06 17:50:35 doesn't work? Apr 06 17:50:37 yeah Apr 06 17:50:45 oh great Apr 06 17:50:45 :) thanks a lot! Apr 06 17:50:52 pfn: I'm on an internship/slavery to make an android app Apr 06 17:51:00 Its the normal way for update the adapter? or its a bad practice? Apr 06 17:51:04 odraencode, ask them for a device Apr 06 17:51:47 Hi, there's any documentation on How create a Menu based on an Image? I mean, how map the image and bind button events to them? Apr 06 17:52:14 iprime: I'm not sure it's a "navigation drawer" I'm looking for. This is one of those things that slide open, right? I'm looking for what's inside the drawer, but not in a drawer. Just a... navigation? Apr 06 17:52:36 odraencode, oh it can be anything, it's often a listview Apr 06 17:53:20 listview, recyclerview, whatever you want. the drawer is just a container Apr 06 17:53:40 iprime: so I just make a listview and somehow make the items go to other activities? Apr 06 17:53:53 rgpixeltech, you handle the click on those items Apr 06 17:54:03 and load a new activity, replace a fragment etc Apr 06 17:54:09 What is the object a controller acts on? Apr 06 17:54:19 iprime: I sort of thought this had some built-in widget given how most of them look the same Apr 06 17:54:43 rgpixeltech, doesn't sound androidy, i think you'll be on your own Apr 06 17:55:01 odraencode, then they should provide you hardware Apr 06 17:55:02 odraencode, nah, i don't think so, but there are guidelines about margins etc Apr 06 17:55:09 odraencode: http://www.android4devs.com/2014/12/how-to-make-material-design-navigation-drawer.html Apr 06 17:55:16 Read this, it will give you an idea of how it works Apr 06 17:55:24 I've a custom menu with images, is there any posibility to like map the image? Or I've to split it in Icons and put the target to them? Apr 06 17:55:28 also http://www.android4devs.com/2015/01/recycler-view-handling-onitemtouch-for.html Apr 06 17:55:38 Thanks, pfn, iprime, liuwenhao Apr 06 17:55:48 liuwenhao: thnkx Apr 06 17:56:14 anyone else updated to the latest android studio 1.2-beta? Apr 06 17:56:23 rgpixeltech that link was for iprime, I don't know about your issue haha Apr 06 17:56:31 er odraencode, not iprime Apr 06 17:56:37 liuwenhao, i don't need it, thank you all the same.. :) Apr 06 17:56:37 and also seeing ridiculously overzealous layout rendering? Apr 06 17:56:39 Haha ok Apr 06 17:56:41 all right Apr 06 17:56:49 rgpixeltech, i think your bigger issue would be providing feedback Apr 06 17:57:32 rgpixeltech, is it just simple rectangular hit areas you want? Apr 06 17:58:08 no is not, is a Circle image with 4 items inside Apr 06 17:58:35 4 items of irregular shape? Apr 06 17:58:41 no they are equals Apr 06 17:58:45 i mean Apr 06 17:58:50 yes irregular shape Apr 06 17:58:50 maybe show the pic? Apr 06 17:58:52 oh Apr 06 17:58:59 is not a square Apr 06 17:59:24 maybe you should extract the background and extract the four shapes and use views for them, idk Apr 06 17:59:55 good, is a good point, to do it custom like this is that necessary good Apr 06 18:00:09 and I can move them I mean, handle them in position x - y? Apr 06 18:00:19 well, i woudln't say image with hit areas is good in android Apr 06 18:00:21 to fit all of them? Apr 06 18:00:26 yea Apr 06 18:00:44 is a design wich I just receive Apr 06 18:00:48 oh Apr 06 18:01:18 is it just one time thing or do you have to create a generic solution? Apr 06 18:02:05 hello Apr 06 18:03:18 whats best irc client for mac that has differing colors for users? Apr 06 18:03:46 lasserix, i use hexchat, i think it's available for osx Apr 06 18:04:46 hmm Apr 06 18:06:49 http://fragmentedpodcast.com/ woo Apr 06 18:06:56 two shows full of rxjava Apr 06 18:07:10 lasserix: weechat for the win, it runs on everything it seems Apr 06 18:08:36 weechat loks pretty cool Apr 06 18:11:22 iprime, sorry i dont want to disturb you but i have another question... How u can see i have a dialog that its used for insert data to parse, well.. i want autoupdate the adapter when i submit the dialog. I see about use a listener for pass event back to my fragment. Then, when i get the listener on my fragment i should call the getCategoriasByUser adapter function (that retrieves information for parse) from my fragment? Or its a bad practice? What Apr 06 18:11:22 u should suggest me? Apr 06 18:13:55 codekK, i'm not familiar with parse and your app, so i'm not sure I can suggest you anything Apr 06 18:14:21 do you want to update your adapter with what you send to parse? Apr 06 18:15:11 I have a function on my adapter that retrieve data from parse (a OO database), and this data its added by dialog. Well, i want when i set somehting with dialog call again the function to retrieve data that its on my adapter. Apr 06 18:15:55 why do I get IllegalStateException on this? interstitial = new InterstitialAd(this); interstitial.setAdUnitId(AD_UNIT_ID_FULL); interstitial.setAdListener(new AdListener() { onAdLoaded() { interstitial.show(); Apr 06 18:16:10 its the interstitial.show(); that gives the exception Apr 06 18:16:14 I can store an arraylist in SharedPreferences, right? Apr 06 18:16:16 Im reading about http://developer.android.com/guide/topics/ui/dialogs.html#PassingEvents . And then the function taht its used for retrieve data from parse i make it public and then from fragment that uses the adapter i can call this function Apr 06 18:18:47 https://github.com/simpligility/maven-android-sdk-deployer/issues/246 Apr 06 18:18:48 ugh Apr 06 18:18:49 more pita Apr 06 18:19:41 Hmmm, im getting problems trying to override the onAttach(Activity activity) on my DialogFragment. Android studio said that "Cannot resolver symbol 'Activity'" hmm wtf? Apr 06 18:20:17 hmm, newer appcompat/mediarouter fixes this Apr 06 18:20:29 t0astt: String[] or int[] Apr 06 18:20:42 codekK, i'm trying to understand what you need exactly... so you want to refresh your adapter after you close a dialog? Apr 06 18:20:44 t0astt: as far as I know, but surely you can convert) Apr 06 18:21:00 iprime, yes only when i click "accept" button Apr 06 18:21:16 i want to call again a method that its stored in my adapter for retrieve objects from db Apr 06 18:21:45 But yes, what i want its to refresh my adapter after close the dialog that uses the same fragment Apr 06 18:22:32 Then i think i can call the method that retrieve objects in my fragment from adapter instance and use the listener like http://developer.android.com/guide/topics/ui/dialogs.html#PassingEvents Apr 06 18:23:12 codekK, that looks good Apr 06 18:24:04 iprime, ok im doing it. I hope it works, and dont disturb u more :$ Apr 06 18:24:39 Thank you very much, I am learning and youre being very helpful Apr 06 18:24:48 that's fine codekK Apr 06 18:30:56 hi, i'm getting an error: com.android.dex.DexException: Multiple dex files define Lorg/webrtc/MediaSource; while building an app under the webrtc source tree. is there a way to see which dex files are causing the issue? Apr 06 18:32:22 where to download android samples grom github ? Apr 06 18:32:48 I have a question about services. In general, is it better to combine multiple IntentServices or keep them separate? How much is the service overhead? Let’s say I want a service for the network and a service for the camera. Would combining them likely improve app performance? Apr 06 18:33:29 ooh finally I found them :) Apr 06 18:33:38 iprime, arg didnt work cause i cant use the onAttach method for populate the listener, cause i want to populate it to my fragment no to my activity... :$ Apr 06 18:34:07 codekK, just pass some listener then Apr 06 18:36:37 how do I make gradle create a pom? Apr 06 18:36:56 codekK, or the fragment for that matter as long as you manage it properly Apr 06 18:37:07 i have an android key which i'm using for maps in my app which is working fine. Now can i use the same android key for places autocomplete api too? I tried using it but i'm always getting empty string as result. Apr 06 18:40:31 i tried something liek this http://paste.ideaslabs.com/show/fyWuFb7qBa atm i didnt get exception or something but seem didnt work cause the update didnt take effect :(+ Apr 06 18:44:10 codekK: That "Instantiate the NoticeDialogListener so we can send events to the host" comment is wrong. It doesn't instantiate anything -- it simply copies a reference. Apr 06 18:44:30 TacticalJoke, well its from devs guide Apr 06 18:44:43 Im not expert but just its a copy paste from http://developer.android.com/guide/topics/ui/dialogs.html#PassingEvents Apr 06 18:45:04 Anyway TacticalJoke thank you for advice Apr 06 18:45:15 Damn, that's bad. Apr 06 18:45:24 codekK: I'm guessing your problem is elsewhere, though. Apr 06 18:47:24 codekK, in the guide they talk to the activity, you want to talk to the fragment instead Apr 06 18:47:48 so maybe you can let the fragment implement some interface and pass it to your dialog Apr 06 18:48:33 Here full code, http://paste.ideaslabs.com/show/tUwAvR8nqJ adapter, dialog and fragment Apr 06 18:49:11 iprime, atm my fragment implement the interface im looking it but i think the problem its that "im not talking correctly to fragment" the event Apr 06 18:50:11 you have to set dialogListener to something (your fragment really) Apr 06 18:51:16 iprime, i do it in onCreate liek dialogListener = (InsertarCategoriaDialogListener) getParentFragment(); but this seems not be correct Apr 06 18:51:18 not sure why you would do that onCreate Apr 06 18:51:34 seems like a generic solution to me Apr 06 18:51:41 Im too xD. Cause the docs uses a onAttach for activity and im not sure what to use for Fragment Apr 06 18:51:45 why don't you create a method like setlistener(...) Apr 06 18:51:58 Oh, and dependency injection? Apr 06 18:52:18 hmm Apr 06 18:52:23 ok Apr 06 18:54:27 kinda Apr 06 18:54:52 it's not like yoru dialog would totally depend on your listener Apr 06 18:56:20 where can I find the LoaderThrottle sample ? Apr 06 18:56:44 <_genuser_> the internet? Apr 06 19:00:15 iprime, wow it works like a charm. in dialog i make a setter for listener. And in fragment when i instanciate the dialog i call the setter with reference to my fragment that implements the listener and now works fine. :D Apr 06 19:04:40 anyone having problems with android emulator on kernel 3.19.3 ? ( https://bugzilla.redhat.com/show_bug.cgi?id=1187982 ) Apr 06 19:07:45 Hi! Apr 06 19:08:11 What restritions does an app have while in background Apr 06 19:08:12 ? Apr 06 19:08:34 glad it works for you codekK, it's really a fairly easy thing to do Apr 06 19:08:37 can it access all of the phone components? Apr 06 19:09:36 pouta, such as? Apr 06 19:09:47 camera nfc bluetooth Apr 06 19:10:26 And if, for eg, the nfc is turned of can the app in background turn it on without a prompt? Apr 06 19:11:16 Sooo I can set a minimum height on my recyclerview, but I can't set a maximum height. Anyway to do that while still using wrap_content? Apr 06 19:11:54 pouta, nft on a rooted phone you can Apr 06 19:12:12 I'm talking about a stokc android Apr 06 19:12:15 anyone use stetho? Apr 06 19:12:16 stock* Apr 06 19:12:23 t0astt, wrap_content with listview/recyclerview etc is wrong Apr 06 19:12:34 iprime how about camera? Apr 06 19:12:55 iprime: is the correct way through using setFixedSize()? Apr 06 19:13:34 t0astt, fixed height sounds better Apr 06 19:13:35 Hi all °/, I've been struggling the past hours with a simple feature, namely changing the background of the actionbar. Multiple online tutorials made me end up with: http://pastebin.com/f1TMzBt3 . But I don't see any changes. Apr 06 19:13:49 Any feedback would be appreciated :) Apr 06 19:14:30 Quitta, it's not a difficult thing to do, but why not use Toolbar? Apr 06 19:15:01 because using actionbar is low impedance if you've been using actionbar to begin with Apr 06 19:15:21 Quitta, there are some online tools you can use to completely style your action bar Apr 06 19:15:27 Quitta: I can't remember, but you might need to use 'actionBarStyle', not 'android:actionBarStyle'. Apr 06 19:15:33 iprime: can I PM you? Apr 06 19:15:36 Since you're using AppCompat. Apr 06 19:15:41 pouta, sure Apr 06 19:15:57 how do I do it? Apr 06 19:15:59 -.- Apr 06 19:16:21 Also, I'm not sure you can mix Holo and AppCompat themes like that. Apr 06 19:16:26 iprime: to be honest I never styled/themed any app before. what's the difference with Toolbar? Apr 06 19:16:37 "Widget.Holo.Light.ActionBar.Solid.Inverse" and "Theme.AppCompat.Light.DarkActionBar"? Seems a bit odd. Apr 06 19:16:46 pouta: xD by command you can always "/msg iprime Hello" Apr 06 19:16:55 pouta iirc pming is done by /query (name) (msg) Apr 06 19:16:57 I want to open a new tab xD Apr 06 19:17:23 done, thanks Apr 06 19:17:25 or(better) like Quitta said :) Apr 06 19:17:44 rodrigues percebes de android, suponho Apr 06 19:18:20 Quitta, for the actionbar you might check this: http://jgilfelt.github.io/android-actionbarstylegenerator/ Apr 06 19:18:33 and that I do remembr, but I manage to f*ckup joining another channel and ashame myself pubically :D Apr 06 19:19:29 iprime: I found that site, but they have this license agreement, I prefer to do it myself, but can't manage it. Apr 06 19:19:54 Quitta, so just see how they do it, you don't have to use all of their code Apr 06 19:20:28 their code is quite complex :) Apr 06 19:20:41 but even the 'official' example does not work: https://developer.android.com/training/basics/actionbar/styling.html Apr 06 19:21:12 but does their code work? nevermind how complex Apr 06 19:22:53 Quitta: are u sure u apply the theme to activity? like : Apr 06 19:23:53 yes Apr 06 19:24:45 TacticalJoke: changing android:actionBarStyle to actionBarStyle made a change, now the background is white instead of the wanted color :/ Apr 06 19:25:12 I remember that i used actionbar for introdution on android and i could PIMP that little bar (anyway for a more customized app i designed my own ActionBar) Apr 06 19:27:32 First day I enter this channel and I already found a Portuguese! Nice to know we are here :) Apr 06 19:31:24 Hi guys Apr 06 19:32:43 Question : I have a an activity with pager (fragments) and tab navigation in actionbar Apr 06 19:33:14 Someone know why sometimes in logcat at android studio i see this error : Could not find class 'android.support.v4.app.FragmentTransitionCompat21$3', referenced from method android.support.v4.app.FragmentTransitionCompat21.setSharedElementEpicenter ??? i had the support.v4 library added :S and all works fine Apr 06 19:33:28 Everythings work fine but when swiping view, the next tab doesn't become active Apr 06 19:33:42 But when tapping tabs it's become active Apr 06 19:34:36 Is there an action to bind in getItem method from FragmentPageAdapter ? Apr 06 19:40:43 I think I just found g00s on reddit :P Apr 06 19:40:53 Afzal lol i think i know why :) Apr 06 19:40:57 haha Apr 06 19:42:57 Quitta: Don't mix Holo and AppCompat themes. Apr 06 19:42:57 Use one or t'other. Apr 06 19:43:37 I discovered that my error lies in using ActionBarActivityinstead of Activity Apr 06 19:43:56 The error is that you were using Activity? Or the error is that you were using ActionBarActivity? Apr 06 19:46:38 the last one, I was using ActionBarActivity without knowing it. Apr 06 19:48:38 I'd like to make an app which responds to a gesture whilst the device screen is off. Is this possible with android? Apr 06 19:50:24 no Apr 06 19:56:14 ugh; i submitted a bug against the Play Services SDK on the defect tracker but it got shitcanned as 'wrong forum'. I still haven't found what exactly the right forum is Apr 06 19:57:53 basiclaser: if you target only for OLED screen devices and just show black background... Apr 06 20:01:10 hello Apr 06 20:01:27 can I import non-Android projects from eclipse to Android Studio? Apr 06 20:01:32 these are plain Java code Apr 06 20:01:56 like a library Apr 06 20:02:40 paulo_: you can try Apr 06 20:02:56 it is a pain Apr 06 20:03:15 a friend did it and bitched about it for like half a day on irc haha Apr 06 20:03:52 paulo_: you need to know the differences and what needs translating Apr 06 20:04:19 shmooz: it's mostly plain java code though. Apr 06 20:04:29 that doesn't explain much Apr 06 20:04:52 paulo_: try it and see what it complains about Apr 06 20:05:15 shmooz: ok, thanks Apr 06 20:10:58 icedp: shame.. I wanted to make an app which worked when the phone was locked/asleep Apr 06 20:11:10 not possible? Apr 06 20:11:59 what is your app trying to do when the phone's locked? Apr 06 20:12:09 basiclaser: Isn't that contradictory? Apr 06 20:12:30 basiclaser: if it's sleeping there should be a non-sleeping mechanism to wake it up. which is not in place. it's hardware issue Apr 06 20:12:31 Hey ,do you perhaps know if I can limit download speed of "repo sync" command ? Apr 06 20:15:30 kubast2, you're the first person i've ever heard ask for that Apr 06 20:15:35 i usually want it to go as fast as possible :P Apr 06 20:16:10 I mean I always like to the things on the internet when I download something Apr 06 20:16:14 even if it takes more time Apr 06 20:16:30 it just feels faster ,as I have something to do Apr 06 20:17:51 and I share internet connection Apr 06 20:18:15 You always like to what? Apr 06 20:19:33 Read articiles ,watch youtube videos[mostly youtube videos] Apr 06 20:19:38 TacticalJoke: I supose he wants to say "... like to do the..." Apr 06 20:20:13 is there some setting to have padding and margin begin at the edge of a view and not at it’s anchor? trying to put some text to the right of a button, but its getting sucked under the button Apr 06 20:20:30 kubast2, there's a bunch of stuff that can limit speed in linux, look at 'trickle' Apr 06 20:20:33 kubast2, http://www.tuxradar.com/content/control-your-bandwidth-trickle Apr 06 20:20:53 kubast2, it's a ldpreload hack that slows down sockets Apr 06 20:22:52 samskiter, what layout are you using? Apr 06 20:23:07 android-dev361: relativelayout Apr 06 20:23:13 hang on, maybe its not that Apr 06 20:23:25 its happening on other views too.. Apr 06 20:23:39 maybe youre using linearLayout? Apr 06 20:23:48 no, its a relative layout Apr 06 20:24:03 one view is centered and the other it ‘torightof" Apr 06 20:25:12 and where you want to put text? Apr 06 20:25:35 right of the button Apr 06 20:25:42 samskiter: align baseline? Apr 06 20:25:56 baseline should resolve Apr 06 20:26:00 vertical alignment doesnt matter Apr 06 20:26:01 ups xD Apr 06 20:27:07 What is the url for support v4 javadoc, so that I can linkOffline in my javadoc? Apr 06 20:27:13 forget the proper name, ghe layout viewer (at least in eclipse) shows you visually what relativelayout is doing Apr 06 20:28:33 baseline is the wrong direction Apr 06 20:28:55 ach, i need to fill_parent on the relativelayour Apr 06 20:29:34 samskiter: it's just endless isn't it?? Apr 06 20:30:01 people still use fill_parent? Apr 06 20:30:11 fill/match. whatever :P Apr 06 20:30:16 lol Apr 06 20:30:43 Afzal: ive now been dealing with both so much in various project (some legacy) that i forget which is the new one :D Apr 06 20:30:44 maybe one day we'll evolve past that confusion, and just use "parent" and "content" Apr 06 20:31:17 legacy is the worst but match_parent was API 8 man, are you supporting < API 8? Apr 06 20:31:58 wrap and fill are both just -1 Apr 06 20:32:07 wrap is -2 Apr 06 20:32:25 groxx hopefully before that, we'll have mind reader devices to read our minds for layout :) Apr 06 20:32:26 1s/wrap/match Apr 06 20:32:40 myke: i think the layout system is drawing wrong imo. the rel layout is shrinking and pushing the text under the button so the text is no longer ‘to the right of’ the button Apr 06 20:33:21 I want Glide to pause animated GIFs in Activity.onStop but *not* stop downloading images. Is this possible? Apr 06 20:33:37 time to try gitlab.com instead of bitbucket Apr 06 20:34:05 samskiter: I think we up to the point you should share you layout ) Apr 06 20:34:07 Afzal: +1 for gitlab. i set up our instance here. Apr 06 20:34:11 indeed Apr 06 20:34:47 samskiter oh yeah, I did that a while back but gitlab.com is their own public instance Apr 06 20:34:56 yea Apr 06 20:34:59 icedp: http://paste.ofcode.org/32jGHTRcCNXn9vGr2aztd4U Apr 06 20:35:21 and it looks much better than what I deployed back then lol Apr 06 20:35:21 with the rel layout to to wrap content, the text gets pushed under the button Apr 06 20:35:36 :P yea, it’s still quite weak in terms of notifications Apr 06 20:35:43 and damn slow Apr 06 20:38:24 samskiter: Is the marginRight value ineffective because of toRightOf? Apr 06 20:38:24 samskiter: works as expected for me. something's wrong with you style maybe? Apr 06 20:40:42 icedp: did you set the rel laytout to wrap_content Apr 06 20:40:43 ? Apr 06 20:41:10 TacticalJoke: the marginright works, but it works 50%. because the relativelayout distributes the space either side of the button Apr 06 20:41:14 samskiter: I changed nothing except deleting style I don't have and stubbing text Apr 06 20:41:38 icedp: change the rel layout to wrap content, the text gets pushed under the button Apr 06 20:42:27 imo that’s a bug Apr 06 20:42:54 hehe got it Apr 06 20:42:57 :) Apr 06 20:43:07 samskiter: u mean android:layout_width="fill_parent" to -> android:layout_width="wrap_content" ? Apr 06 20:43:15 indeedy Apr 06 20:43:26 a nice gotcha… Apr 06 20:43:31 staring at it for a while Apr 06 20:43:39 samskiter: What if you just set leftPadding for the TextView? Wouldn't that give you what you want? Apr 06 20:43:46 Instead of the marginRight. Apr 06 20:43:48 TacticalJoke: same difference Apr 06 20:44:58 I guess you mean "no difference". "Same difference" makes my brain throw a StackOverflowError. :D Apr 06 20:45:24 yes, sorry, that’s actually a phrase that annoys me too. Apr 06 20:45:50 yep, those are two big differences Apr 06 20:45:55 :) Apr 06 20:46:02 i could care less! :P Apr 06 20:46:06 ;) Apr 06 20:47:13 anyway, i imagine that layout doesn’t work because it would require multiple layout passes. but it’s wrong imo Apr 06 20:47:47 if you set your relativelayout to layout_gravity:center and remove button center_in_parent doesn that do the trick?? humm Apr 06 20:47:52 I don't see why TextView.paddingLeft=whatever doesn't work. Apr 06 20:48:58 What if you remove margins/padding completely? Does the TextView appear where you'd expect (relative to the Button)? Apr 06 20:49:57 fyi rodriguespt, s/fill_parent/match_parent/ Apr 06 20:50:12 or i guess tha'ts for samskiter Apr 06 20:50:19 both centerHorizontal and centerInParent cause problem Apr 06 20:50:21 but fill_parent has been deprecated since api level 8 Apr 06 20:51:00 canadiancow: i think you missed the fill/match parent conversation we already had Apr 06 20:51:05 fill_parent = match_parent in any case Apr 06 20:51:28 i did, i just respond that way whenever i see "fill_parent" :p Apr 06 20:51:43 canadiancow: i really dont understand what you said "[21:49] fyi rodriguespt, s/fill_parent/match_parent/" Apr 06 20:51:58 i'm saying don't use fill_parent Apr 06 20:52:08 rodriguespt: See the next message. Apr 06 20:52:16 rodriguespt: translating for you information, you should substitude fill_parent with match_parent)) Apr 06 20:52:17 anyone using ripple effect libraries? if yes, give name/feedback of the performace! pls :) Apr 06 20:52:19 TacticalJoke: with no padding or margin, the text appears half hidden Apr 06 20:52:28 Yeah, rodriguespt! Use match_parent. :D Apr 06 20:52:35 samskiter: U wot m8. Apr 06 20:52:38 lol Apr 06 20:52:58 so what’s happening is the rel layout is getting a width of buttonwidth+textwidth Apr 06 20:53:02 but then its button the button in the middle Apr 06 20:53:27 so theres empty space of textwidth/2 on the left and half ot the text is on the right. the text sits as far right as it can Apr 06 20:53:37 for real bruv Apr 06 20:54:48 hello Apr 06 20:54:52 im back Apr 06 20:55:00 ok.. i just dont know where the f.. i used fill_parent.. i told samskiter to substitute :/ Apr 06 20:55:16 The text shouldn't be half-hidden without padding/whatever. Apr 06 20:55:28 TacticalJoke: try it Apr 06 20:55:32 samskiter: can you send a print please? Apr 06 20:55:44 it’s above: http://paste.ofcode.org/32jGHTRcCNXn9vGr2aztd4U Apr 06 20:55:50 set the relativelayout width to wrap_content Apr 06 20:56:19 samskiter: the problem is actually not only overlapping Apr 06 20:56:27 the fricking button should be in center Apr 06 20:56:38 icedp: the button is centered for me Apr 06 20:56:39 samskiter: i mean the print of the layout (half-text seen) Apr 06 20:56:42 inspect the relativelayout Apr 06 20:57:04 No overlap here. Apr 06 20:57:07 Even if I remove the margin. Apr 06 20:57:19 TacticalJoke: did you modify the relativelayout to wrap_content width Apr 06 20:57:27 http://t.sql01.com/sc/5cc68211_1428353833.png samskiter Apr 06 20:57:30 Oh. No. Apr 06 20:57:34 samskiter: undetermined behaviour ) Apr 06 20:57:35 Why would you do that? Apr 06 20:58:14 TacticalJoke: cos that’s the situation i think there is a bug :D Apr 06 20:58:29 A bug in Android? Apr 06 20:58:46 well as icedp -confusing/undefined behaviour Apr 06 20:59:02 not necessarily a bug Apr 06 20:59:25 icedp: yea, looks like the button is centered Apr 06 21:00:02 Try removing centerInParent. It works as expected then. Apr 06 21:00:11 It's just the centerInParent thing. Apr 06 21:00:20 TacticalJoke: yup Apr 06 21:00:32 but in my case, i wanted the button to be centered Apr 06 21:00:55 samskiter: actually yes, agreed on second though Apr 06 21:01:12 an interesting gotcha anyway. Apr 06 21:01:16 The problem appears to be that the TextView is being aligned to the right of the Button *before* centerInParent is considered. Apr 06 21:01:44 TacticalJoke: yes, the relativelayout is measured and then the views are positioned within it Apr 06 21:03:29 leaky abstraction is leaky Apr 06 21:03:45 It feels like trying to put two magnets together at the wrong ends. Apr 06 21:04:00 How could this make sense? Apr 06 21:04:11 the relativelayout needs to grow a little more Apr 06 21:04:16 To which size? Apr 06 21:04:20 by textWidth more Apr 06 21:04:33 so that it is buttonWidth+2*textWidth wide Apr 06 21:04:44 then it could accomodate the positioning Apr 06 21:04:48 Hmm, okay. I guess that way of looking at it makes sense. Apr 06 21:05:41 well to be complete: buttonwidth+2*(buttonrightmargin=+textwidwthleftmargin+textwidth) Apr 06 21:05:46 So you'd need to measure the two children, place them (taking into account margins), and *then* move the Button to the middle, and then resize the container and, finally, place the children again. Apr 06 21:06:08 yes, you’d need a much more intelligent measure passs Apr 06 21:06:09 s/the children again/the TextView again/ Apr 06 21:07:25 android’s layout system does lack this kind of intelligence generally. e.g. creating views that match the size of other views elsewhere. Apr 06 21:07:45 or creating fixed-aspect/square views Apr 06 21:08:33 it’s the major area the ios constraint-base layout system beats android’s Apr 06 21:09:01 yeah, except for some features of RelativeLayout, there isn't a constraint-based layout thing for android (built in. dunno about 3rd party) Apr 06 21:09:11 I'd love to build one for fun tho Apr 06 21:09:31 probably like this, since I would indeed go for cassowary: https://github.com/anandsainath/constraint-layout Apr 06 21:09:38 well the android system hasn’t changed much over the years, but nslayoutconstraint etc is quite new. so maybe they’ll do a big overhaul soon Apr 06 21:09:58 I'd guess almost never, since they're so big on backwards compatibility Apr 06 21:09:58 I guess the simplest way to think of it is to have a TextView on each side, the same size. Then the Button is centralised. Apr 06 21:10:05 But have only one TextView in reality. Apr 06 21:10:06 but more support libs / etc, sure Apr 06 21:10:31 TacticalJoke: yea, fill_parent was fine for me in the end, but i’ve done things like that with dummy views in the past Apr 06 21:11:08 groxx: they’ll probably manage it somehow. itlll just make the sauce moar speghetti Apr 06 21:11:51 Remember "match_parent". :D Apr 06 21:12:03 oh i did it again!? *sigh* Apr 06 21:19:14 This looks new: http://antonioleiva.com/kotlin-android-extension-functions/ Apr 06 21:20:12 That example looks wrong, though. Surely he's missing a "show()" there. Apr 06 21:20:40 Also, why not make it an extension function of Toast? Then we can just say "Toast.show('whatever')". Apr 06 21:21:10 Wait, that wouldn't work. Never mind. Apr 06 21:29:08 we can use standalone toolbar in older SDKs right? Apr 06 21:29:32 yeah Apr 06 21:29:36 cool cool Apr 06 21:30:25 i wonder what the next step is for rxjava Apr 06 21:30:42 more transform functions!! Apr 06 21:30:42 :p Apr 06 21:30:58 dunno Apr 06 21:32:07 That blog post was pretty underwhelming. Apr 06 21:32:11 'rxnetty-remote-observable' sounds cool Apr 06 21:32:29 TacticalJoke lol Apr 06 21:32:49 come on man, get that app done ! Apr 06 21:33:19 :D Apr 06 21:33:43 TacticalJoke you notice, another one of the reddit apps had to change their name Apr 06 21:33:51 Oh, which one? Apr 06 21:34:56 why nobody would do live-editing tool, so we could restart activities/change layout with a refresh button hit?) Apr 06 21:35:28 icedp: too much compile time stuff, conisder R Apr 06 21:35:56 TacticalJoke http://phandroid.com/2015/04/01/best-android-apps-relay-for-reddit-news/ Apr 06 21:36:11 icedp there is one Apr 06 21:36:17 just not from google Apr 06 21:36:40 what's that?) Apr 06 21:36:49 I think the new name is better. Apr 06 21:36:52 The old one was so boring. Apr 06 21:37:11 Though the new one isn't awe-inspiring either. Apr 06 21:37:42 icedp http://jimulabs.com/ Apr 06 21:39:14 ^ that's cool, but is it $99 USD cool? Apr 06 21:39:26 g00s: looks nice, yep Apr 06 21:39:29 well, they have to eat somehow Apr 06 21:39:36 taht's awesome g00s Apr 06 21:39:49 maybe your question is : why didn't google do that, and to that i have no answer Apr 06 21:39:56 $99 isn't much cash...apple/cjarges $99 just to be a dev Apr 06 21:40:58 What is this nonsense that an arrayadapter needs a textview resource id? Apr 06 21:41:14 I tried Clojure REPL, it's actually pretty cool. You press a button and block under the cursor gets executed on phone. So you can recreate activity if selection the onCreate() or just change view. But overhead and no Android specific IDE support ( Apr 06 21:41:17 It wants an XML file to inflate. Apr 06 21:41:18 eemgr dont use arrayadapter, just use BaseAdapter Apr 06 21:41:35 I wish I had known that it was so severely handicapped from the start... Apr 06 21:41:54 but, an easy transition i suppose Apr 06 21:42:09 g00s: humm like that jimulabs :$ Apr 06 21:44:11 hm you must override getItemId Apr 06 21:44:54 I think you can throw an OperationNotSupportedException there. Apr 06 21:45:00 If you're not using stable IDs, or whatever it is. Apr 06 21:45:10 Though don't quote me on that. :D Apr 06 21:45:19 haha alright Apr 06 21:47:01 So if you have an async callback to your getView in an adapter, say for an image download, is it wise to pass in a weak reference to the imageview? Apr 06 21:47:12 since it may be garbage collected if scrolled out of view? Apr 06 21:47:20 hey guys! :) Apr 06 21:47:25 eemgr: that is one way...want a nice examle? Apr 06 21:47:29 sure Apr 06 21:47:48 kinda a great question here about retrofit, custom converter, and pdf file exchange http://www.codeshare.io/UamZA Apr 06 21:48:09 https://github.com/fkspro/android-tinyasync Apr 06 21:48:47 Apr 06 21:49:07 myke: that appears to be nearly identical to what i'm doing, but in a more organized fashion. Apr 06 21:49:09 Apr 06 21:49:12 how would you guys go about finding dev teams to outsource (cheap) to? We are looking for a team to build a video calling application, front and backend Apr 06 21:49:19 wtf Kotlin inspections in a java project with no kotlin plugin >_< Apr 06 21:49:20 myke: You're still not using StringBuilder. Apr 06 21:49:29 eemgr: i worked it out one weekenc and made a nice example Apr 06 21:49:41 TacticalJoke: :( yes you are right, t0/lashes Apr 06 21:49:44 50 Apr 06 21:49:45 Great, thanks! This will be nice to show my intern too. Apr 06 21:49:51 very straight forward Apr 06 21:50:12 Also, stuff like "String line;" miles away from where it's used isn't good. Apr 06 21:50:14 eemgr: plz change geturl to use stringbuilder...i promised TacticalJoke i'd fix that! Apr 06 21:50:16 Just makes code hard to read. Apr 06 21:51:48 TacticalJoke: yup, old C habit fro the really old days when you had to declare all your vars at the top before any code Apr 06 21:51:59 pre-C89 or whatever Apr 06 21:52:30 TacticalJoke: btw i'm about 10-15 mins away from having that listview in a listview fully worked out Apr 06 21:52:37 TacticalJoke: so... the moment of truth. Apr 06 21:52:46 strangely at one point it was right before the loop Apr 06 21:53:24 but thank you for code review! Apr 06 21:54:01 i genuinely believe this example provides insight for devs new to android Apr 06 21:54:20 I wonder how many people in general know when to use a weakreference... Apr 06 21:55:02 from what i've read, not many Apr 06 21:55:12 TacticalJoke: so the external listview is intercepting the scroll/touch events. Time to mess with it a bit. Apr 06 21:55:30 one anecdote from a senior dev hirimg for a job said only 1 in 20 applicants could even casually explain what a weakref is Apr 06 21:55:39 that high? Apr 06 21:56:30 lol Apr 06 21:57:33 so is there any word about when google is planning to have android support java 8? Apr 06 21:57:53 somewhere after the heat-death of the universe, most likely Apr 06 21:58:14 i don't think they're interested in revisiting that court case just yet. Apr 06 21:58:57 didn't they win? /me can't remember almost any of the details Apr 06 21:59:10 i doubt language features have any worries about legal things; maybe adding more java 8 runtime classes Apr 06 21:59:14 initial loss, eventually overturned in their favor, iirc. Apr 06 21:59:44 it's probably still in appeals. Apr 06 21:59:45 java 8 adds some awesome stuff though, so it would be nice Apr 06 21:59:51 yeesh didn't even know about that Apr 06 21:59:55 lambda's... for one. Apr 06 21:59:59 unfortunately I'm getting all sorts of fussiness from retrolambda Apr 06 22:00:01 lewellyn: heh, probably :) Apr 06 22:00:05 : ( Apr 06 22:00:21 fussiness? Apr 06 22:00:49 getting some Dex errors Apr 06 22:01:06 and as far as I can tell everything is applied correctly in my build file Apr 06 22:01:12 I pity the fu who gets dex errors Apr 06 22:01:15 znyone tried coroutines? there's a coroutine solution on google code, it does rewrite bytecode so may not work on dalvok...i havent tried Apr 06 22:01:40 mrfu if you are starting on a new project, i'd mix in kotlin probably Apr 06 22:01:57 myke no rewriting bytecode allowed Apr 06 22:02:29 so adding in kotlin would fix the dex problem? Or just add in Kotlin because Kotlin? Apr 06 22:02:50 lewellyn groxx but i do wonder what google's endgame is with android, just can't believe they are going to ride into the sunset with this existing java stuff Apr 06 22:03:15 mrfu lol, no get rid of retrolambda and make your lambda heavy stuff kotlin Apr 06 22:03:48 although, somebody did say the kotlin plugin was killing the cpu; i can't afford that on my flea bitten machine Apr 06 22:04:09 g00s: i'm not sure even google knows anymore. Apr 06 22:04:28 lewellyn well in a way they probably don't - android and chrome are probably A/B tests Apr 06 22:04:37 or something else we don't know about Apr 06 22:05:07 i expect they're still trying to figure out how to collect as much user data as possible. Apr 06 22:05:20 Is there a good kotlin resource? Apr 06 22:05:34 mrfu there are quite a few blogs now on how to do use kotlin Apr 06 22:05:35 that is a more declarative language like scala correct? Apr 06 22:06:08 not sure declarative is the right word Apr 06 22:07:14 TacticalJoke you know what java vs kotlin on android reminds me of : MFC vs OWL on WIndows Apr 06 22:07:33 same shit, different platform Apr 06 22:08:32 groxx were you guys using google tag manager ? Apr 06 22:08:43 does kotlin play nice with RxAndroid? Apr 06 22:08:50 mrfu it should Apr 06 22:08:59 or will I need to use RxKotlin instead? Apr 06 22:09:10 mrfu i haven't used rxandroid, just plain rxjava, kotlin will be fine with rxjava Apr 06 22:09:19 I feel like there are some tradeoffs to this haha Apr 06 22:09:30 i'm not even sure rxkotlin has much of anything Apr 06 22:10:08 one of the main goals jetbrains had was easy interop between java / kotlin, specifically java calling into kotlin Apr 06 22:10:13 does any 1 know the brand wiko? Apr 06 22:10:16 as well as the easier kotlin calling into java Apr 06 22:10:54 how do I change the font size in Android Studio? The Editor Font is disabled and I can't edit it Apr 06 22:11:16 also, how do I turn on displaying line numbers? Apr 06 22:11:19 proq you have to make a copy of the theme Apr 06 22:11:49 g00s: hmm... I don't see an option to do that Apr 06 22:12:30 oh, I see. I have to click "save as" first Apr 06 22:13:40 proq: https://www.jetbrains.com/idea/help/navigating-to-action.html Apr 06 22:13:51 That will be your best friend Apr 06 22:14:04 Whats the most efficient way of loading _a lot_ of text into a textview? Apr 06 22:14:05 thanks Apr 06 22:14:39 g00s: never even heard of it. Apr 06 22:15:29 lasserix i think TacticalJoke knows about that; doing comments in his reddit reader Apr 06 22:15:32 lasserix: Is there any way other than just setText? Apr 06 22:15:41 i dont know Apr 06 22:15:50 lasserix: ooh, that reminds me. Romain Guy said that a TextPaint can be used off the main thread, so you could get the metrics and compute where to split / do custom drawing, entirely in the background Apr 06 22:15:50 i just have likes terms of service + eula Apr 06 22:15:54 it takes a while Apr 06 22:16:09 hehe no that's too much work for something so simple, but if they complain i will remember thanks Apr 06 22:16:13 yeah I would imagine there are solutions that don't involve TextView Apr 06 22:16:27 lasserix: then maybe: split on \n\n and use a listview Apr 06 22:16:54 clever but that wont work Apr 06 22:16:59 i think its fine for now just was curious Apr 06 22:17:00 you can still have huge paragraphs, but it might speed up some parts Apr 06 22:17:10 it hink its probably the linkify Apr 06 22:17:10 alas Apr 06 22:17:22 could be. profile? Apr 06 22:17:22 im testing my app in high way wikoit does work , but when i go on a different phone the same brand but a lower model than mine it crashes, i dont get whats wrong. i think it comes from async task. Apr 06 22:17:42 has any 1 had this problem before? Apr 06 22:17:48 i really wish there was a mediacontroller implementation Apr 06 22:18:21 john67, you should have a better understanding of why it crashes... Apr 06 22:18:27 different android versions? Apr 06 22:18:48 Gryd3-Shop: it use the same version, Apr 06 22:18:53 thats whats funny Apr 06 22:18:56 john67: probably you are calling a method that doesn't exist in earlier os Apr 06 22:19:00 oh Apr 06 22:19:01 nm Apr 06 22:19:05 huh, why is my custom view no longer left-aligned in the newest appcompat Apr 06 22:19:17 post your stack trace john67 Apr 06 22:19:22 john67, What model phones are they, and what android versions? Apr 06 22:19:29 full android version... Apr 06 22:20:04 4.4.2 for mine and the other which crashes is 4.4.2 Apr 06 22:20:31 lasserix: i just put the apk on the other phone Apr 06 22:20:39 After KotterKnife, this ButterKnife.inject thing feels inconvenient :P /firstworlddevproblems Apr 06 22:20:40 cant use that brand to developp Apr 06 22:21:07 Gryd3-Shop: but my phone more powerfull than the other 1 Apr 06 22:21:08 pfn O.o lol Apr 06 22:21:50 pfn there hasn't been a new appcompat in quite a while ... Apr 06 22:22:02 well, ever since it got updated to v21 Apr 06 22:22:13 and there is an appcompat 22.0.0 ya know Apr 06 22:22:29 hey guys how can i converte a array byte to String below the 19 api? Apr 06 22:23:21 isn't there like String(byte[] bytes) ? Apr 06 22:23:38 g00s: yes, but i need to set encode to latin1 Apr 06 22:24:03 if you convert bytes to string, you will have to set the locale no matter what Apr 06 22:24:11 even if its 8859-1 Apr 06 22:24:53 g00s: yes, but how? the new String( bytes , encode) do not work on api below 19 Apr 06 22:24:57 abara: looks like `new String(bytes, Charset)` exists down to API 9 Apr 06 22:25:16 hmm, contentInsetStart and contentInsetEnd Apr 06 22:25:31 so here's something that I didn't know... CharSequence is an interface, not a class. https://android.googlesource.com/platform/libcore/+/refs/heads/master/luni/src/main/java/java/lang/CharSequence.java Apr 06 22:25:52 heck, `new String(bytes, "charset_name")` is in APIv1 according to my docs Apr 06 22:27:46 http://stackoverflow.com/questions/26433409/android-lollipop-appcompat-actionbar-custom-view-doesnt-take-up-whole-screen-w Apr 06 22:27:47 interesting Apr 06 22:29:08 pfn: wat Apr 06 22:30:59 anyone else have issues where android studio doesn't detect res/ changes for builds? Apr 06 22:31:25 MikeWallaceDev, and? Apr 06 22:31:42 and... The more you know. :) Apr 06 22:32:03 I just always thought it was a class. That dealt with characters. It's not. Apr 06 22:32:28 I don't know what class actually does that, yet. Apr 06 22:32:35 And the search continues... Apr 06 22:32:55 Character? Apr 06 22:33:07 MikeWallaceDev: SpannableString Apr 06 22:33:18 I'll get there... Apr 06 22:33:27 ooh, this sounds fun: AlteredCharSequence Apr 06 22:33:40 hopefully there's a PrayIDontAlterItFurtherFactory Apr 06 22:33:45 MikeWallaceDev: it's a level of abstraction above the string (e.g. String implements CharSequence) Apr 06 22:34:14 and so does StringBuilder Apr 06 22:34:30 Makes sense JesusFreke , I just assumed it derived from CharSequence Apr 06 22:34:56 was just going to say that. MikeWallaceDev you can always looks subclasses at http://developer.android.com/reference/java/lang/CharSequence.html Apr 06 22:35:39 it's already opened in a tab icedp , that's when I saw that it's an interface Apr 06 22:36:26 MikeWallaceDev: okay, just was pointing out so to look up "what actually does that" there is a list of subclasses Apr 06 22:37:12 thanks, wasn't actually looking that up yet. I'm looking at something else and just wanted to mention it. Apr 06 22:39:21 So guys i wanna ask something kindda off-topic but in-topic.. I want to work with GitHub but I dont really got it @ the 1st. Anyone has knowledge of a good Tutorial/blog/video About that subject? Apr 06 22:40:05 rodriguespt, you mean git Apr 06 22:40:20 rodriguespt, any random git tutorial should work fine Apr 06 22:40:25 rodriguespt, first thing you have to understand is the difference between git and github Apr 06 22:42:05 Hi Apr 06 22:42:05 Haven't you had problems with google analytics? I'm doing this: https://gist.github.com/anonymous/8b8e1671900314551d50 Apr 06 22:42:19 for instance, when the user opens a section I call .track(context, "my_section") Apr 06 22:42:30 but analytics shows nothing in Real Time Apr 06 22:42:33 what am I missing? Apr 06 22:43:42 Hello world! Apr 06 22:43:47 I got git working.. but i didnt get the concept :( Apr 06 22:43:59 the clone thing and others Apr 06 22:44:02 what's not to get Apr 06 22:44:14 I tried looking through the design spec, but I couldn't really find what I was looking for. Are the ProgressBars (and so on) supposed to match the accent color of the app, or the primary one? Apr 06 22:44:53 I got disconnected and didn't receive any answer. I repeat my question about google analytics ^ Apr 06 22:46:07 rodriguespt: Have you been using any other scms in the past, or is git your first attempt? :-) Apr 06 22:47:04 n20 my first Apr 06 22:51:20 If you're using AppCompat and you say "" in XML, the view won't get tinted. It literally searches for the string "Spinner". :D Apr 06 22:51:51 D: Apr 06 22:52:18 From here: https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/internal/app/TintViewInflater.java#77 Apr 06 22:52:57 TacticalJoke: Hmm, aren't ProgressBars supposed to be tinted as well?! Apr 06 22:53:12 I don't believe so. They just pick up a new look on Lollipop. Apr 06 22:53:34 (Like everything else.) Apr 06 22:54:22 Roger that! Apr 06 22:56:26 TIL: when you have a text cursor in an edittext, you can tap on the "handle" below it to show the "paste" button. Apr 06 22:57:25 the inconsistent paste-button-visibility has bothered me pretty much since I started using Android. and now I learn that there's a reliable way around it. http://likegif.com/wp-content/uploads/2012/10/facepalm-gif-33.gif Apr 06 22:58:37 Nice. And totally undiscoverable. :) Apr 06 22:58:54 <3 undiscoverable features Apr 06 22:59:03 you mean press and holding in an edittext? Apr 06 22:59:56 pfn: nope. that selects the word you're on. Apr 06 23:00:04 must be a custom rom feature Apr 06 23:00:06 doesn't do it on vanilla Apr 06 23:00:34 on vanilla it selects the word, and shows the editing actionbar. and you can't shrink the selection to "nothing", so it _always_ replaces at least one letter. Apr 06 23:00:56 I see, I rarely want to paste in the middle of sometimes Apr 06 23:00:59 something Apr 06 23:01:41 Hmm, it's not working on my Tesco Hudl 2. Is working on my Sony Xperia, though. Apr 06 23:01:54 obviously you don't construct emoji character-by-character ∑(O_O;) Apr 06 23:02:19 well, the paste thing always shows for me when I tap in the text... Apr 06 23:02:37 on the first tap, yeah. try moving the cursor. Apr 06 23:02:47 or tapping elsewhere. it goes away and stays away. Apr 06 23:02:51 indeed Apr 06 23:02:59 not a usecase I encounter Apr 06 23:03:02 but good find Apr 06 23:03:08 also, the paste-on-first-tap only appears if it's after copying text. Apr 06 23:03:42 then you're back to long-pressing + forced to replace a letter. or pasting at the end only. Apr 06 23:03:45 Oh. I didn't have anything in my clipboard. Apr 06 23:03:49 Working on both devices after all. Apr 06 23:07:38 I'm trying to apply filterTouchesWhenObscured via a style.xml but I can't seem to figure out how the settings work. For starters, is