**** BEGIN LOGGING AT Mon Mar 30 02:59:59 2015 Mar 30 03:18:24 feathersanddown: https://developer.android.com/reference/android/support/v4/app/package-summary.html Mar 30 03:20:24 what would the xml look like for the layout in the first image http://cdn.arstechnica.net/wp-content/uploads/2014/07/maps-3-980x576.png Mar 30 03:20:40 a footer with the floating action button Mar 30 03:20:53 my mapview is taking up the whole screen Mar 30 03:37:57 bankai_: thanks :) Mar 30 03:43:18 hey Mar 30 03:43:38 is there a basic tutorial of overlaying a view on top of another in android app? Mar 30 03:43:47 like i want my android app to just overlay say a white screen over every screen Mar 30 03:43:52 interfering with other apps Mar 30 03:44:03 yeah and this is just for fun for myself, im not being mean and publishing it on teh store Mar 30 03:44:07 im still learning android :P Mar 30 03:44:17 razzledazzle, i've definitely run into that issue... calling getLoaderManager().destroyLoader(...) in onLoadFinished after it finishes works, but seems like a hack. Mar 30 03:44:25 is it SYSTEM_ALERT_WINDOW ? Mar 30 03:49:17 tejasmanohar, http://www.piwai.info/chatheads-basics/ seems to cover it Mar 30 03:49:48 taking a look Mar 30 03:57:56 Is all text Roboto by default? Mar 30 04:01:20 Anthaas: Assuming the phone is not rooted or running some ROM or a manufacturer hasn't changed it, yes the default font is Roboto on Honeycomb(?)+ Mar 30 04:01:33 Thanks Mar 30 04:06:24 JakeWharton were picasso / retrofit always just using maven - i thought they were gradle Mar 30 04:06:30 always Mar 30 04:07:18 thanks Mar 30 04:09:34 pfn: memorion: http://imgur.com/EQlWGYV Better? Mar 30 04:10:17 The facebook icon is a bit crappy in quality, Im looking into finding a decent one I can downscale rather than a tiny one that needed upscaling. Mar 30 04:13:12 <_genuser_> so this "maven central" thing. Mar 30 04:13:40 <_genuser_> anybody got a one liner description for it? or should I google and read about it? Mar 30 04:16:18 it's a central host of binary artifacts (i.e., jars) Mar 30 04:16:50 it allows you to consume libraries as jars without having to build them yourself or copy them around Mar 30 04:17:18 Also worth mentioning: jcentral and jitpack.io Mar 30 04:17:29 or Jake's Github page.... Mar 30 04:17:43 JakeWharton: While you are here... When created my own RequestHandler for Picasso do I need to do the work for resize and fitCenter myself? Mar 30 04:17:56 no Mar 30 04:18:32 so it resizes the bitmap after I return it? The bitmap can be large and I don't have to worry? Mar 30 04:18:48 <_genuser_> ah thanks guys. Mar 30 04:18:53 yes Mar 30 04:18:59 cool. just making sure. thanks Mar 30 04:19:01 although you'd do better returning an InputStream Mar 30 04:19:21 <_genuser_> so it's like a central lookup or actual host? you send your files there? Or you send them a downloadable location for your bins? Mar 30 04:19:21 Ah, I'm using some dev build of Picasso, need to update Mar 30 04:19:41 _genuser_: host Mar 30 04:20:17 you specify explicit coordinates to an artifact Mar 30 04:21:12 hiyas Mar 30 04:21:39 anyone know how to update hosts file without root permissio?? Mar 30 04:21:54 don't think that's possible Mar 30 04:22:21 oh Mar 30 04:23:28 <_genuser_> JakeWharton: ah, thanks. :) I think I'll start using maven central then. who has teh time to download and lug around jars. Mar 30 04:23:43 certainly not I Mar 30 04:23:58 sp one has to root the device to gain any decurity on the device? Mar 30 04:24:08 _genuser_ also, hard to get those past security (jars) Mar 30 04:24:25 <_genuser_> g00s: security? what type of security? Mar 30 04:24:28 or somebody might try to steal them, the whole ust / moths thing Mar 30 04:24:33 *rust Mar 30 04:24:42 _genuser_ lol, jk Mar 30 04:27:38 <_genuser_> g00s: well, I thought you were talking about taking files around via email/usb drives. Mar 30 04:28:01 <_genuser_> I've recently released debug version of a work project and couldn't mail it coz mailserver kept stripping out zip files. Mar 30 04:28:38 _genuser_ did you see there is a enterprise play store area now Mar 30 04:30:18 <_genuser_> g00s: oh, wth is that? (btw, my work app as .net so unrelated to android). Mar 30 04:30:56 https://support.google.com/a/answer/2494992?hl=en Mar 30 04:31:15 g00s: that's like two years old Mar 30 04:31:24 we've been using that to distribute our internal betas for about two years Mar 30 04:31:31 hmm. i just read something last week Mar 30 04:31:39 guess it was different Mar 30 04:31:49 or not :| Mar 30 04:32:10 <_genuser_> I just saw conceal and fresco from facebook. Mar 30 04:32:32 <_genuser_> running some benchmarks* spongycastle vs. conceal. (* just on galaxy s4) Mar 30 04:32:53 <_genuser_> they say fresco is like picasso only better. I'm thinking, my code is working fine, why break it. Mar 30 04:33:24 why add 2MB to your APK size as well? Mar 30 04:34:05 <_genuser_> I thought they claimed it was smaller than picasso. Mar 30 04:34:15 not even remotely close Mar 30 04:34:17 <_genuser_> no wait, sorry, it was conceal that was smaller than bouncycastle. Mar 30 04:34:40 <_genuser_> I'm happy with picasso and its not adding to the slowness of my images so I'm leaving it along. Mar 30 04:35:03 Picasso is 120K. Fresco is 2.3MB. Mar 30 04:35:03 <_genuser_> besides, I'd rather try out this new conceal thing to see just how much leeway it gives you. Mar 30 04:35:17 <_genuser_> are we still on 2.5.0? Mar 30 04:35:21 2.5.2 Mar 30 04:35:34 <_genuser_> ugh, if you keep updating it, I'll never move onto other aspects. Mar 30 04:35:47 <_genuser_> I'll be downloading and updating picasso related stuff in my code... Mar 30 04:36:01 there's nothing to update except the version number in your build file Mar 30 04:36:14 <_genuser_> I can see you're an AS user. :p Mar 30 04:36:25 <_genuser_> I should move my project to AS and use those gradle build files. Mar 30 04:36:35 Sadly, most Android developers are these days Mar 30 04:37:09 <_genuser_> as bloated as it is, I used it for a few hours and already felt irritated moving back to eclipse. AS's got a nice UI Mar 30 04:37:39 I feel the opposite, that much is probably a matter of taste. What's not is that Eclipse's incremental compiler is light years ahead of AS' Mar 30 04:37:40 even before Android Studio and Gradle we used a dependency manager Mar 30 04:37:59 Also, gradle is a good match for Android overall but quite slow Mar 30 04:38:07 What does a tilde in an ArrayAdapter type signature mean? Like new ArrayAdapter<~> Mar 30 04:38:25 it means the IDE elided the type because it's redundant Mar 30 04:38:28 wldcordeiro: I believe it's AS folding things Mar 30 04:38:37 in Java 7 and up it's not even needed Mar 30 04:38:38 <_genuser_> CedricBeust: can't argue about incremental build mgmt. I mean 30 seconds to build, really AS? Mar 30 04:38:55 Oh I wasn't aware that it was the IDE doing that! Mar 30 04:38:56 _genuser_: AS doesn't build, Gradle does Mar 30 04:39:17 * surf2b1 is still using Eclipse and ANT :O Mar 30 04:39:22 A simple Problems view that updates itself all the time on the entire project would be a huge improvement Mar 30 04:39:37 agreed, and the move to Gradle makes that a near impossibility Mar 30 04:39:44 yup :-( Mar 30 04:39:53 Well, it's not impossible Mar 30 04:40:00 <_genuser_> JakeWharton: understood. but since we all gotta move to it, I decided not to focus on teh negatives, etc. :) Mar 30 04:40:07 Just need a parallel native Android build, like Eclipse did with ecj Mar 30 04:40:07 <_genuser_> you're correct tho, it's gradle not AS Mar 30 04:40:14 * wldcordeiro excuses himself from this conversation... Mar 30 04:40:29 CedricBeust: that defeats the whole purpose of using Gradle–the unified builder Mar 30 04:40:48 JakeWharton: Not necessarily, build while developing is different from build to deploy and test Mar 30 04:41:11 doesn't need to do all the flavor/build type layering, just simple java compilation and resource generation Mar 30 04:41:11 what if I configured custom code generating tasks? or use AspectJ? Mar 30 04:41:16 it just needs to be a good approximation Mar 30 04:41:41 2 decimal places Mar 30 04:41:48 annotation processing needs to be part of that native build, obviously Mar 30 04:42:04 AspectJ... I'm not even going to touch that :) Mar 30 04:42:24 it doesn't matter what it is though Mar 30 04:42:34 Eclipse and Ant were so awful because it was a split-brain system Mar 30 04:42:50 you see that even today with importing Maven-based projects into IntelliJ IDEA Mar 30 04:42:55 Split brain works Mar 30 04:43:06 Again, there's a difference between compilation while developing and compilation to deploy and test Mar 30 04:43:06 it never works Mar 30 04:43:11 there shouldn't be Mar 30 04:43:59 There shouldn't be if both take the same time. They don't, so it's a necessity Mar 30 04:43:59 Another split brain that works is regular Java development Mar 30 04:43:59 it isn't Mar 30 04:43:59 Whether you use maven or gradle, while you develop, you just let your IDE build for you Mar 30 04:44:05 then when you're ready to push, you `mvn` or `gradle` justto make sure Mar 30 04:44:12 our Maven-based projects have struggled with that for forever Mar 30 04:44:30 why even bother with Maven or Gradle? Just invoke the IDE from the command line to build? Mar 30 04:44:57 Because your build might have additional checks that are required before you push, which you can skip while developing Mar 30 04:45:09 smoke tests, git hooks, ... Mar 30 04:45:19 <_genuser_> dagnabbit Mar 30 04:45:34 that doesn't justify the need for two systems Mar 30 04:45:43 <_genuser_> changed package named. but R files is autogenerated still in older package namespace. Mar 30 04:45:53 your so-called "development compilation" is just a task graph subset Mar 30 04:45:59 yes Mar 30 04:46:08 It's just the state of the art in IDE today Mar 30 04:46:20 You want an eldorado IDE that combines best of both worlds, be my guest! Mar 30 04:46:28 Eclipse came close to that Mar 30 04:46:33 Well, ADT Mar 30 04:46:41 but then android build complexity rose, so gradle had to be introduced Mar 30 04:47:27 So now we're back to one brain, but a very slow one Mar 30 04:47:54 i'd rather a slow, feature-full brain than a fast, featureless one Mar 30 04:47:56 speed can come Mar 30 04:48:30 2.4 reduces configuration time by 1/3rd Mar 30 04:48:46 Well, in the "make it work then make it fast", we can say AS has the first part covered. I'm not feeling too optimistic about part 2, though Mar 30 04:49:00 anyone around? Mar 30 04:49:07 ProLoser no Mar 30 04:49:18 there's certainly a limit to it Mar 30 04:49:27 https://floobits.com/ProLoser/Sandbox/file/app/src/main/java/com/proloser/spotifypractice/AlarmReceiver.java Mar 30 04:49:34 i'm getting a nullpointer error on line 13 Mar 30 04:49:39 CedricBeust yeah i would like better feedback in AS - too many times typing nonsense but no error markers, or error markers when there should not be Mar 30 04:49:52 it's not telling me which column though, is it not safe for me to assume intent is populated? Mar 30 04:50:06 g00s: Yes, feedback is another thing that gets my undies in a twist Mar 30 04:50:11 lack thereof* Mar 30 04:50:17 so the IDE and gradle really aren't on the same page anyhow Mar 30 04:50:21 <_genuser_> finally, phew, R file drama.... Mar 30 04:50:25 i mean big picture yeah Mar 30 04:50:45 R is a file? Mar 30 04:50:48 that R.id.whatever? Mar 30 04:51:17 So, when using aar's and you have multiple dependencies all fields in R.java get copied over to the project. Lets say you use 3 aar's that all use appcompat and have different package names. Wouldn't they all have a copy of the same field in 4 different R classes? That is why I'm still using ANT Mar 30 04:51:45 Also, on Windows, AS keeps signaling me in the task bar, and when I bring it to the front, it has nothing to tell me. Drives me cvrazy. Mar 30 04:52:22 CedricBeust thats not as bad as unfocusable windows on other desktops hehe Mar 30 04:52:32 i was hoping 1.2 fixed that but :( Mar 30 04:52:36 <_genuser_> wait, we don't have a file picker in android by default? we have to roll our own? or get 3rd party lib? Mar 30 04:52:39 CedricBeust: i have a few java applications that do on that on windows Mar 30 04:52:55 _genuser_: users don't care about file systems Mar 30 04:53:19 <_genuser_> JakeWharton: ah, so if needed we roll our own then. Mar 30 04:53:22 I don't have a process running, or paused or anything. It's just sitting on its thumbs. And he goes "Cedric, hi! I'm here! I have something important to tell you, click me!" Mar 30 04:53:41 I click and he goes "psych!" Mar 30 04:53:41 <_genuser_> kinda makes sense. I don't really browse the filesystem in most of my apps. Mar 30 04:53:57 CedricBeust that was me :) Mar 30 04:54:01 <_genuser_> CedricBeust: lol, sounds like it's playing with you. Mar 30 04:54:03 had you fooled all that time :D Mar 30 04:54:26 can anyone help me out? Mar 30 04:54:39 <_genuser_> ProLoser: ask your question. whoever can help will jump in. Mar 30 04:54:41 getting nullpointer error on line 13: https://floobits.com/ProLoser/Sandbox/file/app/src/main/java/com/proloser/spotifypractice/AlarmReceiver.java Mar 30 04:56:51 ProLoser: Looks straightfoward Mar 30 04:57:07 well is intent like... not something i can assume is present? Mar 30 04:57:20 ProLoser: why assume, put a breakpoint and inspect Mar 30 04:57:24 oh Mar 30 04:57:28 hmm i've yet to try that lol Mar 30 04:58:07 how do i reconnect the debugger to the phone without redeploying? Mar 30 04:58:39 <_genuser_> we can breakpoint and inspect?? Mar 30 04:59:19 ProLoser: You can attach to a running process Mar 30 04:59:48 both context and intent cannot be found Mar 30 04:59:58 unless i'm doing the watchers incorrectly Mar 30 05:00:01 I usually want to install the build on multiple devices, so I do this with a gradle target (AS doesn't seem to know how to do that), then I attach to the device I want to debug Mar 30 05:00:15 so I'm finding that after my onResume is called, my onCreate also gets called. Is there a way to prevent that? Mar 30 05:01:05 t0astt: onCreate should be first Mar 30 05:01:51 Hmm ok Mar 30 05:02:46 <_genuser_> in my simple apps, I just ignore onresume and do everythign in oncreate. Mar 30 05:02:58 <_genuser_> altho, I assume once I start writing "real" apps, I'd have to pay attention to it. Mar 30 05:03:34 any ideas why onReceive() is not getting arguments populated? Mar 30 05:08:04 why do you sometimes use .MainActivity in activity names and sometimes drop the .? Mar 30 05:15:23 ProLoser: You are probably talking about the AndroidManifest? http://stackoverflow.com/questions/3608017/activity-name-in-androidmanifest-xml Mar 30 05:16:04 onReceive() in an Activity or BroadcastReceiver? Mar 30 05:16:25 broadcastreceiver Mar 30 05:16:32 i think i wasn't filtering it correctly, although it USED to work Mar 30 05:16:35 i'm tweaking the manifest Mar 30 05:18:00 actually Mar 30 05:18:03 now i'm just lost again Mar 30 05:18:33 should i give my alarm intent an action? or no? Mar 30 05:18:36 the docs don't mention it Mar 30 05:18:39 but i am confused Mar 30 05:19:05 the broadcast receiver shouldn't even receive an intent unless you specify some intent-filter in the manifest or code. You are trying to get ON_BOOT_COMPLETE to work? Mar 30 05:19:30 AND alarmmaanger Mar 30 05:19:36 look at setAlarm() in main activity Mar 30 05:20:32 i also though i read somewhere that i don't always have to listen to ON_BOOT to re-register my alarms Mar 30 05:21:39 https://developer.android.com/training/scheduling/alarms.html Mar 30 05:21:47 at the bottom i'm reading the last paragraph but i'm a little confused Mar 30 05:21:56 will this leave my app runnin in the background? do i really want that? Mar 30 05:21:58 why did you comment out setting the action? Mar 30 05:22:13 cuz according to the docs on that link there's no mention of setting an action Mar 30 05:22:20 i'm still like undecided of how i'm supposed to handle this Mar 30 05:22:26 you need to reset all your alarms on boot Mar 30 05:22:35 do i have an ON_BOOT receiver that sets the alarm? or do i take out the ON_BOOT stuff and use the programmatic method Mar 30 05:22:44 surf2b1: but read the last paragraph at the bottom of that docs Mar 30 05:23:13 or is that in conjunction with the ON_BOOT receiver? Mar 30 05:24:00 ProLoser: So, they are just saying don't have the boot receiver enabled by default until you set an alarm. So when you set the alarm add the code to check and enable the boot receiver. Mar 30 05:24:01 should i create a seperate receiver just for ON_BOOT and have it reset the alarms? or should I just reuse this one Mar 30 05:24:18 You don't have to, but you can Mar 30 05:24:36 add back the setAction to the intent too Mar 30 05:25:51 okay so with that i can now explicitly catch those 2 broadcasts Mar 30 05:26:06 i'm still a little confused on the ComponentName receiver ... part at the bottom of the docs Mar 30 05:27:10 So, to sum up what I think you need to do: 1) add the two actions to the intent-filter in the android manifest. 2) When you set the alarm, enable the broadcast receiver using the code found in the docs. 3) save the alarm stuff in a database or shared-prefs so on boot-complete you can re-create your alarms Mar 30 05:27:41 Hey all. I have some nested fragment action and the onCreateView() of the child fragment is not being called :/ Mar 30 05:28:08 surf2b1: db will come in my next pass Mar 30 05:28:12 for now i want to just get alarms working Mar 30 05:28:14 if you set enabled="false" for the receiver then it won't receive any broadcast events until you enable it using the package manager Mar 30 05:28:17 where does that component code go? Mar 30 05:28:19 tricknology any chance, mixing support and native ? Mar 30 05:28:25 ah Mar 30 05:28:26 could me.. Mar 30 05:28:27 gotcha Mar 30 05:28:27 be. Mar 30 05:28:41 will check, thx g00s Mar 30 05:28:55 should I just take i tout since it’s minsdk is > 14? Mar 30 05:29:01 (support) Mar 30 05:29:10 nested fragments is later Mar 30 05:29:36 like Android 4.2 Mar 30 05:30:09 surf2b1: do you think i should really bother disabling it? seems like ON_BOOT and custom actions are efficient enough, no? Mar 30 05:30:47 Android just wants you to disable it so it isn't sending a bunch of broadcasts to apps that don't need it. Mar 30 05:31:18 alright well once i get the db wired i'll start toggling it Mar 30 05:31:30 I would disable it, but you can get by with it always enabled. Mar 30 05:32:19 If you have a call like (ImageView)row.findViewById(R.id.icon); is the (ImageView) the return type? Mar 30 05:32:48 is it necessary to getContext in an activity? Mar 30 05:33:05 I kind of assume so since it's the right hand side of an assignment. Mar 30 05:33:51 wldcordeiro: findViewById(int) returns a View or null if the parent view doesn't contain a view with the specified id. (ImageView) is casting that view to the class ImageView which extends View Mar 30 05:34:00 wldcordeiro: it's casting the return value Mar 30 05:34:12 Ah thanks. Mar 30 05:34:17 <_genuser_> eh, waste of time trying to sort listfiles() while it was just missing uses-permissions... Mar 30 05:34:27 That's kind of along the lines of what I was thinking. Mar 30 05:36:55 ProLoser: you are probably talking about getPackageManager() in your MainActivity? You can remove context as it doesn't even exist. Mar 30 05:42:37 am i being stupid in swapping out references to context with references to 'this'? Mar 30 05:43:07 ProLoser would be good to learn java Mar 30 05:43:09 ProLoser: depends what this is Mar 30 05:43:18 ProLoser: probably, nobody really knows what context means Mar 30 05:43:23 just find one available and put it in Mar 30 05:43:32 ;) Mar 30 05:43:40 ProLoser: no, and you don't even need "this" since Activity implements ContextWrapper. Mar 30 05:44:06 surf2b1: okay that's what i've been gather, if i'm in an activity Mar 30 05:44:29 going to run my activity's server interactions in runnables on another thread with blocking url calls, and a weakref to the activity Mar 30 05:44:38 so i can write nice procedural code Mar 30 05:45:00 and have it tightly coupled to a specific activity Mar 30 05:46:11 fired Mar 30 05:46:55 <_genuser_> hmmm, eclipse doesn't recognize bufferedoutputstream.... Mar 30 05:48:18 err.. updated minsdk to 4.2 and got rid of supportFragment Mar 30 05:48:30 still, onViewCreated is not called Mar 30 05:48:51 tryign to add a few fragments to a parent fragment Mar 30 05:49:03 maybe that parent should be an activity? Mar 30 05:54:16 tricknology: You need getChildFragmentManager which is only supported if you use the support lib Mar 30 05:54:40 ah I see. well I upped the minsdk to 17, which did the trick Mar 30 05:54:44 well sort of Mar 30 05:55:09 I mean I guess I could go back to support.. but what really did the trick is something I’m going to have to look into.. Mar 30 05:56:08 tricknology could it be that you are using the wrong fragmentManager ? Mar 30 05:56:14 tricknology: ah, looks like they did add getChildFragmentManager in 17. Mar 30 05:56:37 * surf2b1 considers changing minSdk to 17 Mar 30 05:58:30 nah it wasnt that.. I have a method that is giveFocus(int resId); it gets uses a global parent view “gView” from that is set onViewCreated(int resId). the giveFocus() method does gView.findViewById(resId); Mar 30 05:58:35 NPE on gView Mar 30 06:03:16 does onCreateView and freinds run async by any chance? Mar 30 06:03:25 that would explain this weirdness Mar 30 06:04:06 all main thread things happen sequentially Mar 30 06:04:21 that’s what I thouhgt.. Mar 30 06:04:23 not async Mar 30 06:04:30 read the life cycle again Mar 30 06:04:53 on create view is before view created Mar 30 06:05:18 yes I know that Mar 30 06:05:44 I am commiting a fragment to fragment manager.. maybe it’s not being executed Mar 30 06:05:57 because a view that is suppoed to be in it is throwing NPE Mar 30 06:06:27 “Schedules a commit of this transaction. The commit does not happen immediately; it will be scheduled as work on the main thread to be done the next time that thread is ready.” Mar 30 06:06:30 is my problem : Mar 30 06:06:35 .commit() Mar 30 06:07:20 if I use executePendingTransactions() I get “java.lang.IllegalStateException: Recursive entry to executePendingTransactions" Mar 30 06:08:39 ah.. that was due to not using ChildFragmentManager Mar 30 06:08:42 thx guys Mar 30 06:09:14 <_genuser_> java.lang.NoClassDefFoundError: com.facebook.crypto.Crypto Mar 30 06:09:28 <_genuser_> I beg to differ! it's in teh freaking build path and being exported with teh apk. what more does it want? Mar 30 06:10:00 _genuser_, read the dalvikvm messages prior to the exception Mar 30 06:12:07 <_genuser_> pfn: let me do that. dig in a bit more. Mar 30 06:12:38 hey Mar 30 06:12:49 i can't figure out why i'm getting a stupid nullpointer from the arguments of onReceive Mar 30 06:14:02 profligacy: Is the intent null? Mar 30 06:14:27 yes Mar 30 06:14:37 <_genuser_> very first line Could not find class 'com.facebook.crypto.Crypto' Mar 30 06:15:12 <_genuser_> pfn: ok, that's the very first line it spits out. I have the two jars from facebook exported out and linked in. compile time, it's finding them just fine. Mar 30 06:15:21 Hi, can anyone help me with a ScrollView not appearing -> http://pastebin.com/KsXJj9bG ? If I move the TextView right below HorizontalScrollView the text is there but is not scrollable. Mar 30 06:15:21 profligacy: Can't imagine why your receiver would be invoked if the intent is null Mar 30 06:16:08 adb was working just fine for days but now says "error: device not found" mtp is still working, I can browse, read and write files. Mar 30 06:16:28 adb is like that ;) Mar 30 06:16:56 <_genuser_> http://pastebin.com/raw.php?i=scb8MRQ5 Mar 30 06:17:00 <_genuser_> anybody got any ideas? Mar 30 06:17:18 adb is very fickle, especially on Mac and especially if you keep switching between the console and AS Mar 30 06:17:44 g00s, ya, well I'm not a Windows user anymore, so I am no longer accustomed things randomly working and not working for no apparent reason Mar 30 06:18:12 USB is much, much more robust on Windows than Mac Mar 30 06:18:56 i'm using adb over wifi, its ... a little better Mar 30 06:19:20 been thinking about trying that, tired of connecting/disconnecting and kill-server/restart all the time Mar 30 06:19:29 CedricBeust: #LinuxOnly Mar 30 06:19:30 g00s:how do i do wifi? Mar 30 06:19:37 Linux is probably the worst of all three Mar 30 06:19:44 heh Mar 30 06:20:14 zerothis what version of android ? Mar 30 06:21:06 anyhow http://developer.android.com/tools/help/adb.html Mar 30 06:21:14 section "Wireless usage" Mar 30 06:21:33 although i thought on 5.x i saw dev option to enable w/o usb first Mar 30 06:21:34 android 4.4.2 Mar 30 06:21:48 ok, yeah you'll need to connect usb first Mar 30 06:22:00 and you will have to redo the setup each time you reboot your phone Mar 30 06:23:03 Well, to tell the truth, Google's really been p***ing me off with android. no longer install to SD, SD is no longer SD its external SD and there is no real internal SD, apps can't right to SD. Wiimotes not longer connect. It all seems to be designed to drive everyone to buy a new device every 6 months. Now they have Linux being incompatible with other Linux devices. Mar 30 06:23:03 CedricBeust whats annoying - you go to build, and then AS shows a dialog with no devices :| Mar 30 06:23:18 CedricBeust so then i go restart adb, and do another build :| Mar 30 06:23:49 ugh Mar 30 06:24:27 i must do that at least 5 times per day Mar 30 06:24:55 I wonder if in ten years from now, we'll look back at today and think "the nonsense we used to put up with uh" Mar 30 06:25:41 IS there any constraint on the traditional multiselect Dialog in showing number of items. I can see only 4 items at max and when I try to insert more than 4 it shows error as ArrayIndexOutofBound length=4;index=4 Mar 30 06:25:59 CedricBeust i don't think so ... in 2010 i'm sure i was optimistic about 2015 :| Mar 30 06:26:15 optimism has faded :) Mar 30 06:26:26 i was cursing adb in 2010 i'm sure of it Mar 30 06:26:27 CedricBeust: I looking the other way. Years ago it worked better and now I'm putting up with nonsense Mar 30 06:26:34 I was doing Java ME in 2005, I'm optimistic Mar 30 06:30:34 well, sleep beckons Mar 30 06:31:25 sleep also messes up adb haha Mar 30 06:42:50 ls Mar 30 06:44:51 <_genuser_> anybody got any ideas on how to debug this? http://pastebin.com/raw.php?i=WDCp5P5w Mar 30 06:45:26 <_genuser_> the jars are linked in properly, I'm sure. the .so file that goes in /libs folder, that I'm not sure if it's ok for it to be in a sub folder as in /lib/armabi/libconceal.so Mar 30 06:46:05 Maybe proguard changed the class name? Mar 30 06:46:25 <_genuser_> surf2b1: for my bug? Mar 30 06:46:29 yeah Mar 30 06:46:32 Note that it's a NoClassDefFound _genuser_ Mar 30 06:47:03 The class is there, it's just failing to load. This is usually caused by a static initializer failing Mar 30 06:47:15 <_genuser_> CedricBeust: typically, I see that when the defining .java/.jar is missing. but in this case, it's linked in. Mar 30 06:47:31 If you have the source, look for a static initializer in that class. It could try to load a native lib and failing, for example Mar 30 06:48:09 <_genuser_> CedricBeust: it has native libs included in the package. maybe I'm not including them in my apk properly. Mar 30 06:48:25 Sounds plausible, look at the source of Crypto Mar 30 06:48:55 <_genuser_> CedricBeust: it's a facebook lib so just a .jar file that I have. Mar 30 06:48:57 https://github.com/facebook/conceal/blob/master/java/com/facebook/crypto/Crypto.java#L49-56 Mar 30 06:49:06 <_genuser_> but they have released the code, I think, I could go into it. Mar 30 06:49:11 <_genuser_> or what he did there.. :) Mar 30 06:50:45 There are a few suspicious messages from Dalvik too, not quite sure how to interpret them Mar 30 06:51:07 Maybe the jar file containing that file is corrupt? (I'm not seeing any static initializer in it) Mar 30 06:51:45 <_genuser_> I'm starting to believe "put the .so files in libs.zip into your libs folder part is what I'm doing wrong" Mar 30 06:52:00 These go in jniLibs typically Mar 30 06:52:23 <_genuser_> however, the libs.zip has a armeabi/libconceal.so, armeabi-v7a/libconceal.so, x86/libconceal.so Mar 30 06:52:46 <_genuser_> so I figure, I copy the entire strucutre there and not the files. Mar 30 06:53:23 <_genuser_> I wonder if the AS/gradle would build it differently and the instructions are for that. Mar 30 06:54:22 looks like it's prebuilt http://facebook.github.io/conceal/documentation/ Mar 30 06:56:40 <_genuser_> surf2b1: yep, those are the ones, I downloaded and pulled in. :) Mar 30 06:57:36 <_genuser_> interesting to see a lib with native code. :) I'll read up a little more on how to use native code libs in eclipse. just to see if I'm pulling it in incorrectly. Mar 30 06:58:29 I am trying to fix this but it's still being thrown Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? Mar 30 07:03:09 _genuser_: maybe this would help: http://stackoverflow.com/a/7951153/1048340 Mar 30 07:05:05 <_genuser_> surf2b1: thanks man. reading that one now. :) found a few other SO articles too. Mar 30 07:05:32 That's for Makefile though (the old way to build natives) Mar 30 07:07:03 <_genuser_> CedricBeust_: yeah, I think I just need to focus on the "include .so file in .apk" bit. Mar 30 07:07:56 Easy to test, add a static { System.loadLibrary("your.so") } Mar 30 07:07:57 <_genuser_> only ,if my 10,000 dollar 50mbps interwebs connection wasn't slow as a turtle. Mar 30 07:08:26 <_genuser_> right in the mainactivity? Mar 30 07:08:27 <_genuser_> I suppose. Mar 30 07:08:53 alarmmanager is driving me nuts, in what situations wont it fire? Mar 30 07:08:56 yeah Mar 30 07:09:49 <_genuser_> java.lang.UnsatisfiedLinkError: Couldn't load libconceal.so Mar 30 07:09:51 <_genuser_> yep, that's it. Mar 30 07:09:53 asperon: you're messing with it too? Mar 30 07:13:28 yey. Gradle refresh failed. Error: Mar 30 07:13:41 got to love those error messages Mar 30 07:13:44 ProLoser, i have been for months, i just can't seem to understand why it doesn't fire at times. I am of good mind to just use an RTC_WAKE, even if i know that its wrong Mar 30 07:15:47 why is that wrong? Mar 30 07:15:52 i'd have to peak at your code Mar 30 07:16:03 do you launch activities from inside the broadcast? Mar 30 07:17:24 ProLoser, no, i used a broadcast before, i changed it over to a service to remove the risk of it getting killed, but it still hasn't solved the problem. It works for some users, sometimes, but its just not reliable, which drives me mad since it extremely hard to debug Mar 30 07:17:50 a service is more reliable than an alarm? Mar 30 07:18:19 ProLoser, a services started via the alarm, instead of a broadcastreciever Mar 30 07:19:15 ah Mar 30 07:19:18 i'm a little confused but okay Mar 30 07:19:59 You're not using a service ProLoser ? Mar 30 07:20:14 no, i'm using the broadcast receiver which i'm trying to use to fire an intent that launches an activity Mar 30 07:20:32 Try with a service that starts your activity Mar 30 07:20:38 ProLoser, if the brodcastreciver takes to long, android will kill it Mar 30 07:20:52 the service get to run as long as it wants Mar 30 07:20:55 all the receiver does is launch an activity, why would that take too long? Mar 30 07:21:07 ProLoser, it shouldn't ;) Mar 30 07:21:34 does the length of time that activity is active/open count towards the receiver/android's kill time? Mar 30 07:21:47 <_genuser_> CedricBeust_: ah, gotta do a System.loadLibrary("conceal"); without .so and without preceding lib. It's loading it now, so it's being deployed. Mar 30 07:21:55 <_genuser_> but it's still throwing classdefnotfound, lol. Mar 30 07:22:04 ProLoser, not that i know if, the activity should live on its own Mar 30 07:22:20 okay then i don't know that i need to bother with a service right now Mar 30 07:22:23 <_genuser_> java.lang.NoClassDefFoundError darn classdefs Mar 30 07:22:25 i'm quite literally writing an alarm clock app Mar 30 07:26:02 hrm… Mar 30 07:26:33 <_genuser_> ProLoser: what are you writing this app for? Mar 30 07:26:44 <_genuser_> personal use, or some work project? Mar 30 07:27:13 personal use Mar 30 07:27:22 <_genuser_> just to learn? Mar 30 07:27:22 https://floobits.com/ProLoser/Sandbox/file/app/src/main/java/com/proloser/spotifypractice/AlarmReceiver.java Mar 30 07:27:29 yes, and because i want an app that does this Mar 30 07:27:45 totally forgot about bringToFront and it’s affect on LinearLayouts.. lol Mar 30 07:27:51 almost.. Mar 30 07:28:02 <_genuser_> ProLoser: nice. so this is going to play spotify at the alarm time? is that it? Mar 30 07:28:23 and ramp up the volume over like a half hour or hour, yes Mar 30 07:28:33 lets you play any of your playlists or a URI Mar 30 07:28:54 <_genuser_> ProLoser: lol, I remember I had written an alarm app in VB back in college. it had 3 options, beep, email, play cd. Mar 30 07:29:00 it will also announce the current time using TTS every 5 minutes Mar 30 07:29:28 <_genuser_> and which track on cd. I had put in a deep purple cd and would leave the speakers on full blast. 7am, it would play deep purple every day. Mar 30 07:29:45 anyway Mar 30 07:29:52 i get the error saying the flag isn't set Mar 30 07:30:15 java.lang.RuntimeException: Unable to start receiver com.proloser.spotifypractice.AlarmReceiver: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? Mar 30 07:31:58 <_genuser_> did you try intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Mar 30 07:32:14 look in my main activity file with setAlarM() Mar 30 07:32:21 <_genuser_> http://stackoverflow.com/questions/3918517/calling-startactivity-from-outside-of-an-activity-context Mar 30 07:32:32 <_genuser_> oh, I hadn't looked in code. let's see what it says. Mar 30 07:32:49 <_genuser_> now, what's floobits? and is this a safe site? Mar 30 07:33:22 code sharing Mar 30 07:33:26 it's a live connection to my IDE Mar 30 07:33:44 <_genuser_> https://floobits.com/ProLoser/Sandbox/file/app/src/main/java/com/proloser/spotifypractice/AlarmReceiver.java Mar 30 07:33:52 <_genuser_> in that one, I don't see you setting that flag. Mar 30 07:33:56 look in mainactivity Mar 30 07:34:04 oh i set it inside there? not when i created the alarm? Mar 30 07:34:30 <_genuser_> startAlarm.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Mar 30 07:34:49 <_genuser_> before. context.startActivity(); Mar 30 07:34:53 <_genuser_> that would be my attempt. Mar 30 07:34:54 yup Mar 30 07:35:06 the nice thing about floobits is i don't have to keep giving you new gists Mar 30 07:35:36 it fucking worked Mar 30 07:35:37 thanks Mar 30 07:35:52 <_genuser_> so if you make any changes, it shows up? or do I have to refresh? Mar 30 07:36:00 no should be realtime Mar 30 07:36:03 go to the receiver file again Mar 30 07:36:24 <_genuser_> I did. doesn't show it,. Mar 30 07:36:29 <_genuser_> so anyway, it worked? Mar 30 07:36:34 yes Mar 30 07:36:44 <_genuser_> cool, then I don't have to worry about updating the view. :) Mar 30 07:36:54 view? Mar 30 07:36:55 right Mar 30 07:37:12 <_genuser_> my view (my webbrowser to see your code0. Mar 30 07:37:17 yup Mar 30 07:37:22 also lets you move around the filetree yourself Mar 30 07:37:28 and i can also share terminals too Mar 30 07:37:42 <_genuser_> nice. anyhoo, looks like you're on your way. good luck. Mar 30 07:37:55 <_genuser_> while I try to slay this facebook conceal monster Mar 30 07:38:23 conceal? Mar 30 07:38:56 <_genuser_> facebook released a few libs. conceal is for encrypting data that they store on teh SD card. Mar 30 07:39:04 ah Mar 30 07:39:10 i thought apps don't have sd access Mar 30 07:39:10 <_genuser_> uses AES-GCM they say with 128-bit key length. Mar 30 07:39:25 sounds secure Mar 30 07:39:27 what are you building? Mar 30 07:39:42 <_genuser_> you should be able to access the SD card. might have to list the permission in the manifest. Mar 30 07:39:57 <_genuser_> right now, I have a project where I'm encrypting documents using spongycastle. Mar 30 07:40:28 <_genuser_> aes/128-bit key length. takes 4.5seconds to encrypt a file on the main thread. 5.5seconds in an Intent service Mar 30 07:40:58 <_genuser_> they claim theirs is much much much faster than bouncycastle (spongy is an offshoot of bouncy). so I'm curious how it scales on my device. Mar 30 07:41:12 <_genuser_> gonna try to encrypt ton of work documents, word files, etc. PDFs. Mar 30 07:42:55 so does like no one actually use the new material theme built in? Mar 30 07:43:11 or are there some sort of polyfill libs? Mar 30 07:43:32 <_genuser_> lol, I'm just stick with holo light in most of my test projects. Mar 30 07:44:03 I use AppCompat v21. Material on 21+ and material-like on <21. Mar 30 07:44:21 but you have to run android5 right? Mar 30 07:44:25 <_genuser_> TacticalJoke: appcompat 21 on AS? Mar 30 07:45:20 ProLoser: No. It works all the way back to API 7. Mar 30 07:45:28 _genuser_: The new AppCompat. Mar 30 07:45:39 how do i do that? Mar 30 07:45:41 <_genuser_> TacticalJoke: how does one determine their version of appcompat? SDK mgr? Mar 30 07:45:55 g00s: have you seen the emails where someone offers to "tip" you primecoin for open source work? Mar 30 07:46:35 capella no ... i'd prefer dogecoin anyhow Mar 30 07:46:48 https://chris.banes.me/2014/10/17/appcompat-v21/ Mar 30 07:47:00 _genuser_: I just change a number in my app's build.gradle. Mar 30 07:47:12 The emails show up to moz contributors ... figured it was a scam somehow Mar 30 07:47:14 compile 'com.android.support:appcompat-v7:21.0.3' Mar 30 07:48:21 <_genuser_> TacticalJoke: but how does gradle know where it is? it pulls from your android-sdk folder? Mar 30 07:48:21 capella you're working for free on moz anyhow lol Mar 30 07:48:45 * g00s give capella 100 dogecoins Mar 30 07:48:49 Yeah, I think so. Mar 30 07:49:02 hehe - I do it for the chicks Mar 30 07:49:12 <_genuser_> 100 dogecoins are nothing. Mar 30 07:49:19 moz groupies Mar 30 07:49:40 <_genuser_> TacticalJoke: nice. so material theme, does it just give you nice colors, etc? isn't most of material design just a recommendation? what do you do for UI elements? Mar 30 07:49:55 <_genuser_> TacticalJoke: implement your own or get 3rd party libs for stuff like snackbar, etc? Mar 30 07:50:05 <_genuser_> capella: how's them moz chicks? Mar 30 07:50:09 gotta get your own snackbar Mar 30 07:50:21 I am trying to communicate the right way between an Adapter and Main Activity. The adapter is being used by Fragment A, and makes lists of buttons which will open Fragment B. Since opening Fragments is not the job of the adapter, I need to send the data to the Main Activity via interface coupling, but I am still trying to grok the right way to do it. Mar 30 07:50:24 My UI is pretty simple so far. For example, for error messages, I just show a TextView (which might later be coloured red or something). Mar 30 07:50:33 But I'd consider third-party libraries if needed to look "material". Mar 30 07:50:44 after i/o 2014 there was hope appcompat could really be something ... like google realized it was good to keep this up. well, that dissipated real quick Mar 30 07:51:37 <_genuser_> TacticalJoke: so what do you really get with the appcompat 21? just the new theme colors? Or does it have any of the material design stuff implemented? Mar 30 07:51:56 _genuser_ most useful is toolbar Mar 30 07:52:09 so you have an appbar, actionbar, and toolbar now Mar 30 07:52:11 The link says a bit more, but you get a general material look. Mar 30 07:52:11 lol Mar 30 07:53:06 <_genuser_> g00s: honestly I thought they were all toolbars. but I can see how theyu might be slightly different. Mar 30 07:53:17 <_genuser_> g00s: so toolbar is actually implemented in appcompat? Mar 30 07:53:23 <_genuser_> TacticalJoke: I think I missed the link.... Mar 30 07:53:23 yes Mar 30 07:53:29 https://chris.banes.me/2014/10/17/appcompat-v21/ Mar 30 07:53:44 <_genuser_> g00s: nice, I'll have to check out the toolbar. Mar 30 07:53:47 <_genuser_> TacticalJoke: thanks. reading. Mar 30 07:54:50 That feeling when rebasing 10 branches on top of a changeset that touches lots of files and getting no merge conflicts. Mar 30 07:55:03 <_genuser_> love how developers call everything a "pattern". Mar 30 07:55:26 <_genuser_> it can't just be a widget, new look you released. It's a "pattern" Mar 30 07:55:31 What weirds me out is that material is called a "design language". Wait, what? Mar 30 07:55:34 TacticalJoke i must say - i am in dismay that git gets merge conflicts on things which clearly don't look conflicting to me Mar 30 07:56:12 Yeah, I feel like that at times. In general, it'd be cool if diffing and merging were language-aware and way smarter. Mar 30 07:57:13 <_genuser_> I think things like "internet of things" and "patterns" are basically the new way to stay excited about doing more and more over the same tcp/ip packets. Mar 30 07:57:31 <_genuser_> you can't just connect things to the internet. So what if they're NAT'd and behind a router. Mar 30 07:57:52 The material-design guidelines are full of this kind of thing. Mar 30 07:57:55 It's a total hipster document. Mar 30 07:57:57 <_genuser_> now it's internet of things. "everythign has it's own IP". well when did everything not have an IP if it need to be on a network. Mar 30 07:58:23 <_genuser_> it's the same thing with the .io movement. Mar 30 07:58:41 <_genuser_> new app for telling your GF you love her. it's released on love.io Mar 30 08:00:00 in an activityie's oncreate how can i determmine if it was already running? Mar 30 08:00:20 One way is to see whether savedInstanceState is null. But why do you want to do this? Mar 30 08:00:42 somebody doesn't like reading the docs ;) Mar 30 08:00:43 <_genuser_> ProLoser: saveInstanceState bundle would be null the first time. and not null if resumed. I think. Mar 30 08:00:56 <_genuser_> oh, sorry he already said that. Mar 30 08:02:17 Hey, i have a few flavour builds, I want to set in gradle that the free version can be installed on external storage... but the installLocation attribute does not seem to be recognized Mar 30 08:02:22 any solution? Mar 30 08:03:09 TacticalJoke https://android.googlesource.com/platform/frameworks/support/+/7e82b99953680915596eaf0eb35927388e574ca8 Mar 30 08:03:47 i do feel bad for this chris banes guy; working on appcompat as to be total hell Mar 30 08:04:08 Yeah, that can't be fun. Mar 30 08:04:12 Is that an unreleased feature? Mar 30 08:04:34 yes Mar 30 08:05:56 I was going crazy yesterday and considering using WebView for my animated GIFs. I have since recovered. :D Mar 30 08:06:48 TacticalJoke glide does animated gifs Mar 30 08:06:59 i guess, not like i've used them ;) Mar 30 08:07:04 Yeah. It doesn't do download progress, though, unfortunately. :[ Mar 30 08:07:12 I think I'd rather use ffmpeg to transcode gifs to mp4s than use webview :P Mar 30 08:07:13 I've actually written my own image downloading/caching/etc. Mar 30 08:07:27 Not because of NIH syndrome, but for pure flexibility. Mar 30 08:07:40 (Well, maybe a tiny bit of NIH syndrome. :D) Mar 30 08:07:59 I did use DiskLruCache, though. Mar 30 08:15:44 How do you guys handle multi-screens with LinearLayouts ? On mdpi devices my screen looks fine, however on ldpi it is cropped, should I wrap everything in a ScrollView ? Should I override everything in separate layouts ? Mar 30 08:17:44 Afaik the official doc doesn't provides information about this… Mar 30 08:19:17 that's because it depends on what makes sense for your app Mar 30 08:19:21 also, ldpi? Mar 30 08:19:38 is it a good idea to pass MainActivity to an Adapter's constructor in order to communicate from the Adapter to the MainActivity? Mar 30 08:20:42 I understand Mavrik, ldpi because a colleague showed me the flaws on his Galaxy Y which is 240 x 320 Mar 30 08:20:49 using rxJava, how do i convert a list to single items, then merge it back to a list before subscribing? Mar 30 08:21:27 claint: What communication are you doing? Mar 30 08:22:05 I am trying to communicate the right way between an Adapter and Main Mar 30 08:22:05 Activity. The adapter is being used by Fragment A, and makes lists of Mar 30 08:22:05 buttons which will open Fragment B. Since opening Fragments is not Mar 30 08:22:05 the job of the adapter, I need to send the data to the Main Activity Mar 30 08:22:08 via interface coupling, but I am still trying to grok the right way Mar 30 08:22:11 to do it. Mar 30 08:22:21 sorry about the mess... Mar 30 08:24:03 Could your activity could give a bunch of View.OnClickListeners to the fragment? Mar 30 08:24:20 Then your activity determines what happens when the buttons are clicked. Mar 30 08:25:01 It may be possible to do this with a single View.OnClickListener. Mar 30 08:25:19 (Perhaps making use of "button.setTag(whatever);".) Mar 30 08:27:25 Mavrik: http://www.noelshack.com/2015-14-1427704021-screenshot-2015-03-27-16-11-32.png Mar 30 08:27:45 The bottom button is cropped on ldpi screens Mar 30 08:28:39 cristen, it'd probably adjust the layout Mar 30 08:28:45 how do you tie the View.OnClickListeners of the buttons to the fragment exactly? Mar 30 08:28:46 since UX wise scrolling looks stupid Mar 30 08:28:46 claint: there's always pubsub Mar 30 08:28:49 in that case Mar 30 08:29:05 so what is the strategy here ? Mar 30 08:29:15 claint, um, you call setOnClickListener? What exactly is the issue? Mar 30 08:29:34 cristen, just store paddings and button size in a dimen.xml and make ldpi have different paddings/margins/button size? Mar 30 08:29:37 claint, you define the adapter in your fragment Mar 30 08:29:40 depends on how much of the layout is missing Mar 30 08:29:44 claint: MainActivity instantiates a View.OnClickListener and passes it to the Fragment, which passes it to the Adapter. Mar 30 08:30:02 TacticalJoke: ahh... Mar 30 08:30:07 K Mavrik, I already did the dimension stuff, I'll override it in the different layouts Mar 30 08:30:24 There isn't much about it in the official doc but now it makes sense thanks a lot Mar 30 08:31:21 TacticalJoke: so the way I did it, some backasswards style I guess. Mar 30 08:31:58 What is the way you did it? Mar 30 08:32:49 I gave the MainActivity from the Fragment to the Adapter, and on each views new View.OnClick, I called the custom interface I wrote for control. Mar 30 08:33:10 which the MainAdapter implements. Mar 30 08:33:57 why would you even have a click listener in activity answering to fragment view? Mar 30 08:33:58 but I didn't pass the custom interface from the Fragment to the Adapter. Mar 30 08:34:04 that kinda defeats the whole purpose of a fragment Mar 30 08:34:11 Hi, i have a question about the build process i have 2 jars in the lib folder but somehow gradle adds their content to classes.dex - can this be avoided? they should be untouched Mar 30 08:35:06 ktwo, how do you expect that to work Mar 30 08:35:11 or even look like? Mar 30 08:36:10 well, arent *.jars usually already compiled to bytecode Mar 30 08:36:11 Mavrik: because the final button created by the adapter is supposed to open a new fragment, and opening fragments is not the job of the adapter (even though it can be done by calling (Activity)context).getFragmentManager() from adapter). Sorry, I am just trying to grok the right way to do these things cleanly. Mar 30 08:36:13 That's true -- you might want the Fragment to instantiate the View.OnClickListener (with code calling back to the MainActivity), which is given to the Adapter. Mar 30 08:36:18 why should it do the job again Mar 30 08:36:36 ktwo, Android's VM has different bytecode format Mar 30 08:37:01 still not sure why do you care about such internal implementation detail O.o Mar 30 08:38:59 First try, I created the new fragment directly from the adapter by doing the (Activity)context).getFragmentManager() call. But it didn't look clean, and people here commented I should do it the clean way here. Mar 30 08:40:19 So I made an interface on the MainActivity, (since main Activity is supposed to be where you create new Fragments), which will handle the deal, but I had to link the Activity all the way to the button which the Fragment A's adapter creates. Mar 30 08:40:25 I think this is probably best: Fragment creates View.OnClickListener, gives it to Adapter, Adapter sets it on Button. When View.OnClickListener fires, Fragment calls back to Activity, and Activity creates new Fragment. Mar 30 08:41:29 It's easy to reason about and flexbile. (It's also efficient if you're creating few View.OnClickListeners.) Mar 30 08:41:32 flexible* Mar 30 08:42:15 Also activity holding a reference to a listener in a fragment view is an awesome way to leak everythng from the adapter to the fragment itself when it gets replaced :) Mar 30 08:46:00 TacticalJoke: That looks cleaner, yes. Mar 30 08:47:56 Mavrik: I think my current way is the Adapter holding a reference to the Activity. But I am not sure if that makes things better or worse. Mar 30 08:50:39 TacticalJoke: So I can also isolate this in the Activity, by having a custom interface on the activity set as listener, and pass the listener to the fragment on its onAttach method? is that even cleaner? Mar 30 08:51:11 Yeah, I'd use that Listener pattern. Mar 30 08:51:28 I always use that for Fragments: keeps them reusable and simple. Mar 30 08:51:49 TacticalJoke: Ok, I think I have a better idea now, let's see if I can code it. Thank you. Mar 30 08:55:56 what's the "Proper" way to do this? http://hastebin.com/uhuhoquluj Mar 30 08:55:59 Why not use events? Mar 30 08:56:51 me? Mar 30 08:58:44 whoever has to do activity-fragment comm Mar 30 08:59:08 iprime: What's the difference between "events" and what is being described? Mar 30 08:59:46 I meant some libs like EventBus Mar 30 08:59:52 Oh. Mar 30 09:00:14 how can i detect if user swipe notification or not ? Mar 30 09:01:01 s9iper1: http://developer.android.com/reference/android/app/Notification.Builder.html#setDeleteIntent%28android.app.PendingIntent%29 Mar 30 09:01:17 s9iper1: http://developer.android.com/reference/android/app/Notification.html#deleteIntent read the docs Mar 30 09:01:48 thanks Mar 30 09:01:55 use google dude Mar 30 09:17:14 I use an eventbus in order to react differently a GCM message wether the app is oppened (display an alert), or closed/background (send a notification). It's working fine, but if the app the in the background, and the user come back to the app using the launcher button (and not the notification button), how can I detect that ? Mar 30 09:18:14 TacticalJoke: how does passing the listener from the Activity to fragment to adapter sound? Mar 30 09:19:43 I think it suffers from that issue Mavrik mentioned. Mar 30 09:19:49 has anyone tried that experiemental unit test feature yet? Mar 30 09:19:54 Syzygy__: Yes. Mar 30 09:20:13 claint: In any case, I think it makes more sense for the Fragment to define the OnClickListener. Wouldn't you say? Mar 30 09:20:28 The Fragment then decides that it'll call back to the Activity. Mar 30 09:20:39 is it a huge experimental mess or is it useable already? Mar 30 09:20:44 It works fine here. Mar 30 09:20:57 I'm using AssertJ with it. Mar 30 09:21:03 And sometimes Mockito. Mar 30 09:21:11 (And JUnit 4.) Mar 30 09:21:58 TacticalJoke: I think I ran into another problem, being, I have the data in a List that I have in my adapter that I want to pass back to activity (another design flaw I guess). And OnClick takes View only, which won't have that data. Mar 30 09:22:27 You could set something to the View's tag, perhaps. Mar 30 09:22:34 Then, in onClick, query the tag. Mar 30 09:22:43 You could set either the object or the position of the object in the list. Mar 30 09:23:02 (The Fragment would do this and then notify the listener.) Mar 30 09:23:33 Use an event bus for that stuff anyway. Mar 30 09:23:41 Significantly easier to wire up tablet interfaces Mar 30 09:23:50 Okay, I wasn't aware of Tags. I guess it is kosher to pass a few id's by using Tags. Mar 30 09:24:12 TacticalJoke: Thanks again. Mar 30 09:26:30 I kind of have trouble setting up the JUnit tests :/ http://tools.android.com/tech-docs/unit-testing-support step 6. doesn't highlight my test folder (although it did earlier, it doesn't happen anymore) Mar 30 09:26:40 blusky, there are sticky events Mar 30 09:27:01 iprime: any doc. on it ? Mar 30 09:28:11 https://github.com/greenrobot/EventBus/blob/master/HOWTO.md#sticky-events Mar 30 09:28:12 Syzygy__, do report if code coverage works :P Mar 30 09:28:21 Syzygy__: Which version of AS are you using? Mar 30 09:28:30 1.1.0 Mar 30 09:28:50 iprime: thx :) Mar 30 09:28:52 Syzygy__: Make sure you have "Unit Tests" selected in the Build Variants tool window. Mar 30 09:28:57 I have Mar 30 09:29:30 iprime: so I should send the event as sticky event, and check for it in my "onresume" method ? Mar 30 09:29:34 As long as Unit Tests are selected, it should highlight src/test/java as a test source root. Mar 30 09:30:13 blusky: sounds to me like there are easier ways to achieve what your trying to do Mar 30 09:30:20 oh yes, seems easier Mar 30 09:30:26 registerSticky may do the trick Mar 30 09:30:51 I assume that's a default? because I don't have any source sets defined in my project. Mar 30 09:31:42 Yeah, you don't have to define this "test source root" (I could be misremembering the name) that I'm talking about. Mar 30 09:34:02 alright, the drop down menu is disabled, it was stuck on "unit test", but after restarting android studio it's stuck on "android instumentation test" Mar 30 09:35:49 If it remains disabled check in settings (Ctrl+Alt+S) under Gradle > Experimental. Mar 30 09:37:46 that's not it, but apperently the android plugin reset itself to 1.0.0 from the 1.1.0 I set earlier... weird Mar 30 09:39:31 seems to work fine now Mar 30 09:56:01 So, trying to run unit tests, I'm faced with the issue that it wants to run some tests for some submodules too, specifically mopub, and there it won't recognize the libraries (e.g. error: package org.junit does not exist). How can I stop that from happening? Mar 30 09:56:22 preferably without changing the submodule Mar 30 10:06:04 Is some can tell me how it is possible for a drag listener to receive events that was not suppose to arrive to him ? Mar 30 10:07:42 probably a case of a nosy drag listener ) Mar 30 10:08:33 woops Mar 30 10:08:35 my bad Mar 30 10:08:38 didnt read that Mar 30 10:08:41 "the system sends a drag event with action type ACTION_DRAG_STARTED to the drag event listeners for all the View objects in the current layout." Mar 30 10:09:19 sounds logical Mar 30 10:09:47 yea now that I know how to read ^^ Mar 30 10:09:48 This is a good RTFM xD Mar 30 10:10:20 blusky, did that work out for you? the sticky event thing Mar 30 10:32:09 iprime: i'm mainly documenting myself right now :) will implement it later tonight :) Mar 30 10:32:39 but Napalm is suggesting me to use a static attribute somewhere to store wich activity should handle notification, instead of using eventbus Mar 30 10:34:06 that's indeed an option, depending on what you want to do Mar 30 10:42:47 is this for fragment to activity communication ? Mar 30 10:43:13 or is it interfragment communication? Mar 30 10:43:29 Hey guys! I have an svg for the launcher icon, what dimensions should I export it with? I've tried with MDPI at 160x160px, but the icon looks bad on my tablet Mar 30 10:43:30 interfragment comms i would use event busses Mar 30 10:43:39 but for fragment to activity i would use listeners Mar 30 10:43:49 I'm surely missing something, I don't quite understand how dp and dpi works Mar 30 10:43:50 so that the right activity does the job Mar 30 10:44:32 Mattx, i am sure others would correct me if i am wrong but i still use the android asset studio to make my launcher in all the sizes Mar 30 10:44:56 I tried in fact, but the icons are really small Mar 30 10:45:32 for instance the icon in the ImageView in the splash activity looks blurry Mar 30 10:45:44 !ALERT Mar 30 10:45:51 splash activity? Mar 30 10:45:57 why would you even? Mar 30 10:46:03 or is this a requirement from the business? Mar 30 10:46:12 couple of reasons, doesn't matter much Mar 30 10:46:23 well it matters if someone needs to use the app Mar 30 10:46:25 (server sync) Mar 30 10:46:30 then they have to wait for the splash Mar 30 10:46:50 and even while using the app and leaving it open when the system kills your app and then restores it, it has to do the splash again Mar 30 10:47:12 server sync should best be done with a sync adapter and the ui should be responsive Mar 30 10:47:33 lemonxah, can you check the dimensions of any of your mdpi icons? Mar 30 10:47:33 indicative of a server sync that is happing like a rotating sync button in the actionbar or some other place Mar 30 10:48:16 I meant, mdpi launcher icon Mar 30 10:49:15 mdpi launcher icon is 48x48 Mar 30 10:49:20 which is normal Mar 30 10:49:31 if you want a high res version of it just include it Mar 30 10:50:14 i know i have no input on your design but just something to think about .. splash screens are very 90s and shouldn't have a place in 2015 :) Mar 30 10:52:19 this is a bit old but a decent read http://cyrilmottier.com/2012/05/03/splash-screens-are-evil-dont-use-them/ Mar 30 10:59:34 how can i delete the last item from edit text .. ass the backpress in keyboard? Mar 30 11:01:15 lemonxah, where did you learn splash screens are from the 90s? they look good! Mar 30 11:01:27 I'm compiling the app without splash to see what happens Mar 30 11:01:35 no splashscreeens are annoying Mar 30 11:01:46 +1 splashscreens drive me nuts Mar 30 11:01:49 "Branding fail. You want your app to seem an integral part of the device. Every time you show a splash screen you're reminding people that they're using an add-on -- an add-on they can replace with something less annoying." Mar 30 11:01:56 splash screens are evil and should die Mar 30 11:02:00 it has like 1 sec delay with a blank screen, while loading the views Mar 30 11:02:04 they take up precious time Mar 30 11:02:05 s9iper1: Why do you want to do this? Mar 30 11:02:15 I'm sure it's even worse than not having a splash screen Mar 30 11:02:23 Mattx, if your app has delay fix the delay dont slap splash screen Mar 30 11:02:31 yes Mar 30 11:02:32 cause splash screens makes everything slow and anoying Mar 30 11:02:45 TacticalJoke i am creating kind of calcultor. Mar 30 11:02:47 lemonxah, I can't fix a delay that is there because of the connection you have Mar 30 11:03:00 show a loading indicator or something Mar 30 11:03:04 you can though you can have loading indicators the first time Mar 30 11:03:09 then cache the data locally Mar 30 11:03:10 you should also implement graceful degredation -- not everyone's connection is fast... not everyone will even have a connection Mar 30 11:03:11 and update as you need Mar 30 11:03:19 One way is to simply the text to be a substring of the current text. Mar 30 11:03:20 then you will never have a slow startup again (visually) Mar 30 11:03:26 I have an indicator in which the logo of the app is shown, it just happen to be called "splash screen" :P Mar 30 11:03:39 the app will just work in the eye of the user there is no startup time cause he can open it and start using it Mar 30 11:03:59 but that will always start when the app starts? Mar 30 11:04:17 yes, it'll be shown for exactly 1 second Mar 30 11:04:24 TacticalJoke any other way i wanted same as backpress works in android keyboard Mar 30 11:04:30 (I'm willing to remove it, just want to discuss this a little bit) Mar 30 11:05:29 no exactly 1s, sometimes it's faster, but let's assume.. Mar 30 11:05:56 Not sure. Have you tried ? Mar 30 11:05:59 s/OM/om/ Mar 30 11:06:36 ok i am trying it. thanks :) Mar 30 11:06:56 btw, facebook and skype apps on android have splash screen, lemonxah Mar 30 11:07:04 nope they dont Mattx Mar 30 11:07:07 they used to Mar 30 11:07:14 I should upgrade then :P Mar 30 11:07:19 prob Mar 30 11:07:23 test device, not sure what version it has Mar 30 11:07:24 i dont have splash on either of the 2 Mar 30 11:07:36 Looks like dispatchKeyEvent might work (though I only looked quickly). Mar 30 11:07:38 only on first start ever when i have to log in Mar 30 11:07:47 even cold starts on those apps dont have splash Mar 30 11:08:27 longshot question: Anyone know how I can color a menu item in my toolbar/actionbar? I've tried to style my inside my resource file, but that doesn't offer any options for styling Mar 30 11:08:49 how do you want to color it? Mar 30 11:08:54 i'd like to use a custom selector on it, but I can't set my selector as a drawable on the Mar 30 11:09:09 just one item with a custom selector? Mar 30 11:09:09 simple an "on_press" for instance Mar 30 11:09:18 for simplicity, yes Mar 30 11:09:51 but only for 1 menu item the others should look different? Mar 30 11:09:53 can easily get the item through the ID and simply set it programatically, but it has to be possible to do it with xml Mar 30 11:10:05 nope, all items should have this "on_pressed" effect Mar 30 11:10:20 that can be done in the style / theme Mar 30 11:10:28 not in the menu.xml Mar 30 11:11:43 let me try that, hold on :) Thanks for the input lemonxah Mar 30 11:13:29 Troffel, depends on what you are using Mar 30 11:13:41 if you are using Toolbar this wont work but if you are still using the actionbar Mar 30 11:13:41 http://jgilfelt.github.io/android-actionbarstylegenerator/#name=example&compat=holo&theme=light&actionbarstyle=solid&texture=0&hairline=0&neutralPressed=1&backColor=E4E4E4%2C100&secondaryColor=D6D6D6%2C100&tabColor=33B5E5%2C100&tertiaryColor=F2F2F2%2C100&accentColor=33B5E5%2C100&cabBackColor=FFFFFF%2C100&cabHighlightColor=33B5E5%2C100 Mar 30 11:13:45 then you can try that Mar 30 11:13:52 it will make the themes for you Mar 30 11:16:52 I'm using a toolbar Mar 30 11:17:16 lemonxah, threw the menu bit in a pastebin http://pastebin.com/sHMgpGpf Mar 30 11:18:38 I might be far off, but really I'm just trying to make my toolbar behave like the standard actiombar Mar 30 11:18:48 with on_press effect on the menu items Mar 30 11:24:41 Hey Is there anyway in android to add effects to an already recorded audio and save it as awb ? Mar 30 11:28:13 glad_8989, don't think there's anything available for editing sound, out of the box atlas Mar 30 11:28:48 you can use every library that also works for java Mar 30 11:29:06 use the audio manipulation library of your choice Mar 30 11:31:37 Thnks danijoo, Troffel Could you suggest some libs that works well in android ? Mar 30 11:32:01 i havent done any audio manipulation Mar 30 11:32:20 but they _should_ all work Mar 30 11:32:33 glad_8989, don't have any experience with sound manipulation. but as danijoo says any java lib can work Mar 30 11:36:11 @Troffel thnks Mar 30 11:51:50 Is there a way to detect if a drag event as start from a special view Mar 30 11:52:27 to detect that the start drag was coming from a special id Mar 30 11:56:04 don't you get a ref to the view in the listener? Mar 30 11:56:43 oh you mean the initiator view Mar 30 11:56:50 I do but it's seems that I received always the same id Mar 30 11:56:56 yeah the initiator view Mar 30 11:59:17 how about querying the local state? Mar 30 11:59:21 you can pass an id there Mar 30 12:01:33 or have a more complex clip data Mar 30 12:03:50 So there is no way to detect with native function ? oO Mar 30 12:03:54 a bit weird Mar 30 12:09:08 What would be the best way to draw lines for a barcode to the screen? Mar 30 12:09:43 i'd use a canvas something Mar 30 12:10:14 or createa a custom view, still drawing on the canvas Mar 30 12:11:00 Ok thanks, I'm porting my app from iOS so still getting the hang of things. Mar 30 12:11:09 oh Mar 30 12:11:15 what did you use in iOS? Mar 30 12:14:16 iprime, I used CGGeometry to draw to a UIImage and displayed that. Mar 30 12:16:01 I was skeptical of Android Studio but I'm liking it so far compared to Xcode. Mar 30 12:20:11 oh Mar 30 12:20:21 you may like appstudio then Mar 30 12:20:32 app something, basically intellij for ios Mar 30 12:20:53 appcode: https://www.jetbrains.com/objc/ Mar 30 12:23:06 Did you guys hear about that big (I think) name joining the Kotlin team? Mar 30 12:23:13 MS guy, I believe. Mar 30 12:24:06 https://twitter.com/orangy/status/582137971224100865 Mar 30 12:24:43 danijoo: It's all sounding positive. :D Mar 30 12:25:34 so kotlin is the swift of android Mar 30 12:25:55 when used for andorid, that is :) Mar 30 12:25:55 Yeah, seems that way. :) Mar 30 12:26:12 It would be so cool if they publicly committed to it at IO this year. Mar 30 12:26:23 i thought groovy might have been THE swift.. Mar 30 12:27:53 yeah it needs Goog's endorsement to become useful Mar 30 12:33:35 someone please help me Mar 30 12:33:36 personally I'd like any swift-like Android language to be functional Mar 30 12:33:48 like scala Mar 30 12:33:52 SiPL: Are you drowning in quicksand? Mar 30 12:34:03 Im trying to build lollipop 5.1 for my xperia z Mar 30 12:34:10 this is my first time Mar 30 12:34:15 im a beginner Mar 30 12:34:24 iprime: anything more modern than Java would be good for me ;) Mar 30 12:34:42 SiPL: wrong channel Mar 30 12:35:00 BoD: which channel should i go to then? Mar 30 12:35:06 but java IS getting modern, kinda, sorta... ) Mar 30 12:35:20 We probably won't have Java 8 support for a long, long time. Mar 30 12:35:22 #android-root (as seen in the topic) Mar 30 12:35:35 And even then it'll probably require setting minSdkVersion to the 22 of that day. Mar 30 12:35:39 BoD: ty Mar 30 12:36:17 yeah... plus making the language evolve is cool but not as cool as starting from scratch Mar 30 12:36:29 you keep all the early mistakes Mar 30 12:38:19 Yeah, it's nice to avoid a lot of the baggage with a new language (although we can't avoid it *all* because Kotlin still targets the JVM). Mar 30 12:38:31 true Mar 30 12:41:04 Java is an upgrade for me. Mostly been working with Objective-C Mar 30 12:42:08 Objective-C has to be the ugliest language of all time. :D Mar 30 12:42:12 Beating even Brainfuck. Mar 30 12:42:28 At least Brainfuck code can look quite artistic. Mar 30 12:42:45 hahah :) Mar 30 12:43:09 I still like the shakespeare language Mar 30 12:43:52 or whitespace Mar 30 12:44:16 that escalated quickly Mar 30 12:44:30 TacticalJoke, The one thing I do like about Obj-C is that it reads like documentation. Mar 30 12:45:47 TacticalJoke, [barcode appendString:[NSString stringWithFormat: @"%@", parityEncodingTable[digit][[lefthandParity substringWithRange: NSMakeRange(i, 1)]]]]; Mar 30 12:54:22 -(id)doYouKnowTheMuffinMan:(TheMuffinMan *)theMuffinMan; Mar 30 12:54:39 lol Mar 30 12:54:49 credit where it's due: https://twitter.com/jjustice/status/244038956449140736 Mar 30 13:01:04 danijoo: Did you see this? https://twitter.com/orangy/status/582137971224100865 Mar 30 13:01:40 I don't really know who it is, but it sounds like positive news. :) Mar 30 13:01:48 (I googled and he appears to be an MS guy.) Mar 30 13:01:58 i was just asking myself "should i know this guy"? D Mar 30 13:02:00 :D Mar 30 13:02:04 lol Mar 30 13:02:40 im really happy to see how kotlin gets more and more attention Mar 30 13:02:45 Yeah, it's exciting. Mar 30 13:02:56 Hope it really picks up. Mar 30 13:03:00 yep Mar 30 13:03:08 great potential especially for andorid Mar 30 13:03:36 btw this critical android extension bug seems to be fixed now Mar 30 13:03:47 at least the issue state is now "fixed" Mar 30 13:03:58 Which one/ Mar 30 13:04:22 when you had a /layout and /layout-land, it didnt compile Mar 30 13:04:38 because it did something like val textView = R.id.textView from /layout Mar 30 13:04:38 Ah. Mar 30 13:04:49 and then tried to reassgn it again from layout-land Mar 30 13:05:04 seems like the old build just looped over all layouts or sth like that Mar 30 13:05:41 this: https://youtrack.jetbrains.com/issue/KT-7054 Mar 30 13:06:37 wow. this @vreshetnikov has a pretty impressive linkedin Mar 30 13:07:47 Member of C# commitee, .net foundation Mar 30 13:09:17 :) Mar 30 13:19:23 Hi! I need some help with Fragment back stack. I have a Fragment A which is added when activity starts, and B/C/D are loaded when clicked in NavDrawer. When in B/C/D, I want to go back to A when on back press. But if I add addToBackStack when loading B/C/D and navigate like A->B->C, back press goes like C->B->A, how do I make it go C->A or B->A if current fragment is B Mar 30 13:25:34 Hi all. Is it possible to check what's getting executed on the main thread (monitoring), I have 'skipped x frames' but have no idea what's doing much work on the main thread Mar 30 13:30:45 FrancescoV, traceview will show you Mar 30 13:30:48 systrace as well Mar 30 13:34:38 Marvik, ok thanks ;) Mar 30 13:49:30 Hi guys! Is there any ways to get .apk App Version from device? (not installed apk, just a downloaded file) Mar 30 13:51:49 ".apk App Version" ? Mar 30 13:51:58 what does that mean? Mar 30 13:52:09 woozly settings -> apps -> find your app and it displays the version Mar 30 13:52:23 memorion: Lol ) Mar 30 13:52:27 ah you didn't install it? Mar 30 13:52:47 1. I didn't install it. 2. I want to get App Version programmatically of course :] Mar 30 13:53:16 please explain fully what you are trying to achieve (and why) Mar 30 13:56:04 use aapt Mar 30 13:56:21 Hey guys, has anyone used FTPS? do we need any certificates on the client side or is it a simple configuration attribute to use "TLS/SSL" Mar 30 13:56:24 ... or you know... don't Mar 30 13:57:14 android_sandwich: FTPS has same issues as with HTTPS - same configuration options as well, afaik Mar 30 13:57:33 woozly, if you have the apk file you can parse it yourself, there are some projects to do it. it's not exactly trivial and it's an odd thing to try to do though. Mar 30 13:57:59 I've found excellent way: http://stackoverflow.com/a/17118923/528488 Mar 30 13:58:05 built-in tools Mar 30 13:58:19 just, PackageManager Mar 30 13:58:32 why are you wanting to do that? Mar 30 14:00:31 Can someone explain me how it's possible to get an action set at 3 (so it's an ACTION_DRAG_DROP) but the switch case doesn't get in my case ? oO Mar 30 14:00:35 https://www.irccloud.com/pastebin/TD99eRPI Mar 30 14:00:42 p_l, I see, any reference to how I would use it? I am right now using FTP and for that I simply pass in the address "ftp.companyname.com" without any additional configuration changes. Mar 30 14:01:23 BoD: I implement auto-update for my app without GPlay Mar 30 14:01:28 android_sandwich: you need FTPS capable client and server Mar 30 14:02:22 woozly: you want to update an app that was not installed? Mar 30 14:02:44 no one ? Mar 30 14:02:55 BoD: No, I want to compare my Installed current version to .apk version which I've downloaded earlier Mar 30 14:03:54 woozly, why do you download manually insead of using google play Mar 30 14:03:58 enterprise app? Mar 30 14:04:09 I have several buildTypes (dev, alpha, beta) defined in my build.gradle, the defaultConfig defines a versionName as something along the lines of "1.0.0", however I would like to append something according to the build type (e.g. "1.0.0-dev" for a dev build). Mar 30 14:04:13 danijoo: yeap Mar 30 14:05:34 If I add " if(variant.buildType.name == 'dev') { android.defaultConfig.versionName android.defaultConfig.versionName + "-dev" } " to the buildType -dev is added regardless of the actual buildType. Mar 30 14:05:42 any idea how I could make that work? Mar 30 14:05:45 Syzygy, you can do it with build flavors. I'm not sure about build types. Mar 30 14:06:22 applicationIdSuffix '.dev' Mar 30 14:06:32 in your buildtypes.debug{ } Mar 30 14:06:46 JacobTabak, won't that change your package name, not the version name? Mar 30 14:06:55 oh sorry Mar 30 14:07:03 u2020 has an example Mar 30 14:07:04 of that Mar 30 14:07:09 I'm also not quite sure about the functional differences between flavors and types. Flavors are for differentiation between device types (eg phon/tablet), types for alpha/beta? is that correct? Mar 30 14:07:10 but you might be able to put a version name in the build stanza as well. it works in flavor stanzas. It may work in build just fine too. Mar 30 14:07:48 I'll check it out JacobTabak Mar 30 14:07:53 https://github.com/JakeWharton/u2020/blob/master/build.gradle Mar 30 14:07:57 if that doesnt get you waht you want sorry Mar 30 14:07:58 not enough sleep Mar 30 14:08:13 yeah it probably doesn't Mar 30 14:08:29 i know you can do it w/ flavors, you just increase your complexity Mar 30 14:10:05 hmm, I guess it could work with the way it's implemented here Mar 30 14:10:27 android.applicationVariants.each { variant -> if (!BuilderConstants.RELEASE.equals(variant.buildType.name) { variant.buildType.applicationIdSuffix = "-" + variant.buildType.name } } Mar 30 14:10:43 top of the morning sir Mar 30 14:10:58 :) Mar 30 14:12:03 JakeWharton, I tried tht before as well, but it didn't work. I guess I could build the string kinda like you're doing in u2020 if I split it up in major/minor/patch and set the whole thing. at least that way it only has to be changed in one location Mar 30 14:12:24 I'll try that again though. maybe you did something different here than I did when I tried it Mar 30 14:25:21 Is there any free library available to use FTPS on the client side? Mar 30 14:25:40 JakeWharton, it's ignored while building. Mar 30 14:25:47 apparently. Mar 30 14:25:49 why does getTargetFragment() return not the target fragment, but the current fragment itself for me, after two orientation changes Mar 30 14:26:25 it works the first time, but on rotation back I get a class cast exception because I'm trying to cast the returned Fragment to something it's not Mar 30 14:39:31 I need a bg service that works once a week and updates some datas.Anyone has a good suggestion about background service ? Mar 30 14:40:20 sci-fic, sounds like a good job for sync adapter Mar 30 14:40:55 yes it is exactly what i will do :D i will sync some datas Mar 30 14:41:41 with sync adapter you can say "run this code in an async way once every week" Mar 30 14:41:50 and the adapter will run once a week Mar 30 14:42:07 if there is no internet connection, it will wait till there is one etc Mar 30 14:42:22 it does all the work for you, all you need is define it Mar 30 14:42:57 thanks bro you're awesome Mar 30 14:45:15 What does a Crunching Cruncher do and why is it failing? Mar 30 14:45:20 on an image Mar 30 14:46:32 I guess it hit a crunchy bit Mar 30 14:46:53 stackoverflow says you should restart android studio Anthaas Mar 30 14:48:37 Hmm, JakeWharton JacobTabak so I got neither of your solutions working. Mar 30 14:49:30 JakeWharton, android.applicationVariants.each { variant -> if (BuilderConstants.release.equals(variant.buildType.name)) { android.defaultConfig.versionName = android.defaultConfig.versionName + "-" + variant.buildType.name } } this should in theory work, right? it's within the android {} scope Mar 30 14:49:44 don't put it in android {} Mar 30 14:49:50 might be .all not .each Mar 30 14:49:51 i forget Mar 30 14:50:01 er Mar 30 14:50:09 no Mar 30 14:50:15 what you have is not even close to what I had Mar 30 14:50:27 what you had is not what i needed. Mar 30 14:50:47 i'm not trying to modify the applicationId, I'm trying to modify the versionName Mar 30 14:51:03 use versionNameSuffix then Mar 30 14:51:46 what's the correct scope? Mar 30 14:52:13 it doesn't matter Mar 30 14:52:15 just put it at the bottom Mar 30 14:53:08 ok Mar 30 14:53:32 the wharton says, it doesn't matter what your scope is Mar 30 15:23:20 wasn't aware I could just use versionNameSuffix in my buildType ... looking at stackoverflow as well as the suggestions here I'm not the only one who hasn't seen that though Mar 30 15:23:25 thanks JakeWharton Mar 30 15:24:16 it's in the docs Mar 30 15:24:31 http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Types Mar 30 15:43:07 guys I need some advice: I am following an android development Mar 30 15:43:08 when is the training on developer.android.com getting updated? most of it's still for pre-Lollipop Mar 30 15:43:08 course and at its end we have to realize an app to show what Mar 30 15:43:10 we've learned. Now, I have no idea on what app I could make, Mar 30 15:43:14 it'd be great if some of you could give me a suggestion. Thank Mar 30 15:43:17 you! Mar 30 15:43:27 damn sorry copy-pasting from irssi to irssi produces this mess Mar 30 15:43:53 doesn't irssi ask for confirmation when pasting 5+ lines? Mar 30 15:44:03 that's less than 5 lines Mar 30 15:44:09 anyway here it goes: guys I need some advice: I am following an android development course and at its end we have to realize an app to show what we've learned. Now, I have no idea on what app I could make, it'd be great if some of you could give me a suggestion. Thank you! Mar 30 15:44:09 exactly 5 Mar 30 15:48:42 gabmus: Create an app that lets people suggest their own app ideas for developers Mar 30 15:50:07 yiati: erhm... doesnt sound particularly clever Mar 30 15:51:53 I was joking Mar 30 15:52:07 although it has been made before for the web at least Mar 30 15:52:30 yeah, i got you were joking :^) Mar 30 15:56:52 actually, it was a great idea. You need an app for class, and nobody has ever done that. Mar 30 15:57:04 else, you can make a flashlight app.. :-/ Mar 30 15:57:13 or, maybe a unit converter Mar 30 15:57:20 nobody ever made those.... Mar 30 15:57:35 combined unit converter and tip calculator... if it's 28C outside, how much should I pay my server? Mar 30 15:57:47 Leeds, HAHAHAHA Mar 30 15:57:51 Perfect!! Mar 30 15:58:23 it's for class, I would do it for the giggles. Mar 30 15:59:11 gabmus, your job is the 1s and 0s, just take an idea an run with it. Mar 30 15:59:38 MikeWallaceDev: the unit converter is a decent idea, still i think i could do something better Mar 30 16:00:08 oh brother. We were kidding. Those are lame ideas that have been done a million times. Mar 30 16:00:13 someone on another channel suggested making a secure email app, that's a decent idea too, but still... let's see what we can get Mar 30 16:00:26 MikeWallaceDev: you know, a nice unit converter isnt that bad of an idea Mar 30 16:00:32 if it's just for a class, and not a graduating thesis, stuff like that is far far out of scope Mar 30 16:00:34 for your FIRST app??? yeah, that's a brilliant idea! Mar 30 16:01:10 gabmus make a unit converter with really dumb units, like "this distance would take a slug x days" Mar 30 16:01:17 listen up: it's not a class, it's a small competition organized by my local google developer group among amateur android devs, the winner gets a free moto 360 Mar 30 16:01:36 it's got to be something creative and interesting, even a little bit i guess Mar 30 16:01:55 in that case, it's up to you to come up with your ideas Mar 30 16:01:59 unless you're going to give us the moto 360 Mar 30 16:02:01 I would either do the : "app to suggest apps" idea (I think that's brilliant) or the tip calculator the calculates the tip based on weather and unit. Brilliant? No. Hilarious? Yes! Mar 30 16:02:19 i tried taking the way of an irc client but i dont have the time to figure out the Service class... Mar 30 16:02:38 memorion: could combine that with a Simpsons soundboard, with the famous quote from Grandpa Mar 30 16:02:39 pfn, we could split it up and each have a moto 90! Mar 30 16:03:33 wait, your app will be seen by and reviewed by devs? Definitely the "suggest an app" idea. Mar 30 16:03:44 make a time machine which can bring you into the future, you set the time you want to get into the future in hours and then it just displays a normal countdown Mar 30 16:03:51 :\ Mar 30 16:03:52 You can make a back end and everything Mar 30 16:04:10 memorion, :D Mar 30 16:04:12 I love it! Mar 30 16:04:49 what about a pushbullet like thing that sends notifications through wifi to your linux pc? Mar 30 16:05:15 pushbullet works on Linux... Mar 30 16:05:17 in chrome Mar 30 16:05:37 how much experience do you have gabmus ? Mar 30 16:05:53 and chrome notifications have their own place and dont get to the same place with other system notifications Mar 30 16:05:59 MikeWallaceDev: not so much Mar 30 16:06:04 https://www.pushbullet.com/apps exists for ubuntu Mar 30 16:06:25 then you should stick to reality mate :) Mar 30 16:06:41 how much time do you have? Mar 30 16:06:48 i dont use ubuntu nor my DE has support for indicators Mar 30 16:06:58 memorion: like 15 days or so Mar 30 16:07:21 so I'd be thinking tic-tac-toe... Mar 30 16:07:29 You still have a lot to learn Mar 30 16:07:56 I think a simple idea well executed is worth more than too much ambition Mar 30 16:07:58 do you have experience making graphics? Icons and such Mar 30 16:08:05 memorion, exactly Mar 30 16:08:27 ambition is awesome. Too much ambition will make you fail, and then hate programming :( Mar 30 16:08:42 MikeWallaceDev: yeah, got experience with graphivs Mar 30 16:08:49 phew, that's a big plus Mar 30 16:08:55 database? Mar 30 16:09:40 mh... not so much... i get how sqlite works but i'm really at the beginning Mar 30 16:09:55 yeah, quite wasting time Mar 30 16:10:05 ok, so not lots of data. Mar 30 16:10:14 you're not going to get anything done in 15 days Mar 30 16:10:23 run with simple Mar 30 16:10:34 nah, he can build "something" , but it has to be easy Mar 30 16:10:38 see the problem? i dont have any decent idea :\ Mar 30 16:10:52 http://en.wikipedia.org/wiki/List_of_humorous_units_of_measurement Mar 30 16:10:59 there are no decent ideas Mar 30 16:11:17 I'd go with the joke unit converter/tip/flashlight/sound board. Mar 30 16:11:23 You'd make a mark with that Mar 30 16:11:43 Not too hard, but you can get a lot with the humor factor :) Mar 30 16:12:03 thats not what i want to achieve you know Mar 30 16:12:13 just pick a random, simple top app and replicate it with your own twist. Mar 30 16:12:15 id want to make something actually useful Mar 30 16:12:30 in 15 days? As a beginner? Mar 30 16:12:34 amusement is useful Mar 30 16:12:38 gabmus, you're in over your head Mar 30 16:12:39 ^^ Mar 30 16:12:42 "kilohelen kh 103 Launch the equivalent of one million Greek warships and spark a nuclear confrontation" haha Mar 30 16:12:53 yep, over your head man. You're not thinking straight. Mar 30 16:13:21 the dunning kruger effect in action Mar 30 16:13:21 :\ Mar 30 16:13:38 well dude, you ask for help, we give it, you don't listen. Mar 30 16:13:51 As far as I am concerned : Next! Mar 30 16:14:41 whatever, youve tried at least. it's not like you _have to_ do this anyway Mar 30 16:14:53 thanks i guess Mar 30 16:14:59 <_genuser_> strange Mar 30 16:15:03 <_genuser_> mBW.write(orientation); System.out.println("writing out orientation: -"+orientation+"-"); Mar 30 16:15:22 <_genuser_> these two statements print out different values. mBW is a BufferedWriter and prints a space to the file. Mar 30 16:15:49 <_genuser_> while orientation is an int that prints a 0 from System.out.println Mar 30 16:18:01 the mBW.write method writes a space to a file, whereas the println method writes a 0 to the console? Mar 30 16:18:02 <_genuser_> ah, I see. mBW doesn't print an int with int is passed. Mar 30 16:18:28 <_genuser_> I think it treats int as integer value for a char. Mar 30 16:19:02 <_genuser_> when I do mBW.write(orientation+""), it prints a 0 to the file in that case. Mar 30 16:19:26 that's interesting Mar 30 16:19:35 Does anyone know how to update the time in a gregoriancalendar instance? Mar 30 16:19:38 duh Mar 30 16:20:01 Ankhwatcher, setTime... Mar 30 16:21:36 Ankhwatcher: you can't, TimeTravelNotPossibleException Mar 30 16:21:43 pfn: so to update the time in my GregorianCalendar I need to setTime(new Date()); ? Mar 30 16:22:48 I'm trying to replace a Time with a GregorianCalendar, so I'm trying to figure out the equivalent of .setToNow() Mar 30 16:23:50 you already have your answer, if you can't be bothered to look at docs for what was said, I can't be bothered to help Mar 30 16:25:30 if i have to send some data (a string for instance) to a device on the same network, what protocol could i use? Mar 30 16:26:12 pfn: dude I'm knee deep in docs, don't have a thrombo Mar 30 16:35:34 gabmus, at this point I would like to remind you that you wanted to make a secure email application, in 15 days :) Mar 30 16:35:58 ehrm, secure like protected with a pin, nothing crazy Mar 30 16:36:09 :) Mar 30 16:36:21 seriously what protocol can i use Mar 30 16:36:37 json/xml over http Mar 30 16:36:42 perfect Mar 30 16:36:46 thanks Mar 30 16:36:51 no problemo Mar 30 16:42:25 for a simple string, no protocol is needed Mar 30 16:42:33 write over tcp, done Mar 30 16:42:55 don't need xml, json nor http Mar 30 16:43:22 he'll want it soon enough, plus those are the most documented and easiest. Mar 30 16:43:41 sending a string via socket is easiest Mar 30 16:44:05 setting up an http listener on a device isn't exactly trivial Mar 30 16:44:18 you're assuming that he will always just need to send a string, I'm assuming he doesn't know his requirements and that they will grow Mar 30 16:44:38 he's clueless, start with basics Mar 30 16:45:01 he has 15 days, start with the most likely answer Mar 30 16:46:42 http://i.imgur.com/JilqHVS.png anyone know what font this is? Mar 30 16:46:51 comic sans Mar 30 16:47:09 https://www.myfonts.com/WhatTheFont/ Mar 30 16:47:48 I think either memorion works at Google, or he's the actual google algorith coded into an IRC bot Mar 30 16:48:05 neither Mar 30 16:48:48 but the site doesn't seem to like the image Mar 30 16:49:17 that's EXACTLY what a bot would say! Mar 30 16:50:03 MikeWallaceDev, the most likely answer isn't json and http Mar 30 16:50:36 simple string parsing and a tcp socket is easily achievable in hours Mar 30 16:50:57 whatevs Mar 30 16:51:02 especially for someone with no concept of design or architecture Mar 30 16:51:08 liuwenhao where is the image from? Mar 30 16:51:48 name an easy to use http server library for android Mar 30 16:51:58 memorion: http://40.media.tumblr.com/0d5d588e7409375d43f9b774592b7890/tumblr_ngodqroIOp1r2wjwko1_1280.png Mar 30 16:52:12 I really like that font. trying to find it. What the font didn't work for me Mar 30 16:52:48 liuwenhao http://www.whatfontis.com/ gave me some results but i'm note sure that's it Mar 30 16:53:18 liuwenhao maybe just a variant of roboto? Mar 30 16:54:43 liuwenhao might be roboto light, look here http://www.google.de/design/spec/style/typography.html#typography-roboto-noto Mar 30 16:55:15 I think you're right. The roboto ultra light and book 300 variants look very similar. Thanks! Mar 30 16:55:26 <_genuser_> can't believe you said design or architecture Mar 30 16:55:45 liuwenhao np Mar 30 16:57:27 is there by know an easy way to automatically deploy and android apk to the play store with maven? i remember trying this months ago and it was just an enormous pain. it was just a large series of errors with no solutions online.. i researched online and couldn't find anything new. does anyone of you have experience? Mar 30 16:59:40 Hi!, I need to create an image stripe at bottom, when user tap in an image appear full image in the middle of screen, there is already something made? Mar 30 17:01:01 fancy42, unsure about maven but there is a jenkins plugin https://wiki.jenkins-ci.org/display/JENKINS/Google+Play+Android+Publisher+Plugin Mar 30 17:01:25 seems easy with a LinearLayout and ImageViews as children Mar 30 17:08:50 quinnjn, sorry i'm unexperienced. would it be possible without a jenkins server to use it? or could i set up a jenkins server that only receives my apk and publishes it? Mar 30 17:11:39 fancy42, You'd need a jenkins instance running. If you're planning on setting continuous integration up just for this it's /probably/ not worth it. Here is a python tool that does what you want though https://github.com/onepf/AppDF/tree/master/tools/uploader Mar 30 17:11:46 One Month with Kotlin: https://medium.com/@ademar111190/one-month-with-kotlin-2d3d9bbd7840 Mar 30 17:15:03 quinnjn, we're building with team foundation server. i just need _anything_ that sends an apk to the play store. i have anything i want invoked from command line, but the deployment to the play store _has_ to be automated Mar 30 17:15:22 if that means jenkins or a python script, fine Mar 30 17:18:13 fancy42, sounds like running that python script will do you fine then Mar 30 17:20:02 quinnjn, i'm currently checking it out.. thanks :) Mar 30 17:22:01 What is the linux equivalent of HAXM called again? Mar 30 17:24:02 rexbutler, kvm / qemu Mar 30 17:24:16 KVM, right Mar 30 17:24:19 Thanks Mar 30 17:31:37 Does this channel have a log? Mar 30 17:35:14 Can't you just use logging with your IRC client? Mar 30 17:35:17 rexbutler: ask the people who are always here Mar 30 17:35:23 like TacticalJoke Mar 30 17:36:42 rexbutler, if you haven't heard of it, you should definitely check out irccloud.com... Mar 30 17:36:47 Error: Log unavailable. Please try again. Mar 30 17:36:48 rexbutler: any specific log? maybe i have it (there are no bots here) Mar 30 17:37:04 TacticalJoke: you owe me a reddit app! Mar 30 17:37:30 I was here on Friday and someone sent me a link I'm trying to find again. Mar 30 17:37:33 It's coming along well. Just taking forever. Mar 30 17:37:42 nock? Mar 30 17:37:44 *nick Mar 30 17:37:46 domain? Mar 30 17:37:54 hour in UTC? Mar 30 17:37:58 who's there? Mar 30 17:38:04 MikeWallaceDev: !!! Mar 30 17:38:12 oh, sorry, I though you said : knock knock Mar 30 17:38:30 MikeWallaceDev: your adb over wifi script made me happy yet again Mar 30 17:38:50 thepoosh, do you have the python version? That one is awesome :) Mar 30 17:38:53 thank you :) Mar 30 17:39:09 rexbutler, was it this: http://goo.gl/BMFCMI ? Mar 30 17:39:13 I think this channel is logged. You can google this channel's messages. Mar 30 17:39:39 MikeWallaceDev: i have the bash version Mar 30 17:39:46 there is a python one as well? Mar 30 17:39:49 the problem with the shell version is adding a second device. Now it detects when devices are already connected to wifi and adjusts the ports correctly Mar 30 17:39:56 pmarino: Yes! Thanks! Mar 30 17:39:58 wow Mar 30 17:39:59 cool Mar 30 17:40:00 yeah, I think it's in the scripts dir too Mar 30 17:40:01 link? Mar 30 17:40:10 rexbutler, no prob! Mar 30 17:40:52 thepoosh, wait up Mar 30 17:41:00 * thepoosh is patient Mar 30 17:41:14 * thepoosh is impatient Mar 30 17:41:19 ... Mar 30 17:41:40 thepoosh.setPatient(true); Mar 30 17:41:58 it's in BitBucket, let me just check if it is up to date Mar 30 17:42:03 * thepoosh throws new RegectedExecutionException() Mar 30 17:42:37 what scaletype should I use if I want to make it fitStart, except instead of starting at the top and left, I want to start at the top and middle of th screen? Mar 30 17:43:42 matrix ;) Mar 30 17:44:03 iprime: but in the matrix I have to give hard values right? I can’t just say “center of the screen” Mar 30 17:44:32 thepoosh, yeah, it's good : http://goo.gl/7iqJGU Mar 30 17:44:33 g00s: !!! Mar 30 17:44:43 thepoosh !! on vacation now ? Mar 30 17:44:49 yes and no Mar 30 17:46:06 g00s: going over pull requests Mar 30 17:46:14 g00s: https://twitter.com/orangy/status/582137971224100865?s=09 Mar 30 17:47:46 TacticalJoke, sorry to ask this again. but i'm looking at tools.google and don't see what you sent me. where's that page that has the gradle plugin versions on it? Mar 30 17:48:15 hi, how can i create a preference screen after clicking on settings in the action bar in lollipop? Mar 30 17:48:25 TacticalJoke: this is better -> https://twitter.com/mplappert/status/575957042466320384 Mar 30 17:48:28 TacticalJoke who is that ? Mar 30 17:48:50 maybe its called the android gradle plugin Mar 30 17:49:45 http://tools.android.com/tech-docs/new-build-system Mar 30 17:50:01 TacticalJoke oh he was from MS ? Mar 30 17:50:03 Not sure, g00s. Think it's some MS guy. Mar 30 17:50:05 Yeah. Mar 30 17:52:30 err anyone know how to get gaps between views in a linearlayout that uses weight? Mar 30 17:52:48 There's a Space class Mar 30 17:53:04 you can also use layout_margin Mar 30 17:53:08 you can use margins together with weight Mar 30 17:53:21 I’m sorry Mar 30 17:53:24 i meant get rid of gaps. Mar 30 17:53:43 in this case, dont use margins ^^ Mar 30 17:53:46 if you have gaps, then you have margins Mar 30 17:53:49 then there are no gaps Mar 30 17:53:49 there is a gap and I don’t want it there.. Mar 30 17:54:04 there is a margin in the parent Mar 30 17:54:09 for the toolbar Mar 30 17:54:17 can anyone tell me how to do settings right in lollipop? :) Mar 30 17:54:22 did u set all views to 0dp size and no padding in parent? Mar 30 17:54:29 ..maybe I’ll dig a bit deeper Mar 30 17:54:39 spots, theres no difference between lollipo and rest for settings Mar 30 17:54:51 last time i did it was 2.3 Mar 30 17:54:55 I’ll show xml, danijoo Mar 30 17:54:59 i think it has changed a bit :) Mar 30 17:55:06 spots, use a settingsfragment Mar 30 17:55:09 and a normal activity Mar 30 17:55:15 this way you can have an actionbar Mar 30 17:55:22 spots http://developer.android.com/guide/topics/ui/settings.html Mar 30 17:55:24 but besides that, nothing has changes Mar 30 17:55:28 you guys think that gradel update last week is good? Mar 30 17:56:42 danijoo: http://pastebin.com/E6pLYF6S Mar 30 17:56:53 there is a gap between two and three Mar 30 17:56:53 TacticalJoke, thanks! Mar 30 17:56:59 I dont use preview gradle releases any more Mar 30 17:57:05 they break my stuff in 3 out of 4 cases Mar 30 17:57:07 ok, thanks, i'll try Mar 30 17:57:42 tricknology, are u sure its not padding in the container? Mar 30 17:57:58 enable view bonds in dev settings and check Mar 30 17:58:06 I’m looking for that.. closest thing to padding is in the children Mar 30 17:58:21 a drawable which has padding.. but that’s grey. this space is white Mar 30 17:58:31 is it possible to get the object return from getPreferences() from the parent activity? Mar 30 17:59:03 also you can remove weightSum if sumOfChilds == weightSum Mar 30 17:59:17 figured that Mar 30 17:59:22 btu just to be save Mar 30 17:59:23 android:layout_gravity="bottom" might cause your gap. try it without setting that Mar 30 17:59:24 safe Mar 30 17:59:28 ok Mar 30 17:59:59 any used the new unit testing released Wednesday? Mar 30 18:00:07 negative, danijoo Mar 30 18:01:40 will continue checking children Mar 30 18:02:46 if u set show layout bonds on your device u can see if its children or not Mar 30 18:02:53 the gap is smaller on smaller devices, larget on larget Mar 30 18:03:01 how to tell? Mar 30 18:03:13 i know how to set layotu bounds but whats the indicator? Mar 30 18:03:27 a fat red line Mar 30 18:03:49 hey, come on man, it's just big boned. Mar 30 18:04:11 lol Mar 30 18:04:15 tricknology, I'm brining that layout into AS now... Mar 30 18:04:36 you may have to set some bg coolors Mar 30 18:04:51 tricknology, just set that damn developer setting Mar 30 18:04:52 somebody needs to pass this on to the android team https://rocketeer.be/blog/2015/03/api-quality/ Mar 30 18:04:58 then u dont need any colors at all Mar 30 18:05:07 in eclipse? Mar 30 18:05:13 device settings Mar 30 18:05:30 tricknology, it's a device setting. You can see the layout for ALL apps. Mar 30 18:05:56 nono Mar 30 18:06:11 i meaI have the dev setting “Show Layout Bounds" Mar 30 18:06:20 but that doesnt change the colors of the containers Mar 30 18:06:27 -_- Mar 30 18:06:29 i give up Mar 30 18:06:33 https://medium.com/@artem_zin/m-model-from-mvc-mvp-in-android-flow-and-mortar-bd1e50c45395 Mar 30 18:06:38 im confused :( Mar 30 18:06:38 what say you? Mar 30 18:07:06 wait a sec tricknology ... Mar 30 18:07:07 tricknology: if the colors don't change it might be because the layouts are greate Mar 30 18:07:43 eh? Mar 30 18:08:42 tricknology, I'm looking at your layout in AS, I don't see any gaps Mar 30 18:08:48 right? Mar 30 18:08:49 (between the framelayouts?) Mar 30 18:08:53 yes Mar 30 18:09:02 2 and 3 specifically Mar 30 18:09:03 no gaps. Mar 30 18:09:09 there are on the device Mar 30 18:09:11 (s) Mar 30 18:09:18 tab7 and nexus 6 Mar 30 18:09:34 smaller on N6 but larget on tab7 Mar 30 18:09:49 I'd remove the weightSum that might be screwing it up Mar 30 18:10:12 i guess u put something in that layouts Mar 30 18:10:16 fragments or sth? Mar 30 18:10:21 I did it’s the same Mar 30 18:10:23 and that layout gravity shouldn't be there either. Mar 30 18:10:33 i removed it, still same Mar 30 18:10:40 they are fragments, yes Mar 30 18:10:41 don't remove it then put it back, remove it. Mar 30 18:10:51 it removed it since I posed that pastebin Mar 30 18:10:55 cool Mar 30 18:10:58 one at a time Mar 30 18:11:01 maybe its padding in the frags Mar 30 18:11:53 if a background drawable had padding would it do that? Mar 30 18:12:08 and would it be the fragments 2 and 3 or any of them that could cause this? Mar 30 18:12:19 so you actually have this running on a device, then you should be able to see the layout with the developer settings Mar 30 18:12:29 yeah I can Mar 30 18:12:41 thin red line on top, fat red line on bottom Mar 30 18:12:58 looking on larger format device, easier to tell Mar 30 18:13:02 sec Mar 30 18:13:04 huh? lines should be all the same size... Mar 30 18:13:27 did you add all of the Fragments to the same container?? Mar 30 18:13:31 No, can't be that. Mar 30 18:13:34 no way Mar 30 18:13:48 buut.. i colorized the bakgrlounds Mar 30 18:14:14 backgrounds*.. 1 == black, 2 == violet, 3 == orange Mar 30 18:14:23 that whitespace is now violet Mar 30 18:14:33 so layout 2 is not stretching all the way for some reason Mar 30 18:15:01 anyone here on the robolectric team, or happen to know what they broke in the last 3 days to make all tests fail on the 3.0-SNAPSHOT? Mar 30 18:15:30 tricknology, your layout is stretching (you see the violet) your fragment is not Mar 30 18:15:47 dont use snapshots for production Mar 30 18:15:52 nah, i set the container background violet Mar 30 18:16:04 so the fragment (background grey) was not pulled down all the way Mar 30 18:16:21 i fould the culprit i think.. height of that fragment’s layout was wrap_content :( Mar 30 18:16:38 that's what I just said :D Mar 30 18:16:44 ah . yeaaaa that was is Mar 30 18:16:58 yeah that’s what you said Mar 30 18:17:03 danijoo: yeah, I know. It's not production yet. Needed features in SNAPSHOT Mar 30 18:17:07 thanks much. so silly Mar 30 18:17:26 TWSS Mar 30 18:17:30 so about those lines.. how do you read them? Mar 30 18:17:46 the lines are the outline of the layouts Mar 30 18:18:05 I wish AS would should padding and margins... Mar 30 18:18:09 yeah, bu they vary in thickness.. Mar 30 18:18:17 are they just stacked? Mar 30 18:18:22 they shouldn't, don't know what that is Mar 30 18:18:32 yes. they are stacked Mar 30 18:18:37 also, Alex Ruiz should come to this channel... Mar 30 18:18:44 child + parent = double thikness Mar 30 18:18:54 is it possible for an image view to touch the edge of the screen? I have an image view that is really big and uses alignparentbottom and doesn’t have margin, yet there is space between it and the bottom of the screen Mar 30 18:18:55 ok Mar 30 18:19:01 then the blue T's? Mar 30 18:19:11 or L's Mar 30 18:19:17 just corners? Mar 30 18:19:23 thin == child? Mar 30 18:19:35 yes Mar 30 18:19:43 cool, thanks everyone Mar 30 18:20:08 sorright. Mar 30 18:21:12 in_deep_thought: maybe look at scaleType Mar 30 18:21:35 lasserix_: ohh good idea. like fitEnd? Mar 30 18:21:58 or but wait, fitEnd, except centered instead of on the right side of the screen Mar 30 18:22:14 Hello Mar 30 18:22:23 I've to compile libsuperuser Mar 30 18:23:04 but I don't know how to use ./gradlew command Mar 30 18:23:06 Any ideas? Mar 30 18:23:18 you open your terminal Mar 30 18:23:22 ok Mar 30 18:23:28 and type it? Mar 30 18:23:32 I've typed it but I get errors Mar 30 18:23:48 what are you running? Mar 30 18:23:57 which task Mar 30 18:24:16 I've launched ./gradlew simply Mar 30 18:24:26 *symply ./gradlew Mar 30 18:24:36 **simply Mar 30 18:24:38 try ./gradlew assembleDebug Mar 30 18:24:39 you have to specify the task Mar 30 18:24:46 or assembleRelease Mar 30 18:24:48 ./gradlew *taskName* Mar 30 18:25:10 Gliese, ok Mar 30 18:25:12 cristian_c, and what OS are you using? Mar 30 18:25:18 *nix system Mar 30 18:25:23 ok Mar 30 18:25:32 its the same command for every os anyways Mar 30 18:25:32 I usually compile with ant and sdk Mar 30 18:25:34 the apps Mar 30 18:26:32 what the hell. just got an update for sublime text. Mar 30 18:26:33 Gliese, I'd like to find some examples Mar 30 18:26:36 can I trust my eyes Mar 30 18:26:44 to understand the correct syntax Mar 30 18:27:19 http://stackoverflow.com/questions/20114583/why-doesnt-gradle-wrapper-task-get-exectuted Mar 30 18:28:10 Gliese, I've asked also in #gradle channel Mar 30 18:28:25 but the guy doesn't work with android Mar 30 18:29:19 Gliese, before launching the command, have I to execute preliminary operations? Mar 30 18:31:26 cristian_c, what are you trying to do? is it libgdx project? Mar 30 18:31:52 what error message you got? Mar 30 18:32:25 Gliese, no, I've to use libsuperuser in an app I've written Mar 30 18:32:44 I've written an android app which uses libsuperuser calls Mar 30 18:32:52 but now I've to compile the app Mar 30 18:32:52 (forget about libgdx, wrong channel) Mar 30 18:32:58 and I need libsuperuser Mar 30 18:33:14 so if you do "./gradlew run" what happens? Mar 30 18:33:33 but I've only the libsuperuser source code (from github) Mar 30 18:33:58 give github link Mar 30 18:33:59 what error message you got? <--- for ./gradlew command? Mar 30 18:34:01 giveme* Mar 30 18:34:14 Gliese, I've not tried with run argument Mar 30 18:34:19 Gliese, ok Mar 30 18:34:42 Gliese, https://github.com/Chainfire/libsuperuser Mar 30 18:35:00 Gliese, a #gradle user has suggested me to contact the developer Mar 30 18:35:05 ok add this to your dependencies "compile 'eu.chainfire:libsuperuser:1.0.0.+'" Mar 30 18:35:13 in your gradle.build Mar 30 18:35:15 but he has not mail contacts for his stuff Mar 30 18:35:33 Gliese, I've installed gradle Mar 30 18:35:54 Gliese, do you refer to my app source code? Mar 30 18:36:03 *Gliese, do you refer to my app source code to? Mar 30 18:36:08 on your app source code, you have a file called "build.grade" ? Mar 30 18:36:20 gradle* Mar 30 18:36:57 I'm looking at this just now Mar 30 18:37:19 Gliese, yes Mar 30 18:37:24 build.gradle Mar 30 18:37:28 there is Mar 30 18:37:39 ok go inside that file, do you see anything saying "dependencies" ? Mar 30 18:38:00 Gliese, ah, no, I've created that file Mar 30 18:38:07 there wasn't Mar 30 18:38:22 I've created this file and added to my app directory Mar 30 18:38:35 dependencies { Mar 30 18:38:36 compile 'eu.chainfire:libsuperuser:1.0.0.+' Mar 30 18:38:36 } Mar 30 18:38:44 Gliese, I've added these lines Mar 30 18:39:03 Gliese, there are only these three lines in the file Mar 30 18:39:09 that will compile superuser lib, but I think your project structure is not good Mar 30 18:39:25 Gliese, I'd like to solve Mar 30 18:39:29 do you have any file called "griddle" on your app source directory? Mar 30 18:39:34 gradlew* Mar 30 18:39:55 no Mar 30 18:40:09 so it will never work Mar 30 18:40:10 there is .gradle directory Mar 30 18:40:16 is it a new project or old project? Mar 30 18:40:40 but I think it was created when I tried to launch ./gradlew Mar 30 18:40:47 Gliese, old project Mar 30 18:41:01 Gliese, I've created the project via sdk Mar 30 18:41:15 as described in android developers official website Mar 30 18:41:24 android project etc... Mar 30 18:41:42 sell it to me Mar 30 18:41:50 gradlew stands for "gradle wrapper" so you can run it without installing gradle on your computer, but you have to have it Mar 30 18:42:15 how did you convert your "old project" to gradle-based project? Mar 30 18:42:21 you are doing it manually? Mar 30 18:42:46 http://developer.android.com/tools/projects/projects-cmdline.html Mar 30 18:43:12 if the project is not to big, I would advise you to create new project on android studio (this will generate all gradle files you need) and the copy past relevant java classes Mar 30 18:43:15 too* Mar 30 18:43:16 Gliese, I think I should convert it Mar 30 18:43:26 Gliese, it's a little project Mar 30 18:43:27 them* Mar 30 18:43:34 so do this way Mar 30 18:43:53 create new android studio project, run it (hello world activity) and after you run it sucessfully Mar 30 18:43:57 Gliese, I've found this: http://developer.android.com/tools/building/building-cmdline.html Mar 30 18:43:59 start copying your java classes to new project Mar 30 18:44:27 yes cristian_c but your project is not ready for gradle Mar 30 18:44:35 if you create project from android studio, that commands will work Mar 30 18:45:42 and get some gradle basics: http://blog.stylingandroid.com/gradle-part-1/ Mar 30 18:46:03 is not something you learn in 5minutes Mar 30 18:46:32 To build an application project that depends on one or more library projects, you can use the standard Gradle build commands and compile modes, as described in Building and Running. The tools compile and merge all libraries referenced by the application as part of compiling the dependent application project. No additional commands or steps are necessary. Mar 30 18:46:34 ok Mar 30 18:46:49 Gliese, I'll read gradle basics Mar 30 18:47:04 yes you should, otherwise you will be lost Mar 30 18:47:07 Gliese, I know it's not a 5-minutes stuff Mar 30 18:47:25 Gliese, I thank you very much for all the advices Mar 30 18:47:35 you've given to me Mar 30 18:47:36 basics are simple, you can get it easily in 1hour reading Mar 30 18:47:49 no problem Mar 30 18:48:01 also a week , it would be just good Mar 30 18:48:04 :) Mar 30 18:48:37 if you want to take full power of gradle with groovy scripting etc yeah, but for building/compiling libs is fast to get it :) Mar 30 18:49:23 I know gradle uses groovy language Mar 30 18:49:46 but I've only to include the library in my project Mar 30 18:49:47 :) Mar 30 18:50:27 yes you have only to add this line compile 'eu.chainfire:libsuperuser:1.0.0.+' , and it will compile, but read 1 hour about gradle so you understand what is happening Mar 30 18:50:46 yeah, I'll do so Mar 30 19:00:39 is there a way to use Window.FEATURE_PROGRESS with ActionBar ToolBar? Mar 30 19:02:01 i'd like to display a loading bar under the actionbar toolbar Mar 30 19:02:02 I would liek to teach my sister how to code.. what si a good book for someone who has no idea how to code whatsoever? Mar 30 19:03:01 Can't you just use a ProgressBar? Mar 30 19:03:33 TacticalJoke: yes, but default ProgressBar has padding Mar 30 19:03:45 from the drawable 9 patch image it uses Mar 30 19:04:02 I want the progress bar to be flush against the actionbar toolbar. Mar 30 19:04:07 There is a way around that, but I'm not sure whether it's reliable. Mar 30 19:04:45 I've also forgotten what it is, but it's googlable. :D Mar 30 19:05:31 I have it implemented already as a custom drawable and feeding it to a ProgressBar. I was looking for other solutions and i found the example in this: http://developer.android.com/reference/android/webkit/WebView.html Mar 30 19:05:53 but the example in there might be a bit out of date Mar 30 19:09:50 https://code.google.com/p/android/issues/detail?id=78310 Mar 30 19:10:56 welp Mar 30 19:11:15 guess my implementation is the only other way Mar 30 19:13:02 it's kinda a bummer that this is well known pattern that hasn't been implemented as part of the framework. Mar 30 19:15:18 hi. Anyone knows a way to hide a AppMenu menu bar completely? Mar 30 19:18:58 pabloff9: like the icons on it? Mar 30 19:48:09 Hi folks Mar 30 19:50:05 desmin88, what are you doing here? Go press the button! Mar 30 19:52:28 which button is desmin88 pressing? quinnjn Mar 30 19:57:33 quinnjn: 4 8 15 16 23 42 ' Mar 30 20:01:30 have any android dev authorities commented on facebooks fresco lib? seems neat but im not sure if its all just fluff or what Mar 30 20:05:27 hey all Mar 30 20:06:43 I have these FrameLayouts that I’m animating and they are overlapping in a way that I don’t want them to.. compounding the problem I think is the LinearLayout that they are children of. I chose LinearLayout because the weight attribute is nice.. however, when I animate 2 up it goes over 1. I could animate just the child view but I would rather have the whole FrameLayout animate Mar 30 20:07:07 android really needs a Z order attribute Mar 30 20:07:14 elevation? Mar 30 20:07:22 heh Mar 30 20:07:22 no like bringToFront() Mar 30 20:07:23 desmin88 https://twitter.com/jessewilson/status/581235604740042752 Mar 30 20:07:26 but for z order Mar 30 20:07:33 android has z attribute since lollipop Mar 30 20:07:39 yeah that’s the problem Mar 30 20:07:49 I’m already targeting 4.2.2 Mar 30 20:07:51 you only need to wait 5 more years until every major phone supports it :D Mar 30 20:07:59 HAHA yes.. Mar 30 20:08:06 sadly Mar 30 20:08:06 memorion: thats hardly a sound argument Mar 30 20:08:29 so what do I do if I want one layout to slide under another one in a linearlayout? Mar 30 20:08:50 put them in a relativelayout? Mar 30 20:08:54 desmin88 https://twitter.com/romainguy/status/581241987656880128 Mar 30 20:08:56 tricknology, View#bringToFront() Mar 30 20:08:59 thats api level 1 Mar 30 20:09:06 no that does weird things Mar 30 20:09:07 memorion: thats better Mar 30 20:09:09 never used it though Mar 30 20:09:15 "Change the view's z order in the tree, so it's on top of other sibling views." Mar 30 20:09:16 more specifically it puts #1 on the bottom of the window Mar 30 20:09:21 yeah read further Mar 30 20:09:24 LinearLayout Mar 30 20:09:28 Can you use USB Debugging with the "OS Monitory" app installed? Mar 30 20:09:42 ah well... Mar 30 20:09:47 cant you use relative layout? Mar 30 20:09:50 would be fine if it were relative Mar 30 20:09:52 Monitor** -- It seems like it prohibits USB Debugging Mar 30 20:09:54 :/ Mar 30 20:09:59 but I need the layout_weight Mar 30 20:10:10 desmin88 here's are ally unprofessional one :D https://twitter.com/readyState/status/581356729276989440 Mar 30 20:10:15 or I like it, rather Mar 30 20:10:19 lol Mar 30 20:10:44 would be nice if there were a layout that just gave me all the attrs to use at my leiesure/detriment Mar 30 20:10:59 tricknology: above my skill level but maybe this will help: http://blog.neteril.org/blog/2013/10/10/framelayout-your-best-ui-friend/ Mar 30 20:11:11 amusing framelayout Mar 30 20:11:31 why do you need layout weight? Mar 30 20:12:09 so that spacing isn’t a beezy Mar 30 20:12:27 heights are nice Mar 30 20:12:46 (1)(1)(1)(5) is the weighting Mar 30 20:12:54 heights make sense when your layouts consist of stacked things Mar 30 20:13:01 is there a better way? easier? than weights? Mar 30 20:13:16 or at least something taht will achieve the same effect in RelativeLayout Mar 30 20:13:40 above/below leads to circular dependencies Mar 30 20:14:06 I wish there would still be hardware keyboards on smartphones Mar 30 20:14:12 ^^ Mar 30 20:14:18 i still have a decrepid droid4 for that reason Mar 30 20:14:28 hw keyboard > * Mar 30 20:14:44 nexus 5 with slideable keyboard Mar 30 20:14:47 myke i still have my droid1 :) Mar 30 20:14:48 that would be so awesome Mar 30 20:14:54 myke, that’s not really what I’mtrying to achieve.. the opposite really.. see how the grawer slides over? I want mine to slide under.. Mar 30 20:15:31 sigh.. guess I’m goign to have to make the RL work Mar 30 20:15:50 danijoo: i'll soon be exploring cases designed to hold a bt keyboard + phone Mar 30 20:16:20 myke, the problem with those is they make the phone twice as big :/ Mar 30 20:16:28 or are there actually useable ones? Mar 30 20:16:33 i'd definitly get one Mar 30 20:18:51 lol.. I’m just going to make the views slide over eachother and swap places. Mar 30 20:21:46 much easier Mar 30 20:26:31 <_genuser_> who has the oldest phone. is that what yall are comparing? Mar 30 20:35:00 weird.. getParent() is returning null but the parent is a FrameLayout.. Mar 30 20:35:20 are you casting it? Mar 30 20:35:32 yes Mar 30 20:35:50 to an incorrect type? Mar 30 20:36:07 no FrameLayout Mar 30 20:37:09 Hmm, my stack traces aren't being shown in my log cat :( Mar 30 20:38:07 Anthaas, asynctask? Mar 30 20:38:21 Nope :/ Mar 30 20:38:30 Just nothing whatsoever is appearing Mar 30 20:39:39 Got it Mar 30 20:39:42 maybe just wrong filters Mar 30 20:39:49 or adb bitching arround as usual :p Mar 30 20:39:53 Nah filter was fine - it wasnt running in debug for some reason Mar 30 20:39:56 adb wasnt connecting Mar 30 20:50:05 I never really cared for the keyboard on m droid 1 Mar 30 20:50:16 hardware keyboard sucks unless done right Mar 30 20:52:14 I think I solved the problem.. Mar 30 20:53:08 instead of using getParent() to get the container, I took it from onCreateView Mar 30 20:53:18 don’t knwo why it was returning null though.. the parent is the container.. Mar 30 21:09:23 g00s, you there? Mar 30 21:11:05 Hmm, changing android:colorPrimary in styles.xml has no effect :/ Mar 30 21:12:26 Anthaas: let me guess, AppCompat? Mar 30 21:12:26 You have to use 'colorPrimary' for < 21. Mar 30 21:12:38 I am at 21. Mar 30 21:12:49 Nope :/ Mar 30 21:12:51 not AppCompat Mar 30 21:13:15 Anthaas: should work, show code Mar 30 21:13:54 http://pastebin.com/4TqxcNyj Mar 30 21:15:35 Theme.Holo.Light.DarkActionBar Mar 30 21:15:39 holo? Mar 30 21:15:54 Yeah, that doesn't seem to make sense. Isn't 'colorPrimary' a non-Holo thing? Mar 30 21:18:00 Ahhh - thanks. Mar 30 21:18:16 Was meant to be on Material - forgot to change that (didnt know either0 Mar 30 21:18:17 )* Mar 30 21:18:46 Hmm no difference Mar 30 21:19:03 is there a good source for AOSP build-time configuration? e.g. setting the ScreenLock, Volume settings, etc? Mar 30 21:19:27 Kotlin Eclipse plugin alpha: http://blog.jetbrains.com/kotlin/2015/03/eclipse-plugin-alpha-is-out/ Mar 30 21:20:47 Is it really in their best interest to create a plugin for Eclipse? Mar 30 21:21:36 Anthaas: did you changed to android:Theme.Material? Mar 30 21:21:37 i guess they want the widest coverage possible for the language Mar 30 21:22:57 icedp: Yeah Mar 30 21:23:00 TacticalJoke: afaik Kotlin is not intended for Android only Mar 30 21:23:18 Anthaas: should work) check if your activity is really using this theme Mar 30 21:24:02 Under android:theme="@style/AppTheme" Mar 30 21:24:09 Not overriden in anywhere Mar 30 21:24:41 I found out the hard way that "emulator-x86" is not the same thing as "emulator64-x86". Mar 30 21:24:53 That's an easy thing for the eye to miss Mar 30 21:25:07 Anthaas: and you checked resource qualifiers too I suppose Mar 30 21:25:44 resource qualifiers? Mar 30 21:26:52 Anthaas: values-v21 and stuff Mar 30 21:28:16 icedp: Fixed. haha thanks man - never had to use them before. Mar 30 21:28:46 Is your minSdkVersion 21? Mar 30 21:28:59 Yeah was about to say, can I not delete the other one? Mar 30 21:29:22 Are you sure you want it that high? I actually posted a (text) Insanity Wolf meme about that the other week. Mar 30 21:29:44 Anthaas: you should have two folder values and values-v21 and have two styles.xml based Holo theme and Material theme. OR use AppCompat Mar 30 21:29:45 Its not actually going to get released any time soon, if at all - just for me to learn some stuff on Mar 30 21:30:30 oh, min sdk 21) ok then Mar 30 21:36:08 I missed this Kotlin talk before. She's using Android Studio. https://youtu.be/dJscNr1silY Mar 30 21:51:27 any ideas on why the emulator fails to start https://bpaste.net/show/92727504223a .. stuck at emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused .. Mar 30 21:51:34 what exatly should be listening on that port ? Mar 30 21:55:05 HMM .. seems to be some problem with newer kernels .. Mar 30 22:13:54 what do I do with getSupportActionBar if I’m not using appcompat anymore? Mar 30 22:14:13 do I still use ActionBarActivity even though I’m using a ToolBar? Mar 30 22:14:34 or just Activity? Mar 30 22:17:24 Can anyone comment on the free + paid app vs free w/ IAP's? Mar 30 22:18:56 will Mar 30 22:19:10 desmin88: in-apps can be used for subscription or for unlocking only certain features; or you can ask user to buy pro or buy pro + donate Mar 30 22:20:03 I'm mainly talknig of what is better for monetization, free w/ ads + paid separate apps or a free w/ ads and IAP to remove them Mar 30 22:23:28 the latter is generally considered better Mar 30 22:42:19 desmin88: your best option is to do IAP to get rid of the apps, that way you won't have a dump load of uninstalls of your free app Mar 30 22:42:28 to get rid of ads, sorry Mar 30 22:45:19 Chainfire + bankai_, thanks for the input :) Mar 30 22:46:18 http://droidagent.tk - The best monitoring software for android smartphones - Source Code Mar 30 22:47:11 yay Mar 30 22:48:38 wtf is "gravity" ? Mar 30 22:49:40 9.8m/s^2 Mar 30 22:49:54 It's what makes the bass drop Mar 30 22:51:17 jaja Mar 30 22:51:53 well... recently I've learned what really is "weight" in layouts, but there is a concept there that is called "gravity" and I can't find guides about it Mar 30 22:53:03 gravity is how containing objects are positioned when there is freedom, layout_gravity is how the layout itself wishes to be positioned in the parent Mar 30 22:53:04 That has to be a physics joke. Mar 30 22:53:17 "I know what weight is, but how does gravity work?" Mar 30 22:53:38 weight in android layouts is more like relative volume Mar 30 22:55:11 weight is just a really stupid naming ^^ Mar 30 22:55:15 "A LinearLayout respects margins between children and the gravity (right, center, or left alignment) of each child" (https://developer.android.com/guide/topics/ui/layout/linear.html) Mar 30 22:55:16 yeah, it's mathematical weight not physical, like in weighted average Mar 30 22:55:27 danijoo: no Mar 30 22:55:44 icedp: yes Mar 30 22:55:45 Does mediaplayer play rstp or m3u8 streaming video files? Mar 30 22:56:23 danijoo: "In Mathematics weighting -- making some data contribute to a result more than others " Mar 30 22:56:40 lasserix_, as far es I know, it can play rstp Mar 30 22:56:51 thats how people worked arround youtube player in the past Mar 30 22:57:05 icedp, its still an unintuivite naming Mar 30 22:57:34 not sure what the alternative would be. "mass"? Mar 30 22:57:36 and yes, thats an opinion :) you're quotes have no power here :p Mar 30 22:58:04 groxx, they could have just implemented something with % values instead of weights for example Mar 30 22:58:05 That stupid devlord was on moznet servers yesterday :/ Mar 30 22:59:07 you're = your :/ now i feel bad Mar 30 23:00:37 danijoo: what if you adding elements dynamically? that you won't have 100% at some point Mar 30 23:00:40 danijoo: like... "layout_percent"? seems pretty ambiguous Mar 30 23:01:33 is anybody else feeling like AS got slower with the latest update? Mar 30 23:01:42 aaahh.... seems "weight" is child dimension, and "gravity" is child position Mar 30 23:01:51 Afzal: no but I use stable channel Mar 30 23:02:05 icedp yeah maybe I should switch to stable now Mar 30 23:02:05 https://www.youtube.com/watch?v=C56druJtByI <-- here is explained Mar 30 23:02:25 icedp, weight is basically the same as a percentage. its just not normalized to 100% Mar 30 23:02:40 icedp what version is available for stable? 1.1? Mar 30 23:03:08 if i have 3 views its 33%, if i add a fourth, each has 25% (or 33% out of 133% if you want to view it like that) Mar 30 23:03:36 danijoo: but then you will have percents that is add up to 100%. I don't think it's more intuitive that established mathematical term Mar 30 23:03:42 *not add up Mar 30 23:03:54 i dont understand what you mean Mar 30 23:03:59 what is the difference to weightsum Mar 30 23:04:30 for weightsum u have a number that gives u max weight, and childs that have a part of it Mar 30 23:04:36 you can do the same with percentage Mar 30 23:04:39 without any difference Mar 30 23:04:59 danijoo: 33% out of 133% doesn't really mean anything Mar 30 23:05:18 desmin88, thats why 25% out of 100% is much easier there ;) Mar 30 23:05:45 i just added the latter one to show that its the same as weight basically Mar 30 23:06:54 danijoo: you have two view with weight 1 and 1. not you remove the second view. first view takes up all the space Mar 30 23:07:10 danijoo: with percents you need to change first view from 50% to 100% manually Mar 30 23:07:25 danijoo: the same happens if you want to add views. so that might be the motivation Mar 30 23:07:42 ah now i get your point Mar 30 23:07:46 and its a good one :p Mar 30 23:08:17 i still dont like the naming though Mar 30 23:09:11 weightsum is just to "simplify" cases where e.g. you want to set weight to a couple views, and let the rest share the remainder. e.g. if you have three views, one with weight = 1, and the parent has weightSum = 2, the weighted view will get 1/2 the screen without having to specify anything for the other views. Mar 30 23:10:16 out of interest, is there any performance gain of setting weightSum over letting the OS calculate it Mar 30 23:10:20 ? Mar 30 23:10:50 i should look into the source for that.. Mar 30 23:11:00 not that I'm aware of. and if there is, I would assume it's _incredibly_ minimal, because you're comparing "know the weight up front" with "loop over the views and get their weights and add them together", when it has to do that last part anyway. Mar 30 23:11:04 danijoo: LinearLayout first traverses widths and heights, then it do weights to assign free space that is left Mar 30 23:12:19 danijoo: nevermind, you asked not that I guess Mar 30 23:13:48 danijoo: hmm seems they have to be properly formed Mar 30 23:14:10 does anyone know if mediaplayer supports m3u8? Mar 30 23:14:43 http://stackoverflow.com/questions/15507398/android-mediaplayer-play-m3u8-only-audio-streamming Mar 30 23:15:03 it doesnt make a performance difference at all Mar 30 23:15:28 linearlayout sets mWeightSum from the typedArray Mar 30 23:15:42 than it calculates the weightsum from the childs no matter if its set or not Mar 30 23:16:27 and does a if(! mWeightSum > 0) mWeightSum = calculatedWeightSum Mar 31 00:08:29 if you a screen to scroll vertically as one big scrollview, but have a recyclerview (or listview) in that same screen. Is it okay (or even good practice) to just put outside views into that listview? Mar 31 00:09:31 for example, you have a view above the ListView, showing which one of the list items is "active". But you want that view to scroll as the user scrolls the listview, is okay good to put it as another type in the ListView? Mar 31 00:10:22 example in action: Gmail's Nav drawer, is it just one RecyclerView? Mar 31 00:16:52 Afzal: you should never have a listview inside a scrollview Mar 31 00:17:26 desmin88 yeah I know that part. I'm asking if it's okay to put the outside stuff in the listView so that they scroll together Mar 31 00:17:37 what do you mean by outside stuff Mar 31 00:18:02 desmin88 http://www.androidpolice.com/wp-content/uploads/2014/10/nexus2cee_Screenshot_2014-10-31-17-11-23.png Mar 31 00:18:14 like in that email, is the header part of the RecyclerView? Mar 31 00:18:17 those are all listview items Mar 31 00:18:19 yes Mar 31 00:18:24 just different item types, view holders, etc Mar 31 00:18:25 I see, yup, that's all I wanted to confirm Mar 31 00:18:28 thanks Mar 31 00:19:19 lol they released it! Moshi is here! Mar 31 00:19:19 it can be kind of a pain to do but yup Mar 31 00:19:47 desmin88 Yeah. Just wanted to see if there was a better way Mar 31 00:23:28 Afzal, gmail doesn't use recyclerview Mar 31 00:23:47 really? just ListViews and stuff then? Mar 31 00:23:55 yes Mar 31 00:23:59 why? Mar 31 00:24:07 if it ain't broke... Mar 31 00:24:12 Fair enough Mar 31 00:25:09 hello? Mar 31 00:26:04 Using the ACTION_OPEN_DOCUMENT intent, is there a way to request a specific document root for the user to browse? Mar 31 00:26:37 Afzal, if you're referring to the account switcher in that screenshot, it's a headerview on the listview Mar 31 00:27:17 canadiancow right, but to do that with a RecyclerView, you could just use a different item type, right? Mar 31 00:27:27 is that what a headerview in a listview is essentially? Mar 31 00:27:32 yes Mar 31 00:27:41 cool, then it's good Mar 31 00:27:42 if you look in the source for listview a header view is just a different item type Mar 31 00:27:47 yep Mar 31 00:50:31 heh. I just discovered a truly horrible way to detect the keyboard... Mar 31 00:50:58 getActivity().findViewById(android.R.id.content).getParent().getPaddingBottom() Mar 31 00:56:12 groxx: what. how even? Mar 31 00:57:36 or maybe it's two parents above the root content. anyway. above your setContentView is the android.R.id.content view. above that is a LinearLayout, which sets bottom padding == the keyboard, to constrain your views to the keyboard size. Mar 31 00:58:13 maybe it only exists temporarily, now that I think about it. but it's there on appearing / disappearing layout events Mar 31 00:58:49 (above the linearlayout is the PhoneDecor view, or whatever the classname is) Mar 31 01:07:55 Hey guys for some reason after I switched to using MaterialEditText's for my edittexts my keyboard doesn't show up anymore when I click on the edittext... any idea? Mar 31 01:08:39 Nevermind. Rebooted my phone and all's good now. No idea what happened :P Mar 31 01:19:07 groxx, don't assume that will work on all versions of android, or even on all devices at a given version Mar 31 01:19:40 canadiancow: yeah, I'm not :) it happens on 5.1.0_r3, never noticed it before. Mar 31 01:22:21 it's just horrible enough to be worth sharing though :3 Mar 31 01:37:43 I want to use cocos2d-x for Android, in order to keep a program multiplatform, such program should be write in C++, right? Mar 31 01:40:57 souliaq: come on, you can visit cocos2d official site Mar 31 01:42:46 heh. just got an OOM while building my app... methinks android studio has a memory leak somewhere: http://cl.ly/image/050r1s01013n Mar 31 01:42:52 really? Mar 31 01:43:18 My custom document provider is not working at all. None of the methods in my custom class are called when browsing documents - even though an icon for my provider does appear. Mar 31 01:44:25 The only bit of encouragement that I have is that when I call `getContentResolver().notifyChange(DocumentsContract.buildRootsUri(MY_AUTHORITY), null);` my `queryRoots` function is called. Mar 31 01:44:52 groxx: looks like you need more ram Mar 31 01:45:06 desmin88: apparently. a mere 16 is insufficient for a day's worth of coding :( Mar 31 01:45:21 peasant. Mar 31 01:45:26 64gb is the only way to go Mar 31 01:45:33 :'( I've learned my lesson Mar 31 02:42:39 hi Mar 31 02:45:12 Is there a way to start an app with adb and pass an argument so the app do something different? Mar 31 02:54:07 Mattx: you can send lots of different stuff with adb, what do you want to do? Mar 31 02:54:08 Mattx: `adb shell am start `. if you do `adb shell am help` you'll see the intent definition Mar 31 02:54:26 I'm trying now with -e foo bar Mar 31 02:54:27 or I guess "adb shell am" is enough :) **** ENDING LOGGING AT Tue Mar 31 02:59:59 2015