**** BEGIN LOGGING AT Tue Dec 06 03:00:00 2016 Dec 06 03:17:44 I want to write a simple Android program that listens for a particular sort of Bluetooth request from a paired device and sends a small amount of data in response. Is that sort of thing possible without requiring it to always run in the background? Dec 06 03:51:56 how do i remove a folder from an AS project. i do not want to delete the folder or its contents, just remove it from the project structure Dec 06 04:54:13 mark4: did you check settings.gradle? Dec 06 04:54:34 mark4: look for "include" and "project" directives Dec 06 04:54:38 i checked everythng and nothing would remove it Dec 06 04:54:55 i removed it from there, after closing AS, relaunched and that directory was back Dec 06 04:55:08 so i moved my project dir and am recreating from scratch, i still have the old dir Dec 06 04:55:18 mark4: then take a gun and shoot the screen. After that, don't scroll Dec 06 04:55:29 its a good idea to do this anyway because i have no idea what step/steps lead to success earlier Dec 06 04:56:05 i think i need to delete the project AND delete the .androidstudio directory Dec 06 04:56:22 it has added the directory into the new project too Dec 06 04:57:25 maybe it's a virus Dec 06 04:57:35 exactly Dec 06 04:57:37 a google virus Dec 06 04:57:53 Recently Visual Studio and Android Studio become target of viruses Dec 06 04:58:08 Eclipse seems to be immune Dec 06 04:58:40 actual viruses? Dec 06 04:58:44 in windows only Dec 06 04:59:07 no. I made it up Dec 06 04:59:10 anyone who runs a m$ operating system for any reason deserves everything they get :P Dec 06 04:59:33 and the reason eclipse is immune is because it is a virus too Dec 06 04:59:51 one that attacks the sanity of anyone who uses it way more than AS does Dec 06 04:59:55 the only virus I know is an IRC virus called mark4 Dec 06 05:00:35 theres no cure either Dec 06 05:00:41 because, let's be honest, all the stuff you write here can't be produced by a single human being Dec 06 05:06:37 i cannot remove the cpp directory. i did not enable cpp support Dec 06 05:37:40 http://www.androidpolice.com/2016/12/05/the-slow-uninteresting-death-of-android-tablets-is-unfolding-and-it-is-no-ones-fault/ Dec 06 05:51:30 :( Dec 06 05:59:25 * capella is fascinated by the drama :) Dec 06 05:59:37 melatonia has a new friend Dec 06 06:00:38 Melatonina, is it a 'bot? Dec 06 06:00:45 ;) Dec 06 06:17:04 capella: there is no drama. I was joking as usual. I just find him curious because he writes a lot even if nobody answers. That's all Dec 06 06:18:20 heh, but it was interesting subject matter iir some nice low-level asm stuff(?) Dec 06 06:21:11 yes, he works with native code in C++ I think. That was not the case today but I think he does that often Dec 06 06:21:59 g00s says he uses this channel as his rubber duck :) Dec 06 06:24:38 yah :-D I can relate Dec 06 06:25:23 i thought mark4 had asm from a forth compiler Dec 06 06:25:55 or something ;) Dec 06 06:26:02 somehow forth was involved, I missed that part of the glue Dec 06 06:28:38 bah, the speaker cable I bought yesterday is the wrong one Dec 06 06:57:55 * raoul11 thepooshes thepoosh Dec 06 07:02:11 oh hi there Dec 06 07:02:21 hi budyy Dec 06 07:02:38 still trying to fully grasp finale of westworld Dec 06 07:04:10 no spoilers Dec 06 07:04:17 didnt even start it yet Dec 06 07:06:34 watch away Dec 06 07:07:51 ill start today Dec 06 07:07:58 whats on the agenda today thepoosh Dec 06 07:11:51 was it the finale? Dec 06 07:12:01 episode 10? Dec 06 07:12:19 hi raoul11 Dec 06 07:12:31 o/ Melatonina Dec 06 07:18:37 raoul11: regenerating my DB Dec 06 07:18:40 with a new schema Dec 06 07:19:00 regenerate liek a baws thepoosh Dec 06 07:19:25 talk to corporate like a baws Dec 06 07:21:15 thepoosh decided to add custom events allover coz without bigquery, firebase analytics is useless Dec 06 07:22:30 oh myy Dec 06 07:32:00 Hi, I am using glide to load my images as centercrop, but when view is resized, the image is not center croped anymore, is there a workaround? Dec 06 07:49:52 I'm trying to use ORMLite, however I keep having a crash when loading my DAO because "No fields have a DatabaseField annotation in class java.lang.String" here's the crash plus my class: https://gist.github.com/Syzygy2048/6e5b95303bfe4006becce557ef31c546 Dec 06 07:56:59 Syzygy: is ORMLite still supported? Dec 06 07:57:35 didn't find anything that would indicate otherwise Dec 06 08:16:56 "thepoosh" sounds familiar ... didn't we meet on a bear hunt in Canada once ? :-P Dec 06 08:21:07 capella: doesn't look like anything to me Dec 06 08:21:24 hello, any recommendation for a socket library for android app ? Dec 06 08:21:48 sci-fic: OkHttp Dec 06 08:21:49 mmm ? Dec 06 08:22:12 beer hunt in canada and I get a question mark?! Dec 06 08:22:25 sci-fic: are you talking about websockets? Dec 06 08:22:31 or plain java socket Dec 06 08:23:17 thepoosh: between local machines Dec 06 08:23:33 you have to hunt beer in Canada? it's domesticated in most countries now... /me rethinks plan to go to Canada next month Dec 06 08:24:01 heh, yah, was mentally recalibrating over that bit :-/ Dec 06 08:24:02 heh Dec 06 08:24:19 sci-fic: Java has a built in socket class Dec 06 08:28:15 leeds, a couple months back I drove up to the border around Oswego to be sure them Canadians weren't invading Dec 06 08:28:16 ... cause you know, ... there's no wall Dec 06 08:29:04 they are sneaky, those meese Dec 06 08:29:52 I thought Mr. Garrison built a wall Dec 06 08:30:06 hahahaha ... I love that thing Dec 06 08:30:35 actually, it was the fucking mongolians that had me more worried Dec 06 08:30:55 They almost got Pennsylvania Dec 06 08:30:55 GOD DAMM MOGORIANS Dec 06 08:32:11 * capella shakes fist .... o/ Dec 06 08:33:11 shitty wok may I take your order prease? Dec 06 08:34:36 * capella doesn't have tree-fiddy .... :-/ Dec 06 08:35:46 But I do have enough sense to have finally bailed on upstate NY \o/ Dec 06 08:36:05 Loch Ness Monsta! Dec 06 08:36:24 capella: you from upstate NY? Dec 06 08:36:32 I was there for a few months years ago Dec 06 08:37:03 Originally Syracuse ... spent more time in Atlanta, big chunk in Miami ... Charlotte, likes contracting Dec 06 08:37:17 Didja do Heids? Dec 06 08:37:31 Dinosaur? Dec 06 08:37:35 nah, worked there Dec 06 08:37:40 Orange game? Dec 06 08:37:56 wait, wat? Dec 06 08:38:04 in the middle of the triangle of Syracuse, Binghamton and Albani Dec 06 08:38:16 in a plcae called Guilford Dec 06 08:38:32 worked there for 2 summers Dec 06 08:38:45 mmm, I did an interview there I never ... well, it felt like a miss Dec 06 08:38:55 not Guilford proper Dec 06 08:39:00 in that direction Dec 06 08:40:50 Oh yah, Guilford seems remote :) Dec 06 08:44:06 Hi Dec 06 08:44:19 it was in the middle of fucking nowhere Dec 06 08:45:21 If I have a website and want to show it in a webview, a) how can I make sure that the mobile version of the website is always loaded? b) How can I pass values from android to website? c) how can I pass values/data on certain events from website to android? Dec 06 08:59:07 wait !? Then I think I spotted you again thepoosh at this little water park in Florida !!! This is so weird Dec 06 08:59:27 capella: what ARE you talking about?! Dec 06 08:59:36 i was never in Flroda Dec 06 08:59:37 heeheehee Dec 06 08:59:40 *Florida Dec 06 09:00:30 yah, you were this frumpy fat asian woman with red frizzy hair Dec 06 09:03:31 thepoosh is secretly a mossad agent pretending he's a lead dev and an expert in firebase Dec 06 09:03:44 I was the Zohan Dec 06 09:04:12 you wish Dec 06 09:04:24 hate adam sandler Dec 06 09:04:42 also, he was such a bad israei character Dec 06 09:04:46 NOT OPERA MAN !!!! Dec 06 09:04:48 why do so many people h8 adam sandler Dec 06 09:05:15 because he sux Dec 06 09:05:45 Cajun man? Dec 06 09:08:15 yah that can't be right ... I don't know a single woman that loves Southpark, or basic "stooge" comedy :) Dec 06 10:27:44 does anyone remember something about the AOSP integrating Glide image loader? Dec 06 11:08:50 thepoosh, you say ORMlite is no longer maintained, would you recommend any library for database instead? Dec 06 11:15:39 either https://github.com/square/sqldelight or https://github.com/greenrobot/greenDAO Dec 06 11:17:17 ormlite has seen some recent development Dec 06 11:17:38 but I like https://github.com/requery/requery Dec 06 11:22:45 https://github.com/j256/ormlite-android/tree/master/src/main/java/com/j256/ormlite Dec 06 11:34:45 Hi, can I open the widget picker screen and scroll to my specific widget programmatically? Dec 06 11:42:04 thepoosh, yeah? Dec 06 11:52:01 Any idea why I can't build? It states Unsupported major.minor version 52.0, but I don't see where I'm using anything with such a version. Dec 06 11:52:03 https://gist.github.com/Syzygy2048/faf45fa0559f3586eb723060a9be7507 Dec 06 11:52:28 here's the result of gradlew --stacktrace and both of my gradle files Dec 06 11:58:36 If i try to just run the app, i get this error though : First problem: Dec 06 11:58:36 Pb(178) The assignment to variable iconName has no effect (536871090 at line 177). Dec 06 12:14:26 If I have a website and want to show it in a webview, a) how can I make sure that the mobile version of the website is always loaded? b) How can I pass values from android to website? c) how can I pass values/data on certain events from website to android? Dec 06 12:22:02 Sircle_: The answer to (c) is discussed here: https://developer.android.com/guide/webapps/webview.html#BindingJavaScript Dec 06 12:22:18 I guess the answer to (a) is user-agent detection and the answer to (b) is HTTP POST/PUT. Dec 06 12:34:52 Hello. I'm trying to sort out text lines beginning with a #. In the terminal "grep ^[#]" works fine, but in java it doesn't work at all: if(line.matches("^[#]")){ System.out.println("Mupp: " + line); } Dec 06 12:36:58 Bleke: I can't remember, but that probably should work. Can you pastebin the code? Dec 06 12:37:18 I'll try Dec 06 12:39:10 http://pastebin.com/fJb3yxUN a bit messy because I'm trying various things to find out what's wrong Dec 06 12:42:10 Bleke: That won't work because it tries to match the entire string with that regex (rather than part of the string). Dec 06 12:42:25 Bleke: there is match and find i think, one assumes thrbentire line thenother doesnt Dec 06 12:43:00 For example, `"#test".matches("^[#].*")` evalues to true. Dec 06 12:43:29 Ok, so I'll have to substring the first character? Dec 06 12:43:39 But `"#test#".matches("^[#]")` evaluates to false, as you've found. Dec 06 12:43:44 #test * Dec 06 12:44:13 Bleke: I think the best solution is not to use String.matches and instead, as wyoung mentions, the other regex stuff (Matcher and so on). Dec 06 12:44:33 Oh, yeah, you could just check the first character. Dec 06 12:44:49 If you're simply wanting to know whether a line starts with '#', using regexes is a bad solution. Dec 06 12:45:40 Well, when one writes regexps like that, sure Dec 06 12:46:11 Yeah, I'm awful both at programming and regex :) Dec 06 12:46:48 I did try ~[#].* in the terminal, but grep didn't like it Dec 06 12:47:04 ^[#].* Dec 06 12:47:35 Thanks for the help! Dec 06 12:48:00 Bleke: _Why_ are you using the brackets? Dec 06 12:48:16 Dagmar: Even without the character class, using regexes here is a bad idea. Dec 06 12:48:40 Dagmar: Because I don't know any better Dec 06 12:48:45 Considering there's a way to just compare that first character? Sure Dec 06 12:49:19 Bleke: It's literally just ^# that you're looking for, and in bash/grep it would be `grep '^#' filename` Dec 06 12:49:25 I did have a % that I wanted to remove too, so originally it was ^[#%] Dec 06 12:50:38 That's reasonable Dec 06 12:53:15 Hey all, I have an intent filter on an activity to pick up a custom URL scheme. That works perfectly, but whenever I hit that activity from within the app, I see there's 2 windows of the app ope, not just one, how can I stop that? Dec 06 12:54:00 Maybe you could help me with the / delimeter regex too? The lines I try to read looks like this: "月份會議 月份会议 [yue4 fen4 hui4 yi4] /monthly meeting/monthly conference/" Dec 06 12:54:04 "#test#".matches("^[#]") should, as far as I know, still evaluate to true even with the needless brackets Dec 06 12:54:23 Dunno about the _syntax_ of it tho because that's ugly Dec 06 12:54:25 Dagmar: No, as stated above. Dec 06 12:55:04 sdousley: Look into putting android:launchMode in your manifest Dec 06 12:56:03 Bleke: You just backslash escape the slashes Dec 06 12:56:35 \\/*\\/? Dec 06 12:56:42 That would easily be represented as a set of alternating matches for singular slash, and multiple things-which-are-not-slash Dec 06 12:57:09 im trying to mimic a drawerlayout toggle button behavior: rotate 90 degrees back and forth when the drawer is opening and closing with this code: http://pastebin.com/g9u5asc5 <<-- however, it only fires when the drawer is opened or closed, so theres an annoyin latency Dec 06 12:57:31 Bleke: No... pretty sure you just need _one_ backslash at a time, dude. Dec 06 12:57:36 tryin to hack around it and lookin for ideas Dec 06 12:58:22 Bleke: If you put '\\' in there you get a _literal_ search for just \, which is not what you're looking for. Dec 06 12:58:24 raoul11: Yeah, that's not gonna work if they slowly slide the drawer. Dec 06 12:58:25 Hm, ok. This regex stuff is confusing.. I read that sometimes you need four backslashed to get a single one. :) Dec 06 12:58:29 raoul11: Can they even see the button? Dec 06 12:58:36 yes Dec 06 12:58:42 Bleke: You read something written by someone who didn't know what they were talking about Dec 06 12:58:54 raoul11: According to material design, they shouldn't be able to. But I guess you have a reason. Dec 06 12:59:05 Bleke: ...which is actually a lot of people because regexps are meant to be efficient, not easy Dec 06 12:59:09 they shouldnt see the hamburger button? Dec 06 12:59:35 I mean that the drawer should cover the hamburger button. Dec 06 12:59:36 Dagmar: I think it's more likely that I didn't understand what I was reading Dec 06 12:59:48 oh Dec 06 12:59:54 it doesnt, its right below it Dec 06 13:00:16 It's easy to avoid that when using DrawerLayout. Dec 06 13:00:22 Bleke: Often it helps to just write down in plain English what it is you're going to be looking for, in as few words as possible Dec 06 13:00:55 Dagmar: Good tip! Dec 06 13:01:05 raoul11: Check out the Google Play app. Dec 06 13:01:22 raoul11: I don't think they even bother animating the hamburger button. You wouldn't be able to see much or anything if they did. Dec 06 13:01:45 interesting Dec 06 13:01:50 If I open it slowly, I see no animation whatsoever. Dec 06 13:01:59 i can control it faster with the button clicks, but not with the listener Dec 06 13:02:13 The listener doesn't fire until the drawer is fully open/closed and settled. Dec 06 13:02:23 Bleke: If that's "/soemstuff/someotherstuff/" you can pretty much just say '^\/[^\/]+\/[^\/]+\/$' Dec 06 13:02:26 so a slide/tap outside the drawerlayout doesnt trigger that event Dec 06 13:02:44 onDrawerSlide seems like a hack Dec 06 13:03:08 Dagmar: Why would you escape the '/'? I don't think '/' needs to be escaped at all. Dec 06 13:03:12 Bleke: ...which is rather EVIL in that it it visibly contains a lot of bloody backslashes. Dec 06 13:03:27 TacticalJoke: Ack. Force of habit from sed lol Dec 06 13:03:35 it outputs floats between 0 (closed) and 1 (open) Dec 06 13:04:35 Yeah, it probably shouldn't be escaped. illegal escape character iterator.useDelimiter("\/") Dec 06 13:04:42 ...and like, the forty-three million times I've detained input in perl with those, where I usually just use m|| to avoid the issue altogether Dec 06 13:05:00 Bleke: That'd be `\\/`, but yeah it's not needed. Dec 06 13:05:51 Ok, I've made a little progress now. Time for lunch. Thanks guys! :) Dec 06 13:06:06 Bleke: Well, I'm certain it doesn't need to be escaped here because we're not wrapping the whole thing in /slashes/ to begin with, so we don't have to worry about there being confusion with the _end_ of the regex Dec 06 13:07:05 Dagmar: Sounds right Dec 06 13:07:39 Bleke: I may have been exaggerating with forty-three "million", but "thousand" would probably be right Dec 06 13:07:50 I've written a crapton of regexps Dec 06 13:08:54 There's a zen to it. They _do_ get easier to work with over time. Dec 06 13:09:47 why would showing a notification result in an android.os.DeadObjectException? Dec 06 13:09:49 Hi, can I open the widget picker screen and scroll to my specific widget programmatically? Dec 06 13:11:28 Dagmar: There's an Android game called Rex. Probably too easy for you, but for a beginner it's a pretty fun way to learn. But it doesn't have any special characters. Not as far as I've played anyway. Dec 06 13:12:50 Bleke: Just remember. If a stranger ever offers you back-references, just say "No!" Dec 06 13:13:07 :) Dec 06 13:14:10 They're the first step on the road to writing rexeps that can and will run amok and gobble ludicrous amounts of CPU time as they attempt to solve for np-completeness Dec 06 13:15:13 I'll keep that in mind. Well, got to go! Dec 06 13:29:39 Dagmar: I already have that in there as singleInstance Dec 06 13:30:28 sdousley: Are you saying there are two copies of the same Activity? Dec 06 13:30:34 Or two app entries in the overview screen? Dec 06 13:30:40 TacticalJoke: no, 2 app entries in the overview Dec 06 13:31:18 one being the screen with the intent on it, the other being the rest of the app Dec 06 13:32:14 sdousley: Does something like this work? http://stackoverflow.com/a/5502950 I'm not sure. Dec 06 13:32:29 The issue is that you're starting a new task from the notification (rather than resuming the existing task). Dec 06 13:33:03 TacticalJoke: so use that code in the button within the app that opens the intent? Dec 06 13:35:42 sdousley: Whichever code creates the intent for the notification. Though I have no idea whether it works; I haven't done notification stuff lately. Dec 06 13:37:57 This might be a good Google query otherwise: https://www.google.co.uk/search?q=notification+existing+task Dec 06 13:38:03 Maybe "+android". Dec 06 13:46:43 TacticalJoke: I don't mind the notification opening in a new frame, it makes coming out of it a lot easier. Dec 06 13:46:53 it's more the internal to the app that I'd like (if possible) to fix Dec 06 13:46:55 Is there any way to add widgets to home screen programmatically? Dec 06 13:47:05 so clicking that activity from the menu just opens it in the existing window, rather than opening a new screen Dec 06 13:48:05 Which menu? I'm confused about what you're describing now. Dec 06 14:02:35 hi. I just installed android studio on arch linux. would you recommend that I run it occasionally (and, in particular, the first time) as root to make it update itself in /opt/android*? Dec 06 14:03:24 I don't think I'd mind it breaking free of the package manager's control since it's in /opt after all. Dec 06 14:09:55 Is it now recommended to use RecyclerView instead of ScrollView for a simple horizontal scroll with some imageview objects in it? Dec 06 14:11:08 Bernzel: Has it ever been recommended to use ScrollView for that? :D Dec 06 14:11:52 Oh, horizontal. Misread. Dec 06 14:12:06 TacticalJoke, dunno if you're ironical or not :p but it just seem like RecyclerView is the most versatile tool ever atm Dec 06 14:14:20 TacticalJoke dropped the rotate idea /: Dec 06 14:14:31 so HorizontalScrollView would be fine to use for this ? Dec 06 14:14:52 depends. Dec 06 14:15:07 raoul11: Are you gonna overlay the app bar with the navigation drawer? Dec 06 14:15:14 To be honest, if you don't, your app will feel outdates. Dec 06 14:15:17 outdated* Dec 06 14:15:23 am not using an appbar Dec 06 14:15:34 Where is the hamburger icon? Surely that's in the app bar. Dec 06 14:15:43 in a fake appbar Dec 06 14:15:49 floating on the top right Dec 06 14:16:25 if shareX wasnt bitching, id screenshot it Dec 06 14:17:39 sshine, don't run it as root, it'll f* up your installation Dec 06 14:18:00 instead change ownership / add write permissions to /opt/android* if you want autoupdate Dec 06 14:18:08 http://i.imgur.com/HSpOfXg.png | http://i.imgur.com/THKHEOy.png TacticalJoke Dec 06 14:18:31 Oh, it's on the right. Hmm. Dec 06 14:19:01 Is there a reason the drawer isn't also on the right? Just curious. Dec 06 14:19:16 didnt like it Dec 06 14:19:35 the hamburger is on the right coz the coins counter grows heaps Dec 06 14:19:58 so it could find itself in the 3/4 up and not tabbed to the right Dec 06 14:20:18 also, i think its easier to reach on the right Dec 06 14:27:21 Mavrik, okay. Dec 06 14:54:30 hi everybody... can anybody tell me if it's possible to tell a recyclerview how many ViewHolders it should create and bind? Dec 06 14:54:44 (which will be off screen of course) Dec 06 14:55:12 evident: yes Dec 06 14:55:27 http://stackoverflow.com/questions/26245139/how-to-create-recyclerview-with-multiple-view-type Dec 06 14:56:07 because I am using a custom RecyclerView which imitates a ViewPager. Unfortunately, when I start the activity with it inside, it will only create and bind the first item. When I start scrolling, it will create and bind 2 more viewholders depending on the direction I scroll in Dec 06 14:57:03 thepoosh https://i.reddituploads.com/4addc832a52942bbbc2ccdc7b2d9f89b?fit=max&h=1536&w=1536&s=1df755e571acad7e51d612e44b5f0a53 Dec 06 14:57:11 thepoosh: I am not looking for different view holder types, I just need to change how many views it will keep in cache at the back Dec 06 14:57:35 you can implenet the layoutManager youself Dec 06 14:57:40 and cach all of them! Dec 06 14:58:16 do you have any additional info on that? I found that the linearlayoutmanager looks quite complex Dec 06 14:58:31 they are complex Dec 06 14:58:46 Any idea https://gist.github.com/Syzygy2048/1d1edd312f5653927cf193fa41baa18b why my geofences don't work? Dec 06 14:58:53 they never seem to be triggered Dec 06 14:59:01 do you have permissions? Dec 06 14:59:18 yes Dec 06 14:59:36 assume that geofenceList is a list containing valid geofences and are where I expect them to be Dec 06 15:00:09 hmm yeah definitely... I was just hoping there is something like the "offScreenPageLimit" for ViewPager :( Dec 06 15:01:18 thebishop, onPermissionGranted is getting called, so the register call is executed. Dec 06 15:02:56 sorry this was supposed to be directed at thepoosh Dec 06 15:03:31 you get a beep, you get a beep! everybody gets a beep!!! Dec 06 15:03:32 the status code I get from the callback is Success btw Dec 06 15:04:44 Syzygy: suppressWarning("MissingPermission")?! Dec 06 15:04:50 that's fishy Dec 06 15:05:05 it just supresses the warning Dec 06 15:05:36 which one, could it be you're actually missing a permission? Dec 06 15:05:41 which might explain the issue Dec 06 15:07:29 it would still result in a crash or if my permission handler works correctyl, a call to onPermissionDenied instead of onPermissionGranted Dec 06 15:08:04 besides, ACCESS_FINE_LOCATION is working as I can find my own location on maps Dec 06 15:08:31 when I render the 100 geofences i have to maps, they're also displayed the way I expect them to be Dec 06 16:46:00 hello guys. Dec 06 16:46:09 ioctl(KVM_CREATE_VM) failed: 16 Device or resource busy Dec 06 16:46:09 failed to initialize KVM: Device or resource busy Dec 06 16:46:23 I can't run the emulator while VirtualBox is running. Dec 06 16:52:10 is there a good solution? Dec 06 16:53:39 anyone here have APu to work with Android virtual device ? Dec 06 16:54:10 i have installed android studio on ubuntu and have Apu ( amd cpu ) Dec 06 17:07:46 i've got a manifest file with layout parameters specified for an entry. that's just wrong, right? Seems like it's harmlessly ignored by the system but they shouldn't be there Dec 06 17:20:16 thebishop: In _most_ cases with XML if the tags aren't recognized they're just gracefully ignored Dec 06 17:20:42 Dagmar, that's what i'm seeing, i just wanted to confirm that this is actually the wrong thing to do Dec 06 17:21:19 unless you do schema validation, it'll generally be ignored Dec 06 17:22:15 I am using Firebase for authentication and would like to redirect to my main app if the user is already signed in. I have an idea how to do it however my authlistener is in a parent class. Should I add a second listener in my login class or is there a method I can use in the parent? coder here: https://gist.github.com/coder2000/d6c83f1aa13e39678485f1a7dfff731c Dec 06 17:22:15 thebishop: "wrong thing to do" doesn't begin to describe it. Someone shoudln't be sticking declarations into just whateve file they find handiest Dec 06 17:22:40 Dagmar, lol take it easy, it was probably me! Dec 06 17:22:56 Don' do that then. Dec 06 17:23:04 yep, yanking it Dec 06 17:27:13 oh when, oh when, will the sdk25 sources be released Dec 06 17:38:27 Dagmar, thanks, btw Dec 06 17:39:03 hi all Dec 06 17:39:26 anyone got experience using the itextpdf JAR library in Android? I'm having trouble with ProGuard. Dec 06 17:40:02 I have specified -keep class com.itextpdf.** { *; } but still have about 1400+ unresolved classes - mainly java.awt.* javax.imageio.* etc. Dec 06 17:40:45 try without proguard, you will probably get similar issue with java.awt.* Dec 06 17:40:58 if true, meaning it has nothing to do with proguard Dec 06 17:41:25 adq it works without proguard in debug. Dec 06 17:42:51 ok, then try to keep those unresolve class then Dec 06 17:43:13 makes no diff. Dec 06 17:43:30 random reading found: "For example, if ProGuard complains that it can't find a java.awt class, then some library that you are using is referring to java.awt. This is a bit shady, since Android doesn't have this package at all, but if your application works anyway, you can let ProGuard accept it with "-dontwarn java.awt.**", for instance." Dec 06 17:44:02 then test your app to ensure nothing is broken Dec 06 17:44:22 running fine now with `minifyEnabled` disabled Dec 06 17:44:32 in API23 in AVD and on tablet. Dec 06 17:44:55 so if java.awt is 'not supported' then even debug should die. Dec 06 17:44:58 I'm surprised so many people seem to support splash screens (https://reddit.com/5grlac). Splash screens (especially the ones in the Google apps) offer some of the worst user experiences possible. Dec 06 17:45:00 oO Dec 06 17:45:10 basically itextpdf is being used to generate PDFs. Dec 06 17:45:15 and this _works_ (in debug). Dec 06 17:45:15 debug by default don't apply proguard rules except if specified in build.gradle Dec 06 17:45:27 yeah Dec 06 17:45:35 so this boils down to proguard :) Dec 06 17:45:43 and minify works only if proguard is enabled Dec 06 17:45:54 minify is originally the resource shrinker Dec 06 17:45:58 correct Dec 06 17:45:58 but it does much more now Dec 06 17:46:02 (they renamed it even) Dec 06 17:46:20 shrinkResources also disbled that. Dec 06 17:46:30 there is a file to exclude what you don't want to be shrinked Dec 06 17:46:40 is it terribly bad to release a non-minified app? Dec 06 17:46:42 but everytime i used it, it was creating more problems to me than anything Dec 06 17:47:01 sorry, non-obsfuscated Dec 06 17:47:06 (argh spelling) Dec 06 17:47:06 michael_mbp, i don't think it's bad if your app is already light enough (few MB max), but i bet a pdf lib is kinda heavy Dec 06 17:47:11 + all the google support lib & co Dec 06 17:47:24 ahh non-obfuscated is totally not an issue Dec 06 17:47:26 at max the app becomes 25-30mb Dec 06 17:47:30 because it's not really a security feature Dec 06 17:47:31 vs 8-9mb. Dec 06 17:47:43 but obfuscation != optimization like shrink Dec 06 17:47:43 just makes it 'harder' right? Dec 06 17:47:51 sure Dec 06 17:47:59 I'll try with shrink enabled in a sec Dec 06 17:48:02 well, it has been proven to be inefficient Dec 06 17:48:12 so not sure if we can say it makes things harder enough Dec 06 17:48:17 proguard obsfusc or shrink? Dec 06 17:48:23 there is dexguard which is a commercial proguard Dec 06 17:48:35 which raises higher the wall, but it has also been defeated Dec 06 17:48:40 ah Dec 06 17:48:52 thanks for letting me know Dec 06 17:48:53 (same ppl are doing pro and dexguard) Dec 06 17:49:05 the best is probably the support coming from dexguard Dec 06 17:49:34 proguard obsfusc or shrink? < it can do both, and much more Dec 06 17:49:47 lot of code optimizations, it can merge classes and calls to avoid overhead, etc Dec 06 17:50:12 it's crazy all the things it can do, and this is probably why it's always tricky to set it up jsut to be able to compile (not even talking about broking runtime yet) Dec 06 17:50:32 heh. Dec 06 17:50:57 TacticalJoke did you see this? http://blog.davidecoppola.com/2016/12/android-version-distribution-history-visualization-2012-2016/ Dec 06 17:51:45 nice chart Dec 06 17:52:02 Oh, no, didn't see that. Dec 06 17:52:16 g00s is back. :D I was organising a search party. Dec 06 17:52:25 think i'll do minsdk=21 Dec 06 17:52:56 i'm still at 16 Dec 06 17:52:57 TacticalJoke i wouldn't even be able to find myself :P Dec 06 17:53:20 this chart http://blog.davidecoppola.com/wp-content/uploads/2016/12/Android_version_distribution_history_graph_stacked_bar-2016.png Dec 06 17:53:48 if i'm reading this right, looks like 4.4 is dying out quick to 6.0 mostly Dec 06 17:54:13 g00s: I'd definitely do 21. Dec 06 17:54:19 I'm probably gonna go up to 23 before release. Dec 06 17:54:30 <****> 8=100% 10=100% 15=99% 16=98% 17=93% 18=87% 19=85% 21=61% 22=50% 23=27% 24=0% Dec 06 17:54:38 4.4 looks about the same forever Dec 06 17:54:39 the cumulative (stats from official dashboard) Dec 06 17:55:02 21 is like sacrificing almost 40% of users Dec 06 17:55:09 this is why i'm staying on 16 min, atm Dec 06 17:56:24 g00s is sacrificing users on the altar of android api Dec 06 17:56:26 * adq ruins Dec 06 17:56:32 runs* :') instant Dec 06 17:56:34 4.2 is so much bigger than 4.3 Dec 06 17:56:48 adq BLE isn't even "usable" until 4.4 :D Dec 06 17:56:50 that's because 4.3 all got upgraded to 4.4 Dec 06 17:57:04 or newer Dec 06 17:58:23 and indeed, 4.4 looks about the same forever Dec 06 17:58:29 it's not like it's dying easily Dec 06 18:00:31 4.4 went from 36% to 24% in 12 mos; i guess that is pretty slow Dec 06 18:02:46 7.1.1 seems pretty political to me. Dec 06 18:02:53 https://blog.google/products/android/sweet-update-nougat-android-711/ Dec 06 18:03:47 wow title font is black Dec 06 18:04:05 many guidelines have been killed during the writing of this article Dec 06 18:04:40 Should be it some shade of grey? Dec 06 18:05:12 idk the picture is also blur behind Dec 06 18:05:47 they don't mention them, but lot of security fixes Dec 06 18:05:56 but i understand why it's more important to talk about emoji... Dec 06 18:06:21 I wonder whether there'll be a Donald Trump-related release. Dec 06 18:06:53 like something named after Trump, or some kind of security issue or break related to something he dictated? Dec 06 18:07:19 TacticalJoke was good too http://www.androidpolice.com/2016/12/05/the-slow-uninteresting-death-of-android-tablets-is-unfolding-and-it-is-no-ones-fault/ Dec 06 18:07:27 Maybe just naming a release after him. Dec 06 18:07:38 g00s: Oh yeah, saw that. I kinda want them to die. Dec 06 18:07:42 Trumpkin Pie Dec 06 18:07:43 * pfn hasn't read any tech news since leaving for vacation Dec 06 18:07:49 I hate just the thought of supporting tablets. Dec 06 18:07:58 I wouldn't mind at all if we had something better than awful fragments. Dec 06 18:08:25 need to mark all read in feedly Dec 06 18:08:26 supporting tablets is actually kinda easy. it’s just that no one wants to do it Dec 06 18:08:42 more along the lines of no one wants to design anything for tablets specifically Dec 06 18:08:49 that too Dec 06 18:08:52 it can be easy, gets kinda icky with master / detail tho Dec 06 18:08:55 Creating a whole tablet UI and switching between it at run time seems quite difficult to me. Dec 06 18:09:06 implementing tablet designs isn't very hard Dec 06 18:09:11 I guess it depends on the app. Dec 06 18:09:13 hell, no one wants to design for landscape, either Dec 06 18:09:17 but making a workflow that is delightful on a tablet is painful Dec 06 18:09:25 right, no one wants to account for orientation, either Dec 06 18:09:40 they made design and code choice very early preventing a good ergonomy on tablet Dec 06 18:09:49 like come on, multi windows... api 24 :') Dec 06 18:10:24 nah, multi-window was never a big deal. The iPad did just fine without it Dec 06 18:10:30 adq well I think I broke something Dec 06 18:10:42 using java makes proguard a pain Dec 06 18:10:51 reflection = bane of proguard Dec 06 18:10:56 I tried to add -dontwarn for java.awt.** and javax.** and now Proguard (with minification/shrinking) it taking over 10 mins.. still goin. Dec 06 18:11:06 michael_mbp, turn off optimization Dec 06 18:11:08 I haven't used multi-window much, but I think it'll be handy for when I'm watching YouTube videos and texting on my phone. Dec 06 18:11:18 pfn how, rather new to proguard :) Dec 06 18:11:19 Such a pain to pause everything just to reply to a text. Dec 06 18:11:25 michael_mbp, -dontoptimize Dec 06 18:11:29 ah got opt passes 5. Dec 06 18:11:35 ok thanks Dec 06 18:12:02 right s73v3r, i just meant it's an issue not the main or the biggest, but most ppl despite having also a phone already were used to computer screen size factor Dec 06 18:12:13 and we ended up very often with a phone UI on tablet Dec 06 18:13:05 i think that was laziness, as everyone was like, “You don’t need special tablet support! Things auto-size on their own, unlike iOS!” Dec 06 18:13:45 whereas in iOS, they did have to do some stuff to support tablets, so most desingers decided to do something new with it Dec 06 18:13:46 yup and the extra effort to bring something good enough on tablet Dec 06 18:13:50 Ouch. Dec 06 18:13:51 is maybe not worth it from most of us Dec 06 18:13:55 now I have only 1 error left Dec 06 18:13:59 Warning:com.itextpdf.awt.PdfGraphics2D: can't find referenced method 'java.awt.FontMetrics getFontMetrics()' in program class com.itextpdf.awt.PdfGraphics2D Dec 06 18:14:12 -dontwarn java.awt.** Dec 06 18:14:14 ezpz Dec 06 18:14:16 it’s not even that much extra effort. Dec 06 18:14:34 or -dontwarn com.itextpdf.awt.** Dec 06 18:14:36 pfn already have that Dec 06 18:14:40 change your margins in the dimens.xml file, change a couple font sizes, and you’ve gone a long way Dec 06 18:14:41 s73v3r: It's not so much effort, but complexity/bugs/etc. Dec 06 18:14:46 according to that warnng, you don't, michael_mbp Dec 06 18:15:14 yeah, and if people aren’t buying tablets, then it’s hard to justify Dec 06 18:15:18 sorry, added it for com.itext.awt.** Dec 06 18:15:21 So many more ways to go wrong when you create a whole extra UI. Dec 06 18:15:41 Yeah. Dec 06 18:15:46 If tablets were huge, we'd have little choice. Dec 06 18:15:48 you can make composable UI from views or fragments Dec 06 18:16:18 pfn https://gist.github.com/bsodmike/971908ceb6e12e31546982d9bb7c6155 Dec 06 18:16:30 I'd rather avoid fragments, personally. Dec 06 18:16:34 argh typo Dec 06 18:16:36 Activities are complicated enough. Dec 06 18:17:01 pfn you rock. Dec 06 18:17:10 adq: you too Dec 06 18:17:10 resistance is futile TacticalJoke :)) Dec 06 18:17:19 glad we could help michael_mbp Dec 06 18:17:37 TacticalJoke is still using listview instead of RV, and still avoiding fragment Dec 06 18:17:39 but for how long ^^ Dec 06 18:17:55 I'd love to switch to RV. :[ Dec 06 18:19:00 I'll probably try it again in a few months. Hopefully they will've fixed that "`setSmoothScrollbarEnabled(false);` doesn't work" bug. Dec 06 18:19:28 TacticalJoke there are some cool libs for RV like epoxy and groupie Dec 06 18:20:05 i just watched the droidcon video with the woman talking about advanced RV Dec 06 18:20:08 it was pretty awesome Dec 06 18:20:20 when RV came out, it was a set of primitives. i can't remember if it was adam or yigit said they would build helpers on top of it . well its years later and that never happened lol Dec 06 18:20:29 s73v3r lisa wray? Dec 06 18:20:34 maybe? Dec 06 18:20:52 yeah Dec 06 18:20:59 all of the Droidcon videos are on youtube now Dec 06 18:21:29 s73v3r yeah she wrote groupie Dec 06 18:21:42 yeah radical RV iirc Dec 06 18:21:51 there are typos in her prez though ;) Dec 06 18:22:03 happens to everyone Dec 06 18:22:07 but it's good for being introduced to diffutil, snaphelper, how to manage viewholder better Dec 06 18:22:08 etc Dec 06 18:22:34 i copy-pasted some code into one of my presentations, took the time to make some of it be highlighted and switch fades for empahsis, etc Dec 06 18:22:42 and i later found out i had typos all over Dec 06 18:23:47 it can happen to the best of us, for sure Dec 06 18:23:52 but it shouldn't! Dec 06 18:26:09 "Galaxy S8 is not going to feature a 3.5mm headphone jack " lol Dec 06 18:26:21 in a move that shocked absolutely no one Dec 06 18:26:46 they threatened that back when apple announced Dec 06 18:26:48 fuck all of them Dec 06 18:27:00 lol Dec 06 18:27:06 don't worry, analog audio is not going to die soon ;) Dec 06 18:31:45 aren’t lightning and USB C capable of carrying analog audio out? Dec 06 18:33:47 i think they got few pins for it Dec 06 19:45:38 https://santatracker.google.com/village.html Dec 06 19:45:44 They really went all out Dec 06 19:47:57 DAMMIT GOOGLE, LET ME STOP THE BUILD AND STOP DEPLOYING Dec 06 19:50:15 ugh, I wish relativelayout had an "align-with-alternative-id-if-missing" not just alignwithparentifmissing Dec 06 19:55:37 of course, that would make it much more complicated in terms of rules Dec 06 20:07:41 pfn would that be like virtual groups + constraint layout ? Dec 06 20:07:55 I guess Dec 06 20:08:18 in this case, I'm just wrapping stuff that might disappear in another viewgroup Dec 06 20:08:22 which is probably for the best Dec 06 20:58:56 Usually for a screen in my app, I'll have it 'bind' to a Firebase location. However, I'm working on a new screen in the app where the user inputs a bunch of data (spinners, EditText), then hits Save. I don't want any of the data to even touch Firebase until Save is pressed. Dec 06 20:59:15 What is the best way to capture the user data for when they hit 'Save'? Dec 06 20:59:39 Should I just wait until they click 'Save' and then call getText on the values in the screen, or should I have some fragment-level field hold all the data? Dec 06 21:00:18 I'm using the latter approach now, doing things like adding text watchers to update my object as my screen inputs change Dec 06 21:02:50 Or should I be going one step further and saving the users temporary data somewhere still (disk, Firebase) even though it's kind of a one-off 'enter the data' screen? Dec 06 21:30:16 with Firebase is there a way to tell if someone is signing in for the first time with a certain set of credentials? I would like to ask some additional questions upon account creation. Dec 06 21:31:31 coder2000: no, use something like a 'has_seen_tutorial' boolean at the /users/{userId}/ location Dec 06 21:32:42 https://www.reddit.com/r/androiddev/comments/5gvl6t/simple_question_about_crafting_a_screen_for_data/ Dec 06 21:32:48 ok Dec 06 21:33:28 coder2000 could you upvote that reddit q Dec 06 21:33:40 trying to get some ANSWERS in here Dec 06 21:37:41 http://tools.android.com/recent/androidstudio223isnowavailable Dec 06 21:47:36 should sdk version be in AndroidManifest or build.gradle Dec 06 21:47:52 build.gradle Dec 06 21:48:01 Both places and sewn into your underwear Dec 06 21:48:39 Permanent marker will only stick around for 2-3 washes Dec 06 21:48:55 escrow that thing to a bank lockbox Dec 06 21:48:59 minSdk 19 sewn in right over my crack, gotcha Dec 06 21:49:03 best to just write a script that just grabs the last tweet from @minSdkVersion Dec 06 21:49:05 Danm right Dec 06 21:49:09 KK or GTFO Dec 06 21:49:20 haha s73v3r Dec 06 21:49:33 that's actually pretty solid advice Dec 06 21:50:06 lol Dec 06 21:50:13 No seriously. Dec 06 21:51:07 I know we'd all _like_ to have our stuff run on Android 2.2 but pre-19 stuff (@minSdkVersion just recently called for API 19 or GTFO) is only about 10% of the hardware base, and 0% of the devices anyone wants to use anymore Dec 06 21:51:43 how can I lay out elements in layout and make it automatically continue below to left if it's end of screen ? Dec 06 21:52:04 do what now? Dec 06 21:52:05 probably can find a library to do that mentazoom Dec 06 21:52:08 what kind of elements? Dec 06 21:52:12 google android flow layout Dec 06 21:52:32 it's imageviews in relativelayout , doesn't have to be relativelayout tho Dec 06 21:52:46 I really wish the framework had something like that Dec 06 21:52:48 "continue below to left" is wat I don't get Dec 06 21:52:58 Dagmar: think of wrapping lines Dec 06 21:53:15 Do you mean "add elements below, adding new columns to the left as necessary"? Dec 06 21:53:29 I mean like you add immages to layout and you just want it to continue below the current row and not out of the screen Dec 06 21:53:46 Dagmar: think of text, when you have the line going longer than the width Dec 06 21:53:56 exactly ^ Dec 06 21:54:00 s73v3r: I have no problem with that. I have a proble mwit the verbiage as given Dec 06 21:54:22 tried my best :p Dec 06 21:54:31 So you just want to have it continue adding more elements _down_, scrolling off the bottom of the screen if necessary? Dec 06 21:54:36 gridlayout or recyclerview + gridlayoutmanager + spanthingy Dec 06 21:55:01 Eventually, you're going to run out of screen space Dec 06 21:55:03 hey guys - dumb question - anyone got any input to share here / reddit? https://www.reddit.com/r/androiddev/comments/5gvl6t/simple_question_about_crafting_a_screen_for_data/ Dec 06 21:55:37 I want exactly 13 items so I can hard core the images, what would be the easiest and best solution? Recyclerview will be overkill Dec 06 21:55:44 hard code* Dec 06 21:56:00 yeah for 13 items it's overkill Dec 06 21:56:01 Simply put I'm replacing a Spinner with a Button and SingleChoice AlertDialog. When you click the AlertDialog option, I update the Button text to show the 'currently selected' item, but that doesn't retain on rotation and such. How should I store the current 'Button' selection? Dec 06 21:56:15 if that’s the case, then just position 13 imageviews in a RelativeLayout Dec 06 21:56:21 mentazoom: So just do a layout with only 13 imageviews, and mark the ones you don't need as View.GONE in the code Dec 06 21:56:51 although I think you overestimate the “difficulty” of a recyclerview Dec 06 21:57:24 Mainly there's just a ton of really crap documentation for RecyclerView Dec 06 21:58:01 I want the images to show all time, but if I just add the imageviews it will continue out of screen, I want it to work for all screen sizes so that's why I don't know exactly what to do. Maybe on tablet it can fit 8 images but on my phone 3 Dec 06 21:58:13 Oh. Fix their sizes by dp Dec 06 21:58:20 perhaps, but this would just be setting up an adapter and giving it a list of 13 items. and having a horizontal grid layou Dec 06 21:59:02 Dagmar Yea maybe I am just being dumb, that should work Dec 06 21:59:06 also, why do you need them all to show at all times? Life is a lot easier when you accept the limits of the platform Dec 06 21:59:18 mentazoom: It's also going to mean giant images on tablets tho Dec 06 21:59:36 s73v3r It's deck of cards, I want to show 13 cards (all cards in one suit) at one time Dec 06 21:59:47 Dagmar True, that will be bad :/ Dec 06 21:59:57 not necessarily Dec 06 22:00:05 you can set the DP value for tablets separately Dec 06 22:00:12 mentazoom: Oh. Maybe not bad on a tablet. The users expect that kind of thing to be bigger--it's why they bought the tablet in the first place Dec 06 22:00:14 s73v3r Ah true! Dec 06 22:00:25 it’ll be a tradeoff between empty space and size of icon Dec 06 22:00:38 That particular use doesn't seem to me like it would be bad to divvy up the entire screen for those cards tho Dec 06 22:00:50 Dagmar and s73v3r mix of solution seems best, just fix dp for tablet seperatly if needed Dec 06 22:01:02 no, fix for both. Dec 06 22:01:10 just use the dimens.xml file to hold the fixed size Dec 06 22:01:30 true, i will do that. Thanks both! Dec 06 22:01:37 You can fork that for densities iirc Dec 06 22:01:51 just override in sw-600dp Dec 06 22:02:00 I'm tryign to over here for something else. Can't say I CBA to have actually _tested_ it yet tho Dec 06 22:02:15 The tablet I have is a wingray and it's kind of abysmally slow Dec 06 22:02:28 s73v3r You think I need to only override for one dp setting? Dec 06 22:02:51 600dp width is generally the accepted size for the device to then be considered a tablet Dec 06 22:03:15 as you test on different sized devices, you may wish to tweak for different sizes/densities Dec 06 22:03:16 ah, noted Dec 06 22:05:40 If you consider pixel size and density, you'll realize that a phone with 600dp would be a little absurd Dec 06 22:06:27 old tablets i guess? :p Dec 06 22:07:40 dp is basically meant to be an approximate real-world size Dec 06 22:08:03 what is real world size? Dec 06 22:08:19 Like point sizes for fonts, as opposed to pixel sizes Dec 06 22:08:21 it’s not meant to approximate real world size Dec 06 22:08:41 it’s meant to be an abstracted size so you don’t have to worry about the combo of pixel size and density Dec 06 22:08:57 Yes, an actual size Dec 06 22:10:16 A 1dp line is going to be _about_ the same size on each phone, whether it's an mdpi phone and one pixel wide, or an xxhdpi phone that costs more than a dollar where it's three pixels thick Dec 06 22:10:43 that's what s73v3r said Dec 06 22:10:54 Where are all the view state savers at today Dec 06 22:11:01 He also said it's not an approximate real-world size Dec 06 22:11:21 It _is_ an approximate size, because unlike points it's not a _precise_ measurement Dec 06 22:11:28 yea i don't see the relation between those two, but i am newb too Dec 06 22:12:22 A 12 point font will be the same size on any paper it's printed on. The _exact_ same size Dec 06 22:12:36 Android ball-parks dp. Dec 06 22:12:45 This is a good question am I just not making sense Dec 06 22:13:09 points = pixel? Dec 06 22:13:33 nvm that doesn't make sense :) Dec 06 22:13:34 You can have a 4.5" phone with a 1920x1080 display and a 5.5" phone with a 1920x1080 display. Both of which are likely to be xxhdpi, so 3px to 1dp. Dec 06 22:13:39 Instead we're talking about how dp is scaled from mdpi to xxxhdpi Dec 06 22:13:50 mentazoom: points as in pt as in typography Dec 06 22:14:13 pt are a real-world size and it is defined exactly. Dec 06 22:14:35 google advices you too use pt on texts Dec 06 22:14:37 ...but 1dp will be 3px thick on both the 4.5" display and the 5.5" display Dec 06 22:14:37 on android Dec 06 22:14:41 ...cuz it's close enough Dec 06 22:15:05 mentazoom: sp, because it can be adjusted by the user's font setting, but sp are pretty damn close to pt Dec 06 22:15:11 " Dec 06 22:15:21 ah yea it was sp Dec 06 22:15:26 In "old people mode" fonts specified by sp will be larger (and cornhole your layouts) Dec 06 22:16:36 it’s your job to make sure your layouts don’t look like ass if your user decides to use a larger font size Dec 06 22:16:36 This is some chapter 2 discussion Dec 06 22:16:41 Where are the chapter 9ers at Dec 06 22:17:04 A 12-pt font used on both the 4.5" phone and the 5.5" phone would have a slight difference in actual pixel height Dec 06 22:18:12 achuinard: is there a chapter 11 Dec 06 22:18:19 do I have to file for it Dec 06 22:18:45 i don't know Dec 06 22:18:49 i'm not even trying to go as deep as 11 Dec 06 22:18:52 just on that chapter 9 here Dec 06 22:19:10 i want my button to act like a spinner but with a 'no selection' option Dec 06 22:19:41 Is there some reaosn you can't add an explicit "Nothin'" option to the list? Dec 06 22:19:45 the button opens the alertdialog with a list of predefined strings / selection options. you select one, then a value gets set. whats the best way to store and retain this? Dec 06 22:20:14 that's a hack Dec 06 22:20:21 if the user doesn’t want to select something, then they’ll hit the back button Dec 06 22:20:35 Not unless you intend for that spinner option to duplicate the functionality of backing out of the spinner Dec 06 22:20:37 no, it's an optional input on a 'form' Dec 06 22:20:45 so there's an edittext and a button Dec 06 22:20:53 you only need to enter something into the edittext Dec 06 22:21:08 the button, which has 4 'spinner' options (alertdialog single choice), is optional Dec 06 22:21:23 and then there's a big 'save' button which advances. so clicking save only requires the edittext Dec 06 22:22:01 so edittexts are cool and will save their contents on rotation. but my button won't. is it the right practice to read the screen state when they click 'save' or should i be storing the screen state in some object oriented 'MyScreenStateClass' style Dec 06 22:22:26 when they click on an option, then save that in a local field Dec 06 22:22:42 ok, but then you have to do a lot of management between the field and the visual display of the button Dec 06 22:22:45 screen rotations, for example Dec 06 22:22:48 so? Dec 06 22:23:08 you should be saving those states anyway, for just such a reason Dec 06 22:23:13 wouldnt it be better if the button was a 'SelectionStoringButton' and you could just call getSelection() and the button could manage it? Dec 06 22:23:16 screen rotations are what the lifecycle methods are for Dec 06 22:23:31 i tend to disagree, i think we are confusing fragment state with view state? Dec 06 22:23:32 achuinard: not really Dec 06 22:24:02 because android is prebuilt with widgets that solve this exact problem Dec 06 22:24:03 Oh you're using a dialogfragment Dec 06 22:24:08 like a spinner itself would retain its selection Dec 06 22:24:17 and then when the user clicks 'save', you could simply call getSelection on the Spinner Dec 06 22:24:23 Those are nice and fancy and clone the state of your edittext widgets *for* you Dec 06 22:24:47 and because they do that, tehy allow me to build my 'object' when the user clicks save, instaed of constantly upkeeping this object in fields Dec 06 22:24:54 lol, #1 story on /r/androiddev is how to create a splash screen; things must be getting slow Dec 06 22:24:56 less is more Dec 06 22:25:24 So you want to trade a considerable amount of complexity to save 8 bytes of RAM Dec 06 22:25:25 less where? Dec 06 22:25:35 less because my fragment doesnt need to maintain its state in some field Dec 06 22:25:36 definitely not in your widgets Dec 06 22:25:40 yes Dec 06 22:25:42 i make 1 widget Dec 06 22:25:45 no Dec 06 22:25:45 'SelectionStoringButton' Dec 06 22:25:49 I can use it in 14 places in my app Dec 06 22:25:53 so now you have to make a new widget Dec 06 22:25:58 if I don't make this button, i have to store state 14 different times in my app Dec 06 22:26:03 that also has to know how to store it’s state Dec 06 22:26:05 its 1 widget vs 14 instances of state management Dec 06 22:26:10 it’s 14 different things, though Dec 06 22:26:26 i can generalize it - i usually supply a list of enums to my widget Dec 06 22:26:34 It's loading 14 values into a bottle and tossing them into the pneumatic tube Dec 06 22:26:35 and now what’s providing that? Dec 06 22:26:36 all types of a certain enum are viable selections Dec 06 22:26:48 i give my 'selectionsortingbutton' an adapter like i would for a spinner? Dec 06 22:27:27 i object orient my 'SelectionSortingButton' Dec 06 22:27:30 and how is it going to save it’s state Dec 06 22:27:35 and how is it going to restore its state Dec 06 22:27:36 through the view save state methods Dec 06 22:27:39 which people dont really know about Dec 06 22:27:45 Really Dec 06 22:27:45 and where is it going to save that Dec 06 22:28:39 https://developer.android.com/reference/android/view/View.html#onSaveInstanceState() Dec 06 22:28:56 views should not be saving state Dec 06 22:29:12 ok, if you're insisting i'm wrong, then you're telling me you've never a constructed a screen in android with a button that calls getText of an EditText onClick Dec 06 22:29:24 like a big 'save' button Dec 06 22:29:32 and then you read the values of the edittext and do something with those values Dec 06 22:29:36 do whatever you want. no one here is going to stop you Dec 06 22:29:38 So you're using a DialogFragment then, right? Dec 06 22:29:39 but you asked US for help Dec 06 22:29:41 Just just a plain Fragment. Dec 06 22:29:52 i use a dialogfragment with a backing alertdialog and some single choices Dec 06 22:29:54 er not just Dec 06 22:30:20 Yes, dialogFragments contain magic to take the agonizing pain out of getting the EditText state copied over correctly Dec 06 22:30:33 They don't, to my knowledge, do it for other, far simpler things like spinners and radio buttosn Dec 06 22:30:40 i'm just saying it's something to think about, because we are all inclined to call getText on an edittext when the user clicks a button. it's not like we are adding textwatchers to our edittext and updating our backing objects in realtime Dec 06 22:30:51 Actually I've done that Dec 06 22:31:09 ok cool well i was just doing that myself Dec 06 22:31:10 No sense in letting someone even put in a bunch of emoji if it's invalid input Dec 06 22:31:12 but it just seemed like overkill Dec 06 22:31:33 That becomes _super_ fun on rotation Dec 06 22:32:13 would it not have been nicer to make your own edittext which through overriding some view methods im sure you could restrict character input? Dec 06 22:32:21 you're telling me you had your backing objects differ from the actual contents of the screen Dec 06 22:32:43 Those might exist but I didn't find any mention of them, so I'd just check the contents and if someone put in anything invalid I'd simply redact the change Dec 06 22:32:47 the whole point of this fragment/activity level field is to keep your screen state represented in object-oriented variable form Dec 06 22:33:11 ...and give them a nice annoying long toast over the keyboard Dec 06 22:33:37 AS 2.2.3 Dec 06 22:33:59 "ProGuard version rollback. Due to a correctness issue discovered in ProGuard 5.3.1, we have rolled back to ProGuard 5.2.1." Dec 06 22:34:05 man i hate proguard Dec 06 22:36:02 this could be big https://www.khronos.org/news/press/khronos-announces-vr-standards-initiative Dec 06 22:38:01 achuinard: Thanks to keyboards that auto-complete, reverting the input actually was the simplest solution Dec 06 22:39:39 Spinner has Dialog magic when you set android:spinnerMode="dialog" Dec 06 22:41:14 Handy Dec 06 22:46:56 Supreme court backs Samsung over Apple Dec 06 22:47:14 http://money.cnn.com/2016/12/06/technology/samsung-apple-supreme-court/index.html Dec 06 22:47:43 But do you back live 'data-binding' over constructing objects that represent the screen state when, say, a Button is clicked Dec 06 22:50:48 I store the data in fields when the user actually sets things, and I pass _those_ across via savedInstanceState Dec 06 22:51:26 I don't care if some virtual barrel was being spun while they rotated the phone Dec 06 22:55:58 Actually, looking at some of my code here... I don't even bother with that most of the time since I use those stored values to actually initialize the state of all the input widgets Dec 06 23:34:35 can you have that kind of swipe where you can what's show on screen slowly or fast as you see it fade away? Dec 06 23:34:45 with viewpager* Dec 06 23:35:06 you mean where the amount of scroll is tied to how far your finger is from the trigger? Dec 06 23:35:18 yes! :) Dec 06 23:36:28 try it, but I think it’s built into the viewpager Dec 06 23:36:56 i just checked Now for Reddit, and it does that Dec 06 23:37:01 was thinking about what to use, best option I think is for me to use viewpager, but didn't know if it has bult in Dec 06 23:37:08 try it Dec 06 23:37:33 alright Dec 07 00:02:43 Hey, I'm running into a problem when running my app on different devices because the screens are bigger and the Images and text get small and bigger from device to device. Is there anyway to keep them consistent across all sized screens? Dec 07 00:04:29 tassilo_tazz: You are using dp for sizes, are you? Not px Dec 07 00:04:49 Yes, I'll provide some code, gimme a sec. Dec 07 00:05:39 http://pastebin.com/yv1uNDWf Dec 07 00:07:51 tassilo_tazz: I'm a complete beginner at this, so probably not much of help. :) Dp should make your sizes consistent. Maybe you are looking to make the sizews a percentage of the screen? Dec 07 00:08:30 Aren't those the same thing? Dec 07 00:08:51 are you using the different size buckets for drawables? Dec 07 00:08:54 No, dp is a size unit, such as mm Dec 07 00:09:18 What do you mean different size buckets for drables? Dec 07 00:09:31 drawables* Dec 07 00:09:44 do you have your drawables in drawable-hdpi, drawable-mdpi, drawable-xhdpi, etc? Dec 07 00:09:51 No.. Dec 07 00:10:00 that’s part of your problem Dec 07 00:10:02 I'm guessing I need to learn what that is? Dec 07 00:10:15 yup Dec 07 00:10:28 it’s how android supplies different image sizes to different display sizes Dec 07 00:10:32 s73v3r Yay it works Dec 07 00:10:43 Huh, okay.. thanks.. But isn't that what dp is supposed to do? Keep the size consistent on all images? Dec 07 00:11:10 no Dec 07 00:11:16 .-. Dec 07 00:11:25 I'm still a beginner so yea... Dec 07 00:11:35 But I'll lean that. Thanks! Dec 07 00:11:40 learn* Dec 07 00:17:31 tassilo_tazz: I made an experiment before: http://pastebin.com/u6kHqzhu you can multiply screenwidtch and height with a percentage to set views to be relative to the screen size. Dec 07 00:24:45 woah android studio ready to update? Dec 07 00:24:52 what are the haps Dec 07 00:24:59 2.2.3 eh Dec 07 00:29:30 wow, i have 13 images on each page in viewpager and it lags when you scroll between them Dec 07 00:31:14 each image has size of 8kB is too big? Dec 07 00:32:01 Depends on how you laid them out Dec 07 00:32:24 If you used something _simple_ it shouldn't have any problems doing the layout quickly Dec 07 00:32:29 5 linearlayouts for 5 rows Dec 07 00:32:32 not nested Dec 07 00:32:36 8kb is probably too big Dec 07 00:32:50 especially if you’re not caching the bitmaps Dec 07 00:33:32 i chose 300 ppi when exporting from illustrator, should i choose 152 or 71? Dec 07 00:33:36 Still not significantly large Dec 07 00:33:53 you should be exporting several, at different densities Dec 07 00:33:53 150 ppi is medium and 70 is low Dec 07 00:33:57 mentazoom: What's the maximum number of screen pixels those could possibly take up? Dec 07 00:34:14 also, are these custom designed cards? or are you just showing suit and number? Dec 07 00:34:28 cause the suit symbols are in unicode, so you could just do text Dec 07 00:34:38 s73v3r I downloaded vector of whole deck from net Dec 07 00:34:50 custom designed yea Dec 07 00:34:53 they look nice Dec 07 00:34:57 "300ppi" means pretty much nothing to us Dec 07 00:35:11 ...since we have no idea if they're supposed to be half an inch across or five Dec 07 00:35:15 Dagmar Maximum of screen pixels? i am not sure Dec 07 00:35:24 mentalzoom: What screen res is the device? Dec 07 00:35:32 1920x1080? Dec 07 00:35:40 it's nexus 5x i think that's correct res yea Dec 07 00:35:43 in the adapter for your viewpager, are you recreating the views every time? Dec 07 00:35:51 s73v3r yea Dec 07 00:35:56 ...and you're doing a 3x4 + 1 layout, yes? Dec 07 00:36:02 that’s probably not a good idea Dec 07 00:36:47 Dagmar four in each row +1 Dec 07 00:37:08 mentazoom: Ideally you'd want to probably aim for a 1:1 pixel ratio for your highest-supported screen density, but 8K or not, those probably shoudln't be larger than about 320 pixels wide Dec 07 00:37:45 300dpi isn't meaningful, and 8K isn't particularly meaningful, but the phone _is_ going to have to match that image up to a specific matrix of pixels Dec 07 00:38:09 If you made those images 300ppi and _actual card size_ you have made a terrible mistake Dec 07 00:38:37 those cards have 80dp width and 120dp height Dec 07 00:38:52 What _pixel_ size are the original images? Dec 07 00:39:10 I find it hard to believe an 8K image should ever be 80x120px Dec 07 00:39:40 do you know how i check on illustrator? Dec 07 00:40:05 Nope. Just right click on the thing in the file manager and look at the properties Dec 07 00:40:29 Under Details the first thing it'll say is Dimensions Dec 07 00:40:42 Also I trust you made these png images. Hint hint Dec 07 00:41:30 289 × 433 Dagmar Dec 07 00:41:59 yes it's .png Dec 07 00:42:02 I am assuming that's 289x433. I dont' do unicode Dec 07 00:42:21 eh yea, just copied from my comp Dec 07 00:43:09 Well, if you're _fixing_ their display sizes to 80x120 you might as well break them apart into exactly-sized images Dec 07 00:44:10 you mean lower the res for cards` Dec 07 00:44:12 ? Dec 07 00:44:45 The drawable-hdpi being 1.5x, so 120px by 180px for that one... drawable-xhdpi being 2x so 160x240, xxhdpi being 3x so 240x360 Dec 07 00:44:56 it's actually 80x112 dp Dec 07 00:45:06 ...and if you want to cater to people wiht really expensive devices, go ahead and do xxxhdpi at 4x Dec 07 00:45:15 Well, whatever gets you a 1:1 pixel match Dec 07 00:45:30 Rescaling is the devils work Dec 07 00:45:57 o hate working with graphics Dec 07 00:46:12 That's probably Illustrator's doing. ;) Dec 07 00:46:29 i used it first time today to get those cards Dec 07 00:46:30 It's wonderful for print but falls short in a few ways when it comes to RGB images for web/computers Dec 07 00:46:38 what do you use? Dec 07 00:46:40 PS? Dec 07 00:46:43 is there any way to load a proguard mapping into your debugger Dec 07 00:46:43 Gimp and Inkscape Dec 07 00:46:50 gimp really? Dec 07 00:47:08 Yes, I don't need plugins to help me play pretend that I can draw Dec 07 00:47:13 I can't draw for crap. Dec 07 00:47:37 I usually do the illustration stuff in Inkscape and then do all the fine-tuning for rasterized images in Gimp Dec 07 00:48:34 why did you say "The drawable-hdpi being 1.5x, so 120px by 180px"? Dec 07 00:48:51 shouldn't it be 1.5*120 and 1.5*180 ? Dec 07 00:49:02 Because I thought you were using 80dp x 120dp Dec 07 00:49:08 yea but anyway Dec 07 00:49:15 1.5*120 etc? Dec 07 00:49:21 Yeah Dec 07 00:49:35 Mdpi screens have 1:1 pixel-to-dp ratio Dec 07 00:49:57 Hdpi is 1.5, xhdpi is 2, xxhdpi is 3, and xxxhdpi for the win is 4x Dec 07 00:50:22 shiet didn't know that, good to know Dec 07 00:50:27 It'll pick higher density resources and scale them down if some are missing tho Dec 07 00:50:41 that's why i picked highest ppi Dec 07 00:50:45 So generally if you just throw in xxhdpi and xhdpi resources you're good to go Dec 07 00:50:53 but i don't get why it only gives me choise for ppi but not pixels Dec 07 00:50:58 that illustrator tool Dec 07 00:51:08 mentazoom: Because Illustrator is designed to obsess about _printing_ Dec 07 00:51:19 so inkscape is better? Dec 07 00:51:20 no, it’s because illustrator is a Vector tool Dec 07 00:51:30 inkscape is also a vector tool Dec 07 00:51:32 My fiance uses it and InDesign all the time, because she does print stuff Dec 07 00:51:55 gimp and photoshop are raster tools, so they deal with pixels Dec 07 00:52:03 inkscape and illustrator deal with vectors Dec 07 00:52:22 so you make png from there and use PS to scale? Dec 07 00:52:27 If you absolutely, positively, need sharp edges, vector tools are the way to go Dec 07 00:52:45 i had to use vector tool because i had .ai and .eps Dec 07 00:52:55 ...and printers which aren't little dinky desktop rigs _care_ about ppi. Dec 07 00:53:27 IT sucks you have to know about absolotuley everything Dec 07 00:53:34 mentazoom: It should be no big deal to have Illustrator export pngs of a specific X and Y size Dec 07 00:53:54 I know I do it with Inkscape all the time Dec 07 00:53:57 Dagmar Maybe, but when I choose export I only see PPI option Dec 07 00:54:11 Then maybe go for LARGE and resize them in PS Dec 07 00:54:13 but i have used illustrator first time today so who knows :p Dec 07 00:54:22 yea i think that's the way Dec 07 00:54:57 but then is it lagging because of the size? Dec 07 00:55:00 Android appears to use openEL/GL or whatevs for most of the rescaling, which can be super-irritating when you examine the result carefully. They don't believe in Lanczos at all Dec 07 00:55:07 is those res i told you too big? Dec 07 00:55:18 Not necessarily but if you can eliminate the rescaling that will help Dec 07 00:55:52 could you tell which PPI and res I should choose? Dec 07 00:55:57 If you're handing Android an image that's 80 pixels by 120 pixels, and it's meant to go into a canvas area, that's a pretty straightforward copy operation, dig? Dec 07 00:55:57 i have to download PS now too... Dec 07 00:56:01 i think it’s lagging cause you keep recreating the views every time Dec 07 00:56:28 not doing that would probably cut down on your lag a lot more, and be easier Dec 07 00:56:34 If you hand it one that's say, 120x240 or some other resolution, it has to do a bunch of math to figure out what each pixel should really be Dec 07 00:56:59 math, not even once Dec 07 00:57:01 :p Dec 07 00:57:08 yea i will look into caching too Dec 07 00:57:15 have to google about that ^^ Dec 07 00:58:29 i can't even start to program my app because of these images Dec 07 00:59:16 sure you can Dec 07 01:00:04 annoying to start with something else when it's lagging Dec 07 01:00:21 mentazoom: Just stick 'em in as xxxhdpi images for now (80x4 and 112x4) and circle back around to make the smaller ones later Dec 07 01:00:44 Dagmar The ones I have right now in xxxhdpi? Dec 07 01:02:02 then take care of the view recreation thing. that’s probably your biggest source of lag Dec 07 01:02:07 s73v3r FragmentStatePagerAdapter to cache or is it more complicated than that? Dec 07 01:02:19 you have to do it yourself Dec 07 01:02:32 basically, you don’t recreate the fragment every time it asks for one Dec 07 01:02:35 you hold them in memory Dec 07 01:07:36 I could have sworn that was supposed to be automatic... digging around right now to try and figure it out Dec 07 01:07:55 yea me too Dec 07 01:08:21 If you are explicitly recreating the fragments, then you're _definitely_ doing something wrong Dec 07 01:08:50 I forgot how to use viewpager so i found this tutorial today Dec 07 01:08:53 is it ok?: http://www.journaldev.com/10096/android-viewpager-example-tutorial Dec 07 01:10:15 that's how mine looks now Dec 07 01:15:57 mViewPager.setOffscreenPageLimit(4); doesn't help much Dec 07 01:17:01 Unless you've got a whole lot of suits it'll be fine Dec 07 01:17:17 its 4 pages Dec 07 01:17:23 doesn't help tho Dec 07 01:18:05 So you're just using ViewPager instead of Fragments? Dec 07 01:18:46 yes Dec 07 01:20:20 wait, are you using a viewpager with fragments? Dec 07 01:20:52 i am not using fragments Dec 07 01:21:03 * Dagmar rings a little bell Dec 07 01:21:05 heh Dec 07 01:21:06 but you said you were using a FragmentStatePagerAdapter Dec 07 01:21:20 i asked you if I should use that if I wanted to cache :p Dec 07 01:21:35 mentazoom: https://www.youtube.com/watch?v=JJeeZHFgLfc is a slidenerd video that may make light bulbs go off for you Dec 07 01:21:52 if you’re following that tutorial, then it doesn’t look like it is reusing the views Dec 07 01:21:56 ...assuming you can deal with Vevs' somewhat musical accent Dec 07 01:22:10 i love that guy ;) Dec 07 01:22:19 he explains without much bullshit Dec 07 01:22:34 s73v3r: Best I could tell it was definitely discarding them, and was already looking for something more reasonable that used fragments Dec 07 01:23:13 yea i am using that tutorial and it doesn't indeed seem to reuse views Dec 07 01:23:29 It's kind of doing things the old fashioned way Dec 07 01:25:37 The new hotness is to do every piece of a UI that you can as a fragment and let Android deal with memory management Dec 07 01:26:05 whaaa Dec 07 01:29:15 Zharf: Is that not the case? Dec 07 01:30:06 I'd gotten the impression that we use fragments when available because Android can flush and reinstantate the things behind the scenes when it's appropriate, whereas if _we_ explcitly try caching stuff, we just get headaches Dec 07 02:36:55 I was looking at:https://developer.android.com/training/animation/screen-slide.html Dec 07 02:37:09 how should I implement several fragments? Dec 07 02:40:12 Considerng what you're doing? Make _one_ fragment class, and dig into the little bit necessary to spawn it with an argument passed (the suit in this case) so that you can just spawn four of the same thing Dec 07 02:41:39 pass argument with bundle? Dec 07 02:55:46 Hello, I need to do a Photomosaic app. Would you use renderscript for that ? **** ENDING LOGGING AT Wed Dec 07 03:00:00 2016