**** BEGIN LOGGING AT Sun Mar 06 02:59:58 2016 Mar 06 03:01:37 Most dependencies/libraries will be added to your module (app is the default module name) build.gradle file Mar 06 03:03:20 liuwenhao So if I understand it correctly Project it top level and apples to all modules in project? Mar 06 03:06:14 Pretty much; unless a library specifically says to add to your project build.gradle you won't need to mess with that file. Mar 06 03:07:14 Usually it's something like RetroLambda (which adds java8 style lambda support to android) where you would add to your top level build.gradle and then in the module build.gradle add apply plugin: 'me.tatarka.retrolambda' Mar 06 03:07:44 I'm sure someone else here can do a better job explaining, but hopefully you get the idea Mar 06 03:08:26 i wish they would have chosen different names when designing Gradle Mar 06 03:08:35 like project.gradle and module.gradle or something like that, it's pretty dumb Mar 06 03:09:06 fix: "java8 style lambda support support to android in JAVA" :P Mar 06 03:11:28 liuwenhao I see you point. Also in Android Studio (AS) when in Project->Android->Gradle Scripts they should label them Module:sctualAppName instead of Module:app. If you have multiple modules they will all be Module:app? But I think this is not grade this smells like AS :) Mar 06 03:12:16 you can name your module whatever you want, it's just called app by default Mar 06 03:12:23 in File->Project Structure Mar 06 03:45:46 hey guys Mar 06 03:46:21 I'm currently in the process of developing an android app but I can't seem to be able to pick a good UI design Mar 06 03:46:34 can anyone offer some advice from previous experience? Mar 06 03:47:12 sector_0: what do you mean by "ui design"? like "material design"? Mar 06 03:47:21 I'm not asking "how to design my app?".....I simply want pointers to take into consideration Mar 06 03:47:44 sector_0: https://www.google.com/design/spec/material-design/introduction.html Mar 06 03:47:50 is that it? Mar 06 03:48:16 not sure I'll take a look Mar 06 03:48:48 basically I've never developed anything serious for mobile, so I want tips on how to make my app ergonomic Mar 06 03:48:59 sector_0: ps. there's a menu on the left, on that site Mar 06 03:52:39 ok yeah, this site has a couple tips I can use Mar 06 03:53:20 also, I'm thinking about using a tile based system for the main menu Mar 06 03:54:03 ...how does that design paradigm fair in the mobile world Mar 06 03:54:08 s/fair/fare Mar 06 03:56:09 sector_0: sounds like a Dashboard ui Mar 06 03:56:27 sector_0: consider using cards for the "tiles" Mar 06 03:56:34 you might also want to read https://www.google.com/design/spec/patterns/navigation.html Mar 06 03:56:52 https://www.google.com/design/spec/components/cards.html < cards Mar 06 03:56:55 Napalm, yeah I'm reading through that right now Mar 06 03:57:41 https://developer.android.com/reference/android/support/v7/widget/CardView.html Mar 06 04:00:28 so the Android "standard" seems to be use a drawer menu instead of tabs, but I feel for a lot of apps the drawer is just overkill, and tabs are better to show the choices on screen all the time Mar 06 04:01:53 android has no standard Mar 06 04:02:14 tabs were deprecated, until they weren't! Mar 06 04:02:40 a lot of apps show a background image on the top 1/3 of the drawer. It looks pretty, but it's basically just there to take up space Mar 06 04:03:39 its often used as a header for account information, including profile pictures. Not to "take up space" Mar 06 04:04:10 well I don't see the need to see my own picture in google play store etc Mar 06 04:04:35 hagabaka: you would, if you used multiple accounts Mar 06 04:04:54 hagabaka: because it also acts as an account switcher Mar 06 04:05:03 but how many people switch accounts that often enough to warrant that? Mar 06 04:05:12 all the time Mar 06 04:05:23 plus its in the drawer Mar 06 04:05:30 to one side.. not to be look at all the time Mar 06 04:05:39 if it was in the app screen all the time.. then its another matter Mar 06 04:05:59 i dont think devs remember what android was once like pre-gingerbread Mar 06 04:06:07 those types of things were commonplace Mar 06 04:08:33 I think switching account belongs in the setting screen. But anyway, even if it's warranted for Google apps, what about all the other apps? Mar 06 04:10:18 hagabaka: it depends on the app.. i am not saying its incorrectly used or over used.. we all know this Mar 06 04:11:36 I think the problem is that so many of the Google's design guideline examples show drawers, so people feel like they have to follow it. I do Mar 06 04:12:45 and Android Studio (tries to) make that kind of design easy or obvious choices Mar 06 04:48:29 hagabaka and you'll see some apps use both at the same time : drawer is global nav, tabs are spaces in whatever space is selected in the drawer Mar 06 04:49:13 but look at the google+ app, its got drawer with just account switcher and settings, tabs for everything else Mar 06 04:49:25 man i feel like the google apps are really going downhill Mar 06 04:59:15 but i think the worst is youtube, with that one tab having a nav drawer-like pullout thing Mar 06 05:07:36 hello Mar 06 05:08:20 how do i list components in an app? ie. the ones i can use with am start .... -n ? Mar 06 05:15:03 how do i play a sound from the command line with no user interaction? Mar 06 05:22:40 Napalm there ? Mar 06 05:23:21 yus Mar 06 05:23:48 Napalm if one fragment adds another fragment to a view outside its own view, is the 2nd fragment a child ? Mar 06 05:24:22 where a fragment is placed in the view heirarchy doesnt determine if its a child Mar 06 05:24:39 its if its added to the childFragmentManager Mar 06 05:26:11 Napalm I have a navigation drawer swapping fragments (typical stuff), one of these fragments (A) will put another fragment in the right side nav drawer. not sure if i should be using fragmentManager or childFragmentManager Mar 06 05:27:40 g00s: can it exist on its own? Mar 06 05:27:45 if so.. then its not a child. Mar 06 05:28:05 ie) left side nav changes and right nav stays there Mar 06 05:28:23 tbh.. it sounds to me like it should just be a normal fragment and nothing to do with children Mar 06 05:30:25 ok, i dont think its nested either. thx Mar 06 05:33:03 Napalm: is there a simple way to play a sound file from the command line with no user interaction? Mar 06 05:33:20 delt: what do you mean command line? what are you on about Mar 06 05:33:39 Napalm: command line as in, the bash prompt Mar 06 05:33:55 delt: this is android-dev .. not bash Mar 06 05:34:28 no, this is sparta ! Mar 06 05:34:28 Napalm: exactly. i am trying to play a sound from the command line or a shell script Mar 06 05:34:53 delt: what type of file? Mar 06 05:34:59 wav or mp3 Mar 06 05:35:32 well just open the sound in an app? Mar 06 05:35:38 i'd like to have a command (maybe another script?) that i can use from my script with something like play_sound Mar 06 05:35:45 without user interaction Mar 06 05:35:58 delt: rly? you cant be serious? Mar 06 05:36:13 uh.... you know what a shell script is, right? Mar 06 05:36:35 yes duh.. but why the fuck are you asking in here and not simply googling that shit Mar 06 05:36:45 lol Mar 06 05:36:46 i've been googling that shit for 2 hours Mar 06 05:36:47 g00s: can you believe this dude? Mar 06 05:37:01 delt: you on linux? what distro? Mar 06 05:37:06 mint Mar 06 05:37:22 17.3 Mar 06 05:37:27 and what sound system does mint use? Mar 06 05:37:41 by default, alsa and pulseaudio Mar 06 05:37:54 well, use paplay myfile.mp4 Mar 06 05:37:55 well, use paplay myfile.mp3 Mar 06 05:38:09 um.... the android device is not using pulseaudio. Mar 06 05:38:15 wtffff Mar 06 05:38:22 g00s: man, shoot this guy Mar 06 05:38:35 wtf?? how old are you Napalm Mar 06 05:38:45 older than you Mar 06 05:38:50 ok thanks a lot Mar 06 05:38:53 you ask.. how to play a sound in bash Mar 06 05:38:58 i tell you.. then you complain about android Mar 06 05:39:13 and i even said.. "why are you asking here in android-dev" Mar 06 05:39:16 ffs Mar 06 05:39:23 lol Mar 06 05:39:27 that guy Mar 06 05:39:38 g00s: was i a bit too hard? Mar 06 05:39:53 Napalm nah, lets just kick him down the well Mar 06 05:39:59 lol Mar 06 05:40:11 his question was pretty vague... Mar 06 05:40:41 Napalm: is there a simple way to play a sound file from the command line with no user interaction? Mar 06 05:41:10 i mean i asked everything i could to break that down Mar 06 05:41:13 lol Mar 06 05:41:35 i think he wanted to play a sound from a script on a his linux box and have it come out on his phone? Mar 06 05:41:40 who the frick knows Mar 06 05:41:45 yeah, that's what I'm thinking Mar 06 05:42:25 venins: if you ask how to play a sound from a command line, i might just have to shoot you Mar 06 05:42:54 * Napalm shrugs.. "guess not" Mar 06 05:43:13 I'm not sure what he was googling for 2 hours. I found an adb command in one second Mar 06 05:43:32 oh rly.. Mar 06 05:43:53 adb push then adb shell am ACTION_VIEW file.mp3 Mar 06 05:44:01 something like that? Mar 06 05:44:27 i suppose you could push the raw pcm data to the audio device Mar 06 05:54:13 how to know /data use which file system? Mar 06 06:36:29 there's no way to just pull the app version number directly in XML right? I'd have to do it programmatically? Mar 06 07:00:01 http://hanhuy-acra.appspot.com/public/com.hanhuy.android.irc.lite/5e15a939df488d809f9be4c6cccb4686932243e6 Mar 06 07:00:13 neat, appcompat-v7 is broken on 2.3? Mar 06 07:04:35 http://reddit.com/r/androiddev/comments/493oqq/does_anyone_else_wish_you_could_comment_xml_out/d0pd5kr Mar 06 07:04:37 lol Mar 06 07:04:57 Oh, it doesn't show context Mar 06 07:12:01 grekkos: you just use BuildConfig.VERSION_CODE or BuildConfig.VERSION_NAME Mar 06 07:24:25 Napalm: I was mainly asking because I'm not sure where I can reference this view in code, it's in a NavigationView in a DrawerLayout... part of some generated code I was messing around with Mar 06 07:32:55 never mind I got it Mar 06 07:45:55 is there something built in to make a flexible divider? like I want a layout or fragment on the top of my activity and another one on the bottom and I want a divider that I can drag to change the size Mar 06 07:46:05 is there something out of the box or I should do it myself? Mar 06 08:09:06 grekkos: you have to do it yourself.. but its not hard.. all you need is a ontouchlistener Mar 06 08:30:50 Hey guys. Quick question/survey. How do you all usually organize your methods in an Activity/Fragment? Do you organize by Activity or Fragment lifecycle (i.e. onCreate at top, onStop/onDestroy at bottom) and every other method underneath the lifecycle methods? Mar 06 08:31:46 As my Activities functionallity gets more complicated and I deal with a lot more screens I need a good way to organize things Mar 06 08:31:57 So I need suggestions Mar 06 08:32:31 if grekkos comes back around.. can someone give him this https://gist.github.com/slightfoot/8f7f6eb70fe91a0a17b0 Mar 06 09:08:28 hello Mar 06 09:24:01 sylflo: hi Mar 06 10:02:25 Hi everyone, I’m trying to access the AssetManager in native C++ code. What I do is passing it through a jobject, but when I call `AAssetManager_fromJava` function to retrieve a C pointer to AAssetManager, the application crashes with the following message : `JNI ERROR (app bug): attempt to use stale global reference 0xc6 (should be 0x1000c6)` Can someone tell me how to fix this ? Mar 06 10:02:53 (of course, I’m passing a valid instance of java AssetManager to my jni code) Mar 06 10:03:28 I’m doing what he says => http://stackoverflow.com/questions/10941802/cant-access-aassetmanager-in-native-code-passed-from-java-in-wallpaperservice Mar 06 10:03:57 storing the AssetManager in the java class, then passing it to the native function Mar 06 10:34:05 my floating action button from android design library is not rendering in layout editor . it says classes cant be instantiated Mar 06 10:34:17 can anyone help me to solve this Mar 06 10:37:12 <_abc_> http://ianmurdock.com/platforms/babies-bath-water-and-open-platforms/ cross posted in #debian... I find it's sort of relevant to android ;) Mar 06 10:37:47 <_abc_> Let's see what dogfood Goopile will make of this now they are trying to accelerate (?!) updates and retain more control. Mar 06 10:39:42 _abc_ : wassup Mar 06 10:40:11 <_abc_> Was reading up on ian and what happened to him. Mar 06 10:40:18 <_abc_> Found that. Mar 06 10:43:41 _abc_ : nice blog Mar 06 10:44:13 _abc_ : are you aware of some kind of bug which makes FAB from the design library not to render in layout editor? Mar 06 10:44:27 hey, anyone know a thing or two about building APKs on a build server? Mar 06 10:44:38 <_abc_> Sorry, no. You know to whom the nice blog belonged, right? Mar 06 10:44:39 _abc_: i googled a lot , and found that may people are complaining that , Mar 06 10:45:26 I'm in the process of configuring teamcity to build signed APKs, I believe I have all the needed SDKs installed Mar 06 10:45:32 but I'm getting hung up on this error Mar 06 10:45:43 ##teamcity[buildProblem identity='1685986659' description='Execution failed for task |':app:transformClassesWithDexForCarterroRelease|'. java.lang.RuntimeException: com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: P Mar 06 10:45:44 rocess |'command |'/usr/lib/jvm/java-8-oracle/bin/java|'|' finished with non-zero exit value 1' type='gradleBuildProblem'] Mar 06 10:45:48 whoops, sorry Mar 06 10:46:23 basically it seems like the server is failing on transformClassesWithDex Mar 06 10:46:48 oh, hmm Mar 06 10:46:54 could it be because I'm building with java8? Mar 06 10:49:53 <_abc_> I don't know what causes that but normally you need to make sure all parts of the project and ide are on the same java version Mar 06 10:50:17 <_abc_> If you have more than one installed you need to manually select the right one for all to use. Else bad things can happen. Mar 06 10:50:23 <_abc_> Not sure if this is your problem. Mar 06 10:50:34 <_abc_> After you set the java version in the tools restart the ide Mar 06 10:51:02 I'm not building through the IDE, locally everything works fine Mar 06 10:51:06 this is on my build server Mar 06 10:51:14 I'm going to try setting the target Mar 06 10:54:17 what a pain this has been :) Mar 06 10:54:55 I wonder if it would be easier to install android studio on my ubuntu build agent and use that Mar 06 12:23:43 transformClassesWithDex has been running for 8 min now :| Mar 06 12:52:00 Lost: try using offline flag next time Mar 06 12:52:09 and get a better computer Mar 06 12:52:16 maybe try using a build machine Mar 06 12:52:49 thats what I'm attempting to do Mar 06 12:52:52 it builds fine locally Mar 06 12:53:01 but I can't get it to build on my CI server Mar 06 12:53:23 Hi everyone, I’m trying to access the AssetManager in native C++ code. What I do is passing it through a jobject, but when I call `AAssetManager_fromJava` function to retrieve a C pointer to AAssetManager, the application crashes with the following message : `JNI ERROR (app bug): attempt to use stale global reference 0xc6 (should be 0x1000c6)` Can someone tell me how to fix this ? Mar 06 12:53:31 (of course, I’m passing a valid instance of java AssetManager to my jni code) Mar 06 12:53:43 I’m doing what he says => http://stackoverflow.com/questions/10941802/cant-access-aassetmanager-in-native-code-passed-from-java-in-wallpaperservice Mar 06 12:53:53 (reposting, just in case :) ) Mar 06 13:04:27 I put everything into a SO post if anyone has some insight Mar 06 13:04:30 http://stackoverflow.com/questions/35827139/building-an-android-multidex-application-using-gradle-without-android-studio-on Mar 06 13:21:40 I want to port Cynogenmod to a handset with the unofficial versions of Android as of yet. I am willing to spend a lot of time tinkering (as this well be a project just for fun) but I'm concerned about bricking my device. Mar 06 13:22:06 If I have root and a recovery menu installed is it always possible to recover from an incomplete/non-working ROM install? Mar 06 13:22:32 Or do I need to be worried about rendering my device inoperable (I have time to devote to this, but not money). Mar 06 13:25:21 Perhaps the specific question I am asking here is, can the installation of an Android ROM alter the bootloader, leaving a recovery manager unable to boot? Mar 06 13:25:32 which library can I use to simplify mapping my app entities to sqlite tables? Mar 06 13:29:59 rretzbach: GreenDao, Realm Mar 06 13:30:05 there are many ORMs Mar 06 14:06:59 I think I figured it out now! Mar 06 14:07:29 All I have to do is use a web view and I can make an android app with a decent programming environment without ever touching java! Mar 06 14:07:31 yay! Mar 06 14:08:45 It runs! It's perfect. I can use assets/ as a web server practically Mar 06 14:09:25 fishguts, #android-root is probably what you want Mar 06 14:13:59 Hey folks! Mar 06 14:14:06 I'm trying to use getLastLocation() to find my location and then display the coordinates in a textView. I'm capable of updating the textView, but it appears that the value returned by getLastLocation is always null... any thoughts? Mar 06 14:20:36 Guys if I have a TextView inside a TableRow, and I've set the TextView's height and width to match its parent -- why is the textview still dynamically resizing according to its text?  Mar 06 14:28:39 Heffree: nothing guarantees that last location holds a value Mar 06 14:28:59 you should null check it and if null go through location services to get teh accurate location Mar 06 14:29:23 odraencode: thats not an application, its a website Mar 06 14:29:36 whatever floats your boat though Mar 06 14:30:05 thepoosh: Realm is not an ORM Mar 06 14:30:13 jvrodrigues: it's not a website, you don't need internet to access it Mar 06 14:30:24 web page then Mar 06 14:30:30 :/ Mar 06 14:31:16 I wish I could make a native android app, I really wish I could Mar 06 14:31:31 But android IDE is making me rage more than Netbeans Mar 06 14:31:55 And for some reason it's a complicated mess to get a XML file data in Java Mar 06 14:32:34 And I need to load a JSON file as a InputStream which is for whatever reason also complicated to turn into a string to make a JSONObject Mar 06 14:33:08 So if I extrapolate my experiences with this thing in the previous 2 days I can already tell this Java thing is going to make my life hell Mar 06 14:34:15 Also who the hell came up with the idea of auto closing quotes. Mar 06 14:34:53 I spend more time correcting the computer than I save with the aid of the computer, this is backwards. Mar 06 14:37:33 Alright, I got AngularJS to work in the webview. This is actually progressing. Unlike the time I tried to use Java. Mar 06 14:38:34 odraencode, whats complicated about processing xml files in java? Mar 06 14:41:36 ktwo: it's more complicated than opening a JSON file in Javascript. Mar 06 14:51:18 processing xml files isn't exactly easy in javascript either Mar 06 14:52:09 it's somewhat easy if the xml. comes through xhr, but arbitrary xml isn't Mar 06 14:53:49 Hey. Can anyone please help me with same origin policy? I'm loading a local html file with webview object, which executes a javascript that fetches data from a server with XMLHttpRequest. How can i disable the policy? Mar 06 14:55:59 hey. why do lots of git repos of android have a "studio-1.4-release" branch? i mean what is the reason for that branch (and similar studio* branches)? https://duckduckgo.com/?q=site%3Ahttps%3A%2F%2Fandroid.googlesource.com%2Fplatform%2Ftools%2F+studio-1.4-release&t=ffsb&ia=answer i mean they provide a separate repo for android studio https://android.googlesource.com/platform/tools/idea/ Mar 06 14:56:47 Neepu, wouldnt it be easier to change the server and add a cors header? Mar 06 14:58:30 ktwo, probly. But im forced to do it this way :( Mar 06 14:59:41 whats the reason for that? Mar 06 14:59:51 task assigned from tutor Mar 06 15:00:06 maybe you can just load the content in java and pass it back Mar 06 15:00:20 disable cors is not something you should be told to do, stupid tutor :E Mar 06 15:37:48 Hey guys is there any way I could divide the android:layout_width="match_parent" Mar 06 15:37:48 width that this attribute gets ? I'd like to set the layout_width="match_parent" / 2 in a sense. Mar 06 15:45:27 Psychiatrist, not like, that but maybe you can add dummy elements to achieve that Mar 06 15:54:14 Is it possible to avoid same origin policy, by binding javascript to native code? Mar 06 15:58:28 Neepu, yes as said before you can basically get the urls content via java and pass the result back to your js code Mar 06 16:00:49 Aye, sorry. Been researching still until now :p Mar 06 16:01:14 webview.loadUrl("javascript:methoddefinedinjscode('" + xxxx + "');"); this might help ;) Mar 06 16:03:58 is there a way , to say you want a bottomsheet to be x% of the screen height ? Mar 06 16:04:54 programatically for sure Mar 06 16:05:38 actually BottomSheetDialog, which doesn't have any docs ... :/ Mar 06 16:05:44 or with weight and linearlayout, or with space maybe Mar 06 17:14:37 ugh, if i want to submit a feature request for support lib, do i use "Feature request" (general bucket) or "Support library bug". how retarded Mar 06 17:15:20 why couldn't google organize their defect tracker schema around what pretty much everyone else has been doing for decades Mar 06 17:22:44 g00s is mad Mar 06 17:23:21 pretty much every defect tracker I've seen lets you specify the affected component(s) Mar 06 17:23:42 also makes it easy to query said components for issues Mar 06 17:23:42 https://code.google.com/p/android/issues/detail?id=202612 lolol so truye Mar 06 17:24:10 g00s, i made a ticket once about the issue repo, they said it's too old and they cannot change anything and closed the ticket Mar 06 17:24:12 lol , now that dude is mad Mar 06 17:24:39 "Google has hugre resources" ha Mar 06 17:25:26 adq lol that was great "You cannot make a development tool using Java." Mar 06 17:25:43 :') Mar 06 17:25:58 it's true however that AS is incredibly slow Mar 06 17:26:00 (and buggy) Mar 06 17:26:43 now there is not a single day where i don't click: "report to google" Mar 06 17:26:48 i agree. i'm not sure its more buggy than Eclipse + ADT, but its *definitely* much slower. I'm using the same machine today I did back in 2010, and it really struggles Mar 06 17:27:03 well they don't share the same bugs i noticed :p Mar 06 17:27:13 suckers Mar 06 17:27:40 i've got a decent computer it is slow as hell compared to anything i've used Mar 06 17:28:11 and i have to invalidate cache & restart few times per day too Mar 06 17:28:26 https://i.imgur.com/7deVkYH.jpg Mar 06 17:28:28 lol Mar 06 17:28:38 :D Mar 06 17:31:11 https://www.reddit.com/r/tifu/comments/495vr7/tifu_by_inquiring_to_apple_about_ibutt/ Mar 06 17:31:17 so much good stuff Mar 06 17:35:33 Hi. I'm working on a javascript to java interface. I've managed to pass data from javascript to java, but i want to pass data back to js. Would that be as simple as var s = InterfaceNAME.function();? given that the function has String as return value in java? Mar 06 17:35:51 Neepu, how's that related to the Android API? try ##java Mar 06 17:36:04 It's related because im working on an Android system Mar 06 17:36:05 Also there's built in js engine Mar 06 17:36:37 But technically your question isn't Mar 06 17:37:28 I mean, for ex. 'How to split a string' should be asked in ##java, and not #android-dev, even if I am working on an Android application Mar 06 17:37:37 Alright a more #android-dev related question then. Binding JavaScript code to Android code, does it go both ways? based upon http://developer.android.com/guide/webapps/webview.html Mar 06 17:38:18 idk, wait somebody else to answer that :P Mar 06 17:38:51 That is btw the same question, with more android keywords in the text. Mar 06 18:30:12 Napalm there ? Mar 06 18:30:56 adq feedback welcomed https://code.google.com/p/android/issues/detail?id=202658 Mar 06 18:33:09 nice suggestion g00s, but I doubt they will accept the extra work it requires since it's an external project Mar 06 18:34:02 i heard some ppl use a custom build of sqlite via the ndk also Mar 06 18:34:35 :O Mar 06 18:47:39 Makes more sense for the sqlite guys to create an android library than google Mar 06 18:49:40 SimonVT hm, i disagree. the current version has had a bug which causes crash on API 23 - and thats been out for a while. so i'm not sure how maintained it is Mar 06 18:49:57 Whether they do a good job is a different matter Mar 06 18:50:06 devil in details :D Mar 06 19:09:48 I have a custom video player in my app. I also have a custom overlay, which isn't correctly aligning with the player: http://explod.io/hosted/ratio.mp4 Mar 06 19:10:34 I don't know why the Overlay's properties: alignParent[Top|Bottom|Left|Right] doesn't seem to fit the target view (the player) Mar 06 19:11:11 Hello, I just got started with android development, and I've been having trouble with android-studio, specifically with the layout editor. I have a rendering problem "The following classes could not be instantiated." : android.support.design.widget.FloatingActionButton Mar 06 19:11:43 http://pastebin.com/DwV5Vauc Here is my landscape layout Mar 06 19:12:17 Would you happen to know why ? The exception is : android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x0/d=0x0} Mar 06 19:12:55 richard_wagner: what attributes have you set on FAB in xml? Mar 06 19:13:08 I use android studio 1.5.1 with JRE 1.7.0 Mar 06 19:13:10 richard_wagner only thing i can think of, make sure the correct theme is being used Mar 06 19:13:23 (both in your app, and from the previewer) Mar 06 19:16:58 explodes : I have android:id="@+id/fab" Mar 06 19:22:50 richard_wagner: surely there are more attributes Mar 06 19:25:34 g00s : I picked so that the two themes match, is that what you call correct ? Mar 06 19:26:09 yeah Mar 06 19:26:10 g00s : In my mind I may use any theme I want, or do some disallow the use of FloatingActionButton ? Mar 06 19:26:31 your theme probably has to inherit from appcompat one, not sure though Mar 06 19:27:13 Is it possibly to block the back button on a AlertDialog ? Mar 06 19:27:55 explodes : Yes there are more attributes, i set the following ones : id, layout_width, layout_height, layout_gravity, layout_margin and src Mar 06 19:29:03 hey, anyone familiar with building apk's on a build server mind taking a look at this? Mar 06 19:29:04 http://stackoverflow.com/questions/35827139/building-an-android-multidex-application-using-gradle-without-android-studio-on Mar 06 19:29:48 I want my Back button to not function as long as I am in a certain AlertDialog . Is that possible ? I have tried this -> http://stackoverflow.com/questions/8906269/alertdialogs-setcancelablefalse-method-not-working TO NO AVAIL Mar 06 19:35:36 Thank you for your help, It seemed that the theme I used "NoActionBar" was not compatible with the FloatingActionButton Mar 06 19:39:49 ANYbody know how I can override my ONBACKPRESS button when inside an AlertDialog ? Mar 06 19:42:28 dagger2 examples look so simple Mar 06 19:42:36 but I don't even know how to start haha. Magic Mar 06 19:42:44 simple and complicated at the same time Mar 06 19:50:32 Lost: did you try running gradle with the --stacktrace option? Mar 06 19:51:08 explodes, yeah that is with --stacktrace Mar 06 19:51:13 :/ Mar 06 19:51:20 Sorry man, I don't know what to do! Mar 06 19:51:34 I can't find anything useful in the stack aside from an assertion failure on java return 1 Mar 06 19:51:42 same here :( Mar 06 19:52:04 I assume I'm missing some kind of dep or something? Mar 06 19:55:23 how do I tell my activity which menu to use? I'm looking at this http://developer.android.com/intl/ru/training/appbar/actions.html all they say is to create the XML file but how will it put my actions in the toolbar? Mar 06 19:55:32 hey guys.. it's weird.. if I draw a Bitmap myself using setPixel(x, y, Color) I cannot manage to get a truly transparent color as Color.argb(255, 255, 255, 255) is white instead of completely transparent :x Mar 06 19:56:03 That because 255, 255, 255, 255 is white solid color. Mar 06 19:56:13 alpha at 255 is solid Mar 06 19:56:27 ah.. hm .. then when I do 0,0,0,0 I get complete black Mar 06 19:56:30 alpha at 0 is fully transparent Mar 06 19:56:37 lol AlmogBaku Mar 06 19:56:38 rip Mar 06 19:57:21 @grekkos - I use onCreateoptionsMenu (if that's what you are looking for) where I inflate the menu I made in XML using it's ID Mar 06 19:57:33 its* Mar 06 19:57:35 oh Mar 06 19:57:50 I override it and use MenuInflater Mar 06 19:58:11 AS generated one for me for some reason even though I (thought) I selected blank activity Mar 06 19:58:15 and I'm wondering how they're connecting it Mar 06 19:58:22 there are no usages of it in the code Mar 06 19:58:31 using the ID (R.id.some_menu_id) Mar 06 19:59:15 basically "MenuInflater inflater = getMenuInflater()" (that's a method in the AppCompatActivity class) Mar 06 20:00:05 and then inflater.inflate(R.id.menu_resource_id, menu) (the second param comes in as a method field "menu" when overriding onCreateOptionsMenu) Mar 06 20:00:24 ok Mar 06 20:00:26 thanks Mar 06 20:00:33 no problem :) Mar 06 20:00:44 I just started tinkering with some of their out of the box templates and I'm finding new stuff I didn't know existed haha Mar 06 20:01:35 and for icons should I prefer SVG or Png? does anyone know? Mar 06 20:02:14 build tools aren't going to handle svg Mar 06 20:02:30 options menu does not show icons by default Mar 06 20:03:01 in order to allow that you have to override onMenuOpened and use refloections to "setOptionalIconsVisible" to true Mar 06 20:03:10 this is for an action button Mar 06 20:03:19 so it should show when it's an action Mar 06 20:03:46 ah - well if the action button always displays (e.g. it's not stored inside a menu ever), then it'll work Mar 06 20:03:55 the android project generated a bunch of interesting drawables for me that are using paths, I'm wondering if I can convert the svg to a path somehow Mar 06 20:04:06 yeah that's all I care about if it's in the overflow it doesn't need an icon Mar 06 20:04:45 ah okay - I wanted an icon in the menu itself, too Mar 06 20:05:18 hm .. why does my Bitmap-image have a black background even though it shouldn't :x Mar 06 20:05:45 oh sick I just coverted it to a path Mar 06 20:05:46 that's neat Mar 06 20:09:49 Is Android Studio not stable on Windows? Mar 06 20:10:23 Aoi, did you create it with ARGB8888? Mar 06 20:11:00 http://developer.android.com/reference/android/graphics/Bitmap.Config.html#ARGB_8888 Mar 06 20:11:06 Most libraries I import into Android Studio don't work at all Mar 06 20:11:58 hmm. any suggestions for integrating gradle and cmake? Mar 06 20:12:14 seems i need to generate jni/Android.mk with cmake Mar 06 20:14:38 No one ever answers your questions here Mar 06 20:15:07 adq yes, of course Mar 06 20:15:37 but I am mapping.. the original only has a transparent color (so it's alpha mask is 1bit - pixels are either black or white) Mar 06 20:16:02 funny thing is: 32bit images render just fine.. 8bit+1bit alpha don't.. Mar 06 20:16:52 saqfish: not sure how many devs using windows actually Mar 06 20:17:02 Okay I am making an IRC client, so I have nicks TextView, and a 1dp vertical separator, and then a messages TextView, now I fill nicks/messages by adding newlines, however, when the messages exceeds the width of the screen, it goes wrapped on two lines, however, the nicks textview still has one line for the messages, and this causes an offset in the messages/nicks, how would I fix that? or what's the better approach? Mar 06 20:17:03 oh I am o.o Mar 06 20:17:10 (also mind rotating screen) Mar 06 20:17:22 "don't work at all" what does it even mean? :) Mar 06 20:18:02 also .. the libraries I currently have in my project work as intended Mar 06 20:18:18 vigilancer: I'm trying to use libraries like htmlunit, Selenium, and ui4j Mar 06 20:18:32 https://unsee.cc/diraboge/ Mar 06 20:18:46 I get multidex error and I've tried everything on stackoverflow Mar 06 20:18:47 This is a simple screen shot of my app (Don't mind the coloring or style or whatever, I am tryin got get it to work at first) Mar 06 20:19:38 so you use dagger, do I need to call inject inside any object I want to perform dependency injection? Mar 06 20:19:43 '* OverCoder captures a screenshot of that' gets wrapped, but nicks only reserve one line for that, so the ':P' lies on a line without a nick Mar 06 20:19:44 adq! I got it fixed, but I don't understand why... D: Mar 06 20:19:46 saqfish: this have nothing to do with how stable AS is Mar 06 20:19:53 if I inject it into the activity for example, do my fragments get DI too? Mar 06 20:19:56 lol, cool Aoi Mar 06 20:19:59 vigilancer: What does everyone use? Eclipse? Mar 06 20:20:20 saqfish: it's not about IDE Mar 06 20:20:29 it seems I wanted to manually binary combine the mask with the image, but it seems I did not have to.. Mar 06 20:20:30 What is it? Mar 06 20:21:19 anyway. if you pastebin at least stacktrace or some relevant info maybe someone pick up your question Mar 06 20:21:27 Okay Mar 06 20:25:34 http://pastebin.com/U5K7yV3p Mar 06 20:25:41 This is what gradle outputs Mar 06 20:26:25 I haven't written any code, just imported the library Mar 06 20:30:20 how do I change the color of the action menu vector drawable? actionMenuTextColor doesn't seem to work Mar 06 20:39:12 I want togenerate a number of similar model classes, each with a Builder that produces a pojo with only property getters -- is this something that should be fairly straightforward with @AutoValue? Mar 06 20:43:30 man .. haha .. the less bits an image has the more a bitch the image is to display... jeez Mar 06 20:43:53 especially if a 4bit image has its own color palette D: Mar 06 20:44:43 kommunicate: I've never heard of @AutoValue Mar 06 20:44:55 vigilancer, you around? Mar 06 20:44:58 sounds like a nice thing to have though Mar 06 20:45:07 are they so big they all need builders? Mar 06 20:45:11 grekkos: it looks like a substitute for lombok Mar 06 20:45:16 id like to apologize for yesterday lol i was in and out since i was working Mar 06 20:46:42 grekkos: i don't want to have a constructor with 50 billion things in it, but i want to make sure the member variables are marked final or only have getters in some way Mar 06 20:47:02 I guess that answers the question Mar 06 20:47:18 I know there's a builder plugin for intellij not sure how well it works Mar 06 20:47:44 ok Mar 06 20:48:24 is it just the builders you're concerned about or the whole thing? Mar 06 20:50:28 This multidex stuff is so frustrating Mar 06 20:51:49 im trying to resolve an error im getting, BadParcelableException. stack trace: http://pastebin.com/fsMcuCUB Mar 06 20:53:21 code here: https://github.com/drinfernoo/Gandalf/tree/reflow/library/src/main/java/com/drinfernoo/gandalf Mar 06 20:54:15 basically im trying to pass an ArrayList as a Bundle to a new Activity, with each of MyClass only having a few ints to wtite to the Parcel Mar 06 20:54:17 does anyone know how to tint an xml drawable in the toolbar? Mar 06 20:55:06 grekkos, can you do setColorFilter()? Mar 06 20:55:31 therse no communication of flags, include dirs, defines, between gradle and cmake Mar 06 20:55:36 ah right I guess I haven't tried programmatically yet, is there a way to set it via XML or it has to be coded drinfernoo ? Mar 06 20:56:04 grekkos, i think its android:tint, but i believe thats only on ImageViews Mar 06 20:56:05 or even compiler but it has to be same i guess Mar 06 20:56:19 maybe there is of compiler via some specified diretories Mar 06 20:57:01 drinfernoo: yeah doesn't work on and I can't wrap it in another drawable xml because won't support xml as a src Mar 06 20:57:48 hm maybe i can build all the cpp with cmake and only link with gradle Mar 06 20:58:01 damn wifi handoff Mar 06 20:59:40 oh sorry wrong chan Mar 06 21:09:38 anyone ever seen the BadParcelableException? Mar 06 21:09:46 Does anyone here have experience with using a search view in a collapsable toolbar? Mar 06 21:09:59 not yet :) Mar 06 21:10:31 It was working perfectly for me until I updated to app-compat 23.0.1 and now everything is going haywire Mar 06 21:11:57 konk3r, is it collapsing when it shouldnt be? Mar 06 21:12:14 It's actually collapsing fine, the issue is with the title Mar 06 21:12:19 oh Mar 06 21:12:32 nested scrolling was acting up in 23.0.1 iirc Mar 06 21:12:45 maybe try 23.2.0? Mar 06 21:13:13 The toolbar title is displaying over the search view when it appears, then disappears when the search view closes. It should be doing the exact opposite Mar 06 21:13:24 Oh, I didn't realize there was an update, I'll check it out :) Mar 06 21:14:30 idk if that'll fix it, but there update added some cool stuff with theming and support vector drawables, among other things ;) Mar 06 21:15:11 Oh right, sorry I was working on it last night and forgot my final breakthrough. The title is disappearing properly when the search view opens, it's just not redisplaying when it closes Mar 06 21:16:01 It looks like they updated the API so you can actually update the title by calling `setTitle()` in the activity instead of having to manually call it on the specific collapsable toolbar, which is nice Mar 06 21:16:22 dr_infernoo: Thanks, updating fixed it. Must have been a bug that slipped in Mar 06 21:16:46 sweet Mar 06 21:38:42 it's so silly I haven't done hardly any UI work in android and it slows me down so much compared to the actual programming hah Mar 06 21:38:49 need to work on my ui chop Mar 06 21:38:53 chops* Mar 06 22:14:45 grekkos: Haha I'm the same way. I spend so much time on architectural work that actual UI work is slow and frustrating Mar 06 22:15:26 yeah, i find hard to switch between them too. coming back to UI is always like "ugh, whats that theme attribute for xxx' Mar 06 22:16:02 i prefer to stay in the non UI parts; then when i have to do UI i'm like nooooo Mar 06 22:17:15 Animation can be fun though Mar 06 22:19:35 Does the Android TV API expose any way for external apps to control it (i.e. cast, remote, etc.) Mar 06 22:37:24 hah dagger2 compile errors are not very helpful Mar 06 22:37:42 once I finally get this linked up it should be cool Mar 06 23:02:35 https://www.reddit.com/r/dataisbeautiful/comments/498845/worldwide_smartphone_sales_android_at_80_oc/ Mar 06 23:17:52 hah dagger definitely makes the compile talke longer Mar 06 23:17:54 *take Mar 06 23:26:07 where do I call .inject() in a fragment? onCreate, onCreateView? Mar 06 23:42:31 anyone Mar 06 23:48:26 hello, i'm looking for some help with an android nfc issue Mar 06 23:56:25 please help! when stating an application from an NFC tag, my application doesn't show up in recent app, like it does if the app is started normally. i believe its to do with the intent filter. Mar 07 00:08:19 Hello, can someone help me out, this is my first time in the irc and im not sure how to go about asking a question Mar 07 00:14:12 just ask... Mar 07 00:20:13 ok, when launching an application from an nfc scan, why doesn't the application show up in the recent application list? is it to do with the intent filter being set to category.DEFAULT Mar 07 00:31:46 bah. Mar 07 00:35:35 * Mavrik did a mistake at looking at /r/androiddev. Mar 07 00:37:21 lukehhhh_: hey. did you fix your problem? Mar 07 00:38:11 Mavrik: whats the mistake? Mar 07 00:38:31 Eh, it's full of people being idiots. Mar 07 00:38:47 same as most places online there Mar 07 00:38:55 not really unexpected Mar 07 00:39:16 "No you can't ship native libraries in AAR since Gradle NDK support is experimental." Mar 07 00:39:20 ??? Mar 07 00:39:24 Napalm: not yet, still really struggling with it Mar 07 00:39:31 (16 upvotes) Mar 07 00:39:31 -_- Mar 07 00:39:48 yaay! I managed to properly apply a color map to a 4 bit image.. wohoo I am happy and proud! *jumps around and vanishes again* Mar 07 00:40:16 Aoi, yay :) Mar 07 00:40:35 Aoi: were you in here the other day talking about Image4J IndexColors? Mar 07 00:40:41 yeah Mar 07 00:40:43 ah Mar 07 00:40:46 cool Mar 07 00:41:07 congrats Mar 07 00:41:14 i think i left you some messages but you never answered Mar 07 00:41:17 I now can open an ICO file on Android, pick the images and display them in an ImageView (still need to support 1bit images) Mar 07 00:41:23 anywho. congrats Mar 07 00:41:30 oh .. hm sorry :X Mar 07 00:41:53 Mavrik: yea, i saw that too. and was like WTF Mar 07 00:42:09 I currently also had a problem that my 4 bit test image was "reddish".. but that's due to allowing negative values and not doing "& 0xff" with them.. now it works like a charm Mar 07 00:42:21 lukehhhh_: can you pastebin some code, perhaps we can explain what your problem is Mar 07 00:42:52 also I read lukehhhh_'s question, but sadly I have never used NFC - I am pretty new to android :/ Mar 07 00:43:02 (android development that is) Mar 07 00:43:26 Or like there was this guy having issues with long startup for MediaPlayer because he kept reloading a file... and the answer was "well let me link you few blogs about how Android latency is horrible and you can't fix it" *facepalm* Mar 07 00:43:45 No wonder everyone is looking desperately for Android devs with half a competence :P Mar 07 00:44:09 Mavrik: dont knock it.. it keeps us in business Mar 07 00:44:10 :) Mar 07 00:44:27 no worries Napalm, do you want the manifest too? Mar 07 00:44:33 hm I am usually doing Java EE development.. only doing android stuff in my spare time Mar 07 00:44:43 Napalm, *sigh* yeah. Still hurts me deeply :/ Mar 07 00:45:07 Mavrik: 5 years in, i've overcome most of the pain Mar 07 00:45:14 lukehhhh_: yea Mar 07 00:45:28 Aoi: you sir, need to come here more often then Mar 07 00:45:47 Aoi: JavaEE is much different from Mobile dev. most Java devs dont understand this. Mar 07 00:46:26 yeah that it is.. Mar 07 00:46:31 mind you, most of the devs that use IRC have a somewhat better grasp on things Mar 07 00:46:35 then again many things are similar, too Mar 07 00:46:40 so many just SO overthing Mar 07 00:46:51 Aoi: just wait and see Mar 07 00:47:14 I usually use SO at work and at home, too, but IRC is fun.. if there's something I know, I'll throw it in .. and perhaps get some help if I need it, too - which is awesome Mar 07 00:47:34 wouldn't have managed this as easily without you guys here and some friends over at c# on some other irc server Mar 07 00:48:10 heres the pastebin napalm - http://pastebin.com/q5Q39AeP Mar 07 00:48:53 Aoi: i use SO. i'm not knocking it. i'm just sad that so many see it as the source of truth for a problem. and so many dont even care to analyse the code examples and simply copy and paste and fudge it until it works. Mar 07 00:48:58 this is not the way to program Mar 07 00:49:19 lukehhhh_: are you using Android Studio? Mar 07 00:49:27 yes i am Mar 07 00:49:37 this has many bugs in your manifest Mar 07 00:49:41 Hi all. Quick question. What's the best way to implement a fullscreen progress dialog? I need something to cover the entire screen/fragment until the network data is finished loading. Any ideas? Mar 07 00:50:31 i'd .. not do that Mar 07 00:50:45 Make a framelayout as root that contains two view hiearchies - one is a nice animated loading graphic, the other is content Mar 07 00:50:45 set View.VISIBLE / View.GONE accordingly Mar 07 00:51:12 E.g. something like that: https://0.s3.envato.com/files/153899558/pvi_1/02%20Loading%20Screen.jpg Mar 07 00:51:16 Don't use modal dialogs. Mar 07 00:51:35 (There's also tricks to improve that.) Mar 07 00:52:08 g00s: why not? Mar 07 00:52:23 Mavrik: seems like a good solution, I will probably implement it like that Mar 07 00:52:26 general UX perspective, show /something/ Mar 07 00:52:26 liuwenhao: that is not the way to do it.. but if you have to. then simply create a new Dialog with the Theme.NoTitleBar.Fullscreen theme Mar 07 00:53:00 Napalm, i had no idea the manifest was buggy at all Mar 07 00:53:03 Dialogs mess with lifecycle, back buttons and are generally ugly Č= Mar 07 00:53:07 :) Mar 07 00:53:37 i haven't used a dialog in years :D but i guess these new BottomSheetDialogFragments might be useful Mar 07 00:54:04 nah SO is not always the truth.. Mar 07 00:54:40 SO is ok, just overrun with "lemme paste 1500 lines and please debug code for me!" posts lately :/ Mar 07 00:55:06 Also some posts have really aged, you still get 2.3 Android solutions for some things. Mar 07 00:57:29 lukehhhh_: lines 4 and 5 are not required.. they are specified in your build.gradle.. line 6 is not a permission. it goes in a tag. Line 9 has an extra terminating > which means the file will not even parse correctly. lines 12,13,14 can be terminated with /> rather than your Mar 07 00:58:10 lukehhhh_: your line 27 should be andriod:exported="false" not android:enabled="true" Mar 07 00:58:22 lukehhhh_: all compoents in your manifest are enabled by default Mar 07 00:59:19 lukehhhh_: line 45, your WebBrowserActivity is just a bad idea.. either launch a web-browser externally with a Intent or, use the new CustomTabs library Mar 07 01:00:44 lukehhhh_: do you actually use tags that contain NDEF records? Mar 07 01:00:52 lukehhhh_: i assume this is actually working for you Mar 07 01:01:54 yeah my tags are working correctly, i have 3 records stored to them, MIME, URI & AAR Mar 07 01:11:00 Napalm: any idea why an application wouldn't show up in the recent application list? is it because of the way an nfc tag will start an application Mar 07 01:11:19 lukehhhh_: sorry was helping someone else Mar 07 01:11:25 lukehhhh_: yea. sec. lemme check your code Mar 07 01:12:02 when starting from a tag, it also skips the onCreate method and goes straight to onResume Mar 07 01:13:29 lukehhhh_: thats because your activity already existed Mar 07 01:14:56 yep, was brought to front and onNewIntent was fired Mar 07 01:15:20 if it was brought to the front then it defo was in your recents list Mar 07 01:15:55 Mavrik: http://pastebin.com/q5Q39AeP < check it out.. scroll down to java code Mar 07 01:15:59 :| Mar 07 01:16:38 ok lukehhhh_: Mar 07 01:16:50 ah. Mar 07 01:17:33 lukehhhh_: first, move the content of your onNewIntent() into a new method called private void handleNfcIntent(Intent intent); Mar 07 01:17:39 fuck it. sec i'll do it Mar 07 01:17:40 its simpler Mar 07 01:18:30 thankyou, i'm still very new nfc and its handling Mar 07 01:20:53 i assume this is probably the reason as to why if i close the app after its opened from a scan that it immediatly opens again Mar 07 01:21:31 lukehhhh_: this is nothing special to do with NFC. its standard android. Mar 07 01:22:05 lukehhhh_: read this https://developer.android.com/guide/components/fundamentals.html Mar 07 01:22:23 lukehhhh_: and this https://developer.android.com/guide/components/intents-filters.html Mar 07 01:23:12 lukehhhh_: and probably this https://developer.android.com/guide/components/activities.html Mar 07 01:26:12 lukehhhh_: still here? Mar 07 01:27:10 yeah sorry, will do, i 'm still trying to graps most of those concepts Mar 07 01:27:55 lukehhhh_: i've sent you a pm Mar 07 01:55:07 how can I get 2 FABs next to each other Mar 07 01:58:05 when their parent is CoordinatorLayout, maybe i need a different parent then Mar 07 02:10:26 next to each other how? Mar 07 02:10:28 side by side? Mar 07 02:10:41 hm.. seems I finished the library for now.. it can open any kind of ICO file (1, 4, 8, 24 and 32 bit icons with and without transparency and/or PNG compression)... I wonder how to add tests there.. doing unit-tests does not seem too smart, but maybe an integration test.. Mar 07 02:24:41 Napalm ever use the netty bytebuf stuff on android? pretty convenient, dynamic sizing, etc. Mar 07 02:24:53 what's the latest version of adb? googling keeps telling me 1.0.32, but i've had that version for a year or more Mar 07 02:24:55 nope Mar 07 02:25:03 lame that nio byte buffers have to be allocated with fixed capacity **** ENDING LOGGING AT Mon Mar 07 02:59:58 2016