**** BEGIN LOGGING AT Sun Apr 05 02:59:58 2015 Apr 05 03:20:58 hello Apr 05 03:21:03 any one plus users here? Apr 05 03:22:30 mrfu, no Apr 05 03:23:09 there's very little reason to have multi process in android Apr 05 03:23:39 mostly it's around threading and memory space issues in 3rd party stuff Apr 05 03:24:51 uh, little reason to have multi process in Android? Multi process is the main reason why Dalvik exists Apr 05 03:25:03 CedricBeust, in android appa Apr 05 03:25:04 apps Apr 05 03:25:22 ah Apr 05 03:27:30 interesting, I never knew there was a difference until now Apr 05 03:27:58 one is OS level and one is JVM level Apr 05 03:28:01 thanks pfn Apr 05 03:32:15 sooo, what's better? Realm, Ollie or SugarORM? Apr 05 03:34:57 why not use contentprovider only ? Apr 05 03:35:57 i'm not asking like give you an answer, just to know why you prefer others aproach Apr 05 03:36:22 I'm a bit upset at content providers personally Apr 05 03:36:49 You should not use them unless you want the data in your app to be available to other apps, except it's pretty much the only way to die Views to SQLite tables Apr 05 03:36:57 s/die/tie Apr 05 03:37:35 So you end up writing all the complex machinery of content providers and then not exporting just so you can avoid having to avoid implementing two-way bindings between SQLite and views Apr 05 03:37:37 Not great Apr 05 03:37:41 feathersanddown because everytime I use them, I feel like killing the whole project Apr 05 03:40:21 and DAO pattern? Apr 05 03:41:28 sorry for ask, but i'm newbie in android too and have same question Apr 05 03:43:35 feathersanddown: What question exactly? Apr 05 03:44:36 how to avoid directly query to db Apr 05 03:45:20 Still not really a question Apr 05 03:45:24 What specifically are you asking? Apr 05 03:46:04 If you need to query the db, you need to query the db Apr 05 03:46:18 I think Rx is making this operation a lot more tractable Apr 05 03:51:51 That's why I think Ollie might be good Apr 05 03:52:33 dont forget about https://github.com/square/sqlbrite and https://github.com/pushtorefresh/storio Apr 05 03:52:47 Afzal what is ollie ? Apr 05 03:52:57 g00s https://github.com/pardom/Ollie Apr 05 03:53:37 i see Apr 05 03:57:51 I wonder if this is somehow usable on Android for Kotlin http://jetbrains.dzone.com/articles/lightweight-kotlin-dsl-access Apr 05 03:58:41 that's MongoDb though Apr 05 03:59:27 <_genuser_> Mongo no want db. mongo want girl. Apr 05 03:59:58 Blazing saddles fan I see Apr 05 04:00:12 <_genuser_> moi? Apr 05 04:00:29 heathcliff i think Apr 05 04:00:32 heh Apr 05 04:00:53 <_genuser_> I wondered if mongo was character on blazing saddles or something. Apr 05 04:00:54 Afzal: This article is 2 years old, the syntax has changed a bit since then Apr 05 04:01:26 <_genuser_> and sure imdb say mongo was a character in blazing saddles. lol. Apr 05 04:01:41 CedricBeust right, the library has been updated though: https://github.com/cheptsov/kotlin-nosql Apr 05 04:01:46 <_genuser_> I was just thinking of as the often used caveman name. Apr 05 04:02:48 Doesn't need a driver anymore, which means it could be used on Android Apr 05 04:03:07 (drive argument) Apr 05 04:03:15 But mongo on android? Seriously? Apr 05 04:03:24 Is that such a bad idea? Apr 05 04:03:48 besides the performance loss in json parsing, what is bad about it Apr 05 04:04:06 It's overkill? Apr 05 04:04:11 fair Apr 05 04:04:21 It wasn't written for mobile? Apr 05 04:04:24 I worked for a few months with cloudant and I understand what you mean Apr 05 04:04:30 <_genuser_> runnign the mongo itself on android? Apr 05 04:04:36 <_genuser_> or having a mongo client on android? Apr 05 04:04:38 seems completely wrong Apr 05 04:04:53 i remember a while back one of the couchbase guys was here Apr 05 04:05:01 porting to android, a client at least Apr 05 04:05:02 oh god no, they're probably storing the whole thing in sqlite in some weird way (like cloudant does) Apr 05 04:05:27 or not Apr 05 04:06:11 To use something else than sqlite would require: 1) don't need a schema 2) faster and more memory efficient than sqlite. Good luck with finding a substiture Apr 05 04:06:12 * Afzal must go back to writing the UI code instead of focusing on this part of the app so earl Apr 05 04:06:17 early* Apr 05 04:07:31 lol, i hate the UI stuff. always some theme attribute wrong & ruining my day Apr 05 04:07:52 pretty much go for any other part of the app, now even analytics Apr 05 04:08:02 * g00s procrastinates Apr 05 04:08:37 lol that's why I write UI first. If I leave it till the end, the app is never going to finish Apr 05 04:08:45 i also keep hoping the support lib guys will get off their asses and put out some awesome widgets to make life easier Apr 05 04:09:11 we get like one widget per year Apr 05 04:09:18 last year was recyclerview, woohoo ! Apr 05 04:09:19 Hopefully this I/O we'll see the rest of the material widgets ported to Android Apr 05 04:09:31 recyclerview wasn't even as big as they made it seem :/ Apr 05 04:09:42 maybe they are still working on it :P Apr 05 04:10:05 well once you see what a pita it is for basic things, listview isn't so bad after all Apr 05 04:10:24 Yup Apr 05 04:10:50 They should write a ListView that's based on a RecyclerView so devs have to do less work :p Apr 05 04:11:21 FloatingEditText, Snackbar, new Seekbar, a nicer FloatingActionButton than all implementations out there Apr 05 04:11:27 at this point, i would have been happy with some helper classes & better docs - luckily the big nerd ranch guy & dave smith put out some goof material Apr 05 04:11:38 *good Apr 05 04:12:48 g00s for RecyclerView? Apr 05 04:13:06 lol DividerDecoration Apr 05 04:13:14 yeah - in the beginning good info was scarce; but now there are some good meaty blogs Apr 05 04:13:29 yeah that decorator Apr 05 04:13:31 heh Apr 05 04:13:43 'i just want a line between my things' Apr 05 04:15:10 thats - what i mean about android, so much work for piddidly. if you have a team of 10 devs working on it great but - if you are the only dev its pretty tough unless you're a rock star Apr 05 04:15:46 and seems like every week there is some new library that tried to make things right Apr 05 04:15:59 now its this http://www.reddit.com/r/androiddev/comments/31ghd1/ted_mosby_software_architect_mvp/ Apr 05 04:16:30 sounds like ... JS Apr 05 04:16:43 (library per week) Apr 05 04:17:36 MVP, MVVM, MVC, everyone trying to do things "right" Apr 05 04:17:57 I have an activity Home with a ViewPager of FragmentOne and FragmentTwo. After the user fills out a form in FragmentTwo it goes to FragmentTwoSubmitted. When the user is in FragmentTwoSubmitted and presses the back button, how can I make it go back to the FragmentOne tab? Apr 05 04:18:03 this mosby thing wants me to use their special fragments and activities, which is a red flag- i dont like that Apr 05 04:18:27 Afzal and then through some concurrency into the mix ;) ... stand back ! Apr 05 04:18:36 lol Apr 05 04:18:51 all these things would be easier without all the lolcycles, indeed Apr 05 04:20:06 You know what I really hate to write. Menus Apr 05 04:21:36 write xml, override this, override that. I'm just complaining now :/ Apr 05 04:21:54 toolbar makes that easier, just inflate the menu done Apr 05 04:23:41 oh nice, I am using a toolbar. Time to inflate it the new way Apr 05 04:26:26 Afzal come caveats, lol - (1) make sure you use the the right inflater (2) correct prefix in menu xml, and (3) the MenuItemCompat thing if needed Apr 05 04:27:17 right, of course Apr 05 04:36:55 nice, that was less painful (using toolbar methods rather than activity/fragment menu inflate methods) Apr 05 04:37:13 oh look at that, the menu didn't show up <_< Apr 05 04:37:37 I bet it has everything to do with this EditText that I have in the toolbar Apr 05 04:40:50 interesting, this blog about xamarin on android wasn't as rosy as i thought it would be Apr 05 04:41:03 https://news.ycombinator.com/item?id=9320929 Apr 05 04:49:31 xamarin schmamarin Apr 05 04:56:09 I could also do `ViewPager viewPager = ButterKnife.findById(getActivity(), R.id.view_pager); viewPager.setCurrentItem(0, false);` in FragmentTwo after launching FragmentTwoSubmitted, but I still see the tab change before FragmentTwoSubmitted actually gets launched Apr 05 05:06:09 thepoosh ! Apr 05 05:06:18 hey m8 Apr 05 05:06:41 thepoosh how is it going, glide ready for google feature ? Apr 05 05:06:59 and how was vacation :) Apr 05 05:07:03 we submitted something to them for review Apr 05 05:07:17 and vacation was mostly for cleaning duty Apr 05 05:07:27 but i was in a whiskey course Apr 05 05:07:31 it was awesome Apr 05 05:08:00 when do they get back to you guys ? if they want you to change something, do you have some time ? Apr 05 05:08:31 i'm sure we do, we submitted 2 days before the deadline Apr 05 05:09:15 thepoosh quick q, a while back i may have asked - what do you guys use for analytics? i think you said it was custom. i'm looking at GA, mixpanel, flurry, apselar, etc Apr 05 05:09:32 mixpanel looks nice but it goes from free to $150/mo quickly Apr 05 05:09:54 we have appboy, flurry, GA and a custom implementation using AWS-Kinesis Apr 05 05:10:16 appboy are invested in us so we got a good price Apr 05 05:10:22 why so many ? flurry and GA ? Apr 05 05:10:38 our analytics team is trying to get everything Apr 05 05:11:08 i think it's retarded Apr 05 05:11:33 thepoosh do you do any of the android impl of the analytics ? do you have a preference for the apis? Apr 05 05:11:45 Should assertions be in release code? Apr 05 05:11:46 hmmm Apr 05 05:11:50 Should assertions be in release code? Apr 05 05:11:53 lasserix: no Apr 05 05:12:01 I read somewhere that unit tests should be replaced by assertios Apr 05 05:12:09 in the test files Apr 05 05:12:15 yeah Apr 05 05:12:16 not in the production code Apr 05 05:12:41 g00s look into localytics, more relaxed free package than mixpanel Apr 05 05:12:43 what does it mean to replace unit tests with assertions? i thought that's (at least) one way you do unit tests Apr 05 05:12:48 production code shouldn't have assertions if i remember correctly Apr 05 05:13:05 lasserix ask CedricBeust , i bet he knows that well Apr 05 05:13:17 being the TestNG guy :D Apr 05 05:13:25 oh ok Apr 05 05:13:38 i thought assertions should be in code, but they don't work out of the box on dvm Apr 05 05:13:39 Any interesting android development news lately? Apr 05 05:13:44 unit tests don't go into production though lasserix, they're for pre-prod Apr 05 05:13:52 yeah i know that Apr 05 05:13:55 :p Apr 05 05:14:00 Afzal ok thanks Apr 05 05:14:56 Anyone know if exoplayer has buffering progress callback? Apr 05 05:15:19 Afzal lol, localytics is more expensive than mixpanel ! Apr 05 05:15:33 mixpanel gives you free 20k events Apr 05 05:15:36 g00s IFF you go beyond the free limits :p Apr 05 05:16:01 oh , wait - what is a MAU vs data point Apr 05 05:16:20 ahh, monthly active user Apr 05 05:17:04 don't get me wrong though, I love mixpanel Apr 05 05:17:29 i'm waiting for RMR to supplant MVC Apr 05 05:17:36 our android team doesn't use mixpanel Apr 05 05:17:49 and if they had a package where they'd just ignore everything beyond the limit every month, I wouldn't be sad Apr 05 05:17:50 it seems like appboy were and easy impl Apr 05 05:18:34 what's easy impl thepoosh? Apr 05 05:18:44 appboy analytics Apr 05 05:18:46 myke what is RMR Apr 05 05:19:27 I don't see pricing on appboy's page Apr 05 05:19:50 Afzal did you try GA and have issues? Apr 05 05:19:59 g00s just don't like the interface Apr 05 05:20:04 API or web ? Apr 05 05:20:09 web Apr 05 05:20:42 Hey guys, Im using a ExpandableListView, and I want to register the children for the context menu, but not the parent Apr 05 05:20:51 mixpanel has so many things OOB, user profiles and stuff. Nice graphs. GA has that weird event system that goes way too deep Apr 05 05:21:03 Im just using registerForContextMenu() and putting the ExpandableListView in there Apr 05 05:21:26 But that makes the group react to the long click too, I just want to target the parent Apr 05 05:21:49 Any ideas? Apr 05 05:21:52 event category > event action Apr 05 05:21:58 oh and event value too Apr 05 05:22:02 Afzal i'm finding the Admin of GA to be very poor - for example, you aren't supposed to rename or move custom dims / metrics Apr 05 05:22:21 yeah category / action / label / value Apr 05 05:22:39 yup, I didn't even bother learning how to compare metrics etc Apr 05 05:22:56 We use mixpanel at work. Nice graphs that tell you exactly what you wanna know Apr 05 05:23:14 but I might give appboy a try as thepoosh says it's good Apr 05 05:23:34 The only issue right now with mixpanel is no A/B Testing for Android Apr 05 05:23:36 g00s: http://www.peej.co.uk/articles/rmr-architecture.html Apr 05 05:23:55 Afzal: for A/B testing you can try apptimize Apr 05 05:24:09 i don't like them but they have a strong interface Apr 05 05:24:09 not that i've designed an analytics system, i 'm coming from deep ignorance ... but it seems to me a good way to do this, would be to just have k / v pairs for each event. each K would be a UUID, value .. whatever. and then in the admin console, you establish the hierarchy of UUIDS Apr 05 05:24:32 heard about Apptimize, haven't tried it though Apr 05 05:24:38 thanks thepoosh Apr 05 05:25:10 GA has some A/B testing ... no idea how strong it is Apr 05 05:25:12 g00s did you figure out your problem with having too many variables? Apr 05 05:25:21 lasserix yeah, thanks. Apr 05 05:25:29 oh what did you end up doing? Apr 05 05:25:30 See that's why I like mixpanel, it already assigns each mobile a unique ID without any work Apr 05 05:25:42 the custom dimension is just 'model_type' , and then all the values are the different kinds Apr 05 05:25:57 ahh duh Apr 05 05:25:59 hehe Apr 05 05:26:09 cool Apr 05 05:26:33 i am a little tipsy but it was that simple when you asked a couple of days ago? Apr 05 05:26:34 so tracker.send(new HitBuilders.ScreenViewBuilder().setCustomDimension(1, "sux-2000") Apr 05 05:27:10 i thought sux-2000, sux-3000, sux-4000 ... were all custom dims Apr 05 05:27:21 i was trying to figure out some scheme where you could use bitmasks and hashtables Apr 05 05:27:22 but they are values to one custom dim Apr 05 05:27:31 lol , thanks :D Apr 05 05:27:35 yeah Apr 05 05:27:45 sux-2000 was from robocop :) Apr 05 05:28:08 oh no, that was the 6000 sux Apr 05 05:29:55 g00s appboy's pricing: https://www.dropbox.com/s/6y0oe35lzu0okbu/Screenshot%202015-04-05%2001.29.39.png?dl=0 Apr 05 05:30:17 weird plan but it seems like localytics free = appboy pro Apr 05 05:31:13 lasserix: Avoid using assertions in production code, it defeats the purpose Apr 05 05:31:32 Keep them for quick one liners that can be verified easily, but for more complex code, use tests Apr 05 05:31:46 and how is localytics more expensive than Mixpanel? 1.5M data points is $200 vs 2M for $350 Apr 05 05:31:48 i think there is more money in creating mobile tools than mobile apps Apr 05 05:32:08 just like there was more money selling shovels during the gold rush, than actually getting gold Apr 05 05:32:35 lol Apr 05 05:32:42 common, write an sdk Apr 05 05:32:55 (well, if you don't include the marketing part) oh man, this is a bad rabbit hole to go down Apr 05 05:33:11 g00sDK Apr 05 05:33:17 this makes me wonder about how JakeWharton is making money since the sdks are free but square is not Apr 05 05:34:00 well if Square gets good reputation for having great developers, customers are probably more inclined to choose them over competition Apr 05 05:38:16 Afzal: That’s not how it works, I bet that 99.9999% of Square users have no idea about Square’s open source tools and couldn’t care less if they did Apr 05 05:38:51 CedricBeust_ are square users not developers? The people who actually use their services, not the end users Apr 05 05:39:33 CedricBeust_, I agree Apr 05 05:39:53 square in general is being good to the community Apr 05 05:40:21 by open sourcing and supporting a bunch of their libraries Apr 05 05:41:04 thepoosh, and JakeWharton makes money by salary... it doesn't matter Apr 05 05:41:39 g00s: whats the difference between a tool and an app? Apr 05 05:42:02 hammer and a nail Apr 05 05:42:25 lasserix for my comment above, anything mobile devs would pay for Apr 05 05:42:38 tools, libarries, services, etc Apr 05 05:43:44 * pfn needs sponsorship monies Apr 05 05:43:56 for example, those guys that launched a/b testing like FlightPlan, testdroid, or analytics like what we've been talking about. i bet they rake in the dough Apr 05 05:45:45 I'm not saying they need the libraries to make money though Apr 05 05:46:11 I'm saying it probably helps them indirectly Apr 05 05:46:14 nothing wrong with being good to the community, probably helps to attract talent Apr 05 05:52:47 g00s yeah but there is the balance between open source and commercialness, eg square: what if all they're libaries required liscences? Apr 05 05:54:01 that's why their main customers are companies which see direct earning, since that's why they'd be using a payment processor in the first place Apr 05 05:54:14 lasserix i wasn't talking about square at all - it got mixed into the conversation somehow. i just meant, there is probably more money in creating / selling tools , services, for mobile dev than actually writing apps. hence my shovel & gold rush analogy Apr 05 05:54:43 yeah Apr 05 05:54:46 definatly, like mirror Apr 05 05:58:31 lasserix http://cdixon.org/2011/02/05/selling-pickaxes-during-a-gold-rush/ Apr 05 06:00:37 hehe yeah i know all about took a history of ca class a year back Apr 05 06:01:45 the easiest part too is all you got to do is ask yourself "as a developer, what would I pay for that would make my life easier?" Apr 05 06:03:17 a Chinese worker 5% of my salary to do my work for me Apr 05 06:04:37 so a service that finds slaves to do your work for you Apr 05 06:04:42 like technopimping Apr 05 06:04:48 <_genuser_> pfn: heh, you remember teh story about a Verizon dev who hired a chinese dev to do his job? Apr 05 06:05:54 always happens - then they just go to the chinese dev :) Apr 05 06:05:59 who was asus ? Apr 05 06:06:03 they made dell's HW Apr 05 06:07:50 asus is good stuff, they are the only MB vendor I buy from, good parts. Apr 05 06:08:48 yeah, now we just go straight to asus :D Apr 05 06:09:07 allthough that xps13 does look pretty good Apr 05 06:09:47 project full of recyclerviews :( Apr 05 06:10:26 <_genuser_> recylcerviews? what are you doing? Apr 05 06:10:50 they should have called it ComposterView Apr 05 06:11:21 Carbonflux http://blog.laptopmag.com/laptop-brand-ratings Apr 05 06:11:29 man lenovo tanked Apr 05 06:11:47 apple #1, ofc Apr 05 06:13:27 hm Apr 05 06:13:43 well superfish is why lenovo tanked Apr 05 06:13:55 I think apple is the "safe" pick for a lot of people. Apr 05 06:14:08 apple is the stylish pick Apr 05 06:15:24 unfortunately the whole startup model is predicated on generic good-enoughs like android supplanting things like Apple in the long term Apr 05 06:16:40 _genuser_ I must follow the latest thing, that is my curse Apr 05 06:16:59 <_genuser_> Afzal: I'm trying to figure out if I need to use it. Apr 05 06:17:15 <_genuser_> Afzal: have to setup a picture view where you swipe left/right for next/previous pictures, etc. Apr 05 06:17:17 Afzal this one will test you :) Apr 05 06:17:37 you probably don't, can't you just use a HorizontalScrollView? Apr 05 06:18:02 g00s it probably will because this time, I'm unsure if I want a list or a grid or some other weird combo Apr 05 06:18:03 <_genuser_> Afzal well, then maybe I should look into that one. :) I haven't started yet. Apr 05 06:18:38 _genuser_ yeah, but that one's not adapter-based. You can either go with a ViewPager or that, depending on your needs Apr 05 06:20:59 <_genuser_> afzal, I just need to swipe next previous. and it would be nice if android can ask me for the next and previous views while I'm showing the current one. Apr 05 06:21:03 <_genuser_> so I can get teh others ready. Apr 05 06:22:38 _genuser_: you can paint it to a bitmap Apr 05 06:23:15 i wish android did have a "render ui off the main thread" function tho Apr 05 06:23:32 <_genuser_> lasserix: ?? just paint the picture being viewed currently? Apr 05 06:23:33 _genuser_ http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setOffscreenPageLimit%28int%29 Apr 05 06:23:54 _genuser_: paint the pictures as views dumping their bitmap Apr 05 06:24:03 <_genuser_> lasserix: I need to get them from off the web, etc. so it would be nice if android would called "getView()" or somesuch to the app time to get the next and prev pictures. Apr 05 06:24:22 yeah you can do that Apr 05 06:24:40 just in your getview method do a prebuffering call Apr 05 06:25:06 <_genuser_> lasserix: so there's a getview on this viewpager thing? Apr 05 06:25:21 <_genuser_> ah, setoffscreenpagelimit, nice! Apr 05 06:25:53 <_genuser_> altho, this doesn't have a getView()/ I'll do some reading on the viewpager. Apr 05 06:26:33 <_genuser_> seems like the thing to use, I'll probably look into this and go this route. Apr 05 06:26:50 viewpager is backed by an adapter Apr 05 06:26:55 which of course has getview Apr 05 06:28:05 <_genuser_> yeah, I saw it required PageAdapter. Apr 05 06:29:06 can't spell construvtpr...timr to sleep Apr 05 06:29:10 night people Apr 05 06:31:17 In a ViewPager of FragmentOne and FragmentTwo, how can I change the value of an EditText in FragmentOne from FragmentTwo's java? Apr 05 06:31:25 i.e. access FragmentOne's views Apr 05 06:35:51 passing references, via the fragment manager or via an event bus Apr 05 06:36:51 iprime: ? Apr 05 06:37:17 myke, what's up? Apr 05 06:37:32 hi Apr 05 06:38:25 myke, did you think there's another way? Apr 05 06:39:34 funny you should ask Apr 05 06:39:51 https://github.com/fkspro/android-tinyasync Apr 05 06:39:59 but no you should probably use an event bus in real life Apr 05 06:40:51 myke, how is this related to duncannz's situation? Apr 05 06:41:32 sorry i missed some context Apr 05 06:41:34 nmind Apr 05 06:41:40 oh, all right, thought so Apr 05 06:42:42 I'm trying to use a boolean in SharedPreferences as a flag so I can decide whether or not to show a "ShowCaseView" to a user (don't show if they've already seen it). However, I'm not sure if the boolean I'm storing is being stored correctly, as it keeps showing. I'm writing it by doing: http://pastebin.com/jCBkGzzV Apr 05 06:44:05 you're using different preferences Apr 05 06:44:29 why don't you use the default ones? Apr 05 06:44:34 Which are? Apr 05 06:44:57 PreferenceManager.getDefaultSharedPreferences Apr 05 06:44:59 or something Apr 05 06:45:24 in your code you're writing prefs to some file but getting them from another Apr 05 06:45:31 hm Apr 05 06:45:38 getSharedPreferences("DRAWER_PROFILE_SHOWCASE" should be getSharedPreferences("com.sanitized.PREFERENCE_FILE_KEY" Apr 05 06:45:41 or vice versa Apr 05 06:46:01 interesting. Now I"m wodnering why my other bit of code that I wrote in this manner works Apr 05 06:46:28 I'll try it out and see though. Thanks! Apr 05 06:46:53 maybe the default value it returned looked right to you Apr 05 06:47:46 and is it possible to access views in the parent activity? I get a NullPointerException when using getParent(), likely because of GC. But what I want to do is prefill an EditText in the Home activity from an activity it opens, how would you go about this? Apr 05 06:48:48 “likely because of GC” <— absolutely not Apr 05 06:49:06 alright Apr 05 06:50:41 what is it then? Apr 05 06:52:50 duncannz, if you're using activities, your second activity can return a result to your first one Apr 05 06:56:06 toast its not working cause you are returning TRUE as default Apr 05 06:58:32 oh nm you are writing to different prefs then you are reading from Apr 05 06:59:43 iprime: ActivityOne contains a ViewPager of FragmentOne and FragmentTwo (like this: http://i.imgur.com/W9jHmSQ.png) and I need ActivityTwo, which FragmentTwo launches, to set the text of an EditText in FragmentOne. Apr 05 07:01:01 duncannz: just set the value as intent in the startActivity 2 intent then set it as an arguement in your fragment Apr 05 07:01:56 duncannz, i'd use an event bus Apr 05 07:02:10 iprime: ok I'll have to look up what that is Apr 05 07:02:40 you could use eventbus, but just put it in the intent and then the arguements, very simple Apr 05 07:04:19 lasserix, i think he's not finishing the first activity Apr 05 07:04:36 doesn't matter Apr 05 07:05:02 how couldn't it matter? Apr 05 07:05:14 you have to start activity 2 somehow Apr 05 07:05:24 he does start it from fragment 2 Apr 05 07:05:25 activity 2 started has nothing to do whether 1 finishes Apr 05 07:05:43 so? Apr 05 07:05:55 he's trying to pass data from activity 2 to activity 1 (to a fragment in a view pager in activity 1) Apr 05 07:06:03 yeah Apr 05 07:06:12 fragment 1 callsback to activity 1 which starts fragment 2 with et value which starts activity 2 with et value Apr 05 07:06:18 oh Apr 05 07:06:27 the arrow is going the other way Apr 05 07:06:32 yes Apr 05 07:06:42 i dont know why but hav ing abeer always f-cks my contacts up a little Apr 05 07:06:58 yeah cause ActivityTwo is getting data from a server that it needs to fill into an EditText in FragmentOne Apr 05 07:07:13 lasserix beer goggles :D Apr 05 07:07:16 you can also just use a value in your application class Apr 05 07:07:26 instead of rolling in an eventbus Apr 05 07:07:46 or startactivity for result Apr 05 07:07:55 he won't have heard of an eventbus otherwise :) Apr 05 07:08:04 startactivityforresult is probably the right (sdk) way to do this Apr 05 07:08:10 and i doubt he'd be willing to access the fragments in a viewpager onactivityresutl Apr 05 07:08:31 then just use application level variable Apr 05 07:13:52 hey guys Apr 05 07:13:57 anybody here? Apr 05 07:14:19 ? Apr 05 07:14:29 ! Apr 05 07:14:33 hey do you guys know why java coders can't get laid? Apr 05 07:14:41 because they treat women like objects Apr 05 07:14:43 hahahah Apr 05 07:15:27 DeathCode: why thank you for this old joke that never stops to be completely stupid Apr 05 07:15:40 ok lol Apr 05 07:15:42 anything else we can do for you? Apr 05 07:17:03 thepoosh so ... your code must be littered with analytics tracking crap. i mean, just using GA i have smelly stuff all over Apr 05 07:17:19 thepoosh:you seem like you dont get laid much. so you're mad Apr 05 07:17:24 lighten up dude. i code java too Apr 05 07:17:44 DeathCode: i'm married with kids so og course i don't get laid too much Apr 05 07:17:46 g00s: yes Apr 05 07:17:50 1000 times yes Apr 05 07:17:58 thepoosh:true man. marriage does that to ya Apr 05 07:18:07 but we made some singletons to deal with the bug crap Apr 05 07:18:09 have you tried looking for something extra-marital? Apr 05 07:18:17 DeathCode: let's keep it on topic, shall we? :) Apr 05 07:18:21 thanks for the advice Apr 05 07:18:22 thepoosh i mean its a hassle just making sure screen rotation doesn't send the same pageview twice heh Apr 05 07:18:28 JesusFreke:alright Apr 05 07:18:44 lasserix, iprime: what would you suggest I do in the end? Apr 05 07:18:48 g00s: we actually just now enabled screen rotation for the first time O_O Apr 05 07:19:00 duncanzz startactivity for result Apr 05 07:19:00 lol Apr 05 07:19:17 the session tracking shouldn't be a prob since the sessions change only every x seconds and only if the activity changes Apr 05 07:19:29 but the rest is not activity based, but action based Apr 05 07:19:42 so i think there shouldn't be too many issues Apr 05 07:19:49 hm Apr 05 07:19:56 duncannz, anything that would do the job Apr 05 07:20:33 duncanzz simplest way is application class variable Apr 05 07:20:47 i personally wouldn't use activity results, have to lookup the fragment or keep a ref in the adapter, pass the data to the adapter Apr 05 07:21:34 duncannz: what's the issue? i have crap connection Apr 05 07:21:38 and missed the question Apr 05 07:21:56 app class var isn't as explicit but would do the job too Apr 05 07:22:13 duncannz can you repeat your question, now i'm curious Apr 05 07:22:49 g00s, adding analytics is smelly shit Apr 05 07:23:03 g00s: probably the isAppVisible q Apr 05 07:23:23 pfn: that is why i managed to drop that job on a colleague Apr 05 07:23:35 duncannz: http://pastebin.com/uAhPSemq Apr 05 07:23:47 oops the class shouldn't be static itself Apr 05 07:24:23 thepoosh, not that helpful when it gets littered all over your code Apr 05 07:24:24 lasserix, that won't work with multi-instance apps Apr 05 07:24:50 true that! Apr 05 07:24:51 what is a multi instance app? Apr 05 07:25:05 something samsung phones have Apr 05 07:25:20 ?? Apr 05 07:25:21 wtf Apr 05 07:25:26 g00s: btw, appboy doesn't cache events if there is no active session (i.e. from services) Apr 05 07:25:48 lasserix, well if you haven't dealt with samsung, i really hope you never do Apr 05 07:25:53 lasserix, new string? wtf Apr 05 07:25:54 some samsung devices support multiple process instances of an app? Apr 05 07:25:59 oh yeah, that was the other thing - gotta be very careful with events from service screwing up session state Apr 05 07:26:04 *session stats Apr 05 07:26:08 pfn: just to be safe not to keep a reference to wherever he se tit from Apr 05 07:26:16 ... Apr 05 07:26:23 it doesn't matter... Apr 05 07:26:52 how so? Apr 05 07:27:03 g00s: ActivityOne contains a ViewPager of FragmentOne and FragmentTwo (like this: http://i.imgur.com/W9jHmSQ.png) and I need ActivityTwo, which FragmentTwo launches, to set the text of an EditText in FragmentOne. Apr 05 07:27:22 if its a variable of his activity then it'll hold a ref to his activity even if the activity is supposed to go thru ondestory? Apr 05 07:27:34 thanks for the code lasserix Apr 05 07:27:34 duncannz: why not sharedprefs? Apr 05 07:27:37 lasserix, because strings, as a gc node, references nothing Apr 05 07:27:59 ahh ^^ duncannz shared prefs much better way Apr 05 07:28:00 lasserix, strings only hold a reference to the underlying char array Apr 05 07:28:08 alright I'm saving it to sharedprefs anyway :) Apr 05 07:28:16 duncannz, lol Apr 05 07:28:19 so just onResume() or something? Apr 05 07:28:20 set the text in your onStart Apr 05 07:28:37 lasserix, your codes starting to smell funny Apr 05 07:28:46 duncannz, but you have to somehow know when the string was 'consumed' Apr 05 07:28:55 ah but I only want it to set the text if the user presses the back button in ActivityTwo, not if they launch the app Apr 05 07:29:11 exactly Apr 05 07:29:47 so you either have to reset your pref, use another pref or introduce new logic or use another way Apr 05 07:30:20 I guess I could add a new pref "wasSet", set it to true once it autofills for the first time Apr 05 07:30:26 but it gets so messy so quickly Apr 05 07:30:33 yeah Apr 05 07:31:19 pfn: so if AActivity goes through ondestory it won't cause memory leak? http://pastebin.com/Rdd6rwRs Apr 05 07:31:31 it won't Apr 05 07:31:45 a string doesn't reference activity Apr 05 07:32:29 so activity gets gcd but unsafestring still has the value of what it was set to in aactivity? Apr 05 07:32:49 and no gc occurs because unsafestring itself has no refernce to an activity? Apr 05 07:32:56 *to a context Apr 05 07:33:07 no gc occurs because the stirng migth be ref'ed elsewhere Apr 05 07:33:26 must be* that is Apr 05 07:33:31 as in your singleton Apr 05 07:33:40 there is no singleton Apr 05 07:33:51 pfn: is that logic correct? Apr 05 07:34:01 well let's just call it singleton for simplicity (the Application subclass) Apr 05 07:34:11 its not tho Apr 05 07:34:17 of course it's not... :) Apr 05 07:34:36 it doesnt' matter what holds a ref to the stinrg after the activity is destroyed Apr 05 07:34:41 static != singleton Apr 05 07:34:45 but it might as well be a singleton Apr 05 07:35:18 i'm not sure why we're discussing this Apr 05 07:35:22 pfn: if the unsafe string were a textview or the editext itself, that would cause memory leak right? Apr 05 07:38:02 way past the ballmer peak probably should just go play with the cat Apr 05 07:40:45 * g00s shines the laser pointer at lasserix Apr 05 07:41:42 with so much innovation in miniture tech you'd think thered be better cat toys, but the state of cat toys is f0cking sad. really, really sad. Apr 05 07:41:55 still the best toy is a stick with a feather at the end Apr 05 07:42:23 i want a psuedomouse i can control with my smart that has a camera so i can use it while im at wor Apr 05 07:43:42 lasserix if you put one together, let me know ... i think we should drive it into Google / Android HQ Apr 05 07:43:48 see what the hell those guys are really doing Apr 05 07:44:19 hhehe Apr 05 07:44:35 first, find the cow Apr 05 07:46:35 must find out if they are afraid of mice like elephants :) Apr 05 08:03:45 hey, i added a check menu item to the actionbar, how do i handle it's click event Apr 05 08:03:45 ? Apr 05 08:04:03 onMenuItemSelected Apr 05 08:04:52 onOptionsItemSelected? Apr 05 08:05:59 thepoosh? Apr 05 08:06:18 yes Apr 05 08:06:20 that Apr 05 08:08:25 so i have an id for that menu item but for some reason it i get another id or something Apr 05 08:12:41 oh nevermind Apr 05 08:15:35 <_genuser_> omg this AS is so slow. Apr 05 08:28:17 happy eastern Apr 05 08:28:39 i just bought a LG Electronics Spirit 4G C70 H440N (in Germany) Apr 05 08:28:47 http://geizhals.at/de/lg-electronics-spirit-4g-c70-h440n-schwarz-a1239752.html?hloc=de Apr 05 08:29:22 i couldn't find it on the U.S. LG website. it's full of carrier branded phones O.o Apr 05 08:31:18 and most importantly I couldn't find it on xda or it's german counterpart/translation at android-hilfe.de Apr 05 08:32:16 now, do you guys think this phone will soon be rootable, so I can put the xposed framework on it? Apr 05 08:50:15 #android-root init Apr 05 09:02:28 can i prevent actionbar menu from closing when choosing a specific item? Apr 05 09:05:11 <_genuser_> anybody using AS with mercurial? Apr 05 09:07:55 anyone else get some funky wizard after updating as/ Apr 05 09:08:16 f-ck it totally fucked my settings Apr 05 09:08:16 wtf Apr 05 09:10:41 <_genuser_> haven't updated it yet. Apr 05 09:11:03 <_genuser_> apprently, you can't use viewpager on an activity. AS automatically changed it to horizontalscrollview. Apr 05 09:11:08 <_genuser_> let me google it. Apr 05 09:11:13 so is it possible to prevent optionsmenu from closing? Apr 05 09:11:27 when clicking an item? Apr 05 09:13:31 <_genuser_> I see what AS did there. ViewPager isn't supported by the UI designer. :) Apr 05 09:13:40 oh no its just cause f-cking windows autoupdated while i was sleeping Apr 05 09:13:53 viewpager changed to hsv? Apr 05 09:14:07 you can totally put a viewpager in an activity, but it requires support library v4 Apr 05 09:16:19 well, at least the debugging part got better.. it seems Apr 05 09:17:34 if i return true in onOptionsItemSelected, shouldn't the menu stay open? Apr 05 09:21:04 Hey, does anybody know how to work with the newest version of ddmlib.jar? Apr 05 09:22:01 I pulled the source code of DDMS plugin and used ddmlib.jar as used in the DDMS plugin, it still didn't work Apr 05 09:22:37 I used the older versions of ddmlib.jar. It worked perfectly. Apr 05 09:22:57 I used the older versions of ddmlib.jar before. It worked perfectly back then. Apr 05 09:26:13 <_genuser_> woo getting used to AS... Apr 05 09:32:54 damn Apr 05 09:32:58 lost my color scheme Apr 05 09:34:27 and my plugins arggh Apr 05 09:52:56 <_genuser_> lasserix: lol, AS is kicking your ass, eh? Apr 05 09:53:12 no i have a laptop with win8 Apr 05 09:53:23 been blocking the update to 8.1 for couple of months off and on Apr 05 09:53:33 but it managed to sneak through an update when i fell asleep the otehr night Apr 05 09:53:50 which cleared out a bunch of stuff, looks like my as stuff Apr 05 09:55:31 probably should of disabled it Apr 05 09:56:16 probably should actually install a linux distro Apr 05 09:58:21 <_genuser_> lasserix: oh, that kinda sucks. I force most of my win machines to download and ask but never install. Apr 05 09:58:38 im not sure if it is even toggable Apr 05 09:59:10 <_genuser_> my main desktop is set to download and only install sunday morning 3am. Apr 05 09:59:34 hehe yeah its a registry hack to do it ;p Apr 05 10:01:00 <_genuser_> do'nt know on win8. but on win7 it's just update settings. Apr 05 10:01:03 Oh it's working! OMFG Apr 05 10:01:21 I must be drunk last time. Apr 05 10:05:07 installedf the gradle GUI plugin and it nuked my gradle files Apr 05 10:07:09 <_genuser_> lot of things in AS are kinda confusing me also. I'm running my lastest proof of concept project in AS just to get familiar with it. Apr 05 10:07:52 I have a view that has a fullscreen toggle. This view is in a scrollview, which is in a refreshview, which customview which is part of a view pager in an activity. Apr 05 10:09:10 *this view is a surface for a video, is it possible to redirect the output of the mediaplayer to a different surface (so i can output it to a surfaceview in a dialog over all the other views, so i dont have to lock them)? Apr 05 10:10:33 lasserix, TextureView has a surface and actually acts like a view Apr 05 10:10:46 not like SurfaceView which is a hole drilled in the app Apr 05 10:10:47 but i can do so without causing the mediaplayer to lose its buffer? Apr 05 10:10:52 do what Apr 05 10:11:05 you can't switch surfaces unless you're running the decoding loop yourself Apr 05 10:11:24 and then rendering in some other way, e.g. ogl Apr 05 10:13:00 ahh ok Apr 05 10:13:08 so i can't just use a dialog over those views? Apr 05 10:13:21 ill have to do a callback to the activity and chain the calls down to lock those views Apr 05 10:13:36 I don't understand what you're talking about Apr 05 10:13:41 you can of course throw a textureview in a dialog Apr 05 10:13:44 and play video in it Apr 05 10:13:53 why would you lock views underneath? Apr 05 10:14:05 i have a textureview in a scrollview in a refresh view in a customview that is the page of a viewpager in an activity Apr 05 10:14:19 once its playing the user can rotate the phone or click the fullscreen button Apr 05 10:14:50 so i resize the surfaceview to full screen it, but i have to lock the viewpager (so user can't swipe) Apr 05 10:14:59 ditto with the scrollview and refresh view Apr 05 10:18:25 lasserix, apparently on Android 4.0+ you can switch surfaces on a MediaPlayer without breaking the playback Apr 05 10:18:29 I've never tried it though Apr 05 10:18:36 so you could probably redirect to new view Apr 05 10:19:33 hmm Apr 05 10:19:56 <_genuser_> anybody know the ctrl-I equivalent in AS? would save me lot of time. Apr 05 10:20:02 <_genuser_> autoformat Apr 05 10:20:22 ctrl alt l Apr 05 10:20:26 L Apr 05 10:20:33 Code> Apr 05 10:20:44 <_genuser_> ah, I see. :) thanks. I just saw it in the menu too. Apr 05 10:25:41 _genuser_, dude, double shift Apr 05 10:25:47 it's like THE most important thing Apr 05 10:26:19 <_genuser_> double shift? Apr 05 10:26:53 <_genuser_> Mavrik: what is double shift. if it's THAT important? Apr 05 10:27:03 GO PRESS IT Apr 05 10:27:25 mavrik likes to double space for his identation Apr 05 10:27:43 even tho with autoidenting it really doesn't matter ;p Apr 05 10:28:40 tabs are the devil Apr 05 10:29:25 lasserix, wat Apr 05 10:29:59 anyway, there was an awesome video about effective IDEA use on one conference which I can't find right now :/ Apr 05 10:30:43 <_genuser_> Mavrik: double shift is double space? Apr 05 10:31:22 <_genuser_> I set most IDEs to use tab as 2 spaces. but I leave it to tabs, so other devs can have their IDE show it to them whatever _WRONG_ number of spaces they use. Apr 05 10:31:40 huh Apr 05 10:31:47 tap shift key twice Apr 05 10:31:55 so you get "search everywhere" dialog Apr 05 10:32:08 you use that dialog to find any feature you need together with the keyboard shortcut Apr 05 10:32:15 not space Apr 05 10:32:23 <_genuser_> Mavrik: oh, I see. that's a super cool feature. Apr 05 10:32:25 why are you talking about space? Apr 05 10:32:26 :) Apr 05 10:32:33 oh that is cool Apr 05 10:32:38 yeah, it's awesome, especially if you don't know the shortcuts Apr 05 10:32:43 2x tap shift -> "optimize" Apr 05 10:32:53 <_genuser_> Mavrik: lasserix said you use 2 spacse after I asked what double shift is. and I thought it referred to you using two spaces for indentation. Apr 05 10:32:55 people who don't use spaces for tabs should kill themselves Apr 05 10:32:56 option "optimize imports" shows up you can immediately select together with keyboard shortcut being written :) Apr 05 10:33:00 just saying Apr 05 10:33:06 * Mavrik slaps thepoosh. Apr 05 10:33:18 _genuser_: there are some really good plugins Apr 05 10:33:27 when you have tabs and multiple OS machines working on the code Apr 05 10:33:27 hungry backspace, codeglance, android drawable import Apr 05 10:33:28 ah, we use 4 spaces or something Apr 05 10:33:30 it sucks Apr 05 10:33:35 <_genuser_> thepoosh: use spaces for tabs? that's teh dumbest thing ever. that tab allows each member of the team to interpret it their own way. Apr 05 10:33:43 don't remember really, set it once and forgot about it Apr 05 10:33:52 <_genuser_> dumbasses who lock it to 1 space indentation of some other crazy thing make is impossible for the rest of the team to support their codebases. Apr 05 10:34:08 our formatter forces 4 spaces for tab Apr 05 10:34:12 instead of \t Apr 05 10:35:23 it's the \t that i hate Apr 05 10:35:27 bah, this video was free before: https://www.parleys.com/tutorial/intellij-idea-tips-tricks Apr 05 10:35:33 it's really awesome Apr 05 10:36:12 oh no, this one, do watch this: https://www.parleys.com/tutorial/42-intellij-idea-tips-tricks-45-minutes :) Apr 05 10:36:27 Mavrik: https://www.voxxed.com/blog/presentation/presentation-42-intellij-idea-tips-tricks-45-minutes/ Apr 05 10:36:32 oh Apr 05 10:36:33 <_genuser_> I'm having a bit of a productivity lul since moving to AS for this project. but I think once I figure out the lay of the land, it should be fine. Apr 05 10:36:34 yeah, that's the one I meant :) Apr 05 10:36:46 I learned bunch of useful stuff on that one :) Apr 05 10:38:36 <_genuser_> ugh, following this example online is like pulling teeth. Apr 05 10:38:42 <_genuser_> I should have picked another one. Apr 05 10:40:24 Mavrik: still waiting anxiously for my boss to ok the move to AS Apr 05 10:40:39 ah, I'm lucky, we switched to IDEA ages ago Apr 05 10:40:40 he's afraid it'll take too much time Apr 05 10:40:43 even before AS was a thing Apr 05 10:40:53 since we used Maven to build and Eclipse/Maven support was crap :) Apr 05 10:41:16 <_genuser_> you guys both work as android devs, then? Apr 05 10:42:27 yeah, I have a small team of minions to develop stuff Apr 05 10:42:46 _genuser_: anyone here who's not an android dev? Apr 05 10:43:25 <_genuser_> Mavrik: cool!! very "gru" of you. Apr 05 10:43:30 Mavrik: you're a team leed? Apr 05 10:43:32 lead Apr 05 10:43:35 whatever Apr 05 10:43:43 <_genuser_> thepoosh: I work as a .NET dev by day. Apr 05 10:43:51 thepoosh, not much of a lead for team of three people :) Apr 05 10:44:12 <_genuser_> 3 would require lead. 5+ would be a manager. Apr 05 10:44:24 _genuser_: woha! well, maybe now after the new compiler went open sourced maybe it'll make you a cross platform dev Apr 05 10:44:36 Xamarin ftw :) Apr 05 10:44:42 we have both Apr 05 10:44:45 team of 7 Apr 05 10:45:22 Did they just make a release on UiAutomator? I see totally new classes and methods in UiAutomator and new way to use it, and the old documentations are gone Apr 05 10:47:03 btw, anyone figured out if the monitor is disablable on AS 1.2? Apr 05 10:47:12 since it eats resources like cats sausages Apr 05 10:49:34 <_genuser_> thepoosh: our work is .NET only. all corporate gigs. I'm working on android stuff on my own so if I have to jump ship, that I won't be lost in sea of eclipse/AS jargon. Apr 05 10:49:40 cats eat a lot of sausages? Apr 05 10:50:02 i sometimes wish i could write in .NET Apr 05 10:50:05 it's so pretty Apr 05 10:50:10 and i miss lambda Apr 05 10:50:58 <_genuser_> I like .NET, I like most MSFT technologies. But after doing android/java for a while, I have liked it too. whatever offer some mental stimulation. Apr 05 10:51:17 <_genuser_> otherwise, we'd go crazy writing DB C/R/U/D apps over and over. Apr 05 10:51:37 C# is a great language Apr 05 10:51:49 too bad Mono is all kinds of broken :/ Apr 05 10:52:35 <_genuser_> I think MSFT realized that they'd be knee deep in linux Window'ing API if they officially supported a runtime, so they just released the spec and sat back. Apr 05 10:53:14 they just opensourced the CLR core anyway, so I hope that will improve the situation Apr 05 10:53:21 <_genuser_> but then again a company with billions to spend on RnD could definitely hire a team of 5-6 linux coders at 100k/yr to write the code Apr 05 10:53:56 <_genuser_> oh, the clr code was opensourced too? wow, I've been out of the loop for a while! Apr 05 10:54:20 _genuser_: https://github.com/Microsoft/dotnet Apr 05 10:54:28 everything is opensourced now Apr 05 10:54:35 <_genuser_> very nice. Apr 05 10:54:45 <_genuser_> but I'm sure win10 isn't open source... Apr 05 10:55:00 yep, it obviously doesn't build on Linux Apr 05 10:55:13 since bunch of code P/Invokes Windows internal kernel APIs Apr 05 10:55:32 but Mono project already merged in all the fully-managed stuff.... but they DID say they're not going to merge the GC Apr 05 10:55:38 which sucks all kind of donkey arse on Mono Apr 05 10:57:37 <_genuser_> I'm of the opinion microsoft open spec'd and now open sourced the whole thing and gets good PR for not being "closed source evil corp" Apr 05 10:57:54 <_genuser_> but the effort required for others to write mono is so large, they don't really care. Apr 05 10:58:15 <_genuser_> then again, maybe they think others will learn from their implementation and actually improve mono. Apr 05 10:58:21 Do you guys know whether the new UiAutomator needs the source code of the target app or not? Apr 05 10:58:23 <_genuser_> it's not like they have anything to lose by .NET running on linux. Apr 05 10:59:43 @_genuser_ actually they do, if more .NET apps is going to be supported better on linux, less people will choose Windows now Apr 05 11:00:32 LemonadeCarl: well, it a choice of where to get revenue from Apr 05 11:00:44 it's either support or license Apr 05 11:00:57 and the licensed machines are bad for programmers Apr 05 11:02:53 thepoosh, or hardware lockin :P Apr 05 11:02:55 apple style ;) Apr 05 11:03:02 bleeech Apr 05 11:03:49 I wonder when will apple open source some of their stuff Apr 05 11:03:49 when average hell temperature is 0K Apr 05 11:04:06 they even closed up the few projects they had now Apr 05 11:04:08 <_genuser_> LemonadeCarl: I don't think .NET apps running on windows only is the main reason people choose windows over linux. Apr 05 11:04:12 and stopped releasing GPL sources for iOS stuff Apr 05 11:04:28 and tried their best to invent new proprietary protocols Apr 05 11:04:41 <_genuser_> I"ve used both and tried to get family to use both. most people don't care for technical aspect of it. they care about pretty icons. Apr 05 11:04:58 <_genuser_> ubuntu comes close but remain unappealing to the non-tech user. Apr 05 11:05:02 <_genuser_> but those are just my opinions. Apr 05 11:05:19 my family runs on ElementaryOS Apr 05 11:05:37 since they can't be trusted to not click on malware Apr 05 11:05:38 well, if you got Microsoft Office on a linux machine, it means a great deal to a lot of people Apr 05 11:05:46 <_genuser_> Mavrik: I moved my parents and brother to Fedora. they hated it. to Ubuntu, they hated it. Apr 05 11:06:00 I got some complaints at start Apr 05 11:06:14 but they never got admin privileges so now when after year and a half their machines still run happily Apr 05 11:06:16 it's all quiet :) Apr 05 11:06:24 <_genuser_> I ran Ubuntu for about a year. they didn't care for it as much. Apr 05 11:06:49 <_genuser_> lot of flash, silverlight stuff would just not work. many apps they wanted to run were windows only, etc. etc. Apr 05 11:06:56 <_genuser_> I finally went and bought Vista, lol. Apr 05 11:07:09 :( Apr 05 11:07:45 <_genuser_> the vista (and xp before it) all run as user. not even power user. so it eliminates some of the crap from damaging the pc. Apr 05 11:08:15 _genuser_: started with Win NT Apr 05 11:08:25 but still, Vista was a terrible OS Apr 05 11:08:30 indeed Apr 05 11:09:08 yeah, Vista was bad Apr 05 11:09:14 with it's awful memory management Apr 05 11:09:16 only worse OS I've used was Yosemite Apr 05 11:09:35 That's exactly my point, if you got .net on linux, it means a lot to common users Apr 05 11:09:40 idk, it's not that terrible Apr 05 11:09:45 <_genuser_> thepoosh: it wasn't that bad honestly. it has run on one of my home computers for 5+ years or so. no issues. Apr 05 11:10:08 <_genuser_> but I think win7 was much much better than vista. Apr 05 11:10:25 I might go back to linux on desktop if audio and video production software catch up in quality and all games run on linux :) Apr 05 11:10:25 <_genuser_> I still use win7 on my main desktop. win8 on my surfacepro3, and win10 on my laptop. Apr 05 11:10:51 10.10.3 is now actually usable again, but previous point releases were just shameful Apr 05 11:10:53 <_genuser_> Zharf: heh, I actually moved everything to linux and my music recording is the only thing that made me switch back to xp. :) Apr 05 11:10:56 my desktop is using win7 Apr 05 11:11:14 and i'll probably upgrade to win10 when SP1 comes out Apr 05 11:11:22 <_genuser_> thepoosh: I see, you seem to think along similar lines... Apr 05 11:11:33 I'll switch to Linux, the minute when I could play dota2 on it Apr 05 11:11:40 and hearthstone Apr 05 11:11:41 <_genuser_> I'll probably leave 7 on my main desktop until I upgrade or until there's a feature that I really realy like in win10. Apr 05 11:11:45 huh Apr 05 11:11:48 as my brother always said, always adopt a new MS product after SP1 Apr 05 11:12:05 I never played games on my production machines Apr 05 11:12:12 so I pretty much used Linux for a long time for development work Apr 05 11:12:28 until new laptops stopped working with it and had to switch to an apple Apr 05 11:12:29 <_genuser_> thepoosh: I like win7 a lot for main desktop. but agreed, we should learn about new OS's as well. hence my laptop runing win10 and surfacepro3 runing win8. Apr 05 11:12:33 <_genuser_> 8.1 actually Apr 05 11:12:37 Mavrik, hopefully 10.11 will be the bug squash release like snow leopard. Apr 05 11:12:55 my audio interface is so old that the windows 7 driver is an abandoned beta version... I haven't dared to try it on windows 8 :P Apr 05 11:12:57 DLSteve_, yeah, having a highend rMBP stutter while changing windows was not funny at all Apr 05 11:13:02 I use cygwin on windows as a replacement for linux Apr 05 11:13:13 cygwin is the devil Apr 05 11:13:28 I have linux on virtualbox on my windows machines Apr 05 11:13:36 it's not as good but it's better than nothing Apr 05 11:13:38 but then again, I have funny notions of actually using non-ASCII chars for filenames Apr 05 11:13:52 and Unix shells somehow never managed to figure out how to deal with that Apr 05 11:13:56 yay corrupted files Apr 05 11:14:11 I have no problems with those... Apr 05 11:14:12 my laptop is a macbook Apr 05 11:14:36 <_genuser_> cygwin sucks. true. Apr 05 11:14:55 <_genuser_> I build with mingw Apr 05 11:14:59 cygwin always struck me as missing the point Apr 05 11:15:09 it tries to map non-compatible system design to another system Apr 05 11:15:21 <_genuser_> in college I just saw nerd using cygwin to run "ls" on their windows machines. Apr 05 11:15:28 <_genuser_> pardon me, "windoze" machines Apr 05 11:15:29 and I've always been of an opinion that you should use what system gives you and build on that not fight it Apr 05 11:16:04 _genuser_, git bash <3 Apr 05 11:16:42 It doesn't matter, I just use cygwin in order to use ZSH and some tools like grep and ssh Apr 05 11:19:45 if you use cygwin you should http://randomartifacts.blogspot.com/2012/10/a-proper-cygwin-environment.html Apr 05 11:19:47 colorize it Apr 05 11:19:53 totally f-cking badass Apr 05 11:21:57 <_genuser_> great, I have a viewpager after hours of pointless mucking around with AS. Apr 05 11:22:01 <_genuser_> and it doesn't swipe.... Apr 05 11:22:08 ? Apr 05 11:22:10 show your code Apr 05 11:22:21 you use fragmentadapter or just normal? Apr 05 11:23:18 <_genuser_> so you can steal it and become rich?!??!! Apr 05 11:23:28 yeah Apr 05 11:23:30 exactly Apr 05 11:23:42 cause you are so wealthy, working in the wee hours of sat/sun morning ;p Apr 05 11:24:18 ugh cygwin... Apr 05 11:24:54 <_genuser_> haha Apr 05 11:25:14 <_genuser_> lasserix: I can upload the code. but I was just running thru all the basic error checking. Apr 05 11:25:28 <_genuser_> I have to say I kinda prefer eclipse view of logcat over AS. Apr 05 11:25:33 <_genuser_> but maybe overtime, I'll get used to this one. Apr 05 11:25:42 no you are right Apr 05 11:25:46 the new logcat view is bunk Apr 05 11:26:45 <_genuser_> I like that I can copy/paste it into notepad and the CRLF aren't messed up. but otherwise, meh. Apr 05 11:32:44 <_genuser_> well, then I am kinda not sure wth is going on. Apr 05 11:33:01 <_genuser_> the viewpager should be showing my image, but it's not. more debuggin. MOAR debugging!!! Apr 05 11:33:51 show your code Apr 05 11:34:52 <_genuser_> what do you wanna see? the viewpager in main activity? Or the PagerAdapater? Apr 05 11:34:58 are you adding your view in instantiateobject? Apr 05 11:35:00 the adapter Apr 05 11:36:59 <_genuser_> right, loading it online now. Apr 05 11:37:55 theres a pastebin plugin Apr 05 11:37:58 yes! Apr 05 11:38:05 paste all the code! Apr 05 11:38:15 the poosh the poosh the poosh is on fire Apr 05 11:38:18 <_genuser_> http://pastebin.com/raw.php?i=YGmWRUK9 Apr 05 11:38:35 <_genuser_> that's the pageradapter. Apr 05 11:38:43 is mView the "page"? Apr 05 11:38:48 you have to do Apr 05 11:38:51 i think i know why Apr 05 11:38:58 the ImageView doesn't have a size yet Apr 05 11:39:00 container.addView(mView) before you return it Apr 05 11:39:06 since it wasn't added yet Apr 05 11:39:11 well maybe Apr 05 11:39:16 but he needs to add it to the parent Apr 05 11:39:31 its not like getview in baseadapter--you have to explicitly add it to the parent container Apr 05 11:40:05 <_genuser_> I"m returning the ImageView itself, which extends View. So I didn't add it to anything. Apr 05 11:40:18 <_genuser_> but the size thing... that might have some merit. let me give it a size. Apr 05 11:40:38 _genuser_: http://pastebin.com/79TaEUyZ Apr 05 11:42:43 <_genuser_> runnign now. Apr 05 11:43:27 is adaptation on different models for android still lots of work? Apr 05 11:44:30 <_genuser_> lasserix_: interesting. now it's swiping AND showing the placeholder. however it's not loading the actual image. Apr 05 11:44:39 <_genuser_> lasserix_: but I think that was it to get it to show. :) thanks. Apr 05 11:44:45 <_genuser_> now let me wrestle with picasso. Apr 05 11:58:00 wtf senayar?! Apr 05 11:58:13 <_genuser_> lols Apr 05 11:59:23 <_genuser_> ugh, so the placeholder works. but the actually image doesn't show, even tho the location is valid. and picasso doesn't show any other errors. Apr 05 11:59:34 <_genuser_> very interesting to debug. Apr 05 12:07:57 <_genuser_> alright AS doesn't like you typing in lower case crap and doing ctrl-space. it wants you to type in correct case for it to auto complete. Apr 05 12:08:08 <_genuser_> is this soemthing that can be fixed in options somewhere? Apr 05 12:08:16 <_genuser_> I konw I know, I could google. Apr 05 12:24:59 @_genuser_ You need to prefix your URL with file:/// Apr 05 12:26:24 or just remove .getAbsolutePath() and pass File directly Apr 05 12:27:46 pass the file directly Apr 05 12:27:51 pass the file directly Apr 05 12:28:08 pass the file directly! Apr 05 12:29:54 <_genuser_> hmmm, let me try that Apr 05 12:30:19 pfn, http://i.imgur.com/dHuIQf2.png Apr 05 12:30:59 <_genuser_> LemonadeCarl: I also tried the "http://blahblah" like the example on picasso website and that was crapping out too. Apr 05 12:31:37 <_genuser_> LemonadeCarl: however, the File itself being passed worked. thanks. I appreciate your looking at it. Apr 05 12:33:04 you can also trygive the image a fixed size Apr 05 12:33:05 pass the file directly! Apr 05 12:33:44 insamplesize should just be a power of two Apr 05 12:33:46 not int Apr 05 12:33:53 you just pass it a exponent of 2 Apr 05 12:34:48 I wrote a library like picasso before, I ran into some paradox that if you want the image view to be inserted into the hierarchy , you have to know its width hand height before hand Apr 05 12:34:57 gdrc nice colors Apr 05 12:35:25 but that's not possible if the image came from internet, so I end up giving images fixed size Apr 05 12:35:41 LemonadeCarl: Why not just match_parent x match_parent? Apr 05 12:35:57 <_genuser_> I went a completely different appraoch. Apr 05 12:36:05 I can't write in portrait, lasserix Apr 05 12:36:09 <_genuser_> lasserix couyldn't even think of that approach. Apr 05 12:36:11 I've written my own image downloader thing. No issue with size here. Apr 05 12:36:12 <_genuser_> I passed the file directly!! Apr 05 12:36:33 Did you apply directly to forehead? Apr 05 12:36:37 haven't really used picasso Apr 05 12:36:50 but "pass the file directly" sounds like a really good mantra for a sci fi b cult movie Apr 05 12:37:09 <_genuser_> now that I'm using AS, it's like one line in build.gradle and one line in code. I kinda had to go with it. Apr 05 12:37:17 I guess you have to calculate the bounds of drawable after setting bitmap Apr 05 12:37:25 like a bunch of mad max nerds in an abandoned church worshipping an unexploded nucealr missile chanting "pass the file directly" Apr 05 12:37:30 <_genuser_> lasserix: heh, yeah I thought he's right. pass the File directly. Apr 05 12:37:45 Picasso looks good. Only reason I rolled my own was that my app is all about images and I needed complete flexibility. Apr 05 12:37:56 e.g., image-download progress. Apr 05 12:37:57 but if you need GIF use glide Apr 05 12:38:03 also glide seems to load a lot faster Apr 05 12:38:14 <_genuser_> TacticalJoke: so lot of mem manipulation in your lib? Apr 05 12:38:29 <_genuser_> TacticalJoke: lot of caching, etc? Apr 05 12:38:29 Not much. Just a disk cache, a memory cache, messing with inSampleSize, etc. Apr 05 12:38:38 I didn't think too much at the time, and it's like android 2.1 or sth like that, the ImageView itself is probably buggy at the time, so Apr 05 12:38:45 I should probably be reusing Bitmaps too, where possible. Apr 05 12:38:50 The inBitmap thing. Apr 05 12:39:17 <_genuser_> I just saw out of memory error and thought ok, do I want to start another project or do I just want to finally use a third party lib. Apr 05 12:39:31 <_genuser_> normally I hate using external libs. Apr 05 12:40:01 because when you gota use a calculator, better to build your own first! Apr 05 12:40:08 yeah you're not going to get far without external support on android :) Apr 05 12:40:12 LemonadeCarl: I just use match_parent x match_parent for the image view (which'll be the screen size minus the UI "chrome"). Then, once the ImageView is ready to draw, it tells my object its actual size. Then my object figures out what to do about inSampleSize, etc. Apr 05 12:40:41 the trick is to subclass imageview, grab the w h from onLayout Apr 05 12:40:47 then have an override method call set Apr 05 12:40:52 which checks if w / h have been set Apr 05 12:40:57 if not just post delayed like 100 ms Apr 05 12:40:59 lasserix: Ah, interesting idea. Right now, I'm just using a ViewTreeObserver to get that. Apr 05 12:41:13 I might implement your idea, though. Sounds simple. Apr 05 12:41:46 It could be called WiseImageView or something. :D Apr 05 12:41:48 Wise about its size. Apr 05 12:41:56 <_genuser_> yeah, I have a subclassed imageView called SquareImageView, that check if width is set, and sets the height to the same thing. Apr 05 12:42:09 _genuser_: oh then easy Apr 05 12:42:21 just add a handler and a method like "trySetImage(File f)" Apr 05 12:42:26 Square[tm]ImageView Apr 05 12:42:29 that checks if w/ h are set, if not postdelayed to handler Apr 05 12:42:54 DoubleIsoEqualHypoImageView Apr 05 12:42:57 Fucking Chinese government, blocking github google and everything good, I can't upgrade my AS without using proxy Apr 05 12:43:04 lasserix, dude Apr 05 12:43:10 just use viewtreeobserver Apr 05 12:43:11 :) Apr 05 12:43:13 not to mention the DOS attack Apr 05 12:43:20 don't do postdelayed Apr 05 12:43:22 down with viewtreeobserver Apr 05 12:43:22 parasite Apr 05 12:43:28 Yeah, postDelayed sounds kinda hacky. Apr 05 12:43:32 after ongloballayout you have view sizes calculated and ready to use Apr 05 12:43:53 so just attach setimage to onGlobalLayout of the imageview so you have sizes read Apr 05 12:43:54 <_genuser_> honestly, I'm kinda thinking down with AS. Apr 05 12:43:55 where do you put it in your code? Apr 05 12:43:55 *ready Apr 05 12:44:15 lasserix, depends, for some usecases it can be onResume Apr 05 12:44:31 <_genuser_> my computer is freezing every two minutes because windows is busy paging mem like crazy. with eclipse I could have even more stuff loaded and it just breezes thru. Apr 05 12:44:32 I also like to abuse custom views because they make everything simpler :) Apr 05 12:44:38 yeah but what if you view is like 4x classes away from your activity? Apr 05 12:44:59 lasserix: Picasso uses ViewTreeObserver. Apr 05 12:45:03 FWIW. Apr 05 12:45:24 lasserix, I don't think that happened :) Apr 05 12:45:29 well i really need to sleep but got to wait till these guests leave Apr 05 12:45:35 It uses ViewTreeObserver.addOnPreDrawListener. Apr 05 12:45:39 dont think what happened? Apr 05 12:45:40 oh Apr 05 12:45:42 <_genuser_> whatever picasso does, as long as it works. :) Apr 05 12:45:45 i just read in the news Apr 05 12:45:51 time to play some philip glass Apr 05 12:45:55 <_genuser_> hated using external libs but I guess if it solves a big problem. Apr 05 12:46:06 _genuser_: external libs FTW Apr 05 12:46:27 heh Apr 05 12:46:38 unless you feel the desire to learn, spend time coding on what you actually have to code Apr 05 12:46:59 the external lib hate usually comes in combination of not using a proper build system :) Apr 05 12:47:06 i mean, viewpager is technically a third party lib Apr 05 12:47:07 I'd be lost without some external libs (e.g., OkHttp, Jackson). Apr 05 12:47:24 Mavrik: yeah, but now with gradle Apr 05 12:47:45 <_genuser_> Mavrik: from old days of using windows libs actually. devs would just release one lib and then never support it and you wouldn't have a clue how to fix this closed source blackbox thing. Apr 05 12:48:01 _genuser_: Yeah, that's probably a big factor. Apr 05 12:48:11 <_genuser_> since JakeWharton never sleeps and always churns out new code, I figured this lib is ok to use. Apr 05 12:48:11 now there is github Apr 05 12:48:14 I remember those days. You end up having to create it all yourself. Apr 05 12:48:27 Or the lib is perfect it 99% of cases but totally fails for the 1%. Apr 05 12:48:37 And the author refuses to change that (or open-source the project). Apr 05 12:48:56 <_genuser_> lol, it's raining like crazy outside. looked outside the windows, neighbor in nightgown trying to pick up her mats from her front patio.... Apr 05 12:49:18 <_genuser_> just leave it woman!! Apr 05 12:49:42 Maybe she's trying to get your attention. ;D Apr 05 12:49:54 <_genuser_> TacticalJoke: yeah, so any lib that was open source, I used to pull the code into my own codebase and not have external libs. Apr 05 12:50:08 huh why Apr 05 12:50:13 <_genuser_> lol, pink nightgown aside, I'm not going out in this rain... Apr 05 12:50:48 <_genuser_> Mavrik: would have to understand how it works to pull it in successfully. would give me passing understanding on how to maintain it 70-80% of the time. Apr 05 12:50:53 I remember reading a reddit thread about pizza-delivery guys. They said a surprising number of women would answer the door naked and invite them inside. Apr 05 12:51:09 Same with handy men. They'd turn up to do the job and the woman was totally naked, and they'd have to act like everything was normal. Apr 05 12:51:14 <_genuser_> TacticalJoke: well it's a decent career choice then. Apr 05 12:51:53 I think that depends on the visual quality of the subjects. Apr 05 12:52:26 <_genuser_> true that. Apr 05 12:53:13 <_genuser_> you could always just instragram, pinterest "hot chicks" to see good looking girls instead of waiting to go fix someone's cable.... Apr 05 12:54:10 how to politely get people out of your house Apr 05 12:54:19 lasserix: Who are they? Apr 05 12:55:02 <_genuser_> you actually have people over you'd like to kick out? Apr 05 12:55:36 a friend of mine i told him he could crash for the night but he ended up picking up this girl (who is also an acquitance) Apr 05 12:56:07 And she stayed the night too? Apr 05 12:56:21 he brought her with that intent? im not sure Apr 05 12:56:37 If you gave permission for one person to stay and two people ended up staying, that seems a little rude to me. Apr 05 12:56:45 yeah Apr 05 12:56:56 thats why i think ill play some philip glass Apr 05 12:57:07 <_genuser_> you could use any number of tactics or excuses to get them out. Apr 05 12:57:10 Just tell them you need to sleep. Say you'll talk to them later. Apr 05 12:57:11 quietly at first, but then louder and louder until they excuse themselves from the premesis Apr 05 12:57:20 It's your home. Lol. Kick them out! Apr 05 12:57:23 <_genuser_> but I'd always vote for teh honest approach. tell them it's not cool. and you think they should leave. Apr 05 12:57:33 its a little more complicated then out Apr 05 12:57:40 *then that Apr 05 12:57:46 than* :D Apr 05 12:57:55 *than Apr 05 12:58:00 <_genuser_> they're good friends, etc. etc? Apr 05 12:58:25 Think of it like a programmer: if it's too complicated, refactor first. Apr 05 12:58:37 <_genuser_> so he means, go kiss the girl. Apr 05 12:58:42 <_genuser_> which should piss off one of them. Apr 05 12:58:46 <_genuser_> that one would leave. Apr 05 12:59:15 Yeah, making them uncomfortable sounds like an effective solution. Apr 05 12:59:22 The problem right now is that they're too comfortable. Apr 05 12:59:57 <_genuser_> lol, walk around in your bathrobe open and nothing else. Apr 05 13:00:08 making someone uncomfortable might mean u get your ass kicked Apr 05 13:00:17 Melvinov: In your own home? Apr 05 13:00:18 making YOU uncomfortable Apr 05 13:00:51 I think lasserix needs to read one of those "How to stand up for your rights without losing heart" books. Apr 05 13:01:33 no i just dont like being impolite, like i said it is a little more complicated, eg she needs to go but he is free to stay Apr 05 13:01:42 maybe he can crash with her Apr 05 13:02:00 <_genuser_> oh, then pull him aside and tell him, he's your friend he can stay but he needs to get rid of the girl. Apr 05 13:02:03 <_genuser_> let him do it. Apr 05 13:02:26 <_genuser_> tell him to do it quick and you don't want her at your place. Apr 05 13:02:37 <_genuser_> if he really is ok to stay, this should solve your problem. Apr 05 13:02:56 Yeah, that's probably the best solution here. Apr 05 13:03:16 is a ID's uniqueness only constrained within it's scope? Apr 05 13:03:49 <_genuser_> deranged: ui element id in layout xml files? Apr 05 13:04:32 yus Apr 05 13:05:36 <_genuser_> those id's should be unique project wide unless you want amazingly difficult problems to solve. Apr 05 13:06:37 From the documentation: "An ID need not be unique throughout the entire tree, but it should be unique within the part of the tree you are searching (which may often be the entire tree, so it's best to be completely unique when possible)." Apr 05 13:06:42 http://developer.android.com/guide/topics/ui/declaring-layout.html Apr 05 13:07:00 As long as it's unique for that findViewById call, it should be fine Apr 05 13:07:00 excellent, thank you Apr 05 13:08:02 <_genuser_> would recurring id's getting assigned the same value in R files? I wonder Apr 05 13:10:38 of course Apr 05 13:13:06 <_genuser_> JakeWharton: just the person I would like to ask a question. Apr 05 13:13:12 no Apr 05 13:13:19 $1/each Apr 05 13:13:24 it's too early Apr 05 13:13:34 it's 16:15 Apr 05 13:13:39 what are you talking about Apr 05 13:14:04 that's a question Apr 05 13:14:06 $1 Apr 05 13:14:20 There was no question mark, though Apr 05 13:14:24 <_genuser_> JakeWharton: in that case. I'll leave it as user experience. :) Apr 05 13:14:32 <_genuser_> Picasso.with(ctx).load("http://i.imgur.com/DvpvklR.png").fit().centerInside().placeholder( R.drawable.pholder).into(mView); Apr 05 13:14:36 <_genuser_> doesn't load anything. Apr 05 13:14:51 that is one messed up image Apr 05 13:14:59 <_genuser_> if I load local file with "file:///sdcard/DCIM/Camera/blahblah.jpg" it works. Apr 05 13:15:00 and i'm sure SO has a question about this Apr 05 13:15:07 <_genuser_> if I pass it a File object, it works Apr 05 13:15:20 do you have internet permission? Apr 05 13:15:54 <_genuser_> JakeWharton: ah, I see you identified the issue quickly. I have file permsision in manifest but not internet. Apr 05 13:17:04 :S Apr 05 13:17:07 God, the way Spinner works is annoying. It posts runnables which sometimes post runnables. Apr 05 13:17:22 TacticalJoke: WAT Apr 05 13:18:15 we used to detect missing internet permission and crash with a message, but some crappy device out there crashed when you tried to check internet permission Apr 05 13:18:17 Trying to find the code. Apr 05 13:19:08 <_genuser_> ok now I have but it just shows the placeholder. Apr 05 13:19:41 <_genuser_> however, no worries, I'll probably need teh internet bit much later in the project. for now local images work fine. Apr 05 13:19:49 <_genuser_> gives me time to debug this a little further later on. Apr 05 13:21:55 The post()-within-a-post() was here, but they must've fixed it recently (it is present in the API 21 source but not in the current master branch): https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/widget/AdapterView.java#860 Apr 05 13:23:00 <_genuser_> nice, I just needed to clean my project and rebuil it, and it works fine. :) Apr 05 13:23:25 <_genuser_> JakeWharton: you were right, moving to gradle based build makes it so much easier to move to the latest picasso (or any lib). Apr 05 13:23:57 What were you using before? Eclipse's build system? Apr 05 13:24:08 <_genuser_> just eclipse, no maven. Apr 05 13:24:21 Gradle is a huge upgrade, then. :) Apr 05 13:24:24 <_genuser_> manually downloading picasso's jar file and then importing it in. my main project is still in eclipse. Apr 05 13:24:51 <_genuser_> needed to do a little proof of concept on image viewing and decided to do that in AS just to learn more about AS. Apr 05 13:25:07 It's worth just switching to AS at this point. Apr 05 13:25:18 Eclipse/ADT is officially dead. Apr 05 13:25:38 <_genuser_> true that. it's stuck at api level 18. if you move past it, it will break horribly. Apr 05 13:26:22 _genuser_: Is that the "bundle"? I was using Eclipse with API 21 successfully (but I was using Luna with ADT). Apr 05 13:27:13 <_genuser_> TacticalJoke: I was just using the ADT plugin in standalone eclipse. two different times I updated to API (19 and 21) and it just went totally nuts. Apr 05 13:27:22 <_genuser_> s/was/am/ Apr 05 13:27:36 Ah. I do remember that upgrading Eclipse was rather scary. Apr 05 13:27:45 Or updating Android SDK stuff. Apr 05 13:28:25 <_genuser_> I think once move muscle memory over to AS, eclipse can be deleted from this computer. Apr 05 13:28:53 I have pretty much the same shortcuts. I think I was using the VS scheme in Eclipse. Apr 05 13:29:29 <_genuser_> do the scheme match stuff like f3 (open declaration in eclipse) to ctrl-b in AS Apr 05 13:30:54 Oh, I never used F3. Just use Middle Click (or Ctrl+Click). Apr 05 13:31:13 AS supports Middle Click for this. Eclipse, I think, supported Ctrl+Click only. Apr 05 13:31:39 <_genuser_> I see. once I get moving I'm all on the keyboard side. using the mouse takes extra time. Apr 05 13:32:03 <_genuser_> wow, look at the time 8:31am CT. I should get going. Apr 05 13:32:06 In any case, as far as I know everything is customizable. Apr 05 13:32:11 Keyboard-shortcut-wise. Apr 05 13:32:22 <_genuser_> Happy Easter to all who celeberate it. Happy Sunday to the rest. Apr 05 13:32:37 What about those who don't celebrate Sunday? Apr 05 13:32:48 <_genuser_> those people are just trying to make me late. :) Apr 05 13:32:50 :D Apr 05 13:33:06 <_genuser_> anyway, see you later man. Apr 05 13:33:12 Laters. Apr 05 13:34:54 How would you guys translate this into material design? https://i.imgur.com/7UhovYK.png Apr 05 13:35:17 That Spinner in particular. It has about 5 options and will most probably be extended later on. Apr 05 13:35:41 hi, am i in the correct channel to ask for kernel build problems ? Apr 05 13:35:45 Should I just do the same thing or something totally different? (I tried Sliding Tabs but it looks to crowded) Apr 05 13:36:53 Muchoz: It's hard to tell what's going on in that screenshot. Are those tabs at the top? What do they say? Apr 05 13:37:23 slowmoe: I think #android-root; never been there though. Apr 05 13:37:32 TacticalJoke, do not mind the ActionBar. I'm particularly talking about the Spinner that says 'Bakkers' which means 'Bakeries'. Apr 05 13:38:34 slowmoe, the topic says: "Root/custom ROMs, head to #android-root" Apr 05 13:38:50 Probably also includes custom kernels. Apr 05 13:39:45 ahh finally Apr 05 13:41:04 Muchoz: https://www.google.com/search?q=material+spinner&rlz=1C1CHWA_enUS574US574&espv=2&biw=1536&bih=772&site=webhp&source=lnms&tbm=isch&sa=X&ei=ODshVZq5K8zzsAW964DQBw&ved=0CAcQ_AUoAg Apr 05 13:42:08 lasserix, I was thinking about that: https://i.imgur.com/JLA5qG1.png too. But would it be easy to use? Apr 05 13:43:04 also this: http://www.google.com/design/spec/material-design/introduction.html Apr 05 13:43:57 thepoosh, I've already read that, thank you though. Apr 05 13:44:08 I'm just asking about people's opinions. Apr 05 13:45:11 Is your question even related to material design? It sounds like a general UI question to me. Apr 05 13:46:22 TacticalJoke, I could just copy that design of our iOS app but would it be Material Design? Apr 05 13:47:19 unless your iOS app is material compliant then the answer is no Apr 05 13:47:27 thx Muchoz Apr 05 13:47:41 thx TacticalJoke Apr 05 13:47:53 thepoosh, that was a rhetorical question Apr 05 13:54:55 I guess I'll go with this: https://i.imgur.com/JLA5qG1.png Does anyone know how to implement this? Apr 05 13:55:40 Ah, nvm. I found the article about it. Apr 05 14:41:55 Muchoz Apr 05 14:42:01 you have to put Spinner inside the toolbar Apr 05 14:42:11 other than that it should be simple Apr 05 14:42:31 if you treat it as just another Spinner Apr 05 14:42:47 and do not use any legacy actionbar handlers for it Apr 05 14:42:48 Phenicks, like I have no idea what this dude is doing here: https://i.imgur.com/khIiE2Z.png Apr 05 14:43:05 What's up with those tags? Apr 05 14:43:20 lol Apr 05 14:43:23 nvm Apr 05 14:43:43 just put it in layout Apr 05 14:43:47 for you'r activity Apr 05 14:44:07 a Apr 05 14:44:11 It looks like someone is misuing tags where they should be using multiple view types for an adapter. Apr 05 14:44:18 doesn't make any sense Apr 05 14:44:22 Also, that naming is bad: 'view' should be 'recycledView' or something. Apr 05 14:44:27 it's like he's making a list of toolbars lol Apr 05 14:44:43 Muchoz Apr 05 14:44:44 then Apr 05 14:44:47 in you'r activity Apr 05 14:44:51 I am doing that Apr 05 14:44:52 you set the toolbar as your view toolbar Apr 05 14:45:00 the tuts cover that Apr 05 14:45:02 This dude is just making it utterly complicated. Apr 05 14:45:08 oh yeah Apr 05 14:45:11 Muchoz: Where is that code from? Apr 05 14:45:11 thoroughly Apr 05 14:45:13 It looks stupidl Apr 05 14:45:16 stupid.* Apr 05 14:45:31 https://blog.danielbetts.net/2015/01/02/material-design-spinner-toolbar-style-fix/ Apr 05 14:45:34 Bad code imo Apr 05 14:46:34 pretty bad Apr 05 14:46:44 it's simpler than it looks if i remember correctly Apr 05 14:46:56 just treat the spinner as any spinner Apr 05 14:47:00 and you should be allright Apr 05 14:47:07 Ya, fuck this. Apr 05 14:53:21 Alright, everything seems to work on it now. But the text color is black, what do I need to add to my styles to make that white? Apr 05 14:53:25 Hmm, I partially take that back. As far as I can see (with Google), it might be necessary to use tags here. Though I haven't looked into this much. Apr 05 14:54:22 Are you using the [ app:theme="@style/ThemeOverlay.AppCompat.ActionBar" ] thing? Apr 05 14:55:38 TacticalJoke, I am. Apr 05 14:56:49 You might need "@style/ThemeOverlay.AppCompat.Dark.ActionBar" or something. I gave up even trying to remember which is which. :D Apr 05 14:58:07 TacticalJoke, I've tried that and for some reason then the dropdown arrow is white, the text of the title is black, the popup text is black and background is grey. Apr 05 15:02:02 Hmm, according to the XML layouts on that page, the title text should be white and the dropdown text, dark grey. Apr 05 15:02:27 Did you change the android:textColor values? Apr 05 15:04:15 It should probably be "?android:textColorPrimary", I think, anyway. Apr 05 15:05:40 i've tried it, stays black. Apr 05 15:06:24 What are the values of android:textColor in the two layouts? Apr 05 15:08:49 TacticalJoke, well here's the activity: http://hastebin.com/ukakukenum.xml Apr 05 15:09:17 The spinner in the Toolbar is black (drawable and text). The popup dropdown's text is black on a white background. Apr 05 15:09:54 It's toolbar_spinner_item_actionbar.xml and toolbar_spinner_item_dropdown.xml that determine the text color here. Apr 05 15:11:06 Ah.. I guess the problem might be that I'm using the Android built-in ones. Apr 05 15:13:50 Guess I'll also have to make a custom Adapter, *sigh* Apr 05 15:15:14 Sup TacticalJoke Apr 05 15:17:52 Hey, drose379. Apr 05 15:18:00 How you doing? Apr 05 15:18:01 Muchoz: Why are you following that tutorial? Looks overly complicated to me. Apr 05 15:18:10 TacticalJoke, I'm not Apr 05 15:20:33 does anyone know how to get completion, go to declaration, etc.. working in Android Studio when you are using renderscript stuff? Apr 05 15:21:04 for the C part i meant, not for the java jni glue Apr 05 15:24:43 I would like to layout two views, vertically. B flush bottom, with a "natural, content driven height". A, above B, filling the remaining height alll the way to the top.. (I still don't grok Android layout) Apr 05 15:26:37 What's the right way to do that? Apr 05 15:26:48 you mean you have statically sized view on top Apr 05 15:26:56 and then stretchable view on the bottom? Apr 05 15:27:11 No. the other way around. Apr 05 15:27:13 relative layout, B aligns to parent bottom, A above B and aligns parent top Apr 05 15:27:33 Yeah, or LinearLayout with layout_weight (though I prefer RelativeLayouts, personally). Apr 05 15:27:35 dcorbin, standard LinearLayout Apr 05 15:27:56 dcorbin, set layout_height="0dp" layout_weight="1" on the top view Apr 05 15:28:10 dcorbin, and layout_height="whateveryouwant dp" on the bottom view Apr 05 15:28:24 i think he wants wrap_content Apr 05 15:28:29 RelativeLayout is slow to resolve constraints, for those usecases LL is usually significantly faster to layout Apr 05 15:28:44 Hello. I am using retrofit with rxjava. New requests are being sent everytime I subscribe to a observable returned when creating a new request. Apr 05 15:28:45 any measures on that? Apr 05 15:29:04 i think relativelayout needs a full overhaul anyway Apr 05 15:29:28 vedu, yes. Apr 05 15:29:33 vedu: You're probably observing and observable that already has a subscriber calling retrofit Apr 05 15:29:39 observing an* observable Apr 05 15:30:11 Retrofit will make a request on subscription Apr 05 15:30:16 use cache() Apr 05 15:30:31 Mavrik, CedricBeust: Yes I want to have multiple subscribers. Apr 05 15:30:41 Then yes, cache() Apr 05 15:30:48 right :) Apr 05 15:31:21 I had the LinearLayout, but different constraints Apr 05 15:31:24 Testing now. Apr 05 15:31:58 do retofit and/or rxjava users hang out here only, or there are other channels? Apr 05 15:33:50 vedu: There are a few, not many though Apr 05 15:34:47 Yeah. But I love it already. One of the reasons: `16 files changed, 735 insertions(+), 1103 deletions(-)` Apr 05 15:35:15 vedu: Yes, that's pretty standard once you start switching to Rx :) Apr 05 15:37:51 The problem, right now I find is, there are too many operators. Just too many. I dont know what which ones to use Apr 05 15:38:21 Hot damn! https://i.imgur.com/JkCK8h3.png Apr 05 15:39:13 ? Apr 05 15:39:19 it's just 2G Apr 05 15:39:25 do you have your heap size set too small? Apr 05 15:51:08 https://github.com/sonyxperiadev/ChkBugReport Apr 05 15:52:10 gdrc, it only started happening? Apr 05 15:52:27 lasserix, TextView and edit text are not strings Apr 05 16:27:52 Mavrik: that worked, once I got all the "parameters" right. Thanks. Apr 05 16:28:25 Tac, I finished that listview app Apr 05 16:28:31 although I think my code is inefficient Apr 05 16:30:15 http://pastebin.com/arGrJsS5 Apr 05 16:30:36 the last method, I couldn't think of another way to do it Apr 05 16:41:00 when Picasso sets an image to an ImageView, what is it setting the image as? Apr 05 16:41:10 setBackground()? setDrawable()? setImageResource()? Apr 05 16:41:27 because I'm trying to run this line and I cannot for the life of me escape null: Bitmap b = ((BitmapDrawable) bookmarkIMG.getBackground()).getBitmap(); Apr 05 16:41:42 that line or any other line for that matter, I want to get the height of the image that's been loaded http://stackoverflow.com/questions/8880376/how-to-get-height-and-width-of-a-image-used-in-android Apr 05 16:41:49 here too http://stackoverflow.com/questions/4552833/how-to-get-width-and-height-of-the-image Apr 05 16:42:52 any aahdeyas? Apr 05 16:46:50 pfn: sorry? Apr 05 16:47:08 gdrc, when did this start happening Apr 05 16:47:14 pfn: It happens on s4 with cm12 and software buttons Apr 05 16:47:18 gdrc, latest version? Apr 05 16:47:25 of what? qicr? yes Apr 05 16:47:36 sgs4? Apr 05 16:47:44 yes i9505 Apr 05 16:47:50 probably bad config of cm12 Apr 05 16:48:01 i think so Apr 05 16:49:23 gdrc, https://github.com/pfn/qicr/blob/master/common/src/com/hanhuy/android/irc/Tweaks.scala#L197 Apr 05 16:50:03 Probably that bool isn't being set in cm12 Apr 05 16:50:23 pfn: tonight i'll clone qicr and figure out. is the project compatible with android studio? Apr 05 16:50:38 no Apr 05 16:50:54 and the problem is cm12 not setting the resource Apr 05 16:52:22 anyway, simple answer : don't use soft nav on sgs4 Apr 05 16:53:34 home button is loudy Apr 05 16:53:37 fuckin sammy Apr 05 16:54:35 anyway, figure out what cm12 sets to indicate that it's using software nav and I might be able to fix Apr 05 17:02:38 you have to set the bitmap on the imageview yourself for any of those links to work properly Apr 05 17:02:49 unless Picasso has some way that I'm unaware of to do this Apr 05 17:14:36 hi Apr 05 17:18:08 hmm.. Four states are currently in the process of approving measures to allow high school students to fulfill foreign language-learning requirements with a computer language instead, according to John Lauerman of Bloomberg.. Apr 05 17:24:36 I'm trying to build an hello-world app but I have lots of trouble with gradle. It basically don't "see" the android plugin (which I assume it's included into the SDK) Apr 05 17:25:00 Does anyone can help or point me to the right uri? Thanks in advance. Apr 05 17:25:11 clamiax Apr 05 17:25:20 which software do you use? Apr 05 17:25:33 there are default templates in android studio that you can use Apr 05 17:25:48 I'm using the standalone SDK tools Apr 05 17:26:41 xpheres: are you talking about build.gradle? Apr 05 17:26:45 clamiax: It's better to use Android Studio. Apr 05 17:26:58 I think so Apr 05 17:27:05 I use android studio Apr 05 17:27:14 eclipse is also good, for me looks almost the same Apr 05 17:27:25 gradle is daunting for first timers Apr 05 17:27:40 get used to android studio first then jump to gradle Apr 05 17:27:46 Eclipse/ADT isn't supported anymore. Android Studio is the only real choice (outside of IntelliJ, I guess). Apr 05 17:27:53 however I'm very amateurs,I'm still struggling to use the volley library Apr 05 17:28:09 yes I use android studio Apr 05 17:29:15 I can properly build a .jar from sources but I miss, for e.g., the assembleDebug task. That's why the build.gradle raises an error when I put "apply pl Apr 05 17:29:16 ugin 'android'" into the build.gradle file. Apr 05 17:29:34 Sorry, I copy-pasted Apr 05 17:30:26 AayushRanaut: I'm incline to do the contrary: I would like to understand how things works first Apr 05 17:30:44 (if I'm able to make them works :)) Apr 05 17:32:00 sbt is easier ;) Apr 05 17:33:35 Yeah, it do really sucks a lot less Apr 05 17:35:12 ? Apr 05 17:36:27 pfn, you've ever used scala for Android? Apr 05 17:36:42 what's scala Apr 05 17:38:02 i meant the programming language Apr 05 17:39:48 what's that? Apr 05 17:41:23 nevermind:) Apr 05 17:46:07 I threw the gradlew inside the SDK and downloaded the it from the official web site. Everything worked out of the box. Apr 05 17:46:13 Thanks anyway for your help. Apr 05 17:46:24 s/the it/it/ Apr 05 17:47:20 anyway, setting up sbt to build android stiff Apr 05 17:47:24 It might be easier to learn stuff by looking at what Android Studio does. Apr 05 17:47:26 stuff is really easy Apr 05 18:16:39 hey Apr 05 18:16:44 :) Apr 05 18:35:42 Has anyone here used ShowcaseView? It takes in a view ID as a paremeter, and I am trying to use it with a RecyclerView item. I am trying all sorts of combinations of recyclerView.getChildAt(0) but am not having any luck. Ideas? Apr 05 18:39:26 I have a question Apr 05 18:39:39 yes? Apr 05 18:39:52 its Sunday get to work coder's :) Apr 05 18:39:52 if I upload a project from android studio to github, is there any sensible data that I should delete first? Apr 05 18:40:22 API keys Apr 05 18:40:25 If you use any Apr 05 18:40:26 yea t0astt I've used it Apr 05 18:40:26 xpheres: well, don't store your release key there :) Apr 05 18:40:39 Odaym: Any idea on how to get it to highlight my recyclerview item? Apr 05 18:40:40 where is that release key? Apr 05 18:40:55 what's a recyclerview item? Apr 05 18:41:01 you have to create it yourself, afaik. so whereever you put it Apr 05 18:41:05 if it has an idea, it will highlight over it Apr 05 18:41:11 id* Apr 05 18:41:25 does it show a lightbulb too? :D Apr 05 18:41:31 you have to look at the method which takes this id, how its going about finding it in the view Apr 05 18:42:14 Yeah, my problem is the recyclerview gets handed an adapter that creates items as a list Apr 05 18:42:24 For the showcase I create just a test item Apr 05 18:42:24 t0astt, maybe you can change your view's id before showing the showcase view Apr 05 18:42:50 oh, so it's just one view? Apr 05 18:42:52 well I didn't release it yet, I just build the app Apr 05 18:43:13 irpime: Well, it's a RelativeLayout that holds many views Apr 05 18:43:16 and copied the file here: https://github.com/xpheres/AndroidAnalyticalTranslator Apr 05 18:43:18 showing different informatin about the item Apr 05 18:43:22 iprime * Apr 05 18:43:24 I was able to make it highlight an item in one of my listview's rows Apr 05 18:43:30 I hope I didn't make any mistake Apr 05 18:43:35 by adding more code to that method that takes an ID to highlight Apr 05 18:43:42 Odaym: Can I see your code for the listview row and your showcase view? Apr 05 18:46:07 the list item row is nothing worth mentioning, it's just image text image Apr 05 18:46:20 ViewTarget.java is worth, http://pastie.org/10075220 Apr 05 18:46:36 the 2nd constructor is what I changed Apr 05 18:46:50 well I added a second constructor Apr 05 18:46:52 t0astt, maybe your view wasn't laid out when you try to show the showcase view Apr 05 18:47:07 cause the first is just activity.ffindViewById, which will return null if you pass it the id of your list_item Apr 05 18:47:27 sometimes that happens too, what iprime said Apr 05 18:47:35 I had to work around it for sure Apr 05 18:48:09 Odaym: That is what is happening with me Apr 05 18:48:17 you sure? Apr 05 18:48:25 arent you just passing it the id of the list item? Apr 05 18:48:29 cause both will crash Apr 05 18:48:46 not being ready, and passing id that doesnt exist in the scope of an activity but in the scope of a listview instead Apr 05 18:48:54 I am passing the id of a textview on the recyclerview item Apr 05 18:49:03 The recyclerview item is like this Apr 05 18:49:11 look at that code Apr 05 18:49:19 the first constructor is what gets run when you try to do what you are doing Apr 05 18:49:21 relativeLayout[textview, textview, imageview] Apr 05 18:49:24 ok Apr 05 18:49:30 it does activity.find Apr 05 18:49:50 ahh Apr 05 18:49:58 if nested, you crash Apr 05 18:50:04 gotcha Apr 05 18:50:06 interesting Apr 05 18:50:13 so you modified the ViewTarget class? Apr 05 18:50:27 iprime, so have you tried scala on Android? Apr 05 18:50:46 I added a constructor that takes my listview and searches for the view inside my listview Apr 05 18:50:49 I don't understand SwiftKey, sometimes it capitalizes android, sometimes it doesn't Apr 05 18:53:04 pfn, i use scala for project euler, i know it can be used for android development and was wondernig if anybody here has used it for android before Apr 05 18:53:26 iprime, googling has lots of results Apr 05 18:53:46 what for man Apr 05 18:53:48 :) Apr 05 18:53:55 why errbady so eccentric Apr 05 18:53:59 and kinky Apr 05 18:54:02 oh well Apr 05 18:54:10 pfn, you've mentioned sbt.. i got interested... Apr 05 18:54:17 Odaym: Thanks, I'm trying out your idea now :D Apr 05 18:54:32 its really not an idea Apr 05 18:54:36 petty constructor Apr 05 18:54:38 Odaym, because java is a really shitty language for project euler problems Apr 05 18:54:48 Java > * Apr 05 18:55:25 I only did like 10 euler in my life so I dont know Apr 05 18:58:11 Odaym: That modified constructor, did you just place the whole class you showed me in the activity/fragment you needed to use it? I'm getting a NPE on it still Apr 05 18:58:35 the whole project is in my project Apr 05 18:58:36 :) Apr 05 18:58:48 ah alright Apr 05 18:58:51 well the classes Apr 05 18:59:01 its really badly done library and I dont like it Apr 05 18:59:06 Agreed Apr 05 18:59:22 I told him on one of the github issues but he said if you have something better fork it Apr 05 18:59:31 so I told him to pull my fork Apr 05 18:59:35 hahaha Apr 05 18:59:46 yeah i got the vibe that he was kinda lame Apr 05 18:59:52 no documentation either, really Apr 05 19:00:01 he says "who uses this library? Just ask Google, Youtube" Apr 05 19:00:04 lol Apr 05 19:00:07 lol RIGHT? Apr 05 19:00:12 what an ass Apr 05 19:00:24 WHERE'D THAT FEATURE GO? Too bad, use legacy versions Apr 05 19:00:32 that legacy branch though Apr 05 19:01:00 alright i gotta drive back to my apt, i'll see ya later Apr 05 19:01:24 I even made a change to give the circle a radius Apr 05 19:01:29 he has a static radius for everything Apr 05 19:01:34 you can't make it bigger or smaller Apr 05 19:02:13 Which library are you talking about? Apr 05 19:02:37 showcaseview Apr 05 19:03:05 Ah. That reminds me of that joke, though. Apr 05 19:03:13 "A UI is like a joke: if you have to explain it, it's no good." Apr 05 19:03:14 Or something. Apr 05 19:03:31 meh, youtube do it Apr 05 19:03:35 many do it Apr 05 19:03:48 its the bigger problem of UI's in cases where content is empty Apr 05 19:03:59 everything is fine when there's content Apr 05 19:04:23 how can i change a listpreferences entries and entryValues based on a different preference ? Apr 05 19:04:44 Yeah, we can't always avoid explaining stuff. I'm trying to avoid it in my app completely, but it's difficult in some cases. Apr 05 19:05:19 plus its cool Apr 05 19:05:23 it looks like you care Apr 05 19:05:28 like you thoguht about things Apr 05 19:07:17 Im using drawableView library now Apr 05 19:07:41 the guy does canvas.setHeight/Width as raw int, he doesnt take care of doing something like getDimensionPixelSize Apr 05 19:07:55 so you get "1000" height, which is completely different from one device to the other, its like unitless Apr 05 19:09:06 sick of being at the mercy of someone else! Apr 05 19:09:14 I will write a library that WRITES LIBRARIES!! Apr 05 19:09:40 a meta library Apr 05 19:09:42 don't use shitty libraries then Apr 05 19:09:47 really easy... Apr 05 19:09:49 ez Apr 05 19:09:52 2ez4mez Apr 05 19:10:00 pro suggestion pfn Apr 05 19:13:28 I got these awesome Sony headphones, they're so awesome Apr 05 19:13:34 you cannot hear yourself type Apr 05 19:14:11 I got some SoundMAGIC E10s. They're not bad, I guess. Apr 05 19:14:26 I want basically no external sound, though. Apr 05 19:14:32 I spent $135 on these Apr 05 19:14:37 I almost don't care if I get hit by a car. I wanna hear music and not damage my ears. Apr 05 19:14:51 Ah, these were only around $55. Apr 05 19:14:53 cause if I was going to be corrupt I would have paid like $400 for Bose, but i really didnt want to go full insane Apr 05 19:15:01 stupid to do so Apr 05 19:15:22 Yeah, I wonder how good they even are at that price. Apr 05 19:15:25 bose and Sony suck Apr 05 19:15:30 + Apr 05 19:15:38 I couldnt find something like sanheiser Apr 05 19:16:01 then again, I spent like 400 on my ultimate ears Apr 05 19:16:13 I'd like to get customs again some day Apr 05 19:16:16 Aren't there Sennheisers at that price? Apr 05 19:16:47 I didnt go to someone who just sells them, we have Virgin here and they sell all that shit Apr 05 19:17:03 Is there a big difference between $50 and $150? Apr 05 19:17:09 Apart from $100. Apr 05 19:17:10 here, yea Apr 05 19:17:18 expensive here Apr 05 19:17:28 even food Apr 05 19:17:33 corrupt 3rd world country Apr 05 19:17:45 I mean for earphone quality. Apr 05 19:18:19 Hey guys, I upgraded from 4.2.2 to 4.4.2 Apr 05 19:18:23 what I cared about is the padding on the pieces themselves, I didnt want something that tears with time and starts leaving those little torn patches everywhere Apr 05 19:18:34 Before I wasent able to change the color of the notification bar above the app Apr 05 19:18:38 Can I do that in 4.4.2? Apr 05 19:19:36 Hi guys! Apr 05 19:19:41 So I have this class that registers and updates the geolocation of the phone when it changes. Apr 05 19:19:46 I’d really like for it to inform my MainActivity, when it does. How do I do that? Apr 05 19:20:17 subscribe with a broadcast receiver? Apr 05 19:20:40 No need for a broadcast receiver for this, event bus or Rx probably a better solution Apr 05 19:21:16 + Apr 05 19:21:33 eventbus is the answer to life Apr 05 19:21:37 embrace it Apr 05 19:22:04 eventbus? what is that? Apr 05 19:22:08 Hey, im a studen that im starting in android development and im doing my first application. Im having some problems with out of memory in emulation with 32MB. I didnt think its cause by images, im starting thnking its maybe a bad practices or something in my code. Here its all my code and would be appreciate if anyone can see it and give me some advice. https://github.com/sky10p/taesproject/tree/isma/app/src/main Thanks! Apr 05 19:22:14 JohnR^^, are you using gms? do you need the locaiton in your activity only? Apr 05 19:22:18 Once you start using Rx, event bus becomes pretty much unnecessary Apr 05 19:22:20 whoops! I of course will go ask google first :) Apr 05 19:22:37 Ive been meaning to learn what Rx is Apr 05 19:22:40 but haven't yet Apr 05 19:22:52 JohnR^^: On Android, the two most popular ones are Otto and GreenRobot Apr 05 19:23:03 CedricBeust: you're a beast! :) Apr 05 19:23:13 iprime: I want to store the data in googles datastore Apr 05 19:23:14 he's a Beust Apr 05 19:23:15 haha Apr 05 19:23:24 codekK: Are you seeing the problem with a real device? Apr 05 19:23:39 Odaym: rx is ok, if you want to use an event bus, use EventBus from greenrobot wich is better than otto Apr 05 19:23:42 gdrc: Not sure where that came from :) Apr 05 19:23:49 better? Apr 05 19:23:51 how is it better? Apr 05 19:24:03 CedricBeust: ok :). I’ll have a look at them :) Apr 05 19:24:09 CedricBeust_, no cause i didnt have a 32mb heap size phone for test it Apr 05 19:24:34 @CedricBeust: I was under the impression that evnet busses and rx were solving different problems Apr 05 19:24:36 I have a galaxy s4 and i didnt get out of memory but i read that galaxy s4 have 64mb heap i thnk Apr 05 19:24:36 Odaym: eventbus can post to main thread. CedricBeust just googled your name, you're talented Apr 05 19:24:48 gdrc: oh that Apr 05 19:25:09 he's just a normal person Apr 05 19:25:18 mrfu: Kind of. In my opinion, Rx subsumes event buses: it can do everything event buses do but it does more. The reverse is not true Apr 05 19:25:22 you can be him Apr 05 19:25:24 ez BRO Apr 05 19:25:26 ez Apr 05 19:26:17 CedricBeust, however hammering together an event bus from Rx is rather involved Apr 05 19:26:26 CedricBeust: do you really think kotlin can be useful for searching a job? Apr 05 19:26:28 and it's never quite as elegant Apr 05 19:26:41 Mavrik: Because you don't do that, you have observers that subscribe exactly to the observable they are interested in Apr 05 19:26:52 gdrc: No, not at the moment Apr 05 19:27:05 CedricBeust, I prefer to have less boilerplate :) Apr 05 19:27:12 And use a better tool for the job Apr 05 19:27:19 Mavrik: event buses come with boiler plate too, e.g. creating event classes Apr 05 19:27:36 gah, if i'm logging google analytic events from a service, do i need a separate tracker or is .setNonInteractive() enough ? Apr 05 19:27:54 CedricBeust: ok thanks! Apr 05 19:28:18 is it just me or nobody uses GA Apr 05 19:28:21 and the main deficiency of event buses compared to Rx is you can't compose your events. If you don't need to do that, event buses probably alright Apr 05 19:28:33 hi g00s Apr 05 19:28:37 hey gdrc Apr 05 19:28:55 g00s: I applied for passport, coming to america this summer, yes! Apr 05 19:29:44 better see all the nice land before its sold off http://www.nytimes.com/2015/04/02/opinion/our-land-up-for-grabs.html Apr 05 19:29:49 this country ... for the birds Apr 05 19:30:22 CedricBeust, i cant reproduce the problem cause i didnt have a 32 MB size heap phone. I had a samsung galaxy s4. Apr 05 19:30:54 codekK: I'm asking because when you use an emulator and something goes wrong, you never really know if it's the emulator or your code Apr 05 19:31:01 so I pretty much never use an emulat Apr 05 19:31:02 or Apr 05 19:31:38 and how can i test my app in most devices? :( Apr 05 19:31:50 I had to purchase a one device of each category? XD Apr 05 19:31:53 CedricBeust, but I guess you actually have a lowend phone for that usecase :) Apr 05 19:32:06 Mavrik: yeah usually 4-5 on my desk Apr 05 19:32:08 CedricBeust, codekK was here a few days ago, his app manages to burn through 32MB of heap with images :) Apr 05 19:32:18 yeah Apr 05 19:32:26 do you have a decent charger? :P Apr 05 19:33:17 me? Apr 05 19:34:27 codekK, nope, you should do a heap dump on OOM and see what exactly is using the memory Apr 05 19:34:57 codekK, maybe you'd be interested to learn about android:largeHeap, altho you shouldn't probably use it Apr 05 19:34:58 codekK, http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html Apr 05 19:35:04 * Mavrik slaps iprime. Apr 05 19:35:09 ;) Apr 05 19:35:13 seriously dude Apr 05 19:35:20 stop telling people to code crappy apps Apr 05 19:35:33 largeHeap just obscures the problem Apr 05 19:35:34 calm down Mavrik Apr 05 19:35:44 Mavrik, thanks i read about largeHeap and i test with it and same problem in emulator but thanks Apr 05 19:35:56 i will read about analysis memory, Thanks both iprime and Mavrik Apr 05 19:36:00 codekK, basically you do the heap dump Apr 05 19:36:08 yea largeheap is something they invented for no one to use Apr 05 19:36:16 codekK, and you'll see classes/objects in memory and should be pretty much quikcly obvious what's taking the memory Apr 05 19:36:18 its actually a bug marketed as a feature, you know? Apr 05 19:36:20 then it's just finding out where you hold them Apr 05 19:36:32 * Mavrik actually uses largeHeap. Apr 05 19:36:33 ;) Apr 05 19:36:41 haha Apr 05 19:36:43 ok Apr 05 19:36:43 ah but HE uses it KNOWINGLY Apr 05 19:36:50 unlike you, peasant Apr 05 19:36:51 will try to dump my oom Apr 05 19:36:53 * Odaym shakes head Apr 05 19:37:05 but yeah, having a larger heap by default wouldn't hurt though Apr 05 19:37:17 32MB of RAM is kinda low :/ Apr 05 19:37:39 codekK, what's the screen resolution of your emulator? Apr 05 19:37:54 and density Apr 05 19:37:55 try dealing with an image on S3 when its of the resolution 8M Apr 05 19:38:31 well at least we're out of the 16MB heap phase of 2.3 :) Apr 05 19:39:02 Hello! I'm successful in adding a JNI library to an android gradle project. However, when running tests, the JNI library is not available. How can I make a JNI library available for "gradle testDebug"? Apr 05 19:40:27 fvf, uhm, JNI libraries should always be packaged into your APK Apr 05 19:40:31 which includes tests. Apr 05 19:41:03 iprime, its a Nexus 6 with 1440x2560: 560dpi api 22 with x86 Apr 05 19:41:12 ahh Apr 05 19:41:13 woah... Apr 05 19:41:15 you're using unit tests Apr 05 19:41:25 Mavrik: yes, on the host, not in the emulator Apr 05 19:41:33 codekK, it's probably bitmaps then Apr 05 19:41:39 Mavrik: and I can compile the JNI library for the host Apr 05 19:41:45 fvf, do System.loadLibrary() with the path to the file? Apr 05 19:41:52 x86 of course. Apr 05 19:41:55 iprime, now im thinking so much resolution for a low memory heap??? Apr 05 19:42:10 codekK, exactly Apr 05 19:42:14 maybe in real devices didnt happens cause the low end devices have and lowest resolution? Apr 05 19:42:25 Mavrik: maybe adding an entry to the classpath for testing would be enough, but how do I do that? Apr 05 19:42:30 How do I make a TextView in my Toolbar use the same style as if it were a menu item in the ActionBar? Apr 05 19:42:31 i imagine an android 2 device to have 32mb heap Apr 05 19:42:36 hmm Apr 05 19:42:40 my min sdk its 15 Apr 05 19:42:40 fvf, classpath has notihng to do with it Apr 05 19:42:55 fvf, didn't you read what I said? Call loadLibrary with path to the .so file Apr 05 19:43:00 or .dll or wherever you are Apr 05 19:43:04 .dylib on mac Apr 05 19:43:10 ok, i meant device of a few years of age Apr 05 19:43:14 iprime, maybe devices > 4.0 have more than 32mb heap? i search about table comparission but i didnt found it with heap sizes Apr 05 19:43:37 fvf, you'll obviously have to compile library separately if you're on Mac or Windows because you can't load a Linux dynamic lib there Apr 05 19:43:39 Mavrik: yes, I did, but the code under test does System.loadLibrary("simplename"), not with a full path, and I'd like to keep the code pristine Apr 05 19:43:46 codekK, i think most popular devices would have at least 64 mb, it's usually 96 or above Apr 05 19:43:57 fvf, loadLibrary behaviour differs between Android and desktop Apr 05 19:44:02 fvf, so mock/handle that Apr 05 19:44:08 Mavrik: ah Apr 05 19:44:31 to let met relax... can you tell me that not to worry me? Apr 05 19:44:35 codekK, iprime, 512MB devices have 32MB heaps Apr 05 19:44:40 oh Apr 05 19:44:46 codekK, no, that should certanly worry you. Apr 05 19:44:56 normal app operation should not crash due to running out of memory Apr 05 19:44:57 i see this in iosched a lot, what does it do? : "overridePendingTransition(0, 0);" Apr 05 19:45:08 g00s, disables activity animation Apr 05 19:45:14 :$ Apr 05 19:45:22 Mavrik why would they want to do that ? Apr 05 19:45:23 g00s, so new activity pops up without any transition effect Apr 05 19:45:28 ok thanks Apr 05 19:45:31 g00s, that's how you fake animations Apr 05 19:46:05 g00s, you open new activity and then animate views inside it (e.g. for image zoom effects etc.) on APIs before 4.4 or whatsit Apr 05 19:46:12 there's a talk from Chet Haase that shows that trick Apr 05 19:46:24 thanks Mavrik Apr 05 19:46:27 Mavrik, that can't be true for all 512MB devices Apr 05 19:48:32 iprime, some have 48 Apr 05 19:48:43 but that's still rather immaterial if his app is leaking Apr 05 19:48:49 it's just going to crash a bit later Apr 05 19:48:57 yah Apr 05 19:49:17 there's also bunch of wierd stuff out there Apr 05 19:49:30 like 1280x800 tablets with 48MB heap (chinese crap) Apr 05 19:49:32 his app had an oom because of his emulator really Apr 05 19:49:46 possibly yes :) Apr 05 19:51:06 a 1440x2560: 560dpi device :) Apr 05 19:52:18 Does anyone know how I could make the TextView inside of a view use the same style as the menu in the ActionBar? http://i.imgur.com/qGYRtTG.png Apr 05 19:53:51 I've tried the following but it doesn't seem to do anything: http://hastebin.com/fadigasake.xml Apr 05 19:57:22 you mean the style of the title textview in a toolbar? Apr 05 19:57:54 Muchoz, are you trying to recreate the actionbar as a view? Apr 05 19:58:39 iprime, yes. Mavrik, it's actually a Spinner, I want the title to have a dropdown. Apr 05 19:59:18 Muchoz, for those cases, https://developer.android.com/reference/android/widget/Toolbar.html was created. Apr 05 19:59:37 and http://stackoverflow.com/questions/26510930/android-lollipop-add-popup-menu-from-title-in-toolbar Apr 05 19:59:41 Mavrik, if you were to look at the code, I'm using Toolbar. Apr 05 20:01:50 I want to add this(https://github.com/flavienlaurent/datetimepicker) library in android studio manually(not through gradle). So, I downloaded its zip file and followed the procedure to add a library to android studio and added the library part in the zip folder. But when I try to build the app I am getting errors in gradle. What am I doing wrong? Apr 05 20:06:09 Muchoz, if you're only interesting in styling you can look up the style of the title: http://hastebin.com/cunumicusu.pl Apr 05 20:06:14 interested* Apr 05 20:08:18 lahwran, anyway that is possible with Appcompat? Apr 05 20:08:25 iprime, sorry. I hate autocomplete Apr 05 20:10:26 hello, is there an ios-dev channel? Apr 05 20:10:41 paulo_, iphone-dev Apr 05 20:10:47 thanks Apr 05 20:11:01 paulo_, iphonedev, mb. Apr 05 20:11:41 is what possible Apr 05 20:11:45 I might be able to help Apr 05 20:12:23 lahwran, the usage of the style TextAppearance.Material.Widget.ActionBar.Title via Appcompat. Apr 05 20:12:40 oh Apr 05 20:12:49 I believe you just prefix appcompat Apr 05 20:13:13 Nope Apr 05 20:13:27 TextAppearance.AppCompat. Apr 05 20:13:41 Doesn't exist here Apr 05 20:13:51 that's all the ideas I had Apr 05 20:13:53 sorry Apr 05 20:14:11 lahwran, nvm. It's @style, not @android:style Apr 05 20:14:13 Thanks Apr 05 20:14:15 what's your minsdk? Apr 05 20:14:32 oh it's probably available in android 5+ Apr 05 20:15:30 It's looking great now ;) Apr 05 20:15:42 Exactly as it should, thank you lahwran and iprime. Apr 05 20:16:03 I just forgot Appcompat wasn't in @android:style. *Facepalm* Apr 05 20:17:22 Is there a method on activities that can let me know when a user has navigated away from it (anything that's not an orientation change, really)? Apr 05 20:17:44 Muchoz, great Apr 05 20:17:54 I believe so, ExPixel, moment Apr 05 20:18:09 ExPixel, onPause will be called when something else covers it and onStop when user navigates away or dialog is running over Apr 05 20:18:20 ExPixel, you mean when the focus changes? Apr 05 20:18:27 hm, no, on second thought it doesn't seem there are separate onPause versions for configuration changes vs something else taking focus Apr 05 20:18:41 Anything that doesn't include orientation change Apr 05 20:18:46 no. Apr 05 20:18:48 Since I want to show a notification while the user is away Apr 05 20:19:01 you could do something else though Apr 05 20:19:06 onPause, set a timer Apr 05 20:19:09 onResume, shut it off Apr 05 20:19:16 if the timer goes off, say "ok, the user isn't here anymore" Apr 05 20:19:29 that way you can set the timer to something higher, like five seconds Apr 05 20:19:29 you can of course also disable recreate on orientation change. Apr 05 20:19:50 I'll try disabling recreate first Apr 05 20:19:57 If that breaks anything I guess I'll just use a timer Apr 05 20:27:08 is there a way to automatically scale canvas? Like, my canvas is always 1280x720, then it just scales automatically to the device. Apr 05 20:34:43 paulo_: hmm? canvas just gets all space available to the view holding it Apr 05 20:35:09 what about the images I put on it? Apr 05 20:35:17 quick question.. I'm using an imageview with scaleType="centerCrop" for a full-screen background image. when I rotate landscape, I want the image to rotate as well. Instead, the image stays in the same orientation. How do I get it to do that? Apr 05 20:35:24 if I put a 100x100 image on it, will it also scale? Apr 05 20:35:29 icedp Apr 05 20:36:58 paulo_: https://developer.android.com/reference/android/graphics/Canvas.html#drawBitmap%28android.graphics.Bitmap,%20android.graphics.Rect,%20android.graphics.RectF,%20android.graphics.Paint%29 Apr 05 21:05:02 <_genuser_> holla ppl Apr 05 21:06:11 "holla" backwards is "alloh". Apr 05 21:06:33 holla Apr 05 21:08:36 short for hold on little asshole holla Apr 05 21:10:30 wut Apr 05 21:12:48 damn it, GAV4 Hitbuilders.Hitbuilder is private so you can't write a generic function that takes HitBuilders.HitBuilder Apr 05 21:13:30 and the winner is TacTacticalJoke Apr 05 21:15:27 Hi guys Apr 05 21:16:12 Need some help : I'm trying to set a entries list from a db Apr 05 21:16:31 But when creatings view, textviews are empty Apr 05 21:17:08 Pastbin : Apr 05 21:17:10 http://pastebin.com/kyx8JQn5 Apr 05 21:18:07 I don't see where i'm wrong Apr 05 21:18:22 * alien64 slaps ? with a / Apr 05 21:18:41 dear god, a layout in java. Been a while since I saw that stuff Apr 05 21:19:29 xDevol did you set breakpoints and see whether "item" actually contains the correct data? Apr 05 21:19:29 Yeah, that's not a thing of beauty. Apr 05 21:19:55 Yup, my toString method tell me that the item is correct Apr 05 21:19:57 <_genuser_> that's amateur level slapping! Apr 05 21:20:11 Plus the second textview is plain text Apr 05 21:20:11 <_genuser_> TacticalJoke: you still hanging around? Apr 05 21:21:10 o_o Apr 05 21:21:15 * Afzal slaps alien64 around a bit with a large trout Apr 05 21:21:19 Could say that. Apr 05 21:21:26 oh nice, an addon for Textual! Apr 05 21:22:07 <_genuser_> man, I left this machine running AS and now nothing is responding. it's just gotten to be a memory hog over time just by being loaded. Apr 05 21:22:34 Is that 1.1.0? Just curious. Apr 05 21:22:44 _genuser_, I feel you: https://i.imgur.com/lEiYz4z.png Apr 05 21:22:57 2.5GB for Android Studio Apr 05 21:23:18 Latest version Apr 05 21:23:28 _genuser_ yup, can verify. Memory usage goes over 1.5GB and java also keeps taking up memory and 200% cpu at times Apr 05 21:23:37 <_genuser_> yeah, I click over to it and it goes "kill now or wait for program to become responsive" Apr 05 21:23:48 just get 12gb of memory Apr 05 21:23:48 been happening either since I installed Kotlin or 1.2 dev Apr 05 21:23:50 It goes easy on my CPU here though. Apr 05 21:24:02 kotlin plugin that is Apr 05 21:24:02 mrfu, or just fix the memory hogging? Apr 05 21:24:19 Grr. Can't subclass Spinner and get AppCompat stuff. :[ Apr 05 21:24:20 the cpu tracker in android toolwindow takes 10% of my cpu Apr 05 21:24:24 <_genuser_> ok, good to know others are seeing this too. I have 8G RAM but this machine is sluggish. Apr 05 21:24:31 lets not get crazy Muchoz Apr 05 21:24:46 _genuser_ lol, i have 4G - thought i would be out in the clear with 8 guess not :( Apr 05 21:24:46 <_genuser_> with eclipse I was running eclipse, putty, 150tabs of chrome, ninjatrader, flstudio all at once, lol. Apr 05 21:24:52 i need to keep this macbook for another year >_< Apr 05 21:25:05 unless apple comes with something awesome this year Apr 05 21:25:17 <_genuser_> with AS, I just have AS, chrome, and ninjatrader. Altho, I could close ninatrader and it would be the same. oh and putty. Apr 05 21:25:25 I need to keep mine for 2 more years imo. Apr 05 21:25:29 what's ninjatrader Apr 05 21:25:32 Hi, I have this http://pastebin.com/zbRj9Efc and when I call it from another activity, I don't even get to see it running. From what I figure, a thread handles the EditText, and a separate one does InputActivity, thread that eventually gets to finish() and cleans up after itself. My question is, how should I properly handle the finish() ?I just have to return whatever the user entered to the caller activity (the one that calls InputA Apr 05 21:25:32 ctivity), but doing so from the onEditorAction seems like bad practice, and calling finish() from onCreate seems impossible without some funky busy waiting or some wait() call (which I couldn't find in the doc) / Apr 05 21:25:41 It's holding up well with 2 extra 1440 monitors Afzal Apr 05 21:26:03 Muchoz when did you buy it? I bought mine in mid 2012 :p Apr 05 21:26:18 Afzal, late 2013 Apr 05 21:26:28 <_genuser_> has anyone else noticed that AS is less efficient in recognizing devices plugged in. with eclipse it just stays on. with AS it makes me restart now and then if the device disconnects. Apr 05 21:26:30 * alien64 takes a look a round (©) (©) smells fishy around here looks at Afzal Apr 05 21:26:49 Removed the DVD drive, put a SSD for booting Apr 05 21:26:59 <_genuser_> that's the thing with macs. Apr 05 21:27:00 _genuser_, yes! It's a pain with connected devices via Wi-Fi. Apr 05 21:27:16 <_genuser_> you get a second mortgage on your house and the hw is substandard, barely able to run that day's technology. Apr 05 21:27:32 huh, this is a 2.5 year old laptop _genuser_ Apr 05 21:27:43 I devised a cool way to get around the annoyance of the Spinner onItemSelected thing firing when it's unwanted: http://pastebin.com/whJEDkhD Apr 05 21:27:49 it's still running pretty great honestly, it's lasted longer than any windows/unix laptop I've had Apr 05 21:27:49 <_genuser_> Muchoz: cool, as long as others see this, I won't feel that I'm running a botched up install. Apr 05 21:28:05 It'd be cool, though, if I could also subclass Spinner and replace all setSelection calls with calls that first suppress the next event. Apr 05 21:28:18 <_genuser_> Afzal: as long as it works for you. :) tho, my win laptops tend to run 5+ years. Apr 05 21:28:26 Guess I'll have to create Spinners.setSelectionQuietly or something Apr 05 21:28:53 yeah, for some reason, I have been unable to see that kind of life from mine and now it's too late to switch back :) Apr 05 21:29:45 <_genuser_> Afzal: I was on my sis-in-law's mac trying to help with something. I kept alt-tabbing, alt-d'ing, alt-spacing, and it would just do something else. I was so clueless on that machine. Apr 05 21:29:56 cmd+tab :p Apr 05 21:30:02 also, what laptop do you have? Apr 05 21:30:43 Any clue on my problem ? Apr 05 21:31:02 Does anyone know whether I can subclass Spinner and still get AppCompat tinting? Apr 05 21:31:22 <_genuser_> hp elitebook 8470p for work. samsung r540 personal (completely low spec machine just bought for trading futures). dell something or other single core. barely runs XP now. Apr 05 21:31:35 <_genuser_> Afzal: ^ Apr 05 21:31:37 xDevol side not, why are your views instantiated with application context? Apr 05 21:31:50 note* Apr 05 21:32:38 Because it need a context ? Apr 05 21:33:01 You mean i should use this ? Apr 05 21:34:20 for views, yes Apr 05 21:35:39 Thanks for the note Apr 05 21:35:44 and make sure to not leak them Apr 05 21:35:53 I changed it Apr 05 21:36:05 But the issue is still here Apr 05 21:36:21 http://stackoverflow.com/questions/5228160/what-exactly-does-using-the-application-context-mean/5228494#5228494 Apr 05 21:36:28 yeah of course, that's why it was a side note Apr 05 21:36:58 do a itemTitle.getText() and check what you see Apr 05 21:37:02 Sure but it's something Apr 05 21:38:19 Hmm, seems I can use this: https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/internal/widget/TintSpinner.java Apr 05 21:38:34 Although it says "internal", it also says "You should only need to manually use this class when writing custom views." Apr 05 21:39:00 Afzal hum the getText give me the correct text content Apr 05 21:39:14 Maybe it's a display problem on my textview then Apr 05 21:39:47 yeah, could be. It could also be that the views are not being added as expected Apr 05 21:40:27 I haven't worked with TableLayout Apr 05 21:41:28 Well I don't know Apr 05 21:41:33 How do i check it ? Apr 05 21:42:01 I started android dev 3 days ago, i'm really noob here Apr 05 21:42:44 Why are you using TableLayout then? Apr 05 21:42:48 do you really need it? Apr 05 21:43:39 whoa, you're adding a table layout for every item! Apr 05 21:43:44 no no no Apr 05 21:43:46 Pretty much looks like there should be a ListView there Apr 05 21:43:47 :) Apr 05 21:43:56 what he said ^^ Apr 05 21:44:18 I need a kind of list view but with two text, one aligned left and the other right Apr 05 21:44:31 okay, look into listView + array adapter Apr 05 21:44:42 you can have custom row layout for every row in the list view Apr 05 21:44:46 Table seemed to be useful but I can be wrong Apr 05 21:45:18 Well ok i'll look at it Apr 05 21:45:29 TableLayout is okay if the number of items is pre-determined but adding views like that is generally a bad idea Apr 05 21:45:55 I'm taking note Apr 05 21:46:47 xDevol here: http://www.vogella.com/tutorials/AndroidListView/article.html Apr 05 21:48:33 now, how bad of an idea is a recyclerView inside a recyclerview? :p Apr 05 21:48:48 a horizontal recyclerView inside a vertical one to be precise Apr 05 21:49:03 I don't really need a recyclerview though Apr 05 21:49:10 hello, how do I put rendered html onto a widget ? googling tells WebView cannot by used by a widget Apr 05 21:51:03 Afzal, probably not gonna work Apr 05 21:52:03 Mavrik need something like this: http://stackoverflow.com/questions/28214987/cursors-and-nested-recyclerviews Apr 05 21:52:21 but "Product" just needs to be a few buttons Apr 05 21:52:34 don't know how many buttons though Apr 05 21:52:45 could be 1, could be 5, could be 8 or 10 Apr 05 21:53:01 Hi, I have this http://pastebin.com/zbRj9Efc and when I call it from another activity, I don't even get to see it running. From what I figure, a thread handles the EditText, and a separate one does InputActivity, thread that eventually gets to finish() and cleans up after itself. My question is, how should I properly handle the finish() ?I just have to return whatever the user entered to the caller activity (the one that calls InputA Apr 05 21:53:01 ctivity), but doing so from the onEditorAction seems like bad practice, and calling finish() from onCreate seems impossible without some funky busy waiting or some wait() call (which I couldn't find in the doc) / Apr 05 21:53:04 anyone? Apr 05 21:53:19 HorizontalScrollView with addView? Apr 05 21:54:22 imv what are you calling from another activity? Apr 05 21:54:50 Afzal, hmm, try it with nested recyclerviews, but do watch out for issues with touch handling Apr 05 21:55:14 Mavrik that's fine since the original row is not supposed to be clickable as a whole :) Apr 05 21:55:26 Afzal, I'm starting InputActivity, with startActivityForResult Apr 05 21:55:59 imv okay, so you definitely need to call finish when the action is performed Apr 05 21:56:09 the code there will just finish your activity as soon as it's created Apr 05 21:56:24 and you need to call setResult to let the calling activity know what's up Apr 05 21:56:42 Afzal, yep, but I don't know what would be good practice, considering I need the user to type in some text and press send (pressing send should trigger a call to finish() ) Apr 05 21:57:06 so pressing send is being handled in onEditorAction, right? Apr 05 21:57:17 or are you confused about using onEditorAction altogether? Apr 05 21:57:26 Afzal, yes, but I'm trying to do this incrementally and just log stuff as I go through, so problems don't clobber up Apr 05 21:57:56 first all, remove that finish from the end of onCreate Apr 05 21:58:00 that does not help anyone Apr 05 21:58:25 Afzal, no, I looked up onEditorAction's doc online, no problem there. I'm just unsure where to put my finish() call. Putting it in onEditorAction (which would work) seems like bad practice Apr 05 21:58:34 lol Apr 05 21:58:36 Afzal, since I'm basically "returning" from the middle of the code Apr 05 21:58:43 From the middle of the code? Apr 05 21:58:49 That's an anonymous class. It's an inner class. Apr 05 21:58:57 TacticalJoke I think he means before the return call Apr 05 21:59:20 how do I put rendered html onto a widget ? googling tells WebView cannot by used by a widget Apr 05 21:59:31 a-russo then it's probably not allowed Apr 05 21:59:34 imv, uh, look Apr 05 21:59:36 that's a bad idea anyway Apr 05 21:59:38 Ahah way to go Apr 05 21:59:46 imv, if you want to finish from an editor action... you have to call finish there right? Apr 05 21:59:51 lol ^ Apr 05 21:59:52 :D Apr 05 21:59:53 Except that i have only the title in my listview Apr 05 22:00:08 xDevol custom row layout Apr 05 22:00:17 Afzal, yep, exactly. Is there some wait_for_imput or something I missed, in EditText ? Apr 05 22:00:21 And learn about ViewHolder while you're at it, it's necessary Apr 05 22:00:25 imv, also, finish() doesn't close activity immediately, it just schedules close on the main handler and afterwards activity will properly deconstruct Apr 05 22:00:47 Azfal : ok look at it Apr 05 22:00:59 Mavrik, yes. It would make sense to just call it before the return, but 1. it looks messy (since glancing the code, you don't really "see" the return getting called) and 2. it looks like bad program structure Apr 05 22:01:28 imv you can put a breakpoint on the return line and you'll see it get called Apr 05 22:01:29 Mavrik, you know any resource where I can read what exactly goes on in there ? Apr 05 22:01:39 imv: What looks messy is that anonymous class, IMO. Apr 05 22:01:42 imv, read about what exactly? Apr 05 22:01:43 imv http://developer.android.com/reference/android/widget/TextView.OnEditorActionListener.html#onEditorAction(android.widget.TextView, int, android.view.KeyEvent) Apr 05 22:01:52 Non-trivial methods within methods are ugly as sin. Apr 05 22:02:04 Mavrik, what's the call structure for finish(), I guess Apr 05 22:02:26 The return call determines if you consumed the action. If you finish the activity, the system honestly wouldn't care that you called finish before return Apr 05 22:04:52 Afzal, oh, so everything gets run, and the EditText is still technically listening, for a little bit more, until some entity knows I called finish() and switches back to the caller activity, passing along the way the Intent I was supposed to create as the "return value" ? Apr 05 22:05:43 imv no. The return value is not the return call from onEditorAction Apr 05 22:06:08 Afzal, the return value to the caller activity? No, it's an Intent I'll pass Apr 05 22:06:14 when you call finish, the activity is torn down and with it, the little EditText you have there Apr 05 22:06:29 so if the editText is gone, the system doesn't care that it returned true or false Apr 05 22:06:44 anyway, just set a breakpoint on the return line and see for yourself that it is called Apr 05 22:07:13 Quick question Apr 05 22:08:00 If not with array, how do i get two elements aligned horizontally, and each take 50% of the available space ? Apr 05 22:08:08 not with table* Apr 05 22:08:56 linear or relative, and set the weights Apr 05 22:09:09 yep, linear layout Apr 05 22:09:15 set width to 0, set weight to 1 Apr 05 22:09:24 and orientation horizontal of course Apr 05 22:09:26 xDevol LinearLayout, orientation horizontal, layout_weight = 1 Apr 05 22:09:28 Does anyone know what v7's SpinnerCompat is used for? Apr 05 22:09:30 not weight :p Apr 05 22:10:01 Thanks Apr 05 22:10:06 Afzal, I trust you that it's called, I just couldn't wrap around finish() not actually closing the current activity and going straight to caller, but it just letting whoever handles these things that the current activity is supposed to get killed, and the activity that invoked the current activity should be the main one running from now Apr 05 22:10:11 weights of the textview that is Apr 05 22:10:15 Afzal, this is what happens, right? just to be clear Apr 05 22:10:51 imv finish only does the first part Apr 05 22:11:36 calling startActivityFromResult means that the caller activity's onActivityResult is called to handle the result after the called activity is finished Apr 05 22:11:56 Afzal, sets some whatever THIS_ACTIVITY_WILL_DIE bit, right? And then the scheduler or whatever does the rest Apr 05 22:12:12 you need to read up on activity lifecycles Apr 05 22:12:27 TacticalJoke, actionbar/toolbar I guess Apr 05 22:12:31 no idea why they had to make it tho Apr 05 22:12:35 the commit log isn't useful Apr 05 22:12:49 Afzal, I really plan to, I only know the basics like onCreate/onReset and whatnot, started with the Android SDK a week ago Apr 05 22:13:31 Afzal, thanks for clearing stuff out, anyhow. Stuff makes more sense now Apr 05 22:14:00 SpinnerCompat is internal though, right? Apr 05 22:14:19 there's also TintSpinner Apr 05 22:14:20 lol Apr 05 22:14:29 Okay, thanks. Yeah, it's internal. Apr 05 22:14:50 Mavrik: Do you think it'd be crazy to subclass TintSpinner? It says 'internal' but the Javadoc seems to suggest it's okay. Apr 05 22:15:17 TacticalJoke "This will automatically be used when you use {@link android.widget.Spinner} in your Apr 05 22:15:17 * layouts. You should only need to manually use this class when writing custom views" Apr 05 22:15:23 Yeah. Apr 05 22:15:31 ah right, you quoted that some time ago lol Apr 05 22:15:32 my bad Apr 05 22:15:37 :D Apr 05 22:16:48 They're also public classes. Apr 05 22:17:00 I'm guessing they're gonna make them non-internal at some point, but the APIs might change for now. Apr 05 22:23:37 Wow, does IntelliJ disable "Missing @Override annotation" by default? Weird. Apr 05 22:24:00 Is the developer.android.com tutorial old? Because for example the part about action bars they use Theme.Holo but since android studio includes support libraries by default you can't use this theme unless you remove these support library dependencies Apr 05 22:24:20 Yeah, some of it needs to be updated. Apr 05 22:25:23 Is Theme.Holo still used? because everywhere I read you shouldnt remove these support libraries Apr 05 22:25:48 and thus it forces you to use appcompat Apr 05 22:26:01 You don't *have* to use AppCompat. And you can use Holo if you want to. Apr 05 22:26:26 not without removing the support libraries right? Apr 05 22:26:26 Everyone seems to be going material these days, though. Apr 05 22:27:33 It's technically possible to use Holo without "removing the support libraries". In any case, it doesn't matter: you don't have to keep the support libraries either. Apr 05 22:28:08 Where did you read that you shouldn't remove these support libraries? Apr 05 22:30:39 tffu: Use app compat if your minimum API is less than 114 Apr 05 22:30:39 I read it on stackoverflow somewhere (cant find it), but android studio isn't adding it by default for no reason right? Apr 05 22:30:43 tffu: Use app compat if your minimum API is less than 11 Apr 05 22:30:50 tffu: You don't need them. Apr 05 22:31:06 tffu: Number 4 on my keypad is next to my enter key on this laptop :) Apr 05 22:31:28 TacticalJoke: pew pew Apr 05 22:31:42 aaaah, why does gradle keep dying! Apr 05 22:31:48 android studio is still adding them eventhough my minsdk is 15, should I just not take android studio's decision for ules? Apr 05 22:31:54 rules* Apr 05 22:32:18 Use it if and only if you want a material look. Apr 05 22:32:40 tffu: I hate it when Android Studio does that. Apr 05 22:32:51 AppCompat v21 provides a material look on <21 devices (and of course doesn't prevent the material look on >=21 devices). Apr 05 22:33:06 tffu you want a material look Apr 05 22:33:08 yo do Apr 05 22:33:10 you* Apr 05 22:34:04 Holo is starting to look old now. Apr 05 22:34:41 TacticalJoke: what is a material look?? Apr 05 22:34:44 Mavrik it works!! clicks pass through nicely too Apr 05 22:35:22 phix: http://www.google.com/design/spec/material-design/introduction.html Apr 05 22:35:51 <3 Apr 05 22:36:02 https://www.dropbox.com/s/92nw24zic5tq26x/2015-04-05%2018.35.31.png?dl=0 <-- this is material design Apr 05 22:36:03 :P Apr 05 22:36:48 looks like stolen from Stronglifts app :( Apr 05 22:39:08 Those buttons though. ;o Apr 05 22:39:30 TacticalJoke no worries, they'll have their drawable Apr 05 22:40:19 first step -> make the whole UI. second step -> make it nice. Third step -> backend Apr 05 22:40:33 Well i managed to create my custom listview Apr 05 22:40:38 nice work! Apr 05 22:40:42 Thanks for the help :) Apr 05 22:42:40 what do you guys name your ViewHolders? :p Apr 05 22:43:34 For AdapterViews, I just use custom Views or custom ViewGroups, personally. Apr 05 22:45:07 Or, I guess, standard Views. Apr 05 22:45:39 dropbox :/ Apr 05 22:45:50 noob Apr 05 22:46:28 Afzal: wb Apr 05 22:46:48 Lol thanks, went away for less than a minute :p Apr 05 22:46:54 I dislike the original ViewHolder pattern (as described in the Android documentation). I think it's the epitome of how not to do OOP. Apr 05 22:47:34 Afzal: you were missed Apr 05 22:49:22 I actually realised one day that you can avoid ViewHolders and custom ViewGroups entirely in some AdapterView cases, simply by using ViewGroup.getChildAt. Though this isn't always a good solution. Apr 05 22:50:24 I'm surprised there isn't more (any?) discussion about this on Google. The original ViewHolder is way more painful than this. Apr 05 22:50:24 TacticalJoke: what void does viewholder fill? Apr 05 22:50:43 phix: I think the original intent was to avoid costly findViewById calls in Adapters. Apr 05 22:51:09 TacticalJoke: those are costly? Apr 05 22:51:14 Costly at the time, anyway (not sure how costly it would be on modern hardware). Apr 05 22:51:14 Yeah lol Apr 05 22:51:40 Given a large number of items in a list, they would be called a lot Apr 05 22:51:45 Especially while scrolling Apr 05 22:52:11 phix: The standard meme is to minimize findViewById calls in Adapter.getView overrides. Apr 05 22:52:21 Meme? :P Apr 05 22:52:47 A non-cat meme. :D Apr 05 22:52:58 A dank meme Apr 05 22:53:05 TacticalJoke: heh, is that meme right next to all your base are belong to us? Apr 05 22:53:52 and does it haz cheezburger Apr 05 22:55:20 I guess the term 'meme' has evolved significantly in recent years. Which is kinda appropriate, given its original definition. :D Apr 05 22:55:30 ") Apr 05 22:55:44 Or maybe the new sense is just a subset of the original sense. Apr 05 22:55:52 perhaps Apr 05 22:56:18 as long as the cake is not a lie i don't care Apr 05 22:56:43 Can you set margin in listview row ? I gived it a background a radius corner Apr 05 22:57:50 Or you have to create a sub layout and set margin to it ? Apr 05 22:58:14 You can use margins, yeah. Apr 05 22:58:17 Or padding. Apr 05 22:58:28 Just declare such a thing in your row layout. Apr 05 22:58:33 I set a marginbottom Apr 05 22:58:44 but they are tailgated Apr 05 22:58:54 Did you set it on the root element in your layout? Apr 05 23:00:24 Yeah Apr 05 23:00:56 Hmm, I don't think that'd work. I think you'd have to set padding on the root element or padding/margin on a child element. Apr 05 23:02:23 looks like our backend guys have settled on using MongoDB to create our services Apr 05 23:02:29 that should play nice with android right? Apr 05 23:03:02 Ok i got it, putting another linearlayout in main linearlayout and give it margin Apr 05 23:03:15 Not a bad practice 2 nested linearlayout ? Apr 05 23:04:12 With ListViews, you generally want to avoid nesting as much as possible, but it probably doesn't matter much in practice. Apr 05 23:04:17 Post the layout if you want more feedback. :) Apr 05 23:05:52 here you go http://pastebin.com/rbuuhzhH Apr 05 23:06:28 Just use paddingTop/Bottom on the outer one. Apr 05 23:06:30 stackoverflow timing out for anyone else? Apr 05 23:06:32 And remove the inner LinearLayout. Apr 05 23:06:36 I'm really struggling to code without it Apr 05 23:06:41 Working here, duncannz. Apr 05 23:06:49 TacticalJoke: ok Apr 05 23:07:02 But the drawable background is a background color and radius corner Apr 05 23:07:28 if I do that there is no space between listview childs Apr 05 23:08:46 You want a space between the background thing? Ah. Apr 05 23:10:30 yeah, like this Apr 05 23:10:30 http://imgur.com/etwKT37 Apr 05 23:11:04 I see. Apr 05 23:11:21 Are you doing efficient stuff in getView? Apr 05 23:12:01 Not much Apr 05 23:12:19 I'm guessing not because your LinearLayouts don't have IDs. :D Apr 05 23:12:44 Why should they have one ? Apr 05 23:13:03 Actually, scratch that. They don't really need them. Apr 05 23:13:10 What does it look like? Just curious. Apr 05 23:13:20 margin in the outer layout doesn't work? Apr 05 23:13:47 You mean what is the app ? Apr 05 23:13:54 I mean getView. Apr 05 23:14:48 The arrayadapter class is this type : ArrayAdapter Apr 05 23:15:17 ActivityItem are models from a db, and getView just set two string from item in textviews Apr 05 23:15:55 Nothing more from now but i'm just starting it Apr 05 23:26:27 Is the new As 1.2 buggy for anyone? specificalyl losing your gradle info (or so it appears) Apr 05 23:30:17 so i want a notification to fire once a day. Should i build it in the main method? Apr 05 23:32:27 irssi mustard rice Apr 05 23:32:36 oopsie wrong channel Apr 05 23:32:43 which is ironic because irssi messed me up Apr 05 23:40:48 anyone know if there's an irc room for the coursera android class? Apr 05 23:41:16 sohrab: fuck that coursee Apr 05 23:41:47 sohrab: nah Apr 05 23:42:02 DadFoundMy other recommendations? Apr 05 23:42:27 just grab the Busy Coder's Guide Apr 05 23:42:29 sohrab: i tried the course and got no where. I read the first 50 pages and Big Nerd Ranch's book, and just started coding. it worked out reallly well Apr 05 23:42:32 I want to prompt for confirmation when the rating on a RatingBar is changed and if the user says no revert to the old star count. I've got this so far: http://dpaste.com/3E3GE7X what should I put where I've got // TODO Revert rating ? Apr 05 23:42:38 mrfu: that ones good too Apr 05 23:42:44 O Apr 05 23:42:44 but big Apr 05 23:43:07 Big Nerd Ranch update is coming in August Apr 05 23:43:21 sohrab: i rememeber having to put in several hours of work a week for the coursera and didnt learn anything, while reading those 50 pages took me like 5 hours Apr 05 23:43:25 if that Apr 05 23:43:41 Busy Coder's just dropped in March so I'll defer to that till then Apr 05 23:43:41 mrfu: really?? i just bought mine a couple months ago :D Apr 05 23:43:51 the course uses eclipse, and i keep getting errors b/c i'm using android studio >:O Apr 05 23:43:57 mrfu: dont you get old versions of the bcc for free? Apr 05 23:44:01 Yea Apr 05 23:44:05 sohrab: another thing i didnt like about it Apr 05 23:44:08 but the new one includes 5.0 and android studio Apr 05 23:44:28 well worth the money imo Apr 05 23:44:40 oh thats cool. i didnt even finish bnr, i found after the first couple chapters i knew the basics and could just start coding Apr 05 23:44:45 it goes through using retrofit and gson as well Apr 05 23:44:48 after that i could just stackoverflow anything i needed Apr 05 23:45:01 mrfu: it goes through gson? thats pretty interesting Apr 05 23:45:10 sohrab: Udacity since the course is official Apr 05 23:45:21 i use gson in my project and barely understand it :D Apr 05 23:45:23 sohrab: (meaning with collaboration from Google) Apr 05 23:45:29 Is reading books really needed? I just followed the first Android guide and then started writing code. Apr 05 23:45:34 ive heard great things about udacity Apr 05 23:45:46 TacticalJoke: i find a book more organized Apr 05 23:45:49 hm, does everyone dislike the coursear course? Apr 05 23:45:51 TacticalJoke: I do both Apr 05 23:46:00 mrfu: same i do both Apr 05 23:46:07 I have my own homebrew project and then my stuff that works along with the book Apr 05 23:46:20 icedp, hm, cool Apr 05 23:46:51 the one thing i will say about books are that you pick up the authors habits, for good or for bad Apr 05 23:47:27 for example bnr uses ArrayAdapters, but i am now realizing BaseAdapters would be much better in most situations Apr 05 23:48:17 sohrab: I've taken it even I did write Android apps before, but I must say I still learned lots of nuances Apr 05 23:48:24 yea, nothing is perfect. If you take it for what it is then it is helpful Apr 05 23:48:34 Almost everything I've learned about Android has been from trying, googling, asking in here, and reading the source. Apr 05 23:48:35 an EPCOT tour of android Apr 05 23:48:57 I will agree that most of what I've learned is trial and error Apr 05 23:49:20 and I forsee many errors in the future...haha Apr 05 23:49:28 when i was first starting i had a lot of trouble with having things "click". Like i didnt understand why i had to do findViewById() and stuff like that Apr 05 23:49:36 once the basics clicked i just jumped right in Apr 05 23:50:02 basics.setClickable(true); Apr 05 23:50:02 Google outline https://www.mysliderule.com/learning-paths/android/learn/ sohrab Apr 05 23:50:09 s//good)) Apr 05 23:50:43 thanks. hm, gotta reorganize my learning plan Apr 05 23:51:25 the most important thing is to not worry about writing shitty code at the start Apr 05 23:51:58 don't get into analysis paralysis and never code Apr 05 23:53:24 writing shitty code is my forte ;) Apr 05 23:54:29 sohrab: i think the key to whatever method you choose is to have a seperate, but similar, project from the tutorial's project where you implemet the things you learned Apr 05 23:54:35 btw new (more advanced) course has opened Android Performance https://www.udacity.com/course/ud825 Apr 05 23:54:55 sohrab: also keep in mind thats there probably a method to do whatever your trying to do already :D Apr 05 23:56:14 im having a lot of trouble with this notification shit :/ someone helpp Apr 05 23:56:56 any suggestions for a first app? Apr 05 23:57:35 sohrab: i always hear the recomendation of finding a open source app and trying to remake it your own way Apr 05 23:57:53 ah that's a good idea Apr 06 00:04:23 this is fascinating http://ipfs.io/ Apr 06 00:05:12 sphrab and you can always decompile someone else app Apr 06 00:07:10 this udacity class seems pretty cool Apr 06 00:07:16 lasserix, oof, idk how to do that Apr 06 00:07:41 g00s it seems inevitable but as a complement to centralized cloud Apr 06 00:09:42 does anyone have any idea how yo contact appfour or the AIDE team? I've been posting this up, just about everywhere I can find, as well as emailing it to them: https://plus.google.com/101949226302105455024/posts/3H5tC5XjdKc Apr 06 00:10:49 i have my notification created in onCreate() and it is set to repeat ever week using AlarmManager. Will it run even if the app isnt opened? Apr 06 00:10:57 or if it is opened and then force stoped? Apr 06 00:13:56 So am I unable to use a PreferenceFragment like prefFrag.newInstance() ? Apr 06 00:15:36 because I get an error saying it cannot convert it to a Fragment Apr 06 00:16:11 drinfernoo i can't believe anyone would use AIDE except for some cute intellectual experiment Apr 06 00:20:48 g00s do you see any practical application of such a protocol? Apr 06 00:25:40 lasserix it looks like it could be more resistant to censorship because the material is distributed Apr 06 00:25:46 but i dont know Apr 06 00:26:51 seems kinda like gnunet Apr 06 00:28:35 g00s it looks interesting Apr 06 00:28:47 watching the second video now Apr 06 00:40:47 I'm not seeing any discussion on it on reddit, aside from on bitcoin post Apr 06 00:45:49 interesting, seems like Play updates do update rankings Apr 06 00:46:12 This is a noob question, but I have an activity with a v7 toolbar. I added getSupportActionBar().setDisplayHomeAsUpEnabled(true). Then I added an onBackPressed(). Now, how do I get it to go back to the previous activity? Apr 06 00:46:13 or impact rankings, rather. Optimally once a week O.o Apr 06 00:46:36 toastcfh: you added onBackPressed? Apr 06 00:46:42 you mean you override it in the activity? Apr 06 00:46:56 i think you need to set the onclicklistener and then do finish() Apr 06 00:47:07 lasserix: wrong t0astt xD I think I figured it out tho Apr 06 00:49:28 lasserix: Actually nvm, overriding the onBackPressed() is not what I want Apr 06 00:49:37 yeah Apr 06 00:49:50 you just want to setOnCLickNavigationItem or whatever that method is Apr 06 00:49:53 I want the arrow at the top left of the toolbar to go back to the previous activity Apr 06 00:50:26 setNavigationOnClickListener Apr 06 00:50:44 setNavigationOnClickListener(new View.OnClickListener() { public void onClick() { finish(); } }); Apr 06 00:50:56 Isn't it onOptionsItemSelected when using setSupportActionBar? Apr 06 00:51:29 thats for menu items Apr 06 00:52:07 lasserix: so is it just toolbar.setOnClickNavigationItem etc etc? Apr 06 00:52:13 yeah Apr 06 00:52:19 the arrow is your navigation item Apr 06 00:52:25 or it should be Apr 06 00:52:37 Maybe setNavigationOnClickListener( () -> onBackPressed() ) ? Apr 06 00:52:48 lasserix: It's not just for menu items. Apr 06 00:52:57 we'll find out in a sec Apr 06 00:53:08 yep Apr 06 00:53:11 lasserix was right Apr 06 00:53:13 it works Apr 06 00:53:15 thanks man Apr 06 00:53:19 http://pastebin.com/GK0h1YTm Apr 06 00:53:33 you should use Apr 06 00:53:41 Android Drawable Importer plugin Apr 06 00:56:08 Ergh, now my whole app just closes instead of going to the previous activity :P Apr 06 00:56:22 fixed :P Apr 06 00:56:28 lasserix: Did you really forget about onOptionsItemSelected? :p It wasn't so long that we were using ActionBar. Apr 06 00:56:41 hello guys Apr 06 00:57:08 On a side note, I don't see the point of using setSupportActionBar in general. As far as I remember, the one and only thing that gives you is the parentActivityName thing. Apr 06 00:57:13 can someone tell me, how can I hide ALL I/QuietModeInfo( 1939): [startNotification] init those notifications? (from QuietHours in 4.4.2) Apr 06 00:57:37 I mean, all notifications from QuietMode... they are annoying Apr 06 00:58:23 http://wklej.org/id/1680823/ logcat from QuickMode Apr 06 01:19:39 Hello. It seems that while my app is safely "minimized" on home press, and can be restored, if I press back and run it from launcher icon it is run from scratch. How do I fix it? Apr 06 01:20:13 creitve: Why is that a problem? That's how Android works. Apr 06 01:20:31 (Activities are destroyed on Back presses.) Apr 06 01:24:57 Note that your app's process won't be killed in most cases. It's just that the launcher activity will be destroyed. Apr 06 01:27:15 please help me Apr 06 01:27:29 I'm modifying the master-detail sample project Apr 06 01:27:46 TacticalJoke: I see. So if at some point I made it that my launcher activity is a splashscreen activity, the app will launch splash every time it is "closed" with back press? Apr 06 01:27:47 this ProgressBar stays behind my layout and never goes away: Apr 06 01:27:48 creitve: you probably don't want it as TacticalJoke mentioned, but if you do for some reason, look into launchMode = singleTop Apr 06 01:27:49 http://i.stack.imgur.com/SuGXK.png Apr 06 01:28:55 icedp thanks, but I think I'll stick to the advice Apr 06 01:29:11 TacticalJoke: I mean, when it is restarted after that Apr 06 01:29:13 icedp: Wouldn't that make no difference here? Apr 06 01:30:07 creitve: on second guess it won't help with backpress either way. TacticalJoke yeah, true Apr 06 01:30:23 Hey guys, im trying to change the status bar color of my application, so far Ive tried making the status bar transparent and changing the window background, but that is not ideal Apr 06 01:30:42 Ive also tried android:statusBarColor but that does not seem to work Apr 06 01:30:48 Whats the best way? Apr 06 01:31:59 creitve: Yeah, it'll launch the launcher activity every time. Apr 06 01:32:06 drose379: Isn't that 21+ only? Apr 06 01:32:19 I have kitkat and I saw an app I downloaded does it Apr 06 01:32:27 JFlash: you need to progressbar.setVisibility(View.INVISIBLE) to hide it Apr 06 01:32:31 So I was like oh.. shit, so now im on the hunt for how they did it Apr 06 01:33:13 drose379: which app does it on kitkat? Apr 06 01:33:27 A sms replacement app Apr 06 01:33:29 Textra Apr 06 01:33:48 Maybe it's this? http://stackoverflow.com/questions/20578780/taking-advantage-of-the-translucent-status-bar-in-android-4-4-kitkat Apr 06 01:34:34 So with that, you make the status bar translucent, and then the status bar takes the color of the activity background color Apr 06 01:34:51 So if I want the activity background color to be white, the status bar would be white, which I dont want Apr 06 01:34:58 I wanna keep it the same color throughout Apr 06 01:37:43 TacticalJoke: icedp: so I just made a splashShown flag in my app singleton, that skips splash if app is re-run after backpress. Is that a valid solution and not an ugly workaround? Apr 06 01:38:22 icedp, thanks but I don't even know why it's there Apr 06 01:38:29 icedp, or find a reference to it Apr 06 01:38:46 icedp, it's not referenced in any of the layout xmls Apr 06 01:38:48 Why do you have a splash screen? Apr 06 01:39:31 I need to show it every time when app is launched Apr 06 01:39:47 Ive heard that users hate that Apr 06 01:39:56 but not too often Apr 06 01:40:11 what does your app do when the user first opens it Apr 06 01:40:21 Like what is the screen they see after the splash Apr 06 01:40:31 social Updates list Apr 06 01:40:38 Does that need to load? Apr 06 01:41:00 I mean, does it take a few seconds for the app to pull that data? Apr 06 01:41:45 Yes. I had them run simultaneously, with splash overlaying, but it was causing weird race-condition fatal that nobody around me could debug properly Apr 06 01:42:39 Ok, so what I have instead of a splash screen is just the logo of my application (not really a logo, just text, but could be a logo) and a little loading animation show while the app is pulling the data, then dissapear and the list is populated as soon as the data is ready Apr 06 01:43:10 So sometimes it takes less then a second, sometimes a few seconds, but the point is that you get to show your logo and branding, but it is not getting in the users way Apr 06 01:43:16 creitve: assuming you need splashscreen try calling method to show it in onCreate() Apr 06 01:43:18 Because they know that the app is pulling necessary data Apr 06 01:44:43 Thanks, but I think it is too late to change that much for me at the moment. However TacticalJoke got me thinking about if I really need to hide splash. I think I'll remove that "fix" for now Apr 06 01:45:00 Thanks all of you! Apr 06 01:46:36 Generally it'd be best to forget the splash screen and just show a progress bar. Apr 06 01:47:04 Why would "Theme.AppCompat.Light.NoActionBar.TranslucentDecor" Apr 06 01:47:11 Give me cannot be found Apr 06 01:48:42 TacticalJoke: If only it was my choice :-) Apr 06 01:49:51 Is there a way I can change the contant value of android:windowTranslucentStatus Apr 06 01:51:41 Does that make sense Apr 06 01:54:00 aha!! Apr 06 01:54:08 check this out, found this on google: Apr 06 01:54:13 " In particular, this is currently the only way to have the built-in indeterminant progress state be shown." Apr 06 01:54:43 so appearently this comes when your fragment is inheriting list fragment or something Apr 06 01:54:45 bingo!! Apr 06 01:56:26 guys you need to help me! Apr 06 01:56:42 I don't wanna inherit from ListFragment! Apr 06 01:56:57 because that uses the old android list right Apr 06 01:57:08 the list I'm using is a RecyclerList Apr 06 01:57:17 what kind of fragment should I use Apr 06 01:58:53 wtf android studio scrambles my letters when i type :O Apr 06 01:59:14 sohrab, u drunk? Apr 06 01:59:14 lol Apr 06 01:59:31 i thought i might be Apr 06 01:59:44 i drink when I code too buddy Apr 06 01:59:55 I feel your pain Apr 06 01:59:58 i have 6gb of ram, dunno what the problem is Apr 06 02:00:15 maybe i should switch to oracle's jdk instead of openjdk Apr 06 02:03:10 i guess nobody else has encountered this? Apr 06 02:03:41 it's as if my keyboard is remapped or smoething Apr 06 02:03:45 i ve only been using studio for 2 weeks Apr 06 02:03:54 crashes some times but rarely Apr 06 02:03:59 also using openjdk Apr 06 02:04:10 havent notice scrabling , no Apr 06 02:04:26 k, hmmm Apr 06 02:08:22 uh, anyone use google tag manager? does this replace google analytics? Apr 06 02:08:36 * g00s super confused, description counched in supervague marketing speak Apr 06 02:22:51 Sooo what is the "best"/proper way to get clicks on preferences in a PreferenceFragment? I'm reading tons of different ways to do it... Apr 06 02:23:04 do you guys also getting Fatal Exception: android.view.InflateException ? Dont know I got reports from crashlytics on this Apr 06 02:23:09 like 300 users? Apr 06 02:24:37 gordon_ oh my , crashylytics isn't giving enough context though? Apr 06 02:25:47 only that one I pasted here Apr 06 02:26:21 I understand if it would occur every time but daily for like 160 people ? Apr 06 02:28:16 the exception doesn't give any hint on the resource ? Apr 06 02:28:51 i wonder if you are using something like list_item_simple or whatnot and its missing on a few platforms Apr 06 02:29:25 no, it's custom adapter with custom layout Apr 06 02:30:00 it's pointing right to the inflate line view = LayoutInflater.from(context).inflate(R.layout.item_summary, parent, false); Apr 06 02:40:10 huh, GTM is pretty cool, i wonder why nobody ever mentions it here Apr 06 02:40:17 its also not new Apr 06 02:40:43 maybe i wasn't the only one - when first hearing about it - thought wut O.o Apr 06 02:48:33 ah interesting, so you push events to tag manager and then have a rule & tag make the analytics call Apr 06 02:48:50 so there is no need for explicit GA apis stuff then in the app Apr 06 02:54:42 Best way to get a context for a dialog from within a fragment? **** ENDING LOGGING AT Mon Apr 06 02:59:58 2015