**** BEGIN LOGGING AT Mon Feb 23 02:59:59 2015 Feb 23 03:02:01 When an app increases its api level say to 16, what happens to older users with devices with api level <16? Can they see there is a new version Feb 23 03:06:35 i think a cool app would be something that helped you tie a certain know applicable to a situation Feb 23 03:06:43 s/know/knot Feb 23 03:07:06 'need to tie 2 ropes together" -> pick knots -> real time help via camera Feb 23 03:07:18 maybe thats better suited to MS hololens Feb 23 03:10:03 that honestly sounds like a really cool app g00s Feb 23 03:10:22 hard to use maybe cuz humans only have 2 hands though haha Feb 23 03:10:32 oh yeah :D Feb 23 03:10:55 hold phone with hands, tie know with toes :) Feb 23 03:11:03 dang, s/know/knot Feb 23 03:12:45 hey, do you think you could help me with a peculiar issue with AS? Feb 23 03:13:04 don't ask to ask Feb 23 03:13:17 good advice povaddict Feb 23 03:14:38 im following a guide on reddit to building my first android app, and im stuck on just making a new project with AS. Feb 23 03:15:23 when i make the project, it gets stuck on "Gradle: Build" Feb 23 03:15:49 gimme a sec to find a stackoverflow link i found earlier of another dude with a similar problem Feb 23 03:16:36 http://stackoverflow.com/questions/24345488/gradle-gets-stuck-at-either-build-or-assembledebug-when-using-the-64bit-or-3 Feb 23 03:17:29 any ideas? Feb 23 03:17:46 updated? Feb 23 03:17:47 restart? Feb 23 03:17:55 make sure sdk is not in as folder Feb 23 03:17:58 update sdk Feb 23 03:18:02 restart Feb 23 03:19:29 alosec: try using gradle out of the IDE -- see if it's gradle or AS. use --info --stacktrace --debug ... or something similar Feb 23 03:19:55 AS should be up to date if i just installed it today, right? and i restarted a couple times Feb 23 03:20:10 bankai_, how do i do that? Feb 23 03:20:38 cd to the project dir and run the gradlew script Feb 23 03:26:51 the gradlew script fails Feb 23 03:27:25 with: Exception in thread "main" java.lang.RuntimeException: java.net.SocketException: Invalid argument: connect Feb 23 03:30:02 alosec: Are you using wireless adb? Or is a device connected? Feb 23 03:31:31 im trying to make a new project Feb 23 03:32:16 using this tutorial: http://www.reddit.com/r/Android/comments/2tpjep/the_new_step_by_step_guide_detailing_how_to_get/ Feb 23 03:32:57 Oh gawd. An /r/Android tutorial. Feb 23 03:33:20 haha is there a better one to reference? Feb 23 03:33:47 "This means that Java is a programming language based on the concept of objects, which are essentially fields of data that can run code and store variables." Feb 23 03:34:57 "objects are fields of data"? Feb 23 03:35:00 Maybe this is the best: http://developer.android.com/training/basics/firstapp/index.html Feb 23 03:35:02 Not sure, though. Feb 23 03:35:06 It's hard to find an awesome starting guide. Feb 23 03:35:30 alosec: If you need a tutorial, join ##java and type “~tutorial" Feb 23 03:35:40 It's funny how later he says "A variable holds a field of data". Feb 23 03:36:10 thanks for the tips, TacticalJoke, cbeust_ Feb 23 03:36:53 i feel that no matter the tutorial i follow this problem with AS/gradle will be an issue though, right? Feb 23 03:37:27 Yes. Feb 23 03:37:30 Which OS are you using? Feb 23 03:37:41 win7 64bit Feb 23 03:37:46 Same here. No issues with mine. Feb 23 03:37:55 whats your jdk version? Feb 23 03:37:57 Maybe your firewall is blocking the Gradle download. Feb 23 03:38:19 1.7.0_71-b14 Feb 23 03:38:35 alosec: I had to allow java.exe in my application-level firewall. Feb 23 03:38:44 (Outbound.) Feb 23 03:39:41 windows firewall is disabled Feb 23 03:41:03 Hi, what method is called everytime a fragment becomes visible? Feb 23 03:42:53 http://developer.android.com/guide/components/fragments.html <-- fragment lifecycle Feb 23 03:43:07 alosec: Is there any firewall at all? Feb 23 03:43:35 dvass actually bookmark this one https://raw.githubusercontent.com/xxv/android-lifecycle/master/complete_android_fragment_lifecycle.png Feb 23 03:44:18 my router has a firewall enabled. unlikely that its that, but possible Feb 23 03:44:22 good thing to check, thanks Feb 23 03:44:55 Also, are you using a 64-bit AS with a 64-bit JRE? Feb 23 03:45:05 ahhhh Feb 23 03:45:08 this is for android app dev Feb 23 03:45:28 should be 64bit AS, how do i verify that? Feb 23 03:45:50 and yes 64bit JRE Feb 23 03:46:05 alright Feb 23 03:46:08 Hmm, g00s, what happens when I switch (say in a slider view) to another fragment and then go back to the original fragment Feb 23 03:46:12 what lifecycle iwll it go through? Feb 23 03:46:28 I tried using onResume but it seems to get called when I press the home button and the app gets minimised Feb 23 03:46:32 dvass insert some logs and find out Feb 23 03:46:42 sad thing is, i probably even have to think about it :D Feb 23 03:47:11 will do Feb 23 03:47:18 but why would onResume be called at that point Feb 23 03:47:35 onResume when going to the background ? Feb 23 03:47:47 hey guys does studio.sh install android studio? will it install in that directory so should i like move it out of "downloads" before running the script Feb 23 03:47:50 http://developer.android.com/sdk/installing/index.html?pkg=studio Feb 23 03:47:59 Yep Feb 23 03:48:29 dvass: was that to me? Feb 23 03:48:31 tejasmanohar: no, studio.sh *runs* android studio Feb 23 03:48:31 dvass on one hand, fragment lolcycle never dissapoints (surprises) but that seems messe up Feb 23 03:48:54 tejasmanohar: there's no "installer", you just unzip what you downloaded Feb 23 03:49:04 ohh ok Feb 23 03:49:11 No sorry tejasmanohar Feb 23 03:49:16 god irssi is weird to use, my message keeps overwriting place of last one Feb 23 03:49:35 try weechat :) Feb 23 03:49:45 g00s: Yep, because in the onResume I'm calling a function to do stuff with the view. as soon as I hit the home button it calls that function Feb 23 03:49:54 looks easier :P Feb 23 03:49:56 and then it crashes as the view is non existent Feb 23 03:50:07 dvass what device out of curiosity? Feb 23 03:50:11 ok im gonna try weechat lol Feb 23 03:50:16 alosec: The only way I can see is to open the Task Manager (Ctrl+Shift+Esc) and look for 'studio'. See whether it says 'studio64.exe'. Feb 23 03:50:44 GS Feb 23 03:50:50 I have to go AFK for a bit. Not sure what's causing your problem. :\ Feb 23 03:50:51 3 4G * Feb 23 03:51:05 dvass try using the support fragments Feb 23 03:51:12 if yo uthink something has gone crazy Feb 23 03:51:42 alrighty np thanks for your help TacticalJoke Feb 23 03:56:11 g00s: :( All I want is a way to know whenever the fragment is opened. Feb 23 03:56:35 should be onStart or onResumed i'd guess Feb 23 03:58:58 g00s: onResume does work but only if you back out of the app. Not if you slide between two fragments Feb 23 04:27:21 openjdk vs. oracle Feb 23 04:27:28 installing jdk for android studio Feb 23 04:31:54 so i can learn android development w/ go now? Feb 23 04:32:50 W/o Go is better. Feb 23 04:33:14 TacticalJoke: are you converting to kotlin? Feb 23 04:33:24 Not yet. I'll definitely consider it in the future. Feb 23 04:34:46 bankai_ what are your experiences so far , i see you are in #kotlin also :) Feb 23 04:35:05 Argh this fragment lifecycle is killing me! Feb 23 04:35:25 how can I detect when the fragment becomes visible through a change in actiobar tabs? Feb 23 04:35:30 dvass: You're still alive. Fight it! Feb 23 04:35:38 I keep searching but nothing fruitful is coming up Feb 23 04:35:49 TacticalJoke: sooo can i use it now tho? for basic stuff at least? Feb 23 04:36:01 The programming language Go? No, I don't think so. Feb 23 04:36:11 just testing it out for the moment, g00s -- converting some samples from java -> kotlin for iOS. I've had to resort to javap a few times haha Feb 23 04:36:16 TacticalJoke: oh :\ i read about apis being added online sucks Feb 23 04:36:17 You can use Kotlin if you want something that's not Java. Feb 23 04:36:30 TacticalJoke: i know go alright but java minimally only from school lol Feb 23 04:36:46 so i was just trying to find something i know lol Feb 23 04:37:01 K kotlin looks alright Feb 23 04:37:02 javas fairly simple man, give it a shot Feb 23 04:37:08 you can figure out most stuff as you go Feb 23 04:37:10 I'd probably suggest Java to start, I think. Feb 23 04:37:13 Rather than Kotlin. Feb 23 04:37:15 can i use scala Feb 23 04:37:29 tejasmanohar yes, ask pfn about it Feb 23 04:37:42 pfn: you use scala w/ android? Feb 23 04:38:16 yes Feb 23 04:38:46 how can you not know java if you know scala? Feb 23 04:39:24 pfn: i dont know scala Feb 23 04:39:35 yeah, learn java first Feb 23 04:40:02 Java + RxJava is pretty awesome Feb 23 04:40:03 pfn: aight, what resources do you guys use to learn java extensively? or do i need to learn java extensively before diving into android development? Feb 23 04:40:15 i generally just learn as i go w/ languages since i just code for fun, not job Feb 23 04:40:22 you should be very familiar with Java firs Feb 23 04:40:25 oh ok Feb 23 04:40:35 i only know basics from AP CS Feb 23 04:40:45 tejasmanohar: Have you downloaded Android Studio yet? Feb 23 04:40:48 but i know other programming languages Feb 23 04:40:50 thinking in Java and java concurrency in practic e are good starting point books Feb 23 04:40:54 yeah just downloaded Feb 23 04:40:56 If you know various languages Java should be fairly easy. Feb 23 04:41:04 Aight Feb 23 04:41:08 StackOverflow and the Oracle tutorials will answer all of your questions. Feb 23 04:41:10 TacticalJoke: did you ever solve the gif thing? Feb 23 04:41:18 Oh, not yet, lasserix. Feb 23 04:41:28 Not many "OOP" langs, just lots of dynamic + weak type stuff Feb 23 04:41:29 I was planning. I go through planning bouts like that. :D Feb 23 04:41:34 oh well if you can wait for a couple of days im making an animated image view Feb 23 04:41:35 lasserix: what? Feb 23 04:41:40 lasserix: Oh, nice. Feb 23 04:41:40 not sure if i'll make a gif decoder Feb 23 04:41:45 oh you asked TacticalJoke sry Feb 23 04:41:47 lasserix: Will it support zoming? Feb 23 04:41:47 *i might have to in the future Feb 23 04:41:49 zooming Feb 23 04:41:50 * Feb 23 04:42:02 maybe Feb 23 04:42:29 I think my users won't *require* zooming for animated GIFs, so it's not a show-stopper. Feb 23 04:42:48 Though I definitely need to make ImageView zoomable. That looks fairly easy. Feb 23 04:43:30 lasserix: Are you making an app which needs one? Feb 23 04:43:36 An animated image viewer. Feb 23 04:43:43 yeah Feb 23 04:43:55 basically animationdrawable + controls Feb 23 04:43:57 Is Movie any good? Feb 23 04:44:00 Ah, cool. Feb 23 04:44:13 i think idea is you render gif as a movie not sure Feb 23 04:44:29 i can get away with animation drawable for now so ill use that since it has a bunch of things for me already Feb 23 04:45:41 openjdk vs. jdk Feb 23 04:46:02 JDK in the sixth round. Feb 23 04:47:23 TacticalJoke: 6th round? Feb 23 04:47:26 tejasmanohar: which OS are you on ? Feb 23 04:47:50 arch linux Feb 23 04:47:53 right now Feb 23 04:48:02 ill move back to os x in may Feb 23 04:48:03 shmooz takes a momentary break from Tribes. :D Feb 23 04:48:05 try openjdk Feb 23 04:48:31 kk Feb 23 04:48:35 I got stuck in a teleport pad Feb 23 04:48:38 haha Feb 23 04:48:42 I remember those things. Feb 23 04:48:51 https://wiki.archlinux.org/index.php/java#Installation Feb 23 04:48:54 which one Feb 23 04:48:58 it doesn't matter which jdk. Feb 23 04:49:04 jre8-openjdk ? Feb 23 04:49:07 oh Feb 23 04:49:18 what is jre then Feb 23 04:49:25 runtime Feb 23 04:49:30 ohhh ok Feb 23 04:49:45 TacticalJoke: stop wasting time here and play some Tribes already Feb 23 04:50:47 I'd finish my app in about 20 years if I did that. Feb 23 04:58:49 i'm so screwed. android doesn't give a way to change BLE connection timing until 5.0 - and the peripheral doesn't seem to request a timing change when mass data transfers making this impossibly slow Feb 23 04:59:35 seems like it has a high connection priority on connection, and then the central downgrades the priority after service discovery Feb 23 05:00:01 that part make sense, don't want service discovery to take all day ... but ugh Feb 23 05:00:52 how can this get any lamer Feb 23 05:01:04 g00s: tell them to stick it in a support lib Feb 23 05:01:14 shmooz :D Feb 23 05:02:06 i guess i could make my ble stuff 5.0 only O.o Feb 23 05:03:12 minSdkVersion 21 Feb 23 05:03:37 when do you guys think we can say that like we do now with minSdk=16 ? Feb 23 05:03:50 2 years maybe ? Feb 23 05:04:23 I'll always support 2.1 and above if I can Feb 23 05:04:35 God, Kristen Stewart is weird as hell: http://youtu.be/6Dht__ajVD4 Feb 23 05:04:40 you're fired I'm hired! Feb 23 05:04:42 ravioli would be proud of you shmooz Feb 23 05:05:49 tejasmanohar: you can change easily switch between default jdk in archlinux Feb 23 05:05:50 Cutting to the chase: http://youtu.be/6Dht__ajVD4?t=48s Feb 23 05:06:18 archlinux-java status will tell you the current jdk in use and the list of jdks availiable Feb 23 05:07:20 if you have java8-jdk from oracle installed then you can set that as the default by archlinux-java set Feb 23 05:10:13 TacticalJoke i can watch those people Feb 23 05:10:16 *can't Feb 23 05:43:55 shmooz, wasted effort Feb 23 05:44:34 pfn: I'm glad your qicr app works on my gingerbread phone still Feb 23 05:45:04 Is there any AudioManager.RINGER_MODE_SILENT alternative for detecting media volume? Feb 23 05:48:16 http://developer.android.com/sdk/installing/index.html?pkg=studio Feb 23 05:48:31 shmooz, only because it was originally written while 2.2 was the newest version Feb 23 05:48:43 how "start Android Studio from any directory"? ive added to $PATH Feb 23 05:49:55 studio.sh Feb 23 05:52:29 tejasmanohar maybe linux isn't the right platform ;) Feb 23 05:53:04 g00s: sorry, im pretty new to bash and all Feb 23 05:53:18 then why are you using linux :P Feb 23 05:53:27 versus? Feb 23 05:53:33 gotta start somewhere ok Feb 23 05:53:35 are you planning to learn linux, java, and android development all at the same time? Feb 23 05:53:57 and programming, don't forget programming Feb 23 05:54:08 i know programming Feb 23 05:54:19 i just dont know all basics of linux like path Feb 23 05:54:22 gotta read about it Feb 23 05:54:30 https://github.com/tejasmanohar Feb 23 05:54:44 what operating system were you using that didn't have it Feb 23 05:55:01 none Feb 23 05:55:05 even win has PATH afaik Feb 23 05:55:15 yes Feb 23 05:55:35 zinx: lets just say i copied a lot of $PATH stuff into bash_profile etc even when i was using linux before w/o reading about it Feb 23 05:55:40 makes sense? Feb 23 05:55:43 its bad Feb 23 05:55:44 im reading about it now Feb 23 05:56:36 hm, this thing looks pretty decent for $700 http://hothardware.com/reviews/asus-zenbook-ux305-review Feb 23 05:56:55 does that make sense, zinx? Feb 23 05:57:20 oh QHD is $1200 Feb 23 05:57:23 :( Feb 23 05:57:32 like rvm, nvm, etc tell me what to put there Feb 23 05:57:53 g00s yeah,u can work a t13" monitor? Feb 23 05:58:18 lasserix ... i dont' think so. using 15" now thats about as small as i can do probably Feb 23 05:58:34 heh yeah Feb 23 05:58:41 kinda miss those old 17" MBP Feb 23 05:58:52 i want to make a briefcase that is two or three moniters Feb 23 05:59:02 that folds out into a workstation you can plug your laptop into ;p Feb 23 05:59:11 :D Feb 23 06:00:00 have you used subject much? Feb 23 06:01:25 Bai. Feb 23 06:04:35 MikeWallaceDev are you still here? I figured out the solution to my RecyclerView click event problem. Instead of setting an onTouchListener on the RecyclerView itself, set onClickListeners on the textviews you're trying to get IN the adapter. Feb 23 06:09:59 Is there no XML version of ListView.setOnItemClickListener (like the XML version of Button.setOnClickListener is onclick="")? Feb 23 06:10:03 onClick* Feb 23 06:10:58 duncannz: Do not use onclick in XML Feb 23 06:11:09 oh, why not? Feb 23 06:11:18 what do you use? Feb 23 06:11:19 It's too easy to break Feb 23 06:11:34 I use ButterKnife's @OnClick, but even the regular listener interface in JAva is better Feb 23 06:11:44 (than XML) Feb 23 06:11:58 can you please explain why it is too easy to break? Feb 23 06:12:11 Rename your Java method, forget to rename the XML Feb 23 06:12:23 or make a typo in XML Feb 23 06:12:30 duncannz: its bad coding practice good for quick prototyping, but never stick to it Feb 23 06:13:15 ProGuard also can rename methods even if you have it right. Feb 23 06:13:24 There's that too Feb 23 06:13:28 Also old classloaders have a potential of choking and dying since it uses reflection to lookup the method: http://corner.squareup.com/2012/08/getting-to-the-bottom.html Feb 23 06:14:39 which there were slightly more tutorials on rxjava in android Feb 23 06:14:56 lasserix: Any questions? Feb 23 06:17:54 sure, in this tutorial Feb 23 06:17:54 http://andraskindler.com/blog/2013/using-rxjava-in-android/ Feb 23 06:18:09 if i wanted to just do one city, instead of doing the flat map thing, how would i do that? Feb 23 06:18:48 err how do I combine Observable.from ---- and .subscribe? or is the subsrcibe in that last code snippet like an anonymous subscriber Feb 23 06:19:53 Even with just one city, you'll still have to flatMap since the return value is Observable and not City Feb 23 06:19:55 https://gist.github.com/tejasmanohar/3b82f4aec91041edadda Feb 23 06:19:57 :\ Feb 23 06:19:59 (I just read this quickly) Feb 23 06:20:02 installing android studio fail Feb 23 06:20:06 hey, does the android compiler compile java only or does it convert JVM bytecode to the bytecode used on Android devices? The reason I ask is I would like to use jython in an Android app Feb 23 06:20:16 ah right Feb 23 06:20:22 Also, retrofit supports rx directly now so the methods on the interface can return Observable directly, so you no longer need to wrap them Feb 23 06:20:31 so about the other part? here is defining a "anonymous" subscriber Feb 23 06:20:35 cbeust: what is rx? Feb 23 06:20:36 in the last code snippet Feb 23 06:20:48 phix: RxJava, and we're discussing the Android flavor of it Feb 23 06:20:58 cbuest yeah i am aware of that thanks Feb 23 06:20:59 cbeust: I use retrofit, it is great Feb 23 06:21:05 phix: So do I Feb 23 06:21:13 so do I :) Feb 23 06:21:16 cbeust: Have you used jython at all? Feb 23 06:21:24 JakeWharton: shocker :) Feb 23 06:21:35 phix: Not in about five years :) Feb 23 06:21:45 cbeust: ouch, 2.2 was the worst Feb 23 06:21:53 2.7beta4 is pretty good :) Feb 23 06:22:04 still in beta though :L( Feb 23 06:22:06 phix: Not really relevant to me, I have very little interest in Python Feb 23 06:22:08 yeah my android studio installation is failing, trying to install it to get started Feb 23 06:22:10 i am on arch linux Feb 23 06:22:13 Python <3 Feb 23 06:22:18 https://gist.github.com/tejasmanohar/3b82f4aec91041edadda Feb 23 06:22:22 ^ error Feb 23 06:22:31 in downloading components stage Feb 23 06:22:51 wowow JakeWharton: are you the guy from github? Feb 23 06:23:04 lol sorry that sounds dumb but ive seen so many repos starred of yours Feb 23 06:23:51 if a hot observable emits freely how do you trigger it to process at all? Feb 23 06:24:08 you don't. you just subscribe when you care about the output Feb 23 06:24:48 do most of people here use android studio? Feb 23 06:24:51 or some other IDE? Feb 23 06:24:56 or just text editor + compiler? Feb 23 06:25:18 I use AS...reluctantly Feb 23 06:25:21 almost everyone uses an IDE Feb 23 06:25:32 thanks for the suggestion of ButterKnifo, cbeust Feb 23 06:26:00 aight Feb 23 06:26:04 android studio best for starters? Feb 23 06:26:09 quick question though, does your IDE also say "method foo is never used" even though you wrote @OnClick(R.id.bar) before the method definition Feb 23 06:26:27 one of my friends was telling me about using a vim workflow for android dev Feb 23 06:26:30 tejasmanohar: if you are on arch, simply install Android Studio from the AUR :) Feb 23 06:26:32 duncannz: only until you compile for the first time Feb 23 06:26:35 much easier than other distros Feb 23 06:26:39 ok thanks JakeWharton Feb 23 06:26:41 Yeah you can disable these inspections if the warning bothers you (not sure AS lets you do that for individual methods though) Feb 23 06:26:44 once you compile a class will be generated that refers to the fields / methods Feb 23 06:26:49 ok sweet Feb 23 06:29:09 duncannz: aight, ill do that Feb 23 06:30:51 yaourt -S android-studio ah Feb 23 06:30:58 oh i searched android studio on aur before Feb 23 06:31:00 not android-studio Feb 23 06:31:01 dumb Feb 23 06:31:24 There's no problem doing lengthy network operations using rx java in a service? Feb 23 06:31:49 Ugh still failing duncannz Feb 23 06:31:55 all urls 404 Feb 23 06:31:57 what is wrong? Feb 23 06:32:09 lib32-wayland-1.6.1-1-x86_64.pkg.tar.xz 404s from all mirrors Feb 23 06:32:25 actually looks like it may have gotten it from one now Feb 23 06:32:31 have you got multilib? Feb 23 06:32:44 ok haha Feb 23 06:33:13 oh yes i do Feb 23 06:33:24 I need to get some json pojos in an api call, which I would do with an observable... is there a way to in the transformation chain cause the pojos to be picked apart for some urls that start a download based on those urls? Feb 23 06:33:30 i enabled it during my arch setup process in that pacman list iirc since im on a 64 bit system Feb 23 06:33:43 was instructed to by some guide, sorry new to this system, just installed arch yesterday Feb 23 06:33:54 lasserix: Sure Feb 23 06:34:06 lasserix: retrofit + map that turns the JsonObject into your DTO Feb 23 06:34:13 enjoy arch, it's a great distro once you get everything worked out :) Feb 23 06:34:19 then have a subscriber that accepts that DTO Feb 23 06:34:34 duncannz: im starting to love it already, yaourt is a boss Feb 23 06:35:02 cbuest so the idea is that the DTO will have urls to some images, but i need to serialize those images, then i want to swap out the urls for the serialized path Feb 23 06:35:37 so the view subscriber at the very end will get the original dto with the urls, then also get the updated dto with the path once the downloading is finished Feb 23 06:36:30 Sounds like your DTO might have a Future in it? Feb 23 06:36:41 no just want path Feb 23 06:36:49 have to enable offline viewing Feb 23 06:36:58 ill let picasso mem cache it later Feb 23 06:37:27 but i see where you are going with that idea Feb 23 06:37:39 duncannz: still gotta run that studio.sh after installing from AUR Feb 23 06:37:48 duncannz: to get components, hopefully doesnt error same thing Feb 23 06:37:52 tejasmanohar: I didn't have to.. Feb 23 06:38:06 duncannz: wait what-- howd u open program? Feb 23 06:38:26 I simply downloaded the tarball, extracted it, executed "makepkg -sic" and then it was installed Feb 23 06:38:41 ie. in my DE's menu and I just had to open it Feb 23 06:38:55 duncannz: haha strange, not showing in gnome's apps for me :\ Feb 23 06:39:01 yeah gnome here too Feb 23 06:39:07 wow Feb 23 06:39:11 ok then Feb 23 06:39:25 or maybe it did and then i missed it now it is but it is also installing now Feb 23 06:39:34 whatever, studio.sh is running seems not to error yet :P Feb 23 06:39:57 duncannz: should be no prob w/ running studio.sh again right? Feb 23 06:40:24 the worst that can happen is you have to reinstall so just do it I guess Feb 23 06:40:32 yeah Feb 23 06:40:33 welp Feb 23 06:46:32 I tried to use butterknife to @OnClick an action bar item but it said required view R.id.action_settings not found. Is there a way to do this with ButterKnife or am I stuck with an ugly switch() in onOptionsItemSelected Feb 23 06:46:44 switch Feb 23 06:47:00 alright then Feb 23 06:47:36 duncannz: Make sure your view has that id Feb 23 06:47:50 cbeust: that id is the id of an action bar item Feb 23 06:48:00 so obviously ButterKnife doesn't work with it Feb 23 06:48:02 It's an @+id? Feb 23 06:48:12 Does your IDE autocomplete on it? Feb 23 06:48:58 you may be missing the question but yes Feb 23 06:49:21 findViewById operates on the content view which does not include the action bar's views Feb 23 06:49:30 moreover, i don't think the action bar copies the menu id over to the view Feb 23 06:49:39 but i actually can't remember that anymore Feb 23 06:50:44 even if it did work, you shouldn't use it that way since the menu dispatch system is much more involved than views Feb 23 06:51:12 alright Feb 23 06:52:46 g00s https://medium.com/brigade-engineering/custom-layout-interaction-on-android-with-no-strong-references-555c796705b6 Feb 23 06:55:09 some of that code is scary, and definitely not thread-safe Feb 23 06:55:27 the stateful module is very scary Feb 23 06:55:41 oh thanks Feb 23 06:56:02 modules arent supposed to be stateful? Feb 23 06:56:43 JakeWharton: one other thing while you're here, I've seen both of these ways to write onOptionsItemSelected, which one do you prefer (as you can clearly see I don't understand what the supermethod does etc) Feb 23 06:56:46 nothing prevents you from doing it, but it's not the place for state Feb 23 06:57:15 duncannz: second one Feb 23 06:57:22 thanks Feb 23 06:57:23 :) Feb 23 07:06:56 JakeWharton: ahh thanks, dunno dagger well enough but think i get it Feb 23 07:09:01 can you extend context menus in android via an app? Feb 23 07:09:02 w/o root Feb 23 07:09:23 like when a user highlights text the menus that have copy, paste, etc. Feb 23 07:09:27 add an icon + function there? Feb 23 07:09:40 no Feb 23 07:12:01 well you "could" do it without root.. but you will have to modify the rom :) Feb 23 07:13:12 also i dont know why its called the rom .. cause clearly its not read-only its access controlled Feb 23 07:17:22 its a historical thing Feb 23 07:18:20 yeah i know :) was just being facetious Feb 23 07:18:39 i know historically old phones used to have the firmware on rom Feb 23 07:29:59 How many users do you guys usually have on an app 1 month after release and is there a scale of whats considered little / a lot? Feb 23 07:39:31 zero Feb 23 07:39:38 ;_; Feb 23 07:40:01 :( Feb 23 07:40:23 mornin people Feb 23 07:40:23 haha, just kidding Feb 23 07:40:28 mornin Feb 23 07:40:56 actually dunno, I work for a company so I dont need to know the figures Feb 23 07:41:07 but I guess it is slow in the start Feb 23 07:41:19 It kinda needs to go viral in some way Feb 23 07:41:29 then it explodes and youll be a billionair Feb 23 07:43:54 alright! :D Feb 23 07:55:23 i have no clue what to build :P Feb 23 08:02:53 "the people have spoken...most of it was complete gibberish" Feb 23 08:02:56 \o/ Feb 23 08:09:26 hello, I've a problem with compilation (java: cannot find symbol) https://gist.github.com/mcrozz/ed4963bea81fe53b6270 Feb 23 08:13:46 whats up lemonxah Feb 23 08:14:01 blwh .. super bored at this place Feb 23 08:14:13 nothing to work and my brain doesn't want to learn kotlin Feb 23 08:14:30 is there all that much to learn? :P Feb 23 08:14:53 exactly Feb 23 08:14:56 :) Feb 23 08:17:07 nah its not that much to learn but its still too much for me at this stage dont know why though Feb 23 08:17:37 i wish ceylon was a little further along on android; i'd be more interested in something that changed the way i think about things Feb 23 08:17:38 i might just stick with scala for now Feb 23 08:17:53 yes that is what scala does for me too Feb 23 08:18:09 its not just a different language from java but they you code is also different Feb 23 08:18:15 they way you approach problems Feb 23 08:18:18 but kotlin will give yout hat too Feb 23 08:18:32 s/yout hat/you that/ Feb 23 08:18:55 now if i was starting something from scratch, i'd go with kolin but most of my architecture is in place, not a whole to more to add - don't feel like rewriting things Feb 23 08:19:22 that is how i feel about going away from scala at the moment Feb 23 08:19:36 built a nice framework and i dont want to redo it right now Feb 23 08:19:45 the framework is months in the works :/ Feb 23 08:19:56 lemonxah what does the framework do ? Feb 23 08:20:17 implicit lazy context Feb 23 08:20:28 JakeWharton: found this on twitter today, thought you might be interested https://github.com/andrewoma/kwery Feb 23 08:21:13 instead of having to write TextView tv = (TextView)view.findViewById(R.id.tv); tv.setText("sometext"); Feb 23 08:21:28 i would just do XTextView(R.id.tv).text = "sometext" Feb 23 08:22:05 or XButton(R.id.button, view => { /* some onclick code */ }) Feb 23 08:22:22 or XButton(R.id.button).onClick = view => { /* some onclick code */ } Feb 23 08:22:29 lemonxah have you seen http://kotlinlang.org/docs/reference/type-safe-builders.html Feb 23 08:22:44 yeah i have Feb 23 08:23:12 but that doesn't have implicit context Feb 23 08:23:44 but its not all the framework does :) Feb 23 08:25:29 bookz Feb 23 08:25:33 ooops lol Feb 23 08:25:52 one of the cool things about kotlin is the null checks Feb 23 08:26:04 if something can be null just append it with ? and then you dont have to do null checks Feb 23 08:26:24 i also like that type safe casting thing Feb 23 08:26:26 but i have that in scala aswell Feb 23 08:26:45 lemonxah does scala let you overload methods ? Feb 23 08:26:50 yes Feb 23 08:26:59 cant do that in kotlin - irritating Feb 23 08:27:04 why not? Feb 23 08:27:08 you should be able to Feb 23 08:27:10 unless i read wrong ? Feb 23 08:27:13 you just have to mark the calss as open Feb 23 08:27:21 so open class foo {} Feb 23 08:27:24 then you can extend it Feb 23 08:27:38 i hope i am wrong :) Feb 23 08:27:58 hi guys, is it possible to let the user select a ttf file and load that in my typeface? all the examples i find seem to be pointing to the fact that the fonts must be inside my apps assets/ dir Feb 23 08:28:34 nm, found the createFromFile option ;) Feb 23 08:28:37 lemonxah i mean something like fun foo(a:bar) -- fun foo(a:baz) , etc Feb 23 08:29:08 overload, not override :) Feb 23 08:29:42 oh Feb 23 08:29:48 yes scala has that Feb 23 08:29:55 i am not sure about kotlin though Feb 23 08:31:48 but in scala you would rather not overload a method Feb 23 08:31:59 and you have that in kotlin too Feb 23 08:32:04 the ANY type Feb 23 08:32:16 so just make the method take any and then do pattern matching on it Feb 23 08:33:03 also it would be hard to lift that method to a function val Feb 23 08:33:13 cause it wont know which of the 3 to use Feb 23 08:33:54 like if you did this .. def foo(a: Int) = 0 def foo(b: Boolean) = 0 def foo(a: Int, b: Int) = 0 Feb 23 08:34:42 hmm Feb 23 08:34:49 you wont be able to lift it to a funtion with val function = foo _ // it will fail with must be foo(_,_) or you would have to specify types Feb 23 08:34:57 if you couldnt override class methods that wouldn't be compatible with java i guess Feb 23 08:35:25 so it would make functional programming harder to do if you did method overloading Feb 23 08:37:05 method overloading only really works in OO and only if implemented correctly Feb 23 08:38:25 not really what you asked i guess g00s :) Feb 23 08:39:23 i'd like the option to overload - maybe the compiler could just complain if there was ambiguity :) Feb 23 08:40:05 it does :) Feb 23 08:40:19 scala maybe, not sure about kotlin though Feb 23 08:40:21 but like if you had some implicit conversions Feb 23 08:40:34 like if you want "true" to be true and "14" to be 14 Feb 23 08:40:37 you would have like Feb 23 08:41:10 implicit def S2B(s: String) = !s.isEmpty Feb 23 08:41:13 and like Feb 23 08:41:25 g00s how many downloads can you expect on an app after 1 month? Feb 23 08:41:33 implicit def S2I(s: String) = s.toInt Feb 23 08:41:35 jutsi not enough Feb 23 08:41:48 then the problem also exists that if you want to call that previous example of foo Feb 23 08:41:52 foo("") Feb 23 08:41:57 the compiler would complain Feb 23 08:42:03 g00s how many do you usually have? Feb 23 08:42:14 cause its ambiguios Feb 23 08:42:21 excuse spelling Feb 23 08:44:39 so I have finished the fronted gui for my app (so far) Feb 23 08:44:56 should I start working on algorithms for sorting, or mysql implementation first? Feb 23 08:45:07 mysql, i'd say Feb 23 08:45:13 do I want to asynchtask the sorting? Feb 23 08:45:23 it would be batter to do something like def foo(a: Any) = a match { case Int => /* a is int */; case Boolean => /* a is boolean */ } Feb 23 08:45:26 to reduce loading times, yes you should Feb 23 08:45:45 kk Feb 23 08:46:04 alternatively use the loading bar thingie if there is a lot of loading Feb 23 08:46:16 TheKarlBrown_, but dont use async tasks if its going to run long cause asynctaks go to never never land if a config change happens Feb 23 08:46:50 ok well the pulling and sorting will both occur before the user responds Feb 23 08:46:51 but some other sort of background task yes Feb 23 08:47:05 if it is something that will run in the background and then stop use an intentservice Feb 23 08:47:28 intentservice to pull and sort while a loading indicator is present on the ui Feb 23 08:47:43 and when the intent service is done doing what it needs to do update the ui Feb 23 08:48:55 ok well the user wont be able to respond or do things while all of this happens Feb 23 08:48:58 and there will be a logo Feb 23 08:49:07 LOGO!! Feb 23 08:49:09 no logo Feb 23 08:49:13 errr loading bar Feb 23 08:49:16 heh Feb 23 08:49:25 I suggest you use an icon instead :) Feb 23 08:49:42 no loading screen only the normal screen with loading indicators Feb 23 08:49:46 r u sure intentservice is right? its not a background action, its something the tabs will need before displaying new data Feb 23 08:50:00 where are you getting the information? Feb 23 08:50:05 from the net? Feb 23 08:50:07 mysql database Feb 23 08:50:11 I've set up Feb 23 08:50:14 then yes intentservice Feb 23 08:50:23 cause it needs to not happen on the ui thread Feb 23 08:50:38 it would happen on UI with asynctask? Feb 23 08:50:38 and asynctasks are bad and you should feel ashamed if you use them :) Feb 23 08:50:48 I'm ashamed Feb 23 08:50:53 people recommend them to me iono Feb 23 08:51:21 What? Asynctasks are very useful. Feb 23 08:51:21 no it wont but any config change will remove the reference to that async task so even if it did finish you wont know Feb 23 08:51:35 if it is very small tasks then yes Feb 23 08:51:42 if it runs for seconds then no Feb 23 08:52:05 It works for "seconds" too, if you just handle config changes properly. Feb 23 08:52:09 appetize.io/app/rtkyh4gvg02x56uzeffx1349k4 use nexus 7 Feb 23 08:52:17 if you want to get an idea of how it will be pulled/filtered Feb 23 08:52:20 yes liefer Feb 23 08:52:36 Saying that "asynctask is bad, and you should never use them" is misleading and Wrong(TM) Feb 23 08:52:54 but how many people use the config changes properly? Feb 23 08:53:14 but also i avoid async tasks like the plague Feb 23 08:53:17 i cant spell sorry Feb 23 08:54:02 I see many apps that are locked to portrait only mode. That makes things easier. Feb 23 08:54:16 yes but that is another i have :) Feb 23 08:54:20 So Android studio or eclipse? Feb 23 08:54:30 why lock it its not the solution its a patch Feb 23 08:54:48 studio or die Feb 23 08:54:51 jutsi, its all about personal preference but i like AS cause its based off intelliJ Feb 23 08:54:59 <3 Feb 23 08:55:07 eclipse has gotten better lately but i still prefer intelliJ Feb 23 08:57:19 liefer check out this http://simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ Feb 23 08:58:32 SimonVT: did you write that? Feb 23 08:59:10 async inner classes (which a lot of ppl use also) tends to cause leakage if you call methods from the outerclass cause it needs to have that class reference while its running Feb 23 08:59:25 thepoosh, i just always asumed it was him never really checked :) Feb 23 08:59:48 well, the blog's url looks suspicious Feb 23 08:59:51 ;P Feb 23 09:00:00 yeah that is why i asumed :) Feb 23 09:00:04 why intelliJ though? I hate the gradle system thingie Feb 23 09:00:25 jutsi, you will have to learn to love it cause that is android's build system Feb 23 09:00:40 eclipse doesn't have it though Feb 23 09:00:48 and its so much easier to make changes Feb 23 09:01:03 its even easier with gradle Feb 23 09:01:25 and if you have a CI server then you dont have to have multiple build scripts Feb 23 09:01:27 Yeah, I wrote that :) Feb 23 09:01:39 nice :) i thought so yes SimonVT Feb 23 09:02:06 cause i think i recall you mentioning that site simonvt.net? Feb 23 09:02:11 but i could have dreamt that too Feb 23 09:02:28 jutsi what is wrong with gradle in your view? Feb 23 09:02:37 what does it not do that you require it to do? Feb 23 09:03:08 in AS the build.gradle is not only the build script but also the "project descriptor" Feb 23 09:04:46 It's my very inactive personal website :p Feb 23 09:08:42 lemonxah as an eclipse user gradle is new and strange to me Feb 23 09:08:53 ah ok yeah its not that bad once you get used to it Feb 23 09:09:00 i would suggest playing with it for a bit Feb 23 09:09:21 to see how powerfull it really it ;) Feb 23 09:09:29 silly Gradle documentation Feb 23 09:09:41 it will be 1 build script to rule them all Feb 23 09:09:41 anyone knows out of their head how do I set the name of flavour output file? Feb 23 09:12:00 you could do applicationVariants.all { varient -> def newname = variant.name + "custom-addon" + ".apk"; variant.outputFile = new File(path, newname); } Feb 23 09:12:23 but you could also just have Feb 23 09:12:33 versionNameSuffix int he flavor Feb 23 09:13:03 and then do a project.archivesBaseName = "MyApplication-v${android.defaultConfig.versionName}" Feb 23 09:13:46 but i think that might only for buildTypes not flavors i am not sure Feb 23 09:13:57 to lazy to read the docs now Feb 23 09:14:53 Mavrik, http://stackoverflow.com/questions/25269540/android-gradle-include-version-name-from-flavor-in-apk-file-name Feb 23 09:14:58 maybe that could help Feb 23 09:27:18 i think one of the big announcements at I/O 2015 from the Android team will be that they wrote official docs for gradle plugin :) Feb 23 09:28:24 and that the NDK will included into android studio after all ;) Feb 23 09:29:11 NDK will never be included in Android Studio. Feb 23 09:29:14 Just like SDK isn't. Feb 23 09:29:31 g00s, that would probably trump any new Nexus device easily : Feb 23 09:29:31 :P Feb 23 09:30:34 than call it that you can work with the NDK inside android studio (: Feb 23 09:33:12 can't they just merga android and chrome and get this over with Feb 23 09:33:35 nah Feb 23 09:33:36 EU Feb 23 09:37:07 sorry chrome OS Feb 23 09:37:26 yeah, I figured Feb 23 09:37:28 still Feb 23 09:37:29 EU Feb 23 09:37:56 why would the EU care about android / chrome os ? Feb 23 09:38:09 Why would the EU care about Windows and IE? Feb 23 09:38:22 g00s, because EU doesn't want people to lose sanity ;) Feb 23 09:39:06 Being forced to use JS is probably forbidden in some Geneva convention. Feb 23 09:39:13 ha Feb 23 09:39:23 well it will probably be NaCl Feb 23 09:42:45 i would like to see ARA though, i find that pretty interesting Feb 23 09:43:22 but given that whole phones w.o any swapable parts seem to have enough problems, i'd bet all the configurations will cause problems unless google really steps up their game there Feb 23 09:43:37 not holding my breath Feb 23 09:44:16 they would probably need to certify components like bluetooth sig does Feb 23 09:46:33 well Feb 23 09:46:49 on the other hand ARA looks like the only option left of having a decent phone that's not a shovel Feb 23 10:17:38 does displaymetrics communicate with the activity/context or is it independent Feb 23 10:17:52 mahlzeit Feb 23 10:17:57 will it be any diffrent if i just get displaymetrics from another class? Feb 23 10:18:05 no Feb 23 10:18:58 i was thinking of having the activity pass a displaymetrics object to the other class. but maybe thats not needed either Feb 23 10:19:15 depends on what you need to get those metrics Feb 23 10:19:28 if its context.getDisplayMetrics, then you need at least context passed over Feb 23 10:19:29 the width and height Feb 23 10:19:42 of the screen Feb 23 10:20:03 so i should pass context and a displaymetrics object Feb 23 10:20:19 no, just pass context Feb 23 10:20:24 over there you do context.getWhatever Feb 23 10:20:36 since they dont change Feb 23 10:20:44 i see Feb 23 10:22:53 note that size of your app area can change Feb 23 10:23:01 status bar and softkeys can hide or not Feb 23 10:23:36 yeh it seems displaymetrics deducts the navbar automatically but not the status bar. but i found another method which gets the statusbar Feb 23 11:08:55 what's the trick to have my preference activity show a setting with a multi-line label? Feb 23 11:11:04 and by label I mean title Feb 23 11:14:48 do you think enough people use keyboards for tablets it is worth adding keyboard input to your games/apps? Feb 23 11:32:39 so quiet here Feb 23 11:33:54 Hi ! Feb 23 11:33:56 hi Feb 23 11:34:01 good? Feb 23 11:34:47 Can I create a home screen shortcut to any of my activities ? Or only the main ? Feb 23 11:34:53 any Feb 23 11:35:02 all you ahve to do is put the intent filter on them Feb 23 11:35:34 Yes but the non main should have a different action ? Feb 23 11:35:57 yeah Feb 23 11:36:32 You know what I should put in the filter for a non main acitivity ? Feb 23 11:37:05 well it could even be something else also Feb 23 11:37:09 it could be main too Feb 23 11:37:21 its the action on the intent that starts the activity Feb 23 11:37:39 Two mains, that's possible ?! Feb 23 11:37:41 i haven't had multiple launcher activities yet Feb 23 11:38:07 yes its not the main activity its just the action on the intent that starts the activity? Feb 23 11:38:23 I found tons examples work for the main, but none for non main.... Feb 23 11:39:46 When the shortcut is created and I touch it it says the app cannot be found Feb 23 11:40:02 show the manifest Feb 23 11:40:25 i will try this quick aswell Feb 23 11:40:32 So the launcher seems not to know about the activity because its filter ! Feb 23 11:41:25 Its not really usefull since I still don't know what to put in the intent-filter... ? Feb 23 11:42:06 so Feb 23 11:42:12 if you want more than one Feb 23 11:42:16 your default activity Feb 23 11:42:19 just add this Feb 23 11:42:27 and maybe change your icon for the second activity Feb 23 11:42:34 android:icon="@drawable/myothericon" Feb 23 11:42:46 the same intent filter Feb 23 11:42:49 as the other one Feb 23 11:42:53 exactly the same Feb 23 11:43:00 I try... Feb 23 11:43:12 but your default one should have the but not the other one Feb 23 11:44:18 My main activity has android.intent.category.LAUNCHER category ! Feb 23 11:44:56 This why it is listed in the application list no ? Feb 23 11:45:38 yes you have to have both categories Feb 23 11:45:43 yes it is Feb 23 11:45:52 you will have to have both those entries though Feb 23 11:45:55 Ha it can be cumulated ! Feb 23 11:47:42 So in my shortcut target activity, the non default, the filter can be empty ? Feb 23 11:50:57 i am very confused to what you are actaully asking with that Feb 23 11:51:16 See that if it helps : Feb 23 11:51:18 http://pastebin.com/YmTevaF1 Feb 23 11:52:03 ActPrinc is the default activity, I mean the one accessed through app list Feb 23 11:52:32 ActPupitre is the target of the shortcut Feb 23 11:53:10 BTW : It can only be launched throught the created shortcut Feb 23 11:53:52 http://pastebin.com/jQYfB3Ek Feb 23 11:53:59 there that is what you have to have Feb 23 11:54:38 Ah ok fine ! Feb 23 11:54:43 Trying... Feb 23 11:55:42 yes that works Feb 23 11:55:49 just tried it in a demo app Feb 23 11:57:51 Me it still telling me that the app is not installed... :-( Feb 23 11:58:18 hi, i am trying to add buttons in action bar in an app that uses Drawer navigations, i followed the details from https://developer.android.com/training/basics/actionbar/adding-buttons.html . Problem is that all the menu ites show up in options menu drop down that to without icons Feb 23 11:58:33 you have to give it a new name too zebu1er Feb 23 11:58:38 cause its got the same label now Feb 23 11:58:39 i want to see just icons on action bar and dont want actions to get into options menu dropdown Feb 23 11:58:42 give it a new label Feb 23 11:59:18 you mean that : raccourci.putExtra(Intent.EXTRA_SHORTCUT_NAME, "AAAAAAAA"); Feb 23 11:59:23 no Feb 23 11:59:36 android:label="@string/app_name" > Feb 23 11:59:52 android:label="@string/picture_activity_name" > Feb 23 12:00:04 I try... Feb 23 12:00:42 ServerCrash, you will have to use android:showAsAction="always" Feb 23 12:00:54 and then you cant add too many cause the bar is only that big Feb 23 12:00:58 lemonxah: yes i did that Feb 23 12:01:18 ServerCrash, show the code Feb 23 12:02:40 lemonxah: No still the same issue... Feb 23 12:02:58 show me again please the changes that you have made Feb 23 12:03:10 cause i have just made a demo app the same way i was explaining to you and it works Feb 23 12:04:14 lemonxah: http://pastebin.com/jQYfB3Ek Feb 23 12:04:23 i am using Android 5.0, is this because of that Feb 23 12:04:40 no .. just show the menu.xml Feb 23 12:05:06 I put it in string.xml !! ? Feb 23 12:05:07 zebu1er, did you not change the label? Feb 23 12:05:24 lemonxah http://fpaste.org/189169/14246931/ Feb 23 12:05:55 ServerCrash, its order is 20 which means there are 20 items before it? Feb 23 12:06:13 The only thing I had renamed this is ActPrinc to ActPupitre, then I created a new ActPrinc (yesterday) Feb 23 12:06:36 zebu1er, ... Feb 23 12:07:01 the activity .. int he manifest file Feb 23 12:07:03 lemonxah nopes no item Feb 23 12:07:07 as of now Feb 23 12:07:10 but will add one omre Feb 23 12:07:13 has a tag android:label Feb 23 12:07:20 they should not be the same for both activities Feb 23 12:07:26 they will have to be different Feb 23 12:07:59 One has : android:label="@string/app_name" > Feb 23 12:08:15 the pastebin you gave me now doesn't have different names Feb 23 12:08:16 The other android:label="@string/nom_act_pupitre" > Feb 23 12:08:52 show me the strings.xml Feb 23 12:08:52 Oh sorry Feb 23 12:08:57 lemonxah app:showAsAction="always" worked Feb 23 12:09:04 looks like some sort of appcompat issue Feb 23 12:09:07 yeah ServerCrash that is what i mentioned before :) Feb 23 12:09:40 http://pastebin.com/jQYfB3Ek Feb 23 12:09:42 glad it worked Feb 23 12:09:51 lemonxah i was using android:showAsAction, that didnt worked Feb 23 12:09:58 but app:showAsAction worked Feb 23 12:10:01 zebu1er, wrong paste Feb 23 12:10:09 ServerCrash, are you using appcompat Feb 23 12:10:11 then yes Feb 23 12:10:13 The manifest right url was : http://pastebin.com/CxrQNDtB Feb 23 12:10:15 soz Feb 23 12:10:20 didn't know you are using appcompat Feb 23 12:10:27 is appcompat required for 4.0 onwards Feb 23 12:10:45 hello everyone.. i am trying to implement a broadcast receiver for a xposed module. i want to register the receiver before i hook any methods.. is this even possible? cause i think at that point in the code i do not have a context.. Feb 23 12:10:48 This is AndroidStudio always putting me that... :-( Feb 23 12:10:50 ok zebu1er but where is the strings.xml? Feb 23 12:11:28 Montyr, what part of the code is it? Feb 23 12:11:50 In the project screen it is in app/res/values Feb 23 12:12:06 no zebu1er ... the pastebin entry for it Feb 23 12:12:09 well i do the init stuff in the initZygote at the moment :) but it could be any other part :) Feb 23 12:12:12 you gave the wrong pastebin url Feb 23 12:13:01 You have both strings.xml and manifest.xml, no ? Feb 23 12:13:10 not sure why android studio adds appcompat 7 when i am building app for 4.0 and onwards Feb 23 12:13:16 AndroidManifest.xml precisely Feb 23 12:13:27 no Feb 23 12:13:28 i dont Feb 23 12:13:47 ServerCrash, no its not required Feb 23 12:13:52 you can remove it if you want Feb 23 12:14:20 http://pastebin.com/ZkZEzxzQ Feb 23 12:14:37 Montyr, you will have to use a context so if you have getApplicationContext you might get it to work Feb 23 12:14:44 but if you dont have that you cant set it up Feb 23 12:15:33 zebu1er, uninstall your app from your test device then compile and run your app again after doing a clean build Feb 23 12:15:38 and test again Feb 23 12:15:41 do xposed modules usually run without a context? Feb 23 12:15:43 then pastebin the error Feb 23 12:15:56 Montyr, i have no idea i have never written a xposed module Feb 23 12:16:41 ok Feb 23 12:18:05 Doesnt help Feb 23 12:19:21 lemonxah: Ok, it's time for lunch. You spent very much time with me, big big thanks ! Feb 23 12:19:56 i didn't expect it to work i want to see the error Feb 23 12:19:58 but its ok Feb 23 12:21:45 why zip align is not included in gradle build process? maybe it is possible to include from buil.gradle? It is strange that apk is alwaus unaligned Feb 23 12:23:25 I have a question : https://github.com/astuetz/PagerSlidingTabStrip What is the TestAdapter in pager.setAdapter(new TestAdapter(getSupportFragmentManager())); ? Feb 23 12:23:52 I am gettin the cannot resolve symbol error. Feb 23 12:27:05 Nightwalkerkg, it is a FragmentPagerAdapter Feb 23 12:27:27 most likely Feb 23 12:27:48 its just a custom class that inherits from that Feb 23 12:28:43 I am trying to implement this on a fragment, i already use a navigation drawer but i need this on one of the "pages". Feb 23 12:29:53 So does my MainActivity have to extend FragmentActivity since it's already extending the MyNavigationDrawer ? Feb 23 12:30:28 i have no idea what your MyNavitionDrawer is Feb 23 12:30:33 i take it you are new to android? Feb 23 12:31:17 Yes. and MyNavigationDrawer is a class i created in order to implement this : https://github.com/neokree/MaterialNavigationDrawer Feb 23 12:31:23 It contains my Sections. Feb 23 12:32:15 that is of no help Feb 23 12:32:28 what you are asking is this though Feb 23 12:33:05 http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setAdapter(android.support.v4.view.PagerAdapter) Feb 23 12:58:48 lemonxah: Do you still have your test (activity shortcut) app under the hand ? Feb 23 13:00:11 kind of Feb 23 13:00:48 I may test it on my side, there must a detail to discover Feb 23 13:00:53 must be Feb 23 13:01:16 all i did was made a new project added 1 extra activity and changed the manifest file Feb 23 13:01:18 that was all Feb 23 13:01:57 But did you create a short cut to the extra activity programmatically ? Feb 23 13:02:15 no why create one programmatically? Feb 23 13:02:26 just make it in the manifest Feb 23 13:02:56 that is all you have to do to get multiple icons in the launcher to launch different actvities Feb 23 13:03:14 Because I want it provided extra parameters to but each shortcut behavior Feb 23 13:03:15 https://twitter.com/thedirtycoder/status/569339014085517312/photo/1 Feb 23 13:03:43 explain exactly what you want cause we cant help you if you dont give us the information Feb 23 13:03:50 so every shortcut will lead to a different form of the extra activity Feb 23 13:04:06 p_l, that is bad :) Feb 23 13:05:00 how to do a completely fresh instal and a full wipe of the /system partition on stock android Feb 23 13:05:02 ActPupitre (means Panel) is load a shortcut provided url parameters XML file to buid an UI Feb 23 13:05:08 then use different actions in the manifest and when the activity starts up check the action and do what ever you need Feb 23 13:06:26 What can be the different actions ? Feb 23 13:06:51 what ever actions you want to have Feb 23 13:07:08 It's a free text ? Feb 23 13:07:12 yes Feb 23 13:07:17 well Feb 23 13:07:24 ok Feb 23 13:32:33 Hi, i am trying to import this : https://github.com/neokree/MaterialNavigationDrawer/issues/18 but i have a problem with getCurrentContent, getNumberTabs and getCurrentTitle. http://pastebin.com/HUUSxZvZ Feb 23 14:08:48 Hi, im looking for a android developer for a project // PM if intrested! Feb 23 14:10:21 How to install APK programmatically without user prompt Feb 23 14:10:26 ? Feb 23 14:10:52 is it possible to achieve this Feb 23 14:17:17 hey guys.. im having problems with remote debugging. any ideas why im getting this message? Could not find method android.webkit.WebView.setWebContentsDebuggingEnabled Feb 23 14:23:37 I'm looking for an android handheld with barcode scanner. Anyone here with experience? I would like to get some suggestions/device vendor details. Feb 23 14:23:56 camera based barcode scanning is not quite working out for this project. Feb 23 14:30:17 Having an activity and a fragment, the fragment is visible for a while then at some point the owning activity's onStop() is called Feb 23 14:30:28 any idea why that could be the case when the fragment is still visible? Feb 23 14:31:38 can i use setWebContentsDebuggingEnabled and remote debug using a nexus 7 (API 18) while this function was added on API 19? Feb 23 14:34:07 anyone who knows why it takes +2min to compile my project? only thing in the project that isn't basically a 'hello world'-project is a maven dependency Feb 23 14:36:27 How i can install .apk file on android device silently? Feb 23 14:36:36 silently? Feb 23 14:36:45 is it possible to do that in non rooted device Feb 23 14:36:54 without the user knows? Feb 23 14:37:01 yes without user interaction Feb 23 14:37:09 nope, can't imagine that is possible Feb 23 14:37:40 I read all comments in stackoverflow Feb 23 14:37:45 and many blogs Feb 23 14:37:54 they are doing using some shell command Feb 23 14:38:18 well you can use adb and push the apk file to the connected device Feb 23 14:38:42 but that's the same as clicking 'run app' in android studio Feb 23 14:38:45 Hello, I want to set up a few different test types in android studio w/ gradle .. basically I want to have one directory for integration tests, and another for unit. They would be invoked with gradlew unitTest or gradlew integrationTest, etc .. I believe I need to set up different source sets to do this? Could anyone point me somewhere on the internet to acheive this? Feb 23 14:38:51 I didn't have much luck googling :( Feb 23 14:39:02 Maybe source sets are not what i'm after Feb 23 14:39:29 So its clearly not possible to do that Feb 23 14:40:13 min2, I honestly haven't tried to do that. But I can't imagine it being possible without having the specific device connected to the machine Feb 23 14:40:25 and having developer options set correctly Feb 23 14:40:30 on device Feb 23 14:41:54 Also, I don't think that is something we as developers supposed to do. :) Feb 23 14:42:20 yeah client needs it :( Feb 23 14:42:43 these client never understand the problem of developers Feb 23 14:43:37 I read blogs dev says that in rooted and using system app its quite possible Feb 23 14:45:47 I had client requests to make the app running on androids as low as 1.6 Feb 23 15:03:23 Is there a way to implement a ViewPager inside a fragment but not messing up Navigation Drawer and not losing my mind ? Feb 23 15:11:48 Hey guys, is it possible to have letter(s) in textview "start" in the upper left corner, see this image for an example: http://i.imgur.com/Fl8z6mf.png (see the space between the letter and the top border) I've tried googling margins, padding but didn't find anything useful and I'm out of ideas on what to google. Feb 23 15:16:58 wub_wub: you mean android:padding and android:layout_margin ? Feb 23 15:19:18 yeah, those were the things I've tried iirc - setting either of them to 0 didn't change the looks. Feb 23 15:19:41 i installed beta app as a test user and app installs. however when i upload another apk (incrementing version code) the app never updates, no notification about an update. Feb 23 15:21:00 (i updated the new app to beta) Feb 23 15:21:11 Is there a way to react to the user pressing the power button? Feb 23 15:22:22 platzhirsch, this might work for you http://stackoverflow.com/questions/7682016/android-listen-for-power-key-press Feb 23 15:23:24 brx_: thanks! Feb 23 15:26:01 Hi guys Feb 23 15:28:52 I'm creating a simpler test assert for a button background. First of all, I set a new background resource as button background, and then, I check both if button background and resource itself are the same, but I get different id's and assert fails. Any idea? Here is the code: http://pastebin.com/TXyf8mSG Feb 23 15:30:09 Hi, im looking for a android developer for a project (Android RAT) // PM if intrested! Feb 23 15:30:37 CustomAdapter implements ListAdapter, and i often read, that i should call notifyDataSetChanged() however no such method exists Feb 23 15:30:44 do i have to implement it on my own? Feb 23 15:32:09 because i want to show the progressbar while loading data. the way i do it now (in onCreate) it loads everything on start Feb 23 15:35:56 qwk: no recruiting, please Feb 23 15:48:07 JakeWharton: request.tag() is perfect, thanks! Feb 23 15:59:55 hello Feb 23 16:00:23 I was wondering what would be the best way to do an alarm on Android without using AlarmManager Feb 23 16:01:36 Hi guys, I have a basic question. Say I want the home page of my application to list a series of icons. what type of control(s) should I be looking into to achieve this. Feb 23 16:01:38 ? Feb 23 16:01:56 I want to make sure I go about this the correct way. Feb 23 16:04:03 googling around I see 'menu' poping up for my searches : http://developer.android.com/guide/topics/ui/menus.html Feb 23 16:04:24 mantas322: LinearLayout? Feb 23 16:04:46 linearlayout, and just have imageviews for each icon>? Feb 23 16:12:31 mantas322: sure Feb 23 16:14:23 hi Feb 23 16:15:01 oscarb92, must use alarm manager Feb 23 16:15:18 oscarb92, otherwise, you can use gcm and a server side notification Feb 23 16:15:46 i’m using a retained fragment to deal with async callbacks in the case of an activity having config changes. i pop up a dialog while the task is ongoing. if i background my app, the activity’s (and therefor the fragment’s) ondestroy isn’t called straight away, allowing the async task to get through to the activity and have it perform a dialog dismiss. unfortunately it seems onsaveinstancestate HAS been called by this poi Feb 23 16:15:47 which causes and illegalstateexception. Is this a bug in android? anyone experienced this? Feb 23 16:16:19 samskiter, async task sucks Feb 23 16:16:34 samskiter, you must check your activity state before operating on it Feb 23 16:16:43 pfn i mean an Asyncronous Task Feb 23 16:16:48 ie bug in your code Feb 23 16:16:50 it doesnt matter that this is an asynctask or not Feb 23 16:16:58 i already know about the problems with asynctask. Feb 23 16:17:11 yeah, bug in your code for not. checking lif cycle state Feb 23 16:17:27 pfn: what lifecycle state should i be looking for? Feb 23 16:17:55 ones that indicate that your activity is not valid to work on Feb 23 16:17:59 pfn: also, when my activity is restored will it not now restore my dialog. so how will i dismiss it? Feb 23 16:18:29 up to you to handle changes outside of lifecycle Feb 23 16:18:29 have working kvm but android studio missed /dev/kvm, is there any other way to show android studio working kvm? Feb 23 16:19:05 samskiter, that's a problem for you to solve Feb 23 16:19:17 samskiter, any number of ways Feb 23 16:19:21 yea you’re right on that last point Feb 23 16:19:35 pfn: i’m not aware of any method on activity that let’s me get its state Feb 23 16:20:01 make one Feb 23 16:21:11 pfn: are you sure this isn’t a bug? ondestroy is the state callback that i should care about no? Feb 23 16:21:23 in fact at the minute the ondestroy causes my async task to be cancelled. Feb 23 16:21:57 samskiter: Not onDestroy for ui state no Feb 23 16:22:11 thanks yiati, that works great. Androids a never ending learning curve for me. Feb 23 16:22:52 yiati: this isn’t about ui state though. retained fragments are destroyed in ondestroy if isFinishing is true. that’s the information i care about in this case - that my activity is dieing for a reason other than config change. and therefore i want to throw away my asynctask and my dialog. Feb 23 16:25:12 Asynchronous callbacks in fragments can get really messy, it's best to bind those to the activity, and update the fragment that's displaying accordingly Feb 23 16:25:34 yiati: binding them to the activity would result in a leak in config changes Feb 23 16:25:54 just realised i might need to use the ‘isChangingConfigurations’ api. in onsaveinstancestate Feb 23 16:26:21 ie discard my dialog and my asynctask if i am changing configuration in onsaveinstancestate Feb 23 16:26:24 samskiter: A leak? Do you mean you might miss the callback during config change? Feb 23 16:26:49 yiati: no i mean you would incorrectly retain your activity in a config change Feb 23 16:27:15 yiati: which is why im using a non-visible retained fragment Feb 23 16:27:23 that *is* retained across config changes Feb 23 16:29:37 samskiter, on destroy doesn't cancel threads, so no Feb 23 16:30:26 pfn: where did i say i needed ondestroy to cancel a thread? Feb 23 16:30:38 you said it does Feb 23 16:30:52 "in fact at the minute the ondestroy causes my async task to be cancelled." Feb 23 16:30:55 sorry, i mean my implementation of ondestroy cancels my asynctask Feb 23 16:32:37 if ondestroy was executed immediately after onsaveinstancestate i wouldn’t have this issue. my ondestroy of my retained fragment would kill the asynctask, preventing it from trying to deliver results. Feb 23 16:35:36 pfn: for example during a config change, ondetach and onattach are called on a retained fragment immediately after each other, preventing you from ever having a null result for “getActivity()”. i’m surprised a similar fact isn’t true for onsaveinstancestate and ondestroy Feb 23 16:37:02 why should it be true Feb 23 16:37:19 instance state and destroy mean that it's going away to be resumed later Feb 23 16:43:53 pfn: well i suppose i only really case about the gap between onsaveinstancestate and the fragment’s ondestroy Feb 23 16:59:23 if I'm navigating the user around the app using new activities with set "hierarchical parent" for previous activities. Are most android devices going to obey this. IE: If I go three levels deep, clicking the back button 3 times on most devices will navigate the user back to the top parent? Feb 23 17:01:58 not sure if my quesiton makes sense Feb 23 17:05:14 For RxJava, http://reactivex.io/RxJava/javadoc/rx/Observable.html#just(T, T, T, T, T, T, T, T, T, T) why not use ellipsis "just(T... t)" instead of arbitrarily saying 10 is the max num of parameters Feb 23 17:05:31 because there needs to be an interface Feb 23 17:05:59 they can't arbitrary generate interfaces at runtime so there are only a fixed number and it's limited to 10 Feb 23 17:06:26 What's generating interfaces? Feb 23 17:06:31 it's not generating interfaces Feb 23 17:06:43 it's using interfaces that are compiled Feb 23 17:06:50 because it's compatible with pre-lambda java Feb 23 17:07:26 the interfaces are like Func1, Func2, Func3 ... etc Feb 23 17:07:44 they only define func0-func9 Feb 23 17:07:56 i can't imagine anyone in their right mind would want more than 9 Feb 23 17:08:52 Most often yeah, it just seems abitrary Feb 23 17:10:04 they couldn't create a FuncMany(T…) interface? Feb 23 17:13:27 no Feb 23 17:17:13 yiati: Is there a reason why my devices emulator stopped working all of the sudden? I can't even get it to start only using the AVD Feb 23 17:17:31 probably Feb 23 17:18:11 yiati: I didn't change anything though. =/ Feb 23 17:18:11 noobie quesiton here Feb 23 17:18:33 I seem to recall being able to apply html style tags, like highlight or color into a textview Feb 23 17:18:45 I believe I can set a textview to be able to acknowledge html Feb 23 17:19:14 mantas322: http://stackoverflow.com/questions/2116162/how-to-display-html-in-textview Feb 23 17:19:20 TextView.fromHtml Feb 23 17:19:29 thanks dude Feb 23 17:20:18 wait.. I think my memory is off... Feb 23 17:21:33 Sets the string value of the TextView. TextView does not accept HTML-like formatting, which you can do with text strings in XML resource files. To style your strings, attach android.text.style.* objects to a SpannableString, or see the Available Resource Types documentation for an example of setting formatted text in the XML resource file. Feb 23 17:21:46 weird, cause I thought I remembered that too... Feb 23 17:22:06 like, just /b /i Feb 23 17:23:33 mantas322, ^^^ Feb 23 17:24:17 hmm Feb 23 17:24:30 MikeWallaceDev, I have a fleeting memory of you as well. Feb 23 17:24:36 thanks for the feedback Feb 23 17:24:58 well, I meant that I thought I remembered TextView displaying HTML :D Feb 23 17:25:07 I know Feb 23 17:30:12 http://jimulabs.com/2015/02/mirror-kotlin/ Feb 23 17:30:18 love <3 Feb 23 17:31:43 too bad that mirror isnt opensource Feb 23 17:33:36 i want to display a layout with a viewpager and on the otherside 2buttons, . The viewPager is display not the buttons .this is my code http://pastebin.com/DSTx6yc6 thnks in advance Feb 23 17:33:40 Could someone take a look at this LogCat file and tell me what is stopping my AVD from launching? http://pastebin.com/NSL6Ew4c Feb 23 17:34:55 can I have a layout in a scroll view? Feb 23 17:35:06 I think so.. Feb 23 17:35:15 but I cant have two textviews Feb 23 17:35:22 says "no" Feb 23 17:35:46 what do you mean? the point of a scrollview is to put a layout inside it lol Feb 23 17:36:03 thanks Feb 23 17:36:04 it accepts one viewgroup Feb 23 17:36:05 gotya Feb 23 17:36:14 so if you want two textviews you need to put those inside of one viewgroup Feb 23 17:36:27 and then add the viewgroup to the scrollview Feb 23 17:36:33 gotya Feb 23 17:36:46 yeah, im still getting used to swapping between android studio design and xml Feb 23 17:37:01 the click and drag control appeals to my .net side Feb 23 17:37:10 but it appends straneg attributes sometimes. Feb 23 17:37:18 and I have to rework them in the xml text Feb 23 17:37:47 yea I don't bother with the click and drag, I only use the preview occasionally since getting the preview to display correctly can be a pain Feb 23 17:40:08 im going through the tutorials on developer.android.com .. in the starting another activity section the new activity wizrd asks for menu resource name the tutorial doesnt explain what i need to fill in here Feb 23 17:40:13 what do i fill in ? Feb 23 17:40:38 are these tutorials outdated ? Feb 23 17:41:07 I just did this earlier today Feb 23 17:41:10 im also a beginner Feb 23 17:41:43 mantas322: oh what did you fill in there ? Feb 23 17:42:11 I created a new acitvity, then in some event from my main activity I created a new event which then goes to my new event startActivity() Feb 23 17:42:19 Intent* Feb 23 17:42:22 not event Feb 23 17:42:31 I didnt do anything with menu's Feb 23 17:42:46 and my app doesnt have menu's, although I am unfamiliar with the concept Feb 23 17:42:49 but android studio is asking for a Menu resource name Feb 23 17:43:07 without which im unable to click the finish button Feb 23 17:44:41 I used a "Blank Activity" Feb 23 17:44:46 perhaps there are different types. Feb 23 17:45:05 yes im using blank activity too Feb 23 17:46:01 my menu resource name just defaults to "menu_main" Feb 23 17:50:35 okay Feb 23 17:54:58 the viewPager is taking all the spaces available, the linearLayout containing the buttons is hidden. how can i i solve that , this is my layout.xml http://pastebin.com/DSTx6yc6 Feb 23 18:15:34 does anyone why could my webview be displaying tiny pages? Feb 23 18:19:43 what do you mean by tiny page? Feb 23 18:20:05 do you not have a mobile version of the website you are trying to view? such as one that checks viewport Feb 23 18:20:14 Why is line 5 giving me trouble if I have background.png in my /res/drawable/ folder? http://pastebin.com/Rtm2smtG Feb 23 18:22:05 hey guys Feb 23 18:22:09 say hi Feb 23 18:22:19 what is the best way to set default value in spinner from sparedprefrence ? Feb 23 18:22:21 Im in a workshop telling people how they can use IRC to find more answers Feb 23 18:22:34 oh god Feb 23 18:22:35 :p Feb 23 18:23:29 Odaym: Welcome Feb 23 18:23:51 trevor-e: the whole page is appearing very small.. like 4 milimeters on my tablet screen Feb 23 18:25:49 luist: you're going to have to dig into it Feb 23 18:26:45 this is strange… when debugging the page, the body seems to have 5240px ¬¬ Feb 23 18:31:22 TacticalJoke, ping Feb 23 18:46:27 s9: Here but on mobile so not very functional. Feb 23 18:46:43 can we share multiple images in one go with ShareActionProvider Feb 23 18:49:58 why not Feb 23 18:55:00 wow i tried my webview on a samsung tabled (API 19) and everything worked perfectly… unlike my nexus with API 18 that was full of bugs Feb 23 18:58:01 still needs to work on other devices Feb 23 19:04:24 uh? Feb 23 19:08:45 TacticalJoke, i wanted to set a default string value in spinner i am getting value Sharedprefrence and than converting to in to pass throught set setlection but its not working any other way Feb 23 19:09:29 what are other ways? Feb 23 19:10:01 yiati_, asking me ? Feb 23 19:10:06 yep Feb 23 19:12:06 firstly i am saving the selected item to sharedprefrence and its successfull than i am getting it back than also working after that i getiing the indexof that value from db and than passing through set selection here is the whole code as well. http://paste.ubuntu.com/10376271/ Feb 23 19:12:11 yiati_, Feb 23 19:16:48 Hey all, basic question, but where do I find the kernel file on an android phone? I don't even see a /boot directory Feb 23 19:17:53 ale Feb 23 19:20:31 s9iper1: So what's the question? Feb 23 19:20:39 huh Feb 23 19:21:21 i want to set the default value of spinner that comes from sharedprefrence yiati_ Feb 23 19:22:16 yiati_, the value with CITY_NAME string Feb 23 19:23:54 s9iper1: http://developer.android.com/reference/android/widget/AbsSpinner.html#setSelection(int, boolean) Feb 23 19:24:45 Is it possible to pass parameters from one activity to another? Feb 23 19:24:50 I would imagine so.. Feb 23 19:25:22 mantas322: Set arguments with a Bundle when creating the intent Feb 23 19:25:30 startActivity(myIntent, param1,param2); Feb 23 19:25:38 I see Feb 23 19:26:12 yiati_, it doesnot work with strings ? Feb 23 19:26:21 it only require int value ? Feb 23 19:27:43 s9iper1: You don't tell it what the default value is, you associate a dataset, and that function I pasted tells it what index to jump to in the dataset Feb 23 19:27:49 your dataset would be a string Feb 23 19:28:25 ok Feb 23 19:28:43 yiati_, thanks Feb 23 19:29:05 mantas322: No, http://stackoverflow.com/questions/2091465/how-do-i-pass-data-between-activities-in-android Feb 23 19:29:49 s9iper: s/a string/strings/ Feb 23 19:30:49 thanks yiati_.... so theoretically I can intent.putExtra("MYPARAM", param1); ........ then in the new activity I should be able to access "MYPARAM" some how Feb 23 19:30:52 thx Feb 23 19:31:31 mantas322: Yep Feb 23 19:38:02 Yo Feb 23 19:46:45 Whats up TacticalJoke Feb 23 19:47:50 Hey. :) Feb 23 19:47:58 I got a question for you Feb 23 19:49:05 So you know the subject dashboard, (where all the icons are after the user selects a subject)? Feb 23 19:51:00 TacticalJoke you with me? Feb 23 19:51:12 werd Feb 23 19:51:29 Yeah. On mobile though. Feb 23 19:51:30 TacticalJoke: Have you ever used jython with Android? Feb 23 19:51:53 Nah. Feb 23 19:51:59 Not interested? Feb 23 19:52:54 You think I should wait to ask my question until later? Feb 23 19:53:01 Maybe someone else could answer it too Feb 23 19:53:11 hey guys when I call setText() on an editText that has an OnTextChangedListener registered, does OnTextChanged get called? Feb 23 19:53:23 tricknology: you tell me Feb 23 19:53:45 yes Feb 23 19:53:49 sendOnTextChanged() Feb 23 19:54:00 thanks phix Feb 23 19:54:14 set a listener and then set the text. In the listener log to debug or something and see it is gets called Feb 23 19:54:27 phix can I ask you a code organization question Feb 23 19:54:34 drose379: shoot Feb 23 19:54:43 Ok Feb 23 19:54:56 eh, I just grepped the setText method Feb 23 19:55:14 nice work Feb 23 19:55:16 So I have a dashboard area, the dashboard will have many tasks that it can do, depending on what the user selects Feb 23 19:55:20 :P Feb 23 19:55:28 <3 Feb 23 19:55:33 drose379: ok Feb 23 19:55:43 Once of the things it can do is "Create New" which brings up a series of 3 dialogs Feb 23 19:56:00 The dialogs result in quite a bit of code, and this is just the start of my Dashboard activity Feb 23 19:56:15 ok Feb 23 19:56:22 Do you think I should move the dialog code into a seperate class, and the Dashboard activity calls that class to work with the dialog? Feb 23 19:56:42 That's one way to do it Feb 23 19:56:49 We're supposed to use DialogFragment. Feb 23 19:56:55 Whats taht Feb 23 19:56:59 that* Feb 23 19:57:02 In which case it's already in its own class. Feb 23 19:57:04 but fragments is the better approach Feb 23 19:57:09 ah TacticalJoke beet me to it Feb 23 19:57:24 Ive never worked with fragments before Feb 23 19:57:30 Something I should look into? Feb 23 19:57:50 drose379: they are a bit tricky but there are plenty of examples and tutorials around to help youi Feb 23 19:58:19 How do they benefit? Feb 23 19:58:34 Is it considered "Best Practice" ? Feb 23 19:58:39 Google "dialogfragment". Feb 23 19:58:40 They are modular Feb 23 19:58:57 you can mix and match them easily Feb 23 19:59:01 Using Dialog without DialogFragment is considered deprecated. Feb 23 19:59:14 Ok im not using a regular Dialog though, Im using a Library Called MaterialDialog Feb 23 19:59:23 Can I still use DialogFragment Feb 23 19:59:27 drose379: of course you may need to use the support library, depending on which version of android you want to support Feb 23 19:59:40 I presume so. DialogFragment wraps dialogs. Feb 23 19:59:57 Ok, ill read up on it. Thanks guys Feb 23 20:00:03 any time Feb 23 20:00:09 thansk again for the help yiati_, what you suggested worked. Feb 23 20:01:14 hello everyone Feb 23 20:01:20 newbQ: werd Feb 23 20:04:30 could someone please help me figure out this DatePickerFragment? http://pastebin.com/2k8JJNdd Feb 23 20:09:44 i have made my entire layout in java, but i need resource IDs for the button listeners Feb 23 20:13:08 njcomsec: Dynamically adding buttons? Feb 23 20:14:55 no i just didnt use any xml Feb 23 20:15:51 maybe i can just do public void onClick(View button) { if(button.getText.equals())}} etc Feb 23 20:16:10 Or, View#setId Feb 23 20:16:44 yeh i heard of view setID but i dont know about conflicting IDs with existing resourcs Feb 23 20:17:29 You can have 100 views with the same id if you want, as long as you're aware of how findViewById, etc, works Feb 23 20:17:44 You can also set a tag if you don't want to use id's Feb 23 20:18:08 njcomsec: Are you sure an adapter would not be better suited for this problem? Feb 23 20:18:55 I've ran into a snag. I have created a ScrollView, within it I have a Vertical linear layout, and inside that I have 4 textboxes. in the code behind I set different amounts of text content to my textview. When my textboxes exceed a specific length the scrolling becomes whacky wheels. My textview scrolls to the top, and the bottom text view isnt scrollable too. Feb 23 20:19:01 to*] Feb 23 20:19:28 textviews exceed* Feb 23 20:22:08 do scrollviews and linear layouts not dynamically stretch to changing textviews? Feb 23 20:22:13 i want to write a game for mental arithmetic, with a fixed button grid (7x7), with random numbers from [1..9] on the buttons. Feb 23 20:22:20 so i need to have a fixed layout with flexible values. Feb 23 20:22:25 how can i do that? is there an example somewhere? Feb 23 20:25:06 stockholm: swe? Feb 23 20:25:11 how do i get activity from inside an asynctask?? this.getActivity() wont work here as it does inside a fragment: http://paste.ofcode.org/azLCCXuFmcydLHKqWyBzpe Feb 23 20:26:53 qwk: jag? Feb 23 20:27:19 luist: Pass it in Feb 23 20:27:31 what yiati said Feb 23 20:27:38 is my question clear? Feb 23 20:28:07 what is unclear about my question with the flexible values in the fixed grid? Feb 23 20:28:22 stockholm: you can use a fixed grid of buttons (or text views) and change their values in the code Feb 23 20:29:05 you're probably not getting answers because that's a pretty basic thing and you probably need to be looking at some android samples at this point Feb 23 20:29:21 I fixed my issue by making the scrollview the parent over the entire screen in my layout Feb 23 20:29:25 myke: in the android tutorial, that value-location encoding is done in the xml resource file. is there a sample that changes the value? Feb 23 20:29:46 that encoding is for a reference to the button (or textview, or whatever) Feb 23 20:29:48 myke: yes, it is really basic, i started with android app coding today :-) Feb 23 20:30:08 it maps what you define in the XML to a reference id (just an int) you can use in java code to reify the object you need to manipulate Feb 23 20:30:37 reify? Feb 23 20:30:48 get a reference to the object Feb 23 20:30:55 ah, ok Feb 23 20:31:07 have you done web programming, client side with javascript? Feb 23 20:31:15 yes Feb 23 20:31:30 mostly c and perl and java backend stuff, though Feb 23 20:31:32 ok so in that model you use the page's DOM to get access to various objects you can manipulate in javascript Feb 23 20:31:39 right Feb 23 20:31:48 i understand that :-) Feb 23 20:32:22 in the android model you use findViewById and cast it to the appropriate View subclass Feb 23 20:32:59 i would need to change displayed text and color of the button. ... ok, i will figure that out. Feb 23 20:33:11 best is to look at some sample code Feb 23 20:33:38 yes, could you please point me to some relevant sample code, please? Feb 23 20:33:43 https://github.com/aporter/coursera-android Feb 23 20:33:55 great, thanks Feb 23 20:34:42 Examples/UIRelativeLayout/src/course/examples/UI/RelativeLayout/RelativeLayoutActivity.java Feb 23 20:34:48 like there Feb 23 20:34:49 yiati: you mean i should pass the activity as a parameter? Feb 23 20:37:01 luist: That is definitely one way to access it yes Feb 23 20:37:06 myke: thank you :-) Feb 23 20:37:20 stockholm: no problem Feb 23 20:37:21 yiati: if i pass the activity i dont need to pass the context right Feb 23 20:37:38 those samples are for coursera android classes but they're pretty useful Feb 23 20:37:45 even if they don't always exhibit best practices Feb 23 20:38:09 luist: Yeah Feb 23 20:39:26 yiati: what about getArguments() ? i still cant use it Feb 23 20:40:02 luist: getArguments is a method on activity and its subclasses Feb 23 20:40:40 luist: Also this is a good reference, http://stackoverflow.com/a/9963705/1229735 Feb 23 20:40:55 luist: you can't call it on Context (i just went thru this an hour ago in my own code) Feb 23 20:42:19 getArguments is a method on Fragment Feb 23 20:42:49 yeah ok Feb 23 20:46:23 yiati: are you suggesting that the asynctask class should be an inner class of my fragment? Feb 23 20:47:32 nope Feb 23 20:48:06 meh.. what if activity changes? ie. configuration change Feb 23 20:48:14 err I’m having trouble hiding the soft keyboard when this one edittext gets focus Feb 23 20:48:23 yiati: thats what the link is about Feb 23 20:48:26 tryign this in onFocusChangedListener() Feb 23 20:48:27 inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0); Feb 23 20:48:34 not working :( Feb 23 20:48:45 tricknology: solution: use external keyboard, (╯°□°)╯︵ ┻━┻ the soft keyboard. Feb 23 20:48:59 yiati: oh nvm.. i was looking at another SO link i had opened Feb 23 20:50:16 groxx que? Feb 23 20:50:20 tricknology: dunno. .clearFocus() on the edittext? I remember having problems with hideSoftInput..., but that's what I do and it seems to work. Feb 23 20:50:28 yiati: im not familiar with this interface thing Feb 23 20:50:38 I could disable it from the xml but then I need to reneable it for other text firlds Feb 23 20:51:01 luist: http://docs.oracle.com/javase/tutorial/java/concepts/interface.html Feb 23 20:51:08 clearFocus() inside onFocusChanged() causes stack overflow Feb 23 20:51:24 maybe getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN) Feb 23 20:52:06 tricknology: ah. I missed the part where it's in the onFocusChangedListener. Feb 23 20:52:20 there should just be a Keyboard.hide() Feb 23 20:52:22 done Feb 23 20:52:43 activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); still shows when edittext has focus Feb 23 20:53:04 also 'Keyboard.getBounds()' and 'Keyboard.onAnimationFrame()' and etc. Feb 23 20:53:27 ^ Feb 23 20:53:29 get bounds for the win Feb 23 20:53:59 tricknology: https://stackoverflow.com/questions/1555109/stop-edittext-from-gaining-focus-at-activity-startup Feb 23 20:54:55 tricknology: as much as I hate recommending things like this: does it work if you .post() it, so it runs later? Feb 23 20:55:57 Ashiren, it does not have focus when the activity starts, thankfully. but I am creating a custom keyboard to be used inside the fragment. So when this editText has focus, I want to use the keyboard in my layout rather than the soft keyboard Feb 23 20:56:12 heh I guess it doesn’t hurt to check groxx Feb 23 20:57:28 oh mother fudge Feb 23 20:57:48 someoen snuck another listener in another part of the code.. Feb 23 20:57:56 trollolol Feb 23 21:04:05 can someone please point me towards a DatePickerFragment tutorial that works? Nothing I have found so far is working for me. Feb 23 21:05:33 TacticalJoke since I have multiple dialogs and not just one, would I have to have multiple dialog fragmetns? Feb 23 21:05:45 Yeah. Feb 23 21:05:54 And this is a good thing. Feb 23 21:06:19 So the Subject Dashboard activity would call the first one, then when that is done it would call the second, etc..? Feb 23 21:06:33 hello guys Feb 23 21:06:46 anyone can explain me what Bitmapfactory.decode(something) does? Feb 23 21:07:03 newbQ: DatePickerFragment isn't an Android class, do you mean DatePicker which extends FrameLayout? Feb 23 21:07:07 Hey, using Retrofit, how would I get it to return a JSON response as a Dictonary or Hashtable rather than a pojo? Feb 23 21:07:33 Yeah. Feb 23 21:07:33 Or a pojo which has a hashtable? Feb 23 21:07:56 Hmm ok Feb 23 21:08:12 Is a fragment called with an intent Feb 23 21:08:17 s73v3r: There are adapters. Or you could return an Observable and map that to the desired type before subscribing Feb 23 21:08:18 s73v3r: yep Feb 23 21:08:31 yiati: a DatePicker wrapped in a DialogFragment, like the developer site says is recommended. Feb 23 21:08:51 s73v3r RxJava will do it Feb 23 21:09:26 No, drose. Feb 23 21:10:37 Can't use RxJava Feb 23 21:10:59 s73v3r: retrofit already supports Rx, so you’re already using Rx Feb 23 21:11:03 drose379: The activities fragmentmanager Feb 23 21:11:16 We're not using Rx in our app, so that's a nonstarter Feb 23 21:11:24 s73v3r: You’re not listening Feb 23 21:11:40 You can change the return type of your retrofit interface from Foo to Observable Feb 23 21:11:57 That's not how we have the rest of our Retrofit calls set up Feb 23 21:12:10 we're not going to radically change our setup as is for one call Feb 23 21:12:34 * jaana shrugs Feb 23 21:12:40 bleught asyncronous tasks and activities and dialogs. why so hard android. http://stackoverflow.com/questions/28683276/how-to-deliver-and-persist-changes-to-the-ui-from-an-asynchronous-task-hosted-by#comment45659632_28683276 Feb 23 21:13:01 samskiter: funny just finished a lab on that Feb 23 21:13:13 ugh, pause handler Feb 23 21:13:15 samskiter: generally you want something running standalone to handle the async stuff Feb 23 21:13:26 ^ Feb 23 21:13:31 myke: a lab? what are you studying and where? that sounds too modern to be in academia Feb 23 21:13:40 myke: yea. Robospice esque? Feb 23 21:13:41 samskiter: it's a coursera class Feb 23 21:13:48 ah nice Feb 23 21:14:06 but it's taken from a real-life class, pretty sure android programming is normal coursework for CS undergrads these days Feb 23 21:14:09 just for this one call, I want the data as a hashmap, instead of having to make pojos for every subobject in the response Feb 23 21:14:10 trevor-e: i know right. Feb 23 21:14:11 aaah it still does not work :( Feb 23 21:14:13 s73v3r: Define what type you want returned, then make sure your Converter returns that type when it gets whatever input that call returns Feb 23 21:14:56 myke: sounds fun. might suggest it to some of my students if they have the time. i think they got a reallly brief lab on android but it wasn’t really enough to get onto subtleties like this Feb 23 21:15:25 samskiter: anyway doing even simple network calls in a separate thread and returning results to an activity that may be gone by the time you get results is just a fact of life in android, you have to learn how to deal with it Feb 23 21:16:26 samskiter: https://www.coursera.org/specialization/mobilecloudcomputing2/36?utm_medium=listingPage Feb 23 21:16:43 the specialization costs money but the individual classes listed on that page are all free, if you don't care about a certificate Feb 23 21:17:12 i consider myself a noob but judging by the questions repeatedly asked on here i think it's a good way to go Feb 23 21:17:53 there's a nontrivial amount of android architecture and "this is the way things are done" you need to know, that's hard to pick up piecemeal, and most ppl don't have the stamina to work thru the android docs soup to nuts Feb 23 21:18:37 you can easily ignore android architecture Feb 23 21:18:38 myke: oh yes, im very aware of the “activity may be gone” problem - this is a question about problems I’m facing with one particular way of dealing with that Feb 23 21:18:51 I am having trouble with frame animation + out of memory , it is animation with 17 frames, I soon realized I could not use FrameAnimation from droid SDK cause they load all images at once at it easily kills maximum allowed heap Feb 23 21:18:51 so i used the solution provided here http://stackoverflow.com/questions/8692328/causing-outofmemoryerror-in-frame-by-frame-animation-in-android (the answer with 32 votes) Feb 23 21:18:51 works good, but after using the animation for like 30 times without closing the app it runs out of memory again, anyone that can help? Feb 23 21:18:56 (the retained fragment) Feb 23 21:19:22 Gliese: you got a leak! Feb 23 21:20:05 samskiter: http://simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ Feb 23 21:20:08 there's another way Feb 23 21:20:09 oh, simonvt Feb 23 21:20:14 didn't catch that when i bookmarked it Feb 23 21:20:23 so many rockstars on this channel Feb 23 21:20:31 like myke Feb 23 21:20:43 myke: yes, thats a well known blog post Feb 23 21:20:47 samskiter but why? I am doing recycle and setting bitmap as null , and the thing is I close/open the activity/fragment responsible for this animation and it seems that is not freeing all memory onDestroy Feb 23 21:21:16 Gliese: someting os being retained. maybe you can use an analyzer? Feb 23 21:21:18 is* Feb 23 21:21:20 SimonVT: is not a rockstar. he's a ninja Feb 23 21:21:45 Gliese: does your used-memory keep increasing? Feb 23 21:21:46 or maybe he's a ninjastar Feb 23 21:21:51 SimonVT isn't an android developer, he's an actor Feb 23 21:22:01 only plays one on IRC? Feb 23 21:22:08 *actor portrayal Feb 23 21:22:27 I just play a lot of irc Feb 23 21:22:34 samskitter / grow how I can track it? not familiar with memory analizyer tools Feb 23 21:22:51 Pretty good game, but the AI sucks Feb 23 21:22:53 Gliese: first, click the Memory Monitor thing on the bottom-right corner in Android Studio Feb 23 21:23:37 I see, which one should no increase, allocated? Feb 23 21:23:42 not* Feb 23 21:24:04 Gliese: allocated, yeah. if it keeps going up, you're retaining memory somewhere. Feb 23 21:24:15 so indeed I am retaining Feb 23 21:24:30 it crashes around ~46mb allocated Feb 23 21:24:39 TacticalJoke it looks like for a dialog fragment I need to give it an XML layout? But the MaterialDialog Im using basically builds itsself Feb 23 21:24:47 Wondering if this will still work Feb 23 21:25:07 No need to use XML. Feb 23 21:25:33 Just override onCreateDialog and return a dialog. Feb 23 21:25:35 groxx and how to avoid it? what bugs me is that I close the fragment and its activity , all memory used should not be released? Feb 23 21:25:41 Interesting, ok Feb 23 21:25:49 Thanks :D sorry about all the questions Feb 23 21:26:39 Gliese: so if that's the cause, introduce yourself to hprof + MAT. in the Android Device Monitor, there's a "dump hprof" button above the list of devices, which will give you a snapshot of all your memory. that'll open in MAT (just a tab, in the device monitor, but there's also a standalone tool), which lets you query it / find why things are being kept in Feb 23 21:26:39 memory. Feb 23 21:26:59 No worries. I'd answer more thoroughly but I'm not home. Feb 23 21:27:24 No prob, Ill talk to you later Feb 23 21:27:29 You're always at home here in #android-dev Feb 23 21:27:36 homeslice Feb 23 21:27:39 Feel free to send me that APK whenever your ready too, TacticalJoke Feb 23 21:27:50 grow seems like fancy stuff, I will check some tutorials about it. And about my question "I close the fragment and its activity , all memory used should not be released?" Feb 23 21:28:28 Gliese: other possibilities are: repeatedly allocating / deallocating memory may be fragmenting your heap, causing you to run out of room when you appear to have plenty. if you're on a newer OS version (~4+) you can reuse the bitmap memory from the previous frame to load the next frame, fixing the fragmentation problem. Feb 23 21:29:11 samskiter: I had the same question a while back so hopefully someone answers, ended up doing the pausehandler but doesn't seem totally right Feb 23 21:29:16 groxx: fucking android fragmentation Feb 23 21:29:23 Gliese: and if you're able to do so: _very strongly_ consider using a movie file instead of a bunch of images. it'll be way more efficient to render, and use less disk space. Feb 23 21:29:24 ios is so muh beter Feb 23 21:30:00 I'm looking forward to your feedback. I'm off on tangent right now so it might take a while, though. Feb 23 21:30:02 so I just now figured otu that editText thing.. Feb 23 21:30:24 groxx cannot in this case, the animation is a custom big spinning wheel that can blink between two frames sometimes Feb 23 21:30:30 It’s kind of a bummer because now I can’t set selection with a finger touch Feb 23 21:30:36 editText.setInputType(InputType.TYPE_NULL); Feb 23 21:30:48 trevor-e: ah, good to here. let’s see what turns up… Feb 23 21:31:28 groxx I am using this coed http://pastebin.com/rKadRvPr and line 72 causes the out of memory, but I need it to make the animation smoother Feb 23 21:31:29 Gliese: is the wheel the "same" image, but rotating in the frames? Feb 23 21:31:58 networking gets so tricky when dealing with savedInstanceState and Android being able to kill your app at any time Feb 23 21:32:06 let me see if I can find something similar ( I am in my personal computer, so I don't have it here) Feb 23 21:32:54 How can I align wrap_content views to top of its parent (parent's height is more than children). I tried gravity top but it didn't work. https://dpaste.de/VuTx Feb 23 21:33:43 Gliese: why do you need that to make the animation moother? Feb 23 21:33:57 grow http://i.stack.imgur.com/JHT24.png something like this but with 17 frames and bigger centered on the screen , the images are like 400px Feb 23 21:34:01 and that should basically run once Feb 23 21:34:02 groxx* Feb 23 21:34:11 Wait, It looks like onCreateView returns a view, would I be able to cast my MaterialDialog into a Vie? Feb 23 21:34:13 View? Feb 23 21:34:31 astroduck: try layout_gravity="top" on the children views Feb 23 21:34:34 You probably want onCreateDialog. Feb 23 21:34:39 I'm trying to get the zip code using the Geocoder. I'm able to get the lat, long, city and everything else, but zip code always turns up null. Anyone have an idea why or a workaround? http://hastebin.com/xalezonedi.avrasm Feb 23 21:34:51 mikedg because my designer already saw it going smooth , now cannot go back :D this out of memory problem was discovered 3 months lafter implementation :p Feb 23 21:35:01 after* Feb 23 21:35:06 what other way were you doing it so it wasnt smooth? Feb 23 21:35:09 That returns a dialog Feb 23 21:35:21 But will my MaterialDialog be considered a dialog? Feb 23 21:35:25 Is this material dialog thing a Dialog subclass? Feb 23 21:35:26 this is line 72 mBitmap = Bitmap.createBitmap(width, height, config); Feb 23 21:35:32 that only appears to be happening once Feb 23 21:35:35 groxx: Didn't work Feb 23 21:35:55 I would assume, but I dont know Feb 23 21:36:01 Should I check the code Feb 23 21:36:15 mikedg thats why I think when I kill my fragment nothing is released, because it only happen after using the animation like 30 times Feb 23 21:36:21 Yeah, or the documentation. Feb 23 21:36:31 memory allocated is increasing,increasing,increasing until it reaches the limit Feb 23 21:36:31 Dont think this lib has documentation Feb 23 21:37:01 groxx: Got it, android:baselineAligned="false" Feb 23 21:37:18 If it does not subclass Dialog then will this not work? Feb 23 21:37:19 astroduck: ah, right, textviews are a bit odd there. Feb 23 21:37:23 and what bugs me is if I killing the fragment responsible for the animation, why the memory is not released Feb 23 21:37:28 I am* Feb 23 21:37:36 Gliese: time for hprof + MAT :) Feb 23 21:37:42 that's basically what it's designed for Feb 23 21:37:42 also im missing something Feb 23 21:37:50 but that doesnt even look like mbitmap is actually being used Feb 23 21:38:17 it seems like it may be used. the inBitmap options are being passed to the resource-loading. Feb 23 21:38:26 I haven't done that personally, but it reads right at least. Feb 23 21:38:30 i must be misreading it Feb 23 21:38:36 groxx I will use it tomorrow indeed (cannot use now since I am not at office) :) really curious to use it Feb 23 21:39:18 I can't for the life of me find where to get a Dev ID from shoutcast Feb 23 21:39:20 TacticalJoke the library extends DialogBase? Feb 23 21:39:30 Gliese: when you do, you can probably find tutorials on it online, it's a pretty long-standing Java tool. it's a bit complex, but the basics aren't too hard once you figure them out :) Feb 23 21:39:42 I think I'm just going to use an existing one from another app until they sue me Feb 23 21:40:15 lol Feb 23 21:40:15 groxx ok, thank you! complex or not I will not give up of it, because I really need to start using tools for this matters Feb 23 21:40:41 It extends AlertDialog, which extends Dialog. Feb 23 21:40:45 Gliese: I'll likely be online tomorrow, in case you need help. google first though ;) Feb 23 21:40:54 trevor-e: have you looked much at robospice? it disconnects from requests in onstop and reconnects in onstart/onrestoreinstancestate. seems like what I was leaning toward…. Feb 23 21:41:06 So DialogBase extends AlertDialog which extends Dialog? Feb 23 21:41:10 Yeah. Feb 23 21:41:21 According to my quick Google, anyway. Feb 23 21:41:26 groxx ahah ok :D if google fails me (hope not) I will pass here Feb 23 21:42:20 haven't looked at it, would rather not add more dependency bloat to my project though :P Feb 23 21:42:22 Cool, so fragments are supposed to help organize this stuff? Feb 23 21:42:40 trevor-e: tell me about it. they do use things like bound services though, so i approve :) Feb 23 21:42:47 drose379: you can do without fragments and probably be less confused Feb 23 21:43:20 So far they dont seem too confusting, and I have been looking for a way to organize my dialogs Feb 23 21:43:48 silly question: is there an android equivelant of a solution file? or is the root directory of an applicaiton the solution file? Feb 23 21:44:20 It's better to use DialogFragment than Dialog directly. Feb 23 21:44:21 using android sutdio on one computer to create a new app, then coping the entire folder onto another computer with android studio will allow me to open and work on the same app? Feb 23 21:44:28 I'm setting up a BroadcastReceiver in my Application class. Registering in onCreate(), when is a good time to unregister it? Feb 23 21:44:36 trevor-e: i think another approach would be to manage the request with the retained fragment but not to receive any of the callbacks. then also store the ongoing request on the model somewhere and have the activity observe/read from the model. Feb 23 21:44:53 They're really simple, drose. Feb 23 21:44:57 MikeWallaceDev: onDestroy Feb 23 21:45:01 mantas322, -> git Feb 23 21:45:11 onDestroy isn't called. Feb 23 21:45:19 only on the emulator Feb 23 21:45:21 trevor-e: but that’s a real shame if that’s what you a have to do Feb 23 21:45:22 onStop ? Feb 23 21:45:27 The complexity of Fragments is hardly exposed in DialogFragment (at least in cases such as yours). Feb 23 21:46:14 are you suggesting that "git" is to be used to when workign on the same android application from multiple pcs? Feb 23 21:46:17 MikeWallaceDev: When nothing in your app is running anymore? It's up to you to figure out how long you need it for.. You can also just not unregister it, and let it die with your app Feb 23 21:46:39 SimonVT, that's the answer I wanted to hear Feb 23 21:46:58 onPause? Feb 23 21:47:13 I want it for the whole duration of the app, right now I'm not unregistering and I don't see a warning Feb 23 21:47:26 yeah the app dies before it can bitch about it Feb 23 21:47:27 shmooz, Application doesn't have onStop or onPause Feb 23 21:47:40 MikeWallaceDev: then create one Feb 23 21:47:53 and it should be onDestroy actually Feb 23 21:48:07 MikeWallaceDev: you might want to look into putting it in a service Feb 23 21:48:13 if you want it to be running as much as possible Feb 23 21:48:50 if its in the application itll start when the user launches the app and itll die when the app is kicked out of memory and wont come back til the user relaunches or something else causes the app to start Feb 23 21:48:56 MikeWallaceDev: You could also register a ActivityLifecycleCallback and tie it to that Feb 23 21:48:58 if you have a service and the service is killed it should get relaunched Feb 23 21:49:03 Assuming you don't care about other app components Feb 23 21:49:08 and then poop Feb 23 21:49:09 TacticalJoke what is onAttach()? Feb 23 21:49:18 Looks kind of like onCreate for a Fragment? Feb 23 21:49:49 You don't have to worry about that. It's just when the Fragment is attached to the Activity. Feb 23 21:49:56 groxx one more the only point of BitmapFactory.decode(something) is to convert this something to a bitmap right? Feb 23 21:50:01 thing* Feb 23 21:50:08 What does it mean "Attached" ? Feb 23 21:50:11 SimonVT, nah, I'll just let it die. That's what I want. Feb 23 21:50:58 Oh, I see Feb 23 21:51:16 Does onAttach get called when the activity calls the Fragment from the FragmentManager? Feb 23 21:51:20 MikeWallaceDev: without knowing how long it will linger around eating up memory ? Feb 23 21:52:18 if the app doesn't have onDestroy, insert onDestroy into it Feb 23 21:52:43 shmooz, the Application class doesn't have an onDestroy method. Feb 23 21:52:52 shmooz: How do you insert onDestroy into an Application subclass? Feb 23 21:52:55 errr, no, it does, it's not called. Feb 23 21:53:03 oh that's what it is ? Feb 23 21:53:04 It's when the Fragment is Attached to the hosting Activity. Feb 23 21:53:22 it's only called on the emulator Feb 23 21:53:54 attached Feb 23 21:54:14 Google, drose. All your answers are there. Feb 23 21:55:39 Ok Feb 23 21:55:50 drose379: http://developer.android.com/guide/components/fragments.html#Creating Feb 23 21:56:12 I just dont get what they mean by attachign Feb 23 21:56:17 attaching Feb 23 21:56:57 drose379: Because you probably have never read a tutorial on fragments Feb 23 21:57:17 Does it mean when the dialog is inflated on top of the activity Feb 23 21:58:30 If a user exits out of all the activities of an application, will intent services stop immediatly, or stop if they have an interrupted exception, or not stop if no interrupted exception? Feb 23 21:59:58 Gliese: yeah. I wish it were a bit more explicit / documented, but I suspect the details of what it does depends on the hardware. some techniques might be more efficient on X vs Y, carriers may want to add another format it can decode, etc. odds are very good that the canonical version is in the AOSP source code repo though. Feb 23 22:00:33 TacticalJoke: I should have some code to look at later if you want to tell me which parts are terrible that would be awesome. =) Feb 23 22:05:06 Hey should I be importing app.DialogFragment or app.v4.support.DialogFragment Feb 23 22:06:24 Sure, post away. People can post feedback. :) Feb 23 22:06:48 depends if you are using the support lib or not Feb 23 22:09:36 Ok so im inside the fragment class trying to create a new dialog and the dialog needs context to be created Feb 23 22:09:50 So should I pass the context from my activity to the fragment when I call it? Feb 23 22:10:46 lasserix_: nothing will stop. Feb 23 22:11:12 groxx meaning the intent service will continue to do whatever till it is done? Feb 23 22:11:44 lasserix_: yeah. since it exists, you're a bit less likely to be killed. but unless you're holding a wakelock, you may not get any CPU time. Feb 23 22:12:02 but there's nothing automatic "nothing visible -> freeze the process" Feb 23 22:12:14 bankai_ http://digg.com/video/elsa-the-dog-earns-her-keep-by-shoveling-snow Feb 23 22:12:18 drose379: Please go read a tutorial and study a sample application, all the questions you are asking as super basic Feb 23 22:13:40 jaana: I'm having similar problems and the tutorials and samples aren't a big help to me. Probably the same case for drose Feb 23 22:14:40 lasserix_: e.g. even if you just create a thread and periodically log, you'll see it running pretty much continuously. lock the phone -> it'll stop within a couple seconds, usually. run some apps -> the process will eventually get killed. services aren't special aside from being a lifecycle object -> the system considers you "active" so you're less likely Feb 23 22:14:40 to be killed than something inactive. Feb 23 22:15:29 well, and that they're externally-message-able, like everything in the manifest. Feb 23 22:22:20 Interesting, so intent service keeps running Feb 23 22:22:30 if your activities are destroyed, only intent service, it'll keep running Feb 23 22:22:43 but if you take long enough, and start activity again, it'll kill the previous process and start afresh Feb 23 22:23:55 I (very strongly) suspect it's not proactively killing + starting afresh, but dying in the background on its own -> you're starting a new process because it's dead. Feb 23 22:24:19 it starts first tho Feb 23 22:25:15 ie appclass oncreate, activity oncreate, intentservice oncreate onhandle sleep 1000 out hello 1 2 3 4 ... activity on pause 44 45 activity on destory 46 47 48 49 50 ... Feb 23 22:25:30 then if you go back immediatly, you won't get appclass oncreate Feb 23 22:26:14 the application isn't ever destroyed (except in some cases on emulators / tests, apparently) Feb 23 22:26:37 yeah it can be Feb 23 22:27:45 then it would be calling onTerminate, and the javadoc there is pretty explicit. also most apps I've built would have lots of crazy errors that have never occurred. Feb 23 22:27:56 no it only calls onterminate on emulator Feb 23 22:28:09 but you can see that app is killed sometimes, because you can see oncreate gets called sometimes Feb 23 22:28:35 yeah. that's when your process dies. the application instance is only ever created once per process, and never goes away as long as that process exists. Feb 23 22:28:46 yeah exactly, Feb 23 22:28:48 well, after your process dies. not when. Feb 23 22:28:55 just intersting that intent service is not enough to keep process from being recreated Feb 23 22:28:59 which is consistent Feb 23 22:29:02 I need to pass a Context to a Fragment Feb 23 22:29:17 no you dont Feb 23 22:29:23 Why not Feb 23 22:29:54 lasserix_: by "keep process from being recreated" you mean "keep the process from getting killed"? a foreground service will be way way more effective than a normal service, if you want to prevent that. Feb 23 22:30:52 gahh, savedInstanceState is the worst part of android Feb 23 22:31:15 The hell can I pass things to a frag Feb 23 22:31:30 having multiple custom views in the same layout requires the stupid dispatchSaveInstanceState/dispatchRestoreInstanceState fix Feb 23 22:31:34 drose379: frag.setArguments(bundle) Feb 23 22:31:34 drose379: getActivity() is a Context Feb 23 22:31:49 trevor-e: you can have your views save their own state Feb 23 22:32:13 drose379: and yess what groxx said about passing other primitive/parcelable things to fragments Feb 23 22:32:14 yiati is getActivity giving me the context of the parent activity? (Thank you BTW) Feb 23 22:32:18 So Intent service runs as long as its worker thread is executing? Feb 23 22:32:44 if it's just a linearlayout of textviews I'd rather not have to, since extending BaseSaveState is also messy Feb 23 22:32:50 but if i started some threads from that worker thread, the intent service could stop if the worker thread doesn't block till those spawned threads notify? Feb 23 22:32:50 contexts map to applications? Feb 23 22:32:59 drose379: getActivity() is a Fragment is giving you the Fragment that's managing that Fragment Feb 23 22:33:09 and Activity is a Context Feb 23 22:33:14 lasserix_: iirc it runs as long as there are things in the queue + it's currently executing an onHandleIntent. once that returns + there's nothing pending, it calls stopService. Feb 23 22:33:20 so getActivity returns a context Feb 23 22:33:35 yes, the activity ,which is a context Feb 23 22:33:40 groxx: yeah so if i want to spawn threads i need the original worker thread to block till those notify Feb 23 22:33:51 And the activity it returns is the one that is callign the fragment Feb 23 22:33:53 lasserix_: yep. or just use a normal service at that point :) Feb 23 22:34:10 Where the fragment manager is located Feb 23 22:34:25 groxx yeah i was already but intent service is single shot Feb 23 22:34:40 "single shot" meaning...? Feb 23 22:34:50 it stops self after completing what its task is Feb 23 22:34:54 the service only has this one task Feb 23 22:35:06 drose379: yes Feb 23 22:35:23 yiati what if I wanted to pass a class instance to a fragment? Feb 23 22:35:30 I dont think there is a bundle put method for that Feb 23 22:35:46 drose379: Make that class parcelable and then you can pass it in Feb 23 22:35:51 lasserix_: that's not hard to emulate fwiw. just call stopSelf() from your worker thread. Feb 23 22:35:54 Parcelable? Feb 23 22:36:10 drose379: http://developer.android.com/reference/android/os/Bundle.html#putParcelable(java.lang.String, android.os.Parcelable) Feb 23 22:36:13 drose379 you have to start reading some docs Feb 23 22:36:19 ^^ Feb 23 22:36:35 drose379: It's a way to serialize pojos, http://developer.android.com/reference/android/os/Parcelable.html Feb 23 22:36:48 stop supporting laziness. Feb 23 22:37:05 (Unless you're paid for that.) Feb 23 22:37:12 pojos? Feb 23 22:37:22 plain old java objects Feb 23 22:37:33 Hello, do you know about a resource (video, book, class) to dive into Android source code. I would like to focus on applications right now but i'd like to go lower in the stack. I downloaded the code, i'm trying to read it but i am very slow since the code is kinda huge and also, there are patterns that i don't recognize. Feb 23 22:37:43 Ok and I can pass it back and fourth from the Fragment to the Activity Feb 23 22:38:09 or pass a runnable Feb 23 22:38:14 which may be easier Feb 23 22:38:31 Maybe, yeah Feb 23 22:38:42 runnables are closures i think Feb 23 22:38:50 So if the class I want to pass implements Parcelable Feb 23 22:38:55 still trying to map java concepts to the normal world Feb 23 22:39:16 what? Feb 23 22:39:38 wow, TIL about View.generateViewId() Feb 23 22:39:42 Mavrik: fair enough Feb 23 22:39:49 too bad there's no compat for sdk<17 Feb 23 22:39:57 :) Feb 23 22:40:38 needing that method is usually a bad sign Feb 23 22:40:46 really? Feb 23 22:41:06 myke do you think I could create an interface in the fragment and set the activity as a listener Feb 23 22:41:12 you can declare an id outside of a layout if you need one Feb 23 22:41:25 Then return the class instance through a method of the interface Feb 23 22:41:28 I have a custom view that I'm programmatically adding to a layout, and I don't know how many I need to add which is why I don't define the ID in values Feb 23 22:41:48 fair, but why do those views need IDs at all? Feb 23 22:41:57 How do I wait for user input before calling a function to modify elements based on that input? Feb 23 22:41:57 you are creating them programmatically so it's not like you need to look them up Feb 23 22:41:58 saved instance state issues Feb 23 22:42:16 that's the parent view's responsibility Feb 23 22:42:21 they all restore to the same value unless I use dispatchSaveInstanceState Feb 23 22:42:32 ah i see what you mean Feb 23 22:42:41 you have no custom parent view Feb 23 22:42:42 whereas my understanding is if they had unique ID's then Android would take care of that for me Feb 23 22:42:47 trevor-e: you can increment an integer and add it to the ID name as you create them Feb 23 22:42:58 shmooz: they are integers, not names Feb 23 22:43:17 oh Feb 23 22:43:31 trevor-e: the workaround is to use a custom parent view with an explicit ID and have it take care of the dynamic state saving Feb 23 22:43:46 newbQ: Are you asking how you wait for users input until you call some function requiring their input? Feb 23 22:44:41 hmm, ok Feb 23 22:45:58 yiati: yes Feb 23 22:46:25 yiati: I want to change the default value on spinners based on user input Feb 23 22:46:51 newQ: Set the default value based on their input Feb 23 22:47:07 drose379: i'm not sure what you're trying to do. you can always pass a refernce to the activity and store it in the fragment Feb 23 22:47:40 yiati: that's what I'm trying to do. but they get set to another value already, before the user enters the input Feb 23 22:48:32 TacticalJoke can I ask you a question Feb 23 22:48:47 newbQ: enters the input where? Feb 23 22:49:25 Yeah. Feb 23 22:49:29 yiati: in the onCreate? I'm trying to only ask for the input the first time the app is opened Feb 23 22:49:51 So if I have my activity implement the Listener activity Feb 23 22:50:21 That means if I pass (this) from the activity, that can be considered a Listener right? Feb 23 22:50:35 Implement the Listener interface * Feb 23 22:50:49 hopefully Feb 23 22:51:07 Just making sure Feb 23 22:51:08 newQ: Your question sounds like you want to invent the chicken with an egg, but you need a chicken to get an egg. What is the clear order of events you want visually? Feb 23 22:51:10 :D Feb 23 22:51:30 you can pass that to your fragment directly Feb 23 22:52:09 Im gonna use the interface to return something back to the activity Feb 23 22:52:21 In the case of DialogFragment you don't need to worry about any setListener method. Feb 23 22:52:41 Well I have a lessonManager class that handles all the data collected from the dialogs Feb 23 22:52:53 The simplest way is probably this: Listener listener = (Listener) getActivity(); listener.onSomethingHappened(); Feb 23 22:53:15 just set the listener in onAttach() ? Feb 23 22:53:15 Or you can use onAttach. Feb 23 22:53:16 then in the activity have a @Override onSOmethingHappend()? Feb 23 22:53:29 drose379 dang, read the docs !its all right there Feb 23 22:53:41 they even have an example showing thios Feb 23 22:53:49 yiati: I want the app to open, check if a file exists, then if data is there, set the spinners based on that data. if the file doesnt exist, prompt the user for a date, then use that date to set the spinners Feb 23 22:54:20 Which doc should I look at g--s Feb 23 22:54:22 g00s Feb 23 22:54:23 * Feb 23 22:54:57 drose379 how about the first google hit, android fragment guide http://developer.android.com/guide/components/fragments.html Feb 23 22:55:26 newbQ: Okay make sure you don't show the spinner until you've done all of the previous stuff, and then your fine to set the default spinner value Feb 23 22:55:28 Wheres the example you were talking about Feb 23 22:55:29 "Creating event callbacks to the activity" Feb 23 22:55:33 omg Feb 23 22:58:31 Are things different for DialogFragments Feb 23 22:58:45 Negative. Feb 23 22:59:12 So in onAttach I getActivity and make that a Listener? Feb 23 22:59:52 No its an OnArticleSelectedListener Feb 23 22:59:58 What is causing my android application to crash after clicking this button? Here is my handler: http://pastebin.com/vwFtBGiU Feb 23 23:00:25 Mittendeep: dunno. what's the crash? Feb 23 23:02:23 Hm, I think I can get this TacticalJoke Feb 23 23:03:16 Reto Meier banned my account. What a dick. Android fucking sucks. Is he online now? Hey Reto, stop banning accounts you fucking Nazi! Feb 23 23:03:27 I can't find a line number or stack trace, it just crashes on click. My logcat output sucks. Feb 23 23:03:45 Mittendeep: turn off your app filter, just in case. Feb 23 23:04:14 groxx: my output returned, that helps a ton =p Feb 23 23:04:25 mushmouth: please send all complaints to /dev/null Feb 23 23:04:41 https://www.change.org/p/sergey-brin-respect-the-efforts-of-small-and-indie-android-developers?tk=ZlwNn9kNTxv0NjbicZ2s_HyiYIxSbzWjr9VplUKWKoc&utm_source=petition_update&utm_medium=email&utm_campaign=&utm_term= Feb 23 23:04:58 Hey, I wanted to call a function when the screen is tapped, problem is I have no views on the activity, and I can't cast a Window to View. What do? Feb 23 23:06:22 Any reason why Lollipop is so buggy and confusing? Sundar is clueless. Feb 23 23:06:38 groxx: http://pastebin.com/PyicCaLN is my logcat output. Feb 23 23:06:53 g00s im sorry I need to stop doing that Feb 23 23:06:57 :) Feb 23 23:08:26 But can I ask something? (I have already searched google and I think someone here will be able to answer it a lot better/easier) Feb 23 23:08:39 Mittendeep: doesn't look like there's anything in there, it may have been too long since it crashed. try again? Feb 23 23:08:53 When is onAttach() called? I know it is when the Frag is attached to the activity, but when exactly is that? Feb 23 23:09:10 Is that when the .show() method is called on the fragment? Feb 23 23:09:20 drose379 bookmark https://raw.githubusercontent.com/xxv/android-lifecycle/master/complete_android_fragment_lifecycle.png Feb 23 23:09:38 Got it, thank you\ Feb 23 23:09:45 Jake, why did you waste your career on a buggy, confusing locked down OS? What a waste of time. Feb 23 23:09:50 drose379: Your reluctance at googling and reading even the most basic tutorials is truly astounding Feb 23 23:09:59 mushmouth: because I'm now sleeping on beds of money Feb 23 23:10:09 drose379: there's also a complete lifecycle here: http://developer.android.com/reference/android/app/Fragment.html#Lifecycle Feb 23 23:10:32 Thank you jaana Feb 23 23:10:37 lol Feb 23 23:10:46 JakeWharton: what's your role at Square? Feb 23 23:10:55 do they just say, hey I want a library that does this better Feb 23 23:10:58 great to know your so greedy. ok, i'm outta here. Feb 23 23:10:58 and then you make it? Feb 23 23:10:59 Chief Bug-Introducing Officer Feb 23 23:11:25 Grr, my connection is slow today. Feb 23 23:11:32 It's like being on 56K again. Feb 23 23:11:34 shouldn't that be CIO - Chief bug Injecting Officer ? Feb 23 23:11:42 56k* Feb 23 23:11:46 So when it is "associated with the activity" that means when I do TestDialogFragment test = new TestDialogFragment()? Feb 23 23:11:53 aw, he left... now i'll never get to correct his incorrect use of "your" Feb 23 23:12:06 drose379: it happens at some point after you tell the fragment manager to add it. you don't control when it happens. Feb 23 23:12:09 In the case of DialogFragment, it's when you call show(). Feb 23 23:12:23 Ok, problem solved! Feb 23 23:12:29 (show() adds it to the FragmentManager, to be clear.) Feb 23 23:12:38 Well wasent a problem really, just wanted to make sure I understood it before I wrote some code Feb 23 23:12:44 Thank you Feb 23 23:12:52 yeah. but alas, adding it to the fragment manager doesn't actually attach / create it immediately. Feb 23 23:13:12 but onAttach is always called before the dialog shows? Right? Feb 23 23:13:23 Yeah. Feb 23 23:13:25 drose379: yeah. always before onCreateShow Feb 23 23:13:27 drose379 put somelogs, try it Feb 23 23:13:31 onCreateView* Feb 23 23:13:52 Ok, so I dont need setListener anymore Feb 23 23:13:57 Right. Feb 23 23:14:05 Got it Feb 23 23:14:06 Ok Feb 23 23:14:08 You don't even need onAttach, to be honest. You can just say "getActivity()". Though some prefer onAttach. Feb 23 23:14:30 where would I call getActivity from? Feb 23 23:14:30 TacticalJoke: getActivity() will return null if called too early Feb 23 23:14:31 The activity? Feb 23 23:14:44 jaana: Yeah, but that doesn't really apply to simple uses of DialogFragment. Feb 23 23:14:49 or too late D: or when detached. Feb 23 23:15:25 TacticalJoke: to me, onAttach() is the best place to perform injection since you get passed a @Nonnull Activity Feb 23 23:16:42 I prefer not using onAttach for simple cases because using it means having an extra field. Feb 23 23:16:43 "Intel forges ahead to 10nm, will move away from silicon at 7nm" :O Feb 23 23:16:53 away from silicon huh Feb 23 23:16:57 For me, it depends on whether I want a Listener field. (If I do, it's no big deal to use onAttach.) Feb 23 23:17:04 isn't there an experimental 5nm? Feb 23 23:17:22 no idea Feb 23 23:18:29 g00s: Did you see that someone is suing Lenovo about the Superfish thing? Feb 23 23:18:37 yeah Feb 23 23:18:38 Made me think it'd be cool if someone sued Google about a crazy app takedown. Feb 23 23:18:59 Did that guy say that android was locked down? Feb 23 23:19:06 I think the Superfish issue has more merit than app takedown Feb 23 23:19:13 Very often, people who complain about unfair take down hide the details that reveal that actually, the take down was quite fair Feb 23 23:19:17 since it was actually intercepting bank info Feb 23 23:19:20 and breaking wiretap laws Feb 23 23:20:19 So if Im inside an innerclass and I want to call the method in the Listener, I need to use a handler? Feb 23 23:20:21 jaana, for some people perhaps Feb 23 23:20:23 To get back to the main thread Feb 23 23:20:35 Aren't you already on the main thread? Feb 23 23:20:39 Inner classes have nothing to do with threading. Feb 23 23:20:50 jaana, for others it's the same dumb inhuman robot like on youtube Feb 23 23:20:51 Well im inside a DialogFragment Feb 23 23:20:55 That's the main thread. Feb 23 23:20:58 I have no idea what thread im in Feb 23 23:21:00 jaana, which will destroy your work for no reason than false positive Feb 23 23:21:13 Ok, I just remember an innerclass in OKHTTP was on another thread and I ran into a prob Feb 23 23:21:20 and for some dumb reason it's you who's going to be forced to prove you've done nothing wrong not the other way around Feb 23 23:21:25 Mavrik: it’s always a robot, but you usually get three warnings. If you still haven’t acted on it by the time warning #3 comes in, you had it coming Feb 23 23:22:02 jaana, acted on what exactly? As of now, the messages are utterly vague and there is no possibility of talking to a human. Feb 23 23:22:20 (As opposed to Apple for example where they at least tell you more clearly what's wrong.) Feb 23 23:22:32 drose379: Why are you using an inner class, anyway? Thought you wanted to modularize stuff? Feb 23 23:22:46 Its the callback for my material dialog Feb 23 23:22:50 jaana, it's exactly the same as getting your shit taken down from YouTube because their robot detected bike tyre sound as Skrillex song. Feb 23 23:22:53 Oh, for a button click? Feb 23 23:22:55 (I'm not kdding.) Feb 23 23:22:57 Yes Feb 23 23:23:03 Ah, okay. Feb 23 23:23:13 I guess you mean "anonymous class" (AKA "anonymous inner class"). Feb 23 23:23:17 Yeah Feb 23 23:23:21 I gotta go for now tho Feb 23 23:23:24 Talk to you guys later Feb 23 23:23:27 Thanks for the help Feb 23 23:25:58 jaana the real stinker, is when you have permission to use a trademark and then get flagged Feb 23 23:26:16 yea, they just auto-assume you don't have permission Feb 23 23:26:19 or you get flagged for keyword spam because you included required legalese in your play desciprtion Feb 23 23:26:22 I feel bad for those people who couldn't figure out what was wrong, reuploaded twice, and got banned for life. :/ Feb 23 23:26:38 And of course there was no way of asking Google what was wrong. Feb 23 23:26:48 Yep, those were epic. Feb 23 23:26:54 If I were in this situation, after two warnings, I’d upload the app under a temporary name so I can keep trying without getting my main account banned :) Feb 23 23:26:56 "I have permisison to use this trademark." Feb 23 23:26:58 "FLAGGED BANNED" Feb 23 23:27:18 jaana: You'd pay for a new account? Feb 23 23:27:35 Pretty cheap compared to getting the main account banned, isn’t it? Feb 23 23:27:38 I think that would be breaking the rules, in any case, wouldn't it? Feb 23 23:27:45 Creating a new account to get around bans. Feb 23 23:27:52 If it were that easy, bans wouldn't be a problem. Feb 23 23:27:55 Probably Feb 23 23:28:02 If they found out you were doing that, you'd get... Feb 23 23:28:06 (Can you guess? :D) Feb 23 23:28:08 they'd be a problem for reasons like "lost all my users" Feb 23 23:28:11 It’s just a workaround against the limitations of the system (the fact they don’t tell you exatly what’s wrong) Feb 23 23:28:12 Well, there's that minor thing of having to give your credit card with all details on Wallet ;) Feb 23 23:28:30 TacticalJoke: If they found out, they would ban your main account, which they would have done anyway Feb 23 23:28:51 So it's not a solution. Feb 23 23:29:01 It’s a possible solution Feb 23 23:29:16 No, it's a workaround. Feb 23 23:29:20 yup Feb 23 23:29:21 Since the problem still exists. Feb 23 23:29:24 It's a really bad attempt at solving a problem. Feb 23 23:29:35 And it can get you to tune your app until it no longer gets banned, seems worth it Feb 23 23:30:09 actual solution: move to mountain view, waylay googlers until you get a response. Feb 23 23:30:15 i read teh other day, seems like apps are being scanned now when you submit an apk. no idea what happens if it fails Feb 23 23:30:27 afaik they've been doing that for a long time Feb 23 23:30:27 but the retroactive part is still going on Feb 23 23:30:30 throw pebbles at Google's windows Feb 23 23:31:05 solution: more mobile OS competition Feb 23 23:31:05 trevor-e: when they open up, be sure to be holding a boombox, and play some sweet, sweet Rick Astley at them. Feb 23 23:31:29 This is why I'm hoping someone sues them. But I guess it might be pointless given that they probably cover themselves completely with their terms of use. Feb 23 23:31:34 JakeWharton: is @OnClick expected to work on ImageView? Feb 23 23:31:56 It works on any view Feb 23 23:32:03 Ok that’s what I thought Feb 23 23:32:18 (an engineer on my team is saying it’s not, I’ll investigate) Feb 23 23:32:42 http://developer.android.com/reference/android/view/View.html#setOnClickListener(android.view.View.OnClickListener) Feb 23 23:32:48 tell your coworker that they are wrong Feb 23 23:33:04 I already kind of did before asking but thought I’d check Feb 23 23:37:26 If I am not seeing anything in logcat after "unfortunately your application has stopped" what should I look at for debug information? Feb 23 23:38:12 The exception trace should be in LogCat. Feb 23 23:38:25 It should be logged right before the "stopped" dialog shows in your app. Feb 23 23:38:41 If you set the log level to Error and remove other filters, that might help you to find it. Feb 23 23:39:41 sometimes I have to change the filter app:com.my.app to Filter:None Feb 23 23:59:41 err I’m having UI problems.. When I click a button an animation happens and then two views lose their margins :( Feb 23 23:59:48 seem to lose their gravity too Feb 23 23:59:55 err weight Feb 24 00:52:32 I must say, the visual parts of android studio are integrated sooo much better than their Eclipse ADT counterparts. Feb 24 00:52:41 *visual ide parts Feb 24 00:54:47 Eclipse just feels like a bit of a hodgepodge Feb 24 00:55:18 add any more hodges, and it just gets podgier. and ADT added a LOT of hodges. Feb 24 00:57:18 android feels like a hodgepodge Feb 24 00:57:26 so eclipse and android should go well together :) Feb 24 00:57:54 and indeed they do! Feb 24 00:59:13 I tried following a bunch of guides to get a background image to work by using an image from /drawable/background and it wouldn't work in Eclipse, but the same code worked perfect in AS. Now, once I complete this I will have to turn it into an Eclipse project and hope everything goes smooth. Feb 24 01:00:26 I think the issue earlier was that you were using "@drawable/foo.png" instead of "@drawable/foo". Feb 24 01:00:47 that would do it Feb 24 01:01:04 It didn't work either way, I tried both. They gave compile time errors. Feb 24 01:01:59 Howdy folks Feb 24 01:02:31 what do you guys use for automated build testing? Feb 24 01:02:49 I'm looking at genymotion Feb 24 01:11:12 I think i read that is good, somewhere, once. Feb 24 01:20:14 * Mokstar also looks at testdroid. Feb 24 01:24:35 groxx: cause it is Feb 24 01:27:30 * g00s keeps wondering if his sdk manager is busted : haven't seen updates for anything in a looong time Feb 24 01:31:05 well, except for android studio :) Feb 24 01:34:41 join #intellij Feb 24 01:44:26 when writing a custom view is it better to override ontouchevent or implement ontouchlistener? Feb 24 01:45:54 lasserix_: I don't know if there's a common opinion about this, but personally: onTouchEvent, and call super to let clicks / etc pass through. then you handle the "abnormal" stuff, cancel long press if necessary, and you get all the onClick / onEtc listener support for "free". Feb 24 01:46:43 lasserix_: ontouchevent.. so that devs who implement the custom view can override with the ontouchlistener Feb 24 01:46:52 at least, so far that has appeared to produce the simplest / most-sane / least surprising code that I've attempted. Feb 24 01:46:52 so call super and do whatever i need with the click, and consume if i used? Feb 24 01:47:12 do I call super if i do consume? Feb 24 01:47:13 lasserix_: it all depends on what your trying to do Feb 24 01:47:40 lasserix_: what this https://www.youtube.com/watch?v=EZAoJU-nUyI Feb 24 01:47:41 night all Feb 24 01:48:31 Napalm|afk: cool. sounds like something I need to watch too :) Feb 24 01:50:01 if i am making a view that is wider than the screen, is there some trick to get away with not implementing all the scrolls tuff? Feb 24 01:50:08 for instance, can i just wrap it in a scrollview? Feb 24 01:52:16 I would think so. that + make sure your measured size is the full dimensions (I assume) Feb 24 01:52:45 or extend scrollview maybe? Feb 24 01:53:00 ¯\_(ツ)_/¯ which is simpler Feb 24 01:53:10 well scrollview without children? Feb 24 01:53:24 do i just set its dimension width to the full width, ? Feb 24 01:53:28 and override on draw? Feb 24 01:54:58 anybody here know anything about mapping engines? Feb 24 01:55:27 if i'm dl'ing older cm version do i have to dl the gapps too or can i use the most recent gapps Feb 24 01:59:48 mices: it probably depends, and #android-root is probably the room for that. this is for app development, not rom support. Feb 24 02:02:17 dave smith knows his stuff, i want to get his book Feb 24 02:03:20 groxx: ok thanks Feb 24 02:19:18 recommended unit test framework? Feb 24 02:20:17 For what? Feb 24 02:20:19 i'm questioning robolectric because 1) i have a pretty simple library i'm testing that it crashes on and 2) their irc channel seems non-exsistent Feb 24 02:20:41 for an android java library Feb 24 02:20:59 Why are you considering Robolectric? Feb 24 02:21:08 g00s: huh. have you seen this? https://www.youtube.com/watch?v=x1y4tEHDwk0 Feb 24 02:21:22 a coworker uses it for android unit tests Feb 24 02:21:34 groxx yes Feb 24 02:21:51 g00s: cool, figured I'd make sure :) Feb 24 02:22:25 TacticalJoke, i'm at a brick wall with it however due to this bug https://github.com/robolectric/robolectric/issues/1520#issuecomment-75683059 Feb 24 02:23:43 TacticalJoke, what do you use? Feb 24 02:23:56 for that matter, what does anyone use for unit tests? Feb 24 02:24:11 I run JUnit 4 tests on the JVM. Feb 24 02:24:21 I'm considering Espresso for instrumentation tests. Feb 24 02:26:04 TacticalJoke: Not TestNG? ;) Feb 24 02:26:38 TacticalJoke, so you're able to do that because there's little to no android classes used? Feb 24 02:27:11 Yeah, TestNG looks better. I'm using JUnit 4 mainly because I was already using it. :) Feb 24 02:27:32 Norrin: Yeah. Though you could perhaps use Mockito to mock those classes. Feb 24 02:27:55 “looks” better? o_O Feb 24 02:28:42 hmmm so in general robolectric is avoided? Feb 24 02:33:43 I guess I get around much of the JUnit awfulness by using AssertJ, but I'm looking at TestNG again (it's been a while since the last time). Feb 24 02:34:16 Norrin: A lot of people use it but I've heard serious criticism of it. Feb 24 02:35:02 Hello!, i'm needing some help with Facebook SDK(Facebook Login) can anyone give me a hand please? Feb 24 02:35:40 TacticalJoke: I don't blame you, I made JUnit the standard on Android so it's mostly my fault Feb 24 02:36:01 CedricBeust_ but ... Junit 3 ! Feb 24 02:36:05 UGGGHHHH ! Feb 24 02:36:15 g00s: I know, I know Feb 24 02:36:17 I hate that mandatory 'test' prefix. Feb 24 02:36:41 Well there wasn't much choice back then, but that's why I created TestNG in 2004 as we were working on annotations Feb 24 02:37:12 CedricBeust were you on the andoid team when Josh Bloch was embedded in the group ? Feb 24 02:37:31 g00s: I had him come over actually, same for Romain and Bob Lee Feb 24 02:37:54 i wonder what Josh thought of the android Java code in general Feb 24 02:38:23 g00s: He had to adjust somewhat :) Feb 24 02:38:28 haha Feb 24 02:38:42 Is it there an android-dev channel for n00bs like me?. :( Feb 24 02:38:51 keniobats: Here! Feb 24 02:39:49 CedricBeust thanks... but every time I ask for some help i'm ignored :P, i'm a n00b stucked with the Facebook sdk... Feb 24 02:40:21 I guess not many people know about the Facebook SDK. ;| Feb 24 02:40:36 :( Feb 24 02:43:07 Having said that, your question "Can anyone help with the Facebook SDK?" isn't very useful. Feb 24 02:43:14 keniobats: Yeah probably nothing personal, just not enough people able to answer your question Feb 24 02:43:20 Then someone either has to say "Yes, I can answer any question on that topic" or just stay quiet. Feb 24 02:43:26 But ask something specific Feb 24 02:43:27 It's much better to just ask the question. :) Feb 24 02:43:29 I've followed this auto, it seems to partially work, but i'm having two issues that perhaps some of you could help: Feb 24 02:43:30 1st: The auth asks for public_profile, while I'm expecting to ask for email, public_profile and user_friends. Feb 24 02:43:30 2nd: The auth doesn't return any user info. Feb 24 02:43:30 Yah. Feb 24 02:43:32 javatechig.com/android/using-facebook-sdk-in-android-example Feb 24 02:44:19 Sorry, i know Eric Raymond's guide to make wise questions but you know... Once in a while you got lazy :P Feb 24 02:44:32 *this auto -> this tutorial Feb 24 02:45:05 I'm using android studio 1.1.0 Feb 24 02:45:17 and the latest Facebook sdk Feb 24 02:48:44 Hope it's more specific now :) Feb 24 02:54:04 keniobats: esr is not exactly a role model to be followed so don't worry about his asking question thing :) Feb 24 02:54:30 CedricBeust :) Feb 24 02:54:53 keniobats: I'm still not quite clear what your question is. I have used the FB API extensively on the back end (not on Android) but I still don't understand what your problem is Feb 24 02:55:20 CedricBeust: One thing I miss from NUnit is "inline" parameterised test: http://nunit.org/index.php?p=testCase&r=2.5 Will TestNG ever get anything like that? (I notice that no Java test framework has them -- is it a Java-annotation limitation?) Feb 24 02:55:20 keniobats: Are you using the graph explorer to experiment with your queries? It's very useful Feb 24 02:56:05 TacticalJoke: Not really, this approach is super limited (constants only) and writing a data provider is really just a few more lines, and infinitely more flexible Feb 24 02:57:01 (also, the way we designed annotations in Java makes the notation for arrays of annotations a tad more verbose, so even more reasons to use a real data provider) Feb 24 02:58:58 CedricBeust I've used fb Graph before(mainly python on backend and javascript, phone gap, titanium appcelerator, etc) but I'm new with Java and Android Studio environment so the thing is that I follow those guides step by step, the login seems to work but during auth it does not ask for the permissions I've asked(email, user_friends, public_profile) and it also returns nothing about user info. Feb 24 02:59:18 (i'll disable the auto correct ) Feb 24 02:59:22 keniobats: So you're stuck in the oauth phase? **** ENDING LOGGING AT Tue Feb 24 02:59:58 2015