**** BEGIN LOGGING AT Mon Dec 07 02:59:58 2015 Dec 07 03:05:58 Weird issue with CheckBoxes, isChecked() is coming up TRUE even when its not Dec 07 03:07:44 Seems like something that shouldn't happen: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/widget/CompoundButton.java#132 Dec 07 03:08:56 Thanks TacticalJoke Dec 07 03:31:45 hi Dec 07 03:32:06 I have a problem with an app where I instantiate a class in @onCreate of my single activity Dec 07 03:32:29 I get all log messages twice, and when I print "this" inside the class I get *two different instances* Dec 07 03:32:47 although I only create one in a single point in the app in @onCreate Dec 07 03:33:13 is this some sort of weird android studio bug that results in the app main activity being launched twice at the same time?? Dec 07 03:34:22 MrJones: Your description sounds a bit odd. What does instantiating some class have to do with log messages appearing twice? Dec 07 03:35:08 http://stackoverflow.com/questions/3588682/is-it-normal-for-the-activity-oncreate-method-to-be-called-multiple-times well that sucks, seems to be an android bug when using threads and runnables - I use both. Dec 07 03:35:37 TacticalJoke: obviously I get the log messages twice when the class prints something, that is how I finally figured out that @onCreate runs through twice at the app start and I have two instances running of everything Dec 07 03:36:19 It's not normal for onCreate to be called twice. Dec 07 03:36:32 read the stackoverflow link Dec 07 03:36:37 sadly I don't seem to be the only one.. Dec 07 03:36:59 second-to-top response matches what I am seeing Dec 07 03:37:02 You shouldn't assume a StackOverflow answer is accurate. Dec 07 03:37:18 alright, got a helpful idea then? Dec 07 03:37:26 breakpoint, debug Dec 07 03:37:29 because I recently added a runnable Dec 07 03:37:43 and pretty much since then I see this going on with onCreate called twice Dec 07 03:37:50 You're probably doing something wrong. Dec 07 03:38:16 Activities don't just randomly have their onCreates firing twice, regardless of what people on StackOverflow say. Dec 07 03:38:31 MrJones: You should log onDestroy() to, it's very likely that log lines in onCreate() will be paired with ones from onDestroy(). I would be very surprised if this was not the case Dec 07 03:46:36 Im thinking of, when you long click on a tile in the second screen here, it brings up a dialog with your currently selected options: https://vid.me/UIFO Dec 07 03:46:48 Would that be user friendly? I would need a way to make sure the user knows its there Dec 07 03:50:05 CedricBeust: true, it does always seem to create, destroy, create Dec 07 03:50:58 I had stuff only in explicit back button exit code, not in onDestroy, so some things that weren't supposed to were still around.. (: Dec 07 03:56:46 MrJones: That's how we designed it, happy to hear it works :) Dec 07 03:57:26 is there a reason web audio in the webview appears to sometimes drop the audio device and never reopen it when the web page doesn't play audible sound for a while? Dec 07 03:57:47 I implemented my own audio api for now and injected it via javascript, but purely because web audio doesn't really work reliably Dec 07 03:57:58 What's the best way to "smudge" location data in Android? For user security, we want to change our location functionality to nearby area, rather than sending the specific latitude/longitude. Anyone know of a good library or method of doing this? Dec 07 03:58:00 (it works in standalone firefox mobile and standaline lighting (webkit-based) Dec 07 04:26:39 liuwenhao, just round the location data a few decimal points Dec 07 04:28:59 Not a bad idea pfn. I was looking into geofencing but that seems more convoluted of a solution than we really need Dec 07 04:30:03 MrJones: I have the same problem with a WebView in one of my apps... if you figure out why it's broken let me know :) Dec 07 04:31:17 I just switched my one WebView screen to open a browser rather than an embedded Webview because the HTML/javascript works fine in Chrome and everything else Dec 07 04:31:19 but cuts out in WebView Dec 07 04:33:33 hello Dec 07 04:39:21 is there an algorithm that rates an app based on current vs total intalls Dec 07 04:39:45 let me back up a bit, an algorithm that google uses for the searching Dec 07 04:42:44 is there a place where i can see each attribute i can use in a theme for a tablayout? i am trying to set the background but looks like it also sets the tab label background so when i highlight the tab it looks bad just the tab highlighted but not the label Dec 07 04:43:58 One3yed google doesn't publish how its search ranks apps ;) Dec 07 04:45:04 liuwenhao, you can give it some random offset after rounding if you don't want people to clump into location buckets Dec 07 04:46:01 pfn: That's a really smart idea. Thank you Dec 07 04:47:28 What's the best way to update a listView adapter when data has changed from somewhere else? My scenario ActivityA with 2 tabs (fragments), I'm on tab 1, when I get a eventbus event that data has changed. I now go to tab 2, if I update the adapter, I get jank Dec 07 04:49:52 eghdk_ thats bad UI Dec 07 04:50:11 when using tabs, changes in one tab should not impact content in other tabs, generally Dec 07 04:51:37 g00s: It's not a change in tabs. I just happen to be on the second tab, and I get a GCM Push. The push downloads a news article, and adds it to my internal db cache. When I return to that first tab, I want my cache to be reloaded (only if it changed though), don't want to reload unnecessarily Dec 07 05:10:39 I dont know where to start. how to implement chat heads (like in fb messenger) like thing in my app? Dec 07 05:12:43 c0ded: I think the alert you're looking for is SYSTEM_ALERT_WINDOW Dec 07 05:15:53 CedricBeust: i think thats a good start Dec 07 05:17:41 Be aware it's a permission that intimidates savvy users Dec 07 05:34:45 quiet Dec 07 05:35:29 hey alex_PP :D Dec 07 05:35:38 What's with the warm-temperature trend on Nexus-y devices? I hate when pure white looks yellow. :/ Dec 07 05:35:39 oi oi Dec 07 05:35:43 I'd pick blue over yellow any day. Dec 07 05:36:47 maybe display calibrated warm = more color contrast Dec 07 05:37:20 Hmm, my Moto E2 is really warm, and the contrast looks bad to me (compared to my old Sonys which had cool screens). Dec 07 05:37:56 I have tried to get used to this for weeks, and every time I use my old Sony it's like a breath of fresh air -- finally, white looks white. Dec 07 05:38:01 My GS5 had a very yellowish tint for a few weeks after I bought it for some reason. I don't know if it was a defect with the screen or with the software but it mellowed out over time and the colors look fine now Dec 07 05:40:37 You could always root and use a screen calibration tool, but ymmv Dec 07 05:41:27 Hmm, doesn't rooting void the warranty and put us at greater risk of malware? Dec 07 05:43:17 Speaking of malware, Samsung still hasn't pushed an update to fix Stagefright :) What a great company Dec 07 05:43:38 For GS5 at least. They probably patched GS6 to scare people on older phones to upgrade Dec 07 05:44:17 hello Dec 07 05:44:34 im having a problem trying to change the taskdescription in the overview Dec 07 05:44:59 i am getting the colorprimarydark and setting it but it keps using the primarycolor, any idea? Dec 07 05:47:02 Have you tried Activity.setTaskDescription(new ActivityManager.TaskDescription(label, icon, yourcolorhere)); ? Dec 07 05:47:24 I'd try using Color.RED or something to see whether the code is taking effect. Dec 07 05:47:36 (Unless red is close to your primary colour.) Dec 07 05:47:47 let me see Dec 07 05:48:21 yes, is the same line im using, but no change Dec 07 05:48:28 it keeps showing the primary Dec 07 05:49:03 ActivityManager.TaskDescription td = new ActivityManager.TaskDescription(null, bm, color); Dec 07 05:49:03 Dec 07 05:49:18 got it from here https://www.bignerdranch.com/blog/polishing-your-Android-overview-screen-entry/ Dec 07 05:49:43 theme.resolveAttribute(R.attr.colorPrimaryDark, typedValue, true); Dec 07 05:49:48 was what i was trying Dec 07 05:50:11 its an AppCompatActivity Dec 07 05:50:26 mine, and the one in the tutorial is ActionBarActivity Dec 07 05:53:29 do you think they do not allow that change on marshmallow? Dec 07 05:54:57 Where are you calling it in your code dunkel Dec 07 05:54:59 dunkel2: Why not simplify and try Color.RED or something? Dec 07 05:55:15 I just tried it dunkel and it works fine Dec 07 05:55:17 yes i tried teh color red and not working Dec 07 05:55:18 Just: @Override Dec 07 05:55:18 public void onPause(){ Dec 07 05:55:18 super.onPause(); Dec 07 05:55:18 this.setTaskDescription(new ActivityManager.TaskDescription("this", null, Color.RED)); Dec 07 05:55:18 } Dec 07 05:55:21 It's not a good idea to jump straight to complexity (using Theme.resolveAttribute). Dec 07 05:55:21 in the onCreate Dec 07 05:55:24 of my mainactivity Dec 07 05:55:24 dunkel Dec 07 05:55:27 It should be in onPause Dec 07 05:55:31 :O!!!! Dec 07 05:55:36 maybe that is the issue let me check Dec 07 05:55:42 Also, that call only works on Api >21 Dec 07 05:55:51 So make sure you wrap it in a version check Dec 07 05:56:31 Here: http://pastebin.com/Pv6nMjC8 Dec 07 05:56:54 "this" is the title, null is the icon (if you pass null it just usees your app icon) Dec 07 05:57:13 If you want to use the same title as your activity just pass a null for that as well Dec 07 05:59:43 liuwenhao: maybe im doing something wrong Dec 07 05:59:43 Isn't it better to do it in onCreate? Dec 07 05:59:50 dunkel2: What code are you trying? Dec 07 05:59:51 :( is not working for me Dec 07 05:59:58 right now the onpause Dec 07 06:00:13 I pasted `setTaskDescription(new ActivityManager.TaskDescription(null, null, Color.RED));` in onCreate and it worked. Dec 07 06:00:23 Try that. Dec 07 06:00:34 and also i set a Log.d in the onPause and is not even logging it Dec 07 06:00:52 I don't think onPause is a good place for this. Dec 07 06:00:57 Weird. That code worked perfectly for me Dec 07 06:01:34 could be something on my theme what is messing it? Dec 07 06:02:03 No, that code should override whatever is in your Styles.xml for the app overview/multitasking screen Dec 07 06:02:18 dunkel2: Please try the above and report whether it worked or not. Dec 07 06:02:28 After `super.onCreate(whatever);`. Dec 07 06:02:41 tried, same result the bar is on the primaryColor set by my styles.xml Dec 07 06:03:08 It doesn't even change the title in the overview screen? Dec 07 06:03:11 Or just not changing the color Dec 07 06:03:15 it changes teh title Dec 07 06:03:19 if i set a new string Dec 07 06:03:23 it does Dec 07 06:03:39 maybe also the icon, but i dont have any other image to test, but it keeps ignoring teh colour Dec 07 06:03:58 What Android version are you on? Dec 07 06:04:06 wait a second Dec 07 06:04:20 i think i know the problem now Dec 07 06:04:48 the problem is that i was setting it on mainactivity but my app when it loads mainactivity it shows a intent with loginactivity Dec 07 06:05:16 and i was going to the overview while in loginactivity Dec 07 06:05:18 :$ Dec 07 06:05:29 so then… i have to set that code on each activity? Dec 07 06:05:44 Yes Dec 07 06:05:57 ok :D good to know Dec 07 06:05:57 Because the overview just takes whatever the current activity information is Dec 07 06:06:16 so, do you guys think is better in the oncreate or onpause? Dec 07 06:06:41 onCreate Dec 07 06:06:49 It doesn't make sense to do this every time the activity pauses. Dec 07 06:07:14 i had another problem before, i was trying to set the theme to a tablayut Dec 07 06:07:58 but when i set the android:background it seems like it adds a background also to the labels on the tabs because when i highlight the tab the labels showed a weird rectangle behing them Dec 07 06:08:54 try android:backgroundTint Dec 07 06:08:54 i fixed it setting the background in the layout inside the