**** BEGIN LOGGING AT Sat Mar 12 02:59:58 2016 Mar 12 03:02:13 So i know Soundpool supports playing simulataneous audio clips, does the basic MediaPlayer capable of the same? Mar 12 03:02:42 g00s: https://gist.github.com/konk3r/dd01afcacec51b15ab92 Mar 12 03:03:50 orbyt_: no Mar 12 03:04:16 Before I was using my transaction listener I was doing it in an AdapterDataObserver in onChanged() Mar 12 03:04:25 So if I need to play multiple sounds at once, SoundPool is the only option? @ Napalm Mar 12 03:04:45 orbyt_: or, create multi MediaPlayers and play them at-once Mar 12 03:04:56 at the same time Mar 12 03:05:00 Napalm: rgr o7 thanks Mar 12 03:22:41 any mutt (?power) users here? Mar 12 03:33:17 For some reason, playing a sound with SoundPool and setting it to loop causes a slight blip when the next loop begins -______- Mar 12 04:46:06 Hi, I can't get "adb devices" to find my HTC phone on Linux. I have « SUBSYSTEMS=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev", OWNER="matju" » in udev. I did « udevadm trigger » then restart adb, but nothing. Any hints ? Mar 12 04:46:48 konk3r cool thanks Mar 12 04:47:09 Np, hope it helps. It may have the same issue and I just never noticed Mar 12 04:47:27 g00s: what was it? Mar 12 04:47:40 still looking, had to walk my dog Mar 12 04:50:39 I like having it in the AdapterDataObserver so then it updates everytime the adapter's content changes. I ended up making a baseAdapter and a transaction listener instead because I'm adding/removing items from the list manually to get the cool recyclerView list animations and it was making things choppy without doing it that way Mar 12 04:51:01 If you're just swapping out the list wholesale you won't run into that issue Mar 12 04:52:45 konk3r lol, i was trying to find this in the docs adapter.registerTransactionListener(transactionListener); Mar 12 04:52:57 was like hm, don't remember seeing that one :) Mar 12 04:54:32 Haha yeah, if you just use an AdapterDataObserver and put it in the method I mentioned it will work out of the box, but you'll have issues when you use notifyItemRemoved() and notifyItemInserted Mar 12 05:20:59 Napalm konk3r ah, my stupid mistake. i set the adapter and it takes a few ms for the query to complete, so its count is 0 initially Mar 12 05:21:03 anyone know a quick painless way to convert my XML dataset to a sqlite db? -or- if there's something better to work with? i need it to be easily searchable, there's no writing back to the DB all reads Mar 12 05:21:11 (readonly) Mar 12 05:21:29 Haha nice Mar 12 05:21:46 wonder how i would get around that actually, kinda nnoying Mar 12 05:22:22 g00s I like adding a progress view to the mix, IMO it makes sense there anyway Mar 12 05:23:05 Ugh, I hate dealing with HTML on Android Mar 12 05:23:40 can anyone tell me how can i handle events happening on a alertdialog ? Mar 12 05:24:05 i have swipe number picker on a custom layout on my dialog , i want to handle its event Mar 12 05:25:20 do you know how to load org.apache.http.legacy (which is in "optional" in sdk 23) in a project that is still running just ant ? Mar 12 05:36:27 is overridePendingTransition still the way to go for custom animations Mar 12 05:37:59 (assuming I don't want my minsdk to be 21) Mar 12 05:51:54 has anyone ever done any manual rendering of views in android that could point me at something to look at Mar 12 06:10:26 in my alertbox i have a this rangebar, https://github.com/oli107/material-range-bar . i want to change text of the pins of this rangebar Mar 12 06:10:31 is anyone here ? Mar 12 06:13:00 matju, stop using just ant Mar 12 06:13:15 pfn , can you help me ? Mar 12 06:13:31 pfn : :) Mar 12 06:13:59 I don't do beginner help Mar 12 06:15:00 pfn : oh com'on Mar 12 06:15:32 pfn : a beginner will always remain a beginner , if no one helps Mar 12 06:15:52 false Mar 12 06:22:43 grekkos: Manual rendering of views? Like actually drawing on the canvas? Mar 12 06:31:07 fell asleep at 7, just woke up now (1230 am) Mar 12 06:31:16 that was a nice little nap Mar 12 06:33:00 good for you Mar 12 06:37:32 time for some android development Mar 12 06:37:52 I do some of my best thinking in the wee hours of the night lol Mar 12 06:38:37 i am the exact same way Mar 12 06:38:47 23:38 here and just warming up :P Mar 12 06:39:02 mountain time eh? Mar 12 06:39:07 indeed Mar 12 06:39:13 Calgary Mar 12 06:39:23 canadian, eh? Mar 12 06:39:36 that would explain the 24 hour time, maybe Mar 12 06:39:49 do canadians do that? Mar 12 06:40:01 No, it is just me. I prefer it. less ambiguous, more consise. Mar 12 06:40:06 most people use 12 hour though Mar 12 06:40:30 I need help. I am beginner Mar 12 06:41:00 rowan7? Mar 12 06:41:01 jackhum, ask away Mar 12 06:41:06 if someone can help, the will Mar 12 06:41:17 they* Mar 12 06:42:45 I have a main activty which has a FAB . I setup a onclick on faB such that a dialog opens Mar 12 06:42:55 Dialog has customviee Mar 12 06:43:00 Customview Mar 12 06:43:13 That customview has edittext Mar 12 06:43:42 I want to do some stuff on layout of dialog boz Mar 12 06:43:46 Box Mar 12 06:44:00 How can i seperate that code~ Mar 12 06:46:58 jackhum: what do you mean by separated? Mar 12 06:47:15 you can get a reference to your dialog box by using findViewById() Mar 12 06:47:47 you'll need to define an id such as android:id="@+id/dialog_box" Mar 12 07:20:31 I wish I could figure out rxjava hah Mar 12 09:04:13 I wish I could use the try-with-resources feature Mar 12 09:04:58 requires minSdk = 19 Mar 12 09:07:09 how do I make sure my SqliteDatabase and Cursor are definitely closed? Mar 12 09:07:44 I can call .close() in the finally block but now its getting sorta messy. Need to make refereces outside the try/catch/finally blocks Mar 12 09:10:18 hey, im trying to add button below dynamically generated listview, using relativelayout and layout_below attribute but it's not working Mar 12 09:23:44 is this a safe design? Mar 12 09:23:53 db.beginTransaction(); Mar 12 09:23:53 try { Mar 12 09:23:53 ... Mar 12 09:23:53 db.setTransactionSuccessful(); Mar 12 09:23:53 } finally { Mar 12 09:23:55 db.endTransaction(); Mar 12 09:24:25 what if an exception occurs? db.endTransaction will be called anyway, won't it? Mar 12 09:24:51 Pastebin... You know this Mar 12 09:25:11 forgive me this one time? Mar 12 09:25:48 6 lines, yeah I'm pushing it. Also it hit me right after I pasted it that I need to read more closely Mar 12 09:26:19 Sure, you'll get 1 pass Mar 12 09:58:59 can I have multiple indicators on TabLayout? I'd like to add/remove indicators based on events Mar 12 10:03:58 only one tab can be selected. whats the sense of multiple indicators Mar 12 10:05:50 styles.xml:40: error: Error: No resource found that matches the given name: attr 'colorAccent' <= trying to build an inactive project Mar 12 10:06:00 has colorAccent been renamed or something? Mar 12 10:06:10 no Mar 12 10:08:18 https://github.com/koush/Superuser <= that's what I'm trying to build. There's been no activity for ~18 months Mar 12 10:09:54 colorPrimary and colorPrimaryDark get the same error Mar 12 10:11:35 if i comment out those lines, then I get: Superuser/Superuser/res/layout/log_item.xml:2: error: Error: No resource found that matches the given name (at 'paddingLeft' with value '?attr/listPreferredItemPaddingLeft_'). Mar 12 10:12:19 sounds very broken Mar 12 10:13:54 old and broken... but yet it's the only FOSS distribution of Superuser. sad state of affairs Mar 12 10:22:10 danijoo: then can I have different text color for each tab? Mar 12 10:22:47 i guess so Mar 12 11:39:05 in android studio how can i make a 'clean' installation of my app by removing all old data Mar 12 11:45:12 murosai_, just deinstall the app on the device Mar 12 11:54:19 hi every one Mar 12 11:54:52 i have a problem wth update of android studio 2 version to adnroid studi 2 betta 6 Mar 12 11:55:31 this error is : some of the confilicts below do not have a solution , so the ptatch can not be applied Mar 12 11:56:07 please help to solve this problem Mar 12 11:57:30 this is pic : http://tinypic.com/r/200w5s4/9 Mar 12 12:11:15 anyone here ? Mar 12 12:13:45 manir, maybe do a clean install? Mar 12 12:14:49 ktwo : i am in iran and i can not download android studio again because its' size is about 300 and internet speed is low and expensive in iran Mar 12 12:15:26 ktwo : also i did clean install already Mar 12 12:16:18 uh okay, well but dont you have the setup file? Mar 12 12:16:22 ktwo : when patch file is downloaded with android studio i do not know where it places and i have to redownload it Mar 12 12:17:46 android studio preview 2.0 does not setup file i have downloaded as zip file then i exteracted it then i opened it with studio64.exe i think studio64.exe is setup file Mar 12 12:18:16 http://tools.android.com/download/studio/builds/2-0-preview -> this is the setup file Mar 12 12:19:34 ktwo : yes i have android studio 2.0-preview and i want to update it to betta 6 Mar 12 12:20:11 Ah yes sorry this: http://tools.android.com/download/studio/builds/2-0-beta-6 Mar 12 12:20:25 ktwo : i can not download it Mar 12 12:20:38 because iran is limited by google Mar 12 12:20:55 by google? would it help if i upload it somewhere else? Mar 12 12:21:29 ktwo : yes i can not access to it to download Mar 12 12:21:47 even with vpn i can not Mar 12 12:22:17 ktwo : do you know another repo to download android studio ? Mar 12 12:22:33 Nope, where can you download ? Uploaded? Mar 12 12:23:18 i have a vpn for uploading but it ca not download whole android studio again Mar 12 12:24:42 Well i dont think there is another way if the installation is messed up Mar 12 12:37:12 ktwo : do you know patch file during update android studio where located is ? Mar 12 12:37:50 or do you know location of patch file after update android studio ? Mar 12 13:44:26 ew, tracer is buggy on Android N Mar 12 14:14:24 hm would someone who published an AAR on bintray mind helping me a bit? I am trying to set up some sort of auto-publish using the bintray-gradle plugin, but somehow it does not work as expected.. or rather I do not know how to fill in some fields or something Mar 12 14:15:16 what I want is to publish the library in a way that would allow others, who use jcenter() to just add "compile 'divstar.ico4a:?:?@aar'" and use the library.. Mar 12 14:16:26 So what's the problem? Mar 12 14:17:22 does anyone remember how to enable usb? I think a configuration file needs to be placed somewhere (my device is rooted) Mar 12 14:17:27 it might sound stupid, but I am not sure what my project name, group- or artifact-id is and I also do not know what to replace the question marks with Mar 12 14:17:34 at the moment applications just won't get any access to USB Mar 12 14:21:57 Aoi, um, it's whatever you set it is essentially :) Mar 12 14:22:25 well yeah.. but how do I find it out? I only know that my module-name is "ico4a" and the package is "divstar.ico4a".. Mar 12 14:22:35 Aoi, look for example how retrofit does it (on the bottom): https://square.github.io/retrofit/ Mar 12 14:22:38 Aoi, again Mar 12 14:22:44 It's whatever you set it to. Mar 12 14:22:49 It's not connected to anything. Mar 12 14:22:57 It's just naming that has to be unique in whole jcenter() Mar 12 14:23:01 (for groupId) Mar 12 14:23:12 Usually it's connected to your package name or company name, but it's essentially freeform. Mar 12 14:23:47 Pattern tend to be that companies use same groupId for all their libraries / products and then they differ by artifactId. Mar 12 14:24:01 ah .. okay - got it... but what about this compile-statement? is it freeform, too, or is it package-name:module-name:version@aar (if it's just the AAR?) Mar 12 14:25:13 Aoi, no, the compile statement is `::@` Mar 12 14:25:34 ahh.. so if those are not set, it'll not build properly.. I see.. Mar 12 14:25:36 So if you set your library to have "com.divstar" groupId, "ico4a" artifactId and publish a version 2 Mar 12 14:25:43 When you upload to jcenter() Mar 12 14:25:58 your clients will be able to access it by adding compile "com.divstar:ico4a:2" Mar 12 14:26:45 ah .. I only know groupId and artifactId from maven, but I thought it'd be different for jcenter .. for whatever reason Mar 12 14:27:45 Nope, jcenter() is a maven repository :P Mar 12 14:27:52 And gradle reads maven repositories :) Mar 12 14:28:08 ah.. but wouldn't I then need a pom.xml? Mar 12 14:28:24 That will be generated by the bintray gradle plugin Mar 12 14:28:26 :) Mar 12 14:29:33 hm.. okay.. I shall give it another try with the new information you gave me! Mar 12 15:10:20 jcenter only allows OSS modules, right? Mar 12 15:13:26 Anybody knows how to reslove this issue Mar 12 15:13:31 https://gist.github.com/af814bebd51968c7569d Mar 12 15:15:41 ^^ Mar 12 15:15:59 I have never seen such a "beauty" before.. Mar 12 15:34:13 hm .. so do I need to add a maven publication into my build.gradle or something? Mar 12 15:34:49 To a server? Mar 12 15:34:57 Or local? Mar 12 15:35:20 hm it says in the info I found, that I should set up a maven publication Mar 12 15:35:43 probably to a server.. locally I am not using any repositories other than svn/git Mar 12 15:35:55 (which essentially are just there for version control - nothing else) Mar 12 15:36:47 I am trying to reproduce what is written in here: https://github.com/bintray/gradle-bintray-plugin/blob/master/README.md but I am not sure about "version" nor about the publishing thing.. though I suppose the publication would tell the script what to actually send? to the repository Mar 12 15:37:58 Btw, weren't you just here asking the same thing a few hours ago? :) Mar 12 15:38:34 Also, does that help: https://www.virag.si/2015/01/publishing-gradle-android-library-to-jcenter/ ? Mar 12 15:38:45 Might be a bit out of date. Mar 12 15:39:22 oh sorry - I have two nicks I use - Aoi and divStar Mar 12 15:39:35 and I had my regular 24-hours-disconnect a hour ago Mar 12 15:39:58 Ah :) Mar 12 15:40:24 I did not entirely understand it, because I perhaps asked the wrong questions.. I'll give the link a try - thank you! Mar 12 15:50:24 I am looking for a good Android starting point, book, website, tutorial.. Mar 12 15:50:48 likecolacola: d.android.com Mar 12 15:59:06 Leeds: thanks Mar 12 15:59:17 likecolacola: it's in the channel topic... Mar 12 16:00:50 Leeds: oh, anyway i was looking for something else, not the official docs Mar 12 16:01:19 you've worked through the tutorial and training sections of the official docs already? Mar 12 16:02:10 Leeds: no, I was discouraged to do so by some teacher.. he didn't gave any alternative thought Mar 12 16:02:29 "some teacher"... Mar 12 16:02:46 Leeds: my java teacher xD Mar 12 16:02:46 what teacher discourages learners from reading official docs? Mar 12 16:03:15 get a better teacher Mar 12 16:04:21 Leeds: he said the examples too large and not linear for it to be a good learning resource for a starter Mar 12 16:04:36 it assumes you know Java - it's teaching you Android Mar 12 16:04:38 Hey there. Has anyone here successfully tried using VectorDrawables on pre-lollipop devices? Mar 12 16:11:52 Leeds: thanks, I will read them Mar 12 16:16:37 weird.. Mar 12 16:16:53 I am following that tutorial, but it says "Gradle DSL method not found: 'install()'" Mar 12 16:17:48 why there are so much newbie questions in this year? Mar 12 16:17:55 no offence, just wondering Mar 12 16:18:26 *offense Mar 12 16:18:29 uhm .. whom are you asking? Mar 12 16:18:45 other guys :) Mar 12 16:18:53 if you don't want to reply or do not know how, then uhm don't I doubt anyone will mind (I certainly won't) Mar 12 16:19:45 hence "no offense" Mar 12 16:20:12 besides if the question is so newbiesh - you - as a pro - should be very much able to answer it or point me to something that solves my issues, because no SO reply fixed the issue so far :/ Mar 12 16:20:44 also I need to remember to not even give your questions a thought - no offense :) Mar 12 16:21:09 well, apperantly I had to wait some time after your question that you'll not take it personally Mar 12 16:21:27 or you could have asked it earlier perhaps? Mar 12 16:21:46 Gradle cannot find the method install() Mar 12 16:22:24 yeah - I got it.. it just doesn't make sense, but I'll figure it out sooner or later so excuse me for asking such newbie questions on here Mar 12 16:22:40 I probably don't even deserve to be among the pro's here ^^ Mar 12 16:22:50 oh god Mar 12 16:22:51 http://stackoverflow.com/questions/27735646/android-studio-gradle-dsl-method-not-found-android-error17-0 Mar 12 16:23:44 I was wondering why more people trying to learn android Mar 12 16:24:10 Apple SDK is expensive. Mar 12 16:24:11 well if you had asked the question this way, I'd have told you my reason Mar 12 16:24:29 I do it solely because I need an app on my phone which does not yet exist Mar 12 16:24:41 so. why not python or erlang Mar 12 16:24:58 cause I have some experience in Java / Java EE? Mar 12 16:25:13 and Android apps are essentially programmed in java Mar 12 16:26:57 some have, some don't. are people more interested in mobile development or I just imagining things Mar 12 16:28:25 of course people are more interested in mobile development Mar 12 16:28:31 I like mobile over web as it does not have a flavor of the month frameworks everywhere. Mar 12 16:28:58 in order to not be interested in mobile development one either has to have a very solid programmer job elsewhere - or just be unwilling to learn new things (then again if this is the case, one should not have become a programmer in the first place) Mar 12 16:30:18 em. so, you saying mobile developers do not have solid jobs? are they bums? =D Mar 12 16:31:03 no - I am saying what I just said.. if you are an Assembler programmer and have a job where you are highly needed, you are a programmer and do not necessarily need to keep with the time Mar 12 16:32:07 divStar: do you have job? Mar 12 16:32:36 vigilancer: do you? Mar 12 16:32:45 yup. I'm android developer Mar 12 16:32:48 do they Mar 12 16:32:51 surprisingly Mar 12 16:33:02 yup. I am a Java EE developer. Mar 12 16:33:25 Python developer... Mar 12 16:34:05 why are you people trying to steal my job?! :D :D Mar 12 16:34:38 it's called "advancement" I believe.. Mar 12 16:35:10 it's not like android development is as hard to learn and narrow as programming in Assembler, is it? :p Mar 12 16:35:29 nope, java pretty simple language Mar 12 16:36:53 how can you be a java ee developer and not understand the basics of artifact publishing Mar 12 16:36:57 well, working hypothesis is that mobile is modern trend Mar 12 16:38:03 I never published anything to a public repository, pfn Mar 12 16:38:15 doesn't matter if you haven't published Mar 12 16:38:34 simply using libraries should give you an idea of naming and versioning conventions Mar 12 16:38:45 and publishing to a local (or intranet-wide) maven-repository is a piece of cake compared to what one needs to publish android-related stuff using gradle to bintray Mar 12 16:38:58 completely false Mar 12 16:39:05 you are completely false Mar 12 16:39:13 it's the exact same thing Mar 12 16:39:21 * vigilancer take popcorn Mar 12 16:39:35 at my workplace we have definitions about artifact and group Ids.. Mar 12 16:40:02 so while I was not entirely clueless, what I have been trying to do in gradle looks different from your usual maven pom Mar 12 16:40:15 then publish using maven Mar 12 16:40:38 oh - so funny - why haven't I had this idea .. oh wait.. I did! Mar 12 16:40:40 Assembly is not super difficult to learn. Just super tedious to program in. Mar 12 16:40:55 assembly is as straightforward as it gets Mar 12 16:41:10 and yes, tedious as fuck Mar 12 16:41:25 pfn do you have friends in real life? I know one should never judge from just a nick on IRC, but I really am wondering... Mar 12 16:41:44 divStar, you clearly don’t Mar 12 16:42:07 you are wrong - I do.. but none of them are self-centered egomanicas like you seem to be Mar 12 16:42:21 you're funny Mar 12 16:42:26 thank you - so are you Mar 12 16:43:16 I'm sad I wasted time on you Mar 12 16:43:24 look who's talking D: Mar 12 16:43:47 * vigilancer screams "why did she go in there?! he's behind the door!" Mar 12 16:44:11 yeah, but your time is worthless Mar 12 16:44:34 oh well .. one more idiot for my ignore list. Mar 12 16:45:34 how will you hear yourself think?! Mar 12 16:48:35 can artifacts imported into android be written in scala? Mar 12 16:49:25 yes, but not easily with gradle Mar 12 16:49:36 i see, thank you Mar 12 16:49:51 you'd have to do preprocessing shenanigans or proguard as part of gradle build Mar 12 16:50:06 would need to publish an aar with proguard rules Mar 12 16:50:17 I guess it isn't completely terrible Mar 12 16:50:31 aha, very good to know, maybe it will become easier with time Mar 12 16:50:36 and works well on v21+ for development Mar 12 16:50:42 very sweet Mar 12 16:51:06 but if your goal is simply to develop in Scala on android, that's easy Mar 12 16:51:22 isn't there lack of support in many ways? Mar 12 16:51:40 only google canonical support, otherwise no Mar 12 16:51:44 can lint hack scala? Mar 12 16:52:10 bytecode stuff can detect ok, source ast inspectors can't Mar 12 16:52:49 i see Mar 12 16:53:20 there are a few bytecode lint inspections Mar 12 17:21:12 Hi, I'm looking to implement a quiz of some sort in an activity Mar 12 17:21:57 I'd have multiple answers per question, would that require me to have a ListView (for the questions) and per question another ListView (multiple choice checkboxes) ? Mar 12 17:22:05 or are there better ways to do this? Mar 12 17:23:05 are those questions one per screen or in list Mar 12 17:23:17 ListView is so last week, use RecyclerView Mar 12 17:24:23 Ashiren: for now , they're in a list Mar 12 17:24:32 I'll take note of the RecyclerView Mar 12 17:27:39 ahh.. finally - publishing to bintray works! Mar 12 17:29:00 divStar: congrats Mar 12 17:34:03 So I figured out how to make a network call to sync my database with the info I need Mar 12 17:34:39 problem is, the sync is not finished by the time my first view shows. So this first page doesn't have any data Mar 12 17:35:19 what I'd like is to 1) get cached data (if it exists) 2) sync 3) give this view the newly requested data once the sync is over Mar 12 17:37:37 oh, I'm using RxJava btw. Seems like this would be possible Mar 12 17:37:54 concatenate 2 observables Mar 12 17:38:07 one for cache, one for actual request Mar 12 17:38:12 render as appropriate Mar 12 17:41:59 pfn: well it returns only once, right? So how are two messages getting through? Mar 12 17:42:14 i'm not following entirely Mar 12 17:43:16 would it help if I pastebinned some stuff? Mar 12 17:44:02 This makes a db query public: Observable> getRoutes() Mar 12 17:44:56 and this makes the network call: public Observable sync() Mar 12 17:51:18 don't ever void Mar 12 17:51:49 both calls should return List Mar 12 17:52:00 once you have that, the solution is simple Mar 12 17:53:27 hm okay, well the plan is that sync will cache all the data I need. I have more to cache than just a List Mar 12 17:54:29 if your observable is a sequence of void, you're doing it wrong Mar 12 17:54:48 not necessarily Mar 12 17:54:48 think of Observable as being the same as List or Iterator Mar 12 17:54:58 absolutely necessarily Mar 12 17:55:08 some people use void Observables before RxJava implemented Completable Mar 12 17:55:42 I would agree with you that it is bad practice however Mar 12 17:56:20 a list or iterator of void would be absolutely wrong, and it's similarly the case for observable Mar 12 17:56:38 then what type do I return if I'm syncing a List, a List and a List? Mar 12 17:56:41 whether it was a hack in the past, I don't know, I don't rxjava Mar 12 17:57:18 I want to do some work, and notify the ui that it's done. I have different methods for returning the data I want Mar 12 17:57:27 a data class containing those 3 elements Mar 12 17:57:37 if your single request and cache does all 3 Mar 12 17:57:44 multiple requests Mar 12 17:57:56 otherwise, each of those individually with individual cache. calls Mar 12 17:58:10 concatenate observable, call it a day Mar 12 17:58:27 sounds simple when you put it that way :p Mar 12 17:59:09 you're saying create methods called List syncRoutes(), List syncStops() and so on Mar 12 18:06:36 no, Observable Why use component() and not component ? (Dagger 2 Google example) https://github.com/google/dagger/blob/master/examples/android-simple/src/main/java/com/example/dagger/simple/DemoApplication.java#L46 Mar 12 19:27:56 gottaGO, it doesnt matter basically unless the component() method changes someday and it will be doing more than just returning it Mar 12 19:29:02 http://pastebin.com/KBABRJhH notifyDataSet() is being called but getItem() is never Mar 12 19:29:24 When notifyDataSet is called the passed parameter is not null, as per the debugger Mar 12 19:33:52 OverCoder, notifyuDatasetChanged does not cause cached fragments to be recreated Mar 12 19:33:57 therefor getItem is not called again Mar 12 19:35:18 Well basically when I create the adapter the the chats parameter is empty (but not null), and thus no tabs, however, later I do notifyDataSetChanged when I have data to populate in tabs Mar 12 19:35:33 So I don't think there's any sort of caching Mar 12 19:35:38 They aren't created in the first place Mar 12 19:35:42 The TabLayout is empty Mar 12 19:35:44 oh wait Mar 12 19:35:47 I think I figured Mar 12 19:35:54 Let me check Mar 12 19:36:02 there is caching Mar 12 19:36:26 thats what the fragmentmanager is for Mar 12 19:37:21 if you call notiifydatasetchanged frags get removed, then readded. if they are cached by fragmentmanager they wont get recreated Mar 12 19:37:24 and they will be Mar 12 19:38:27 Well actually I am not assigning the adapter to the tablayout nor configuring it to work with the view pager Mar 12 19:38:29 * OverCoder facepalms Mar 12 19:38:53 But thanks for the help :) Mar 12 19:39:06 it stil wont work this way :p Mar 12 19:40:37 * OverCoder clicks run Mar 12 19:49:10 Running took me 7 minutes Mar 12 19:49:14 duh I need an SSD Mar 12 19:49:41 is this your pc? http://classiccmp.org/dunfield/nec/h/apc.jpg Mar 12 19:52:38 Close, but no, mine is older Mar 12 20:05:04 danijoo__, you were right, and now what? Mar 12 20:05:28 The fragments are being created correctly, it's only the TabLayout being kept empty Mar 12 20:05:41 even though I did tabLayout.setupWithViewPager(viewPager) Mar 12 20:07:00 you are doing it wrong ;) Mar 12 20:07:08 show the code Mar 12 20:07:09 * OverCoder slaps the tutorial Mar 12 20:07:12 Okay Mar 12 20:09:24 http://pastebin.com/az7XmKef Mar 12 20:09:35 And the tutorial I followed https://guides.codepath.com/android/google-play-style-tabs-using-tablayout Mar 12 20:09:48 oh wait Mar 12 20:09:57 * OverCoder facepalms, why would I paste all that Mar 12 20:09:59 But okay Mar 12 20:10:47 Line 84 and 136 Mar 12 20:13:33 whats the problem? that it doesnt update the tablayout once its set or does it never set it at all? Mar 12 20:13:48 Hey, I have de-compiled an apk and got java classes, when I put them back in Eclipse I get tons of errors, why is so ? Mar 12 20:14:01 I used pycron decompiler. Mar 12 20:14:10 what are you trying to do? Mar 12 20:14:46 ^ neals Mar 12 20:15:20 I just want to learn more about reverse engineering. and I have an android project, and wanted to play around with it. Mar 12 20:15:35 the 90's called, they want their IDE back :p Mar 12 20:15:50 AS is the IDE of choice for android development Mar 12 20:16:14 But beside that, decompiled java classes is not a full android project and might miss a lot of the config files and stuff like that Mar 12 20:17:49 currentWorker.getAllChats() returns Chatable objects, now when currentWorker already has chats, and getAllChats() returns a non-empty array while doing initialize(), the tabs get populated, however, when currentWorker has more chats, getAllChats() gets called again and passed to the notifyDataSetChanged() in the pager adapter, the new fragments get created (as I can see that by horizontally swiping), but the new tab Mar 12 20:17:50 doesn't get populated in the TabLayout Mar 12 20:17:57 oh i see, Mar 12 20:18:00 Duh that's too much text and I think it's confusing >.> Mar 12 20:18:24 can you get me a read about this topic ? I would love to. Mar 12 20:18:28 OverCoder, im not sure of setupFromViewpager can be used to add tabs more than once. Might need to look into the source Mar 12 20:18:31 neals, d.android.com Mar 12 20:18:51 hmm Mar 12 20:19:03 neals, decompiling is not a good way to start Mar 12 20:19:15 i meant for de-compiling. Mar 12 20:19:17 because you most likely see a lot of stuff you cant understand (imo) Mar 12 20:19:18 neals, decompiling produces smali which is ew Mar 12 20:19:31 OverCoder, there are decompiler that produce java :) Mar 12 20:19:39 o Mar 12 20:19:48 * OverCoder shrugs Mar 12 20:20:26 neals, not really part of the channel topic. You most likely wont get help for decompiling here :/ Mar 12 20:20:37 devs usually dont want their apps to get decompiled :p Mar 12 20:21:28 haha yea, me too. but it's good to learn how it's done to a bit 'protect' yourself. Mar 12 20:22:39 *sigh* Mar 12 20:22:46 The CPU profiler in the AS is useless. Mar 12 20:23:10 neals, minifyEnabled true in your gradle Mar 12 20:23:21 It obfuscates code enough to make it horrible to figure Mar 12 20:23:21 Mavrik, yeah. Mar 12 20:23:49 OverCoder, I just looked into such an app.. yes it was :/ Mar 12 20:24:04 was what? what app? Mar 12 20:24:20 public B a() { return new X()} Mar 12 20:24:23 ^^´ Mar 12 20:24:24 Mavrik not totally useless, it heats up my laptop, makes the fan spin, and eats up CPU :) Mar 12 20:24:31 o Mar 12 20:24:34 Well yeah Mar 12 20:24:42 That's how it minifies code :v Mar 12 20:24:57 It's trying to tell me my code wastes bunch of time in writeSerializable, but that method never is called and doesn't trigger a breakpoint O.o Mar 12 20:25:21 lol Mar 12 20:25:29 Make sure you pressed debug and not run Mar 12 20:25:30 ;) Mar 12 20:25:38 protip.. :D Mar 12 20:26:28 what ide are you using mostly ? Android Studio or Eclipse, or is there yet a better ide ? Mar 12 20:26:43 Android Studio 2.0 is very nice for Android development Mar 12 20:26:47 `nobody` uses eclipse for android anymore Mar 12 20:26:54 Eclipse is ew, use IntelliJ Mar 12 20:27:23 oh I spend the whole day downloading ADT plug-in for eclipse. Mar 12 20:27:30 spent* Mar 12 20:27:31 (You can't do Android development in IntelliJ) Mar 12 20:27:41 neals, you should read the docs first next time ;) Mar 12 20:27:52 Hm I wonder if I should get another 16gb ram, a new SSD or get rid of my current SSD and get a 500gb big one .. Mar 12 20:28:15 i'd wait for those xpoint ssds to come out Mar 12 20:28:18 cause I got an out-of-memory warning several times these days due to qemu Mar 12 20:28:36 and I am on 16gb already X_X Mar 12 20:28:41 divStar, did you try to start multiple ones? Mar 12 20:28:48 g00s, what's that? Mar 12 20:28:57 by default HAXM is set to limit emulation memory to 2 gb Mar 12 20:29:07 and wont allocate more for qemu Mar 12 20:29:09 * OverCoder stares at himself for having 2 gigs of ram Mar 12 20:29:17 OverCoder intel's new XPoint SSDs with NVMe Mar 12 20:29:20 no I had a browser, some email program and a graphic program as well as a few other things going on at the same time.. Windows said it only used up like 11GB or something.. Mar 12 20:29:30 no idea why it was already struggling Mar 12 20:29:43 But hey, I'll replace my own laptop in few days with one with Core i5 CPU and 4 gigs of ram, used one, I'll probably add few more gigs of ram Mar 12 20:29:50 g00s, Gonna check them out now Mar 12 20:30:10 im at 16gb right now and never notice ram issues Mar 12 20:30:17 OverCoder http://www.pcworld.com/article/3042988/storage/intel-is-lining-up-super-fast-optane-ssd-tech-for-macbooks.html Mar 12 20:30:20 and im using chrome! Mar 12 20:30:35 I am using Nightly D: Mar 12 20:31:00 then again I am stupid enough to use AS from canary channel Mar 12 20:31:23 2.1 preview 1 is surprisingly stable Mar 12 20:31:33 I'm still thinking about getting the IntelliJ subscription th Mar 12 20:31:35 o Mar 12 20:31:51 yeah seems so.. I wonder if it still has those issues with app:clean (intermediate folder not being able to properly delete due to instantrun) Mar 12 20:32:04 I'd use intellij if they would merge AS features more quickly Mar 12 20:32:05 O.o lol Mar 12 20:32:08 I actually have a license Mar 12 20:32:27 Yeah, they're really slow at some stuff Mar 12 20:32:34 I was using eclipse for so long.. but to be honest IntelliJ looks much more integraded than eclipse Mar 12 20:32:42 Mavrik, AS 2.1? hm, I have 2.0 beta 5 or something Mar 12 20:32:43 Mavrik i keep hearing they are the same though :P Mar 12 20:32:44 On the other hand I also use CLion, AppCode and Python at time Mar 12 20:32:45 I am on canary Mar 12 20:32:47 I definitely like intellij better Mar 12 20:33:03 eclipse workspaces were terrible Mar 12 20:33:06 So getting the license bundle would make sense Mar 12 20:33:08 g00s, I think they might have reached AS 1.5 by now Mar 12 20:33:14 what I dislike about intellij is the lack of workspaces.. I can only have modules and projects, but not a workspace in the eclipse-sense Mar 12 20:33:15 Eclipse is terrible in many ways Mar 12 20:33:19 but will take months for them to grab that new 2.x stuff Mar 12 20:33:29 thats one thing I love about intellij. A project is just a self contained folder Mar 12 20:33:36 no workspaces to mess around with Mar 12 20:33:54 I like workspaces.. because I do not have to have files in the same folder as my project Mar 12 20:34:05 RustyShackleford you could have your projects self contained in eclipse too Mar 12 20:34:19 Eclipse looks so cluttered Mar 12 20:34:27 there are like 1 million buttons I never used.. Mar 12 20:34:44 g00s: I guess I never figured it out Mar 12 20:34:51 well IntelliJ looks weird a bit.. it's UI certainly does not come from the Windows-world D: Mar 12 20:34:55 its* Mar 12 20:34:57 danijoo__ oh yeah, looking forward to that AS feature that lets you hide tool window buttons Mar 12 20:35:07 you can do that already. I forget how Mar 12 20:35:23 presentation mode? Mar 12 20:35:39 nope. Somewhere in the settings you can choose which tool windows you want Mar 12 20:36:02 you can also save a default layout so that when you open a new project you don't need to set it the way you like again Mar 12 20:36:03 hm Mar 12 20:36:13 ah.. well .. once I do something other than android and if there is a trial for intellij, I'll give it a try Mar 12 20:36:26 free for personal use I believe Mar 12 20:36:32 no I don't think so Mar 12 20:36:59 community edition Mar 12 20:37:03 its even free for non personal use Mar 12 20:37:11 oh wow Mar 12 20:37:13 the community edition Mar 12 20:37:18 last time I checked I saw prices Mar 12 20:37:34 yes. thats for enterprise edition. it has some more features Mar 12 20:37:50 lol.. what's perforce, clearcase and TFS :o? Mar 12 20:38:36 tip for all students: you can get the pro edition for free ;) Mar 12 20:38:56 hm not a biggie I cannot write JavaScript (well - not highlighted etc.), but no Vaadin/GWT support? and well .. don't need SQL really that much from the IDE Mar 12 20:39:31 the great thing is it allows you to access SQL on the device Mar 12 20:39:43 you can have your app running and follow database changes in realtime Mar 12 20:39:50 also Java EE / Spring is >community edition .. hmm.. at least it includes gradle and maven support.. Mar 12 20:39:52 or edit the db on the device Mar 12 20:40:04 danijoo__ you can do that with Stetho / SQLiteStudio also Mar 12 20:40:26 yeah I know Mar 12 20:40:31 sqlitestudio is an AS plugin? Mar 12 20:40:52 divStar: clearcase is perhaps the shittiest VCS in existence Mar 12 20:40:55 no its a standalone c++ Qt app Mar 12 20:40:57 but the sqlitestudio ui is kinda me :/ Mar 12 20:41:01 meh* Mar 12 20:42:34 lol Mar 12 20:43:16 well to be honest .. when I use eclipse, I know that in order to have it do what I need is just a matter of configuration and the right plugins .. with intelli J the answer might be "money" :X Mar 12 20:44:46 divStar: sorta doubt it Mar 12 20:44:53 (not saying eclipse doesn't have paid plugins - I am sure it does - but at least in most cases there are OSS alternatives - and yes call me cheap, but I wouldn't want to spend hundreds of euros to pay for something I am not earning money from) Mar 12 20:45:02 I've used it a little bit, never needed any of the paid features Mar 12 20:45:21 IIRC intellij is rather expensive though, isnt' it? Mar 12 20:45:37 divStar, community edition will have every feature from AS. its quite useable. Mar 12 20:45:48 well to be honest it isn't THAT expensive.. individuals pay like 100-something dollars per year Mar 12 20:46:03 130EUR for the whole package :) Mar 12 20:46:10 200 first year Mar 12 20:46:43 I don't have a perpetual license XD Mar 12 20:47:49 anyway.. the price seems okay really.. I am just wondering: what if I want a certain plugin that might not be included unless I chose all products or something? which is where I think eclipse is stronger.. but intelli j (at least what part of it I saw in AS) is great.. Mar 12 20:48:42 divStar, what do you mean? Mar 12 20:49:03 The 130/year is the full package for the suite :) Mar 12 20:49:06 for eclipse even I could make a plugin. or anyone .. and distribute it freely Mar 12 20:49:16 divStar, same for IDEA Mar 12 20:49:30 https://plugins.jetbrains.com/?idea Mar 12 20:49:38 ah .. I was afraid the plugin architecture was sorta closed-down Mar 12 20:49:44 no Mar 12 20:51:26 danijoo__, I had to create a new ChatFragmentPagerAdapter, and assign it to the view pager and make the tablayout work with the viewpager in updateLayout(), so basically when having data to populate an extra tab I recreate the whole thing Mar 12 20:51:48 well - I'll certainly give IDEA a try next time I do something java-, but not android-related Mar 12 20:53:45 OverCoder, that sucks. why dont you add/remove tabs manually instead/ Mar 12 20:54:03 nah Mar 12 20:54:10 That simplifies life :v Mar 12 20:54:11 wait min Mar 12 20:54:17 Does it recreate the fragments? o.o Mar 12 20:54:18 * OverCoder checks Mar 12 20:54:51 No it does not Mar 12 20:55:46 no but it is still bad Mar 12 20:56:06 a lot of unnecessary overhead Mar 12 20:56:10 I know, I'll fix that as soon as I don't feel being bored of coding :/ Mar 12 20:56:52 dont lie to yourself. it will never be fixed and you know it :pp Mar 12 20:57:15 kinda :P Mar 12 20:57:30 But no really, I'd fix it but when I finish the core of my app Mar 12 21:05:01 So I'm trying to decide how I should manage this, I'm procedurally generating a view hierarchy from JSON and adding it to the bottom of a scrollview, but one of the potential views at the bottom of the hierarchy will have a button that needs to open up a a DialogFragment. Mar 12 21:08:52 1) I could pull out the Activity from the view.getContext(), asserting that the base context to generate the view always has to extend from AppCompatActivity Mar 12 21:09:15 Does anyone know how to put a hyperlink in a textview via xml? I've been all over stackoverflow and their solutions are always for links explicitly written out, i.e. "www.google.com" instead of "Google" which when touched takes you to google.com Mar 12 21:09:16 2) I could inject a SupportFragmentManager into the bottom level view Mar 12 21:10:08 3) I could fire an event into an event bus that the activity would subscribe to in order to display the dialogFragment Mar 12 21:11:19 #3 means that I wouldn't be able to DRY up the code very well since you can't Subscribe to events in parent classes Mar 12 21:11:32 ReadilyBacon, Button with background="#00000000" Mar 12 21:11:34 and 2 would mean that I would have to build my object graph for each activity Mar 12 21:11:38 ReadilyBacon, (No really never do that) Mar 12 21:11:44 But #1 doesn't seem clean either Mar 12 21:14:27 Unless... hmmmmmm Mar 12 21:16:59 i'm using a gson to convert json data to java objetc. everything works fine, the olny problem is that real object has some properties named like "foo " with space at the end. I tired with @SerializedName("foo ") but it doesn't work. Can someone help me? Mar 12 23:17:28 Anyone know of a good way to mesure how expensive it is to call Paint.reset()? I am wondering if it is better to use one Paint and reset/reconfigure it a few (upto 5?) times during onDraw or provide a few different Paint objects already configured as needed. Mar 12 23:18:13 I looked at the source of Paint, but it has some native parts that i wouldnt know how to evaluate at all Mar 12 23:22:56 hey, one of my friends just told me that his game that i installed a few days ago was actually stealing my whatsapp messages.. is that really even possible? Mar 12 23:56:45 only if whatsapp stores messages on external storage Mar 12 23:59:39 https://github.com/ribot/android-boilerplate/blob/master/app/src/main/java/uk/co/ribot/androidboilerplate/data/DataManager.java Mar 12 23:59:50 can you explain how getRibots() is called twice? Mar 13 00:01:21 it's a db call. On first call, db is empty and a notification shows that the dataset is empty Mar 13 00:01:39 then there is a network call, then getRibots() is called once more Mar 13 00:02:43 pfn: doesnt it? Mar 13 00:05:40 why would it? Mar 13 00:07:12 oh Mar 13 00:07:33 there is no possible way to read internal memory through app privileges? Mar 13 00:15:00 pfn: how about intercepting whatsapp messages? is that technically feasible? Mar 13 00:15:13 oh neat. Sqlbrite works really nicely with rxjava Mar 13 00:15:36 if you subscribe to the observable returned by a query, you are notified when the table's dataset changes Mar 13 00:15:51 hm .. I wonder why reading my README.md on gitHub looks different than on bintray (even though it imports it).. the code blocks on bintray look broken Mar 13 00:35:54 is there a pattern for rxjava where the observable is notified when the dataset changes? Mar 13 00:43:24 RustyShackleford: Wouldn't it be best to pass a new dataset into the observable? Mar 13 00:44:45 e.g. use a BehaviorSubject or PublishSubject instead of an observable Mar 13 01:09:37 konk3r: maybe? I'm new this library hah Mar 13 01:09:59 I have a List getRoutes() which makes a db call Mar 13 01:10:20 correction Observable> getRoutes() Mar 13 01:10:42 theres also Observable> syncRoutes() which makes a network call and stores it in the db Mar 13 01:11:13 ideally whenever syncRoutes() finishes its work, the Observable returned by getRoute() will be notified Mar 13 01:22:03 If I have TypeA and a generic OtherClass can I use TypeA as the type, or does it have to be a subclass of TypeA Mar 13 01:22:04 ? Mar 13 01:23:18 uh... thats a good question. Try it and see what the compiler says? Mar 13 01:23:35 I think you could use TypeA as the type argument Mar 13 01:24:44 i'm not sure if you can use instanceof instead Mar 13 01:24:51 rowan: You can use TypeA Mar 13 01:25:14 I'm 95% Mar 13 01:26:16 k thanks guys Mar 13 01:26:54 RustyShackleford: Look up PublishSubject, it sounds like it will do what you need. Mar 13 01:27:14 You pass it, and anytime new information comes in you can notify your publish subject and it will call your observer Mar 13 01:27:48 alright. I've been hunting through the Sqlbrite source to see how they do it Mar 13 01:28:04 I'll read those docs, but using Sqlbrite might be easier hah Mar 13 01:30:25 konk3r: so, which method returns a PublishSubject? Mar 13 01:30:33 that would be my getRoutes() method? Mar 13 01:31:01 Both Mar 13 01:31:11 You'd use a PublishSubject instead of an Observable Mar 13 01:31:29 You'd need them to both be the same PublishSubject though Mar 13 01:32:25 "A PublishSubscriber is both an Observable and an Observer at the same time" Mar 13 01:32:29 *head explodes* Mar 13 01:33:10 Don't let it confuse you too badly, it just means it's an observable that you can pass new objects into Mar 13 01:33:51 So in your case it's basically an Observable> that you can pass new routes to and it will call all of its subscribers again Mar 13 01:34:02 this does look like it would work perfectly Mar 13 01:34:23 rxjava is sweet. I wish I already knew this library and the confusion stage was over Mar 13 01:34:36 Oh, don't worry Mar 13 01:34:41 You have plenty of confusion ahead ;) Mar 13 01:34:53 But it's all worth it. Plus it feel really satisfying when things start to click Mar 13 01:35:10 those lightbulb moments are why programming is fun Mar 13 01:35:11 i have a problem convert a json to java object with gson. The problem is last comma http://paste.ofcode.org/w7bGAQ9aBaTZnnuZiqM59e . Any idea? Mar 13 01:35:41 slani: the gson library doesn't like the trailing comma? Mar 13 01:35:57 there might be an option you can pass to the library to make it less strict Mar 13 01:36:48 hmm trailing commas violate the json spec. process the file before you open it so that the trailing comma is gone? Mar 13 01:37:08 ^^ That's not valid JSON, so libraries probably won't be able to handle it Mar 13 01:37:44 JSON is like XML, it has very strict requirements Mar 13 01:38:05 i've seen similar things on these api's Mar 13 01:38:26 how do these devs even have jobs lol. How can you botch that one? Mar 13 01:39:10 slani: setLenientMode() will fix your trailing comma problem Mar 13 01:39:25 Oh wow, I'm surprised that exists Mar 13 01:39:33 it will read an extra value though, null Mar 13 01:39:45 you still have to work around the problem Mar 13 01:45:55 RustyShackleford: hm Mar 13 01:46:08 wiht Gson? Mar 13 01:46:31 slani: I just googled it, can't say for sure Mar 13 01:46:39 but yes, with gson Mar 13 01:48:28 gson doesn't has setLenient() Mar 13 01:50:29 https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) Mar 13 02:01:41 is Build.VERSION_CODES deprecated or something? Mar 13 02:02:34 (just wondering why it ends with M instead of Marshmellow or even N, now that marshmellow has been out awhile and N is in beta.) Mar 13 02:03:44 RustyShackleford: but I'm using gson converter Mar 13 02:05:15 Using API 23, I guess it's just M here then? I'm just confused why the convention ended. If M works that's cool. Mar 13 02:12:57 Maybe because the dev preview came out way before release and they either forgot to change it or didn't want to make people change apps they had already built using .M **** ENDING LOGGING AT Sun Mar 13 02:59:58 2016