**** BEGIN LOGGING AT Sat Feb 07 02:59:59 2015 Feb 07 03:00:12 does an sqlite endTransaction() close or otherwise lose the data a cursor is carrying? Feb 07 03:00:35 basically, should i extract that data before running endTransaction or can i do it afterwards? Feb 07 03:01:19 I wouldn't think it would lose the data. though if it's larger than the window size, it's possible it may return invalid data if you try to use it later... not entirely sure how that'll work. Feb 07 03:01:36 (if your transaction / other stuff changes the db before you load the next window, that is) Feb 07 03:02:04 ok Feb 07 03:02:04 "How do you develop for Android without becoming angry?" haha Feb 07 03:02:06 ¯\_(ツ)_/¯ never tried. I'll have to do that some time though. Feb 07 03:02:12 g00s: lol Feb 07 03:03:12 <_genuser_> JakeWharton: so I'm doing .fit().centerCrop().into(mView); this would resize teh bitmap to avaialble area I understand that part. Feb 07 03:03:58 <_genuser_> JakeWharton: question is: would it also create a very small bitmap in memory. would it help if my RequestHandler actually created teh bitmap that was 50x100 instead of passing back an InputStream and letting picasso resize it? Feb 07 03:04:28 It would not help. Let Picasso do it. Feb 07 03:04:45 <_genuser_> so I should focus on caching then? Feb 07 03:05:10 Basically a web browser with an address bar and no window to view anything Feb 07 03:05:17 Any help is much appreciated! Feb 07 03:05:21 I mean, if you know that's the size and you have a specific way of making those Bitmaps efficiently then go for it, but Picasso is going to do all the inSampleSize calculation and serialized Bitmap resizing automatically. Feb 07 03:05:30 <_genuser_> I'm retrieving JPEG bytestream from db in RequestHandler and returning new Result(new ByteArrayInputStream(jpeg_data), LoadFrom.DISK); and then calling .fit().centerCrop() on the other end Feb 07 03:05:44 That should be fine. Feb 07 03:05:59 And efficient Feb 07 03:06:21 Although if you have the bytes already... Feb 07 03:06:28 <_genuser_> ok, that's perfect then. I'll focus on implementing the DiskLruCache lib then. because the only other place I'll get speed is cutting out DB dips Feb 07 03:06:37 Yes. Feb 07 03:06:44 Then the data can be streamed from disk Feb 07 03:06:52 Thus avoiding the byte[] Feb 07 03:07:53 <_genuser_> LoadedFrom.DISK is misused here by me. I read it off a webservice which returned it from a DB in a convoluted format. I then parsed out the byte[]. Feb 07 03:10:34 Got a quick question guys Feb 07 03:10:54 I was looking at google material design and saw a section on the SnackBar, but there was no documentation for it Feb 07 03:11:11 drose379: isnt the spec the documentation? Feb 07 03:11:12 lol Feb 07 03:11:23 the spec? Feb 07 03:11:29 google design spec Feb 07 03:11:42 Yeah but theres no code documentation Feb 07 03:11:55 thats because there is no code Feb 07 03:12:08 So how does one go about implementing it? Feb 07 03:12:17 make a android view and animate it Feb 07 03:12:18 lol Feb 07 03:12:37 So they want you to design it yourself Feb 07 03:12:51 <_genuser_> drose379: http://stackoverflow.com/questions/25633695/is-there-code-for-snackbars-in-android-l-or-are-we-expected-to-implement-them-ou Feb 07 03:12:53 no, they designed it Feb 07 03:13:03 hi,all , why i cann't connect hidden ssid wifi using android 4.0.3 system Feb 07 03:13:26 If they design it, how do i implement it without them giving me some code documentation Napalm Feb 07 03:13:46 this is normally how programming works Feb 07 03:13:55 someone designes something, the developer builds it Feb 07 03:13:56 lol Feb 07 03:14:09 the spec is there Feb 07 03:14:09 So bascially SnackBar is just an idea Feb 07 03:14:16 if you design it... they will code... Feb 07 03:14:18 Material Design is an idea Feb 07 03:14:19 lol Feb 07 03:14:22 <_genuser_> think of as UI guidelines and ideas Feb 07 03:14:27 thats what a "design" is Feb 07 03:14:37 Well I was thinking of it as something like Toast\ Feb 07 03:14:43 But I guess its not like that Feb 07 03:14:44 correct Feb 07 03:14:54 you could even implement it with the Toast class Feb 07 03:14:57 <_genuser_> they're saying we think this is cool. and since you dumbasses have barely learnt Nav Drawers and all that, we'll put something new out there to keep you on them toes. Feb 07 03:16:19 Ok, I also found a Library on github that a guy createed Feb 07 03:16:28 https://github.com/nispok/snackbar Feb 07 03:16:38 So I could also use that, but do you reccomend building my own? Feb 07 03:16:53 <_genuser_> yeah the SO link had the same lib, I think. Feb 07 03:17:04 Yeah it did Feb 07 03:17:06 <_genuser_> you can actually read thru the code in the library to see they implemented it. Feb 07 03:17:22 <_genuser_> might give you a better ideas on "design" vs. "implementation" and how they're separated. Feb 07 03:17:35 When I add compile nipsok:snackbar 2.7.5 Feb 07 03:17:49 Where is that coming from? Somewhere online? Feb 07 03:17:56 the repo Feb 07 03:18:04 <_genuser_> are those gradle instructions? Feb 07 03:18:09 jcenter or maven.. whatever you setup in your gradle config Feb 07 03:18:35 The repo is hosted online right? Feb 07 03:18:45 drose379, of course Feb 07 03:18:48 where else would it be Feb 07 03:18:51 on your computer? Feb 07 03:18:53 No idea Feb 07 03:18:55 <_genuser_> ok, I see. sorry I'm still using eclipse. I just download the jars and import them using build path dialog. Feb 07 03:19:19 <_genuser_> drose379: are you using AS or eclipse? Feb 07 03:19:26 AS Feb 07 03:19:44 I just add it to dependencies in build.gradel Feb 07 03:19:46 gradle Feb 07 03:19:47 * Feb 07 03:20:12 <_genuser_> I see. then I'm not going to have a clue. I haven't moved to AS fulltime yet. I just installed it and left it alone. Feb 07 03:20:15 hmm, just looking at that code.. i might have done a few things more simply.. but in general its not bad Feb 07 03:20:50 Would it be a good learning experience to build it myself? Feb 07 03:21:03 <_genuser_> Napalm: lol after you comment I thought let me go wth a snackbar really is. Feb 07 03:21:27 _genuser_: i dont follow what you mean Feb 07 03:22:01 <_genuser_> Napalm: I didn't even know what it is, until he asked and you mentioned that the code wasn't all that great. so I went back to material design website to see what it's description is. Feb 07 03:22:15 <_genuser_> *its Feb 07 03:23:05 Is there a way to have a master listview filled with nested listviews Feb 07 03:23:13 And the nested listviews are not scrollable Feb 07 03:23:17 Only the master onei s Feb 07 03:23:19 <_genuser_> I like the idea of it. sort of a cleaner toast with action buttons/links on it. Feb 07 03:23:20 one is Feb 07 03:23:55 drose379: not with ListView.. just wont work. you can however do it with RecyclerView Feb 07 03:23:55 <_genuser_> drose379: like the preferences screen type deal? Feb 07 03:24:22 Dont know Feb 07 03:24:31 _genuser_ Feb 07 03:24:33 <_genuser_> Napalm: you could hack it so the top level getView just returns stacked TextViews (for example) in a LinearLayout. Feb 07 03:24:52 <_genuser_> but sounds like pointless work if there's a better way Feb 07 03:25:10 _genuser_: he asked specifically a listview Feb 07 03:25:19 _genuser_: plus what you suggest doesnt recycle the views Feb 07 03:25:20 <_genuser_> Napalm: true true. Feb 07 03:25:44 <_genuser_> n00b suggestions are going to be... less efficient. :D Feb 07 03:26:38 _genuser_ you a noob? Feb 07 03:26:43 <_genuser_> drose379: sure. Feb 07 03:26:48 How new? Feb 07 03:27:39 <_genuser_> drose379: I don't do android fulltime. I have done 3 complete apps. and working on my 4ths. trying to see where I can out friends for smalltime contracting work. Feb 07 03:27:53 <_genuser_> *help out friends... Feb 07 03:28:03 What you working on now? Feb 07 03:28:41 <_genuser_> taking picture of a location, posting them back to db. downloading them from db (or local) as a single package, parsing them out and displaying them in a gridview. Feb 07 03:29:00 Sweet Feb 07 03:29:10 <_genuser_> my personal one was bitcoin pool stat displayer. I actually published that app in the app store. Feb 07 03:29:24 Howd it do? Feb 07 03:29:28 <_genuser_> but instead of marketing it to fellow miners, I just lost interest in mining and it's just siting there. Feb 07 03:29:37 Argh Feb 07 03:29:38 <_genuser_> it has all 5 stars the last time I checked. Feb 07 03:30:00 hey guys Feb 07 03:31:03 _genuser_ nice job Feb 07 03:31:09 <_genuser_> :) Feb 07 03:31:12 I'm trying to turn a mysql database selection into a listview with the following properties: a text value, an image that is static to all of the items, an integer value, another static image, and another integer value Feb 07 03:31:28 anyone want to point me in the right direction for what to do? I think I need an arrayadapter Feb 07 03:31:42 TheKarlBrown you need to extend ArrayAdapter Feb 07 03:31:52 is that the only way Feb 07 03:32:05 I think so, where are you stuck? Feb 07 03:32:06 <_genuser_> TheKarlBrown: you're retrieving a recordset where each row has text|image|int|image|int ? Feb 07 03:32:17 Hey guys, I haven't coded anything for Android in over a year and want to get back into it, I was wondering if anyone has any reccomendations for a game library to learn? or if I should try making games without a third party library? Feb 07 03:32:19 No, the recordset has text, int, int Feb 07 03:32:30 <_genuser_> TheKarlBrown: and for each you need a listview item? Feb 07 03:32:30 well it will have other stuff also but for the view I only need the text, int int Feb 07 03:32:35 yessum Feb 07 03:33:03 <_genuser_> TheKarlBrown: BaseAdapter. you'll extend it and for each row you'll return a listview item. Feb 07 03:33:05 it will be "Name," image from drawable, int rendered as text, image from drawable, int rendered as text Feb 07 03:33:56 <_genuser_> TheKarlBrown: http://www.vogella.com/tutorials/AndroidListView/article.html Feb 07 03:34:13 <_genuser_> TheKarlBrown: that guy does a decent job. the articles are a bit long. but you'll really understand it by the time you're done. Feb 07 03:37:01 Also is android studio recommended over eclipse now? Or is it still personal preference? Feb 07 03:37:22 <_genuser_> it's the only thing supported after api 18. Feb 07 03:37:39 <_genuser_> in eclipse you can't go higher than 18. the adt plugin will cry and moan. Feb 07 03:38:29 Ah okay thank you! Last time I coded for android, android studio was still a horribly buggy and barely functional piece of software lol Feb 07 03:38:53 <_genuser_> still using eclipse here. but AS has good feedback as of late. Feb 07 03:39:41 Meh. On Day 1 from forking IntelliJ IDEA, Android Studio was a superior alternative to Eclipse Feb 07 03:40:19 Well it was bad on Linux at least, not sure how well it worked on other platforms Feb 07 03:40:38 <_genuser_> I'm only using eclipse because my project was already started. and migrating it was work. Feb 07 03:40:47 Is it better to make like 6 HTTP requests and get the data all sorted out for me, or make 1 HTTP request and sort out the data in the java Feb 07 03:40:48 <_genuser_> I do have AS installed and working for new projects. Feb 07 03:40:57 Im guessing its better to just make one request Feb 07 03:41:32 <_genuser_> drose379: depends on how much work it is to sort the data. Feb 07 03:41:42 Not much Feb 07 03:42:06 <_genuser_> if it's not cpu intensive and the device won't be the bottleneck, get it one shot and sort it out. Feb 07 03:42:29 Got it, thanks Feb 07 03:43:17 drose379 nispok snackbar has worked well for me. one of the few libs i use Feb 07 03:43:24 _genuser_, http://stackoverflow.com/questions/13635319/how-allow-a-specific-character-in-android-numerical-keyboard Feb 07 03:43:52 Thanks g00s Feb 07 03:44:05 _genuser_, accepted answer but it dont work for me when i used an external keyboard Feb 07 03:46:16 <_genuser_> kuldeepdhaka: not even with a button adding it after the digits? Feb 07 03:46:39 _genuser_, cant add a button. Feb 07 03:46:45 they want to make money, groxx Feb 07 03:46:48 that's why Feb 07 03:46:56 _genuser_, (and not tried with a button) Feb 07 03:47:15 <_genuser_> so you're allowing a full keyboard with the digits property? Feb 07 03:47:22 weird Feb 07 03:47:24 random discon Feb 07 03:48:07 eclipse is faster than AS, matters on slow hardware Feb 07 03:49:34 yeah, its pretty obvious on slow hardware Feb 07 03:49:40 _genuser_, "so you're allowing a full keyboard with the digits property?" ? Feb 07 03:49:50 myke: Been my experience as well, I have reluctantly switched to AS since it's the new standard Feb 07 03:51:34 but man, some of the way it works looks so slow and awkward compared to eclipse Feb 07 03:53:59 deuteros__: if you turn off inspections (there's a thing in the bottom right corner), is it a nicer experience? Feb 07 03:54:27 groxx: It's not just about slowness (it's markedly slower than Eclipse but not a problem overall Feb 07 03:54:46 more about the silly things such as no incremental compilation, having to sync build.gradle, manually, ... Feb 07 03:54:52 lot of things I took for granted with eclipse Feb 07 03:54:58 deuteros__: AS is definitely slower, but I'm on a beefy machine. hard to test things, but I'd be curious if anything works so I can suggest it. Feb 07 03:55:06 I mean pressing a key to compile, that's so 2000s Feb 07 03:55:10 lol Feb 07 03:55:30 I press meta-f9 way too many times during the day Feb 07 03:55:35 ikr? and it burns through my battery faster than any game Feb 07 03:56:45 I prefer it in general, but it's a bit surprising how power-hungry it is. Feb 07 03:56:59 I blame Swing Feb 07 03:57:30 <_genuser_> yeah, eclipse is as light as notepad vs. AS on my computer. then again 100+ chrome tabs will make anything run slow. Feb 07 03:57:37 <_genuser_> it's all the paging to disk that's slowing things down. Feb 07 03:58:33 The fact that control n means different things all the time drives me nuts too Feb 07 03:59:23 <_genuser_> eclipse is too annoying in not allowing F3 for search next. as opposed to aaaaaaaaaaall the other windows apps Feb 07 04:00:05 that doesn't bother me as much as "next occurrence" (ctrl-.) only navigates in the same buffer and not to the next file Feb 07 04:00:39 <_genuser_> guess it's what we get used to that makes it harder when it's not supported. Feb 07 04:04:03 at least there's a half-way decent vim plugin. Feb 07 04:05:20 <_genuser_> onto intentservice! Feb 07 04:09:07 <_genuser_> now, should i just have one or multiple... that's the design question. Feb 07 04:09:10 <_genuser_> :) Feb 07 04:11:01 Don't use a vim/eclipse plug-in when you use an IDE, learn the darn thing Feb 07 04:11:30 Hey guys, I'm having a hell of a time doing a login/registration activity for my app. I'm frustrated, which isn't helping things. How bad is it if I have one call to my RESTful backend to check if the user exists, and then one to create a User object from data returned from a call? Feb 07 04:11:40 ok so I am modifying baseadapter by extending it, and I am wondering how I should bring data to it from a mysql database. I will be using a mysql database to govern submissions added from my application, and it will have to send the data back to the server. ideally it doesn't send the entire database Feb 07 04:11:50 t0astt: Seems perfectly normal, what's the problem? Feb 07 04:12:18 groxx deuteros__ i'm still using a Core 2 Duo - the difference is amazing Feb 07 04:12:18 deuteros__: I think I'm just being a performance nazi or trying to do my app "the right way". And I'm wracking my brain trying to do that, and it's frustrating me. Feb 07 04:12:41 should I create a data container with my specific mysql results to contain all my information (a few text fields, integers,) or should I convert it all to an arraylist with multiple fields? Feb 07 04:12:43 t0astt: I don't see any way to check for duplication than a server call Feb 07 04:12:50 O Feb 07 04:13:02 Also I can't help but feel like I'm going the wrong route by using the loopj Async HTTP library Feb 07 04:13:22 ,I'm trying to do it the most efficient way possible. keep in mind the user will be filtering these results by scanning through the container, or altered containers being pushed fromt he server Feb 07 04:13:27 not familiar with this specific library but as long as it's async, sounds like a reasonable choice Feb 07 04:13:31 But OkHTTP seems more complicated, and when I had Retrofit recommended to me, it went way over my head. So that also frustrated me more Feb 07 04:15:32 t0astt: fwiw I've used loopj pretty heavily. it works, but there are a bunch of surprising edge cases, and I'm definitely not a fan. Feb 07 04:15:54 it does "simple" pretty well, but it's annoying :/ Feb 07 04:20:37 TacticalJoke when you retried the unit testing stuff in AS, you re-installed from scratch right ? Feb 07 04:21:40 Yeah. It was a Windows-specific bug. Feb 07 04:22:39 https://android-review.googlesource.com/129603 Feb 07 04:24:07 The issue was that the mockable android.jar was appearing in the class path ahead of the JUnit stuff. Feb 07 04:24:55 (And that JAR has an "empty" JUnit implementation inside. Feb 07 04:24:59 ) Feb 07 04:25:48 t0astt: there's a bunch of REST implementations for android Feb 07 04:36:25 "Spaceballs: The Search for More Money," awesome :D Feb 07 04:40:41 This reddit app I use is so dumb. Regularly fills my hard drive with pointless caching. Keep getting "disk capacity is too low -- system processes may fail" message. Feb 07 04:41:02 Gee, thanks for giving me a 1GB cache of old reddit comments. Feb 07 04:41:19 lol Feb 07 04:41:32 you might REALLY want to go back and re-read them. relive the memories. Feb 07 04:41:41 :D Feb 07 04:49:20 http://www.reddit.com/r/androiddev/comments/2v0yxz/publishing_your_first_app_the_license_of_the/ Feb 07 04:49:27 "But if i buy the song on iTunes i don't get the license of it?" Feb 07 04:53:01 Levite yeah, thats /r/androiddev for ya :) Feb 07 04:54:32 <_genuser_> dagnabit, you can't send binary data via intents. Feb 07 04:54:58 not too well. save to disk. Feb 07 04:55:45 <_genuser_> yeah, it's lot of processing and saving to disk will take even longer. Feb 07 04:56:01 <_genuser_> guess, I'll just make the whole thing available as static var from the caller. Feb 07 04:56:13 <_genuser_> but not sure who that will scale Feb 07 04:56:26 Don’t use statics to pass things around Feb 07 04:57:19 <_genuser_> I'm doing quite a bit of disk i/o. not wanting to save binary blobs to disk for passing to IntentService. Feb 07 04:57:48 <_genuser_> I might make an Application wide Queue where I add "work" that need to be done. and just trigger the service with the item id or something Feb 07 04:58:48 _genuser_ thats what AsyncQueryService does Feb 07 04:59:46 <_genuser_> g00s: so don't use IntentService but rather use AsyncQueryService? Feb 07 05:00:19 i'm just saying, thats the technique used there (queue) Feb 07 05:00:46 since putting onto the queue starts the service, it shouldn't be lost Feb 07 05:01:05 <_genuser_> AsyncQueryHandler is it? Feb 07 05:02:59 _genuser_ yeah, its in Calendar app i think Feb 07 05:03:21 <_genuser_> oh I see that one. So you're saying the Queue idea is pretty alright? Feb 07 05:03:47 should be. since the service rips through the queue and then shuts down Feb 07 05:04:30 <_genuser_> I see. but now I have to subclass application and create a whole other thing. I'm trying to keep this simple but it wants to go nuts. :) Feb 07 05:04:33 i actually took that idea a little further, and made an Rx Scheduler out of it :D Feb 07 05:05:03 why would you subclass Application ? Feb 07 05:05:27 <_genuser_> interesting. I'm sure I could serialize my byte_array into a parcelable and send it via the intent that way. but that's too much work. Feb 07 05:05:43 <_genuser_> oh, subclass application to create an application wide Queue. Feb 07 05:05:58 AsyncQueryService doesn't subclass Application Feb 07 05:06:03 <_genuser_> so multiple activities could put crap on this queue for requesting work. Feb 07 05:06:16 look at the code ;) Feb 07 05:06:16 <_genuser_> AsyncQueryService implements it's own Queue then? I'll have to read thru it a bit more. Feb 07 05:06:30 <_genuser_> yeah, looking at the code will be better. Feb 07 05:06:33 its AsyncQueryService and AsyncQueryHelper i think Feb 07 05:06:50 i'm just pointing it out, as a design pattern / idea Feb 07 05:06:52 <_genuser_> yeah, I"m seeing that in google results. Feb 07 05:07:06 <_genuser_> I'll have to look at it to see how I want to proceed with this. Feb 07 05:07:15 they do extra stuff like have cancelable tasks, delayed execution, etc which you may not need Feb 07 05:07:22 <_genuser_> at least, I didn't get started coding AsyncTask idea. Feb 07 05:07:52 i've never used AsyncTask :D Feb 07 05:07:53 <_genuser_> mine is really not cancelable. I kinda need to really not crap out after the fact. So unless an exception is raised, it must go thru. Feb 07 05:10:02 <_genuser_> *need _it_ to not... Feb 07 05:29:47 :\ anyone know if there's a "get the most-used color in this image" library? Palette isn't quite fitting the bill - the population value returned by it seems to be _exact_ color matches only, not rough matches. So if there's a tiny bit of a gradient on a BG, a small bit of text outweighs it. Feb 07 05:32:12 as an example: http://i.comicchameleon.com/comics/banners/33.jpg <- the most-populous color there is the skin-tone in the nose-area. Feb 07 05:33:27 <_genuser_> ah, crap. you have to call it from an activity. Feb 07 05:33:45 <_genuser_> to call it from an object that doesn't have a reference to an activity, I have to pass around activity references. Feb 07 05:34:27 you need a context, yeah - to start the service Feb 07 05:36:15 <_genuser_> so getApplicationContext() is all it will accept. from my activity I can't pass new Intent(this, intentservice.class); Feb 07 05:39:34 <_genuser_> g00s: alright, at least I was able to run an implementation of if. nice. thanks for all the hints. I'll now try to move the work to it slowly. Feb 07 05:40:11 yw Feb 07 05:47:26 Hellos developers Feb 07 05:47:36 anyone from india Feb 07 05:48:07 I am working on a BLE app and have a issue in that Feb 07 05:48:31 trying to call a new activity but it crashes the app Feb 07 05:48:41 using startactivity method Feb 07 05:48:48 is that right Feb 07 05:48:50 ? Feb 07 05:52:47 Read the stack trace Feb 07 05:54:13 need some help on calling an activity Feb 07 05:54:31 No, you need to read the stack trace Feb 07 05:55:03 ^^ Feb 07 05:55:14 it's in yer log... Feb 07 05:56:41 If anyone is bored/mildly interested, could you take a quick look at my DecisionActivity real quick to make sure I'm doing the asynchronous calls correctly? http://pastebin.com/Pxv7hkyn Feb 07 06:07:30 Has anyone used RetroFit? Feb 07 06:08:03 I'm receving a JSON response and one of the items has a string which is in fact JSON but it first needs to be parsed. Using models how can I achieve such a thing so that I tell it to first parse it? Thank you Feb 07 06:13:43 Has anyone used RetroFit? Feb 07 06:13:45 I'm receving a JSON response and one of the items has a string which is in fact JSON but it first needs to be parsed. Using models how can I achieve such a thing so that I tell it to first parse it? Thank you Feb 07 06:17:05 Would a data type adapter be used for this? Feb 07 06:17:16 dvass: Someone mentioned Retrofit to me earlier, but it looked a little too confusing me so I said screw it. Sorry I can't help you out :P Feb 07 06:17:56 yes, you would use a type adapter if you're using Gson (the default converter) Feb 07 06:21:01 1.1.0-rc2 is available. Feb 07 06:21:23 f2prateek: so I would tell it whenever it sees type User.class to use this adapter Feb 07 06:21:33 to convert the string into JSON, right? Feb 07 06:21:42 Randomly tried it and it worked. lol Feb 07 06:22:02 I don't know what your json or User.class looks like so I can't say for sure Feb 07 06:23:50 sorry. Feb 07 06:24:04 the item 'user' in my JSON is a string that needs to be parsed into JSON Feb 07 06:24:14 so I get my response and for user I want to maek it my UserModel Feb 07 06:24:26 so I'm assuming the adapter needs to be attached to UserModel.class Feb 07 06:24:27 I am under the impression that you cannot use xml android:onclick references while in fragments. is this correct? Feb 07 06:24:39 that there is no way to reference the fragment, not the activity Feb 07 06:24:40 TheKarlBrown_: I believe you can Feb 07 06:24:54 I think they fire in the Activity only. Feb 07 06:25:02 TheKarlBrown_: Moot point anyway, do not use android:onclick. Put those where they belong, in the code Feb 07 06:25:10 ok I was doing that b4 Feb 07 06:25:16 tank yew Feb 07 06:25:56 who wants to see the app I started coding yesterday that lead to the 5 hour chase for properly space toolbar buttons :3 Feb 07 06:28:07 Yay. Unit tests fail now in AS on Windows! (When using 1.1 RC2 of the Gradle plugin.) Feb 07 06:29:57 Though this is weird: it doesn't seem to have mockable-android-21.jar in the runner's class path. Feb 07 06:30:49 Wait, never mind; it does. Feb 07 06:31:22 I've got a blank LinearLayout in XML. When I try to add a java-created LinearLayout to this blank one, using blankLL.addView(JavaCreatedLayoutObject), it says JavaCreatedLayoutObject already has a parent. What am I missing here? Feb 07 06:33:08 The reason it works is that 1.1.0-rc2 removes the 'junit' classes from the mockable android.jar. Feb 07 06:34:59 oops, i gave the layout inflater the parent already Feb 07 06:35:09 Awesome. Finally JVM unit testing in AS. Feb 07 06:35:22 Without horrible hacks or hoop jumping. Feb 07 06:35:48 F*** Android Studio. Google better stop complecating things, just for looks. Feb 07 06:36:14 hi Feb 07 06:36:30 borw3: What are they complicating? Feb 07 06:37:30 I have a webview in my android app which opens a play.google.com link , but it is showing the browser link , i want it to redirect to play app , is there a way ? http://market links are redirected but not play.google.com links Feb 07 06:37:50 Everything, new structure, no more C++ on android dev, Lags like hell. And soon Android developing wont even be possible on 32bit OS's Feb 07 06:38:08 chinu: Start an intent for the play store app? Feb 07 06:38:23 chinu: I forget the details, but it's the shouldOverrideUrlLoading thing. Feb 07 06:39:00 yeah that i am doing to override the market links but is there a way to do that for play.google.com links as well ? or i have to manipulate the link myself with code ? Feb 07 06:39:04 TacticalJoke: now if only it was TestNG and not JUnit, it would be nirvana Feb 07 06:39:26 chinu: As far as I know, the only way to do something like this is to manualy check each URL. Feb 07 06:39:27 I could be wrong. Feb 07 06:39:42 My app keeps crashing on open after I try to add interface to main activity for fragment -> activity communication http://puu.sh/fAbiz/231403efb5.png Feb 07 06:40:20 This is my view pager. I am trying to make a toast to say what position of view pager I'm on to my activity. http://puu.sh/fAbqz/10354b0ed7.png Feb 07 06:40:25 DragonPunch: How are we supposed to help you with a snapshot of your code?!? Feb 07 06:40:30 actually the link is from a refrrel network , will manipulating the link interfere with my affilations ? TacticalJoke Feb 07 06:40:43 i can give you a pastey but its rather long Feb 07 06:40:54 No, what’s the error? Start with that Feb 07 06:40:54 deuteros: Since these are JVM tests, can't you just use TestNG here? Feb 07 06:41:02 TacticalJoke: possibly, haven’t tried yet Feb 07 06:41:11 just sad junit is the default, that’s all :) Feb 07 06:41:11 http://hastebin.com/cezuxehave.java Feb 07 06:41:31 Yeah, I'm not a huge fan of JUnit. Though I wasn't particular impressed by TestNG, to be honest. Feb 07 06:41:51 I guess it's still better than JUnit. Feb 07 06:44:35 anyone know why my app keeps crashing on open after trying to implement interface for fragment -> activity communication? Feb 07 06:44:53 All im trying to do here is have a toast tell me what position my view pager is from the activity. Feb 07 06:45:04 DragonPunch: As long as you don’t show the error you’re having, I doubt you’ll get much help Feb 07 06:45:33 I'm not getting an error in my code. It's just starting and says 'MyProgram has stopped working' Feb 07 06:46:38 http://puu.sh/fAc5r/7489a64d24.png Feb 07 06:46:46 my debug console is empty Feb 07 06:47:07 DragonPunch: then you have a stack trace somewhere, find it Feb 07 06:48:06 a stack trace is? Feb 07 06:48:34 deuteros: i'll leave you with that one Feb 07 06:48:36 ;) Feb 07 06:48:46 night all Feb 07 06:50:24 i found this Feb 07 06:50:25 http://hastebin.com/apuhehajuy.avrasm Feb 07 06:50:56 did not call through to super.onAttach() Feb 07 06:50:58 is my error Feb 07 06:50:58 ok Feb 07 06:51:47 thank u error log Feb 07 06:55:13 http://stackoverflow.com/questions/28379498/parsing-nested-json-using-retrofit-for-android Feb 07 06:55:29 If you have any experience with RetroFit I'd be much obliged if you wold take a look Feb 07 06:55:46 Thank you! Feb 07 06:58:02 hi guys Feb 07 06:58:20 I have a gradle error "trouble processing "javax/xml/parsers/DocumentBuilder.class": Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library." Feb 07 06:58:36 This is my gradle.build http://pastebin.com/1bi9ub7J Feb 07 06:59:12 Does anyone have suggestions for how to get the current application context from a class that extends baseadapter? Feb 07 07:00:24 TheKarlBrown_: http://stackoverflow.com/questions/16594557/how-to-get-context-for-baseadapter-in-android Feb 07 07:00:48 My logcat stops printing messages from time to time. For example, I start emulator and logcat is working fine, then I run the app again and it stops. And then I have to reopen my project and it works fine again. I don't change anything. Anybody experienced this behaviour? Feb 07 07:04:28 Thank yew kisk Feb 07 07:04:29 kism Feb 07 07:06:26 JakeWharton: Unit tests working on windows with 1.1.0-rc2. :D Feb 07 07:07:06 Windows* Feb 07 07:09:41 TacticalJoke: excellent Feb 07 07:09:45 Any other changes? Feb 07 07:11:05 Not sure. I paid so much attention to their unit-testing changes that I ignored everything else. Haven't noticed anything yet from using it. Feb 07 07:11:12 dvass: I have retrofit experience Feb 07 07:14:56 <_genuser_> JakeWharton: have you written a library yet that guesses what we want and code the entire application up? :P Feb 07 07:19:41 Apps that lock only one portrait orientation are slightly evil. Feb 07 07:20:33 havent heard anything about square for a while Feb 07 07:20:38 those guys still in business? Feb 07 07:21:11 <_genuser_> my church book sales use square still.... Feb 07 07:21:29 on their website, "The POS software that’s simple, powerful, and free." Feb 07 07:21:39 The piece of shit software that's simple... Feb 07 07:21:40 lol Feb 07 07:22:19 Fuck square Feb 07 07:22:38 lolwat Feb 07 07:22:44 <_genuser_> JakeWharton: no did you really say that? Feb 07 07:22:51 I'm with pifon Feb 07 07:23:01 <_genuser_> LOL Feb 07 07:24:38 :) Feb 07 07:25:00 please suggest some tutorials for android studio Feb 07 07:25:15 for begginers Feb 07 07:25:56 gaganchd2000, slidenerd on YouTube has some pretty good videos - if you look at his more recent vids, he is using AS Feb 07 07:45:19 gaganchd2000: Bucky Roberts: https://www.youtube.com/playlist?list=PL6gx4Cwl9DGBsvRxJJOzG4r4k_zLKrnxl :) Feb 07 07:49:58 is there a way to get your text size to scale to the height of your layout? Feb 07 07:50:23 I tried to use a customzied view but it freaked out my dataadapter Feb 07 08:13:36 Hello. I am having a (trivial) error https://gist.github.com/vedant1811/cb6d53e32de1b016fef4 involving Object... type parameter Feb 07 08:16:09 ey guys, how do i get translucent status bar like this? Feb 07 08:16:09 http://www.google.com/design/spec/style/imagery.html#imagery-ui-integration Feb 07 08:16:28 been googling for past 30 minutes now, it shouldn't be this hard... Feb 07 08:17:04 and I don't want a drawerlayout, which most of the google answsers are based off Feb 07 08:19:28 I am trying to do lollipop Feb 07 08:21:24 vedu: WHat is the exact error message? Feb 07 08:22:14 TacticalJoke: Its resolved :) there are LatLng classes from different packages Feb 07 08:22:40 Ah, I wondered about that. :) Feb 07 08:23:40 meetoman: Are you talking about the toolbar? Feb 07 08:24:04 Oh, I guess not. Feb 07 08:24:39 i always like reading about programming languages, even if its the "other side" :) http://appleinsider.com/articles/15/02/07/apples-new-swift-programming-language-takes-flight-with-getty-images-american-airlines-linkedin-and-duolingo Feb 07 08:25:40 seems like the reception to Swift pretty positive Feb 07 08:25:53 Yeah, I love learning new programming languages. It's so satisfying seeing the new world view that the language offers. Feb 07 08:27:14 so what does that mean for us android devs not doing swift? well, if its a very productive language its time to bring out bigger guns :D Feb 07 08:27:35 can't have apple guys writing the same functionality in 1/2 the time ;) Feb 07 08:27:54 meetoman: Is this related to your question? http://stackoverflow.com/a/19733218 Feb 07 08:28:34 i thought it was interesting they claimed Swift was inpsired by Rust Feb 07 08:28:36 g00s: Do you envision yourself using Kotlin anytime soon? I can see myself using it within a year. Feb 07 08:28:44 among other languages Feb 07 08:28:53 TacticalJoke, no, status bar Feb 07 08:29:29 TacticalJoke yeah, i'm trying to figure out what part of my app to use it in. dont have time to rewrite stuff, and i'm also hesitant to use it in the lower level stuff i may spin off as libraries because then it will depend on the kotlin runtime Feb 07 08:30:48 that is, the libraries will depend on kotlin runtime Feb 07 08:30:50 TacticalJoke, I am using Material Feb 07 08:33:11 TacticalJoke also you have to wonder, if kotlin and swift are similar, if it makes developing for android / ios (by the same dev) easier Feb 07 08:33:38 hi g00s, havn't seen you for a while Feb 07 08:33:44 hey meetoman what is up Feb 07 08:33:46 gota update my lollipop skills now :) Feb 07 08:34:08 yeah i dont know anything about lollipop. i kept my n7 on 4.4 Feb 07 08:34:16 http://www.androidpolice.com/2014/07/04/android-l-spotlight-colored-transparent-status-bars-give-apps-even-control-design/ Feb 07 08:34:28 this is so stupid, it's like one of their biggest feature but there is no examples of it Feb 07 08:35:17 i'm sure by now lots of people have asked about that on SO Feb 07 08:35:27 has to be some info on it somewhere Feb 07 08:35:57 Hi all, any chance someone could spare a second to help with a simple (I think) problem? Feb 07 08:36:06 there is, http://stackoverflow.com/questions/27856603/lollipop-draw-behind-statusbar-with-its-color-set-to-transparent Feb 07 08:36:09 except none of them works Feb 07 08:36:16 I really hate google for this Feb 07 08:36:31 wrong answer should not be SEOed Feb 07 08:37:40 I'm trying to sort out image uploads through webview and just want to know how to assign ValueCallback to a ValueCallback Feb 07 08:38:23 I know its more of a Java question, but can't see to find the answer anywhere, I keep getting can't initialize here. Feb 07 08:39:23 :( Feb 07 08:41:42 pjuu you can ask java questions in #java ; i dont know anything about webview . but is one Uri, is an array of them Feb 07 08:42:39 g00s: Thanks... I think I may have sorted it with a cast. Im from the scripting language world so just getting used to jumping though hoops :) Feb 07 08:42:45 javascript lets you do terribly dumb shit with types, but java is a stickler :) Feb 07 08:43:03 g00s: thanks :) Feb 07 08:51:33 ok anybody good with Android 5.0? Feb 07 08:51:34 http://stackoverflow.com/questions/28177313/android-lollipop-imageview-ignoring-fitssystemwindows-attribute-transparent-st Feb 07 08:51:42 I am having same problem Feb 07 09:17:11 anybody still here can help me out? ;| Feb 07 09:21:16 Howdy, comming from flash/js. Looking at messing with android. Anyone know some good tutorials? Most of ones on the first few pages of google seem outdated/quality is not that great. Feb 07 09:22:08 developer.android.com Feb 07 09:26:41 I bought my IAP from amazon for testing purposes but they seem to be giving it for free? — https://dl.dropboxusercontent.com/u/8176796/Screen%20Shot%202015-02-06%20at%2019.51.46.png Feb 07 09:27:13 Shoud I be concerned about this? Feb 07 09:27:27 hi, help me :(, how to show the recent activity dialog using the intent? Feb 07 09:30:10 meetoman I could not figure out one of the bigginer basic steps, gave up on the site. Feb 07 09:31:24 :*( Feb 07 09:32:02 http://developer.android.com/training/basics/firstapp/building-ui.html > Change renderlayout to linerlayout. I can only see linerlayout horizontal & vertical. which one? Also can't delete renderlayout or see any option forit to let me change it? (Pretty nubby at this sorry Feb 07 09:33:22 renderlayout? Feb 07 09:34:08 relativeLayout mybad, was going off memory Feb 07 09:34:59 just change RelativeLayout to LinearLayout Feb 07 09:35:04 anyone know com.android.systemui.recents.RecentsActivity ? Feb 07 09:36:11 You can also draw behind the status bar yourself. For example, if you want to show the status bar transparently over a photo, with a subtle dark gradient to ensure the white status icons are visible. To do so, set the android:statusBarColor attribute to @android:color/transparent and adjust the window flags as required. You can also use the Window.setStatusBarColor() method for animations or fading. Feb 07 09:36:15 this is waht it says Feb 07 09:36:19 but yet how do I freaking do that? Feb 07 09:36:20 Ashiren yeah, which is what i'm asking -how- to do. Entertain me, even if it's blindly trivial Feb 07 09:36:22 that is something relatively simple Feb 07 09:36:39 Eppiox: edit the xml Feb 07 09:37:00 i dont use android studio so i dont know if its hard there Feb 07 09:38:31 mmk, maybe that's my problem. Getting to the xml from inside the studio. Just shows me other stuff gui related. Feb 07 09:39:09 isnt there like editor mode Feb 07 09:39:26 Click 'Text' at the bottom left. Feb 07 09:40:28 lol -_- . This is going to a frustrating :D thanks TacticalJoke Feb 07 09:41:09 It gets much easier. Feb 07 09:41:16 :o Feb 07 09:46:13 when working with HandlerThread, should we quit it manually or can we depend on the system to do that on our behalf automatically later ? Feb 07 09:48:06 whats the best way to pass a custom class between fragments via a bundle? is it json, get methods from your activity, or parcel? Feb 07 09:48:18 the class is a datacontainer of arraylists and methods Feb 07 09:48:51 is it serializable Feb 07 09:49:30 shmoon_: You quit it Feb 07 09:49:45 ashiren I'm embarassed to say I don't fully understand that concept Feb 07 09:49:55 SimonVT: in onDestroy ? Feb 07 09:50:26 Whenever you don't need it anymore Feb 07 09:50:38 alright bud Feb 07 09:51:37 yo playboiiiii Feb 07 09:52:14 TheKarlBrown_: as long as your class doesnt contain nonserializable fields just add implements Serializable Feb 07 09:52:28 ArrayList of serializables is serializable Feb 07 09:52:38 it is less ugly than parcel IMO Feb 07 09:54:08 ashiren imma pastebin it for yu Feb 07 09:54:13 this is getting a little too much, I spent 3 hours now trying to figure out something they put on their website Feb 07 09:54:32 http://pastebin.com/nS8Pwdf1 Feb 07 09:54:51 meetoman I spent 5 hours last night trying to figure out how to get buttons to align evenly not right align Feb 07 09:55:15 without just getting my hands dirty and making extensions of basic functions Feb 07 09:56:53 seems serializable right ashiren? Feb 07 09:58:32 and one of my friend just msged me and told me she doesnt want to talk to me anymore lol Feb 07 09:58:57 TheKarlBrown_: lets see, implement serializable and try it Feb 07 09:58:58 kinda funny, not sure what i even did... and I am trying to figure this stupid thing out at 2am in the morning Feb 07 09:59:02 I blew off partying with 4 chicks tonight or going to a party with drugs to code betch Feb 07 09:59:13 who fucking cares Feb 07 09:59:29 if she isn't close to you, then its no issue Feb 07 09:59:45 if she is close, then she will come around or you will learn a lesson about people or about her (likely both) Feb 07 10:00:35 :v Feb 07 10:01:02 whelp, doing tutorials, balls deep in xml layout. See how some open source games did it.. no xml Feb 07 10:01:43 ashiren im gonna go with parceable instead "The documentation states that you should NOT use Serializable as your go-to parceling mechanism. Because it uses reflection, it's quite heavy on the system. See developer.android.com/reference/android/os/Parcel.html (look for writeSerializable)" Feb 07 10:02:04 eppiox you need to use XML to get a grasp on how android sets up layouts Feb 07 10:02:11 like out of no where... and i m like wtf lol Feb 07 10:03:01 Ya, my xml knowledge is only from webdev and basic encapsulations, getting there. It just looks messy to me Feb 07 10:05:44 at first it made no sense, now I use it so well #learningexperience #relatable #Ishouldsleep #maybeIShouldhavedoneitallinjavaforspeed Feb 07 10:06:18 also open source games need to prolly use librarys that are all graphics, they would cut their mothers to optimize frames Feb 07 10:06:24 kek. I keep thinking 'it's oing to be like html/css ' nooo Feb 07 10:07:17 so id assuming programming games on android is a little different, altho you still will have an easier time learning how layouts are laid out via xml (assuming there even is an efficiency different as opposed to simply a lack of need of xml to achieve their goals) Feb 07 10:07:34 For basic 2d, you can make a spritesheet manager pretty easy in most things. I'm hopeing it's the same for android. At worst i'd need to tessellate/skew Feb 07 10:08:34 hmm Feb 07 10:08:45 for games you practically never use XML or views anyway Feb 07 10:10:56 I'm assuming you can query the screen size/orientation with out it and draw stuff that way. Feb 07 10:11:20 Eppiox, for 2D games the fast performant thing to od is you make a full-screen surface view Feb 07 10:11:29 and then you render on its canvas Feb 07 10:11:37 and you can just go canvas.getWidth(), canvas.getHeight() Feb 07 10:12:01 of course, using a cross-platform game development framework is usually a more sane idea :) Feb 07 10:12:22 maybe this will help you: https://code.google.com/p/beginning-android-games/ Feb 07 10:16:08 hey, one question, is there any difference coding from android studio and eclipse? Feb 07 10:16:13 shouldn't affect the app, right? Feb 07 10:17:06 Thanks Mavrik ^ Feb 07 10:18:00 Eppiox, I would still greatly advise you to use something like https://github.com/libgdx/libgdx/ Feb 07 10:18:16 no real reason to reinvent hot water + cross-platform :) Feb 07 10:18:27 meetoman, those are just text editors. Feb 07 10:19:16 I was not even considering cross-platform, but was just reading about that one, has an impressive amount of things to use Feb 07 10:19:37 Mavrik, complier too Feb 07 10:19:43 I thought it was be too hard to do cross-platform.. but hey looks not too bad :D Feb 07 10:19:44 meetoman, no. Feb 07 10:19:48 meetoman, none of those bundle a compiler Feb 07 10:19:58 meetoman, they also call out to external build system. Feb 07 10:20:13 Eppiox, yeah, but more to the point it, bunch of 2D game stuff is already done there :) Feb 07 10:31:37 i want to have a small box on which the user can tap and select his photo int he profile section, just like whatsapp or tinder. How to do this ? Is there some nice plugin available ? Feb 07 10:48:15 http://stackoverflow.com/questions/28381209/android-5-0-translucent-status-bar Feb 07 10:57:27 Tracking network failure of our app initializer, most fails (we kill the initializer after 60s timeout) on WiFi connection, which is a bit weird, any idea on this one? Feb 07 10:57:43 I could only imagine when there is a proxy, for instance you need to sign into a restricted network Feb 07 11:01:37 do you guys know how to read integer lists from parcelable? Feb 07 11:04:39 am I going to have to overload the integer class? Feb 07 11:31:33 anyone here using fabric.io / crashlytics? The new gradle plugin seems to be broken.. Feb 07 11:31:46 at least for me Feb 07 11:39:51 Hello, has anyone worked iwth youtubes v2 API before? Feb 07 11:39:56 hey danijoo! Feb 07 11:40:25 Google responded yesterday btw, managed to get a response before the weekend, no response on my follow up now though and will probably have to wait until monday Feb 07 11:41:20 it was a trademark issue as yall suggested, and they can't let it pass Feb 07 11:41:34 included the game name of Terraria as examples of names that the app is intended for int he description and it was plucked away Feb 07 11:41:44 thats why we wanted you to show the description :_ Feb 07 11:42:05 yeh Feb 07 11:42:08 i couldnt' get a hold of it though Feb 07 11:42:12 they have some weird trademark rules. Some people got banned because they wrote Android and not Android(TM) Feb 07 11:42:12 as the app is suspended, can't see any data onthe page Feb 07 11:42:23 lol waow Feb 07 11:42:53 yeah.. stupid. Feb 07 11:43:23 at least apple rejecst the app Feb 07 11:43:29 and lets you correct it and resubmit without having to redo absolutely everythign Feb 07 11:43:45 i hope they can at least let me submit a new apk and make the changes Feb 07 11:43:47 to my existing metadata Feb 07 11:44:44 nevertheless, will ahve to endure the weekend Feb 07 11:47:22 Bantalon, If its only your app that is banned, and not the whole account, you will have to resubmit it under another package name Feb 07 11:47:41 "com.android.internal.R cannot be resolved to a variable" Feb 07 11:47:48 any way to access the internal files Feb 07 11:47:49 ? Feb 07 11:47:52 i gotta make an alarm app Feb 07 11:48:13 Nope Feb 07 11:48:47 pifon2, maybe using reflection. But you should not need that Feb 07 11:49:07 should not need reflection or internal files? Feb 07 11:49:09 pifon2, what are you doing anyway Feb 07 11:49:16 internal files Feb 07 11:49:33 I'm just trying to compile android's native alarm app Feb 07 11:49:37 gettign that error Feb 07 11:50:18 so you are not making an alarm app, you try to recompile one ^^ Feb 07 11:50:28 danijoo: >.< account is still intact yep Feb 07 11:50:30 yea Feb 07 11:50:46 Bantalon, anyways, they wont let you upload it under the same packagename Feb 07 11:50:48 i sent them another response maybe they can lift the suspension Feb 07 11:50:51 and i can edit the existing app Feb 07 11:50:58 was a hassle setting up the push notifications, game services, inapps and everything Feb 07 11:51:07 and i'll have to change everything in the app etc, cross platform Feb 07 11:51:13 darn Feb 07 11:51:27 Google banhammer drops again Feb 07 11:51:39 yggdrasil Feb 07 11:52:15 mjölnir* Feb 07 11:52:25 Bantalon at least you didnt have to go to court :) Feb 07 11:52:37 if i'd have to go to court over this app Feb 07 11:52:50 i dunno what kinda moderation google is doing atm Feb 07 11:54:33 i litigated for over a year after my takedown Feb 07 11:54:57 and won Feb 07 11:55:57 afaik i should make a inner PreferenceFragment class static within a PreferenceActivity. I ask myself if it is ok to make members of the PreferenceActivity also static if i need access to them from the inner static PreferenceFragment-Class? Feb 07 11:56:06 It looks like none of the avds I have created with Nexus 5 and 6 skins are a working. Feb 07 11:59:44 adkins1, every time someone says static and activity in the same sentence, I get scared Feb 07 12:01:34 danijoo: lol Feb 07 12:02:06 dont be scared, just be helpful ;) Feb 07 12:02:37 you dont need static activity variables Feb 07 12:02:39 never Feb 07 12:02:52 if you do: its time to redesign :) Feb 07 12:03:24 the same is true if you append static to anything that extends View, Context, Activity or Fragment Feb 07 12:03:51 danijoo: http://stackoverflow.com/questions/15571010/fragment-inner-class-should-be-static Feb 07 12:04:18 first answer Feb 07 12:04:54 just the first block Feb 07 12:05:18 no rules without exceptions :P Feb 07 12:05:22 is it wrong? Feb 07 12:05:36 but dont make the outer activity static too Feb 07 12:05:51 no i dont want to make the outer activity static Feb 07 12:05:58 just the inner fragment Feb 07 12:06:05 use getter and setter if the fragments needs to access variables from the activity Feb 07 12:06:20 yes but variables Feb 07 12:06:46 if you make activity variables static, they will be kept the same if you reopen the activity Feb 07 12:06:48 ok one step after another: inner fragment should be static , yes or no? Feb 07 12:06:49 which is usually bad Feb 07 12:06:55 static inner class has nothing to do being.. static Feb 07 12:07:03 it is as if you put the class on separate file Feb 07 12:07:11 yeah Feb 07 12:07:17 its not instantianed anywhere Feb 07 12:07:49 danijoo: is "yeah" the answer to my question? Feb 07 12:08:06 no Feb 07 12:08:21 inner fragment should be static, eeyup Feb 07 12:08:26 or separate file Feb 07 12:08:29 inner fragment static is ok. activity variables static is not ok Feb 07 12:08:33 thats my answer Feb 07 12:09:04 Ashiren: are you agreeing too? Feb 07 12:09:12 eeyup Feb 07 12:09:26 but i think its grammatically incorrect Feb 07 12:09:36 agreeing... is this a verb Feb 07 12:09:36 :p Feb 07 12:09:43 Hello Feb 07 12:09:53 eeyup is yes? (i`m a german) Feb 07 12:09:55 ;) Feb 07 12:09:55 How can I do a su call in a separate thread? Feb 07 12:10:01 Any ideas? Feb 07 12:10:02 yes Feb 07 12:10:05 eeyup is pony yes Feb 07 12:10:09 lol Feb 07 12:10:11 wtf Feb 07 12:10:31 how do you call su normally Feb 07 12:10:50 Ashiren, I've to elevate privileges in the app Feb 07 12:11:12 I think I've to use libsuper Feb 07 12:11:57 cant you normally call it in thread Feb 07 12:11:59 danijoo: inner fragment static and if i need access from there to the outer activity members i access them through get/set functions in the outer activity. right? Feb 07 12:12:01 or does it need user prompt Feb 07 12:12:31 Ashiren, su call is a blocking call Feb 07 12:13:13 Ashiren, is not recommended for use in the main thread Feb 07 12:15:00 there are many ways - simple new Thread(new Runnable()...), AsyncTask, scheduledExecutorService, ... Feb 07 12:15:42 Ashiren, where can I find examples about this? Feb 07 12:16:41 http://www.vogella.com/tutorials/AndroidBackgroundProcessing/article.html#concurrency_asynchtask3 or https://developer.android.com/reference/android/os/AsyncTask.html Feb 07 12:16:46 ok Feb 07 12:19:57 i want to have a small box on which the user can tap and select his photo int he profile section, just like whatsapp or tinder. How to do this ? Is there some nice plugin available ? Feb 07 12:21:12 open gallery and let the user pick an image Feb 07 12:21:35 once the user does that, you'll get an URI of that image, construct a bitmap with that path and do whatever with it Feb 07 12:24:20 SheikhAman: what about the cropping part Feb 07 12:24:36 there are libraries which will do the cropping for you Feb 07 12:26:13 so the selection part has to be coded by myself and then use a library that'll launch an activity to do the cropping Feb 07 12:33:42 yep Feb 07 12:33:54 or maybe there's a library which is doing the selection part for you as well! Feb 07 12:34:10 selection part is rather easy, so I wouldn't mind coding it on my own if I have to Feb 07 12:40:06 ya thats what i am trying to find, if theres a lib Feb 07 12:40:09 else yah will do on my own Feb 07 12:41:21 can anyone help me on this one? http://stackoverflow.com/questions/28375828/dismiss-listpreference-dialog-in -preferencefragment-and-restore-its-state-at-ori danijoo? Feb 07 12:42:24 show the part wherethe dialog is opend. Feb 07 12:43:37 danijoo: not really sure what you mean.....its a listpreference in xml, so i dont really show it programmatically Feb 07 12:44:46 oh. well. system should handle dismiss and stuff for you then Feb 07 12:44:52 show the whole activity Feb 07 12:44:56 or fragment, whatever Feb 07 12:47:14 danijoo: one moment.......i try to simplify it Feb 07 12:53:43 hi Feb 07 12:53:44 danijoo: http://pastebin.com/sW6iv8bH Feb 07 12:53:59 somebody help me about IStatusBarService.aidl Feb 07 12:54:23 i can't import com.android.internal.statusbar.IStatusBarService; Feb 07 12:54:39 i'm using Android Studio Feb 07 12:55:31 adkins1, theres nothing with a dialog Feb 07 12:56:27 ESXquilloN, great error description Feb 07 12:56:55 "can't" Feb 07 12:57:43 cannot resolve sybomls http://imageshack.com/i/ey1FTZ76p Feb 07 12:58:25 That class is not part of the sdk, so it's not available to you Feb 07 12:58:33 its an internal class Feb 07 12:58:33 i see Feb 07 12:58:36 you cant use it Feb 07 12:59:37 danijoo: ListPreference (maybe its wrong to call it dialog) - if i cllick on the listPreference a "view" is opened. If the view is opened and i rotate the screen without clicking on a item on the listPreference or canceling, i can not open it again Feb 07 13:00:25 i found this source http://imageshack.com/i/exdwphfPp Feb 07 13:02:57 danijoo: it happens on any listPreference in all my PreferenceActivities and i cant find the solution in the web. If i dont do it myself in onPause i cant reopen Feb 07 13:03:00 maybe thats from android source code Feb 07 13:03:43 i see Feb 07 13:03:56 adkins1, cant see any of this in the posted code. Feb 07 13:05:06 danijoo: mLP_ConfigPages = (ListPreference) findPreference(resources.getString(R.string.KEY_PREF_PAGES_COUNT)); Feb 07 13:05:33 adkins1, there is nothing about "opening a view" Feb 07 13:05:37 thats how i reference my ListPreference to a member Feb 07 13:05:44 danijoo: Do you not know how ListPreference works? Feb 07 13:06:03 SimonVT, yes. it opens the list. but you dont have to do that manually, do you? Feb 07 13:06:13 danijoo: no you daont have to Feb 07 13:06:16 I think thats what he mean Feb 07 13:06:18 adkins1, 1. that's not how you add a PreferenceFragment to a PreferenceActivity.. And 2., check if it happens on all devices.. If it does, the issue is in your code somewhere Feb 07 13:06:23 If not, why bother for 1 broken device Feb 07 13:06:35 (noone else has that issue) Feb 07 13:07:01 SimonVT: thank you, i`ll check it out Feb 07 13:07:20 SimonVT: what do i do wrong with adding the fragment to the preferenceActivity? Feb 07 13:07:23 I thought he somehow opens a second view together with the list dialog when he says a "view" is opened. thats why I asked for code about that Feb 07 13:07:31 maybe a misunderstanding (my english sucks) :) Feb 07 13:07:51 danijoo: no prob dude Feb 07 13:10:09 See the docs on PreferenceActivity, it has sample code Feb 07 13:10:23 If you want to manually manage it like that, you'd probably just use an Activity Feb 07 13:10:55 no i dont want to manually do it Feb 07 13:11:04 SimonVT: happens on emulator too Feb 07 13:11:05 ... Feb 07 13:11:49 Tried not retaining the preferencefragment? Feb 07 13:12:21 SimonVT: do you mean setRetainInstance(true); ? Feb 07 13:12:24 Yes Feb 07 13:12:28 i do that Feb 07 13:13:03 Tried _not_ doing it? Feb 07 13:13:43 you mean try/catch or what? Feb 07 13:13:54 No.. Just don't do it.. Feb 07 13:14:05 oh Feb 07 13:14:40 I'm certain that if you create a preference screen as shown in the javadocs for PreferenceActivity/PreferenceFragment, you're not going to have this issue Feb 07 13:15:26 i commented out: setRetainInstance(true); and the listPReference is even restored after orientationChange ;) Feb 07 13:18:36 SimonVT: thank you so far, i gotto make some of that stuff more clear for me now Feb 07 13:20:10 SimonVT: i`m looking at the PreferenceActivity sample in the docs and its not like i do everything completely different. Can you tell me what i really shouldnt do from what i did? Feb 07 13:21:05 You're not doing anything like in the PreferenceActivity docs Feb 07 13:21:55 You're doing a FragmentTransaction, they're doing loadHeadersFromResources Feb 07 13:22:19 If you don't need all that, there's no reason to use a PreferenceActivity Feb 07 13:23:28 i see Feb 07 13:25:04 is there anything opposite to setError()? I mean I'm doing some kind of registration, and if user enter invalid data, I'm using setError() and it shows a little red cross on the right of the text field, but if the data he entered is correct, I want there to be a green checkmark or something like that. any ideas on how to do it? Feb 07 13:25:18 SimonVT: thank you very much Feb 07 13:34:24 SimonVT: "If you don't need all that, there's no reason to use a PreferenceActivity" do you mean if i dont need multiple headers and just a simple Preference-Activity i dont need to use a PReferenceActivity and a normal Activity is enough? Feb 07 13:48:19 SimonVT: i want a simple Activity for Preferences, i dont think i need headers etc. Here: http://developer.android.com/guide/topics/ui/settings.html it says i dont neccesarily need a PreferenceActivity,....... Feb 07 13:48:20 a PreferenceFragment added to a Activity might be enough. At the chapter "Using Preference Fragments" it adds the Fragment to an activity just like i do. I am a little confused now how i should do it.... Feb 07 13:50:26 to make my question more clear: should i not add a PreferenceFragment to an activity/PreferenceActivity with Feb 07 13:50:29 getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit(); Feb 07 13:50:48 How can we access resources from JVM unit tests in Android studio? Feb 07 13:50:56 Studio* Feb 07 13:51:21 The typical approach doesn't work. Feb 07 13:51:51 adkins1: where is your xml for the PreferenceActivity ? Feb 07 13:52:04 someone asked the same 2 days ago TacticalJoke . nobody knew it Feb 07 13:52:17 shmooz: you mean it which folder? Feb 07 13:52:24 in which folder* Feb 07 13:52:27 no I mean let's see the code Feb 07 13:52:30 k Feb 07 13:52:40 i think the temporary solution was to copy/paste everything into the junit folder Feb 07 13:52:41 danijoo: Ah, okay. Feb 07 13:52:55 Which JUnit folder? Feb 07 13:52:56 (which isnt really a solution if you ask me) Feb 07 13:53:10 dunno. he had some kind of seperate module for that Feb 07 13:53:15 i didnt try it Feb 07 13:53:26 I might file it as a bug. Feb 07 13:53:50 shmooz: http://pastebin.com/vmtsmdL1 Feb 07 13:54:31 the second category is empty because i add preferences programmatically there** Feb 07 13:56:58 How do I convert widget dp min width & height to cells? In my device it do not follow http://developer.android.com/guide/practices/ui_guidelines/widget_design.html#anatomy_determining_size Feb 07 13:59:32 shmooz: so? ;) Feb 07 13:59:51 it looks ok but I don't know about the fragment part Feb 07 13:59:54 For example shazam widget which is 1X1 is 175x175 Feb 07 14:00:30 shmooz: what do you mean? Feb 07 14:00:51 well I've never done that fragment transaction thing you're doing Feb 07 14:01:06 shmooz: how did you do it? Feb 07 14:01:22 but I have implemented PreferenceActivity without fragments no problems Feb 07 14:02:20 shmooz: i wonder how you do addPreferencesFromResource(R.xml.some_prefs); to PReferenceActivity since it is deprecated Feb 07 14:02:57 adkins1: you can still use it Feb 07 14:03:31 shmooz: of course one can use deprecated functions, i try to avoid that though Feb 07 14:04:02 I especially stick with the deprecated ;) Feb 07 14:04:11 ;) Feb 07 14:04:26 because I like to do 2.2 and up if not 2.3 and up Feb 07 14:04:38 ok Feb 07 14:05:51 Hi. I'm new to android dev. Can I somehow run/debug an application on my phone without having to uninstall the same app? I actually use it :) Feb 07 14:07:21 SimonVT: hey why should one not add preferenceFragments to Activity/PreferenceActivity by getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit(); ?? Feb 07 14:07:23 See: http://developer.android.com/guide/topics/ui/settings.html#Fragment -> "Using PReference Fragments" Feb 07 14:07:52 I never said anything about Activity Feb 07 14:09:02 SimonVT: ok so its ok to do it like that with activity but not with preferenceActivity? Feb 07 14:09:42 hellozzz people Feb 07 14:09:44 Yes, PreferenceFragment can be used in any Activity Feb 07 14:09:56 I have one question Feb 07 14:10:14 regarding android BLE gat example Feb 07 14:10:31 I am able to read profile characterstics Feb 07 14:10:37 SimonVT: i dont see any difference if i do the transaction-thing with a activity or preferenceActivity Feb 07 14:10:47 but i want to write charactestics value to BLE device Feb 07 14:11:07 hi, I have a task which i need to repeat every 30 seconds (an alarm), Currently using an alarmbroadcast that reset itself after time that taask is done until it gets cancelled, I'm currently thinking of replacing the alarmbroadcast with a service instead, any recommedation for or againts? Feb 07 14:11:12 which method is used to advertise the value Feb 07 14:12:03 adkins1: What's the purpose of using PreferenceActivity? Feb 07 14:12:29 SimonVT: dont really know ;) Feb 07 14:13:37 PreferenceFragment inflates a ListView, and stuff like that Feb 07 14:13:46 Has a lot of helper methods for inflating preferences from xml Feb 07 14:13:58 Which you don't use at all Feb 07 14:14:16 any one worked on BLE example from google Feb 07 14:14:17 what's the best way to generate QR code? Feb 07 14:15:10 http://pastebin.com/JfpEaZFT Feb 07 14:15:19 SimonVT: maybe i dont use it in the simplified posted code snippet. But i`d say even: addPreferencesFromResource(R.xml.pref_pageconfig); is one of these "helper" functions Feb 07 14:15:45 Can somebody tell me why my array is not modified on line 50? http://picpaste.com/modify-BX4B4sKT.png Feb 07 14:16:44 I'm not sure what point you're trying to make Feb 07 14:17:21 I want to set a value to BLE profile char Feb 07 14:17:29 using google example code Feb 07 14:17:33 need help on this Feb 07 14:17:41 SimonVT: well i just dont understand why you said "thats not how you add a PReferenceFragment to a PreferenceActivity" Feb 07 14:17:43 any one has worked on this ? Feb 07 14:18:11 if do it with activity you say its ok Feb 07 14:18:17 but there is no difference Feb 07 14:18:19 ;) Feb 07 14:19:13 Sure, there's a difference Feb 07 14:19:31 gaganchd2000: you could try to take a look at the android beacon lib: https://github.com/AltBeacon/android-beacon-library Feb 07 14:19:44 Check the source of PreferenceActivity, everything that happens in onCreate is the difference Feb 07 14:19:58 Check with hierarchy viewer, there's a difference Feb 07 14:21:12 SimonVT: i believe you. So you would suggest to addd, in my case, PReferenceFragments to Activities and not to PReferenceActivities if i dont neccesarily need PreferenceActivities? Feb 07 14:22:19 Yes Feb 07 14:22:29 Generally, if you don't need what a class offers, don't use it Feb 07 14:23:05 ok, i think we are finally done here ;) Feb 07 14:26:34 anyone working with ffmpeg? it seems very slow on android Feb 07 14:31:58 gdrc: it's probably using software mode, ffmpeg is used by many apps and it's fast in hardware rendering mode Feb 07 14:35:48 finally i solved my problem!! :D http://imageshack.com/i/hjjqcTadp Feb 07 14:37:17 ESXquilloN: anti-aliasing? shmooz: I'm doing video editing/building Feb 07 14:37:28 Can somebody tell me why my array doesn not get modified on line 50? http://picpaste.com/modify-BX4B4sKT.png Feb 07 14:38:47 demahum: do you mean why the array in the other activity that you get with getIntArray isn't being modified ? Feb 07 14:38:59 shmooz: Yes. Feb 07 14:39:00 Hi! I'm having problems compile a project with Studio, says "error: package x does not exist" on every import Feb 07 14:39:18 shmooz: but no Feb 07 14:39:25 How can I run build with --info or --debug Feb 07 14:39:35 shmooz: I mean yes yes yes. Feb 07 14:39:40 Exactly that. :D Feb 07 14:39:45 shmooz: sorry... Feb 07 14:40:05 gdrc: yes Feb 07 14:40:27 demahum: you probably have to callback that activity to let it know Feb 07 14:41:49 shmooz: hmm... Feb 07 14:42:22 how can I import ZXing library to my project in android studio? Feb 07 14:44:29 shmooz: How to do it? **** BEGIN LOGGING AT Sat Feb 07 14:45:57 2015 Feb 07 14:49:28 wow, I've asked like 5 questions today and no one can help me... awesome Feb 07 14:51:54 Arnas: that last question is pretty easy to solve with a quick google search, it's basic IDE knowledge Feb 07 14:51:55 Probably because all your questions can be answered by clicking on first google hit. Feb 07 14:52:14 deuteros I'm sitting in a google for like 30 mins right now Feb 07 14:52:18 and still can't solve this question Feb 07 14:52:49 Arnas: If you're using Gradle, it's one line to add to your build.bradle Feb 07 14:52:57 import com.google.zxing.BarcodeFormat; <- says "Cannot resolve symbol BarcodeFormat' Feb 07 14:53:25 deuteros I've been trying to import module and import project Feb 07 14:53:42 Arnas: Reread what I wrote, does it have anything to do with what you just said? Feb 07 14:54:03 deuteros no, I was just saying what I was trying to do Feb 07 14:54:16 deuteros what's that line? is it 'compile 'com.google.zxing:core:3.0.0''? Feb 07 14:54:43 Looks about right Feb 07 14:55:31 deuteros where can I find build.gradle file? Feb 07 14:55:53 Arnas: So now I have a better idea about your problems, you haven't read even the most basic tutorials about Android builds Feb 07 14:56:33 It should be at the root of your project (but not always). Either way, why don't you just run find instead of asking here? You have a weird way of going about solving problems Feb 07 14:58:09 deuteros__, can't seem to find it :s Feb 07 14:59:06 nvm, found it Feb 07 15:15:50 How could I debug a package not found in Android Studio? Feb 07 15:16:00 Can I run the build from terminal? Feb 07 15:36:43 JakeWharton: Hey. Do you know whether it's possible to use resources in one of these new JVM unit tests? I've tried the usual approach (src/test/resources/whatever.txt along with 'getClass().getResourceAsStream(...);') with no luck. Feb 07 15:43:12 Could somebody please take a look at these lines and the logcat and explain me this irritating behaviour at line 38: http://picpaste.com/wierd-d9Keo2cu.png Feb 07 15:49:03 What irritating behaviuor? Feb 07 15:49:05 behaviour* Feb 07 15:50:49 TacticalJoke: If question is greater than 5, contains will return false although the array is modified, as it can be seen. Feb 07 15:51:31 TacticalJoke: However, if question is less than 6, contains will return true, as it should, since the array is modified, as it can be seen. :( Feb 07 15:52:26 Maybe your contains method is broken Feb 07 15:53:08 SimonVT: Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa :D Feb 07 15:53:21 SimonVT: That's what I am looking for for more than three hours! Feb 07 15:53:24 That naming style is really hard to read, BTW. Feb 07 15:53:39 It seems that you're capitalising the first letter of names of local variables at whim. Feb 07 15:53:50 Or fields, I guess. Feb 07 15:54:00 SimonVT: If you are here, you would get a big chocolate! :D Feb 07 15:54:28 TacticalJoke: I am afraid I don't understand you, but I would like to. What is the meaning of "whim"? Feb 07 15:54:31 I guess they're intended to be constants, but the Java convention is all caps with underscores (and 'static' and 'final'). Feb 07 15:54:41 More or less 'random'. Feb 07 15:55:07 Code formatting is usually very strict, which makes it easier to read. Yours isn't Feb 07 15:55:22 formatting/naming Feb 07 15:55:39 SimonVT: Thank you for your advices a lot. Feb 07 15:56:07 TacticalJoke: So, for example, public int NumberOfQuestions should be public int NUMBEROFQUESTIONS? Feb 07 15:56:30 The convention would be NUMBER_OF_QUESTIONS. Feb 07 15:56:44 Though, to be fair, I actually would prefer the NumberOfQuestion styles (as in C#). Feb 07 15:56:50 style* Feb 07 15:57:05 TacticalJoke: Good. Thank you. :) Feb 07 15:57:28 Also it'd be "public[/private] static final NUMBER_OF_QUESTIONS = 40;". Feb 07 15:57:36 int^ Feb 07 15:57:53 TacticalJoke: Actually, I started using this CamelCase when I heard that it is convention in Java, but I believe it is not for everything, as you said. :) Feb 07 15:59:47 Yeah, it's CamelCase only for class names and interface names, as far as I can think. Feb 07 16:00:03 TacticalJoke: Good. Thanks a lot. :) Feb 07 16:00:29 This is still online: http://www.oracle.com/technetwork/java/codeconventions-135099.html Feb 07 16:01:03 TacticalJoke: Haha... I was thinking of it while typing here... But my reading list is sooo loong, so it will be next week on schedule. :D Feb 07 16:01:13 TacticalJoke: What do you mean by interface names? Feb 07 16:02:40 Stuff like this: public interface Collapsible { void collapse(); } Feb 07 16:03:03 TacticalJoke: Ok. Thanks again. :) Feb 07 16:03:34 "ThisIsAClassName, thisIsAVariableOrMethodName, THIS_IS_A_CONSTANT_NAME". To camelcase an acronym, do DvdPlayer, not DVDPlayer. Also see http://google-styleguide.googlecode.com/svn/trunk/javaguide.html Feb 07 16:03:55 Yeah, "DvdPlayer" is much nicer. Feb 07 16:04:54 I hate looking at "IOException". Feb 07 16:05:15 There are worse ones, but I see that one so much in my code. Feb 07 16:06:03 bane of my existence: id, Id, ID Feb 07 16:06:07 It was Sun that introduced that silly rule, and then they realized they need to add another silly rule to cancel the first silly rule to dead with two acronyms in a row Feb 07 16:06:17 So we don't get HTTPJSONRequest but HTTPJsonRequest Feb 07 16:06:23 Screw that, use camel case everywhere Feb 07 16:16:09 hello Feb 07 16:23:03 Is there a URI (to start the google maps app with) for multiple destinations for turn by turn navigation Feb 07 16:35:09 http://pastebin.com/D0Kevqf4 I wonder why this code doesn't start a new activity? Feb 07 16:40:31 Arnas, any exception in your logcat? Feb 07 16:40:53 is QRKodas declared in your Manifest? Feb 07 16:41:04 MikeWallaceDev, I've changed the code a little bit, it works now Feb 07 16:41:09 MikeWallaceDev, and yes, it's declared Feb 07 16:41:21 so what was wrong? Feb 07 17:02:58 Hi, I have a question regarding the NDK. We have a custom multiplatform "game-like" engine for our applications. We have it already running using the NDK using the NativeActivity. However, some other projects (e.g. vlc-android) use the JNI method instead from within their Java application. I would like to ask what are the pros of using the Java/JNI wrapper method over using the NativeActivity. Our engine manages all the rendering, loading of data, Feb 07 17:02:59 input handling and some other OS abstractions. Feb 07 17:07:47 The only advantage that I can think of at the moment is that by using the Java/JNI approach, it's easier to get the access to the Android's SDK methods, which handle for example the storage (mounting of external storage) or the input. Feb 07 17:11:09 Hi Feb 07 17:14:27 I want to get html elements, click on it, edit it, in my android app Feb 07 17:14:28 How? Feb 07 17:19:15 MalekAlrwily, a good start would be to look at this : http://developer.android.com/guide/webapps/webview.html#BindingJavaScript Feb 07 17:20:35 mkdk: thanks, but I already have a javascript interface Feb 07 17:21:01 It is hard to write javascript code in android Feb 07 17:21:54 MalekAlrwily, and also to get the information about the element under the cursor, you might need : http://developer.android.com/reference/android/webkit/WebView.html#getHitTestResult() Feb 07 17:23:10 MalekAlrwily, I haven't worked with JS on the Android, so I cannot help you more. Sorry. Feb 07 17:23:57 mkdk: Thank you, at least for your time Feb 07 17:24:12 No problem. Feb 07 17:28:29 MROING everyone. Feb 07 17:28:35 it is for me at least Feb 07 17:29:01 Morning Feb 07 17:29:33 * hesperaux drinks AwesomeSauce Feb 07 17:41:29 * hesperaux can hear the clacking of thousands of android dev keyboards Feb 07 17:45:06 Inkscape is nice. Feb 07 17:45:06 Hey guys, so I have 3 listviews on a page Feb 07 17:45:25 And I have each listview layout_weight to 0.33 so they each take up 1/3 of the page Feb 07 17:45:46 but then as items get added to the listviews, their heights stretch, cause I have layout_height as wrap_content Feb 07 17:46:04 What should I set layout_height to, in order to only take 33% Feb 07 17:46:42 0 Feb 07 17:46:48 0? Feb 07 17:47:08 Thats actually a great idea Feb 07 17:47:38 Thanks! Feb 07 17:47:46 and 0.33 doesn't mean take up 1/3 Feb 07 17:48:18 for layout weight? If I have 3 elements and give them all 0.33 I thought thats wht it does? Feb 07 17:48:55 if you have 3 and set them all the same weight, it will always be 1/3 Feb 07 17:49:36 I want each of them to take up 1/3 of the screen Feb 07 17:49:39 you're limiting yourself by thinking of weight as a fractional Feb 07 17:50:24 Oh ok, whats a better way to look at it? Feb 07 17:50:35 growth ratio Feb 07 17:51:04 hmm, what do you mean? Feb 07 17:51:40 0.33 weight grows 33% as fast as 1 weight Feb 07 17:52:03 So if I give them all 1 weight it will be the same thing Feb 07 17:52:08 It'll take weight/weightSum space Feb 07 17:52:17 I said that already Feb 07 17:53:05 I didn't say weight sum, that's a different thing Feb 07 17:53:06 so whats the difference if I set them all to 1 or set them all to 3 Feb 07 17:53:18 if I set them all to 1, each will take 1/3 Feb 07 17:53:19 no difference Feb 07 17:53:30 so why is 0.33 taking up 1/3 wrong? Feb 07 17:53:42 Just cause im loosing that 0.1 Feb 07 17:53:46 0.01 Feb 07 17:53:53 because it's a dumb way to think of ir Feb 07 17:53:58 Yeah I guess Feb 07 17:54:03 ill change them to ` Feb 07 17:54:04 1 Feb 07 17:54:05 you're not losing 0.1 Feb 07 17:54:19 Yeah im loosing 0.01 if I set them all to 0.33 Feb 07 17:54:26 nope Feb 07 17:54:34 again,dumb thinking Feb 07 17:54:50 oh ok casue the sum is only 0.99 Feb 07 17:54:57 so im not losing anything Feb 07 17:56:28 thanks pfn Feb 07 17:58:34 Whats up TacticalJoke Feb 07 18:00:13 but yeah, don't use 0.33 because it doesn't make sense to, what if you have 4 items with 0.33 weight, you certainly shouldn't expect it to take 1/3 Feb 07 18:00:30 Right, yeah Feb 07 18:00:55 look, people Feb 07 18:01:10 hi people. Feb 07 18:01:56 Hey, drose379. Feb 07 18:02:03 Hows it going? Feb 07 18:02:10 I just discovered Inkscape. It's really neat. Feb 07 18:02:30 What is it? Feb 07 18:02:58 It's a vectro-graphics image editor. It seems good for creating Android icons. Feb 07 18:03:02 vector* Feb 07 18:03:14 Cool, sounds interesting Feb 07 18:03:26 Hows the app coming? Feb 07 18:03:32 inkscape ftw Feb 07 18:03:37 Pretty well. :) How about yours? Feb 07 18:04:14 This is also useful: https://openclipart.org/ Feb 07 18:04:25 Not bad thanks, just discovered SnackBar so im implementing that instead of Toast Feb 07 18:04:42 Ah, yeah, those are way neater. Feb 07 18:04:47 I've always hated toasts. Feb 07 18:05:08 Yeah, Snackbars are really nice Feb 07 18:05:19 snackbar? Feb 07 18:05:22 * hesperaux looks it up Feb 07 18:05:25 Can you control when they disappear? Feb 07 18:05:29 Yes Feb 07 18:05:45 Kinda like toast, the library I used has Length_long and short Feb 07 18:05:48 oh, those things Feb 07 18:05:55 and you can do a custom time too Feb 07 18:06:04 hmm, yeah those are much nicer Feb 07 18:06:05 I need to try the new inkscape Feb 07 18:06:06 or indefenite for unlimited time Feb 07 18:06:16 pfn, new? did they do something different? Feb 07 18:06:20 Oh, nice. Didn't know you could specify 'indefinite'. Feb 07 18:06:34 drose379, it's a 3rd party lib though? what are the commercial/licensing terms? Feb 07 18:06:57 Yeah its 3rd party, and its MIT licence thats all I know Feb 07 18:07:03 Do you think its ok that I used it? Feb 07 18:07:11 "We try to make it clear that you may use all clipart from Openclipart even for unlimited commercial use." Feb 07 18:07:19 (Talking about that clipart site.) Feb 07 18:07:33 Oh, I was talking about the snackbar lib Feb 07 18:08:21 after what SadDev2015 talked about yesterday, I'm afraid of using anything I didn't brew completely myself :( Feb 07 18:08:31 hesperaux: https://github.com/nispok/snackbar/blob/master/LICENSE Feb 07 18:08:35 It's really libre. Feb 07 18:08:41 libre? Feb 07 18:08:52 Free as in freedom. :D Feb 07 18:08:54 like BSD or Apache licence Feb 07 18:08:58 I was thinking Stallman. Feb 07 18:09:08 What did SadDev2015 say yesterday? Feb 07 18:09:17 not like GPL Feb 07 18:09:17 The only condition is "The above copyright notice and this permission notice shall be included in all copies or substantial portions Feb 07 18:09:17 of the Software". Feb 07 18:09:21 Oops. Feb 07 18:09:26 " shall be included in all copies or substantial portions Feb 07 18:09:26 of the Software." Does this mean present in one place? or present in every activity? etc. Feb 07 18:09:45 drose379, he was talking about how the Google IP bots were screwing him over and he didn't know what to do Feb 07 18:09:53 Yeah, the GPL can be insidious. Feb 07 18:10:46 Im trying to sort a list Feb 07 18:10:59 each item in the list has an int 1,2 or 3 Feb 07 18:11:26 Im trying to add 3 first, then 2 then 1 Feb 07 18:12:05 hmm Feb 07 18:12:07 sort the data backing of the adapter as you populate it? keep an index for 3 and above, 2 and above, and insert them into the list according to the item's index? Feb 07 18:12:28 Yeah im gonna add everything to the list out of order Feb 07 18:12:30 You can just java.util.Collections.sort for lots of stuff. Feb 07 18:12:40 then just pull the 3s first, then 2s Feb 07 18:12:42 ... Feb 07 18:12:49 I tend to do things the long way so :P Feb 07 18:13:31 so should i have 3 loops in my adapter Feb 07 18:13:33 drose379, that sounds more difficult because the adapter isn't supposed to do that kind of thing Feb 07 18:13:53 the adapter runs, if i recall, in the UI thread - whereas your data collection/sorting could be in an asynctask or whatever Feb 07 18:14:02 Hmmm\ Feb 07 18:14:09 Three loops? Feb 07 18:14:19 What if the number of items changes later. Feb 07 18:14:26 that's a good point Feb 07 18:14:33 you want to have 4 ints instead of 3 Feb 07 18:14:40 They are priorities on each item Feb 07 18:14:44 can be 1,2 or 3 Feb 07 18:14:53 The number of items doesnt matter Feb 07 18:15:09 I thought he meant the number of priorities Feb 07 18:15:10 I would loop once to pull any item with a priority of 3, then add those to the list Feb 07 18:15:18 then loop again to add all of the 2s Feb 07 18:15:22 then again to add 1s Feb 07 18:15:28 how many items could there be in this list? Feb 07 18:15:36 unltd Feb 07 18:15:44 I don't think that's a good idea then Feb 07 18:15:45 unlimitef Feb 07 18:15:49 why? Feb 07 18:16:05 I think you could do all of that with Collections.sort. You can specify a custom Comparator. Feb 07 18:16:26 I'd sort them in only one loop, keeping track of what indices in the list are for 3/2/1, and then give them to the adapter in sorted order Feb 07 18:16:35 otherwise you're looping 3 times through N items on the UI thread Feb 07 18:16:49 Oh ok i think ill try Collection.sort Feb 07 18:16:50 I think TacticalJoke's idea is best, but doing it out of the adapter Feb 07 18:16:51 is that a class? Feb 07 18:16:51 hesperaux: Couldn't he sort them just once? Feb 07 18:17:01 It's a static method, drose379. Feb 07 18:17:05 yeah, that's what I was saying Feb 07 18:17:34 Ok so it looks like Collection.sort takes a list Feb 07 18:17:39 and a comparetor Feb 07 18:17:49 the comparetor would be the priority int Feb 07 18:18:05 * hesperaux takes note of sort() for later Feb 07 18:18:48 just curious, drose379-what kind of datastore is it coming from? is it a cursor or a list adapter? Feb 07 18:19:10 Its coming from a MYSQL database Feb 07 18:19:40 Then im extending ArrayAdapter to add it to the listview Feb 07 18:19:49 ok Feb 07 18:20:01 drose379, are you ALWAYS sorting it this way, or can it sometimes be sorted other ways? Feb 07 18:20:14 It should always be sorted this way Feb 07 18:20:27 Would a compareter be like 3,2,1 Feb 07 18:20:32 drose379, any reason you don't want to use ORDER BY priority_level? Feb 07 18:20:41 WTF Feb 07 18:20:52 Thats a great idea! Feb 07 18:20:57 heh Feb 07 18:21:00 You mean for the SQL query right? Feb 07 18:21:03 yes Feb 07 18:21:09 amazing! Feb 07 18:21:27 :P Feb 07 18:21:32 Thank you Feb 07 18:21:37 Whatre you working on? Feb 07 18:21:40 sure Feb 07 18:22:05 I'm doing a sort of diary app right now (requested by a friend) Feb 07 18:22:17 Oh nice, what are some features? Feb 07 18:23:09 It keeps statistics about entered data, and trends, a bunch of autocompletion and suggestions for fields. It's pretty early stage right now Feb 07 18:23:22 Uses sqlite Feb 07 18:23:35 Cool, local sqlite or on a web server? Feb 07 18:23:38 Is there a mysql backend on Android or are you calling it through the net? Feb 07 18:23:44 local Feb 07 18:23:53 Mine is only through the net right now Feb 07 18:24:05 k Feb 07 18:24:10 I am planning on having local storage in the future also though Feb 07 18:24:16 cool Feb 07 18:24:23 Is this your first app? Feb 07 18:24:25 only web thing I do right now is getting weather data Feb 07 18:24:48 weather data for a diary app? :D Feb 07 18:24:50 sort of, yes. I've done another one before, which was a wireless sensor app with a binary storage format - that was for a school project Feb 07 18:24:59 drose379, yeah, shhhh :P Feb 07 18:25:28 haha, cool Feb 07 18:25:28 Wait Feb 07 18:25:32 the other app I did is riddled with bugs but it worked enough to win the contest :P Feb 07 18:25:46 Good for you, was it for college? Feb 07 18:25:50 yeah Feb 07 18:25:58 comp sci? Feb 07 18:26:00 for senior design in biomed. engineering Feb 07 18:26:09 I built the sensor as well as the app Feb 07 18:26:14 oh wow, nice Feb 07 18:26:18 and there was a bit of embedded design there too Feb 07 18:26:25 Hey, order by will have 1 at the top and 3 at the bottom right? Feb 07 18:26:27 it was cool :D Feb 07 18:26:32 or I think there is a descending keyword Feb 07 18:26:37 drose379, you can say ORDER BY "" DESC Feb 07 18:26:46 ok yeah Feb 07 18:27:22 g00s, it's a goose! Feb 07 18:27:35 good morning hesperaux Feb 07 18:27:44 hi hi Feb 07 18:29:04 does anyone know where google's "fave" icon is in the open icons they give you? Feb 07 18:30:14 i found ic_action_star.png but I can't see it - it's transparent lol Feb 07 18:30:48 hesperaux, whole material design icon pack from google: http://www.flaticon.com/packs/material-design Feb 07 18:30:58 with single item download Feb 07 18:31:05 :D thank you Feb 07 18:31:17 That is awesome Feb 07 18:31:20 yw Feb 07 18:31:34 do you know how the unfilled/filled effect is done with the star? is it two resources or some kind of filter thing? Feb 07 18:31:47 its just two different drawables :) Feb 07 18:31:54 and toggling between them Feb 07 18:32:03 good, good Feb 07 18:32:23 what do I need to do to use these icons in the app legitimately? Feb 07 18:32:34 i'm all paranoid now about IP Feb 07 18:32:57 hesperaux, iconpacks on flaticon have licenses Feb 07 18:33:05 the one of google is CC BY 3.0 Feb 07 18:33:19 which means: "use for whatever you want" Feb 07 18:35:23 do I need to make an attribution for these? Feb 07 18:35:31 read the license Feb 07 18:50:14 i understand during development/testing there is a key used. if i install an app onto a phone from one computer, and then move the project files to another computer -will i be able to install the app on the phone from the second computer(the testing key is in the project files)? i remember having problems with this before where i couldnt install the app..but i dont remember exactly circumstances Feb 07 18:51:10 copy the debug certificate over Feb 07 18:53:16 i see it is generated by the sdk... and it expires after 365 days Feb 07 18:53:43 but then you make a new cert from the sdk, the phone wont accept it? Feb 07 18:54:13 you can just uninstall and install again with a diferent cert Feb 07 18:54:31 i see Feb 07 18:56:35 So should our app icons be essentially some material thing? Feb 07 18:56:37 Like a piece of paper? Feb 07 19:00:27 bonjour Feb 07 19:00:32 hello Feb 07 19:00:35 TacticalJoke, they released a material design icon pack Feb 07 19:00:42 oh app icons Feb 07 19:00:44 nvm Feb 07 19:01:05 i wont make mine materialish Feb 07 19:01:29 Can someone please explain to me how I can get a location? I've tried at least 2 different APIs now and a couple of different wrapper libs and nothing seems to be doing the trick. I either end up with an exception complaining about loopers and handlers or I get a null. Feb 07 19:01:38 http://pastebin.com/4vppQggG <-- This is what I'm currently trying. Feb 07 19:01:49 It blocks on loop(); Feb 07 19:02:08 This code is being called from an AsyncTask Feb 07 19:06:26 i think LocationManager is already async (because it has a callback) Feb 07 19:19:51 guys, I created a class that extends AsyncTask in a separate file and put it in the project's src folder. but when I try to do new on the extended AsyncTask (inside my activity), it doesnt recognize the class... do I need to import it or something? is it not automatic for all classes in src folder? Feb 07 19:21:44 you still need to import it - hitting Alt+Enter in Android Studio with the cursor on the class name (should be red text) will auto-import Feb 07 19:22:07 if it's not automatically working, you may have to save the other class file or rebuild your project Feb 07 19:22:10 * hesperaux goes for a while Feb 07 19:23:22 hesperaux: thanks for the help, I am using IntelliJ IDEA.. and it auto saves as you type. I also tried to rebuild project, and still no import option in the alt-enter options Feb 07 19:23:28 how do I manually import it? Feb 07 19:23:42 Bauer, manually would be by writing it Feb 07 19:23:52 "import package.name.class.name" Feb 07 19:25:51 ahhh, thanks danijoo ! turned out my new class had no package in it.. tahts why it couldnt be auto detected Feb 07 19:26:14 even after fixing package, the solution the IDE gave me is casting like this: SendSMSTask res = (SendSMSTask) new SendSMSTask().execute(new String()); Feb 07 19:26:21 is that correct way? it didnt offer importing Feb 07 19:27:46 are you new to java? Feb 07 19:29:01 well not really, but I know its basics. most of my experience with it was ConsoleApplications :P didnt do real stuff with it Feb 07 19:29:45 It might be easier to just right-click the package and select New > Class. Feb 07 19:30:23 Bauer, the question is, why didn't you just use "new -> class" in IDEA which takes care of that :P Feb 07 19:31:22 TacticalJoke, Mavrik : well, I did right click on the src directory.. so it didnt add package Feb 07 19:31:42 I havent realized it had to have package name to be used in my activity Feb 07 19:32:03 lol.. Feb 07 19:33:12 java is just very percise and demanding compared to what I use usually (php, perl, etc) Feb 07 19:33:50 All that's standing in the way of me and more development time today is discrete mathematics :'( transport networks and shortest path algorithms Feb 07 19:33:56 like I cant just run new SendSMSTask().execute(new String()); and thats it, I have to declare a variable of matching type to get output, even if first I want to see that it works at all Feb 07 19:34:12 Bauer no Feb 07 19:34:44 (new SendSMSTask()).execute(new String()); runs fine Feb 07 19:35:13 if you import SendSMSTask Properly of course Feb 07 19:35:43 I'm trying to pass some data from my ListFragment to my DialogFragment via onClick method of ListView. Here is my code http://puu.sh/fBtGH/92d3a44f98.png Feb 07 19:35:46 you cant run php classes without including them, same with java and importing Feb 07 19:35:55 When I click my app is crashing :[ Feb 07 19:36:52 DragonPunch, you should fix that before releasing the app. Feb 07 19:37:13 im trying to open the error log to see why its happening but my thing is empty urgh Feb 07 19:37:15 That's identical to this: new SendSMSTask().execute(new String()); Feb 07 19:37:40 TacticalJoke, and it runs Feb 07 19:38:57 new String() looks ugly though ^^ Feb 07 19:39:14 Yeah. Feb 07 19:39:18 DragonPunch: Which IDE are you using? Feb 07 19:39:32 im using android studio Feb 07 19:39:35 i found the error log Feb 07 19:39:36 http://puu.sh/fBujB/f8dfb71ed0.png Feb 07 19:40:02 that should tell you enough to fix it Feb 07 19:40:08 yteah Feb 07 19:40:09 yeah* Feb 07 19:40:11 NPE at line 33 of your dialog Feb 07 19:40:15 ik Feb 07 19:42:14 DragonPunch: Exceptions are easy. They tell you the exception and the exact line giving rise to the exception. I don't see the issue here. :p Feb 07 19:42:22 It's like... just look at the line. Feb 07 19:42:45 s/Exceptions/Stack traces/ Feb 07 19:45:24 well im trying to pass data between two fragments. a list fragment and a dialog fragment. when you click on list item in list fragment some data gets passed to dialog fragment. so i'm using bundle for this. Feb 07 19:45:36 via shared pref Feb 07 19:46:24 so on the dialog fragment in the onCreate method, i guess it's no finding the key that i stored in shared pref Feb 07 19:46:58 You don't have to guess: you can figure that out for certain. Feb 07 19:47:17 if (foo == null) { Log.i("DragonPunch", "foo is null"); } Feb 07 19:47:23 DragonPunch: if these two fragments are created by the same activity, why not use the activity to pass that info? Much cheaper Feb 07 19:47:25 Though the stack trace probably already tells you. Feb 07 19:48:13 i think i might go deuteros's route Feb 07 19:48:19 just use an interfacer Feb 07 19:48:23 guys, how do I get the response body (string or as json object) that is returned by HttpResponse response = httpClient.execute(PostRequest); Feb 07 19:48:23 ? Feb 07 19:48:25 it makes more sense to be honest Feb 07 19:48:34 DragonPunch: extra bonus if you us Rx, hook up an Observable/Subscriber Feb 07 19:48:45 i dont know what those are Feb 07 19:48:47 (although Rx might be overkill there, I don’t know the specifics of your app) Feb 07 19:48:54 DragonPunch: then ignore what I said for now Feb 07 19:48:57 yep Feb 07 19:53:14 danijoo: I am curious, how I, as a java developer, supposed to know that I need 5 different classes in order to get JSON response? :S BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), "UTF-8")); Feb 07 19:53:44 Bauer: You should just use OkHttp. Feb 07 19:54:02 That library you're using has a horrible API. Feb 07 19:54:37 The documentation for HttpEntity.consumeContent is literally "TODO: The name of this method is misnomer." Feb 07 19:54:52 TacticalJoke: thanks, is that waht you use on android apps and the recommended way to abstract the java complexity of HTTP? Feb 07 19:55:57 Yes, it's recommended. Feb 07 19:56:05 TacticalJoke: well my confusion was even before .consumeContent: I saw that my response has only getter for GetEntity, but I didnt guess it is the one I needed.. there is no way to know, unless I start googling every line of code I try to do in Java Feb 07 19:56:09 It's even used under the hood by Android starting from 4.4. Feb 07 19:56:15 (When someone uses HttpURLConnection.) Feb 07 19:56:33 My understanding is that the Apache HTTP stuff is old and lame. Feb 07 19:56:48 TacticalJoke: I am basing my code on API10 so it would be backward compatible up to 2.2.x Feb 07 19:57:09 In OkHttp, it'll be something like this: response.body().string() Feb 07 19:57:19 Or 'response.body().charStream()' or whatever. Feb 07 19:57:22 I agree, but stateless REST APIs are still the de-facto standard.. Feb 07 19:59:01 The OkHttp site says that it supports Android 2.3 and above (API 9 and above). Feb 07 19:59:28 In any case, you shouldn't set minSdkVersion below 15 for a new project unless you have a really good reason to. Feb 07 19:59:36 TacticalJoke: where do you see that? Is this the right one? http://square.github.io/okhttp/ Feb 07 19:59:59 Yeah. It's on the page at the bottom. Feb 07 20:00:04 well I want maximum market reach, and a lot of people still use older phones based on 2.3.3 etc Feb 07 20:00:08 At the bottom of that introductory text, I mean. Feb 07 20:00:44 ah, found it :) Feb 07 20:00:56 7.4% are on Gingerbread. And this number is dropping and dropping. Feb 07 20:01:02 By the time you release your app, what will it be? Feb 07 20:01:35 hmm, it was nearly 10% when I started lol :) Feb 07 20:01:44 day job takes too much time :( Feb 07 20:01:46 Here's the latest: https://developer.android.com/about/dashboards/index.html Feb 07 20:02:00 The thing is that setting minSdkVersion that low will cause you unnecessary (usually) pain. Feb 07 20:02:01 its not worth having the what api should i use conversation any more Feb 07 20:02:06 Bauer do it Feb 07 20:02:17 everyone deserves the pain they get ;) Feb 07 20:02:43 TacticalJoke, g00s: So from that link above, would you recommend just setting a minimum API of 16? Feb 07 20:02:55 or even higher at 17? Feb 07 20:03:01 I'm using 15, but I'm thinking of going to 16. Feb 07 20:03:12 Some people recommend 16. Feb 07 20:03:22 i have 16 atm. i guess id take the newest 80% of the market Feb 07 20:03:22 Ok. I'll need to make sure I change that on my app. I followed Android Studio's suggestion and went with 10 or something lame lol Feb 07 20:03:30 theres no users on 15 ^^ Feb 07 20:03:33 kinda no users Feb 07 20:03:47 could you please elaborate, what kind of pain would I have if I stick to my choice of 10? by how much would it slow down my development? Feb 07 20:04:09 about 5 hours, 10 minutes and a few seconds Feb 07 20:04:16 haha Feb 07 20:04:40 lol Feb 07 20:04:41 you cant answer that because it depends on what you are doing, what apis you are using and stuff like that Feb 07 20:05:21 for a hello world app, there is no difference between the api levels. For another whatsapp there might be some ;) Feb 07 20:12:28 can i not do this http://puu.sh/fBztd/e40a8d47b1.png? Call Bundle inside a Fragment and put stuff in there? Feb 07 20:12:36 From a fragment. Feb 07 20:12:47 u can Feb 07 20:13:07 well why is it that on my other fragment im trying to get the data it's giving me null point exception Feb 07 20:13:22 maybe you get it the wrong way Feb 07 20:13:23 :) Feb 07 20:13:28 http://puu.sh/fBzJh/153d248012.png Feb 07 20:13:29 look Feb 07 20:13:40 you dont like pastebin, do you :p Feb 07 20:13:57 sec Feb 07 20:14:10 where do you call setArguments(bundle)? Feb 07 20:15:09 never caled it Feb 07 20:15:13 am i supposed to Feb 07 20:15:46 yes Feb 07 20:15:55 i believe in the onCreate Feb 07 20:16:04 well. If you want to *get* arguments, setting them first might be a good idea. Feb 07 20:16:16 im trying to copy my db to the app, and use , it but it doesnt work , the db isnt created . but i dont know whats the main problem. plus i cant debug on the actual portion , bcos i got a pointer null before . cant use step into for that . this is the code http://pastebin.com/r42GM1WN and http://pastebin.com/RJngyZTr Feb 07 20:17:44 danijoo: alright, i totally screwed up and missed to see that...*wrists* Feb 07 20:17:53 :) Feb 07 20:18:08 danijoo: but where do i set it from frag 1 or frag 2 Feb 07 20:18:40 wait Feb 07 20:18:43 just dont even answer Feb 07 20:18:46 i think i got this Feb 07 20:19:31 you set it when you create the fragment (constructor), and get it in onCreate Feb 07 20:20:56 I SAID I GOT IT BRO Feb 07 20:20:59 ;) Feb 07 20:21:19 yay it's fixed! ^_^ Feb 07 20:22:43 thanks danijoo, t0astt Feb 07 20:27:09 need help regarding persistent storage Feb 07 20:27:26 http://stackoverflow.com/questions/28317943/short-500ms-delay-in-cordova-when-referencing-images-on-disk Feb 07 20:27:37 No problem, glad I could kinda help Feb 07 20:28:06 im trying to pass a class back to a parent activity as an extra. Should I add it to a bundle? Feb 07 20:28:21 LocationManager isn't calling any of the methods in LocationListener when I run through the emulator that comes with Android Development Studio. Does anyone know if I have to do anything special to get this to work? Feb 07 20:29:09 Agamemnus you are using cordova - the source of 99.9% of your problems Feb 07 20:29:10 actually pass an object back, my mistake Feb 07 20:29:28 :DDDDDDDDDDDD Feb 07 20:29:40 it's not necessarily Cordova Feb 07 20:29:41 God, Cordova sounds awesome, but workign with it is kind of a pain Feb 07 20:29:43 Agamemnus: at least part of that is just that loading anything from disk isn't instant Feb 07 20:29:50 It could be an Android issue, or Cordova, or Crosswalk Feb 07 20:29:59 at least when I tried to use PhoneGap + Polymer. I would need 40MB overhead to support older devices than 4.4.4 Feb 07 20:30:06 t0astt: ick Feb 07 20:30:08 It's only about 1mb, takes 500ms Feb 07 20:30:20 groxx: Yeah, that made me give it up and just go native. Feb 07 20:30:31 Agamemnus: depending on your phone, and other things running in the background, that's not necessarily unreasonable. Feb 07 20:30:39 It's a Note 4 Feb 07 20:30:48 DadFoundMy: What object are you trying to pass? Feb 07 20:30:59 This is so frustrating. I've spent over half a day trying to work my way around this convoluted API. Looks simple but it isn't :( Feb 07 20:31:27 jerkface03: write an angry letter to the devs. Feb 07 20:31:50 or make a pull request :p Feb 07 20:31:52 Damn, Inkscape is so easy to use. Feb 07 20:32:04 Its simple UI belies its power. Feb 07 20:32:23 In a positive way. Feb 07 20:32:27 inkscape is nice; project seems a bit mismanaged but when it works it works well Feb 07 20:32:29 yeah. i would love if if I woudnt suck in everything that needs graphics :D Feb 07 20:32:47 * hesperaux is back now Feb 07 20:32:56 Are you guys using Inkscape for all your app icons? Feb 07 20:33:00 i do Feb 07 20:33:09 I could use Photoshop or Inkscape. I'm thinking of using Inkscape. Feb 07 20:33:23 i have python scripts which rasterize each icon for the *dpis Feb 07 20:33:25 inkscape = easy to export to any size Feb 07 20:33:31 Nice. Feb 07 20:33:45 Yeah, way easier than with Photoshop. Feb 07 20:34:02 At least the version I have. Feb 07 20:34:02 i think illustrator is more suited to that kind of thing, but i don't have that Feb 07 20:34:08 gimp > all Feb 07 20:34:12 xD Feb 07 20:34:13 if you are on mac, Sketch is supposed to be good too - but when i tried it, was kinda buggy Feb 07 20:34:17 gimp drives me insane Feb 07 20:34:20 LOL Feb 07 20:34:51 See, I grew up using Photoshop and took a few classes on it in high school. To me, Photoshop is orders of magnitude easier than GIMP Feb 07 20:34:52 Does GIMP still show windows floating over the desktop by default? Feb 07 20:34:56 God, that interface was lame. Feb 07 20:34:57 TactialJoke: yes Feb 07 20:35:02 It's annoying too Feb 07 20:35:11 I remember when Borland C++ Builder and Borland Delphi did that. Feb 07 20:35:13 you can install Gimpshop Feb 07 20:35:15 Worst UI ever. Feb 07 20:35:24 it makes it try to resemble PS, but it doesn't do enough imho Feb 07 20:35:24 GImpshop???? Feb 07 20:35:31 woah, I'll check that out sometime Feb 07 20:35:36 it's a plugin for GIMP that fixes the palletes or whatever Feb 07 20:35:52 or maybe it's a fork - I forgot Feb 07 20:35:59 i thought the latest gimp has a different UI now Feb 07 20:36:14 perhaps - it's been years Feb 07 20:36:18 Wikipedia is talking about GIMPshop in the past tense. Feb 07 20:36:24 heh Feb 07 20:36:26 Like it's died or something. Feb 07 20:36:30 it may have Feb 07 20:36:44 im trying to send some data to my activity (via an interface) for example. all im trying to send is the position my view pager in and make it show up within a toast from the activity. but it's not working as intended. the position are all messed up. sometimes it works like its supposed to but at other times tab 4 is saying its position 2 and tab 3 is saying its position 0. or like if i scroll up and down on my list it's counting Feb 07 20:36:44 it triggering my toast (which shouldn't trigger unless you swipe) Feb 07 20:36:47 last time I looked into that it was like 2006 Feb 07 20:36:51 ReactOS anyone? while we're on the topic of dead things Feb 07 20:37:41 CrunchBang Linux is dead, I heard. Feb 07 20:37:46 Yep Feb 07 20:37:49 as of recently Feb 07 20:37:52 like eysterday or so I think Feb 07 20:37:55 Yeah. Feb 07 20:39:33 When I read the announcement, at first I thought he was saying "I've given up because Linux has no future on the desktop". Feb 07 20:39:40 Oh god Feb 07 20:39:41 Linux is dead? Feb 07 20:39:43 *shudder* Feb 07 20:39:53 CrunchBang Linux is dead, not Linux itself Feb 07 20:40:03 oh ok. was bota say. Feb 07 20:40:21 Linux will likely never die, at least in the very long-term future Feb 07 20:40:58 crunchbang died? huh Feb 07 20:41:25 Not too big of a deal tho, imo. IIRC it was based on Arch Feb 07 20:41:41 Might as well just go off Arch and install whatever DE CB used Feb 07 20:41:52 and enjoy systemctl Feb 07 20:41:57 ... Feb 07 20:42:39 I used Arch a few years ago and loved it Feb 07 20:42:55 Unfortunately the linux desktop that I liked didn't run well on my desktop after some part swaps Feb 07 20:43:01 so I haven't touched it since Feb 07 20:43:18 and when I say desktop, I mean the desktp environment + distro Feb 07 20:43:22 which was Gnome 3 :) Feb 07 20:43:26 *bring on the hate* Feb 07 20:43:35 Is GNU/Linux your primary OS, t0astt? Feb 07 20:43:42 I used to like KDE a lot. Feb 07 20:43:45 i liked arch a lot - before that I used gentoo...then arch switched to systemctl and even though I still have it on my lappy, I just use windows and debian for servers now Feb 07 20:43:50 TacticalJoke: It was when I was in middle school/mid high school Feb 07 20:43:57 TacticalJoke: do I just put the jars in libs folder? or do I need to import as library? Feb 07 20:44:00 Though back then KDE apps looked lame on GNOME and vice versa. Feb 07 20:44:01 i use xfce+compiz Feb 07 20:44:06 Bauer: Are you using Android Studio? Feb 07 20:44:08 Primary right now is Win8.1 with StartIsBack Feb 07 20:44:21 Although I do need to try Linux on my new desktop Feb 07 20:44:23 t0astt: I went through a Linux phase where I refused to use Windows as a teen. haah Feb 07 20:44:25 haha* Feb 07 20:44:32 TacticalJoke: IntelliJ IDEA Feb 07 20:44:33 Yeah, I've not used it lately. Feb 07 20:44:34 I think true geeks do that, Tacticaljoke Feb 07 20:44:43 Bauer: Are you using Gradle? Feb 07 20:44:45 You develop the anti-microsoft persona Feb 07 20:44:48 TacticalJoke, that's about right. I raged at XP one day so hard that I installed Linux and used it exclusively all through college Feb 07 20:44:53 I used to read comp.os.linux.advocacy. Feb 07 20:44:55 TacticalJoke: I dont think so, dont even know what that is Feb 07 20:44:56 That was a big factor. Feb 07 20:45:06 xD Feb 07 20:45:16 i like Feb 07 20:45:17 Bauer: Do you have a build.gradle file somewhere in the Project tool window? Feb 07 20:45:18 ubuntu Feb 07 20:45:28 ubuntu irritates me Feb 07 20:45:44 lots of support + great font Feb 07 20:45:46 it comes too pre-packaged for my taste Feb 07 20:45:48 XP was super-not-secure when it first came out. Feb 07 20:45:50 Ubuntu used to be awesome, back in the 7.## days Feb 07 20:45:59 I liked Ubuntu a lot. So simple. Feb 07 20:46:05 Stuff just worked -- even weird hardware devices. Feb 07 20:46:10 But when they started going "LETS BRING UBUNTU TO THE MASSES YARRRR" and changed the font and Unity, I dumped it Feb 07 20:46:15 ^ Feb 07 20:46:16 when I use linux, I still pick Arch Feb 07 20:46:26 I've not used Unity. I notice that basically everyone hates it. Feb 07 20:46:37 TacticalJoke: what do you mean tool window? if project explorer, then no, only build.xml Feb 07 20:46:38 I enjoy Fedora, though. Fedora, Arch, and ElementaryOS Feb 07 20:46:39 I think it looks nice, but given the reaction from nerds I presume I'd hate it too. Feb 07 20:46:44 eOS is probably my favorite right now Feb 07 20:46:55 I feel bad for the unity devs, but I think it's terrible UI Feb 07 20:47:14 im using bio-linux atm. Feb 07 20:47:27 Bauer: You're using Ant in IntelliJ? Wat. Feb 07 20:47:30 im just trying random shit Feb 07 20:47:44 Unity felt like what Windows 8 feels like, imo Feb 07 20:47:53 But then again I LOVED, LOVED Gnome2 Feb 07 20:48:20 Not a big fan of KDE though, it feels too... "sterile" and windows-y Feb 07 20:48:23 TacticalJoke: hmmm.. I dont think I specified Ant when started the project :s Feb 07 20:48:25 sterile like how OS X feels to me Feb 07 20:48:32 Bauer: When did you start the project? Feb 07 20:49:39 TacticalJoke: couple of months back.. I work in slow pace Feb 07 20:49:55 Bauer: What does it say if you go Help > About? Just curious of which version you're using. Feb 07 20:50:39 TacticalJoke: 13.1.6 Feb 07 20:51:07 Well, you could just copy the JAR to /libs, I guess. Feb 07 20:51:14 But it'd be much better to simply use Gradle. Feb 07 20:51:28 With Gradle, it's just adding a line to a file. Feb 07 20:52:07 It might be worth trying Ctrl+Shift+N and searching for both "pom.xml" and "build.gradle", though, just in case. Feb 07 20:52:11 is Gradle a package manager? something like composer in php? Feb 07 20:53:31 Bauer: yes Feb 07 20:53:40 there is pom.xml apparently.. no gradle however. and it *seems* that copying the jar to libs works, so far :) Feb 07 20:54:18 Is that "pom.xml" in your project? (Or does it show "No matches found in project"?) Feb 07 20:54:20 I see.. I feel that at first I should avoid adding complexity to my project, while I am not well versed in how all the parts work together, right? Feb 07 20:54:31 Bauer: You want to go into your build.gradle and change the dependencies Feb 07 20:54:49 find the compile statements using this app: http://gradleplease.appspot.com/ Feb 07 20:54:57 interesting t0astt , actually the pom.xml is inside the okhttp jar file :) Feb 07 20:55:00 Gradle makes things very easy, definitely use it Feb 07 20:55:18 Ah, okay. Feb 07 20:55:28 Honestly, I would just switch to Android Studio and use Gradle. Feb 07 20:55:37 anyone know of a tabbed viewflipper library? Feb 07 20:55:41 *custom view Feb 07 20:55:49 You're currently using an older version of IntelliJ and (as far as I can tell) using Ant, an ancient build tool. Feb 07 20:55:58 why TacticalJoke? is Android Studio better than IntelliJ? Feb 07 20:56:27 Bauer: Android Studio is IntelliJ, customized for Android development Feb 07 20:56:36 I could upgrade to version 14, didnt want to touch what works Feb 07 20:56:41 So you can see why it would make it easier :) Feb 07 20:57:58 hmm, so migrating the project to AS should be as simple as copying it hopefully? :) Feb 07 20:58:33 I think either it'll open directly in AS or you'll be able to import it into AS. Feb 07 20:58:56 When I switched from Eclipse to AS I did it all manually (which was surprisingly easy). But that's just me being picky. Feb 07 21:00:06 what is the method for when an intent finishes with no result? Feb 07 21:00:25 setResult(0) or something Feb 07 21:00:40 lasserix: i mean in teh parent class Feb 07 21:00:58 TacticalJoke: thanks for all the help :) when I copy jar to /libs, if I right click the jar, I have the option "Add as library.." - do I need that? what does it do? Feb 07 21:01:00 for example i want to refresh my listView when the activity is done Feb 07 21:01:03 same one with result just different flags Feb 07 21:01:18 Bauer: yes Feb 07 21:01:21 DadFoundMy, there's no concept of intent finishing. Feb 07 21:01:34 DadFoundMy, might wanna refresh contents in onResume. Feb 07 21:01:51 Bauer: it adds it as a dependency to the module, you can right click goto Module Settings, select your app module, goto dependencies tab to verify the jar is being referenced\ Feb 07 21:01:58 Mavrik: ahh that makes more sense Feb 07 21:02:40 Bauer: This is all I do in Gradle: compile 'com.squareup.okhttp:okhttp:2.2.0' Feb 07 21:03:19 So I had an idea a few days ago involving GCM and registration in my app. So right now when someone registers their email for their account in my app, they have to go confirm it. I have some messy checking once they open the app again to see if they've been confirmed. Would it be viable for my server to send a GCM activation message to their device instead of having the messy checking? Feb 07 21:03:48 hmmm, I will try to migrate the project to work with Gradle I guess :) Feb 07 21:04:02 Bauer: Definitely do. It will make your life so much easier Feb 07 21:04:39 t0astt, yep, makes sense Feb 07 21:05:04 can TabHost be used in a custom viewgroup or is specifically for fragments/activities? Feb 07 21:05:08 Cool. I just wanted to make sure I wasn't abusing GCM or doing something taboo Feb 07 21:05:12 I know I'm suggesting a lot of things (OkHttp, minSdkVersion=15, Gradle), but they are clear wins. It's an "I don't want you to endure the pain others have had to endure" thing. Feb 07 21:05:43 Many mortals have fallen. Feb 07 21:05:55 ^ Feb 07 21:06:23 Only time I disagree is with OkHTTP... Not even really sure, tbh. I guess it seems a little more complex to setup than the loopj AsyncHTTP library Feb 07 21:06:28 You could stick with IntelliJ for Grade. Feb 07 21:06:30 Gradle* Feb 07 21:07:17 t0astt: As far as I could tell, loopj doesn't allow streaming the response in a background thread (it required loading the entire response into memory). If that's true, OkHttp is *way* more flexible. Feb 07 21:07:41 Though maybe I misunderstood (I read the Javadoc quickly). :) Feb 07 21:07:57 I think I actually read last night (while I was fuming over irritation lol) that it supports streaming Feb 07 21:08:03 What would be a case to use streaming, though? Feb 07 21:08:11 Every single one Feb 07 21:08:23 :'( Feb 07 21:08:33 In my app, if I don't stream the response then I get *huge* GC-related overhead. Feb 07 21:08:48 Buffering is slow and wasteful for almost all use cases Feb 07 21:08:48 Memory pressure is one, faster onCreate() is another one Feb 07 21:09:07 So is streaming the same, except instad of storing the response in RAM it just sends it temporarily? Feb 07 21:09:09 ish? Feb 07 21:09:43 It reads the data as it comes across the wire without accumulating it (in any real sense) Feb 07 21:09:47 i forget will onStop() or onDestroy() not always be killed? or both? Feb 07 21:09:58 im rusty :/ Feb 07 21:10:06 onPause is the one that has a guarantee. Feb 07 21:10:17 Because if that's the case then I'm going to start using streaming. I noticed in my Logcat while running my app that it said something about increasing heap size (I think) to 26MB or similar Feb 07 21:10:23 and that kinda unnerved me Feb 07 21:10:38 Did you see GC_FOR_ALLOC messages? Feb 07 21:11:02 TacticalJoke: I think that was the message Feb 07 21:11:28 and that makes sense JakeWharton. Are there any downsides to streaming? Such as losing data, etc.? Or is it over TCP and you don't need to worry about losing it? Feb 07 21:11:57 This page mentions streaming only with regard to uploads: http://loopj.com/android-async-http/ Feb 07 21:12:15 You won't lose data Feb 07 21:12:41 Ah. Well, I guess you guys have converted me over to OkHTPP then Feb 07 21:12:48 HTTP* Feb 07 21:13:04 I am getting a NullPointerException while setting a callback using the ...(new SomeInterface)... code. https://gist.github.com/vedant1811/dfb2854585f93233fda7#file-somethig-java-L2 Feb 07 21:13:07 If I go with OkHTTP, should I just Retrofit though? Feb 07 21:13:10 How is that even possible Feb 07 21:13:50 t0astt: There are two possibilities: 1. Read the data as it comes and do stuff with it (including ignoring it). 2. Read the data as it comes and build up a memory buffer (which could become *huge*). Feb 07 21:13:56 "Streaming" is #1. Feb 07 21:14:23 I mean "add it to a memory buffer". Feb 07 21:14:29 Ah, I think that would work then. Feb 07 21:14:42 yeah i don't see much sense buffering client-side in most cases Feb 07 21:14:46 In my case, the data is enormous, so #2 is a really bad idea. Feb 07 21:15:21 So far I've been trying to streamline what gets sent back from my server, but I think it would be a good idea regardless to do the streaming Feb 07 21:16:11 What is your exact case? Are you doing JSON stuff? Feb 07 21:16:29 Yes Feb 07 21:17:02 So far I've only do user account existence checks, and returning a user object to set locally. Feb 07 21:17:18 But I will be doing search queries which will be returning (possibly) lots of rows for my recyclerview list Feb 07 21:17:47 shouldn't be anything TOO crazy, because images will be displayed using the Fcaebook graph API and picasso Feb 07 21:17:56 putting a viewpager inside a viewpager (the child viewpager matches width, but is only say 250 dp tall) is a bad UI design? Feb 07 21:18:02 using facebook ID's that get passed from my server Feb 07 21:18:16 is there a limit for max views or something? because my linearlayout is refusing to show the last sublayout.. Feb 07 21:19:13 lasserix, you'll probably have a hell dealing with proper touch response. Feb 07 21:19:16 when I swap the last two elements, only the 'first' one is shown Feb 07 21:19:21 all the time :| Feb 07 21:19:31 Mavrik: ill just disable the parent if the child is touched Feb 07 21:19:41 but it seems like a flawed design choice Feb 07 21:20:09 esp when i can just use tabs + viewswitcher Feb 07 21:21:14 JakeWharton: Do you know whether it's possible to use resources in these new JVM unit tests? Everything I'm trying fails (e.g., placing them in src/tests/resources and using "getClass().getResourceAsStream(...)"), and nobody seems to know how to do this. Feb 07 21:22:11 TacticalJoke: I have troubles with the libraries you suggested... I get this on logcat: I/dalvikvm﹕ Could not find method java.nio.file.Files.newOutputStream, referenced from method okio.Okio.sink (followed by a lot more lines) Feb 07 21:22:38 Bauer: you should use gradle Feb 07 21:22:44 I get that too. It's not anything to worry about. Feb 07 21:23:00 https://github.com/square/okhttp/issues/966 Feb 07 21:23:18 This is better: https://github.com/square/okhttp/wiki/FAQs Feb 07 21:24:07 lasserix: I will, first I want to get this basic POSt request working today Feb 07 21:24:41 Bauer: all you have to do is add one line to your build.gradle file to import the necessary libraries for this Feb 07 21:25:02 but TacticalJoke said its not a problem, so (i was assuming maybe the jar did not include a dependency of its own or something) Feb 07 21:25:16 Bauer: Make sure to test your POSTs first with a tool like POSTman (Chrome extension) to eliminate your app being the cause of a problem. Once you confirm the POST works, then do it on the device. I learned this the hard way Feb 07 21:25:24 Is there any way to set up videoviews so they are guarenteed to properly buffer? Feb 07 21:26:01 lasserix: I understand that, but what I fear right now is that I will loose an hour trying to configure Gradle.. Feb 07 21:26:14 Bauer: at least Feb 07 21:26:30 Any idea why onCreate is not called when i remove an app from process cache ? it starts with "onStart" only (thus crashing because things done at onCreate are skipped) Feb 07 21:26:33 Bauer: if you are using android studio you are already using it and it is auto configured ;p Feb 07 21:27:04 t0astt: I actually do use Postman regularly, and I tested it.. furthermore, I seem to have problems with seeing the response in debug mode, it seems to somehow skip the debug.. one sec Feb 07 21:27:16 ktwo: How are you removing it from the process cache? Feb 07 21:27:30 via the Apps menu entry in settings Feb 07 21:27:44 Ah, ok Bauer Feb 07 21:30:37 ok, in debug watch, String res = response.body().string() has the value of {char[0]@830036351488} - but when I copy value, it is [] ... Feb 07 21:31:29 What do you mean by "copy value"? Feb 07 21:32:09 in the watch window in debug, there is option to copy value - the one I see.. it pastes as [] Feb 07 21:32:15 Bauer: I believe that just means it is set, not that it has an actual value there Feb 07 21:32:18 and I see in watch value what I typed Feb 07 21:32:41 t0astt: then why does it show that reference and not the real empty value? Feb 07 21:32:44 Bauer: the value is an empty string Feb 07 21:32:55 char[0] - an array of length 0 Feb 07 21:33:42 hmm ok, but why does it say value = {char[0]@830036351488} ? that is confusing.. Feb 07 21:33:54 Because it means it is set in memory Feb 07 21:34:12 Just because it is set in memory does not mean it has to have a value Feb 07 21:34:30 At least that's what I learned (somewhat) in my Java class a few years ago Feb 07 21:34:42 t0astt: that really doesn't make much sense :) Feb 07 21:35:51 Bauer: can you post a screenshot? Feb 07 21:36:02 of the watch window in the IDE where you see that Feb 07 21:37:44 Hey people! Feb 07 21:38:05 do you know any way/lib/whatever to add a SHARE feature to my app? Feb 07 21:38:53 I don't want to write code for each app installed in the device Feb 07 21:40:54 Is it possible to debug in Android studio and use the android device monitor at the same time? I want to fiddle with the location controls while I'm debugging my app. Feb 07 21:41:13 So far it keeps telling me it's going to kick me out of my debug session if I want to open up the device monitor at the same time. Feb 07 21:42:30 JesusFreke: http://i.imgur.com/DipseP1.png Feb 07 21:43:30 Oh, Bauer. I think you are setting the value of Res to an object Feb 07 21:43:45 you're setting it to the actual String object, NOT the value of the String object Feb 07 21:43:51 er wait Feb 07 21:44:01 Hello. I am getting a "This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: Learn more: https://code.google.com/apis/console" error when trying to use the directions API Feb 07 21:44:01 you're setting "value" to a char array object Feb 07 21:44:09 huh? its String res = response.body().string(); atm Feb 07 21:44:09 not the value of that array key in the object Feb 07 21:44:22 t0astt: that makes no sense :) Feb 07 21:44:39 Bauer: the actual value is the "" out to the side Feb 07 21:44:56 the whole String@ thing and the char[0] @ thing is showing the object's identity Feb 07 21:45:13 so you could potentially differentiate that object with another object of the same value Feb 07 21:45:23 which can sometimes be helpful while debugging Feb 07 21:45:44 ahh, hmm well - the debugger's way to show it is not very intuitive.. or perhaps its just Java's fault as always, for not being intuitive :P Feb 07 21:45:53 why would I have to? they'd have different var name Feb 07 21:46:16 String variables hold references (pointers) to string values. Feb 07 21:46:31 Bauer: pretty much every debugger ever displays objects like that, fwiw Feb 07 21:47:31 Bauer: e.g. a = "blah"; b = a; c=a.clone();. now a and b have a reference to the same string, but c has a reference to a different string with the same value. Feb 07 21:47:36 how do you implement the share button? do you write code for each of the main social networks? Feb 07 21:47:42 so a == b would return true, but a == c would return false. Feb 07 21:48:02 Wixy: generally you use one of the common intents, like 'action_send' Feb 07 21:48:04 if the debugger just showed the value, all 3 variables would be shown as having the value "blah" Feb 07 21:48:29 but you wouldn't be able to tell that the object in a is different than the object in c (and the same as the object in b) Feb 07 21:48:41 I see.. yeah I vaguely start to remember, I didnt like the pointers and reference hell in uni, in C :( Feb 07 21:48:44 Wixy: sorta like this: http://sudarmuthu.com/blog/sharing-content-in-android-using-action_send-intent/ (you'll have to customize e.g. the content type for your app, but that's basically it) Feb 07 21:48:57 PHP is much more intuitive without worrying about that stuff for example Feb 07 21:48:58 groxx, I did exactly that but it's not working for facebook. I'm pasting the code in case you can check it. the problem is that the message in facebook is empty even thought I set a EXTRA_TITLE and EXTRA_TEXT Feb 07 21:49:13 though* Feb 07 21:49:21 Java makes references really easy. Feb 07 21:49:28 There's no Hell there really. Feb 07 21:49:53 Wixy: facebook might be expecting some different values, or they might require both, or they might intentionally ignore both. they may have docs, but _most_ apps should be looking at those values Feb 07 21:50:17 thanks for the explanation JesusFreke :) Feb 07 21:50:29 https://gist.github.com/anonymous/83dd060efc111f8da6a4 Feb 07 21:51:04 (I'm missing a ", sorry) Feb 07 21:51:43 fixed here: https://gist.github.com/anonymous/662922097813588518d9 Feb 07 21:52:09 Wixy: fwiw a bit of googling suggests that Facebook may be intentionally ignoring text values, to force people to use their API: http://stackoverflow.com/a/21189010/16295 Feb 07 21:52:58 I read that too, but I assume there should be a way, it sucks to have custom code just for facebook :( Feb 07 21:53:09 Wixy: one of the other answers there suggests putting the text in the clipboard - that might be a decent idea, though you may end up replacing something else in there that they wanted Feb 07 21:53:14 I seem to start getting another problem.. my debugging re-starts sometimes get stuck on "Waiting for Debugger".. forcing me to close the IDE to get it to work.. just re-running in debug mode is not helping. Is that familiar problem? Feb 07 21:53:20 Wixy: yeah, but Facebook does that kind of shit. Feb 07 21:53:39 if you use their API, they can block you, throttle you, and track you. so they want everyone to do that. Feb 07 21:53:45 Bauer: Have you tried the Restart Logcat (or ADB, can't remember which one) command? Feb 07 21:54:52 t0astt: how? the IDE handles it by itself. there is no command line to issue commands that I have noticed Feb 07 21:54:56 Bauer: dunno what kind of options you have :\ it _might_ be easier to add a `Debug.waitForDebugger()` line where your location-update code gets called. then if you get disconnected, it just waits until you use the "attach to process" thing in Studio. Feb 07 21:55:39 Bauer: heh. maybe telnet? http://stackoverflow.com/questions/13727834/feed-android-sensors-with-fake-data Feb 07 21:55:51 Bauer: Are you in AS? There's a little button to the left of the logcat window. I'd get you a screenie but I'm busy with math hw Feb 07 21:56:00 groxx, it really sucks because if the Intent.createChooser doesn't work you have to have an extra button just for facebook in order to run the custom code Feb 07 21:56:04 :( Feb 07 21:56:10 anyway, thanks Feb 07 21:57:30 Wixy: yeah. tbh I think that's what Facebook wants though - free advertising in your app. Feb 07 21:57:46 t0astt: thanks! found the button.. to the right in logcat in IntelliJ :) Feb 07 21:58:01 Yep that's the one! Feb 07 21:58:07 I've no doubt Feb 07 21:58:27 groxx: your idea is nice, I will try it Feb 07 21:58:28 thanks Feb 07 21:58:42 everyone :) very pleased with progress for today, gnite! :) Feb 07 21:59:30 No problem, glad to help. 'night Bauer Feb 07 21:59:35 managed to get basic hardcoded json string to POST to API and get SMS sent to me with code to validate.. now will have to make it dynamic based on user typed phone in activity, and then somehow intercept the SMS Feb 07 21:59:36 btw what timezone are you in? Feb 07 21:59:47 any suggestions on what to use? I will read up on suggestions tomorrow Feb 07 22:00:10 t0astt: GMT+2, Israel Feb 07 22:00:30 Ah ok Feb 07 22:00:39 Chicago over here Feb 07 22:01:40 yeah, thats why its usually difficult for me to get help in this channel :( I live in the wrong country for now hehe Feb 07 22:02:17 Eh you never know. Sometimes I'm a night owl (staying up until 2am doing android development... lol) Feb 07 22:03:42 I still find Java not so easy to work with.. just so many classes and buffers to get simple things done. Any Java code is about 6 times more lines than comparable code in the likes of PHP. Sadly I dont have much choice atm, need to get used to it Feb 07 22:04:00 Same here, Bauer Feb 07 22:04:37 I’m looking for some advice, I bought my IAP yesterday but the receipt for some reason shows Amazon Store giving it to me from free? — https://dl.dropboxusercontent.com/u/8176796/Screen%20Shot%202015-02-06%20at%2019.51.46.png Feb 07 22:04:48 First language was Java, learned it in college through some classes. Next was PHP, and I used that at my current job (web developer). I like PHP a lot more, but I think that is because the barrier to entry is a lot lower (not strongly-typed, etc.) Java is OK once you get the hang of it Feb 07 22:06:17 To be honest, Java is a well designed language and PHP is not. Feb 07 22:06:29 Though I agree that Java is sometimes unnecessarily verbose. Feb 07 22:06:45 I would agree with PHP not being well-designed, but it's getting better with newer versions Feb 07 22:06:56 Especially with the move to OO Feb 07 22:07:45 t0astt: besides it being strong typed, it has one major flaw for small startups/companies: it heavily depends on configuration. eg: in uni I had a into to J2EE course (using older J2EE versions) - and configuring the web server to work with all components of our final project was hell.. we as team of 4 students spent days getting the IDE and basic project with all boilerplate components working on our 4 PCs Feb 07 22:08:09 DAYS, not hours.. Feb 07 22:09:44 I can imagine. I briefly worked with Tomcat and J2EE, and getting that to work was annoying Feb 07 22:10:13 TacticalJoke: well I agree its very lenient and forgiving to newbies, causing in messy code sometimes.. but an experienced developer with good framework, would be much more productive with it, than comparable dev with Java (which would also require a specializing person to configure the Java servers, hehe) Feb 07 22:10:30 Bauer have you ever used the Laravel framework before? Feb 07 22:11:11 t0astt: actually yes, I switched to it in recent months, did 1 project with it at work, and 1 private now (the API for my app) - I like it very very much Feb 07 22:11:24 Same here (same exact everything) Feb 07 22:11:37 simple to setup, learning curve is relatively short, but it has a lot of benefits and powerful tools Feb 07 22:11:49 Using it on a project at work... rewriting a web app that was written 8 years ago. Also writing the REST api for my app with it Feb 07 22:11:54 php does not need OO Feb 07 22:11:54 Agreed Feb 07 22:12:00 P. Feb 07 22:12:14 Bauer: Have you seen the GCM package for Laravel? Feb 07 22:12:24 Agamemnus: no, but today everything even in PHP is written in OO Feb 07 22:12:30 it's a push notification package that supports Apple notifications and GCM Feb 07 22:12:35 Well, not everything. Feb 07 22:12:43 t0astt: never heard of it.. whats GCM? Feb 07 22:12:45 Newer projects should written with OOP PHP Feb 07 22:12:49 I barely use any OOP for my PHP code. Feb 07 22:12:50 GCM = Google Cloud Messaging Feb 07 22:12:53 why? Feb 07 22:12:54 No point Feb 07 22:13:16 Agamemnus: In larger projects OOP works very well. Not necessary though for a small project Feb 07 22:13:23 does it make any difference if a DisplayMetrics object is created outside of an activity? Feb 07 22:13:24 O.o Feb 07 22:13:43 njcomsec, um, you can get display metrics only from a valid context Feb 07 22:13:52 njcomsec, doesn't matter where that context is tho Feb 07 22:14:36 just how much battery does the GPS location service use if I am only using it once? Its just on a certain activity for tracking, I am not requesting it constantly. Feb 07 22:14:47 i see. thanks i will look into that Feb 07 22:14:52 I always see how horrible it is for the battery, but is that for apps that try and use it all the time? Feb 07 22:15:26 bilb_ono, depends on requested service, which hardware spins up, how often do you request Feb 07 22:15:33 t0astt: probably. I see a lot of newbie programmers trying to do very simple things in various programming languages by using very complex methods and then getting confused about it. Feb 07 22:15:33 Mavrik can you think of any way in rx, to .cache() only the last emitted item for downstream observables which subscribe sparsely ? Feb 07 22:15:53 Mavrik, I am just trying to get lat and lon, and just doing it once Feb 07 22:15:56 t0astt: the most complex bit of Laravel I used so far, is its Queue system, to send customer a delayed SMS once his order has been provisioned. it works very nicely Feb 07 22:16:25 I haven't worked with queues yet, but I plan on it very shortly for some email sending and GCM's Feb 07 22:17:09 I am using Pushwoosh for GCMs. I need to make my own system so that I can personally harass players into buying IAPs. Feb 07 22:17:35 bilb_ono, that says nothing about what you're really doing Feb 07 22:17:46 bilb_ono, are you spinning up the GPS chip? How long is it running? How often? Feb 07 22:17:49 hi! Feb 07 22:18:13 bilb_ono: if you're only targeting devices through google play, google's location service lets you get the last recorded location basically instantly, no power cost (because it doesn't actually do anything) Feb 07 22:18:17 i need some tips on exporting 3dmodels to cardboard grid system Feb 07 22:18:25 good luck :) let me save you some time: Basically you need to configure 4 components: 1) the initiator script (your first web request I guess) which pushes a job into queue 2) the queue service (a package on linux) 3) a daemon which ensures the queue service is always up 4) the Laravel code that is executed when queue is ran Feb 07 22:18:49 bilb_ono: it may not be accurate (so you might want a "refresh" button), but it's correct for me ~99% of the time Feb 07 22:18:51 Interesting. I didn't know about needing a queue service or daemon Feb 07 22:18:51 Some basic numbers of turn - idling phone burns like 150-200mW, GPS chip active is abou 400-450mW, full screen brightness costs you 600mW, Wifi actively transmitting is in range of 700mW and 3G transmitting is anywhere between 400-600mW Feb 07 22:18:53 Thanks Bauer Feb 07 22:19:13 glad I could help :) thanks everyone, and gnite! :) Feb 07 22:19:13 so essentially you're doing x6 battery use as long as GPS (if!) chip is active and trying to aquire a lock Feb 07 22:19:31 Mavrik, hmm yeah I guess so. here is the code: https://bpaste.net/show/e670efb5b507 Those event.put calls put it into a tracking event That gets sent to a server. Basically its called whenever this activity is created Feb 07 22:19:31 night! Feb 07 22:19:41 wondering what location provider to use Feb 07 22:20:13 bilb_ono, 1.) Why aren't you using the fused provider? Feb 07 22:20:29 2.) You use the one that gives you enough accuracy. Feb 07 22:21:07 it seems to me, more people will be wondering this, on how to put their 3d-models created by something like solidworks to make them viewable in a cardboard-viewer Feb 07 22:21:22 t0astt: just before I really go, any recommendations on what to use to intercept the SMS with validation code? Feb 07 22:22:28 Bauer: No clue, unfortunately. I haven't worked with SMS at all. Feb 07 22:22:46 Mavrik, umm not sure. ill look at fused provider. Is that something I pass to getLastKnowLocation? Feb 07 22:23:17 bilb_ono, that's something you read the documentation on first Feb 07 22:23:22 because that question was silly :P Feb 07 22:23:35 it's part of play services Feb 07 22:28:14 if my game has in the gameplay, 2 types of screen(eg base management and exploration), they should both be the same activity right? i was going to make them seperate activities but then i realized they would navigate with use of the back button and other activity stuff which isnt really what i want Feb 07 22:29:26 Hello everyone. I'm working on a homework and I need to have a grid that occupies 60% of the screen's height. Since the grid layout does not seem to support the android:layout_weight property, I put the grid layout within a relative layout. Does it really have to be this way? also I want the columns, rows, horizontal and vertical spacing to be of a predefined percentage of the screen width... Feb 07 22:29:28 ...and height accordingly. Is there a way to do that in the layout? Does android:layout_weight work within a grid layout? All the examples I've seen so far show a basic layout.xml file and the grid gets populated with java code. is this the only way to do it, besides it probably being the best way? Besides none of the examples I've found has proportionate widths, heights and spacing.... Feb 07 22:29:29 ...Ultimately, are grids my only option? I first tried table layout but grid seems so much better. Any and all comments are welcom. TIA! **** BEGIN LOGGING AT Sat Feb 07 22:47:38 2015 Feb 07 22:48:16 Greetings! Feb 07 22:48:40 Silent no more Feb 07 22:48:49 heh :) Feb 07 22:50:35 every time i launch my application from AS, it changes the filter to my app - which i dont want atm. is this configurable anywhere ? Feb 07 22:50:54 the logcat filter more specifically Feb 07 22:52:03 sounds like a bug g00s Feb 07 22:52:07 I would report it Feb 07 22:52:54 I just made a pull request on pidcat, maybe you'd want to check that out? Feb 07 22:53:12 so if I want to use the fused location provider with private FusedLocationProviderApi fusedLocationProviderApi = LocationServices.FusedLocationApi; where is the best place to put that? do I just put it in onCreate? Feb 07 22:53:13 oh look, somebody already filed it https://code.google.com/p/android/issues/detail?id=79376 Feb 07 22:54:29 its annoying as hell, if i delete the filter, launching will automatically recreate it again Feb 07 22:54:44 so many of these stupid little bugs Feb 07 22:55:00 I starred it g00s Feb 07 22:56:09 MikeWallaceDev thanks, i did too Feb 07 22:56:44 surprisingly, I only saw 1 star... not sure if I read that correctly Feb 07 22:59:10 huh actually i may have fixed it Feb 07 22:59:37 pebkap, possibly. in the launchg config, there is an option under logcat - show only logs from this app - which i had checked Feb 07 22:59:41 * g00s unchecks Feb 07 23:00:36 That LogCat thing is so annoying. Feb 07 23:00:43 you should always check what you check Feb 07 23:01:22 Wait, let me try that setting. Feb 07 23:01:59 wait a minute, WAIT A MINUTE HERE!!! I think you may have found MY pet peeve at the same time g00s ! The fact that the Android tab always pops up on launch! Feb 07 23:02:14 God I hated that Feb 07 23:02:19 Oh, nice! That fixes it. Feb 07 23:02:40 I unchecked "Filter to only show output from this application" in the run task. Feb 07 23:02:46 Now it keeps my previous filter. Awesome. Feb 07 23:02:49 yeah Feb 07 23:02:52 I've been hating the default behaviour. Feb 07 23:03:13 Thanks. :D Feb 07 23:03:17 I'd better go. Have fun. Feb 07 23:03:48 I unchecked the "always show logcat" option! Feb 07 23:05:49 Is there any way to take the Lollipop spinner animation and use it in previous versions of Android? Can I just copy the actual animation graphic into my project? Feb 07 23:06:02 More specifically, the loading spinner Feb 07 23:06:29 what version should I have for this: compile 'com.google.android.gms:play-services:6.5.+' It just says it cannot find it. Do I need to use a specific version? Feb 07 23:10:08 MikeWallaceDev it would be nice if there was a way to show the gradle console when kicking off a build, but then have it hide when done Feb 07 23:10:25 maybe there is a way to do that, but i haven't seen it Feb 07 23:10:54 I don't know if there is a way to send commands to AS from Gradle... that would be cool too Feb 07 23:11:40 oh i meant the IDE tool window Feb 07 23:11:53 i keep showing / hiding it manually Feb 07 23:12:08 that's what I meant too :P Feb 07 23:12:29 Hello everyone. I'm working on a homework and I need to have a grid that occupies 60% of the screen's height. Since the grid layout does not seem to support the android:layout_weight property, I put the grid layout within a relative layout. Does it really have to be this way? also I want the columns, rows, horizontal and vertical spacing to be of a predefined percentage of the screen width... Feb 07 23:12:30 ...and height accordingly. Is there a way to do that in the layout? Does android:layout_weight work within a grid layout? All the examples I've seen so far show a basic layout.xml file and the grid gets populated with java code. is this the only way to do it, besides it probably being the best way? Besides none of the examples I've found has proportionate widths, heights and spacing.... Feb 07 23:12:32 ...Ultimately, are grids my only option? I first tried table layout but grid seems so much better. Any and all comments are welcom. TIA! Feb 07 23:12:45 so in the gradle script, you could add a task to show, then hide whatever you wanted Feb 07 23:19:05 i dont why but i cant use VersesApplication app = (VersesApplication)getActivity().getApplication(); in the fragment Activity Feb 07 23:23:42 i got a castClassException , i have also test VersesApplication app = (VersesApplication)getActivity().getApplicationContext(); in the fragmentActivity , i got the same error Feb 07 23:23:57 On a grid layout, How cqn I give each column a width of, say 20% the width of the layour and the horizontal spacinf, say 5%? Can this be done? Feb 07 23:24:24 is there any way to use the Application in the FragmentActivity Class? Feb 07 23:27:42 does anyone know what drawable android uses for edittext? Feb 07 23:31:24 what would be the best way to reuse layouts that I am inflating in various fragment tabs which preserving actions and onclick methods Feb 07 23:51:51 On a grid layout, How can I give each column a width of, say 20% the total width of the layout and the horizontal spacing, say 5%? Can this be done? Feb 07 23:54:45 nimbiotics have you tried weights Feb 07 23:55:12 Hello, I'm doing a vertical linearlayout to make use of weights. will aspect ratios of images used within be maintained? If not, should I nest it inside a horzontal layout? Feb 07 23:55:26 alternatively, overloading the GridLayout class or whatever populates it? Feb 07 23:57:14 Someone reviews your app from a different phone to yours saying that the app crashes. You can find a NullPointerException in the Google Play crashes tab, but you can't get it to crash from your phone. What do you do? Feb 08 00:04:25 duncannz: emulator Feb 08 00:09:34 ohhhhhhh shit Feb 08 00:09:40 I just realized something Feb 08 00:09:52 <_genuser_> so I'm understanding this correctly? IntentService will continue onto completion of onHandleIntent() even if the calling activity is killed? Feb 08 00:10:07 Savegames. Feb 08 00:10:22 Can you make it so they are only modifiable by my server Feb 08 00:10:27 instead of by the app? Feb 08 00:10:34 and only readable by the app. Feb 08 00:10:38 is that possible at all Feb 08 00:10:54 on google play services I mean Feb 08 00:11:33 _genuser_ yes Feb 08 00:12:16 actually wait Feb 08 00:12:35 do save games require a permission? Feb 08 00:12:38 never mind Feb 08 00:16:23 where is the resource ID located in android studio? shouldn't it be under /app/build/? Feb 08 00:21:50 back Feb 08 00:23:01 <_genuser_> g00s: I see. that is good. Now, if we do startService(); back to back twice, I see the docs say it will wait until the first request completes Feb 08 00:23:15 <_genuser_> g00s: but once it is submitted, I'm assuming each request _will_ be handled. Feb 08 00:23:51 <_genuser_> IntentService sounds like it does specifically what I want it to do. Feb 08 00:26:44 so with the fuser location api, do I need to put everything in a seperate class/activity? Feb 08 00:28:08 What should I be passing to all those calls that take a Context? I usually pass `this`, but if the user leaves that screen before the dialog is supposed to pop up, it crashes because the activity is no longer running. Some answers on SO related to the problem say to pass getActivity(), is this a good idea? Should I always be passing getActivity() rather than this? Feb 08 00:28:41 <_genuser_> I think I remember reading you should pass getApplicationContext() to most of the things. Feb 08 00:28:57 alright Feb 08 00:29:38 that would make sense because it's the application context which doesn't get GC'd rather than the activity which does Feb 08 00:29:44 maybe Feb 08 00:29:53 <_genuser_> duncannz: http://possiblemobile.com/2013/06/context/ Feb 08 00:30:07 thanks Feb 08 00:30:09 <_genuser_> I think that's the link someone posted around recently for context related issues. It's got a good bit of info. Feb 08 00:30:10 TheKarlBrown_: Thanks for answering my question. You made me look deeper into the documenation for API 21, yet, I cannot find how to apply weights to column widhts and row heights; they only property I know I can use is android:columnWidth, and it does not accept relative values, can you please give me a hint on that? TIA! Feb 08 00:31:03 <_genuser_> duncannz: there's a section there "Context Capabilities" that might be of value to look at. talks about what each context can do. Feb 08 00:32:51 _genuser_: well in my situation I want to show a dialog (pass a Context to the AlertDialog.Builder constructor), and it lists Application as NO, does that mean I shouldn't use getApplicationContext? Feb 08 00:35:03 <_genuser_> duncannz: I see. and in your case you said the activity is killed after call to dialog but before the dialog is displayed? Feb 08 00:49:34 _genuser_: yep, basically I have a network request (using Volley) and it pops up a dialog if it fails (onError). But if the user has already left the screen by the time an error occurs, the app crashes because `this` (which I am passing to Context for the AlertDialog.Builder) no longer exists. Feb 08 00:50:09 I'm thinking about writing `Context context = getApplicationContext();` at the top of all my classes then simply passing `context` instead of `this` to such methods. Feb 08 00:51:32 <_genuser_> I see. volley is trying to popup a dialog using a context that doesn't exist. I know it says application context cannot display dialogs, so it's a bitof a conundrum. Feb 08 00:51:57 <_genuser_> you can try passing the application context and see how it behaves. Feb 08 00:52:25 <_genuser_> I haven't run into an issue with context that is as involved as yours. most of mine are getApplicationContext() and it's just fine. but lot of my UI is basic. Feb 08 00:52:41 <_genuser_> you might try to disable the dialog on error and just display a toast using application context. Feb 08 00:53:41 If my screen configuration has the following Configuration : {1.3 302mcc?mnc en_US ldltr sw800dp w1280dp h727dp 320dpi xlrg land finger -keyb/v/h -nav/h s.29} What percentage of the screen would a 300 X 650 pixel image take up? Something is really fishy here... Feb 08 00:55:16 it indeed doesn't work to use application context for Dialogs, it crashes and I get "Unable to add window -- token null is not for an application" Feb 08 00:55:35 (My image is 650 pixels high, the screen is 727, it should take around 80% of the screen, and yet it's at less than 50%) Feb 08 00:56:11 more than that! 90%! Feb 08 00:56:29 <_genuser_> duncannz: if that alertdialog is a must, you then also have a second requirement: have an activity up that can launch a dialog. Feb 08 00:57:01 <_genuser_> duncannz: if you can change your error to a Toast, you could move it to a toast with long length of diaply time. Feb 08 00:57:05 <_genuser_> *display time. Feb 08 00:57:29 I could just change this to a toast; a toast is probably better for an error message anyway. But this is an issue I'm gonna encounter elsewhere too Feb 08 00:58:10 <_genuser_> I see. yeah, some of this stuff is pretty new to me also and forces me to re-design my app from what I had imagined it to be. Feb 08 00:58:59 well I guess I'll just go with that then, so in general pass `this` but for toasts pass `getApplicationContext()`. And use toasts not dialogs whenever something might happen later and the user could have closed the screen Feb 08 00:59:07 there we go then Feb 08 01:03:02 does anyone know what drawable android uses for edittext? Feb 08 01:04:53 <_genuser_> I have moved to passing getapplicationcontext to everything. unless it crashes, lol. Feb 08 01:05:05 <_genuser_> anyhoo, bbiab Feb 08 01:07:24 Holy crap, my Nexus 10 has more pixels than I thought! I thought it was 1280 PX! It's actually "Resolution 2560 x 1600 pixels (~299 ppi pixel density)" Feb 08 01:07:33 No wonder I was screwed up Feb 08 01:08:23 On the bright side, at least now I have to re-make ALL of my images... Feb 08 01:17:34 wish good night Feb 08 01:17:35 + Feb 08 01:26:02 _genuser_: I posted my question to SO after still not being able to find an answer http://stackoverflow.com/questions/28389555/showing-an-alertdialog-once-the-activity-has-closed Feb 08 01:33:24 I want to create a window that pops up over my current fragment, allows you to input an integer, and you either set that integer to a preference file or cancel it. you then return to the fragment. the view that triggers it will be a clickable textbox at the bottom of the fragment. anyone have suggestions? Feb 08 01:42:52 I am following this guide: https://developer.android.com/training/location/retrieve-current.html and I put the mGoogleApiClient build thing in my onCreate on my Activity, but I get "cannot resolve symbol mGoogleApiClient" can someone explain wy? Feb 08 01:43:27 did you declare it bilb_ono ? Feb 08 01:44:00 MikeWallaceDev, no. what type would I declare it as? Feb 08 01:44:01 MikeWallaceDev: this is what happens when non-programmers try and program Feb 08 01:44:13 Napalm, gotta start somewhere Feb 08 01:44:29 thats ok, but you didnt read the docs Feb 08 01:44:35 bilb_ono start by learning java :) Feb 08 01:44:38 yeah bilb_ono , but not by programming a location app in Android :) Feb 08 01:44:44 I am reading the docs, just not understanding them Feb 08 01:44:46 bilb_ono, learn Java first Feb 08 01:44:57 bilb_ono: see the "try it out" link at the top of that page Feb 08 01:45:25 bilb_ono: if you follow your nose you'll find this. https://github.com/googlesamples/android-play-location/blob/master/BasicLocationSample/app/src/main/java/com/google/android/gms/location/sample/basiclocationsample/MainActivity.java#L48 Feb 08 01:49:28 Napalm, thanks Feb 08 01:49:50 duncannz: I up-voted the correct answer already posted. Feb 08 01:51:22 TheKarlBrown_: can you explain what you are looking for in a little bit more detail. Like do you want the pop-up to be modal? Feb 08 01:53:29 Napalm I'm embarassed to say I don't know what you mean :3 Feb 08 01:54:32 TheKarlBrown_: http://en.wikipedia.org/wiki/Modal_window Feb 08 01:55:11 TheKarlBrown_: ok so first off you need to think about what your trying to do to work out what the best approach to a solution is. Feb 08 01:55:25 TheKarlBrown_: since you haven't explained this. I can only guess. Feb 08 01:56:53 I would like it to be modal Feb 08 01:56:57 seems like less would be disrupted Feb 08 01:57:21 hmm Feb 08 01:57:54 http://developer.android.com/guide/topics/ui/dialogs.html Feb 08 01:58:37 read the page first, before setting off and coding Feb 08 01:59:45 TheKarlBrown_: got it? Feb 08 02:00:03 okie dokie Feb 08 02:00:06 im already way into the code Feb 08 02:00:26 TheKarlBrown_: you might want to trigger the display of your dialog on when the EditText/TextView recieves focus Feb 08 02:00:51 another question Feb 08 02:00:54 TheKarlBrown_: if your using a TextView in your "current fragment" then you should add android:focusable="true" to it. Feb 08 02:00:59 http://www.101apps.co.za/index.php/articles/what-you-should-know-about-android-touch-mode-and-focus.html Feb 08 02:01:09 that should help in understanding how to trigger on focus Feb 08 02:01:14 perfect thanks Feb 08 02:01:15 Looking at LibGDX, seems pretty darn cool- but are there any pitfalls? Like I remember Unity being able to cross-platform but doing something x way was detrimental on y some devices for example. Feb 08 02:01:15 also Feb 08 02:01:32 is there a good way to reuse views set in an xml linear layout for multiple fragments programatically? Feb 08 02:02:21 or should I just copy/paste into the xmls? Feb 08 02:02:41 into multiple* Feb 08 02:04:01 TheKarlBrown_: you can use another xml file Feb 08 02:04:21 TheKarlBrown_: you can also use as the top level element of the xml file your including Feb 08 02:04:45 you are sexy napalm Feb 08 02:04:46 this way you dont get extra unnecessary views Feb 08 02:04:47 tank yyew Feb 08 02:05:12 TheKarlBrown_: READ THE DOCS > http://developer.android.com/training/improving-layouts/reusing-layouts.html Feb 08 02:05:32 I had already read it, I'm sorry I process a fuckton of information learning how to program Feb 08 02:06:02 I read like 100-200 pages a day I can only retain so much Feb 08 02:06:38 huh, Ed Burnette is revising his beginner Android book. but at 200 pages, not sure how much he's going to cover Feb 08 02:06:58 Eppiox: why not join #libgdx and ask them? Feb 08 02:07:48 g00s: he figures he'll get more money if he sells it as a series of shorter books Feb 08 02:07:51 i bet Feb 08 02:09:09 really Feb 08 02:09:14 200 pages Feb 08 02:09:41 thanks, and done Napalm. Feb 08 02:15:45 anyone know of a super barebones sqlite tutorial. I jsut need to knwo the basics of saving simple data Feb 08 02:17:43 DadFoundMy GoogleFoundYourTutorial Feb 08 02:18:56 g00s: obviously i have googled it first, but i wanted to know if anyone on here had a recomendation Feb 08 02:19:04 ive tried several that i just dont like so far Feb 08 02:19:13 http://lmgtfy.com/?q=sqlite+android+tutorial Feb 08 02:22:41 ugh I cannot set individual onClickListener's for my textviews inside the linear layout Feb 08 02:23:07 TheKarlBrown_: ? Feb 08 02:23:09 why not? Feb 08 02:26:50 TheKarlBrown_: yes you can. but you probably want a focus listener anyway. Feb 08 02:27:55 diff thing napalm Feb 08 02:28:08 hello, I am using android studio and I cant import the samples I download from developers.android.com. I click on open existing project and select the top level directory created by the zip file when I download it. Feb 08 02:28:33 TheKarlBrown_: you might want to use the same click listener for all the TextViews and then use the (View v) parameter in your click listener to tell which view was clicked Feb 08 02:30:04 wait Feb 08 02:30:14 So it cannot tell which view is clicked Feb 08 02:30:58 its about being implict or explict Feb 08 02:31:42 if you create a new View.OnClickListener for each TextView then you know the click listener is for one Feb 08 02:32:20 if you create one single View.OnClickListener and assign to to all the TextView's then you should use the parameter passed in to determine which view was clicked Feb 08 02:32:28 TheKarlBrown_: ^ Feb 08 02:33:44 oh god Feb 08 02:33:49 i did something hella autistic Feb 08 02:33:53 I'm sure Feb 08 02:34:01 lol, what? Feb 08 02:34:15 I'm gonna go down to the party downstairs for like 5 mins, clear my head, and figure out how I fucked up this onclick so hard Feb 08 02:34:25 its a clusterfuck Feb 08 02:34:42 heh, best of luck with both Feb 08 02:35:29 try to not throw up when you read this. ill brb http://pastebin.com/SZvJJU5h Feb 08 02:36:23 yes this is interesting.. Feb 08 02:36:41 ps. all this attribute modifying with text color and background can be done with xml selectors Feb 08 02:37:45 and you dont need to call invalidate(); its implict when you change a property of a view that affects its appearance. Feb 08 02:37:54 TheKarlBrown_: ^ Feb 08 02:38:33 TheKarlBrown_: Try to use camel case all the time, your code is hard to read Feb 08 02:38:37 TheKarlBrown_: also never repeatly use findViewByID when its not needed, especially never from getRootView() Feb 08 02:38:52 Also, you don’t need to findByView all the time, store this in a field Feb 08 02:39:16 got there first, bazinger Feb 08 02:39:21 So much repetition in this code, how about capturing all the common code in methods? Feb 08 02:39:40 setBackground+setColor+invalidate copy/pasted everywhere, yuck Feb 08 02:39:48 hi Feb 08 02:46:43 linuxuz3r: hi Feb 08 02:55:11 Hey everyone. I'm trying to layout three color pickers (https://github.com/LarsWerkman/HoloColorPicker) next to each other such that they take an even share of the width of the screen. I'm pretty sure it's possible, but I'm not good at doing layouts. Could someone help me? Feb 08 02:56:15 Question about Google Cloud Messaging... How do I get the users registration ID? Feb 08 02:57:10 t0astt: There’s some boiler plate to get a registration id and then save it to shared preferences, it’s documented pretty much everywhere Feb 08 02:57:30 Yeah, I think I'm close to finding it. I just found another section of the documentation **** ENDING LOGGING AT Sun Feb 08 02:59:58 2015