**** BEGIN LOGGING AT Mon Aug 15 02:59:58 2016 Aug 15 03:00:01 I would still always prefer to work on a proper desktop PC with a big screen and a real keyboard Aug 15 03:00:21 but hey, I'm old :) Aug 15 03:02:18 I guess shared/synced/remote data access works well for me - if I can assume the same data is available everywhere, I can use the appropriate device and form factor for my context Aug 15 03:07:22 * capella-5x saw "real keyboard" 👍 Aug 15 03:19:19 pfn: Thanks! Aug 15 03:32:42 hi Aug 15 03:33:10 in an image view, is there a way i can make it so that if an image has a vertical size greater than "X", then i crop the top and bottom? Aug 15 03:33:11 Leeds you can keep your real keyboard :) Aug 15 03:33:13 http://www.roadtovr.com/envelop-vr-open-beta-windows-virtual-reality-desktop-htc-vive-oculus-rift/ Aug 15 03:33:34 so if it is a max height of 100, but the image is 120 - then i crop 10px off the top and 10px off the bottom Aug 15 03:34:10 what is "windows"? Aug 15 03:35:14 Leeds: prison Aug 15 03:35:55 its what linux has been trying to replace on desktop for 15+ years :) Aug 15 03:36:07 haters gotta hate Aug 15 03:36:16 lol i don't have windows box :) Aug 15 03:36:27 * g00s just likes having fun Aug 15 03:38:31 Leeds https://blogs.gnome.org/uraeus/2016/08/12/want-make-linux-run-better-on-laptops/ Aug 15 03:39:19 oh its munich Aug 15 03:44:10 yeah, I don't want to work in Munich, although I will be visiting there for an afternoon in October :) Aug 15 03:44:21 Munich, that is, not Red Hat Aug 15 03:44:40 Has anyone ever made an app on a google tango device? Aug 15 04:47:45 Goog evening Aug 15 04:48:03 Good* Aug 15 04:48:46 Does anyone have a moment to point me towards some more in-depth documentation regarding signing builds for AOSP? The instructions here -> https://source.android.com/devices/tech/ota/sign_builds.html Aug 15 04:49:10 do not seem to be returning yielding any positive results in regards to signing the build Aug 15 05:19:25 anyone familiar with BLE? Aug 15 05:30:34 hi everyone Aug 15 07:04:35 You are a developer of Android Wear? Aug 15 07:06:03 hmm, trying to share a content_uri(bitmap) and a text in the same message Aug 15 07:06:14 only the bitmap is attached Aug 15 07:08:02 I required a developer of android wear, for consult. Aug 15 07:19:09 not cooperation Aug 15 07:58:19 hi there ! I'm facing a problem right now, I can't publish my signed APK "the error message is Vous avez importé un fichier APK dont le certificat n'est pas encore valide. Vous devez créer un fichier APK avec un certificat en cours de validité." in English the certificat is not valid yet. I think the probleme comes from my ISP #Free but I'm not sure, Ideas ? Aug 15 08:42:22 procedural alghoritm Aug 15 08:44:08 jar of dirt Aug 15 08:44:10 i win Aug 15 08:50:14 Jonno_FTW: Aug 15 08:50:23 I've done some BLE stuff Aug 15 09:44:28 Is there real documentation for the IInAppBilliingService anywhere? Why is there a 3 hard coded in getPurchases? I'm trying to get subscription renewals and I don't think IabHelper is set up by default to pull them. Aug 15 10:04:46 How to you set a callback for a fragment after the screen has been rotated? Aug 15 10:08:10 markyosullivan: When the activity is recreated, retrieve the fragment using the Activity's FragmentManager Aug 15 10:10:19 Hey, probably a basic question, I have btn.setBackgroundResource(R.color.my_color) that works, I have a dynamic color (Integer) that I want to use as the color, but I cant seem to find the way to do that Aug 15 10:10:45 tried btn.setBackground(getResources().getDrawable(color)) Aug 15 10:10:50 setBackgroundColor? :P Aug 15 10:10:50 and it did not like it Aug 15 10:11:04 or setBackground(new ColorDrawable) Aug 15 10:12:39 Can anyone help with a HttpURLConnection problem? Cant resolve method readStream(). http://pastebin.com/eJxyhdZW Aug 15 10:13:07 hrm I thought I tried that, but may have missed something obvious, trying again, cheers Aug 15 10:15:27 heh totally works, thanks :) Aug 15 10:18:11 Zeuri: you're calling a method that has no real code referred by it Aug 15 10:18:41 Zeuri: I suggest implementing something like this: https://www.mkyong.com/java/how-to-convert-inputstream-to-string-in-java/ Aug 15 10:22:29 pduin: I've done that however I can't get the callback working Aug 15 10:22:35 Im a little confused what my readStream method should do with the bufferedinputstream Aug 15 10:22:42 Well, I couldn't but I got it now, not sure if it's properly working Aug 15 10:22:51 having other issues now Aug 15 10:22:59 thepoosh: Im a little confused what my readStream method should do with the bufferedinputstream Aug 15 10:23:46 Zeuri: did you read the link I posted? Aug 15 10:25:03 thepoosh: yes, im struggling to understand to how they serve in settign up the connection Aug 15 10:28:35 what is the issue? Aug 15 10:30:43 i dont understand what the readStream method should actually do Aug 15 10:32:50 Zeuri: the result from any InputStreamReader is a byte[] Aug 15 10:33:02 which means you need to cast it to the result type you're expecting Aug 15 10:33:10 i.e. string or Object or JSON Aug 15 10:43:10 thepoosh: thank you, I'm trying to implement it now =] Aug 15 10:43:15 Hi. So for some reason Android allocates memory on fos.getChannel().transferFrom(rbc, 0, Integer.MAX_VALUE); Aug 15 10:43:48 Generall Java doesn't allocate that - is there a way I can have it /not/ allocate 2GB everytime I want to download a file of variable size? Aug 15 10:44:07 Basically I'm getting an OOM in the emulator Aug 15 10:44:13 java.lang.OutOfMemoryError: Failed to allocate a 2147483659 byte allocation with 1756372 free bytes and 125MB until OOM Aug 15 11:34:24 Google updated their docs. There are now instructions on how to run the new Eclipse Neon with ADT https://developers.google.com/eclipse/docs/install-eclipse-4.6 Aug 15 11:52:21 It seems like I'm getting wrong info when checking purchases.subscriptions, does Google return correct info for Alpha channel apps that have subscriptions? Aug 15 11:54:25 the fields autoRenewing, status, and expiryTimeMillis all look wrong. Aug 15 11:55:53 but things like packageName and startTimeMillis look correct. Aug 15 12:06:28 * raoul11 roofies thepoosh Aug 15 12:06:42 * thepoosh becomes numb and tired Aug 15 12:06:54 THIS GUY FUCKS! Aug 15 12:06:57 u so quiet lately Aug 15 12:07:10 good ol jared Aug 15 12:07:57 hi boys, what is the date of release android n ? Aug 15 12:08:13 http://img.pandawhale.com/post-62250-Silicon-Valley-Russ-Hanneman-t-JwSy.gif Aug 15 12:08:23 raoul11: in a meeting Aug 15 12:08:47 am already compiling against 24 Aug 15 12:09:06 donno why Aug 15 12:09:12 enjoy poosh Aug 15 12:09:21 raoul11: nope, still targeting 21 i think Aug 15 12:09:52 compiling & targeting 24 here Aug 15 12:09:55 which seems weird Aug 15 12:10:06 compile = 23 target = 21 Aug 15 12:10:15 i needed some stuff from 24 Aug 15 12:10:20 coz i was too lazy to hack it Aug 15 12:10:29 let's hope you didn't fuck up things Aug 15 12:10:36 actually, all i needed was a simple param in a drawerlayout's method Aug 15 12:11:10 nothin seems to be broken atm, but its far far far faaaaaaar from deployment Aug 15 12:26:56 So I am doing window.setStatusBarColor Aug 15 12:27:53 however if I set that to white, the icons are now no longer visible, anyone know how to get the icons to ensure contrast? Aug 15 12:33:41 daleharvey: nope! Aug 15 12:33:46 just not gonna happen Aug 15 12:33:53 this is how the colors work Aug 15 12:34:40 ugh yeh seeing chrome ignores white theme-colors too Aug 15 12:35:29 There's android:windowLightStatusBar Aug 15 12:40:53 anyone use google in app billing api for android subscriptions? Aug 15 12:42:53 it's giving me incorrect information, not an error code, bad data. Aug 15 12:44:47 i'm successfully querying the purchase token, but it's returning partially wrong information about the token. Aug 15 12:45:49 daleharvey: as SimonVT said https://developer.android.com/reference/android/R.attr.html#windowLightStatusBar you can also enable that in code using view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) Aug 15 13:07:33 I am writing a class in my project, and I want to show a warning when someone overrides some functions of it somewhere, something like "Overriding this will make everything die ..." or something like that. Is it possible? Aug 15 13:09:28 sorry maybe i'm missing something - the code at source.android.com is not the android code from android.x.y? Aug 15 13:09:41 i want to see the code for android.inputmethodservice.KeyboardView Aug 15 13:10:29 Something like, @Deprecated so if someone can point me to its source, it'd be great Aug 15 13:18:45 So I was thinking.... What if it's some crazy one-off glitch. So I cancelled the subscription, resubbed, and now it seems to be working... Aug 15 13:29:48 how am i supposed to debug something that's in android code that i dont really have access to and am not modifying directly? Aug 15 13:33:38 installed Genymotion, setup one virtual device, it shows up in AS automatically for me to test on, I then created a new device (targeting newer API) and now neither show up when I want to run Aug 15 13:38:14 well I'll be, the device simply has to be running! AS doesn't start it for meh. Sometimes it is the simple things in life that are the most rewarding Aug 15 13:44:41 I have a custom action bar at the bottom of the screen that sits on top of a scrollview. The problem I have is that when the keyboard is opened this action bar is moved above the keyboard and needs to be redrawn. This causes a lag and shows the action bar twice while redrawing. If I don't use adjustResize the keyboard covers up the action bar? Is there any Aug 15 13:44:41 way to technically solve this problem or would the design need to be changed to have the action bar at the top of the screen for example? Aug 15 14:07:31 How can I draw a "Send" button? Aug 15 14:08:02 I'm using an ImageButton, but I don't know exactly which drawable to use, are some of these drawables built in? Aug 15 14:16:40 nevermind, I downloaded from here and extracted the android folder into my res folder Aug 15 14:17:37 is this channel about pokemongo ? Aug 15 14:18:45 JustinHitla: no Aug 15 14:19:04 so there is that software "HTTP Injector" for android in description it says: "Support Android 2.3 to Android 5.1" was there so drastic changes in 6.0 so programs can't run on it without some big changes ? Aug 15 14:19:36 so this is a thing? https://github.com/eskimoapps/ResourceNestingExample Aug 15 15:06:32 hi guys, what is the recommended IDE for Android development? Aug 15 15:06:54 android studio Aug 15 15:15:52 why is this still being asked Aug 15 15:16:11 Can we not have a bot which auto replies to that question? Aug 15 15:20:08 keb: vim Aug 15 15:23:08 JustinHitla: emacs Aug 15 15:31:55 markyosullivan: with vim mode activated Aug 15 15:33:20 Neeeeeeerds Aug 15 15:33:27 Just use ed. Aug 15 15:36:40 There is not Objects.equals() in the older versions of Android? Aug 15 15:42:29 Arancio, ? Aug 15 15:42:46 Is it "dangerous" for me to put my devices' IDs in the production APK? Why would anyone reverse engineer my app and "steal" them? Aug 15 15:43:31 I attempted to use Objects.equals() to compare two strings (managing the null cases) and I got a warning from Android Studio telling me to raise the minimum SDK version if I really wanted to use it Aug 15 15:45:14 What are device IDs? Aug 15 15:46:17 If they are worthy enough I'll reverse engineer your app and steal them Aug 15 15:46:27 Please add a link to your app too Aug 15 15:46:37 Arancio: X_X Aug 15 15:48:04 Arancio: I don't know exactly what they are, but they're supposedly "unique enough" for AdMob to differentiate test devices from consumer devices Aug 15 15:48:14 JustinHitla: I don't use emacs Aug 15 15:48:20 I do use vim though Aug 15 15:48:58 Being unique, I wonder if some nutjob could get that ID and impersonate my device or something Aug 15 15:50:45 The odds of this are very slim, but I'm just curious Aug 15 15:51:17 MisterGadfly: yeah, it may be a good idea to remove them in case there is some way to use them in a way that to don't like and you don't know yet. Aug 15 15:52:05 I'm not expert enough of mobile devices to tell if there is an usage of this kind Aug 15 15:52:09 markyosullivan: so why you suggested it ? Aug 15 15:58:10 hi all Aug 15 15:59:27 JustinHitla: typical emacs vs vim war Aug 15 16:04:58 cool gradle 3.0 Aug 15 16:13:03 Any big changes g00s? Aug 15 16:13:19 markyosullivan should be speed - again - haha they keep saying that Aug 15 16:13:44 i'm running AS with java 6, so i wonder how to use it though Aug 15 16:13:50 Wonder if it'll be a noticable increase in speed Aug 15 16:14:02 Why Java 6? Aug 15 16:20:04 that's interesting if android studio isn't built using java8 Aug 15 16:25:15 How do I create a custom adapter for listview and why do i need one? Aug 15 16:27:05 you answer that for yourself Aug 15 16:29:00 searching google to learn everything about android is such a pain, i wonder if i can just take a course Aug 15 16:32:49 g00s, hmm, doesn't AS need Java 8 lately? Aug 15 16:34:27 purplex88: First you have to know what the adapter of a listview/recyclerview does Aug 15 16:44:38 s73v3r: already did. you can ask me question to test if i learned Aug 15 16:45:01 if you know what it does, then why you would create a custom one should be apparent Aug 15 16:46:13 but i don't know what a custom adapter does Aug 15 16:46:46 i just want to add images to listview and have columns Aug 15 16:47:03 you know what an adapter does, so you know what a custom adapter does Aug 15 16:48:15 what adapter does is gets the data from source using ArrayList etc. and channels it into listview Aug 15 16:48:23 yes Aug 15 16:48:39 and it recycles views etc for performance Aug 15 16:49:02 yes Aug 15 16:49:38 Mavrik things changed recently, memory is little foggy - AS 2.2 dropped Java 6 i think Aug 15 16:49:47 i'm using 2.1 stable though Aug 15 16:50:34 so why are we customizing it? Aug 15 16:50:50 what does “channeling it into listview/recyclerview” mean? Aug 15 16:51:05 purplex88, no, actually adapter doesn't do anything Aug 15 16:51:19 dex isn't even built using java6 anymore Aug 15 16:51:22 purplex88, all recycling, drawing, scrolling, etc. is happening inside ListView/RecyclerView/GridView/etc. Aug 15 16:51:26 dx that is Aug 15 16:51:53 purplex88, Adapter is just a data object that provides views for each line when they need them filled with proper data Aug 15 16:52:08 Mavrik: I was trying to get them to come to that themselves Aug 15 16:55:03 And you were being wrong in the process. :P Aug 15 16:55:04 s73v3r: converting data into view Aug 15 16:55:14 Mavrik: No, I wasn’t. Aug 15 16:55:26 purplex88: Yes. And why would you need a custom one? Aug 15 16:55:55 Mavrik: but view goes through adapter to listview Aug 15 16:56:27 purplex88, why is there a "but" there? Aug 15 16:56:43 ListView needs a line, it tells adapter "give me view for line 8" and adapter provides it. ListView then manages. Aug 15 16:58:35 Mavrik: i mean for recycling "adapter" is stll involved Aug 15 16:59:02 because it fetches the data Aug 15 17:00:29 purplex88: Anyways, your adapter takes the data and binds it to the view. Why would you need custom adapters, given that? Aug 15 17:01:53 s73v3r: to define how and what data to get into listview? Aug 15 17:02:12 yep Aug 15 17:02:16 that is correct Aug 15 17:02:33 Like i think image data Aug 15 17:04:39 Custom adapter must be able to modify the data before it reaches listview Aug 15 17:07:37 however i don't think there's an offical Android guide that tells you how to do it Aug 15 17:09:04 android assumes you know java Aug 15 17:09:05 that's all Aug 15 17:09:21 if you know java, these sort of concepts like adapters come easily Aug 15 17:14:18 pfn: do you recommend learning from a video course? i found many on udemy and udacity Aug 15 17:14:29 do all the udacity android courses Aug 15 17:14:47 they are free too which is nice Aug 15 17:14:48 lrn dart Aug 15 17:14:57 thats supposedly where google is heading next Aug 15 17:15:37 pfn: have you seen "android networking basics" course on udacity? Aug 15 17:15:47 I don't use courses Aug 15 17:16:29 lol dart :D Aug 15 17:16:31 pfn: you learned from google? Aug 15 17:16:48 purplex88, yes, by reading d.android.com and understanding documentation Aug 15 17:18:05 Mavrik, read it today somewhere on the news Aug 15 17:18:36 "the OS of everything" Aug 15 17:22:32 Google is not moving away from Java for android any time soon Aug 15 17:22:47 they mentioned this in there reddit AMA about a month ago Aug 15 17:22:52 their* Aug 15 17:23:07 yeah figured it was some clickbait article Aug 15 17:24:04 Ha. Then why perpetuate the misinformation here? Aug 15 17:25:06 i wasnt, but ok. Aug 15 17:25:58 so following this https://plus.google.com/+DmytroDanylyk/posts/bjYgPZFK1ti -- subfolders for layouts, and wondering if anyone did this and found any drawbacks/commonpitfalls? Aug 15 17:26:38 it’s a pain, and extra work Aug 15 17:27:12 there is an Android studio plugin somewhere that will group resource files into “folders” based on the prefix of the name. Aug 15 17:27:29 they’re not actually in folders on the file system, but the browser makes it look like they are Aug 15 17:27:42 interesting, but its not a lot of work (just some lines in gradle Aug 15 17:28:01 every time you add a new folder Aug 15 17:28:09 s73v3r, do you know the name off hand? Aug 15 17:28:15 i don’t, sorry Aug 15 17:28:23 np. ill look it up Aug 15 18:06:51 Is the surface of a TextureView 'persistent' ? (i.e. can I call Codec.SetInputSurface(...) on the surface obtained from a TextureView) Aug 15 18:12:25 redefine your question Aug 15 18:12:27 it doesn't make sense Aug 15 18:12:37 refine Aug 15 18:18:43 hmm I'll have to think about that then Aug 15 18:21:47 My goal is to decode a video, display it to a TextureView, then re-encode it. I can specify the output of the decoder as the TextureView, but the Encoder expects a 'persistent input surface' Aug 15 18:22:51 Is there a way to make the TextureView's surface a 'persistent input surface' Aug 15 18:28:52 I'm developing an app that involves a service that gets location updates. It has some saved state, and occasionally the state's memory will get freed in between updates. This, as you would expect, causes the app to crash and burn. Aug 15 18:29:38 I'd like to save some of the state, but the time delay between the updates varies; it may be as low as 15 seconds or as high as 20 minutes. If the updates are at a close interval, then that could cause a lot of unnecessary writing. Is this a founded concern, or should I just save the state to a file every update? Aug 15 18:31:23 fraktor i'd save such that (1) if the batch exceeds limit it gets written (2) if the batch is more than 30s old, it gets written. or something like that Aug 15 18:31:51 its tricky with sqlite, default is WAL is disabled so there is lots of write amplification Aug 15 18:32:38 but, if you just append to a file, then that could be better, less power consumption writing to flash, etc Aug 15 18:32:45 or you could try enabling WAL and see how it goes Aug 15 18:33:58 g00s: what I need to save is a single Location value. What's the best way to do that? Aug 15 18:34:33 fraktor you /could/ try h2 mvstore, and use the r_tree index Aug 15 18:34:46 then you can do range queries on the gps data Aug 15 18:34:59 i think its still beta though Aug 15 18:35:09 well he says 192 is technically stable Aug 15 18:36:08 I perhaps should mention that this location value will be overwritten, not appended. Aug 15 18:36:22 oh so its only a single location ? Aug 15 18:36:32 yes. a single Location value. Aug 15 18:36:37 oh Aug 15 18:36:47 probably just put it in shared prefs Aug 15 18:36:51 I would be confident that saving it as a file with a delimiter would be perfectly fine. Aug 15 18:37:13 sqlite is almost always the most reliable Aug 15 18:37:37 if you put in shared prefs, process gets killed, it just won't make it - but the data won't be corrupted Aug 15 18:37:59 what do you mean by "it just won't make it"? Aug 15 18:38:05 same for sqlite, if process is killed before transaction Aug 15 18:38:18 fraktor value on disk will be old state Aug 15 18:38:50 oh I see. So the transaction is atomic (close enough for this context, anyway)?\ Aug 15 18:40:02 yeah Aug 15 18:41:29 the location value is the last measured location. I'm doing some geofencing, so I need to know when the user has crossed a boundary in this case. should I store it as something like "LastLongitude" and "LastLatitude" and just store two separate floats, then detect if the lastLocation variable is null and restore from SharedPreferences? Aug 15 18:41:51 why not use gms geofencing? Aug 15 18:41:56 doesn’t Google Play Services have geofencing built in? Aug 15 18:42:44 yeah, i dount you would beat gms geofencing in any dimension of reliability, power, or performance Aug 15 18:42:51 /any/ dimension Aug 15 18:43:35 g00s: 1. I'm doing some tricks with the delay time to save battery life. It looks like Google's geofencing doesn't do that. 2. I need to be able to add and remove geofences dynamically, and I've already got my own structure to communicate between the interface and the service. If you still think gms is better, please tell me why. Aug 15 18:44:07 i’m 75-90% sure Google’s solution is going to be better than yours regarding battery life Aug 15 18:47:36 Hello, I have a question. Why when I am sending "ls /" in Runtime.getRuntime().exec(cmd); I am getting "No such file or directory" exception? Aug 15 18:47:48 because it expects full path Aug 15 18:48:05 You mean /system/bin/ls ? Aug 15 18:48:18 s73v3r: reading up on it, it looks like you're right. I'll look at reimplementing that (although it's a tiny bit frustrating that I worked this hard on my hand-rolled solution :P). Aug 15 18:51:02 I want to get list of files from "/" path. But I am getting "No such file or directory" exception. Aug 15 18:51:23 yes Aug 15 18:51:36 and why would you use exec ls to get a list of files Aug 15 18:51:40 there are java apis to do so already Aug 15 18:51:51 Quick question. It's my first time using in-app purchases. I was wondering if a user did not add a payment method before purchasing would the user be sent to adding a payment method before? or will the payment not go through and just produce some sort of error? Aug 15 18:52:33 Ok so. Why I am getting this: "java.io.IOException: Error running exec(). Command: [/system/bin/echo "149 149 149 0" > /sys/class/breathlightdrv/breathlight/rgb] Working Directory: null Environment: null" - "No such file or directory" Aug 15 18:53:07 because you're doing it wrong Aug 15 18:53:12 shell redirections don't work in exec Aug 15 18:53:42 So where it works? Aug 15 18:53:55 when you use a shell Aug 15 18:54:25 So how can I call a shell? Aug 15 18:54:27 you have to do a pipe(), dup2() and rewrite the stdout/stderr/stdin descriptors if you want redirection to work like it does launching from a shell Aug 15 18:54:56 you don't need a shell to get a list of files in a path. Google 'java opendir readdir' Aug 15 19:00:11 So another question. How can I call that "echo \"" + r + " " + g + " " + b + " 0\" > /sys/class/breathlightdrv/breathlight/rgb" ? Aug 15 19:07:24 Can you program android application in Android Studio using Scala? Aug 15 19:08:18 applications Aug 15 19:09:09 RecyclerView seems to display all views onscreen (even though I don't see them onscreen) according to the childView.getGlobalVisibleRect() whenever I call notifyDataSetChanged() on the RecyclerView.Adapter Aug 15 19:10:09 Does anyone know what exactly is triggering them to flicker onto the screen? Aug 15 19:10:49 So another question. How can I call that "echo \"" + r + " " + g + " " + b + " 0\" > /sys/class/breathlightdrv/breathlight/rgb" ? Aug 15 19:10:57 I feel like I've narrowed down where I should be looking in the RecyclerView source since I am not noticing this when I call RecyclerView.Adapter#setHasStableIds(true) Aug 15 19:17:21 Is JakeWharton the real Jake wharton? Aug 15 19:18:32 cruxae: no, it's his brother Aug 15 19:19:28 LosTigeros, so take a moment and actually think about what you're doing. echo redirect writes to a file: so, open the file and write to it. Aug 15 19:19:35 LosTigeros, i'd be surprised if you have permissions to do so, however Aug 15 19:19:52 LosTigeros, and that will happen regardless of if you use a shell exec or write to it via java Aug 15 19:20:22 haha hilarious, I should change my name to JDorsey Aug 15 19:28:53 Pe my question earlier it seems like it might be because the RecyclerView is removing items one by one Aug 15 19:28:59 s/Pe/Per/ Aug 15 19:29:23 And they technically are "onscreen" even though it's never visible Aug 15 19:29:31 just guessing so far, still searching Aug 15 19:32:35 yiati, are you trying to build your view once its 'visible'? I've always just set it up whenever it pinged me for a record and made sure everything was visible/hidden as appropriate Aug 15 19:33:25 yiati, i've never had a problem with it flickering, but not hugely complex views, either - maybe a dozen elements in one or two layouts in the most complex Aug 15 19:34:18 anyone familiar with good resources on designing on-disk data structures ? i think where I would mess this up w/o guidance is reliability, pointers not getting updated atomically, etc Aug 15 19:35:09 dragorn: No, I'm just trying to setup a listener that can notify me when a view is first visible and not obscured and in the viewport which View#getGlobalVisibleRect() gives me. I have it working great currently except for when I call notifyDataSetChanged() on my RecyclerVew Aug 15 19:36:03 yiati, ah. that's a fair bit more complex than anything i've tried to do Aug 15 19:38:21 dragorn: Yeah same here :P I have an id associated with each view, that I'm putting in view.setTag("someTag", "thing123"), and trying to specifically be able to know when a view with an associated id first is visible in the viewport. I have this so far https://gist.github.com/caseykulm/0d51ef4d4979be176e89bcc84220c10d Aug 15 19:39:05 dragorn: Only an issue so far for a RecyclerView in a NestedScrollView in a SwipeRefreshLayout in a CoordinatorLayout :{ Aug 15 19:39:28 yiati, I've never cared when a view is visible other than what recycler already tells you so I haven't hit that problem Aug 15 20:07:31 Panel Menu appears when invoked on Samsung S4 test phone when running from AS, doesn't appear on a Genymotion EMU setup with same API... Aug 15 20:07:39 that ring a bell to anyone? Aug 15 20:10:23 Thanks dragorn, I used PrintWriter, and It works perfectly ;) Aug 15 20:45:22 Hi, I'm developing an app with android studio and have put the location_fine permission into the manifest. But when I do the permissions check using checkSelfPermission it comes back as false Aug 15 20:45:29 (i'm deploying from AS to the phone) Aug 15 20:46:04 gho, it's always false until you request it Aug 15 20:46:10 manifest permission is only for devices Hi, How do I use ext {} properly. I was using it to store version code. I have this in my build.gradle https://dpaste.de/VeqF but it gives me Error:(27, 0) Could not find property '$VERSION_CODE' on ... Aug 15 20:54:44 astroduck: no dollar sign Aug 15 20:55:17 thanks Aug 15 20:55:28 it is now complaining that I have screen overlay detected Aug 15 20:55:40 do I have to go through all the apps and turn this off? i have never had it before Aug 15 20:55:59 yiati: Cool. Thanks Aug 15 20:56:43 how can I use findViewById inside a RecyclerView adapter? Aug 15 20:56:56 extends RecyclerView.Adapter Aug 15 20:57:03 view.findViewById Aug 15 20:57:14 I'm passing the context from the activity Aug 15 20:57:18 and doing Aug 15 20:57:28 mContext.findViewById Aug 15 20:57:32 without any luck Aug 15 20:57:52 I also tried to do mContext.getResources().getLayout(R.id.customFrameLayout) Aug 15 20:58:03 that is recognized but it doesn't work Aug 15 20:58:31 because it’s not mContext.findViewByID Aug 15 20:58:41 its view.findViewById Aug 15 20:59:02 Context doesn’t have a findViewById method. View/ViewGroup does Aug 15 21:00:29 but how do i get that view element in my adapter? Aug 15 21:00:34 I tried to add it as a parameter Aug 15 21:00:38 it should be passed Aug 15 21:00:48 @Override public void onBindViewHolder(CustomViewHolder customViewHolder, int i, View view) { Aug 15 21:00:49 you’re talking about the individual cell views, right? Aug 15 21:00:58 but it says that it's now overriding the method Aug 15 21:01:05 cause a method with 3 parameters doesn't exist Aug 15 21:01:08 on the parent class Aug 15 21:01:13 exactly Aug 15 21:01:21 if you change the parameters, you’re not overriding Aug 15 21:01:47 I'm new to RecyclerViews Aug 15 21:01:57 so I don't know how to get the view element Aug 15 21:02:03 and get a layout from my xml Aug 15 21:02:26 this adapter has an activity that uses the RecyclerAdapter Aug 15 21:02:28 generally you create the view in onCreateViewHolder, and pass it to the ViewHolder class, which will do that Aug 15 21:02:37 forget about the activity Aug 15 21:03:09 @Override public MyRecyclerAdapter_MyFlocks.CustomViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.myflocks_list_row, viewGroup, false); CustomViewHolder viewHolder = new CustomViewHolder(view); return viewHolder; } Aug 15 21:03:20 don’t post code in here Aug 15 21:03:24 it’s impossible to read Aug 15 21:03:38 if it’s more than one line, use a paste service, so it can be read Aug 15 21:03:40 please Aug 15 21:03:42 j4f-shredder: Codepath has really good guides for stuff including RecyclerView https://guides.codepath.com/android/using-the-recyclerview Aug 15 21:03:51 http://pastebin.com/raw/QLK5rctB Aug 15 21:04:05 so there I should add a View view parameter Aug 15 21:04:07 and keep it? Aug 15 21:04:13 on a variable Aug 15 21:04:13 ? Aug 15 21:04:20 so I can grab it in another method? Aug 15 21:04:25 that is working exactly as it should be working Aug 15 21:04:40 do not change that method Aug 15 21:05:21 in your viewholder, you’re going to want to do your findViewById stuff Aug 15 21:06:37 j4f-shredder: https://developer.android.com/reference/android/view/View.html#findViewById(int) Aug 15 21:13:52 thanks Aug 15 21:13:54 I will read Aug 15 21:13:57 and try thast Aug 15 21:13:58 xD Aug 15 21:16:26 hey something big I seem to not know at all... So i see a sample of code on GITHub and i copyit ( type it out to learn) and then I get to this line in the imports and realize IDK how to bring in this LIB ? Aug 15 21:16:39 so there is an import br.liveo.navigationliveo.NavigationLiveo; Aug 15 21:17:16 and i see the stuff on Github also ( maybe its the right thing ? ) but I have no idea how to bring this into my project. Do i add it in the graddle build ? Aug 15 21:23:39 Anyone here switch to Gradle 3.0 yet? And if so, how did you get it working in Android Studio? Aug 15 21:24:24 some people in the reddit thread got it working, apparently Aug 15 21:24:34 i guess you have to switch to the beta build tools? Aug 15 21:25:56 GOD DAMN I HATE THAT FUCKING WORTHLESS PREVIEW WINDOW AND IT”S INABILITY TO RENDER EVEN THE SIMPLEST FUCKING LAYOUT Aug 15 21:26:06 CAN’T FIND THEME MY ASS Aug 15 21:29:34 :( Aug 15 21:29:53 That's unfortunate Aug 15 21:30:08 I don't even bother with Android Studio design mode/preview anymore, it's pretty worthless Aug 15 21:31:28 s73v3r yeah, i notice i keep having to set the theme Aug 15 21:31:30 it is embarassing how bad these tools are. Whoever does this at Google should be fired Aug 15 21:31:41 s73v3r lol, i said that 5 years ago :) Aug 15 21:34:41 but google had to make some tradeoffs - read recently, one of the things devs like most about android is you can use any platform to build ... Aug 15 21:34:56 so its a bit harder to support all 3 Aug 15 21:35:06 I’m sorry, but “working tools” are not a tradeoff Aug 15 21:35:40 If any company had the resources to do it right it would be Google Aug 15 21:35:54 But they don't care (except for the tiny team that got staffed to it) Aug 15 21:36:57 design preview is worthless Aug 15 21:37:00 always has been... sadly Aug 15 21:37:51 i don't think it was the team. they were all very smart - i blame the culture over there - time and time again i see they plat fast and loose with things, almost a disdain for discipline Aug 15 21:38:25 plat -> play Aug 15 21:39:05 Well I would hope they refocus to get it right, doens't AS default to using ConstraintLayout now when you make a new app/Activity? Aug 15 21:39:21 I can't imagine trying to use ConstraintLayout without the layout designer Aug 15 21:39:37 the other thing i notice, is that MS seems to accomplish more in a week than google does in a whole quarter Aug 15 21:39:58 so yeah, i mean in 2012 haha it was a joke, but by now things should be really polished Aug 15 21:40:30 basically VS Code is becoming a full blown IDE, and they make incredible progress on this, as well as .Net core Aug 15 21:41:34 i haven't been following the xcode stuff, i hear grumbling there too though ;) Aug 15 21:41:46 * g00s spends most time now in rstudio Aug 15 21:42:02 or jupyter ;) Aug 15 21:43:19 Xcode is really really bad (but I don't have a lot of experience with it). As for Android Studio, is seems that all the good things about it are by Jetbrains, not what Google adds on top Aug 15 21:43:33 I like Visual Studio and VS Code though Aug 15 21:43:45 i've just spent sometime on a simple issue: a switch widget was taking too long to recover its 'on' when returning from a child activity Aug 15 21:44:40 then i found that it wasn't happening when returning using back, only in the toolbar 'up' action Aug 15 21:45:22 then found the parent activity was being created; the 'up' action was destroying it Aug 15 21:53:52 What calls viewTreeObserver.onGlobalLayout() ? Aug 15 21:58:20 Are smartwatches as programmable as smartphones? Aug 15 21:58:51 woo found it http://goo.gl/cSJVIx Aug 15 21:58:54 * Arancio goes and checks grammar Aug 15 21:59:08 ViewRootImpl calls viewTreeObserver.onGlobalLayout() Aug 15 21:59:38 Arancio: Depends what you want to do, but generally no, they are a bit more sandboxed. Aug 15 22:01:34 yiati: I guess for my application it would be useful to use the smartwatch as a proxy for the main application that is running on a smartphone or a tabled. So I guess simple dialogs and few buttons to tap without the need to reach for the bigger device Aug 15 22:01:51 Perfectly doable Aug 15 22:02:00 Sounds like a perfect use case Aug 15 23:04:20 Hey, I’m trying to make a custom view that’s basically two textviews next to each other, with one being clickable, like a link or button Aug 15 23:04:59 i want both textviews to be able to be styled separately, so I’m going to be creating attributes for text1 and text2 (with better names) Aug 15 23:05:15 just use spannable Aug 15 23:05:22 unless there are alignment issues Aug 15 23:05:23 I’m doing this several times Aug 15 23:05:40 i want a view that I can give two strings to Aug 15 23:05:47 and a click listener for the second one Aug 15 23:06:32 also i want to get better at custom views. it seems the really nice apps use them well Aug 15 23:09:33 sounds easy enough then Aug 15 23:10:12 the point i’m stuck at is taking those custom attributes, and forwarding them onto the appropriate text views Aug 15 23:10:52 but now thinking about it, using multiple text views seems more trouble than it’s worth, like when it comes to things like RTL language support Aug 15 23:11:42 indeed Aug 15 23:11:48 but pulling attrs is easy Aug 15 23:12:01 just copy how it's done in any framework. widget Aug 15 23:13:08 grabbing the attrs is easy. but forwarding them on is where i’m stuck Aug 15 23:13:50 so say I do go with the two text view idea, how would i take attribute textView1_attribute and forward that on so it was like i set attribute on a regular textview Aug 15 23:18:16 you call the corresponding method in your tor Aug 15 23:21:28 as an AttributeSet? Aug 15 23:39:08 hackable moto z http://hackerboards.com/modular-moto-z-android-phone-supports-diy-and-rpi-hat-add-ons/ Aug 15 23:39:51 that is what the LG G5 was missing Aug 15 23:49:14 s73v3r, you can't proxy all attrs Aug 15 23:50:57 I think i’m gonna just do the spannable thing, and have custtom attrs for setting string1 and string 2 Aug 15 23:51:01 and color and stuff Aug 16 00:03:32 people are telling me that java isn't an ideal language for machine learning applications. If that's the case then how is machine learning implemented in android applications? Aug 16 00:04:32 can someone give good examples of apps that employ ML? Aug 16 00:07:41 it’s typically implemented by handing it off to a server and having that do it Aug 16 00:10:17 and what language is used on the server side to do it? Aug 16 00:11:17 whatever you want. I know Python is used in Google’s TensorFlow stuff Aug 16 00:11:41 but I believe Java is used in machine learning as well Aug 16 00:12:04 i don’t know if the language matters that much for that type of thing Aug 16 00:12:05 ok Aug 16 00:12:23 as opposed to something like string processing, which PERL is generally best at Aug 16 00:20:25 so would something like a raspberry pi be suitable for handling ML on the server side? Aug 16 00:57:30 adempus depends on volume and velocity ;) Aug 16 00:57:44 but .. probably not :D Aug 16 01:01:33 good to know. thanks g00s. Aug 16 01:11:48 hi guys Aug 16 01:12:16 does anyone know the answer to the "making rectangular imageviews square" question i asked a little earlier? Aug 16 01:15:42 er Aug 16 01:15:46 you mean cropping them? Aug 16 01:15:53 there are libraries that do that, picasso for example Aug 16 01:16:34 If you're doing this for avataring / thumbnailing, do that server-side Aug 16 01:16:40 that way you can properly enforce it Aug 16 01:17:02 (assuming this is for some sort of image uploading tool) Aug 16 01:47:42 well, sort of Aug 16 01:47:46 but only simple cropping Aug 16 01:47:55 http://stackoverflow.com/questions/38950785/how-to-make-vertical-rectangle-become-square-in-android-imageview Aug 16 01:48:05 i just don't want it taking too much space on the view Aug 16 01:48:39 it's not an image upload tool - i just want to make the image square if it's too long vertically. i don't mind if it's a horizontal rectangle because that always has a finite maximum (50%) Aug 16 02:05:12 I second using Picasso for that http://square.github.io/picasso/ Aug 16 02:16:19 ok Aug 16 02:16:28 does it work with drawables as well as downloaded images? Aug 16 02:17:08 as in a drawable resource? Aug 16 02:17:14 Picasso.with(context).load(R.drawable.drawableName).into(imageView); Aug 16 02:23:18 Is it possible to update the dictionary the keyboard is using on the fly? (from within an app) Aug 16 02:58:32 how do you do when you have to bring from a rest API 1000 results in android, like instagram does, when you have a wall, do you bring all the data or you page it like in a web app? Aug 16 02:58:39 any useful plugin to do that? Aug 16 02:58:56 you load it "lazily" Aug 16 02:59:13 so you make separate requests, paginated Aug 16 02:59:13 pagination basically Aug 16 02:59:15 as you scroll down Aug 16 02:59:16 yeah Aug 16 02:59:56 do you have any article or some plugin to aid in this? **** ENDING LOGGING AT Tue Aug 16 02:59:58 2016