**** BEGIN LOGGING AT Sat Aug 13 02:59:59 2016 Aug 13 05:19:05 Hi. a question, about Android Wear. Aug 13 05:28:19 hey guys, how is this actionbar acheived? https://material.google.com/components/bottom-sheets.html#bottom-sheets-usage Aug 13 05:30:23 #android-wear Aug 13 07:17:33 anyone know of a way to fill up system cache Aug 13 07:17:45 from my app Aug 13 07:18:29 I mean, fill up my app's cache Aug 13 07:19:13 from my understanding, there are two types of caches for an app, one that resides on the external storage (/sdcard/Android/) Aug 13 07:19:25 I am trying to fill up the cache that is held internally Aug 13 07:22:50 why? Aug 13 07:22:57 you just get the dir and write files to it Aug 13 07:23:22 its just a dir on the FS, nohting special about it really Aug 13 07:23:45 probably for testing what would happen Aug 13 07:31:08 oh actually I am writing a cache cleaning app Aug 13 07:31:23 in Android 5 and lower, it is as simple as calling a hidden PackageManager API Aug 13 07:31:29 in Android 6, they removed this API Aug 13 07:31:53 one idea I had was to inflate my cache so that it deflates everyone else's cache Aug 13 07:31:56 then remove my cache Aug 13 07:31:56 :) Aug 13 07:32:14 kind of a dumb idea, I know Aug 13 07:32:21 from the aosp source code, it looks like it should work Aug 13 07:33:02 https://developer.android.com/reference/android/content/Context.html#getCacheDir() Aug 13 07:33:14 that's the api I am guessing Aug 13 07:33:22 hi Aug 13 07:34:04 is it a good idea to create an automation app that interacts with other application like google map? Aug 13 07:34:38 my main concern is that if google map pushes an update, how do i ensure that my app still works? Aug 13 07:34:55 hamsterpower: not sure you can Aug 13 07:35:14 hamsterpower: even if you setup an automation system to warn you that an update was released Aug 13 07:35:17 for example, I like would like to automate finding bus route from dest a and dest b and find this every mornign at 7 am Aug 13 07:35:18 they have rolled updates Aug 13 07:35:30 hamsterpower: can't you just do that with google map apis? Aug 13 07:35:43 oh i didn't think of that Aug 13 07:35:45 why use the google maps app Aug 13 07:35:50 sleepster: cant you just go into settings and clear cache on apps? why would you need a cache cleaning app specifically? it'd just slow down things since they'd have to re-download Aug 13 07:36:20 perfinion: because I have a dumb product owner that wants this feature Aug 13 07:36:28 perfinion: I agree with you Aug 13 07:36:44 perfinion: assuming that it "has" to be done, I am now trying to find a way :) Aug 13 07:37:12 sleepster: im sure you realize already, but he OS will start clearing caches for apps that take too much if it needs more space Aug 13 07:37:19 so the feature is actually kind of useless Aug 13 07:37:31 sleepster: to clarify, my automation app can talk to google map API to find the route. This method is free from failing due to google map app update Aug 13 07:37:43 sleepster: if you have root you can just rm -rf /data/data/*/cache/* Aug 13 07:38:28 perfinion: yeah, root is not an option though :( Aug 13 07:38:40 perfinion: I can maybe use accessibility service and try to just automate the buttons for the user Aug 13 07:38:40 hamsterpower: you should be using google play services and the maps stuff in it yeah. that is stable across updates Aug 13 07:39:00 perfinion: put a nice pretty woman or something on the main screen so they don't see what I am doing in the background Aug 13 07:39:05 thanks perfinion Aug 13 07:59:25 Hi everyone Aug 13 07:59:51 is there a relative "easy" way to port an Android app I have written in Android Studio to iOS? Aug 13 09:15:51 hi Aug 13 09:16:01 will google shutdown GCM after officialy supporting FCM? Aug 13 10:53:41 anyone hear when android studio 2.2 come out.I know it is beta? Aug 13 11:07:02 Hey:) Aug 13 11:40:24 Trying this genymotion android emulator application to see if it's more performant than what Google's got. They're telling me that the free version isn't for commercial purposes, but how the hell are they going to find out that people are using it just for that? Aug 13 11:41:30 Bastards are even using virtualbox Aug 13 11:41:44 For the sdk tool build i need to install all of them?I take there use for differnet android? Aug 13 11:41:57 Hey VerbalKint Aug 13 11:43:48 perlsyntax: err.... hello? Aug 13 11:45:05 How are you:) Aug 13 11:45:57 perlsyntax: feeling pretty good today :D Aug 13 11:46:38 VerbalKint,That good.I hope android studio 2.2 come out soon:) Aug 13 11:49:55 perlsyntax: will the update focus on performance? Aug 13 11:51:11 This is pretty much the only thing that I want from Android Studio right now Aug 13 11:51:39 VerbalKint,If i right i hear going to have a apk tool telling you how big your apk files are i know of. Aug 13 11:52:26 I know the beta is out but i read if everything go good it will come out latter this week. Aug 13 11:53:45 Changelog does seem to mention performance improvements, but it's so vague that it might as well mean that operations are faster by a second Aug 13 11:54:46 i hope so:) Aug 13 11:55:42 VerbalKint,I just got a ssd drive and upgrade to 16gb ram so i hope this help me:) Aug 13 11:56:00 i hope this help me with my android things:) Aug 13 11:56:52 perlsyntax: lucky bastard. I'm sitting on a really crap PC right now with only 4GB of really old ram available. Aug 13 11:57:36 But a complete building of my app takes around 4 minutes and small changes when in debugging takes like 20 seconds so I can't complain Aug 13 11:59:54 VerbalKInt,I am on a macbook pro. Aug 13 12:02:11 VerbalKint,only prob i got is no device for android testing. Aug 13 12:02:42 perlsyntax: how so? They're cheap Aug 13 12:04:24 VerbalKint, I don't have to much money right now. Aug 13 12:04:49 perlsyntax: and yet you have a macbook pro? :D Aug 13 12:06:46 VerbalKInt,Yes but only 3 years old but it 2012. Aug 13 12:31:05 hi all, a general question here, should apps be allowed to firstly detect rooted android, secondly stop functioning because of that? I know snapchat lost that battle and you can cloak root Aug 13 12:39:20 Do you guys think that storing a 100-or-so integer array in preferences is naughty? Aug 13 12:39:32 VerbalKint, depends what for Aug 13 12:39:34 Don't wanna create a sqlite database just for this Aug 13 12:40:11 darken: well, to store the ids of the already answered questions Aug 13 12:40:20 So they won't come up again Aug 13 12:41:10 Unless you plan other stuff that you will need an SQL db for, I'd say take the easy solution Aug 13 12:56:37 Tazmain: why would they Aug 13 12:56:45 whats wrong with being rooted :v Aug 13 12:56:51 I don't know Aug 13 12:57:17 this app is saying my phone is rooted and won't run, my phone isn't rooted, I am trying to decompile it and find out why its so messed up Aug 13 12:57:39 not easy Aug 13 12:57:44 what app Aug 13 12:58:02 its very unusual if app tries to detect root anyway Aug 13 12:58:44 Absa banking app Aug 13 12:58:53 the reviews are tanking it Aug 13 12:59:01 Snapscan does do a root check but just warns you Aug 13 12:59:09 or rather Barcleys absa app Aug 13 13:00:08 well potentially root is dangerous if not properly taken, since apps could get full access to other apps Aug 13 13:00:20 i.e. banking apps with login credentials Aug 13 13:00:54 Its the only banking app i've seen be this stupid Aug 13 13:01:32 id hesitate to use it really Aug 13 13:02:20 same, it crashes and incorrectly reports root? sounds dodgy Aug 13 13:02:52 My banking app doesn't won't work on my rooted phone either Aug 13 13:02:54 is it legit app, not a scam Aug 13 13:03:02 :? Aug 13 13:03:32 Some chinese phones come with some root files in place like the su binary, root doesn't work, but it can be detected as potentially having root Aug 13 13:03:33 seems to be legal. Got all the barcleys crap in the source code Aug 13 13:03:47 man you can install root cloak Aug 13 13:03:47 In apps that try to use root it actually hangs up the root check until timeout Aug 13 13:21:57 I can list files inside application data using "File f = getFilesDir();" but how can i list a subdirectory content inside application data ? Aug 13 13:24:19 Something like File f = new File(getFilesDir() + "/files"); Aug 13 13:29:55 maour: new File(getFilesDir(), "files"). Aug 13 13:31:28 yo Aug 13 13:31:33 > failed to find Build Tools revision 21.1.2 Aug 13 13:31:40 i dont see this version in the sdk ? Aug 13 13:34:31 fizzie, How can i list files inside /storage/emulated/0/Android/data/Package.Name/files ? getFiledDir return something else! Aug 13 13:38:00 I want a settings activity with lists, whose item has three elements... Aug 13 13:38:37 two text views and a widget which could be toggle, switch or checkbox, how should i go about implementing it? Aug 13 13:38:40 fizzie, getExternalFilesDir worked Aug 13 15:47:19 Ugh, my SharedPreferences outright refuses to save my Set after setting it once Aug 13 16:19:35 hello! guys, help pls. creating new project in android studio and its not installing with java.lang.RuntimeException: Unable to instantiate activity ComponentInfo this message Aug 13 16:19:39 blank activity, blank app :( Aug 13 16:43:07 huh Aug 13 17:15:08 Hello, I keep getting "MediaRecorder: start failed: -19" trying to capture video and audio with the media recorder, but all the googling and log review don't yield the culprit Aug 13 17:15:49 pretty simple code, http://pastebin.com/Y14TBvtq Aug 13 17:15:56 any ideas? Aug 13 17:23:18 hmm I guess I'm not doing the surface holder callback, and from the docs it seems like it might not even start recording without that Aug 13 17:23:19 arg Aug 13 17:38:53 Is it possible to keep views from being recycled when they are scrolled out of view in ListView Aug 13 17:39:03 I want to update the view even if it is off screen Aug 13 17:43:49 why, update it when it comes back into view Aug 13 17:43:53 anything else is wrong Aug 13 17:45:45 Its a webview though pfn, so update takes a second because render Aug 13 17:46:04 So its less then ideal to reaload each time a webview list item comes back into view Aug 13 17:46:47 yuck Aug 13 17:47:05 set an offscreen cache Aug 13 17:47:16 Hows that work? Aug 13 17:47:18 Never heard of it Aug 13 17:47:27 listview and recyclerview should have some sort of offscreen limit Aug 13 17:47:35 I know ViewPager has it Aug 13 17:48:00 pfn: Are you reccomding I hold the view even when offscreen and refresh it even when offscreen? Aug 13 17:50:41 I recommend not using a webview Aug 13 17:50:56 pfn its not my choice and I dont have an option Aug 13 17:51:11 pfn, what if I hold the WebViews in a List and just call .reload on each item there Aug 13 17:51:19 Would that work? Aug 13 17:51:28 no Aug 13 17:51:43 How come Aug 13 17:51:46 Ah, I see why Aug 13 17:51:46 then don't use a listview Aug 13 17:51:55 just scroll view it Aug 13 17:52:09 Hmm, scrollview Aug 13 17:52:43 So have a parent scrollview, then a LinearLayout vertical orientation inside that with WebViews inside there with some margin? Aug 13 18:10:10 I sit difficult to work with SSL/TLS and Android? Aug 13 18:16:41 no different from java/jvm Aug 13 18:23:28 pfn: does ScrollView not recycle Views like ListView does/ Aug 13 18:23:35 no Aug 13 18:24:06 Ok Aug 13 18:24:11 So this is actually good in my case Aug 13 18:24:22 Asssuming there are not too many views in the "List" Aug 13 18:29:27 Hi. Can I use an arbitrary font in a TextView? Aug 13 18:34:41 hello guys, any body here successfully got repeatative delay working? Aug 13 18:36:01 pfn: any idea how many views itll take in a scrollview before running into OutOfMemoryException? Aug 13 18:37:49 drose379: will depend on how big is the RAM of the device? Aug 13 18:39:45 guys I put http://stackoverflow.com/a/15874176/3832086 is a "for" loop with range " i = 0; i < 3: i++" but all the three iteration occured at once, instead of having a delay between them. Aug 13 18:39:55 *in a Aug 13 19:08:53 parallized ALU Aug 13 19:09:26 heh, loop unrolling Aug 13 19:09:40 do you guys know of any channels to discuss NoSQL structure? Aug 13 19:11:57 Is it best practice to ask java based questions in java or is here ok? Aug 13 19:12:17 Java seems really busy too. Aug 13 19:15:41 if it's basic language questions ask in java Aug 13 19:16:27 you can try of course Aug 13 19:17:22 Is this a basic language error? SecureSSLSocketFactory is not abstract and does not override abstract method createSocket(InetAddress,int,InetAddress,int) in SocketFactory Aug 13 19:17:56 The method is abstract, overide supposed to fix that. Aug 13 19:18:19 you mean compile error? Aug 13 19:18:23 Yes. Aug 13 19:18:38 Goto java? Aug 13 19:18:51 how does the class look like Aug 13 19:19:10 because it seems its just function name and variable without a body Aug 13 19:19:21 Just trying to understand my SSL implementation better. Aug 13 19:19:22 http://stackoverflow.com/questions/27075678/get-ssl-version-used-in-httpsurlconnection-java Aug 13 19:19:32 It's where the code is. Aug 13 19:20:20 so, came across something weird Aug 13 19:20:44 So I have a viewpager (which is in a fragment) that of course displays fragments Aug 13 19:21:17 In each fragment, I have a couple of textviews Aug 13 19:21:47 if I only set the text on one of them, everythings fine Aug 13 19:21:49 namrandgo: what are the arguments to that function Aug 13 19:21:57 if I bind and set text to all of them, i get a java.lang.IllegalStateException: Recursive entry to executePendingTransactions Aug 13 19:22:09 public abstract Socket createSocket(Socket var1, String var2, int var3, boolean var4) throws IOException; Aug 13 19:22:29 and this is what you got? Aug 13 19:22:32 which apparently has to do with nesting fragments, and is fixed by getChildFragmentManager Aug 13 19:23:37 namrandgo: so you need make your class abstract. or unmake this function abstract and provide implementation. yes, this is more #java thing Aug 13 19:24:10 Ashiren: Is there any simple solution? Aug 13 19:25:08 do you know the concept of abstract class? and can you make abstract class yourself if needed? Aug 13 19:25:41 Sort of. Aug 13 19:25:51 Maybe I should ask in java. Aug 13 19:26:55 Can't instantiate abstract class. Aug 13 19:33:31 heh Aug 13 19:40:04 Hey thanks Ashiren. Aug 13 19:48:16 Ashiren: Had to implement all createSocket methods was error. Aug 13 19:53:23 Hi all. I'm struggling with android:windowSoftInputMode="adjustResize" on a login form. I've read several threads and this one matches my problem the best: http://stackoverflow.com/questions/16411056/how-to-adjust-layout-when-soft-keyboard-appears I'm trying to achieve the second picture but I get this: https://postimg.org/image/k8tqcko5r/ Anyone care to help? >< Aug 13 19:57:27 Is this type of leaderboard possible with GPGS? You have percentage of matches won as score. This means that your score can get worse...that wont work witht he leaderboard right? Since a wrose score will be ignored. Aug 13 20:15:59 Developing for Android can be an emotional rollercoaster. We alternate from pure childlike joy when new tools & APIs are announced to feelings of impending doom when we have to do anything involving camera support or ContentProviders. Aug 13 20:18:03 new tools & APIs don't come out too often though ... Aug 13 20:18:08 :( Aug 13 20:24:06 Hello. Can I use vector graphics (like SVG) as drawable resources for icons in android? Aug 13 20:24:38 Arancio there is VectorDrawable, google it ... can't use SVG directly but basic ones can be converted to VD using tools Aug 13 20:25:00 g00s: thanks! Aug 13 20:25:26 and there are support vector drawables for pre-lollipop Aug 13 20:25:44 with lots of caveats, but yeah Aug 13 20:29:15 Do you prefer working with vector graphics or with bitmaps? Aug 13 20:33:45 there is a 3rd option, i think you can provoke the build system to create pngs and then you just use the bitmaps Aug 13 20:33:53 i forgot how that works though, i have vectors for almost everything Aug 13 20:34:04 I like vector graphics so much I made my own custom font from SVG files and created my own drawable and xml resources to put them in my project. Aug 13 20:34:15 that was before VectorDrawable ofc Aug 13 20:34:44 g00s: howdy Aug 13 20:34:57 hey Napalm how is it going Aug 13 20:35:18 All right thanks, yourself? Aug 13 20:35:28 I've been writing a bit of Go lang recently Aug 13 20:35:38 staying busy, taking care of my old dog ;) Aug 13 20:35:39 good fun, really nice language Aug 13 20:36:04 Napalm of yeah, do you have any projects planned for Go ? Aug 13 20:36:15 i didn't like its missing generics Aug 13 20:36:19 yup. writing some backend APIs in it. Aug 13 20:36:31 yeah probably better than node.js probably Aug 13 20:36:33 it doesnt need generics.. everything is generic (in a sense) Aug 13 20:36:47 oh its way better tha node js Aug 13 20:37:00 in the sense of performance and memory cost Aug 13 20:37:18 so for server side stuff its quite nice.. its all good for tools Aug 13 20:38:26 i was using https://github.com/xenolf/lego the other day. I just like the notion i can do "go install github.com/xenolf/lego" and i've installed a tool and built it from source Aug 13 20:40:00 thanks g00s and Napalm Aug 13 20:40:05 np Aug 13 20:40:14 no idea what i did, but np Aug 13 20:40:16 :D Aug 13 20:40:20 lol Napalm Aug 13 20:41:51 Napalm i'm kinda excited about this Fucshia thing; even if its AR only. I could get interested in that. I saw go tooling in there Aug 13 20:42:03 Fucshia? Aug 13 20:42:54 ooh Aug 13 20:42:56 https://news.ycombinator.com/item?id=12271354 Aug 13 20:42:56 this sounds nice Aug 13 20:43:14 yeah i think it was in the news and i just blew right past it, since it didn't trigger any alarms :) Aug 13 20:43:36 g00s: no? Aug 13 20:43:47 they come often compared to iOS Aug 13 20:43:49 Napalm see comment from pavlov Aug 13 20:44:13 g00s: i was reading this http://www.androidpolice.com/2016/08/12/google-developing-new-fuchsia-os-also-likes-making-new-words/ Aug 13 20:47:45 Napalm thanks for the link, other stories i saw had few details Aug 13 20:47:49 so thats nice, Rpi3 support Aug 13 20:50:15 funny to see it's Corbin D. who wrote the article, think he got hired recently maybe Aug 13 20:50:42 (he was partially famous to have sideloaded some handheld apk on android wear) Aug 13 20:55:50 g00s: this could be used for VMs/Clustering and the like. Aug 13 20:56:06 g00s: nice light-weight OS for distributed work, that type of thing. Aug 13 20:56:25 the Escher bit implies a high performance graphics pipeline Aug 13 20:56:49 but totally optional according to the build instructions Aug 13 20:56:58 i see Aug 13 20:57:26 Napalm not this year, but the last year, that was some talk about brillo at I/O ... this year I don't think they said anything Aug 13 20:57:32 "The underlying application framework is called Mojo [4]. It already offers bindings for Go, Java, JavaScript, Python and Rust in addition to Dart" from that pavlov guy Aug 13 20:57:49 Napalm yeah thought you would like the Go part :) Aug 13 20:58:22 But these languages work to the new server-side flow. like Node.. (Javascript part) Aug 13 20:59:13 so it kinda makes sense to run these application processes on a light weight OS on a cluster. They include network-boot. Aug 13 20:59:33 and network log viewing Aug 13 21:01:12 Napalm did you have any favorite docker resources (for learning) ? Aug 13 21:01:24 hm maybe i confused you with ron_frown, sorry Aug 13 21:01:33 i think he was using docker Aug 13 21:02:13 g00s: https://rominirani.com/docker-tutorial-series-a7e6ff90a023#.imju2s9b6 Aug 13 21:02:23 I use docker Aug 13 21:02:25 cool thx Aug 13 21:02:39 Napalm: you expressed your opinion on using vector graphics on android. I said thank you for that Aug 13 21:02:46 i find it great for dev work in place of vagrant and the like Aug 13 21:02:55 Arancio: ah Aug 13 21:03:04 Napalm bbiab, jake is up Aug 13 21:03:17 kk Aug 13 21:03:28 go look after him Aug 13 21:03:29 :) Aug 13 21:04:29 What kind of observable is at the base of the MVVM library for android? Aug 13 21:05:54 How do people usually describe and visualize text composed of runs with different styles in android? Aug 13 21:06:28 Is HTML.fromHTML() the only solution? Aug 13 21:10:40 Arancio: its what Spans are for Aug 13 21:10:57 Thanks. Aug 13 21:11:01 * Arancio googles Aug 13 21:12:17 Arancio: https://developer.android.com/reference/android/text/style/package-summary.html Aug 13 21:18:38 Hi guys. Does anybody here read Efficient Android Threading book? The thing is that I'm trying to test the very first code sample from the book and it simply doesn't work, like at all. My overall impressions of the book is quite positive, but it really dissapoints when code from the books teaching you to code right doesn't work. Aug 13 21:19:46 It always makes me think if the book worth further reading if its examples aren't working. Aug 13 21:21:19 AlexBerdnikov looking at it, 2014 - should work, maybe build stuff is out of date Aug 13 21:22:07 AlexBerdnikov this is a bit newer http://www.informit.com/store/android-concurrency-9780134177434 Aug 13 21:22:17 also, the RxJava Oreilly book has Android chapter Aug 13 21:22:42 Napalm 97 'F here, tough for dog :( Aug 13 21:22:46 AlexBerdnikov, what does "does not work at all" mean? Aug 13 21:23:20 Mavrik, it compiles with no errors or warnings, just doesn't do things it must. Aug 13 21:24:12 g00s: :( Aug 13 21:24:25 Napalm did you have a pug ? Aug 13 21:24:57 Long legged Jack Russell Aug 13 21:26:07 Napalm ah ok i forgot. just saw this today http://i.imgur.com/AS9Xg9r.jpg Aug 13 21:26:28 seal / pug :) Aug 13 21:26:42 Mavrik, g00s: In fact I have an experience in concurrent programming with Java in Android, but since I learnt all the stuff I know on the fly form a shitload of different sources including this channel (which users I very thankful to) I decided to oic some really good book (judging it from the reviews) and start from the very beginning... Aug 13 21:26:47 i thought you had a pug, memory failed me Aug 13 21:27:43 And then, the very first example of Threads communication based on PipedReader and PipedWriter simply fails to do anything Aug 13 21:27:50 Hey guys! Does anybody know why scrollToPosition doesn't work for RecyclerView inside CoordinatorLayout? Aug 13 21:28:09 So I immediately questioned overall quality of the book because of that Aug 13 22:12:44 i plan on making an activity with multiple fragments that interact with service, should i bind only the activity or bind every fragment as well? Aug 13 22:24:29 parco: just bind once. why more than that? The bind process in on your Context which is your Activity.. so having all your Fragments bind means they are all just asking the Activity to bind multiple times. Aug 13 22:25:16 parco: you can use a simple interface and compose pattern to link them up so that any Activity that implements your interface that you hand off to a seperate object to manage that is composed into your Activity Aug 13 22:25:54 then you can have the Fragments use the standard instanceof pattern on attachment to get the interface Aug 13 22:26:31 o/ are there any SMS applications that are known to allow the user to *mutate* a content://sms/inbox OR content://sms/sent row? Aug 13 22:27:05 or are those two content providers only every inserted to or deleted from? Aug 13 22:27:10 Napalm, whoa. do you have any examples? Aug 13 22:27:42 erm, nothing to share.. perhaps I could put one together Aug 13 22:27:53 Are you saying have my activity implement an interface that the fragments know how to use? So i could (MyInterface)getActivity() from the fragments...? Aug 13 22:28:05 along those lines yes Aug 13 22:28:45 parco: see https://developer.android.com/training/basics/fragments/communicating.html Aug 13 22:28:59 I guess the reason i wanted to make the fragments standalone is that the service will need to send them specific information for their views Aug 13 22:29:29 parco: i dont see how that comes into it Aug 13 22:29:29 so if i dont bind directly to fragment, i'll have to pipe everything through the activity Aug 13 22:29:48 it will anyway Aug 13 22:29:56 a Fragment is not an Activity Aug 13 22:30:13 oopsy.. more correctly a Fragment is not a Context and a Context is what binds Aug 13 22:30:31 I plan on binding with getApplicationContext() Aug 13 22:30:45 noooo Aug 13 22:30:53 you shall not pass Aug 13 22:31:02 i had each fragment bind itself, and thought it worked well. Aug 13 22:31:12 after all, fragment has the lifecycle - use it ! Aug 13 22:31:29 at some point having everything going through the activity as mediator becomes a mess too Aug 13 22:31:31 true enough, although I think they'll all share the same service connection Aug 13 22:31:54 i might have multiple activites that use these widgets (fragments) too Aug 13 22:31:56 g00s: thats where the composer pattern helps Aug 13 22:31:56 :) Aug 13 22:31:59 different SC if i recall Aug 13 22:32:04 so it would be nice if they act like "drop in" modules Aug 13 22:32:28 although, if your stuff is all in 1 process i would try not to use binding to service Aug 13 22:32:52 g00s: you are correct Aug 13 22:33:07 g00s whys that? Aug 13 22:33:38 What are your favourite Android books? Aug 13 22:33:47 what if my fragment misses a notification from the service... can that happen? Aug 13 22:35:38 parco: i'm not even sure how to answer that Aug 13 22:35:42 haha Aug 13 22:35:49 parco: notification? Aug 13 22:36:05 i assume you mean like some sort of message object you hand back to your Fragment from the Service Aug 13 22:36:08 so if i dont bind to my service, the other way to speak to it is through broadcast notifications, right? Aug 13 22:36:16 parco what i did was , onStart : bind + poll for latest state, onStop : unbind Aug 13 22:36:19 which seems like a weak connection... like things could get lost Aug 13 22:41:30 parco if you mean events get lost, you'll have to queue them up if you really need them Aug 13 22:41:49 application / domain level events, otherwise i don't understand what your Q is Aug 13 22:42:06 but i have to take Jake out again , good luck Aug 13 22:42:22 parco you are in good hands with Napalm :D Aug 13 22:42:33 :) Aug 13 23:13:21 Is there a container that will arrange children inside the screen space, without using additional space (the user won't need to scroll)? Aug 13 23:24:48 Arancio: do you know how many children views will be displayed? Aug 13 23:27:43 hello Aug 13 23:28:10 so I have a question that's been vexing me Aug 13 23:28:15 layout_width: does it include margin? Aug 13 23:28:29 b/c if it does, which seems to be the case, I can't understand why my current layout is working Aug 13 23:28:37 or, perhaps, I have done something wrong but do not know about it Aug 13 23:29:42 http://dpaste.com/1X25K8B Aug 13 23:30:11 I have a recyclerview in a relativelayout Aug 13 23:30:23 now, for each item of the recyclerview, I have a cardview Aug 13 23:30:45 I say android:layout_width="match_parent" for each cardview, *and* android:layout_margin="24dp" Aug 13 23:31:10 now it looks pretty good, that is, each of the cards are clearly separate from each other Aug 13 23:31:20 not squeezed side by side Aug 13 23:31:32 that is, they have a good distance b/t them, which means the margin is working Aug 13 23:31:40 but I feel that contradicts the layout_width="match_parent" Aug 13 23:31:58 did my layout_margin override match_parent? Aug 13 23:43:23 nvm, I think I got it Aug 14 00:20:50 Hi. Quick question - I want to style my buttons to have rounded corners. http://stackoverflow.com/questions/9334618/rounded-button-in-android I read this post describing how to do it, and it suggests creating a new xml file to store the properties, and then saving that xml file in the drawables folder Aug 14 00:21:00 I thought drawables was for images? Aug 14 00:22:08 nope, it's for shapes and such as well Aug 14 00:22:52 So whats the styles.xml file for? Purely just for the overall theme? Aug 14 00:23:10 I thought I could have added button styling in that file and then referenced it in my layout Aug 14 00:23:29 you can! Aug 14 00:23:35 but it's never that easy, is it? ;) Aug 14 00:23:57 No idea :D Aug 14 00:24:05 styles can reference things in drawable Aug 14 00:24:06 First time actually using any of these styles Aug 14 00:24:12 any of these files* Aug 14 00:24:32 If you were styling buttons where would you personally add the code? Aug 14 00:25:36 so you can i.e. create a RoundedButtonStyle in styles.xml, which says that backround should use the @drawable/button_background in your example Aug 14 00:26:00 and then set style to roundedbuttonstyle on the button in the layout Aug 14 00:27:09 Okay I get the first part but I'm not completely sure what you mean by "and then set style to roundedbuttonstyle on the button in the layout" Aug 14 00:27:40 I know I have to use "@style/roundebuttonstyle" as the value, but what would the attribute be for the button? Aug 14 00:28:30 style= Aug 14 00:28:46 ah okay lol Aug 14 00:28:47 thanks! Aug 14 00:29:16 What if I want to change the overall theme of my app? I know it should be in the manifest and right now its android:theme="@style/AppTheme"> Aug 14 00:30:33 If I change that line to this android:theme="@android:style/Theme.Holo"> the app keeps crashing Aug 14 00:31:07 uhm, yeah. depends on what stuff you're using Aug 14 00:31:32 holo-theme is kind of pre-lolipop Aug 14 00:31:41 Hmm Aug 14 00:31:43 du you use appcompat? Aug 14 00:32:26 Yeah Aug 14 00:32:35 yeah, appcompat will fail with holo Aug 14 00:32:38 Ah gotcha Aug 14 00:32:50 I jsut hate the overall look of the original theme Aug 14 00:32:52 it's so clunky Aug 14 00:32:54 http://android-developers.blogspot.no/2014/10/appcompat-v21-material-design-for-pre.html Aug 14 00:33:18 your theme must inherit from a appcompat-theme if using appcompat, afaik Aug 14 00:33:40 hmm Aug 14 00:33:41 okay Aug 14 00:33:49 i need to look more into styling Aug 14 00:34:43 make a theme like they say in the beginning of that article and reference it in the manifest file Aug 14 00:34:52 or you can probably just modify the AppTheme you have now Aug 14 00:35:03 all in the styles.xml file? Aug 14 00:35:11 It's just the buttons I hate Aug 14 00:35:51 I'm guessing you have something there called AppTheme already? Aug 14 00:36:18 Yeah Aug 14 00:36:31 it's just a few colors in there, nothing else Aug 14 00:36:40 then just modify it to use the button style you want Aug 14 00:37:06 https://gyazo.com/c7e75b13cd114322ae88394f99fb4460 that's all thats in the file Aug 14 00:39:47 I don't have my style files here, so I may be remembering this wrong Aug 14 00:41:13 but I think all you need to do is add @style/YourButtonStyle to this theme and it will change the buttons Aug 14 00:41:39 Are there pre-defined styles out there somewhere? Aug 14 00:41:48 I always style them induvidualy anyways Aug 14 00:41:51 yeah, there are Aug 14 00:42:24 All the tutorials I'm reading don't tell me how to define it once for all buttons. I have to define it for each button in my layout Aug 14 00:42:31 That's ultimately what I'd like to avoid Aug 14 00:42:56 I'm not sure that's really what you like to avoid Aug 14 00:43:09 different situations require different buttons Aug 14 00:43:12 Why? Is that not recommended? Aug 14 00:43:27 Fair enough but then can you not override the default styling? Aug 14 00:43:33 you can Aug 14 00:43:35 I think I'm in a css mindset here Aug 14 00:43:38 which may not be helping Aug 14 00:44:10 Where can I get the predefined button styles btw? Aug 14 00:45:02 http://stackoverflow.com/questions/26346727/android-material-design-button-styles Aug 14 00:46:30 Awesome, will take a look at that thanks Aug 14 00:46:51 as I suck at design I usually just try to follow this Aug 14 00:46:51 https://material.google.com/components/buttons.html# Aug 14 00:47:24 style="@style/Widget.AppCompat.Button.Colored" this worked by adding to one of my buttons Aug 14 00:47:38 Had no idea there were predefined styles Aug 14 00:47:58 the documentation on this stuff is so bad I want to cry just thinking about it Aug 14 00:47:59 I come from a design background so I hate it when I'm coding some logic and testing with a horrible looking UI Aug 14 00:48:09 I should probably focus on the logic first but the UI is just so damn ugly to work with Aug 14 00:48:49 to be honest it's pretty easy to get a good looking ui pretty fast using appcompat Aug 14 00:49:13 just inherit some style, set up your colours and suddenly it's starting to look ok already Aug 14 00:49:19 Are there any resources you'd recommend to learn styling from the ground up? Aug 14 00:49:31 I've literally never worked on styling before, this is my first "proper" app I'm working on Aug 14 00:49:49 when I say proper I mean a meme generator of which probably millions exist.. Aug 14 00:50:04 I completely suck at it myself, so I don't think I'm the best person to ask for that Aug 14 00:50:22 Okay Aug 14 00:50:29 I just don't fully understand how to change things Aug 14 00:50:36 like oh here's a button how can I change the bg color Aug 14 00:52:28 How do I get the "On" style setting (below the main Action bar) in android Developer settings Aug 14 00:52:31 ? Aug 14 00:52:34 Eplebit: Do you know why scrollToPosition doesn't work for RecyclerView inside CoordinatorLayout? Aug 14 00:53:10 idoko: Switch widget? Aug 14 00:53:51 loredna13: Yeah, but it's got a background and the parent's padding doesn't affect it Aug 14 00:53:55 loredan13: sorry, no idea. never tried it :/ Aug 14 00:54:10 if I put it in a preference screen the padding shows Aug 14 00:54:52 need the width to fill the screen Aug 14 00:55:02 Faizan: if you use those built in button-styles, your primary and accent colors should be used automatically. so just start from there and see where it needs fixing Aug 14 00:55:35 Yeah I'm just looking at that - for some reason my accent color (which is red and should be the color of the button) wasn't applied to the button Aug 14 00:57:17 idoko: Stock switch doesn't stretch, just gives space for a label. If you need it to stretch, you will probably have to make your own widget, from CheckBox or CompoundButton Aug 14 00:59:09 loredan13: not really the switch widget, i mean the whole item stretches Aug 14 01:00:30 idoko: Use CheckBox or CompoundButton then, and set your own drawable Aug 14 01:05:52 Can android apps make use of SVG's? Aug 14 02:18:24 g00s: Aug 14 02:18:30 you there mate? Aug 14 02:18:50 hey Napalm yeah, but jake is getting restless Aug 14 02:18:57 fair nuff Aug 14 02:18:59 man hope i have as much spunk if i reach 94 yrs old Aug 14 02:19:11 yea, i can imagine Aug 14 02:19:29 parco is doing some BT-LE, he might have a few questions for you Aug 14 02:19:30 :D Aug 14 02:19:44 if i reach that age, probably see that scenario US loses 1T in real estate to coastal flooding :P Aug 14 02:21:10 NYC under water, etc Aug 14 02:22:06 well, trump will probably cause ww3 so probably won't come to pass **** ENDING LOGGING AT Sun Aug 14 02:59:58 2016