**** BEGIN LOGGING AT Mon Mar 16 02:59:58 2015 Mar 16 03:03:24 Anybody use gradle and robototextview to remove unneeded fonts? http://pastie.org/10029018 Its not keeping roboto light but it is keeping the other 2 i specified.. Mar 16 03:15:26 So gradle is pulling assets I've deleted from somewhere Mar 16 03:15:40 Trying to remove unused fonts so I manually remove them from the exploded-aar and it gets them back somehow Mar 16 03:28:44 how can I get a list of all available in app products? Mar 16 03:36:03 is there a way? Mar 16 03:50:59 I'm writing an app that handles inputs from a bluetooth device, is there any way to have the default camer app or stopwatch perform an action when I get some bluetooth data in? Mar 16 04:06:09 Quick question for you all. I have an imageview in the child group of my expandable list view. I want to make it clickable, but when I click it the child item underneath is clicked rather than the imageview Mar 16 04:06:14 Any ideas? Mar 16 04:09:21 did you set a listener on the imageview? Mar 16 04:18:34 Yeah, I think it's a different problem, re-looking at my code right now Mar 16 04:42:04 Hello, I put inside an inside an activity in my manifest, but the activity remains oblivious to broadcasts of said type that I throw at it. At the same time activity reacts to another broadcast of another type via manually activated receiver. Mar 16 05:05:35 haha, thats funny - when my app is connected to multiple BT devices, one losing connection causes the others too on occasion Mar 16 05:06:04 all the clients are isolated so it must be something with the BLE adapter Mar 16 05:12:07 connecting to all these BT devices though - gobbling up lots of memory Mar 16 05:12:19 its 2015, why am i thinking about a few mb of heap ... Mar 16 05:12:41 if i have to split this sucker into multiple processes, there go all the nice things and its parcels all the way Mar 16 05:12:50 aidl, whatever Mar 16 05:28:51 why would you split, are you exceeding single process heap limit? Mar 16 05:29:12 you'd consume more overall memory with multi process Mar 16 05:32:18 i know i would use more overall. i think the overhead for each process isn't that much, maybe 1.4mb ? i would split the UI / BT management into 2 processes if i have to. Mar 16 05:33:28 but why, you're not going to exceed any limit Mar 16 05:33:40 memory and concurrency stability is a different issue Mar 16 05:35:09 looks like i am coming close to exceeding a limit, at least the way i am reading the chart from the AS memory viewer. Mar 16 05:35:21 and i don't even have all my graphing done :( Mar 16 05:37:00 Hey all. I have a dead simple app that calls some native code to paint over the screen. Unfortunately the app also draws a title bar at the top (I don't know how else to describe it). Does anyone know what I'm talking about, and how I might disable it? My layout consists of a single LinearLayout with the width and height set to "fill_parent" Mar 16 05:38:41 what limit Mar 16 05:39:18 heap size is pretty large these days and you can request even larger heap Mar 16 05:39:54 yeah i can request it, but its not guaranteed. i'm just looking at the graph which tells me how much heap i have free Mar 16 05:40:13 which is, 0.2 mb :( Mar 16 05:40:31 that doesn't mean much Mar 16 05:40:37 heap can grow Mar 16 05:41:22 what is your actual heap size Mar 16 05:41:46 hmm. says i allocated 9.98mb around Mar 16 05:42:02 then yeah, not a problem Mar 16 05:42:20 ok :) Mar 16 05:43:19 the used mem is doing a sawtooth like pattern of growing and shrinking, so that looks stable Mar 16 05:43:31 not trending upwards Mar 16 06:15:39 ; Mar 16 06:16:05 canurabus: you want to google 'hide notification / status bar theme manifest android" Mar 16 06:19:40 is it normal to query alarms of alarmmanager every 500 milliseconds, to display them current status? Mar 16 06:29:37 why would you schedule alarm every 0.5s Mar 16 06:30:22 theres simple timer for that, eventually scheduled executor Mar 16 06:32:50 lasserix, does that show up by default even if my layout xml is practically empty? Mar 16 06:34:15 Also I'm not trying to hide the status bar Mar 16 06:39:12 Ashiren: not shedule, but query with AlarmClockInfo getNextAlarmClock Mar 16 06:39:12 http://i.imgur.com/Kvn657I.png Mar 16 06:39:23 I want to get rid of the title bar thing where the android logo is Mar 16 06:43:15 that is the action bar Mar 16 06:43:24 getActionBar().hide() Mar 16 06:43:35 if you used the wizard to create the app/activity it'll auto create it usually Mar 16 06:43:44 in your case you might want to hide it via your app theme Mar 16 06:43:58 so it always hidden, and does not transition from visible to hidden Mar 16 06:44:31 but as Ashiren said you can call in your activity's onCreate(Bundle b) { super.onCreate(b); getActionBar().hide(); } to hide it in code per activitiy Mar 16 06:44:48 Is it default behavior for it to be visible? I don't have any themes or anything set up. I have... probably the most barebones Manifest ever. I also don't have anything really in my layout xml Mar 16 06:45:00 you always have a theme Mar 16 06:45:04 and yes it is by default Mar 16 06:45:34 it does not appear in your xml file unless you use the new toolbar as your action bar Mar 16 06:46:00 but it is still added to the view hiearchy if you use a theme that has it visible/enabled, which the default does Mar 16 06:54:00 Unfortunately setting the theme didn't seem to change the output Mar 16 06:54:15 I used Theme.Holo.NoActionBar Mar 16 07:06:10 use the power of google Mar 16 07:07:19 ironic that I have to use google to figure out why a google product isn't working right Mar 16 07:08:46 hey guys, is there first class support for indicating which item in a list is currently selected? ive called setSelection and setItemChecked but still no joy Mar 16 07:08:51 believe that is coincident not ironic ;p Mar 16 07:17:47 Where is theme data stored if its not in any of the xml files? Mar 16 07:25:18 Hi, if I have code I want to show the channel, should I post it to Github? Mar 16 07:25:58 *pastebin* is fine Mar 16 07:26:22 bankai_: even for multiple activities and such? Mar 16 07:27:15 MJ94: yes Mar 16 07:27:17 pastebin, github, whatever.. doesn't matter Mar 16 07:27:51 As long as you try to only post relevant code Mar 16 07:38:30 Okay, I will pastebin it. One moment, please. Mar 16 07:41:46 MainActivity.java: http://pastebin.com/FjWn3GWU activity_main.xml: http://pastebin.com/7cUaQYDJ (on this one, the @+id/ on the android:id="@+id/"> line is red) results.java: http://pastebin.com/1nnTLa7e (all the R. are red) activity_results.xml: http://pastebin.com/sX4PL49u (all looks well here) strings.xml: http://pastebin.com/aJucAXpp (all looks well here). When I try to run it, I get "Error:(12, 21) Resource id cannot be an empty string (at 'id' with Mar 16 07:41:46 value '@+id/')." However, if I delete that, other text goes red. Mar 16 07:42:08 Can any of you provide any guidance or suggestions? It'd be greatly appreciated. Mar 16 07:42:51 L Mar 16 07:48:00 SimonVT, bankai_, xgearx: No rush. Just pinging you in case you didn't see my question above. :) Mar 16 07:49:01 you haven't given your relative layout an id for starters Mar 16 07:49:06 MJ94: activity_main.xml Mar 16 07:49:19 http://pastebin.com/7cUaQYDJ Mar 16 07:49:23 12 line Mar 16 07:49:28 android:id="@+id/" Mar 16 07:49:44 xgearx: yes, that's the line I was referencing. Mar 16 07:49:46 you should specify id name Mar 16 07:50:32 just to improve - you should merge 2 relative layouts in one Mar 16 07:50:34 Oh, that's the id for my layout, correct? Mar 16 07:50:40 yes Mar 16 07:51:16 you should provide android:id="@+id/content" or whatever Mar 16 07:51:27 xgearx: Okay, I gave it the ID rlayout Mar 16 07:51:43 now it's green Mar 16 07:51:44 :) Mar 16 07:52:47 public class ResultActivity extends ActionBarActivity { should be Results, shouldn't it? Mar 16 07:53:13 you asking about name& Mar 16 07:53:15 ? Mar 16 07:53:26 Error:(16, 8) error: class ResultsActivity is public, should be declared in a file named ResultsActivity.java Mar 16 07:53:42 oh god Mar 16 07:53:44 I have results.java, not ResultsActivity Mar 16 07:54:04 You should have filename like java class name Mar 16 07:54:15 I know Mar 16 07:54:18 I realize thhat Mar 16 07:54:44 Can I rename the results.java file? Mar 16 07:54:51 To be ResultsActivity? Mar 16 07:54:53 Yes, you should Mar 16 07:54:59 I can't believe I did that. Mar 16 07:55:08 That's downright embarrassing. :/ Mar 16 07:55:20 and you should learn how to refactor name of classes Mar 16 07:55:28 using ide Mar 16 07:56:05 I renamed the file. Mar 16 07:56:24 Well, that fixed 2 of my errors. Mar 16 07:56:45 wee Mar 16 07:57:15 xgearx: The results.java one was a really stupid mistake, heh. This will teach me not to do this at 2am. Mar 16 07:59:59 On Results.activity, on the R.array line, "array" is red. I'm not quite sure why this is the case, however. Mar 16 08:00:20 (This is the second to last error.) Mar 16 08:12:08 Anyone available for some assistance? Mar 16 08:13:00 skramdevs: I'm around, but I'm new to Android programming. I'm waiting for assistance myself. Mar 16 08:13:30 Im using DefaultHttpClient to login a service, Loading a WebView afterwards Cookies are not shared..by using CookieManager. Mar 16 08:13:49 skramdevs: I'd say just ask and maybe someone can help. Mar 16 08:13:52 @MJ94: I see Mar 16 08:17:48 MJ94 put everything down, learn java Mar 16 08:24:30 Lol, well I see IRC hasn't changed much in the last 10+ years. Mar 16 08:24:55 skramdevs: How so? Mar 16 08:26:30 skramdevs, defaulthttpclient doesn't use builtin cookie store Mar 16 08:26:37 (it's also deprecated as of API 22) Mar 16 08:26:44 so you'll have to add cookies manually. Mar 16 08:27:02 you can just give me the cookies, i'll take them Mar 16 08:27:21 g00s: !!! Mar 16 08:27:23 ^ MJ94 people like him, is what I mean. Mar 16 08:27:27 g00s, no chocolate for you Mar 16 08:27:36 is there a way to catch an event just before the toolbar menu is opened? Mar 16 08:27:37 g00s, since you still haven't written an app in kotlin and told us how it works. Mar 16 08:27:38 skramdevs: heh. yeah. Mar 16 08:27:43 hey thepoosh :) Mar 16 08:28:00 skramdevs has sensitive feelings, handle with care Mar 16 08:28:12 g00s: tomorrow is election day here! Mar 16 08:28:26 thepoosh do you guys get off from work? national holiday ? Mar 16 08:28:29 Mavrik: When you say "add" them manually, what should I investigate?..Classes in particular. Mar 16 08:28:34 yes Mar 16 08:28:35 CookieManager doesn't seem to be doing it for me. Mar 16 08:29:07 skramdevs, um, cookies are just an HTTP header Mar 16 08:29:08 :) Mar 16 08:29:16 morning :) Mar 16 08:29:25 mornin Mar 16 08:29:26 wow, i hosed up my git stash ... Mar 16 08:29:34 skramdevs, so read cookies from cookie store and put together a Cookie header according to HTTP spec Mar 16 08:29:37 i dislike git stash Mar 16 08:29:46 it's always a bad surprise Mar 16 08:29:53 I think they're separated by semicolons or something. Mar 16 08:30:00 thepoosh yeah , i am too now. i stashed stuff, rebased, popped stash - clusterfuck Mar 16 08:30:01 anything in git is always a surprise Mar 16 08:30:08 I can retrieve HTTP Cookies fine from DefaultHttpClient..Problem is getting it to persist have a WebView use them. Mar 16 08:30:21 almost Mar 16 08:30:24 git is awesome Mar 16 08:30:29 skramdevs, hmm, I see Mar 16 08:30:31 just stash is shitty as a concept Mar 16 08:30:44 i think its still some craptastic script Mar 16 08:31:00 ? Mar 16 08:31:04 that does really weird things with commits Mar 16 08:31:20 skramdevs, so you're getting cookies from a REST request and want to sync them to webview? Mar 16 08:31:22 like, it made 2 commit objects for one stash Mar 16 08:31:24 not the other way around? Mar 16 08:31:26 Mavrik: i,e: I login a service with HTTP request, I then want to load a WebView, logged in. Mar 16 08:31:29 Mavrik: Exactly. Mar 16 08:31:31 ah. Mar 16 08:31:47 Odaym you there ? Mar 16 08:32:17 Mavrik: Seems to be no easy way to do this. Been at it for days, before I decided to hop on ol' irc for some assistance. Mar 16 08:32:28 yea but on the online version of freenode :\ Mar 16 08:32:35 skramdevs, as far as I know, cookieManager.setCookie() + CookieSyncManager.getInstance().sync() should work fine Mar 16 08:32:39 xchat wont connect at work for some reason Mar 16 08:33:00 Mavrik: Yeah, you would think right? Lol. Doesn't work at all. Emulator or Device. Mar 16 08:33:01 skramdevs, two years ago when I last had to do that, this worked: http://stackoverflow.com/a/2349340 Mar 16 08:33:10 Odaym had a weird thing happen - connected to multiple BLE devices; one goes offline, and knocks all the other offline - seems really weird Mar 16 08:33:19 Yup, tried that. No dice. Mar 16 08:33:26 skramdevs, well. Mar 16 08:33:37 by the way who made this device you're working with? Mar 16 08:33:40 skramdevs, use Charles Proxy or equivalent to see what webview is actually sending. Mar 16 08:33:47 Odaym the module is bluegiga Mar 16 08:33:51 Mavrik: I think i tried every SO example found on google.. Mar 16 08:34:11 Odaym i have a 2650 sensortag in the mail too :) Mar 16 08:34:49 Mavrik: Mind if I PM?..Willing to pay you, to get this working for me. Mar 16 08:35:07 Nope, sorry. Mar 16 08:36:24 Ah. Bummer Mar 16 08:47:35 thepoosh did you see the new youtube design chgange was get rid of the navigation drawer :P Mar 16 08:47:45 really?! Mar 16 08:47:52 asshole Mar 16 08:47:53 hehe Mar 16 08:47:54 s Mar 16 08:48:10 so the new cool thing will be to use tabs again Mar 16 08:48:18 :)) Mar 16 08:48:24 and all apps will have tabs again! Mar 16 08:52:00 Hi all, I posted a question on StackOverflow; if anyone has a tip or solution I would love you forever stackoverflow.com/questions/29072652/how-to-pass-in-a-filename-from-a-sqlite-database-in-android Mar 16 08:53:13 thepoosh so what do you do instead of stash ? just branch again and commit stuff there ? Mar 16 08:53:30 no, i do stash and hate myself Mar 16 08:53:38 lol Mar 16 08:53:56 it lost a bunch of my files, i don't want to use it again Mar 16 08:54:06 so branch out Mar 16 08:54:12 yeah Mar 16 08:54:34 well, i guess it was me misunderstanding. i did git pop ... Mar 16 08:54:40 and there were some merge conflicts Mar 16 08:54:52 so i though in that case, it would just leave the stash intact Mar 16 08:55:14 like stash apply, but no ... some things went away :| Mar 16 09:17:42 I'm saving video files into File myFile = File(myDir.getPath() + File.separator + "myfile.mp4"); where File myDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "MyDir"); I've also tried DIRECTORY_MOVIES. But my file doesn't show up in the Photo app. Also, I cannot find my file when I connect my phone to my Linux pc. It seems the file is stored somewhere else. When I adb shell t Mar 16 09:18:32 Maybe the photo app doens't recognize videos that aren't explicitly placed in its own directory. But shouldn't I at least be able to browse the files when connected to my pc? Mar 16 09:19:35 the /storage/emulated/legacy found in the shell looks very similar to that in I mount on my pc: Nexus5/internal storage/ but the clearly don't contain the same. Mar 16 09:23:15 I've also tried unmounting the phone and mounting it again, but that didn't make the files show up. Mar 16 09:28:22 inspect the final value of the calculated path Mar 16 09:28:47 liuwenhao: how about let the resource system determine the language of the app, and have every language use a string to determine what the filename is? Mar 16 09:30:29 not sure i understand the question actually Mar 16 09:30:38 Hi everyone Mar 16 09:31:28 I got a problem Mar 16 09:32:31 ...yeah you do Mar 16 09:33:05 screw it, I'll try saving the file non-public instead. Mar 16 09:37:28 ok then Mar 16 09:37:51 apparently that's easier than a temporary Log.v() or System.err.println() Mar 16 09:39:02 I want to make an area of a viewgroup (relativelayout) transparent. So far I have a customview that extends relative layout which I draw my path on using PorterDuffXfermode Clear Mar 16 09:39:17 however the viewgroup/layout doesn't become transparent Mar 16 09:39:29 in the area/path Mar 16 09:39:43 zta some devices you can't have phone plugged in and access sdcard at same time Mar 16 09:39:50 anyone who has had fun with transparency before :) ? Mar 16 09:41:33 liuwenhao: you should not be creating a new mediaplayer per row of your db Mar 16 09:42:01 you should just pass the file metainfo the mediaplayer needs to either the mediaplayer or whatever controller you have managing it Mar 16 09:43:28 liuwenhao: reset() / setDataSource() / prepare or prepareAsync Mar 16 09:50:50 Morning all Mar 16 09:52:27 lasserix: So I should have my onChildClick reset the mediaplayer (rather than creating it again) and then pass the filename from the DB, correct? Mar 16 09:53:09 osxorgate: sorry if it was confusing: it's a language app, the columns are just different things that will be shown in the expandable list view Mar 16 09:53:24 Ankhwatcher, Good Morning Mar 16 09:54:11 i.e. English from the db is shown as the group, and the Chinese columns are shown as the child Mar 16 09:57:22 all of my media files are about 1/2 second long, if that makes a difference for how i should implement it Mar 16 09:58:10 that makes it even worse to create a separate media player for each one Mar 16 09:58:27 if my groupview is transparent, shouldn't its childviews be too? Mar 16 09:59:37 Troffel, only if the groupview propagates that property to all its children Mar 16 10:00:50 ravilov, im trying to create a mask for an animation and my current strategy is to simple add the views I want the mask to hide inside a groupview Mar 16 10:01:06 on the groupview I then draw my shape/path and make that part transparent Mar 16 10:01:11 liuwenhao: see the SO Mar 16 10:01:24 significant other? :p Mar 16 10:01:57 Troffel, it might not be as simple as that Mar 16 10:02:15 long time since I played with such things Mar 16 10:02:17 thank you for responding, I will try implementing this as soon as I wake up (it's 5am already, gotta sleep) Mar 16 10:02:30 this looks like a really great solution Mar 16 10:02:31 sleep? nonsense Mar 16 10:02:55 haha, i know Mar 16 10:03:02 i hate sleeping, feels like i'm wasting time Mar 16 10:03:51 nobody wants to have to sleep... or have to recharge batteries in their devices Mar 16 10:03:58 ravilov, I can't think of a better approach at this point :) Mar 16 10:03:59 np :) if it works mark the answer as checked so i may rise Mar 16 10:04:00 :) Mar 16 10:04:35 will do, goodnight everyone, thanks again for the help Mar 16 11:09:01 Any ideas how to mask a viewgroup (and it's children) ? Mar 16 11:09:55 basically make all childviews inside a certain area of the viewgroup transparent Mar 16 11:10:55 override/implement custom draw methods? Mar 16 11:11:24 I did, made a customview for the groupview and made the mask/path on that Mar 16 11:11:47 but childviews that animate in behaind the mask/cut path simply ignores it Mar 16 11:11:57 even though they're childviews Mar 16 11:12:06 like I said, it is not as simple as that Mar 16 11:12:27 I know, this my open question initially, if anyone had tried something similar Mar 16 11:12:54 best alternative I can think of is a drawable animation, but that seems excessive Mar 16 11:15:15 ravilov, any 'hipshots' as to what approach might work? Since mine doesn't appear to pay off Mar 16 11:16:54 I considered simply adding one view on top of the other, since that definitely would mask it, however the activity needs to show through the mask. Thus my predicament :) Mar 16 11:28:50 ravilov, it actually was that simple! I just had to use the right canvas method Mar 16 11:29:02 clippath rather than drawpath(transparent paint) Mar 16 11:29:26 I had fooled myself into thinking that the clippath was depricated for some reason :) Mar 16 11:29:42 lol Mar 16 11:29:48 guess we both learned something Mar 16 11:37:58 when defining a buildType in gradle, how can I make it sign the build with my developer key? just like a normal debug build. Mar 16 11:41:30 Syzygy, have you tried setting debuggable flag? Mar 16 11:42:08 if this doesnt work, just create a new signingConfig and point it to your debug key Mar 16 11:48:54 doesn't seem to work. also I noticed that things from different release types get executed. eg, android.defaultConfig.versionName = android.defaultConfig.versionName + "-alpha" gets set even though it's not an alpha build Mar 16 11:51:40 is it possible(not bad) to create two list views inside another list view? Mar 16 11:53:20 danijoo, I got it working by using "signingConfig android.signingConfigs.debug" thanks for the help. Mar 16 11:54:21 joroci, no Mar 16 11:54:42 so it's bad? Mar 16 11:55:43 it is all explained in official android docs, you should take a look Mar 16 11:57:16 Can I distribute the adb binary (downloaded with the sdk) with my app. Or would I need to compile it myself before doing so? Mar 16 11:59:57 there are no legal restrictions in distributing it as far as I know (I'm no lawyer though) but you should really bundle as few binaries as possible Mar 16 12:02:00 hi anyone here with ormlite experience ? Mar 16 12:02:50 indeed ravilov, I'm hoping to avoid it but it might be insisted. If that's the case, I want to be sure we're ok to do that. Mar 16 12:03:14 i pass a list -which have 27 elements-to where.in() and it returns me 25 elements from my database, and its ok Mar 16 12:03:27 but i want to get other 2 elements from my database Mar 16 12:03:30 http://paste.ubuntu.com/10609315/ Mar 16 12:03:42 i tried where.notIn(); it returns 0 row Mar 16 12:06:42 try finding the objects that are not in and take a closer look at them Mar 16 12:08:15 they might contain a special case where neither in nor notIn is true (e.g. null, although I don't know if that would cause your error) Mar 16 12:08:39 i have no errors Mar 16 12:09:31 is it not erronous behavior? Mar 16 12:09:45 at least as far as you# Mar 16 12:09:49 you're concerned Mar 16 12:10:46 i just want to keep it simple, what would you do in this case ? Mar 16 12:10:49 for instance Mar 16 12:11:00 Hi Mar 16 12:11:13 you have a string and you want to get datas from local db which doesnt contains that string or null field Mar 16 12:12:09 pretty much the same thing. Mar 16 12:12:11 How to send file using bluetooth via adb shell? Mar 16 12:12:43 is that even possible ? Mar 16 12:12:49 if anyone has answer for my question...please reply. I appreciate his help Mar 16 12:13:23 https://developer.android.com/training/wearables/apps/bt-debugging.html Mar 16 12:13:27 it is :O Mar 16 12:13:39 if the device is rooted. Mar 16 12:13:52 I'm looking for a way to modify my version name according to my buildType. Right now I can modify it, but all modifications take place, so afterwards my version name looks like 3.0.0-release-alpha-dev when it should only contain one of those Mar 16 12:13:58 any idea how to do that? Mar 16 12:14:07 Kailash_: check the link Mar 16 12:14:24 do it and try adb push /sdcard/ Mar 16 12:14:48 gordan_ that is a different think Mar 16 12:14:58 *thing Mar 16 12:16:19 gordon_ I am able to enable/disable bluetooth from adb shell using "service call bluetooth_manager 6/8" Mar 16 12:17:47 gordon_ but can I send files using adb shell commands? Mar 16 12:23:14 i feel bad, my boss is forcing me to work with eclipse Mar 16 12:23:16 :( Mar 16 12:31:22 thepoosh, boss++ Mar 16 12:31:22 :p Mar 16 12:31:35 ravilov: you an eclipse fanboy?! Mar 16 12:31:46 why on earth would you work in eclipse? Mar 16 12:31:57 why on earth would you not Mar 16 12:31:58 ? Mar 16 12:32:08 for an android project? Mar 16 12:32:11 yep Mar 16 12:32:22 that's all I ever use eclipse for... Mar 16 12:32:35 google stopped supporting, don't see why you wouldn't port the projects Mar 16 12:32:53 don't see why I would Mar 16 12:32:57 :D Mar 16 12:33:08 my build chain still works, it produces valid APKs... Mar 16 12:33:18 ah. its eclipse vs AS again. Mar 16 12:33:19 http://i.imgur.com/jLZz4Na.gif Mar 16 12:33:22 that is true, and it probably will continue to do so for a long time Mar 16 12:33:57 danijoo, we still have some prime seats available at the front row :o) Mar 16 12:33:57 thepoosh, it's not that I like eclipse, I just dislike AS :p Mar 16 12:34:34 Troffel, i feel like I watched that movie too many timse :p Mar 16 12:34:38 the change from Eclipse to AS felt pretty smooth to me as AS feels largely like an eclipse clone :) Mar 16 12:35:12 only thorough difference is ofcourse in the project structure :) Mar 16 12:39:44 yeah AS is just nt a significant enough difference from eclipse for me to form an opinion Mar 16 12:40:45 AlphaAnimation doesn't seem to change the view.getAlpha() value. How can I get the current alpha state for a view when alphaAnimation is run? Mar 16 12:43:27 Tennis, well a big difference is the project structure but that's a taste thing I suppose :) Mar 16 12:43:45 but a UI-editor that actually works, feels like a step up Mar 16 12:44:03 I've always found with java projects theres to many nested directories. Seems like perhaps even more with AS Mar 16 12:45:29 I kinda like that structure, I feel like it makes the project as a whole much easier to manage Mar 16 12:52:11 Tennis, there are indeed even more directories in AS Mar 16 13:14:46 what should i use to download files (~20mb) and display progress (maybe resume interrupted download) Mar 16 13:21:48 luist, a service or a syncadapter Mar 16 13:21:52 depending on the context Mar 16 13:22:08 what? lol Mar 16 13:22:24 isnt there a download lib with everything ready? :) Mar 16 13:24:04 oh yeah. its in the same package that contains the KI that writes the app for you ;) Mar 16 13:24:32 read: not that i know :) Mar 16 13:25:43 luist, look at DownloadManager class. Mar 16 13:27:41 is there any way to get 2+ MapFragments to appear on the same screen Mar 16 13:27:50 like in each item of a ListView Mar 16 13:45:59 I'm looking at the suggested .gitignore for Androd on GitHub Mar 16 13:46:01 https://github.com/github/gitignore/blob/master/Android.gitignore Mar 16 13:46:10 12 lines of actual code Mar 16 13:46:16 13 contributors!!! Mar 16 13:46:56 xD Mar 16 13:51:32 Can I use a ScheduledThreadPoolExecutor and schedule a future task letting it being executed on the UI thread without using runOnUiThread in the runnable itself? Mar 16 13:52:30 MikeWallaceDev: it's nicer like this: https://github.com/github/gitignore/blame/master/Android.gitignore Mar 16 13:53:21 ouch Mar 16 13:55:06 there are 3 blank commits Mar 16 13:57:16 platzhirsch, you should use a Handler for that Mar 16 13:57:40 Mavrik: I used to, though I find the Executor interface quite convenient Mar 16 13:57:43 convenient* Mar 16 13:57:48 ScheduledThreadPoolExecutor expects to manage its own threads Mar 16 13:57:55 and retrofitting that to Android is going to be a pain Mar 16 13:58:09 platzhirsch, what's the difference between schedule() or postDelayed() ? :) Mar 16 13:58:50 okay... let me just undo my refactoring from last week. Guess you're right.. : ) Mar 16 14:00:45 In RxJava, how should I catch an exception in one of my observables? Mar 16 14:01:25 theblang, depends on what do you mean by that Mar 16 14:01:37 there's several ways Mar 16 14:01:51 these mostly: https://github.com/ReactiveX/RxJava/wiki/Error-Handling-Operators Mar 16 14:19:17 Hi there. Mar 16 14:20:20 For some reason my settings looks weird: http://i.imgur.com/DjY7bBV.png black background and black fonts. All I added into manifest was android:theme="@style/Theme.AppCompat.Light.DarkActionBar" > for support of actionbar for older android versions. Any ideas how I can make this look nicer? Mar 16 14:23:06 show your styles.xml Mar 16 14:23:18 frojnd, http://stackoverflow.com/questions/26287860/android-alertdialog-produces-black-text-with-black-background Mar 16 14:25:26 danijoo: only thing inthere is Mar 16 14:26:07 and now the part where you create the button :) Mar 16 14:26:14 eh. mean dialog Mar 16 14:26:29 danijoo: nothing else inthere Mar 16 14:26:36 the code Mar 16 14:26:58 nvm i found your problem Mar 16 14:27:01 https://code.google.com/p/android/issues/detail?id=78819 Mar 16 14:27:12 its already known Mar 16 14:28:00 you can work arround it by changing the colors manually Mar 16 14:28:52 danijoo: yeah will try and do that :) thank you Mar 16 14:29:05 https://gist.github.com/frojnd/d80942b8e245a74c2069 <- preferences.xml not that it matterse now Mar 16 14:30:11 danijoo: erm, where do I change dialog's colors :) Mar 16 14:30:26 because dialog is not defined in preferences Mar 16 14:31:51 frojnd, for example you can set a style for them in your styles.xml Mar 16 14:32:38 oh god…. does anyone know an example to download a file (~20mb) while displaying a progress bar? Mar 16 14:32:56 luist, still use a service Mar 16 14:33:25 danijoo: ok, but how do I reference the "colors" of the dialog? Mar 16 14:33:41 or define them... I imagine I have to override default settings somehow Mar 16 14:33:52 default settings of alert dialog Mar 16 14:33:52 frojnd, yes. override defaults in style.xml Mar 16 14:34:17 https://sites.google.com/site/androidhowto/how-to-1/customize-alertdialog-theme Mar 16 14:34:23 danijoo: how is that? never tried it Mar 16 14:34:27 uf thank you danijoo Mar 16 14:34:31 luist, then read the docs -_- Mar 16 14:34:49 are u using appcompat to get material theme? Mar 16 14:37:39 frojnd, if you want dialogs in Material style, theres a neat library for that Mar 16 14:38:43 danijoo: which one? Mar 16 14:39:26 https://github.com/afollestad/material-dialogs Mar 16 14:39:50 danijoo: thank you! Mar 16 14:39:57 you're welcome Mar 16 14:40:02 that looks cool Mar 16 14:41:00 yeah it is :) Mar 16 14:41:16 gonna try it later Mar 16 14:41:30 What is the difference between SQLITE 3 unique constraint and index unique? Mar 16 14:41:35 for instance i have two arrays like this Arraylist b={2,3,4}; Arraylist a={1,2,3,4,5}; i want to do a-b = c (new list which contains only 1 and 5) Mar 16 14:41:43 how can i do that ? Mar 16 14:42:02 nested loop? Mar 16 14:42:06 i mean what is best practice Mar 16 14:42:29 i cant do that without loop ? Mar 16 14:42:36 not that i know of Mar 16 14:43:12 i have two lists which have 1000 and 1005 elements Mar 16 14:43:25 nested loop can cause performence problem i guess Mar 16 14:43:38 so its a millisecond of work Mar 16 14:43:44 that's a basic data structures and algorithms question Mar 16 14:43:57 Hi all. Is it possible to change the configChanges of an Activity in code? Mar 16 14:44:31 sci-fic, if it takes to much time and you really need to do it. do it in a task Mar 16 14:45:10 if you would use lists instead of arrays, you can do this with a single loop instead of nested loop btw Mar 16 14:45:32 it's still a nested loop Mar 16 14:45:37 contains is O(n) on lists Mar 16 14:45:52 danijoo: i use something like this right now, but i dont know its good or not http://paste.ubuntu.com/10610067/ Mar 16 14:45:57 I can't imagine that being slow at all. You'll know the result array length up front. Mar 16 14:46:22 for instance, i have 100 contacts in local db, and 102 contats from contact list Mar 16 14:46:29 i can get those 2 numbers by doing that Mar 16 14:46:50 oh. its a database query Mar 16 14:47:01 then it shoud not matter at all Mar 16 14:47:03 i dont know maybe their sort can change Mar 16 14:47:53 just make it an async operation (you should do that anyways for db requests) Mar 16 14:48:04 the time wont be much noticeable to the user Mar 16 14:48:31 the algorithm isnt the best though Mar 16 14:49:19 i tried where.notIn Mar 16 14:49:26 i cant see a list comparition at all O.o Mar 16 14:49:32 comparision* Mar 16 14:49:56 where.in does it for me Mar 16 14:50:37 cant see a where.in either Mar 16 14:50:50 danijoo: well i shouldnt be in background Mar 16 14:50:52 it* Mar 16 14:51:00 I'd like to add a card like in this example in my app, but I don't see the code :/ https://developer.android.com/training/material/lists-cards.html Mar 16 14:51:01 luist, yeah. thats for sure Mar 16 14:51:36 the picture with background picture, title and sub text. That'll be nice Mar 16 14:51:50 moviuro Mar 16 14:51:58 create yoru own layout and use CardView as the parent layout Mar 16 14:52:18 jvrodrigues: my android-studio complains it can't find it Mar 16 14:52:18 add an imageview and whichever widgets you'd like Mar 16 14:52:21 ah Mar 16 14:52:31 add this line to gradle Mar 16 14:52:33 compile 'com.android.support:cardview-v7:21.0.+' Mar 16 14:52:41 under the dependencies for your app Mar 16 14:53:08 then dont forget in the xml the cardview name should be android.support.v7.widget.CardView Mar 16 14:53:54 yep, building the project right now, see how that goes danijoo: I tried to follow that link https://sites.google.com/site/androidhowto/how-to-1/customize-alertdialog-theme this is my styles.xml https://gist.github.com/frojnd/b787fcd6b4961d5df1c1 The problem is because it says: Override your application's theme in the AndroidManifest within the application tag (android:theme="@style/MyTheme">) when I do that app immediatelly crashes. Mar 16 14:54:43 nope, jvrodrigues, still complaining: - android.support.v7.widget.CardView (Fix Build Path, Edit XML, Create Class) Mar 16 14:54:44 danijoo: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. Mar 16 14:55:07 danijoo: actionbar only takes this "default" theme Mar 16 14:55:09 hm Mar 16 14:55:12 Mavrik sorry, had to step away. So what if the code in one of my observables requires an exception to be caught? Mar 16 14:55:35 moviuro: did you add the compile line to the gradle file? did you build your project? were there any errors? Mar 16 14:55:37 frojnd, the Exception tells you where your problem is :P) Mar 16 14:56:15 frojnd: dont use actionbar activity? Mar 16 14:56:20 theblang, your question is still not clear Mar 16 14:56:23 requires in what way Mar 16 14:56:26 use Theme.AppCompat obviously Mar 16 14:56:31 are you reading another observable Mar 16 14:56:35 or use theme.appcompat Mar 16 14:56:36 or calling normal functions? or what? Mar 16 14:56:37 :p Mar 16 14:56:39 jvrodrigues: gradle complains about some java code being broken; preview is still broken Mar 16 14:56:42 ActionBarActibity does not work w/o it Mar 16 14:56:59 danijoo: but I need actionbar, jvrodrigues I need that activity lol Mar 16 14:57:14 Mavrik calling normal functions. I have an Action1 that catches Throwables, but inside one of my observables just some normal logic requires a try, catch. Mar 16 14:57:23 frojnd, use Theme.AppCompat Mar 16 14:57:27 as the exception states Mar 16 14:57:32 frojnd well extend appcompat theme then. moviuro: pastebin the error Mar 16 14:57:59 the java error really is unrelated Mar 16 14:58:11 theblang, and what do you want to do when the error is caught? propagate it? Mar 16 14:58:20 Mavrik yeah, exactly Mar 16 14:58:25 http://wstaw.org/m/2015/03/16/plasma-desktopr15087.png Mar 16 14:59:22 yeah, well, this is really sad... why are two unrelated problems linked like that?... (preview vs java code) Mar 16 14:59:25 theblang, then you usually don't catch it at all, since RxJava will automatically propagate all exceptions further Mar 16 14:59:36 theblang, if it's a checked exception I usually rethrow it with something non-checked Mar 16 15:00:19 moviuro: they are not related, cardview just doesnt have a preview avaiable, you should still be able to use it. You need to fix your list adapter though Mar 16 15:00:29 Mavrik: I think that is where I am getting tripped up. What would I throw that is non-checked Mar 16 15:01:04 okay, will do, thanks Mar 16 15:01:10 theblang, whatever that extends throwable or an exception? :) Mar 16 15:01:30 class ErrorWhileProcessingException extends RuntimeException ... Mar 16 15:01:40 Mavrik yeah, I tried just rethrowing the Exception but that still causes an unhandled exception compiler error Mar 16 15:02:42 can assertj-android only be used to test on debug builds? Mar 16 15:05:52 shekibobo, I dont understand. Mar 16 15:06:26 this assertions are for Testbuilds which are by definition debug builds afaik Mar 16 15:07:32 jvrodrigues: how am I supposed to create my cards if I don't preview them? Blindly? ^_^ Mar 16 15:08:17 idk you shouldnt really trust whats on the preview anyway, just run and see if you like it, make proper adjustments. Mar 16 15:19:49 can you next fragments from XML yet? Mar 16 15:19:52 nest** Mar 16 15:20:09 or do you still have to dynamically add them with childFragmentManager? Mar 16 15:24:38 How do I debug an application that shows 10% usage in top, yet none of the threads Eclipse lists get high numbers in the utime field in Android 5.0? Mar 16 15:26:13 Hello, I'm looking to create a layout that has 4 VideoViews, arranged in a (square) grid, 2x2. The videos should expand to take up all the horizontal space in their container (ie: two videos are side-by-side and take up all the available width). Mar 16 15:26:36 This is on the Samsung Galaxy S5, so no lack of processor power. The application is supposed to lie dormant. Mar 16 15:33:16 InvisibleHog, many short lived threads that consume a lot of cpu Mar 16 15:33:46 pfn, that's an interesting theory Mar 16 15:33:55 without any furtheri nformation,that's the only guess you'll get from me Mar 16 15:34:08 I'll take it, thanks Mar 16 15:34:18 danijoo: if I run testStaging, the tests can't run because it can't find assertj-android imports Mar 16 15:36:25 shekibobo, not enough information Mar 16 15:45:51 pfn, some more info: I've captured all system calls and it's always the same pid running according to the scheduler (a pid that is unlisted in eclipse) Mar 16 15:46:06 MarkyC, expanding that 4 grid of images to vids? Mar 16 15:46:33 Is there any reason why a running thread would not be listed in eclipse when I list threads? Mar 16 15:47:23 I have a question, i use the same layout to display info in my app ( One imageView and two textViews inside a RelativeLayout), is there a way to create this layout once and then programaticly add and change the title, text, img, etc ? Mar 16 15:50:22 quinnjn: yep Mar 16 15:53:23 Can anyone list any reason whatsoever why a thread running in a process would not be listed in DDMS? Mar 16 15:55:02 InvisibleHog, probably it isn't attached to the VM Mar 16 15:55:47 I have 32 threads according to top, but DDMS only list 22 of them Mar 16 15:56:03 Mavrik: The thread? Mar 16 15:56:08 mhm Mar 16 15:56:53 Hmm, that makes sense Mar 16 15:58:44 Thankyou Mavrik, this might be information enough to take me a step further Mar 16 16:01:41 Can someone point me in the right direction on how to achieve this layout dynamically, I'm thinking with a recycler view? http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7d2Z1b0E1TEVVR1U/components_cards12.png Mar 16 16:02:15 As in the grid of cards Mar 16 16:05:46 woah, a card is so hard to setup with XML o_o I have no idea what I'm doing Mar 16 16:06:44 Hey, I'm having trouble with using the int constructor of Color. My colors are in /res/values/color.xml, so how do I initialize Color? Color(R.color.cool_violet) doesn't work Mar 16 16:07:03 I have a question, i use the same layout to display info in my app ( One imageView and two textViews inside a RelativeLayout), is there a way to create this layout once and then programaticly add and change the title, text, img, etc ? Mar 16 16:07:42 Hi.. Android Studio is open source? Mar 16 16:08:22 eeyup? Mar 16 16:09:44 threenuc, int color = getResources().getColor(R.color.cool_violet) Mar 16 16:10:57 ridermansb: Indeed. Mar 16 16:11:35 where is the repository? Mar 16 16:12:26 ridermansb, http://tools.android.com/build#TOC-Getting-the-source-code Mar 16 16:13:15 quinnjn, that porbably works, turns out I can't use Android packages in libgdx? :o Mar 16 16:13:29 I think this is the browsable source: https://android.googlesource.com/platform/tools/adt/idea/+/master Mar 16 16:14:24 threenuc, highly doubtful in the game portion. There should be some context to get data from w/e is running the game though (i.e. android/ios/etc) Mar 16 16:15:18 can i use predicate in android ? http://paste.ubuntu.com/10610492/ like this in objective C Mar 16 16:15:29 threenuc, quick google search looks like people just use the asset folder. Can you throw a json file with assets the hex colours? Mar 16 16:16:10 quinnjn, woah, I didn't 50% of the second sentence Mar 16 16:16:22 understand* Mar 16 16:17:56 threenuc, im not too familiar with LibGDX but you're prob best off just using constants. i.e. public static final COLOR_COOL_VIOLET = 0xFF7F00FF; Mar 16 16:18:00 sci-fic: Yes, you can use something like Callable. It’s just more verbose on Java (or you could install retrolambda which will give you the Java 8 syntax on Android) Mar 16 16:18:22 quinnjn, well that'd work too. thanks! :) Mar 16 16:18:34 threenuc, i'd actually create a static colour class GameColor.COOL_VIOLET; Mar 16 16:19:06 quinnjn, wouldn't constants be less complicated, though? Mar 16 16:19:22 jaana:i dont want to use any third pary tools, so my boss does :D Mar 16 16:19:35 sci-fic: Not sure what that means Mar 16 16:19:52 threenuc in terms of LibGDX, i believe so, cause of the cross platform support. Mar 16 16:19:53 Anyway, if you don’t want to install a third party library, then Callable is your best bet. Or create your own class Mar 16 16:22:24 threenuc: you can use interface or you can create your own color Mar 16 16:22:41 sci-fic, what do you mean? Mar 16 16:26:13 Hello. Does anyone know how can I send a runnable to a service? Or any other way to make my service a little bit more abstract? I want to call a service which has to run specific code on another process. The code that must be run may vary but everything else stays the same. Any ideas? Mar 16 16:27:24 maybe with a static Queue Mar 16 16:27:35 where the service gets its objects from Mar 16 16:27:51 or use a bus Mar 16 16:27:53 skulltower: The code has to exist in the service, you can’t really ship code around Mar 16 16:28:09 then it’s just a matter of passing a message, there are multiple ways to do that Mar 16 16:28:15 local broadcast, binder, ... Mar 16 16:28:15 jaana, ahh I hoped I could like send a runnable via a bundle Mar 16 16:31:41 depends if the runnable would do static methods only Mar 16 16:34:00 Ashiren, the runnable would create an object of some class and call it's methods. So yeah, it doesn't interact with objects outside of its scope. Mar 16 16:40:00 Hm, how hard would it be to make an app that makes $1/day? Mar 16 16:40:29 imo, pretty simple Mar 16 16:40:40 make it look good and functional Mar 16 16:41:20 cool, what are the average cpc/cps? I googled but found nothing Mar 16 16:41:35 cpv or cpi, not cps Mar 16 16:41:58 threenuc, it differs quite a bit. I've never found anything concrete. There are calculators if you google it Mar 16 16:42:32 if you know any metrics you can pass along though such as gender, age group, that stuff helps Mar 16 16:43:36 Hm, good to know. Thanks Mar 16 16:53:55 howdy. When you visit a webpage, you typically "cache" it. When you revisit it, your browser checks something to see if there's a new version available. what is that called? Mar 16 16:54:20 cache-control and/or modified headers Mar 16 16:57:17 thanks Mar 16 16:57:53 so following up on that.. I can use android to read and store these values? To prompt information to update? Mar 16 16:58:28 yes Mar 16 16:58:42 there are http libraries that do that for you Mar 16 16:58:50 you can set a cache in retrofit for example Mar 16 16:58:55 well... my situation is complicated. Mar 16 16:59:04 thats what she said Mar 16 16:59:22 fc --_ Mar 16 16:59:52 i have 2 webpages. one hosted online, one hosted in the app (trust me.. i know). The app actually uses the local webpage, but pulls data from the server as a json string. I was to "cache" that json the same way a web browser Mar 16 17:00:30 because as it is right now, each time i load the content, its re-downloading the same json Mar 16 17:01:02 send a cache-control header along with the json Mar 16 17:01:16 something like "only redownload the json once a week" Mar 16 17:01:20 I reallllly want to rant, but i will stop there and refrain myself Mar 16 17:01:35 its ok adq, please just know that this is what i was asked to do Mar 16 17:01:43 and im dying inside Mar 16 17:01:59 oh, no it's just AS and the whole "eco-system" collapsing Mar 16 17:02:36 oh sorry im unfamiliar with that situation Mar 16 17:07:11 hi there, should I use images in email signatures like remote images or by converting the to data images? Is there any disadvantage if I make data images besides the size of emails? Mar 16 17:13:49 chillsurf, I don't really know why this is an android dev question but, I would find images in the email sig annoying in email chains. Mar 16 17:14:33 its a general email issue, and I dont know where to ask. Mar 16 17:14:42 the client needs a signature with his logo and social icons Mar 16 17:15:09 But to avoid not being shown in gmail,hotmail yahoo, i hope I can make them URI imagezs Mar 16 17:15:30 but will the images will be recognised by most of mail clients? Mar 16 17:16:59 is the gradle method getBootClassPath() in any class that I can reference online? Such as in android.getBootClasspath() Mar 16 17:17:37 email stuff is tough, my last position had a dev dedicated to proper email generation. You'd prob have better luck asking in a web dev channel Mar 16 17:27:15 yiati, yes Mar 16 17:27:24 AndroidBuilder Mar 16 17:28:58 pfn nice thanks Mar 16 17:29:03 https://android.googlesource.com/platform/tools/build/+/tools_r22/builder/src/main/java/com/android/builder/AndroidBuilder.java Mar 16 17:29:09 ^ for reference for anyone Mar 16 17:29:44 anyone know if polaris office can pull csv / spreadhseet like data from an arbitrary app's content provider ? Mar 16 17:29:44 !paste Mar 16 17:29:55 polaris office for android ofc Mar 16 17:31:43 can anyone take a look at http://paste.lug.ro/131435 and tell if I'm doing something wrong ? Newb app .. working kind of slow on an n7 .. I'm sure I'm doing stuff the wrong way Mar 16 17:35:51 BlackBishop: Are you doing database reads/writes on the main thread? If so, move it to a background thread. Mar 16 17:45:15 TacticalJoke: Hmm .. I am ? :/ Mar 16 17:45:18 Hi, is it safe for my app to store a user's account password in memory for some period of time? Is there any risk that a malicious process on the same device could read it? Mar 16 17:45:57 BlackBishop: Depends on what "DataBaseWork" does. Mar 16 17:48:12 BlackBishop: look up AsyncTask; anything that does serious i/o (like database read and writes) should be in a background thread like AsyncTask (or just plain another thread if it's going to be more than a few hundred ms) Mar 16 17:50:19 TacticalJoke: http://paste.lug.ro/131436 that's databasework Mar 16 17:50:46 * BlackBishop looks up threads :/ Mar 16 17:50:54 hehe Mar 16 17:50:55 altough .. won't those mess a lil' bit of the logic ? Mar 16 17:51:02 it will Mar 16 17:51:04 Yeah, that's doing database work on the main thread. Mar 16 17:51:17 you'll have to work asynchronously Mar 16 17:51:43 hmmm .. what if I load that stuff in an "array" of some sort Mar 16 17:51:50 wouldn't that be more efficient ? Mar 16 17:52:16 the problem is the i/o Mar 16 17:52:18 altough .. on "learntest" loading that 700K file .. won't be so nice .. I guess Mar 16 17:52:30 yiati, http://www.javadoc.io/doc/com.android.tools.build/builder/1.1.3 Mar 16 17:52:36 yiati, that's the thing I was looking for... Mar 16 17:52:48 Database stuff has to go on a background thread. It's more or less that simple. Mar 16 17:52:57 http://static.javadoc.io/com.android.tools.build/builder/1.1.3/com/android/builder/core/AndroidBuilder.html Mar 16 17:52:58 ok, on it ! Thanks. Mar 16 17:53:36 Anything else ? some messed up logic ? maybe separating stuff and using them some other way ? Any other recommendations are more than welcomed ! Mar 16 17:57:39 they bumped out google i/o registration a week Mar 16 17:57:43 didnt they do this last year too? Mar 16 17:58:37 new intel nuc is out .. i7 .. yeey Mar 16 17:59:31 I'm trying to add a progress dialog and get this weird error: 03-16 18:58:03.948 15277-15277/fr.ec_m.ext.ginfo.tberger.earthquakes_tberger E/WindowManager﹕ android.view.WindowLeaked: Activity fr.ec_m.ext.ginfo.tberger.earthquakes_tberger.activity.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{3b1c153f G.E..... R.....ID 0,0-729,232} that was originally added here Mar 16 18:00:37 I know that I can use a custom ArrayAdapter to load data into a custom layout... but within that custom ArrayAdapter, can I add additional elements to the custom layout? Mar 16 18:02:40 can my app update itself? like download the apk, close itself and install the new apk Mar 16 18:03:25 moviuro: StackOverflow has a lot of answers. They're mainly talking about using Dialog.dismiss. Mar 16 18:03:31 Though I guess people should be using DialogFragment here anyway. Mar 16 18:04:04 TacticalJoke: just replace my DialogProgress with DialogFragment? Mar 16 18:04:27 (I really have no clue what I'm doing, I just want to show it, launch something, hide it when I get the answer) Mar 16 18:04:48 It'd be a case of returning the ProgressDialog from your DialogFragment.onCreateDialog overrid.e Mar 16 18:04:51 override.* Mar 16 18:05:32 I still don't understand, I'm really a n00b Mar 16 18:06:31 maybe if I rephrase. within a custom ArrayAdapter, can I inflate additional layouts to the parent layout the ArrayAdapter is working with? Mar 16 18:06:38 If you want to make things really simple (and nice, UI-wise), forget ProgressDialogs. Just show a ProgressBar. Mar 16 18:06:50 not really Mar 16 18:07:09 newbQ, what's your actual issue / usecase? :) Mar 16 18:07:16 Mavrik: What "not really"? Mar 16 18:09:05 Mavrik: I want to send data to this template http://pastebin.com/Gj9Kt1w9 but the number of rows needed is dynamic, based on the amount of data Mar 16 18:09:28 uhm Mar 16 18:09:39 wait. thats the wrong one Mar 16 18:09:49 newbQ, so the design of your adapter elements changes according to number of items or amount of data inside the item? Mar 16 18:10:14 TacticalJoke: would you have time to help me figure out how to integrate that? Because dialogs would be far simpler and far better suited to what I want Mar 16 18:10:28 Mavrik: I want this to be the parent layout the adapter handles http://pastebin.com/RpaVw1s8 Mar 16 18:10:55 Mavrik: and then dynamically add these to the gridview http://pastebin.com/Gj9Kt1w9 Mar 16 18:11:15 Mavrik: basically, yeah Mar 16 18:11:31 newbQ, you should approach that differently Mar 16 18:11:45 newbQ, first of all get rid of ArrayAdapter and make your own by extending BaseAdapter Mar 16 18:11:57 then just return a properly inflated view in getView() according to amount of data Mar 16 18:12:32 newbQ, look at getViewType() and getViewTypeCount() since you'll probably have to implement them properly Mar 16 18:12:35 moviuro: It'd be something like the second answer here: http://stackoverflow.com/questions/7298962/android-dialogfragment-progress-bar Mar 16 18:12:40 But also look at the first answer. :) Mar 16 18:12:51 in short - if you'll modify layout of an adapterview later you're in for a bad time, so don't do it Mar 16 18:12:57 return proper layout at the start :) Mar 16 18:13:02 hey all, I have a question... Mar 16 18:13:18 do my reciever actions have to be uniquely named across, say, paid/free versions of the app? Mar 16 18:13:41 or does it not matter at all Mar 16 18:13:42 matt_j, broadcast receiver? Nop. Mar 16 18:13:45 ok Mar 16 18:13:52 thanks Mar 16 18:14:12 is there any secret to set a text when i press a button? seems i cant update the UI with this simple code: http://paste.ofcode.org/4gTZTTLD6NckwM6yM7UbwR Mar 16 18:14:24 TacticalJoke: I am required (in my guidelines for the project) to have a loading bar/dialog/whatever Mar 16 18:14:31 Mavrik: darn. I was hoping it would be simpler than that. thanks Mar 16 18:14:48 newbQ, that's actually way simpler than dealing with modification of items ;) Mar 16 18:14:48 luist: what's working, and what's not? Mar 16 18:14:50 we didn't cover fragments in my course Mar 16 18:14:50 so i'm _lost_ Mar 16 18:15:21 luist: You don't seem to be setting a click listener anywhere Mar 16 18:16:10 moviuro: Why, then, are you disinclined to use a ProgressBar? It's better (usually) and easier (almost always). Mar 16 18:16:15 SimonVT: so the onClick is useless? Mar 16 18:16:47 Mavrik: but now I have to learn how to tinker with BaseAdapter. I had hoped I could finish today Mar 16 18:16:56 luist: Uh, if you never set a click listener, yeah Mar 16 18:17:03 I don't understand the code snippet Mar 16 18:17:25 newbQ, huh Mar 16 18:17:27 why return something when I just want it displayed? Mar 16 18:17:47 newbQ, you need to implement like 1 longer and 3 short methods and your view management will be significantly simpler :) Mar 16 18:17:56 A DialogFragment.onCreateDialog override returns the Dialog to be displayed. Mar 16 18:17:58 Also, how do I integrate it with my activity? Mar 16 18:18:01 I doubt overriding getCount() will cause you problems :P Mar 16 18:18:04 SimonVT: oh i got it… thansk Mar 16 18:18:40 I still don't get it: what am I going to create, in what order and how does it fit into my usecase? Mar 16 18:19:35 Mavrik: I don't understand what you mean about longer and short methods. Mar 16 18:19:45 I just want a progress "thing" that blocks the user (yeah, i'm evil, and tired) while I do some background work Mar 16 18:20:29 so : do I have to rewrite my activities (the xml)? Do I have to create some custom classes? How do I use them in my work? Mar 16 18:22:18 the code is here: https://github.com/moviuro/tberger-ecm-earthquake Mar 16 18:22:36 with RxJava is there a way to chain together async operation, async operation, main thread, async operation, main thread? Mar 16 18:23:13 moviuro: Just show a ProgressBar. Mar 16 18:24:41 theblang, yep, use subscribeOn :) Mar 16 18:25:42 Mavrik: so I need to create a custom Observable I guess to pass the data along at the point where I interject and do something on the main thread Mar 16 18:26:48 theblang, um, not really Mar 16 18:27:24 theblang, I figure you are actually doing separate operations for each step right_ Mar 16 18:27:25 ? Mar 16 18:29:08 theblang this is a good article on how threading works with rx http://www.grahamlea.com/2014/07/rxjava-threading-examples/ Mar 16 18:29:12 Mavrik: Yeah, but Retrofit and SqlBrite return observables, but I want to interject to do something with the main thread Mar 16 18:29:44 theblang, so do something like Mar 16 18:30:33 myretrofitmethod().subscribeOn(Schedulers.io()).flatMap().subscribeOn(mainThread).flatMap(woohoo!).subscribeOn(otherthread)? Mar 16 18:31:29 kind of... Mar 16 18:32:07 Mavrik, g00s I'm starting to get it, but I am still concerned about rotation when database updates are happening Mar 16 18:32:20 JakeWharton, which part is suspect? :) Mar 16 18:32:26 subscribeOn is wrong Mar 16 18:32:50 Retrofit automatically subscribes on background threads Mar 16 18:33:04 JakeWharton: Ahh, so I can get rid of the subscribeOn there I guess Mar 16 18:33:19 plus you probably want to observe the changes on the main thread and then flatMap into something which is subscribed on a background thread Mar 16 18:34:43 JakeWharton, Mavrik, g00s: I am doing Retrofit call into SqlBrite call into main thread stuff. I'm just trying to sort out UI stuff so user does't have a chance of possibly clicking stale data. Was thinking I needed to inject into the chain a call that removes the ListView results before changing the database data, then of course showing again Mar 16 18:36:00 JakeWharton i looked through the retrofit code, and only came across subscribeOn in the MockRestAdapter. where does it automatically subscribeOn ? Mar 16 18:36:48 https://github.com/square/retrofit/blob/parent-1.9.0/retrofit/src/main/java/retrofit/RxSupport.java#L42 Mar 16 18:37:11 ty Mar 16 18:37:21 Hello, how do I tell Android Studio that the Android API sources have updated? It looks for the v21 when it has v22 Mar 16 18:38:03 is 22 your compilation SDK? Mar 16 18:39:24 JakeWharton: nope, thanks. Mar 16 18:41:12 well, using a new activity makes my application crash Mar 16 18:41:20 err, layout Mar 16 18:41:27 (for the progressbar) Mar 16 18:41:27 Man so many android so posts havenegative score Mar 16 18:41:33 http://sprunge.us/cYaE Mar 16 18:42:37 Don't use a new layout. Just put a ProgressBar in the existing layout. Show/hide it. Mar 16 18:42:59 the androidJavadocs task in gradle-mvn-push does not seem to be pulling in the classpath of the other dependencies in my project. Is there something I need to append to the classpath in the gradle-mvn-push script or elsewhere? Mar 16 18:43:46 When I debug through the API sources and step through the lines, theres an offset in the lines, e,g I'm seeing line 300 when I should be on line 400. is that a known bug? Mar 16 18:44:39 Mavrik: have you encountered the situation where you are changing data async then updating, like with a ListView? Technically there is a small window where the data has been changed but not updated yet that could yield NPE. This is why I am trying to inject a ListView clear before I actually change data Mar 16 18:44:57 Hey all. For those of you that use AndroidStudio have you ever had a 'missing glyph' show up in your logcat output? I've taken a screenshot to show what I mean: http://i.imgur.com/75VXZY0.png Mar 16 18:46:56 viran: It's not a bug, you just don't have the exact same class file that was used when compiling Android for that device Mar 16 18:47:47 oh, thanks Mar 16 18:48:59 Hi, I'm trying to make a app with C++ for android. In desktop version I can easily change the resolution of the window. Is it possible to do so on android to? Can I access that?(Using SFML) Mar 16 18:49:28 TacticalJoke: how do I show/hide it? It isn't obvious as .show() and .hide() Mar 16 18:49:58 sup Mar 16 18:50:05 if I set zipAlignEnabled true in my build.gradle, I don't need to run zipalign afterwards to sign the build, right? gradle will do that step for me? Mar 16 18:50:43 Via View.setVisibility. For example, this: findViewById(R.id.main_progress_bar).setVisibility(View.GONE); Mar 16 18:50:47 shekibobo: it does it all Mar 16 18:51:01 cool Mar 16 18:55:34 Is there a way to not add a class to the production build? Mar 16 18:56:19 why would android studio at one moment auto complete the style= and then, plain stop doing it? Mar 16 18:56:47 moviuro: if you lose your namespace Mar 16 18:56:59 lasserix_: how do I fix that? Mar 16 18:57:01 I get that problem sometimes if there is an error Mar 16 18:57:06 restart? Mar 16 18:57:11 close and open the editor window? Mar 16 18:57:37 uninstall and install eclipse instead? :p Mar 16 18:57:38 yeah, so that obviously is a flaw of android studio... -_-" Mar 16 18:57:39 I've got Android Support Library Rev 22 installed, in gradle.build i've added compile 'com.android.support:support-v4:22' - I get the following error: Error:Failed to find: com.android.support:support-v4:22 - What am I doing wrong? Mar 16 18:57:47 * ravilov hides Mar 16 18:57:48 Anyone got recomendation for best snackbar library> Mar 16 18:57:52 ravilov: eclipse is even worse Mar 16 18:59:07 http://wstaw.org/m/2015/03/16/plasma-desktopjLG636.png Mar 16 18:59:20 why can't it autocomplete? Mar 16 18:59:25 android_sandwich: If you're using gradle, build types http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Types Mar 16 19:00:51 lasserix: I'm using https://github.com/nispok/snackbar and its pretty good Mar 16 19:00:51 moviuro: yeah thats exactly waht happens Mar 16 19:01:04 hello, im currently trying to fix a problem in my AOSP rom regarding hw video playback and HW acceleration. anyone able to help? Mar 16 19:01:04 moviuro: like i said clean/ reopen the window restart the ide Mar 16 19:01:18 demonslayer12349: wrong, channel Mar 16 19:01:21 well, bright side is, after this project, I can happily uninstall the IDE and start over from scratch :) Mar 16 19:01:30 moviuro: The width of the progress bar should be something like "match_parent", and it should be declared below the RecyclerView (so that it always appears on top of it). Mar 16 19:01:40 cant find anything..... man what channel do i need? Mar 16 19:01:59 nvm found it Mar 16 19:02:00 thanks Mar 16 19:02:45 moviuro: whats that progress bar for? are you using it as an overlay for items loading in the recyclerview? Mar 16 19:03:19 desmin88: I don't know, I just want to show it whan I launch a background task and wait for it to return Mar 16 19:03:26 Actually, if it's a circular progress bar then "wrap_content" is fine. Mar 16 19:03:46 anyway to generate a makefile from androidstudio/intellij for an app Mar 16 19:03:47 ? Mar 16 19:04:24 bynarie Mar 16 19:04:36 yes Mar 16 19:04:39 im not sure what you're trying to accomplish with a makefile Mar 16 19:05:15 [bump] Hi, is it safe for my app to store a user's account password in memory for some period of time? Is there any risk that a malicious process on the same device could read it? Mar 16 19:05:26 basically im trying to add in apps to a rom, but i need a way for the app to be compiled at the same time just like the rest of the apps, when building the os Mar 16 19:05:47 ahh, thats outside this channel really Mar 16 19:06:08 oh Mar 16 19:06:11 ok Mar 16 19:06:25 thanks anywho Mar 16 19:06:51 linelevel: generally if you store password in memory people do so as a char[] and null it out when theyre done Mar 16 19:07:05 TacticalJoke: how do I show the progress bar once it's "gone" ? Mar 16 19:07:17 set it to View.VISIBLE Mar 16 19:07:27 #android* channels should all be renamed really Mar 16 19:09:41 wait Mar 16 19:09:46 did you just use [bump] on irc Mar 16 19:10:04 desmin88: heh. Is that a moral sin? Mar 16 19:10:07 mortal* Mar 16 19:10:11 yes Mar 16 19:11:16 ok, i've got no idea what's going on because now the application crashes Mar 16 19:11:38 RecyclerView has no LayoutManager in onCreate() Mar 16 19:11:50 so, yeah, I'm lost Mar 16 19:12:17 thanks desmin88, didn't see your answer Mar 16 19:13:51 MrEngineer or nispok snackbar, anyone have a reason for one or the other? Mar 16 19:14:08 anyone have strong preference between hellocharts / mpandroidchart / eazegraph / jjoe64 graphview ? Mar 16 19:14:44 one requirement i have is that i need to continuously update the chart ;) Mar 16 19:15:13 desmin88: I'll slaughter a virgin and offer the blood to the IRC gods by way of apology. Mar 16 19:15:55 I liked the bump thing. It offered great clarity. Mar 16 19:16:02 ugh, proguard and jar file naming and case insensitive filesystems fml Mar 16 19:16:19 desmin88: Still, I'm concerned about the security of storing a password in memory. This app has the ability to spend users' money, so it's not unthinkable that there may exist a malicious app whose purpose is to steal this password from memory while it's there. Mar 16 19:16:33 g00s, No feedback but I'm going to add a graph view eventually in my app, and would love to hear your findings! Mar 16 19:16:41 linelevel: How long are keeping the password in memory and why Mar 16 19:16:47 I wish retrolambda could read directly from jar and write directly to jar... Mar 16 19:17:05 * pfn wonders how else to workaround this Mar 16 19:17:38 TacticalJoke: would you slowly help me through? ecause I won't be able to do it by myself Mar 16 19:17:49 linelevel: you could xor encode it Mar 16 19:18:00 security by obscurity Mar 16 19:18:17 agreed, security by obscurity doesn't interest me. Mar 16 19:18:25 tho if a malicious app were to "listen" for memory, it'd probably do it when you are using it, not just sniff it out of arbitrary memory Mar 16 19:18:36 linelevel: all you have in obscurity. Mar 16 19:18:52 so if I set `zipAlignEnabled true`, I should find a signed/aligned apk in my outputs after running assembleRelease, right? Mar 16 19:19:06 shekibobo: yes why why it be anything else Mar 16 19:19:15 would* Mar 16 19:19:18 desmin88: Well the app consumes a central API which does all the heavy lifting. Each device that user authenticates on (and tells the API to "remember") gets a persistent key, which I'm storing on disk (encrypted by the result of a KDF applied to the user's master password). Mar 16 19:19:44 1) where do I put the progressbar ? Mar 16 19:19:47 desmin88: But I don't want to have to ask the user for his password for *every* API call. So once he provides his password once, I want to store his device key for near-future use. Mar 16 19:19:59 If I put it inside the recyclerview, my app crashes Mar 16 19:20:00 desmin88: I would delete it from memory when the app goes into the background or closes. Mar 16 19:20:11 java.lang.RuntimeException: Unable to start activity ComponentInfo{fr.ec_m.ext.ginfo.tberger.earthquakes_tberger/fr.ec_m.ext.ginfo.tberger.earthquakes_tberger.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object reference)( Mar 16 19:20:31 Not inside the RecyclerView. Mar 16 19:20:54 linelevel: if are you go the char[] route, you have to zero it out immediately after usage Mar 16 19:21:01 moviuro: How did you get to the stage where you are now? I get the impression that you started Android programming about 27 minutes ago. Mar 16 19:21:34 started Java* Mar 16 19:21:39 desmin88: well, it will be used multiple times, but you mean "immediately after you're done with it" (when the app goes into the background or closes) Mar 16 19:21:41 TacticalJoke: more or less. I had some "courses" and now a project Mar 16 19:21:55 so sniffing on github, adding some of my own java into it Mar 16 19:21:58 desmin88: But I'm unclear about how Android secures a process's memory space-- can other apps access it? Mar 16 19:22:10 yes it does Mar 16 19:22:10 and searching on google and asking on IRC, that's it Mar 16 19:22:11 desmin88: the output file is named app-release-unsigned.apk Mar 16 19:22:25 but you have no guarentee that your device isnt rooted or what have you Mar 16 19:22:30 which would lead me to believe it's unsigned Mar 16 19:22:39 unsigned != not zip aligned Mar 16 19:22:48 desmin88: Does what? Prevents other apps from accessing my app's memory space? Mar 16 19:22:52 yes Mar 16 19:22:54 I don't get any more completion for style=, even after a reboot Mar 16 19:22:56 desmin88: What attack would be possible on a rooted device? Mar 16 19:23:02 anything Mar 16 19:23:03 its rooted Mar 16 19:23:19 "Your application runs in a secure sandbox environment, so other processes on the system cannot access your code or private data." Mar 16 19:23:28 according to http://developer.android.com/training/articles/security-tips.html Mar 16 19:24:02 linelevel: you should have the server provide you with a token Mar 16 19:24:04 linelevel: other apps cannot access your process's memory on an unrooted device, without some sort of exploit, etc. Mar 16 19:24:15 https://github.com/orfjackal/retrolambda/issues/44 Mar 16 19:24:15 :( Mar 16 19:24:49 just assume you're safe and see how far you get ;) Mar 16 19:29:02 Bitmap.createScaledBitmap() creates a very pixlated bitmap, any alternative? Mar 16 19:29:04 ok, made some progress. Now, it just won't show, not make my application crash Mar 16 19:29:37 viran: di you set the filter to true (or false)? Mar 16 19:29:38 lasserix_: The issue with a session token is that I don't want the user to have to send a password to the web server very often... so I was hoping to just do it once per device (and use 2FA of course), and then let the token (generated by Diffie-Hellman) persist forever/until it is revoked. Mar 16 19:30:03 Ashiren: tried both .. true give a better result but still, very grainy Mar 16 19:30:26 JesusFreke: What about on a rooted device though? Presumably some of my users will have rooted devices. How easy is it for a rooted device to bypass the sandboxing? Mar 16 19:30:53 linelevel: tokens can do that just dont let it expire Mar 16 19:31:00 why would gradle output a file named 'unsigned' if it was, in fact, signed? Mar 16 19:31:08 viran, last time I had to scale an image and it not end up crappy, I had to jump through a *lot* of loops Mar 16 19:31:09 lasserix_: But then we're back to the same problem. Mar 16 19:31:19 linelevel: not really. token != password Mar 16 19:31:31 token can be coupled to device request server side Mar 16 19:31:51 so they wont have the password, and a token without proper metacredentials won't be used Mar 16 19:31:51 http://sprunge.us/MUFL http://sprunge.us/PaaO <- the progressbar won't show Mar 16 19:32:04 just another layer of security, but better than just plaintext password Mar 16 19:32:24 moviuro: reverse order Mar 16 19:32:24 just rot13 the plaintext pass :p Mar 16 19:32:55 moviuro: progressbar is zunderneath recyclerview Mar 16 19:33:18 nope lasserix_, still no dice Mar 16 19:34:10 It's because you hide it at the end of showLimits(). Mar 16 19:34:12 apply* Mar 16 19:34:30 You shouldn't have all those show/hide calls. You probably need to hide the progress bar once and show/hide nothing else. Mar 16 19:35:37 still nothing showing up at startup Mar 16 19:35:47 moviuro: how long does it take to relaod your recycler view? Mar 16 19:36:03 i believe you you are not seeing the progress because it happens instantly Mar 16 19:36:23 derp Mar 16 19:36:27 derp derp? Mar 16 19:36:31 lasserix_: not long upon applyLimits() Mar 16 19:36:40 really log when doing the background job Mar 16 19:36:49 lasserix_: Despite the phrasing I used in my orignal question, I was only planning to store the token (the result of the Diffie-Hellman key exchange) in memory, not the user's actual master password. But if the token lives forever unless explicitly revoked, that's not very comforting. Mar 16 19:37:01 moviuro: bg job is what? Mar 16 19:37:08 so, ok, I saw a huge progress thing, stuck (not spinning) and not using the material theme Mar 16 19:37:11 usually reseting an adapter is like 20-100 ms call Mar 16 19:37:15 lasserix_: DL a JSON file Mar 16 19:37:33 have you timed it? Mar 16 19:37:44 1~2 seconds Mar 16 19:37:48 and where is downloadin the json file come into play here? in the other activity? Mar 16 19:37:54 the progressbar is not my choice Mar 16 19:38:23 moviuro: your code is very odd, you call apply limits before and after startactivity and returns for result Mar 16 19:38:26 why? Mar 16 19:38:39 lasserix_: https://github.com/moviuro/tberger-ecm-earthquake/blob/master/app/src/main/java/fr/ec_m/ext/ginfo/tberger/earthquakes_tberger/service/FetchDataService.java Mar 16 19:38:52 linelevel: that is what working client side means, though. Mar 16 19:39:08 noob mistake here: lost my private key pass, is there a way to go into the console and generate a new one? Mar 16 19:39:37 moviuro: why are you calling apply limits when you start this? shouldn't you call it ONLY after you get the resutls? Mar 16 19:39:43 dhcar no your fucked. Mar 16 19:39:46 dhcar, Nope :) there is a brute force program to try guess the password out there, good luck! Mar 16 19:40:06 better forgetting the password than losing the key though Mar 16 19:40:08 fair enough, lasserix_ Mar 16 19:40:20 fair enough!?!? Mar 16 19:40:24 its madness ;P Mar 16 19:40:27 since you do onStart Mar 16 19:40:38 why not hide the recyclerview there, then show progress bar Mar 16 19:40:48 dhcar, https://code.google.com/p/android-keystore-password-recover/ Mar 16 19:41:01 okay. so I've got a BaseAdapter that can display a single row of data. how do I get it to display a dynamic number of rows? Mar 16 19:41:07 anyone having problem with AS 1.2 logcat "no debuggable applications" ... empty logs ? Mar 16 19:41:29 yeah! now I have a huge (and ugly) spinning loading progress bar! \o/ Mar 16 19:41:35 newbQ: It displays the number you return from getCount(). Mar 16 19:41:39 moviuro: oh you do, here in XML try width=height=wrap_content and android:alignParentCenter=true for progress bar Mar 16 19:42:00 lasserix_: Well, the alternative would be for me to use shorter-lived tokens, but then the client would have to transmit his master password to the API server to authenticate more often. Right now, my server architecture is designed to separate the web server from the API "workers" so that even if the public-facing web server is compromised, no harm can be done without a user's password or token. So sending the password more often would contrad Mar 16 19:42:05 moviuro: ** er try 200dp 200dp and background="#00FF00" Mar 16 19:42:06 material design also? Mar 16 19:42:07 ^ did that cut off? it was long for IRC Mar 16 19:42:48 linelevel: the fact is you cannot secure client device in any way. that's just reality. Mar 16 19:43:18 thanks guys. I'm guessing talking to developer support won't help. Mar 16 19:43:22 is this a bitmining thing? Mar 16 19:43:34 dhcar: sorry good luck Mar 16 19:43:40 dhcar, Nope :) Mar 16 19:43:52 lasserix_: the alignParentCenter says "not found" Mar 16 19:44:46 well that's shitty news but you guys were very helpful. Thanks Mar 16 19:44:55 moviuro: use your brain Mar 16 19:45:12 TacticalJoke: I thought getView is what handles how it is displayed? Mar 16 19:45:13 unless i should spoonfeed you! Mar 16 19:45:48 newbQ: you must override getItemType getItemTypeCount and switch in getView depending on how position maps->getItemType Mar 16 19:45:54 google play services keeps crashing with strictmode policy violations :| Mar 16 19:46:00 newbQ: Yes. But getCount relates to how many items there are. Mar 16 19:46:21 newbQ: you may also want to override allItemsEnabled and itemISEnabled Mar 16 19:46:49 lasserix_: https://youtu.be/DJ8r_ta9tQk Mar 16 19:47:12 moviuro: see your progress dialog yet ? ;p Mar 16 19:47:34 only if he closes his eyes :p Mar 16 19:47:39 if you are running emulator you can use viewhiearchy to inspect it too Mar 16 19:47:47 linelevel: honestly, for something financially sensitive like that, you might consider checking if the device is rooted and refuse to run. Mar 16 19:48:28 I dont see how getCount ItemType and the other things factor into it Mar 16 19:48:31 JesusFreke: Yeah, that's a good suggestion. I think I care too much about power users to do that, though. Mar 16 19:48:41 Hey! Mar 16 19:48:49 newbQ, then you're not thinking dynamically Mar 16 19:49:01 what happens when I do myView.setVisibility(View.VISIBLE); ? Mar 16 19:49:16 Mattx: I'd like to hear your predictions. Mar 16 19:49:18 ...what do you think it happens? Mar 16 19:49:26 fireworks Mar 16 19:49:32 We need more hypothesizing and googling. Mar 16 19:49:35 just after that line I'm running a code that needs a button inside that view (which is a GridView) Mar 16 19:49:41 and it seems it's not visible Mar 16 19:49:43 The grace of the robotic android demigod ushers forth and fills your retinas with the vision of the true singularity. Mar 16 19:49:48 FBI busts in and takes you away Mar 16 19:50:02 if I run that code 5000ms after setVisibility it works Mar 16 19:50:41 What happens when using anonynmous callback for retrofit and the user leaves the activity that prompted the call? Mar 16 19:50:44 TacticalJoke, I guess you didn't get the question. I know what happens but not how it happens. it seems there is a delay or something that I'm missing Mar 16 19:50:46 setVisibility only sends a signal, you don't seriously think the UI gets updated EVERY TIME you call an API method? Mar 16 19:50:55 lasserix_: exactly what you'd expect Mar 16 19:51:00 lasserix_: you leak the activity until the call compeltes Mar 16 19:51:07 ahh okay Mar 16 19:51:21 ok, that's my guess. so I called that code inside onResume, and it doesn't work either Mar 16 19:51:35 JakeWharton: is there is standard way to cancel the request or handle this situation? Mar 16 19:51:41 ravilov, what method gets executed when the ui is ready in a fragment? Mar 16 19:51:55 dunno Mar 16 19:51:56 lasserix_: dunno. I use an Observable and unsubscribe from the Subscription Mar 16 19:52:01 Mattx: thats because the viewhierarchy is finished laying out Mar 16 19:52:19 JakeWharton: good advice thanks ;p Mar 16 19:54:20 any idea? Mar 16 19:54:55 lasserix: you can make use of a compositesubscription Mar 16 19:55:10 throw everything together and unsubscribe when appropriate Mar 16 19:55:10 Mattx: Is the Button in question a child of the GridView? Mar 16 19:55:18 Mattx, docs Mar 16 19:55:36 the button is inside of one of its elements TacticalJoke Mar 16 19:55:55 What do you need to do with this Button? Mar 16 19:56:05 Mattx: why are you changing the view visibility like this? Mar 16 19:56:20 I need to pass it as the target of a ShowcaseView (https://github.com/amlcurran/ShowcaseView) Mar 16 19:57:34 lasserix, because when I finish loading the data I make the grid visible, meanwhile I show a "LOADING" view instead Mar 16 19:58:11 it takes a few seconds to sync the app with the server the first time Mar 16 19:58:14 ProgressDialog? Mar 16 19:58:30 I mean that's what it's made for Mar 16 19:59:16 that's what spinners with the word "loading" were made for too Mar 16 19:59:34 progressdialog is so gingerbread Mar 16 19:59:39 Yeah, I'd definitely use a spinner here. Mar 16 19:59:55 g00s, I KNOW, RIGHT? Mar 16 20:00:08 * g00s sighs Mar 16 20:00:42 i remember back to gingerbread, one of the UI design patterns was the "6 pack" Mar 16 20:00:46 so do you understand the problem? I'm doing setVisibilitiy and I need to run some code after the grid is visible, so the ShowcaseView can use a button (in one of the Grids element) as the target Mar 16 20:00:49 what should I do? Mar 16 20:00:53 Mattx: I'm not sure. It seems that the problem is that you're needing to wait for the adapter to produce the button. Maybe some kind of callback from the adapter to the activity is appropriate? (That could be a terrible idea; never tried this.) Mar 16 20:00:56 hmmm, the progress bar doesn't always spin, be it material or the ancient default one Mar 16 20:01:08 Has anyone else had this problem before? https://code.google.com/p/android/issues/detail?id=77670 Mar 16 20:01:17 hey whatever happened with that guy who was insisting on using API 8, because he "couldn't let those 153 people down"? :D Mar 16 20:01:22 moviuro: Are you blocking the UI thread? Mar 16 20:02:10 me? no Mar 16 20:02:29 TacticalJoke: most certainly Mar 16 20:02:39 Less blockage; more spinnage. Mar 16 20:03:16 that wasn't true with the material spinning thing: it wouldn't appear upon start-up Mar 16 20:03:21 TacticalJoke, you're right, I need the adapter to produce the button, though I don't like the idea of using a callback. there must be a better way, it looks like a common problem, isn't it? Mar 16 20:03:38 " Apple will soon introduce a new recycling and trade-in program that will accept non-Apple smartphones, notably including Android devices, in exchange for gift cards to be used toward the purchase of new iPhones." Mar 16 20:03:58 they'll xfer contacts too Mar 16 20:05:27 I got a pretty awesome 1-star review today: "I didn't pay for this. I will have my man make me a FREE app & not have these issues?" Mar 16 20:05:31 moviuro: Anything blocking should happen in a background thread. The UI thread needs to be clear so that it can update the UI (in order to, for example, show ProgressBar animations). Mar 16 20:05:44 zipAlignEnabled true does nothing, apparently... Mar 16 20:05:55 quinnjn: Sounds like those YouTube prank videos. Mar 16 20:06:01 yep TacticalJoke, just remembered that ^_^" Mar 16 20:06:22 Mattx: I'm not sure, but I'm guessing it's not very common. Mar 16 20:06:51 Mattx: just use some dummy data Mar 16 20:07:22 good place to slip in easter eggs is during tutorial Mar 16 20:07:45 Mattx: It does make me wonder, though, why you're wanting to "show case" an Adapter-produced view. Mar 16 20:07:46 moviuro: you finally find your progressbardialoge? Mar 16 20:08:08 g00s, but will they accept my android-infested sould too, or will I have to be purged first? Mar 16 20:08:17 soul* Mar 16 20:08:21 The Adapter might get a little jealous. Mar 16 20:09:09 lasserix_: yeah, though now it's stuck when going inside a loop ;) Mar 16 20:09:11 ravilov they will probably embalm you and your phone and put them both in a museum Mar 16 20:09:20 ravilov: they'll feed you apples dunked in lsd and make you watch videos after which you'll emerge with a twinkle in your eye and an unassailable love for the almighty jobs Mar 16 20:09:27 is there a simple "do in thread" instruction I could use? Mar 16 20:09:28 homo RavioliOS Mar 16 20:09:35 TacticalJoke: do you mind if I PM you about my BaseAdapter problem? Mar 16 20:09:38 moviuro: AsyncTask is basically that. Mar 16 20:09:41 wait... RavioliOS? Mar 16 20:09:56 newbQ: It'd be easier to ask in here. Mar 16 20:10:12 moviuro, yes, you start a thread and you make it do stuff Mar 16 20:10:40 g00s, ha, embalm, nice :p Mar 16 20:10:58 ok. well, these are the files I'm looking at. http://pastebin.com/AtneGG4t , http://pastebin.com/cJWEgWiC , http://pastebin.com/upMeGDce , http://pastebin.com/91VdTikb Mar 16 20:12:27 newbQ: ArrayList Mar 16 20:12:31 That's not the idea. Mar 16 20:12:59 I figured as much. I'm not sure what else to do Mar 16 20:13:12 ListView.setAdapter is what you want. Mar 16 20:13:19 Maybe "AbsListView". Mar 16 20:13:34 The ListView takes care of asking your adapter to create rows and stuff. Mar 16 20:13:52 newbQ: You've used ArrayAdapter before, right? Mar 16 20:14:01 It's the same principle here. Mar 16 20:14:08 In a very limited use, sort of Mar 16 20:14:22 hey Mar 16 20:14:28 ArrayAdapter is just a thin subclass of BaseAdapter. "MyBaseAdapter" is a metaphorical ArrayAdapter. Mar 16 20:14:35 I'm not sure how to use ListView Mar 16 20:14:47 are there no examples all over the net? Mar 16 20:15:04 none that I can make sense of Mar 16 20:15:23 Just say "whateverListView.setAdapter(myBaseAdapter);". Mar 16 20:15:49 ...none that you can make sense of... Mar 16 20:15:50 okay then Mar 16 20:15:59 I guess you don't actually understand the concept then Mar 16 20:16:30 https://www.youtube.com/watch?v=ka5Tk7J9rG0 it's pretty good but heavy accent Mar 16 20:16:41 ravilov: right. and none of the examples I can find have enough explanation for what each line actually does. Mar 16 20:17:04 newbQ, baseAdapter with ListView Mar 16 20:17:06 newbQ: I don't understand, because I could've sworn you've used ArrayAdapter before. Mar 16 20:17:18 Aren't you the guy who discovered that the XML onClick thing works even with Adapters? Mar 16 20:17:26 newbQ, I'm really tempted to say the problem is with you, sorry Mar 16 20:17:52 i think last night i was talking about not really having any settings in my app... somebody suggested the font size for posts but i cant remember what else.. Mar 16 20:18:09 what are some possible user configurable options in a app that views posts from a website? Mar 16 20:18:29 TacticalJoke: so what should whateverListView and myBaseAdapter look like? I am the noob of noobs. Mar 16 20:18:44 newbQ: Are you the onClick guy? Mar 16 20:18:46 ravilov: yes, I am the problem. nothing to be sorry about Mar 16 20:18:49 TacticalJoke: yes Mar 16 20:18:59 newbQ: Then you know how to use ListView and Adapters. :) Mar 16 20:19:00 desmin88, put in fake options that are really just links to G+ groups and such Mar 16 20:19:04 that seems to be popular Mar 16 20:19:12 saying that you are a noob does not exempt you from doing the research Mar 16 20:19:19 but I only barely understood it enough to make it work. Mar 16 20:19:24 newbQ: Just do the same as you did with ListView and ArrayAdapter. It's exactly the same concept. Mar 16 20:19:39 newbQ, this channel is not a place for hand-holding and basic tutoring Mar 16 20:19:59 official docs and countless examples are a much better place Mar 16 20:20:08 ravilov: I actually put that out in a separate nav item see here: http://gyazo.com/f71afec9f95f0a3123495ccc16b4952b Mar 16 20:20:48 I'm just having trouble trying to make it dynamic and I dont understand how to do that in this case Mar 16 20:21:46 ravilov: I'm not asking for hand holding. the docs and examples arent helpful when they dont give the depth of explanation I'm looking for. People do, and that's why I'm here Mar 16 20:21:49 find an example that does it; copy, paste, compile, run; dissect it; ...; PROFIT Mar 16 20:22:12 * android docs do not count Mar 16 20:22:18 newbQ: it sounds like you would benefit from a book on android development Mar 16 20:22:22 newbQ, and yet after all this talking with people you seem to still be clueless Mar 16 20:22:58 desmin88, too bad then :p Mar 16 20:24:06 yup lol. i think ill throw a rate app in there Mar 16 20:24:52 • /ignore -channels #android-dev * JOINS PARTS QUITS NICKS Mar 16 20:25:07 good job there :p Mar 16 20:30:07 I don't get how to retreive a result of an asynctask Mar 16 20:30:14 I think I got it. Now I just need to figure out how to set up MyBaseAdapter<> Mar 16 20:30:39 moviuro: Google "AsyncTask". Mar 16 20:31:08 it's asynchronous, so you can't just directly call it and return a result Mar 16 20:31:11 moviuro, https://github.com/codepath/android_guides/wiki/Creating-and-Executing-Async-Tasks Mar 16 20:31:14 you have to use callbacks Mar 16 20:31:16 moviuro, its in the documentation for it Mar 16 20:31:19 moviuro, http://developer.android.com/reference/android/os/AsyncTask.html Mar 16 20:31:30 LiENUS: well, I don't know where to look, then Mar 16 20:31:36 in the example, thay don't use the result Mar 16 20:31:41 *they Mar 16 20:32:06 ok, so try some things and come back if / when they don't work, telling us what you tried Mar 16 20:32:33 moviuro, yes they do and its even called result in the example Mar 16 20:32:46 their task returns a long so its called "Long result" Mar 16 20:33:59 iirc everything but doInBackground is executed in the ui thread Mar 16 20:34:19 yeah Mar 16 20:35:03 g00s did you ever end up using the snackbar library? Or does anyone have a fix for showing snackbars when the soft keyboard is visible? Mar 16 20:36:33 lasserix_ uh - i just use nispok, never show a snack when the KB is visible so i dunno Mar 16 20:42:29 would yall recommend using RxAndroid with RxJava, particularly the bind method? Mar 16 20:43:02 hey g00s Mar 16 20:43:11 hey Napalm whats up Mar 16 20:43:25 you got any weird errors from the Mar 16 20:43:30 latest build tools Mar 16 20:43:41 I just got this "note: removing attribute http://schemas.android.com/apk/res/android:textIsSelectable from " Mar 16 20:43:44 as an error Mar 16 20:43:48 very weird Mar 16 20:43:49 theblang: yes Mar 16 20:44:06 checked the docs.. its not deprecated.. but its a build error.. not a warning or lint Mar 16 20:44:25 ahhh Mar 16 20:44:28 i see the prob Mar 16 20:44:30 oopsy Mar 16 20:44:34 im stupid Mar 16 20:44:37 Napalm :) Mar 16 20:44:45 malformed xml? Mar 16 20:44:56 i'm using AS 1.2 its going OK, seems to be taking more memory than 1.1 Mar 16 20:45:00 na, different API level for attribute Mar 16 20:45:15 its synthesizing the correct resources Mar 16 20:45:19 its just a pain in the fucking ass Mar 16 20:45:23 ah. iiiinteresting Mar 16 20:45:27 this was never an issue before Mar 16 20:45:30 they are locking it down Mar 16 20:45:36 I do admit its not "correct" Mar 16 20:45:47 but attributes that the platform doesnt support are simply ignored Mar 16 20:46:12 but I think theres a potential for the same attribute id's to clash if the manufacturer adds their own to the system version Mar 16 20:52:16 hi, if I start an IntentService within an activity and I close that activity using finish(), will my IntentService close as well even if it is still running ? Mar 16 20:56:26 zalg: nope. services are independent of your UI. Mar 16 20:56:31 zalg nah internet service will keep on keeping on Mar 16 20:56:37 *intent Mar 16 20:56:43 kthx Mar 16 20:56:48 g00s ahh that's good idea just close keyboard Mar 16 20:56:59 ahh that's how i handled it the other app Mar 16 20:57:15 lasserix_: alternate approach: show the toast near the top of the screen Mar 16 20:57:56 groxx snackbar library does not ahve that functionality unfortunatly Mar 16 20:58:40 ah. yeah, snackbar UI kinda implies they should be near the bottom. is there a way you can base it off the position of some other view? e.g. "show at the bottom of this listview"? Mar 16 20:59:19 nah but i can i guess use resize and it'll push the snackbar up Mar 16 20:59:28 otherwise just close it and then open it again (the keyboard) Mar 16 21:00:40 can you sell Google IO ticket if you get drawn? Mar 16 21:01:39 hi people, i'd need a hand with json parsing, i cant get around it. basically what i have is a json of a 7 day forecast that i get from openweathermap api. i need to extract the max temperature for the day x Mar 16 21:02:40 gabmus: use retrofit use a pojo generator iterate over and find the max Mar 16 21:02:55 http://www.jsonschema2pojo.org/ Mar 16 21:02:56 what Mar 16 21:03:04 http://square.github.io/retrofit/ Mar 16 21:03:32 in fact... Mar 16 21:03:32 http://inaka.net/blog/2014/10/10/android-retrofit-rest-client/ Mar 16 21:04:00 uhm, its an exercise, im supposed to use jsonobject and jsonarray Mar 16 21:04:16 gabmus: What are you stuck on? Mar 16 21:04:30 i have this huge json on a string Mar 16 21:04:38 and i have no idea how to work with it Mar 16 21:04:41 Do you know what's really awesome in AS? Viewing multiple screen configurations so you can see how your layout will look. Mar 16 21:04:47 Do you know what works like crap in AS? http://uppix.com/f-screenshot_001550744d400188982.png Mar 16 21:05:33 MikeWallaceDev: lol Mar 16 21:05:34 gabmus json is either Object or Array you can tell because {} or [] Mar 16 21:05:46 dump your string in here: http://jsonformatter.curiousconcept.com/ Mar 16 21:05:52 gabmus: is that homework? Mar 16 21:05:52 then figure out how to set up your loops Mar 16 21:05:52 uhm, i have an object with arrays in it Mar 16 21:06:04 I'm not complaining though :) It's free :) Mar 16 21:06:10 lasserix_: already got it formatted Mar 16 21:06:19 then iterate over by like jsonArray.get(i) and get the jsonobject in it or get the values using get(KEY) Mar 16 21:06:21 Spoom: not really, im following a course in udacity Mar 16 21:06:30 so, yes :^P Mar 16 21:06:55 Spoom: I can skip it if i want, obviously i wont learn anything if i do Mar 16 21:06:57 MikeWallaceDev: hey you're shroting us! where's your developer credentials in that screenshot!?! Mar 16 21:07:13 lasserix_, huh?? Mar 16 21:07:28 shrotting? You're going to make me google that, aren't you? Mar 16 21:07:40 *shorting Mar 16 21:07:59 oh sorry you just had a *penache for uploading personal details to this channel Mar 16 21:08:09 oh! right, refering too... mmm, mistakes of the past ;) Mar 16 21:08:13 YES! Mar 16 21:08:14 *might be a made up word can't remember drank too much coffee this morning :) Mar 16 21:08:14 hahaha Mar 16 21:11:08 I don't get animation orchestration, every time I want to animate an element to make it fade out when pressed and fade in when pressed again for example, I have to take care of not triggering that action while the first animation is still running Mar 16 21:11:24 Hey guys, I'm new to Android development and could use some advice. I am creating an app which, upon startup, has the following (simplified) flow: if the user is already logged in, go straight to a map. If the user is not logged in, present a login screen or registration form. What's the idiomatic way to organize this in terms of Activities? Mar 16 21:11:29 like element.setEnabled(false) inside the onStartAnimation and enabled(true) at the onEndAnimation; it seems stupid Mar 16 21:11:45 ok, so if i create a JSONObject using the json string i have as constructor argument. in this object there is an array i guess called list. it looks like this: "list":[ {/*some data*/}, ...]. how do i get a JSONArray from this JSONObject? Mar 16 21:11:53 Odaym: view.getANimation != null cancel Mar 16 21:12:12 getAnimation returns any animation that's being done on that view? Mar 16 21:12:23 from ObjectAnimator? Mar 16 21:13:02 gabmus: if its in a JSONOBJect it has to have a key Mar 16 21:13:09 if its ina JSONarray it has to have an index Mar 16 21:13:18 Odaym: not sure Mar 16 21:13:25 im trying Mar 16 21:13:25 AndreasL: Probably the best way is to conditionally trigger the login screen from MainActivity.onCreate. Mar 16 21:13:34 what do you mean? is the key "list"? Mar 16 21:13:49 no Mar 16 21:14:17 { foo : "bar" number : 1 myNums : [ ... ] } Mar 16 21:14:49 all right, thats the format, but whats the key of the array? Mar 16 21:14:58 myNums is like my "list" Mar 16 21:15:04 TacticalJoke, yeah, I was thinking something like that. But would the login screen be an activity? Intuitively, it sounds like the login screen should be one activity and the map another. Would the main activity be the map, and then conditionally start the login activity if the user is not logged in? Mar 16 21:15:06 wait lemme give you the json Mar 16 21:15:18 It could be, yeah. Mar 16 21:15:26 http://pastebin.com/pkS027mc Mar 16 21:15:36 You could alternatively use a Fragment, but I'm not an enormous fan of Fragments (because they're slightly complex). Mar 16 21:16:08 no no Mar 16 21:16:09 Or even mess with Views, but that might end up more complicated too. Mar 16 21:16:11 i dont want your gson Mar 16 21:16:15 TacticalJoke you busy? Mar 16 21:16:20 lol? Mar 16 21:16:24 Need some help with some list methods Mar 16 21:16:29 its a forecast nothing weird Mar 16 21:16:36 Oh, I just discovered the android:noHistory property. I think that can be a viable solution. I.e. create a "dummy" activity with android:noHistory that conditionally launches the appropriate activity Mar 16 21:16:39 drose379: Semi. You might as well ask the whole channel. :) Mar 16 21:16:54 Ok, gonna make a pastie Mar 16 21:17:05 gabmus: all json either JSONObject or JSONArray if JSONObject every element has key-value if JSONObject every element has index. Mar 16 21:17:26 gabmus: think about that it and look at your formatted json until it makes sense how to go about picking what you need Mar 16 21:17:32 You guys see any reason why these items would not get removed from this the list here? http://pastie.org/10031491 Mar 16 21:17:36 AndreasL: I don't see how that helps, to be honest. Mar 16 21:18:53 TacticalJoke, oh, what problem do you foresee? Your insight would be appreciated! Mar 16 21:19:02 drose379: Couldn't you just use List.remove(int) there? Mar 16 21:19:13 Doesnt work Mar 16 21:19:15 drose379: the hashkey/equals is not working Mar 16 21:19:23 *or is not working as you'd like Mar 16 21:19:30 did you verify if contains comes back true for anything? Mar 16 21:19:39 Where lasserix_ Mar 16 21:19:50 AndreasL: I don't foresee a problem, really (I pruned that branch from my mental tree, honestly); it just doesn't sound like it helps over doing that stuff in MainActivity.onCreate. Mar 16 21:19:55 23 Mar 16 21:20:01 22 Mar 16 21:20:25 The .contains? Mar 16 21:20:30 yes yes Mar 16 21:20:33 drose379: "subjectFullList.remove(i);" doesn't work? Mar 16 21:20:36 if that never fires nothing is removed Mar 16 21:20:43 It does fire though Mar 16 21:20:46 I have it set up to fire Mar 16 21:20:50 Just for testing Mar 16 21:20:58 did you check with a debugger or something? Mar 16 21:21:01 TacticalJoke, ok, so in terms of the map and login screen... is the MainActivity the activity containing the map? Mar 16 21:21:07 Yeah. Mar 16 21:21:18 TacticalJoke, ah, you're right, I see what you're saying. Mar 16 21:21:26 Not with a debugger, in fact I havent learnd how to use the Log. function Mar 16 21:21:54 Which log function would I use for this Mar 16 21:22:17 AndreasL: You can startActivityForResult() that LoginActivity, if you want to. You can also allow the user to select "Log in" at any time in the UI. Mar 16 21:22:22 It's always the same flow. Mar 16 21:22:46 drose379: learn how to use debugger Mar 16 21:22:51 any log level you want Mar 16 21:23:07 And would they show up in the ADB logs tab of logcat? Mar 16 21:23:20 TacticalJoke, that function sounds really useful. Thanks! Mar 16 21:23:22 drose379: Am I missing something? How is "subjectFullList.remove(subjectFullList.get(i));" any different, semantically, from "subjectFullList.remove(i);"? Mar 16 21:23:55 its slower Mar 16 21:24:13 Yeah youre right, but thats not the problem Mar 16 21:24:32 If I unsubscribe from an observable in onPause, but have a SwipeRefresh going that doesn't stop until the operations are finished, should I just put a stop on it in the onPause as well? I feel like this is kind of sloppy Mar 16 21:25:01 So logs will show up in the ADB logs tab? Mar 16 21:25:16 theblang unless you override the unscribe to do it for you Mar 16 21:25:29 drose379: only time well tell! Mar 16 21:25:49 well I just did log.i and it didnt show in adb Mar 16 21:25:49 that getAnimation() on the element always returns null by the way Mar 16 21:25:58 lasserix_: So basically any UI cleanup stuff I need to run after operations are done, I need to just make sure are in my onPause along with my unsubscribe? Mar 16 21:25:59 But I did it in a spot that would definatley get caled Mar 16 21:26:52 theblang: it depends Mar 16 21:26:55 so, i thing i kinda figured it out, this is my code, but i get an error, can you check it out? http://pastebin.com/2unv1xV8 Mar 16 21:27:20 but if you go level deeper you can jump your subscriber into the view level, then in onAttach observe and onDetach unsuscribe Mar 16 21:28:30 gabmus is temp and max both jsonobjects or is one a jsonobject and the other a string? Mar 16 21:29:41 confirmed lasserix_ , the contains conditional is not fired...hmm Mar 16 21:29:46 lasserix_: cant tell really, it looks like this "temp":{ "max":22.22, "night":13.82, ...} Mar 16 21:30:03 max is a float or double Mar 16 21:30:10 temp is a jsob object because of the { } Mar 16 21:30:26 values with "" are strings without are either int or float depending on how you want them to cast Mar 16 21:30:32 not sure 1.1 may throw error if you do getInt Mar 16 21:30:43 unless you cast it explicitly Mar 16 21:30:51 so should System.out.println(arr.getJSONObject(0).getJSONObject("temp").getDouble("max")); work? Mar 16 21:30:55 but max is DEFINATLY NOT a jsonobject Mar 16 21:31:04 gabmus: only time will tell! Mar 16 21:31:20 it seems not to be working Mar 16 21:32:21 drose gabmus use the debugger! Mar 16 21:32:37 i have to try something.. Mar 16 21:33:00 gabmus: Mar 16 21:33:03 its not the same error tho Mar 16 21:33:10 no Mar 16 21:33:20 look at this project https://github.com/makovkastar/FloatingActionButton Mar 16 21:33:28 but im using some web ide to try it and it works horribly, im downloading eclipse Mar 16 21:33:31 just look at it! Mar 16 21:33:44 he has what I'm asking for, somewhere... You cannot scroll the list really quickly and cause the animation to fuck up. It only takes one command at a time Mar 16 21:33:56 his scroll detection is just like mine Mar 16 21:34:34 also has 2 separate functions that handle show and hide Mar 16 21:35:10 I know what to do Mar 16 21:35:16 fear not my friends Mar 16 21:35:53 http://hydra-media.cursecdn.com/dota2.gamepedia.com/7/70/Omni_ability_guard_07.mp3 Mar 16 21:36:33 here is another fab library https://github.com/ckurtm/FabButton Mar 16 21:36:41 oh Im not using his library Mar 16 21:36:58 Odaym: is an original Mar 16 21:37:11 lasserix_: is correct Mar 16 21:37:42 luckily, i haven't found a reason to add fab to my project yet :D Mar 16 21:38:02 more like fap button Mar 16 21:39:34 that was not well received Mar 16 21:39:46 not even a "heh" Mar 16 21:40:23 I'll admit I had a bit of chuckle Mar 16 21:40:24 I "heh"'d inside :p Mar 16 21:41:46 :D Mar 16 21:46:44 ok i setup a proper java ide and now i see the error i get, still i dont know what to do, mind to give it a look? http://pastebin.com/bTZyQGad Mar 16 21:47:36 what! Mar 16 21:48:46 put all of that jibberish in strings.xml and give it to the weatherJson String by calling getString(R.string.weatherjson) Mar 16 21:48:57 over there you will see why it wont parse as a valid String Mar 16 21:49:07 JSONArray arr= new JSONArray(obj.getJSONArray("list")); Mar 16 21:49:08 this is a plain java project for now Mar 16 21:49:16 gabmus: you can tell there is something wrong here right? Mar 16 21:49:21 from the error message? Mar 16 21:49:33 TacticalJoke, quick follow-up question if you don't mind. Would I completely create the user interface in my mainactivity before launching the login activity, or do I launch the login activity first and somehow postpone fully creating the main activity? Mar 16 21:49:48 the first object of the array is a JSONObject, but i dont see the problem really Mar 16 21:49:56 gabmus: JSONArray initial value should be a string or collection or array. Mar 16 21:50:03 you are new JSONArray(obj.getJSONArray("list")); Mar 16 21:50:15 well it doesn't want a jsonarray in its constructor Mar 16 21:50:28 you could maybe simplify this somehow? JSONArray arr= new JSONArray(obj.getJSONArray("list")); Mar 16 21:50:48 caugh cough caugh double instatiation cough cough necessary? cough Mar 16 21:52:24 if you didn't follow that what's the return type of getJSONArray? Mar 16 21:53:06 its a jsonobject Mar 16 21:53:12 no Mar 16 21:53:14 its a jsonarray Mar 16 21:53:49 why are you creating a new json array when getJSONArray returns a brand new json array already!? Mar 16 21:54:03 you like to litter or something? Mar 16 21:54:18 must be an american :) Mar 16 21:54:29 im italian :C Mar 16 21:54:57 know what? i dont really know what im doing. im experimenting trying to figure this out Mar 16 21:55:10 gabmus, new JSONArray() Mar 16 21:55:20 getJSONArray returns a new JSONArray Mar 16 21:55:51 wohoo i made it Mar 16 21:56:09 as you suggested i skipped the creation of the jsonarray Mar 16 21:56:21 did System.out.println(obj.getJSONArray("list").getJSONObject(1).getJSONObject("temp").getDouble("max")); and it worked! Mar 16 21:56:39 gabmus: http://developer.android.com/reference/org/json/JSONArray.html Mar 16 21:56:48 there is no constructor that takes a jsonArray Mar 16 21:57:14 yeah, just realized that Mar 16 21:57:24 then what if i want to create a jsonarray from that array? Mar 16 21:57:33 ugh it isn't working with a flag! Mar 16 21:57:59 I can always double scroll and get the animation to run twice! leading to the object being twice animated Mar 16 21:58:53 is there a swift like for android? Mar 16 21:59:00 you can swift android Mar 16 21:59:03 because i'm starting to set fire to the java/android studio process Mar 16 21:59:09 I bet its a time window of zero that's causing this, if I set the animation duration to something like 100 the flags will be able to get set before I get the chance to scroll again Mar 16 21:59:26 my phone is a huawei with a stock ROM error causing 20-line stack traces around twice per second to logcat Mar 16 21:59:27 Odaym: just use an external boolean? Mar 16 21:59:34 that's what Im doing Mar 16 21:59:39 where else would I get the flag Mar 16 21:59:43 and filtering by the package name doesn't show any of my logging Mar 16 21:59:55 and shit that should work just doesn't Mar 16 22:00:05 no idea why, no errors thrown, no crash, nothing verbose Mar 16 22:00:10 where you viewing the logs from boxmein Mar 16 22:00:26 android studio's 5mm x 2mm logcat box Mar 16 22:00:46 do you have your device selected? sometimes it stops showing logs Mar 16 22:00:54 I go to Monitor and see them, that thing never fails Mar 16 22:01:04 thats because its eclipse ! Mar 16 22:01:05 lol Mar 16 22:01:07 * g00s runs Mar 16 22:01:07 not eclipse Mar 16 22:01:12 intellij Mar 16 22:01:20 try Monitor Mar 16 22:01:25 woah, so happy i finally made it... thanks guys, you are great, expecially you lasserix_ thanks for your patience Mar 16 22:01:33 back to business now, bye! Mar 16 22:01:43 see you in 5 minutes!~ Mar 16 22:01:51 lol i hope not Mar 16 22:01:57 all I'm doing is a freaking HTTP request Mar 16 22:01:59 how hard can it be Mar 16 22:02:12 hard enough for you to get mad Mar 16 22:02:13 lel Mar 16 22:02:16 i made it halfway through the course without much effort, the rest is easy Mar 16 22:02:27 why can't ruby compile native to android Mar 16 22:02:36 boxmein: i made an http request pretty easily thanks to a code snippet, want to look at it? Mar 16 22:02:45 "http.request_get 'website', 'querystring' do |response| … end" Mar 16 22:02:47 you want to look at his code snippet bro? Mar 16 22:02:52 gabmus: sure, if you want to Mar 16 22:03:02 go to #ruby and ask that Mar 16 22:03:06 Im sure they have answers Mar 16 22:03:16 boxmein anyhow whatever language you use, its probably your adb stuff Mar 16 22:03:20 boxmein: wait a sec Mar 16 22:03:28 which amazingly in 2015, still sucks Mar 16 22:04:00 come IO 15, all will be solved! Mar 16 22:04:03 boxmein: http://pastebin.com/Axd9Z4WW Mar 16 22:04:11 is there a way to tell Retrofit to ignore 200 ? Mar 16 22:04:16 ie not throw an error Mar 16 22:04:26 going afk now Mar 16 22:04:33 Odaym do you know if samsung ever fixed that 'connectGatt must be on main thread thing" or do i still have to wrory about that ? Mar 16 22:04:47 * Mavrik hugs g00s for being an optimist. Mar 16 22:04:54 never took it out when I found out it was a bug Mar 16 22:04:54 hey Mavrik : Mar 16 22:04:57 left that company by the way Mar 16 22:05:02 Im somewhere else now Mar 16 22:05:07 o damn ! Mar 16 22:05:22 gabmus: http://hastebin.com/pijayiniwi.java what I use Mar 16 22:05:27 they gave me a $50 yearly raise Mar 16 22:05:32 cause they're a "startup" Mar 16 22:06:08 ok I fixed it, it was the animation duration issue Mar 16 22:06:21 if you set it to at least 100, the time will be larger for the flag to get set Mar 16 22:06:26 and no 2 animations will overlap Mar 16 22:06:39 that is exactly how he's doing it, the speed of the animation is the same Mar 16 22:06:43 noob Mar 16 22:10:03 does anyone know if there is an AccessibilityEvent that I use to determine when an app is no longer in the foreground ? Mar 16 22:10:27 Odaym: such a noob Mar 16 22:10:32 that's why you make 50 more an hour! Mar 16 22:10:39 YEA! Mar 16 22:10:40 I need some help with canvas Mar 16 22:10:42 haha Mar 16 22:10:52 now I get paid better though, thankfully, really good company and nice people Mar 16 22:10:56 they call me Senior there Mar 16 22:11:00 haha, joke's on them Mar 16 22:11:34 I have a gif like animation i need to run inside a button while progress i hapenning after button is clicked until the progress is done. What would anyone recomend best way to go about this is? Mar 16 22:11:39 I am attempt to use Rect as sky and ground, then I want to rotate the view Mar 16 22:11:59 the rect rotates but leaves a white background Mar 16 22:12:01 Was thinking easiest would be to make Framelayout with button + imageview with animation drawable Mar 16 22:12:07 the button also has custom states Mar 16 22:12:39 Viperz28: that is kind of indecipherable -- which way are you rotating? Mar 16 22:13:04 in your office chair? the moniter around an axis perpendicular to your third eye? which!?! Mar 16 22:13:14 canvas.rotate Mar 16 22:13:28 yea so you rotated the canvas Mar 16 22:13:33 very good. Mar 16 22:13:49 Rect as sky and ground? what does this mean? Mar 16 22:13:58 and how does rotating the canvas come into play? Mar 16 22:14:01 ok, lets try this again Mar 16 22:14:16 I am making a Flight simulator Mar 16 22:14:30 I created 2 rects one for sky and one from the ground Mar 16 22:14:52 canvas.drawRect( Mar 16 22:15:06 Odaym in your new assignment , are you doing any BLE at all ? Mar 16 22:15:16 I want to simulate rotation, I did this by calling canvas.rotate Mar 16 22:15:24 viper you can only rotate the canvas in x and y Mar 16 22:16:02 no it's just businessy apps Mar 16 22:16:08 https://usercontent.irccloud-cdn.com/file/R0rhhLCA/Screen+Shot+2015-03-16+at+2.58.30+PM.png Mar 16 22:16:11 ugh Mar 16 22:16:25 Odaym thats good, enterprise should pay more than comsumer facing Mar 16 22:16:33 and usually they are easy crud Mar 16 22:16:56 yea and the difficulty is lower Mar 16 22:17:10 is there a better way to paint Sky and ground and be able to rotate it (i.e. flight sim) Mar 16 22:17:12 Viperz28: you can rotate and wrap it in save / restore to pop Mar 16 22:17:29 ok, I will check into wrap Mar 16 22:17:34 no no Mar 16 22:17:58 canvas.save // do some stuff to canvas to translate it say, to draw a bird at 100, 100 canvas.restore Mar 16 22:18:52 I want the sky/ground to rotate Mar 16 22:18:59 oh Mar 16 22:19:03 you need to set the center Mar 16 22:19:24 rotate(someDegrees, view.getWidth()/2 , view getHeight() /2) Mar 16 22:19:38 otherwise you are rotating int he top left corner and hence your white Mar 16 22:19:45 Yes! Mar 16 22:19:54 ok, let me look into that Mar 16 22:20:08 thanks, I am a noob with this as you can tell Mar 16 22:22:29 shoot I was doing that already Mar 16 22:22:34 https://www.irccloud.com/pastebin/DZ0GQzZZ Mar 16 22:23:36 well, gn Mar 16 22:28:43 hello everyone, i am creating a streaming app for video. and users have requested a kids mod where only some streams are a avaliable, i have already build in a switch (boolean to switch it on / off. ) anyone have any sugestions on how to best impliment such feature ? i imagen making a area to use password to unlock/ lock the feature ? Mar 16 22:28:45 Google IO anyone? Mar 16 22:29:09 fanno, use a PIN Mar 16 22:29:13 create a pin activity Mar 16 22:29:32 fire that activity whenever there is content that needs “admin” access Mar 16 22:29:50 disable the back button in that activity Mar 16 22:30:32 maybe write some logic in when the app opens Mar 16 22:30:48 hi, i'm having a problem with including a layout file, for some reason it returns a "string types are not allowed (at 'id' with value '+@id/main_menu'_ Mar 16 22:31:22 Fissurez: should be @+id/main_menu Mar 16 22:31:24 it’s @+id/ Mar 16 22:31:53 ty for pointing ouit my bad error :L Mar 16 22:32:23 all good. I forgot a break in a switch/case and it took someone else to point it out. -.- Mar 16 22:32:42 tricknology: thanks i will look in to that =) have a good day everyone one bed time Mar 16 22:32:49 night night Mar 16 22:33:26 oh. Mar 16 22:33:33 sooo Mar 16 22:33:40 public void pauseButton(View view){ Mar 16 22:33:40 mGameThread.pause(); Mar 16 22:33:40 findViewById(R.id.pause_menu).setVisibility(view.VISIBLE); Mar 16 22:33:40 findViewById(R.id.activity_main).setVisibility(view.INVISIBLE); Mar 16 22:33:40 } Mar 16 22:33:47 oh god sorry Mar 16 22:33:47 pastebin, bro Mar 16 22:33:49 yes Mar 16 22:33:50 lol Mar 16 22:34:00 was hoping it'd do it in one line :L Mar 16 22:34:23 what’s wrong with your code? Mar 16 22:34:27 either way, any reason why the pausemenu will not display anything? Mar 16 22:34:45 uum Mar 16 22:34:54 Why are you setting R.id.activity_main invisible? Mar 16 22:35:01 lol Mar 16 22:35:08 And using "view" instead of "View". Mar 16 22:35:11 and use staic View.VISIBLE Mar 16 22:35:29 you could do view.findViewById() but that’s another story Mar 16 22:35:32 Yeah, I guess there is that parameter. Mar 16 22:35:50 :L Mar 16 22:35:52 probably the fact that you’re setting your layotu to invisible though Mar 16 22:35:55 Calling static methods on an object feels so weird. Mar 16 22:36:09 I feel it’s ok to get values liek that Mar 16 22:36:14 well the thing is that the pause menu does not show up Mar 16 22:36:18 I mean "accessing static members". Mar 16 22:36:25 so i thought maybe the activity main was being placed over it? Mar 16 22:37:01 are you inflating it? Mar 16 22:37:01 Fissurez: What is "R.id.activity_main"? Mar 16 22:37:15 it's the layout that is displayed by default Mar 16 22:37:17 that’s another thing.. shouldnt it be R.layout.activity_main? Mar 16 22:37:24 ooh Mar 16 22:37:28 it’s a viewgroup? Mar 16 22:37:37 uhhh Mar 16 22:37:42 http://stackoverflow.com/questions/7477991/change-from-one-layout-view-to-another-and-going-back Mar 16 22:37:56 the one talking about framelayout Mar 16 22:38:04 I didn’t see anywhere where you are setting the contentview Mar 16 22:38:09 can you post the whole code? Mar 16 22:38:13 (in pastebin) Mar 16 22:38:43 and you wouldnt be able to do that because it looks like your layout is actually a viewgroup, liek a LinearLayout or something Mar 16 22:38:53 need XML and code Mar 16 22:39:14 http://pastebin.com/bgqx26n8 Mar 16 22:39:17 there's the xml Mar 16 22:39:41 is the xml named activity_main? Mar 16 22:39:41 odd.. Mar 16 22:39:45 yes Mar 16 22:40:01 it seems it has qualms with the include bits of the xml file Mar 16 22:40:01 setContentView(R.layout.activity_main) Mar 16 22:40:39 You're hiding "activity_main", which hides "pause_menu" and everything. You probably want to hide "main_menu" instead, or something. Mar 16 22:40:44 i think that's already done since the game on activity main is being displayed fine :L Mar 16 22:41:13 "activity_main" is a misnomer: that's not an Activity -- it's a ViewGroup. Mar 16 22:41:23 ^ Mar 16 22:41:46 yeah, this is for a bit of my course and we were given a basic framework, so that's how it was named originally :L Mar 16 22:41:55 kek Mar 16 22:41:59 ikr Mar 16 22:42:35 it could cause confusion Mar 16 22:42:45 having a viewgroup and a layotu named the same Mar 16 22:42:49 i wonder if part of my problem is the fact it says "xml tag has an empty body" for the bit where i include it Mar 16 22:43:08 (lines 8-17) Mar 16 22:43:09 your code wouldnt compile and run Mar 16 22:43:21 i mean it is :L Mar 16 22:43:21 use elf closing tags Mar 16 22:43:28 “/>” Mar 16 22:43:51 Mar 16 22:44:00 *self closing Mar 16 22:44:04 that seems to have done something Mar 16 22:44:21 your layout should also have the header Mar 16 22:44:38 :L Mar 16 22:44:52 pause menu is still not showing up Mar 16 22:44:53 all your xmls actually Mar 16 22:45:02 got your actual source code? Mar 16 22:45:02 just that one didnt for some reason Mar 16 22:45:07 Fissurez: Srsly? Mar 16 22:45:14 You're hiding the entire ViewGroup. Mar 16 22:45:21 and its contents Mar 16 22:45:25 including the pause menu Mar 16 22:45:39 make everything else invisible Mar 16 22:45:44 nah i got rid of that once i realised it was wrong :L Mar 16 22:45:57 it's only findViewById(R.id.pause_menu).setVisibility(View.VISIBLE); now Mar 16 22:45:59 If a library tries to load a bitmap and fails, should it catch the OutOfMemory exception and fail quietly, or bubble the exception? Mar 16 22:46:47 are you askign abotu what you should do when that happens or what Android does? Mar 16 22:47:06 quinnjn Mar 16 22:47:21 fissurez, can you please post the entire code? your problem could be elsewhere Mar 16 22:47:49 uh, sure Mar 16 22:48:03 just that class you mean? there's quite a lot of shit Mar 16 22:48:04 "Failing quietly" doesn't sound very useful. Users might want to know when an OutOfMemoryError happens (whereupon they could try loading a scaled-down bitmap, perhaps). Mar 16 22:48:30 yeah the class Mar 16 22:48:48 Or at least notify the user that the bitmap couldn't be loaded. Mar 16 22:49:11 http://pastebin.com/EfEsRA7T Mar 16 22:49:12 s/Users/API users/ Mar 16 22:51:43 do this... Mar 16 22:51:50 set the pause menu to visible in your xml Mar 16 22:51:54 see if it shows up Mar 16 22:52:18 android:visibility=“visible” Mar 16 22:52:34 I'm not sure what Fissurez is expecting. All those FrameLayout children are set to full size (fill_parent x fill_parent {which should be "match_parent"}). Mar 16 22:53:09 tricknology nope :L Mar 16 22:53:26 and TacticalJoke i guess stackoverflow isn't the best place to get spot on info :L Mar 16 22:53:37 g00s: published an app on windows store app Mar 16 22:53:47 tricknology if i do setoncontentview Mar 16 22:53:50 gdrc oh! ? how did it go ? Mar 16 22:53:54 it makes the pause menu appear Mar 16 22:53:59 StackOverflow-driven development isn't always the best method. Mar 16 22:54:03 but then i have a problem getting rid of it... Mar 16 22:54:04 oh. Mar 16 22:54:06 lol :L Mar 16 22:54:30 set the content to something else Mar 16 22:54:41 or make it View.GONE Mar 16 22:54:59 g00s: perfectly. they tested in 30 min. it's already in the store. uploaded 1 hour ago. they also have a customer chat where you can chat with ms engineers that help you developing Mar 16 22:55:02 where are you doing this btw? Mar 16 22:55:03 i'll try that Mar 16 22:55:10 what do you mean Mar 16 22:55:22 where are you setting the content view? Mar 16 22:55:45 inside the pause button function Mar 16 22:55:52 ok perfect. Mar 16 22:55:57 bad? Mar 16 22:55:59 gdrc wow, that sounds nice ! from your experience, if you had to develop the same thing on windows phone / android - you you were eqully profficient at both, which requires less effort ? Mar 16 22:56:06 on resume button set ti to somethign else Mar 16 22:56:45 it screws it up :L Mar 16 22:56:57 the game no longer appears Mar 16 22:57:10 g00s: of course windows. great enviroment, great ide, great support. android benefits are large number of developers and libs. Mar 16 22:57:43 * g00s getting itchy Mar 16 22:58:19 Fizzurez hmm. is your game thread resumed? Mar 16 22:59:03 maybe try to setContentView(R.layout.activity_main); Mar 16 22:59:34 that's what i tried ;_; Mar 16 22:59:50 i get a black screen and nothing happens :< Mar 16 23:00:48 View.inflate(this, R.layout.some_view, null) Mar 16 23:01:10 err actually Mar 16 23:01:11 see this Mar 16 23:01:12 http://stackoverflow.com/questions/8880787/change-view-content-in-activity-dynamically Mar 16 23:01:55 ah Mar 16 23:02:07 so i just add everything to that rather than include it in the activity main layout? Mar 16 23:02:46 to what? Mar 16 23:02:49 the viewgroup? Mar 16 23:02:51 yes Mar 16 23:02:53 Anyone know how to recreate the info under the image in this app ? http://cdn.arstechnica.net/wp-content/uploads/2014/07/contacts2-2.png Mar 16 23:03:19 well your ViewGroup will be a FrameLayout Mar 16 23:03:41 Is this a recyclerView or what ? Mar 16 23:04:24 nightwalker, what part? Mar 16 23:04:27 I need to implement a button/progress hybrid view: when clicked, a frame animation plays in the center of the button until the task is done. Anyone have any idea of how to tackle this? Mar 16 23:04:36 can any of you nice people tell me what a staggered grid view is and how it differs from a gridview Mar 16 23:04:41 in the recyclerview context? Mar 16 23:04:54 tricknology, the phone number, email, etc. Mar 16 23:05:00 Everything under the image on the left. Mar 16 23:05:01 it's a grid view that's drank one too many Mar 16 23:05:30 (no clue.. sorry :p) Mar 16 23:05:38 its a listview Mar 16 23:05:39 meh noworries Mar 16 23:05:44 It’s a ListView looks like Mar 16 23:05:48 ah, oh? Mar 16 23:05:48 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.1.2_r1/com/android/contacts/list/ContactTileListFragment.java#ContactTileListFragment.Listener Mar 16 23:06:02 heavily modified with their own adapter Mar 16 23:06:04 so basically a staggered gridview is only supposed to have one column? Mar 16 23:06:07 i'm so confused :L Mar 16 23:06:15 Ok, so i need a listView. Mar 16 23:06:21 and your own adapter Mar 16 23:06:23 to place the elements Mar 16 23:06:27 One more. Mar 16 23:06:45 ContactTileListFragment i think is the name of the class Mar 16 23:07:02 find that and take a look around at the code Mar 16 23:07:23 If i create a layout that has an imageView and two textViews inside a Relative Layout, can i somehow use it multiple times just change the title,content and image ? Mar 16 23:07:28 https://code.google.com/p/ics-custom-contacts/source/browse/src/com/android/contacts/list/ContactTileListFragment.java?r=2402fe840bd0f3e6a07f9f654f9c30f28c2b2a1b Mar 16 23:07:30 But not copy/paste in xml. Mar 16 23:07:42 yeah Mar 16 23:07:50 look into custom list adapters Mar 16 23:08:03 You basically have one XML for either different type of row you want Mar 16 23:08:10 Ok, thanks a lot for your help tricknology. Mar 16 23:08:19 no problemo Mar 16 23:09:11 Fizzurez, that code is just makign a parent ViewGroup to inflate your layout into Mar 16 23:09:48 final ViewGroup viewGroup = (ViewGroup) findViewById(R.id.activity_content); Mar 16 23:09:48 viewGroup.addView(View.inflate(this, R.layout.some_view, null)); Mar 16 23:10:08 I am making an app that has a student id, schedule and dates of exams, so i need to display the basic student info. I don't really need that listView to do, just display the text and images. :D Mar 16 23:10:09 You could do that in your resume button Mar 16 23:10:50 the problem with the viewgroup is that it seems in the framwork i got given Mar 16 23:11:06 wait. Mar 16 23:11:37 yeah it seems he's made his own class gameview, is that a problem? Mar 16 23:11:52 i feel if i turn it into a viewgroup i'll break everything Mar 16 23:12:12 no you’re butting the GameView into the ViewGroup Mar 16 23:12:16 a wrapper, if you will Mar 16 23:12:24 ah ok Mar 16 23:12:43 so i'll just need to go back and change everything that accesses it to work with the viewgroup? Mar 16 23:12:59 but your ViewGroup will be your FrameLayout, I believe Mar 16 23:14:07 :| Mar 16 23:14:16 haha lets start over Mar 16 23:14:45 ok Mar 16 23:15:05 You hit the pause menu and it comes up, hnow you want to get rid of it when you hit resume? Mar 16 23:15:11 yes Mar 16 23:15:31 pauseMenu.setVisibility(View.GONE) Mar 16 23:15:57 yeah, and when i try that i get a blank screen Mar 16 23:16:10 then there is no layout inflated Mar 16 23:16:17 was there any inflated before? Mar 16 23:16:23 I.E. when you open the activity Mar 16 23:16:35 or does it open to the pause menu? Mar 16 23:16:44 ok Mar 16 23:16:48 when i run just Mar 16 23:16:49 findViewById(R.id.pause_menu).setVisibility(View.VISIBLE); Mar 16 23:16:59 in the pausebutton function Mar 16 23:17:03 it does not show up at all Mar 16 23:17:06 yeah but before you hit the pause button Mar 16 23:17:15 is there anything visible? Mar 16 23:17:24 yes, there is the game Mar 16 23:17:29 which is a simple breakout game Mar 16 23:18:13 ok so you hit the pause button and your pause menu becomes visible? Mar 16 23:18:28 no Mar 16 23:19:00 to make the pause menu visible i have to setcontentview Mar 16 23:19:19 for some reason just making it visible does not bring it up Mar 16 23:19:26 you’re setting the content view to what? the pause menu? Mar 16 23:19:29 yes Mar 16 23:19:33 that’s why Mar 16 23:19:38 it’s getting rid of the old content view Mar 16 23:19:40 yeah Mar 16 23:19:44 which was activity_main Mar 16 23:19:46 yeah Mar 16 23:19:49 which should have your pause menu in it already... Mar 16 23:19:58 for you to just make invisible and now Mar 16 23:20:01 yes, because i included it Mar 16 23:20:11 so i'm not sure why it isn't showing up Mar 16 23:20:15 can you post XML of the pause menu? Mar 16 23:20:18 sure Mar 16 23:20:30 jsut want to check that it’s not invisible.. prob isnt// Mar 16 23:20:47 http://pastebin.com/N70cpjkc Mar 16 23:20:49 your fill_parent is deprecated, hsould be match_parent Mar 16 23:20:51 that's activity main Mar 16 23:20:56 ok, ty Mar 16 23:21:13 http://pastebin.com/buZXMSaq Mar 16 23:21:17 that's pause menu Mar 16 23:22:58 when something is made visible, does that bring it to the front? Mar 16 23:23:07 view.bringToFront() Mar 16 23:24:03 how do i use that? Mar 16 23:24:08 try to set your content view to activity_main in the resume Mar 16 23:24:14 I think that might do some unexpected thigns though Mar 16 23:24:21 i tried that Mar 16 23:24:23 you get an instance of wahtever view you want Mar 16 23:24:31 it made problems Mar 16 23:24:33 and broke it Mar 16 23:24:40 nullPointer? Mar 16 23:24:43 nah Mar 16 23:24:48 just made the program stop Mar 16 23:24:55 and only showed the basic xml stuff Mar 16 23:24:55 what was the error in logcat? Mar 16 23:25:04 i'll have to recheck Mar 16 23:25:16 basically I think the approach to setting your contentview to pause menu is wrong Mar 16 23:25:21 i agree Mar 16 23:25:24 especially if you want to resume your view at some point Mar 16 23:25:33 i think making it visible and then bringing it to front might work Mar 16 23:25:33 it should be invisible Mar 16 23:25:35 Is there a way to scroll a scrollview in editor? Mar 16 23:25:36 or just use a fragment Mar 16 23:25:45 how do i set it to front? Mar 16 23:25:47 That will probabyl be the best way Mar 16 23:26:00 nvm i'm stupid :l Mar 16 23:26:00 you get an instance of the viewgroup Mar 16 23:26:26 holy crap it worked :L Mar 16 23:26:33 ty, we got there eventually Mar 16 23:26:34 so like.. findViewById(R.id.activity_main).bringToFront() Mar 16 23:26:37 yes Mar 16 23:26:40 ah excellent Mar 16 23:26:42 it was being done behind it :L Mar 16 23:26:51 you probably had some other view on top of it Mar 16 23:26:57 yeah, the main view XD Mar 16 23:27:02 main menu Mar 16 23:27:03 lol Mar 16 23:27:07 not main menu Mar 16 23:27:12 activity main ^^ Mar 16 23:27:18 main menu is going to be interesting Mar 16 23:27:50 but activity_main is the parent, it has children Mar 16 23:28:00 its children are what you’re making visible and invisible Mar 16 23:28:25 meh, glad you got it though Mar 16 23:28:35 yeah Mar 16 23:28:52 i think i didn't really put my problem accross well enough Mar 16 23:29:04 happens Mar 16 23:29:10 glad we started fresh haha Mar 16 23:29:31 yeah, i was getting really confused and about to ragequit :l Mar 16 23:31:05 sometimes a walk helps Mar 16 23:31:11 yup Mar 16 23:31:21 now to implement multiplayer i think Mar 16 23:31:22 A lot of people create an elaborate structure, don't test any part of it, and then hope it all works. But that almost always fails. Mar 16 23:31:22 I’ve been spending all day on this bug. I’m about to ragequit Mar 16 23:31:32 The only sane method is to make one tiny change, check that it works, make another tiny change, etc. Mar 16 23:31:33 I can’t reproduce it and only 1 client has this issue Mar 16 23:31:37 of tens of thousands Mar 16 23:31:41 >> Mar 16 23:31:43 Every time a tiny change doesn't work, you'll know exactly why. Mar 16 23:31:45 sounds horrible Mar 16 23:32:10 TactivalJoke, then commit the change Mar 16 23:32:11 lol Mar 16 23:32:18 to Git.. Mar 16 23:32:33 It’s pretty bad man. I’ve been looking at this all day trying to figure out where it could come from Mar 16 23:32:38 You could just amend a changeset each time a small change works. Mar 16 23:32:50 Amend and then any future changes are diffable, revertable, etc. Mar 16 23:32:54 but even if I changed something, since I can’t reproduce it, I can’t test to see if that fixed it.. Mar 16 23:33:29 Actually, I think that'd be "revertible". Mar 16 23:33:40 :P Mar 16 23:33:52 I once forgot to add some things to the index Mar 16 23:33:55 bye bye changes Mar 16 23:34:04 thank god for Time Machine Mar 16 23:34:29 Doh. Not sure how I feel about the Git index, since I haven't used Git seriously in a long time. Mar 16 23:34:36 I know that some people love it and some people hate it. Mar 16 23:59:09 Hello all. I am needing to make a hybrid button/progress bar where the progress is a series of frames (png) and the buttons have well defined custom selector states. Anyone can recomend a way to tackle this? For instance, custom view and draw everything? custom framelayout use button + imagview? Mar 17 00:01:20 laziness tends to drive me to use framelayout Mar 17 00:04:25 why use framelayout when you can use absolutelayout ! Mar 17 00:05:16 it's absolutely the best! Mar 17 00:05:34 its absolutely FABulous Mar 17 00:06:49 I can say I’ve never used AL Mar 17 00:07:05 why not Canvas? Mar 17 00:11:46 What's Absolute Layout ? Mar 17 00:17:44 Should i use Mar 17 00:17:50 ListView or RecyclerView ? Mar 17 00:18:39 nightwalkerkg is your source a database cursor ? Mar 17 00:18:56 Nope Mar 17 00:19:03 multiple selection ? Mar 17 00:19:10 Nope. Mar 17 00:19:17 doesn't matter then Mar 17 00:19:34 you can have more "fun" with RV & animations Mar 17 00:20:00 also more boilerplate! Mar 17 00:20:03 g00s, i am trying to replicate the image on the left : http://cdn.arstechnica.net/wp-content/uploads/2014/07/contacts2-2.png Mar 17 00:20:14 I have the flexible image space. Mar 17 00:20:29 But i am not sure how to display the phone, email, etc. And i am stuck. xD Mar 17 00:20:35 Brain won't work today. Mar 17 00:20:53 hey jareddlc quick question; have you every connected to multiple BLE devices at the same time? i'm finding that every once in a while, they all disconnect at the same time, or one causes the other to disconnect withing 1/2 sec or so Mar 17 00:21:11 *others Mar 17 00:21:20 programming, or just in general? Mar 17 00:21:25 android Mar 17 00:21:45 so i have a smart watch thats BLE Mar 17 00:21:58 my car stereos isnt BLE, but when one disconnects, they all do Mar 17 00:22:01 oh but werent yo using those HM10s ? Mar 17 00:22:02 which is very annoying Mar 17 00:22:14 not in programming, this is just using my phone Mar 17 00:22:20 hm ok Mar 17 00:22:24 g00s: if you're on an N4, I've found that NFC interferes with bluetooth, if that counts Mar 17 00:22:26 in programming i havent tried connecting to multiple devices Mar 17 00:22:43 groxx i heave heard wifi and BT interfere too :*( Mar 17 00:23:48 HM10... pokemon has 10 HMs? Mar 17 00:24:20 here is the problem: when the user manually connects to a device, its not realistic they can do each so quickly that multiple opens() interfere really. but when they all disconnect, their connection retry logic kicks in and they barge in on each other - so i have to make some kind of coordination Mar 17 00:24:47 its neverending ! Mar 17 00:25:48 JakeWharton (and anyone else interested), what do you think of Poynt? https://getpoynt.com/ Mar 17 00:26:04 g00s: re the N4: if I had NFC enabled, nothing would stay connected for more than a couple minutes, guaranteed. disable NFC, no other changes, stuff stays connected for hours with no problem. perfectly reproducible. I haven't had any wifi/BT interactions though. Mar 17 00:26:32 Regexes are so disappointing. Mar 17 00:26:33 groxx thanks for the info Mar 17 00:26:44 They could be awesome, but they ultimately fail. Mar 17 00:27:02 Then again, it would be hard to support things like nesting, variables, etc. Mar 17 00:27:18 that, or they're just more awesome than us mere mortals Mar 17 00:27:52 TacticalJoke: have you seen this btw? http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/ Mar 17 00:27:54 That's true. Maybe I'm not awesome enough to appreciate them. Mar 17 00:30:58 Nice, groxx. Hadn't seen that before. Mar 17 00:32:53 pretty regal Mar 17 00:34:37 regal enough for a monocle? Mar 17 00:37:55 a regular expression for prime numbers? Mar 17 00:37:56 lolwut Mar 17 00:39:42 * kuldeepdhaka abused his phone GPU. plotted 3million points on GPU before crash :p (MotoG) Mar 17 00:43:50 groxx, nice link. Mar 17 00:49:35 would you use in a job application word "android app" or "android application" Mar 17 00:50:16 "android programmer", personally, because I haven't found android apps to be particularly good employees. Mar 17 00:50:56 lol Mar 17 00:51:56 I say ¯\_(ツ)_/¯ because they're both common enough. "app" might be a bit more colloquial / less Enterprise™, for good or bad. Mar 17 00:52:02 "Application" sounds better to me. Though I know that 'app' is all the rage today. Mar 17 00:52:31 App has a certain connotation. i doubt any Applications exist for android Mar 17 00:52:37 App = plaything Mar 17 00:53:13 hence "flAPPy bird" Mar 17 00:53:47 yeah, better than flappication bird :) Mar 17 00:54:04 You could go to town and say "applications software". Mar 17 00:54:15 "mobile applications software program" Mar 17 00:54:20 Hmm, I guess it's "application software". Mar 17 00:54:25 Just googled. Mar 17 00:54:38 TacticalJoke sounds like some government report Mar 17 00:54:40 well, you could argue that "applications software" is a CRM then Mar 17 00:54:41 :D Mar 17 00:54:47 which is suitably Enterprise™ Mar 17 01:01:21 If you want to sound posh, talk about your portfolio of application software. Mar 17 01:02:52 TacticalJoke: and don't forget to wear a monocle https://www.kickstarter.com/projects/weiner/the-gentlemans-single-use-monocle Mar 17 01:05:23 ugh IAPs are such a pain Mar 17 01:10:51 I'm trying to make a fragment which lists all the available skus for my app, and I can't seem to update my adapter async when the inventory query finishes Mar 17 01:10:56 any pointers? Mar 17 01:44:07 o/ Mar 17 01:45:35 might be a stupid question, but who has experience with IAP? I'm having some problems :( Mar 17 02:06:31 Got a question guys Mar 17 02:06:36 I have a json array that looks like Mar 17 02:06:49 ["col_name":"value"] Mar 17 02:06:49 hey, since I have moved from eclipse to Android Studio my manifest file are being merged and additional permissions are being required when installing the app on a device. How can I stop this behaviour from happening or allow me to find out which library is trying to add stupid permissions and disable / override them? Mar 17 02:07:05 Is there a method I can use to just get the "value" from that json array? Mar 17 02:09:12 drose379: That's not valid JSON. It'd have to be something like this: [{"name": "value"}] Mar 17 02:09:23 Yeah thats what I meant, sorry Mar 17 02:09:31 Is there a way I can just grab the value? Mar 17 02:09:41 Im using JSONArray Mar 17 02:10:08 You'd have to get the object from the array, and then get the value from the name. Mar 17 02:10:23 so .get(i) Mar 17 02:10:26 Oh wait no Mar 17 02:10:27 Ok Mar 17 02:10:32 Hmm one se Mar 17 02:10:33 sec Mar 17 02:11:47 TacticalJoke Mar 17 02:11:48 http://pastie.org/10031980 Mar 17 02:11:57 All I have for get on the object is getClass() ? Mar 17 02:12:41 I guess you want getJSONObject. Mar 17 02:13:01 Instead of just get? Mar 17 02:13:04 Those capitals are awful, on a side note. Mar 17 02:13:04 Yeah. Mar 17 02:13:12 (Should be "getJsonObject".) Mar 17 02:13:29 Hmm, ok lemme give it a shot Mar 17 02:13:32 Thank you! Mar 17 02:15:51 Works like a charm TacticalJoke , thanks again! Mar 17 02:16:40 No worries. Be wary of dealing with Object. It's pretty rare that you need to. Mar 17 02:16:54 yeah, this was a weird case Mar 17 02:17:11 Well, they seem pretty useful actually Mar 17 02:17:24 For grabbing specific values at a certain place in an array Mar 17 02:18:07 I mean java.lang.Object. It's the supertype of every reference type, and it's fairly rare to have to deal with it directly. Mar 17 02:18:23 Does JSONObject sub class it? Mar 17 02:18:26 Yeah. Mar 17 02:18:35 Got it, thanks Mar 17 02:18:39 Talk to you soon Mar 17 02:18:52 Hey, email me when you get the APK ready! Mar 17 02:18:56 I guess I should say "supertype of every class". Mar 17 02:19:03 Okay. lol Mar 17 02:19:12 Later. Mar 17 02:20:33 anyone have a good way to let user pick an interval in time - my case 2 seconds to 1 day. i have this, but kinda hate it http://i.imgur.com/RSKcGLF.png Mar 17 02:22:42 all hail holo Mar 17 02:24:03 Hmm, all I can think of is picking a number (e.g., "2") and then picking a unit of time in the plural (e.g., "minutes"). I'm not sure how well that works out on Android, though. Mar 17 02:24:40 yeah, like a numberpicker + radio group for units Mar 17 02:25:01 Yeah. Mar 17 02:25:18 I guess it gets awkward with 1-60 versus 1-24, etc. Mar 17 02:30:35 I guess you could keep those current numbers and group them by time unit. So if the user picks "minutes" then they can choose between "1", "2", "5", etc. Mar 17 02:30:45 Thereby avoiding issues with 1-24 and so on. Mar 17 02:32:13 could do that too Mar 17 02:33:45 One more question TacticalJoke **** ENDING LOGGING AT Tue Mar 17 02:59:58 2015