**** BEGIN LOGGING AT Thu Apr 23 02:59:59 2015 Apr 23 03:04:23 so im saving 3 integers, should i just do so in a .txt file? Apr 23 03:04:48 DadFoundMy: I'd use sharedpreferences Apr 23 03:25:44 Hey guys Ive read that you can upload images to the server via Base64 encoding, is that the best way? Apr 23 03:25:54 If I have the actual image file can I upload that to the server instead? Apr 23 03:30:20 upload as binary Apr 23 03:31:11 Then decode it in php? Apr 23 03:35:25 no idea why you'd want to involve base64 Apr 23 03:35:46 base64 is used when you need alphanumeric only, like email attachments Apr 23 03:35:56 for a direct server upload just send the binary directly Apr 23 03:36:33 I see OkHttp has an example of uploading a file idrectly Apr 23 03:36:37 Would that be a good option? Apr 23 03:37:04 http://stackoverflow.com/questions/19980832/how-to-upload-a-bitmap-image-to-server-using-android-volley-library Apr 23 03:37:19 okhttp would work also Apr 23 03:38:08 Ok, then I just need to grab it on the server side Apr 23 03:38:11 cool, thanks Apr 23 03:42:34 g00s: wow, that's quite the proguard(-use?) bug. any idea how that one happens? is it a flawed optimization? Apr 23 03:43:48 ? Apr 23 03:49:50 I cannot figure out why the onItemClick listener on the list does not work Apr 23 03:49:51 http://pastebin.com/vKPGfeeF Apr 23 03:50:12 All of my apps lose data in the background how what can i look at Apr 23 03:50:16 this is my code, and I tried with a simpleAdapter first as well same issue... so not sure what drawer wise is messing it up Apr 23 03:51:54 ronkrt: Define 'lose data in the background'. Apr 23 03:52:48 groxx no idea :( Apr 23 03:53:06 pfnQ is there any point to using proguard, if optimization and obusication are off ? Apr 23 03:53:13 *obfusication Apr 23 03:53:18 ugh Apr 23 03:53:23 For example im In irccloud app now. If i hit home or goto another app it disconnects.. Same for all my apps Apr 23 03:53:28 g00s, bug fixing bad roms Apr 23 03:53:39 g00s, as evidenced by appcompat and Samsung Apr 23 03:53:44 Lonesoldier728 maybe try listview.onitemclicklistener Apr 23 03:53:51 g00s, reducing method count is an obvious use Apr 23 03:54:14 pfnQ ok, so it still reduces method count if optimization = false ? Apr 23 03:54:20 g00s, yes Apr 23 03:54:24 ok thanks Apr 23 03:54:28 optimization is optimization Apr 23 03:54:34 shrinking isn't optimization Apr 23 03:54:42 ronkrt, not the place to ask Apr 23 03:54:44 masterjef it is a lstview mDrawer Apr 23 03:54:50 ronkrt: Hmm. Do you have "Don't keep activities" set in developer options? (Not sure whether it could cause exactly what you're seeing, but perhaps.) Apr 23 03:55:12 Lemme check Apr 23 03:55:23 mDrawerList.setOnItemClickListener(new ListView.OnItemClickListener ...) Apr 23 03:55:47 no Apr 23 03:56:56 Where could I find a list of MediaTypes Apr 23 03:59:05 The IANA should have a pagel Apr 23 03:59:06 page.* Apr 23 03:59:17 IANA? Apr 23 03:59:32 Indeed. :D Apr 23 03:59:38 Google knows all the things. Apr 23 03:59:41 Ok Apr 23 04:00:20 You got a link TacticalJoke Apr 23 04:00:45 Honestly, this is the best link: https://www.google.com/search?q=media+types Apr 23 04:00:54 Though I suspect that the IANA one is the best of the best. Apr 23 04:02:04 Whos the IANA Apr 23 04:02:10 ronkrt: running lollipop? Apr 23 04:03:41 TacticalJoke you know what mediatype I would use for an image? Apr 23 04:04:15 4.4.2 Apr 23 04:04:24 What kind of image? Apr 23 04:04:49 How can i tell i have lots of apps that gives me info Apr 23 04:05:26 Jepg Apr 23 04:05:30 Jpeg* Apr 23 04:05:44 image/jpeg, I think. Apr 23 04:07:14 Thanks Apr 23 04:07:20 But where would I find that Apr 23 04:07:26 I cant find a list of MediaTypes Apr 23 04:07:48 masterjef didnt change anything same issue Apr 23 04:09:23 TacticalJoke theres a tone of image/ but I dont see any image/jpeg Apr 23 04:11:58 Yeah, it's not on the IANA page. I'm not sure why. Check out the linked RFCs here, though: http://en.wikipedia.org/wiki/Internet_media_type#Type_image Apr 23 04:12:55 Its on the wiki page Apr 23 04:12:56 Weird Apr 23 04:13:01 Ill prob try it Apr 23 04:13:05 You think? Apr 23 04:13:57 anyone else got a clue why it is not getting called the onItemClicklistener issue Apr 23 04:14:16 http://pastebin.com/vKPGfeeF/ Apr 23 04:14:19 Lonesoldier728, i don't know then. it looks like you are performing some other initializations on the drawer in another method Apr 23 04:15:02 what kidn that can affect the behavior Apr 23 04:17:50 drose379: Actually, I think the "Name" entires are part of the media type: http://www.iana.org/assignments/media-types/media-types.xhtml#image Apr 23 04:18:10 I think the existence of 'jpeg' there under 'image' entails that 'image/jpeg' is valid. Apr 23 04:18:20 So image/jpeg is valid? Apr 23 04:18:43 Cool Apr 23 04:18:44 Thanks Apr 23 04:19:37 http://stackoverflow.com/questions/29813594/onsetitemclicklistener-not-working - that is the quesion Apr 23 04:21:24 Lonesoldier728: Maybe your adapter is returning clickable views? In any case, it's probably impossible to answer the question without more code. Apr 23 04:25:26 here I added the adapter code http://stackoverflow.com/questions/29813594/onsetitemclicklistener-not-working Apr 23 04:26:10 TacticalJoke let me know if more coding is necessary Apr 23 04:30:24 First of all, I would check whether it's really not working, by adding this to onItemClick: throw new Error("It worked."); Apr 23 04:30:25 Anyone here using a LG device? Apr 23 04:30:36 ronkrt stop asking dumbass questions Apr 23 04:31:23 There weird but I'm trying to learn everything i have access to edit/change Apr 23 04:31:49 they dont seem development related, so take it somewhere else Apr 23 04:36:22 hey guys/gals. Quick question. Where in the development process does the partition size get set? Apr 23 04:36:36 I assume it's during the flashing of the partition process. Apr 23 04:36:56 wrong channel Apr 23 04:37:11 which one should I ask in? Apr 23 04:39:11 bankai_ what are you up to lately Apr 23 04:40:17 same old thing.... been living in iOS land too though :-/ Apr 23 04:40:32 been living in that land far too long, gettin' rusty ;) Apr 23 04:40:37 hehe, you're going to like swift one way or the other ! Apr 23 04:40:49 swift is awful, i'm still doing java :P Apr 23 04:40:54 doh Apr 23 04:40:57 oh robovm? Apr 23 04:41:00 what do you mean throw new error I have a log being called on click which is not being called Apr 23 04:41:00 ya Apr 23 04:41:43 Lonesoldier728: Because throwing Errors is more noticeable. Apr 23 04:41:56 Also more fabulous. Apr 23 04:42:27 that's really weird -- you have all these debug fascilities, why not use them? set a breakpoint and debug Apr 23 04:43:04 In my experience (not necessarily with IntelliJ, but with any IDE), breakpoints aren't hugely reliable. Apr 23 04:43:20 They can also be very tedious in certain cases (not so much this one, I guess). Apr 23 04:43:48 TacticalJoke, for UX I prefer catch(Exception e){ emailUsUnkindly(e)} Apr 23 04:43:51 Throwing an Error, on the other hand, is simple and 99.9% reliable. Apr 23 04:44:36 But you cant glance over all your variables with a bp :) Apr 23 04:44:39 I haven't been great at using breakpoints yet. Too much Python... Apr 23 04:45:03 Gotta throw some more into AS and get used to it Apr 23 04:45:11 Yeah, the new "show all the variables" thing is nice. That certainly makes using the debugger nicer. Apr 23 04:45:36 danijoo: Are you able to reproduce the Samsung AppCompat crash? Apr 23 04:45:43 I ask because I think you posted on that bug. Apr 23 04:45:53 yep Apr 23 04:46:06 i think I even posted a zip with sourcefiles, didnt I?? Apr 23 04:46:12 cant remember Apr 23 04:46:12 danijoo: Do you know whether the issue is restricted to the use of ActionBarActivity/AppCompatActivity.setSupportActionBar? Apr 23 04:46:20 Or whether it happens regardless. Apr 23 04:46:26 or with spinner Apr 23 04:47:27 danijoo ... we were looking for yooooo Apr 23 04:47:34 :) Apr 23 04:47:58 "The SDK location for the Android Studio project is defined in the local.properties file in the sdk.dir setting or through an ANDROID_HOME environment variable." Apr 23 04:48:04 which one do you guys use ? Apr 23 04:48:24 No. I only remember that it happend onclick of the actionbar Apr 23 04:48:32 I let AS create the local.properties file. Apr 23 04:48:36 But I have it in .hgignore. Apr 23 04:48:42 im setting ANDROID_HOME Apr 23 04:49:00 I added the xml layout too if that helps Apr 23 04:49:07 danijoo so to your knowledge, what is the most authoritative answer to that whole thing Apr 23 04:50:25 g00s, you need to repackage appcompat ith proguard. The reason for this is there is a buggy version of the same class in Samsungs ROM. When you repackge under another name, it doesnt use samsung and is solved Apr 23 04:51:34 yeah ... just want to make sure i'm using the correct proguard magic, because i can't test it Apr 23 04:51:36 this one works for me: http://pastebin.com/EhS0d6SH Apr 23 04:51:48 and in #138 of that bug, others said it didn't work Apr 23 04:52:21 I have something in production with this proguard and toolbar + setSupportActionBar() Apr 23 04:53:13 for testing you could make a simple TestActivity, throw a toolbar in it and check it on appthwack Apr 23 04:53:24 what's the term for the dialog-like box that appears when you hold down on a message in facebook messenger (for example)? is there an API or is it just a custom view in a Dialog? Apr 23 04:54:37 do you mean a modal? Apr 23 04:55:05 yep that's it thanks qmr Apr 23 04:55:30 so basically it is just a custom view? Apr 23 04:55:55 I have made a total of 3 apps, and that was collaborating with an indian guy that knows how to java Apr 23 04:56:08 so I don't have a damn clue :) Apr 23 04:56:14 Damn just want to get this done so i can get some sleep heh Apr 23 04:56:25 oh nevermind I found it, there is a .setItems method to AlertDialog.Builder that I didn't know of Apr 23 04:56:41 duncannz: maybe http://stackoverflow.com/questions/6120567/android-how-to-get-a-modal-dialog-or-similar-modal-behavior ? Apr 23 04:59:55 Lonesoldier728, do you have any buttons in the list item vies Apr 23 05:00:05 something that could catch the click Apr 23 05:00:12 ill post that too Apr 23 05:00:40 Does anyone know if you have to be 18 for a merchant account? Apr 23 05:01:09 DadFoundMy, I think thats in their TOS, but I also think they wont show up and check your ID :P Apr 23 05:01:27 http://stackoverflow.com/questions/29813594/onsetitemclicklistener-not-working I updated to show it but danijoo no buttons but have a view Apr 23 05:01:44 danijoo: I have a friend who is an iOS dev. Same policy but they suspended their account when they some how figured it out Apr 23 05:01:52 ill risk it anyway Apr 23 05:02:43 Lonesoldier728, have you tried what the first answer suggested? This is what I would have came up with right no Apr 23 05:02:51 s/no/noww Apr 23 05:03:17 DadFoundMy businesses are people. form one if you start getting sales. Apr 23 05:03:18 man.. i cant write -_- its 7 in the morning and I lost some keys of my keyboard yesterday evening -_- Apr 23 05:03:21 It seems that when I change 'raw' resources and build my project, the changes in the raw resources are not reflected in my app unless I rebuild my project. How can I incrementally build my app with taking into account raw resources being changed? Apr 23 05:03:22 Yes it does not work danijoo Apr 23 05:03:56 Lonesoldier728: Are you 100% certain onItemClick is not being called? Apr 23 05:04:21 (That's kind of a trick question -- it's hard to be 100% certain of almost anything. :D) Apr 23 05:04:29 I guess I should ask whether you're around 99.9% certain. Apr 23 05:04:52 Well the Adding Drawer Items log is being printed Apr 23 05:05:05 but anything underneath it is not, meaning what shows up in onItemClick Apr 23 05:05:41 your drawerlayout looks weird. Apr 23 05:06:02 it has more than 2 childs in this SO post Apr 23 05:06:51 a relativelayout, a toolbar, listview, another relativelayout, and then the file ends without a Apr 23 05:07:08 TacticalJoke lol, these guys are just rude Apr 23 05:07:44 between pandanomic, questionseverythang, the quare root of their IQ has to be larger than IQ itself Apr 23 05:07:45 oh it got cut off danijoo it is in there Apr 23 05:08:10 Lonesoldier728, still. I didnt know a drawerlayout can own more than two items (side and main view) Apr 23 05:09:51 That Questions guy usually gets downvoted like crazy. :D Apr 23 05:10:10 Well I tried to remove the first relative layout and it still has the same issue Apr 23 05:10:40 hmm gradle doesn't want to compile google play services correctly Apr 23 05:10:44 The thing I like about this channel is that people (generally) get corrected for being wrong. Wrongness isn't tolerated, and that's valuable to everyone. Apr 23 05:11:08 "could not resolve all dependencies Apr 23 05:11:39 is there somethign wrong with the support of v4. drawer layout vision and include support .7 Apr 23 05:11:53 TacticalJoke: yeah it seems that mostly everyone in the chan is open to the idea that they can be wrong, and welcome that fact Apr 23 05:11:58 I dont think v7 has it Apr 23 05:12:54 it does not have it but since navigation drawer was depreciated i was told to use a toolbar instead... so not sure if that has something to do with it Apr 23 05:12:58 Lonesoldier728: Hmm, in such cases I often just create the simplest reproducible project. Apr 23 05:13:10 And if I can reproduce it there then post it; else, figure out why I can't reproduce it ther.e Apr 23 05:13:25 Lonesoldier728, I think you mistake navigationdrawer for actionbar here :p Apr 23 05:14:28 g00s: reddit is annoying like that. Apr 23 05:14:32 what do you mean danijoo Apr 23 05:14:39 Half the time when I get replies like that I wanna scream at the person. Apr 23 05:14:51 I mean NavigationDrawer is not deprcated for toolbar, but actionbar is Apr 23 05:15:03 and I think it has to do with something that is overriding it since everytime i click on something the drawer closes Apr 23 05:15:20 ooh well... Apr 23 05:15:24 sec. Apr 23 05:15:27 When I use their own navigation drawer template danijoo... the navigation drawer is depreciated Apr 23 05:17:00 i THINK the reason is that navdrawer is catching the touch event, Apr 23 05:17:13 the reason for this is that it does contain more than 2 views. Apr 23 05:17:43 a typical nav drawer has 2 viewgroups in it: maincontent + sidecontent Apr 23 05:17:45 So should I place on ultimate view underneath it Apr 23 05:18:08 try to wrap your stuff in 2 Framelayouts, this should fix it (maybe) Apr 23 05:19:05 i think right now you have stuff in the side layout that you dont want to be there, so instead of clicking the list, you click something else thats in the sidelayout and open/close it Apr 23 05:19:59 TacticalJoke can the moderators see who exactly is downvoting who ? Apr 23 05:20:01 i hope this helps you. Have to go now unfortunatly. Some profs thinks 8 oclock is perfectly fine for a course in statistical mechanics Apr 23 05:20:04 well that worked danijoo Apr 23 05:20:15 :) Apr 23 05:20:15 but now yeah what do i need to wrap the top in because Apr 23 05:20:20 danijoo: early risers are winners Apr 23 05:20:22 the side listview does not go away Apr 23 05:20:51 g00s: Not as far as I know. Apr 23 05:20:58 qmr, In my definition 8 oclock isnt early, its still _night_ Apr 23 05:21:18 lol danijoo Apr 23 05:22:53 danijoo: Your definition is wrong. Apr 23 05:23:38 http://www.stevepavlina.com/blog/2005/05/how-to-become-an-early-riser/ ... but this is all OT :P Apr 23 05:24:54 danijoo ugh, 8 is too early. unless you go for a run at 6 to get juices flowing :) Apr 23 05:25:37 but yeah, peak times for cognition, circadian cycle, etc - not so good Apr 23 05:27:29 This is interesting: http://www.reddit.com/r/programming/comments/33i9kj/c_7_work_list_of_features/ Apr 23 05:27:56 Dat top comment doe. Apr 23 05:31:38 <_genuser_> dangit, you guys have created thsi community where anybody can just talk and get instant reponse. Apr 23 05:32:15 <_genuser_> now I want the flstudio community to be the same but it's all online slow response times,e tc. etc. Apr 23 05:33:08 <_genuser_> CedricBeust: yo, you around? Apr 23 05:33:59 <_genuser_> lol nobody around? Apr 23 05:35:09 :o Apr 23 05:35:22 lol "instant response" :P Apr 23 05:35:36 <_genuser_> hey were you around yesterday when we were discussing linkedin recruiters? Apr 23 05:35:39 <_genuser_> Ashiren: ^ Apr 23 05:35:41 algorithmic question, can i somehow improve this? http://pastebin.com/cgku2p4x Apr 23 05:35:51 _genuser_: no Apr 23 05:37:00 A switch statement might look nicer. Apr 23 05:38:05 Although Java's switch-statement syntax isn't the best ever. Apr 23 05:38:20 switch with fall through… not sure I’d pick that over a simple if Apr 23 05:38:41 <_genuser_> Ashiren: seems like a straight forward function. Apr 23 05:39:16 Are those placeholder values or real values? Apr 23 05:39:22 well i meant could be this more performant? Apr 23 05:39:35 real values Apr 23 05:39:54 <_genuser_> I wouldn't mind a switch that can keeping adding to the cases values switch(n){ case 33,44,55: return 0; break; case 43,54,65: return 1; break; default: return 0; break; } Apr 23 05:40:07 No need for the "break;", BTW, there. Apr 23 05:40:10 "return" does that. Apr 23 05:40:15 when i go to https://github.com/googlesamples ... seems like a hodgepodge of stuff Apr 23 05:40:17 ok thx Apr 23 05:40:18 <_genuser_> I realize that. it's a habbit now. Apr 23 05:40:27 But yeah that'd be nice. :D Apr 23 05:40:28 go, xamarin, ... Apr 23 05:40:37 how do we find android stuff in there Apr 23 05:40:59 <_genuser_> CedricBeust: so yet another recruiter sends me "Noticed Solutions Architecture in your profile" email. Apr 23 05:41:18 <_genuser_> portal and mobile apps.... Apr 23 05:42:46 Kotlin is even nicer: fun almostGoal(i: Int) = when (i) { 33, 44, 55 -> 0; 43, 54, 65 -> 1; else -> -1 } Apr 23 05:42:52 The semicolons aren't needed with line breaks. Apr 23 05:43:08 <_genuser_> I hear about kotlin quite a few times. Apr 23 05:43:14 <_genuser_> would have to check it out sometime. Apr 23 05:45:26 http://try.kotlinlang.org/ is nice. Apr 23 05:51:32 I am using retrolambda in android studio but I have to force a gradle update often just so that the languag level changes are detected. Anyone facing the same issue? Apr 23 05:56:21 * g00s glad he avoided retrolambda Apr 23 05:56:32 been itching to find a reason to use retrolambda Apr 23 05:56:44 g00s, just set language level to 8... Apr 23 05:56:48 and it works Apr 23 05:57:08 except stupid intellij intentions end up thinking you have access to 8 rt Apr 23 05:57:24 TacticalJoke: http://try.kotlinlang.org/#/UserProjects/100002916784841-814843808/1000029167848411240442477 Apr 23 05:58:45 i have my language level set to 7 but AS still in some cases gives me a tip "This can be replaced by lambda" Apr 23 05:58:54 :) Apr 23 05:59:13 that little lightbulb should be trollface Apr 23 06:00:10 g00s, it's funny how you're glad about not using tools to make development easier Apr 23 06:00:54 CedricBeust: I'm confused. Isn't that the same as "int[] l = { 1, 2, 3 };"? :) Apr 23 06:01:34 thats cool, so you can share live code snippets between people ? Apr 23 06:01:49 TacticalJoke: in kotlin? Apr 23 06:02:11 All I'm seeing is "val l = intArray(1,2,3)". Apr 23 06:02:25 oh let me save Apr 23 06:02:27 reload Apr 23 06:03:07 Better? Apr 23 06:03:20 CedricBeust_, I hate that it keyword Apr 23 06:03:48 What keyword? Apr 23 06:04:17 pfnQ btw, it seems you can use junit 4 now using android Apr 23 06:04:18 Yeah, that's nice. :) Apr 23 06:04:32 CedricBeust_, it Apr 23 06:04:37 pfnQ without much hassle Apr 23 06:04:43 https://developer.android.com/tools/testing-support-library/index.html Apr 23 06:04:51 unless i am reading this wrong Apr 23 06:04:57 pfnQ: I’ve liked it ever since I saw it for the first time in Groovy 10 years ago Apr 23 06:05:08 I like it when the compiler helps me from having to come up with names Apr 23 06:05:27 :D Apr 23 06:05:58 pfnQ: I like “let” for that reason too Apr 23 06:07:53 My Kotlin code always ends up Java-like: http://pastebin.com/MbBYA07i Apr 23 06:08:12 Though, to be fair, the equivalent Java code would be more wordy. Apr 23 06:08:18 i think in arnoldC let is something like "HERE IS MY INVITATION" Apr 23 06:13:58 CedricBeust_, let is ok though, rather than it being a place holder Apr 23 06:18:45 * _genuser_ looks away for 30min, looks back - conversation still about the word "let". Apr 23 06:19:02 <_genuser_> are you guys still debating the merits of the word "let" in context of your language? Apr 23 06:21:19 "PCNA would significantly increase the National Security Agency’s (NSA’s) access to personal information, and authorize the federal government to use that information for amyriad of purposes unrelated to cybersecurity" oh boy Apr 23 06:24:23 _genuser_: No debate, it just came up Apr 23 06:25:04 who was. debating let? Apr 23 06:25:24 commonly used for variable binding in numerous languages Apr 23 06:26:10 <_genuser_> is this for kotlin or something else? Apr 23 06:27:21 Kotlin has its own version of let Apr 23 06:27:31 which is an extension function and not a keyword Apr 23 06:28:26 <_genuser_> ok, this recruiter business is pretty cool. you just setup a linkedin and watch them buzz around like flies. Apr 23 06:28:27 https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/util/Standard.kt Apr 23 06:30:04 So much power in one line: public inline fun T.let(f: (T) -> R): R = f(this) Apr 23 06:30:15 not really Apr 23 06:31:26 one thing i've noticed, you can't convince scala people of kotlin power Apr 23 06:31:39 TacticalJoke: yeah Apr 23 06:31:42 CedricBeust, let in that context feels weird Apr 23 06:32:08 g00s, kotlin is a far more simplistic language Apr 23 06:32:39 Scala people usually don't see much value in "less" in the sentence "less is more" Apr 23 06:34:58 pfnQ: I am using retrofit and rxJava so retrolamba was a very small risk ;-) Apr 23 06:35:17 vedu, I never said it had much risk Apr 23 06:35:29 I would use it the next opportunity I get Apr 23 06:35:42 I haven't touched any java projects in a long while Apr 23 06:35:58 I set in build.grade: compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8} Apr 23 06:36:04 wow, this blu vivo air phone looks nice at 5.1 mm thin at $200 http://www.androidcentral.com/sites/androidcentral.com/files/styles/xlarge/public/article_images/2015/01/blu-vivo-air-low-angle-hand-hero.jpg Apr 23 06:36:07 except my current project which is already far too entrenched to introduce retrolambda Apr 23 06:36:32 pfnQ: How can I set the "language level" as you said? Apr 23 06:37:21 vedu, project structure dialog Apr 23 06:37:40 I also don't use As, so I'm not sure on that Apr 23 06:37:54 I hear as does stupid things to the project structure dialog Apr 23 06:44:35 isn't there an attribute you can put on textview so that AS previewer shows some text ... Apr 23 06:44:39 pfnQ: but you were right :) Apr 23 06:44:58 tools:text, or something. Apr 23 06:45:37 ah thanks Apr 23 06:47:13 <_genuser_> https://securustech.net/ Apr 23 06:47:32 <_genuser_> lol way to put an african american family on the front page when talking about connecting to inmates Apr 23 06:51:17 er, "statistics" ? Apr 23 06:53:03 nope http://www.bop.gov/about/statistics/statistics_inmate_race.jsp Apr 23 06:55:49 capella did you see this one http://arxiv.org/pdf/1502.07373v2.pdf Apr 23 06:56:25 oooh ah! Apr 23 06:57:20 I just spent two days cobbling a js test suite involving Promises, Asynch Tasks, method generators, .... ot sure how this stuff *ever* works XD Apr 23 06:57:42 this is cool http://techreport.com/review/28147/intel-compute-stick-miniature-pc-reviewed Apr 23 06:57:52 google should come out with an android stick we can use for dev Apr 23 06:58:53 I was thinking about that Apr 23 06:59:04 I noticed the intel stick is going on sale formally now Apr 23 06:59:13 its only got 2gig of ram is the problem Apr 23 06:59:21 otherwise it could be perfect Apr 23 06:59:42 tho I would like a pure linux one, which I think will come soon actually Apr 23 06:59:50 that one only has 1G Apr 23 06:59:55 ubuntu Apr 23 07:00:00 ah ok Apr 23 07:00:15 its funny really, my first thought was using it for dev. Apr 23 07:00:42 I am going to get one at some point tho Apr 23 07:00:50 coool toys! hadn;t seen that one yet Apr 23 07:01:08 :) Apr 23 07:01:54 all they need do imo is up the ram to 4gig Apr 23 07:02:13 it supports a microsd card so storage space is fine. Apr 23 07:03:10 but ya, a chrome-stick preloaded with a AS dev environment would be ideal I think. Apr 23 07:04:22 We have determined that your app uses a library or SDK (com.google.android.gms.internal) that is in violation of the Developer Program Policy. Anyone knows what causes this? Apr 23 07:04:32 what is that "memorygram" thing - looks like an oscilliscope .... everything is better with lasers and oscilliscopes :p Apr 23 07:09:57 oh bummer, that stick has a fan Apr 23 07:11:53 I wonder how loud it is Apr 23 07:12:10 those tiny dudes are the worst Apr 23 07:12:14 me too Apr 23 07:12:55 Hmm, isn't it more sensible to avoid layout inflation entirely for ListView/RecyclerView stuff? Apr 23 07:16:11 Or, to put it in meme form: https://i.imgflip.com/kjpvg.jpg Apr 23 07:17:59 i know how to make phone call programmatically. can i play some sound to the call? Apr 23 07:35:18 is possible to implement this solution in my ant build system http://www.reddit.com/r/xposed/comments/2sfdjx/help_basic_xposed_tutorial_causes/ Apr 23 07:38:11 what's up friends Apr 23 07:40:30 nothing much, looking to implement this http://www.reddit.com/r/xposed/comments/2sfdjx/help_basic_xposed_tutorial_causes/ in my ant build system if it's possible Apr 23 07:41:25 no idea what that even is Apr 23 07:42:32 ahh, I'll wait for g00s or someone who can give me ruling about possiblity Apr 23 07:45:47 * g00s knows nothing about xposed Apr 23 07:46:48 you're sol now! Apr 23 07:49:57 OK Apr 23 07:50:03 must be my lucky day Apr 23 07:50:17 I think I'll start looking for project.properties file mods Apr 23 07:50:55 using Xposed is not what matters, but rather the solution [The solution is go to File -> Project Structure -> Dependencies and set the lib to "provided" instead of "compile"] Apr 23 07:54:54 basically, I want to use the jar in build step Apr 23 07:55:36 but not interested in including it in apk Apr 23 07:55:49 hmm, is there any updates from the latest dev AS to RC? Apr 23 07:57:52 something on lines of http://fr33kk0mpu73r.blogspot.com/2014/11/advanced-android-excluding-jars-from-apk.html ;-) Apr 23 08:24:10 hmm, ant.properties isn't playing nice Apr 23 08:24:42 java.compiler.classpath is valid for setting the compiler's classpath, right? Apr 23 08:37:41 how can I prevent the device from going to sleep, but still closing the screen Apr 23 08:37:53 I noticed that when I shutdown the screen, my app stops as well Apr 23 08:38:01 I would like to continue doing background stuff Apr 23 08:40:05 What can I do to prevent my build server from failing every time I update my play services? Apr 23 08:42:43 Do you guys have any links to pages that explain how to make an app look good visually? I'm making this app now with viewpager, and I'm making it very visual, but alass im not very good at it Apr 23 08:44:15 Build server crashes with this error message: http://pastebin.com/ZbNJcFP3 after we updated play services. I would like to find a fix that wouldn't require our intervention after every update of the libraries. Apr 23 08:44:33 jutsi, material design guidlines could help you Apr 23 08:45:11 Syzgy I know, but I'm not familiar with the terminology, so my googling doesn't yield very tangible results regarding the subject Apr 23 08:48:17 can't really help you beyond "look up guides and tutorials" and mentioning a specific one Apr 23 08:48:35 ya or style guide Apr 23 08:53:15 Marlinski: you mean a wakelock Apr 23 08:54:32 partial wakelock even Apr 23 08:55:22 how to solve a problem when I want TextView - A and TextView in B and TextVew A is wrap, TextView B is match so B is never wrapped but A is wrapped instead? Because if A is too long B goes to two line and I would like to A to go two lines Apr 23 09:22:44 Is it a good idea to use setUserVisibleHint with ViewPager for fragments? Apr 23 09:31:40 A gitrepo submodule requires build tools verion 21.1.1, when I look into the sdk manager, 21.1.2 is the clostest version available. What can I do to get 21.1.1 or will it work with 21.1.2? Apr 23 09:43:02 hello, i have some problem to use jacoco plugin from an app to test my lib and include classes and src Apr 23 09:43:15 does someone have configured a situation like this ? Apr 23 09:45:37 what's the limit on round corners? I have mine set at 10dp Apr 23 09:47:54 i have a home screen widget containing a textfield with a time, that i want to update every minute. google tells me i should look into alarmmanager and services, but do i really need to create a service for this? Apr 23 09:58:47 One-Man-Bucket i think time management is much better suited for this Apr 23 09:59:25 using a timer or similar Apr 23 10:00:34 Hi all. I have an object in my Activity which I want to use in a broadcast receiver. What is the best option? Or should this object be a singleton class? Apr 23 10:01:13 jutsi: what do you mean? Apr 23 10:02:52 Hey, I'm trying to resume an activity from a pending intent in a notification Apr 23 10:03:02 what's the correct configuration of flags for that? Apr 23 10:03:21 I've tried New Task in the Intent and UpdateCurrent in the PendingIntent Apr 23 10:03:36 A gitrepo submodule requires build tools verion 21.1.1, when I look into the sdk manager, 21.1.2 is the clostest version available. What can I do to get 21.1.1 or will it work with 21.1.2? Apr 23 10:03:38 but it just seems to launch a new activity no matter what I do Apr 23 10:03:49 FrancescoV: make it parcelable and do intent.putExtra() Apr 23 10:04:21 hello, security question is there a way to copy an android app installed on device1 to a device2 (COPY the app as is with all its configuration etc) considering both apps are identical Apr 23 10:04:40 Ashiren, are there other options? the object does some networking stuff Apr 23 10:04:53 omg Apr 23 10:05:46 what's wrong? Apr 23 10:05:58 eventually youll end up with singleton then ^^ Apr 23 10:06:42 pagios: yes, if you have root Apr 23 10:06:46 oké thanks, but why the 'omg' reaction? Apr 23 10:06:55 thats nothing Apr 23 10:06:59 im emotional today Apr 23 10:07:04 pagios: koush had a backup app that did that Apr 23 10:07:28 root isnt neccessary, afair there is adb command for backup and restore Apr 23 10:08:01 Ashiren: true, but is that to any device or just the one they came from? Apr 23 10:08:10 i dont know Apr 23 10:22:09 I'm using a custom xml file as my background for rounding the corners.. how would i go about adding an image? Apr 23 10:22:24 *an image as background Apr 23 10:50:59 getDefaultSensor(Sensor.TYPE_ACCELEROMETER) seems to return null on two devices. I have in my manifest. Also specs of devices (some T736 and polaris-p1 !?) say accelerometer is there as well Apr 23 11:00:44 I am getting a `undefined local variable or method `byebug'` after adding byebug to my gemfile Apr 23 11:05:51 http://stackoverflow.com/questions/29821546/navigation-drawer-action-bar-depreciated Apr 23 11:06:24 What am I suppose to replace this line with actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); Apr 23 11:07:56 I have this relativeview with a background image.. but i also want rounded corners, how would i go about doing that? Apr 23 11:15:50 I wonder why such a simple thing isn't buildt into android Apr 23 11:17:19 hi guys, I want to set my Button border top to 1px black color, and the 3 others border to transparent Apr 23 11:17:24 any tips ? Apr 23 11:18:03 I'm talking about Button, not ImageButton Apr 23 11:18:12 yes, make a custom xml file, put it into drawable folder and set each of the corners individually Apr 23 11:19:26 Or atleast im pretty sure thats how its done, i did something similar with corners Apr 23 11:20:26 what's the recommended way to have a persistente field in a (very small) intentservice? Apr 23 11:21:13 i have a service that updates a widget periodically, and occationally (on user input in my activity) changes what it puts in the widget Apr 23 11:21:43 so i need to store a long somewhere that's persisted changed on user input and persisted between the periodic updates Apr 23 11:23:13 Hi! Apr 23 11:30:27 One-Man-Bucket: SharedPreferences will do Apr 23 11:31:13 hello. does android 2.3 have any world writable directories if i have no sd card inserted? Apr 23 11:36:39 I'm having trouble with maps api Apr 23 11:36:47 I followed the official guide Apr 23 11:37:07 and I just get a blank fragment Apr 23 11:44:01 13:41:00 inf $ d33tah: /data/local :v Apr 23 11:44:39 How can I limit the input of my EditText to a certain length? I tried android:maxlLength="10" in the XML, but I can still input longer than that. Apr 23 11:45:05 icedp: i can't put the long in the widget somehow? Apr 23 11:45:29 jutsi, ok thanks for the path Apr 23 11:46:15 no problem :) Apr 23 11:47:42 hi Apr 23 11:48:59 I'm building an app with NDK, and I've got a weird problem with its shared libraries: when calling readelf -d libmain.so, almost all libs are specified just by their name, except one, "./obj/local/armeabi/libpython.so". Why is that? How do I fix this? Apr 23 11:52:07 where do I even look for this? Apr 23 11:54:23 isn't armeabi the emulator? Apr 23 11:57:09 jutsi: dont ask me, i'm just building the damn thing :D Apr 23 11:57:53 How can I set the max length of an EditText? Apr 23 11:58:02 yeah i recall having to use the armeabi image because the haxm for intel didn't work for me for some reason Apr 23 11:58:29 barq android:maxLength="10" Apr 23 11:58:44 jutsi: dont ask me, i'm just building the damn thing :D Apr 23 11:58:58 I just wanna know why it's looking for the lib in the wrong place Apr 23 11:59:23 jutsi: How come I can still enter more than 10 characters when I use that line? Apr 23 11:59:24 and failing that, why doesnt that dir get packaged up Apr 23 11:59:39 kephu sorry I'm not familiar with your question.. it sounds very niche Apr 23 12:00:34 try using setFilter programmatically and add it from there Apr 23 12:00:37 barq Apr 23 12:01:07 I tried that as well. The only thing that happens is that my TextWatcher no longer works if I enter more than 10 characters, but I can still enter them. Apr 23 12:01:36 jutsi: yeah i imagined so Apr 23 12:01:52 okay what about the packaging, can I make ant put that obj directory inside the .apk? Apr 23 12:02:19 barq you enter these with the input keyboard that pops up? Apr 23 12:02:32 jutsi: Yes. Apr 23 12:02:51 barq then do an if check and disable the keyboard if the view has more than 10 chars Apr 23 12:03:08 in addition to the other solution, of course Apr 23 12:03:22 You mean within the TextWatcher? Apr 23 12:05:31 It's odd. In other EditTexts the maxLength in the XML blocks the keyboard. Apr 23 12:05:44 Maybe because I am using a custom EditText that extends EditText? Apr 23 12:06:29 barq that is a possibility, however unless you've overwritten certain methods it should still function like normal Apr 23 12:07:48 jutsi: I am overriding onTextChanged Apr 23 12:10:15 barq http://stackoverflow.com/questions/24822059/android-limited-number-of-characters-in-edittext Apr 23 12:10:19 could help you Apr 23 12:26:37 I tried setFilters(new InputFilter[] { new DigitsKeyListener(Boolean.FALSE, Boolean.TRUE), new InputFilter.LengthFilter(10),, but I can still punch in more than 10 characters. Apr 23 12:40:45 So Im trying to create a scoped object graph using dagger (1.2) Apr 23 12:41:04 so i plus my additional module Apr 23 12:41:25 but when compiling, i get an error that it cant inject my provided dependancy :( Apr 23 12:41:28 wtf guys? Apr 23 12:42:07 Error:(56, 14) error: No injectable members on com.squareup.sqlbrite.SqlBrite. Do you want to add an injectable constructor? required by com.example.ui.BaseActivity for com.example.ExampleModule Apr 23 12:45:57 The problem is that I want to limit the input text from the keyboard only, but want to be able to set a longer text programmaticallly. Apr 23 12:46:11 If I use an InputFilter it will filter both cases. Apr 23 12:50:20 Should you add scrollview as the rootview? Apr 23 12:55:54 If I have a fragment that fills an entire screen, I can presumably just fill a dialog with it as well, right? Apr 23 13:00:35 I have a ListView that I'm trying to .add() to using EditText.getText() Apr 23 13:00:52 but when you add a new item to the array that it's connected to Apr 23 13:01:07 all of the existing entries also update to the text of the most recent one Apr 23 13:01:12 anyone know why? Apr 23 13:11:08 Syzygy: you can use DialogFragment which can be shown both ways Apr 23 13:11:25 alright, thanks Apr 23 13:12:11 nevermind, I'd implemented it wrong. Apr 23 13:12:35 How would i go about making a stylish line underneath one of my titles? Apr 23 13:14:00 for anyone else curious, I wasn't calling EditText.getText().toString(), just .getText() Apr 23 13:14:29 which I think meant I was passing a refrence to the function into the array, meaning it was updated every time it was run (????) Apr 23 13:30:48 Hey all. I'm having an issue: SurfaceHolderCallback.surfaceChanged() is called, but holder.getSurfaceFrame() has different width and height. What's wrong? How do I detect the surface size? Apr 23 13:53:52 I am using ExifInterface on Cursor and still the orientation is always 0, any ideas? Apr 23 14:00:22 I got this error on my first android app Apr 23 14:00:25 Errors occurred during the build. Apr 23 14:00:25 Errors running builder 'Android Resource Manager' on project 'HelloRam'. Apr 23 14:00:27 java.lang.NullPointerException Apr 23 14:00:46 are there any known reasons? Apr 23 14:02:13 anahumar: some object you use is null :) Apr 23 14:02:21 http://snag.gy/8XEQ1.jpg Apr 23 14:02:38 anahumar: ah, not when you run your app :) Apr 23 14:02:41 appel1: what does that mean? I didn't use anything yet Apr 23 14:02:51 I'm still in the process of creating the project Apr 23 14:02:54 anahumar: sorry, read to quickly Apr 23 14:03:05 :) Apr 23 14:03:18 anahumar: why not start with Android Studio? Apr 23 14:03:47 do you guys know any url for downloading free icon packages with different sizes? Apr 23 14:04:12 appel1: because the school task goes like this Apr 23 14:04:25 eclipse + sdk + adt + phonegap Apr 23 14:05:36 anahumar: weird considering the eclipse plugin isn't maintained any more and Android Studio is what Google is actively supporting. Apr 23 14:06:11 strangefully .. it created the mentioned prject even though I aborted the mission Apr 23 14:06:24 now I can see it in the project explorer and workspace Apr 23 14:06:29 crazy eclipse Apr 23 14:06:34 anahumar: but if only eclipse is supported by phonegap I guess that is what you must use. no idea about the error. Apr 23 14:07:22 why is it no longer mainted? are there any references? Apr 23 14:07:44 anahumar: https://developer.android.com/sdk/installing/migrate.html Apr 23 14:10:42 Is there a way to do "action search" with my hard keyboard in Genymotion Apr 23 14:13:49 appel1: what website(s) should I be aware of to start reading tutorials and examples for android development Apr 23 14:17:27 what is "appcompat_v7" I managed to create an android testApp then I found this extra "appcompat_v7" project!!! Apr 23 14:20:22 Anyone with experience with Exif and orientation? I am using Cursor and ExifInterface and orientation is always 0 Apr 23 14:24:53 hmm, i have a widget with a button and a textview. when a intentservice updates the widget, the onclicklistener bound in the widgetproviders onupdate unbinds Apr 23 14:27:09 greetings Apr 23 14:28:33 it seems to work if i bind the onclicklistener to the button in my service as well Apr 23 14:31:52 Can't get searchView to full width in Toolbar. it has actionLayout with SearchView whose layout_width = match_parent Apr 23 14:32:13 strangely setting huge value like 10000dp fills (and overflows) toolbar Apr 23 14:33:46 icedp, go into developer settings, turn on view border display, and see wht's shoving it? Apr 23 14:42:27 I'm not sure what doesn't want to expand http://t.sql01.com/sc/5066aefa_1429800108.png dragorn Apr 23 14:43:30 looks to me like whatever your spinner is is set to something like match parent and not wrap content Apr 23 15:22:15 what would be the proper unix directory for a shared Android SDK Apr 23 15:24:14 yiati, man hier Apr 23 15:24:30 /usr i would say Apr 23 15:24:57 adq: nice man page, thanks. Yeah i was thinking /usr/local/lib? Apr 23 15:25:23 yiati, /opt would likely be a cool place too Apr 23 15:25:29 I doubt the android sdk only contains few .so to be dropped into /usr/local/lib Apr 23 15:26:26 yeah some ppl might use /opt too, philosophy differs if you are on UNIX (BSD per example) or Linux for that iirc Apr 23 15:26:36 Yeah I'm on BSD Apr 23 15:26:54 which the man page for hier does not seem to reference /opt Apr 23 15:27:17 on bsd indeed Apr 23 15:27:20 on linux it does Apr 23 15:27:38 on macosx (despite a bsd) they used to recommend it (for macports darwinbuild iirc too) Apr 23 15:32:01 Hi Everyone, I've encoutering a strange issue ... I'm coding a very simple animation, and it's working fin, but when I add a listener to that animation, it doesn't work anymore. What should I do? Maybe I'm missing something to do Apr 23 15:32:02 Thx Apr 23 15:34:01 Tuly-, can you pastebin the snippet? Apr 23 15:34:08 Of course Apr 23 15:38:14 http://pastebin.com/6jDVQB2J Apr 23 15:39:40 I've pasted only the code needed Apr 23 15:40:17 Tuly-, unsure if this will help but try just use hideSettingsAnimation.withEndAction(... hideLayout(mClassLayout); ...); Apr 23 15:40:42 I'll try it Apr 23 15:40:46 Tuly-, http://developer.android.com/reference/android/view/ViewPropertyAnimator.html#withEndAction(java.lang.Runnable) Apr 23 15:43:17 Tuly-, do you define a delay or duration, or is it defined in your animation? Apr 23 15:43:35 Can i set the animatio with view.setANimation and then run all with view.animate ? Apr 23 15:44:28 got to go , back in 10 minutes, thx for all i you'' not be here when i'll be back Apr 23 15:47:47 hey all. What does it mean when someone says “our android app is developed by VC, not eclipse”? Apr 23 15:49:46 VS maybe? Apr 23 15:51:52 VS = Visual Studio, so maybe Xamarin instead of native Android Java SDK Apr 23 15:54:23 hmm Apr 23 15:54:29 why would anyone want to do that?? Apr 23 15:54:50 I got a demo app for an SDK and it blew up in a firey ball of dependency issues Apr 23 15:55:09 anywheresoftware.b4a Apr 23 15:55:52 well I guess that answers it Apr 23 16:02:59 I've added an external library with gradle , and it compiles and works fine. Can I now easily modify this library, and have it use the modified version? Apr 23 16:03:22 or do I need to change my gradle setup and import the library code manually into my project or something? Apr 23 16:06:50 johnflux_, gradle libraries you added as dependency are compiled Apr 23 16:06:54 so you can't easily modify them Apr 23 16:07:09 you'll have to include them as project module, or prepare your own modified distribution Apr 23 16:07:22 Mavrik: thanks Apr 23 16:07:27 Hi, how can i set an animation declared in an xml with an end action ? Apr 23 16:13:33 hello i have a couple of questions about the bar at the top ( http://www.droid-life.com/wp-content/uploads/2013/05/new-gmail.png ) Apr 23 16:13:43 ok there are 3 buttons on the right hand side Apr 23 16:14:15 when i declare new activities in my android manifest, whatever value i set to android:label is displayed on that top bar Apr 23 16:14:35 my questions are: what is that bar called? how can i change the text on that bar? and how can i add buttons to that bar Apr 23 16:19:51 aspire: should just be getActionBar().setTitle("New Title"); Apr 23 16:20:04 aspire it could be an actionbar but it’s probably a toolbar Apr 23 16:20:13 oh its called an action bar? Apr 23 16:20:15 nice timing by the way.. Apr 23 16:20:23 mhm ok JemsBond thanks Apr 23 16:20:25 how do i add buttons to it? Apr 23 16:20:26 or it could be a getSupportActionBar() Apr 23 16:20:39 yeah but I think Android is tryign to push for us to use Toolbar Apr 23 16:20:41 eh, im writing apps with api level 21 Apr 23 16:20:52 aspire: I'm not very experienced with adding buttons, but in my experience I added a button as a menu/settings button Apr 23 16:20:59 mhm Apr 23 16:21:02 it is Apr 23 16:21:08 So look at how Google has the menu button and implement your new button in that way Apr 23 16:21:25 you inflate the buttons like you would in a menu Apr 23 16:21:29 or you add them to the toolbar Apr 23 16:21:58 but how Apr 23 16:21:58 aspire “The new v21 appcompat update provides the API and feature-set that is up to date with Android 5.0. Android 5.0 introduces a new Toolbar widget. This is a generalization of the ActionBar pattern but gives you much more control and flexibility in using it.Oct 17, 2014" Apr 23 16:22:00 do i do that Apr 23 16:22:02 read that Apr 23 16:22:07 use Toolbar Apr 23 16:22:22 but if i use a toolbar that means i have to add it to my layout, yes? Apr 23 16:22:27 yes Apr 23 16:22:28 Yes Apr 23 16:22:31 that also means i'd have to hide the action bar? Apr 23 16:22:35 so i don't have 2 bars Apr 23 16:22:41 just include it Apr 23 16:22:45 so i guess my next question is how do i hide the action bar Apr 23 16:22:47 aspire: hold on, I can give you a sampel layout Apr 23 16:22:47 no Apr 23 16:22:53 you have to restructure your program Apr 23 16:22:56 o? Apr 23 16:22:57 to not use actionbar Apr 23 16:23:02 thats what I had to do Apr 23 16:23:18 I mean it depends on your implementation btu I had a baseActivity which used supportactiobar Apr 23 16:23:32 oh err Apr 23 16:24:03 all i wanna do is show an 'add' button in the action bar haha Apr 23 16:24:06 http://pastebin.com/K0rDY4yY Apr 23 16:24:06 a little plus sign Apr 23 16:24:07 thats it Apr 23 16:24:08 aspire ^ Apr 23 16:24:16 That is how you would implement the toolbar Apr 23 16:24:27 o Apr 23 16:24:48 yeah its pretty simple Apr 23 16:24:49 Your layout xml will likely differ from mine, but see the include portion at the bottom Apr 23 16:24:57 JemsBond just a question Apr 23 16:25:00 Sure Apr 23 16:25:00 do you use the ui designer? Apr 23 16:25:08 I do, although it isn't great Apr 23 16:25:18 I usually use it to get rough placement Apr 23 16:25:18 how did you add a recycler view using it Apr 23 16:25:22 then edit the XML by myself Apr 23 16:25:25 ahh Apr 23 16:25:32 I add the recyclerview in the XML, then edit it using the ui designer Apr 23 16:25:42 The UI designer implementation is still a little rough Apr 23 16:25:47 It'll throw weird errors on custom views Apr 23 16:25:54 RecyclerView counts as a custom view to it Apr 23 16:25:55 im using intellij 14 for android dev and it isnt listed as one of the widgets you can add Apr 23 16:26:06 to add your button, add it in onCreateOptionsMenu(Menu, MenuInflater inflater) Apr 23 16:26:09 why intellij 14, just curious? Why not Android Studio? Apr 23 16:26:56 tricknology and i just create a new layout with a button on it? Apr 23 16:27:10 JemsBond mhmm Apr 23 16:27:19 i already had everything setup and what not Apr 23 16:27:21 inflater.inflale(R.menu.yourmenu, menu) Apr 23 16:27:25 your menu can have a button in it Apr 23 16:27:30 in its xml Apr 23 16:27:37 aspire, in your menu XML for the activity, do something like this Apr 23 16:27:39 tricknology right, but will yourmenu ONLY consist of one button Apr 23 16:27:50 it can Apr 23 16:27:52 or more Apr 23 16:27:53 aspire: http://pastebin.com/JNFYKgMN Apr 23 16:28:00 menu has items Apr 23 16:28:05 items can have items Apr 23 16:28:15 those would be submenus Apr 23 16:28:18 aspire in that pastebin do you see how I added in an item? Apr 23 16:28:20 oooo Apr 23 16:28:22 right JemsBond Apr 23 16:28:22 but.. yeah your menu can have only one item Apr 23 16:28:32 ^ Apr 23 16:28:32 so this will show "Notifications" beside the actionbar label right? Apr 23 16:28:35 Oh, he's adding multiple. Ok Apr 23 16:28:51 app:showAsAction="ifRoom" Apr 23 16:28:54 app:showAsAction="always" Apr 23 16:29:04 aspire: you may want to disregard my previous answer. Mine was to show an icon in place of the menu icon Apr 23 16:29:29 oh Apr 23 16:29:43 here sec Apr 23 16:30:40 http://pastebin.com/ccF0kjc0 Apr 23 16:31:12 another sec.. Apr 23 16:31:32 o Apr 23 16:32:32 aspire: what are you working on? Apr 23 16:33:01 http://pastebin.com/X8tgRvjb Apr 23 16:33:09 thats to use it in your fragment Apr 23 16:33:20 JemsBond im writing a notes app Apr 23 16:33:33 it has a very similar layout to the email app Apr 23 16:33:37 maybe dont need that menu.add(R.id.menu_status) Apr 23 16:33:41 inside my add_note layout Apr 23 16:33:51 i have a linear layout (vertical) with Apr 23 16:34:06 but that will give you a menu with an item to inflate into your toolbar Apr 23 16:34:12 note title text box, multiline note msg text bot and a horizontal linear layout Apr 23 16:34:14 and do somethign when its selected Apr 23 16:34:15 with 2 buttons Apr 23 16:34:22 2 buttons, add another item Apr 23 16:34:23 i want to remove the 2 buttons and place them in the action bar Apr 23 16:34:26 mhmm Apr 23 16:34:33 and a condition in onOptionsItemSelected Apr 23 16:34:34 eek tricknology im not using fragments Apr 23 16:34:41 :( Apr 23 16:34:46 i have a Apr 23 16:34:49 I think it’s stil good for activities Apr 23 16:34:57 NotesActivity and a NoteActivity Apr 23 16:35:10 extends Activity? Apr 23 16:35:11 both extend Activity and when you press the add button in the notes activity Apr 23 16:35:14 yeah Apr 23 16:35:15 ok Apr 23 16:35:21 then those will work Apr 23 16:35:25 it creates a new intent with a mode id of "add" Apr 23 16:35:33 do the include thing to get your toolbar in there Apr 23 16:35:37 yeah Apr 23 16:35:43 and dont ask for the actionbar Apr 23 16:35:58 I forget how I did it now.. haha have to look at code Apr 23 16:36:48 heh Apr 23 16:37:00 Toolbar toolbar = (Toolbar) findViewById(R.id.the_toolbar); Apr 23 16:37:01 setSupportActionBar(toolbar); Apr 23 16:37:16 oh Apr 23 16:37:25 NotesAvtivity extends ActionBarActivity Apr 23 16:38:06 the_toolbar should be the toolbar jamesbond showed you earlier Apr 23 16:39:48 i noticed that you put a: onOptionsItemSelected(MenuItem item) Apr 23 16:39:54 is there an onClick attribute for these menu items? Apr 23 16:40:18 no Apr 23 16:40:22 and don't use android:onClick Apr 23 16:40:23 it's bad Apr 23 16:40:32 why Apr 23 16:40:37 i've grown so fond of it Apr 23 16:40:51 all i gotta do is have a XXXXX(View) inside my activity and everything is fine :( Apr 23 16:40:54 a zillion and one reasons, and I'm not going to bother explaining Apr 23 16:41:18 can you at least list one? i don't see anything wrong with it Apr 23 16:41:24 look at this http://pastebin.com/X8tgRvjb ( it was pasted earlier ) Apr 23 16:41:34 non-static binding Apr 23 16:41:36 suppose i had like, 10 Apr 23 16:41:39 non-reusability Apr 23 16:41:41 there's 2 Apr 23 16:41:54 explain? Apr 23 16:42:11 I just did Apr 23 16:42:40 no separation of concerns Apr 23 16:42:45 how isnt it reusable Apr 23 16:43:33 take that layout, and turn it into a fragment Apr 23 16:43:45 not reusable Apr 23 16:44:05 o.. Apr 23 16:45:01 yep, set your onClicks through Java Apr 23 16:45:11 mhmmm Apr 23 16:48:14 alright thanks for your help Apr 23 16:48:16 i'll figure something out Apr 23 16:56:09 has anyone here worked with creating an app to pull down data from a wordpress site? I'm creating this app for a client who owns the Wordpress site. I've let him know that he'll have to expose a plugin to expose a JSON REST API, but is there a better way? Apr 23 16:57:00 JemsBond, without knowing a ton that sounds like the best way. Apr 23 16:57:47 Hi! Apr 23 16:58:02 Alright, thanks quinnjn. Apr 23 16:58:32 Has anyone ever done contract work for a client before? This is my first time doing it and I'm not exactly sure what the best way to go about the whole thing is. Can anyone give me some advice/tips? Apr 23 16:59:32 Does anybody ever tried to add a new item to an adapter when It arrived to certain position to load new data ? Apr 23 17:00:54 I'd like to do like the gmail apps when you scroll on the left or right Apr 23 17:03:13 what is the difference between overidding oncreateview vs oncreatedialog in a dialog fragment Apr 23 17:04:13 can I override both? Apr 23 17:04:18 or should I rather Apr 23 17:07:38 mrfu: http://developer.android.com/reference/android/app/DialogFragment.html Apr 23 17:24:00 ""Apps or metadata that mentions the name of any other mobile platform will be rejected"[1]." (apple) ... how is that even legal Apr 23 17:25:10 Why would it be illegal? It’s their property, they can do whatever they want Apr 23 17:25:13 thanks to Android, it's not a monopoly Apr 23 17:25:44 jaana its anti-competitive, FTC should crack some whips Apr 23 17:25:47 It would still be legal even if they were a monopoly Apr 23 17:25:57 g00s: That’s not how anti competitivity is defined Apr 23 17:26:00 anticompetitive is allowed if you're not a monopoly Apr 23 17:26:13 aka "capitalism" Apr 23 17:26:23 Even if you’re a monopoly, it’s fine Apr 23 17:26:57 What’s not allowed is leveraging a monopoly to enter other markets, which is why Microsoft got punished Apr 23 17:27:15 I shiver at the idea of an Apple monopoly, they are far worse than Microsoft ever was Apr 23 17:30:45 running into an issue with android wear Apr 23 17:30:54 anybody got any ideas on how to simulate walking gps data using genymotion? Apr 23 17:31:01 i've got two moto 360s paired with my phone Apr 23 17:31:02 https://imgur.com/lYX0uPp Apr 23 17:31:10 neither of them are conncete Apr 23 17:31:10 d Apr 23 17:31:28 I have the Genymotion Shell and I can use gps setlatitude and so on, but I can't really use that very efficiently Apr 23 17:31:29 but debugging over bluetooth says the target is connected, and localhost:4444 shows up as offline under `adb devices` Apr 23 17:35:11 Android Studio 1.2 RC 2 .0 is out Apr 23 17:36:56 w00t. thanks, updated. Apr 23 17:38:49 I'm trying to get the speed using GPS. I have a LocationListener with an onlocationChanged(Location l). l.getSpeed() keeps returning 0.0, though. Apr 23 17:38:53 Some people claim it should just work (http://stackoverflow.com/questions/11624947/using-the-gps-to-capture-speed) Apr 23 17:39:27 how would you approach to creating a rating bar? like * * * * * where a star can be half-filled Apr 23 17:39:30 while others say you need to calculate it yourself Apr 23 17:39:50 (http://stackoverflow.com/questions/4811920/why-getspeed-always-return-0-on-android) Apr 23 17:39:52 my first instinct would be to draw path on canvas Apr 23 17:39:54 kba: I would guess that it would depend on the device Apr 23 17:39:54 which one am I to believe? Apr 23 17:40:09 I see. Apr 23 17:40:12 and/or which provider you got the location from Apr 23 17:40:27 I'm using the GPS_PROVIDER Apr 23 17:41:17 kba: what accuracy level? I would guess it's only meaningful on one of the highest settings Apr 23 17:41:46 also it would have to successfully get a fix on your location more than once, most likely. could take time for it to stop returning 0 Apr 23 17:42:20 I haven't specified any, but it demanded Apr 23 17:42:24 so I assume ACCESS_FINE_LOCATION Apr 23 17:42:37 Right Apr 23 17:42:59 I haven't done much with location :| but there's a Criteria you can set that would specify what detail level you want / need. Apr 23 17:43:49 i remember using gps back in 2010, it was pretty easy (except geofencing, which never seemed to work) - wonder if its really worth it to use play services for that Apr 23 17:43:52 ugh. "high, low, fine, coarse" wtf were they thinking when they named those. Apr 23 17:45:53 ah. set vs received values. Apr 23 17:46:21 groxx they still do that nonsense; BLE apis have CONNECTION_PRIORITY_BALANCED, CONNECTION_PRIORITY_HIGH, CONNECTION_PRIORITY_LOW_POWER Apr 23 17:47:08 and thats only in 5+ - you have absolutely no control on 4.4 :) Apr 23 17:47:36 g00s: check this out: http://developer.android.com/reference/android/location/Criteria.html "accuracy_" prefix for 5 values, fine/coarse are set-only, high/medium/low are receive-only, and _the values overlap_. fine==low, coarse==medium. Apr 23 17:47:53 lol Apr 23 17:48:14 or wait no. some are for location accuracy, some for bearing/etc. Apr 23 17:48:29 though still wtf why would you make the values overlap, especially like that Apr 23 17:49:29 agh. I should stop reading until I'm properly caffeinated. it's awkward, but it shouldn't be _this_ confusing. Apr 23 17:49:31 I wish using spring for implementing my mobile backend, however i would like to using google+ authentication at my android app Apr 23 17:49:37 is it possible using the native g+ for sign up/sign in or, due the oauth 2.0 authentication flow, i will be force to authenticate using a webview? Apr 23 17:50:14 in theory, the app should support both facebook and google+ sign in Apr 23 17:52:19 why do I get these messages? 04-23 10:51:25.842: D/ViewRootImpl(20400): ViewPostImeInputStage ACTION_DOWN Apr 23 17:53:03 because your device hates you :| Apr 23 17:53:11 i think so Apr 23 17:53:15 It’s a samsung Apr 23 17:53:19 heh Apr 23 17:53:26 sanguessuga Apr 23 17:53:34 it’s messing with my onclicklistener Apr 23 17:53:39 and there is not an ontouch listener in there Apr 23 17:53:40 an HTC I have with me spams edittext events like mad Apr 23 17:53:54 they should have silenced it Apr 23 17:54:09 or given it Log.v instead of .d Apr 23 17:54:34 i'm __android_log_print() to debug NDK code, but i'm not seeing any output. i'm pretty sure the code is being executed because the app is performing expected behaviors. but i'm seeing no output from the log call. is __android_log_print thread safe? Apr 23 17:55:00 afaik yes Apr 23 17:55:01 hello folks. how does a team work on single large android project? been a solo developer for long and never worked in a team :| Apr 23 17:55:14 someitmnes logs from threads dont show up Apr 23 17:55:15 not sure why Apr 23 17:55:18 but I’ve seen it happen Apr 23 17:55:28 tricknology, hmm, thanks Apr 23 17:55:28 Are the threads attached to the VM_ Apr 23 17:55:29 ? Apr 23 17:55:39 That might be an issue, because we have multithreaded NDK stuff and worked fine Apr 23 17:55:55 try and use an interface or message/handler to display the logs on your UI thread Apr 23 17:56:01 Mavrik, so, i'm making an NDK call from an intentservice, and that call will eventually spawn additional threads in native code Apr 23 17:56:19 tricknology, that's terrible for performance O.o Apr 23 17:58:51 is this an inappropriate channel for my question? Apr 23 17:58:58 What's the best way to handle user-content in a density independent way? Should I load different images from the API for different densities, or just always load 3x and scale it on the phone for lower DPI devices? Apr 23 18:01:00 So the first app I made was a learning experience and I didn't use a framework. Would/can you guys recommend a framework for me to use, or if I should even use one? Apr 23 18:02:27 well, android is already a framework Apr 23 18:02:31 you should use libraries, however Apr 23 18:02:42 appcompat-v7, support-v4 Apr 23 18:04:37 Right, but things like dagger, RxJava, etc.? Apr 23 18:04:57 I've just read a lot about those and maybe they aren't frameworks, but they seem like it (with dependency injection, etc.) Apr 23 18:07:34 t0astt if there is a need, use it. you almost always deal with concurrency, so rxjava helps in some cases there Apr 23 18:07:49 snek, i like sticking to the basics. imho a good material for starting android and google endpoints development is http://www.udacity.com/google Apr 23 18:09:24 many concepts are just taught without explaining why they consider it a better approach Apr 23 18:09:58 t0astt, for example, using content providers Apr 23 18:10:01 hye JacobTabak Apr 23 18:10:07 yo yo Apr 23 18:10:29 * ventura dislikes dependency injection Apr 23 18:11:21 i remember using spring DI back in 2007-2008, it wasn't typesafe and pretty tricky. my mistake there, because it was so flexible, was mixing configuration and wiring Apr 23 18:11:52 but then you wound up with a graph that were singletons, i often dont find myself in that situation for whatever reason Apr 23 18:12:11 i find it more difficult to create things dynamically and piece them together Apr 23 18:12:29 but, its been a long time maybe i just dont know what i'm doing :D Apr 23 18:12:47 IMO Dagger is still way too much of a hassle Apr 23 18:12:55 gdust: it's a bit of a vague question :) but yeah, this is probably the right room Apr 23 18:12:59 It's useful, but oh my god that boilerplate. Apr 23 18:13:56 What boilerplate? Apr 23 18:14:28 gauthierm: depends on what your goal is. minimal bandwidth + clearest possible images: yeah, send density-appropriate images. Apr 23 18:14:56 every line of code that isn't "new X()" or "Class.getInstance()" probably Apr 23 18:15:34 I've looked at that Udacity tutorial before, although that was when I had 0 knowledge of Android development and I was quickly overwhelmed, ventura. Apr 23 18:15:51 I'm sure it would be a lot easier to understand now that I've thrown a few hundred hours into development Apr 23 18:16:39 yeah, I'm really not too happy with that udacity class either Apr 23 18:16:39 http://hamcrest.org/JavaHamcrest/javadoc/1.3/org/hamcrest/Matchers.html Apr 23 18:16:45 JakeWharton, modules, components, glue code to expose injection per types, etc. Apr 23 18:16:49 wtf, there's no Matchers in hamcrest 1.3 though Apr 23 18:16:51 t0astt, indeed. i had too create a whole frankenstein app before be capable of understanding the course Apr 23 18:16:54 groxx: i was hoping for some words of wisdom from experienced folk here Apr 23 18:17:14 the second time was good. i hope submitting the final project asap Apr 23 18:17:30 Mavrik: and how do you otherwise expect the mechanism to work? Apr 23 18:17:31 groxx, ventura: I feel like they never explained the underlying reasons or what certain things were Apr 23 18:17:48 JakeWharton, the way all other DI frameworks for Java work. Apr 23 18:17:55 gdust: "it's possible"? :) any areas in particular you're curious about? project / gradle / etc setup, or code arrangement, or mVariable vs _local_variable vs ? Apr 23 18:17:59 Which is what? Apr 23 18:18:04 ah, probably because junit only includes hamcrest-core Apr 23 18:18:13 t0astt, i only understood the reason about the content provider + sync adapter watching a google i/o talk Apr 23 18:18:33 well, that's annoying Apr 23 18:18:44 Guice has modules and injectors Apr 23 18:18:49 g00s, people usually justify DI usage is TDD Apr 23 18:18:52 My god that boilerplate! Apr 23 18:19:04 JakeWharton, yes, and it requires significantly less boilerplate to write and to wire a project together Apr 23 18:19:09 ventura: no they don't Apr 23 18:19:10 (also it has better documentation) Apr 23 18:19:23 Oh so now we're talking about documentation Apr 23 18:19:33 Not bpilerplate Apr 23 18:19:45 huh Apr 23 18:19:47 JakeWharton, s/people/my colleagues/g Apr 23 18:19:59 JakeWharton, dude, seriously, no need to be so hostile Apr 23 18:20:06 -_- Apr 23 18:20:15 I'm just trying to clarify your flippant yet passive remark Apr 23 18:20:16 it's just a library Apr 23 18:20:35 JakeWharton, again with the hostility Apr 23 18:20:56 Now your deflecting Apr 23 18:21:00 You're Apr 23 18:21:01 Phones... Apr 23 18:21:20 Does someone know how to make a Gson data class get a value for a field from a 'parent' field? Explained here: http://hastebin.com/ehayakosuj.java Apr 23 18:21:22 *sigh* Nevermind. Apr 23 18:21:37 JakeWharton, Mavrik: no offense taken :-D Apr 23 18:21:53 groxx: :) i'm wondering about workflow. like do teams follow MVC and integrate the code in the end? Apr 23 18:22:34 gdust thats very broad :) but i wouldn't be surprised, if there are teams where some devs are more UI focused, others more "backend", networking, db Apr 23 18:23:20 Mavrik: I think Jake know Dagger very well to say the least :-P So you should have concrete critique here ) Apr 23 18:23:21 Usually you cut up the project in discrete tasks and figure out what can be done without too much merge headaches. Apr 23 18:23:44 gdust: that's better :) personally: small company, lots of wide-reaching projects, so we just avoid working on things that'll conflict in code (regardless of what they are). and we do code reviews for every line of code before it's sent to the master branch in the repo. Apr 23 18:24:08 gotta love it when you forget to setaractivity() onclick Apr 23 18:24:09 groxx, do you use any specific tools for reviews? Apr 23 18:24:15 startactivity Apr 23 18:24:22 Mavrik: skype screensharing, or walking over to their desk Apr 23 18:24:55 we'd abandon skype if we could. but everything else sucks and/or can't be reasonably used to do interviews. practically _everyone_ has a skype account. Apr 23 18:25:16 ah, so you actually do it live, not via github or any other async system? Apr 23 18:25:23 s/sucks/sucks worse/ Apr 23 18:25:29 yeah, live code reviews only Apr 23 18:25:31 we use git Apr 23 18:25:31 g00s: yes something like that Apr 23 18:26:02 project mgr or CTO does code reviews before it’s merged into master or staging Apr 23 18:26:10 has some benefits and some downsides. mostly we prefer the benefits, and it's one less tool to have to use / get locked into (e.g. gerrit or github) Apr 23 18:26:18 but I’m the only Android dev so.. I don’t really get to worry about that Apr 23 18:26:46 mhm, we mostly do reviews via GitHub Apr 23 18:27:06 but I'm considering having a more highbandwith channel with my team Apr 23 18:27:18 since async conversations sometimes drag too much when discussing tech choices Apr 23 18:27:32 D: say it ain't so! Apr 23 18:27:50 groxx: ok i understand a little bit of what you are saying. i am new to this situation, my company's expanding. me and pal used to go solo but now suddenly we have couple of large projects and a new team of devs. Apr 23 18:27:50 How can I reproduce the navigation set up on the gmail apps ? on handset and on the mail view, the viewpager like ? Apr 23 18:28:10 How would you approach creating a rating bar? like * * * where a star can be half-filled with color. A custom view and drawPath on canvas? Apr 23 18:28:14 also, live-reviews helps encourage you to keep things small and understandable :) we release really frequently. Apr 23 18:28:52 icedp: or two images and clipRect Apr 23 18:29:48 icedp, last time I did that I just rendered star UTF-8 chars Apr 23 18:29:59 but I was lazy :) Apr 23 18:32:32 haha Apr 23 18:32:34 I like that solution :) Apr 23 18:32:40 eh, gradle 2.4 rc1 is here "Significant configuration time performance improvements" \o/ Apr 23 18:33:14 I wonder what "configuration time" means. Apr 23 18:33:38 ph "Improved performance of Gradle Daemon via class reuse" nice too Apr 23 18:33:54 meh only 20% speedup, oh well Apr 23 18:34:08 i need like 4x improvement :D Apr 23 18:34:22 which translates into a <1% speedup for android builds, probably Apr 23 18:34:27 It's my gradle build and I want it now Apr 23 18:34:29 groxx: will try that Apr 23 18:34:48 maybe some less bloat with "Reduced memory consumption when compiling Java source code with Java 7 and 8" Apr 23 18:34:49 Mavrik: heh great scaling to any dpi then Apr 23 18:37:30 when you provide a android.accounts.Account to be user for by a threaded sync adapter, the account type must be equals to the base REST URL endpoint? or is it just a string used as a key? Apr 23 18:37:49 http://stackoverflow.com/questions/12116096/android-is-onresume-always-called-after-oncreate Apr 23 18:38:08 so everybody says that onResume is not called after onCreate, referring to the Activity Lifecycle (see link) Apr 23 18:38:22 Bu according to the lifeCycle, onCreate() is called, then onStart(), then onResume() Apr 23 18:38:25 or am I misunderstanding something here? Apr 23 18:38:56 Otherwise, wouldn't onCreate() point directly to "Activity running" rather than to onStart()? Apr 23 18:39:08 icedp: also: bitmap xml drawable with tilemode=repeat + clipdrawable + levels. not entirely sure how to work all those together, but seems like it should work (probably + layerlist too) Apr 23 18:39:48 kba: activities can be created without being started Apr 23 18:40:37 they can't be resumed without being started though Apr 23 18:41:02 Is there a way to view my project's bytecode in AS 1.2 (without having to go to the command line and use 'javap')? Apr 23 18:41:10 I can't see one. For some reason I thought there would be. Apr 23 18:41:19 TacticalJoke i thought there was a plugin Apr 23 18:41:30 maybe you disabled it :D Apr 23 18:41:40 haha Apr 23 18:41:52 There is a decompiler for library code. It tries to produce Java code, I think. Apr 23 18:42:15 groxx: ah, ok Apr 23 18:42:23 I get it, thanks Apr 23 18:43:19 TacticalJoke: y u no want java Apr 23 18:43:34 Mainly if I'm curious about optimizations, etc. Apr 23 18:43:38 And a deeper understanding. Apr 23 18:43:52 acquiring^ Apr 23 18:44:25 is it possible to download eclipse plugin, save it offline and then reuse it from local filesystem? Apr 23 18:44:58 anahumar: Y u no use Android Studio? Apr 23 18:45:35 why is the v7 Card View not drawing itself at the size I specified? Apr 23 18:45:37 I know that's annoying. You ask a question and someone asks a side-question in reply. Apr 23 18:46:28 TacticalJoke: why wouldn't I? Apr 23 18:46:29 I think Android Studio is mo better now, though. Apr 23 18:46:29 I set it’s layout_height and layout_width to a specific size in dps, but it then shrinks in the listview Apr 23 18:47:21 I think because I'm trying use the same IDE for most of things Apr 23 18:47:36 halp. I am settign on onclick listener to each child of a linearlayout but the linearlayout is eating up the onclick event. do I - setOnClickListener() on the LinearLayout? How do I determine which child view was clicked? Apr 23 18:47:41 Also I think google decision to move away from eclipse is a huge fuckup Apr 23 18:47:53 anahumar: http://stackoverflow.com/questions/5482554/how-to-install-plugin-for-eclipse-from-zip Apr 23 18:48:07 the short answer is yes, if it’s packaged correctly Apr 23 18:48:19 and Google’s decision to use eclipse in the first place was the huge fuckup Apr 23 18:48:45 s73v3r_: why is that? Apr 23 18:48:59 because eclipse is sluggish, slow, and just plain awful for use Apr 23 18:49:17 view.setDuplicateParentState(true) Apr 23 18:49:27 ..I think is what I needed Apr 23 18:49:46 anahumar: If you use Android Studio, using AppCompat (or almost anything) is a one-liner. Apr 23 18:50:06 also, the eclipse plugin doesn’t support gradle Apr 23 18:51:17 Ah, man, this is crazy. I can view the decompiled Java of my .class files but I can't view the original bytecode?! Apr 23 18:51:23 ok so What I needded was view.setEnabled() and view.setDuplicateParentStateEnabled(true) Apr 23 18:52:09 Has anyone here ever interviewed with Google? Apr 23 18:52:33 lol of the day http://androidxref.com/5.1.0_r1/xref/frameworks/base/packages/SystemUI/src/com/android/systemui/Gefingerpoken.java Apr 23 18:53:11 tricknology_: yes Apr 23 18:53:22 ACHTUNG Das machine is nicht fur gefingerpoken Apr 23 18:53:30 How is the process JakeWharton? Apr 23 18:53:53 writing code on a whiteboard is stupid Apr 23 18:54:01 lol I’ve done that before Apr 23 18:54:23 “reverse a singly linked list.. recursively” Apr 23 18:55:04 tricknology_: setDuplicateParentStateEnabled - TIL. but wat? why would that impact clickability? Apr 23 18:55:05 Drawing curly braces feels wrong. Apr 23 18:55:30 groxx I’ll try and see if it affects anything Apr 23 18:55:39 So I still have to use javap. Sadpanda. Apr 23 18:55:48 JakeWharton: I get the feeling they're fairly trivia-driven. accurate? Apr 23 18:55:51 Or I could install some plugin that probably doesn't work. Apr 23 18:56:02 groxx: no Apr 23 18:56:18 that's encouraging Apr 23 18:56:21 Also, scratch files are still 99% useless. :/ Apr 23 18:56:45 And apparently we have to delete them manually. Apr 23 18:56:46 groxx, it looks more like high-scool / college CS competitions Apr 23 18:56:55 you're whiteboard coding maths or logic puzzles Apr 23 18:57:15 (but it does heavily depend on the interviewer) Apr 23 18:57:53 ah. do they dock points for missing import statements / similar? :) Apr 23 18:58:00 groxx, it works without. Apr 23 18:58:08 Can someone recommend a great android app dev ide for android? Apr 23 18:58:11 seems like it transfers the parent’s styles to the children too Apr 23 18:58:12 groxx: Haha. Apr 23 18:58:15 like a button press changing color Apr 23 18:58:23 ronkrt: Netbeans Apr 23 18:58:24 also text Apr 23 18:58:41 tricknology_: that's what it sounds like from the docs. copies the background-drawable-state. Apr 23 18:58:44 Runs on droid? Apr 23 18:59:01 ronkrt: I don't think I would recommend such a thing. Why would you want to do that? Apr 23 18:59:02 on android? There’s only one, I think. AIDE Apr 23 18:59:02 really I just needed setEnabled(true) Apr 23 18:59:27 Aide is the best eh? Apr 23 18:59:33 Aide is the only one Apr 23 18:59:39 so technically, it’s the best Apr 23 18:59:46 Is it also the worst? Apr 23 19:00:02 There is a product called ScriptIt (sp?) which allows you to make things using scripting Apr 23 19:00:37 so while you might not write a full app using it, if you want to prototype an idea while out and about, it’d do what you want Apr 23 19:00:39 TacticalJoke: yes :P Apr 23 19:00:52 anyone have experience with B4A? Apr 23 19:01:00 since we’re on the subject of IDEs.. Apr 23 19:01:01 sheep? only a little. Apr 23 19:01:13 tricknology_: You ask the hardest questions. I can answer like 0.4% of your questions. Apr 23 19:01:24 Some people are like 100%. Apr 23 19:01:28 sorry :( Apr 23 19:01:30 lol Apr 23 19:01:35 Though those are usually "What is Java?" people. Apr 23 19:01:55 Device manufacturer sent this SDK that has alllll sorts of dependency issues stemming from that IDE Apr 23 19:02:33 I looked it up and it’s some rapid development IDE and the end product is a native app. But I go to look at the demo app and it’s dependency hell Apr 23 19:02:42 also, their website is offline: B4X - The simple way to develop native Android & iOS apps Apr 23 19:02:43 oops Apr 23 19:02:46 http://www.b4x.com/ Apr 23 19:02:58 tricknology_: wtf. visual basic instead of Java? D: D: D: Apr 23 19:03:12 i have no idea... Apr 23 19:03:22 at least do C# or something, yikes Apr 23 19:04:17 It’s sad because this device is dope. But so not ready for developers Apr 23 19:04:43 Their "beginner's guide (PDF)" is in a .zip file. Apr 23 19:04:56 you can get to the website? Apr 23 19:05:03 It didn't load at first, but then it did. Apr 23 19:05:03 * ravilov is waiting for Borland/Turbo Pascal for Android Apr 23 19:05:19 * groxx waits for K for Android Apr 23 19:05:21 oh there it goes.. it’s been down all day Apr 23 19:05:21 ravilov you can use forth :) Apr 23 19:05:23 I used to love Delphi. Not so much the language but the VCL and stuff. Apr 23 19:05:45 Though their assignment operator was awesome -- := Apr 23 19:05:52 I wonder if there's a qbasic for android. surely someone has got to have made that. Apr 23 19:06:19 LOL Apr 23 19:06:54 if you thought the View classes were inscrutable before, wait until they're K'd. `(!R)@&{&/x!/:2_!x}'!R` is a valid program. Apr 23 19:07:06 this is what the code looks liek when opened in eclopse: http://pastebin.com/s43txHf0 Apr 23 19:07:19 lol Apr 23 19:07:33 it’s like.. they wrapped the android SDK components or something.. Apr 23 19:07:53 hmm. looks like you would have to use dosbox or something Apr 23 19:07:56 VB is like Jaden Smith code. Apr 23 19:08:16 Are Feet Shoes? Apr 23 19:08:20 Also, "Dim". Ugh. Apr 23 19:08:48 I wonder if they support VB.NET stuff like XML literals. that might actually have some use. Apr 23 19:08:59 Whoever thought that up was a bit... what's the word. Apr 23 19:09:00 linq for android, etc Apr 23 19:09:17 Yeah, VB.NET was actually a decent language. Just unnecessarily ugly and weird. Apr 23 19:09:25 And totally pointless given C#. :D Apr 23 19:09:39 I would understand if you could code one app and deploy to iOS and Android at the click of a button Apr 23 19:09:58 tricknology_: you mean this one? http://cl.ly/image/0B3D2w2Z2C0O Apr 23 19:10:07 ah, ios and android. nvm Apr 23 19:10:11 heh Apr 23 19:10:28 yeah click the spinner and select iOS, press play and done Apr 23 19:10:34 published and accepted on itunes Apr 23 19:10:39 in that case, http://cl.ly/image/3j2X37221r1m Apr 23 19:10:53 http://huy.im/ Apr 23 19:10:56 huh, that's pretty cool Apr 23 19:11:45 not only are webapps supported on ios and android, they'll work on old iphones and new ones without having to recompile or install osx Apr 23 19:11:49 wow, GridLayoutManager is a pita Apr 23 19:11:50 that is cool Apr 23 19:11:57 hesitant to check out the porn dir Apr 23 19:12:00 g00s: ha, less than gridview though! Apr 23 19:12:04 I"m betting 99% of the sessions start out with "ls" .. "cd Porn" Apr 23 19:12:13 g00s, what about COBOL? now that'd be something Apr 23 19:12:14 tui@huy.im:~/Porn# cat xxx.txt Apr 23 19:12:14 gotcha! j/k man.. there is no porn here Apr 23 19:12:15 that's cute Apr 23 19:12:22 lol Apr 23 19:12:28 aw. no tab completion. Apr 23 19:12:32 groxx i plopped in gridview , set colSpans = 2, and was off to the races Apr 23 19:12:52 or alias Apr 23 19:13:07 now in GLM " accomplished this using a view tree observer to get the width of the recylcerview once rendered ..." please Apr 23 19:13:17 otherwise, all the resources are empty though Apr 23 19:13:54 g00s: is that different than `new GridLayoutManager(context, 2, VERTICAL, false)`? Apr 23 19:14:31 In the latest Mercurial, "hg revert --interactive" shows "record this change" rather than "revert this change". Srsly tho? Apr 23 19:14:46 I need to put a wav file into my application (apk) and the library I'm using (Linphone) needs to access it via a path (/path/to/wav) ... Where's the best place to put? And what would be the path? Apr 23 19:15:14 if i am using a singleton in my app and I want to be thread safe do i need to use synchronized for all non-rentrant methods the singleton has? Apr 23 19:15:18 thanks Apr 23 19:15:34 g00s: also, auto-sizing is pretty easy to achieve: https://gist.github.com/Groxx/f144ae3ba6d893cff5f6 Apr 23 19:16:03 groxx that avatar ... Apr 23 19:16:15 D: I've been discovered! Apr 23 19:16:18 so awesome ;) Apr 23 19:16:39 http://hanhuy-acra.appspot.com/public/com.hanhuy.android.keepshare/f2b765c4c780246fdeaba5485645e2ad3467d4cf Apr 23 19:16:42 huh, that's a weird crash Apr 23 19:17:28 groxx hm ok, looks like i need griddividers too Apr 23 19:17:40 from your example, thanks , can use that ... Apr 23 19:17:43 lucky for you I just achieved that Apr 23 19:17:57 http://hanhuy-acra.appspot.com/public/com.hanhuy.android.keepshare/18c6055cc3e376c300d71afe9f8fe0257ee38730 Apr 23 19:17:59 huh, same crash Apr 23 19:18:24 g00s: https://gist.github.com/Groxx/0bb754807f739d44199c will mimic how GridView does its padding Apr 23 19:18:43 gekox yes but be careful Apr 23 19:18:47 dekox hold on Apr 23 19:19:04 g00s: I've got a second version I need to write, but that's sufficient for now for my use. Apr 23 19:19:05 Is there a way for me to set the exact size in pixels of a button programmatically? Apr 23 19:19:14 dekox: here is a good resource.. please read it; http://www.javaworld.com/article/2073352/core-java/simply-singleton.html Apr 23 19:19:25 lots of examples in there Apr 23 19:19:39 gekox* Apr 23 19:20:08 tricknology_: thank you Apr 23 19:20:37 g00s: sadly there are not many options for dividers. all columns need to be the same size, so you have to adjust your insets carefully if you don't just set every view with the same values. there's a way, I just haven't done it yet. Apr 23 19:22:07 g00s: the grid layout manager source is a bit of a mess, but it's readable. Apr 23 19:25:52 oh, whoops! Apr 23 19:25:56 getDrawable is in api21+ Apr 23 19:26:02 hate when that happens Apr 23 19:28:07 Maybe I should rephrase my question. I am creating an android button programmatically. And I'm setting the size of it by using button.setWidth(20) and button.setHeight(20) respectively. However, when I view it in my activity, it's actually rectangular instead of a square, even though width and height got the same values. Apr 23 19:28:11 Any ideas? Apr 23 19:28:57 g00s what do you need? Apr 23 19:29:00 column dividers? Apr 23 19:32:50 Tobbi: Not sure. Can you post something? Apr 23 19:33:04 TacticalJoke: Yeah, hold on. Apr 23 19:33:34 the button background 9-patch has more padding on the horizontal than vertical Apr 23 19:33:38 I'm on Debian Jessie. When I run AndroidStudio, I after a few pages in the wizard, I get "Unable to run mksdcard SDK tool" Apr 23 19:33:49 I will post my code in a second, I will just undo my recent edits. Apr 23 19:34:11 I found the mksdcard binary in /android/Sdk/tools/ and it is chmod u+rwx Apr 23 19:34:19 er, in ~/android Apr 23 19:35:11 srg: possibly a dependency issue? did you try running ldd on it? Apr 23 19:35:34 or permissions, or path, do you even know if it's running that binary? Apr 23 19:35:44 try running android studio from a terminal and see if it prints out any useful error messages Apr 23 19:35:51 b/c from just that gui error, couldn't begin to guess Apr 23 19:36:16 dragorn: I don't. I am running it from a terminal. It gives a lot saying it can't run the mksdcard tool. Apr 23 19:36:44 Well it downloaded the binary itself during the first time I ran the wizard, so I'd assume that's the one it's running. Apr 23 19:37:11 JesusFreke: ldd says it's not a dynamic executable Apr 23 19:37:22 i guess the other question is, do you care about running the emulator Apr 23 19:37:28 b/c that's the only reason that tool needs to run Apr 23 19:37:53 Hm, I don't know. This is the first time I'm doing anything related to android dev. Apr 23 19:38:11 * srg keeps trying Apr 23 19:38:13 "not a dynamic exec" is suspicious to me Apr 23 19:38:16 because it sure is Apr 23 19:38:26 at least all the versions I've seen Apr 23 19:38:47 hm Apr 23 19:39:01 i just downloaded the zip from the android website Apr 23 19:39:16 unzipped it, ran bin/studio.sh Apr 23 19:44:08 groxx: so I did as you suggested. A View that holds ClipDrawable that has BitmapDrawable in repeating mode. Got something like that: https://gist.github.com/mlatu/a721649c79e3a2164392 -- http://t.sql01.com/sc/0629bed1_1429817864.png Maybe I should've used a custom view. IDK. But it works =) Apr 23 19:48:19 trying to set an action bar theme as an app wide theme crashes the app Apr 23 19:49:56 so "new SimpleDateFormat("hh:mm a", Locale.getDefault());" is always giving me 12 hour format with am/pm markers. Is there a way to get 12 hour with am/pm or 24 hour without am/pm for free depending on the users date/time settings Apr 23 19:50:00 man...that android emulator is slow to load. Apr 23 19:50:05 trying to set an action bar theme as an app wide theme crashes the app Apr 23 19:50:33 Tobbi: you need to get acceleration working, it makes a big difference Apr 23 19:50:40 noahmg123: What does the stack trace say Apr 23 19:50:45 myke: How do I do that? Apr 23 19:51:20 Tobbi: on win/mac HAXM, on linux there's instructions for getting a kvm setup to use acceleration, in either case you should use x86 instead of ARM Apr 23 19:51:28 Tobbi: http://developer.android.com/tools/devices/emulator.html#acceleration Apr 23 19:51:33 yiati: not sure, but I didn't see any notifications of any errors. Where would I find the stack trace? I'm in android studio. Apr 23 19:51:39 I'll look into it, thanks. :-) Apr 23 19:51:45 Tobbi: https://software.intel.com/en-us/android/articles/speeding-up-the-android-emulator-on-intel-architecture Apr 23 19:52:11 for win/mac you use the HAXM package, for linux you use an accelerated kvm Apr 23 19:52:32 also i've generally had better luck with gpu acceleration on but ymmv Apr 23 19:52:42 noahmg123: in the Android console titled "Android" at the bottom Apr 23 19:53:40 Tobbi: You aren't restarting the emualator every time, right? I notice that a lot of people seem to think you have to do that. Apr 23 19:53:49 Personally, I so rarely use the emulator. adb wireless with devices FTW. Apr 23 19:54:19 TacticalJoke: I wouldn't if it hadn't become unresponsive and detached from my Eclipse window. Apr 23 19:54:25 accelerated emu on my i3 is faster than any devices i own, of course my fastest device is a droid4 Apr 23 19:55:02 yiati: i'm back. my internet dropped Apr 23 19:55:05 Tobbi : Y u no use Android Studio? Apr 23 19:55:26 TacticalJoke: Because we learned programming on Eclipse...It's probably just laziness. Apr 23 19:55:32 I have Eclipse set up the way I like. Apr 23 19:55:46 AS is better for Android development. Apr 23 19:55:46 when someone says "Don't access the view hierarchy" in a fragments onCreate does that mean calls to findviewbyid? Apr 23 19:55:50 yiati: you still there? Apr 23 19:57:10 Hmm, okay, I'll look into Android studio later. Apr 23 19:57:54 noahmg123: why Apr 23 19:58:16 yiati: I may have missed what you said. my connection went down Apr 23 19:58:31 noahmg123: in the Android console titled "Android" at the bottom Apr 23 19:58:44 ok Apr 23 19:58:52 Are there any good find and replace apps that will look in all files and sub for android? Apr 23 19:59:09 icedp: hah, cool! glad that worked :) Apr 23 19:59:26 yiati: I got a java error in logcat Apr 23 20:00:51 I still cry everytime I hit run without manually saving changes even though it's not necessary these days Apr 23 20:00:56 mrfu: you can find views you have inflated, but accessing outside your fragment is problematic because views may not exist yet / it depends a LOT on not only your lifestyle, but every other object in between. Apr 23 20:01:03 I get paranoid Apr 23 20:01:25 yiati: I am gettinf this error: http://pastebin.com/ye44cMi9 (package name masked) Apr 23 20:01:31 getting* Apr 23 20:01:39 mrfu: and there are a lot of possible states, so it's hard to actually make sure they all work Apr 23 20:01:44 yiati: If you enable "Mark modified tabs with an asterisk" it's more obvious what's going on. Apr 23 20:01:56 You'll see the asterisk drop when you run. Apr 23 20:02:06 Or before. Apr 23 20:02:39 Ah, so you wouldn't want to try a touch a view in an external view hierarchy at that point Apr 23 20:03:13 trying to set an action bar theme as an app wide theme crashes the app. I get a java error saying I need to use a Theme.AppCompact theme. Apr 23 20:03:29 you would wait for onActivityCreated for that Apr 23 20:03:58 TacticalJoke: You are my savior Apr 23 20:04:26 :) Apr 23 20:04:28 noahmg123: Looks like, "You need to use a Theme.AppCompat theme (or descendant) with this activity." Apr 23 20:04:54 yiati: yeah. i got that. what should I do? Apr 23 20:05:20 You should "use a Theme.AppCompat them (or descendant) with this activity." Apr 23 20:05:27 :D Apr 23 20:05:48 yiati: but then I would lose my actionbar theme Apr 23 20:06:31 Then you need to stop doing whatever is requiring Theme.AppCompat Apr 23 20:06:38 Those are your 2 options Apr 23 20:08:06 yiati: I don'tknow what is requiring it. I just started this app. Apr 23 20:09:14 noahmg123: com.operationlightforce.godspeaksbible.ReadingActivity Apr 23 20:09:35 yiati: ok. Apr 23 20:09:55 yiati: i'm surprised. I haven't touched that file. Apr 23 20:11:22 I have a v7 CardView which I have given a specific height and width in dp. However, it seems to be ignoring that, and setting its size based on one of the inner views. Apr 23 20:11:30 mrfu: probably, yeah. I haven't actually done so, but I would mostly expect that to work Apr 23 20:11:38 yiati: the line it references is the super.onCreate method Apr 23 20:12:22 mrfu: minus some weird fragment transactions or modes or something. normal use, probably :) Apr 23 20:12:35 noahmg123: Yep it's going through the process it always does to check the themes as they are set int the xml files Apr 23 20:13:01 thank you g00s Apr 23 20:13:08 groxx I mean haha Apr 23 20:13:11 yiati: I still don't know how to fix this. Can you help me fix it? Apr 23 20:13:32 noahmg123: styles.xml, themes.xml, whatever. Apr 23 20:13:54 TacticalJoke: do you need a paste of the file? Apr 23 20:14:01 Hi, isn't there a #iphonedev channel? Apr 23 20:14:03 I'm currently rubber ducking my whiteboard trying to learn fragments, my whiteboard had some questions I couldn't answer Apr 23 20:14:09 It says that I'm banned when I try to join Apr 23 20:14:12 never been there Apr 23 20:14:31 Siamaster: have you registered w/ freenode? Apr 23 20:14:51 yes, this channel requires that aswell right? Apr 23 20:15:02 Siamaster: #iOSdev probably Apr 23 20:15:04 Siamaster: Can you access freenode through hexchat or whatever. Apr 23 20:15:06 ? Apr 23 20:15:31 thanks yiati, Apr 23 20:16:18 heh. #iphonedev says that for me too Apr 23 20:16:29 TacticalJoke: do you need a paste of the file? Apr 23 20:16:50 hey, if I'm doing a custom view that inherits from a LinearLayout, how do I avoid the IDs of the views inside the custom view from colliding with each other in the window-wide view-hierarchy on state restoration? Apr 23 20:17:22 Siamaster: groxx: Huh yeah #iOSdev seems to have ~100 users online, and #iphonedev seems to have ~200 on. That seems inefficient Apr 23 20:17:29 noahmg123: Just change Theme.Holo.whatever to Theme.AppCompat.whatever. Apr 23 20:17:51 (failure manifests as: if I have N of my custom view in my fragment, all of them will take on the state of the first one on configuration change) Apr 23 20:18:06 It's funny I read on stackoverflow that people on iphonedev are unfriendly :P Apr 23 20:18:10 Siamaster: I would guess they have a blanket ban on the web client Apr 23 20:18:17 orospakr: I've wondered that myself Apr 23 20:18:17 not the usual information you get on stackoverflow Apr 23 20:18:25 oh ok Apr 23 20:18:47 TacticalJoke: It is AppCompact. I have solved it another wy by extending my ReadingActivity to just Activity instead of ActionBarActivity (which was requiring AppCompact). Apr 23 20:19:02 TacticalJoke: This is how I try it: http://pastebin.com/DyR8BPDq Apr 23 20:19:04 * ventura having troubles to conciliate MVP and cursor loader Apr 23 20:19:17 TacticalJoke: do you see anything wrong with that? Apr 23 20:19:31 Siamaster: You'll probably read that people on irc in general are grumpy. There is often a lot of people in here begging for help showing no effort so it's a common pattern. Kind of like stackoverflow! Apr 23 20:19:42 Tobbi: Oh, gawd, those comments. Apr 23 20:19:46 Absolutely worthless. Apr 23 20:20:00 TacticalJoke: This is for a bachelor's thesis. So I have to comment everything :D Apr 23 20:20:07 I want it to look decent. Apr 23 20:20:14 Should I use LifecycleObservable from RxAndroid or just handle the unsubscribe onDestroy() ? Apr 23 20:20:24 orospakr: worst case, you can probably override the state saving, and save/restore by position. but there might be something simpler / better, I've never tried. Apr 23 20:20:51 No need to be grumpy though, you can always just ignore Apr 23 20:22:58 Siamaster: you learn that eventually. There's a grumpy road to that realization :D Apr 23 20:23:45 hehe :) Apr 23 20:24:43 i'm having trouble linking my project against fplutil. i've tried checking it out into my jni folder and adding the lines from this doc: http://google.github.io/fplutil/libfplutil_linking.html -- but it seems like LOCAL_PATH is being erroneously concatenated when it gets to processing libflputil's Android.mk file Apr 23 20:26:11 groxx, yeah, I think I'm going to have to do custom state restore, babysitting all the subviews. still, I'd like to prohibit the hierarchy restore... aha, and here's how to do that: http://charlesharley.com/2012/programming/views-saving-instance-state-in-android/ Apr 23 20:26:55 What is the best way to pass an enum array into a bundle (parcelable)? loop through each one? Apr 23 20:27:08 Tobbi: It works here. Setting a button to 20px x 20px creates a square button. Apr 23 20:27:14 (Using View.setLayoutParams.) Apr 23 20:27:20 TacticalJoke: Ah! Apr 23 20:27:42 TacticalJoke: What's the difference between setHeight / setWidth and setLayoutParams? Apr 23 20:28:14 orospakr: yeah, I think I've seen that in some views. probably simplest for skipping state saving entirely :) Apr 23 20:31:27 Tobbi: I think TextView.setHeight and TextView.setWidth relate more to the appearance of the text. (Button subclasses TextView.) Apr 23 20:31:38 But I'm not certain (only quickly looked at the source). Apr 23 20:31:43 Hmm, okay. Apr 23 20:31:49 Why do you want to resize this button, anyway? Apr 23 20:31:57 noahmg123: You might as well post styles.xml or whatever. Apr 23 20:32:34 TacticalJoke: DId you read what I did about extending? Apr 23 20:33:26 jrummy, enums are serializeable, arraylists are serializeable -> you can put ArrayList in bundle Apr 23 20:33:52 Well, in my app, I extend ActionBarActivity (or, soon, AppCompatActivity) because I want a material look. Apr 23 20:33:59 I won't get that with the normal Activity stuff. Apr 23 20:34:13 So I don't think you should accept defeat here, noahmg123. Apr 23 20:34:48 TacticalJoke: Well what kind of advantages come wth ActionBarActivity? Apr 23 20:35:24 It allows us to use AppCompat v21+. Apr 23 20:35:30 Which gives a material look. Apr 23 20:36:06 TacticalJoke: But it requires it. Thus losing me my actionbar style. Apr 23 20:36:22 If you want a Holo look, you can just drop AppCompat v21. Apr 23 20:36:31 And perhaps ActionBarActivity too. Apr 23 20:37:08 I am giving my actionbar a custom bg color Apr 23 20:37:19 You can do that with AppCompat v21+. Apr 23 20:37:28 How? Apr 23 20:37:57 The same way as with AppCompat < v21. Apr 23 20:38:21 TacticalJoke: That I do not know ow to do. I am a newbie. Apr 23 20:38:24 how* Apr 23 20:39:14 TacticalJoke: so how do I do it? Apr 23 20:39:18 You might as well just post styles.xml/themes.xml. That'll answer a lot of questions. Apr 23 20:39:25 ok Apr 23 20:39:42 anyone know some apps that behave like the IO 2014 app, which makes the back button behave like the up button (back in the nav hiearchy instead of back in the stack)? Apr 23 20:40:04 TacticalJoke: http://pastebin.com/1NevKWbV Apr 23 20:40:18 theblang, isnt that the "new" default anyways? Apr 23 20:40:29 i mean what google suggests us to do? Apr 23 20:40:32 danijoo is it? The guidelines haven't been updated if it is. Apr 23 20:40:45 danijoo: http://developer.android.com/design/patterns/navigation.html Apr 23 20:40:57 they have. they clearly say that the up button should naviaget up the app, not back the stack Apr 23 20:41:01 theblang: is it actually doing something that doesn't match the stack, or is this purely a "how it looks" thing? Apr 23 20:41:02 noahmg123: I think you have to drop those two Holo things and drop "android:" in "android:actionBarStyle" and "android:background". Apr 23 20:41:03 danijoo: I would much prefer to do it that way. Would cut down on edge cases from weird navigation paths not thought about Apr 23 20:41:24 danijoo: Right, but not the back button Apr 23 20:41:25 If you're using AppCompat, you shouldn't be referring to anything.Holo.anything. Apr 23 20:41:34 theblang, the site you posted, thrid picture Apr 23 20:41:51 it shows that the up button navigates up in hierachie, while back navigates back the stack Apr 23 20:42:01 groxx: Well, if you check out the IO 2014 app, navigate between screens in the nav drawer, you never go back in the stack with the back button, you exit the app Apr 23 20:42:15 danijoo: Right, so with the IO 2014 app both the up and back button go back in the hiearchy Apr 23 20:42:27 hi Apr 23 20:42:38 theblang, that would suck imo Apr 23 20:42:48 theblang: ah. that may just be that they're swapping out fragments. Apr 23 20:42:54 but if you want that, just call onBackPressed*( when app is pressed Apr 23 20:43:04 and conceptually I expect nav drawer changes to not go "back" Apr 23 20:43:06 for what I've been reading it is not possible to do a screen locker like the the default one, what I can do is some app that simulates it. is this correct? Apr 23 20:43:09 s/app/up Apr 23 20:43:12 danijoo: Oh yeah, I know how to implement. Just trying to decide if I should or not. Apr 23 20:43:21 i think you should not Apr 23 20:43:26 I could be wrong about that, but to me nav drawer items seem to imply "this is a separate / clean stack" Apr 23 20:43:27 maybe there are some rare usecases Apr 23 20:43:36 but everyone expect up to go up and back to go back Apr 23 20:43:56 danijoo: you say that as if "up" and "back" are actually sanely defined in Android :) Apr 23 20:44:16 groxx, if you look at the best practice guidelines, they are Apr 23 20:44:16 i hate the backstack Apr 23 20:44:32 I more or less consider the "up" button to be a useful visual cue only. Apr 23 20:44:38 g00s yeah, me too. which is why I'd love to make them both behave the same. Just not sure if I'd piss off users Apr 23 20:44:39 TacticalJoke: removing "android:" from background results in an error that is canot resovle the symbol for the hex color Apr 23 20:45:16 it seems, still to this day, being an idiot i guess, i back out of applications to home often Apr 23 20:46:00 noahmg123: What if you do that *after* replacing the Holo things with the AppCompat things? Apr 23 20:46:41 TacticalJoke: cannot resolve the AppCompact things Apr 23 20:47:27 It's "Theme.AppCompat.Light.DarkActionBar" and "Widget.AppCompat.Light.ActionBar.Solid.Inverse". Apr 23 20:48:08 TacticalJoke: w/o "@android:style/"? Apr 23 20:48:14 @style Apr 23 20:48:24 just that? Apr 23 20:48:47 @style/whatever Apr 23 20:49:06 ok Apr 23 20:50:05 TacticalJoke: cannot resolve Apr 23 20:50:14 noahmg123, its pretty simple. everything that is part of the android framework is annotated with android:. Everything that comes from YOUR app comes WITHOUT :android. If you import a library, its part of your app, so no android: for that Apr 23 20:50:32 noahmg123: Can you post the new styles.xml? Apr 23 20:50:45 appcompat is a library, so dont add android: to attributes that come with appcompat. Apr 23 20:51:05 danijoo that changed Apr 23 20:51:29 g00s, when? I still run fine with that in appcompat.. Apr 23 20:51:33 TacticalJoke: wait... Do I need to rextend my ReadingActivity class to ActionBarActivity? Apr 23 20:51:41 but im still on v21 so.. :p Apr 23 20:52:00 noahmg123: Eventually, yeah. Apr 23 20:52:07 danijoo see https://chris.banes.me/2015/04/22/support-libraries-v22-1-0/ (android:theme) Apr 23 20:52:16 ah Apr 23 20:52:20 I guess it applies only to android:theme? Apr 23 20:52:38 g00s, only android:theme. rest stays afaik Apr 23 20:52:48 oh, my mistake Apr 23 20:53:10 I hate how AppCompat pollutes autocompletion. Apr 23 20:53:10 TacticalJoke: http://pastebin.com/aNy81upP Apr 23 20:53:17 TacticalJoke: http://pastebin.com/aNy81upP Apr 23 20:53:45 The first parent should be "Theme.AppCompat.Light.DarkActionBar". Apr 23 20:53:50 I mean the second parent. Apr 23 20:53:53 did anyone already released an app with v22.1? i yet have to migrate but want to wait until someone can tell me how many things are buggy :p Apr 23 20:54:16 release = in production with enougn users to get a nice crash feedback Apr 23 20:54:23 is there a way to query contacts on android using contactscontact while ignoring deleted contacts? Apr 23 20:54:50 its funny that when google releases new software, devs have a PTSD reaction :D Apr 23 20:54:54 OK. Apr 23 20:55:43 TacticalJoke: I actually decided to change it. Anyway it still does not work with that. Apr 23 20:55:50 g00s, upgrading a google library and publishing always feels like defusing a bomb to me ^^ Apr 23 20:55:52 noahmg123: Which part doesn't work? Apr 23 20:56:03 danijoo lol, gotta get one of those suits Apr 23 20:56:10 haha Apr 23 20:56:11 TacticalJoke: the whole thing. Cannot resove symbol Apr 23 20:56:36 TacticalJoke: it cant even resolve Theme Apr 23 20:56:46 Even the one you typed before asking in this channel? Apr 23 20:57:02 You were already referring to an AppCompat theme, so I assumed you were correctly depending on AppCompat. Apr 23 20:57:10 its always awesome new features but you know something will gone wrong. you just dont know what Apr 23 20:57:20 ahah g00s, and it's a PTSD (P for Post) because of the last/previous time they expiremented a release of a new software from google Apr 23 20:57:23 g00s: tried the recyclerview stuff? Apr 23 20:57:51 groxx not the grid /yet/ - ihave other simple RV things Apr 23 20:57:54 TacticalJoke: I've barely done anything with this app. And I am not actually using AppTheme Apr 23 20:58:21 TacticalJoke: AppTheme wouldn't give me a custom bg Apr 23 20:58:39 After all that, you're not even using AppTheme. ;o Apr 23 20:58:44 g00s: k - just curious if it works for you :) I might have to package some of these up somewhere / actually start a blog or something, because I haven't seen this approach before (for either). but it's WAY simpler than what I've found. Apr 23 20:59:17 TacticalJoke: I am using CustomActionBarTheme. Apr 23 20:59:33 TacticalJoke: sorry if that confused you. Apr 23 21:01:38 TacticalJoke: So... what should I do. At this point it works good except for the fact that I am extended to Activity instead of ActionBarActivity. Apr 23 21:02:31 noahmg123: I guess you're simply not depending on AppCompat. In this case, the advice is just "depend on AppCompat". Apr 23 21:03:45 TacticalJoke: wait. I actually have apptheme on the appilcation tag but customeactionbartheme on the activity tag. anyway, how can I depend on app compact w/o losing my custom bg? Apr 23 21:04:03 customactionbartheme* Apr 23 21:06:02 TacticalJoke: you still there? Apr 23 21:06:46 Does anyone know how to avoid the weird effect, when add items on an adapter and notifydatasetchanged ? Apr 23 21:07:28 ektos: what weird effect? Apr 23 21:07:30 noahmg123: All of the answers have been given. *Complex harmonica music plays.* Apr 23 21:08:01 TacticalJoke: OK. I guess I'll just stick with extending to Activity Apr 23 21:08:12 TacticalJoke: you used ALL the answers? D: Apr 23 21:08:33 for what I've been reading it is not possible to do a screen locker like the the default one, what I can do is some app that simulates it. is this correct? Apr 23 21:08:49 so, uh crazy question - anyone know something about themes that would preserve night vision ? Apr 23 21:09:00 color, i guess some shade of green or red Apr 23 21:09:06 + dark theme Apr 23 21:09:09 g00s: only thing I can think of is reds. Apr 23 21:09:33 groxx: e.g. when I received the event when I'm at the 2 item of my list, I start adding items to my linkedList but ahead instead to add to the tail, cause I wanna get a navigation kinda "backward" Apr 23 21:09:54 ektos: there's a "stack from bottom" option, or something similarly-named Apr 23 21:09:55 groxx yeah ... Apr 23 21:10:14 groxx: REALLY ! OO Apr 23 21:10:18 I'm actually designing my app's main theme to provide super-comfortable pitch-black viewing. Apr 23 21:10:23 Mainly because I use it while falling asleep. Apr 23 21:11:06 ektos: otherwise, I forget if it tries to stay in the same position if you have stable IDs. if yeah, override hasStableIds and return an id of some kind (unique to the row, not the position) from getItemId Apr 23 21:11:44 "You may have seen the Military using red light to read maps and preserve their night vision. Although, there has been a shift recently to using green light or a blue-green light instead of red." hm Apr 23 21:11:44 at least, I assume that's what you're talking about Apr 23 21:12:11 might be because green is easier/easiest to see details, e.g. text Apr 23 21:12:14 g00s: Are you creating a spy app? Apr 23 21:12:27 lol, no but its Tactical though :P Apr 23 21:12:42 g00s: every astronomy thing I've ever seen uses reds, fwiw Apr 23 21:14:36 groxx: hasStableIds is for a BaseAdapter (or its child), I'm using a viewpager ==> PagerAdapter Apr 23 21:15:12 ah, viewpager. :| for some reason they're not as capable. Apr 23 21:15:47 ektos: there's a getPositionForView or something method for viewpager adapters Apr 23 21:16:23 getItemPosition. Apr 23 21:16:57 override that correctly, and it won't jump around as you add / remove things Apr 23 21:28:00 groxx: g00s I've heard a lot of theories about the red light like we can see it better in the center of the eye, size of pupils is regulated by the blue light, stars are not red etc etc I'm sure anybody actually knows the truth if it works or now :-D I suggest take a not that a lot of men has color deficiency IIRC mostly to red and green light Apr 23 21:28:22 so UI color should be a setting Apr 23 21:28:34 oh so red or green ? Apr 23 21:28:45 s/I'm NOT sure anybody actually knows/ Apr 23 21:28:55 right, but provide both red & green ? Apr 23 21:29:02 color blindness, not deficiency. if it's shades of red-through-black, color blindness doesn't matter, it's still shades. Apr 23 21:29:09 g00s: at least red green because some people cannot see one of those colors well Apr 23 21:29:31 i had a friend who was colorblind, his desktop was shades of pink Apr 23 21:29:36 he had no idea :) Apr 23 21:32:06 Protanopia (1% of males) For a protanope, the brightness of red, orange, and yellow are much reduced compared to normal. groxx Apr 23 21:33:53 aah, gotcha. most things I see are just referring to red/green blindness Apr 23 21:34:07 solution! define everything in shades of gray, offer a color picker. Apr 23 21:34:39 plus then you can pick almost-black, to show on black. and make _everyone_ squint Apr 23 21:34:54 groxx can you then apply some colofilter to programatically tint ? Apr 23 21:35:37 dunno. app-wide, probably not (maybe on Lollipop though?) Apr 23 21:35:53 tricknology_: thanks for the article. it was a good read. I also found this one: http://www.journaldev.com/1377/java-singleton-design-pattern-best-practices-with-examples Apr 23 21:35:58 I mean, there are ways of course, but probably nothing built in Apr 23 21:36:26 tricknology_: which highlighted the "Bill Pugh Singleton Implementation" Apr 23 21:36:26 groxx: It's nice to have a good looking default though, instead of gray Apr 23 21:36:38 Thanks gekox, that one looks a lot more consice Apr 23 21:36:59 yiati: is gray bad? I'd probably pick gray Apr 23 21:37:24 gekox: given our usernames, I fear we must fight until only one remains Apr 23 21:37:53 groxx: Depends on your audience. For a general audience probably, unless it's a very light almost white gray Apr 23 21:38:03 good find Apr 23 21:38:04 groxx: hehe... don't worry i'm not overly attached to mine... and you help more than i do :) Apr 23 21:38:11 brb Apr 23 21:38:30 groxx: Giving users the option to change color schemes in settings is definitely a big plus though Apr 23 21:38:56 gekox: yeah, that "Bill Pugh" version does work on android. Apr 23 21:39:14 interesting http://www.androidpolice.com/2015/04/06/pixel-off-turns-some-screen-pixels-black-to-save-battery-power-on-devices-with-amoled-screens/ Apr 23 21:40:10 g00s: quite interesting Apr 23 21:41:06 I suppose it would work... I'd be curious about actual tests of battery use though Apr 23 21:41:17 g00s: i believe that apps like Screen Filter also help with battery life on AMOLED screens Apr 23 21:41:37 groxx: same here Apr 23 21:42:40 g00s: possibly? http://developer.android.com/reference/android/graphics/Canvas.html#setDrawFilter%28android.graphics.DrawFilter%29 do that in your root view, maybe it applies to subviews too? Apr 23 21:43:27 groxx cool thanks Apr 23 21:49:31 groxx: g00s this thing about OLED screens is old http://phandroid.com/2010/07/01/surfaceflinger-brings-to-surface-the-true-battery-benefits-of-oled-technology/ OTOH dark colors on LCD screen use (negligibly?) more energy since LCD pixel needs to be darken to not let through the backlight Apr 23 21:49:46 What's the best way to share a link Apr 23 21:49:57 can you I can't get the VM to come up. I installed android studio, created a new project, made no changes, hit "Run App" and then I keep getting errors like "NAND: resources not available" or "file exists" Apr 23 21:54:49 I can rm the file, but it gives another error Apr 23 21:56:12 lasserix: Intent Apr 23 22:01:07 interesting, since i updated to AS 1.2 RC 2, my gradle syncs are failing Apr 23 22:01:20 looking through idea logs - seems can't find my gradle directory Apr 23 22:01:21 wut Apr 23 22:01:34 1 step forward, 10 steps back Apr 23 22:02:14 How bad is to leave unchecked types in generic stuff? Apr 23 22:02:23 g00s: Take enough steps back and you be ahead of where you started Apr 23 22:02:37 in order to avoid some boilerplate, but will my code run slower or something? Apr 23 22:02:38 Papipo: tsk tsk Apr 23 22:02:44 hehe Apr 23 22:02:58 Papipo: won't run much slower, but is more error prone Apr 23 22:03:11 I see Apr 23 22:03:18 hello, how do I pass data between activities activities in xamarin? Apr 23 22:03:25 I guess I'll have to bite the bullet, as usual T_T Apr 23 22:03:29 yiati: sure intent, but like can id o or just do http::/link as plain text? Apr 23 22:03:30 Thanks yiati Apr 23 22:04:15 lasserix: Fire off an intent in the onClick of a TextView. No html href tag necessary Apr 23 22:04:25 Papipo compiler uses type erasure so your generics are type safe: hence no slower, and in fact its matter of how many people are going to be using your code: generics were introduced for the purpose of type-checking Apr 23 22:04:55 nobody but me, it's a pretty normal android app Apr 23 22:05:20 but since I have several views or fragments that have many similarities, I am trying to extract some behaviour into generic classes Apr 23 22:07:07 how do i eval if it is worthy to implement the whole infra (content provider + sync adapter) VS (GET / process locally / PUT data to server)??? Apr 23 22:07:23 lasserix: http://stackoverflow.com/a/9932870 Apr 23 22:07:55 Papipo: if you supress type checking it kinda defeats the point of generics Apr 23 22:08:20 are you sure interfaces or abstract classes aren't enough? Apr 23 22:08:33 after spend a whole week implementing the persistent layer, i feel like i wasted a lot of time Apr 23 22:08:36 is there someplace in the AS UI i can put my gradle path ? Apr 23 22:08:44 actually, they could have been enough if it wasn't for Retrofit Apr 23 22:08:45 otherwise just make sure you understand super ? etc the generic operatos and you shouldn't have to supress checking Apr 23 22:09:10 at some point I had to use generics on an interface for retrofit wrappers Apr 23 22:09:24 oh found it Apr 23 22:09:25 then I had to add them everywhere :( Apr 23 22:10:28 Actually, there are many things I don't understand from java Apr 23 22:11:26 I kind of understand them, but not fully, which translates into not understanding them Apr 23 22:11:26 I come from ruby, which is extremely flexible, so all these things annoy me a lot Apr 23 22:12:45 Papipo: How bad is to leave unchecked types in generic stuff? == ? Apr 23 22:12:56 Papipo, i did not understand your question Apr 23 22:13:17 Papipo you can absically use ideas of inheritance in generics by using ? super and something else as modifiers to your generics Apr 23 22:14:03 for instance T super i can't remember to rules, but it'll limit the scope so that you can set up your interface, then have T extends such and such interface which gaurentees the shared type characters Apr 23 22:23:27 holy shit AS 1.2 RC2 is busted to hell Apr 23 22:23:59 this was the first tim ei tried gradle sync since updating, now it won't and its not going anywhere Apr 23 22:26:40 Anyone used this library before? Carbon? https://github.com/ZieIony/Carbon Apr 23 22:28:36 "org.gradle.tooling.model.UnsupportedMethodException: Unsupported method: JavaCompileOptions.getEncoding(). Apr 23 22:28:37 The version of Gradle you connect to does not support that method." Apr 23 22:28:58 lol, it would be nice if they put - in the release notes, what version of gradle they wanted us to use Apr 23 22:29:11 kids these days Apr 23 22:29:12 t0astt: wow IDK my old 2.2 device lags a lot. and now Material animations? Apr 23 22:29:32 icedp: ? Apr 23 22:31:12 t0astt, is it a business requirement you support 2.3? if not, i see no reason to use this lib Apr 23 22:31:38 No I wouldn't say so. I'd have to ask my client what he wants, though Apr 23 22:32:55 t0astt, https://www.udacity.com/course/viewer#!/c-ud853/l-1395568821/m-1643858570 Apr 23 22:33:35 support a larger audience VS cost of dealing with supporting older APIs Apr 23 22:34:01 I might just set the minimum API to ICS Apr 23 22:34:31 https://code.google.com/p/android/issues/detail?id=169926 Apr 23 22:34:39 groxx are you around ? Apr 23 22:34:56 g00s: ya Apr 23 22:35:07 does gradle sync work in your AS Apr 23 22:35:15 i got the impression you updated to RC2 Apr 23 22:35:21 yeah, seems to be. Apr 23 22:35:31 what gradle version ? Apr 23 22:35:44 1.0.0 :| Apr 23 22:35:50 ah, that's the plugin. checking. Apr 23 22:36:00 2.2.1 Apr 23 22:36:11 hm, thats what i'm using Apr 23 22:36:20 but plugin 1.0.0 really / Apr 23 22:36:22 ? Apr 23 22:37:10 sadly. Apr 23 22:37:23 t0astt: i created an app and checking google analytics i saw that 4% of the active users were using gingerbread Apr 23 22:37:24 so yeah, I miss method params until I move forward a line. Apr 23 22:37:39 even though ICS covers 82.6% of android audience Apr 23 22:38:01 ventura: Yeah I checked the link they had in the udacity link you showed me and gingerbread was only 6% Apr 23 22:38:08 so I'm going to set min api to 15 Apr 23 22:38:30 hey Apr 23 22:38:32 g00s: also older build tools, possibly that's related? Apr 23 22:38:41 looking at idea.log is pretty scary, so many exceptions (setting VFS corruption marker) ... oookaay Apr 23 22:38:58 anybody could help me with writing and reading data from phone ? Apr 23 22:39:04 i need to store some settings Apr 23 22:39:06 groxx yeah dunno, RC0 was working fine - i haven't changed anything else Apr 23 22:39:27 man i have to go back to vim again :) was using that this weekend Apr 23 22:39:29 t0astt, honestly my inner peace is more worthy than those 7.8% gingebread gives me back Apr 23 22:40:36 g00s: plus CLI gradle? or just in general? Apr 23 22:41:01 yeah i had AS problems last week and just went vim + gradle CLI Apr 23 22:41:22 CLI works fine, its just AS 1.2 RC2 is busted again Apr 23 22:43:25 groxx but thats weird, how it could be working for you - we both have same IDE, same version of gradle, but i'm using plugin 1.2 - but if it was the plugin, i'd expect it to low chunks on command line Apr 23 22:43:37 and its been fine since i started using it Apr 23 22:43:56 s/low/blow Apr 23 22:44:07 when you fire an intent to open the Play Store, how do you set the 'referrer' parameter that you would normally set as a url param? Apr 23 22:44:54 g00s: yeah, definitely odd. could be that AS triggers different config code-paths? Apr 23 22:47:01 lol, if you are going to file a bug request, a better title than "Gradle stopped syncing" necessary Apr 23 22:47:21 biggest pain of gitflow: switching branches and your idea not keeping up with different dependencies on different branches Apr 23 22:47:22 holy fuck... Apr 23 22:47:34 s/idea/IDE Apr 23 22:47:45 switching branches in AS causes it to go into tailspin, i have to invalidate caches Apr 23 22:47:52 yeah, it's annoying Apr 23 22:48:02 I can do a build re-import, but annoying Apr 23 22:48:03 perhaps surprisingly, AS has been _dramatically_ better at branch-switching than Eclipse. Apr 23 22:48:04 for me Apr 23 22:48:14 oh i do from command line Apr 23 22:48:21 but i have the ide shutdown when i do Apr 23 22:48:30 still, start it up, its confused as hell Apr 23 22:48:30 Eclipse would crash, build incorrectly, generally flip out. AS has never given me grief so far. Apr 23 22:48:37 even with some pretty drastic changes in one case. Apr 23 22:49:37 intellij just needs to be refreshed from the project build file Apr 23 22:49:45 but still, so goddamn annoying Apr 23 22:49:56 have I mentioned that I hate gitflow? Apr 23 22:50:19 i do something like gitflow, but without any tools ... Apr 23 22:50:27 master, develop, feature Apr 23 22:50:38 bugfixes ... seems logical to me Apr 23 22:51:15 instead of long lived integration branches, i guess you could do short ones like per iteration Apr 23 22:52:52 nicer AS logcat formatting ... https://code.google.com/p/android/issues/detail?id=169900 Apr 23 22:53:06 I hate logcat in intellij Apr 23 22:53:07 so shitty Apr 23 22:53:14 I don't understand how it's so stupidly slow Apr 23 22:54:33 There's an RC2? Apr 23 22:54:50 I probably won't risk updating again till R. Apr 23 22:55:36 TacticalJoke: yeah. sounds like it's breaking g00s, but it's working fine for me so far. Apr 23 22:56:24 should i try gradle 2.4rc2 :D Apr 23 22:56:26 RC1 Apr 23 22:57:13 Hmm, http://www.reddit.com/r/unixporn is surprisingly active. Apr 23 23:00:43 TacticalJoke: i3 is popular, cool Apr 23 23:01:51 A tiling window manager sounds like a nice idea. Apr 23 23:02:13 a penrose tiling window manager :D Apr 23 23:02:39 Your app would have to support fat and skinny rhombus layouts Apr 23 23:02:48 lol Apr 23 23:06:39 res/layout-rhomboid/wtf.xml Apr 23 23:08:07 you can project a rect so be it Apr 23 23:08:47 how do I manually run the dagger2 compiler? Apr 23 23:09:09 I'm getting a weird compilation error and want to see how it is coming up with this error Apr 23 23:10:25 Anyone use https://android-arsenal.com/details/1/1432 ? Apr 23 23:10:55 so many projects extending recyclerview ... Apr 23 23:11:03 did they just fail with the API ? Apr 23 23:11:36 Dear all , i have a small problem i need a help in. I have an apk app decode with akptool . there is a folder inside smali has some bugs , a new folder has been copy from other “OLD BUG FREE” version of the app will be placed instead of the buged one. The problem is the res ids and public.xml , there is a lot of different , if I compare old public.xml and the ne public.xml I can Apr 23 23:11:36 finde a huge change in the ids. And over that the old bug free virsion folder has some extra “.field public static final” lines. Now the question , what is the best way to fix the ids , is there any toll help me to do that? Apr 23 23:12:23 beshoo if its not your app, this isn't #android-reversing Apr 23 23:13:15 * groxx clicked, thinking "that's a thing?!". then http://nooooooooooooooo.com/ . Apr 23 23:15:49 whats the best flags when starting an intent to share info? FLAG_ACTIVITY_NO_HISTORY, FLAG_NEW_TASK, FLAG_ACTIVITY_NEW_DOCUMENT ? Apr 23 23:16:23 hi Apr 23 23:16:26 for what I've been reading it is not possible to do a screen locker like the the default one, what I can do is some app that simulates it. is this correct? Apr 23 23:19:21 NCS_One: I think so, yes. you can get called when the screen is turned off iirc (so you can pop up), but you can't actually e.g. act as a secure keyguard. Apr 23 23:30:26 groxx: is it possible to disable to disable the default one? Apr 23 23:31:55 NCS_One: depends. as a user, yes, normally. but they won't if the device is enforcing a higher security mode (e.g. they have user certificates for e.g. Enterprise™ networks or websites, or Exchange is requiring it, or other reasons) Apr 23 23:32:43 Why do these views keep changing their heights despite me giving an explicit height to the root view? Apr 23 23:33:29 s73v3r_: ¯\_(ツ)_/¯ any other relevant details? otherwise I'd say "they shouldn't". Apr 23 23:35:09 I have a ListView, with cells. I’m setting the height of the root element of the cell in DPs. I’ve switched the root from being a v7 CardView to being a FrameLayout containing a v7 CardView. The CardView contains an ImageView Apr 23 23:35:51 everything is set to match_parent except for the root, which has it’s width and height set explicitly Apr 23 23:36:42 groxx: ok, thanks. have to go, return tommorow Apr 23 23:36:52 g00s #android-reversing is empty ! Apr 23 23:38:18 I have been at this all day, and have absolutely nothing to show for it Apr 23 23:38:44 s73v3r_: when are they changing? as you scroll, or while sitting passively on screen, or ...? Apr 23 23:39:09 as scrolling happens. Apr 23 23:43:07 groxx: I decided to write a drawable thought. 100+ LOC but easier to use and more features =) http://t.sql01.com/sc/729745fd_1429832497.png Apr 23 23:43:18 s73v3r_: Is every ListView child set to the same height, or are you setting different heights in certain cases? Apr 23 23:43:26 If it's the latter, you might be doing something wrong with regard to view recycling. Apr 23 23:43:40 i have only one kind of cell, so they should all be the same height Apr 23 23:44:54 cells can have different heights based on content Apr 23 23:45:03 my listviews have 1 type of cell, but all different heights Apr 23 23:45:46 but in my cell layout xml, I’m explicitly setting the height of the root element Apr 23 23:46:13 s73v3r_: Maybe you could post the cell XML and the adapter code? Apr 23 23:46:46 pastbin? Apr 23 23:46:53 Yeah, or any one. Apr 23 23:47:52 http://pastebin.com/0imzEC9Y Apr 23 23:49:43 icedp: nice. I haven't yet made a Drawable - how was it? Apr 23 23:50:55 toolbar in cardview. mind blown Apr 23 23:51:25 groxx: I meant View actually. But difference is minimal. A lot of details, but not hard Apr 23 23:51:27 groxx, why not Apr 23 23:51:55 pfn: it's more of a "actionbar has ruined my brain, I wouldn't have thought of that" thing :) Apr 23 23:52:04 s73v3r_: We can haz adapter too? Apr 23 23:52:06 I _assume_ it works fine Apr 23 23:52:18 groxx, indeed Apr 23 23:53:13 http://pastebin.com/ue5s2aTC Apr 23 23:53:30 here, but it’s not doing anything special other than retrieving the image that goes into the network image view Apr 23 23:54:15 how do I adjust the expiration of a pastebin after I’ve made it? Apr 23 23:55:16 s73v3r_: Hmm, you should be saying "mInflater.inflate(layout, parent, false);", though I doubt that'll solve this. Apr 23 23:55:26 s73v3r_, you don't Apr 23 23:55:34 sucky Apr 23 23:55:52 it's ok, your code isn't anything special :p Apr 23 23:56:01 use a better pastebin than pastebin.com though Apr 23 23:56:06 * pfn favors gist, lately Apr 23 23:56:32 pastebin’s the first one that came to mind Apr 23 23:56:46 it's almost always the worst choice Apr 23 23:58:01 s73v3r_: Actually, that might be causing this issue. Apr 23 23:58:32 I read that the root's LayoutParams can be disregarded if you don't specify the parent. Apr 23 23:58:54 I tried switching it over, and now my cells are not as wide as they were before Apr 23 23:59:07 Are they all the same height now? Apr 23 23:59:20 i didn’t check the height Apr 23 23:59:47 Regardless, passing 'null' as the parent was wrong. Apr 23 23:59:47 If you do (layout, null) it will ignore everything about the container Apr 23 23:59:54 i see that Apr 24 00:00:57 On a side note, those two magic values are duplicated. Just put them in dimens.xml and read them from XML and Java. Apr 24 00:01:01 TacticalJoke: is that an "in general" sort of rule? Apr 24 00:01:02 height is the same Apr 24 00:01:06 Also, recalculating those values in Adapter.getView every time seems inefficient. Apr 24 00:01:20 yeah, I’ll clean that up. Right now, I’m just trying to get it to work Apr 24 00:01:32 mrfu: From what I read, it almost always applies, with some exceptions such as DialogFragment. Not sure, though. Apr 24 00:02:44 It's one of those things I never got around to researching. :D Apr 24 00:03:18 so the heights are all the same now, thank you :D. But now the cells are not as wide as they’re supposed to be. I’m worried that the design I was given isn’t accurate Apr 24 00:03:38 Don't you want a match_parent width generally with ListView children? Apr 24 00:04:35 the cards have a specified size Apr 24 00:05:38 you could always modify them in onStart Apr 24 00:06:02 s73v3r_: I'm not sure. How wide are they supposed to be? Apr 24 00:06:27 the screen width - 18dp on either side Apr 24 00:06:49 do screens have a constant size in dp? Apr 24 00:06:54 Then I guess just match_parent with padding/margin? Apr 24 00:07:36 * icedp is afraid to ask but how do I justify text in TextView? Apr 24 00:07:55 you write your own TextView with justified text D: Apr 24 00:08:21 If you can justify reinventing the wheel. Apr 24 00:08:28 icedp: Just android:gravity. Apr 24 00:08:57 last time I looked, android:gravity didn’t do it Apr 24 00:09:16 TacticalJoke: gravity what? fill doesn't seem to work Apr 24 00:09:19 I guess 'justify' is ambiguous. Apr 24 00:09:25 wow, this is a strange reversal of fortune Apr 24 00:09:36 my app runs when proguard is enabled, but fails if I disable proguard Apr 24 00:09:41 (not a method limit issue) Apr 24 00:10:11 and not the samsung appcompat problem either Apr 24 00:10:38 icedp: Are you talking about what they call "full justification"? Apr 24 00:11:45 I guess. Like this http://t.sql01.com/sc/651a652a_1429834286.png Apr 24 00:12:26 That image isn't loading here. Apr 24 00:12:44 If it's full justification, my googling is suggesting that TextView doesn't support it. Apr 24 00:12:53 Okay, the image loaded. Apr 24 00:13:41 People are saying use WebView. ;| Apr 24 00:14:32 heh Apr 24 00:14:50 also: https://github.com/navabi/JustifiedTextView Apr 24 00:14:52 There may have been a library written that does full justification, but I don’t remember Apr 24 00:16:16 One last problem: v7 CardView on KitKat has this white border drawn around it. Doesn’t show up on Lollipop. Don’t know about below KitKat. Any ideas what it is? Apr 24 00:21:28 googling has info about that Apr 24 00:21:52 Okay, I read the source for LayoutInflater. Yep, it just throws away the layout params (e.g., width + height) if you don't specify a parent. Apr 24 00:22:22 Which makes sense, I guess -- without knowledge of the parent we don't know what LayoutParams to generate. Apr 24 00:23:15 Also, TIL about ViewGroup.generateLayoutParams. Apr 24 00:23:37 interesting Apr 24 00:24:06 pfnQ: I see a stackoverflow question, but it’s unanswered Apr 24 00:25:03 so the previous developer has given me the keystore password for this app, but "keytool -list -keystore foo.keystore" is still erroring out with: keystore was tampered with or password was incorrect Apr 24 00:25:23 im likely using a newer version of the jdk, is that likely to be causing this issue? Apr 24 00:25:47 anyone else on AS 1.2? it seems to prefer decompiling library dependencies when you view them, over using the maven source jars Apr 24 00:25:54 how do I get the old behavior? Apr 24 00:27:04 missingno: Just tried going to OkHttpClient.java and it didn't decompile; it just showed the source. Apr 24 00:27:07 Using the RC. Apr 24 00:27:49 Same if I middle click "OkHttpClient" in code. Apr 24 00:27:53 hmm that is the same version as mine Apr 24 00:28:02 ah woah, seems if i just hit enter then keytool can list the keys properly Apr 24 00:28:09 Which library is that? Maybe it's not importing the sources. Apr 24 00:28:28 it is mockito 2.0.7 Apr 24 00:29:20 hmm my .idea xml for it has an empty tag Apr 24 00:29:52 My sources are in %USERPROFILE%\.gradle\caches\modules-2\files-2.1\ (on Windows). Apr 24 00:30:48 yeah the jar is there on my machine Apr 24 00:30:53 so how do i generate a signed apk in android studio when the wizard doesn't let me specify a blank password for the keystore? Apr 24 00:30:59 but it seems to have decided to not download the source jar Apr 24 00:31:01 the key has a password but the keystore doesnt Apr 24 00:31:10 even though it seems to be on maven central Apr 24 00:31:14 if i trie that the dialog says "please specify a key store password" Apr 24 00:32:51 er, try* Apr 24 00:35:13 well I just noticed a "Download" link in the yellow "decompiled this file" bar Apr 24 00:35:26 which seems to attempt to download the sources Apr 24 00:35:35 but fails for mockito in particular Apr 24 00:35:49 * g00s tries gradle 2.4rc1 Apr 24 00:36:38 when are annotation processing projects going to start using the gradle 2.4 stuff? Apr 24 00:37:27 missingno: Is it because it's called beta-sources or something? Apr 24 00:37:56 lemme roll back to 1.9.5 since that seems to be what everyone uses Apr 24 00:38:56 s73v3r_: re "do screens have a constant size in dp": not really. a single device will have two orientations, otherwise it's different per device. you probably want to add 18dp layout_margin-s. Apr 24 00:39:38 groxx: ignoring rotation, though, would they? Apr 24 00:39:53 Maybe in the future, when we have resizable screens. :D Apr 24 00:44:37 s73v3r_: Why not let Android take care of it? Otherwise you're violating DRY again. Apr 24 00:45:05 Though this time in a more subtle manner (and across two code bases). Apr 24 00:45:16 i did, but the design spec I got had a specified height and width in it Apr 24 00:45:39 The spec is screen_width - 16dp? Apr 24 00:45:57 18* Apr 24 00:46:21 s73v3r_: ignoring rotation, they should be stable, yeah. unless you opt into multi-window mode on Samsungs :) Apr 24 00:47:04 s73v3r_: even with a spec, you may have devices narrower than 328dp. (they absolutely exist) Apr 24 00:47:20 s73v3r_: it might support maxWidth though, fwiw. Apr 24 00:47:25 (the layouts) Apr 24 00:47:36 the spec was the number I put in the layout originally. The way they presented it, though, was that the card was 328, and the margins were 18 Apr 24 00:48:33 kiwi irc web client is kinda neat Apr 24 00:48:54 i can't tell none of the irc clients are working i wonder if my employer blocked them somehow but that would seem stupid Apr 24 00:49:30 is it safe to call ButterKnife.inject in a fragments onCreateView or should I do it in onActivityCreated instead? Apr 24 00:50:24 onCreateView is correct Apr 24 00:50:38 thanks Apr 24 00:52:08 groxx i tried 2.4RC1 and it seems to work again Apr 24 00:52:25 Is it fast? Apr 24 00:52:34 when you fire an intent to open the Play Store, how do you set the 'referrer' parameter that you would normally set as a url param? Apr 24 00:52:44 Wait, can you use whatever version of Gradle with AS? Apr 24 00:52:50 Anyone know what Connection failed. Error: No Route to host would mean if my irc client is failing to connect? Apr 24 00:52:55 would be great if release notes just said: use this ver gradle, this ver plugin, etc Apr 24 00:53:23 g00s: why would you want that? upgrading should be an _adventure_! Apr 24 00:53:24 i only tried because RC2 totally borked on me, exception in logs indicated wrong gradle Apr 24 00:53:44 Anyone familiar with the Facebook SDK? I generated a debug hash code but I don't see any option in the app dashboard to enter the hash. Apr 24 00:53:53 I thought we had to use a particular version of Gradle with AS. Apr 24 00:53:57 groxx upgrading and building should be boring as shit Apr 24 00:56:28 still that pesky problem of my R files not being generated, thats been busted for at least a week tho Apr 24 00:57:38 but after i do a build it seems to get resolved too Apr 24 01:00:49 I wonder who I can find that's security focused to do some javascript work for me Apr 24 01:01:09 someone's offered to sponsor work on chromeipass, but I have no time, heh Apr 24 01:01:43 Would setting children views who match_parent to the parent's exact values speed up the layout process? Apr 24 01:01:49 *ie as an optimization Apr 24 01:02:40 Probably not Apr 24 01:17:05 gradle-plugin 1.2.0 final is out Apr 24 01:17:12 GONE speeds up layout. beyond that, probably not, though it depends on the layout of course. Apr 24 01:20:08 did you guys see this https://github.com/yahoo/squidb Apr 24 01:20:43 oooo that's sweet Apr 24 01:21:05 g00s: nope. looks like about what I want though... thanks for the link Apr 24 01:22:27 g00s thats interesting Apr 24 01:25:20 Can I set the BG icon of the search box in the action bar? Apr 24 01:25:48 g00s:wow that is nifty Apr 24 01:26:39 Can I set the BG icon of the search box in the action bar? Apr 24 01:28:21 is it possible to clear a textview? Apr 24 01:28:34 i mean imageview Apr 24 01:28:39 not textview Apr 24 01:30:06 .setText(""); Apr 24 01:35:27 jug6ernaut: i meant imageview :( Apr 24 01:35:32 i figured it out though Apr 24 01:35:37 null Apr 24 01:35:49 or just set the view to invisible Apr 24 01:36:19 null doesnt work i think, i am just setting it to android.R.color.transparent Apr 24 01:40:38 Hello. I use android studio. I'm adding a dependency line to the build.gradle. I want to check how will this affect the size of the application. Where can I look it up? Apr 24 01:41:07 creitve: Build it and look at the apk size? Apr 24 01:41:10 on your phone settings-> apps-> your app and size Apr 24 01:41:26 So IDE doesn't have that functionality. Fine, thanks! Apr 24 01:41:33 CedricBeust:is apk size equivalent to "unpacked" size? Apr 24 01:41:35 Also, build it with minification on to get an accurate idea, although you probably need to start using that library or most of its content will be shaken off Apr 24 01:41:56 i got the impression minifyEnabled turned on proguard Apr 24 01:42:01 lasserix: No, it's a rough idea. I like to do that and get a dex method count just to get a ball park Apr 24 01:42:12 ah Apr 24 01:42:54 Yes, I had the idea that it might not be accurate for that kind of reason. Thanks anyway. Apr 24 01:44:35 why onLoadFinished is called two times? Apr 24 01:44:51 the data is not changing Apr 24 01:45:55 g00s, that's right Apr 24 01:46:04 g00s, minify = proguard Apr 24 01:49:59 Well technically there are many ways to minify but yeah, proguard is pretty much the only game in town here Apr 24 01:50:26 DadFoundMy: From looking at the source, it seems that passing null to ImageView.setImageDrawable should work. Apr 24 01:50:47 Though I dunno. Just found it an interesting question. :D Apr 24 01:57:30 TacticalJoke: stackoverflow lied to me :(. how dare they :( Apr 24 01:58:06 What did they say? (I closed the tab.) Apr 24 01:58:31 Note that ImageView passes null to setImageDrawable in certain cases. Apr 24 01:58:38 Well, to updateDrawable (which is pretty much the same). Apr 24 01:59:41 ahh stackover was trying setImageBitmap(null) Apr 24 01:59:52 i wonder if that makes a difference Apr 24 02:00:17 whats the AS key to check source again? Apr 24 02:01:24 If you middle-click ImageView. Apr 24 02:01:32 Or Ctrl+Click or Ctrl+B (I think). Apr 24 02:02:58 hmm i think setImageBitmap(null) should also work because it looks like it just calls setImageDrawable(BitmapDrawable); Apr 24 02:03:55 I don't think it will. It causes a non-null Drawable to be set. Apr 24 02:04:04 Whereas setImageDrawable(null) causes a null Drawable to be set. Apr 24 02:04:27 And a null Drawable has special handling. Apr 24 02:04:42 (e.g., in updateDrawable.) Apr 24 02:09:42 hmm but BitmapDrawable extends Drawable Apr 24 02:09:49 dont you think it would inherit that special handling Apr 24 02:10:04 It's ImageView that is handling a null or non-null Drawable, not Drawable. Apr 24 02:10:31 https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/widget/ImageView.java#817 Apr 24 02:11:04 Having said all this, I haven't tried it and don't know whether it'll work. Apr 24 02:15:00 If I need two togglebuttons, only one of them active (radio button choice equivalent), what control should I use? Apr 24 02:15:28 I mean, like a TabWidget without actually changing content Apr 24 02:19:39 does anyone know a good design pattern for collecting a bunch of listeners Apr 24 02:21:29 duhruh: Collect them in a list, unsubscribe them in a loop? Apr 24 02:23:38 that seems like the delegate pattern, seems okay. Apr 24 02:24:41 so my case is that i have an activity and we like 50 listeners Apr 24 02:24:44 i'm exaggerating Apr 24 02:24:49 but stay with me Apr 24 02:25:11 now we don't want that activity to implement every listener Apr 24 02:25:19 that would look horrible Apr 24 02:26:01 i'm not sure of the best design pattern to handle this situation Apr 24 02:27:09 What are these 50 events that the activity might be listening out for? Apr 24 02:27:36 just random things maybe click events Apr 24 02:27:44 drag and drop events Apr 24 02:28:27 random fragment events would be more accurate Apr 24 02:30:12 duhruh: I'm trying to understand which part would look horrible? Even if you use an event bus, the activity is gonna have to subscribe and handle each event it's interested in. Apr 24 02:30:21 subscribe to* Apr 24 02:31:40 The part that would look horrible would be extends Activity implements Listener1, Listener2, ListenerN Apr 24 02:31:49 You don't have to do that. Apr 24 02:31:59 right that can't scale over the lifetime of the project Apr 24 02:32:02 oh really? Apr 24 02:32:30 You can do stuff such as this: foo.setOnClickListener(new FooOnClickListener()); // or foo.setOnClickListener(new View.OnClickListener() { ... }); Apr 24 02:33:39 right so those are 2 patterns the new class instances, and the anonymous function declaration Apr 24 02:34:04 Which do you tend to do more? Apr 24 02:34:55 I generally favour using "foo.setBarListener(new FooBarListener());", personally. Sometimes it makes sense to use "foo.setBarListener(this);", especially when using composition. Apr 24 02:34:59 Though that's just me. Apr 24 02:35:44 I mean, like, composition where inheritance might've been considered (where there's a close relationship between 'foo' and us. Apr 24 02:39:37 right i think i'm favoring the new FooBarListner() pattern Apr 24 02:39:44 it just seems like is scales better Apr 24 02:39:51 over the life of the project Apr 24 02:39:58 As opposed to using an anonymous class? Apr 24 02:40:01 the listener pattern doesn't scale very well, especially with 50 listeners. Consider using an event bus Apr 24 02:40:04 yea Apr 24 02:42:50 duhruh: I share your thoughts, I think, because I'm not a huge fan of anonymous classes in Java. The syntax isn't so nice, and also from what I've seen people badly abuse them. Apr 24 02:43:00 For example, I often see three *huge* methods within another method. Apr 24 02:43:12 And it's just code within code. No small, simple methods anymore. :) Apr 24 02:44:17 yea TacticalJoke you hit the nail on the head Apr 24 02:44:29 i've seen people abuse them a lot Apr 24 02:44:42 I think they can make sense for small methods, though -- especially one-liners. Having said that, I basically never use them because I dislike the syntax. Apr 24 02:45:19 Note that the non-anonymous versions compile down to the same bytecode, IIRC, so you're not losing anything. Apr 24 02:45:44 Or significantly similar bytecode. Apr 24 02:48:41 Also note that named ones can have constructors, can be static, etc. Apr 24 02:50:55 so there's no performance difference between the 2? Apr 24 02:51:28 As far as I remember they produce bytecode with identical performance. Apr 24 02:52:23 that's awesome Apr 24 02:58:39 TDD and things like dagger can help imensely with that **** ENDING LOGGING AT Fri Apr 24 02:59:59 2015