**** BEGIN LOGGING AT Mon Nov 16 02:59:58 2015 Nov 16 03:08:21 so I have two lines. SeekBar volControl = (SeekBar) findViewById(R.id.seekBar1); volControl.setMax(maxVolume); Nov 16 03:08:42 line two gives me an error. it says somethign about syntax error and whatnot. am i actually doing something wrong here? Nov 16 03:09:53 Rush2112: You should read error messages. Nov 16 03:10:31 I do, but I have no idea what "Type Syntax error, insert "... VariableDeclaratorId" to complete FormalParameterList" means Nov 16 03:11:21 Rush2112: What is the exact error message? Nov 16 03:11:44 I'm skeptical about the S in "syntax" being capitalised, for example. Nov 16 03:12:07 Anybody recommend any specific Android ORM? Nov 16 03:12:42 Oh, I guess "Type" is a column header. Nov 16 03:12:53 hang on, let me look Nov 16 03:13:47 My guess is that you're just adding code in random places. Nov 16 03:13:48 FWIW. Nov 16 03:14:32 http://hastebin.com/ivetokuvoq.avrasm I've also got an error telling me to add a } at 52 and remove the } at 58 which makes no sense Nov 16 03:14:36 As SimonVT would say, don't be an asshole Nov 16 03:15:00 wait nevermind, i fixed one of those but Nov 16 03:15:09 You need to learn Java. Nov 16 03:15:31 You can't place any old statement directly in a class's body. Nov 16 03:15:47 Hi. Nov 16 03:15:59 Wow, I just love my name. Nov 16 03:18:39 AndroUser: It's better to ask the channel. Nov 16 03:19:05 Already have, no responce. I was told to wait around 30 minutes before asking again. Nov 16 03:19:16 thats for swimming Nov 16 03:19:40 TacticalJoke: I looked at other example projects and some of them have all their code in the main class. i dont understand what i'm doing wrong with that statement Nov 16 03:19:45 I'm not sure which question was yours. :s Nov 16 03:20:06 Rush2112: You can't do that in Java. Nov 16 03:20:20 All you can do is initialize fields directly in the class: `private int foo = 5;`. Nov 16 03:20:35 It's no problem. I don't want to clog the chat with all of the information, so I much prefer PVing someone who is willing to help. Nov 16 03:20:50 AndroUser: What username were you using before? Nov 16 03:21:06 ecofriendly, I'm on my Android now. Nov 16 03:21:42 ok then. with what i have what do you recommend i do. where should i put that whole block of code about volume? outside of the class? Nov 16 03:23:25 Inside `onCreate`. But if you know this little about Java then Android is not going to make sense. Nov 16 03:23:46 argh Nov 16 03:23:52 i had it in there originally but someone told me not to! Nov 16 03:24:16 What were their exact words? Nov 16 03:26:10 i don't remember, it was a day or so ago Nov 16 03:26:11 TacticalJoke, you remember what the detail view of the pet looks like in my app? Nov 16 03:26:43 http://developer.android.com/guide/topics/sensors/sensors_motion.html so the block of code in here starting with onSensorChanged. that should also go in my onCreate, correct? Nov 16 03:27:05 Can anyone help me run a private method of a class on an instance of a child class? I'm doing mActivity.getClass().getSuperclass().getDeclaredMethod("invalidateCategories"); invalidateCategories.invoke(mActivity, true); Nov 16 03:27:27 which would be the same as mActivity.invalidateCategories(true); if it wasn't private in the parent class Nov 16 03:27:45 What about just making it public Nov 16 03:27:52 It's not my parent class Nov 16 03:27:56 ah Nov 16 03:27:58 Rush2112: I've never used that stuff; I have no idea. But surely you need to learn Java first. Nov 16 03:28:03 I wish I could avoid it but I'm designing around a terrible API Nov 16 03:28:07 I don't see how you can even begin to do this stuff without knowing Java. Nov 16 03:28:32 I know a bit of Java, but it's been a while. I'm basically fumbling around in the dark right now. Nov 16 03:28:36 Rush2112: and no, that stuff shouldn't go in onSensorChanged Nov 16 03:28:44 It's its own method Nov 16 03:32:21 TacticalJoke, do you think a "Share" feature would be good for a FAB in a detail view? Nov 16 03:32:50 hello everybody i search how i can make on an android app to get the current song title from my own radio what user shoutcast Nov 16 03:33:23 the radio is good is playing but i was wonder if i can get the current song title with some script Nov 16 03:36:36 drose379: Hmm, I think I'd expect it to be in the app bar. Nov 16 03:36:38 Though I'm not sure. Nov 16 03:36:58 Im gonna try something with it and show you most likely tomorrow Nov 16 03:39:28 Anyone know the size of a mini FAB? Nov 16 03:39:45 you just made that up Nov 16 03:40:00 I didnt Nov 16 03:40:21 according to science, yes you did Nov 16 03:40:31 What part of that is made up? Nov 16 03:40:41 the mini part Nov 16 03:41:08 What do you mean? Nov 16 03:41:09 http://developer.android.com/reference/android/support/design/widget/FloatingActionButton.html#attr_android.support.design:fabSize Nov 16 03:41:28 false claims Nov 16 03:41:40 Ok Nov 16 03:41:45 Enough, man Nov 16 03:43:27 quick with link Nov 16 03:43:27 https://www.google.com/design/spec/components/buttons-floating-action-button.html#buttons-floating-action-button-floating-action-button Nov 16 03:43:35 http://hastebin.com/putarodevo.avrasm Ok, so I've rewritten my activity. There's no errors. So, if I want to use that example for a sensor, how would I go about implementing it? I should define it in the class, but outside the onCreate, correct? Nov 16 03:43:38 but not so quick to search any deeper Nov 16 03:44:00 canvs2321, all I meant by mini was setting the fabSize to "mini" Nov 16 03:44:09 Mini floating action button Nov 16 03:44:09 Interior icon: 24 x 24dp Nov 16 03:44:09 Floating action button circle: 40 x 40dp Nov 16 03:44:14 durrr Nov 16 03:44:21 Great, thanks Nov 16 03:59:28 TacticalJoke, Heres something I am trying for the share FAB: http://i.imgur.com/QFWzNDf.jpg Nov 16 04:01:00 Looks neat. Nov 16 04:01:24 Idk about the color though, and the icon looks a bit big for the mini FAB Nov 16 04:01:48 On a side note, is that a circular image view with a pink border? Nov 16 04:02:18 Yep Nov 16 04:02:30 Thats how I got the effect of the backdrop view going around the image Nov 16 04:04:25 http://hastebin.com/avayosedac.avrasm So I have everything working without errors. If I want to call the onSensorChanged function, where would I actually do it and how? I would ideally want to do it around line 106ish, but wouldn't that not work since i define the onSensorChanged outsdie of that method? Nov 16 04:08:30 Thanks for the help today TacticalJoke , talk to you later Nov 16 04:15:01 anyone? Nov 16 04:15:43 Rush2112: That feeling when trying to use the accelerometer while not knowing how to call a method. Nov 16 04:16:21 onSensorChanged seems more like a callback method Nov 16 04:17:25 canvs2321: ok, i looked up callback methods. from what i'm gathering i just need to call the entire method then? Nov 16 04:36:52 http://hastebin.com/yupekazipi.avrasm Would the content here be enough to detect movement? Nov 16 04:48:25 What library do you guys use to do testing? Nov 16 04:51:50 What kind of testing? Nov 16 05:12:38 hi all, May I know How can we play high resolution audio (FLAC,VORBIS - 192K PCM) in android? Nov 16 05:16:57 Has anyone here before used the debug overdraw dev option? I just used it today, but it has two options, when you select it in developer options, and was wondering if anyone knew the difference. Nov 16 05:17:48 Yeah I used it Nov 16 05:21:02 sleepster do you know the difference between "Show areas for overdraw" and "Show areas for deuteronamaly"? Nov 16 05:37:10 Dave Smith has an hour+ long video on CoordinatorLayout, its pretty good Nov 16 06:02:47 how do i download apk to my laptop from google play? Nov 16 06:06:11 rrr: do you not have a copy of your app? Nov 16 06:13:49 just noticed - i can't find any gapp beside gmail, which is doing master / detail ... Nov 16 06:14:33 even Contacts, which should be a textbook example (contact -> contact details) Nov 16 06:16:50 that is , on the same screen ( tablet / landscape ) Nov 16 06:16:58 when any of the google apps actually come with proper "what's new", I'll start worrying about their code Nov 16 06:17:56 Leeds you mean changelog ? Nov 16 06:18:02 oh yeah duh Nov 16 06:18:05 in their store listings Nov 16 06:18:26 "bug fixes and performance enhancements" Nov 16 06:18:56 heh, since most of the gapps are in Play store, they could set an example for carriers and give user a mostly blank slate Nov 16 06:19:00 but nooo .. haha Nov 16 06:19:11 oh, they're definitely setting an example Nov 16 06:20:08 gotta have my grapware Nov 16 06:24:38 Leeds not just the apps, but even latest support lib version has no diff https://developer.android.com/sdk/support_api_diff/23.1.1/changes.html Nov 16 06:26:55 changelogz is for foolz Nov 16 06:27:03 my mistake, looks like they added some notes under changes Nov 16 06:33:32 Leeds: no. i want to download apk directly to laptop from google play Nov 16 06:33:45 you want to download the apk for your app? Nov 16 06:34:16 apps from google play. not my app Nov 16 06:34:35 free apps from google play Nov 16 06:34:54 why are you asking that in the app developer channel? Nov 16 06:35:45 improper to ask this? Nov 16 06:51:59 Hi, i'm trying to save a file using this: Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC); however when I look in the file manager with my computer, my file isn't there Nov 16 06:52:15 even using File.exists() returns true when I debug it Nov 16 06:52:43 i'm looking in Internal Storage/Music, is this the right place to search? Nov 16 06:53:30 what device? i have an old samsung galaxy nexus where there can be quite the delay from writing to sdcard and it showing up in the listing on PC Nov 16 06:55:41 moto x Nov 16 06:55:55 i also can't find it by browsing through the google music app Nov 16 06:56:11 and, it's been over an hour since the first time i tried XD @canvs2321 Nov 16 06:59:08 Hey how can I see the Crashlytics.log(message); messages on the dashboard? Do they only show up if the app crashes? Nov 16 07:02:34 hm, so i installed a file explorer app and it shows up there Nov 16 07:02:45 but google music still isn't finding the files Nov 16 07:02:57 WantToCode, yes. only if the app crashes Nov 16 07:03:37 yuung, not the right channel. Nov 16 07:03:40 Damnit. And the `Answers.getInstance().logCustom(new CustomEvent())`? Nov 16 07:03:50 danijoo, i'm doing this programatically Nov 16 07:05:38 its 'Crash'lytics, not 'Ana'lytics :) Nov 16 07:05:47 no idea about logCustom, never used it Nov 16 07:08:39 hehe cool. Any recommendation? acra or bugsnag or google analytics? Nov 16 07:08:43 http://hastebin.com/ofenubajik.avrasm can someone please take a look at this? i'm trying to detect motion; the code relevant to that is on 101. i get no errors, but nothing at all happens ): Nov 16 07:10:34 WantToCode, not really. I only used Analytics and stopped that long ago Nov 16 07:16:56 http://hastebin.com/ofenubajik.avrasm can someone please take a look at this? i'm trying to detect motion; the code relevant to that is on 101. i get no errors, but nothing at all happens ): Nov 16 07:21:25 canvs2321: can you help me D: Nov 16 07:51:44 Hey, I'm opening the device's image gallery using intent, on some cases it consume so much memory the system removes my fragments or activity.... does that makes sense? Nov 16 08:07:09 mornig Nov 16 08:08:30 hey Nov 16 08:09:45 what good android-ui-programmer shoould know to be good ui-programmer? Nov 16 08:09:48 :) Nov 16 08:10:30 i mean what technologies, guides etc? Nov 16 08:15:25 can you really be a good ui programmer? (i mean only ui?) i think you must have an understanding of the whole concept Nov 16 08:15:33 not just the UI Nov 16 08:22:14 i mean how to describe that programmer must have strong android-ui knowleges. Technologies etc Nov 16 08:27:55 it seems my build is running proguard, when i am definitely not telling it to. what could be happening? Nov 16 08:40:14 Hello guys, to download data from the webserver I use AyncTask wherein I perform the actual download. The data format is JSON. Does anyone know a good ready made library doing such a task, with canceling download if user is not interested anymore (because of slow connection)? Nov 16 08:41:49 retrofit Nov 16 08:41:57 I wrote such a task my self by deriving from AsyncTask and add some other stuff. But I rather rely on a good working and tested library. Nov 16 08:42:16 lasserix, retrofit? ok thnx my friend. Nov 16 08:45:52 yeah, retrofit is pretty decent for exactly that Nov 16 08:55:40 has anyone added proguard mapping.txt to be versioned in repo? i cant set up .gitignore correctly ;( Nov 16 09:03:37 lxknvlk: I have. And I tag every release Nov 16 09:04:23 cool. I found the problem, i had several gitignore files in several directories of my project, so modifiying one would not change something :d Nov 16 09:11:50 is the Editable passed in the TextWatcher mutable? Can't delete a character... Nov 16 09:15:04 Weirdly, append works, but delete doesn't Nov 16 09:18:10 anyone know how to et logcat to really dump its backlog in AS? Nov 16 09:35:26 hi, i have made a test using BroadcastReceiver filter on CONNECTIVITY_ACTION, but it seems it doesn't receive my ethernet dhcp lease change. I have got an error or it is an other filter ? Nov 16 09:36:10 is it bad to pass activity object to asynctask to call methods in onPostExecute? Nov 16 09:36:15 whats the best practice? Nov 16 09:37:05 i added slide animation to change one fragmetn to another. When 1st fragment contains viewpager with images. When i replace it with second fragment, there is no viewpager content (images) shown in animation. Nov 16 09:37:41 but when i get back from it, there is viewpager content (images) in back animation Nov 16 09:37:46 wtf people& Nov 16 09:37:47 ? Nov 16 09:38:30 what do you mean slide animation? as i remember there is no need to add any animaton to change fragments Nov 16 09:38:41 i need it effect Nov 16 09:38:46 so i added animation Nov 16 09:39:05 there is a slide animation by default Nov 16 09:39:15 transaction = .....beginTransaction Nov 16 09:39:25 transtaction.setCustomAnimation Nov 16 09:39:50 in your activity you have a viewpager, and you set fragmentAdapter with your custom fragment adapter that extends fragmentPagerAdapter Nov 16 09:40:04 i've created custom like here http://stackoverflow.com/questions/8876126/swap-fragment-in-an-activity-via-animation/9856449#9856449 Nov 16 09:40:35 no, in activity i have a fragmetn with viewpager Nov 16 09:40:53 on some event, i change it (fragment with viewpager) with another Nov 16 09:42:06 on that change, i dont see viewpager content (images) but only fragment backgound and tabs. But when i get back (back pressed) i see viewpager content (images) Nov 16 09:42:13 i see it in animation Nov 16 09:47:51 hello, given that I have a network's networkId, how would I go about obtaining the Network instance of it? Nov 16 09:49:41 ah, I see, requestNetwork Nov 16 09:50:45 but that's API level 21 or above, but I need to support API level 15 Nov 16 09:51:31 May I know, the exact use cases in gstreamer in android, when I have two scenarios 1. Playback from USB/SD 2. Playback from an android walkman - mtp Nov 16 09:51:39 Which input interface to select while capturing network data with Wireshark on emulator Nov 16 10:10:16 for the fourth time i have had my assked kick by reversing east and west bounding box Nov 16 10:48:23 twokeysets are equal if they contain same keys? Nov 16 10:51:50 hi guys, i'm using a file chooser for uploading documents on Android, but I find out that it displays information that are not up to date with the state f the file system. For instance, some documents are missing from the file chooser, and some documents that aren't there anymore are still displayed. I'm starting the intent ACTION_GET_CONTENT, but it is kinda weird, because if the user clicks on an file that is not there anym Nov 16 10:53:43 H3bus, your line got cut off at "is not there anym" Nov 16 10:54:13 Zharf: thanks, here is the following Nov 16 10:54:15 and some documents that aren't there anymore are still displayed. I'm starting the intent ACTION_GET_CONTENT, but it is kinda weird, because if the user clicks on an file that is not there anymore, an error message pops up.. Nov 16 10:55:07 what's this file chooser though? Nov 16 10:55:36 the default android file chooser that is called when I start my intent Nov 16 10:56:56 here is how I start my Intent : http://pastebin.com/w68Xw2xs Nov 16 10:59:45 and here is the chooser that appears : http://imgur.com/7XvLGFO In this case, for instance, the storyboard.pdf document is not in this folder anymore, and 3 docx files are there but are not displayed in the list... Nov 16 11:16:35 Can the coordinator layout be used JUST for moving FAB above snackbar -- nothing else? or is this simpler to handle on one's own? Nov 16 11:20:24 hello! I need to integrate an FTP server in my Android application. I've found the Apache FtpServer ( https://mina.apache.org/ftpserver-project/ ). I've tried both using the Maven repository and the jar archives in the libs folder. The problem is the following: com.android.dex.DexException: Multiple dex files define Lorg/apache/ftpserver/ftplet/FtpException; Nov 16 11:20:34 How can I fix it? Thank you very much! Nov 16 11:28:32 Hey guys, I am trying to learn android unit testing though cant find up to date resources. Can anyone help me with the relation between TestSuite and TestRunner? Nov 16 11:38:07 H3bus, I don't really have a solution for you, the problem is outside of anything you can do Nov 16 11:44:57 jim87, that one is especially nasty Nov 16 11:45:42 vegetablesalad19: yep... I've looked inside the jar files and I find only one FtpException.class file, under the ftplet jar archive Nov 16 11:45:53 So I don't really understand where it could be defined elsewhere Nov 16 11:46:07 jim87, you have duplicate classes inside jars Nov 16 11:47:14 In this case I usualy try to get sources Nov 16 11:47:41 uhm... Nov 16 11:48:45 vegetablesalad19: so compile the sources, or just dropping them in the app sources? Nov 16 11:49:22 but strange, Apache FtpServer is suposed to be pure Java. So I don't know why it would give you this error Nov 16 11:49:44 jim87, just drop them in project and see how it goes Nov 16 11:49:55 vegetablesalad19: that includes something like 10 different jar files Nov 16 11:50:52 jim87, are you using the maven repo Nov 16 11:51:15 Zharf: yep, I tried the Maven repo before and the jar files after, same error Nov 16 12:01:56 i want to make a android app , with functionality like profile etc . can anyone tell me how these type of apps are made . i want to add functionalities like search for profile etc Nov 16 12:03:51 jackhum, that is really vague question Nov 16 12:04:17 You find some tutorials and start learning, I don't know how to answer this Nov 16 12:04:27 vegetablesalad19: yeah , i know that Nov 16 12:04:46 by profiles you meant, user login ? Nov 16 12:05:37 vegetablesalad19: well , i will use google and facebook for user login, i want to know if i have option like add profiles , in which user will enter some of his/her details , where will i store them? Nov 16 12:05:56 vegetablesalad19: i want to know basically how dating apps are made Nov 16 12:06:08 vegetablesalad19: because they have profiles etc Nov 16 12:06:09 depends, if it is only for user to see, then you can store it in phone Nov 16 12:06:20 othervise you need server/cloud Nov 16 12:06:47 so you will need some backend service, where to store user data and all the logic Nov 16 12:07:01 vegetablesalad19: i know flask Nov 16 12:07:06 vegetablesalad19: and python Nov 16 12:07:11 vegetablesalad19: just the basics Nov 16 12:07:25 vegetablesalad19: is there any quick way to make such kind of app Nov 16 12:08:01 vegetablesalad19: where i will have to not go with the pain of creating the whole backend Nov 16 12:08:29 there are amazon and google services that help you with this Nov 16 12:08:40 making user profiles with data etc Nov 16 12:08:58 vegetablesalad19: i searched , and came up with firebase and parse Nov 16 12:09:17 vegetablesalad19: but i dont know if parse can help me to achieve what i am looking for Nov 16 12:09:41 vegetablesalad19: for chat like applications which use sockets , i know i can use firebase Nov 16 12:10:05 vegetablesalad19: but for dating app , which has profiles i dont know Nov 16 12:10:19 Does anyone know the difference between "start method tracing" in Android studio, and TraceView? Nov 16 12:10:19 Probably amazon can help you with all of this, haven't used them (only for statistics) so can't help you much Nov 16 12:56:33 Hi there. I suffer from paranoia and I'm serving super secret documents over http (nanohttpd) to webview in my app - Is there an _easy_ way to had real security in it so that only my app's webview is allowed to fetch the document? Can I easilly somehow generate ssl certificates on runtime and add them to webview's properties or something? Nov 16 12:56:47 s/had/add/ Nov 16 12:57:39 or should I hack it so that I embed the document on javascript each time user wants to view a document? Nov 16 12:57:51 s/on/to/ Nov 16 13:15:21 vompatti: you could just hard-code a password into your app. Nov 16 13:15:52 yawkat: but the http connection would still be unencrypted Nov 16 13:16:00 so use https Nov 16 13:16:14 but how would I generate SSL certs? Nov 16 13:16:26 or would pregenerated cert be enough? Nov 16 13:16:46 the ssl cert is on your server. Nov 16 13:17:01 I'm serving the data within the app Nov 16 13:17:09 on localhost Nov 16 13:17:47 O.o Nov 16 13:18:09 viewing PDFs with pdf.js so I fetch them with javascript Nov 16 13:18:30 so I dont need to write the documents on the filesystem Nov 16 13:19:11 does anyone know how do I run a different gradle task depending on weather build is debug or release? I'm trying to https://gist.github.com/mlatu/39a87b8172b9c1e9df4d but it seems *both* tasks are always started Nov 16 13:20:48 I've got a file called "file.properties" inside a library's source code, and it's accessed via URL.getResource with parameter "org/my/library/file.properties". Now... without hacking "org/my/library" with a constant "/data/data/my.app/files/file.properties", how can I include that file without touching the library's source code? I'm compiling it as a module. Nov 16 13:22:07 I'm sorry, it's called via getClass().getClassLoader().getResourceAsStream(THESTRING) Nov 16 13:28:58 Does anyone know the difference between "start method tracing" in Android studio, and TraceView? Nov 16 13:40:59 Hello is it possible to add TFS plugin in android-studio Nov 16 14:06:21 Anyone? Nov 16 14:18:20 Hey, I have a fragment with a recycler view, above it (Added not replaced) theres another fragment. the upper fragment calls adapter.notifyDataSetChanged() for the recycler in the fragment below it. that recycler does not get updated........ any idea why? Nov 16 14:27:15 I want to kick off a task on a background thread (to do a search, which could take a while), but the second a person types in the next character, I'd like to cancel the current search and start the new one. How do I do that on android? Nov 16 14:29:59 hello, probably a dumb question, but how do you recreate saved activity state after user unlocks the screen? Nov 16 14:31:06 szx: What do you mean after user unlocks the screen? Nov 16 14:31:25 If you handle state recreation properly it will just work in every scenario. Nov 16 14:32:59 eghdk, when the screen gets locked onStop and other method are called but when you unlock it back nothing seems to be called Nov 16 14:33:21 I implemented onCreate and onResume and none of them gets called Nov 16 14:34:21 If onStop gets called, and your activity shows again after unlock, then you will 100% get onStart and onResume. Nov 16 14:34:59 You will get onCreate if your screen is off for a long time, your app gets killed, and you come back. Nov 16 14:35:06 Hi all. I'm really struggling in setting the apptheme programatically after setContentView was called. The basic idea is switching the theme based on the value provided by a lightsensorlistener to get some kind of "automatic night mode" Nov 16 14:35:22 Show some code, because what you're saying breaks the fundamentals of android apps. Probably just logging or something in the wrong place man. Nov 16 14:35:31 use onSaveInstanceState and the bundle that's passed to onCreate to save and restore state Nov 16 14:35:59 Anticom: I'm pretty sure theres a way to detect night mode without that crap using a resource qualifier. Nov 16 14:36:21 eghdk: Well i'm rather sure aswell but i wasn't able to find anything Nov 16 14:36:28 Any help would be appreciated Nov 16 14:37:15 iirc theme changes require activity recreation Nov 16 14:37:55 Zharf: *sigh* thought i could get arround that Nov 16 14:37:59 thank's anyway Nov 16 14:38:04 had a bad feeling Nov 16 14:38:19 eghdk, oh, sorry, I just checked again, onResumes is indeed called, it's kind of weird that the breakpoint I set didn't work, once I moved super.onResume() call to the bottom it worked Nov 16 14:38:26 setTheme can only be called before setContentView Nov 16 14:39:23 szx: Yeah, if onStop gets called, you will deff get onStart and onResume. Nov 16 14:41:10 but now I have to somehow get savedInstanceState from somewhere Nov 16 14:41:18 how am I supposed to do that if onCreate isn't called? Nov 16 14:41:32 Bundle savedInstanceState = getIntent().getExtras(); Nov 16 14:41:36 googled this on the internet Nov 16 14:41:41 but that didn't work Nov 16 14:41:58 that's not the same as savedInstanceState Nov 16 14:42:00 What's the best way to make a copy of an arraylist, but to make sure it's new objects? I'm trying to make sure I don't hit a ConcurrentModificationException Nov 16 14:42:27 clone the objects? Nov 16 14:42:34 but if onCreate isn't called, then your activity should be in the same state it was left in Nov 16 14:43:35 szx: You only need to recreate if you need to be recreated, in such case onCreate will be called, and you'll have a bundle. The scenario you're explaining should be fine and nothing should have to be done on your end Nov 16 14:43:55 osxorgate: Is there a way to clone an arraylist with all the objects? Nov 16 14:44:01 Or do I have to iterate? Nov 16 14:44:13 Zharf, that makes sense, I'm currently stopping some stuff in onStop(), should I move that to onDestroy instead? Nov 16 14:45:21 no. if something should stop when the activity dissapears off the screen (onStop) then start it in onStart Nov 16 14:46:02 ok this is messed up: I print my json String in log cat: {"errorCode":"DUPLICATE_BANK_ACCOUNT","errorMsg":"A bank account is already registered with this account number and routing number."} Nov 16 14:46:16 oh, okay Nov 16 14:46:17 I use new jsonObject(myString) to set to a json Nov 16 14:46:35 but then if i do json.tostring() i get a end of input at character 0 error. Nov 16 14:46:54 is there something wrong with the formating fo that string or am i using jsonobject wrong? Nov 16 14:47:06 ive been staring at it but cant see anything wrong Nov 16 14:47:08 hi I am getting this http://imgur.com/2dvY30H, how can I resolve this Nov 16 14:52:07 i guess you can try to build the project Nov 16 14:55:35 @my answer: retrofit clears the object the first time you read it Nov 16 14:55:45 (for some unknown to me reason) Nov 16 14:55:50 hey, good night. I have a service which uploads photos to server(almost 2500) and after a while (after 150th-200th) photos,service is stopped Nov 16 14:56:17 sci-fic, step one would be adb logcat and see if you're crashing because of OOM or something Nov 16 14:56:34 which seems like a reasonable first guess, but w/out a stacktrace you're just chasing your tail forever Nov 16 14:56:52 +1 @dragorn's answer Nov 16 14:57:11 it's probably stopped because android decides it's not needed anymore (not bound to activity/not foreground service) Nov 16 14:57:18 there is no crash, i thought maybe an upload limit default by android or something Nov 16 14:57:24 Zharf, less likely in my experience Nov 16 14:57:35 very likely in my experience Nov 16 14:57:41 Zharf, unless you're extremely memory constrained on an older device, android doesn't kill services very often. it certainly CAN, but rarely does. Nov 16 14:57:46 How shitty are your test devices? heh Nov 16 14:58:01 dragorn:nexus 5 android m :D Nov 16 14:58:02 it does, on my n5 it frequently does it Nov 16 14:58:21 I think across a half dozen test devices I've never seen android actually decide to terminate a service due to OOM, even a background one. Nov 16 14:58:34 obviously it can, i just basically never see it do it Nov 16 14:58:48 sci-fic, well, if you think it could be getting killed because it's backgrounded, throw a notification up Nov 16 14:58:56 sci-fic, see if that solves it, it's a pretty quick mod to test Nov 16 14:59:09 dragorn, not OOM, it just saves battery Nov 16 14:59:14 I'd throw some logging in your service to see if it's getting a stop command too Nov 16 14:59:26 because it determines that it's not needed becuase user can't see it Nov 16 14:59:49 well an activity should never do large uploads like that in the first place Nov 16 14:59:54 yeah, I know the reasons it can make that decision, I just dont' see it making it on active threads. It wouldn't be the first conclusion I jumped to. Nov 16 15:00:01 if he needs to upload 2500 photos, it should be a service, not an activity Nov 16 15:00:15 jeremiedenoob, sure, that's why you use a foreground service with a notification Nov 16 15:01:21 yeah there's no harm in throwing a notification on the service and see if it's getting the background kill. I wouldn't have gone there first, but it's 15 lines of code or whatever to make the test case so go for it Nov 16 15:01:59 let me try notification first, lets see what happen Nov 16 15:01:59 s Nov 16 15:02:13 sci-fic, see Service.startForeground Nov 16 15:02:22 okay thanks Nov 16 15:05:24 2500 uploads? you bet your ass that should be a foreground service Nov 16 15:05:45 What's the best way to make a copy of an arraylist, but to make sure it's new objects? I'm trying to make sure I don't hit a ConcurrentModificationException Nov 16 15:06:26 foreach, clone+ add Nov 16 15:07:15 also have you tried a copyonwritearraylist (can't remember exact name) Nov 16 15:07:22 hello Nov 16 15:07:44 Can somebody tell me how to remove this ugly space? http://screencloud.net/v/5Haa Nov 16 15:10:42 Zharf: no I haven't tried copy on write arraylist. I may look into it. Also, any idea why I shouldn't just use ArrayList.clone()? Nov 16 15:11:27 hi suppose I have images in drawable titled dice1.jpg, dice2.jpg... dice100.jpg, how can I load any one image based on a variable thats value will be 1 to 100 Nov 16 15:11:48 so basically if variable = 67, it would load dice67.jpg Nov 16 15:12:19 ? :/ it's a simple question, it's propably just about removing margin from some layout Nov 16 15:12:49 sanketdg, you'd probably either need to put them in assets so you can load by file name instead of by resource id, or make an array in xml for them and index into that Nov 16 15:13:15 eghdk, not sure if there's any reason... internets just didn't bring it up on a quick google Nov 16 15:14:28 sanketdg, not sure if this works but try making an integer-array resource with the resource id's listed? Nov 16 15:14:55 Zharf: yeah, I knew clone exited, but it just makes sense to clone the whole array list, instead of iterating. Anyone else have thoughts on it? Nov 16 15:15:27 I very rarely need to make clones of my objects Nov 16 15:16:02 probably the last time I used clone was 5+ years ago Nov 16 15:21:55 Zharf: so what would you use in this case? Nov 16 15:22:00 CopyOnWriteArrayList? Nov 16 15:24:53 "last time I used clone was 5+ years ago". Hahah. I've been programming in java for like 1! Nov 16 15:25:05 that's a long time Zharf ! Nov 16 15:35:06 I'm trying to get my phone to work with my app, i'm looking at the docs but i can't seem the issue: http://i.imgur.com/8aUFMOS.png Nov 16 15:39:14 dersand, the error message is very clear about what's wrong and where, just read it. Nov 16 15:42:15 no one uses clonr Nov 16 15:42:19 and clone is. broken Nov 16 15:44:41 Mavrik, i think i fixed it, but now the error message says "Cannot resolve symbol buildTypes" Nov 16 15:45:54 the error says ur missing a closing bracket Nov 16 15:46:21 you don't put app settings in. root. build. gradle Nov 16 15:47:04 hence the comment Nov 16 15:54:08 gradle is such a nightmare for beginners Nov 16 15:54:57 definitely one of the worst aspects of android development Nov 16 15:59:05 yeah confused the crap outta me for a bit, mind you I still know next to nothing on android dev =( Nov 16 16:04:43 "When plugged in over USB, you can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory." - I can't wrap my head around this, what does it mean? Nov 16 16:08:01 run adb devices Nov 16 16:08:10 the command adb is in platform-tools Nov 16 16:09:33 from the cmd-prompt? Nov 16 16:09:48 of course Nov 16 16:09:59 using the command prompt is a core part of development Nov 16 16:15:53 what is the easiest way to tranistion between two images? Nov 16 16:16:11 it should be of very short duration. Nov 16 16:16:38 I just want to show that when two same images are shown sucessively, the user gets an indication that the picture has changed. Nov 16 16:20:58 anyone here good with mvvm framework? Nov 16 16:25:16 sanketdg, lots of ways, viewflipper is easy Nov 16 16:25:29 sanketdg, any sort of. view transition otherwise Nov 16 16:26:00 pfn: can I get some links? Nov 16 16:26:14 sanketdg, that's what google is for Nov 16 16:27:39 pfn: uh, okay, thanks. Nov 16 16:37:28 hi. I have a design problem. I have an activity that holds a couple of fragments and starts/ binds to a service. I can get access to the service from the activity using the binder, but I also want the fragments to control the service (e.g. start/stop recording). How can I acvieve this? Nov 16 16:38:30 freiform if you want to keep the service binding stuff there, you can just have the fragments bind to the service individually Nov 16 16:38:45 in their onStart / onStop, just like the activity Nov 16 16:39:23 service binding is a PITA because of the async step, try to find a way around it if you can Nov 16 16:40:14 g00s: so I would have to unbind the activity when starting a fragment? also, what would be an alternative? implement handlers and pass messages back and forth? Nov 16 16:40:30 no you would just take all that stuff out of the activity Nov 16 16:41:21 if you are using fragments, your activities shouldn't have much in them at all - except gunk for coordinating fragments Nov 16 16:42:23 async step is easy, use a promise or rx observable Nov 16 16:42:48 i knew pfn would say that, because last week he argued it was a pain Nov 16 16:42:54 :D Nov 16 16:43:08 g00s: I see ;). would be using handlers and messanegrs a feasibel approach? Nov 16 16:44:26 freiform see "Service" https://medium.com/google-developers/developing-for-android-vii-the-rules-framework-concerns-d0210e52eee3 Nov 16 16:48:25 g00s: thanks. based on this, using a fragment conrolling the fragments and a background servicethat does teh actual work (i.a. audio recording and processing w/o depending on the ui-thread) appears to be the right choise for me. Nov 16 16:49:08 sounds good Nov 16 16:49:18 I only have trouble setting up the communication, i.e. telling the service teh current device configuration (sampling rate, etc.), init a device, start/stop, etc. Nov 16 16:49:45 is there a way to hide your private information on the play store (as a developer) Nov 16 16:50:02 thornekey no Nov 16 16:50:14 use PO box etc Nov 16 16:50:32 g00s: ah, thats what i thought Nov 16 16:50:49 g00s, what is? binding to services is stupid unless you have an explicit need for the features of binding Nov 16 16:50:58 g00s, I've never said it was a pain, I've said it's stupid Nov 16 16:51:12 can you choose your own "author"name, if you dont register as a business Nov 16 16:51:54 pfn but its stupid because its a pain, right ? (compared to easier options) Nov 16 16:52:06 lol Nov 16 16:52:11 g00s, it's stupid because it's overkill Nov 16 16:52:18 the binder system is lame unless you need ipc Nov 16 16:52:35 (prettymuch all of the core system services need it) (99% of apps don't) Nov 16 16:52:38 yeah we agree Nov 16 16:55:03 would you guys agree, the trend in material design (as seen in gapps) is that with respect to responsive design, master/detail on the same screen is pretty much out? only example i can find is gmail Nov 16 16:55:04 but you use service binding still :p Nov 16 16:55:18 pfn actually i'm not , thanks to your idea ;) Nov 16 16:55:25 oh, thank god :p Nov 16 16:55:45 which was actually in froyo AOSP contacts app :D :D :D Nov 16 16:55:51 kinda Nov 16 16:56:32 that was the fun thing going through the AOSP apps at the time, so many little morsels Nov 16 17:04:01 g00s: so all i need to do is use my PO box and i can choose my publisher name Nov 16 17:04:31 Does a SyncAdapter also retry with exponential backoff if its started periodically and not via GCM? Nov 16 17:04:55 thornekey i'd look on /r/androiddev to make sure about PO box, maybe UPS mail box because it looks like a regular address, but generally Nov 16 17:05:07 ie its sheduled to run every 2 hours, but fails, will it then retry after 1,2,4.. hours or stay within the 1h shedule Nov 16 17:05:11 Ahk, thanks Nov 16 17:05:35 s/every 2 hours/every 1 hour Nov 16 17:11:58 How do I Gzip json before posting it to server ? Nov 16 17:12:31 Does HttpUrlConnection handle that also implicitly ? Nov 16 17:12:52 I am using Volley which internally uses HttpUrlConnection Nov 16 17:16:06 Also how do I verfify if my json was gzipped Nov 16 17:17:24 hello everyone Nov 16 17:18:31 I was about to make an upgrade from KitKat 4.4.4 to Lollipop 5.1.1, as I read a lot about the HCI 5.0/6.0 enhancements facing Bluetooth LE. But ended up finding this: http://stackoverflow.com/questions/27169024/android-lollipop-5-0-bluetooth-low-energy-central-roles-bad-performance Nov 16 17:20:17 what does that mean for you fer Nov 16 17:20:31 Which version of android studio should I run? I'm running 1.3 presently and I'm not sure what to download Nov 16 17:20:42 1.4 is stable Nov 16 17:20:43 fer i haven't heard much about that, but its hard to tell between phones Nov 16 17:21:01 missingno, that with android 5.1.1 there's a problem with the amount of advertisement messages I'll be able to read Nov 16 17:21:19 why does that stop you from personally upgrading? Nov 16 17:21:32 like, if you had an app that was broken by lollipop Nov 16 17:21:40 you'd have to deal with it regardless of whether you upgraded Nov 16 17:22:23 missingno, I understand your point but I'm working on a really controlled environment Nov 16 17:22:31 ah Nov 16 17:22:32 lucky you Nov 16 17:23:05 missingno, I'm having issues with 4.4.4; as I have gaps in advs readings (up to 12 minutes) Nov 16 17:23:59 and was reading about the advantages of Lollipop with BLE, but ended up finding that stackoverflow post that really scared me :-S Nov 16 17:24:30 I'm trying to find a reliable reference source to look for Nov 16 17:24:30 upgrade it and try? can't you just flash 4.4 back? Nov 16 17:25:17 if you want working BT flash iOS :) Nov 16 17:25:51 g00s, hahaha :( Nov 16 17:26:29 I mean I think you have to figure out how to live with whatever they changed in 5.0 fer Nov 16 17:26:42 cuz I don't think it has improved in 6.0 either Nov 16 17:27:37 anecdotal but an acquaintance told me 6.0 BLE is actually worse Nov 16 17:27:47 kinda sucks for them, their startup depends on it Nov 16 17:28:33 g00s, ... that's enlightening Nov 16 17:31:50 missingno, but as I can force an adroid version... maybe I'll stay with 4.4.4 Nov 16 17:32:45 and will be dealing with the start/stop scanning, and workaround like that Nov 16 17:33:49 https://newcircle.com/s/post/1697/android_lollipop_bluetooth_andevcon <-- if you hear this guy, you'll think that 5.0 is *the* solution Nov 16 17:34:16 fer dave is smart. yeah from API perspective 5.0 is much better Nov 16 17:34:27 hard to say whether its device firmware, android framework, etc Nov 16 17:44:47 wow the Google Photos app is super slick ... Nov 16 17:45:39 one of those apps i'd love to learn about its architecture; how is it handling all the bitmaps so smoothly - glide, native code, etc ? Nov 16 18:19:54 g00s, it uses glide Nov 16 18:20:21 you can go to settings -> About ->Open source licenses and see used libraries Nov 16 18:22:55 danijoo holy crap there are lots of libs in there Nov 16 18:23:04 indeed ^^ Nov 16 18:23:08 but Xorg ? Nov 16 18:23:27 Hi all. I have Tabs and uses icon in the TabLayout. One tab must have a searchbar, do you guys think it's good / bad to place the searchbar below the tabs: little like this but below the 'Item one', ... Nov 16 18:23:27 https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B6Okdz75tqQsQS1FRUVwMkVvQ2c/components_tabs_usage_mobile2.png Nov 16 18:23:43 vigilancer, user error Nov 16 18:23:45 vigilancer, not bug Nov 16 18:23:56 vigilancer, although, yes, it should point out that it's user error Nov 16 18:24:02 rather than just failing Nov 16 18:24:24 pfn : thanks, I'll look on my side Nov 16 18:24:36 vigilancer, protifySettings only goes on app project, not on library Nov 16 18:25:26 pfn : For every application sub-project, do: echo 'protifySettings' > APP-PROJECT-DIR/protify.sbt Nov 16 18:25:37 vigilancer, yes, APPLICATION Nov 16 18:25:41 though it is for libs also Nov 16 18:25:46 vigilancer, you added it to all your libraries Nov 16 18:25:56 yeah, I see now Nov 16 18:26:21 interesting they use Halide Nov 16 18:26:40 threated "application sub-project" as "sub-project of application" Nov 16 18:48:36 I am not trying to talk ****. I am just generally curious as to what "efficient multithreading" means, but I've noticed -- and I'm only using this library because I use it extensively -- as an example, but picasso seems to kick off about two dozen threads Nov 16 18:48:45 This seems like too many threads to me? Nov 16 18:50:36 Ie, three threads with proper pipeline M-2-O queue that feeeds into a queue system would work just as well, but more efficiently since it'd only be three threads instead of 20. Unless 20 threads is not a huge deal, (but if this is just one library, and two other libraries also take 10-20 threads) then just talking 3rd party apps I'm already running an app with ~50 threads plus UI plus what background stuff I need. Nov 16 18:51:12 So I guess I'm really wondering on standard devices today, what is a decent a thread count for an app to be using? Or is there another way of looking at this that I'm not seeing? Nov 16 18:52:53 *and i believe (afaik) you can setup picasso to use custom executors, but I'm specifically talking about default behavior, since picasso's under the hood networking/bitmap processing is one of its virtues. Nov 16 18:53:23 Also I can't seem to find any articles talking about ideal number of threads other than the android dev site Nov 16 18:53:43 which recomends executors using something around MAX CORES as the max number of threads Nov 16 18:55:34 lasserix, it always depends on workload Nov 16 18:55:48 if you have stuff that's waiting on IO, the number of threads you can have is extremely high Nov 16 18:56:03 if you have stuff that's computationally heavy, you shouldn't go beyond 1-2 * cores Nov 16 18:56:12 ah Nov 16 18:56:16 that makes sense Nov 16 18:56:17 thanks Nov 16 18:56:22 you can have hundreds of threads waiting for IO Nov 16 18:56:35 I wish there was some article talking about this: do you know of one? Nov 16 18:56:43 jcip is always a good book to read Nov 16 18:56:45 pfn: yeah i get why that would be Nov 16 18:56:56 lasserix there is Nov 16 18:57:00 also why stuff like RX has IO scheduler, work scheduler, etc. Nov 16 18:57:31 lasserix http://www.amazon.com/Computer-Architecture-Fifth-Edition-Quantitative/dp/012383872X Nov 16 18:58:15 how many threads you have will impact all kinds of things like cache hit rates, etc Nov 16 18:58:39 so it can impact parts of the system's performance you wouldn't really even suspect Nov 16 18:59:40 basically threading side effects depend on memory architecture too Nov 16 19:00:56 I know there's some kind of search view or search view action, but can I hook in my own logic into that, or is it tied to some search function in the framework or something? Nov 16 19:01:17 eghdk: simple to just to roll your own if you need custom UI Nov 16 19:01:23 but basically it provides some callback Nov 16 19:01:31 and you implemente dthose and then it does all that Nov 16 19:02:21 lasserix: So, if I have my search working already in an edit text thats pinned to the bottom of my layout, should I try search action view, or roll out my own? All I want is for search to work in the action bar. Nov 16 19:07:20 try the default Nov 16 19:07:26 if it works for you than wonderful Nov 16 19:07:34 since your UI is already in place Nov 16 19:07:42 eghdk: think of it as an async task Nov 16 19:07:47 it provdes the right callbacks Nov 16 19:07:52 but often times you want something more powerful Nov 16 19:10:51 g00s but you can often facade your thread executor Nov 16 19:10:56 by using custom queues Nov 16 19:11:18 so for instance, you can control cache hits by making some tasks sequential by piping them to write queues before hitting actualy threads Nov 16 19:14:58 hm, okay. Doesn't seem like it's exactly what I want. Rolling out my own shouldn't be too bad. I've never had to modify the toolbar before with customviews, any tips before I go down that road? Nov 16 19:15:32 well, I guess it's not really a custom view, just need a search menu item to open up an edittext field. lasserix Nov 16 19:15:42 just try implementing it Nov 16 19:15:46 you get like three callbacks right? Nov 16 19:16:44 wtf, AS won't support x86 image for amd unless I am running linux Nov 16 19:16:48 intel conspiracy Nov 16 19:21:14 lasserix i dont see what facading thread executors has to do with mechanical sympathy Nov 16 19:21:44 very little is under control unless you use some lower level things in sun.misc.unsafe Nov 16 19:22:13 by setting up queuing system you can decrease the number of threads, unless you want to do some funky priority queue Nov 16 19:22:52 Anyone running an AMD system here? Nov 16 19:23:12 I mean if they can make x86 image works with amd under linux Nov 16 19:23:20 why can't they make it work on window Nov 16 19:23:24 much conspiracy Nov 16 19:23:30 I mean the emulator Nov 16 19:27:54 how can i restore imageview size in recyclerview? Nov 16 19:28:10 horny-sama: are you using windows? you are traitor! Nov 16 19:28:31 semeion: VS has turned me into a window slave for life Nov 16 19:28:32 horny-sama: i am joking :P Nov 16 19:29:00 visual studio is like the best ide ever Nov 16 19:34:58 hey guys Nov 16 19:35:21 what is a good game engine to use for developing simple 2D games for android? Nov 16 19:35:44 sector_0: unity? Nov 16 19:36:23 horny-sama, is unity free in that regard? Nov 16 19:36:44 I'm looking for something free (sorry for not mentioning that) Nov 16 19:36:45 sector_0: yes Nov 16 19:38:05 there are a number of alternatives Nov 16 19:38:43 Squeegee, I'm open to suggestions Nov 16 19:39:00 I could only name names but not recommend one over the other Nov 16 19:39:25 Squeegee: go for it Nov 16 19:40:09 one is called "libgdx" Nov 16 19:41:10 I guess there's another called "AndEngine" Nov 16 19:41:27 another "cocos2d-x" Nov 16 19:41:56 hmm, ok, fixed android-sdk-plugin, it can build u2020 now Nov 16 19:42:24 Hello, anyone knows something as awsome as retrofit for ios development? Nov 16 19:42:45 sector_0: it depends on how simply Nov 16 19:43:14 lasserix: for me, I want to create a click and shoot game Nov 16 19:43:19 no need to 3d Nov 16 19:43:23 just newgrounds quality Nov 16 19:43:49 I want to build a simple board game probably have access to the google play games service Nov 16 19:44:21 How I can use GMS 8.3 emulator ? Nov 16 19:44:40 Emulator play services are outdated Nov 16 19:44:48 Google Play Services Nov 16 19:44:54 not GMS** Nov 16 19:45:05 unity is the easiest, cocos2d-x is great and now with sdkbox you can actually use external libs like google play services Nov 16 19:45:06 viran maybe as on iphonedev; AFNetworking was always popular Nov 16 19:45:17 thanks g00s Nov 16 19:51:57 guys, can I execute non-root command using android application? Nov 16 19:54:27 people, what attributes responces for show fragment content, on fragment change (replace) with custom animation? Nov 16 19:54:42 Len, yes Nov 16 19:55:09 i mean when i replace fragment with animation, i want to see what i contains? Nov 16 19:56:42 pfn: thanks, found an example http://www.learn2crack.com/2014/03/android-executing-shell-commands.html Nov 16 20:25:57 Len: l33t example Nov 16 20:26:00 will try it at home Nov 16 20:36:35 horny-sama: good luck Nov 16 20:48:16 Does anyone know the difference between trace view and the "start method tracing" button in studio? Nov 16 20:49:52 Same profiler, different display. Nov 16 20:50:15 really? Nov 16 20:50:36 Hey guys. I'm curious in analyzing the source code for the WSOP app from the Play Store. What would be the best way to go about debugging it? Thanks Nov 16 20:50:43 do you have any preference? I feel like I'm seeing more threads in one view over the other Mavrik Nov 16 20:51:53 Yes, because you have dropdown for thread selection in AS :) Nov 16 20:52:00 And TraceView shows all threads on a single graph. Nov 16 20:53:02 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY Nov 16 20:53:05 I really hate that error Nov 16 20:53:11 tell me wtf it occurred, damnit Nov 16 20:53:23 Mavrik: You prefer AS because "Yes, because you have dropdown for thread selection in AS :)"? Nov 16 20:53:42 I don't have a preference really, they're both useful. Nov 16 20:53:48 Depends on what I want to see. Nov 16 20:54:06 I'm trying to figure out what you meant by "because you have a dropdown..." and "And TraceView shows all threads on a single graph." Nov 16 20:54:34 I really wish I had some sort of json schema validator Nov 16 20:54:40 this is one area where xml/xsd is so much better Nov 16 20:55:15 Either way, Mavrik I'm working through it but do you have any pro tips for TraceView? seems kinda sorta difficult, and some of the vocabulary used in it, isn't completely straight forward. Nov 16 20:55:39 eghdk, AS shows one thread at a time in a graph and you have a dropdown menu to choose which it shows. TraceView shows all threads on the graph at once. Nov 16 20:56:05 eghdk, for TraceView you focus on the main thread Nov 16 20:56:18 And see if anything is blocking it (that causes stuttering). Nov 16 20:56:20 aha. So when you say traceview, you mean the tool in AndroidDeviceMonitor Nov 16 20:56:38 Yep. Nov 16 20:57:27 great. they output the same files Mavrik ? Both tools? are they like hprofs? Nov 16 20:58:08 They use the same format, but IIRC monitor doesn't really save files. Nov 16 20:58:22 You're looking for things like that mostly: https://www.dropbox.com/s/1zsp67i50swo0yh/Screenshot%202014-12-18%2018.43.46.png?dl=0 Nov 16 20:59:27 On the left and right you see standard rendering (60 fps), and in the middle you see how there's some processing on main thread freezing the UI. Nov 16 21:00:18 I don't like using traceview in AS, last time I tried it, it wouldn't allow choosing between sampling and trace modes Nov 16 21:00:47 In AS it's sometimes really hard to see patterns Nov 16 21:00:51 Due to how the graph is displayed Nov 16 21:00:52 Mavrik: Oh, that blue bar/line spanning from 2200 to 2500? Nov 16 21:01:17 eghdk, yep. And the red block on the left is a slow method call that froze UI for several threads. Nov 16 21:01:31 Ideally the main thread looks like the left and right end of the graph. Nov 16 21:01:52 Where each spike is "drawDisplayList" or what the command is and those calls should never have to wait or be blocked. Nov 16 21:03:01 so each "spike" is something bad essentially right? Nov 16 21:03:08 does anyone know anything about the setup screen and how to properly start an activity after it finishes? Nov 16 21:03:31 What's an easy way to cause something like that Mavrik ? Just a thread.sleep would do the trick right? Nov 16 21:03:42 Yp Nov 16 21:03:53 eghdk, each spike is code running. Nov 16 21:04:03 The code actually drawing the UI is cool (because you need that ;) Nov 16 21:04:11 The code stopping the drawing UI code because it's reading a file isn't :P Nov 16 21:04:57 Aha. Awesome. Thanks for the explanation. That seems a lot easier than all these tutorials I read in the past few hours. haha Nov 16 21:05:49 You can then zoom / click on the graph to see which method calls are represented. Nov 16 21:05:58 is it safe to say that nothing should be done on the main thread except for drawing? I guess that'd be overkill for crap like calculations and stuff. A better rule of thumb would just be keep io off of main thread. Nov 16 21:06:00 And you can use the bottom tree to see how the calls went to get to that method. Nov 16 21:06:15 eghdk, you can't avoid some things (layout, view-related stuff, drawing) Nov 16 21:06:27 eghdk, but everything should be done in "holes" between the 16ms spaced draw commands to avoid stutter Nov 16 21:06:54 so each method call should be less than 16ms? Nov 16 21:08:04 I have a recyclerview inside a swiperefreshlayout inside a viewpager, if the swiperefreshlayout is refreshing when the fragment gets destroyed it leaks the recyclerview but I can't figure out why, I don't even have an onrefreshlistener :/ Nov 16 21:08:18 hi guys... so this is more of a question for Android Studio (migrating from eclipse) and i've never really used IntelliJ before. say i'm typing something and then the little tooltip comes up that has the method signature in it, but then i alt+tab and in and out of the application. now the tooltip is gone. what's the hotkey combo I press to get that tooltip back up? thanks Nov 16 21:09:05 kevin: https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard_Mac.pdf Nov 16 21:09:26 great thanks Nov 16 21:10:14 found it. kudos Nov 16 21:10:20 memorize that, or the general names of commands and hit cmd shift a, it's essentially a hotkey combo search. Nov 16 21:12:59 anyone see anything obviously wrong here? http://imgur.com/fKA8N6g Nov 16 21:14:36 hi, i'm writing an app that moves files to Internal Storage/Music. however, android doesn't find those files unless the phone reboots and i clear data from media storage. is there any way i can force android to rescan the internal storage/music folder? Nov 16 21:15:01 google play music app doesn't find the files*** i can see them in the file explorer. Nov 16 21:27:20 If anyone asks you to sign an NDA for some android app I would say run based on my experiences lately Nov 16 21:27:37 yeah Nov 16 21:27:40 when someone asks for an NDA it screams NUB Nov 16 21:28:08 I foolishly let some asshat run me around on some bs and I should never have gotten into it and I could have focussed on more serious opportunities Nov 16 21:28:41 It's hard to tell people to fuck off on the NDA but that's where I'm at at this point Nov 16 21:29:53 Also it seems like a lot of the remote opportunities for android are drying up used to be pretty happening but now it doesnt seem to be Nov 16 21:29:54 hah. the one nda i signed turned out pretty well. always make sure to have a sit down, and a meeting before you sign an nda. Nov 16 21:30:30 Hey guys, I'm using the "detect significant motion" functionality to detect movement. The line that actually activates it is " mSensorManager.requestTriggerSensor(mTriggerEventListener, mSensor);" Nov 16 21:30:34 eghdk: did the NDA actually cover anything proprietary? usually people want to sign an NDA *before* the sit down which is bullshit to just hear their idea, which is yet another TINDER or whatever Nov 16 21:30:37 I was wondering if there's a way to disable this for X amount of seconds? Nov 16 21:30:54 I have yet to sign an NDA where they disclosed ANYTHING proprietary it's just a huge waste of time Nov 16 21:32:49 eghdk what kind of nda did you sign and how far along did you get before signing one? Nov 16 21:33:12 Hi Nov 16 21:33:28 I used to sign NDA's just mostly because it's easier than arguing and also because most are so poorly written they would be unenforcable, but these days I just see it has a huge black/red flag Nov 16 21:33:44 I need to send updates to my app. I dont know how to do it and I dont want to take your time. Just tell me what I should google to get the result Nov 16 21:33:47 calguy, show your code Nov 16 21:33:51 same as asshats that want me to go net 30 and bill monthly ... right Nov 16 21:34:01 canvs2321-: www.calguy.com/code Nov 16 21:34:16 I don't mind sending code out Nov 16 21:35:26 the recent NDA guy actually had the audacity to compare writing code to painting houses how offensive....that's the last NDA asshat I'll ever deal with Nov 16 21:35:43 Peyam: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CB0QFjAAahUKEwi2__qC85XJAhWSfYgKHbRXA0s&url=http%3A%2F%2Fdeveloper.android.com%2Fguide%2Ftopics%2Fui%2Fnotifiers%2Fnotifications.html&usg=AFQjCNEea7FZCvdKGaschSomOMl73ilUsg&sig2=7nc9mRqn7ZViOq7AMR4gSw Nov 16 21:36:57 ah sorry this looks more like waht you wanted right? https://developers.google.com/cloud-messaging/ Nov 16 21:37:40 pdxjohnny, no. I want the user to click on a button to update to it should get the updates automatically. in both case from bitbucket Nov 16 21:38:07 oh you mean update the app i see Nov 16 21:38:14 yes Nov 16 21:41:03 well that would depend on how you structure your application, if you have data files that are being updated it should be fairly easy to replace those, for example a map file if it was a game. I would think its not possible to update the application itself, which would be the activities and java code, without going through the play store, because of signing and whatnot. Nov 16 21:41:27 can anyone please help me out with my problem? Nov 16 21:43:06 Rush2112: you could disable it by seting something in the event handler saying I dont care about this event untill this variable is true again Nov 16 21:46:25 could you give me example syntax for that? Nov 16 21:46:32 pdxjohnny, I don't want to use google play. I want really to learn how it is possible and at least what to google Nov 16 21:47:54 Rush2112: is your code on github I could just make a pastebin with the additions Nov 16 21:48:05 sure, one second Nov 16 21:48:23 peyam you can download your apk from a server and then prompt the user to install the apk Nov 16 21:48:49 it is not handsfree/automatic and probably against the google play store ToS so you have to choose one approach or the other Nov 16 21:49:00 missingno, any source about it that I can learn from? Nov 16 21:49:02 line 242 is where i have the phoen check for movement. im sorry about my code not being formatted perfectly btu im in an unbelivable rush ;; Nov 16 21:49:03 http://hastebin.com/vonisowubu.java Nov 16 21:49:15 I learned the most about it from decompiling the Amazon app Nov 16 21:49:19 they used to do that Nov 16 21:49:21 you cannot update an app outside of the play store without the user enabling third-party sources Nov 16 21:49:42 and had helpful screenshots of the Android "Unknown Sources" screen to get people to change that setting Nov 16 21:49:46 you can send an intent directly to the play store to load your apps page if you know there's an update pending and prompt the user to update it Nov 16 21:49:53 requiring third party sources is just a terrible thing Nov 16 21:49:56 then they got banned from the play store lol Nov 16 21:50:05 i promise you i'd instantly delete any app which required it to function. fuck that. Nov 16 21:52:38 missingno how did you decompile the amazon app? did you wireshark it? Nov 16 21:53:36 uh you download the apk and run it thru dex2jar/cfr Nov 16 21:55:25 pdxjohnny: i probably shoulda @'d that to you but let me know if you got it! Nov 16 21:57:43 Hello everyone, I want to create a "Tray" (for lack of a better word) that will contain arbitary GUI elements and have a control to open and close (http://puu.sh/lo4dV/3cc218f3ce.png is a quick image about this). Any ideas about how to achieve this? Nov 16 21:59:24 Rush2112: I got it, just assign the current time to a variable, say lastTime, when mTriggerEventListener is assigned. Then when mTriggerEventListener is called get the currentTime and subract it from the lastTime to see if enough time has passed before you continue with what should happen or return because you dont want anything to happen you need to update the lastTime to be the current time. Nov 16 21:59:56 sorry i have to go so i dont have time to make the edits but that should be waht you want if i understand corretly Nov 16 22:04:56 Mark Allison has tons of cool stuff on his "Styling Android" blog, but i'm thinking at this point a blog is a terrible medium to contain all this information Nov 16 22:06:02 Hey g00s Nov 16 22:06:13 hey perlsyntax Nov 16 22:06:19 How are you? Nov 16 22:06:27 workin hard Nov 16 22:06:29 :) Nov 16 22:06:32 cool Nov 16 22:07:15 Sound good:) Nov 16 22:07:54 g00s,Look like google come out with with clous test lab soon:) Nov 16 22:08:00 cloud Nov 16 22:08:42 doesn't help me at all, i'd have to ship BT peripherals there ;) Nov 16 22:09:34 hopefully they will have it stocked full of Samsung test devices Nov 16 22:10:20 g00s,I hear there be a pay and free one for google test lab. Nov 16 22:10:58 It help me alot for not have to many device to test on. Nov 16 22:12:20 :) Nov 16 22:13:18 g00s,I was thinking of get a htc one m9 or the nexus 6p:) Nov 16 22:14:39 i'd get the nexus, just don't bend it Nov 16 22:14:52 who knows if htc will be around next year Nov 16 22:16:35 g00s,That what i was thinking about.But the iphone is the same size as the nexus 6p Nov 16 22:16:43 if i am right. Nov 16 22:17:29 perlsyntax: there's a new M9 called M9+ Nov 16 22:17:42 i hear about that. Nov 16 22:17:44 perlsyntax: also the HTC A9 is nice too Nov 16 22:18:03 i want to get one that has band 30 for att. Nov 16 22:19:11 shmooz, i never had a unlocked phone before. Nov 16 22:19:16 :) Nov 16 22:20:25 leakanary reports a fragment leak in viewpager.mDisappearingChildren is that a false positive? Nov 16 22:22:12 I'm adding support for the new permission model to our apps, and trying to add tests for it Nov 16 22:23:03 has anyone successfully mocked out checkSelfPermission, requestPermissions, shouldShowRequestPermissionRationale and friends? Nov 16 22:23:21 (in instrumentation tests) Nov 16 22:25:24 Anyone have ideas about my problem from before? Nov 16 22:27:15 DrDisconsented maybe you want https://github.com/Flipboard/bottomsheet ? Nov 16 22:27:35 or a simple view and animate it in/out Nov 16 22:28:19 memorion is that better than the umano one ? Nov 16 22:28:47 memorion: Ill look into that Nov 16 22:28:48 cheers Nov 16 22:29:29 g00s haven't used either, just saw someone from flipboard talk about in on /r/androiddev sorry Nov 16 22:30:46 well it doesn't depend on 9 old droids so thats a step forward Nov 16 22:36:44 yeah this bottomsheet looks good cool Nov 16 22:37:31 Hello, please is some way how to fake incoming call via android studio to usb device? In ADM I am able to test it with emulator, but not with usb device. Nov 16 22:45:48 ugh, gradle plugin 1.5.0 does java resource and jni merging also now Nov 16 22:45:49 that's ugly Nov 16 22:46:05 does 1.5.0 get rid of packaging options as well? Nov 16 22:50:29 I have a viewgroup Nov 16 22:50:42 i have on****Intiailized so that I can remove a loading cover Nov 16 22:50:53 (its for a map so there is al ot ((((ing stuff going on) Nov 16 22:51:04 umm but now if i had overlays to this map Nov 16 22:51:13 they will appear first or after the map is showing Nov 16 22:51:30 how would I get a callback for the when this viewgroup (the map is a view inside this container) Nov 16 22:51:48 has finished loading up its overlays, etc etc, anyone have a pointer? Nov 16 22:55:20 Which XPosed library do I need to support both LP? Can somebody help me please? Nov 16 22:55:58 what's lp Nov 16 22:57:44 lollipop Nov 16 22:57:49 o Nov 16 22:59:11 How can I keep the accelerometer values to always be oriented with [2] or "z" being the up/down axis? Nov 16 23:00:08 Hello, please is some way how to fake incoming call via android studio to usb device? In ADM I am able to test it with emulator, but not with usb device. Nov 16 23:02:31 why dont you just call it normally? Nov 16 23:02:58 I do not have another phone here Nov 16 23:07:12 oh noes! Nov 16 23:26:59 w00t support library update Nov 16 23:27:32 Levite that was last week :) Nov 16 23:27:41 hehe Nov 16 23:27:48 only a few things fixed Nov 16 23:28:03 yeah i just see a few things Nov 16 23:28:16 so I change gradle to 23.1.1? Nov 16 23:30:28 can't tell if that also includes the design library and customtabs library Nov 16 23:31:19 yeah i guess ican change everything Nov 16 23:38:30 if you have a DrawerLayout, which switches fragments, is it best to put the Toolbar in the DrawerLayout or in the Fragment's layout? I have one fragment that needs to put a spinner in the title so its a bit different than all the others Nov 16 23:39:28 Mavrik: I'm using traceview to try to find the amount of time it took for a method call to complete. The docs say to use the "find" box, but nothing I type seems to do anything. Ideas? Nov 16 23:40:40 weird, update changes behavior of tablayout Nov 16 23:41:24 Levite: What update? Behavior of tablout in design lib? Nov 16 23:41:58 eghdk yeah, had it at "scrollable" in a relativelayout, now it makes them super wide for some reason Nov 16 23:42:40 I had messed with the styling, it must have added padding somehwere Nov 16 23:48:40 has anyone here gotten robolectric and android unit tests working at the same time? My Robolectric tests run just fine but my AndroidTestCase classes aren't being found when I try to run my connected tests Nov 16 23:49:57 instrumented tests? Nov 16 23:50:02 are you running from the ide Nov 16 23:50:21 "Android Instrumentation Tests" is the test artifact name under build variants Nov 16 23:50:29 yeah Nov 16 23:52:09 my unit tests run under jvm using robolectric, but I have some tests to write that need to be connected to a device to run Nov 16 23:52:33 does the right icon appear on the run configuration Nov 16 23:52:34 http://i.imgur.com/uainw12.png Nov 16 23:52:45 the little droid Nov 16 23:52:51 yeah i get the robot with the red icon on his head Nov 16 23:52:53 or w/e it is Nov 16 23:52:56 as opposed to what robolectric tests look like Nov 16 23:53:04 then idk, that was the only issue I had Nov 16 23:53:09 I created the configuration myself Nov 16 23:53:11 because it wasn't there Nov 16 23:53:18 it's saying it's not finding any tests Nov 16 23:53:19 one time I accidentally ran an instrumentation test as a unit test and it asploded Nov 16 23:53:25 rofl Nov 16 23:54:05 when I hit Ctrl Shift r it still runs it as a junit Nov 16 23:54:14 Does anyone know if you can disable the reverse layouts? I would like to only permit my users to use my app in portrait and landscape mode only, not the reverse varieties. Nov 16 23:54:16 but if I run manually through the run button it goes Nov 16 23:54:34 oh wait Nov 16 23:54:37 it says it failed to to NPE Nov 16 23:55:55 Hi all. I have an EditText in a fragment and a toolbar in my activity. How can I go about adding this EditText to the activities toolbar when the fragment is active? Nov 16 23:56:10 activity's* Nov 17 00:06:37 I am trying to create a custom container (kinda like sliding draw) that will contain an unknown arbitary view. https://gist.github.com/anonymous/cac5ea08d62223fb8001 How do I put that view into the FrameLayout and still keep the rest of the view visable? Nov 17 00:09:54 Hello! Nov 17 00:10:13 I want a push notification to open activity B, which has parent activity A Nov 17 00:10:15 missingno: okay so actually if I right click the file in the project window it doesn't show the icon Nov 17 00:10:23 it was only showing because i was looking in the wrong spot Nov 17 00:10:24 when I click home button or back button on B, I want A to open Nov 17 00:10:31 but that isn't working, the app just closes Nov 17 00:10:36 how do you do this properly? Nov 17 00:10:57 I right-clicked the class name in the file itself grekkos Nov 17 00:11:11 but anyways all the matters is the run configuration Nov 17 00:11:14 missingno: how did you fix it? Nov 17 00:11:19 the right-click just creates it automatically Nov 17 00:11:24 oh Nov 17 00:11:26 from the class itself Nov 17 00:11:39 i tried moving this one Nov 17 00:11:47 because it was robolectric junit before Nov 17 00:12:02 make sure it is in androidTests and not tests Nov 17 00:12:11 i moved it to the androidTest directory Nov 17 00:12:16 wait Nov 17 00:12:19 androidTest or androidTests Nov 17 00:12:23 hmm Nov 17 00:12:28 i forget Nov 17 00:12:36 no it's Test nvm Nov 17 00:12:40 i have a sample project i just made Nov 17 00:12:54 not sure if I need to register this test somehow Nov 17 00:13:45 it is "androidTest" by default Nov 17 00:13:47 yeah same thing Nov 17 00:13:53 I added the test runner manually Nov 17 00:15:16 any idea on my issue guys? do you have to do anything else apart setting the parentActivityName on the manifest? Nov 17 00:17:59 not sure Mattx, sounds like it doesn't know the parent activity Nov 17 00:18:08 but i've never done it before so I can't contribute Nov 17 00:19:27 can someone figure out how to recompile this app Nov 17 00:19:32 it's on github but i've had no luck Nov 17 00:21:35 Mattx: why not make "<-" in the toolbar go to activity A instead of the back button, that'd feel more natural Nov 17 00:22:16 squirrel, that's what I'm trying to do actually Nov 17 00:22:34 I mean, both of them should go to A (which is the main activity) Nov 17 00:23:01 but pressing back or home button (which is <- in the toolbar) closes the application Nov 17 00:23:02 i hate when back button doesn't go back :/ Nov 17 00:23:18 back button does go back, to the home screen :) Nov 17 00:23:40 that is good! Nov 17 00:23:40 I think I found it! http://developer.android.com/guide/topics/ui/notifiers/notifications.html Nov 17 00:24:15 the pending intent on the notification creates an artificial back stack, makes sense Nov 17 00:46:39 TacticalJoke, Ended up putting the "Share" button in the Toolbar like you reccomended Nov 17 00:48:06 Cool. Nov 17 00:48:45 I can't sync with `com.android.tools.build:gradle:1.4.0-beta6` anymore. All of a sudden it's telling me the plugin version is too old. ;o Nov 17 00:48:48 It's been working for weeks. Nov 17 00:49:13 1.5.0 is fine, though. Nov 17 00:51:07 anyone have a problem with Android Device Monitor on mac, where the cursor because a stupid crosshare and doesn't work most often Nov 17 00:53:17 Kotlin 1.0 Beta 2 represent. Nov 17 00:59:42 TacticalJoke is the hierarchy viewer built into AS yet? Nov 17 01:01:46 The one for Views? Nov 17 01:01:53 yeah Nov 17 01:03:26 Not sure. Is it expected to come? Nov 17 01:04:30 i'musing the one in that horrid 'android debug monitor' eclipse thing Nov 17 01:04:45 but its so flaky Nov 17 01:05:35 I can't remember ever getting that working. Though the last time I tried it was with an old device (and maybe it needed a newer Android version). Nov 17 01:07:01 yeah sometimes that breaks down, but it did pull data - just that the cursor is a checkered circle and won't let me select anything in the UI Nov 17 01:25:08 yeah it doesn't work on old devices—that is, exactly where you need it Nov 17 01:31:47 can someone figure out how to recompile this app Nov 17 01:31:57 the source is on github but it doesn't play nice Nov 17 01:36:09 is it possible to see deeper into gradle building than just --debug? Nov 17 01:37:36 compileDebugJava is taking ~3 minutes Nov 17 01:39:51 if am using compat library Nov 17 01:39:59 is using non compat views in xml layout etc Nov 17 01:40:15 making things slower since i notice in hierarchyviewer they are swapped for the compat versions anyway? Nov 17 01:40:19 or does it not matter? Nov 17 01:41:18 lasserix_: Not sure, but it's this: https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/internal/app/AppCompatViewInflater.java#93 Nov 17 01:41:40 I can't imagine that being slow at all. Nov 17 01:42:11 In fact, it might even be faster. Doesn't that mean there's less reflection involved? Nov 17 01:43:49 so i have a card view Nov 17 01:43:52 where it has like Nov 17 01:43:54 HEADER and then Nov 17 01:44:00 a couple of rows Nov 17 01:44:15 which are split where you would normally use a linearlayout with width 0 and weight 1 Nov 17 01:44:19 so they take up even space Nov 17 01:44:23 Anyone have an idea about my problem from before? Nov 17 01:44:27 anyone know a good way to hack this and use a framelout? Nov 17 01:44:30 lasserix_: I feel like you just ignored my response. :p Nov 17 01:44:48 TacticalJoke: no thanks Nov 17 01:44:55 lasserix_: What? Nov 17 01:45:00 I was just looking for yes or no answer since i am in the middle of something else Nov 17 01:45:05 but i will definatly look that later Nov 17 01:45:07 thank you Nov 17 01:45:41 Oh, okay. No worries. Nov 17 01:46:04 I think it's gonna be faster, but I haven't looked at the surrounding code. Nov 17 01:46:45 DrDisconsented: What was it? Wasn't here before and am curious. Nov 17 01:47:21 I am trying to create a custom container (kinda like sliding draw) that will contain an unknown arbitary view. https://gist.github.com/anonymous/cac5ea08d62223fb8001 How do I put that view into the FrameLayout and still keep the rest of the view visable? Nov 17 01:49:40 I have been poking through the SlidingDrawer source but I don't see where it allows you to set the content. Nov 17 01:50:42 http://postimg.org/image/53hdga06l/ Nov 17 01:51:24 TacticalJoke: that is the layout except there is bounds, that is a triange with the center vertical line down the horizontal center Nov 17 01:51:31 basically instead of doing linearlayout Nov 17 01:51:54 is there a way i can mock a linearlayout horizontal with two children using weigh1 width0 by using a framelayout Nov 17 01:52:01 or something like that Nov 17 01:52:19 or does this require me setting params in code to get the placement right and i should just use Nov 17 01:52:28 linearlayout and weight Nov 17 01:54:35 So no ideas then TacticalJoke? Nov 17 02:16:09 I'm having some trouble getting SIP client to work. I have it registering and can perform makeAudioCall but it never seems to pick up the mic or play any sound. Any ideas on best way to trouble shoot? I have the recommended permissions from the Android docs for SIP, Internet Nov 17 02:16:33 From the sip side of things, there doesn't seem to be any issues related to NAT Nov 17 02:17:25 * g00s <3 atom ; you can add a bunch of projects to its nav view like eclipse workspaces - i have a bunch of android projects i can just drill down into http://imgur.com/BrZZuVH Nov 17 02:22:29 ensime on atom sounds interesting if it ever gets stable Nov 17 02:24:40 How do you all implement click listeners for child items in a recyclerview? Eg: I have a recyclerview with a bunch of cards, and each card has buttons for that card that need to listen for clicks. Nov 17 02:25:16 Currently I have click listeners set in onBindViewHolder but im not sure if this is proper. Nov 17 02:27:53 orbyt_: I set them when creating the view [holder]. Seems more natural to me. Nov 17 02:28:04 This is assuming that they don't change with binding. Nov 17 02:29:17 So just a regular old View.OnClickListener though? Nothing special im guessing Nov 17 02:29:23 Yeah, there's nothing else. Nov 17 02:30:07 Well, I guess there are hacks where people try to detect over which View a touch was made, but I'm not sure they're a good idea. Nov 17 02:31:02 do you define your OnClick methods in the adapter as well? Or do you use an interface to bubble it back up to the activity/fragment? Nov 17 02:32:20 I've done both before. I'm not sure which is best. If the adapter handles it, it becomes a real controller (kinda like an activity/fragment); if not, it's just something that creates and binds views. Nov 17 02:32:41 I'm actually leaning towards making adapters proper controllers lately. Nov 17 02:33:11 "Research Report: Android Studio Ranks Far Below Xcode, Visual Studio" https://adtmag.com/articles/2015/11/11/ide-comparison.aspx Nov 17 02:33:21 I'm finding that trying to keep adapters simple things that just create and bind views leads to all kinds of subtle duplication in my code. Nov 17 02:33:22 i'm not paying $3000 for the report though :D Nov 17 02:34:20 But one thing I do is make sure that an adapter just says `return new FooView(context);` or whatever -- my adapter is ignorant of my View stuff. My Views take care of themselves. Nov 17 02:36:21 TacticalJoke: "make sure that an adapter just says `return new FooView(context);`" <- what do you mean here Nov 17 02:38:37 I try to make my adapter's interactions with the Views it creates one-liners. I don't want an adapter being knowledgeable about how a View works. I can't think of a good example off the top of my head, though (only really lame examples). Nov 17 02:39:34 g00s: I didn't know about this: "Google seems to recognize its shortcomings and is planning to address them with an updated GUI stemming from the company's July acquisition of Pixate". Nov 17 02:40:10 yeah i don't know anything about that either Nov 17 02:41:13 orbyt_: To be honest, this is one of those situations where I thought I knew what was best but now I'm unsure. Nov 17 02:41:50 I mean the whole "How much responsibility should an adapter have?" question. Nov 17 02:43:41 TacticalJoke: Was gonna say, if your adapters are acting as controllers and defining click logic, then it is controlling how the view works. Nov 17 02:44:33 I think it makes more sense to have the logic defined in the activity but it seems so much easier to define everything inside the adapter right after setting the listeners Nov 17 02:44:43 Yeah, it's controlling how the View works, but what I meant above was that the View should hide its implementation details as much as possible. Nov 17 02:45:03 Why more sense in the activity? Nov 17 02:45:41 See, I used to think that, but now I'm less sure. Nov 17 02:46:14 Because when I think of adapters, I think of exactly that, adapting passed in data to stupid views Nov 17 02:47:53 That's true. I guess the View.OnClickListeners, too, could qualify as "passed-in data". Nov 17 02:48:02 The activity could define them and produce them. Nov 17 02:49:07 ugh, so much changed in builder 1.5.p Nov 17 02:49:10 0 Nov 17 02:51:30 pfn probably going to change again for gradle-experimental :) Nov 17 02:51:33 come on, admit you love i Nov 17 02:51:36 *it Nov 17 02:51:52 no, -experimental is just a changed dsl Nov 17 02:51:55 it doesn't change builder Nov 17 02:52:05 builder is independent of gradle Nov 17 02:52:11 although, it's developed in tandem Nov 17 02:52:20 orbyt_, TacticalJoke, I usually define my onItemClicked listener inside the adapter (extends BaseAdapter implements OnItemClickedListener) Nov 17 02:52:22 i.e. -experimental is just a different frontend for builder Nov 17 02:52:57 but I also add an interface called something like OnFooSelectedListener witch I implement in a place that makes sense Nov 17 02:53:36 alex_PP: And you define your onClick logic in the place you implement OnFooSelectedListener correct? Nov 17 02:53:52 I like the neatness of onItemClicked(int position){listener.onFooSelected(getItem(position));} Nov 17 02:53:54 orbyt_: yeah Nov 17 02:54:38 Are you talking about AdapterView.OnItemClickListener? Nov 17 02:54:43 makes it wasy to rip out the List if you need to. the listener has no concept of what's going on in the view Nov 17 02:54:49 yeah Nov 17 02:55:08 I think orbyt_ is talking about View.OnClickListener, which has slightly different implications here. Nov 17 02:55:29 alex_PP: So do you pass the ListView instance to the adapter? Or get it from `getView`? Just curious. Nov 17 02:55:31 same idea can apply Nov 17 02:55:45 the adapter has no idea about the listview Nov 17 02:56:43 So the activity/whatever says `listView.setOnItemClickListener(adapter.getOnItemClickListener());`? Nov 17 02:57:26 Adapter a = new Adapter(); listview.setAdapter(a); listView.setOnItemClickListener(a); Nov 17 02:57:49 and where have packagingoptions gone in 1.5.0 Nov 17 02:58:30 a would know about OnFooSelectedListener Nov 17 02:58:41 is the cardview totally useless since you should be able to mock it? Nov 17 02:58:55 Oh. Interesting idea, but orbyt_ can't do anything like that because child Views need to be clickable. Nov 17 02:59:20 I think the adapter should be responsible for the view hierarchy below it Nov 17 02:59:44 you can still pass a FooListener into the adapter and have it react to the clicks on the child views **** ENDING LOGGING AT Tue Nov 17 02:59:58 2015