**** BEGIN LOGGING AT Tue Feb 10 02:59:58 2015 Feb 10 03:07:38 libgdx - target everything! Feb 10 03:22:48 when running my app in a VM, I get this error: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.hardware.Camera.setPreviewDisplay(android.view.SurfaceHolder)' on a null object reference Feb 10 03:23:01 does this have something to do with the camera not working? Feb 10 03:23:14 I selected the emulated camera in the camera option Feb 10 03:23:26 I tried webcam0, but the same issue with that as well Feb 10 03:24:48 are you saying it doesn't happen when you run it on real hardware? Feb 10 03:26:01 I have not run it on real hardware, I am still in the process of the developing my app Feb 10 03:26:20 I have the barebones of what I need, next is to implement core functions that do processing but I want to get this fully functional first Feb 10 03:28:12 I searched for the error on stackoverflow and google, the only hits were with people trying to access the flash. I am not accessing the flash Feb 10 03:33:06 How do I give the use to change the language within the app only? Feb 10 03:33:29 give user option to change language Feb 10 03:36:13 my surfaceholder is apparently null. What could be causing this? I’m using the basic camera code provided in android developer docs, no additions have been made to the failing code Feb 10 03:37:25 gopar: hmm. A quick bit of searching shows you might be able to use Resources.updateConfiguration() Feb 10 03:37:48 Gormandy: as far as I knew the emulator doesn't work with the camera stuff Feb 10 03:38:35 Gormandy: get a real device to test it with Feb 10 03:38:37 shmooz, thanks for letting me know. There was an option to pick my laptop’s webcam as the camera but I guess it doesn’t work properly… I’ll probably test with an android device when I get home then Feb 10 03:38:49 shmooz: ty:) Feb 10 03:39:02 a new android wearables book http://shop.oreilly.com/product/9781118986851.do Feb 10 03:39:49 hi all Feb 10 03:56:32 i swear there is no better feeling than looking back at code that works and just feeling proud :D Feb 10 03:58:20 ahoy! Feb 10 03:59:46 do any of you cool cats have any strong opinions on https://www.tizen.org/ Feb 10 03:59:58 Tizen is an open and flexible operating system built from the ground up to address the needs of all stakeholders of the mobile and connected device ecosystem, Feb 10 04:00:15 lol Feb 10 04:00:21 the steering co chairs are VPs at samsung and intel Feb 10 04:00:39 oh holy shit there's an IRC channel Feb 10 04:00:42 and it's ON THIS NETWORK Feb 10 04:00:50 løl nvm I'm gonna fuck with em Feb 10 04:00:56 #tizen Feb 10 04:08:45 well they're not tlaking to me Feb 10 04:08:56 so far all I know about tizen is that one of their co-chairs looks like a sith lord Feb 10 04:10:00 Does anyone have/know of a good example of rating stars that follow material design? Feb 10 04:11:16 t0astt nothing in the docs (lol) Feb 10 04:11:18 ? Feb 10 04:17:06 Tizen is Plan C (for samsung). Android was Plan B(for google) Feb 10 04:22:25 too bad webOS got lost in the fray Feb 10 04:28:09 <_genuser_> oh geez, 20,000 classes just to recieve work status from IntentService. Feb 10 04:28:44 _genuser_ what ? Feb 10 04:28:48 _genuser_: It's worth it. Feb 10 04:29:04 <_genuser_> g00s: over-exaggerating it, just 'coz I thought I"d implement a dumb interface and be done. Feb 10 04:29:25 <_genuser_> deuteros: I suppose. I'm doing it, just now and then venting to fellow coders helps. Feb 10 04:29:49 _genuser_: Wait until you implement Gcm... holy boiler plate, Batman Feb 10 04:29:51 Is it possible to not resize a background layout but to resize a foreground layout on soft keyboard show/hide? Feb 10 04:29:57 <_genuser_> I suppose I like very clean code. and creating lot of classes and having execution flow jump back and forth makes it look messy. Feb 10 04:30:19 <_genuser_> deuteros: no worries, GCM is probably going to be in this app in a bit. :) Feb 10 04:30:51 I was convinced that I already had this working, but one of my layouts has decided that it would be cool to resize even thouhg I want it to staty the same size Feb 10 04:30:57 http://www.androidauthority.com/oneplus-one-no-invite-tuesday-586007/ Feb 10 04:30:59 :D Feb 10 04:31:08 basically I only want to resize a child layout on keyboard show/hide, not all layouts Feb 10 04:33:51 knapper_tech: afaik no. the closest you can do is to fake it, with layouts that don't change based on window height. or detect the keyboard based on window resizes, and all subsequent resizes from e.g. autocomplete bars, and adapt to it that way. Feb 10 04:35:14 <_genuser_> anybody ever do TFA in their apps? Feb 10 04:35:30 TFA? Feb 10 04:35:40 <_genuser_> well, I suppose that would be kinda annoying in an app. Feb 10 04:35:45 <_genuser_> two-factor authentication. Feb 10 04:35:58 I was gonna say, it could in fact be Totally F***ing Annoying. Feb 10 04:36:14 I've implemented OAuth 2 a bunch of times Feb 10 04:36:27 It never stops sucking to implement even with experience Feb 10 04:37:32 <_genuser_> groxx: now that I think about it, yeah it would be very annoying. Feb 10 04:38:06 <_genuser_> oauth2 is what? you request auth from a server and it returns a token? Feb 10 04:38:08 I mostly like TFA. people can opt-in to additional annoyance, since it's worth it to some. Feb 10 04:38:15 <_genuser_> assuming you don't have to write the server, it wouldn't be that bad. Feb 10 04:38:20 _genuser_: if only it was that simple Feb 10 04:38:47 <_genuser_> groxx: I guess, if you were logging into the web front of your app, it would be nicer to have that security. since you wouldn't login everyday to the web front. Feb 10 04:39:01 <_genuser_> deuteros: I gather it much more annoyance. Feb 10 04:39:23 It's more complex to implement, but it's necessary Feb 10 04:39:26 _genuser_: yeah, pretty much. and I use a password manager anyway, so it's not even an extra field to fill in. Feb 10 04:39:38 <_genuser_> lol BroadcastReceiver. I just don't know how to categorize this crap in my package. most of it just subclassing stuff. Feb 10 04:40:11 <_genuser_> groxx: your app uses password manager to store user's pass? stock android password maanger? Feb 10 04:40:41 no, as a user, I use a password manager Feb 10 04:41:23 hm. irccloud is convinced there are only 31 people in this room. Feb 10 04:41:30 I assume that's incorrect Feb 10 04:41:45 392 Feb 10 04:42:04 groxx did you see that :D Feb 10 04:42:14 yup. 392 Feb 10 04:42:51 g00s: you're not in the list of 31 though, so I assume you've become a figment of my imagination. lots of people doing that today, it seems. Feb 10 04:44:31 <_genuser_> so never start an activity in response to incoming Intent (from IntentService). and they said sending intents is how you'd modify UI on the calling Activity. Feb 10 04:44:55 <_genuser_> so I suppose I just check to see if it's already active, then update UI, else either do notification or just log the result. Feb 10 04:45:28 _genuser_: they recommend that for the same reason that it's a bad idea to start an activity in e.g. an asynctask onPostExecute. you don't know when it'll happen, so it may interrupt the user after they've left your app to do something else. Feb 10 04:45:58 <_genuser_> yeah, I see. launching unexpected activity would be quite annoying too. Feb 10 04:48:04 _genuser_: if you're on the main thread, you can keep track of if you have an activity resumed. since e.g. starting a new activity will prevent any other main-thread messages from being handled until the new one is resumed, it's safe and should be reliable. Feb 10 04:48:28 I am here Feb 10 04:49:23 <_genuser_> groxx: I see. now to implement it all and see how it plays. Feb 10 04:56:36 <_genuser_> lol, I spend weeks writing spaghetti code. and then weeks cleaning it all up. Feb 10 04:57:11 And you probably think it's all cleaned up now Feb 10 04:57:11 aka "I wrote code" Feb 10 04:57:33 which is often followed by feelings of regret. this is normal. Feb 10 04:58:00 <_genuser_> deuteros: it's only ever cleaned up to a point where I feel adding more code won't first require refactoring existing code. Feb 10 04:58:18 <_genuser_> but clean as in organized and something I'd show another dev, that just doesn't happen in programming. Feb 10 04:59:08 <_genuser_> groxx: lol, everytime I'm about to share my code with someone, I feel like one of those housewives who start scrubbing kitchen counters and all as soon as guests arrive. Feb 10 04:59:38 <_genuser_> nice, my receiver it able to listen to the status!! Feb 10 04:59:45 That's the benefit of code reviews: if you know your reviewer will not like some parts of your code, you clean them before even submitting the code Feb 10 05:00:10 I'm definitely fond of code reviews. Feb 10 05:00:21 it's sorta nice having a side project that doesn't have it though :) Feb 10 05:00:26 especially when the reviewer is smarter :D Feb 10 05:00:57 _genuser_ https://www.facebook.com/notes/kent-beck/when-worse-is-better-incrementally-escaping-local-maxima/498576730175196 Feb 10 05:01:06 <_genuser_> well, at my work, I maintain the base product. (c# .net, etc.) the other devs just copy the baseline and work on their own branches. Feb 10 05:01:37 <_genuser_> and they're all just coasting. nobody says anything. so mostly nobody even wants to review it. my boss doesn't even ask for reviews anymore. Feb 10 05:03:20 When you minimize an app containing a WebView or another browser you have installed, it appears to "pause" or the execution of javascript appears to pause... not too sure what happens but is there a way to disable that in WebView? Feb 10 05:04:48 Utils: I just got a horrible idea about wrapping it and hiding onPause/etc calls... but I wouldn't suggest it :) is there something important that it should be doing even after the user has left? Feb 10 05:05:43 <_genuser_> yeah, stealing their cookeez Feb 10 05:05:50 Well, it loads a chat application and I'm not at the stage to make a full chat app without using a WebView yet. A user may minimize to check their emails, reply to a text etc etc and the idea isn't to disconnect from the chat. Feb 10 05:07:51 at that point you probably add GCM-based notifications and call it good enough. that's how a browser will work on the device too. Feb 10 05:08:28 ... a browser will also pause in the background. gcm notifs are a (significant) step above for "leave and don't "disconnect"" Feb 10 05:11:23 <_genuser_> hmmm, so I can make the receiver an inner class of the main activity and update UI. that kinda sounds.... blah. Feb 10 05:15:41 groxx: haven't heard about that but I just looked it up. Would I not have to rewrite my entire chat? I'm kind of unsure what you are suggesting I do. Feb 10 05:16:02 _genuser_: fwiw, personally I find broadcastreceivers _incredibly_ bloated and weakly-typed for in-app use. use them for external APIs (only) and nothing else. if you must / if it's useful for code-reuse, use LocalBroadcastManager. Otherwise, use an event-bus / build a basic one yourself (a single-purpose one is like 20 lines of code). Feb 10 05:16:52 groxx: BroadcastReceivers and Event Buses have two very, very different purposes Feb 10 05:17:09 BR are just for intents, Event buses are more for in app communication Feb 10 05:17:09 Utils: kinda sorta. generally when I see a website-as-app, it's a webview + they use GCM to deliver notifications while the user isn't actively in the app. Feb 10 05:17:45 deuteros: 100% agree. it sounds like _genuser_ is considering them for in-app, and I see them used for such things all over the place, and I wish to prevent yet another wrong from being committed. Feb 10 05:18:00 groxx: How would the JavaScript in on the website send a notification to the android device? I'm a little confused. Feb 10 05:18:06 Yeah absolutely not for in app. For that, Rx is another option I'm exploring although still skeptical Feb 10 05:19:05 <_genuser_> groxx: I'm looking at google example of using LocalBroadcastManager to send and recieve messages. IntentService <-> Component (or activity). Feb 10 05:19:10 groxx: Not sure what you think is bloated about Broadcast Receivers, though (and they have to be weakly typed by definition since they receive information from the outside) Feb 10 05:19:23 Utils: you wouldn't. GCM is an efficient message-delivery system that Google runs. you'd have to add code to the server to send info to GCM, and code to the client to handle receiving it. Feb 10 05:19:50 deuteros: for in-app use. for other apps to communicate with your app, they make plenty of sense. Feb 10 05:19:58 And do not use GCM for message passing, just for waking up your app Feb 10 05:20:19 well, reliable message passing - it's not reliable. good in practice, no guarantees. Feb 10 05:20:29 <_genuser_> It's using IntentFilter to filter out incoming Intents and using Receiver (subclass of it) with LocalBroadcastManager to intercept that message. Feb 10 05:20:42 It's not about reliability, it's about using them what they are for (plus you'll probably get throttled if you use them to pass chat messages anyway) Feb 10 05:20:45 <_genuser_> I'm assuming you guys are talking about this being a bloated and useless approach. Feb 10 05:20:55 _genuser_ largely :) Feb 10 05:21:03 <_genuser_> so a smaller eventbus or something? Feb 10 05:21:20 I disagree it's bloated and useless FWIW Feb 10 05:21:34 Event buses or Rx are great for in app communication, especially coupled with Dagger Feb 10 05:21:46 <_genuser_> I only care about getting the status back to the main activity. all in-app. Feb 10 05:22:06 <_genuser_> it won't be heavy communication back and forth, etc. Feb 10 05:22:32 Try an event bus, it decouples publishers and receivers nicely Feb 10 05:22:47 <_genuser_> but it there's a cleaner way (lol that doesn't involve static vars in main activity) I'll consider it. as long as it doesn't take long. Feb 10 05:22:56 <_genuser_> so this Rx is such an event bus? Feb 10 05:23:01 _genuser_: Good to hear you're staying away from static vars :) Feb 10 05:23:09 No, Rx is a bit differentt Feb 10 05:23:26 <_genuser_> I was just reading Otto by square is an already published event buss. Feb 10 05:23:33 Yes, Otto is fine Feb 10 05:23:49 <_genuser_> as you can see I have an aversion to writing code that then has to be tested heavily instead of just coding crap and moving on. Feb 10 05:23:53 Wait so, if I use a GCM and my app receives it, will it ... prevent the browser from being paused, or what? Feb 10 05:24:04 Rx seems nice Feb 10 05:24:10 need to check it out one day Feb 10 05:24:52 <_genuser_> I'm already using picasso. so I like square's simplicity approach. Feb 10 05:26:01 _genuser_ you can use rx BehaviorSubject as a simple event bus Feb 10 05:26:39 <_genuser_> g00s: heh, yay! more new code!! :) Feb 10 05:26:59 BehaviorSubject bus = BehaviorSubject.create() .. done Feb 10 05:27:08 <_genuser_> g00s: honestly, tho, my app has been greatly improved by asking for suggestions here. otherwise, it would have been a mess. Feb 10 05:27:23 The difference between Rx and Event Buses is that the former couples publishers/receivers tightly Feb 10 05:27:26 which has pros and cons Feb 10 05:28:02 <_genuser_> is anything in java lightly coupled anyway? Feb 10 05:28:02 <_genuser_> lol Feb 10 05:28:17 Utils: when your app receives GCM, you can run android-code. generally you'd just tell the webview to refresh its data and/or show a notification, and refresh when they return to the app Feb 10 05:28:33 i did use event bus extensively in the past. i ported guava eventbus to android before otto existed. but eventually found being able to recompose streams of events, filter, flexible threading, etc was more useful Feb 10 05:28:41 how should I draw a circle that continuously updates it’s color based on a variable? Feb 10 05:29:06 g00s: So you prefer Rx? Feb 10 05:29:09 <_genuser_> one piexel at a time!! Feb 10 05:29:16 good one :p Feb 10 05:29:20 groxx: if it refreshed its data... that means reloading the page, right? Feb 10 05:29:28 deuteros yeah Feb 10 05:29:39 <_genuser_> Gormandy: sorry, don't have actual useful ideas. Feb 10 05:29:47 I want to like it too but still not completely convinced Feb 10 05:30:00 _genuser_: no need to apologize :) Feb 10 05:30:21 Utils: it could, yes. you can also inject javascript into the page to e.g. call a javascript method that polls your server for updated data. Feb 10 05:30:42 deuteros i got into trouble adding prioritized receivers to guava eventbus, because i wanted events to percolate out from the lower levels to the upper levels in deterministic way Feb 10 05:30:55 android itself has broadcast receiver priority, it is a useful concept Feb 10 05:31:23 but it became hard reasoning about how the app would react, in the same way it became hard reasoning who is changing that global variable :P Feb 10 05:31:35 <_genuser_> heh, my eventbus needs are to say "work done". Feb 10 05:31:46 one event cause many things to happen at great distances from origin to destination Feb 10 05:31:56 <_genuser_> for request sent, I show on screen - "Saving: 1" and increment the number. Feb 10 05:32:00 do you guys gzip your json when writing apps ? Feb 10 05:32:02 or I should avoid it Feb 10 05:32:04 <_genuser_> for each "work done" I'll decrement the number. Feb 10 05:32:36 deuteros with rx, i'm thinking slightly differently. i use them more 'locally' behavior is composed further up the chain Feb 10 05:32:42 rather than spraying events everywhere Feb 10 05:33:00 Interesting Feb 10 05:34:04 The coupling bothers me a bit. For example, if you want to display something when a network packet is received, you need to have the graphic class depend on the network one (since it will subscribe to its observable) Feb 10 05:34:20 I like that event buses keep these two guys separate and obvlivious of each other Feb 10 05:34:21 _genuser_: e.g. here ya go for a simple, always-send-on-main-thread "event bus": https://gist.github.com/Groxx/ae4022692093fb6d935f Feb 10 05:35:23 <_genuser_> omg templates? Feb 10 05:35:33 _genuser_: obviously crappy, and there's no need to make a new runnable every time, but that's pretty much it. register in onResume, unregister in onPause. Feb 10 05:35:49 <_genuser_> lulz CrappyEvents.java Feb 10 05:36:15 <_genuser_> it's simple enough. thanks for sharing. I might just end up using this. Feb 10 05:36:16 <_genuser_> :) Feb 10 05:36:41 benefits over broadcast receivers = less code, immensely faster, and strongly typed. benefits over otto.... no library? if you need more than one / fancier behavior, consider a library. Feb 10 05:37:37 ah, whups. realized I forgot to use the lazy instance. add a getInstance() method that just returns Lazy.instance - it won't be created (on Android) until you actually try to use it. Feb 10 05:37:48 <_genuser_> heh, no just need to tell the main "hey, work be done!" Feb 10 05:38:14 groxx: not entirely sure if that is possible in all honesty. It uses engine.io which relies on websockets so I don't really think I can add something like that in without changing an awful lot. How does the whole onPause overwriting work? I know it might not be the best way forward but this is only temporary while I build on my knowledge. In my activity, if I override onPause and just call super.onPause(); is that enough? Feb 10 05:38:16 <_genuser_> yeah this looks fine. :) Feb 10 05:39:02 Utils: it's a truly horrible idea (not just crappy), I really don't think you should try it. looooots of possible complex failures. Feb 10 05:39:58 and most parts of the framework will crash your app if you don't call super.onPause / maintain state properly, it's very likely to be more work than building something more correct. Feb 10 05:41:48 <_genuser_> Utils: not able to suggest a better approach. Feb 10 05:42:25 <_genuser_> but I will say this, if you're learning to do it the wrong way, just temporarily, and hoping to learn proper approaches better.... then you're learnign both ways. Feb 10 05:42:29 <_genuser_> just learn the proper one now. Feb 10 05:44:32 Wait... does the whole app pause? If I made an app without a webview and used a websocket implementation in java... would that also pause when the app is minimized? Feb 10 05:45:47 Utils: the app would "pause" and could be killed at any time after that (or onStop, depending on the OS version), but you can still run code. Feb 10 05:46:32 So what exactly does the activities onPause actualyl do then when the app is minimized? What is "paused" ? Feb 10 05:46:36 and by "killed" I mean "slaughtered mid-computation without any warning". if you want to stay alive, you want to run a service, maybe even a foreground service (which requires a notification) Feb 10 05:47:23 paused is a lifecycle event, it lets you know that "something" is displaying over your app / Activity. Feb 10 05:48:06 onStop is when you're not visible any more (e.g. they left the app, or you started a new opaque Activity over the current one) Feb 10 05:48:14 ^ this is simplified, but essentially. Feb 10 05:49:09 in more detail, this: https://developer.android.com/reference/android/app/Activity.html Feb 10 05:52:15 this is going to be harder than I anticipated. Feb 10 05:55:42 it's sorta the cost of doing anything more than they could do in a browser. but welcome to android app dev anyway :) it has its upsides. Feb 10 05:57:43 deuteros and then of course, there was the dreaded scenario where behavior depending on temporal coupling of multiple events, or when one event was caught and that resulted in the emission of another event on the bus. but the 'spooky action at a distance' i think had the greatest negavtive impact on maintanability. Feb 10 05:58:30 there was no place to go, where you could get an answer on this happens, and then it flows to all these places Feb 10 05:58:51 Rx has the same problem though Feb 10 05:58:58 g00s: this reminds me - have any recommendations for e.g. good example code for android Rx? Feb 10 05:59:25 groxx hm , not really :( there are a few Rx books coming out from Manning, but use Scala as examples Feb 10 05:59:34 if you don't mind that Feb 10 05:59:47 I've got some docs / presentations, but no non-trivial uses. Feb 10 06:00:03 eh, I can figure out Scala. Feb 10 06:00:17 at this point I'd probably prefer code though. Feb 10 06:01:33 there just doesn't seem to be much in the way of "this is what a reasonable use looks like", and I'd rather skip that discovery step if possible. Feb 10 06:04:12 groxx yeah i'd like to see more in the context of typical android problems Feb 10 06:04:41 How would an IRC client work, groxx ? I'm going to guess that using websocket implementation vs tcp would be relatively similar in the way it acted with onPause, onStop and the other events. Feb 10 06:05:21 I'm just trying to get my head around what it is I have to do. It's not too clear to me Feb 10 06:06:08 Anyone know how to get an s4 to run apps i've made -- debug is on, trying to find the oem usb drivers.. but without downloading kies.. or must I download kies :< ? Feb 10 06:06:21 Utils: it's likely not too simple. there are java websocket implementations, but you still need to do the hard work of keeping it alive Feb 10 06:07:02 <_genuser_> Eppiox: http://www.samsung.com/us/support/downloads Feb 10 06:07:19 <_genuser_> select cell phones, on the popup find your model and get the driver. Feb 10 06:07:27 <_genuser_> alternatively, you can just isntall kies, but that's too bloated Feb 10 06:07:28 groxx: that's what I mean. how does an irc client keep it alive? I do have a java port of engine.io-client which should be more than good enough for making the actual connection to my server. Feb 10 06:07:33 Utils: most irc clients I see use either a foreground service and stay alive + whatever connection they like, or they let the app sleep, connect on the server, and act as a proxy for the user's connection. Feb 10 06:07:52 http://www.samsung.com/us/support/owners/product/GT-I9505ZWGXAR no download data? Feb 10 06:08:58 Utils: if the server is a proxy, you can send gcm messages to wake up when it's valuable Feb 10 06:11:12 Utils: otherwise you'll probably be dealing with relatively low-level mobile networking details. a mobile irc client is very much a non-trivial thing to do. Feb 10 06:13:29 groxx: is a foreground service one that runs in the foreground but when minimized, continues running in the background? I've been looking it up and that seems to be what I can make of it... Feb 10 06:14:22 http://www.truiton.com/2014/10/android-foreground-service-example/ Feb 10 06:14:28 its basically a service with a UI Feb 10 06:15:23 Utils: basically. you call startForeground (iirc) and you have to have a notification because it implies it's a very-high-priority process. Feb 10 06:15:46 otherwise android kills stuff when it doesn't seem useful, to save energy / resources. Feb 10 06:26:11 <_genuser_> interseting IntentService actually does work slower. so I'm assuming it runs on a slower priority. Feb 10 06:26:40 <_genuser_> when I do work x in main thread and time it, it's roughly 4seconds. in IntentService it's 5.5seconds. Feb 10 06:28:12 _genuser_: it's a background thread, which should be lower CPU priority. it shouldn't make much of a difference unless the device is somewhat busy though. Feb 10 06:28:20 groxx: does there always have to be a notification? What if I only wanted a notification when for instance, new activity occurred in the chat? Feb 10 06:28:48 Hi all, I'm trying to get setup for my first Android app so am new to all this. Running Android studio and have build tools 21.1.2 installed according to SDK manager. I've downloaded and open a Google sample app, RepeatingAlarm, but when building it says build tools 21.1.1 missing. There is nothing specified in build.gradle, so where is this 21.1.1 coming from? How can I get it to use the newer 21.1.2? Feb 10 06:29:18 <_genuser_> groxx: yeah, I was just "reminded" of that by looking at my time analysis. :) I just thought hey 4seconds I could save in main thread. but after 4 tasks, I have 1.5x4 extra time wasted. basically time to do one complete extra task. Feb 10 06:29:31 Utils: the notification makes your process almost as high priority as if you had an activity visible. if you have an activity visible, you don't need it. Feb 10 06:29:36 <_genuser_> groxx: but I completely understand that it's background worker thread so it will have lower priority. Feb 10 06:29:43 <_genuser_> I wonder if AsyncTask will have similar lower priority. Feb 10 06:30:10 Utils: you can set the notification as lowest-priority though, and it's almost invisible Feb 10 06:30:38 groxx ^ thanks found it eventually on their site, a direct download to the drivers them selves without kies! Feb 10 06:30:41 joshnz: it could be coming from a library you're using Feb 10 06:31:04 It's just a small sample app...? Wouldn't think it uses any libraries Feb 10 06:31:44 joshnz: dunno. is there a "compiles 'x:y:z'" line in the build.gradle? Feb 10 06:32:25 _genuser_: asynctask should be similar. not sure if it is the same though. Feb 10 06:32:39 build.gradle is blank. I tried to specify the tools version as per https://developer.android.com/tools/revisions/build-tools.html but gradle then says it doesn't know about the android DSL....? Feb 10 06:32:58 <_genuser_> groxx: I can run some tasks in it and time them. heh, that would be a complete analysis. Feb 10 06:34:01 joshnz: I kinda doubt that it's blank. but it's possible they are a bit out of date. Feb 10 06:34:14 can you just install 21.1.1? Feb 10 06:34:40 joshnz: otherwise I think there's a way to override what libraries request, but I don't remember it off-hand Feb 10 06:35:10 It's blank https://github.com/googlesamples/android-RepeatingAlarm/blob/master/build.gradle Feb 10 06:35:21 It may be a bug https://code.google.com/p/android/issues/detail?id=82529 Feb 10 06:37:07 joshnz: heh, impressive. sounds like a bug / incomplete example to new. Feb 10 06:37:13 me* Feb 10 06:38:52 Ah, there are multiple build.gradle files lol. I need the one in the Application folder... that's specifying 21.1.1 Feb 10 06:40:09 joshnz: ah. that's pretty common actually. Feb 10 06:40:22 groxx: still need to understand. apps such as candy crush saga, trivia crack, tinder... they don't have a foreground service... but something runs in the background and you get a notification if its your turn, or if there is a match etc. Is that just a regular service that checks for updates and then when u open the app, it reloads and u see the updates? Feb 10 06:41:14 Utils, that a push notification I believe. The OS gets these and wakes the relevant app up, forwarding it to the app. Feb 10 06:41:55 or possibly it's an alarm Feb 10 06:43:54 Leeds: How would an alarm work? Feb 10 06:45:13 Very likely GCM Feb 10 06:45:15 Utils: that's very likely an alarm or a gcm message. for alarms, look up AlarmManager. Feb 10 06:45:50 Utils: new match notifications are almost certainly using gcm Feb 10 06:47:34 Utils: even without a notification, android will generally just let you use CPU. the difference is that you're *likely* to be killed eventually if you don't have one. Feb 10 06:48:28 e.g. if they start up a game, you'll probably be killed. or 10 apps later. or after 30 minutes. or because it feels like it. Feb 10 06:49:46 if you don't have a foreground activity or service, you have essentially zero guarantees, both in theory and in practice. Feb 10 06:51:48 hmm so i think a foreground activity might be best. I can use gcm in my server which is nodejs however... but having to wake up the app and sort of request for new data... seems more complex than a foreground activity IMO. Plus in my case, a foreground activity will let u know you are still logged in to the chat for me personally, that'd be a good thing. Feb 10 06:53:07 foreground activity will kill the battery, use GCM Feb 10 06:53:36 Utils: foreground activity is just "the user is actively in your app". it's not something you really have control over, they can always just hit the home button Feb 10 06:54:34 <.< I'm going around in circles here. Would a GCM still work if the messages were sent to a webchat too? Seeing as my chat is intended for use in the browser and I aim to target multiple devices too. Feb 10 06:54:49 Utils: android (and mobile dev in general) essentially requires that you degrade gracefully, handle getting killed when you're not "the" current app, and try to be efficient. there's no way around it. Feb 10 06:55:27 Utils: gcm is a side channel, and would have to be sent from your server (basically). Feb 10 06:56:03 think of gcm like a text message, and you're 99% of the way there Feb 10 07:01:35 A bit more Googling and I got it building and running on the emulator. Thanks all! Feb 10 07:04:03 joshnz: cool, congrats :) Feb 10 07:19:07 GCM appears complex. I'm looking at this: https://developer.android.com/google/gcm/client.html and it mentions that implementation is for xmpp servers. I'm running a websocket based server. It also has "sendRegistrationIdToBackend" is this where I send the ID to teh chat server which registers the gcm for... that client? Feb 10 07:19:40 so that the server can send a gcm message directly to the client through the... connection made I'm guessing i dunno Feb 10 07:20:56 It looks like it runs a service in the background too as I see a GcmIntentService. How is this any worse than a foreground service? Feb 10 07:24:03 and I'm not entirely sure how it wakes the app either. Feb 10 07:25:30 so the GcmIntentService only starts up for an intent and then dies Feb 10 07:25:34 afterwards Feb 10 07:25:48 its better than a foreground service cause the foreground service will keep running draining battery Feb 10 07:26:51 it doesn't wake up your app it just gets to your phone via google's gcm stuff and then it tries to start your intent with that id and if it exists your intentService starts in its own process and does what it needs to and then it dies Feb 10 07:26:58 so no battery draining Feb 10 07:27:14 i think that was what you were asking Utils ? Feb 10 07:27:51 I... I think so. Is it the google services that starts the intent when it receives a message? and the intent displays the notification? Feb 10 07:28:01 yes Feb 10 07:28:13 well your intent will make a Notification and then send it Feb 10 07:28:24 you have to manualy make it its not magic :) Feb 10 07:29:24 Ok so in the case of a chat that's based on WebSockets, when you open up the chat because you received a notification... how will it display the new messages, seeing as the server sent them but because the app was paused... it never really received/handled them? Feb 10 07:30:04 I have MyLib and MyApp projects in Eclipse. MyApp uses MyLib. MyApp has sources and resources, while MyLib only has public sources and a jar file -- the MyLib.jar contains classes and a few resources such as appicon, strings, styles and colors to satisfy its AndroidManifest.xml. ... Feb 10 07:30:27 wait even with gcm.. how will that stop the websocket connection disconnecting (ping timeout, I'd guess) Feb 10 07:31:44 ... When I build MyApp.apk in Eclipse, all the resources from the MyApp and MyLib.jar are merged, and I can easily see the merged images inside the MyApp.apk's res folder. By when is this merge done? Is it Eclipse ADT doing this behind the scenes? Feb 10 07:33:34 Something must crack open the MyLib.jar and add the resources to MyApp.jar. Feb 10 07:40:27 Utils, you cant stop your websocket dying Feb 10 07:40:59 then the chat would die... Feb 10 07:41:01 so you dont always want to send the information with the GCM message but the GCM message can be a trigger for you to astablish a connection and get the message Feb 10 07:41:16 yes the chat will die if the phone is unused for a while Feb 10 07:41:25 all apps die when the phone goes into deep sleep Feb 10 07:41:30 all connections will be severed Feb 10 07:41:49 if you design your app to linger and keep the phone alive you will drain too much power and ppl will uninstall your app Feb 10 07:42:14 So even an irc client will eventually disconnect if it's inactive for too long? Feb 10 07:46:06 hm, dave smith has a book 'android recipes' Feb 10 07:46:26 everything that guy has discussed, he's done very well so i'm tempted to buy it Feb 10 07:46:28 yes Utils Feb 10 07:46:40 hey g00s Feb 10 07:46:48 hey lemonxah Feb 10 07:50:01 Utils, what is it exactly that you are trying to accomplish Feb 10 07:51:23 what's the goto way to pipe data to a view on instantiation? Feb 10 07:51:43 add and findViewById over and over? Feb 10 07:51:51 yes and no Feb 10 07:51:56 what's no? Feb 10 07:52:14 is there a good explanation about android threads,tasks etc Feb 10 07:52:19 you could use JakeWharton 's amzingly smooph butter knife lib Feb 10 07:52:23 logically Feb 10 07:52:43 I have bought the best tablet ever, 1 hour playing with shaved and rootet device" for guessing it :D Feb 10 07:52:45 it does all the heavy lifting for you recarding the findViewById and casting it Feb 10 07:52:45 lemonxah, so I should use Id for -right- now and then switch to butterknife asap? Feb 10 07:52:50 k Feb 10 07:52:56 so it's just taking care of typing? Feb 10 07:52:57 well Feb 10 07:53:03 butterknife still uses the id Feb 10 07:53:10 but can I instantiate the view and set all that shit before adding the view? Feb 10 07:53:15 it just makes it so that you dont have to write it out everytime Feb 10 07:53:21 yeah, f'ing boilerplate Feb 10 07:53:22 lemonxah: Well its a chat. I've had people use a browser to use my webchat and they would go and check their text messages and the chat would have disconnected. That's what I wanted to prevent. Just like on a laptop, if I go to another tab or another window... my chat will still work. Feb 10 07:53:53 knapper_tech, what are doing are you adding the views dynamically? or are you getting them from findViewById using layout xml? Feb 10 07:54:09 sci-fi, tasks are executed in threads. you have to do a shit-ton of juggling to use AsyncTask or you can get fun with RxJava Feb 10 07:54:10 Any interested in participarting in a project where your only task i the GUI? It might well be worth money and if not if will be used by 100.000s Feb 10 07:54:18 lemonxah, adding dynamically Feb 10 07:54:24 without adapter Feb 10 07:54:34 because it's a frame layout and i'm swiping and things Feb 10 07:54:46 knapper_tech, if you are adding them dynamically then you dont need to use findViewById cause you allready have a reference to the object Feb 10 07:54:56 so just view...? Feb 10 07:55:02 be it a button or what ever so just set the values on it and then add it Feb 10 07:55:18 lemonxah, how do I access the nested views in the layout in this case? Feb 10 07:55:58 build up from a bunch of individual components? seems lame and boiler heavy Feb 10 07:55:58 Utils, best way is to just reconnect when your app starts up but do some sort of sync adapter so when htere is a message while this person is offline send it with GCM then write it to database and then display it when the person opens the app again Feb 10 07:56:21 if the views is in a layout then you can use the butterknife aproach Feb 10 07:56:57 http://jakewharton.github.io/butterknife/ Feb 10 07:57:13 just read that and see if that would help you out Feb 10 07:57:30 lemonxah, got it. Does Jake Wharton write everything good for Android or just uploads NetFlix code and takes a lot of credit? Feb 10 07:58:03 he is good Feb 10 07:58:13 better than most i have seen Feb 10 07:58:21 cigaretteeees, cancer and code. be it known to our investors that we eat spam and use butterknife and rxjava. Feb 10 07:58:40 butterknife is on the way in. i'm avoiding adding more dependencies for this week. Feb 10 07:58:49 already got a database on the docket. Feb 10 07:59:04 well f that. time to do it the brute boilerplate way Feb 10 07:59:22 why though? how mnay libraries do you have? Feb 10 07:59:26 and why not use libraries? Feb 10 08:00:58 when i was younger i wanted to write everything myself cause i wanted to learn now that i am older i would much rather use libraries that i could read and understand them than having to go code them myself Feb 10 08:01:08 it makes it much faster and the code prettier Feb 10 08:02:38 I'm getting butterknife asap but I tend to go boilerplate first time around before introducing too much type inferencing and magic Feb 10 08:02:57 eg when I write lambdas in Rx lots of times I do some explicit setups before going implicit Feb 10 08:03:35 still letting rx and retrolambda soak a bit before I encounter any crazy ass exceptiosn Feb 10 08:04:01 harder to debug superimposed error sources Feb 10 08:04:09 *potential* Feb 10 08:05:00 i think somebody should blog about taxonomy of boilerplate Feb 10 08:05:13 i think there are different kinds Feb 10 08:05:46 on one end, there is the kind for example, not using lambdas and rx, its hard to see whats going on in all the levels of indentation Feb 10 08:06:18 but then there is 'findViewById' which to me, seems quite benign Feb 10 08:06:26 and obvious if it isn't working Feb 10 08:08:09 at the end i guess, anything that is accidental complexity and not inherent complexity is boilerplate Feb 10 08:08:37 with java, and the android apis being what they are, seems hard to really get to the heard of it Feb 10 08:09:26 if there is boilerplate, i guess that means the language and apis suck Feb 10 08:09:41 can you fix that with libraries? maybe sometimes, a little Feb 10 08:10:46 (those things sucking, because they aren't expresive, conside, or natural enough) Feb 10 08:29:57 best droid tab, me bought!!!!!!!! Feb 10 08:32:17 micro USB to normal usb = just solder the righ colors toghether? Feb 10 08:36:42 it's not a really android oriented question, but i'm sure you guise can have the anwser :-) Does any one of you know an analytics tools that can be plugged to my API (server) logs ? Feb 10 08:37:46 blusky solder the righ colors together :) Feb 10 08:38:10 g00s: ? Feb 10 08:39:06 No, one care about mei wæætnæss about new tab :D Feb 10 08:40:29 cph_dk I need to to convert normal USB to micro usb to use my big keyboard for the the tab. Feb 10 08:40:47 help, thite->white and so on on, right? Feb 10 08:40:50 white Feb 10 08:41:37 g00s, on the point of boilerplate, having a dsl that makes the boilerplate not happen is good for readability Feb 10 08:41:43 What do one use for insulation for small solderings? Feb 10 08:41:57 cph_dk bacon Feb 10 08:42:17 lemonxah i tend to agree with that Feb 10 08:42:20 insulation from what? eachother or anything else Feb 10 08:42:59 lol Feb 10 08:46:33 Aha, I need the USB drivers used for odinn I did in intend to root it too sooo,,,,"rooted device" = deviced dressed in lingeri :D Feb 10 08:47:54 * cph_dk hates obsucre files names Feb 10 08:58:55 Morning folks! Feb 10 08:58:57 * cph_dk want to ask ask stupido quiestionaro. What do i need to root an AndHæmoroid Ddevic?, Odin?, roote room for my excact model nad? Feb 10 08:59:35 Sometimes, in AS, I lose focus of the editor and everything I type results in a search in the project explorer Feb 10 08:59:41 I don't know why this happens Feb 10 08:59:44 and how to get out of it Feb 10 09:00:34 Morning veryone, aynyone wanna hear my very serious kick drum synth? Feb 10 09:01:39 hah, sure Feb 10 09:14:47 can i run an async task when my app closed ? for example i will update user's one contact list image while my app non operating Feb 10 09:15:18 anyone know what version of css i need to use for a webview on android 4.0.3? Feb 10 09:15:29 i've got flex display stuff that's not showing up correctly Feb 10 09:16:14 greves, depends on device ;) Feb 10 09:16:26 and what kind of patches manufacturer applied to the webkit on it Feb 10 09:17:15 also got problems with fonts Feb 10 09:17:48 it's an asus transformer tf101g, i built an app for internal use and we are renting these tablets for a show, they gave us these crap old asus tablets that can't run the app properly heh Feb 10 09:18:56 going to have to re-do css with a fixed size i guess because flex isn't supported on this device it seems Feb 10 09:18:59 not sure what to do about the fonts though Feb 10 09:50:01 guys i want to update a contact by running an async task for every week Feb 10 09:50:18 but my app hasnt to be running Feb 10 09:50:22 is this possible ? Feb 10 09:50:28 sci-fi: that is what AlarmManager is for Feb 10 09:51:02 thanks.I was making research and i saw it but i told myself its alarm stuff :D Feb 10 09:55:02 i am new to development.. if i had to create and test an app for its impact on battery for 6 phones of different models... purchasing all of them is the only way ? Feb 10 09:55:08 or is tehre a way to emulate it ? Feb 10 09:55:11 there* Feb 10 09:59:27 guys ? Feb 10 10:00:16 there's no emulator for that Feb 10 10:00:29 Levite: thanks for replying Feb 10 10:01:00 why is the project explorer in AS getting focus for no reason Feb 10 10:01:06 and how can I come out of it? Feb 10 10:01:23 so I can start typing in the editor again instead of searching in project explorer Feb 10 10:04:35 Siamaster, only way i got around that was restarting AS Feb 10 10:04:43 hahahhahah Feb 10 10:04:54 it is an anoyance Feb 10 10:05:05 it happens all the time :S Feb 10 10:05:20 and then i spam mouse clicks to get out of it Feb 10 10:05:21 it only happened to me on linux and only like once a week maybe Feb 10 10:05:54 it happens to me on ubuntu.. but right now, on windows, all the time:S Feb 10 10:07:14 When aapt merges resources from MyLib and MyApp into what eventually becomes MyApp.apk, I understand that if resources with same identifiers exist, the ones from MyApp will overwrite those in MyLib. Feb 10 10:07:32 However, I don't see how that works for colors defined in res/values/colors.xml. I have "background" defined both in MyLib and MyApp. And MyLib Activities have MyLib's background color, while MyApp Activities have MyApp's background color. Can any verify this is actually right? Feb 10 10:16:08 I'm wondering if the colors are compiled into the binary layout/drawable/etc xml files that are in the apk Feb 10 10:18:50 Hello everybody. I wonder if it is possible to remotely view and control an android application. It is like VNC which requires generally a rooted phone. So I said maybe it it possible to view/control an android application using another mechanism for non rooted phones. Any comments ? Feb 10 10:19:53 is it an app that you have written that you want to control? Feb 10 10:20:47 Hello, Any way to align elements not in the same RelativeLayout ? Feb 10 10:21:04 lemonxah: yes Feb 10 10:21:42 if it is your app then you can put tcp listener and make it do what you want dependent on what you send in via tcp Feb 10 10:22:21 I have a vertical linear layout with elements inside, and i want to add another element in front of this (transparent element), aligned with the second element of my linearLayout Feb 10 10:22:32 lemonxah: yes, I understand. I wish if there is an open source tool which helps me to do that Feb 10 10:22:47 not that i am aware of no Feb 10 10:22:51 i have a gradle project that i'm integrating into an aosp build. Feb 10 10:23:27 this is a circa android-10 aosp build (it's for an older embedded system). Feb 10 10:24:13 But i cant align them when i try layout_below it says they are not in the same relative layout Feb 10 10:24:37 mgK, this wont work like this. You have to put them into the same layout or add some margin manually Feb 10 10:24:42 i'm wondering should i try to run gradlew from the Android.mk files or should i maintain a shadow build from the Android.mk file? Feb 10 10:25:11 danijoo: I See, but i dont know the margins, cause the height is function of weight Feb 10 10:25:23 maybe i could create another fake linearlayout Feb 10 10:25:30 to simulate dimensions Feb 10 10:25:48 there will be a better way to do this in just one relative layout Feb 10 10:26:30 ^ this Feb 10 10:26:45 I'm changing my ListView Adapter of an already displayed ListView when the user clicks on an item and I can't figure out why my text appereance changes, the text goes from Black to light gray. Anyone know why? Feb 10 10:27:33 untrothy, maybe because you set a different color/style in the adapter? Feb 10 10:28:21 danijoo, Its the same adapter, I only change the data to be shown Feb 10 10:28:47 you said you change adapter ._. Feb 10 10:29:03 no idea then Feb 10 10:29:35 lemonxah: i dont see how :/ if you want to take a look, problem is with android:layout_below="@+id/linearDays" line 40 : http://paste.ofcode.org/GjAPbWXNZG5UjY8YJwwhsu Feb 10 10:29:35 danijoo, yeah It's a bit confusing sorry. I call new MyAdapter twice only with different data Feb 10 10:30:26 untrothy, for help, nobody can help you Feb 10 10:30:31 hey if i use jobscheduler(api 21) in my app , a user which has api 15 for example, job scheduler can work properly ? Feb 10 10:30:42 if you dont show some code or stacktraces Feb 10 10:31:34 sci-fi, the app will crash Feb 10 10:32:18 so im going to use alarm manager then Feb 10 10:32:51 sci-fi, if(Build.VERSION.SDK_INT >= 21) use this; else use that; Feb 10 10:33:09 ty Feb 10 10:33:49 mgk i dont know wha tyou want Feb 10 10:33:59 draw a picture of what you want first Feb 10 10:34:37 sure Feb 10 10:38:03 lemonxah: here is what i got right know : http://pasteboard.co/10KTHEUs.png And i want the transparent square (top left), to be below the red (and green) linear layout Feb 10 10:38:50 what i actually cant cause the linearLayout (layoutDays) is himself inside a linearLayout Feb 10 10:39:07 linearDays sorry Feb 10 10:39:07 why do you need them to be linear layouts? Feb 10 10:39:25 to use weight Feb 10 10:39:40 why use weight? Feb 10 10:39:57 then it adapts for all device Feb 10 10:40:04 danijoo, Everything is working fine, the app doesn't crash. Only thing I don't understand is why changing an adapter on the same ListView should change the text color. Feb 10 10:40:09 and same dimension for all screen sizes Feb 10 10:40:47 well Feb 10 10:41:06 i think im gonna do another linearLayout with the same weight Feb 10 10:41:25 instead of trying layoutbelow Feb 10 10:43:06 anyone know how to implement some simple form of "replaygain" so all tracks i play in my app have sort of normalised volume ? Feb 10 10:43:49 mgK, it will adapt for when you use DP too Feb 10 10:43:49 http://paste.ofcode.org/8F862cKj2BjK58GvyPYMPf Feb 10 10:43:56 that will get you what you want Feb 10 10:44:05 just make the fields the same types again Feb 10 10:44:35 and then all you have to do is put the height of your linearDays in values/dimens.xml Feb 10 10:44:39 I hate lint checks -_- Feb 10 10:44:56 Hi, I want to pass a POJO from one activity to another. I hear I can use otto for this. Does anyone know how I can achieve it? Feb 10 10:45:08 dvass, or make it parcelable Feb 10 10:45:21 and when you go from phones to tablets adjust it in the values-sw600dp/dimens.xml or something like that Feb 10 10:47:41 mgk how does it look Feb 10 10:47:42 ? Feb 10 10:47:44 danijoo: much slower and more work imo Feb 10 10:47:54 danijoo, lint is awesome :) Feb 10 10:47:59 one more sec Feb 10 10:48:12 lemonxah, yeah. some of it. but some checks are just stupid. Feb 10 10:48:20 yeah i know Feb 10 10:48:25 you can disable them if you want Feb 10 10:48:33 like: "oh no! you have a png in drawable folder which is dpi-less!" Feb 10 10:48:48 its only a warning though Feb 10 10:48:55 yep Feb 10 10:49:13 dvass, otto is pretty well documentated Feb 10 10:49:23 you should be able to do it by reading the first site of their page Feb 10 10:49:40 also mgK dont use 1dp for a seperater line Feb 10 10:49:45 rather use 0.75dp Feb 10 10:49:57 cause that is only 1 pixel lines on all devices Feb 10 10:50:05 1dp is 1 px on some and 2 on others Feb 10 10:50:09 depding on the dpi Feb 10 10:51:14 I'm downloading the facebook sdk with gradle, using the jcenter repository. Feb 10 10:51:24 is it possible to downloaded docs and sources? Feb 10 10:51:31 I'm getting "cannot resolve method add(android.view.View, android.support.v4.app.Fragment" on my FragmentTransaction. Can't figure out why those paramters dont work Feb 10 10:51:46 whats your minSdk Feb 10 10:51:51 10 Feb 10 10:52:18 Troffel, maybe you mixed up Support Fragments and non-support fragment manager? Feb 10 10:52:23 make sure you're importing all the support fragment libraries and not the other ones Feb 10 10:52:25 lemonxah: ok its working well Feb 10 10:52:28 did you use getFragmentManager() or getSupportFragmentManager() Feb 10 10:52:31 mgK, ofc :) Feb 10 10:52:33 heh Feb 10 10:52:35 and you imported support FragmentTransaction Feb 10 10:52:39 glad i could help Feb 10 10:52:41 getsupportfragmentmanager Feb 10 10:53:08 thx lemonxah, but when u say it will adapt to all display im kinda surprised Feb 10 10:53:09 danijoo: With the event bus, once I post something and say I start an activity straight after. Will I be able to receive that event from the new activity instantly or will there be a chance I have to wait for the event to catch up? Feb 10 10:53:16 why? Feb 10 10:53:22 Troffel, your view must be a view's Id, not an actual view I thing Feb 10 10:53:23 100dp is 100dp, its like centimeters no ? Feb 10 10:53:29 importing support fragmenttransaction, fragment and fragmentmanager. Nothing that isn't 'support' Feb 10 10:53:38 no Feb 10 10:53:39 so it will always be same size Feb 10 10:53:53 its device independtant pixels Feb 10 10:54:00 danijoo, hmm, that might be it! Feb 10 10:54:05 dvass, depends on your implementation. If you have a @produce annotation somewhere in your app you will get it immetiatly Feb 10 10:54:16 1 dp on one device could be 2 pixels but on antoher could be 0.5 pixels Feb 10 10:54:26 so that mean there is the same number of dp for all screens ? Feb 10 10:54:58 yes almost all Feb 10 10:55:15 oh ok Feb 10 10:55:27 but very hi dpi devices on tablets will need a new value but for those just override it with values-sw600dp/dimens.xml Feb 10 10:55:29 http://labs.rampinteractive.co.uk/android_dp_px_calculator/ Feb 10 10:55:33 look at that Feb 10 10:55:40 then put 1dp in on a medium display Feb 10 10:55:42 you will see Feb 10 10:56:00 1dp on mdpi is 1pixel but it is 2pixels on xhdpi Feb 10 10:56:21 so if you specify something as 10dp it will be smaller on smaller screens and bigger on bigger screens Feb 10 10:56:33 that is why you use dp instead of px when setting something's size Feb 10 10:56:41 mgK, understand? Feb 10 10:56:48 yes !! Feb 10 10:56:50 thats nice Feb 10 10:56:54 http://developer.android.com/guide/practices/screens_support.html Feb 10 10:57:00 for more information Feb 10 10:57:04 thx dude, learned something :) Feb 10 10:57:13 we all learn everyday Feb 10 10:57:20 if we dont we wont have a job in 2 years Feb 10 10:57:21 :) Feb 10 10:57:39 true ^^ Feb 10 10:57:59 sry its called Density-independent pixel not device in... Feb 10 11:01:42 how come apps like these are allowed in playstore ! https://play.google.com/store/apps/details?id=com.yschi.MyAppSharer&hl=en Feb 10 11:02:04 what happens if the users uses this app to share a purchased app for free to all his friends ? Feb 10 11:02:14 hwo did google allow such an app ! ? Feb 10 11:03:13 that is a bit fishy d: Feb 10 11:03:47 ok so you cant share paid for apps with that only free apps Feb 10 11:03:54 you can only get access to the free app apks Feb 10 11:04:27 should be still against google TOS Feb 10 11:04:38 not realy its a free app apk Feb 10 11:04:44 you can install apks from anywhere Feb 10 11:04:50 doesn't have to be from the play store Feb 10 11:05:03 but paid for apps are protected on the device Feb 10 11:05:11 oh well. its only with friends Feb 10 11:05:25 so maybe this doesnt count as "concurrent to play store" Feb 10 11:05:27 but this has been around a long time Feb 10 11:05:34 you can do that with ESFile Explorer too Feb 10 11:05:42 backup your apks and send them via email Feb 10 11:14:26 it's rather lame complaining about that app in the app store Feb 10 11:16:06 esp given how easy it's to install apk from other sources. It's no problem to extract (or just download from apkmirror :) )any apk and disassamble it and whatnot afterall. Feb 10 11:16:46 if you are serious about anti-warez protection complaining about MyAppShare in the playstore is not really the way to go Feb 10 11:17:50 he was just wondering why google allows it (because they explicitly state that services to distribute apks wont be allowed). See recent removal of the amazon store app Feb 10 11:17:55 in-app billing api (supports subscriptions as well) might be all you need Feb 10 11:18:49 but I think since its only an extractor with a share button, this doesnt really count Feb 10 11:18:57 or might be some kind of gray area maybe Feb 10 11:20:03 and it probably works only for apps with all back-ups Feb 10 11:20:16 with all->that allow Feb 10 11:20:41 if your app can easily be bought and copied to another phone, its bad programmed anyways if you ask me :) Feb 10 11:21:20 eh Feb 10 11:21:42 i codo open-source apps for android too :) Feb 10 11:21:45 code Feb 10 11:22:07 dont think they are bad programmed just because they can be copied to another phone :P Feb 10 11:22:14 *bought* Feb 10 11:22:23 (many other reasons why they are bad programmed :P) Feb 10 11:22:24 not free apps :) Feb 10 11:22:37 oh, sorry, i misread your sentence Feb 10 11:22:42 np Feb 10 11:26:54 anyone ever get adb going on moto x, had one sitting here for months doing nothing Feb 10 12:06:43 Hi! I'm a bit confused when making GridView with custom adapter. In the custom adapter, what should I return in the getView() override method? The GridView item or the GridView? Feb 10 12:07:02 Carbon_Monoxide, the item you want to see in one grid Feb 10 12:07:48 for example if its a galery of images, you would return an imageview Feb 10 12:08:24 Hey peeps, if I'm using a foreign key in table 2 and I delete the entry it references from table 1 will that cause a database error? Or does it only get checked when inserting info into the database? Feb 10 12:10:00 Thanks, danijoo! However, here I read a tutorial by MKyong. It returns the GridView instead. And I found it works instead of return the item. http://www.mkyong.com/android/android-gridview-example/ Feb 10 12:11:27 I have tried to make a custom adapter myself which return an item. But it doesn't work on onItemClick event Feb 10 12:11:36 Carbon_Monoxide, no he is not returning the gridview Feb 10 12:11:41 he just named the variable gridview Feb 10 12:12:12 but the variable he named gridview is actually a linearlayout. Just stupid naming :p Feb 10 12:12:41 Ah! I see! Feb 10 12:12:42 Thanks Feb 10 12:27:53 wow the join spam Feb 10 12:29:34 Ya. Feb 10 12:36:19 ok now i have some free time and i find myself i have no idea what to do Feb 10 12:36:20 lol Feb 10 12:36:27 normally that is not an issue Feb 10 12:38:06 is it a good way to generate a x509 self-signed certificate? http://pastebin.com/hGKfYcJy Feb 10 12:56:47 My Spinner items are cut off, how can I get the to be displayed fully without changing the text size? The only thing I specified in the xml layout is width and height, which is both wrap_content. Feb 10 13:05:54 Is there a Android framework like this https://code.google.com/p/awaitility/ ? Feb 10 13:07:23 is it possible to execute static method from gradle and get the result of the method? Feb 10 13:09:00 The Spinner looks something like this http://i.stack.imgur.com/WSI7N.jpg Feb 10 13:17:09 Does anyone know whether Gmail/Keep/Other Google apps use the search widget or the search dialog these days?? Feb 10 13:18:18 it looks like a search dialog... Feb 10 13:23:31 barq: you are probably giving the items a height it cannot hold or attaching them to their parent in a weird way Feb 10 13:23:49 vudu: how do you mean? Feb 10 13:23:56 I love the photo. :D Feb 10 13:24:16 Screenshots are so yesterday. Feb 10 13:25:33 thepoosh: This is my xml: http://pastie.org/private/jzvpdxixiloihgueqvo5q Feb 10 13:25:53 TacticalJoke: stahp Feb 10 13:26:02 thepoosh: I want to encrypt some keys and place it on the strings.xml on the build. I will call a java method for the encryption from the gradle. and add it to the strings.xml Feb 10 13:26:10 barq: what about the getView? Feb 10 13:26:24 i think that shouldn't be a problem Feb 10 13:26:34 you need to define a task and run it Feb 10 13:26:39 What do you mean by getView? Feb 10 13:27:01 and in gradle when running use the result as an argument to write in the strings file Feb 10 13:27:10 barq: who inflates this layout? Feb 10 13:28:29 thepoosh: yes thats what I am trying to do. But I couldn't figure e out how to get the result Feb 10 13:28:30 thepoosh: LinearLayout myMainView = (LinearLayout) inflater.inflate(R.layout.layout_fragment, container, false); Feb 10 13:29:24 barq: can you post R.layout.layout_fragment Feb 10 13:29:49 there is something wrong at either in this or the adapter Feb 10 13:30:10 follow on question - is the appearance of search suggestions in Google apps available to other apps? Feb 10 13:32:01 samskiter: is that what you mean http://stackoverflow.com/questions/6428502/google-search-autocomplete-api Feb 10 13:32:08 thepoosh: http://pastie.org/private/qvoczlqryzfimkad34d5xa Feb 10 13:32:43 vudu: sorry, i dont mean the result themselves, i mean the way they are laid out Feb 10 13:32:53 i am using the google places api to get results, no problemo Feb 10 13:33:27 jsut the search is a lot nicer interface in the google apps Feb 10 13:35:02 samskiter: I still dont understand what you are asking. there is AutoCompleteTextView you can use for suggestions Feb 10 13:35:22 barq: I was asking about your item layout sorry Feb 10 13:35:37 vudu: i have implemented android searchview Feb 10 13:35:45 in my actionbar Feb 10 13:35:59 my suggestions appear as a little floating box Feb 10 13:36:06 vudu: I am using android.R.layout.simple_spinner_item. Feb 10 13:36:23 Hey I've got a question about volley. How would I go about re-using a method across multiple activities? So far it seems like I have to make them in each place Feb 10 13:36:32 if i use the gmail app and click the searchbutton, i immediatelty get a fullscreen view of recent searches. as i type my suggestions are placed in that list Feb 10 13:37:22 vudu: here is a version that takes results of tasks and writes them to the manifest Feb 10 13:37:23 http://pastebin.com/Zk0npay7 Feb 10 13:37:36 you can use the same thing for strings.xml Feb 10 13:37:52 vudu: so what im talking about is the appearance of the ‘suggesctions’ Feb 10 13:38:49 i suppose the full width material style syggestions is what im after Feb 10 13:39:24 samskiter: I see. I am not aware of it if it is available publicly. Feb 10 13:39:51 fair enough Feb 10 13:40:05 barq: check the theme you are using. Feb 10 13:40:43 thepoosh: I am tring to open the link Feb 10 13:40:45 vudu: Where can I see the theme? Feb 10 13:41:29 under res/values/styles.xml Feb 10 13:41:59 I don't have a styles.xml in this apk. Feb 10 13:43:17 vudu: android:Theme.Light is the parent theme. Feb 10 13:44:35 barq: I don't know sorry Feb 10 13:44:52 thats all I can think of Feb 10 13:44:54 I have a custom spinner style. Feb 10 13:45:20 thepoosh: which part of the code executes the task? Feb 10 13:45:42 Is DropDownItem the responsible one? Feb 10 13:46:20 It's the padding in it. Thanks for the hint. Feb 10 13:46:28 vudu: just like the code there calls matcher methods, it can be calling internal methods or tasks Feb 10 13:46:43 ok I see Feb 10 13:46:52 has someone worked with bluetooth? I want to get the BluetoothDevice's UUID. I did the discovery, connected to my device, got the services list (each service has a uuid), but I want to get the device's global UUID Feb 10 13:54:21 elye: I think you need to extract it from somewhere Feb 10 13:55:32 there was a library RadiusNetworks iBeacon that can get it for you as well as minor and major information Feb 10 13:56:31 hmm is there any simple way to do normalising on the audio in android? so some stuff doesnt play too loud or quiet Feb 10 13:57:45 or is it impossible even Feb 10 14:07:22 Gaz`, no simple way. If you play yourself the audio with AudioTrack you can apply any algorithm you want against the PCM raw Feb 10 14:07:36 but it has a certain performance cost. Feb 10 14:08:10 how do i access this PCM data ? Feb 10 14:08:56 Gaz`, [...] If you play yourself the audio with AudioTrack you can apply Feb 10 14:09:08 you have access to it if you feed audiotrack yourself Feb 10 14:09:33 PCM data has variants, but let's call that a .wav file for you Feb 10 14:10:08 aha, i didnt even know about AudioTrack Feb 10 14:10:12 thanks Feb 10 14:18:46 Hey guys, how do you get your first installs? they're the hardest I think Feb 10 14:19:38 I submited an app for review in 13 websites and share content on some social networks, now what would you do? Feb 10 14:20:22 wait Feb 10 14:20:30 or pay for ad campaigns Feb 10 14:20:45 there should be a better way, it takes ages to get some installs Feb 10 14:24:40 Hi, how can I make a fragment do something from another fragment? Feb 10 14:25:55 dvass: getActivity().doSomething() Feb 10 14:26:07 and that method calls the other fragment and invokes something else Feb 10 14:26:31 use interfaces Feb 10 14:34:35 If these fragments are on the same activity, they can use that activity to communicate Feb 10 14:35:44 dvass, I suggest you use a messagebus (either EventBus or Otto) Feb 10 14:35:54 it'll make your app design significantly simpler and clearer Feb 10 14:37:57 Mavrik: started reading up a bit about MVP today, is there anywhere I can read/watch/listen to something good about this? Feb 10 14:38:10 What's MVP? :) Feb 10 14:38:46 The latest incarnation of MVC Feb 10 14:38:52 Model View Presenter which is the main use-case for messagebus from what I read Feb 10 14:39:16 http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter Feb 10 14:39:22 Event buses are great, been looking at Rx recently as a potential replacement, not quite convinced yet Feb 10 14:39:55 Hi, I would like to ask about the Android NDK. We have our own framework for 3D applications written in C++. We have a prototype running on Android through NativeActivity and modified android_native_glue. Are there any good reasons for us to migrate to a Java app that would use System.loadLibrary instead and call the methods C++ through the JNI ? I'm wondering because I'm not sure if we will be able to access the whole Android SDK from the C++ through Feb 10 14:39:55 JNI. Big projects like vlc-android use the Java/JNI approach, so I'm wondering why that is. Feb 10 14:39:57 Rx doesn't really do the same thing as a messagebus Feb 10 14:40:04 but you can create a messagebus using Rx :) Feb 10 14:40:17 thepoosh, ah, dunno, never really tried pushing those patterns on the app Feb 10 14:40:24 hmmmm Feb 10 14:40:31 i feel the same way a lot of times Feb 10 14:40:34 Android is kinda natural MVP design anyway, with presentation XMLs being controlled by activity instances and other stuff being separated Feb 10 14:40:43 Mavrik: but then you get tight coupling, which is what bothers me about Rx Feb 10 14:40:45 well, yes and no Feb 10 14:41:05 deuteros__: g00s swears by Rx Feb 10 14:41:18 mkdk, since Android is actually written in Java, you don't have most of the Android APIs available from C++ Feb 10 14:41:27 thepoosh: I know, had a quick chat about this but I'm still unconvinced Feb 10 14:41:32 mkdk, but that doesn't mean you shouldn't use a NativeActivity approach Feb 10 14:41:43 mkdk, just remember that as soon as you'd want to interact with the OS you'll have to call out to Java Feb 10 14:41:58 mkdk, and writing Java classes and calling to them from C++ is usually the most sane approach in that case Feb 10 14:42:10 that is... writing Java classes for those pieces of OS-dependent functionality Feb 10 14:44:35 Mavrik, thank you. This is why I am wondering, because we are aiming for a production ready application, which should be able to use the whole of Android SDK if necessary. Do you think it's better to have helper class written in Java that would be called through JNI from the C++ or to have a Java app managing the lifecycle and calling the C++ through native calls ? Feb 10 14:45:13 mkdk, that's impossible to say without knowing your app architecture and what is it supposed to be doing and what your goals ar.e Feb 10 14:48:26 Mavrik, I understand. Our application is primarily a rendering application, so having a good control over the update-loop is prefereable. On the other hand, we still need access to the storage, camera, inputs, and possibly Google Store in the future. Feb 10 14:49:36 mkdk: Why do you need native in the first place? Feb 10 14:50:03 deuteros__, becuase our framework is already written in C++ Feb 10 14:50:33 deuteros__, what we are working on now is basically only a port for Android, because we have it already running on Windows/OSX and iOS Feb 10 14:50:35 Ok, just keep that to a minimum, write thin JNI wrappers and write everything else in Java. It will make your life much easier Feb 10 14:51:38 Why does the documentation always recommend using [ compile "com.android.support:appcompat-v7:21.0.+" ]? Such a bad idea. Feb 10 14:51:39 What I am unsure about is that if it is better to use directly the NativeActivity or go for a Java class that uses System.LoadLibrary() Feb 10 14:51:44 I mean the range thing. Feb 10 14:53:45 deuteros__, What I am unsure about is that if it is better to use directly the NativeActivity or go for a Java class that uses System.LoadLibrary() Feb 10 14:54:36 mkdk, that question makes no sense Feb 10 14:54:41 if you check the source of native activity Feb 10 14:54:47 it just does System.loadlibrary :P Feb 10 14:54:54 and sets up some glue Feb 10 14:55:12 Mavrik, ok :) I guess that solves my dilemma. Thanks ! Feb 10 14:57:09 so without using an EventBus or Interface is it possible to call a function inside of a fragment from another fragment? Feb 10 14:57:41 both being within the same activity Feb 10 14:59:12 dvass, of course it is, it's like asking if it's possible to call a method from one class to another Feb 10 14:59:16 Fragments are just classes. Feb 10 15:00:05 well when I use the getSupportFragmentManager to try grab it, I keep getting something null Feb 10 15:00:46 I'm unsure how to actually get the fragment, Mavrik Feb 10 15:01:24 then you were asking the wrong question all this time ;) Feb 10 15:02:33 Mavrik: haha okay, then would you happen to know the answer to that question? Feb 10 15:03:29 That depends on how your Fragments are structured and added, but there should be bunch of google results for that Feb 10 15:04:11 default activity that creates the tabbed view Feb 10 15:04:20 where you can swipe left and right to switch between fragments Feb 10 15:10:23 How to set old style long actionbar logo with Appcompat theme? Feb 10 15:11:04 Mavrik: Like I said, the two fragments have the same activity, use that activity to communicate. It's trivial really. Feb 10 15:13:05 it's an ugly coupling Feb 10 15:13:54 The coupling is already there, throught activity, but you can use an event bus if that troubles you Feb 10 15:14:28 mkdk, use native activity only for games and things that have a similar ux Feb 10 15:14:32 Or create listeners implemented by the fragments and pass those around Feb 10 15:14:47 deuteros__: Indeed but when I attempt to get the fragment I get a null object. Feb 10 15:14:56 or if you have to use a native library (which seems to be the case here) Feb 10 15:14:57 regardless if from activity or fragment. Feb 10 15:15:13 Switching to AppCompat right now, and my ActionBar's spinner now doesn't go back to its previous scroll position when I open it. Is this a bug? Feb 10 15:15:15 Using NAVIGATION_MODE_LIST. Feb 10 15:15:15 dvass: The fragment manager probably hasn't committed yet, wait until you're attached Feb 10 15:15:19 pfn, thanks, that was the generic rule I have tried to follow. Feb 10 15:15:47 (I know that's deprecated, but I'm switching one bit at a time.) Feb 10 15:15:53 deuteros__: until fragment A is attached or B (A being the one calling the activity to do do something with B) Feb 10 15:17:06 is it possible to test my webservice / database from a huge amount of mobile phones virtually ? is there a testing tool or something ? Feb 10 15:17:46 sci-fi: If it's just a web service, it's just network calls, why would you need to test from multiple devices? Feb 10 15:18:08 sci-fi: there are paid testing services Feb 10 15:18:55 sci-fi: you can find free tools all over the web or you can build your own Feb 10 15:20:04 can i use java socket to make a connection between two devices over 3g network that means we have dynamic ips Feb 10 15:20:58 rathodvikas10, don't expect it to work, firewalls, nat, etc Feb 10 15:21:10 thank ya all Feb 10 15:21:27 i need a continues session between two devices to transfer data, what options i have ?? Feb 10 15:21:55 the cloud Feb 10 15:22:13 is it me, or is it dumb that I can't just unpublish an app which has developer console errors - I have to fix the errors first? Feb 10 15:22:28 it's dumb. Feb 10 15:24:25 it's dumb, i confirm. Feb 10 15:24:45 thank you for your support :) Feb 10 15:24:47 I saw this issue with the short description on an old app few monthes ago Feb 10 15:25:06 what cloud services can i use ?? for a time being i am using php for maintaining session, form one end i continue to push data to session and update it and form the other end i pull data. Feb 10 15:25:14 Leeds, is there anything that's not dumb around the whole Play Store Feb 10 15:25:28 that team just seems like it's wandering from stupidity to stupidity Feb 10 15:25:36 they just prevented play store access from Firefox Android Feb 10 15:25:39 there's a team? Feb 10 15:25:42 they did a cosmetic change recently, i was expecting much more :( Feb 10 15:26:02 Leeds, well I guess such stupidity has to be institutionalized and decided on a commitee meeting Feb 10 15:26:12 I remember a year or two back, there was a real jump in both functionality and design... then it seems to have sort of stopped again Feb 10 15:27:00 there are few good points at least :) Feb 10 15:27:39 i'm still wondering why we cannot link a google analytics account to the play store of an app Feb 10 15:28:21 making tracking exclusive to google itself, would be interesting to see how many ppl end up on an app page, and see the % of those who click install/buy Feb 10 15:28:44 and where they come from.. Feb 10 15:29:13 however, it looks like they share to appnanie these info, but not with you Feb 10 15:30:24 if i need to do a one time access of a user's location to put in an email is the Fused location provider the right api to use? Feb 10 15:30:52 yes. Feb 10 15:35:03 If it even manages to connect to google play services. None of the callbacks are triggering for me Feb 10 15:39:18 morning all Feb 10 15:41:14 I want to show a v7 Toolbar with an 'up' (or 'back') arrow button, without using setSupportActionBar. As far as I can see, the only way to do this is to include the arrow bitmap in my project and use Toolbar.setNavigationIcon. That seems strange. Am I missing something? Feb 10 15:48:17 Are we supposed to use the old (lame) ActionBar API when using a Toolbar as an ActionBar replacement? Feb 10 15:48:46 e.g., onCreateOptionsMenu instead of Toolbar.inflateMenu. Feb 10 15:53:10 Why would you think that? Feb 10 15:53:59 Because of the thing I said about the bitmap. Feb 10 15:55:36 Then no Feb 10 15:55:53 You can if you want to Feb 10 16:02:01 I guess my question is more "Why didn't they give us a method like Toolbar.showUpButton?". It doesn't seem like a great idea to make everyone include an extra icon. They also surely want consistency on the platform as opposed to people showing various images for 'up'. Feb 10 16:03:06 how should I draw a circle with a color fill that is variable? i.e., this color is continuously changing and I want this circle fill to continuously change along with this color variable Feb 10 16:06:52 i am looking at https://github.com/smanikandan14/StaggeredGridView becaus i have problem with gridview overlapping (this "error" http://www.devandroidtr.org/?p=330) Feb 10 16:08:11 I can't figure out how to do the "fix" in the http://www.devandroidtr.org/?p=330 but the staggeredgridview is more or less just a scroll view. so if i have lots of items in the scroll view this can cause memory problems correct ? Feb 10 16:10:37 Because the actionbar api was horrible, and they're trying to fix past mistakes Feb 10 16:11:34 I agree, but making users include an 'up' arrow isn't fixing anything. It's just introducing new problems. Feb 10 16:11:35 Gormandy, if you're drawing inside a canvas you can repeatedly call a canvas.drawCircle with a Paint style of FILL or FILL_AND_STROKE, and change the color of the paint with your color variable. Out of a canvas, you could use ValueAnimator against a CircledImageView Feb 10 16:11:36 -like too Feb 10 16:11:50 What if the standard 'up' arrow changes in future? Now everyone has to include a different image. Feb 10 16:11:55 there are too many ways in fact Feb 10 16:13:15 If there is some resource ID in AppCompat that represents the 'up' button, then my point is invalidated. But I can't see one. Feb 10 16:13:25 TacticalJoke, i think it's just part of a big inconsistency story pointed out since 2.* to 5.* from the share icon to the guidelines not respected by google itself, etcc just deal with it Feb 10 16:13:40 like the burger animation... what's the point if your drawer cover 75% of it Feb 10 16:14:21 Okay. So the best thing to do here is to include the up arrow from the "material icons" pack, I guess? Feb 10 16:14:50 * pfn doesn't cover his burger animation with the drawer Feb 10 16:14:51 yay Feb 10 16:14:54 lol Feb 10 16:15:06 it's beautiful Feb 10 16:15:07 :p Feb 10 16:15:47 it makes me angry because they enforce guidelines, we're many willing to follow them, and they don't apply the guidelines to themselves sometimes Feb 10 16:15:57 hi everyone, can some explain the class “Context” in one sentence? Feb 10 16:16:04 i'm not angry about things changing, i think it's expected in CS :) Feb 10 16:16:47 They enforce guidelines? Feb 10 16:17:02 ok, wrong word, they are trying to enforce the guidelines Feb 10 16:17:07 They are? Feb 10 16:17:27 google is the one publishing guidelines Feb 10 16:17:57 They provide a set of guidelines that you can use to create an app that's not going to totally suck.. There's no requirement that you follow it, and there's no reason to follow them if you have a better idea Feb 10 16:18:26 ok, i have to admit "enforce" is too strong Feb 10 16:21:48 So what would you folks recommend -- use Toolbar with setSupportActionBar or use Toolbar's new (and better, IMO) API (although it means setting the up icon manually and maybe other stuff too that I'm unaware of)? Feb 10 16:22:00 As a general ActionBar kind of thing, I mean. Feb 10 16:22:10 i found it a lot easier to use the support mode Feb 10 16:22:20 I can't tell from the documentation which (if any) is recommend. Feb 10 16:22:34 I think "they" recommend to use a toolbar instead of an actionbar since lolli Feb 10 16:22:37 otherwise you have to add all the buttons and handle all the actions yourself Feb 10 16:22:49 adq: you can choose to ignore them, but god forbid something unfortunate might happen to your family if you know what I mean ;) Feb 10 16:23:04 psychological pressure ^^ Feb 10 16:23:10 I have each fragment provide their own Toolbar Feb 10 16:23:14 adq: I know, but I'm asking whether the recommendation is to use setSupportActionBar(Toolbar) or not. Feb 10 16:23:37 SimonVT: Okay. Sounds good. Feb 10 16:23:37 There's no recommendation, make up your own mind Feb 10 16:26:05 TacticalJoke, if you target material, maybe look at http://android-developers.blogspot.fr/2014/10/material-design-on-android-checklist.html Feb 10 16:30:33 HI when I try to debug with android studio but the huawei ascend p7 doesn't list in the debugger dialog Feb 10 16:30:40 do you have some advice? Feb 10 16:30:54 I enable the developer options in the phone Feb 10 16:31:03 I am using a linux distro Feb 10 16:45:47 Can some explain the class “Context” in one sentence? Feb 10 16:46:34 !seen brain Feb 10 16:46:39 It describes the context in which the app runs. Feb 10 16:46:50 thx Feb 10 16:47:18 Context of the current application state Feb 10 16:47:25 better Feb 10 16:47:37 Do I get an A? Feb 10 16:47:42 A+ Feb 10 16:49:43 Have someone an idea for a scripting language to define a state machine Feb 10 16:50:09 i want to use these state machine in an android app Feb 10 16:51:45 Why do you need a scripting language? Feb 10 16:52:46 because I want to load svgs with logic, I want to define the logic with a scripting language Feb 10 16:53:51 you mean you want a logic dsl? Feb 10 16:54:05 scripting language could just be something like php or whatever Feb 10 16:54:50 dsl -> http://en.wikipedia.org/wiki/Domain-specific_language Feb 10 16:54:53 is there a way to interpret php in android Feb 10 16:55:13 no Feb 10 16:55:16 I wouldn't try Feb 10 16:55:26 you could write your own interpreter in java :D Feb 10 16:55:38 yes why not :D Feb 10 16:55:40 also, damn small Linux, and a local hacker-space called dim sum labs :) Feb 10 16:55:42 or you just write your script in java O.o Feb 10 16:55:43 bimbambino, what are you asking, really? Feb 10 16:55:48 I thought in google IO 2013 they said android supports php Feb 10 16:55:56 Surely there are good libraries for existing languages such as Java. Then all you have to do is find one in the big JVM world Feb 10 16:56:20 Have someone expierience with http://en.wikipedia.org/wiki/Xtext Feb 10 16:56:23 Leeds: Also the best form of internet connection Feb 10 16:56:39 or http://en.wikipedia.org/wiki/SCXML Feb 10 16:56:39 yiati: nope, that's fibre-to-the-living-room Feb 10 16:56:51 nope, that's fiber to the ear Feb 10 16:58:08 harder to distribute the signal when it's going straight into your Glass Feb 10 16:59:06 seriously, I have gigabit fibre terminating under my desk... it rocks :D Feb 10 16:59:50 I have it at work, but not at home, but soon Feb 10 17:00:50 I miss 2 Gigabit fiber at college Feb 10 17:01:21 because you know, science Feb 10 17:01:32 yes, of course. science. Feb 10 17:04:10 yiati: I live five minutes from a university. One time I drove the five minutes to upload a video to YouTube via WiFi (I work for the university, so I have access). Made me laugh Feb 10 17:04:31 yiati: Didn't even go in, just stood outside of the building smoking a cigarette. Feb 10 17:04:38 theblang, sounds like you saved a lot of time Feb 10 17:05:06 yiati: The upload speed is ridiculous, lol Feb 10 17:05:48 never underestimate the bandwidth of a truck full of... etc. Feb 10 17:13:53 Okay, so it turns out that AppCompat does contain a back icon: R.drawable.abc_ic_ab_back_mtrl_am_alpha. This works, but is it safe to use this? Feb 10 17:14:24 (It's undocumented.) Feb 10 17:15:07 is there a way from an android app to get the ID of the computer that is connected via ADB Feb 10 17:16:55 sleepster: what is the ID of a computer ? Feb 10 17:17:40 Hey guys Feb 10 17:17:49 When you plug in an Android device into a new computer for dev purposes, it does display some id. It appears to be a MAC address, but I’m not sure Feb 10 17:18:04 Ppl, I'm really worried Feb 10 17:18:16 Is Google killing ADT for Eclipse completely? Feb 10 17:18:20 yes Feb 10 17:18:25 :/ Feb 10 17:18:37 although it is open source, and I’ve heard of some other group of people continuing work onit Feb 10 17:18:50 Is there a way to use good old Android.mk and Application.mk with Gradle? Feb 10 17:19:02 i don’t believe so Feb 10 17:19:17 corentin: so you know when you plug in an android device to the computer, it shows some hex string? Feb 10 17:19:24 corentin: it asks you to approve that computer Feb 10 17:19:28 corentin: that's the string I'd like to get Feb 10 17:19:52 sleepster: isn't that ~/.android/adbkey? Feb 10 17:21:45 Heya, so I want to pay the 25$ to register for the Google Play thing, but now I don't know if I should create a separate google account just for this Feb 10 17:22:09 yes, you should Feb 10 17:22:21 that’s just good, common business sense Feb 10 17:23:00 s73v3r, why common business sense? Feb 10 17:23:13 Would it show my realname if I would use my personal google account? Feb 10 17:23:25 I'm assuming yes, then I understand that Feb 10 17:23:29 How to set old style long actionbar logo with Appcompat theme? Feb 10 17:23:34 It’s good business sense because you’re keeping things segregated. Feb 10 17:23:53 So many people get banned from Google Play. I would not risk using an existing account. Feb 10 17:24:06 should something happen and you include copyrighted IP in your app that isn’t yours, and your account gets banned, do you want to lose all of your personal gmail too? Feb 10 17:24:58 Nope, I see. Feb 10 17:25:54 But do you "see" like the naavi? Feb 10 17:25:54 also, it is a good idea to get in the habbit of segregating business from personal stuff. And even if they’re just apps you’re doing for fun, not selling, it would still fall under this rule Feb 10 17:29:42 alright, so a new account it is Feb 10 17:30:06 SiPlus, there's is a way how to do that. I am using it : http://stackoverflow.com/questions/27059984/how-to-include-native-libs-from-another-module-in-gradle Feb 10 17:30:26 Leeds: sorry, I'd like to access that value from an android app Feb 10 17:30:33 not from the pc Feb 10 17:30:36 mkdk, damn, that's a mess Feb 10 17:30:43 sleepster: a) why? and b) I doubt you can Feb 10 17:31:05 SiPlus, yes, but that is because the Gradle must invoke the ndk-build manually when it builds the jni libs Feb 10 17:31:35 hrmf Feb 10 17:31:46 sleepster, you want that value while computer is connected? Feb 10 17:32:19 Mavrik: yeah Feb 10 17:32:57 sleepster, looking at it, I doubt you can - it's a hash of computers certificate Feb 10 17:33:45 sleepster: why do you want it? Feb 10 17:35:22 So... how should I put in the name of the "business"? Feb 10 17:35:28 first name, last name? seems weird to me Feb 10 17:35:37 I mean on the signup page Feb 10 17:35:37 then I wouldn't recommend that Feb 10 17:35:57 The sky is the limit, I believe in your creativity Moter8 Feb 10 17:36:08 Moter8: Which page is asking for that? Feb 10 17:36:20 sleepster: why do you want it? Feb 10 17:36:30 https://accounts.google.com/SignUp Feb 10 17:37:11 Did you choose to create a business account? Feb 10 17:37:53 I'm trying to :D Feb 10 17:38:26 I dont see a specific way to get a *business* account Feb 10 17:39:08 so I think we can conclude that sleepster is up to no good Feb 10 17:39:39 I don't recall it asking me about businesses when I created my Google account for Android development. Feb 10 17:40:39 How about “apps@Moter8Inc.com" Feb 10 17:40:48 or whatever your entity name is Feb 10 17:41:07 Or apps@s73v3r.com Feb 10 17:41:29 please. my lawyer has been restless as of late :p Feb 10 17:43:25 http://i.imgur.com/60SxDNj.png "This Google-Account will be linked with your Developer Console" "If you represent a Company, create a new one instead of your personal account." Feb 10 17:44:31 and "If you" don't "represent a Company, create a new one" anyway " instead of your personal account." Feb 10 17:45:15 yes, I want to do just that, but what name should I use on that? Feb 10 17:45:31 The same as on my personal account (eg my realname)? Feb 10 17:49:53 Guys? :/ Feb 10 17:50:03 The sky is the limit Feb 10 17:50:28 It might help to keep it SFW Feb 10 17:50:35 i wanted to be an astronaut Feb 10 17:50:36 :c Feb 10 17:50:57 Jupiters sky is the limit Feb 10 17:52:42 >.< Feb 10 17:53:38 seriously though, use whatever you think sounds good Feb 10 17:53:43 There should be an inverse of "TMI". "TLI". Feb 10 17:53:47 There are not hard core rules here Feb 10 17:53:53 Almost all questions in here have TLI. Feb 10 17:55:20 yiati, "Whatever sounds good?" Feb 10 17:55:25 Yeah I've found that if I haven't boiled a question down to something that I genuinely don't understand, and/or cannot find any context on then I am just being lazy and need to ask myself more questions Feb 10 17:55:29 But does that name even appear on the store? Feb 10 17:55:57 I believe in the Play Store dev console you can customize what appears there Feb 10 17:56:13 so what you put for this one doesn’t really matter. Feb 10 17:56:24 What is SpinnerCompat? The documentation barely says anything, and Google doesn't seem to know. Feb 10 17:57:51 It's a Spinner Feb 10 17:58:00 And it's compatible Feb 10 17:58:02 Part of the internal Toolbar API Feb 10 17:58:05 Check the source Feb 10 17:58:46 So I'm guessing it's not intended to be used by developers. Feb 10 17:59:24 No Feb 10 18:05:51 Could anyone make me a huge favor? Just try and load https://tiendaganadera.com on an android phone/tablet, some phones seem to have certificate issues and I'm trying to find out why Feb 10 18:06:29 does anyone have an idea why my webview cant open pages with javascript content even tho i have getSettings().setJavaScriptEnabled(true); ?? Feb 10 18:08:52 autrilla_: seems to work for me, both firefox and chrome Feb 10 18:09:14 groxx, hm, thanks... It doesn't work for a friend of mine, certificate error :( Feb 10 18:09:15 eeyup Feb 10 18:09:27 on chrome and opera it works Feb 10 18:09:29 autrilla_: main certificate issue I see on phones is if the clock is way wrong - it won't validate because it's e.g. valid only in the future, or stuff like that Feb 10 18:10:07 I thought it could be an intermediate certificate issue but I already added those. It's weird, maybe he has an old cert cached. Feb 10 18:10:22 autrilla_: I think comodo's certificates have been around in the main key sets for quite a while, so I _mostly_ doubt it's that the phone is using an old set, but I don't have an old device to test on. Feb 10 18:10:38 It's a fairly new device, a moto g Feb 10 18:10:40 there should be an error associated, i would have imagine it's related to CA certificate Feb 10 18:11:11 comodo got powned so many times... Feb 10 18:11:21 luist: Are you sure it can't? Feb 10 18:11:38 luist: javascript error perhaps? Feb 10 18:11:42 TacticalJoke: ni Feb 10 18:11:47 NI Feb 10 18:12:01 groxx: like what? Feb 10 18:12:08 wait, why are we Ni-ing TacticalJoke? Feb 10 18:12:20 TacticalJoke: well not entirely sure, but all the pages that appear blank have javascript content Feb 10 18:12:37 luist: not sure how I would know. but try debugging the webview https://developer.chrome.com/devtools/docs/remote-debugging Feb 10 18:14:39 <_hc> hey all, I'm tried to make all Linkify'ied links open in a new Task when they are clicked on. I've found various tricks to do it, but I was hoping for something clean. Is there something like FLAG_ACTIVITY_NEW_TASK, but the opposite: a flag to make all outgoing Intents be set with FLAG_ACTIVITY_NEW_TASK? Feb 10 18:14:57 Hmm. Do we really have to set android:background on a Toolbar to get it to use colorPrimary? (We don't have to do this for an ActionBar.) Feb 10 18:15:01 <_hc> i.e. all Intents send from clicking a link in my ChatActivitiy Feb 10 18:22:41 I have a textView inside my MainActivity that I want to update from another class. What is the best practice for doing this? Currently, inside my mainActivity, I instantiate the class and pass in "this" into it, and from within my class, I try to cast the context to be of type MainActivity - and then set the textview text that way Feb 10 18:23:51 mendozao: What is the other class that wants to update the TextView? Feb 10 18:24:04 sounds like it could leak Feb 10 18:24:56 TacticalJoke: It is a custom class that has a method @JavascriptInterface Feb 10 18:28:20 TacticalJoke: https://gist.github.com/anonymous/3cf931707fc0dbeefe89 Feb 10 18:30:19 Phonegap or something? Feb 10 18:32:08 <_hc> mendozao: if the lifecycle of that other class is tied to the Activity, you should be able to do a direct method call, if it has a separate lifecycle, then perhaps you should send an Intent. Feb 10 18:33:53 _hc: you can read how Linkify does it (check the source, it's a built-in class), but the best approach may be something like this: http://stackoverflow.com/a/5681946/16295 <- capture the click, read the url, startActivity(yourIntentWithNewTaskFlags). Feb 10 18:34:12 _hc: I tried setting the textview text inside the custom class and I got the following error: "Only the original thread that created a view hierarchy can touch its views." Feb 10 18:34:50 yep, that's true Feb 10 18:35:44 mendozao: I think (thought I'm not certain) that this is a good approach: http://www.codeproject.com/Articles/392603/Android-addJavaScriptInterface Feb 10 18:36:00 I'm not certain because I've not done this before and because that's codeproject.com. :D Feb 10 18:36:45 JakeWharton: ? i'm reading your doc about kotlin Feb 10 18:36:59 Then again, it's tricky, because that code runs on a background thread (apparently) and an inner class will hold a reference to its enclosing class. Feb 10 18:37:19 TacticalJoke: Got it. So basically creating the class inside the main activity class Feb 10 18:37:37 Yeah, an inner class. I *guess* it's fine to do that here. Maybe someone else knows for sure. Feb 10 18:38:08 TacticalJoke: I think it makes sense because the WebAppInterface class depends on the main activity Feb 10 18:38:30 without the main activity, the WebAppInterface wouldn't have any job to do Feb 10 18:39:20 Yeah. Feb 10 18:39:42 TacticalJoke: I'm gunna give a go Feb 10 18:40:01 "Hold my beer." :D Feb 10 18:40:14 In fact, that summarises almost all Android programming. Feb 10 18:40:18 "Watch this." Feb 10 18:40:35 often followed by injury Feb 10 18:41:39 TacticalJoke best way to collapse the on screen keyboard? Feb 10 18:42:05 Do you mean "hide once it's shown" or "never show in the first place"? Feb 10 18:42:22 It will most likely be showing, and I want to hide it Feb 10 18:42:59 Just curious -- why aren't you letting Android handle this? Feb 10 18:43:12 What do you mean letting android handle it? Feb 10 18:43:19 Oh, I think I get it Feb 10 18:43:47 (Or, I guess, the user.) Feb 10 18:43:49 Because the keyboard is open, and I need to show a SnackBar warning, and the user cannot see the snackbar when they keyboard is up Feb 10 18:44:03 that seems unrelated? Feb 10 18:44:16 I guess the answer is here: http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard Feb 10 18:44:36 But your case sounds interesting. I wonder whether you're doing the right thing here. Feb 10 18:44:52 Ok want me to explain? Or maybe even take a screen recording Feb 10 18:45:11 sounds very wrong so convince away Feb 10 18:45:12 Got this new screen recording app, really wanna make use :D Feb 10 18:45:18 Yeah, sure. :) Feb 10 18:45:26 I like screen recordings of nerdy stuff. Feb 10 18:45:35 Ok, gimme like 10 min? Never used it before Feb 10 18:45:40 K. Feb 10 18:45:47 If it's a hassle don't worry. Feb 10 18:45:54 Nah, I def wanna try this out Feb 10 18:46:10 drose379: are you able to use `adb shell screenrecord` ? Feb 10 18:46:22 Dont know what that is Feb 10 18:46:25 Im using the app Mobizen Feb 10 18:46:39 'adb shell screenrecord' works nicely Feb 10 18:46:39 Are you gonna narrate, drose379? Feb 10 18:46:42 kitkat+ (I think it's kk that added it anyway) have screen recording built in Feb 10 18:46:49 Shall I narrate? Feb 10 18:47:30 groxx I have screen capture (photo) but never came across a recording feature Feb 10 18:47:33 im on 4.2.2 Feb 10 18:47:34 yes, and add some special effects and screen transitions and credits too ;) Feb 10 18:47:46 introductory scroll! Feb 10 18:47:51 You should add a sample of Rachmaninov's Piano Concerto No. 2 during the middle. Feb 10 18:47:57 OK, got it Feb 10 18:49:56 It'd be cool to hear narration if you're comfortable. :D Feb 10 18:50:19 Damn, we are picky. It's like you gotta create a Hollywood movie for us to help. Feb 10 18:50:36 I'm not helping unless it wins an Oscar Feb 10 18:50:39 haha Feb 10 18:50:42 Was just thinking that. Feb 10 18:50:48 I'll help if it at least gets nominated. Feb 10 18:51:08 question, is it a bad pattern to do something like this: MyActivity.createIntent(context, foo, bar, param, param2, ...) to set up your arguments? Feb 10 18:51:34 I do something like that, matt_j. I think it's a good pattern. Feb 10 18:51:39 cool :3 thanks Feb 10 18:51:41 I do that all the time. exposing a bunch of string keys seems infinitely worse Feb 10 18:51:43 Though if there are many parameters then you might consider some kind of object. Feb 10 18:51:49 Yeah, groxx. Feb 10 18:51:49 groxx: that too... Feb 10 18:52:27 Patterns such as that should be in the Android guides. Feb 10 18:52:47 yeah... Feb 10 18:53:35 This is just horrible: public final static String EXTRA_MESSAGE = "com.mycompany.myfirstapp.MESSAGE"; Feb 10 18:53:37 From the first guide. Feb 10 18:53:39 So much wrong with that. Feb 10 18:53:58 yep Feb 10 18:54:09 I keep getting confused finding varaibles like al_blah, ah_foo Feb 10 18:54:11 they are arraylists... Feb 10 18:54:12 ffs Feb 10 18:54:16 al_* Feb 10 18:54:19 Is that someone else's code? Feb 10 18:54:21 yes Feb 10 18:54:24 Ugh. Feb 10 18:54:25 * matt_j wonders who al is Feb 10 18:54:34 * matt_j cleans up the code bit by bit Feb 10 18:56:08 Recording created guys Feb 10 18:56:15 The badness of some code is breath-taking. Feb 10 18:56:21 yep! Feb 10 18:56:37 It's like people are able to find ingenious ways of writing awful code. Ways you never could've imagined. Feb 10 18:57:13 drose379: Is it going on YouTube? Feb 10 18:57:25 i dunno. that’s the way I define my bundle parameter keys. what’s wrong with it? Feb 10 18:57:37 TacticalJoke where else could I upload it Feb 10 18:57:41 Does imgur do video Feb 10 18:57:46 s73v3r: nothing wrong with it Feb 10 18:57:51 I'm just adding that code because I like it better Feb 10 18:58:00 this current code does it the "bad" way Feb 10 18:58:04 i.e. strings everywhere Feb 10 18:58:06 s73v3r: public, plus you let the caller produce the arguments and set the types and whatnot? extra room for error, but it does work fine. Feb 10 18:58:36 what’s the better way to pass things between activities? Feb 10 18:58:44 Also, "EXTRA_MESSAGE" is bad naming, IMO. And the package namespace is unused noise. Feb 10 18:58:44 drose379: Not sure. Feb 10 18:59:00 Ill find something, one sec Feb 10 18:59:32 s73v3r: that's kinda what we're discussing. make an intent / bundle factory method inside the activity, so it's strongly typed. you don't even have to expose the strings then. easy refactoring, type safety, API-as-documentation-of-supported-argument-combinations. Feb 10 18:59:38 EXTRA_MESSAGE could be a bad name; I’d need some context, but odds are the name could be better. As for the package namespace, I add it to avoid collisions Feb 10 18:59:57 i never thought of that Feb 10 19:00:00 yeah, package namespace is officially recommended. Feb 10 19:00:12 I do it for fragments, but didn’t think of doing so for activities Feb 10 19:00:48 I do it for every intent thing (minus one-off stuff for external activities / etc) Feb 10 19:01:09 s73v3r: This is a pattern I like: http://pastebin.com/qsbBGuvL Feb 10 19:01:12 doesn't help that some of the services are over-complex :) Feb 10 19:01:30 Then, as groxx said, the putting/getting of the Intent is private. Feb 10 19:01:35 So your static method returns an Intent instance, which you then pass into StartActivity Feb 10 19:01:43 Yeah. Feb 10 19:01:53 Everything is cleaner and simpler. Feb 10 19:02:17 I like it. I think I might start adopting it Feb 10 19:02:24 returning an intent is a bit more flexible too, easier to add flags / wrap in a PendingIntent for notifications / etc. Feb 10 19:02:57 The project I’m on now has static methods for transitioning to acivities, because apparently writing StartActivity is too much work :( Feb 10 19:03:01 I don't think there could ever be a collision without a package namespace. Feb 10 19:03:13 At least with local intents. Feb 10 19:03:27 s73v3r: heh. do you have a bunch of custom transition animations at least? or is it just a wrapper around startActivity? Feb 10 19:04:32 groxx: Are you saying you'd use "the.package.namespace.whatever" in my example? Just curious. Feb 10 19:04:39 As opposed to "whatever". Feb 10 19:04:44 TacticalJoke: yeah, it certainly seems unlikely. I have a feeling that it's more of an "all bundles, ever, because" recommendation, partly influenced by savedInstanceState (since parent classes could conceivably accidentally overwrite your data) Feb 10 19:05:19 nope. just a wrapper around startActivity. There’s a flag for whether or not to finish the activity, and a variable arg list of flags to add to the intent Feb 10 19:05:27 Wait, are we supposed to do this in onSaveInstanceState? ;o Feb 10 19:05:40 save your instance state? :) Feb 10 19:05:51 TacticalJoke you ready? Feb 10 19:05:51 I mean "use namespacing for keys". Feb 10 19:05:57 Yeah, drose379. Feb 10 19:05:57 TacticalJoke: also because the android docs seem to push you _heavily_ towards exposing all parts of your app for external use, though that's almost certainly the minority of cases. Feb 10 19:06:08 TacticalJoke: and for external APIs, obviously, prefix. Feb 10 19:06:11 Right. Feb 10 19:06:16 Oh, I read that as "what are we supposed to do" :) Feb 10 19:06:42 groxx: In onSaveInstanceState, I do stuff like this: bundle.putString("blah", blah); Feb 10 19:06:43 Is that wrong? Feb 10 19:06:51 TacticalJoke https://vid.me/Z2kT Feb 10 19:07:16 TacticalJoke: tbh I'm not certain. prefixing is probably good for paranoia's sake, if nothing else. but I'd have to hunt down the docs again to see if they're clear about recommending it. Feb 10 19:07:28 drose379 is a real human. ;o Feb 10 19:07:36 haha Feb 10 19:08:45 and they can type faster than me D: Feb 10 19:09:06 Do you guys see the issue though? Feb 10 19:10:51 I wonder whether android:windowSoftInputMode="adjustResize" would be suitable here. Feb 10 19:11:01 Whats adjustResize? Feb 10 19:11:47 I think that's the right one. It doesn't draw the keyboard on top of the Activity; it resizes the Activity. Feb 10 19:11:52 Though it might be a terrible solution here; not sure. Feb 10 19:12:04 hmmm Feb 10 19:12:23 drose379: don't suppose you have adjust_nothing as the soft input mode on the activity? Feb 10 19:12:24 Or show an error thing on the dialog itself. Feb 10 19:12:32 ah, mostly catching up. Feb 10 19:12:47 drose379: can't you adjust where it appears if you use a snackbar ? Feb 10 19:13:06 Maybe, I dont know where to find the documentation for the SnackBar lib im using Feb 10 19:13:21 Your app looks nice, BTW. Feb 10 19:13:27 yeah. I'd try to show the snackbar in the dialog(fragment?)'s window rather than your activity, since it looks like it's not getting resized due to it being in the background. Feb 10 19:13:30 Thanks TacticalJoke Feb 10 19:13:42 I would _assume_ the snackbar lib tries to draw at the bottom of the window by default Feb 10 19:13:48 I am surprised you got things looking/working so well in such a small time. Feb 10 19:14:24 TacticalJoke it looked like _crap_ until I read the MaterialDesign webpage from google Feb 10 19:14:28 woo my app is publishing! Feb 10 19:14:39 Another point I would make: Are you sure you even want dialogs here? Feb 10 19:14:49 Yes, I like them Feb 10 19:14:52 Seems like a standard "activity with multiple pages" flow to me. Feb 10 19:14:52 Okay. Feb 10 19:15:22 The only other thing after the Objectives dialog is just choosing priorioity, then it dissapears Feb 10 19:15:41 But if you think it should be an activity, Ill try it out Feb 10 19:15:51 Okay. Well, the issue is that the user is wrong to click "NEW OBJECTIVE" if there are already three. Feb 10 19:16:01 Is it always three, BTW? Feb 10 19:16:18 can't you disable the button? Feb 10 19:16:23 (i dont know at all) Feb 10 19:16:33 but it would make sense Feb 10 19:16:57 TacticalJoke im only allowing 3 when the lesson is first being created Feb 10 19:17:02 Moter8 thats a great idea Feb 10 19:17:16 could anyone take a look at this and see if you have any ideas? http://www.reddit.com/r/androiddev/comments/2vfwf2/_/ Feb 10 19:18:03 Reddit is 503ing a lot lately. Feb 10 19:18:14 ++ Feb 10 19:18:19 drinfernoo: it reminds me that everything needs a good 503/404 page: http://cl.ly/image/0f182c281Q08 Feb 10 19:18:50 TacticalJoke gonna grab some lunch and come back to this in a bit Feb 10 19:20:16 Okay. I definitely think you should try to localise (to the dialog/whatever) the whole "user can't click to add again when there are already three" thing. Collapsing the keyboard to show the underlying activity's toast feels a little weird. Feb 10 19:20:40 At least IMO. Feb 10 19:20:57 drinfernoo: is drawerContainerRes the viewpager? Feb 10 19:21:51 TacticalJoke what do you mean by localise Feb 10 19:22:10 I mean to, for example, show the message on the dialog itself. Feb 10 19:22:21 Oh, didnt even think of that Feb 10 19:22:23 God damn Feb 10 19:22:34 I gotta start thinkink like a programmer :D Feb 10 19:22:35 Or disable the button (though I'm not sure about the Android guidelines and this). Feb 10 19:22:41 drawerContainerRes is the main view in my activity. its where the fragments from my drawer get inflated, which in turn gets the tab/viewpager layout inflated into it Feb 10 19:22:52 drinfernoo: hm. I'll have to read a bit more, I think. not sure I'll have time immediately. Feb 10 19:22:54 groxx, that's all in BaseActivity Feb 10 19:23:01 I love UX questions. It's such an interesting (and important) field. :) Feb 10 19:23:10 groxx, I'd love any input you've got Feb 10 19:23:22 TacticalJoke im just gonna add a textview to the dialog with a short message Feb 10 19:23:23 <_genuser_> so we all hate static vars, sure. Feb 10 19:23:40 <_genuser_> how about singleton queues for keep track of work items in an app? Feb 10 19:23:45 <_genuser_> *keeping Feb 10 19:23:49 And it can be so hard to design a good UI on mobile devices. There are countless constraints at times. A big challenge. Feb 10 19:23:58 drose379: Yeah, I'd probably do that. Feb 10 19:24:22 _genuser_: I wonder how many really do hate static fields. Feb 10 19:24:24 TacticalJoke, my problem is thinking in tablet ui and landscape ui lol Feb 10 19:24:38 Thanks again for the comment on the looks of my app Feb 10 19:24:45 <_genuser_> TacticalJoke: at least, during design we all talk about how they "should" be avoided as much as possible. Feb 10 19:24:50 Ive been putting a lot of time into getting better at design Feb 10 19:25:06 _genuser_: it's mostly that they tend to be over-used, and unless you understand the lifecycle of what you're dealing with they'll cause tons of hard-to-debug errors. static data is used all over the place in a normal app though. Feb 10 19:25:13 drose379, I wanna see lol Feb 10 19:25:29 drinfernoo see what? Feb 10 19:25:41 <_genuser_> drose379: compare and contrast. always look analytically at an app whose design you like. seek to imitate. then compare to see how it fails in yoru implementation. Feb 10 19:25:53 your app Feb 10 19:25:57 <_genuser_> drose379: if you have a unique new design that improves workflow don't be afraid to chuck norms in that case. Feb 10 19:26:14 drinfernoo I can show you Feb 10 19:26:15 <_genuser_> groxx: sure, that's a much better overview the way you stated. Feb 10 19:26:31 I made a screencast of a prob I was having, here https://vid.me/Z2kT Feb 10 19:26:57 <_genuser_> groxx: in many cases, my app doesn't really even need to display "items in progress in screen". but then again, I thought it might be cool. :) Feb 10 19:27:05 _genuser_: also, in general, I'd recommend making your code instance-based, and having a getInstance() method that returns a static instance. makes it easier to stub for testing, and I tend to find it makes it easier to reason about. plus, you can just make a second one if the need ever arises. Feb 10 19:27:34 <_genuser_> groxx: yeah the getInstance() can really end up being a factory pattern for you and you can expand it easier. Feb 10 19:27:44 I love drama-filled reddit threads. The one I'm currently reading features a guy who paid his girlfriend to paint a picture for his sister's birthday. Feb 10 19:27:52 <_genuser_> TacticalJoke: lol Feb 10 19:28:10 And the drama is "Is he a doormat for paying his girlfriend, or is everyone else a doormat for thinking people in relationships should do stuff for free?" Feb 10 19:28:13 hold on brb Feb 10 19:28:35 I'm in the "he's a doormat for paying his girlfriend" camp. Feb 10 19:28:35 <_genuser_> oooh, that's a good one TacticalJoke Feb 10 19:28:41 http://www.reddit.com/r/pics/comments/2vf1wu/on_a_whim_i_paid_my_girlfriend_to_paint_my/ Feb 10 19:29:10 Can i only show that TextView for a few seconds? Feb 10 19:29:28 I could show it, then have a counter for 3 seconds, then .GONE Feb 10 19:29:43 <_genuser_> TacticalJoke: dangit. now I"ll be reading it for a while. Feb 10 19:29:56 can I join the "it depends on the relationship. if he's a doormat, he's probably one for not paying enough attention to predict her response." camp? (is there one? it's 503-ing on me) Feb 10 19:30:02 You can do it with some kind of postDelayed thing. (I forget the details.) Feb 10 19:30:12 groxx: lol Feb 10 19:30:19 Maybe that camp can be created. Feb 10 19:30:32 <_genuser_> TacticalJoke: not to mention the picture is horrible. Feb 10 19:30:36 drose379: It's similar to the View.post/Handler.post thing. Feb 10 19:30:39 Yeah, it is horrible. Feb 10 19:30:44 <_genuser_> TacticalJoke: I can't paint even that much. but for a commission piece.... Feb 10 19:31:09 Ok, Maybe I dont even need the timer, the sole purpose of that dialog is to add objectives, so once the limit is reached and the textview is shown, the person will prob just hit next Feb 10 19:31:11 You'd have to pay *me* to give that to a family member. Feb 10 19:31:17 <_genuser_> groxx: yeah, I hit the server busy for a minute. Feb 10 19:31:31 <_genuser_> TacticalJoke: it's the face of a kitten on the body of a general for starters. completely off. Feb 10 19:32:30 <_hc> groxx: thanks, you led me to the answer: https://stackoverflow.com/a/11417498 Feb 10 19:33:00 reddit isn't usually down this much. Hmm. Feb 10 19:33:17 <_genuser_> TacticalJoke: I blame you for not finishing Feb 10 19:33:21 TacticalJoke: heh. for the right recipient, that could be a pretty good gift. and given the time it likely took, payment seems pretty reasonable. Feb 10 19:33:22 <_genuser_> *my app today Feb 10 19:33:45 I blame myself for not finishing mine. :D Feb 10 19:34:09 _hc: yeah, that looks pretty reasonable. nice hunting :) it works? Feb 10 19:34:13 This is the crux of the drama: http://www.reddit.com/r/pics/comments/2vf1wu/on_a_whim_i_paid_my_girlfriend_to_paint_my/coh4zcg Feb 10 19:34:48 <_genuser_> lol. you, sir, spread laziness! Feb 10 19:35:11 <_genuser_> the funny thing is I'm the CS major around here and people always ask me to fix the computer. Feb 10 19:35:14 <_genuser_> and then tell me I did it wrong. Feb 10 19:35:15 I'm switching my app to material (AppCompat). Everything is such a pain. Feb 10 19:35:21 Loads of stuff seems undocumented. Feb 10 19:35:27 So I ended up reading reddit. Feb 10 19:35:28 <_genuser_> because before it used to have 7popups and now it only have 6. Feb 10 19:35:38 _hc: it's conceptually a bit messy just because you're using the system to do X, just so you can replace it with Y. but it seems like it might be the easiest route :) doing fancier things with spannables has a bit of a learning curve. Feb 10 19:35:52 Oh, I've spent so much of my life fixing people's computers. Feb 10 19:36:04 <_genuser_> TacticalJoke: appcompt, isn't that just the support libs? Feb 10 19:36:08 Yeah. Feb 10 19:36:12 anyone know if/when google is going to add material error treatment and floating labels to the sdk? Feb 10 19:36:16 Pre-21 "material design". Feb 10 19:36:25 there haven't been any updates to appcompat in a while. guess it must be done :) Feb 10 19:36:27 <_genuser_> TacticalJoke: how far low can you go on api levels using appcompat to implement material design? Feb 10 19:36:28 seems pretty dumb to put those in the material spec and not provide a framework Feb 10 19:36:40 I remember my hairdresser's computer being totally owned by like five classes of malware. Feb 10 19:36:42 <_genuser_> I guess material design really is just the spec. but I see some of it is implemented her and there. Feb 10 19:36:45 And to my shock she didn't have to reformat. Feb 10 19:36:52 MalwareBytes and so on took care of everything. Feb 10 19:37:12 "I paid her because she doesn't know my sister well and it was last minute and I value skilled work as a sort of patronage. Neither of us think it's weird." <- "not a doormat" camp for me. Feb 10 19:37:12 <_genuser_> I remember my parents computer.... sex.exe on teh desktop Feb 10 19:37:16 <_genuser_> b00bs everywhere. Feb 10 19:37:34 _genuser_: I was asking people in here the other day but they didn't remember -- do you remember the "You are an idiot!" popup thing? Feb 10 19:37:35 <_genuser_> my brother finally admits, he click on porn links in his email. Feb 10 19:37:43 Where you went to a site and hundreds of those popped up. Feb 10 19:37:45 <_hc> groxx: yeah, but the alternatives were even less pretty Feb 10 19:37:46 <_genuser_> TacticalJoke: lol, I don't remember that one. Feb 10 19:37:51 Ah. haha Feb 10 19:37:54 punch the monkey! Feb 10 19:37:57 It was hilarious. Feb 10 19:38:00 _hc: I totally believe it Feb 10 19:38:08 It was back in the days of IE and Netscape. Feb 10 19:38:20 <_genuser_> TacticalJoke: what was hilarious was imagining my parents going on teh computer and finding naked chicks _EVERYWHERE_ Feb 10 19:38:29 <_genuser_> oh netscape, that was old indeed. Feb 10 19:38:31 lol Feb 10 19:38:36 People put up with so much on computers. Feb 10 19:38:41 27 IE toolbars. Feb 10 19:38:46 <_genuser_> TacticalJoke: if my brother hadn't fessed up, I was going to ask my dad. but I couldn't imagine he'd do it. Feb 10 19:38:48 "Well, it seems to work." Feb 10 19:39:21 <_genuser_> TacticalJoke: I spent four hours cleaning the computer. then got paranoid. and decided to re-format. if you access your bank on that computer why risk it. Feb 10 19:39:43 Yeah. It's also nice to start over with Windows sometimes. Feb 10 19:39:47 Regardless. Feb 10 19:40:06 <_genuser_> I put their computer on ubuntu for a while. then on fedora. they hated it. Feb 10 19:40:21 <_genuser_> it was much slower than XP on the same hardware. Feb 10 19:40:32 I remember trying to get my family to switch to Mandrake. My god, the resistance. Feb 10 19:41:01 <_genuser_> TacticalJoke: well, I used to use a volume license from work for XP. then I said, let's not "pirate". so I'm sorry I have no XP for you. Feb 10 19:41:03 Though Mandrake was awful, so it's understandable. Feb 10 19:41:09 <_genuser_> so was fedora Feb 10 19:41:18 Im out for a bit guys Feb 10 19:41:24 Thanks for checking out my issue Feb 10 19:41:46 <_genuser_> TacticalJoke: I finally found a vista computer during one of the sales and they were so happy to get rid of the linux machine. Feb 10 19:42:11 I have a problem using the intelij-idea for android development Feb 10 19:42:19 I have a n external library Feb 10 19:42:22 I can understand that. Linux on the desktop used to be terrible. Feb 10 19:42:35 I haven't used it seriously in years, but I'm guessing things are nicer now. Feb 10 19:42:50 I can use the functions and classes according to the autocompletion etc. Feb 10 19:43:09 <_genuser_> TacticalJoke: it's a matter of habit, I suppose. work you use windows. every other computer you use windows. you get home, try to surf the web and where the heck is the start button? Feb 10 19:43:14 But I get compile errors saying those classes could not be found Feb 10 19:43:40 Error:(11, 44) java: package com.flaghacker.periodicLib.compounds does not exist Feb 10 19:43:50 Does anyone have any ideA? Feb 10 19:44:09 <_genuser_> Flaghacker: I'm not using AS, so not specific ideas. but it soudns like yoru lib might not be in your build path. Feb 10 19:44:31 TacticalJoke, things are nice now, except gpu drivers generally Feb 10 19:44:34 _genuser_, where can I configure that? Feb 10 19:44:41 and notebooks are in a bad state, but desktops are mostly good Feb 10 19:45:24 <_genuser_> Flaghacker: http://stackoverflow.com/questions/16779959/android-studio-importing-external-library-jar Feb 10 19:45:55 <_genuser_> Flaghacker: this might be more helpful: https://www.youtube.com/watch?v=fHEvI_G6UtI Feb 10 19:45:59 damn work WiFi won't let me irc, and data coverage sucks lol Feb 10 19:46:10 try irccloud Feb 10 19:46:22 or kiwiirc :) Feb 10 19:46:52 or weechat Feb 10 19:47:48 _genuser_, I'm looking into it, thanks Feb 10 19:48:12 gah, i wish theme / styles could have multiple parents Feb 10 19:49:13 This is annoying. I switch to AppCompat and now my ActionBar's spinner no longer remembers its drop-down scroll position (when the user opens it again). Feb 10 19:49:23 I know that's all deprecated, but why can't stuff just work. :/ Feb 10 19:49:35 because it's deprecated Feb 10 19:49:40 Anyone know if android studio cleanly updates non-gradle projects if you import a newer version over top of an old one? Feb 10 19:50:11 or if I should just stick with eclipse when dealing with a pipeline that already exports non-gradle projects? Feb 10 19:50:15 It worked before though. Feb 10 19:51:50 TacticalJoke, yep, if somethings deprecated it may or may not work Feb 10 19:51:55 you got the may not case this time Feb 10 19:52:16 _genuser_, my library is not actually a jar file Feb 10 19:52:54 i added it as alibrary from existing source Feb 10 19:53:15 Hey, evryone. One stupid question, i know a bit of Java, started learning it about a month ago, but i don't know it that much yet to be able to build an app with ease. So, is there any "basic template" or code of any app that i can take a look at. I only need a thumbnail list and two buttons, but it's kinda a mess to make a UI in AS. Feb 10 19:53:23 and it shows up in the bottom left under "external libraries" Feb 10 19:53:55 Nightwalkerkg, When you create a new project, select "blanc activity" Feb 10 19:54:01 The thing is, Toolbar isn't a clear upgrade. As far as I can see, we have to say android:background="?android:attr/colorPrimary" just to get the right colour (even with setSupportActionBar). Stuff like this gets tedious. Feb 10 19:54:05 It will create a "templat" for you Feb 10 19:54:10 So many ways to go wrong. Feb 10 19:54:33 _genuser_, any idea how I can fix that? Feb 10 19:54:33 <_genuser_> Flaghacker: hmmm, sorry I don't actually use intellij/android-studio (still on eclipse). So that was the best I could do. I wouldn't know how else to fix it. Feb 10 19:54:41 I wonder if non-game apps are allowed to use Play game services? Feb 10 19:54:45 _genuser_, ok, thanks Feb 10 19:54:59 You wouldn't use android:colorPrimary with the support Toolbar, you'd just use colorPrimary Feb 10 19:55:02 Actually, I guess we have to drop the 'android:' there. Feb 10 19:55:13 Yeah. Feb 10 19:55:15 <_genuser_> Flaghacker: is it more like an external project? instead of a jar file? Feb 10 19:55:34 _genuser_, yes, it's another idea project Feb 10 19:55:43 well, irccloud works :) Feb 10 19:55:55 I really love AndroIRC, but this will be fine Feb 10 19:56:01 <_genuser_> Flaghacker: here one link I see "might" help. http://stackoverflow.com/questions/17479076/android-studio-add-external-project-to-build-gradle Feb 10 19:56:05 Moter8, yes they are. Feb 10 19:56:28 Flaghacker, what are you trying to figure out? Feb 10 19:56:49 drinfernoo, I ahve an external idea project added to a android idea project Feb 10 19:56:55 as an external library Feb 10 19:57:02 but it doesn't build correctly Feb 10 19:57:20 Hmm, in a way, I feel they shouldn't have added ActionBarActivity.setSupportActionBar(Toolbar). It might've been better to make every upgrader use the new Toolbar API. Feb 10 19:57:39 Flaghacker, your own project? Feb 10 19:57:45 yes Feb 10 19:58:06 is there any way to reference a theme in code, and apply / overlay that to the current theme ? Feb 10 19:58:21 does it contain resources? Feb 10 19:58:36 without using a ContextThemeWrapper, it has to update the current context theme Feb 10 19:59:27 g00s: trying to build a mixin system for styles? Feb 10 19:59:47 groxx kinda, yeah. i have a bunch of styles i want to use for floating windows Feb 10 20:00:05 drinfernoo, yes. (not sure if you read my previous post) Feb 10 20:00:12 but i have light and dark themes already, and things are crazy Feb 10 20:00:23 TacticalJoke, are you using fragments? Feb 10 20:00:26 Nah. Feb 10 20:00:38 Flaghacker, it popped up before I was in here Feb 10 20:00:59 TacticalJoke: views like good old square? Feb 10 20:01:23 I might end up using Fragments; not sure yet. Feb 10 20:01:35 so what? all activities? Feb 10 20:01:38 So far. Feb 10 20:01:44 oh dang Feb 10 20:02:05 g00s: I can really only think of fairly complex ways, changing how styles are loaded, etc. but this is not my area of expertise by any means. Feb 10 20:02:09 All of the classes are really short, so I could easily introduce fragments/views/whatever. Feb 10 20:02:25 g00s: I'll definitely be curious about anything you get working though :) Feb 10 20:02:28 groxx yeah; the style / theme system is complicated. i dont like x.x Feb 10 20:02:45 I'm not sure what to do about tablets. Every reddit app I've used on my tablet just feels pointless to use on a tablet. Feb 10 20:02:53 is anyone actually doing this? http://corner.squareup.com/2014/10/advocating-against-android-fragments.html Feb 10 20:03:07 g00s: I keep thinking that a css-like style structure would be nicer. Feb 10 20:03:46 I wonder how many people use their tablets to read reddit. Feb 10 20:05:13 drinfernoo, any idea? Feb 10 20:05:57 android OS = Phone OS, hue Feb 10 20:08:52 Flaghacker, you could package it in an aar, and include it via maven Feb 10 20:11:08 <_genuser_> TacticalJoke: I don't even use my desktop to read reddit. Feb 10 20:13:11 drinfernoo, huh? what is an aar & how can I use maven? Feb 10 20:13:11 i/o 2015 May 28, 29 Feb 10 20:13:41 was it only 2 days last year also ? Feb 10 20:13:48 an aar is a different packaging, and is basically standard now for libraries with resources Feb 10 20:15:14 drinfernoo, I'm working on my library project, so I would be kind of annoying to rebuild it every chage Feb 10 20:15:36 I would like to let the android project build my library project automaticall Feb 10 20:15:36 indeed Feb 10 20:15:39 just an idea Feb 10 20:16:05 if you make it a module in your application it will get automatically built (assuming AS/gradle) Feb 10 20:16:18 and what is a module? Feb 10 20:16:21 does anyone know how to load a own view class into a fragment the content view? Feb 10 20:16:28 i don't really understand that term... Feb 10 20:16:37 Flaghacker: http://stackoverflow.com/questions/16601299/how-to-create-a-library-project-in-android-studio-and-an-application-project-tha Feb 10 20:17:21 ProgressDialog says you can set a custom view or a message, but setView does not seem to do anything Feb 10 20:17:54 dragorn, that solution requires my library to be an android library, but I also use that library in other application Feb 10 20:18:12 well, life is difficult for you then, sorry Feb 10 20:18:17 but i'll try the second answer Feb 10 20:18:24 Flaghacker, what do you mean? Feb 10 20:18:36 if its a java library, it should work Feb 10 20:19:13 drinfernoo, the link dragorn posted requires the library to be an android lubrary Feb 10 20:19:42 the second answer looks like it should work Feb 10 20:20:02 Hello : Feb 10 20:20:03 :) Feb 10 20:20:13 o/ Feb 10 20:21:04 I need some tips on how to make a divider with some text on it ? Feb 10 20:21:15 I'm not sure I'm using LayoutInflator correctly and I can't quite make sense of the documentation Feb 10 20:22:13 I want to add a TableRow at the bottom of a TableLayout, and the code runs fine. But I dont see anything there when I run the app Feb 10 20:22:16 drinfernoo, my second project isn't a gradle project thought Feb 10 20:22:23 (my lib project) Feb 10 20:22:52 Sorry to bother you guys, I'm trying to create an app for a magic trick. It needs to look and feel like the aosp pin keyguard but do stuff in the background Feb 10 20:23:10 I've tried getting the source from https://github.com/android/platform_frameworks_base/tree/master/packages/Keyguard and "importing" them in an android studio project Feb 10 20:23:21 but I get loads of dependency errors. Feb 10 20:23:31 Any chance someone could give me pointers on how to do this ? Feb 10 20:24:24 this is cool: https://github.com/JakeWharton/u2020 Feb 10 20:24:27 wrong Feb 10 20:24:34 drinfernoo, so how would that work? Feb 10 20:25:09 well that too, but this: https://www.jitpack.io Feb 10 20:25:17 Flaghacker, it should just... work Feb 10 20:25:24 Bennd: your dependency errors are almost certainly all in the actual pinlock code, not the UI, so you should be able to separate that out Feb 10 20:25:34 is this adding a new TableRow at the end of a TableLayout? http://pastebin.com/uvN1W9Ja Feb 10 20:26:08 Nightwalkerkg, like in a list? Feb 10 20:26:17 drinfernoo: Yes. Feb 10 20:26:33 probably have to be a custom adapter Feb 10 20:26:35 Like the one in the Gmail that says Today. Feb 10 20:26:47 drinfernoo, I actually see some maven files in my android project, I'm afraid my app doesnt' even use gradle... Feb 10 20:28:15 dragorn: when I load the keyguard_pin_view.xm into my project, there are errors right there just with things like Feb 10 20:29:14 I'm entirely new to android dev, I guess I have to look deeper into it if this seems trivial to you :) Feb 10 20:29:49 I've started learning with the bitfountain.io video course which seems good :) Feb 10 20:32:25 2015 google io announced https://events.google.com/io2015/ Feb 10 20:32:46 hopefully the keynote is under 12 hours this time Feb 10 20:33:58 I sure hope they aren't going to announce this as a new system font: http://cl.ly/image/3y2g2f050t1G Feb 10 20:36:58 lol Feb 10 20:39:07 I wonder whether the problem of Java 7 will be addressed. Feb 10 20:39:22 "We have decided to move towards the Scala ecosystem." (Kidding.) Feb 10 20:40:19 On a side note, it's nice that that page doesn't have an enormous bar at the top. Feb 10 20:40:47 "Now that the CLR is open source, we're fully migrating towards VBScript + ASP.NET as your app framework" Feb 10 20:40:56 :D Feb 10 20:41:11 TacticalJoke: It is being addressed with Jack and Jill Feb 10 20:41:13 starting with .net 1.0 of course Feb 10 20:41:14 Have you checked out Kotlin yet, groxx? I forgot whether I asked you (because my brain isn't working right now). Feb 10 20:41:24 Typesafe doesn't seem to give a crap about Android, so I doubt it Feb 10 20:41:27 heh Feb 10 20:41:31 TacticalJoke: looked at, have not used, unlikely to do so. Feb 10 20:41:43 yiati: That could still mean Java 7 though, right? Feb 10 20:41:51 certainly looks nice, but I'll stay in java-land Feb 10 20:41:57 android studio radio group won't let me resize, wants to fill to bottom of screen Feb 10 20:42:02 whats the deal? Feb 10 20:42:21 another group on the same screen is resized Feb 10 20:42:37 ease_: Are you talking about Android Studio or Android? Feb 10 20:42:45 android studio Feb 10 20:42:53 TacticalJoke i think they will probably reiterate a lot of Material Feb 10 20:43:04 I did something wrong here with LayoutInflator, but I cant figure out what. http://pastebin.com/9Kem3027 Feb 10 20:43:28 im using the design tab trying to layout a radio group but it is not behaving Feb 10 20:44:16 newbQ: for starters, use .inflate(R.etc, table). if you use 'null' as the parent, you're destroying all your layout_ params, which are probably used by the table layout Feb 10 20:44:54 I must say that my app looks way nicer with AppCompat's theme. Feb 10 20:44:57 It's night and day. Feb 10 20:45:21 Though I'm sure I just introduced 28 bugs. Feb 10 20:45:37 groxx: like this? http://pastebin.com/G5cJgJHv This doesnt seem to work either Feb 10 20:45:45 might be missing an order of magnitude or two Feb 10 20:46:18 newbQ: if you remove the 'false' param (or change it to true) it'll automatically add it for you, which is what you're doing on the next line Feb 10 20:46:50 TacticalJoke: Yes it still doesn't currently limit to Java 7 features, but it would make supporting the move the Java 8 simpler Feb 10 20:47:11 I think JW said that insiders said that Google has no plans to switch to Java 8 any time soon. Feb 10 20:47:27 And, even if they do, it'll probably be restricted to the latest release (since it's VM changes). Feb 10 20:47:35 maybe they're just learning from Apple in that respect? mislead -> surprise -> ??? -> profit Feb 10 20:48:46 2015 google io? could be you! Feb 10 20:49:23 groxx: on the corrected line that adds the table row, I now get a class cast exception? Feb 10 20:50:25 what i dont understand about google, is why they can't be more transparent about roadmap, and things like new java features coming when etc Feb 10 20:50:32 even the support library is a secret, its fucking retarded Feb 10 20:50:40 who gives a shit about the support library Feb 10 20:50:43 I get the impression that even they don't have a clue. Feb 10 20:51:30 newbQ: looks like it returns the table layout if you inflate + attach: http://developer.android.com/reference/android/view/LayoutInflater.html#inflate%28int,%20android.view.ViewGroup,%20boolean%29 Feb 10 20:51:44 I was truly amazed, while watching their Git activity, to see that several people were aware of the new unit-test feature. Feb 10 20:51:48 its possible, in many ways i think they backed themselves into a corner, like app security permissions, etc Feb 10 20:51:54 I totally expected it to be one or two guys doing stuff and the rest not having a clue what they're doing. Feb 10 20:52:06 and without solving the meta problem of quicker updates, it all goes to hell Feb 10 20:52:32 groxx: so instead of setting the inflate equal to something, just call it? Feb 10 20:52:46 google IO is back down to 2 days this year? heh Feb 10 20:53:05 next year, maybe 1 day :) Feb 10 20:54:28 just do the device give-away and call it a day. that's all anyone actually cares about, right? :) Feb 10 20:54:41 newbQ: yeah. unless you need to configure the view before adding. I'm reading up on tablelayout in general though, trying to figure out what it should be doing in this case. Feb 10 20:55:08 newbQ: is it possible the view could be pushed outside the window? or maybe that it's just visually empty - try setting a background color? Feb 10 20:56:07 groxx: that still gives me a class cast exception. maybe if I inflate another tableLayout to the existing TableLayout, it will just append the new row? Feb 10 20:56:32 no, just don't cast it to tablerow - a tablelayout is being returned. Feb 10 20:56:41 well crap. even that doesnt work Feb 10 20:57:28 Hello everyone Feb 10 20:57:38 I have a general question and would appreciate some help Feb 10 20:57:39 you're getting a class cast exception? Just run it in a debugger to see the actual class you're getting. Or print object.getClass().getName() to logcat or something Feb 10 20:57:44 or a point in the rigth direction Feb 10 20:58:22 I would like to recreate this type of functionality Feb 10 20:58:24 http://turbulence.org/Works/swipe/state_analysis.html Feb 10 20:58:39 a clickable image or map, with custom events based on where the user touches Feb 10 20:58:44 groxx:Maybe I'm not understanding my own problem. I have the XML for a new TableRow in another XML file. and I'm trying to append that TableRow to an existing TableLayout Feb 10 20:58:50 but uniform across a multitude of devices Feb 10 20:58:59 what would be the easiest way to go about something like this? Feb 10 20:59:15 newbQ: I don't know if this would actually change the behavior, but fwiw the sample code for tablelayout includes this: `table.addView(row, new TableLayout.LayoutParams());` Feb 10 20:59:23 ┐(´~`;)┌ Feb 10 20:59:53 newbQ: it seems strange, since it seems like that should be handled by .inflate(R.etc, parent), but a mantas322 said: ┐(´~`;)┌ Feb 10 21:00:08 or maybe ¯\_(ツ)_/¯ is closer Feb 10 21:01:24 groxx: thanks. I'll have to do more reading about that. being new to android dev involves a lot of reading Feb 10 21:01:26 At the moment Im not even sure how to describe what im talking about here. Feb 10 21:01:39 "Custom canvas with regions for clickable events." Feb 10 21:01:51 mantas322: if it's actually something like that, with non-rectangular regions, you'll probably end up doing your own touch handling Feb 10 21:02:04 right, okay okay.. Feb 10 21:02:07 sooo Feb 10 21:02:17 mantas322: though I feel like I've read that they added touch regions to something in lollipop. possibly SVG. Feb 10 21:02:21 whats the best way to go about touch handling apart from taking x y coordinates? Feb 10 21:02:41 since x y coordinates will differ from device to device Feb 10 21:03:34 depends on how you display things. assuming it's always stretched to fill the screen: x,y * scale factor = "mapped" coordinate onto your image. Feb 10 21:03:53 I have no problem with defining custom touch events based on x y coordinates. But how would I get the entire touchable view to be static on a tablet vs phone Feb 10 21:04:05 you'll have to define "static" Feb 10 21:04:12 "x,y * scale factor = "mapped" coordinate onto your image." okay okay Feb 10 21:04:14 this helps Feb 10 21:04:15 thanks Feb 10 21:04:30 public static int static = "blah"; Feb 10 21:04:32 helps me think about it. Feb 10 21:04:35 = 1234; Feb 10 21:04:45 * JesusFreke defines static Feb 10 21:05:01 JesusFreke: that one took me a few moments... xD Feb 10 21:05:03 wouldn't actually compile, of course :) Feb 10 21:05:08 I can't be the only one whose ever wanted to do this, w/o making, as i was told earlier a "Game Engine" Feb 10 21:05:55 probably not, but it may be more rare than you're expecting. Feb 10 21:06:10 rectangular tap regions cover an enormous amount of uses, and they're a lot simpler to deal with Feb 10 21:07:32 okay forget custom shapes and whatnot Feb 10 21:07:58 best way to have uniform "rectangular tap regions" over an image Feb 10 21:08:07 * mantas322 googles that Feb 10 21:09:04 anyone use ipv6 here? Feb 10 21:09:24 mantas322: like a grid? make a GestureDetector, override onDown and onSingleTapUp(e), and use e.getX() and e.getY() to get the tap location Feb 10 21:09:41 I found this stackoverflow response http://stackoverflow.com/questions/6038867/android-how-to-detect-touch-location-on-imageview-if-the-image-view-is-scaled-b Feb 10 21:09:48 seems to be related to what your suggesting Feb 10 21:10:18 yeah, matrices are essentially the right way to go about it, as long as you're able to use an imageview Feb 10 21:10:26 I am Feb 10 21:10:29 probably Feb 10 21:10:32 this was helpful Feb 10 21:10:43 the matrix defines the transformation from [your image] -> [your display]. when you invert it, you get the opposite direction. Feb 10 21:10:47 aslong as i can figure out the same location that was touched on an image on a phone vs tablet Feb 10 21:10:49 I should be good Feb 10 21:11:09 groxx: huh. it's still telling me that " TableRow row = (TableRow) findViewById(R.id.newWeek);" is trying to cast a TableLayout to a TableRow. Even though newWeek is a TableRow Feb 10 21:11:11 I appreciate your help groxx Feb 10 21:11:39 mantas322: also try what I mentioned earlier - a simplegesturedetector with onSingleTapUp will give you the location tapped, where an onClick listener does not. Feb 10 21:11:52 okay Feb 10 21:11:53 I will Feb 10 21:12:13 I'm saving all your suggestions into a text file titles groxx_suggestsThings.txt Feb 10 21:12:26 lol Feb 10 21:13:16 newbQ: are you sure it's that line? the previous "row = (TableRow) inflater.inflate(R.layout.row, table)" line would've thrown that exception. Feb 10 21:13:25 Anybody know some good android dev youtube channel? Feb 10 21:13:49 Moter8: https://www.google.com/events/io/io14videos Feb 10 21:14:25 groxx: yeah, it's that line. here's the full function http://pastebin.com/HcKgZDrY Feb 10 21:14:28 unless you're wondering for "how do I start" videos :) then I dunno. developer.android.com probably. Feb 10 21:15:12 newbQ: dunno. I'd trust the exception though, for some reason there's a tablelayout there. Feb 10 21:15:41 groxx: do you want to see the XML I'm trying to insert? Feb 10 21:16:09 newbQ: I can skim it, but I've gotta focus on work a bit more :\ not sure I can give much detailed feedback Feb 10 21:16:52 groxx: forget it then. thanks for all the help you've given me so far Feb 10 21:21:41 newbQ: You might as well post; someone might have an answer. Feb 10 21:22:20 hey, does anyone know how I can find which dependencies are defining a certain class? I'm getting "Multiple dex files define AdActivity" when I added Play Services, but no usual suspects that could be declaring it somewhere else Feb 10 21:22:26 I love really simple bugs. Blantant "Duh, that's a NullPointerException" ones. Feb 10 21:22:42 thanks again groxx, bye everyone I'll be back. Feb 10 21:22:59 TacticalJoke: I tried closing and reopening AS, and now its giving me a different error on a different line :/ Feb 10 21:23:27 I would try Build > Rebuid Project, personally. Feb 10 21:24:41 this is what I'm getting now: http://pastebin.com/jrNi53TR Feb 10 21:25:12 maybe the problem is in the extra XML file I'm trying to pull R.id.newWeek from? Feb 10 21:26:10 hi guys. how do you all deal with google play services compatibility? Feb 10 21:26:32 in my limited experience, it seems using older gps at build time gives me back compatibility Feb 10 21:26:50 give me best* compatibility Feb 10 21:26:51 It would be interesting to see this layout file. Feb 10 21:27:21 But I guess 'row' is simply null. Feb 10 21:27:25 for example, if i use the latest gps, i can't gather gida on devices that have an older gps Feb 10 21:28:55 TacticalJoke: this is the xml I'm trying inject http://pastebin.com/Zm9y0PwG Feb 10 21:30:11 In the first paste, you're trying to get R.id.tableLayoutWeeks (not in the second paste) and R.id.newWeek (in the second paste) from the same layout file. Feb 10 21:30:37 For a start, can I ask why you're using a TableLayout and not something simple such as a ListView? Feb 10 21:30:47 Well, simple-ish. Feb 10 21:32:56 Amun-Ra: I've been wondering about the details there too. afaik the "official" recommendation is to check for errors when you check if google play is available, and show a notification based on the error code (which could include the "plz update gms, app needs it" notification you've probably seen) Feb 10 21:33:16 but I suspect that's best for google (pushes more users to update gms) and not for anyone else Feb 10 21:34:43 groxx, yeah sounds like it Feb 10 21:35:02 i just wonder is using old gps is going to bite me Feb 10 21:35:23 for that, I've gotta go with ¯\_(ツ)_/¯ Feb 10 21:35:44 i wonder if kotlin m11 is coming out soon Feb 10 21:35:55 newbQ: IMO, you should post all relevant layout files complete with their file names. Feb 10 21:36:18 And all code that touches any relevant layout file. Feb 10 21:36:45 Amun-Ra, there are multiple possible "errors" when checking gps. User recoverable: "please update gps version", and non recoverable "you are fucked". If you get the latter one, you can deal with that the same way you would deal with no gps available Feb 10 21:37:26 for the first one you can just open this update gps dialog thing that the framework gives you Feb 10 21:37:44 TacticalJoke: they are from separate layout files. tableLayoutWeeks is in activity.xml and newWeek is in extra_row.xml. I'm using a tableLayout because I'm displaying a table of data, and I'm new to android and I thought this would be the easier way to code it. Feb 10 21:37:49 g00s, anything important in m11? Feb 10 21:37:56 danijoo, but why do that and possibly lose a user? Feb 10 21:38:13 is there a reason to do that? instead of using an older gps? Feb 10 21:38:13 Is the number of rows of this table determined at run time? Feb 10 21:38:22 Amun-Ra, well. Its up to you what you do. You could also go on and disable features that need gps Feb 10 21:38:23 any who uses facebook sdk for android? Feb 10 21:38:24 danijoo hm, my mistake i thought Ms came out every 2 months. but not necessarily Feb 10 21:38:41 Oh, I guess it's a calendar-type thing. Feb 10 21:38:48 TacticalJoke: yes. and changes whenever the user hits a button Feb 10 21:39:06 After I logout, I can't login again before loging in to facebook and removing my app from the app list Feb 10 21:39:20 Well, if you post every relevant layout file and every Java file that touches every relevant layout file I'll take a look. Feb 10 21:39:21 And even, following the samples gives me the same scenario Feb 10 21:39:29 I suspect there's something simple going bad. Feb 10 21:40:07 why am I unable to set the text color of a Spinner? Feb 10 21:40:16 If I'm trying to grab an id of an xml element from a different XML file, do I need to add a step to have it look in that file? Feb 10 21:40:26 added info: started switching to the AppCompat theme Feb 10 21:40:42 Yeah. You couldn't just call Activity.findViewById again. Feb 10 21:40:47 That'd search in the Activity's layout file. Feb 10 21:40:53 made primaryColor white (because that's what the action bar uses by default, apparently) Feb 10 21:40:55 Hence your null thing. Feb 10 21:41:17 and now editTexts and Spinners all use primaryColor and I can't seem to override it anywhere Feb 10 21:41:31 Activity.setContentView and Activity.findViewById are very much like LayoutInflater.inflate and View.findViewById. Feb 10 21:41:46 I have created custom animated transitions for activities. So far what I have read says call overridePendingTransition after calling startActivity(…) and finish(). But I was wondering if it is okay to call that inside ActivityLifecycleCallbacks#onActivityCreated and ActivityLifecycleCallbacks#onActivityPaused? Feb 10 21:41:49 TacticalJoke: so how do I tell it which file to look in for the id? Feb 10 21:42:00 You'd have to use LayoutInflater.inflate. Feb 10 21:42:01 i am strictly talking about apps with API level >=14 Feb 10 21:42:43 I do wonder whether ListView would be more natural here (though I'm not sure, without the details). Feb 10 21:43:51 TacticalJoke: I was trying to use LayoutInflator earlier but couldnt get that to work either Feb 10 21:44:02 newbQ: Hence my asking you to post all the things. :D Feb 10 21:45:21 When i add requestWindowFeature(Window.FEATURE_NO_TITLE); and getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); to my app it's starts crashing. Feb 10 21:45:32 Any ideas ? Feb 10 21:46:49 TacticalJoke: http://pastebin.com/4nsmPdEd http://pastebin.com/AMExcAM4 http://pastebin.com/VtWV6Gp2 Feb 10 21:47:02 i think thats all the relevant info Feb 10 21:49:26 What was the problem when you were using LayoutInflater.inflate? Was it that you just didn't see the new rows? Feb 10 21:49:55 yes. and it was telling me that I was trying to cast a tableLayout as a tableRow Feb 10 21:51:47 Well, for a start, the current code is just wrong. You need to use LayoutInflater.inflate. Feb 10 21:52:20 You're trying to find R.id.newWeek (which is in extra_row.xml) in activity.xml. Feb 10 21:53:21 I dont know how to tell it to look in another file for that id Feb 10 21:56:08 I think this should work in your case: LayoutInflater.from(this).inflate(R.layout.extra_row.xml, table); Feb 10 21:56:20 With no manual addding. Feb 10 21:56:20 adding* Feb 10 21:57:15 cant resolve the .xml bit? Feb 10 21:57:41 Oops. My brain is half-asleep. The ".xml" shouldn't be added. Feb 10 22:00:29 TacticalJoke: it displays it now. but is still giving me a NUll Pointer Exception for the line you just told me to add Feb 10 22:00:57 You need to add that line after 'table' has been assigned. Feb 10 22:01:03 what does a spinner even look like with the material theme? Feb 10 22:01:09 I did Feb 10 22:02:10 nevermind. Had to restart AS, now its not giving any errors Feb 10 22:03:05 thanks a bunch for the help TacticalJoke Feb 10 22:03:47 No worries. Feb 10 22:03:50 <_genuser_> geez 4pm. already wasted the productive part of day at work. Feb 10 22:03:58 The other question is of whether you should use ListView or not (it's hard to say). Feb 10 22:04:01 _genuser_: that's the _start_ of mine Feb 10 22:04:04 <_genuser_> at least worked on drawing a bit Feb 10 22:04:25 <_genuser_> groxx: of your work day or productive day where you get your own work done? Feb 10 22:04:48 when the productive part of my day begins Feb 10 22:04:54 TacticalJoke: I think I'm gonna change it to only display one week at a time, to avoid the mess of code I have right now to make it work Feb 10 22:05:19 I know what you mean. Simplicity FTW. :) Feb 10 22:05:36 heh, this is pretty good http://blog.danlew.net/2014/11/19/styles-on-android/ Feb 10 22:05:39 The code might be simpler with ListView, FWIW (especially since then stuff would be in separate files). Feb 10 22:05:40 "I have not yet convinced myself that there is a way to work with themes without going crazy." Feb 10 22:06:05 <_genuser_> groxx: I suppose that's when I get to be productive too. especially late night if I stay up all nights. but sometimes I enjoy finishing more work during the day when work work is slow. Feb 10 22:06:28 And I still can't figure out how to get the time picker thats just the numbers Feb 10 22:06:30 g00s: definitely going on my reading list, thanks Feb 10 22:06:44 heh Feb 10 22:06:53 why do all these common sense things need pointing out... Feb 10 22:07:03 it's like the same thing with css all over again... Feb 10 22:09:21 It's funny how sorting reddit comments by 'controversial' is about the only way to consistently read honest replies. Feb 10 22:17:08 pfn can you think of any way , before setContentView() , to overlay one theme onto another? I have dark / light themes, but in some cases want the Activity to be floating. if it should be floating, i want something like a 'theme overlay' of floating onto whatever the base is, light or dark Feb 10 22:17:40 maybe i can use ContextThemeWrapper, but since these attrs are for the window i'm not so sure Feb 10 22:22:00 is there a good way to call dialog boxes from fragments Feb 10 22:28:24 or is it better to just use fragment manager and push the necessary data? Feb 10 22:43:56 its amazing, googling for android stuff now, how much utter crap comes up. how many millions of bloggers wanting traffic to their shitty site copied and pasted any basic thing Feb 10 22:44:29 yeah Feb 10 22:44:42 * JesusFreke blogs "its amazing, googling for android stuff now, how much utter crap comes up. how many millions of bloggers wanting traffic to their shitty site copied and pasted any basic thing" Feb 10 22:45:12 JesusFreke i'll tweet your blog Feb 10 22:46:39 just trying to figure out what exactly Resource.Theme.applyStyle() is useful for Feb 10 22:46:46 lol, some doc are on their blog which points to stackoverflow... (last link i pasted here) Feb 10 22:46:59 and there are ... typos! Feb 10 22:47:22 (typo in code) Feb 10 22:52:03 to illustrate with another link though this one does not redirect to stackoverflow: http://android-developers.blogspot.be/2014/10/appcompat-v21-material-design-for-pre.html ” != " Feb 10 22:56:32 g00s, can't overlay, just use a contextthemewrapper Feb 10 22:57:32 i thought ContextThemeWrapper got me part of the way there ... if i was going to inflate stuff then i could use that and pass to the layoutInflater ... but this is for the Activity's theme Feb 10 22:57:52 basically i need to setTheme( this + that) Feb 10 22:58:41 i could just do this in xml but without multiple inheritance its leading to a combinatorial explosion of repeated stuff Feb 10 22:58:55 light + dark themes = pita Feb 10 23:00:58 TacticalJoke you there? Feb 10 23:06:59 drose379: Yeah. Feb 10 23:07:25 Got a fix for what I showed you earlier, want to see another recording? Feb 10 23:07:30 Or are you busy ATM? Feb 10 23:07:31 Sure. Feb 10 23:07:45 Ok, gimme a few mins again Feb 10 23:07:53 No narration this time :( Feb 10 23:08:28 hmm http://www.fiercedeveloper.com/story/why-all-developers-should-think-about-obeying-marissa-mayers-two-tap-rule-a/2015-02-10 Feb 10 23:09:26 it's cute when people codify things that should be obvious Feb 10 23:10:47 Seems like a good thing to aim for. Feb 10 23:11:08 well, if you need a rule to tell you that, then your UI probably has other larger problems Feb 10 23:11:44 I would have called it "as few taps" Feb 10 23:12:15 why not zero taps? Feb 10 23:13:17 I do like the design of yahoo's mobile apps though Feb 10 23:13:44 Levite, at least "Hello world" works with the 0 taps rule :pp Feb 10 23:13:45 their web content is just kind of crappy Feb 10 23:13:56 and sometimes it shows bad, like in the sports app Feb 10 23:15:37 I wonder whether they'll have mind-reading apps in the future. Feb 10 23:15:48 Just think of which site you want to go to. Could be dangerous. Feb 10 23:15:54 woo, a nexus 6 arrived at work Feb 10 23:15:57 and its huge Feb 10 23:16:03 TacticalJoke, porn Feb 10 23:16:12 thats why it would not work :D Feb 10 23:16:13 so you can figure out what the hell you're thinking? Feb 10 23:18:17 I like the N6, the only shoddy area are the power/volume buttons Feb 10 23:18:45 well, and the headphone port on the top, which seems like an odd choice Feb 10 23:20:25 TacticalJoke you ready for the demo? Feb 10 23:21:13 Yeah. Feb 10 23:21:16 https://vid.me/FkaO Feb 10 23:22:03 Ah, that's much better. Feb 10 23:22:25 Why must they be limited to three, though? Just wondering. Feb 10 23:22:26 You like? I want to make the New Objective button fade out instead of just leave Feb 10 23:22:31 nice. "new objective" should be "add objective" Feb 10 23:22:41 but that's just me nitpicking Feb 10 23:23:01 Not a bad idea Levite Feb 10 23:23:03 because buttons are verbs Feb 10 23:23:03 Yeah, it's looking good. Feb 10 23:23:11 TacticalJoke I could do 4 or 5 or 6 Feb 10 23:23:20 But I just have to keep count of how many I have Feb 10 23:23:27 Why? Feb 10 23:23:36 Becuase I need to be able to access the EditText's later so I can get the data entered into them Feb 10 23:24:15 it's kind of a nonstandard way of adding items but it seems to work Feb 10 23:24:15 I guess a ListView would solve that problem, but I'm recommending ListViews all day and nobody is buying them. :D Feb 10 23:25:14 Do you think I should have to items fade in/out Feb 10 23:25:18 It looks nice as is, though. Just giving feedback. Feb 10 23:25:29 Thank you TacticalJoke Feb 10 23:25:44 The EditTexts? Feb 10 23:26:08 No, like the Red Textview (Fade in) and the New Objective button (Fade out) Feb 10 23:26:45 Or is that unneccessary Feb 10 23:27:41 Oh. Yeah, that'd be neat. Feb 10 23:27:51 Though I think the best solution would be to allow an indefinite number of entries. Feb 10 23:28:06 Unless that doesn't make sense for this problem domain. Feb 10 23:28:29 Then I would have to dynamically create EditTexts and keep a count of how many I have and get all the data from all of them Feb 10 23:28:33 It would just get out of hand Feb 10 23:28:45 You're manually creating a ListView. :D Feb 10 23:29:09 Inside of the Dialog? Feb 10 23:29:48 Yeah. Though I guess yours is more visually flexible with its variable height. Feb 10 23:29:56 Yeah Feb 10 23:30:12 Hmm, couldn't you add them to a container and then iterate the container's children? Feb 10 23:30:14 Plus, I am giving the option to add more objectives later Feb 10 23:30:17 Such as a LinearLayout. Feb 10 23:30:26 Yes, they are in a LinearLayout now Feb 10 23:30:36 Does linearlayout have a method that returns its children? Feb 10 23:30:56 You can use ViewGroup.getChildAt, I think. Feb 10 23:31:06 And ViewGroup.getChildCount. Feb 10 23:31:28 hmmm Feb 10 23:31:38 getchildat(int) right? Feb 10 23:31:56 Yeah. Feb 10 23:32:11 So I just need to know how many EditTexts the user creates Feb 10 23:32:13 Then i can loop Feb 10 23:32:29 ViewGroup.getChildCount tells you that. Feb 10 23:32:29 Hmm Feb 10 23:33:25 Yeah, I could make that work TacticalJoke Feb 10 23:33:34 Think I should go for it? Feb 10 23:33:44 As a user, I would be disappointed with the arbitrary limit right now. Feb 10 23:34:03 Ah, always obey the user :D Feb 10 23:34:15 So that settles it, Ill make it unlimited Feb 10 23:34:22 Thanks for the feedback! Feb 10 23:36:16 What is ViewGroup though? Feb 10 23:36:17 I like the user-centric focus right now. The wording is very personal: "my lessons", "my calendar", "name your lesson", etc. Feb 10 23:36:23 LinearLayout is a ViewGroup. Feb 10 23:36:40 Ah ok, a group of views really Feb 10 23:37:09 And thank you, Ill keep going with that wording Feb 10 23:37:11 Check out the "Known Direct Subclasses" here: http://developer.android.com/reference/android/view/ViewGroup.html Feb 10 23:37:26 Also indirect ones. Feb 10 23:38:00 Got it, ok. Feb 10 23:38:08 greetings androiders. i've encountered a frustrating problem that i cant resolve. I'm gathering an image via Intent(MediaStore.ACTION_IMAGE_CAPTURE) ... and i am able to gather the small bmp image it returns. i'm hoping to include that bmp in an email. so, here's my problem. currently, the way i include it in an email is by saving the small image via MediaStore.Images.Media.insertImage(), and that works okay. i pass the returned u Feb 10 23:38:39 seems all well and good, but when i return to my camera gallery i see two images... the original image i initially took, and the small image that i saved in order to email. Feb 10 23:39:08 i've been trying for the past hour or two to find a way to avoid saving the file again but get a valid uriString to the actual (original) image. Feb 10 23:39:58 i'm aware that in onActivityResult i can access a uri via data.getData()... but gmail it seems doesn't like this uri at all. any thoughts? Feb 10 23:40:23 anyone wanna dumb chat in msg w/ a newbie, just about basic stuff Feb 10 23:40:32 I do Feb 10 23:40:39 Also a newbie Feb 10 23:40:50 know anything about securing package names? Feb 10 23:40:56 Nope Feb 10 23:41:06 feel free to msg me but thats my goal :P Feb 10 23:42:02 This should be good (loading resources in the new JVM unit tests): https://code.google.com/p/android/issues/detail?id=136013 Feb 10 23:52:39 i have a sinking feeling that google is going down the wrong road with this jvm unit testing stuff Feb 10 23:53:27 i think they need a better emu or simu instead, i think Jake blogged about that too Feb 10 23:53:38 Hi! If I want to make something like web UI carousel on Android app. What component should I use? Thanks in advance! Feb 10 23:57:59 i'm surprised google haven't forked robolectric Feb 10 23:59:24 bankai_, why should they Feb 11 00:01:34 Carbon_Monoxide, theres not really a dedicated view for that. There are libraries build for that though Feb 11 00:02:05 https://github.com/moondroid/CoverFlow for example Feb 11 00:02:34 One is in no way a replacement for the other, g00s Feb 11 00:09:12 SimonVT would you know by any chance, before Activity.setContentView() i need to setTheme (theme 1 + theme 2). is there any way to overlay one theme ontop of another in that sense ? i have light and dark which are separate, but for some floating windows i need to mix in another set of attributes Feb 11 00:09:51 so basically setTheme(my_Light_theme + floating_theme) Feb 11 00:10:07 or setTheme(my_dark_theme + floating_theme) Feb 11 00:10:45 thanks a lot, danijoo Feb 11 00:10:46 can Resources.Theme.applyStyle() be useful? not sure how to use it Feb 11 00:11:12 as soon as i upload an apk to the console, it secures the com name? Feb 11 00:11:26 so appname.com is secure as long as it was defined in the project? Feb 11 00:12:12 or com.appname anyways Feb 11 00:12:13 not sure ease_, when published i'm sure though. However you probably have to own the domain Feb 11 00:12:49 i've never heard story of someone owing a domain name complaining against someone else who already took it and published an apk without owning the domain Feb 11 00:13:04 im not worried about the domain Feb 11 00:13:06 danijoo: Actually I just want to make something like this: http://getbootstrap.com/examples/carousel/ Feb 11 00:13:09 just the appname.com Feb 11 00:13:12 i mean Feb 11 00:13:22 com.appname that i believe needs to be a unique thing Feb 11 00:13:32 yes, and you should own appname.com Feb 11 00:13:32 i think im good, i just checked the apk details and it had it listed Feb 11 00:14:06 i thought by secure you meant that someone else cannot use the same packagename, maybe i misunderstood Feb 11 00:14:10 Is ImageSwitcher or ViewSwitcher doing so? Feb 11 00:17:35 Carbon_Monoxide, viewswitcher could work, yeah Feb 11 00:17:40 with custom animation on it Feb 11 00:17:41 Thanks Feb 11 00:18:20 or ViewFlipper if you need more than 2 views Feb 11 00:19:52 great thanks! Feb 11 00:25:19 drose379: I'd better sleep. If you need scrolling, use ScrollView. Thanks for the videos. Have fun. Feb 11 00:27:18 danijoo how have your kotlin experiments going? Feb 11 00:36:43 why might getSupportActionBar() return null sometimes? Feb 11 00:36:48 but only rarely? Feb 11 00:37:13 documentation says that it returns null if the activity doesn't have one Feb 11 00:37:23 but the activity clearly does and it works a majority of the time Feb 11 00:37:29 Google is so fricking stupid Feb 11 00:37:51 In L during an incoming call they don't show the accept/reject buttons until you physically drag the phone button Feb 11 00:37:55 <_genuser_> lol https://play.google.com/store/apps/details?id=coconut.island.nk Feb 11 00:38:31 Is there a way to add a title to a cardview such that i dont have to add another viewgroup? Feb 11 00:38:31 <_genuser_> lol, it's realtime strategy Feb 11 00:38:39 ie cardview title someview Feb 11 00:38:50 lasserix no a cardview is a blank slate Feb 11 00:38:53 err Feb 11 00:39:02 is it possible your activity is not using the support action bar, but the regular action bar? Feb 11 00:39:36 no you'll want to add a layout to it Feb 11 00:40:28 <_genuser_> do any of you have a dev account on play store? Feb 11 00:41:20 Google gives them out for a song, so sure Feb 11 00:41:43 they wouldn’t give me one Feb 11 00:41:58 <_genuser_> should be more specific in question. do you go for a "individual" name or a "corporate" name. Feb 11 00:42:12 you can make up whatever you want, they don't verify Feb 11 00:42:15 <_genuser_> I guess during signup I didn't see a category where you would go either way. Feb 11 00:42:26 <_genuser_> Levite: oh they verify. they ask you to send in driver's license copies, etc. Feb 11 00:42:47 I didn't have to Feb 11 00:43:00 <_genuser_> but I suppose, I was thinking in terms of how devs organize their play store presence. Feb 11 00:43:07 neither did I, but I also made my Android dev account somewhere around Android 2.0 Feb 11 00:43:10 I don't see anything about identification on this page http://developer.android.com/distribute/googleplay/start.html Feb 11 00:43:24 you just have to get your tax info straight in Google Wallet Feb 11 00:43:27 <_genuser_> you know Mr. d00d, releasing app#1, app#2, app#3. or just go for "d00d, inc." and release app#1, app#2, app#3 Feb 11 00:43:49 now Apple you see, requires verification and a hefty annual fee Feb 11 00:44:00 <_genuser_> Levite: it's tricky. I think it's a random process. some people don't have to verify, and some do. Feb 11 00:44:12 Dunno, maybe it's based on country of origin? Feb 11 00:44:57 <_genuser_> nah, all U.S. I've talked to several devs, all local just randomly asked to verify more. even after paying with a credit card that can be verified. Feb 11 00:45:24 interesting Feb 11 00:45:31 <_genuser_> I thought they might do a soft credit or something and see if they can pull some history. if so, go ahead. else require more verification. Feb 11 00:45:57 <_genuser_> but you've already paid 25 bucks and hooked up your account by then. so at that point you just have to. you can't say the start page didn't mention it. Feb 11 00:46:00 <_genuser_> they're sneaky Feb 11 00:49:17 <_genuser_> anyhoo, so back to your account, it's just your personal name as dev? Feb 11 00:50:01 looks like a generic "Developer name," they don't distinguish between business and personal accounts Feb 11 00:50:44 I'm using the name of my sole proprietership Feb 11 00:51:57 <_genuser_> I see. I thought of putting my movile dev name. as in "blah apps". and I figured, hey it's not a registered corp name or something. Feb 11 00:52:06 they verified on me too, i provided my driving license to avoid giving my passeport or identity card Feb 11 00:52:21 the probability to be checked is probably related to paid app Feb 11 00:52:42 like for the mandatory adress (which this one does not seem to be verified, yet) Feb 11 00:53:01 maybe. or the domain name you supply Feb 11 00:53:02 <_genuser_> my one app that I published is free. Feb 11 00:53:29 ok so it has nothing to do with paid or free apps Feb 11 00:53:43 probably not, mine offers IAP Feb 11 00:54:07 <_genuser_> I dont think it's related to app purchases. I think they're just randomly screening people. Feb 11 00:54:15 <_genuser_> Levite: what is your app. some game or some such? Feb 11 00:54:19 they should verify better (better != more), because there are zillion of shaddy accounts Feb 11 00:54:28 including platform to buy dev account with vpn & stuff Feb 11 00:54:28 just a productivity app Feb 11 00:54:35 if i can spot them, they should be able to spot them Feb 11 00:55:03 they're using the "shoot first, ask questions later" approach Feb 11 00:55:08 <_genuser_> Levite: share link if you don't mind, of course. Feb 11 00:55:18 <_genuser_> oh the GWB approach, very republican. Feb 11 00:55:22 https://play.google.com/store/apps/details?id=com.raterware.rateraide Feb 11 00:57:27 <_genuser_> very nice. Feb 11 00:58:04 <_genuser_> I like the UI design. quite cleaner than mine, I feel. but I can see you must have worked on it quite a bit to have a clean layout. Feb 11 00:58:36 thanks Feb 11 00:59:09 <_genuser_> now, I don't know what it's used for. I thought hey if it's generic productivity app, I Feb 11 00:59:13 <_genuser_> might have a use for it. Feb 11 00:59:34 yeah, it's just for google contractors Feb 11 01:00:03 <_genuser_> I saw leapforce and lionbridge and I was like ok it sounds like it's for platforms i haven't heard of. Feb 11 01:01:03 cardview is nice to work with. it's the custom view drawing that's a bitch Feb 11 01:01:23 <_genuser_> if I can peel myself away from my drawing tablet, I would focus on my app... Feb 11 01:01:31 <_genuser_> oh, you're using cardviews in there? Feb 11 01:02:05 yeah plus recyclerview Feb 11 01:02:24 <_genuser_> does recyclerview work on it's own or with things like gridview? Feb 11 01:02:31 <_genuser_> I feel like I should use it in my current app. Feb 11 01:02:32 I grew to love the XML layout system, more elegant that iOS's autolayout Feb 11 01:02:46 it does but not easily Feb 11 01:02:52 <_genuser_> hmm, I don't even know anything about iOS design. Feb 11 01:03:06 there's a github project called twoway-view that supposedly makes custom layouts simple Feb 11 01:03:30 <_genuser_> dang, it my project manager is calling me now. and it's 7pm!! Feb 11 01:03:38 <_genuser_> 2hrs past closign time. Feb 11 01:05:00 recyclerview is it’s own thing; mostly a replacement for listview. I believe it is separate from gridview Feb 11 01:05:14 too bad your phone is off :p Feb 11 01:14:36 hmm, theme.applyStyle isn't doing anything Feb 11 01:15:28 "android +applystyle" comes up with 6 results :O Feb 11 01:15:49 i reached the end of the interwebs ! Feb 11 01:16:46 Turn. Feb 11 01:17:06 (Totally vague reference to Better Off Dead) Feb 11 01:22:35 so what's the deal with IGMP/multicast support missing on a bunch of devices? seems many ship with kernels built without CONFIG_IP_MULTICAST Feb 11 01:33:48 <_genuser_> s73v3r: no, she actually pinged me on work IM, which was left logged in. Feb 11 01:33:53 <_genuser_> and then said can I call. Feb 11 01:34:05 <_genuser_> It would a _little_ late to change to "away" then. Feb 11 01:46:58 _genuser_, don't work IMs switch to away after some time of inactivity? :P Feb 11 01:51:23 Napalm there ? Feb 11 01:51:32 yus Feb 11 01:52:16 Napalm know of any way to overlay one theme onto another, i'm trying to use Theme.applyStyle() but it doesn't seem to be doing anything Feb 11 01:52:27 can't use a ContextThemeWrapper Feb 11 01:52:57 so basically i'm foing setTheme(X) and then applyStyle(Y) ... to get X + Y Feb 11 01:53:09 why is everything so retarded with themes Feb 11 01:54:02 I reject your ableness slur Feb 11 01:54:07 or theme / styles should be able to other styles if they didn't give multiple inheritance Feb 11 01:54:58 <_genuser_> Afzal: most of us configure it to not auto-away using keyboard inactivity. because sr. mgmt then keeps track of who's not "working". Feb 11 01:55:25 haha Feb 11 01:57:13 <_genuser_> bean counters with MBAs who know nothign about productivity... how do you think they try to improve revenue... Feb 11 01:57:32 back Feb 11 01:57:38 can I use Uri.parse with web data URI scheme like "data:MIME,base64,encoded-data"? Feb 11 01:58:34 <_genuser_> you can. it migth not work. Feb 11 01:58:35 g00s: sounds like you've tried everything I would try. ofc you need to call Theme.applyStyle before inflating ANY view once you've started up a layoutinflater its tied to your context. Why cant you use ContextThemeWrapper? Feb 11 01:59:25 Napalm the theme stuff i want to add are things like android:windowIsFloating , its not for any widget Feb 11 01:59:52 g00s: you cant change them at that point.. the window is already created Feb 11 02:00:09 before setContentView ? Feb 11 02:00:10 g00s: if you want you could read the attributes and reapply the flags Feb 11 02:01:53 i have the back of my mind that before onCreate is even called you have a Window and its been attached to the context. and the flags from the theme in the manifest are always used. if you want to override those you have to call the usual requestWindowFeature() or getWindow().getAttributes Feb 11 02:01:58 g00s: ^ Feb 11 02:02:41 Napalm allright then, i guess i'll have to do it all programatically Feb 11 02:02:46 g00s: you might be able to make the context with a ContextThemeWrapper Feb 11 02:02:50 infact Feb 11 02:02:51 yes Feb 11 02:02:54 i believe you can Feb 11 02:03:27 so, I can't simply use an base64-encoded image with this scheme and pass to an ACTION_VIEW intent. Feb 11 02:03:43 override attachBaseContext in your activity and put super.attachBaseContext(new ContextThemeWrapper(newBase, R.style.New_Theme)); in it Feb 11 02:03:49 g00s: ^ Feb 11 02:04:07 Napalm ah, ok thanks i'll try that Feb 11 02:07:29 Napalm lol, but what is newBase :| Feb 11 02:10:40 oic Feb 11 02:13:41 Napalm A for effort, no effect Feb 11 02:22:37 g00s: damn :( Feb 11 02:25:53 anyone use smsmanager to send text messages? Feb 11 02:26:13 i'm getting strange problems with the delivery notification intents Feb 11 02:32:06 is there any default slide in/out left/right animation in Android system resource? **** ENDING LOGGING AT Wed Feb 11 02:59:58 2015