**** BEGIN LOGGING AT Wed Feb 10 02:59:59 2016 Feb 10 03:02:19 son of... nevermind, i figured it out, was my getDefaultProgaurdFile... I used the optimized.txt version Feb 10 03:06:01 using optimizations in proguard doesn't work for android Feb 10 03:17:16 Hello all, has anyone used acid music? I want to make a mobile version of that should I use media player? Feb 10 03:20:29 Basically I need to play from 8+ streams at once and I need to seek Feb 10 03:23:46 hi folks Feb 10 03:23:55 i am starting with android studio, i made my app it is working great, but when I install the app, it gets always the default android icon... not the one I placed on mipmap folders! Feb 10 03:24:31 Have you tried stackoverflow? Feb 10 03:24:44 tried a lot on google Feb 10 03:25:57 I have no clue Feb 10 03:26:12 sounds like an easy problem to solve Feb 10 03:26:13 think the words related to this are too common, searches always return to other issues Feb 10 03:26:24 android:icon="@mipmap/mylogo" Feb 10 03:27:01 i followed the guides, placed the images, they even appear on the running apps screen Feb 10 03:27:10 but on the launcher is always the green droid Feb 10 03:27:23 for having a lot of problem, you provide a dearth of detail Feb 10 03:27:35 yep... mipmap/mylogo is correct Feb 10 03:28:00 first i tought it was a cache thing... Feb 10 03:28:09 but cleaned and rebuilded it all Feb 10 03:28:57 still not providing much information Feb 10 03:30:34 assuming the name is correct in the manifest, its probably being cached on the phone. Had a similar issue with a widget Feb 10 03:30:52 installing the package doesn't cache the launcher icon Feb 10 03:31:36 well... Feb 10 03:31:40 it is a cache after all Feb 10 03:31:44 i had an issue where I changed the icon and the old icon persisted on the phone for quite awhile, so it definantly has some sort of save mechanism Feb 10 03:31:51 installed on the phone of my wife and it appears ok Feb 10 03:32:20 i removed the app completely... tought it was all it needs to clear the cache Feb 10 03:32:26 thank you orbyt_ Feb 10 03:32:41 yep Feb 10 03:32:41 thank you pfn Feb 10 03:33:27 I have a OnePlus X, snapdragon 801... could somebody pls tell me how to know the platform? i.e. ARM or ARM64 or x86? Feb 10 03:39:21 update: cleared the cache of the launcher app... worked Feb 10 03:39:28 thankyou guys Feb 10 03:40:32 that's interesting, normally doesn't happen, what launcher? Feb 10 03:42:10 missed him Feb 10 03:42:45 that feeling, when you check company's old app, and main activity has 5k+ lines <3 Feb 10 03:47:14 and now you've rewritten it to be 200 lines while having all the same functionality? :P Feb 10 03:56:20 pfn: I wish ! ;) Feb 10 04:01:34 but yeah, 5k lines is a problem Feb 10 04:23:00 gordon_ what in gods name requires 5k lines of code in 1 activity Feb 10 04:24:30 you dont want to know ;) Feb 10 04:24:54 at least they were nice, and warned me up upfront :D Feb 10 04:33:34 ok, get to it, convert that 5k activity to 100 lines Feb 10 04:33:35 :P Feb 10 04:34:20 first, I would like to remove 'I <3 MainActivity' pattern... Feb 10 04:35:15 gordon_ is that one main activity coordinating a bunch of fragments ? Feb 10 04:35:26 fragments... nice jokes ;) Feb 10 04:35:35 no fragments there Feb 10 04:35:36 lol does this predate fragments :D Feb 10 04:35:44 yep Feb 10 04:36:33 i guess that means you got ant build :D Feb 10 04:37:25 no Feb 10 04:37:26 gradle Feb 10 06:02:21 Hello experts, your opinion on which one comes close as native dev's performance.. Phonegap VS Xamarian ? Feb 10 06:03:56 xamarin Feb 10 06:04:28 pfn: thanks for replying.. the reason for the selection ? Feb 10 06:05:28 but why are you even comparing xamarin vs. phonegap Feb 10 06:06:06 pfn: i thought both are capable of building cross platform applications Feb 10 06:06:15 pfn: please correct me if i am wrong Feb 10 06:06:42 it's competition for the worst thing to write the app ? Feb 10 06:07:07 there's also robovm Feb 10 06:07:24 gordon_: competetion for a quick and ugly solution to get started with cross platforms Feb 10 06:07:34 * tamarind googles robovm Feb 10 06:07:42 waste of time (phonegap) Feb 10 06:07:50 gordon_: why ? Feb 10 06:07:55 because it's slow Feb 10 06:07:59 and users hate it Feb 10 06:08:22 you do /not/ want to get started with cross platform out of the gate Feb 10 06:08:28 you will produce garbage for all platforms Feb 10 06:10:06 pfn: because they compile and build their own code ? is that why you are considerign it as garbage ? Feb 10 06:11:46 no, because you will write something that looks like trash on all platforms Feb 10 06:11:51 and runs like Feb 10 06:12:26 there was some funny thing for that Feb 10 06:12:49 mvvmcross ? Feb 10 06:13:31 someone should that for robovm too Feb 10 06:16:22 pfn: i know the answer to this question depends on users, but on an average how long does it take to write a decent application on android assuming that you have to learn android programming from scratch Feb 10 06:17:18 I assume that means you have 0 programming experience at all Feb 10 06:17:23 depends on what you're writing Feb 10 06:19:59 but since you want to be vague, you get vague answers Feb 10 06:21:04 pfn: a REST based application with payment gateway, access to native features like camera, file manager and some graphical api for dashboard Feb 10 06:22:47 1 day Feb 10 06:22:53 is there any way to stream soundcloud track in android application. Feb 10 06:23:19 it really depends Feb 10 06:23:26 pfn: thats for a person new to android programming ? Feb 10 06:23:31 no, it's a joke Feb 10 06:23:41 oh :P Feb 10 06:24:28 2 Feb 10 06:24:36 jesopo: joke ? Feb 10 06:33:18 hey silly gooses! Feb 10 06:37:51 Hey all. I'm trying to follow a RecyclerView tutorial (with a LinearLayoutManager so it looks like a list view). There's a layout xml for describing the View for each item in the list. The parent ViewGroup in this file is set to LinearLayout with both layout_width and layout_height set to "match_parent". Afaict, an explicit height for the item view is never specified... but when I compile and run everything I get som Feb 10 06:37:51 e nice looking default height on my items anyway Feb 10 06:39:44 After looking around online a bit, I see a few examples where the parent ViewGroup in the item view's layout file uses "match_parent" for its dimensions. This is confusing... what is it matching its dimensions against? Feb 10 06:57:39 hey canurabus Feb 10 06:57:48 first of all, excellent question Feb 10 07:35:38 anyone here? Feb 10 07:35:49 need to ask 1 quick question Feb 10 07:36:01 just ask Feb 10 07:36:25 Have you tried to turn it off and on again ? Feb 10 07:37:14 :D Feb 10 07:37:18 alright, well im following this guide to add filtering in a recyclerview. http://stackoverflow.com/questions/29792187/add-a-search-filter-on-recyclerview-with-cards however, i get the error "cannot resolve symbol 'filteredList' and im doing exactly what the guide says to Feb 10 07:37:50 its weird, that shouldnt happen. Feb 10 07:39:06 the variable is final and private within the same class, not sure why it would throw that error Feb 10 07:39:55 remove private Feb 10 07:40:08 but wait Feb 10 07:40:10 the same class Feb 10 07:40:25 yeah this is confusing Feb 10 07:40:32 can you show the code ? Feb 10 07:40:51 sure tihng, its exactly like the one in Stackoverflow. ill upload it, 1 sec Feb 10 07:41:25 http://pastebin.com/w17pKbuB Feb 10 07:42:24 (im just a beginner at this by the way) Feb 10 07:42:53 but still, that shit shouldnt be happeneing Feb 10 07:43:52 you mean adapter.filteredList? Feb 10 07:44:02 adapter has only filteredEffectList Feb 10 07:44:20 yes adapter.filteredList Feb 10 07:45:04 hmm but the stackoverflow answer was accepted, that means it should work right? Feb 10 07:45:19 not always Feb 10 07:45:28 sometimes they are just shortcuts or pseudocodes Feb 10 07:45:54 huh ok. but filteredList is in the class UserFilter, so why wouldnt the method publishResults see it? Feb 10 07:47:15 but EffectAdapter doesnt have filteredList Feb 10 07:48:11 damn it. is there a quick fix to this, or should i just forget it? I tried adding filteredList to EffectAdapter but it said I have to initialize it first or something Feb 10 07:48:53 because its final Feb 10 07:49:09 but try just change adapter.filteredList to adapter.filteredEffectList Feb 10 07:49:29 also this gets more of general java question Feb 10 07:51:09 ah ok. that doesnt work either, theres a whole load of red errors after i do that. anyways, thanks for your help. this is a lost cause. (even though one user got it working: "apart from a small handling of backspace..this answer is amazing.. "– yUdoDis) Feb 10 07:51:48 Controless: no idea Feb 10 07:52:02 I would have to write it Feb 10 07:52:09 yeah no worries, I'll just find another guide Feb 10 07:53:52 this guide is good I think Feb 10 07:54:02 you just need to fix it Feb 10 07:56:58 i think so to, especially since people have confirmed that it has worked Feb 10 07:57:14 ill ask around in the javahelp subreddit and hope to get a response there Feb 10 08:33:15 I'm struggling a little bit with a little program I wrote that periodically polls a bunch of URLs and alerts me if they can't be reached. The issue is that despite my best efforts, I get spurious alarms which have to do with the fact that Android's ConnectivityManager flat out lies about if the network is actually in working condition. Feb 10 08:34:17 I had this program work fine in android 4.x era but I think the more aggressive power saving stuff in android 5 and above may be related. Is there some way I can absolutely demand that Android must establish a working network connection and also wait for it to establish it Feb 10 08:35:00 e.g. cyanogenmod recently released a version for the old galaxy s2 and this one appears to have wi-fi connectivity trouble as well, though it could just be bad drivers too, so no more about that. Feb 10 08:39:05 anyway I'm trying with a partial wake lock now for the duration of the polls, which take a long time because of many retries. I hope that's enough. Feb 10 08:40:39 my prior attempt used broadcastreceiver's goAsync() but it apparently has a 10 second time limit so it starts to complain about ANR during outage situations Feb 10 09:34:53 hello, x86 image emulator, haxm issue - http://s16.postimg.org/6j22gdnat/haxm_debug.png ... kindly help Feb 10 09:35:56 when i run "sc query intelhaxm" it says stopped, when i type sc start intelhaxm it says "The system cannot find the file specified" Feb 10 09:36:02 what could be the issue here ? Feb 10 09:36:11 i ran out of ideas to debug Feb 10 09:38:28 tamarind, did you install haxm? Feb 10 09:38:47 Zharf: installed via sdk and manually Feb 10 09:39:06 when i try to install manually again it asks whether you want to reinstall because it is already installed Feb 10 09:39:15 Zharf: but its not running Feb 10 09:44:14 hi. how do you check if the togglebutton is on or off? which method? Feb 10 09:45:02 Zharf: does your silence mean i have missed something obivous here ? Feb 10 09:45:39 tamarind, no, I'm not sure what to say Feb 10 09:46:06 did you reboot? is VT enabled? Feb 10 09:46:41 superlinux, are you sure you want to use togglebutton? switchcompat is much more modern. anyway, you can use isChecked (if I recall) Feb 10 09:47:06 Zharf: i did not reboot, Feb 10 09:47:59 superlinux, on the other hand you should use probably OnCheckedChangeListener Feb 10 09:48:25 Zharf: how to check if VT is enabled ? Feb 10 09:48:30 * tamarind googles intel vt enablement Feb 10 09:48:32 tamarind, it's a BIOS/UEFI thing Feb 10 09:49:04 Zharf: is this a good material to follow http://www.howtogeek.com/213795/how-to-enable-intel-vt-x-in-your-computers-bios-or-uefi-firmware/ ? Feb 10 09:49:53 Zharf: got it thank you Feb 10 10:17:11 from where can I start with Material Design ? Feb 10 10:17:23 from now Feb 10 10:17:43 want to learn all the fancy stuff that happens Feb 10 10:17:57 great !! but from where ? Feb 10 10:18:05 Hi there Feb 10 10:18:18 There is any good blog or tutorial ? Feb 10 10:18:21 Hi Feb 10 10:18:26 that might be a start https://design.google.com/resources/ Feb 10 10:18:39 http://developer.android.com/design/material/index.html probably Feb 10 10:18:46 Hmm Feb 10 10:18:51 i am looking to revert my marshmallow to lollipop Feb 10 10:18:56 can anyone guide me ? Feb 10 10:18:57 danijoo: last thing i had in my log was a question from you: "is there an easier way to enable/disable offline mode than the button burried deep in the settings menu?" Feb 10 10:19:04 i trried the online guides but really do not understand :/ Feb 10 10:19:07 i got stuck halfway Feb 10 10:19:26 Syzygy, was this a few days a go? Feb 10 10:19:31 i think i remember Feb 10 10:19:36 thursday Feb 10 10:19:36 is there? :P Feb 10 10:19:44 to the right of the AS window should be a gradle drawer, there you can quickly enable and disable it Feb 10 10:19:59 nice. thanks Feb 10 10:20:02 found it Feb 10 10:20:09 no problem Feb 10 10:20:10 K1-new: go to #android or #android-root Feb 10 10:20:23 thanks for that tip Feb 10 10:20:25 ok thanks Ashiren Feb 10 10:20:37 does it increase your build times danijoo? Feb 10 10:21:05 I havent checked yet. Feb 10 10:21:21 im building with jrebel so i would only notice it on clean builds Feb 10 10:21:29 kk Feb 10 10:21:30 suhas_sm: also you could try http://www.androidhive.info/page/2/ Feb 10 10:21:43 and just started a new project :P Feb 10 10:21:50 just = 10 minutes ago Feb 10 10:22:20 another league thing? :P Feb 10 10:22:25 no Feb 10 10:22:35 i already created the ultimative league thig ;) Feb 10 10:22:40 kk Feb 10 10:22:40 :p Feb 10 10:23:19 im messing arround with image encryption Feb 10 10:23:27 its more a just for fun project though Feb 10 10:29:37 Hello everyone, Does anyone have an idea on where i can get a key:value pair of English dictionary word:menaing Feb 10 10:33:57 you'll be better to find a dictionary API -- english is too complex to break down to word:meaning like that Feb 10 10:35:37 Anyone else unable to use the debugger with Samsung S5? Feb 10 10:35:55 or had this problem and fixed it.. Feb 10 10:36:10 that could be anything Feb 10 10:36:30 drivers, usb debugging disabled on phone Feb 10 10:36:38 works fine on my G5 Feb 10 10:36:41 G4 Feb 10 10:36:52 I'm pretty sure it's the S5 Feb 10 10:37:39 AS just doesn't stop on breakpoints Feb 10 10:38:01 so you have adb working normally Feb 10 10:38:25 yeah Feb 10 10:38:33 and you attached the debugger to the process Feb 10 10:40:51 I know how to use the debugger ;) Feb 10 10:43:23 seems to be a common problem on S5 after googling around, figured maybe someone else solved it. Someone wrote they fixed it by upgrading so I was hoping to get this confirmed Feb 10 10:46:16 since my S5 is borked and I need to go to the shop for upgrades Feb 10 10:46:40 Also interested if someone IS able to debug on the S5 Feb 10 10:49:58 hi! Feb 10 10:50:30 Thanks bankai_ Feb 10 10:52:39 Error:(23) Error: The id "textView2" is not defined anywhere. Did you mean textView ? [UnknownId] Feb 10 10:52:52 JitanRo: proguard disabled ? Feb 10 10:53:20 please guide. This is the first "Hello World!" by default app on Android Studio. i might have botched it. thanks Feb 10 10:53:28 gordon_ yup Feb 10 10:53:33 so no idea... Feb 10 10:53:47 smorgasbord, well done on botching hello world Feb 10 10:53:58 Zharf lol Feb 10 10:54:32 https://bpaste.net/show/242ec86165e8 the complete paste Feb 10 10:54:35 smorgasbord, where you happen to refer to textView2, it doesn't exist Feb 10 10:55:01 yep see, there's only one textview and it's called textView Feb 10 10:55:44 so what to do ? Feb 10 10:55:56 remove the reference to textView2 Feb 10 10:55:59 it's obviously not needed Feb 10 10:56:04 line 23, useless Feb 10 10:56:13 should i delete that line or comment it ? Feb 10 10:56:26 # would comment it ? Feb 10 10:56:28 delete, you can't really comment inside an xml element Feb 10 10:56:29 yes Feb 10 10:56:42 well you ca by Feb 10 10:57:19 not in that context Feb 10 10:57:39 you can comment the whole but not attributes in it Feb 10 10:58:08 deleting it for the time being. also would like to comment as well if possible. in future is shall help Feb 10 10:58:54 http://stackoverflow.com/questions/26461869/how-to-comment-attributes-inside-xml-tag you can't comment attributes Feb 10 10:58:58 blame xml Feb 10 10:58:58 :p Feb 10 11:02:10 thanks Zharf :) Feb 10 11:08:01 Hey, is there a way to get snackbars that don't violate the guidelines? Feb 10 11:08:28 The snackbars from the design lib show in front of the drawer, even if one stickies them to a background layout Feb 10 11:10:20 there is Feb 10 11:10:28 you gotta make your own Feb 10 11:10:42 or use a library Feb 10 11:11:16 justjanne, i think you have to chose the layout in the drawer as root, and not the drawerLayout Feb 10 11:12:47 justjanne, what if u close the drawer anytime the snackbar is to be shown Feb 10 11:13:48 i used genymotion emulator. nothing pops on the screen .. same code i pasted above ^ Feb 10 11:14:04 pops up on the genymotion window ( phone emulator ) Feb 10 11:14:37 Nnabueze that'd be annoying Feb 10 11:14:46 below gradle ( on right side ) i pressed preview now Feb 10 11:18:14 danijoo, I think your way might work Feb 10 11:21:14 https://gyazo.com/d72913b7cca6ca4c272d758eefc915f0 please guide Feb 10 11:21:51 firewall? Feb 10 11:22:02 no idea. Feb 10 11:22:18 device manager was also open. closed now. rerunning.. wait Feb 10 11:23:01 i should see something here .. nothing pops up https://gyazo.com/f64539dfdd8396eb3a63776e47d29482 Feb 10 11:42:49 Need some suggestions regarding api to allow users to customise views. Feb 10 11:44:10 I have a custom marker on my map. what would be the best strategy to allows a developer to customise this marker ? Feb 10 11:46:38 let them pass a drawable Feb 10 11:49:26 My marker has a text view and image, a developer should be allowed to replace this with any thing they want Feb 10 11:49:56 how do I user the ids of the layout being passed ? Feb 10 11:50:06 how do I use the ids of the layout being passed ? Feb 10 11:50:19 Can we get ids at the run time ? Feb 10 11:51:11 why ids? Feb 10 11:51:40 if I have to update lets say a text field in the passed view Feb 10 11:51:53 you'll have to know the id beforehand Feb 10 11:52:32 they're generated at compile time Feb 10 11:54:06 hmm thats correct Feb 10 11:54:30 Was wondering how far can take this customising thing Feb 10 12:01:57 in theory you can provide overridable method to create the marker layout and set it up in any way that is necessary, then tell users to override your class and use theirs with the right method Feb 10 12:02:17 that should be flexible at least Feb 10 12:02:52 hmm Feb 10 12:11:30 Too much of restrictions wrt to marker :'( has to be a bitmap only. Feb 10 12:13:35 hey morning Feb 10 12:13:50 any recommendation on what library i should use to connect to my web socket server? Feb 10 12:23:42 I tried okhttp-ws a few months ago but had some problems with it and didn't have enough time to look at it again Feb 10 12:24:02 I still need to find a solution for that at some point as well Feb 10 12:24:12 I didn't like any of the "larger" websocket libraries Feb 10 12:27:09 If someone knows: http://stackoverflow.com/questions/35315291/after-intercepting-a-touch-event-how-to-give-it-back-to-a-child Feb 10 12:34:51 Hey, I create a file within the app and I'd like to save it in the device's Downloads folder. Any pointers on how to do that? lets say permissions are not an issue Feb 10 12:35:59 aviran, what exactly is the problem with that? -.- Feb 10 12:36:36 Getting the location of the Download folder in runtime? Feb 10 12:36:51 http://developer.android.com/reference/android/os/Environment.html#getExternalStoragePublicDirectory(java.lang.String) Feb 10 12:37:40 oh, didnt know that's that... thanks Feb 10 12:46:11 So, I found out: after a user does about 60 fraudulent ad clicks per hour, for 3-4 hours a day, 5 days a week, for 6-7 weeks, AdMob stops displaying ads for that user. Feb 10 12:47:08 Source: I use Firefox' integrated linkbubble functionality (clicking a link loads it in background, unobtrusive) and the apps I use all have AdMob ads in the bottom, so almost every time I want to scroll I accidentally click one, Feb 10 12:47:26 Leading to quite a few accidental clicks. Feb 10 12:47:37 $-- Feb 10 12:47:39 Anyway, today AdMob began to just display empty ads, or no ads at all to me. Feb 10 12:47:49 cool Feb 10 12:47:55 I hope the creators of the apps don't get hurt Feb 10 12:48:09 though I don't see ads anyway because I write my own versions of the apps I use that might've had ads Feb 10 12:48:15 Also, I hope ad mob doesn't bill the advertisers for accidental clocks. Feb 10 12:48:16 if they don't have a pay version Feb 10 12:48:45 Yeah, I usually do that, too, but I'm too lazy to do that for a reddit reader, and with relay the ads just suddenly appear in the bottom. Feb 10 12:49:24 I've got like 97 tabs in Firefox open right now, all with the link from the audible ad that it tried to show me today. Feb 10 12:50:14 I seriously wonder if this hurts advertiser and/or app developer. This is something Google should just not count, because accidental clicks like these should be prevented by the ad framework. Feb 10 12:50:45 I thought they had added "click twice within of 5sec" to open, but somehow that only happened for a few days. Feb 10 12:56:01 I have no sympathy towards advertisers or people who receive their money Feb 10 12:56:32 ads are the scourge of the modern society Feb 10 13:02:03 yeah its really sad that people cant live from air and love solely.. Feb 10 13:04:19 freaking android. stop touching my music stream volume Feb 10 13:05:32 danijoo, people should get real jobs ;) Feb 10 13:05:48 like not being programmer? Feb 10 13:06:04 hithere Feb 10 13:07:21 danijoo, programmer is fine as long as you're doing something productive, not just platforms to ship more ads in, like most people seem to be doing Feb 10 13:07:42 Zharf what if I'm building platforms that build platforms to ship more ads in? Feb 10 13:07:46 Zharf, nobody pays for apps. In a lot of cases you need ads Feb 10 13:07:55 because people dont want to pay for content these days Feb 10 13:08:02 I pay for useful apps Feb 10 13:08:10 so you are everyone? Feb 10 13:08:23 obviously ;) Feb 10 13:08:36 If this would be true, this would be an adfree world Feb 10 13:08:37 but I will do everything in my power to kill ads Feb 10 13:08:46 spoiler: you will fail Feb 10 13:09:18 companies sell what people buy. and you can compare the ad and payed version of any app you want and see what makes more revenue Feb 10 13:09:20 casadogg, well, I don't have any ads on any of my devices Feb 10 13:09:23 it is always the ad-version Feb 10 13:09:27 thats why there are ads Feb 10 13:09:51 well good job Feb 10 13:10:11 I have simple selector rect. with rounded corners http://pastebin.com/PJzJF9QN, I am applying it to TextView as a background http://pastebin.com/tryZbTmF, I would like to change color (from code) of TextViews background and preserv round corners defined in selector. What I have in code is here http://pastebin.com/5M6gNug1 . Problem is that this changes not only color but removes corner settings as could be seen here http://snag.gy/mFj7K.jpg (first Feb 10 13:10:11 before applying setColorFilter(), second after) Feb 10 13:10:19 ads will be manifested in a new form if everyone ends up blocking ads Feb 10 13:10:31 besides there's nothing wrong with ads Feb 10 13:10:45 there's everything wrong with ads Feb 10 13:10:56 so you're against flappy bird Feb 10 13:10:59 that's what you're saying Feb 10 13:11:05 I don't want my life cluttered with useless shit I don't need Feb 10 13:11:05 or rather, people making money off flappy bird Feb 10 13:11:11 then don't buy Feb 10 13:11:11 yes Feb 10 13:11:15 ignore the ads Feb 10 13:11:17 simple Feb 10 13:11:29 Of course I am searching whether someone has same problem and yes, but I have not found any workaroudn for it - one of them is suggesting setColor() - problem is that thi is in API21 - my min is API15 Feb 10 13:11:32 only way to ignore the ads are to burn them Feb 10 13:11:47 dont use apps with ads if you dont want Feb 10 13:11:53 very simple Feb 10 13:12:02 I'm physically incapable of ignoring large flashing lights Feb 10 13:12:33 danijoo, sure, I write my own versions of apps I find useful but they don't offer adfree versions Feb 10 13:12:49 yeah thats fine Feb 10 13:12:52 gj Feb 10 13:13:05 dont forget to put them in the store :) Feb 10 13:13:06 then what are you bitching about Feb 10 13:13:42 casadogg, that ads are a thing that people must suffer Feb 10 13:13:53 s/must/want Feb 10 13:13:57 they're the scourge of the society, like I said Feb 10 13:13:59 QUestion is - how to change programmatically color of background shape - without affecting its shape settings for at least API15+? Feb 10 13:14:15 I find it hard to believe anyone actually wants ads Feb 10 13:14:21 communism is the scourge of society Feb 10 13:14:35 communist ads are the root of all evil Feb 10 13:15:10 if everyone whould have payed a price for the media they consume, the model of ads would have never been risen Feb 10 13:15:39 the fact that it has already shows that people prefer anooying ads over paying Feb 10 13:15:41 sad but true Feb 10 13:16:06 people pay for netflix Feb 10 13:16:23 people also pay for cars.. Feb 10 13:16:29 exactly Feb 10 13:16:36 my point being why are we discussing ads Feb 10 13:16:37 but people dont pay for blog articles Feb 10 13:16:39 they're not going away Feb 10 13:16:43 but they want blog articles Feb 10 13:16:48 why would you pay for blog articles Feb 10 13:16:55 and they want apps but dont pay for them Feb 10 13:17:03 i read it because they are free, if they weren't i wouldn't read them Feb 10 13:17:15 you don't understand Feb 10 13:17:17 they arent free. they cost your data Feb 10 13:17:33 yeh whatever I adblock the shit out of everything Feb 10 13:17:57 My point is that if blog articles weren't free, people wouldn't pay for them because they don't really want them Feb 10 13:18:01 they want to kill time Feb 10 13:18:03 yeah. its ok to be an asshole. a lot of people are Feb 10 13:18:12 and blog articles are a way for people to kill time Feb 10 13:18:21 instead of doing their jobs Feb 10 13:18:55 there are people whose job it is to blog Feb 10 13:19:13 ads are a way to offer something people don't need for "free" Feb 10 13:19:22 while earning money Feb 10 13:20:02 people write blogs for living? that's bullshit Feb 10 13:20:35 Some do, very few Feb 10 13:20:36 Zharf, there are blogs that are written for living, yes Feb 10 13:20:49 for example https://netzpolitik.org/ Feb 10 13:20:53 (german link) Feb 10 13:22:16 for example Feb 10 13:22:18 those people need real jobs Feb 10 13:22:25 do you think sites like 9gag would exist without ads? Feb 10 13:22:28 who cares about advertisement philosophy roots on androide-dev channel, discuss this flame ware somewhere else Feb 10 13:22:30 who the hell would pay to look at memes Feb 10 13:22:32 lol Feb 10 13:22:42 I would rather they didn't exist at all Feb 10 13:23:33 bolovanos, anyone who brings up implementing ads or revenue from them in here Feb 10 13:23:37 :p Feb 10 13:24:14 or even facebook Feb 10 13:24:40 I'm starting to agree with you, all the useless stuff exist due to ads Feb 10 13:24:45 * danijoo lives from ads right now. #burnMe :p Feb 10 13:25:28 danijoo free apps? Feb 10 13:25:48 how many? Feb 10 13:25:56 free or adfree. Feb 10 13:26:07 adfree earns close to nothing, adversion a living Feb 10 13:26:33 as long as developers also offer paid adfree versions, I might support them Feb 10 13:26:50 sleep as android did it the best, two weeks noads trial Feb 10 13:27:41 plus noads paid version of course Feb 10 13:28:20 too bad you are not everyone ;) everyone else prefer the adbanner over one time $0.9 Feb 10 13:29:27 I'd happily live off ads Feb 10 13:30:04 casadogg, what a double moral Feb 10 13:31:35 hahaha Feb 10 13:31:43 Just because I use adblock? Feb 10 13:33:12 If it means something, I'm selective Feb 10 13:33:16 I block only some stuff Feb 10 13:33:49 just block everything except the nonintrusive ads Feb 10 13:33:52 I only steal from some people ;) Feb 10 13:34:04 danijoo thats extreme Feb 10 13:35:45 if someone sends me a link to some annoying youtuber I'll turn on adblock Feb 10 13:35:52 watch 15 seconds of the ridiculousness Feb 10 13:35:54 then turn it off Feb 10 13:35:58 thats how I use it Feb 10 13:36:20 and why is this better than someone who adblocks everything? Feb 10 13:36:51 Well, people who do useful stuff gets their revenue Feb 10 13:36:58 I adblock everything, but pay for services I like and they make it possible to pay for them Feb 10 13:38:00 like trakt.tv Feb 10 13:38:18 idk Feb 10 13:38:30 i pay for everything Feb 10 13:38:32 music, movies Feb 10 13:38:59 I know I'm not entitled to anything because of this Feb 10 13:39:04 I mean, its the expected Feb 10 13:39:07 to pay for stuff Feb 10 13:39:39 But when I see people doing stupid shit and earning money for it, without being entertaining, just plain annoying, I will block their ads Feb 10 13:39:40 fuck me Feb 10 13:40:16 casadogg, which is the majority of android developers Feb 10 13:40:26 if its stupid shit, why do you consume it? Feb 10 13:41:10 danijoo It's the internet, I click links. Feb 10 13:54:30 damm facebook and their hate towards devs Feb 10 13:55:29 what's bothering you Feb 10 14:00:35 do they hate devs as much, or more than Twitter? Feb 10 14:04:44 Hey, do you guys mind if I ask a question? Feb 10 14:07:06 AntigravityHat, ask, don't ask to ask - as long as it's android application development related ;) Feb 10 14:07:29 alright, the subreddit hasn't really helped me much on the issue of how to use websockets Feb 10 14:07:40 and I was wondering what to use Feb 10 14:07:59 gah, websocket problem again... I'm looking for a solution for that myself Feb 10 14:08:16 http://stackoverflow.com/questions/30547517/which-websocket-library-to-use-in-android-app Feb 10 14:08:38 damm. i cannot run apps on mobile by default after installing genymotion. even genymotion does not run Feb 10 14:08:40 to me none of them really seemed very good Feb 10 14:08:46 the site I'm hooking into has the option to do http requests but it's terrible inefficient to do so Feb 10 14:11:04 I wonder why there is so little websocket support for android Feb 10 14:11:55 What about okhttp? Feb 10 14:12:46 I tried okhttp-ws a few months ago, it seemed promising but I couldn't get it working with my server (yet), I'm still going to give it a try as I didn't have enough time to test it properly Feb 10 14:13:04 it's still experimental though Feb 10 14:13:18 as long as it works I don't have a problem with that Feb 10 14:13:27 I've seen some pretty stable experimental builds Feb 10 14:13:46 wonder if I have enough battery on my laptop to try it out right now Feb 10 14:14:01 it works Feb 10 14:15:06 I don't doubt that, but not sure what my problems were since I didn't have time to look at it properly :p Feb 10 14:16:58 it passes all the AutoBahn tests now Feb 10 14:17:16 127.0.0.1:60114 error. Feb 10 14:17:18 hi friends, is there a working marshmallow 6 example of android socket io client? Feb 10 14:18:05 anything i try, gets into the choreographer dropping frames warning.. Feb 10 14:18:23 guess, the threading is not taken care of correctly Feb 10 14:18:28 anyone? Feb 10 14:18:51 127.0.0.1:60114 java.net.socketexception Feb 10 14:19:24 2.6.0-snapshot was the last version I tried Feb 10 14:20:13 any Iranian Android programmer here ??? Feb 10 14:20:31 :o Feb 10 14:25:13 could someone tell how to run app on my phyical device ? Feb 10 14:26:37 :o Feb 10 14:26:57 turn on developer options, usb debugging, plug in usb, run the app and voila Feb 10 14:27:16 in the meantime youll probably have to deal also with some usb android drivers Feb 10 14:30:48 now 61377 error after i removed my device as well as genymotion emulator Feb 10 14:31:04 trying Feb 10 14:31:46 Ashiren nothing happened. Feb 10 14:33:06 plugged in > connected the device > developer options, debugging, usb debuggin > ran the app. all build etc successful nothing pops on screen error no. 61377 java.net.socketexception error Feb 10 14:37:16 See if you find the app in among your apps on your phone. Feb 10 14:41:29 barq it was the dropdown list just before app, had to set it back to APP Feb 10 14:42:00 dont know what i did that made it that way.. :( yesterday ported/exported the app to mobile. it must be that, Feb 10 14:42:10 now trying again on genymotion. wish me luck Feb 10 14:43:19 surprisingly I haven't needed genymotion while using amd, the emulator seems to run fairly well aside from boot times Feb 10 14:44:20 wow!! AntigravityHat the genymotion is rocket fast. Feb 10 14:44:53 AntigravityHat in two seconds i see the output. flat 2 seconds. Feb 10 14:45:01 AntigravityHat : if you have Amd Cpu , you can use Debian distro for android programming Feb 10 14:45:03 no wai Feb 10 14:45:21 There's a specific distro for android dev? Feb 10 14:45:38 i should learn some java now. thanks again all. Feb 10 14:46:02 Zharf: hey, i'm trying to implement the fragments instead of views for the PagerAdapter as you suggested Feb 10 14:46:15 AntigravityHat : i have teste most distro but they all were slow except Debian distro Feb 10 14:46:17 mmc, I would dual boot this machine but I'm pretty sure win 10 doesn't like it Feb 10 14:47:10 Zharf: now i'm wondering, on instantiateItem method from the PagerAdapter, I should be returning a Fragment instead of View right? Feb 10 14:48:01 AntigravityHat : i have used win 10 and win 8.1 and win 7 but they can not be like Debian to work with Android-studio and android Virtual device Feb 10 14:48:23 I have a laptop in storage Feb 10 14:48:26 Hi all - beginner question regarding styling. Suppose define a style and inherit from a system theme, e.g: 'Theme.AppCompat.Light.DarkActionBar' - is there some resource that lists all the properties that I may override? Feb 10 14:48:43 maybe I can change the distro once I get to it this weekend Feb 10 14:49:05 AntigravityHat : also An Amd cpu can not run Android Virtual Device Feb 10 14:49:20 yes it can, you just have to configure it right Feb 10 14:49:50 I'm using Android 6.0 armeabi-v7a Feb 10 14:50:00 it's the x86 version that doesn't work Feb 10 14:50:05 AntigravityHat : i have an amd cpu A8 on my php laptop with 8 gig ram but it can not run Android VD Feb 10 14:50:31 Twirl, you extend FragmentPagerAdapter and implement getView(int) which returns a fragment Feb 10 14:50:56 this is a desktop and a decent processor Feb 10 14:50:59 Twirl, like https://guides.codepath.com/android/ViewPager-with-FragmentPagerAdapter Feb 10 14:51:02 AntigravityHat : i am using Genymotion Feb 10 14:51:17 if it works for you then why not Feb 10 14:51:48 Twirl, sorry, getItem, not getView Feb 10 14:51:58 Zharf: yea i did that already Feb 10 14:52:33 Now i'm trying to pass the Fragment to the List of Fragments as i did with the view to be able to update them Feb 10 14:52:47 AntigravityHat : if you are a c , c++ programmer , we can make an android virtual faster than Genymotion Feb 10 14:52:55 I did that on InstantiateItem but now i don't know how to get the Fragment from there Feb 10 14:53:12 mmc, sorry I've only just moved to learn java after Python Feb 10 14:53:24 I once did a tiny bit in c++ but nothing substantial Feb 10 14:53:41 Zharf: maybe with FragmentManager? But it takes Bundle and idk how to get it Feb 10 14:54:38 AntigravityHat : oh Python + C# is good to work on a big project Feb 10 14:54:43 Zharf: well, in the example you gave me they don't use the InstantiateItem at all Feb 10 14:54:56 they only use it on the example that looks like mine Feb 10 14:55:13 mmc, and do you know any c#? Feb 10 14:55:33 AntigravityHat : yes Feb 10 14:55:57 AntigravityHat : C , C++ , Java , C# , ..... Feb 10 14:56:03 Twirl, yeah, the SO answer http://stackoverflow.com/a/15261142/857853 shows you how to do it Feb 10 14:56:36 Anyone here know a significant amount about the Android Studio installer itself? I need to script the install process on Windows computers and am not sure where to find any potential command line options for installation. Feb 10 14:58:53 what are the newest Subjects in Android programming nowaday ? Feb 10 15:00:35 material views and why they dont work like they should :v Feb 10 15:02:17 mmc Even if I were to agree to do a project like that I have little knowledge on what to actually do Feb 10 15:02:27 emulation seems like it's very difficult Feb 10 15:04:18 Hello buddies, is it possible to stream video from Vimeo with a standard VideoView for users who doesn't have an account on Vimeo? Feb 10 15:04:32 Zharf did you find a way to make it work? or haven't tried anything yet? Feb 10 15:06:14 AntigravityHat, didn't have enough time yet -.- ... had a sauna... I'll do more tests in an hour Feb 10 15:06:28 nice Feb 10 15:06:50 the wiki doesn't have much on it surprisingly Feb 10 15:14:39 Number5: yes, it is. Feb 10 15:15:27 I have written a small library, Number5, to get the raw stream for YouTube, Google Drive Video, Vimeo and DailyMotion: Feb 10 15:15:35 https://github.com/justjanne/VideoExtract Feb 10 15:15:52 you can then just set the source on the videoview to the url that you get Feb 10 15:16:00 the URL you get is usually valid for one IP for 1 hour Feb 10 15:16:37 Zharf: how do I get the view to update on updateFragment? Feb 10 15:17:06 Number5: tell me if it works for you, or if not Feb 10 15:17:22 Zharf: nvm Feb 10 15:17:37 oh, right Feb 10 15:17:45 that won’t work on Android directly Feb 10 15:18:06 justjanne, tnx, so is it working for Android or not? Feb 10 15:18:14 well, I’ll have to check Feb 10 15:18:24 I’ll tell you in 2min, might need to push my latest local commit Feb 10 15:18:56 any Persian Android Programmer here ????????????? Feb 10 15:19:08 Twirl, you tell the relevant fragment about the new data and let it handle the list Feb 10 15:19:26 btw, mmc, I have now the whole android dev site as .zip, should I upload it for you? Feb 10 15:19:52 justjanne, do you mean me or mmc? Feb 10 15:19:59 to whom are you talking to? Feb 10 15:20:16 Number5: I’m checking right now for you if that stuff works, Feb 10 15:20:23 for mmc I’m asking if I should upload Feb 10 15:20:29 Zharf: yea it's giving me NPE Feb 10 15:21:04 justjanne : for what ? Feb 10 15:23:08 Twirl, because viewpager only instantiates a few items at a time... you need to keep the data cached somehow until it's needed Feb 10 15:23:45 viewpager instantiates 3 items max at a time but you can disable this and let it have all viwes instantiate at all times Feb 10 15:23:47 still the viewpager problem ? :/ Feb 10 15:24:21 Twirl, what's your problem? Feb 10 15:24:50 Number5: well, you can reuse 90% of the code Feb 10 15:25:07 the issue is that you need to send a desktop UA to get the desktop page to extract the video streams Feb 10 15:25:09 Zharf: the exception comes when trying to setAdapter to the recyclerview, but nothing looks Null in the debugger Feb 10 15:25:19 which the current version doesn’t do, and I have no time to fix that atm Feb 10 15:25:26 hi, I am out of idea how to fix this NoClassDefFoundError, Feb 10 15:25:26 the items are there, the adapter is initialized Feb 10 15:25:40 recyclerview is null? Feb 10 15:25:47 ViewPager is a real pain in the ... if you're new, and when change orientation ooooh hahahaha, than you can kill yourself I'v been through that hell. Feb 10 15:26:02 Zharf: nope, everything looks good i guess Feb 10 15:26:34 if everything's good then there's no NPE Feb 10 15:26:43 sorry, Number5 Feb 10 15:26:56 http://www.pasteall.org/pic/99028 Feb 10 15:26:58 the version that worked on Android is just lost atm Feb 10 15:27:06 it’s a one line-change, though Feb 10 15:27:06 justjanne, no problem Feb 10 15:27:10 in the Utils.class, Feb 10 15:27:26 just change the part that loads the text from the URL in getPageFromURL Feb 10 15:27:37 Zharf: do i have to initialize the RecyclerView in my Fragment Class Feb 10 15:27:37 and instead use something where you can send a custom UA Feb 10 15:28:13 Twirl why don't you paste your code for us Feb 10 15:28:48 Twirl, adapter is attached to a view, if the view is gone, than you have to create a new adapter Feb 10 15:29:43 Zharf: i have a fragment with the SlidingTabLayout and the ViewPager, then in a different layout the RecyclerView and in a different one the rows for it Feb 10 15:30:06 So if ViewPager removed the fragment with ListView and adapter in it, you have to create a new adapter. If you don't the adapter is leaking memory because the GC can't clean the old fragment. Feb 10 15:31:22 Twirl, could you show your code again.. I can take a closer look in about 15min Feb 10 15:31:24 http://pastebin.com/raw/pb7mg8H7 Feb 10 15:31:47 it's throwing the exception where it says recycler_view_1.setAdapter(adapter); Feb 10 15:32:14 Twirl, good luck body. Feb 10 15:33:22 Twirl, again, don't modify fragment contents from outside, tell the fragment to do the update Feb 10 15:34:30 Zharf: so i put the updateFragment method in the MyFragment class ? Feb 10 15:36:13 or in getItem i pass the values to the constructor or something? Feb 10 15:40:18 Twirl, forward the data to MyFragment in updateFragment Feb 10 15:41:48 basically in your updateFragment do MyFragment f = (MyFragment) registeredFragments.get(position); if (f != null) { f.update(items); } Feb 10 15:42:55 and that update is a method i need to create in myFragment? Feb 10 15:43:03 but because f can be null, you'll need to make some sort of cache in between that MyFragment can query in onResume Feb 10 15:43:10 yes Feb 10 15:45:45 or you put it in save instance statce when the fragment goes down (if its not big - i didnt follow the context) Feb 10 15:46:39 danijoo, he's loading data in asynctask and giving it to fragments... viewpager might not have the fragment instantiated that wants the data though Feb 10 15:47:09 use buses ^^' Feb 10 15:47:31 indeed Feb 10 15:47:54 but you still want the cache Feb 10 15:48:02 by the way do you really need to fill the viewpager with fragments? Feb 10 15:48:06 You could simply use views Feb 10 15:48:24 casadogg, no, but fragments provide better encapsulation Feb 10 15:48:29 and lifecycle management Feb 10 15:48:29 ^ this Feb 10 15:48:47 you can keep your logic independent of the other stuff Feb 10 15:49:01 just create a class that extends some root component Feb 10 15:49:20 alright, i think i know what's going on, still giving me the recyclerview is null, it's probably grabbing the wrong view/layout and it cant find the recycler view there Feb 10 15:49:58 Twirl, you should be using the view you inflate in MyFragment's onCreateView Feb 10 15:50:18 no, they don't Feb 10 15:50:20 Zharf: so i put the recyclerview in that layout? Feb 10 15:50:26 yes Feb 10 15:50:38 Zharf: there i have the SlidingTabLayout and the ViewPager Feb 10 15:50:38 avoid using fragments in viewpager unless you need some fragment feature Feb 10 15:50:49 like interacting with the appbar menu Feb 10 15:51:06 you get no better encapsulation from using fragments Feb 10 15:51:50 you do, but your usecases might not need it Feb 10 15:52:16 isn't instantiating/destroying a view better than doing the same with a fragment though? Feb 10 15:52:46 i think it's less intensive Feb 10 15:53:08 I've used viewpager with views in one case, swiping through single images Feb 10 15:53:27 yeh same Feb 10 15:53:31 idk how complex his pages are Feb 10 15:54:00 i know for sure that I'd never use fragments for a simple viewpager with image/text, or even with a list Feb 10 15:54:12 like the ones in netflix Feb 10 15:54:14 app Feb 10 15:54:30 Zharf: moving the recycler view removed the NPE but now it's not showing anything on the view Feb 10 15:55:29 Twirl, you're just making me guess here with omitting the code from the discussions :E Feb 10 15:55:45 its a bunch of files Feb 10 15:56:13 that's Twirl's MO, omit as much information as possible Feb 10 15:56:54 Zharf, you can use any arbitrary object as a container in a viewpager Feb 10 15:56:56 I have a layout with the recycler view inside a linearlayout, then the mold for it (item row) in another layout and the fragment layout that has the SlidingTabsLayout element and the ViewPager element, this was working with the view Feb 10 15:57:30 Zharf, thus, you can obtain similar encapsulation with 0 fragment shenanigans Feb 10 15:57:49 and there's lots of. shenanigans in fragment viewpager Feb 10 15:58:12 dynamic and reordering fragments is not supported Feb 10 15:58:20 among other problems Feb 10 15:59:08 pfn, sure, but I would rather rewrite viewpager Feb 10 15:59:17 I wouldn't Feb 10 16:00:07 fragments are messy by nature, idk why not just use simple views Feb 10 16:00:12 if you want to encapsulate stuff, simply extend a view Feb 10 16:00:15 put code there Feb 10 16:00:43 Zharf: maybe i can try putting the recyclerview inside the ViewPager Feb 10 16:01:50 casadogg, ew :p Feb 10 16:02:10 Zharf what's the problem with that =/ Feb 10 16:02:21 like I said, I have no idea how complex his stuff is Feb 10 16:02:50 depending on the complexity fragments are overkill Feb 10 16:03:27 is there any way for the humble android dev such as myself to switch the device chooser dialog in android studio back to after the build finishes? Feb 10 16:03:31 he's essentially doing a tabbed UI, would you do that with just views? Feb 10 16:05:05 possibly, depends Feb 10 16:05:07 Depends on how complex Feb 10 16:05:09 his ui is Feb 10 16:05:14 if I don't need fragment features Feb 10 16:05:16 if it's just a bunch of lists, hell yeh Feb 10 16:05:23 not a matter of complexity Feb 10 16:05:51 if I don't need back stack and don't need actionbar integration Feb 10 16:06:05 idk, depends if he wants to do animations, how deep his screen structure is Feb 10 16:06:27 and since we're on toolbar these days, actionbar integration is practically nil Feb 10 16:07:12 I suppose fragment transposition as well Feb 10 16:07:26 you're just a crazy person :P Feb 10 16:08:03 =/ Feb 10 16:08:05 looks like it's not getting to onBindViewHolder Feb 10 16:08:36 from the RecyclerView.Adapter Feb 10 16:09:05 then the problem might be the onCreateViewHolder method Feb 10 16:09:15 that was working fine Feb 10 16:09:21 or getItemViewType, if you override this Feb 10 16:09:31 getItemCount() == 0 ? Feb 10 16:09:36 that too Feb 10 16:09:55 nope Feb 10 16:10:08 any other overwritten methods that get called before oncreateviewholder? Feb 10 16:10:10 this was working so it has to be something silly i guess Feb 10 16:10:23 are the views all invisible or with alpha 0? Feb 10 16:11:00 i don't think so, this was working just a couple of mins ago before switching to fragments Feb 10 16:11:39 Twirl, what about showing your code? Feb 10 16:11:51 that would stop the guessing.. Feb 10 16:12:36 did you override isViewFromObject? Feb 10 16:13:15 oh nvm, we are talking about recyclerviews Feb 10 16:13:22 that's unnecessary for fragment Feb 10 16:13:41 unless you're rewriting fragment pager adapter Feb 10 16:13:42 Zharf: View v = getView(); in updateFragment in MyFragment? Feb 10 16:14:22 post the damn code.. Feb 10 16:14:50 yea, I really dont know what we are talking about anymore. if you are moving from fragments to views in a pager adapter you need to override isViewFromObject and manually add/remove the the view from the pager Feb 10 16:14:57 Twirl is just playing Jeopardy with you guys Feb 10 16:15:00 which brings me to my next topic Feb 10 16:15:12 Zharf: http://pastebin.com/raw/66VihUq1 Feb 10 16:15:14 how do I remove the device chooser dialog in android studio from before the build to after the buld? Feb 10 16:15:30 Zharf: i put that on the fragment class Feb 10 16:15:59 you need to set the layout manager before the adapter Feb 10 16:16:13 this is not your error though Feb 10 16:16:15 Zharf: and i'm calling it from the f.updateFragment(items); as you suggested Feb 10 16:17:11 dont use underscores for variable names, a puppy dies everytime you do so, you killed a total of 2 puppies Feb 10 16:17:14 * Zharf sighs Feb 10 16:17:48 jvrodrigues: i only use it for layout and layout elements Feb 10 16:18:31 Zharf: is it getting the right view when i View v = getView(); ? Feb 10 16:18:33 layout elements should follow the usual field/variable guidelines and be in camel case Feb 10 16:19:26 jvrodrigues: it makes sense to make all of the layout logic lowercase underscore since its the only allowed format for layouts Feb 10 16:20:00 its fine if you want puppies to die, maybe :/ Feb 10 16:20:28 why did you switch to fragments Feb 10 16:21:23 casadogg: because i need to and Zharf suggested it, also it's good to learn how to use it because i will need to sooner or later Feb 10 16:21:39 why do you need to Feb 10 16:21:43 you can learn later Feb 10 16:22:18 i'm going to need to be able to perform pretty complex stuff on the elements, animations, dynamic deletion, updating etc Feb 10 16:22:32 danijoo reading these reddit comments about instant run .. not encouraging Feb 10 16:22:46 and i can't afford to be able to have to do everything again in a few days Feb 10 16:23:04 g00s, link? Feb 10 16:23:24 danijoo top story https://www.reddit.com/r/androiddev/ Feb 10 16:25:22 i hate reddit Feb 10 16:25:27 i only go there to waste time Feb 10 16:25:51 Twirl, http://memesvault.com/wp-content/uploads/Spongebob-Meme-Nobody-Cares-02.jpg Feb 10 16:26:09 lol Feb 10 16:26:24 in the spirit of reddit :p Feb 10 16:26:26 so am I right in assuming that there is no option to change the build flow? Feb 10 16:26:29 nice_try_friend.tiff Feb 10 16:26:43 g00s, hm.. looks bad yeah Feb 10 16:27:12 squeaky wheel Feb 10 16:27:26 they should just buy the source of someone who already did it and put it into AS ^^ Feb 10 16:27:51 is there a lifecycle method or something thats called when your app regains focus? Feb 10 16:27:56 onResume Feb 10 16:28:16 at the application level maybe? Feb 10 16:28:28 Application.LifecycleListener Feb 10 16:29:03 RustyShackleford, for application level you need to count total onResumes/onPausess Feb 10 16:29:08 with the method from pfn Feb 10 16:29:32 ActivityLifecycleCallbacks is the name of the interface i believe Feb 10 16:29:52 but it feels to me that if you need it you are doing something wrong :/ Feb 10 16:30:13 well here's what I'm trying to accomplish. The user launches the app, logs in, and then leaves for a different app Feb 10 16:30:31 go on Feb 10 16:30:42 the end Feb 10 16:30:43 after 10 mins, the session times out. I want to handle this gracefully Feb 10 16:31:03 well, i fixed it Feb 10 16:31:08 Zharf: i fixed it Feb 10 16:31:16 right now, there is a call to startActivity which causes the app to steal focus Feb 10 16:31:48 er, that call is made when the session times out. I'm trying to figure out how to defer this call to startActivity Feb 10 16:31:54 Have a base activity as the super class of all your activities, keep track of the moment the user leaves for another app, save it in instance state, onResume check if its been 10 minutes Feb 10 16:31:58 onResume() { if(timedOut) startLoginActivityAndClearBackstack(); } Feb 10 16:32:14 ^ Feb 10 16:32:18 NOW Feb 10 16:32:30 how do I move the device chooser to AFTER the gradle build? Feb 10 16:32:35 pls Feb 10 16:32:46 Zharf, problem was probably that i had an @override public boolean isViewFromObject(View view, Object o) {return o == view; } on the PagerAdapter Feb 10 16:33:04 jvrodrigues, you are using AS 2.0? Feb 10 16:33:18 danijoo: hm okay that works. I'll see if I can fit it into what we already have Feb 10 16:33:26 Twirl: -_- I mentioned that specific method. danijoo 1.5 Feb 10 16:33:27 but i also removed the parameters from the fragment.newInstance(params..) Feb 10 16:33:39 jvrodrigues, i think you cant. Feb 10 16:33:39 I overrode onResult() in the base class. Feb 10 16:33:56 jvrodrigues: where? Feb 10 16:34:05 jvrodrigues, iirc this is to skip resources Feb 10 16:34:18 and make builds faster Feb 10 16:34:26 onResult { if(! this instanceof LoginActvity) {setResult(USER_LOGGED_OUT); finish();} Feb 10 16:34:43 }. Woops forgot the closing bracket Feb 10 16:35:25 they dont feel taht faster to me, also I used the build time for useful stuff, like connecting the device or wtv, now I cant do that anymore. And this simple fact is driving me crazy Feb 10 16:35:37 start each activity with a startActivity for result call. On logout, onResult() chains nicely back to loginActivity Feb 10 16:35:47 jvrodrigues, first world problems :p Feb 10 16:36:11 cant watch tv while compiling xD Feb 10 16:36:25 that sounds terrible Feb 10 16:36:31 compiler breaks are needed Feb 10 16:37:06 its very very bad i think Feb 10 16:37:25 like a water drop dripping on the sink, its fine for a while Feb 10 16:37:28 then it drives you crazy Feb 10 16:37:39 and i guess today it hit the last drop Feb 10 16:38:12 and i broke. Possibly also because I have to deliver 3 apps by mid next month and time is fleeting Feb 10 16:38:46 that sounds like a really small window Feb 10 16:39:01 Depends on when he started :p Feb 10 16:39:09 true Feb 10 16:39:36 thats sounds like its good for you theres no time for TV between compilation :P Feb 10 16:39:42 danijoo: any comment on my proposed solution? Feb 10 16:40:09 RustyShackleford, finish() wont clear the backstack and the activity below will show you still logged in Feb 10 16:41:31 unless you still have this weird design where every activity is started for result of course :p Feb 10 16:42:09 yeah thats the idea. Poor design then? Feb 10 16:42:21 yes. the whole thing is poor design then Feb 10 16:42:26 AntigravityHat, seems like okhttp-ws works for me Feb 10 16:42:29 but I already told you that weeks ago Feb 10 16:42:50 Zharf I haven't looked too much into it, but that's good to know Feb 10 16:43:02 yeah I brought this before. I dunno, I sorta disagree with you. Then again, I'm asking for help Feb 10 16:43:17 why would you start all activities for result? Feb 10 16:43:28 jvrodrigues, dont ask! Feb 10 16:43:44 Login -> A -> B -> Login, then kill everything behind the 2nd login in the stack? Feb 10 16:44:09 everyone will tell you this is bad Feb 10 16:44:23 w-why? Feb 10 16:44:25 working your way backwards in the stack seems... right. I dunno Feb 10 16:44:44 no. clearing the stack with the intent flags that are there for doing that is right\ Feb 10 16:45:01 generally speaking keeping the login activity on the stack after a successful login is a very bad design Feb 10 16:45:04 from a ux prespective Feb 10 16:45:07 me thinks Feb 10 16:45:21 you want Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK Feb 10 16:45:52 hmm, I tried to use the WebSocketCall in Android Studios but it doesn't recognize it Feb 10 16:45:53 but before we delve into the technicalities of clearing the stack Feb 10 16:45:55 and then start the new activity. super smple Feb 10 16:46:02 im curious in knowing why do you start activity A for result Feb 10 16:46:04 I mean Feb 10 16:46:16 does the login activity need anything? Feb 10 16:46:19 jvrodrigues: that was my proposed solution Feb 10 16:46:52 yeah it needs to recieve an intent on logout. Feb 10 16:47:08 why? Feb 10 16:47:10 b-but why? Feb 10 16:47:29 also you can start that same activity and add extras to the intent with whatever you want it to receive Feb 10 16:47:31 analytics libraries and to show the user a Toast message Feb 10 16:47:51 you can put that info in the start intent before clearing the backstack by intent flags Feb 10 16:47:59 ^ Feb 10 16:49:15 I want to pass to Picasso different dimension sizes based on density but dimens.xml takes dp values and not just numbers Feb 10 16:50:05 csst0111: you can define the same dimension value in different densities Feb 10 16:50:10 csst0111, Resources.getDimensionPixelSize(R.dimen.your_dimension) Feb 10 16:50:39 that will cast your dp dimension defined in xml to pixels Feb 10 16:50:56 Anyone know where the write up on having a GCM config file per build type is? I can't seem to find it now Feb 10 16:51:21 oh great danijoo , good catch! Feb 10 16:51:49 but I think picasso can also use the ID Feb 10 16:51:55 and do it on his own Feb 10 16:53:59 Zharf, what did you call to get Okhttp-ws to work? I see things saying to use WebSocketCall but Android Studios doesn't recognize it Feb 10 16:54:36 ugh i've been banging my head on this same issue for too long... Feb 10 16:54:47 AntigravityHat, did you add the dependency? Feb 10 16:55:10 yeah, okhttp and okio Feb 10 16:55:33 RustyShackleford, why is this difficult? use a service to represent user session, exit service when session ends, check for service alive state from activity onResume, send ping to service on resume Feb 10 16:56:21 if service isn't alive, show login, send analytics events on service exit Feb 10 16:58:30 can anyone explain to me why it seems impossible to overlay a linearlayout on top of a scrollview and have it stay at the bottom of the screen regardless of the length of the scrollview? I assumed a relativelayout would acheive this but it doesn't Feb 10 16:58:38 AntigravityHat, okhttp-ws too Feb 10 16:59:10 compile 'com.squareup.okhttp:okhttp-ws:3.0.0-SNAPSHOT' Feb 10 16:59:11 Apocx, it does work Feb 10 16:59:24 also in repositories maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } Feb 10 16:59:41 not in my case, the layout is always off screen and I have to scroll the scrollview down to see it Feb 10 17:01:14 I want to make a secure note taking app using SQLCipher. Should I be using keystore api or something to store that initial key? Feb 10 17:01:16 Apocx, show your layout file and mock of what you want please Feb 10 17:01:22 pfn: that seems like a good solution. Feb 10 17:01:29 yeah was working on it Feb 10 17:01:32 http://pastebin.com/4VzEhwyq Feb 10 17:01:33 why is it difficult? Cause I suck at programming, apparantly Feb 10 17:02:52 http://i.imgur.com/jmp1sJ2.png Feb 10 17:03:09 I want the bottom bar to always be at the bottom of the screen, regardless of how big the content in the scrollview is Feb 10 17:03:21 (the blue area) Feb 10 17:03:27 Apocx, ScrollView shall never overlay the linearlayout I guess? Feb 10 17:03:34 Apocx, relativelayout height = match_parent Feb 10 17:03:47 Replace the RelativeLayout with a LinearLayout and give the bottom view a fixed size Feb 10 17:03:56 join #laravel Feb 10 17:04:02 and top view 0dp + weight=1 Feb 10 17:04:30 this way top will always comsume the remaining space Feb 10 17:04:37 whle not overlaying bottom Feb 10 17:05:37 match_parent didn't change anything, so let me try using a linearlayout instead of relative Feb 10 17:05:59 Is there a way to run a different activity or show a different layout depending on whether or not an user is using the app for the first time or not? Feb 10 17:06:09 yes Feb 10 17:06:10 guessing I'd use onStart / onResume for it? Feb 10 17:06:17 markyosullivan: sharedpreferences Feb 10 17:06:21 Really? Feb 10 17:06:25 How so? Feb 10 17:06:29 i dunno, just a suggestion Feb 10 17:06:31 set a preference on first run Feb 10 17:06:34 check preference Feb 10 17:06:38 show desired content Feb 10 17:07:09 Ah, so when they run it the second time, it'll have a different preference so it'll never show the same activity after the first time? :) Feb 10 17:07:18 you got it Feb 10 17:07:19 Fantastic, great suggestion! Feb 10 17:07:52 morning Feb 10 17:08:00 afternoon :P Feb 10 17:08:07 Apocx, http://pastebin.com/Z8Hp0vzK Feb 10 17:08:36 err.. this one: http://pastebin.com/G29V3jCX Feb 10 17:08:38 Do people have multiple login layouts? E.g. 1 for first time opening the app, and then another separate one for a login section of the app? Feb 10 17:08:46 (typically) Feb 10 17:08:53 use OkHttp 3.1.2, not 3.0.0-SNAPSHOT please Feb 10 17:09:13 is OkHttp the favored http client? Feb 10 17:09:14 Or would you simply have the one layout, then just hide / show layouts within the layout depending on where the activity has been opened? Feb 10 17:09:49 markyosullivan, totally depends on how your screen should look Feb 10 17:10:13 How do I add Maven repositories? I've never used it before Feb 10 17:11:10 JakeWharton, does it have ws bundled now? Feb 10 17:11:16 no Feb 10 17:11:55 well the latest ws I found was 3.0.0-snapshot Feb 10 17:13:07 I tried those changes danijoo, but now the bar is at the top and the scrollview isn't visible. Feb 10 17:13:24 the latest OkHttp is 3.1.2 for all artifacts Feb 10 17:13:27 quest if i have 1-100 buttons with butt.getId s = 1-100, i want to add the buttons that match getID+i where i = a counter to a SET , how to i target those buttons ? Feb 10 17:13:46 I'll keep fiddling with it Feb 10 17:13:49 JakeWharton: how are you so good at android stuff? Feb 10 17:13:53 danijoo would you be able to change the theme though? Feb 10 17:13:54 if you have 100 buttons, they wont fit on the screen :p Feb 10 17:13:59 i know that name :p Feb 10 17:14:07 its a grid layou they fit :P Feb 10 17:14:24 without scrolling? :P Feb 10 17:14:32 I think I've asked that before RustyShackleford, was a bit amazed Jake came onto this chat Feb 10 17:14:34 yes and that not my issue Feb 10 17:15:04 ghostd0g, basically you are asking for a method to get the Id for those byttons by their name, right? Feb 10 17:15:22 so that you can findViewById with something like ¨gridButton¨ + 1 Feb 10 17:16:15 Hey how can I get the back of my ImageButton to be transparent? Its gray Feb 10 17:16:28 yes Feb 10 17:16:44 i am going to read findViewByID Feb 10 17:16:49 thank you Feb 10 17:17:19 RustyShackleford: most poeple are good at programming because they simply practice, learn and remember Feb 10 17:17:35 simply put experience Feb 10 17:17:39 ghostd0g, try findViewById(Resources.getIdentifier(¨button¨ + counter, ¨id¨, getPackageName()) Feb 10 17:17:53 err getResources().getIdentifier it is. Feb 10 17:17:58 its not a static Feb 10 17:18:32 don't do that, though... Feb 10 17:18:45 or iterate over subviews Feb 10 17:19:03 hey pfn Feb 10 17:19:07 sup nappy Feb 10 17:19:16 i see your updates to your irc chat app Feb 10 17:19:18 color :O Feb 10 17:19:22 :D Feb 10 17:19:38 it's always had color, the colors weren't selectable, though Feb 10 17:20:02 hows it going? Feb 10 17:20:14 busy, too much work, and too many personal projects that need attention Feb 10 17:20:15 im just cursing the sky at how annoying lat/lng's can be Feb 10 17:20:30 pfn: thats the same for everyone :) Feb 10 17:21:38 when I set weight to 1 the scrollview disappears and without it the bottom bar disappears. ugh Feb 10 17:21:48 Log.d(TAG, "shp" + " " + findViewById(Resources.getResources().getIdentifier(¨button¨ + i, ¨id¨, getPackageName()));? Feb 10 17:21:57 if i was loging it ? Feb 10 17:22:09 confused Feb 10 17:22:27 lat/lngs aren't annoying. android UI definitely is though :P Feb 10 17:23:03 Apocx: depends on what you need to do with them :D Feb 10 17:23:14 both that is.. lat/lngs and android UI :) Feb 10 17:23:17 Apocx, does work here Feb 10 17:23:40 ghostd0g, its not a static method, sorry Feb 10 17:23:42 guess so. I write mapping software so maybe I'm just used to it by now heh Feb 10 17:23:50 strange Feb 10 17:23:51 Log.d(TAG, "shp" + " " + findViewById(getResources().getIdentifier(¨button¨ + i, ¨id¨, getPackageName()));? Feb 10 17:25:54 getIdentifier is slooow Feb 10 17:25:57 just so you know Feb 10 17:26:44 How would I go about debugging a really uncommon problem which I've never managed to catch myself with an app I've made? One which has been reported by one of my app users? Feb 10 17:27:04 Just asking hypothetically Feb 10 17:27:18 markyosullivan, if you cant reproduce it, you can ahrdly debug it Feb 10 17:27:41 Will sharedPreferences.putLong(someKey, null); result in sharedPreferences.getLong(someKey, defaultValue) returning the default value? Feb 10 17:27:42 unless you have a stacktrace Feb 10 17:27:51 True but what are you supposed to do in that case danijoo? Feb 10 17:28:12 I've never heard of stacktrace, gonna Google :) Feb 10 17:28:15 markyosullivan, analytics to track it down Feb 10 17:28:25 you never heard of .. wat? Feb 10 17:28:33 danijoo: Could you check to see if this works for you? it's my full layout sans the custom images Feb 10 17:28:34 http://pastebin.com/EnHn760c Feb 10 17:29:06 danijoo well this is awkward, I never knew that was referred to as stacktrace. I've always just known it as the logcat Feb 10 17:29:21 or well the information contained within the logcat Feb 10 17:29:50 logcat is not the same as a stacktrace, but will display the stacktrace if an exception occurs Feb 10 17:29:52 Apocx, you forgot to set orientation on the rootView Feb 10 17:30:09 first linearlayout needs orientation=vertical Feb 10 17:30:20 damn I knew it'd be something stupid Feb 10 17:30:26 thanks a ton, works now Feb 10 17:30:29 yw Feb 10 17:35:51 Hey how can I get the back of my ImageButton to be transparent? Its gray Feb 10 17:36:13 change the color.. Feb 10 17:36:16 set background property to #00000000 Feb 10 17:36:22 or to the transparent resource I guess Feb 10 17:38:02 hm must be something else in my layout that causes the bottom bar to not stick to the bottom, as the layout I linked now works in designer but not when added dynamically to a bigger layout as a fragment. Feb 10 17:38:04 danijoo : sorry i am way confused ... hitBox.add(findViewById(getResources().getIdentifier(chordButton.getId() + i, "id ", getPackageName()); what is "id supsed to be ? Feb 10 17:38:31 ghostd0g, nothing. its a string saying ¨id¨ Feb 10 17:38:32 maybe i have no cloue what you are trying to tell me Feb 10 17:38:39 ahh ok Feb 10 17:38:58 you could also put things like ¨drawable¨ in there if you look for the id of a drawable Feb 10 17:39:04 but for views its just `id` Feb 10 17:39:36 i just want to add those buttons to the hitbox set Feb 10 17:39:48 the id are all int Feb 10 17:40:40 what you are doing looks wrong though. Feb 10 17:40:47 getId() + i ? Feb 10 17:40:54 i thought you want to get id by string Feb 10 17:42:39 chordButton.getId() return an int Feb 10 17:43:10 yes.. but if you already have a reference to ChordButton, why would you search for it then? Feb 10 17:43:53 I dont get that Feb 10 17:43:53 aha fixed it, was my root layout messing it up, had a scrollview in the root there as well for some reason. guess they were conflicting with each other. Feb 10 17:44:10 Apocx, nested scrollviews dont work Feb 10 17:44:23 yeah I've just discovered that heh Feb 10 17:44:30 forgot I had one in the root Feb 10 17:44:50 so if i=1-4 i want to add all chordButtons that match getId()+i to another set Feb 10 17:45:18 ie buttons with getID 1, 2, 3, 4 Feb 10 17:45:39 or 8,9,10,11 Feb 10 17:45:47 ghostd0g, if button1 is next to button2, that doesnt mean their id only differ by 1 Feb 10 17:45:56 yes Feb 10 17:45:56 you cant increment ids and assume to get the next view Feb 10 17:46:09 that doesnt work Feb 10 17:47:05 the best approach is to reference every ID statically, i.e. int[] mybuttons = { R.id.button1, R.id.button2, R.id.button3, etc. }; Feb 10 17:47:17 I agree with pfn Feb 10 17:47:27 anything else is unsafe Feb 10 17:47:40 write a build-task to generate this array if you want Feb 10 17:48:07 or generate the button programmatically and directly store an array of references to them Feb 10 17:48:07 honestly if I were adding 100 buttons to something I'd make them dynamically and skip putting them in the XML Feb 10 17:48:09 but anything you do, if you make a mistake, it should fail at compile-time, not crash at runtime Feb 10 17:48:16 Apocx, yes Feb 10 17:48:20 that is the correct approach Feb 10 17:48:29 what I just said ^^ Feb 10 17:48:50 sec i am pastebining i make the buuton programically Feb 10 17:48:54 i wonder how 100 bts fit the screen anyways Feb 10 17:49:02 if they dont, use an adapter Feb 10 17:49:33 https://github.com/pfn/qicr/blob/master/src/main/scala/com/hanhuy/android/irc/ColorPreferenceActivity.scala#L112-L130 something in this vein I wrote recently Feb 10 17:49:36 except not java ;-) Feb 10 17:50:18 resulted in this https://www.youtube.com/watch?v=gtH95L9qkk4 Feb 10 17:50:19 Android apps in Scala? didn't know that was a thing Feb 10 17:50:26 I think that’s kotlin Feb 10 17:50:30 not scala Feb 10 17:50:33 its scala Feb 10 17:50:37 ah, k Feb 10 17:50:41 Only looked at 3 lines Feb 10 17:50:51 oh, the URL already says scala Feb 10 17:50:53 lol Feb 10 17:51:00 * justjanne is blind – again Feb 10 17:51:26 anyway, why even do that? Feb 10 17:51:39 just use a recyclerview instead of storing references directly to items. Feb 10 17:51:40 what? Feb 10 17:51:56 he said they fit all on one screen Feb 10 17:52:02 without scrolling Feb 10 17:52:03 and? Feb 10 17:52:04 no idea. Feb 10 17:52:15 still use a recyclerview, or some similar system Feb 10 17:52:20 if they all fit, theres no point in using a recycler Feb 10 17:52:20 hey Feb 10 17:52:28 nothing to recycle ;) Feb 10 17:52:29 you don’t want to really use one XML file with 100+ buttons, right? Feb 10 17:52:33 code duplication? Feb 10 17:52:36 didnt say that Feb 10 17:52:48 do what pfn did, a simple loop creating them Feb 10 17:54:43 ok her it is so far http://pastebin.com/mm0LwTvJ Feb 10 17:54:47 here Feb 10 17:55:04 i am doing things way wrong likely Feb 10 17:55:44 ghostd0g, why dont you store an Button[] array that holds a eeference to every bottom after onCreate Feb 10 17:55:45 basically when a user clicks a button i want it to add that button and the next 3 to a hit box Feb 10 17:56:20 then you search that button in the list, take the next 3 oness from the list and make whatever you want with them Feb 10 17:57:58 I am developing a widget for my application , I am using a RemoteViewsFactory to inflate list items Feb 10 17:58:21 but the .setTextViewText doesn't seem to work Feb 10 17:58:32 it does work Feb 10 17:58:33 whereas .setImageViewResource is working Feb 10 17:59:05 wait I will post some snippets Feb 10 17:59:45 danijoo : i have a buttons array ? private List