**** BEGIN LOGGING AT Sat Apr 11 02:59:59 2015 Apr 11 03:07:45 Hmm. I'm getting the feeling that the MediaSession APIs are causing my custom wearable actions/pages to be overridden Apr 11 03:20:42 Ughk, can't sleep. Apr 11 03:20:44 So restless. Apr 11 03:25:30 Super Dragon! Apr 11 03:26:16 I can't handle this much excitement, TacticalJoke. Not now. Not this late. Apr 11 03:26:29 Anthaas: http://www.reddit.com/r/cringe/comments/320rvz/fan_attending_an_independent_wrestling_chants_for/ Apr 11 03:27:14 Android Studio automatic matching bracket, need to customize in editor. I want to change the highlighting color. Apr 11 03:27:33 TacticalJoke: I worry about the effects you making that app is having on you. Although this is hilarious. Apr 11 03:27:35 can some one tell where and which option is their Apr 11 03:29:30 Braces is for color editing. what is it for highlighting. Apr 11 03:31:07 t2mkn: Probably Ctrl+Alt+S --> "Matched brace". Apr 11 03:32:33 Anthaas: It's fun making it. It's annoying when I go to bed and I've pushed the wrong branch to my phone. Apr 11 03:32:54 And I've already turned the computer off; Apr 11 03:33:01 TacticalJoke: thats to move around. but when the cursor is at opening bracked, the ending bracket gets highlighted. where to change the color of that highlighing effect. Apr 11 03:33:17 TacticalJoke: How far off are you from a usable version? Apr 11 03:33:35 t2mkn: Are you sure that's not it? Apr 11 03:33:39 Anthaas: From a release? No idea. Apr 11 03:33:47 I use it for hours every day, though. :D Apr 11 03:34:01 TacticalJoke: yes thats not Apr 11 03:34:01 Not necessarily a release - just a version I can have a look at :P Apr 11 03:34:17 Ah. Probably not too far. Apr 11 03:36:15 t2mkn: It might feature the word "matched". Apr 11 03:36:19 Or "match". Apr 11 03:36:58 ya just got that "Matched brace" in General. Apr 11 03:37:06 thanks TacticalJoke Apr 11 03:44:25 can I have an app icon that simply launches an intent instead of an activity? Apr 11 03:45:17 joshkovach, sorry I don't know but what do you intend to do? :) Apr 11 03:46:30 how's that? when you launch an activity, it's launching an intent itself Apr 11 03:46:36 I'm writing an app, experimental, where basically you'll have an icon that you click and it performs a simple action using a BroadcastReceiver... at least that's the idea I have in my head right now Apr 11 03:47:23 I guess, instead of an activity as my launcher, I want something that my BroadcastReceiver can pick up... Apr 11 03:48:03 joshkovach: make a widget, then yes. otherwise no, AFAIK Apr 11 03:48:10 but broadcastreceivers it's for event that occurs system-side Apr 11 03:49:55 ok Apr 11 03:50:11 joshkovach, I've made a widget that ultimately inserts a row into a database .. it uses a Service that launches my MainActivity Apr 11 03:55:28 Anthaas android-dev on friday eve should put you to sleep :) Apr 11 03:55:29 I am quite honestly the worst person in the world when it comes to anything graphical design related. Apr 11 03:56:41 Anthaas: look at RMS's website, it'll make you feel better Apr 11 03:57:20 I think I have it worse. I can *almost* make something that looks good, and it requires an enormous effort. Apr 11 03:57:25 g00s_: I had hoped so, evidently not! haha, I should probably close AS when I come back to the computer though. Apr 11 03:57:35 I will post a screenshot in a sec hahaha Apr 11 03:57:42 Oh, I can do UIs. Just not icons. ;| Apr 11 03:57:51 Oh, I can't do UI. At all. Apr 11 03:58:07 I swear Im colour blind. Not in the normal sense, but in the sense that I cannot tell which colours go well together Apr 11 03:58:11 Im tone deaf, but with colours. Apr 11 03:58:32 hey is there some way to change which directory my system-images are stored in? Apr 11 03:58:47 You know about that material-colours site, right? Apr 11 03:58:55 my ssd is getting full and i'd prefer them to be on my hard drive Apr 11 03:59:04 I mean this: http://www.materialpalette.com/ Apr 11 03:59:10 TacticalJoke: http://www.google.co.uk/design/spec/style/color.html#color-color-palette ? Apr 11 03:59:12 Oh Apr 11 03:59:35 Oh WOW! Apr 11 03:59:36 if I want to clone a git repo in android Apr 11 03:59:40 where do I put it in the filesystem Apr 11 04:01:38 TacticalJoke: That is an amazing help! Thank you! Apr 11 04:02:31 whats a good path to clone repos into the android FS? Apr 11 04:02:41 hmmm how to animate recycler view enter animation like this https://developer.android.com/design/material/videos/ContactsAnim.mp4 (as in, staggered) Apr 11 04:03:35 I tried running animation onbindViewHolder but that animation only runs inside the bounds of the holder's layout Apr 11 04:04:57 :) Apr 11 04:05:59 TacticalJoke: As embarassing as it is, I've never used styles.xml really before. Im trying to work out what I should put in there (starting with the app default styles) - any suggestions? Apr 11 04:06:34 Most examples just have colorPrimary, colorPrimaryDark, and colorAccent Apr 11 04:08:23 In the thing referred to by something like 'android:theme="@style/AppTheme"', I think. Apr 11 04:09:06 Oh sorry, I mean in the style I am defining, what other items should I set up? Apr 11 04:10:49 TacticalJoke: Can I send you a private message? Going to link to you an image of a screenshot, but it has personal information on. Apr 11 04:12:46 Of course, Ill keep all other messages out of private. Apr 11 04:12:48 huh, setLayoutAnimation! Apr 11 04:13:54 Afzal: it's nice when the answer is simple :) Apr 11 04:14:03 yeah lol Apr 11 04:14:25 Anyone interested in Neural Networks as a Service? Apr 11 04:14:28 in case anyone hits the same issue i did with nuplayer not working where awesomeplayer did, the problem was that onInfo gets called before onPrepared in nuplayer, which messed up my logic Apr 11 04:14:32 I don't know why I did it in onBindViewHolder. Maybe there's a reason though Apr 11 04:14:48 explodes err, like BigML? Apr 11 04:14:55 Afzal: Probably Apr 11 04:14:57 explodes: somewhat, but there are a fair number of them already Apr 11 04:15:07 more precisely, MediaPlayer.MEDIA_INFO_BUFFERING_END gets called before onPrepared Apr 11 04:15:18 amazon came out with their own also Apr 11 04:16:42 dang Apr 11 04:16:46 well i made one last night Apr 11 04:16:51 didn't know it was so famous already Apr 11 04:17:04 Anthaas: Sure. Apr 11 04:17:04 Also mine sucks Apr 11 04:17:45 explodes: probably a fun project still :) ai is one of those infinite "hmm, interesting, now what if I...." topics for me Apr 11 04:19:00 yup Apr 11 04:22:09 its definitely fun to play around with an android app but AI is a whole other ball game Apr 11 04:22:25 the Science of Computer Science Apr 11 05:05:50 hmm my emulator's camera keep crashing Apr 11 05:07:33 ~DadFoundMy-- Apr 11 05:15:50 if I want to add an alarm for my app, where do I put the code? ie. alarmManager.set() Apr 11 05:19:14 Jonno_FTW: hey Apr 11 05:19:27 Jonno_FTW: well that really depends on what your trying to do Apr 11 05:20:47 Jonno_FTW: most people have a setting that they watch for changes on in their settings activity and when it changes between true and false create a copy of their Schedule class and call a function to enable or disable using AlarmManager Apr 11 05:21:48 Jonno_FTW: also, you will need a BOOT_COMPLETED BroadcastReceiver to re-add the alarm. Apr 11 05:21:58 alright Apr 11 05:22:14 is there a post-install event? Apr 11 05:22:18 that I need to add it for? Apr 11 05:22:19 no Apr 11 05:22:33 I really just want an alarm that makes a notification once a day Apr 11 05:22:36 do you have a custom Application class Apr 11 05:22:40 nope Apr 11 05:22:45 add one Apr 11 05:23:01 or Apr 11 05:23:19 use your Main Activity that has the Launcher category on it Apr 11 05:23:48 either in your custom application onCreate or your Activity onCreate create a copy of your schedule class and set your alarm Apr 11 05:24:58 how do I add a launcher category? Apr 11 05:25:11 oh it already is Apr 11 05:25:11 you dont have it already? Apr 11 05:25:17 ;) Apr 11 05:26:00 I'm getting "The project is using an unsupported version of Gradle." when I try to import a project Apr 11 05:26:06 (in Android Studio) Apr 11 05:26:26 is there a decent tutorial on this? Apr 11 05:26:45 various Stack Overflow answers suggest that I should open build.gradle and tweak the dependencies { classpath 'com.android.tools.build:gradle:...' } line Apr 11 05:27:10 Jonno_FTW: tutorial on what? Apr 11 05:27:46 kerrick_: no, edit your gradle/wrapper/gradle-wrapper.properties file. Apr 11 05:27:54 on making an alarm Apr 11 05:28:06 nvm I'll just use the google one, it's just not clear about where the alarm is created Apr 11 05:28:37 kerrick_: you can just delete your gradle folder before importing and android studio should download the latest. I believe. back it up before you try. Apr 11 05:28:53 Jonno_FTW: Alarm is created in AlarmManager Apr 11 05:29:22 Jonno_FTW: what exactly do you want to know? Apr 11 05:29:40 do I need to create my own alarm class that does w/e at alarm time? Apr 11 05:30:15 there is never really a "need" to do anything Apr 11 05:30:31 you are giving a PendingIntent to the AlarmManager Apr 11 05:30:40 not yet Apr 11 05:30:48 you will be:P Apr 11 05:31:07 anyway, that PendingIntent is either for a broadcast, service or activity Apr 11 05:31:20 yes? Apr 11 05:31:31 yes Apr 11 05:32:00 ok, so services will be started.. broadcasts will be broadcast and activities will be launched Apr 11 05:32:08 when the alarm goes off Apr 11 05:32:16 yes Apr 11 05:32:23 Napalm, this is gradle-wrapper.properties: https://github.com/ankidroid/Anki-Android/blob/develop/gradle/wrapper/gradle-wrapper.properties Apr 11 05:32:31 you could create a broadcast receiver, that receives your own action when the alarm goes off Apr 11 05:32:47 now you can update some settings do whatever you like for up to 10 seconds Apr 11 05:32:49 Napalm, I'm running Android Studio 1.1.0 on Arch Linux installed from the AUR Apr 11 05:32:54 or it might be 5.. i forget Apr 11 05:33:25 Napalm, it looks like this comes with gradle-wrapper 2.2, since it includes a file called /opt/android-studio/plugins/gradle/lib/gradle-wrapper-2.2.jar Apr 11 05:33:43 if you want to do anything for longer.. you should either use PendingIntent.getService to start a service directly or start a service from your own BroadcastReceiver Apr 11 05:34:05 that service should hold the cpu wake lock Apr 11 05:34:22 if you want it to run in the background which I dont suggest you should Apr 11 05:34:59 Jonno_FTW: this .. once a day alarm.. is like a update data service? Apr 11 05:35:08 pretty much Apr 11 05:35:12 and shows a notification to the usetr Apr 11 05:35:13 Napalm, when I rm -r gradle it won't let me import the project directory any more, although it will let me import build.gradle and settings.gradle, but same error Apr 11 05:35:33 Napalm, so the error means that my installed Gradle is not compatible with the Gradle version used to develop the project? Apr 11 05:35:45 kerrick_: wait Apr 11 05:36:07 kerrick_: once you import the gradle project.. gradle sync fails Apr 11 05:36:30 Napalm, I don't think it's getting to the point that it's imported Apr 11 05:36:34 create a new android studio project and look at the build.gradle for the version of the gradle plugin it uses Apr 11 05:36:51 now copy that and put that in your build.gradle Apr 11 05:37:19 well edit your gradle wrapper properties to use 2.2 Apr 11 05:39:40 Jonno_FTW: well your best option is to simply start a service straight from your PendingIntent given to AlarmManager Apr 11 05:40:28 want an example? Apr 11 05:41:10 Napalm, copying build.gradle worked, although now I get "Error:No subject alternative DNS name matching services.gradle.org found." Apr 11 05:41:43 bankai_ http://digg.com/video/dog-wants-his-human-to-stop-playing-sam-smith-songs Apr 11 05:42:08 kerrick_: sounds like android studio cannot connect to the internet for whatever reason.. so it cant resolve dns and cant download the latest gradle files Apr 11 05:42:23 kerrick_: check your firewall settings and what-not Apr 11 05:42:28 g00s_!!!!! Apr 11 05:42:31 hey buddy Apr 11 05:42:35 yo Napalm Apr 11 05:43:05 i almost descended into the pits of madness - considering apis / datastructures for arbitrary quantity & units Apr 11 05:43:32 things get pretty hairy, jsr 275, jsr 363 Apr 11 05:43:38 Napalm what are you up to ? Apr 11 05:43:47 heh Apr 11 05:43:54 yea, i've been there before Apr 11 05:44:06 Napalm what did you wind up doing? Apr 11 05:44:16 not doing it Apr 11 05:44:19 heh Apr 11 05:44:20 haha Apr 11 05:44:42 anyways, Apr 11 05:44:56 yea, i've been working on this push system and firmware Apr 11 05:45:29 nice, did you use mqtt? Apr 11 05:45:39 nope, gone for COAP Apr 11 05:45:46 nice Apr 11 05:46:42 i haven't used coap yet Apr 11 05:47:43 i dont think xively takes coap, hmmm Apr 11 05:48:15 I heard that the fqqt will do tttt though Apr 11 05:48:26 lol Apr 11 05:48:44 I've not heard of xively before.. just checking it out Apr 11 05:49:06 hah. there are a multitude of things in the past several messages I've never heard of Apr 11 05:49:52 yeah, just rest and mqtt Apr 11 05:50:15 hey so having this issue detailed it well I believe here http://stackoverflow.com/questions/29574573/simple-constraint-programming-solution-needed Apr 11 05:52:03 Napalm, I think it's because the services.gradle.org cert is messed up Apr 11 05:52:08 e.g. try navigating to https://services.gradle.org/distributions/gradle-2.2.1-all.zip in Chrome Apr 11 05:52:32 I get the same error doing ./gradlew assemble from the command line Apr 11 05:52:38 heh, yea it expired today Apr 11 05:52:43 ah Apr 11 05:52:55 looks like you'll have to use ant ... Apr 11 05:52:58 :D Apr 11 05:54:03 my bad.. it didnt expire today.. its the wrong cert Apr 11 05:54:28 Napalm what would be your storage technolog of choice (on the phone) for bunches of sensor data. i used sqlite in the past, was thinking about a k/v store (k=time, v=byte[] of data) Apr 11 05:54:35 I mean, from a cursory look, it seems like Gradle is one of those open source projects that's developed by a company whose sole business is providing support/consulting for Gradle Apr 11 05:54:42 so there's no incentive for them to make it simple Apr 11 05:55:05 or easy to set-up Apr 11 05:55:23 kerrick_: If you find gradle complicated, you should take a look at sbt. We have it easy. Apr 11 05:55:28 kerrick_: sure there is Apr 11 05:55:37 if no-one uses the tool, there's no-one to pay for support :) Apr 11 05:55:59 It's in their best interest to be a popular tool Apr 11 05:56:20 hm, but there is that tension - services are only needed if its complicated enough Apr 11 05:56:52 we thought that about maven too haha Apr 11 05:57:07 kerrick_: it is simple and easy Apr 11 05:57:34 (half-joking :P) Apr 11 05:57:42 and the music is good, and makes you feel good Apr 11 05:57:50 (half-laughing :p) Apr 11 05:57:53 g00s_: yeah, a low-level small light-weight KV store would be nice Apr 11 05:58:17 g00s_: dont know of any, but you have peeked my interest Apr 11 05:58:21 *peaked Apr 11 05:58:29 piqued? Apr 11 05:58:32 Napalm i'm playing with H2 mvstore Apr 11 05:58:53 nice that it has range queries Apr 11 05:58:54 piqued Apr 11 05:59:46 CedricBeust: ty Apr 11 06:00:21 but sqlite is so familiar ;) Apr 11 06:03:11 g00s_: i think it might work just as well Apr 11 06:03:26 Napalm which ? Apr 11 06:03:29 g00s_: it has supports for R-tree's and i believe it uses b-tree's for its indexes Apr 11 06:03:31 sqlite Apr 11 06:03:55 you have to compile sqlite with r*tree support; the android one doesn' thave that Apr 11 06:04:17 nope, but i dont see any reason why you couldnt Apr 11 06:04:37 you could, sure, but then i dont think you can use the java bindings Apr 11 06:04:53 so you would have to make your own JNI bridge Apr 11 06:05:06 i'm not going to do that :D Apr 11 06:05:39 iOS guys have it easy when bundling their own sqlite Apr 11 06:05:51 although, not sure how that works with core data either Apr 11 06:07:18 i've always wanted to load my own sqlite extensions in Android Apr 11 06:07:28 shame they dont expose the interface Apr 11 06:08:13 hmm Apr 11 06:08:35 i would probably go with mvstore if it was out of beta Apr 11 06:09:00 each feed would be 2 maps; one for metadata, the other data, pretty simple Apr 11 06:09:40 * g00s_ thought mvstore would be out of beta by now Apr 11 06:10:58 otoh if i used sqlite for this i'd probably go schema-less, time / type / blob Apr 11 06:11:19 as new measurements come up i dont want to have to keep adding columns to the db Apr 11 06:15:47 ah Apr 11 06:16:02 g00s_, https://github.com/antirez/redis/pull/2226 :D Apr 11 06:16:14 what i miss in android's sqlite are custom functions Apr 11 06:16:21 ah yeah, that too Apr 11 06:16:28 they do support them but the methods and classes are hidden Apr 11 06:16:47 ffs# Apr 11 06:16:51 ffs @hide crap Apr 11 06:17:01 that was nice about H2 (sql version) you can have java custom functions Apr 11 06:17:04 SQLiteDatabase has addCustomFunction method @hide though Apr 11 06:17:05 yah Apr 11 06:17:27 its things like this - when i really start to hate an OS in java Apr 11 06:17:34 i just want to be able to get closer to the C bits easier Apr 11 06:22:19 fuck it.. the addCustomFunction method has been around since APIv14 Apr 11 06:22:29 i am going to write a wrapper to call these methods and do some tests Apr 11 06:22:40 go Napalm go ! Apr 11 06:22:42 reflection ftw Apr 11 06:23:46 na, I wont use reflection Apr 11 06:23:56 anyone want to take a shot at trying to help me solve this constraint problem I am having Apr 11 06:24:08 Napalm, what'd you do then? Apr 11 06:24:13 Napalm i wonder if they are hidden because the C apis change; and nobody can protect you from that. sony gives you sqlite 3.7 and LG gives you 3.6 or something - maybe the custom functions need to be compiled for that version of sqlite Apr 11 06:24:33 g00s_: no because they callback into Java Apr 11 06:25:04 g00s_: and its APIv14+ which is probably sqlite 3.7+ Apr 11 06:25:18 oems use whatever version of sqlite they want to Apr 11 06:25:40 g00s_: i am pretty sure there are min version requirements Apr 11 06:25:47 http://stackoverflow.com/questions/2421189/version-of-sqlite-used-in-android Apr 11 06:27:10 yewa? Apr 11 06:27:16 g00s_: looks fine to me Apr 11 06:29:42 man thats scary. lets say you set MinSdk=16, targetSdk=22. then you are dealing with sqlite versions 3.7.11 to 3.8.6 Apr 11 06:29:50 then go here and look at how many changes there are http://www.sqlite.org/changes.html#version_3_8_6 Apr 11 06:29:59 but in java layer we all hope thngs are the same Apr 11 06:30:10 id much rather just ship my own sqlite :( Apr 11 06:35:52 :( Apr 11 06:36:05 that doesn't look good Napalm ! Apr 11 06:36:36 g00s_: what doesnt Apr 11 06:36:39 exactly Apr 11 06:36:41 Napalm doesn't :( much Apr 11 06:36:45 oh Apr 11 06:36:48 yea Apr 11 06:36:55 that was just for d/c Apr 11 06:37:43 sqlite custom functions is looking promising Apr 11 06:38:17 i'm still not sure how that is supposed to work though ... Apr 11 06:38:27 lets say you call a java function for a dataset, each row Apr 11 06:38:29 JNI would kill it Apr 11 06:38:48 *resultset Apr 11 06:38:51 well.. perhaps thats why they've not been added Apr 11 06:39:13 might just be quicker to iterate over the cursor :P Apr 11 06:39:14 g00s_: https://github.com/slightfoot/sqlite3-extensions Apr 11 06:39:26 did these ages ago. Apr 11 06:39:33 right helpful Apr 11 06:44:36 Napalm have you used google tag manager for anything ? Apr 11 06:54:42 g00s_: wanted to.. but no, not yet Apr 11 07:03:54 wow, looks like swiping an app from recents kills its foreground service now Apr 11 07:04:15 this didn't happen, then did - and was fixed in 4.4.3, and now happens again Apr 11 07:09:48 http://discuss.gradle.org/t/urgent-ssl-apache-configuration-for-services-gradle-org-is-bad/8808 Apr 11 07:09:59 I've created a topic for it if anyone would like to comment Apr 11 07:36:39 hello. is there any suitable place online, where i can make a build job to cross-build android ? Apr 11 07:37:38 not an app, an android image Apr 11 07:45:39 I would imagine just about any VPS type service would do the trick Apr 11 07:52:00 JesusFreke: well i have access to the free build services of Docker Hub and Launchpad.net Apr 11 07:52:30 unfortunately they don't publish their resource limits. android kicks up a lot of build files (several GB) Apr 11 07:54:54 lol. worst time to ask this question. i'll probably have found out what to do by monday morning Apr 11 07:57:34 hmm. 8.1 GB of files in .repo/project-objects/ folder. that's a lot of files. Apr 11 08:04:16 start up a google compute engine server, and have at it :) Apr 11 08:04:37 one of my friends uses a gce instance almost exclusively Apr 11 08:24:15 thanks JesusFreke, i'll look into gce too Apr 11 08:55:36 اه Apr 11 08:56:19 hi Apr 11 08:56:20 o/ Apr 11 08:58:36 who me help learn andorid sqllite Apr 11 08:58:39 ??? Apr 11 08:59:34 google probably will. Apr 11 09:00:05 i cannot helpe google Apr 11 09:00:56 oh ok. You are the one helping. I didn't get that at first. Apr 11 09:03:34 pleaee help me to learn android sqllite ?? Apr 11 09:08:11 what contax in andorid Apr 11 09:08:19 ?? Apr 11 09:10:37 ؟؟؟؟؟؟؟؟ Apr 11 09:10:38 ؟؟؟؟ Apr 11 09:10:39 ؟؟؟؟؟؟ Apr 11 09:10:40 ؟؟؟؟؟؟؟ Apr 11 09:10:42 ؟؟؟؟؟ Apr 11 12:00:21 Hi Apr 11 12:00:34 If I have a domain/core part of my app that doesn't depend on android libs Apr 11 12:00:44 is it worth to put it on its own module? Apr 11 12:01:03 will my unit tests run faster or it's just pointless Apr 11 12:06:10 Hi any good books/articles on android history? I am writing a thesis on android development and looking for some good sources. Apr 11 12:14:10 Can anyone point me in the right direction - I'm trying adjust the rgb values of a color to compensate for the color being applied to a view which has a semi-transparent dark overlay Apr 11 12:21:29 Silmarilion: have you checked Wikipedia? Apr 11 12:21:50 timusus: https://en.wikipedia.org/wiki/Blend_modes#Multiply Apr 11 12:21:56 Papipo, now reading. Apr 11 12:28:00 yawkat, thanks for the link, a little more broad than I'm looking for though. Apr 11 12:28:55 yea, youd have to adjust for alpha too. Apr 11 12:29:48 I'm aware of that.. Still the question remains Apr 11 12:30:15 I'm taking the two colors, converting them to argb and subtracting color2 from color1, using a sort of.. average Apr 11 12:30:35 Adding colors in a similar fashion works well Apr 11 12:30:49 Rn = Rz * (1.0 - Aq) + Rq * Aq; Apr 11 12:31:09 z is the lower layer, q the upper one Apr 11 12:31:21 A is alpha, R the color component like red. Apr 11 12:31:38 depends on your blending mode really but im guessing itll use that one. Apr 11 12:32:08 When you say 'depends on your blending mode'.. I'm not working with bitmaps, images or a canvas here Apr 11 12:32:16 Purely talking about 2 colors. Are we on the same page? Apr 11 12:32:37 yes, but there are many ways to blend two colors Apr 11 12:32:43 Ok, sure Apr 11 12:33:02 So I'm asking what the correct way is, when trying to compensate for a semitransparent dark overlay Apr 11 12:33:05 For example, Apr 11 12:33:22 Imagine you have a framelayout, with a foregroundColor of say, 20% black Apr 11 12:33:31 You set the background to say, 100% blue Apr 11 12:33:56 What kind of blending mode and subtraction would result in the 20% black foreground being effectively invisible? Apr 11 12:33:58 so fg is .2,.2,.2 and bg is 0,0,1? Apr 11 12:35:29 Sure, if .2,.2,.2 represents represents black with an alpha of approximately 20% (0.2 * 255) Apr 11 12:35:40 (I'm not familiar with the (syntax?) you're using) Apr 11 12:35:48 I mean, it's r,g,b Apr 11 12:36:10 But I haven't seen it represented as .2,.2,.2 before, sorry Apr 11 12:36:20 yea, its a color vector, sorry Apr 11 12:36:29 OK Apr 11 12:36:33 So yeah Apr 11 12:36:37 well black at 20% opacity isnt 20% black at 100% opacity Apr 11 12:36:45 lets see Apr 11 12:36:59 No, I'm saying black @ 20$ opacity Apr 11 12:37:02 20% Apr 11 12:37:35 i dont think you can even reach 100% blue then. Apr 11 12:37:54 So yeah, I'm absolutely stuck with this 20% opacity black foreground, cannot change it. So I need to adjust the background in such a way that it looks like it would if the foreground didn't exist.. Apr 11 12:37:56 Oh right Apr 11 12:38:19 Because the color would have to be a negative? Apr 11 12:38:26 well, more than 100%. Apr 11 12:38:28 (negative rgb values?) Apr 11 12:38:48 if you like hex colors, itd be larger than 0xff Apr 11 12:39:01 Why 'larger'? Apr 11 12:39:07 just do your color component / 0.8 if the foregrounds black at 20% opacity Apr 11 12:40:04 But as you said, I'm not going to get my pure 0,0,1 am I.? Apr 11 12:41:31 nope Apr 11 12:41:45 Damn Apr 11 12:41:48 OK, thanks for the info Apr 11 12:42:04 blended_color = color * (1 - black_layer_opacity) Apr 11 12:42:11 np Apr 11 12:43:31 Context: I'm using a translucent status bar.. The system likes to add it's own dark shade over the status bar when it's translucent. But, I have a sliding view, when it gets expanded, the status bar color gets set to my primaryColorDark (my general status bar color) Apr 11 12:43:39 But the 'shade' overlay makes it way too dark Apr 11 12:43:50 And I can't turn off the system's shading of the view.. Apr 11 12:49:25 I have custom view(A) that is contained inside another custom view(B). At times, when returning to the activity (or sometimes starting) it, A is way out of posiition. Is there a method on A I can override that is guaranteed to be called when it's position is changed? Apr 11 12:51:02 hey guys how can i change the spinner presentation from dropdown to popup on activity? (i know to do over XML, but this is not useful for me on this moment) Apr 11 13:01:31 hi Apr 11 13:04:12 Does someone have an alternative for https://github.com/ManuelPeinado/FadingActionBar This project no longer seems to be maintained and there are tons of issues that are being ignored. Apr 11 13:04:57 I'm looking for a way to show an image that would shrink in height when scrolling down and with a parallax effect. Apr 11 13:06:29 Muchoz: https://github.com/ksoichiro/Android-ObservableScrollView Apr 11 13:06:51 icedp, awesome! Apr 11 13:06:55 Thank you Apr 11 13:07:53 np Apr 11 13:20:55 http://i.imgur.com/Os8TzWR.png :'] Apr 11 13:27:14 7 more Apr 11 13:29:22 icedp, well the samples that are provided use com.nineoldandroids.view which is deprecated. Apr 11 13:30:05 Wait, I can change most of them for built-in methods. Apr 11 13:30:52 my list view append elements again and again how can i display one item only once ? Apr 11 13:33:27 Muchoz: IIRC it's used just for setTranslationY Apr 11 13:33:40 icedp, ya. I replaced all of them. Apr 11 13:35:03 if statements on position in adapters do not work Apr 11 13:37:21 the indeces get fucked up and you start seeing the code that belonged to the condition being executed on other indeces Apr 11 13:38:00 like if (objectFromList.get(position).getImage() == null) { holder.imageView.setImageBitmap(placeHolder)) Apr 11 13:38:24 even if you have only 1 object matching that condition, when you scroll you will see placeholders on other objects Apr 11 13:39:05 tl;dr he can't code a simple adapter Apr 11 13:39:06 I have not understood this problem since I started Android Apr 11 13:39:42 first solution was to use viewHolder, and that was fine. but these constraints over every object appearing in the list, I've never found where to put them Apr 11 13:39:42 Have you heard of view recycling? Apr 11 13:39:58 Cus that sounds like you dont understand view recycling Apr 11 13:40:01 of course I use viewholder, but this example above is from viewholder implementation Apr 11 13:40:12 and I know that the position is not to be counted on, as views get recycled Apr 11 13:40:57 where do you place those constraints then? where do you say that if this object has some property, make its row look like, behave like, whatever else you want to differentiate it with Apr 11 13:41:07 https://www.youtube.com/watch?v=wDBM6wVEO70 Apr 11 13:41:16 Try to understand view recycling Apr 11 13:41:22 fine Apr 11 14:08:51 so far, min 21 I know everything he is mentioning Apr 11 14:11:32 what is the best way to create an action bar on bottom the way iphone does it Apr 11 14:12:03 So far, everything you've said points to you not understanding it Apr 11 14:12:44 Lonesoldier728: You can put a Toolbar wherever you want, it's just a regular View Apr 11 14:14:39 I do implement viewholder as he said, and he did mention that you shouldn't rely on position (which I do in this case) and does mention what I need to have done but doesnt mention how to mitigate it Apr 11 14:15:17 I think what I have to do is find the view that triggers this action from my activity, and if that view is clicked I can do item.setChecked, in the adapter I check for isChecked Apr 11 14:16:07 Last you talked about placeholders, now you're talking about checked items.. Apr 11 14:16:31 that was just an example Apr 11 14:16:51 I'll just refer to my previous recommendation, paste code and ask "what did I do wrong?" Apr 11 14:17:01 And hope someone will understand the concepts to you Apr 11 14:17:04 sure Apr 11 14:17:06 explain Apr 11 14:17:07 I will post Apr 11 14:17:56 Does anyone know how to get the icons (like this: http://i.imgur.com/XsUCXUO.png) that Google Maps is using? Apr 11 14:18:20 you can try icons4android, pretty good collection Apr 11 14:18:41 Google has a repo of icons, you can see if it's there: https://github.com/google/material-design-icons Apr 11 14:21:44 SimonVT, thank you! Apr 11 14:22:34 can you log from a widget? I can't seem to get my action to work, but since it's not a running activity it seems like it's hard to debug Apr 11 14:23:33 You can have log statements anywhere Apr 11 14:24:06 http://pastie.org/10086592 here's the code for the adapter. The lines commented out at 86 to 91 I know to be wrong, but the behavior they produced was that the animation would run on the selected item and the view would transform to look like X, then when scrolling that X-look is applied to another completely random item Apr 11 14:24:56 now with the code referring to those items from their holder object, the item pressed doesn't get the X look, another completely random item gets that look, so its half-wrong from the first implementation Apr 11 14:25:41 isNoteShowing returns correct results in the log Apr 11 14:28:57 Well shit Apr 11 14:29:06 + Apr 11 14:29:09 haha Apr 11 14:30:02 I edited some abc_ layout file that I shouldn't have. I only noticed after I closed the tab, can I revert this? Apr 11 14:30:08 So you're not resetting whatever you're doing to make it look like X, when the View is reused for another position Apr 11 14:30:38 it has to keep looking like X until I click that button again Apr 11 14:31:17 the code that turns view into that X-look is inside an if which is inside the note-showing button click listener Apr 11 14:31:20 Nvm, found a way. Apr 11 14:31:45 So give the view an X shape if that item should have an X shape Apr 11 14:31:52 Views are recycled, as explained in the previous video Apr 11 14:32:18 The view used for position 10 might never get used for position 10 again Apr 11 14:32:21 its the way I am referring to the views that's wrong, holder.whatever is not guaranteed to be the item I am at right now Apr 11 14:32:51 how do I figure out which one was pressed then, if I am not to rely on position Apr 11 14:33:07 even when getting its ID, I still have to do item.get(position).getId Apr 11 14:33:14 You can rely on position in getView.. Apr 11 14:33:42 Anyway, View recycling.. Start googling that Apr 11 14:33:49 ohhh, its line 59 Apr 11 14:33:56 If you don't understand that, you're going to have a hard time using ListView Apr 11 14:33:58 For anything.. Apr 11 14:34:09 Ive written dozens of adapters..I really have Apr 11 14:34:16 and they were all intricate like this Apr 11 14:34:21 Yet you have no idea how they work Apr 11 14:34:25 yes sir Apr 11 14:35:12 You should probably go back and check that they work as expected Apr 11 14:35:26 Are the list layouts that are mentioned here http://www.google.com/design/spec/components/lists.html#lists-specs available in the SDK or do you need to create this yourself? So far I've created them myself. Apr 11 14:35:40 they do for sure, with all of them I face this issue at first and then get over it Apr 11 14:35:45 it's the resetting as you said Apr 11 14:36:00 you have code that will apply what you want but no code that will unapply it Apr 11 14:39:15 see, line 53 works, I never see the bookmarkBTN being replicated elsewhere or appearing somewhere it shouldn't Apr 11 14:39:23 cause it has an else Apr 11 14:39:27 so stupid Apr 11 14:39:34 see I do know how they work, this is just a slip up Apr 11 14:44:13 works Apr 11 14:44:20 man, I dont know.. Apr 11 14:44:22 whatever Apr 11 14:45:00 whats important is to learn not to do it again! haha.. Apr 11 14:49:10 Odaym: hello Apr 11 14:49:18 sup jahn Apr 11 14:50:11 going well? Apr 11 14:51:22 yeap n u? Apr 11 14:51:28 yea Apr 11 14:55:29 toolbar or tabhost for android action bar on bottom... Apr 11 14:55:36 I am using api level 16 as my min Apr 11 14:58:52 or split action bar Apr 11 15:03:19 SimonVT toolbar requires min api lvl 21? Apr 11 15:04:32 Hi...where can I chek what API version I created my project with? u.u Apr 11 15:05:06 No, Toolbar is in appcompat Apr 11 15:08:10 yeah but then do I need to drop my api level down I keep getting this error? Apr 11 15:08:48 That made no sense Apr 11 15:08:52 Even after You need to use a Theme.AppCompat theme (or descendant) with this activity. Apr 11 15:09:11 Yes, you need to use that theme when you use AppCompat Apr 11 15:09:13 and I changed the theme too Apr 11 15:09:36