**** BEGIN LOGGING AT Tue Mar 03 02:59:58 2015 Mar 03 03:00:46 Also, in the mean time, while I'm researching that, I have my CAB Mar 03 03:01:00 And I want it to overlay the action bar, not push everything down Mar 03 03:01:04 shafox: I'm not 100% percent sure if an elements id can be the same as a string is, but if it's also happening to the edit_message string it is probably an issue with the folders Mar 03 03:01:18 And my styles.xml has true in it, but it didn't work Mar 03 03:01:32 shafox: have you tried refreshing/cleaning the folder? Mar 03 03:01:59 question about async Mar 03 03:02:07 TechGeek01: How are you invoking the contextual action mode? Mar 03 03:02:08 Im out, talk to you guys later Mar 03 03:03:37 if I'm using palette to set colors on a view, something like is described here: http://jakewharton.com/coercing-picasso-to-play-with-palette/, but I don't want to create a new callback every for every view, how can I retrieve the colors is gets in an async way? Mar 03 03:03:56 DadFoundMy: refreshed but still getting the error Mar 03 03:04:08 match_list = (ListView)findViewById(R.id.match_list); Mar 03 03:04:14 ArrayList itemList = new ArrayList<>(); Mar 03 03:04:20 listAdapter = new ArrayAdapter<>(this, R.layout.match_list_rows, itemList); Mar 03 03:04:30 Just the "startActionMode" line. Mar 03 03:04:52 SavedMatchActivity.this.startActionMode(SavedMatchActivity.this); Mar 03 03:04:59 shafox: i find that to be pretty wierd. your sure the strings.xml is in the same res folder as your layouts? Mar 03 03:05:06 I'm not sure whether it'll work, but try "toolbar.startActionMode(...);" Mar 03 03:05:12 I think you said you're using Toolbar. Mar 03 03:05:37 DadFoundMy: created the project using intellij create gradlr android project Mar 03 03:05:41 TacticalJoke: eww match_list is the name of your ListView object in the java code? Mar 03 03:06:22 shafox: maybe someone with more experience with Android Studio could help you out, i still use eclipse Mar 03 03:06:26 And the dir is res/values/strings.xmland res/layout/activity_main.xml Mar 03 03:06:56 TacticalJoke: Nope Mar 03 03:07:06 DadFoundMy: I guess you meant TechGeek01. Mar 03 03:07:18 TacticalJoke: yeah i do sorry Mar 03 03:07:23 TechGeek01: Is windowActionModeOverlay set in your app's theme? Mar 03 03:07:39 TechGeek01: why don't you use camelCase? Mar 03 03:07:46 Using Theme.AppCompat.Light Mar 03 03:08:04 TechGeek01: Can you paste styles.xml? Mar 03 03:08:15 DadFoundMy: I usually do, but it looks out of place Mar 03 03:08:36 Mar 03 03:10:06 Can child views draw in parent padding? Hunch is very affirmative Yes Mar 03 03:10:32 TechGeek01: Are you sure you're using "AppTheme"? Mar 03 03:10:45 In AndroidManifest.xml. Mar 03 03:11:41 shafox: I would try Build > Rebuild Project. I can't see anything wrong there. Mar 03 03:11:56 Under the whole application, android:theme="@style/AppTheme" Mar 03 03:13:06 TechGeek01: Hmm, are you sure you tried toolbar.startActionMode? Mar 03 03:14:09 Just "findViewById(R.id.whatever_toolbar).startActionMode(...);". Mar 03 03:14:27 Toolbar.startActionMode yields "Non-static method cannot be referenced from a static context" Mar 03 03:15:08 Java 101. Mar 03 03:15:54 I wasn't using Toobar, though Mar 03 03:16:12 I originally had SavedMatchActivity.startActionMode Mar 03 03:16:40 TechGeek01: That's why I'm saying "try calling startActionMode on the Toolbar instance". Mar 03 03:16:53 I haven't tested this, but AFAIK this is necessary to solve your issue. Mar 03 03:17:21 The toolbar instance being the element used as the toolbar? Mar 03 03:17:30 findViewById(R.id.whatever_toolbar).startActionMode(...); Mar 03 03:18:29 It's just called from a menu file. There is no associated R.id for it Mar 03 03:18:36 could android support a 3d mmorpg? Mar 03 03:18:59 Unless you're referring to the match_list ListView Mar 03 03:19:28 is it robust enough to handle 3d graphics, networking, chat and some physics? Mar 03 03:19:49 specifically on an android tv device Mar 03 03:19:58 AHA! Mar 03 03:20:56 The walkthrough I got help from had ActivityName.startActionMode Mar 03 03:21:03 But it's all good now Mar 03 03:23:11 I think I addressed that about four times. :p Mar 03 03:24:39 :P. Your whatever_toolbar was confusing my tired-because-it's-late mind. Lol Mar 03 03:24:57 Storyteller saw this today http://www.theverge.com/2015/3/2/8135723/android-tv-turn-phones-into-game-controllers Mar 03 03:27:13 very cool g00s Mar 03 03:27:26 wasnt I saying something about that a couple days ago? Mar 03 03:27:43 i think so. i'm not into gaming Mar 03 03:27:56 dont have android TV, dont have android watch Mar 03 03:28:15 you go to a friends house and the games are just 'on the TV', tied to an account, not a console, and everyone pulls out their phone and the phone becomes a controller? Mar 03 03:28:24 TacticalJoke: will try that Mar 03 03:28:37 I have an android phone, I am getting an android tv in a month or so Mar 03 03:28:49 Im building my own smartwatch Mar 03 03:29:05 chronos 430 Mar 03 03:31:47 TacticalJoke: This should create a file if one doesn't exist when myFile.close() is called, right? I keep getting FileNotFoundExceptions when I run it. http://pastebin.com/XeuQ9mUk Mar 03 03:33:40 Yes, it should. Mar 03 03:34:33 Oh. Mar 03 03:34:35 I'm looking for inspiration on how to best layout a series of key/values in a Material style layout. Does anyone have any websites/suggestions? Mar 03 03:34:41 You're not saying "new FileOutputStream(file)". Mar 03 03:37:12 Mittendeep: BTW, your code is crying out to be simplified here. Mar 03 03:38:13 See where you say "new Treasure(...)" at the bottom? The code is screaming this at me: "Treasure treasure = new Treasure(...); treasure.writeToDisk(file);". Mar 03 03:38:48 The optimal design might be even better (because you have a whole list of these things), but it's hard to say just from that snippet. Mar 03 03:39:54 Mittendeep: In other words, the Treasure class looks like it should stop being lazy and start writing its *own* state to disk. Mar 03 03:42:14 Here is how someone else approached the writing the xml file to the disk and appending to it: http://stackoverflow.com/questions/15072921/how-do-i-make-this-code-output-a-second-node Mar 03 03:46:48 yes, android has a bunch of MMORPGs! Mar 03 03:46:56 some are actually pretty decent Mar 03 03:47:09 hey all. I'm interacting with MediaCodec. Does anyone know any solid projects that do MediaCodec stuff that ISNT Grafika ? Mar 03 03:51:07 Mittendeep: Your activity is dealing with writing Treasure state to disk. That's a sign that the design isn't quite right -- GUI things such as activities shouldn't know anything about disk access. Also, I'm guessing your Treasure class has state with zero behaviour (another sign). Still, it's your code; just making suggestions. :) Mar 03 03:52:06 (That's not to say that data-only classes are always bad. They're just bad quite often.) Mar 03 03:56:36 hello, I an trying to use a MediaPlayer to listen to a MP3 stream, but get silence. code: http://pastebin.com/V9pjPufP Mar 03 04:00:08 groxx still around Mar 03 04:00:23 somewhat Mar 03 04:00:51 wonder what you think of this. so i have this bluetooth device which has a few internal registers for settings Mar 03 04:01:26 not sure what to do (1) only allow setting these when the device is connected. so if user changes setting, it just gets saved to the device -or- Mar 03 04:01:51 let the user change settings anytime (even if not connected). cache those on the phone until connecting to the device, and then sync Mar 03 04:03:29 so few things allow "offline" changing of settings, personally I'd say just when it's connected. obviously I would *like* it all the time... Mar 03 04:03:53 but that also avoids the problems when people don't understand that X has to be connected before it'll be updated. Mar 03 04:04:28 "you must connect X to change its settings" is a pretty straightforward requirement, and it can't be forgotten Mar 03 04:05:02 ok, thanks ! Mar 03 04:06:02 (I'm happy to debate, you may even convince me otherwise!) Mar 03 04:06:37 i'm actually using the regular Preference stuff for these things, which typically persist to SavedPreferences Mar 03 04:06:57 its actually kinda hard making these things work in a disconnected / async way Mar 03 04:07:12 not sure whats harder, syncing or making them async Mar 03 04:07:32 but from UX perspective - i guess that should be the #1 reason, whats best for UX Mar 03 04:07:51 ha, yeah, sync is hard :) Mar 03 04:08:01 i suppose somebody could change a setting, not realize that they are disconnected Mar 03 04:08:10 and think things are hunk dory Mar 03 04:08:56 yeah. that's my main thought there. forcing it to be connected reinforces that they're not always magically up to date (for good or bad) Mar 03 04:09:55 ok, so online required to edit settings. thanks Mar 03 04:10:38 work has driven me towards a "don't confuse people" and "prevent mistakes by design" approach whenever possible. for most cases, it seems like the right approach. power users often disagree though :) Mar 03 04:11:22 hello, I an trying to use a MediaPlayer to listen to a MP3 stream, but get silence. code: http://pastebin.com/V9pjPufP Mar 03 04:12:01 there are a lot of really high quality android games... Mar 03 04:12:18 and lots of really poor android game devs :) Mar 03 04:12:26 I think android tv is just a no-brainer, bringing that potential to a more friendly format Mar 03 04:12:38 i knew a pretty sharp guy that decided console games was where it was at, after 5 years of mobile Mar 03 04:12:39 yeah, I dont get that Mar 03 04:13:03 console games are great Mar 03 04:13:10 if you can break into the market Mar 03 04:13:25 but why are some many android game devs broke? Mar 03 04:13:29 Storyteller its very hard for indy devs to get noticed now in game genre Mar 03 04:13:45 so many games - very saturated Mar 03 04:13:52 steam seems to be working better than most, and it's still hard Mar 03 04:13:55 you have to pay quite a bit to get noticed unless you get lucky Mar 03 04:13:56 why? there are tons of indie games that get great sales Mar 03 04:14:05 well, yeah, its marketing Mar 03 04:14:24 1/2 your budget should go to marketing Mar 03 04:14:42 basically, whatever you spend on code art and music, spend that much on marketing Mar 03 04:14:43 also, with android TV - realistically how many people will buy these - so it could be a very small market Mar 03 04:15:00 I think a lot of people are buying set top boxes Mar 03 04:15:04 yeah you need artists, music, lots and lots of work Mar 03 04:15:30 right, so why put all that into a game then spend nothing on publicity? Mar 03 04:15:53 i dont know how much money you have to market Mar 03 04:16:01 you cant just make a game and be like 'my game is awesome it will spread by word of mouth on how good it is' Mar 03 04:16:01 I fear more are buying TVs with stuff built in, but it's possible that android will dominate there eventually Mar 03 04:16:11 yes Mar 03 04:16:28 I hope so anyway. the built in stuff is garbage. Mar 03 04:16:33 well, even if you are 'indie' ands I am Mar 03 04:16:50 indies don't tend to have money to spend on marketing Mar 03 04:16:56 not compare to EA anyhow Mar 03 04:17:08 you can market yourself, send emails to magazines, talk to reviewers, spend those google adword credits yu get when you buy hosting Mar 03 04:17:24 of course not, but you can get your game out there Mar 03 04:17:40 further, why are you competing with EA? compete with the next indie over Mar 03 04:18:15 "EA" or any other big name studio makes the same games over and over again Mar 03 04:18:46 big gun shooter, fast car racing, hardcore gangster roguelike Mar 03 04:19:05 they dont innovate, they cant, they have to stick with a formulaic game Mar 03 04:19:08 Storyteller anyhow, good luck. writing mobile for consumers is becoming a fools errand for indies Mar 03 04:19:25 so break the mold, sell games the big guys arent making Mar 03 04:19:37 do it, get back to us ;) Mar 03 04:19:47 like I said, Im not trying to dev for mobile, Im making games for a tv, that runs an OS Mar 03 04:19:53 the money in mobile is moving to enterprise development Mar 03 04:20:20 so where do you think the indie money is? PC? flash? web? Mar 03 04:20:55 i looked at kickstarter, saw a lot of buig names that already had money Mar 03 04:21:25 Storyteller if you would like some numbers, sign up for http://www.visionmobile.com/blog/2015/02/app-developer-trends-q1-2015/ Mar 03 04:23:42 hm, not sure if this is the same http://www.visionmobile.com/product/app-economy-forecasts-2014-2017/ Mar 03 04:24:58 http://www.developereconomics.com/wp-content/uploads/edd/2015/02/below-1k-month.jpg Mar 03 04:25:02 this is good Mar 03 04:25:41 interesting "Two-thirds of app data traffic over mobile networks comes from top five apps" Mar 03 04:26:20 twitter, facebook, snapchat, instagram and whats the new one... vine? Mar 03 04:27:34 Netflix probably Mar 03 04:27:41 YouTube Mar 03 05:04:42 is any method called when a dialog closes? Mar 03 05:04:53 i always onResume() was callled but i guess not Mar 03 05:04:57 *thought Mar 03 05:09:48 I don't think so Mar 03 05:19:27 http://android-developers.blogspot.com/2015/03/google-play-services-70-places-everyone.html Mar 03 05:32:22 I have a ListFragment, and need to open an activity when an item is clicked. Which is the best? startActivity from the fragment itself, or notify the parent fragment to start the new activity? Mar 03 05:32:58 s/parent fragment/parent activity Mar 03 05:33:07 parent activity Mar 03 05:33:24 why? Mar 03 05:34:39 easier to compose behavior if its delegated to a mediator - in this case the activity Mar 03 05:35:09 ok Mar 03 05:35:27 Not sure I understand the point of delegating Mar 03 05:37:17 well classic example is master detail - if you press an item in the master you may either add a new fragment (tablet - detail) or start a new activity (for phone - detail) Mar 03 05:37:55 if there are multiple fragments on the screen at once, its harder to reuse one fragment if its has its own idea about global navigation and behavior Mar 03 05:38:32 If it's a one time thing, start the activity from the fragment. If it's an event that miight have more than one interested party, post it to a bus or create an Rx observable Mar 03 05:38:42 either way, asking the activity to start that new activity seems unnecessary Mar 03 05:39:27 i try to write the fragments in a way they don't assume what else they are being shown with - but yeah, one off it is easier Mar 03 05:40:31 this case is just one time navigate to detail -> and come back Mar 03 05:40:56 so if you are in landscape, you would probably just add another fragment Mar 03 05:41:20 this is phone only app. Mar 03 05:42:05 after all these years i still haven't found a good way to map fragments to activities, always seems like a mess ensues Mar 03 05:42:24 rotation changes, cached fragments, oh my Mar 03 05:42:35 true story Mar 03 05:43:15 I fix my apps to portrait - no worries :P Mar 03 05:43:47 i was hoping google would do some DSL to create high level information architecture mapping of activities and fragments Mar 03 05:44:04 i think they kinda started something in AS but ... whatever Mar 03 05:45:03 i think the thing here is that IA on mobile is also a function of context Mar 03 05:45:41 i dont understand a word :) Mar 03 05:46:08 napster like to read ? Mar 03 05:46:11 (books) Mar 03 05:46:20 will be appreciated Mar 03 05:46:23 http://shop.oreilly.com/product/0636920024651.do Mar 03 05:46:32 much obliged Mar 03 05:46:40 ;) Mar 03 05:58:34 one of the things i wish amazon let me search by - are books endorsed by a person, like Steven Pinker for example Mar 03 05:59:23 9 times out of 10 i just want better search, seems like the effort goes into advertising these days Mar 03 05:59:45 Which is the best way to implement these kinds of UIs on Android? Should I go with OpenGL or HTML5? I just need merging and splitting of two buttons. Mar 03 05:59:46 https://www.behance.net/gallery/20458053/Taasky-for-Apple-Watch Mar 03 06:01:22 We want great people to endorse books in the first place. Mar 03 06:15:40 any dev here ?? need help regarding wifi Mar 03 06:21:53 just ask away Mar 03 06:21:56 maybe someone answers Mar 03 06:24:49 i'm trying to port cm12 to redmi 1s Mar 03 06:25:09 so far i have been successfull in booting it up Mar 03 06:25:31 but this requires a workaround in init file Mar 03 06:25:57 i have to disable the qmuxed service Mar 03 06:26:41 otherwise it keeps crashing the wifistateMachine . I'm providing the logs Mar 03 06:30:01 you might want to go to #android-root Mar 03 06:30:28 kk Mar 03 06:53:59 Hi. I'm wondering if anyone can give me any advice on how to approach/fix a problem I'm facing with large (full screen width, around 600px high) images in a list view. As a test, I've got 4 elements in the list. All images are being loaded in the background. However, even when scrolling when all the elements of the list are at least partially in view, there is an awful lot of lag. Really kills the user experience. Mar 03 06:54:30 There isn't any loading/unloading going on at this point... no gc either. Anyone know what causes this lag? Mar 03 06:54:49 aaronds: Are you loading these images in the main thread? Mar 03 06:55:28 CedricBeust: "All images are being loaded in the background." Mar 03 06:55:42 Missed that sorry Mar 03 06:55:44 pastebin then Mar 03 06:56:22 No probs, ok. Mar 03 06:57:58 Hey all, this might be a dumb question but I've never tested it. Would you happen to be able to tell me if I spawn a parent thread, and from it spawn a child thread, then make the parent wait(), is the child thread affected? What if the parent thread finishes? will the child thread go on to completion? Mar 03 06:58:37 looking for a ( 0 1 ) Mar 03 06:59:20 CedricBeust: http://pastebin.com/vfnicdM0 Here's the adapter... the load bitmap code is pretty much exactly what is recommended in the docs for efficient bitmap loading, but like I say, there shouldn't be any loading going on at this point anyway. Mar 03 07:00:40 First thing I notice is you findViewById() the same view multiple times Mar 03 07:01:13 What happens if you comment out the loadBitmap() on line 43? Mar 03 07:03:01 CedricBeust: that code should indeed be optimized but in the existing test conditions it is only called a few times at the start, so surely the list should still scroll fine with such a limited number of elements. I'll take out the loading and set a background or something so I can properly monitor the impact. Mar 03 07:03:26 yes I don't think the findByViewId is the problem but worth optimizing anyway Mar 03 07:03:34 but loadBitmap() is suspicious Mar 03 07:04:08 uh what's the simplest way to test this without the imageView... without loading a bitmap there the card is empty so there's nothing to see Mar 03 07:04:09 draw a rect? Mar 03 07:04:23 just comment it out and see if the slowdown is still ther Mar 03 07:04:36 I can't, since there's nothing in the card Mar 03 07:04:42 there'd be nothing to scroll Mar 03 07:05:05 You're saying this is happening in the background but you're not showing the source of this method Mar 03 07:05:34 hold on let me just test without it first Mar 03 07:07:17 i'm pretty new to android studio, in previous versions i was able to add a scale argument to my build configuration for my AVD, i'm using the new AVD config and even doing 10 to 1 dpi my AVD still loads huge Mar 03 07:07:47 ok great CedricBeust, without that call, and with the imageview replaced with a textview, the scrolling is fine. Mar 03 07:08:03 as written that would have to be decoding on the UI thread right ? Mar 03 07:08:23 g00s: That's been my suspicion since the start but aaronds disputed it, we'll see Mar 03 07:08:27 aaronds aybe look at glide or picasso or something (depending on your needs) Mar 03 07:08:28 what does loadBitmap() does exactly? Mar 03 07:09:53 ahh i see editing the argument where i did before does the trick. no matter what i scale to in the AVD config it doesn't change my run command for the AVD Mar 03 07:10:14 Ok CedricBeust | g00s I'll dump the ImageUtils class... I've just been following the developer docs on async loading Mar 03 07:10:37 aaronds: So why are you convinced this is happening in the background if you'r enot sure how it's implemented? Mar 03 07:10:54 Does anybody use eventbus to pass objects around in your apps? Mar 03 07:10:58 CedricBeust: who said I'm not sure how it's implemented? Mar 03 07:11:24 Napalm: I used to use the event bus a lot, been using Rx more lately, with some reluctance Mar 03 07:11:31 CedricBeust: unless I've misunderstood, I'm using AsyncTask correctly (but maybe you can correct me). Mar 03 07:11:39 Rx Mar 03 07:11:55 lol, i bet you're .getting the result and blocking :) Mar 03 07:12:22 CedricBeust: | g00s http://pastebin.com/pgp4pna7 Mar 03 07:12:47 Point out my glaring error :( Mar 03 07:17:32 That's a lot of code for something so simple (decoding a bitmap in the background) Mar 03 07:18:23 CedricBeust: first two methods I could have excluded for berevity (and aren't actually a lot of use in this particular case). Mar 03 07:18:50 The rest are just as per the dev guide I was following. Mar 03 07:20:21 CedricBeust what about rx has contributed to reluctance? just curious; for me its the java 7 boilerplate which would go away if i used kotlin Mar 03 07:21:10 g00s: I don't have a problem with the verbosity caused by anonymous classes, the benefits are worth it Mar 03 07:21:25 I'm still a bit wary of Rx because of the way observables and observers are now tightly coupled Mar 03 07:21:44 Not the case with the even tbus Mar 03 07:22:04 ahh. this was deuteros' concern too Mar 03 07:22:16 Yeah that's not new Mar 03 07:22:40 well, if you use Rx as an event bus i guess its not going to be as nice as a dedicated one Mar 03 07:22:55 You can do that somewhat Mar 03 07:22:57 but many places i was using an event bus are no longer Mar 03 07:24:31 CedricBeust | g00s any advice on where I was going wrong / what to try next? Mar 03 07:24:47 might just rewrite simpler version Mar 03 07:24:48 aaronds: Can you measure how long your onPostExecute() takes? Mar 03 07:24:58 Yes you will have to rewrite this and make it sipler Mar 03 07:25:03 but worth investigating this problem Mar 03 07:25:15 Your onPostExecute() should be pretty much instant Mar 03 07:25:30 sure Mar 03 07:25:32 aaronds also maybe check out http://www.slideshare.net/tyronenicholas/tips-and-tricks-for-image-handling-in-android Mar 03 07:25:39 from facebook Mar 03 07:25:53 thanks g00s Mar 03 07:27:02 Your bitmapworkerTest code looks superfluous, no need to keep track of that but that's more in the department of overcomplication than performance Mar 03 07:28:20 CedricBeust: did a quick test of onPostExecute (just compared currentTimeMillis at beginning/end) and it seems instant Mar 03 07:28:47 "seems"? Just time it with millis, just to put that concern to rest Mar 03 07:28:54 0 Mar 03 07:29:02 Alright Mar 03 07:29:09 Then there's something else happening on the main thread Mar 03 07:29:50 I'm seeing "Skipped 59 frames!" in logcat Mar 03 07:30:01 Yeah not surprising, and not good Mar 03 07:30:06 "This application may be doing too much work on its main thread" Mar 03 07:30:56 time loadBitmap() before you call execute() Mar 03 07:31:50 ok Mar 03 07:31:52 I wonder if setImageDrable() is costly Mar 03 07:32:51 loadbitmap is 0 too Mar 03 07:41:27 wow, i copied & pasted a file into AS editor and it make a file called java.java in a new package and internal errored :) Mar 03 07:42:57 copy pasting the content of the file does things better Mar 03 07:43:14 i selected all from a web page :) Mar 03 07:43:24 it will automatically create a file with the same name of the class Mar 03 07:43:28 lol Mar 03 07:43:30 the frikking SlaidingTabLayout omg save my do i have to copy this crap Mar 03 07:43:46 yep, plus the tabstrip Mar 03 07:43:48 :) Mar 03 07:44:41 for the bug report, i said "AS crashed because i should not have to copy / paste snippets to get what should be platform defined widgets ;)" Mar 03 07:45:21 hue hue hue Mar 03 07:47:40 Off to bed for now... will look at this more tomorrow. Thanks CedricBeust & g00s Mar 03 07:49:17 good morning Mar 03 07:49:40 lemongah ! Mar 03 07:49:44 gah Mar 03 07:49:44 lemonxah :) Mar 03 07:49:47 :) Mar 03 07:50:19 ugh this oem mixed endianness of the data in their GATT model Mar 03 07:50:38 i've been thinking about going into berry farming Mar 03 07:50:53 fffffuuuu Mar 03 07:51:18 what? Mar 03 07:51:21 lol Mar 03 07:51:28 you need sleep or a packet of chips? Mar 03 07:52:34 i probably need a anti-anxiety stuff Mar 03 07:53:10 why the anxiety? Mar 03 07:56:50 g00s: Did you see this? http://www.reddit.com/r/androiddev/comments/2xn3gd/devs_app_rejections_no_longer_automatically_count/ Mar 03 07:56:57 Dunno whether it means much, but it's interesting. Mar 03 07:56:58 TacticalJoke yeah Mar 03 07:57:10 The guy screwed up the title. Mar 03 07:57:14 i argued thats the way it should have been from the beginning Mar 03 07:57:35 "App rejections no longer count as strikes against developer accounts" might've fared better. Mar 03 07:59:04 The two exclamation marks make it seem slightly frivolous. Mar 03 07:59:26 yeah, it should have had at least 3 Mar 03 07:59:29 5 would be better Mar 03 07:59:37 more like ?!?!?!??!?! Mar 03 07:59:45 since we're not really sure Mar 03 08:00:57 Jesus, that CommonsWare book is over 3,000 pages long. Mar 03 08:01:15 The Busy Coder's Guide to Android. Mar 03 08:01:20 Development^ Mar 03 08:01:21 seems crazy Mar 03 08:01:34 it used to be 3 or 4 books, I think... Mar 03 08:01:37 that sounds more like the bored coder's guide Mar 03 08:01:45 part of it is low # words per page with huge margins Mar 03 08:01:55 JesusFreke :S Mar 03 08:02:00 that's how I always bumped up the page count of my papers :D Mar 03 08:04:05 how do you implement the actionbar show/disappear like in google inbox? Mar 03 08:04:52 hi why i am getting this error that part of my code ? E/libEGL﹕ call to OpenGL ES API with no current context (logged once per thread) Mar 03 08:04:56 http://paste.ubuntu.com/10512476/ Mar 03 08:21:18 mtp://[usb:002,027]/Phone/ Mar 03 08:21:19 huh Mar 03 08:21:24 doesn't suck as much as it used to Mar 03 08:32:37 I almost forgot how addictive Twitter is. Mar 03 08:47:04 is there any way to get AS to compact its memory Mar 03 08:47:18 i keep having to shut it down once it reaches 1G Mar 03 08:54:27 just let it take 1 gb? Mar 03 08:54:34 not like 1 gb is that much for an IDE Mar 03 08:54:46 my ide takes 3 gig right now Mar 03 09:04:11 yeah, i only have 4G and the gradle daemon takes around 800mb Mar 03 09:05:32 g00s, set heap limt. Mar 03 09:05:33 also Mar 03 09:05:45 what the heck are you doing developing on 4G machine Mar 03 09:05:52 yeah yeah i know Mar 03 09:06:11 java heap size is configurable for gradle daemon and for as separately Mar 03 09:09:18 ah studio.vmoptions Mar 03 09:09:38 that's for A Mar 03 09:09:40 *AS Mar 03 09:10:04 hi ya'll Mar 03 09:13:50 Mavrik for the daemon started by AS, should i use AS preferences -> gradle -> gradle vm options or edit some file Mar 03 09:14:29 g00s, see gradle.properties Mar 03 09:14:39 g00s, org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 Mar 03 09:14:53 it says it applies for the daemon process Mar 03 09:22:28 how mcuh ram do you generally recommend for development? Mar 03 09:22:39 hardware in general Mar 03 09:22:41 much* Mar 03 09:23:56 at current prices Mar 03 09:23:58 buy 16G Mar 03 09:24:45 8G is usually enough though, but considering the price difference getting 16G to future proof the machine is not such a stretch Mar 03 09:24:52 also, SSD is a must Mar 03 09:26:01 ty Mar 03 09:26:04 yeah i have a 5400 rpm drive :| Mar 03 09:26:16 * Mavrik hugs g00s. Mar 03 09:26:23 heh Mar 03 09:26:37 all the ram, as much as fits, 16G minimum Mar 03 09:26:40 I think we have to run a collection drive here for g00s hardware upgrades ;) Mar 03 09:26:44 do you devel on laptops? Mar 03 09:27:02 diegoviola, yeah, but getting one in good configuration is significantly more expensive :) Mar 03 09:27:40 diegoviola, only with monitors attached. I hate those small screens. make me far less productive to work on my laptop vs my dual monitor setup Mar 03 09:27:56 danijoo: yeah I feel the same way Mar 03 09:28:19 i dont use a laptop cause when i leave the office i dont want to take my work with me Mar 03 09:28:58 i use a laptop because i dont want to take a tower case with me on the airplane Mar 03 09:29:48 yeah, external monitor is a must Mar 03 09:30:04 but I like having the ability to not go to the office in the morning when I'm feeling lazy :P Mar 03 09:30:29 remote work ftw Mar 03 09:30:39 yup :) Mar 03 09:31:06 with source controls, work is always with you lemonxah Mar 03 09:31:06 ;) Mar 03 09:31:42 when should i use appcompat v4 or v7? Mar 03 09:31:43 Mavrik, i would end up never showing up again unless there are meetings, lol Mar 03 09:31:49 haha Mar 03 09:31:50 joroci, use the one you need Mar 03 09:32:03 they contain different stuff Mar 03 09:32:12 danijoo, I actually just rented an office in a coworking space since working at home was too annoying Mar 03 09:32:13 :) Mar 03 09:32:34 this is very true: http://theoatmeal.com/comics/working_home :) Mar 03 09:32:38 oh Mar 03 09:32:41 i got confused Mar 03 09:32:43 Mavrik, I assume it makes more productive to work somewhere else tough Mar 03 09:33:09 yeah... also never underestimate the morale boost of listening to all the crap web developers have to go through Mar 03 09:33:15 makes Android dev looks awesome :P Mar 03 09:33:20 haha Mar 03 09:52:11 ok i shaved a few hundred mv from AS / gradle .. now maybe i can open an extra chrome tab or two Mar 03 09:52:15 *mb Mar 03 09:53:04 im always wondering what chrome does with my RAM. Mar 03 09:53:15 its hilarious how much RAM that browser needs Mar 03 09:53:52 i only used chrome because of flash, now seems flash is going away so time to go back to ff Mar 03 09:54:00 danijoo: they are all the same.. its just the nature of "the web" Mar 03 09:54:48 Napalm nah, i have chrome up with 5 tabs and its taking 600mb, chrome has 40 tabs and its taking 400mb Mar 03 09:54:53 Firefox isn't as bad. Mar 03 09:55:06 oops, FF has 40 tabs Mar 03 09:55:16 Though I opened Firefox for the first time in a while today and saw some new annoying toolbar icon. :/ Mar 03 09:55:20 Something about chatting with people. Mar 03 09:55:20 now, turn on adblock and it all goes to shit Mar 03 09:55:31 g00s: thats beacause chrome uses seperate processes for each Mar 03 09:55:40 Napalm ya Mar 03 09:57:07 From what I read you can make Google Chrome use only one process. I wonder how that'd affect memory use. Mar 03 09:57:15 I'm too lazy to try it right now. Mar 03 09:57:24 TacticalJoke stop being lazy. Mar 03 09:57:30 what are we talking about? Mar 03 09:59:19 no doubt chrome is the fastest browser, but everything even other apps gets stuck when playing flash Mar 03 09:59:34 does anyone know how to implement grouped notifications like this one?(http://i.imgur.com/klRNbt2.png) Mar 03 09:59:51 yeah chrome has --process-per-site and --single-process Mar 03 09:59:54 or used ot Mar 03 10:00:14 used to Mar 03 10:00:23 octodoodle https://developer.android.com/training/wearables/notifications/stacks.html Mar 03 10:00:42 I switched to safari Mar 03 10:01:24 can't see embedded flash videos with safari though Mar 03 10:01:36 This is that Firefox thing: https://www.mozilla.org/en-US/firefox/hello/ Mar 03 10:01:45 Seems to be something like Skype. Mar 03 10:01:58 They seem to be losing direction. :/ Mar 03 10:02:19 napster: thanks very much! didn't know what it was called. Mar 03 10:02:58 firefox OS didn't get much traction apparently Mar 03 10:03:50 it is a nice question that why we have different apps for the web. Mar 03 10:04:35 anyone know if android studio has a nifty way of tracking down log statements? Mar 03 10:04:50 the "dobbel-tab"-shiftkey doesn't find anything Mar 03 10:05:34 What do you mean "track down log statements"? Mar 03 10:06:19 ive taken over a project that has a ton of log statements, and figuring out where they are called appears to be a challenge Mar 03 10:07:07 was wondering if there was an alternative (in android studio) to searching through the git repo Mar 03 10:07:25 Did you try "Edit > Find > Find in path"? Mar 03 10:07:42 My shortcut is Ctrl+Shift+F; I've forgotten what the default is. Mar 03 10:08:42 Hey Folks, is there any way to access market specific platform info? e.g. what the OS Version break down is in the UK Mar 03 10:08:45 neat, didnt know! :) Mar 03 10:08:47 thanks TacticalJoke Mar 03 10:09:27 Troffel: "Replace in path" could come in handy. :D Mar 03 10:09:37 Then again, I guess it's hard to replace a line with the lack of a line. Mar 03 10:10:50 TacticalJoke, theres also find in path Mar 03 10:11:11 maybe just search for every Log.d and do the rest by hand ^^ Mar 03 10:12:54 danijoo, that is what I'm going with :) Mar 03 10:13:40 I don't think I've ever used "Replace in path" in any IDE. Hmm. Mar 03 10:13:49 "Find in path" is essential, though. Mar 03 10:13:53 ^^ and after that, you should add descriptive tags to every log Mar 03 10:14:00 that will make your life easier :) Mar 03 10:14:11 It's cool that IntelliJ has full regex support for this stuff. Mar 03 10:14:33 With built-in assistance. Mar 03 10:15:07 TacticalJoke, replace in path is kinda obsolent since you can rename variables in the whole project with shift+f6 Mar 03 10:16:59 danijoo, I usually denote my logs with a getClass() :) Mar 03 10:17:28 I hate Log stuff. I avoid merging it into my main-line as much as possible. Mar 03 10:17:51 I think my main branch has never contained a Log statement. Mar 03 10:19:17 i usually create my own logger class to enable/disable logs depending on working task Mar 03 10:22:12 15% of Americans believe software is a type of clothing? Is this accurate? http://time.com/12410/11-of-americans-think-html-is-an-std/ Mar 03 10:23:08 "18% [think] Blu-Ray is a marine animal". :D Mar 03 10:23:28 sounds like a lot of people had hearing problems Mar 03 10:24:31 well, to be fair, if I never heard of it before I too could probably bite into "Blue-ray" being a stingray cousin :D Mar 03 10:25:10 It's such an awesome name for an animal. If they find new marine life, they should consider this name. Mar 03 10:25:34 name the reef "blue-reef" Mar 03 10:26:02 call a new predator "blue-tooth", you might be onto something TacticalJoke Mar 03 10:52:55 Hi, C2DM will be turned of in April. Does anybody know if registration on the device side will still be possible via the com.google.android.c2dm.intent.REGISTER Intent? Mar 03 11:01:42 I am on a Mac, what is the best IDE/Environment/etc for NDK development and is there a good easy tute for setting up an NDK devel env..? Mar 03 11:02:53 I’ve used Eclipse and Android Studio at different work places but I wan to get into NDK development Mar 03 11:11:22 afk Mar 03 11:15:40 ITS SO HOT HERE i feel like i am physically melting Mar 03 11:15:55 where? Mar 03 11:15:57 litterally physcially Mar 03 11:16:01 cape town south africa Mar 03 11:16:14 yea africa is hot ;) Mar 03 11:16:22 no its not normally Mar 03 11:16:27 not this bad Mar 03 11:16:38 i am from here born and bread Mar 03 11:16:45 today is exceptionally hot Mar 03 11:16:53 106 F Mar 03 11:16:56 41 C Mar 03 11:17:08 with a 13% humidity Mar 03 11:18:20 and im just sitting here, freezing Mar 03 11:19:37 i prefer the cold its easier to warm yourself up than cool down Mar 03 11:19:42 we're on the verge of spring here - temperatures have just started to edge up from the cool of winter... putting a fan on occasionally, will have to clean out the aircon in a month or two Mar 03 11:19:45 true Mar 03 11:20:03 the aircon in my car is broken Mar 03 11:20:13 so tonight driving home is going to be fun :/ Mar 03 11:20:36 its so warm outside i went out for lunch and the breeze that was blowing was so hot it felt like my eyeballs were baking Mar 03 11:20:44 damn Mar 03 11:21:36 walking in direct sunlight you feel like you are being fried and walking in the shade feels like are you being baked Mar 03 11:21:38 anyway Mar 03 11:21:50 i am sure its hotter in other parts of the world right now Mar 03 11:22:23 doesn't get above the mid-30s here in summer, rarely that high - but we have weeks on end of 95+% humidity... Mar 03 11:23:14 yeah here aswell during peak summer its like 38-44 with 80+% humidity Mar 03 11:23:30 but summer is over now its the start of fall it shouldn't be this hot Mar 03 11:31:49 Sydney's been pretty humid the past month as well Mar 03 11:32:05 I'm pretty much just sticky all the time, it's gross Mar 03 11:32:42 we were in Sydney a couple of weeks ago :) mostly enjoyed the weather, except for the rain... Mar 03 11:35:44 Is it actually possible to run addr2line on a crash reported tombstone (native crash)? Mar 03 11:35:52 I mean.. will it translate Mar 03 12:01:15 Hi!, is there a way to: from activity1 -> (new intent to) take a picture from camera -> load activity2 to receive image file and edit properties -> return to activity1 refreshing image list Mar 03 12:07:38 feathersanddown, startActivityForResult Mar 03 12:12:20 is correct to start an activity inside onActivityResult() method, while there is no onPause,onStop execution ? Mar 03 12:13:49 onPause/onStop is executed. Mar 03 12:14:12 why shoudnt they Mar 03 12:15:04 the visual effect is that activity1 launch camera app, then camera app return and resume activity1 and inmediately appear activity2 window Mar 03 12:15:40 yeah. just open activtiy2 in activity result Mar 03 12:16:16 onActivityResult happens before onStart/onResume Mar 03 12:16:23 so you won't see anything Mar 03 12:16:48 ok, and just to know... is there a way to pass a parameter to Intent when loading camera app, that make camera app load activity passed as parameter in its intent ? Mar 03 12:17:19 no Mar 03 12:18:06 you have 0 control over the camera app, if you want what you are describing Mar 03 12:18:15 you'll need a SurfaceView Mar 03 12:38:14 ok thank you :) Mar 03 12:41:36 in emulator, when camera app exits, then execute onActivityResult and to logic to show activity2, but anyway execute onPause/onSaveInstanceState/onStop for Activity1 Mar 03 12:42:07 *and do the logic to execute Activity2, but anyway.... Mar 03 12:43:31 so this is the way Android execute things..... maybe I need to recode some methods to support this process Mar 03 12:43:35 uhm Mar 03 12:43:47 * feathersanddown is Android newbie xD Mar 03 12:44:19 feathersanddown,Don't feel bad i new to:) Mar 03 12:45:48 I want to do something like photograph attach in whatsapp, after camera app appear another activity to add some text and after that back to original activity (chat) with image and text as message Mar 03 12:49:32 it's kind of annoying that the requestCode gets changed when I startActivityForResult from a fragment Mar 03 12:50:03 I have not observed that Mar 03 12:51:10 in FragmentActivity.startActivityFromFragment it's changed Mar 03 12:51:47 super.startActivityForResult(intent, ((fragment.mIndex+1)<<16) + (requestCode&0xffff)) Mar 03 12:53:10 then, this may be a good reason to move your startActivityForResult call to the parent activity of the fragment. Mar 03 12:54:29 well, kind of defeats the purpose of using fragments when you can't encapsulate functionality. Mar 03 12:55:25 Syzygy, it's changed back to what you request when on activity result is called Mar 03 12:55:58 except that at least in my case it isn't :/ Mar 03 12:56:20 may be show us the code? Mar 03 12:56:52 of course it's a simple fix with requestCode = requestCode << 16; requestCode = requestCode >> 16; but it's still annoying Mar 03 12:57:15 it's not that important, just wanted to complain somewhere Mar 03 12:57:41 Syzygy, sounds like you're requesting from fragment but processing result in activity Mar 03 12:57:53 which would require what you're saying Mar 03 12:59:32 well, it mostly passes the onActivityResult on to its containing fragments Mar 03 12:59:55 yeah, that looks like you're processing that in wrong activity Mar 03 13:00:03 er, wrong place Mar 03 13:00:20 and restoring your requestCode is done by (requestCode & 0xFFFF) not <<16 :) Mar 03 13:00:40 that code just prepends fragment index on the upper 2 bytes of the int Mar 03 13:01:27 well, it discards the first 16 bit of the int which is valid although more messy i guess Mar 03 13:01:46 huh Mar 03 13:02:08 it reserves the upper 16 bits for fragment indez Mar 03 13:02:15 and by first i mean most significant Mar 03 13:02:53 still not seeing your complaint, unless you want to handle on activity result in your activity and not fragment Mar 03 13:03:06 in which case, you broke encapsulation already Mar 03 13:04:47 It might be because I have a main activity having an exchangeable content fragment, and one of those consists of fragments as well (which don't receive their own onResults) Mar 03 13:04:55 so I basically have to reach them through Mar 03 13:08:51 should be fine as long as the index doesn't change when exchanged Mar 03 13:09:05 index is discarded Mar 03 13:09:17 of course, the fragment that sent the request won't receive a result if it's removed Mar 03 13:09:59 yeah Mar 03 13:10:11 so far it's working without issues Mar 03 13:10:42 Anyone able to help me debug a problem with sockets? Mar 03 13:13:18 Anyone able to take a look at this? http://stackoverflow.com/questions/28832383/android-socket-wont-connect-to-java-serversocket-timeout Mar 03 13:35:44 does anyone know when is android 5.2 supposed to release to Verizon and AT&T customers Mar 03 13:39:15 Android five-point-what? Mar 03 13:40:17 2185 as the trend goes. Mar 03 13:40:36 android_sandwich, you mean 5.0.2 and that is not in this channel go to #android maybe Mar 03 13:43:01 I see. thanks Mar 03 14:09:15 There isn't a way to upgrade genymotion on Linux. Is there? You just have to replace the directory. Mar 03 14:18:23 donniezazen: you can upgrade it from the application screen probably Mar 03 14:19:12 or just replace Mar 03 14:24:45 how do i change the color of the menu icon when using android.support.v7.widget.Toolbar? Mar 03 14:25:01 by menu i mean the drawerlayout icon Mar 03 14:27:50 thepoosh: yeah i overwrote over the old install. Mar 03 14:27:56 mmmmkay Mar 03 14:29:57 joroci: http://developer.android.com/reference/android/widget/Toolbar.html#setLogo(int) Mar 03 14:30:46 i have to change the logo not the color? Mar 03 14:31:55 joroci: define color Mar 03 14:32:05 it's black i want white Mar 03 14:32:46 the overflow icon is changed but the menu is still black Mar 03 14:33:02 I actually meant this: http://developer.android.com/reference/android/widget/Toolbar.html#setNavigationIcon(int) Mar 03 14:33:08 and yes, you need a drawable Mar 03 14:33:11 or a resId Mar 03 14:33:25 ok thanks Mar 03 14:33:30 you can find the system one for the correct style Mar 03 14:34:59 Isn't the colour determined by colorControlNormal? Mar 03 14:35:03 Or textColorPrimary. Mar 03 14:39:11 i set the icon, it didn't change Mar 03 14:39:40 joroci: Set colorControlNormal to red or something. I think it should work. Mar 03 14:40:29 ok. can anyone explaint he different between a style and a theme in android. esp when it comes to a dialog. Mar 03 14:42:08 joroci: Aren't you using ThemeOverlay.AppCompat.ActionBar, BTW? Mar 03 14:42:27 ah never mind, dialog style is different from R.style. confusion over Mar 03 14:42:27 i am Mar 03 14:43:32 hi, I'm trying to get into android development. I have a linux PC, and an Android 4.4.2 non-rooted device. I have ADB installed and everything I need (as per my distro's wiki regarding android dev) to write actual code (Java + Eclipse). Can someone please help me with a link to some sort of "Hello World!" -type tutorial? I have no idea how ADB works / how I'm supposed to build against my version of android and upload the code to the Mar 03 14:43:32 phone Mar 03 14:43:43 i can't change it Mar 03 14:43:50 i mean the color stay the same Mar 03 14:44:49 Imv try google Mar 03 14:45:34 alien64, I did, searched for whatever keywords came to mind and found nothing. I'm new, so I don't really know for what to search, either Mar 03 14:46:48 read d.android.com Mar 03 14:47:05 https://support.google.com/admob/answer/6166400 Mar 03 14:47:28 TacticalJoke it's not something with the drawerlayout? Mar 03 14:47:36 imv, most people (tm) use Android Studio now Mar 03 14:47:43 joroci: This looks promising: Mar 03 14:47:45 I like it as a newb Mar 03 14:48:01 Moter8, I tried android studio, I have 2GB of ram on my machine, so it doesn't work Mar 03 14:48:19 Moter8, well, it runs, but it's unusable Mar 03 14:48:26 Ah, too bad Mar 03 14:48:44 get a non shitty pc Mar 03 14:48:58 pfn, >read d.android.com Mar 03 14:48:59 for real Mar 03 14:49:02 the worst how-to there is Mar 03 14:49:19 I always felt like IntelliJ / Android Studio was lighter on ram than Eclipse... but maybe that's just me. Mar 03 14:49:26 ... begins with directory structure and command-line project creaion Mar 03 14:49:34 pfn, I went through what I could find on that website, all the info I could find referred to Android Studio (which makes sense, but then again, I can't run it ) Mar 03 14:50:22 and I thought you were going to go all command line, imv Mar 03 14:51:02 pfn, might have to, with 2gigs of ram, lol. Hopefully not Mar 03 14:51:09 Imv http://www.tutorialspoint.com/android/android_hello_world_example.htm Mar 03 14:51:38 pfn, I can write scripts for whatever tasks I'd have to do with adb to streamline, though, so that's not a problem. I just want something that works Mar 03 14:52:27 Moter8, basics are best Mar 03 14:52:46 no Mar 03 14:52:55 alien64, thanks a lot! I'll go through that Mar 03 14:52:56 project structure does not matter for a newb Mar 03 14:53:01 huh. Mar 03 14:53:04 of course it does. Mar 03 14:53:11 O.o Mar 03 14:53:16 not for a total newb Mar 03 14:53:18 Moter8, no, it is absolutely essential Mar 03 14:53:22 How the hell are you going to develop anything if you don't know where to save the files. Mar 03 14:53:34 for a total noob, should learn java first Mar 03 14:53:35 that comes later Mar 03 14:53:39 yeah Mar 03 14:53:55 and should not be trying to write shit on android Mar 03 14:54:11 project layout is absolutely essential to android development Mar 03 14:54:57 anyone know what Google Goggles uses to get instant OCR on images of text? Mar 03 14:55:06 I think Jake or someone told me once it was OpenCV Mar 03 14:56:22 help here!! in device tree I find folders like device_perms.h , along with some other header files. What is the purpose of these files ? Mar 03 14:56:46 *errr it should be files like device_perms.h Mar 03 14:57:16 try #android-root Mar 03 14:58:09 and what does it matter the purpose, they're part of the source tree, if you want to know the purpose, read them Mar 03 15:00:00 ok, something else Mar 03 15:00:13 I need to have a selector and a shape to a view Mar 03 15:00:18 Odaym, there's a project called openOCR, might want to look that up Mar 03 15:00:33 and sometimes I need to change the background color of that background (shape) on that view Mar 03 15:00:41 Morning guys Mar 03 15:00:53 it was working fine when it was only a background (shape etc..) but now that shape is inside a selector because I want both Mar 03 15:01:13 and so the getBackground on that element returns StateListDrawable, not GradientDrawable anymore Mar 03 15:01:20 I have a silly question. I dont know if this is possible, but I would like to create a clickable region inside of a textview Mar 03 15:01:38 txtview.settext(" sometext [link1] some more text [link 2] "); Mar 03 15:01:40 mantas322, of text? click span Mar 03 15:01:52 click span. Mar 03 15:02:15 each link would have its own listener event Mar 03 15:03:35 https://github.com/pfn/qicr/blob/master/common/src/com/hanhuy/android/irc/model/MessageAdapter.scala#L351 Mar 03 15:03:57 example usage is in the same file as well, translate to java as necessary Mar 03 15:04:55 thanks pfn, I'm going to try to figure this out. Mar 03 15:05:22 mantas322, basically you make a SpannableString Mar 03 15:05:25 that has a ClickSpan set :) Mar 03 15:05:37 @pfn, I did read them. Still are they like used for setting permission Mar 03 15:05:38 ? Mar 03 15:06:13 thanks mavrik. Mar 03 15:07:58 hello, I an trying to use a MediaPlayer to listen to a MP3 stream, but get error "setDataSource failed.: status=0x80000000". code: http://pastebin.com/V9pjPufP Mar 03 15:08:35 TacticalJoke thanks i solved it Mar 03 15:15:25 this looks like a proper example of what im trying to do http://stackoverflow.com/questions/7142378/how-can-i-use-ontouchlisteners-on-each-word-in-a-textview Mar 03 15:16:02 MDTech-us_MAN: I just ran: curl -I "http://109.169.26.216:8016/;?android.mp3" and I get "curl: (52) Empty reply from server" Mar 03 15:16:08 MDTech-us_MAN: looks like a server issue Mar 03 15:16:36 Napalm, I tried using vlc and it worked Mar 03 15:16:52 vlc has a connect to network stream option Mar 03 15:16:56 Asprise OCR #4K Mar 03 15:16:58 $4K Mar 03 15:16:59 lol Mar 03 15:18:43 Napalm, btw, I used "wget http://109.169.26.216:8016/;?android.mp3" and it started successfully downloading the stream Mar 03 15:18:55 HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9 Mar 03 15:18:55 Length: unspecified Mar 03 15:19:09 Saving to: ‘index.html’ Mar 03 15:19:55 I think that OpenCV is something that you use to write the OCR yourself Mar 03 15:20:02 not like a library that has OCR in it Mar 03 15:20:58 MDTech-us_MAN: set the onError handler for the MediaPlayer object and look at the advanced codes. But I suspect its server-side. Try another mp3 stream from some-place online. Mar 03 15:21:04 this one is even better http://www.javacodegeeks.com/2012/09/android-custom-hyperlinked-textview.html Mar 03 15:21:22 MDTech-us_MAN: its either wierd character encoding or the server not responding as expected. Mar 03 15:21:42 MDTech-us_MAN: the fact your server just kills a HEAD request is nuts enough Mar 03 15:22:12 The person that runs the stream said he uses sam broadcaster Mar 03 15:23:05 who would turn down a head request Mar 03 15:23:16 lol Mar 03 15:23:52 MDTech-us_MAN: it really doesn't matter what software he uses but how its configured. You might have better luck trying to see if http://developer.android.com/reference/android/media/MediaExtractor.html Mar 03 15:23:59 works with the stream Mar 03 15:24:09 if it doesn't then i'd suggest its server side config Mar 03 15:24:21 hmm Mar 03 15:24:45 ok Mar 03 15:25:15 i'll try using some random stream from the net first Mar 03 15:37:51 Napalm Mar 03 15:38:01 I tried another stream. it worked fine Mar 03 15:38:07 as i said :P Mar 03 15:38:14 http://5883.live.streamtheworld.com/WKXWFMAAC Mar 03 15:38:32 I mean it worked fine with curl Mar 03 15:38:36 but not android Mar 03 15:38:56 MDTech-us_MAN: what version of Android? Mar 03 15:39:10 5.whatever Mar 03 15:39:14 you know when you hit Run before you are just about to enter the semicolon to finish the line because you are so fast? Mar 03 15:39:24 and you have to go through a build where there's an error, and then hit Run again Mar 03 15:39:27 the latest emulator Mar 03 15:39:43 I also tried my 4.4 phone but same problem Mar 03 15:44:09 is there perhaps a missing permission... Mar 03 15:46:07 Internet... Mar 03 15:49:13 aha! E/MediaPlayerService﹕ Request requires android.permission.INTERNET Mar 03 15:49:17 yup Mar 03 15:49:35 loool Mar 03 16:01:39 Napalm, I had the permission, but after Mar 03 16:06:16 lol you still ask for permission? Mar 03 16:06:37 you're not a pro dev yet then Mar 03 16:14:06 hello there Mar 03 16:14:11 most here probably aren't :p Mar 03 16:15:06 is it possible to call startActivityForResult to go to location access parameters, then return immediately after 'access to my location' radio button has been enabled? Mar 03 16:19:00 Hey Folks, is there any way to access market specific platform info? e.g. what the OS Version break down is in the UK Mar 03 16:20:25 If you have tracking yes Mar 03 16:20:36 Do you mean for an app or in general Mar 03 16:38:16 Hi. Could someone please check my logic on something. If I load a 1020 x 573 jpeg in to memory, I should be using (1020 * 573 * 3) bytes of memory + whatever else my application is using, right? Mar 03 16:39:16 aaronds: The uncompressed JPEG would take 1020 * 573 * 3 bytes of memory (approximately, but it could take up more if there’s any form of padding). Mar 03 16:39:30 The compressed JPEG might take up space, too, if it hasn’t been removed from memory Mar 03 16:39:35 jfpoole: right so that's 1.6 mb? Mar 03 16:39:49 Sounds right. Mar 03 16:40:10 jfpoole: ok so my application should not be using ~80mb of memory to load 4 of those jpegs ._. Mar 03 16:40:35 Depends on how you’re loading the JPEGs. Mar 03 16:40:43 if this is rgba8888 it would take 4 bytes pr pixel Mar 03 16:40:54 Your app may have to pull other things into memory to load the JPEGs. Mar 03 16:41:16 Also the memory allocator may have allocated a larger chunk of memory from the OS to hold the JPEGs. Mar 03 16:41:38 So the memory’s not “used” per se, but as far as the OS is concerned it is being used. Mar 03 16:42:04 Easy way to test if the 80MB is overhead is to load more or fewer JPEGs Mar 03 16:42:55 I see. Mar 03 16:43:03 plus memory is allocated in powers of two Mar 03 16:43:27 I'm using BitmapFactory to decode the resource Mar 03 16:43:45 will test for just 1 Mar 03 16:44:10 so using just 1 takes a little over 20mb Mar 03 16:44:48 aaronds: If you are learning http://developer.android.com/training/displaying-bitmaps/load-bitmap.html is a good resource, If you are implementing this in an app you intend to make something of checkout http://square.github.io/picasso/ Mar 03 16:45:35 yiati: I'm actually following those docs atm Mar 03 16:47:00 aaronds: Interesting. What happens if you load 2-3? Does memory scale linearly? Mar 03 16:47:49 jfpoole: Yeah 40mb for 2 images. Mar 03 16:47:58 Interesting! Mar 03 16:48:04 I'll probably use picasso in my actual app but I'd like to know where I'm going wrong manaully. Mar 03 16:48:41 Is it just a blank screen with images, or is there other stuff that's taking up memory? Mar 03 16:49:06 yiati: basically. It's in a list view, but right now there's only 2 elements in it (so it doesn't get to the point of scrolling). Mar 03 16:49:47 what format are you decoding the bitmap in Mar 03 16:52:42 yiati: I'm not explicitly setting any decode format. http://pastebin.com/bK73Gfa9 Mar 03 16:53:56 aaronds: then you are using the default ARGB_8888, http://developer.android.com/reference/android/graphics/BitmapFactory.Options.html#inPreferredConfig Mar 03 16:54:11 ARGB_8888 Each pixel is stored on 4 bytes. Mar 03 16:54:30 the fourth byte is alpha Mar 03 16:55:01 you sure about what you said about the bytes? Mar 03 16:55:14 yiati: ok but that doesn't account for 20mb Mar 03 16:55:22 1020 * 573 bytes = 584460 bytes = 0.58446 MB Mar 03 16:55:37 Nope it tells you that there is more than what you expect in there Mar 03 16:55:53 so either your expectation of the images is wrong, or there is something else going wrong Mar 03 16:55:54 why dont you use Picasso Mar 03 16:56:03 it will all your graphic problems. Mar 03 16:56:07 +solve Mar 03 16:56:08 Odaym: I will, but at the moment I want to know for my own knowledge. Mar 03 16:56:16 you're not going to learn anything Mar 03 16:56:28 because learning how something like this works in the details needs a book Mar 03 16:56:32 BUT GOOD LUCK! Mar 03 16:56:36 yiati, width x height x 4 Mar 03 16:56:42 on ARGB8888 Mar 03 16:56:48 adq sorry yes forgot :P Mar 03 16:56:55 np Mar 03 16:57:38 1020 * 573 * 4 = 2.33784 MB Mar 03 17:06:13 Interesting, even using picasso the memory usage is the same. Mar 03 17:06:39 Question your expectations since they don't seem to be correct Mar 03 17:06:56 yeah it seems so Mar 03 17:08:01 well said Mar 03 17:08:06 no Mar 03 17:08:09 question the reality Mar 03 17:08:15 WELL SAID ^ 10 Mar 03 17:08:26 Log(Well Said, 10) Mar 03 17:09:15 Logging with http://developer.android.com/reference/android/graphics/Bitmap.html#getAllocationByteCount() can possibly give insight to expectations Mar 03 17:09:17 Log.wtf("said", "well"); Mar 03 17:10:34 So using .load(res).resize(screenWidth, appropriateHeight); I was able to get 4 images loaded in 30mb Mar 03 17:10:39 substantially better than 80mb Mar 03 17:10:51 now that's magic Mar 03 17:11:14 What I'm slightly confused about is how I resized it to a size larger than the original. Mar 03 17:16:09 you can ask jake about something that you're probably missing Mar 03 17:16:37 if they managed to do something like shrink the size of memory being used, its probably an atomic operation that they had to do to get there Mar 03 17:17:07 dont know what im talking about exactly, but whatever, you dont either Mar 03 17:17:08 ;D Mar 03 17:18:49 eh, there are ways. most of them are covered here: https://developer.android.com/training/displaying-bitmaps/index.html Mar 03 17:22:14 Eh, somehow the memory usage dropped to 10mb after a while, which sounds just right. List is still operating perfectly normally. Not sure what was cleaned up in that time. Mar 03 17:23:55 Anyone here wan't to Partner Mar 03 17:23:57 ? Mar 03 17:24:10 in play backend if a app has eg: 200/150 in the install counter what do it mean ? (i can't understand the description) would it mean that 200 have installed it and 150 still have it installed ? Mar 03 17:24:19 huh. Initiating GC after loading does the trick. Annoying it uses that memory in the first place. Mar 03 17:24:37 can any of the libraries RETROFIT, VOLLEY, OKHTTP be used to download audio(.mp3) from the server?? Mar 03 17:24:37 fanno Mar 03 17:24:37 initiating gc manually is pointless Mar 03 17:24:44 yes Mar 03 17:24:46 fanno, whats your app? Mar 03 17:24:59 AndroidNewb: https://play.google.com/store/apps/details?id=dk.tbertelsen.android.drcast Mar 03 17:25:15 pfn: I was just initiating it from the memory monitor to see the result. Mar 03 17:25:27 ok Mar 03 17:25:44 it's useful to see if any memory can be recovered, but it's not useful for memory management Mar 03 17:26:01 sounds like you were doing the right thing with it Mar 03 17:26:05 fanno: Nice! can I help develop your app? Mar 03 17:26:16 AndroidNewb: my counter say 279/279 i find it stange if no one have uninstaled it ... but i guess they wound not if the really like it. Mar 03 17:26:42 fanno: it says 100 to 500 installs Mar 03 17:27:04 all i would need is somone to make icon an things like that i suck at that Mar 03 17:27:11 150/200 means 200 installled overall and 150 still installed.. therefore 50 uninstalled Mar 03 17:27:16 fanno: I can do that Mar 03 17:27:20 AndroidNewb: yes that is front end. Mar 03 17:27:34 fanno: I can also do the Front-end stuff Mar 03 17:27:52 Like doing the buttons and such. Mar 03 17:28:28 Ashiren: that is what i don't understand this app has 279/279 but all my other apps have some differance .. and the lower number is the last number whats why i dont under stand the description. they way i read it the low number should be the first one ? Mar 03 17:29:34 dunno, do you have "current installs by device" selected in top? Mar 03 17:29:49 fanno: Mar 03 17:30:29 Ashiren: it is danish ... so translation could be the problem ... Mar 03 17:31:06 fanno Mar 03 17:31:26 Ashiren: (AKUELLE/SAMLEDE INSTALLATIONER) whitch i would trans late to (current/total) and my numbers are reversed .. with high/low not low/high Mar 03 17:31:46 :o Mar 03 17:32:07 Ashiren: so it makes no sence to me.. =/ Mar 03 17:48:52 QUERY: I tend to be a "work from examples" learner, and I have an app I want to do that will be a Very Fancy Timer. Any pointers for sample code in that general direction? #20yearcoder #firstapp Mar 03 17:50:00 timer? Mar 03 17:50:02 Baylink: i am too =P Mar 03 17:50:18 alarm clock? or some stopwatch thinguy Mar 03 17:50:18 Baylink: (lern by trying) Mar 03 17:50:29 learn by /dev/random Mar 03 17:50:41 Ashiren: hehe Mar 03 17:58:29 More "learn by looking" Mar 03 17:58:49 I'm a *much* better maintanence coder than from-scratch. Mar 03 17:59:05 Hard to know you've built a working build-chain when you aren't certain of the code. Mar 03 17:59:15 Some of all of that Ashiren, yes. Mar 03 17:59:36 As is common, I'd like to be first on the kill, so I'm playing my cards a bit close to the vest. :-) Mar 03 18:23:38 Hi ! I've got an "Circular dependencies cannot exist" exception in my activity that brakes it without poping up a the message ! Mar 03 18:23:50 Baylink: there are a bunch of sample apps in the SDK downloads. you may want to download both the current ones and API 17, since the older ones are not (yet?) ported to android studio Mar 03 18:24:20 zebu1er: do you use relativeayout? Mar 03 18:24:28 Yes ! Mar 03 18:25:00 well probably you have there something like x1 is above="x2" and x2 is above="x1" or something like that Mar 03 18:25:06 The layout is dynamically built on instructions of a user XML file Mar 03 18:25:08 doesn't IDE tell you that? Mar 03 18:25:20 oh Mar 03 18:25:22 Ashiren: indeed Mar 03 18:25:43 But I want a message to tell the user what appened ! Mar 03 18:26:29 then catch the exception and show dialog? Mar 03 18:26:36 And this exception raises in the main loop, even if I catch it the main thead is dead ! Mar 03 18:26:53 :o Mar 03 18:27:20 I successfully catched it but as the main loop is broke seems even a Toast fails ! Mar 03 18:27:44 can you do it in background? Mar 03 18:27:47 I may need to recreate another task... Mar 03 18:28:05 UI message in background ???? Mar 03 18:28:06 or pastebin part of code Mar 03 18:28:12 zebu1er: why do you want to display a message? are you building an android ide or something? Mar 03 18:28:56 I want the user to know how he made the UI hang (circular ref in case) ! Mar 03 18:29:51 Hi! I'm developing an app that comunicates with an external USB device. The app uses the data from USB for making move a 3D model. I'm using bulktransfer but I cannot reach real-time communication. I've read that many suggest using NDK. Any suggestion? Mar 03 18:30:05 http://pastebin.com/D63L1JUy Mar 03 18:30:54 dud89: what's preventing you from achieving real time? garbage connection, CPU use, framer buffering, etc? Mar 03 18:31:24 yes Mar 03 18:42:39 Anyone reach real-time communication via USB and bulkTransfer? :) Mar 03 18:43:04 dud89: so a couple general questions, as I haven't done USB stuff on android before: a) have you tried running systrace / other tracing tools to see where the slowdown is? b) looks like bulkTransfer intentionally buffers until the buffer is full, or it times out. could it be that the buffering is delaying things? Mar 03 18:44:04 <_genuser_> so some dude is sending me email via linked in profile. javascript expert, must be able to work in vanilla JS no libs, web services, LESS and REST, agile methodologies, blah blah Mar 03 18:44:42 <_genuser_> did my profile say I was javascript guru? or that I was love web services. or that your "preferred python/php/mongo" is actually based on the profile? Mar 03 18:45:52 groxx for using systrace I need a rooted device? Mar 03 18:46:28 nope, systrace works anywhere. in the "android device monitor" (there's a button for it in the toolbar in Android Studio) there's a systrace button above the list of devices. Mar 03 18:47:10 Ok, thank you. I'll try ;) Mar 03 18:48:15 dud89: also, in case it's relevant, it looks like there are two samples but they're not in the new batch so they're not visible on the site. if you download the APIv17 samples, they'll be in your android-sdk folder. Mar 03 18:48:46 Ok :) Mar 03 18:51:20 where is there good android studio documentation? Mar 03 18:51:36 supposedly it does maven builds but i haven't been able to figure it out Mar 03 18:51:51 maven builds? what you mean? Mar 03 18:52:05 build maven projects.... Mar 03 18:54:17 Because it's intellij Mar 03 18:54:27 There's plenty of intellij documentation Mar 03 18:54:51 ok. so no real differences that are going to screw me? Mar 03 18:55:19 Different plugins Mar 03 18:55:19 if i depend heavily on intellij docs i mean Mar 03 18:58:14 android studio doesn't support maven projects Mar 03 18:58:17 only gradle Mar 03 18:58:20 or did they change that Mar 03 18:58:51 i kept thinking that but people keep telling me i'm wrong Mar 03 18:58:59 * pfn shrugs Mar 03 18:59:07 import project, if it doesn't give you a maven option, it doesn't support it Mar 03 18:59:07 read somewhere "because of AS's great maven support, this was sooo easy...." Mar 03 18:59:16 probably meaning maven central Mar 03 18:59:21 It does support maven Mar 03 18:59:35 not /maven/ Mar 03 19:00:40 android studio doesn't have great "maven" support Mar 03 19:00:59 not as nice all the gradle magic no Mar 03 19:01:14 but it's not non-existant Mar 03 19:02:27 * pfn still finds no reason to run android studio Mar 03 19:02:52 I needed a gridview to load images into Mar 03 19:03:09 then I saw the sample you can import in AS Mar 03 19:03:27 Is it really okay to just use some of the classes? Mar 03 19:04:23 without rewriting them or anything, just removing the copyright comment Mar 03 19:05:46 probably be better to read those classes, understand them, abide by copyright, and if simple as copy paste do it, otherwise, with your understandings create what you need Mar 03 19:13:48 can ad networks be prioritized with google admob? Mar 03 19:14:16 um Mar 03 19:14:19 no. Mar 03 19:14:48 Siamaster, you may not remove the copyright comment Mar 03 19:14:54 Siamaster, it is not yours to remove Mar 03 19:15:14 I just saw that Applovin has much higher RPM than Google Adwords Mar 03 19:15:17 and no, no copy paste is allowed Mar 03 19:15:29 doing so violates copyright Mar 03 19:15:32 even from the samples? Mar 03 19:15:57 it's just guidelines on how to use their apis :S Mar 03 19:16:04 the license is what it says it is Mar 03 19:16:08 Read the license Mar 03 19:16:13 you are not allowed to remove license and copyright notices on files you do not own Mar 03 19:16:23 But almost all the ads shown are from Google Adwords Mar 03 19:16:54 30 000 ads from Google Adwords and 150 from Applovin Mar 03 19:17:11 so I may just look at it, and completely rewrite it Mar 03 19:17:31 damien5314: hey dude Mar 03 19:17:38 damien5314: I got the tab strip to work properly. Mar 03 19:17:49 and some stuff is not really their innovation, there is not really another way to write the code Mar 03 19:18:05 for an Activity with viewpager and 3 fragments, what is the correct way of reporting the screennames for Google Analytics? I was thinking 3 ifs in Onresume, something like if (mViewPager.getCurrentItem() = 0 { t.setScreenName("Fragment1"; tracker.send(new HitBuilders.AppViewBuilder().build();) Mar 03 19:19:28 fuck me, Genymotion/VirtualBox just fucked me over Mar 03 19:19:38 screwed up my whole networking config Mar 03 19:19:40 grrr Mar 03 19:20:23 and also, what are they gonna do. download my app from appstore, open up the apk and somehow find out I used the code they provided in the samples? Mar 03 19:20:36 aint that just bs? :P Mar 03 19:21:08 damien5314: http://pastie.org/9996686 I told you i'd have done in 30 android minutes :P (3days) Mar 03 19:21:57 /**@Copyright Siamaster */ public class MyInteger { public int myInteger;} Mar 03 19:22:06 don't you DARE stealing my code Mar 03 19:22:50 I got my small app to mostly work and threw it on my device to check it out. but a TextView that is supposed to be clickable does nothing when I tap on it. It works fine in the VM. I must have missed something but I'm not sure what. Mar 03 19:23:07 Siamaster: Did you read the license? It's apache 2, it's free Mar 03 19:23:31 it's free to do whatever I want ? Mar 03 19:24:00 or I have to use it without modifying it and keeping their license? Mar 03 19:24:33 newbQ, post your code setting a click listener Mar 03 19:25:17 Quacked, you've been asking that question for like 3-4 days, narrow it, or atleast do more testing so it isn't the same exact words repeated for +days :/ Mar 03 19:25:27 whatitis: I didn't set a click listener. I used the onClick attribute in the XML Mar 03 19:25:57 Then your activity implements it and your do your stuff in that method Mar 03 19:28:06 what exactly do you mean by that? Mar 03 19:28:07 Siamaster: If you want to know more you can read about it Mar 03 19:29:21 alright, I thought it was a simple answer someone who already read it could tell me. Mar 03 19:29:32 but yeah.. I should read it Mar 03 19:31:45 For some reason my google analytics exception reporter stopped working after updating the app (I dont see exeptions reports on google analytics). it's code was not changed. When debuging I see that exception reporter runs... but nothing is reported on analytics.... anyone else experienced that? Mar 03 19:32:08 sounds pretty googly Mar 03 19:32:31 whatitis: so... in addition to putting the function in the onClick attribute, I also have to set the onClickListener? Mar 03 19:33:00 onClick works on buttons only Mar 03 19:33:01 Describes the ability to use/modify software freely without distributing it. Mar 03 19:33:26 I take it as I can do what ever I want with it, as long as I'm not publishing the CODE to some place Mar 03 19:33:37 i never use onClick on xmls anyway Mar 03 19:33:42 just set click listeners Mar 03 19:33:49 so what pfn says is not true Mar 03 19:34:04 Ashiren: then how do I set something similar for a TextView, and why does it work like that in the default emulator? Mar 03 19:34:44 pust setOnClickListener? Mar 03 19:34:56 you can set an OnClickListener on any view Mar 03 19:35:35 so the onClick XML attribute does nothing unless its on a button? Mar 03 19:36:08 if you set onClick xml attribute, you need to make sure you put a method with that name, that takes a View parameter, in your activity Mar 03 19:36:12 i believe Mar 03 19:36:34 yiati, apache2 is not completely free Mar 03 19:36:48 whatitis, only yesterday and today, hehe. Narrow the question? My example will work but I'm sure that's not the proper way of doing it Mar 03 19:37:04 I have that. just that. and it works in the default emulator. but it doesnt work on a physical device Mar 03 19:37:46 pfn: nope, completely free wouldn't have a license Mar 03 19:37:53 Apache license typically has a clause about the license statement being left intact, Siamaster Mar 03 19:38:10 so, no, you're not free to remove it Mar 03 19:38:15 nope == I agree Mar 03 19:38:27 yes, if you publish the code somewhere without it Mar 03 19:38:46 dude.. when you build your apk, the comments are gone Mar 03 19:39:31 ideally there should be a dialog listing the licenses of the components used Mar 03 19:39:46 maybe a build plugin that rips through the files and auto-generates that Mar 03 19:40:00 heh.. wonder if you could get in trouble if someone decompiled your app and it didnt include licensing information Mar 03 19:40:37 and as long as they aren't gonna hack my computer or my github account, I'm safe. And to be honest google couldn't even care less Mar 03 19:42:16 "Google is suing some application because they found out he is using the code they wrote for demonstrating their complicated API without using their copyright statement" Mar 03 19:43:34 newbQ: you could try to add android:clickable="true" to your textView Mar 03 19:44:08 yup. just saw that too. Mar 03 19:45:48 Weird that TextViews seem to be default clickable on the default emulator, but not on another device. Mar 03 19:51:34 "Apple beats Samsung to become the world's top smartphone manufacturer in Q4, says Gartner" Mar 03 19:52:04 huh - a year ago it was samsung 83m apple 50m Mar 03 19:52:26 now they will have to compete with xiaomi too Mar 03 20:00:06 If a company no longer has their keystore, but want to publish an udpated version of their app, they are screwed? Mar 03 20:00:15 yup. Mar 03 20:03:32 is there a px -> sp converter somewhere? Mar 03 20:03:56 lasserix: probably in http://developer.android.com/reference/android/util/TypedValue.html Mar 03 20:15:07 SDK tools 24.1.2 in the SDK manager. what does it mean????!? Mar 03 20:16:32 is there a good program for fast viewing of code? Mar 03 20:16:35 like notepadd++ for mac? Mar 03 20:17:21 there's notepad++ for windows Mar 03 20:18:16 Siamaster, really bad practice to just go and remove license headers just because you don't like the look of them Mar 03 20:18:20 regardless of whether you publish Mar 03 20:18:40 lasserix: sublime text has been treating me pretty well Mar 03 20:18:47 atom.io seems interesting Mar 03 20:19:03 groxx dunno , was there yesterday. still no notes Mar 03 20:19:08 no, because I intent to change the file, remove all the comments everywhere so that some files contains 300 less codes Mar 03 20:19:36 and since my app is targeting api level 15 > I'm gonna remove all the legacy code Mar 03 20:20:23 Then my project weights less on my harddrive, It's not much! but if I let every new file keep everything that I'm not using anyway, it will add up soon Mar 03 20:20:39 and all other git copies will have that extra files too Mar 03 20:21:34 300 less rows* Mar 03 20:21:54 probably won't save much space, if any, actually. your filesystem has a minimum block size, files can't take less space than that. Mar 03 20:22:43 still, my project remains cleaner. If I sometime need to debug the code, it is easier Mar 03 20:23:29 and If I'm gonna modify the code, The copyright statement is for no good Mar 03 20:28:50 Butterknife is giving me guff in a custom view: extends FrameLayout, uses as the root tag, LayoutInflater.from(context).inflate(R.layout.view_complete_list_view, this, true); Mar 03 20:29:16 define: guff Mar 03 20:29:55 http://pastie.org/9996925 Mar 03 20:30:27 I feel like I've made a simple mistake somewhere, but I'm not sure; I get that stack trace when a view another layout that uses the custom view Mar 03 20:30:36 when I view* Mar 03 20:32:51 JakeWharton are you aware of anything like NIO bytebuffer but dynamically growing - kinda like okio Buffer but without the queue semantics. Mar 03 20:34:47 hi Mar 03 20:36:38 im trying to copy and external database to the android app, i have this error http://pastebin.com/dgGany7w , i have tried every thing but same stuff, does some 1 have any idea? Mar 03 20:38:21 im trying to copy and external database to the android app, i have this error http://pastebin.com/dgGany7w , this is the code http://pastebin.com/d0NA61U0 i have tried every thing but same stuff, does some 1 have any idea? Mar 03 20:38:49 john67 http://stackoverflow.com/questions/26135049/android-database-sqlite-sqlitecantopendatabaseexception-unknown-error-code-14 Mar 03 20:41:04 /data/data isn't the same as data/data/ the latter takes in consideration the working path Mar 03 20:41:37 shouldn't hardcode that path anyways, there are methods to get that folder Mar 03 20:43:55 Ok, it was a naming conflict; nested view had the same id as a parent view Mar 03 20:46:51 g00s: why doesn't Buffer work? Mar 03 20:47:17 JakeWharton if i read from buffer its destructive right? i need to pass the buffer around to multiple consumers Mar 03 20:47:37 maybe i'm not thinking right in terms of what okio offers Mar 03 20:48:01 there's a .snapshot() on master which gives you a ByteString that's immutable and backed by the same byte[] Mar 03 20:48:27 ah ok. for example, i read the buffer from BLE devices, store it on disk, queue it for transmission by mqtt client Mar 03 20:49:33 explodes: interesting. looks like you might be referencing an ID that doesn't exist at runtime Mar 03 20:52:31 g00s: thnkx Mar 03 20:55:07 explodes: it's trying to look up an ID name in order to display an error Mar 03 20:55:15 so you're XML or binding in code is broken Mar 03 20:56:10 I changed the name of the list to a unique name and it "fixed" the problem Mar 03 20:56:43 Soooo, I have to do some preliminary high level design for a software that has a little Android app. I wonder if there is a resource that tells me the big picture with android - most tutorials are a step by step in which you do stuff. Interesting, but instead of knowing what code do I need to type in tio instantiate an Activity I would like a lot more something telling me what the big picture is with Activities, Fragments and whatnot. Any such resource? Th Mar 03 20:56:43 anks Mar 03 20:57:35 t0by: http://developer.android.com/guide/components/fundamentals.html (and other stuff in the guides / training sections) Mar 03 20:57:58 groxx, wonderful, thanks. Mar 03 20:58:10 t0by: some of the big ones, like Activity, Fragment, Service, etc also have pretty rich javadocs, like http://developer.android.com/reference/android/app/Activity.html Mar 03 20:58:28 groxx, is there a book-like resource, by the way? Mar 03 20:58:38 Something to the effect of, I don't know - Design Patterns. Mar 03 20:59:13 there are some android books out there, but I don't know any well enough to recommend them. hopefully someone else is opinionated? Mar 03 21:01:21 the android "C"omponents are well documented; but there is probably some room for an Android Design Patterns kind of book Mar 03 21:01:37 maybe one exists, i'm not sure Mar 03 21:01:54 Android Hacker's Handbook Mar 03 21:02:14 t0by I'd look at the newest version of http://commonsware.com/Android/4-2-free and if it's the kind of book you're looking for buy the "real new" version which covers the newest apis Mar 03 21:02:25 for example = up until very recently, i was using Service with overlapping lifecycle. activities bound to it, and if it wasn't started unbinding would cause it to stop. but i started using trim() and its much nicer Mar 03 21:03:23 adq "The first comprehensive guide to discovering and preventing attacks on the Android OS" O.o Mar 03 21:03:31 seems like a different subject Mar 03 21:03:42 totally Mar 03 21:03:44 if I'm using a callback with Palette, as is outlined here: http://jakewharton.com/coercing-picasso-to-play-with-palette/, what would be a good way to get the generated color/palette in an async way? Mar 03 21:06:45 might be a good question for JakeWharton, idk lol Mar 03 21:06:59 i don't know what you are asking Mar 03 21:07:08 Picasso operates in a background thread so there's no need to do it async Mar 03 21:08:52 where is the run & debug button in AS? Mar 03 21:09:06 memorion, thanks Mar 03 21:09:10 seems a very complete resource. Mar 03 21:09:17 (alas, 2131 pages!) Mar 03 21:10:03 version 6.5 has 3124 pages :D Mar 03 21:10:17 JakeWharton, am I right that whenever the callback's onSuccess is called, I should be doing any manipulation of the colors there? I'd like to retrieve the color to use in other places, but I would think if I use a getter method, I will get nulls when onSuccess hasn't been called yet Mar 03 21:10:52 correct, you have to wait for success because both the image has to be loaded and palette has to be run Mar 03 21:12:27 what I'm doing right now is passing a View to my callback, and its using setBackgroundColor(...) after retrieving the palette, but I have some views that I need to call other methods on to change the color Mar 03 21:12:44 also, I'm having trouble using it with views that are in a listview row Mar 03 21:13:20 i set texsize for some textviews differently for landscape/portrait. But i dont know how to handle natural-landscape-displays (like wxga). Lets say i want textsize=10sp in portrait and 12sp in landscpae on normal devices. Mar 03 21:13:21 Then i want to have 10sp in landscape and 12sp in portrait on wxga displays. But i dont know how to find out if a device is a wxga-display...any hint? Mar 03 21:14:43 adkins, use a layout-wxga folder? Mar 03 21:15:10 drinfernoo: need to do it in java Mar 03 21:16:01 oh Mar 03 21:19:49 Hey there Mar 03 21:21:19 I'm trying to take a value from a database, find my ListView, and get a child element (an item in the list) by its index Mar 03 21:23:24 And then I want to take that value from the DB, and use .setTag() to set that value as the tag for the TextView I found from the list Mar 03 21:24:24 sounds like you can simplify that by adding the id to your data object inside your adapter Mar 03 21:24:32 id/tag* Mar 03 21:25:12 So I have to write for this device. According to the contractor who makes it, it is "single-Activity". Does this mean I get a single thread machine? Docs seem to imply this. Mar 03 21:25:21 JakeWharton, https://github.com/drinfernoo/Cuber/blob/master/app/src/main/java/com/blango/cuber/util/MaterialPaletteCallback.java Mar 03 21:25:37 I am aware that getMaterialColors() is ugly as all hell Mar 03 21:25:42 t0by, no Mar 03 21:26:49 single activity could mean they have usb debugging enabled and checked the option to kill activities, or whatever it's called, to not keep a backstack of activities Mar 03 21:26:51 i`m not so familiar with tablets.....do tablets always have wxga resolution Mar 03 21:26:52 ? Mar 03 21:26:52 I can do that inside the adapter? Mar 03 21:27:12 adkins, tablets are i believ sw600 and above Mar 03 21:27:59 as far as resolutions, don't depend on that, depend on density Mar 03 21:29:08 damn internet Mar 03 21:29:41 whatitis: i just need to find out if a device has landscape as default configuration like wxga displays. Dont know how to find that out reliably Mar 03 21:31:13 whatitis, not density Mar 03 21:32:59 adkins, no you don't Mar 03 21:33:08 pfn: ? Mar 03 21:33:08 tablets all default to landscape in any case Mar 03 21:33:19 layout-land? Mar 03 21:33:22 7" tablets are generally all sw600dp Mar 03 21:33:32 'cept for some stupid kindles, which are sw533dp Mar 03 21:34:30 533 Mar 03 21:34:40 that's an odd number, in more ways than one Mar 03 21:34:52 so can i rely on this ? http://pastebin.com/Etfrt6zm Mar 03 21:35:09 adkins, wtf are you trying to accomplish Mar 03 21:35:12 and no Mar 03 21:35:17 pfn: lol Mar 03 21:35:22 So how would I go about adding IDs to a list adapter? Mar 03 21:36:25 can Mockito generate mock sensor data? Mar 03 21:39:02 pfn, i was saying use the sw600 qualifier, and as far as resolutions just use density Mar 03 21:39:08 TechGeek01, http://stackoverflow.com/questions/10267731/android-how-to-make-an-adapter-with-stable-ids Mar 03 21:39:20 pfn: lot of things.....from what you say i assume tablets have always a landscape configuration by default. Lets say i create a layout in java dynamically with 2 buttons beside each other (not in xml) in landscape and above each other in portrait. Mar 03 21:39:20 I have to do it the opposite way if it is a tablet. Not sure if you get it, but the posted code works but not sure if it is really reliable Mar 03 21:39:34 And then I can get the ID with .getItemId(position)? Mar 03 21:43:25 is a 400 font weight bold? Mar 03 21:44:06 fortune favors the 400 font weight Mar 03 21:45:27 lasserix, 400 is 'normal' Mar 03 21:45:34 700 is bold Mar 03 21:49:03 hi, when i use an android library from github using gradle, it also compiles the available languages supported from the res/values/strings folder. Is there anyway to exclude those unwanted languages? Mar 03 21:51:07 why? Mar 03 21:51:48 if trying to save on resources, seems like a weak place to optimize Mar 03 21:52:39 because it makes the final apk size a little bit. Mar 03 21:52:50 *large Mar 03 21:55:54 from some strings? Mar 03 21:56:03 read the thing on the new google api location servicews update.. its funny, I rarely allow location services to be active Mar 03 21:56:21 personally, I just dont think most things need to know where I am Mar 03 21:56:36 i worry, i wanna know Mar 03 21:56:43 my gf, I found also doesnt not turn them on, she says the gps drains her battery too fast Mar 03 21:56:51 whatitis: depends on library. it could contain many descriptions in many languages + also images for specific languages Mar 03 21:57:03 are location based services and applications particularly popular? Mar 03 21:57:13 Ashiren: and you'd wanns supress that? Mar 03 21:57:18 wanna* Mar 03 21:57:58 not me Mar 03 21:58:01 enough to were the impact of including can make a 10+mB difference or something, or just a few hunder kB? Mar 03 21:58:59 dunno. wouldnt optimized proguard just ignore those resources? Mar 03 21:59:00 haha gingerbread haters, guess what phone my first live test user has: http://www.gsmarena.com/samsung_galaxy_proclaim_s720c-4754.php Mar 03 21:59:09 that came out in 2012, not even that old Mar 03 22:00:13 myke its probably just ravioli Mar 03 22:00:28 Proclaim? Mar 03 22:01:03 hopefully soon ... Samsung ? Mar 03 22:01:05 drinerfno thanks Mar 03 22:03:02 whatitis: found 1 but no answers http://stackoverflow.com/questions/6845089/can-i-exclude-resource-values-from-being-built-into-my-android-child-project Mar 03 22:06:32 lasserix, no prob Mar 03 22:09:36 JakeWharton, how would I use that Callback without loading into an ImageView? I'd like to use it not only to style views of my activity, but also views that are in listview rows, which probably shouldn't be loading the image again and again Mar 03 22:16:20 finally found it, http://tools.android.com/tech-docs/new-build-system/resource-shrinking Mar 03 22:18:46 Anyone put a search bar in a toolbar? Mar 03 22:18:57 Is that reasonable or is it better just to make custom thingy? Mar 03 22:19:36 can android use java 8 sdk yet? Mar 03 22:20:34 newbQ not really, unless you use retrolambda Mar 03 22:21:17 darn Mar 03 22:21:28 newbQ you can use kotlin which is probably better Mar 03 22:21:51 you can also use scala Mar 03 22:21:53 which is even better Mar 03 22:22:29 newbQ if you are adventurous even ceylon (people are using it) and if you like dynamic typing groovy might be your huckleberry Mar 03 22:23:23 newbQ nut after the language, you have to consider tooling and the impact of the runtime Mar 03 22:23:45 I think thats a bit too much for me right now. I've just gotten started with Android Studio Mar 03 22:23:53 anything dynamic on android sucks Mar 03 22:23:57 until android adds invokedynamic Mar 03 22:24:06 newbQ https://plus.google.com/+JakeWharton/posts/WSCoqkJ5MBj Mar 03 22:24:15 so groovy, jruby, jython, rhino, luaj, etc. are all bad choices for android applications Mar 03 22:25:44 hey Mar 03 22:26:22 Question about objectanimator, I am tryign to get my animation behind another layout, I am using layout.bringtoFront() but the animated view is still on top of the old one. How to fix? Mar 03 22:27:24 make sure that objects Z axis is less than all other objects on top,does that hel[? Mar 03 22:28:42 lol Mar 03 22:28:50 no, that’s what I am tryign to do Mar 03 22:29:05 It’s funny because I insert the firw which I want to be on bottom first in my layout Mar 03 22:31:10 wish there was just a view.setZOrder(int) Mar 03 22:31:27 where higher values == closer to top Mar 03 22:33:38 is there a way to have an EditText set so the keyboard does not come up onClick? Mar 03 22:34:00 this looks like fun http://shop.oreilly.com/product/9781784392161.do Mar 03 22:34:06 "Download the sample app" here but I cant just extract and open that as a project in android studio? http://developer.android.com/training/animation/screen-slide.html Mar 03 22:34:32 all the examples on googles android development site use Calendar. So I have been using Calendar. But it's giving me weird behavior. What else should I be using? Mar 03 22:34:36 g00s: isnt that the super secure phone? Mar 03 22:34:55 newbQ: what wierd behaivor? Date is another alternitive Mar 03 22:35:14 newbQ there is a port of joda for android Mar 03 22:35:31 https://github.com/dlew/joda-time-android Mar 03 22:35:37 but for simple stuff, Calendar should be fine Mar 03 22:35:52 like the hour just not setting at all, setting the date to next week instead of the week I told it to have Mar 03 22:36:03 ah, probably pebkac Mar 03 22:36:07 :D Mar 03 22:36:49 Thats what I thought too, at first. But it's really not Mar 03 22:37:04 what else could it be lol? Mar 03 22:38:11 DadFoundMy, no, the beaglebone black is an arm dev board roughly similar to the raspberry pi. you're probably thinking blackphone. Mar 03 22:38:25 I set a variable, index to 3. set the hour to index. call getTime to make sure the change is applied correctly. but watching it from debug. the hour does not change Mar 03 22:38:56 sometimes it works, sometimes it doesnt. by all accounts, it should. Mar 03 22:39:04 dragorn :D Mar 03 22:39:38 newbQ: pastebin some code? Mar 03 22:40:39 I find it funny that i started my current project because i was bored one weekend end now I'm about 1000 lines of code in :/ Mar 03 22:40:59 another 40k of boilerplate to go ... Mar 03 22:40:59 http://pastebin.com/hqQu4sjk Mar 03 22:43:04 index = spnArray.get(0).getSelectedItemPosition(); isn't that just 0???? Mar 03 22:43:37 that gets the position of the spinner, whatever the user set it to Mar 03 22:43:53 g00s, would joda be better for recording times? like a stopwatch? Mar 03 22:44:12 I understand android has Chronograph, but its a little limited Mar 03 22:44:42 newbQ: my bad i confused that method with indexOf() Mar 03 22:44:45 drinfernoo i doubt it, probably better for complex time calculations Mar 03 22:44:58 gotcha Mar 03 22:45:05 Chronograph works based on system up time. i've used it to good effect Mar 03 22:45:13 interesting http://blogs.wsj.com/digits/2015/03/03/fraud-comes-to-apple-pay/ Mar 03 22:45:30 6% fraud rates - and this is not because the tech is insecure Mar 03 22:45:34 like if I was to perform analysis on those times? Mar 03 22:45:37 I am trying to connect to my device with a broken screen (black) and broken touch input (nothing). All I need to do is unlock the device so I can connect via Samsung Kies, back it up and then wipe it. Mar 03 22:45:56 I have installed the ADK however 'adb devices' is returning nothing Mar 03 22:45:57 mookins wrong channel Mar 03 22:47:09 I'm looking for something with a little more precision than standard Chronograph, down to 1/100s Mar 03 22:47:32 I think when I used it before, it only went to 1/10 Mar 03 22:48:57 g00s: service + binding => "but i started using trim() and its much nicer" what's trim? Mar 03 22:49:46 drinfernoo maybe look at clock in aosp (stopwatch view) Mar 03 22:50:00 good call Mar 03 22:50:10 link by any chance? lol Mar 03 22:50:18 DadFoundMy, there are a few ways, which do you need? Mar 03 22:50:36 groxx http://developer.android.com/reference/android/content/ComponentCallbacks2.html Mar 03 22:51:12 tricknology: I have an EditText onClick listiner that starts a DatePickerDialog Mar 03 22:51:28 g00s: ah, for detecting when they've left the app? Mar 03 22:51:34 tricknology: right now I need to click the edittext, which opens the keyboard, then i can click it again and the dialog apears Mar 03 22:51:35 yeah via TRIM_MEMORY_UI_HIDDEN Mar 03 22:51:37 so you want to get rid of the softkeyboard onFocus() Mar 03 22:51:57 that way service isn't starting/stopping between activities when bound/unbound Mar 03 22:52:06 tricknology: is the in the java code? Mar 03 22:52:06 g00s: what does that do when they lock the device? on some that only pauses apps Mar 03 22:52:16 ooh. interesting.. so you want the keyboard in there on first click and hide it on second? Mar 03 22:52:37 tricknology: no i dont want it there at all Mar 03 22:52:50 you could set your input method to type_null Mar 03 22:52:52 i want to only click once and for the dialog to appear Mar 03 22:52:53 groxx hm, i'll have to check that out. in my case it doesn't matter though Mar 03 22:53:07 view..setInputType(InputType.TYPE_NULL); Mar 03 22:53:14 but then not sure if you will get focus() at all Mar 03 22:53:20 but your onClick should still work Mar 03 22:53:56 let me know if it doesn’t and we can try something different, DadFoundMy Mar 03 22:54:06 probaly using inputMethodManager Mar 03 22:54:17 tricknology: when i set the input type to that the keyboard doesn't show up, but I still need to click twice Mar 03 22:54:19 btw, are you doing this from a fragment or activity? Mar 03 22:54:23 i guess i need to set the focus Mar 03 22:54:28 acitivity Mar 03 22:54:34 So that’s good right? you don’t want it all? Mar 03 22:54:44 get set on onFocusChangedListener() on the editText() Mar 03 22:54:47 yes, but its still requiting to his Mar 03 22:55:03 but I’m not sure it will fire if inputType is unll Mar 03 22:55:05 null* Mar 03 22:55:10 still what? Mar 03 22:55:13 huh. so google's gonna be a mobile carrier 'in a few months' apparently. Mar 03 22:55:20 *two clicks Mar 03 22:55:33 requiring two clicks? Mar 03 22:55:58 tricknology: i click the edit text once and nothing happens, and when I click it again the dialog launches Mar 03 22:56:02 android:clickable=”true” android:focusable=“true” in your xml Mar 03 22:56:07 i guess it is due to the use of onClickListener Mar 03 22:56:36 not sure exactly without messing with the code. you can set an onFocusChangeListener() on the editText and see if it fires Mar 03 22:57:02 but a Log.d(“FOCUS CHANGE”, “SUCCESS”) in there Mar 03 22:58:02 if that fires then put the methods you have in onClickListener() inside your onFocusChangeListener() inside onFocusChange() wrapped around if (hasFocus){ … your onclickmethods here } Mar 03 22:58:21 if not then new approach Mar 03 22:58:44 I;m thinking your first click is getting focus, second click is firing the onClick Mar 03 22:58:56 ahh onFocusChangeListener() worked, thanks Mar 03 23:01:26 What's the easiest way to support tabs without linking to a view pager? Mar 03 23:10:10 Anyone know how to implement two tabs without backing a view pager? Which is the best library to use? Mar 03 23:19:20 huh? Mar 03 23:19:25 just change view visibility Mar 03 23:19:33 use a frame layout, or view flipper Mar 03 23:19:41 change visibility/switch pages as desired Mar 03 23:20:21 One question, should i go with toolbar or actionbar and what are the benefits of going with toolbar ? Mar 03 23:20:28 I have 90% of my app done. Mar 03 23:21:41 .win 5 Mar 03 23:21:51 lets ignore that Mar 03 23:23:42 toolbar allows flexibility Mar 03 23:23:44 that's all Mar 03 23:23:57 you can do cool animations and hiding/showing and positioning of toolbar Mar 03 23:24:00 you can't do with actionbar Mar 03 23:35:58 pfn, i need two tabs, independent of a view pager Mar 03 23:36:05 almost like a compound button maybe i can use Mar 03 23:37:13 lasserix, so? Mar 03 23:37:20 ? Mar 03 23:37:25 what do you mean? Mar 03 23:41:55 testing what on you Mar 03 23:44:34 back, Mar 03 23:46:05 how can i have a text size which is uniform for all the differents screen sizes? text sizes for hdpi,ldpi,mdpi ,.... Mar 03 23:48:18 Hey. Is it possible to send notificaiton from BEACON to the device? Mar 03 23:48:53 Or rather, activate my app (when near BEACON) , for a while - make a request - then send notification to device from the app depending on the request ? Mar 03 23:54:53 how can i Increase the font size based on the size of the device ? Mar 03 23:59:19 john67, i think you just need to use sp. Mar 03 23:59:30 Nightwalkerkg: i have sp, Mar 03 23:59:36 but it changes nothing Mar 04 00:00:18 Hmmm, http://developer.android.com/design/style/typography.html Mar 04 00:00:38 Nightwalkerkg: im on it Mar 04 00:00:46 Nightwalkerkg: already Mar 04 00:01:37 So if I have a ListView with each list item being a TextView, how can I individually select and work with one of those child TextView elements? Mar 04 00:01:51 In terms of setting tags and whatnot Mar 04 00:01:52 john67, another thing that comes to mind is to create a dimens.xml for each screen size. Mar 04 00:02:04 john67, http://stackoverflow.com/questions/9877946/text-size-and-different-android-screen-sizes Mar 04 00:02:10 Nightwalkerkg: thats what im trying to avoid Mar 04 00:04:34 john67, http://stackoverflow.com/questions/12620343/text-size-with-different-resolution Second answer option 2 : maybe this will help. Mar 04 00:04:52 This is what i hate about android dev. Mar 04 00:05:12 Nightwalkerkg: i have already seen this, im trying to do that now, yeah, Mar 04 00:05:26 Nightwalkerkg: it will have been better a universal stuff Mar 04 00:13:11 john67, i don't have problem with the text, but i do have problem with the images. Mar 04 00:13:32 Nightwalkerkg: put the images in the 4, Mar 04 00:14:39 Nightwalkerkg: i have a link for u http://romannurik.github.io/AndroidAssetStudio/ Mar 04 00:15:00 Yeah, but i have abotu 20 images i need to display. Mar 04 00:15:04 They are all logos. Mar 04 00:15:08 And it's a pain the ass. Mar 04 00:15:12 But i used this already. Mar 04 00:15:53 Nightwalkerkg: use the link i send u, it will gain u time Mar 04 00:34:40 if i am using a handler to animate something in a custom view what should i put my framerate (post delayed) at? Mar 04 00:35:00 does anything less than 16 do anything since the glswapbuffers syncs at 60hz anyways? Mar 04 00:40:06 hey, in terms of Android testing, how can I make sure the Activity for the ActivityInstrumentationTestCase2 uses my Application object? Mar 04 00:46:38 guess that didn't take too long Mar 04 00:47:05 subclass your application add some identifier and verify that it exists? Mar 04 00:51:06 no problem, DadFoundMy Mar 04 01:01:11 Why would a view ignore padding? Mar 04 01:01:55 lasserix: There's an AppCompat bug for that. Is it an EditText or a Spinner? Mar 04 01:02:02 lasserix: the view isn't using that sice to align to anything Mar 04 01:03:57 Mp just a view Mar 04 01:04:04 *no just a view Mar 04 01:04:15 ina relative layout aligned to top Mar 04 01:06:34 margin? Mar 04 01:07:24 my problem is the opposite, padding were there’s not supposed to be.. or at least I didnt write code for there to be but someone else did in their custom numberview that extends another custom numberview that extends a textview.. sigh Mar 04 01:08:48 "padding were there’s not supposed to be.." I have that problem too Mar 04 01:09:01 the extra padding tends to be right in the middle of the.... layout. Mar 04 01:09:27 Can't use margin Mar 04 01:10:49 lasserix: I guess post the XML if you can't get it working. Mar 04 01:11:35 Someone posted an interesting idea on /r/programming: PascalCase for type names, camelCase for method names, and snake_case for variable names. Mar 04 01:11:48 Could help readability (though it'd probably look pretty ugly too). Mar 04 01:11:48 http://pastebin.com/QGPgczwK Mar 04 01:12:14 notice the 1000dp padding top has no effect Mar 04 01:14:21 hey TacticalJoke did you try out the theme? like it? Mar 04 01:15:06 can’t use marchin_top instead? Mar 04 01:15:07 Yeah, I tried SeaGrape. Not bad, but I ended up sticking with Darcula. Mar 04 01:15:16 layout_marginTop Mar 04 01:15:18 coolies Mar 04 01:15:27 no Mar 04 01:15:30 need the color Mar 04 01:15:41 view underneath it Mar 04 01:15:55 lasserix: Sure you're not resetting the padding in code or something? Mar 04 01:16:02 yeah Mar 04 01:16:35 amd+space “padding" Mar 04 01:16:38 cmd+space Mar 04 01:16:46 jk don’t do that Mar 04 01:17:06 Is any padding working (e.g., paddingLeft)? Mar 04 01:17:10 so you want your height to be 112 but padded 1000-112? Mar 04 01:18:10 I would get frustrated and make another view right undewr it alignParentTop with the same dimens, just different background color Mar 04 01:18:28 Hm. Does anyone know offhand if the Galaxy Note 4 supports SCENE_MODE_BARCODE? Mar 04 01:18:33 I'm trying to theme a preference activity, it's kicking my ass. Could someone please look at this and tell me why the checkBoxPreferenceStyle does word, and the preferenceStyle does not Mar 04 01:18:41 maybe not layout_paddingTop? Mar 04 01:18:43 tricknology: its a hack to do transparent status bar in 19+ Mar 04 01:18:52 oh I’m targeting 11+ Mar 04 01:19:02 (note, the checkbox style actually refers to the preference style) Mar 04 01:20:02 http://tinyurl.com/pg32zg6 ( screenshot ) Mar 04 01:20:02 what if you set height to wrap_content Mar 04 01:20:06 and left padding? Mar 04 01:20:18 (left padding at 100dp) Mar 04 01:20:23 1000* Mar 04 01:20:58 MikeWallaceDev: That's just a URL. ;o Mar 04 01:21:08 again?? Mar 04 01:21:18 wait a sec Mar 04 01:21:38 The second URL shows the image, though. Mar 04 01:22:00 https://s3.amazonaws.com/pushbullet-uploads/ujD9xzIHmkS-6tZwW0p8Z1LEhs31GELrvY0ael7LY6px/Screenshot_2015-03-03-20-19-14.png Mar 04 01:22:22 too bad the elevation shadow doesn’t move with the device orientation… (wink wink) Mar 04 01:22:41 and is there any way to move the light source of the elevation shadow? so it’s not always down? Mar 04 01:22:46 (err from top down_ Mar 04 01:23:15 BTW, the fact that you don't see a Title or Summary means that the checkbox IS using the correct layout. Mar 04 01:23:30 (I commented them out for debugging purposes) Mar 04 01:24:47 can i use ImageView as buttons? Mar 04 01:24:52 ImageButton Mar 04 01:24:58 or you can set ImageView to clickable Mar 04 01:25:00 yes luist you can Mar 04 01:25:10 android:clickable=“true” in xml Mar 04 01:25:16 then use onClickListener() liek normal Mar 04 01:25:27 Isn't it enough to set an OnClickListener? Mar 04 01:25:40 Not sure if ImageViews are clickable by default Mar 04 01:25:52 TacticalJoke, yes Mar 04 01:25:53 As far as I rememeber, setting a view's OnClickListener makes it clickable. Mar 04 01:26:02 i did that with the XML, and override this: public void onClick(View v) Mar 04 01:26:06 on setting onClick in xml Mar 04 01:26:09 http://stackoverflow.com/questions/7326601/android-imageview-on-click Mar 04 01:26:48 tricknology: Did you see the comments? Mar 04 01:26:58 yeah I see that now Mar 04 01:27:00 "setonclicklistener makes a view clickable if it doesn't have that as a default" Mar 04 01:27:01 TIL Mar 04 01:27:27 strange… i already have to override onClick on my fragment.. it seems i cant use that Mar 04 01:27:29 SO is so bad. +18 and a check mark for an answer whose first sentence is just wrong. Mar 04 01:27:31 so TacticalJoke ? No idea about the preference? Mar 04 01:27:46 Or at least has wrong implications. Mar 04 01:27:54 No idea, MikeWallaceDev. ;| Mar 04 01:28:02 uuh luist, what do you mean Mar 04 01:28:15 are you implementing OnClickListener? Mar 04 01:28:25 luist, you can set onClick=OnClickTest in your xml, then declare onClickTest(View view) in your Activity Mar 04 01:28:49 oldschoooool Mar 04 01:28:54 but pretty nonetheless Mar 04 01:29:06 tricknology: MikeWallaceDev: i currently have this: http://paste.ofcode.org/MsbDexfs26LcjkVKPsjBQT Mar 04 01:29:22 i did this on the onClick override but it didnt work Mar 04 01:29:39 no Mar 04 01:29:51 imageview has clickable set to true anyways Mar 04 01:29:54 then you would have to set the ImageView's clickListener to "this" Mar 04 01:30:10 luist, it's clicking, but nobody hears it :) Mar 04 01:30:24 MikeWallaceDev: so i must use a listener Mar 04 01:30:37 or, you know, do what I said :) Mar 04 01:31:01 "class ProjectActivity extends Fragment" ;o Mar 04 01:31:21 ooooooh, bad. Mar 04 01:32:27 luist: That's really bad naming. Mar 04 01:32:50 I feel like I've been mind-phazed by reading it. Mar 04 01:33:02 TacticalJoke: thats true lol… ill change it to ProjectFragment Mar 04 01:33:05 could have been worse ProjectActivity extends CheckBox Mar 04 01:34:17 ProjectActivity extends JCheckBox Mar 04 01:34:49 Try not to use names of things that already exist as objects. Fragment is one of them Mar 04 01:35:54 tricknology: It'd be fine if the superclass were some kind of Activity. Mar 04 01:35:55 I don't understand tricknology , how do you name a fragment? (Activity?) Mar 04 01:36:36 I name my stuff backwards, ActivitySettings, ActivityDrawing, ActivityMain, that way they are all together... Mar 04 01:37:11 I thought Fragment was his own custom class Mar 04 01:37:22 oh, no :D Mar 04 01:37:29 SomethingFragment Mar 04 01:37:35 SomethignActivity Mar 04 01:37:39 SomethingViewController Mar 04 01:37:52 SomethingHelper, SomethingCallbacks Mar 04 01:37:54 yeah, normal Mar 04 01:38:03 callbacks == interfaces Mar 04 01:38:14 phew. O Mar 04 01:38:23 I’ll see you gents later Mar 04 01:38:33 I used to like ISomething, now I often use SomethingListener Mar 04 01:38:40 adios Mar 04 01:38:42 MikeWallaceDev: Isn't that what packages are for? :) Mar 04 01:39:06 I can see some advantages, though. It's just that "ActivitySettings" is harder to read. Mar 04 01:39:08 all my helpers, fragments, viewcontrolelrs, callbacks, each a package Mar 04 01:39:13 I leave all my Activitys in the top package Mar 04 01:39:22 same Mar 04 01:39:24 And where do you draw the line? Would you say "FactoryFoo" instead of "FooFactory"? Mar 04 01:39:39 hasta lurgo Mar 04 01:39:49 There is no line. Mar 04 01:40:17 It depends on how big the project is.. btu generally my activities are all in the top, fragments have their own package, as does everyting else Mar 04 01:40:26 ok going for real Mar 04 01:40:30 hahha Mar 04 01:40:32 go already! Mar 04 01:40:34 :D Mar 04 01:41:00 I tend to make my package by component, not functionality Mar 04 01:41:31 so db, ui, utils, graphics, etc... Mar 04 01:41:42 .activities, .services, .etc? Mar 04 01:41:47 no Mar 04 01:41:52 those are all top level Mar 04 01:42:09 ah. I have too many of those :| Mar 04 01:42:32 I just don't like the navigation Mar 04 01:42:48 and since I spend most of my time there, top level they are. Mar 04 01:42:56 what's the difference between getContext() and getApplicationContext()? Mar 04 01:43:03 MikeWallaceDev, what app? Mar 04 01:43:03 I'm so freaking pissed at theming right now... Mar 04 01:43:15 one returns the application context :P Mar 04 01:43:37 Coloroos, I was hope to release RC1 today, but theming kicked my ass. Mar 04 01:43:54 Theming preferences is a big pile of horse pellets Mar 04 01:44:00 MikeWallaceDev android's theming sucks terribly Mar 04 01:44:19 well, normal theming is ok/sucks, but preferences are terrible Mar 04 01:44:43 what did you have to do to the preferences O.o Mar 04 01:45:05 like Preference and PreferenceFragment ? Mar 04 01:45:06 Anyone whos ever used SQLite before wanna check something out for me really quick? Mar 04 01:45:10 actually, there is no preference theming. The way to theme a preference is that you have to supply your own layout and style (therefore, Android doesn't theme preferences) Mar 04 01:45:47 Preference and it's descendants, and PreferenceActivity Mar 04 01:46:39 MikeWallaceDev, but what is the difference between application context and normal context? when would I want the application context? Mar 04 01:47:10 drinfernoo read http://possiblemobile.com/2013/06/context/ Mar 04 01:47:17 theming a preference checkbox = defining your own preference_layout + checkbox_layout + style PLUS the checkbox HAS to have the id id/checkbox, or it doesn't work Mar 04 01:47:46 drinfernoo, the application context last the whole duration of the app. Mar 04 01:47:55 the Preference framework is pretty fidgety yeah, the template method / protocol used to create custom Preference implementations is kinda weird Mar 04 01:48:01 so for things like singletons? Mar 04 01:48:09 drinfernoo, sometimes passing an Activity context could cause you leaks Mar 04 01:48:33 drinfernoo, that would be a great example Mar 04 01:48:38 I should be passing a normal context to Picasso, probably Mar 04 01:48:41 ? Mar 04 01:48:45 never used it Mar 04 01:49:02 careful with rotations... Mar 04 01:50:18 g00s__, it would have been much faster for me to create my own preference lib today, instead of trying to theme Android Preference Mar 04 01:50:25 which... still doesn't work. Mar 04 01:50:45 even worse, it half works. Mar 04 01:55:03 I asked this earlier, but is there any way to get a Picasso callback without using into() with an image view? that way I can get the callback in places where it doesn't make sense to redraw the imageview Mar 04 01:55:52 the Preferences in calendar are kinda weird, on 4.4 anyhow Mar 04 02:02:03 fuckme. I figured out why it doesn't work. Because EVERY preference overrides the default layout. There is no way this can work. (Note, there are TONS of websites that say to do it like this.) Mar 04 02:02:53 why does this style even exist?? Mar 04 02:06:49 does anyone else have a problem where AS doesn't start the app? Compile works, it just stops. Mar 04 02:07:59 check the 'Run' tab Mar 04 02:08:05 maybe device offline Mar 04 02:08:39 no no, I have to Shift-F10 again, then it works... Mar 04 02:09:04 (I use adb over wi-fi, it doesn't disconnect, if it did it wouldn't reconnect) Mar 04 02:10:11 aaaaaaaans it just did it again... Mar 04 02:11:11 guys why would I be getting a nullPointer on getWriteableDatabase()? Mar 04 02:13:20 invalid context? Mar 04 02:13:23 I have ArrayAdapter and when I add a string the font is white.... why? Mar 04 02:13:45 I don't really use ArrayAdapter Strings anymore in this app, but when I did they were never white Mar 04 02:14:20 so to get my preferences to use the default style, I have to set an empty style! Mar 04 02:14:25 Mar 04 02:15:07 DadFoundMy, are you setting the color to white in bindView/createView ? Mar 04 02:17:25 MikeWallaceDev: i dont think so. is there a way to sent the text color of all the Strings in the listview? Mar 04 02:17:54 DadFoundMy: It's not the strings; it's the View returned from your Adapter.getView override. Mar 04 02:18:04 Look at the layout you're using for the adapter. Mar 04 02:18:37 TacticalJoke: im not using an adapter for this listview, it just holds strings Mar 04 02:19:37 I guess you mean you're using ArrayAdapter. Mar 04 02:19:43 TacticalJoke: yeah Mar 04 02:20:07 Which layout are you using with it? Mar 04 02:20:34 well maybe what im doing is just flawed. I have a customadapter, but if the ArrayList that is used to instaniate the customadapter is empty i just give the list view a single string saying "no items" in an ArrayAdapter Mar 04 02:20:45 TacticalJoke: simple_list_item_1 Mar 04 02:24:28 I guess you're setting some text to white at some point. Mar 04 02:24:35 simpli_list_item_1 uses textAppearanceListItemSmall Mar 04 02:25:06 (I'm working with styles, I just happen to be in that directory :D ) Mar 04 02:25:11 bonsoir Mar 04 02:25:40 salut! Mar 04 02:27:11 whats the best way to alert users there there is nothing to be held in a listview? Mar 04 02:27:32 set the :empty Mar 04 02:27:38 that's a little vague, I know :D Mar 04 02:27:53 you're using ListActivity, right? Mar 04 02:27:53 hi Mar 04 02:28:07 MikeWallaceDev: no just ListView Mar 04 02:28:08 DadFoundMy listview has something called an 'empty view' set that Mar 04 02:28:45 DadFoundMy, http://stackoverflow.com/questions/3771568/showing-empty-view-when-listview-is-empty Mar 04 02:28:58 ahh thanks, im goign to set one now Mar 04 02:29:16 I'm trying to create a custom framelayout. How can I make its children be derived from an XML inflation? Mar 04 02:29:33 thing #21 missing from recyclerview Mar 04 02:29:49 g00s__: Yeah, was just about to say. :D Mar 04 02:30:03 what's missig in recyclerView? Mar 04 02:30:11 (besides empty :P ) Mar 04 02:30:24 hesperaux, I didn't understand that.. sorry. Mar 04 02:30:25 Dividers. Mar 04 02:30:40 you can use decorations Mar 04 02:31:06 well easy dividers, multiple choice selections, cursoradapter, emptyview ... Mar 04 02:31:21 MikeWallaceDev, sorry, I will re-phrase. I've never made a GridLayout before Mar 04 02:31:25 multiple choice works, I do it. Mar 04 02:31:28 First off, I meant to say GridLayout - meh Mar 04 02:31:58 I want to create a custom GridLayout. The number of children and the type of views that each child is should be defined in XML. How do I do that? Mar 04 02:32:38 hesperaux: like, a static gridlayout? Mar 04 02:32:46 groxx, yes that sounds right Mar 04 02:32:54 the contents will be dynamic, but the layout itself won't change Mar 04 02:33:02 possibly try a table layout? Mar 04 02:33:05 argh, I'm off to eat. Pissed at Android right now... Mar 04 02:33:12 adios! Mar 04 02:33:45 groxx, I'm trying to make a calendar in which the days display different data from a database and the styles of each day are changing. They will also be interactive Mar 04 02:33:58 which do you think would be better? I've barely started so it doesn't matter much to me Mar 04 02:34:07 ah. interesting. not sure. Mar 04 02:34:34 hesperaux also there are some nice calendar views Mar 04 02:34:47 I think tablelayout isn't too complex, and I've been abused by GridLayout in the past (and haven't used tablelayout much, so I have less distaste there), so I may lean that way. or a custom view. Mar 04 02:34:48 g00s__, yeah I tried messing with Material Calendar View and raged very hard Mar 04 02:36:00 Have you guys ever used the Cursor moveToFirst() method? Mar 04 02:36:08 drose379, yes Mar 04 02:36:22 drose379: It's best just to ask the question. Mar 04 02:36:31 if(cursor.moveToFirst()) { I know the cursor returned data } Mar 04 02:36:32 Im a little confused, if you call it, does it move the cursor to the first result? Mar 04 02:36:53 yes.. Mar 04 02:36:55 Ah ok, so it tells if the cursor returns data, AND moves it to first item Mar 04 02:37:00 correct Mar 04 02:37:04 Thank you Mar 04 02:38:34 If I have 2 cols in a DB: ID,subject Mar 04 02:38:39 would subject be index 1? Mar 04 02:38:41 ID 0? Mar 04 02:39:57 subject would be index 1 Mar 04 02:40:13 but you should use cursor.getColumnIndex("ColumnNameConstant") for maintainability Mar 04 02:40:29 Ok, I tried replacing that with 1 and its giving me a hassle Mar 04 02:40:44 are you actually selecting those columns? Mar 04 02:40:53 just because they're there doens't mean your queyr will have them Mar 04 02:40:57 yes selecting from subject Mar 04 02:41:01 and then using 1 Mar 04 02:41:38 try logcatting cursor.getColumnIndex("subject"); Mar 04 02:42:00 Good idea Mar 04 02:44:04 Its saying subject is 0 Mar 04 02:44:16 ohhh, I think I kow why hesperaux Mar 04 02:44:34 It is 0 for the query, because I am only selecting that table in the query, not both Mar 04 02:44:45 that column? Yes Mar 04 02:45:01 Makes sense why 1 wasent working Mar 04 02:45:05 good Mar 04 02:45:17 tha's why getColumnIndex() is good practice btw Mar 04 02:45:35 Right, BTW random number generator you reccomend? Mar 04 02:45:47 haven't had a use for one as of yet Mar 04 02:45:59 for boring stuff I'd probably use Math.rand Mar 04 02:46:10 for cryptographically strong randoms I don't know Mar 04 02:46:30 Just gonna use the random number as a key to match up items in a local db and on a web server Mar 04 02:46:59 if it doesn't have to be truly random, Math.rand() is probably fine Mar 04 02:47:11 Cool, thanks Mar 04 02:47:30 at the very least, you can test with that and switch to something else later Mar 04 02:47:41 Right Mar 04 02:47:52 quick question, say I have a dialog fragment open Mar 04 02:48:06 and then it is closed, and then re-opened Mar 04 02:48:17 is onCreate called again when the frag is re-opened Mar 04 02:48:50 there's an easy way to find out: just add a Log.d() in onCreate and open and re-open it Mar 04 02:49:10 I really need to learn some logging Mar 04 02:53:45 Hello, is anybody getting this error with android studio?: Error:(111, 0) Cannot call getBootClasspath() before setTargetInfo() is called. I've been using Facebook sdk with no problems and after upgrading Gradle to latest version i'm getting this error. Mar 04 02:55:04 CedricBeust, any ideas? :) Mar 04 02:57:10 keniobats might be better to ask the fb guys what gradle plugin version they recommend Mar 04 02:57:59 g00s__, well I was looking for a way to downgrade gradle to make it work, but I've just recently started looking for it. Mar 04 02:58:27 keniobats and that happens in 1.1.2 ? Mar 04 02:58:48 g00s__, I've also saw this but i'm a newbie and don't know how to set it up: http://stackoverflow.com/questions/28642002/facebook-sdk-3-23-0-with-android-studio-1-1-0 Mar 04 02:59:17 g00s__, let me see my gradle version Mar 04 02:59:33 not gradle, gradle-plugin **** ENDING LOGGING AT Wed Mar 04 02:59:58 2015