**** BEGIN LOGGING AT Sat Jun 13 02:59:59 2015 Jun 13 03:07:42 ^^ Jun 13 03:07:57 still trying to make it work, lul Jun 13 03:12:51 huh, guys do you know a good book about system analysis? Jun 13 03:18:51 Hey guys Jun 13 03:21:14 Guys getting a weird error in my xml saying all attributes inside of my cardView are "Not allowed here" Jun 13 03:21:21 Anyone willing to take a look at it? Jun 13 03:21:57 pastebin... Jun 13 03:22:34 pastebin is willing to look at _anything_ Jun 13 03:22:46 http://pastie.org/private/50lsekuzgpfv8k3hjumbg Jun 13 03:22:56 So everything inside of the CardView is getting "Not allowed here" Jun 13 03:25:16 But if I add /> to the CardView, it removes that error but gives me a new one Jun 13 03:26:40 I thought fill_parent was deprecated?? Jun 13 03:28:08 You guys see anything? Jun 13 03:30:24 fill_parent is deprecated, you should use match_parent. Jun 13 03:30:40 But would that be my issue Jun 13 03:30:43 at the root relativelayout you have android:orientation="vertical", relative layout does not use orientation. Jun 13 03:30:59 maybe that's your problem Jun 13 03:31:18 Good catch, but no Jun 13 03:32:47 also, is xmlns:card_view="http://schemas.android.com/apk/res-auto" really required? Jun 13 03:33:15 Yes, so I can add card_view:cardCornerRadius Jun 13 03:33:55 dunno, looks fine to me. try reducing the problem areas though - make a new layout with just the card view, make sure that works. add subviews. then stick it into your relative layout. Jun 13 03:34:09 Got it, thanks groxx Jun 13 03:34:16 Could be an AS error Jun 13 03:35:11 always possible too, yeah. done a rebuild / try invalidating caches if it seems like that could be the problem Jun 13 03:36:22 Sounds goood Jun 13 03:37:44 goooood Jun 13 03:38:16 * groxx has flashbacks to the Star Wars failogy Jun 13 03:39:51 :O Jun 13 03:53:34 groxx: I thought the prequels were just as good as the sequels and I think people who would say otherwise are not true Star Wars fans. Jun 13 04:01:44 when writing a "file manager" type app, under the hood is it just calling cmmand line binaries like ls or is some type of functionality built into the sdk for this? Jun 13 04:02:17 Curious about best practices -- how often do you guys use log messages? Should I be logging every step in the process to truly understand how something works? Jun 13 04:03:56 And afterwards should I keep the logging messages in permanently and only remove for production (through proguard)? or remove from my code Jun 13 04:04:45 Just curious because I feel like I don't use Log enough Jun 13 04:05:33 how the hell do u guys even understand all this android programming shit.. it seems so complicated compared to anything else Jun 13 04:05:39 i suck at it.. always will Jun 13 04:05:41 =[ Jun 13 04:06:35 Start by learning Java. If you don't know Java's fundamentals you will have a hell of a hard time Jun 13 04:06:37 Aernt LinearLayouts scrollable by default? Jun 13 04:06:49 maybe thats my problem =[ Jun 13 04:07:00 i come from c# tho so u would think itd be an easy switch Jun 13 04:07:07 but for me, not so much Jun 13 04:07:56 is it possible to work for a company if youve mastered android development? even if you dont have a degree, how much would they make Jun 13 04:09:03 Of course it's possible. Why wouldn't it be? Jun 13 04:09:11 Android devs are in hot demand. Will definitely be hard unless you have a portfolio though since no degree Jun 13 04:09:23 where i come from, its possible but not probable Jun 13 04:09:48 u aint getting any type of IT job without a degree or master cert Jun 13 04:09:54 i have a big portfolio, lots of apps, and i even design my own graphics in illustrator Jun 13 04:09:57 Foxhoundz: I'll leave it up to plinkett http://www.youtube.com/playlist?list=PL9A12F8F947849C30 he's ... annoyingly coarse at times, but covers a huge range of the issues. not that the originals don't have plenty of flaws, but they weren't anywhere near the same level of "I have no idea what I'm doing"ness. Jun 13 04:14:57 but i would never go to college, it seems really expensive -and everyone there thinks theyre better than people that dont go to college, I want to make it the old fashioned way Jun 13 04:15:48 hopefully android studio don't blow up my i5 Jun 13 04:16:54 it wont Jun 13 04:18:11 drose379: it blow my netbook up Jun 13 04:18:12 :P Jun 13 04:18:21 then again, to be fair it lag on eclipse Jun 13 04:19:13 haha Jun 13 04:19:45 drose379: I am now using my most powerful computer to run android studio Jun 13 04:19:52 what is it Jun 13 04:19:53 i5 5xxum Jun 13 04:20:01 alienware m11xr2 Jun 13 04:20:02 i5 Jun 13 04:20:03 model Jun 13 04:20:15 Should be fine Jun 13 04:21:16 drose379: the gui is killing me Under Choose options for your new file, change the Activity Name to MyActivity. Jun 13 04:21:28 where can find the activity button Jun 13 04:23:36 Dont know what you mean Jun 13 04:27:04 NateRiver: I hired Treelzebub as an Android dev and he doesn't have a CS degree Jun 13 04:27:17 drose379: https://developer.android.com/training/basics/firstapp/creating-project.html Jun 13 04:27:20 following this guide Jun 13 04:27:26 But you definitely have to be able to demonstrate a lot of motivation and hunger Jun 13 04:27:27 but lost on step 7 Jun 13 04:27:33 Ok, whats the issue? Jun 13 04:27:45 He also did a bootcamp, which helped Jun 13 04:27:52 Just change the value in the GUI Jun 13 04:29:03 drose379: I can't find the activity thing to edit Jun 13 04:29:12 asarazan: any free boot camps recommendation Jun 13 04:29:15 broke as hell Jun 13 04:30:22 drose379: http://imgur.com/0Ka1ytc ? Jun 13 04:30:30 I can't edit the activity Jun 13 04:30:41 you can Jun 13 04:30:50 open up the first folder in java Jun 13 04:30:54 and see whats in there Jun 13 04:31:42 drose379: it said no files are open Jun 13 04:33:16 drose379: http://imgur.com/tnBIv46 Jun 13 04:33:35 Open up the app folder Jun 13 04:34:09 then src Jun 13 04:34:11 then main Jun 13 04:34:13 then java Jun 13 04:35:16 drose379: no goal Jun 13 04:35:24 let me deleted the thing and start over again Jun 13 04:35:32 ok Jun 13 04:36:06 ide is poor's man nightmare Jun 13 04:36:35 why? Jun 13 04:37:41 drose379: ide rarely runs smoothly on low end pc Jun 13 04:37:49 ah thats true Jun 13 04:37:59 the only ide that my netbook can run smoothly is geany Jun 13 04:38:15 and geany as an ide is pretty much text editor Jun 13 04:38:22 I figure out what I did wrong Jun 13 04:38:28 I chose add no activity Jun 13 04:39:17 Makes sense Jun 13 04:40:04 groxx you ther Jun 13 04:40:32 drose379: ayup Jun 13 04:40:35 mostly Jun 13 04:40:42 Does FAB come with the sdk now? Jun 13 04:40:46 Or do I have to use a lib still Jun 13 04:40:48 drose379: I think pretty much I just have to learn how to system.out.println and take user input I can start developing apps Jun 13 04:41:22 stupid question.... doing `datagram_sock.setSoTimeout(n);` throws SocketException with ENODEV. Any clues? The socket is perfect. It is joined to a multicast group though Jun 13 04:42:26 drose379: there's the "design support" lib. sounds like v1 has a variety of not-insignificant bugs though. Jun 13 04:42:37 Ok, thanks groxx Jun 13 04:43:12 fab in particular does come in it, but you need some border attribute or something to make it into a circle on all oses Jun 13 04:43:12 hmm, thought iosched sources would be out by now Jun 13 04:43:21 where is the main in android ? Jun 13 04:43:58 there is no main Jun 13 04:44:01 horny-sama: you need to stop right here and actually learn things. Read a java book, etc Jun 13 04:44:15 you're just going to trial-and-error and waste so much time Jun 13 04:44:42 there is always a main Jun 13 04:45:02 well, that is true Jun 13 04:46:34 ac_slater_: I have developed java programs https://github.com/mr-fool/java (haven't touch java for awhile) Jun 13 04:46:44 pretty sure I know some java Jun 13 04:47:21 horny-sama: ah good. I just didnt want you to go down the rabbit hole. I've done that and found its much better to stop and read Jun 13 04:47:46 ac_slater_: I am trying to find books on android dev Jun 13 04:47:47 you're comment about ".. just learn getline and println to develop apps" was a little misleading Jun 13 04:48:04 ac_slater_: sorry about that Jun 13 04:48:22 any android dev recommendation hate google doc Jun 13 04:48:29 horny-sama: haha no need to apologize to me. Everyone does their own thing Jun 13 04:49:22 ac_slater_: any bookz recommendation Jun 13 04:50:22 horny-sama hmm, beside commonsware the rest are a little out of date now Jun 13 04:50:49 now I have to figure out how come it print helloworld without my doing system.out.println Jun 13 04:51:16 g00s: I got that one Jun 13 04:51:21 horny-sama: android.util.Log Jun 13 04:51:23 that one is still talking about eclispse Jun 13 04:51:32 ac_slater_: ? Jun 13 04:51:34 horny-sama: and no sadly, no book recommendations Jun 13 04:51:44 horny-sama ... i thought he changed that over a while ago ? Jun 13 04:51:51 are you using old version ? Jun 13 04:52:55 g00s: I got the 3.6 Jun 13 04:52:55 horny-sama: http://www.reddit.com/r/androiddev/wiki/index Jun 13 04:53:06 horny-sama thats ancient right ? Jun 13 04:53:27 its at 6.6 now Jun 13 04:53:51 g00s: let me find where I can find it for free Jun 13 04:54:02 horny-sama why not buy it Jun 13 04:54:54 g00s: how much is it Jun 13 04:54:58 coz I am pretty broke :< Jun 13 05:01:34 building a simple helloworld will take me forever Jun 13 05:04:45 have you tried searching hello world android studio in google ? Jun 13 05:04:49 o android studio tutorial ? Jun 13 05:04:51 or* Jun 13 05:05:26 Anyone know if the WebView crash is still affecting devices? I want to switch from a TextView based layout to a WebView as it would be much easier than stacking dozens of TextViews together but I'm a bit worried about it crashing on certain devices Jun 13 05:07:53 What kind of data are you displaying? Jun 13 05:08:08 lemg_mx: yep Jun 13 05:08:26 so where are you having trouble exactly? Jun 13 05:09:11 liuwenhao: plain text? Jun 13 05:10:22 lemg_mx: I don't understand how come I can print hello world without me telling it to Jun 13 05:10:40 you are telling it to do it. Jun 13 05:10:52 in your mainactivity in the oncreate method. Jun 13 05:11:08 Actually I think it comes automatically with new projects Jun 13 05:11:10 in the xml file Jun 13 05:11:59 http://www.fpaste.org/231705/41723041/ <---no helloworld is mentioned Jun 13 05:12:18 in the line Jun 13 05:12:20 setContentView(R.layout.activity_my) Jun 13 05:12:27 you are "creating" the interface. Jun 13 05:12:32 desmin88: text and images, nothing more. Jun 13 05:12:40 the interface already has a TextView with the string hello world Jun 13 05:12:55 liuwenhao: A WebView is kind of heavy just for text and some images Jun 13 05:12:57 you can see the layout (or interface) in the res/layout/activity_my.xml file. Jun 13 05:13:31 strings.xml? Jun 13 05:13:37 no Jun 13 05:13:50 res/layout/activity_my.xml Jun 13 05:13:51 Problem is I don't really want to deal with 10-20+ TextViews in one activity to get the design I want. Or should I just suck it up and stick with TextViews? Jun 13 05:14:17 Why can't you put it all in one textview Jun 13 05:14:31 lemg_mx: got it Jun 13 05:14:47 Different fonts, different justification, different text sizes, etc Jun 13 05:14:53 gosh even amazon.ca does not carry the latest edition of The Busy Coder's Guide to Advanced Android Development Jun 13 05:15:07 Guys im trying to add an icon to my FAB but it keeps coming out blurry Jun 13 05:15:11 Anyone have experience with this? Jun 13 05:15:32 liuwenhao: Does your text have html tags? Jun 13 05:15:43 is that how it gets its styling? Jun 13 05:16:28 Yeah. But a lot of the HTML I want to use isn't supported by the default Html.fromHtml. Jun 13 05:17:15 I could always implement a custom adapter for it. I just figured webview would be easier and save me some hassle Jun 13 05:17:32 or just stack a bunch of textviews together Jun 13 05:17:42 What html do you use that it doesnt support? Jun 13 05:19:12 img? :P Jun 13 05:19:25 it does support image. Jun 13 05:19:36 :O Jun 13 05:21:08 do people usually post android app source code on github? Jun 13 05:21:09

(or

) , ,

, unordered list, etc. Obviously the justifying could be done in XML but that would require separate textviews for each item I want to display Jun 13 05:21:42 TextView not supporting
    is a bit more problematic. I saw some solutions on StackOverflow but they seemed pretty hacky Jun 13 05:22:15 WebView has everything I would need. Except for the whole crashing the app thing. Jun 13 05:22:39 Plus its very 'heavy' Jun 13 05:23:24 You can use a custom taghandler Jun 13 05:25:10 How much of a performance difference is there? It will only be used in a one-off activity that isn't super important to the actual function of the app Jun 13 05:25:21 oh Jun 13 05:25:39 If it was the whole app I would definitely go with taghandler Jun 13 05:25:39 eh i personally notice when a webview is used to render just text and html Jun 13 05:26:29 The Busy Coder’s Guide to Android Development <--- they should at least offer it on amazon Jun 13 05:26:46 Slower than performance in Chrome? or the same Jun 13 05:27:11 slower Jun 13 05:28:06 Hmm. I kinda want to try it now just to see it in action because I've never used a WebView before Jun 13 05:28:16 -.- Jun 13 05:28:32 Curious as to how slow it will be on emulator Jun 13 05:29:46 Thanks for the info desmin88 Jun 13 05:31:28 horny-sama its a subscription, constantly updated Jun 13 05:31:53 pointless to print. actually, he did a print version for apress called 'beginners guide to android' at one point Jun 13 05:33:07 g00s: it is on amazon (print) but it is dated Jun 13 05:33:16 horny-sama are you dense Jun 13 05:33:31 g00s: the problem I have is that you can't use paypal unless it is 100usd or above Jun 13 05:33:39 oh horny i guess :) Jun 13 05:34:24 g00s is that book worth reading? All encompassing books like that always seem hit or miss in terms of actual usefulness Jun 13 05:34:45 g00s: fyi, I found smashing_android_ui_example_app for dl Jun 13 05:34:46 hehe Jun 13 05:34:49 its the only one up to date. but honestly, i liked big nerd and reto better Jun 13 05:35:03 but they are ... not quite ready Jun 13 05:35:07 g00s: I just need to learn the basic then it is rtfm Jun 13 05:35:17 so I don't need it to be cutting edge Jun 13 05:35:26 but at least have something on android studio Jun 13 05:35:37 AS is constantly changing Jun 13 05:35:38 If you just want Android basics you should watch tutorials, Android books are kinda worthless Jun 13 05:35:40 as long as they have something on android studio I am good Jun 13 05:35:54 there are thousands of free tutorials on youtube and other sites Jun 13 05:36:00 Slidenerd for example is very good Jun 13 05:36:56 or Lynda.com Jun 13 05:37:36 https://www.youtube.com/watch?v=PqlbxoeeiOo&list=PLonJJ3BVjZW6hYgvtkaWvwAVvOFB7fkLa&index=4 Jun 13 05:37:38 got it Jun 13 05:37:47 will watch it tomorrow Jun 13 05:38:03 https://www.udacity.com/course/developing-android-apps--ud853 Jun 13 05:38:14 in the debugger where would the global variables be kept? theres only "this" and under that a bunch of mVariables Jun 13 05:38:24 You can get all the udacity course materials for free. And the course is run by Googlers Jun 13 05:39:05 nice Jun 13 05:39:16 liuwenhao: I will try the youtube approach first then read Jun 13 05:39:18 :P Jun 13 05:39:25 NateRiver, this is global... Jun 13 05:39:31 is the udacity course free ? Jun 13 05:39:37 you mean static? Jun 13 05:39:44 Yeah. Getting your hands dirty and reading the documentation along the way is the best way to do it. The sooner you start actually building an app the faster you'll learn Jun 13 05:39:49 G00s all of the course material is free Jun 13 05:40:01 if you want 1 on 1 teacher interaction you have to pay Jun 13 05:40:10 all the mooc are free Jun 13 05:40:12 pfn yeah static Jun 13 05:40:30 NateRiver, no panel, evaluate them manually Jun 13 05:40:31 hell maybe i should take it Jun 13 05:41:02 Guys: top or bottom Jun 13 05:41:04 http://i.imgur.com/4S0redg.png Jun 13 05:41:07 I thought about getting the Android Deveoper nanodegree just to pad my resume. But it's kinda expensive Jun 13 05:41:18 pfn soo basically i need to assign them to variables for them to show up in debugger? i use a Singleton Jun 13 05:41:27 drose379: Top Jun 13 05:41:36 thanks for looking liuwehano Jun 13 05:41:50 NateRiver, just evaluate them Jun 13 05:42:00 liuwenhao oh so the nanodegree is not free; is that 1:1 instruction ? Jun 13 05:42:14 run the expression evaluator Jun 13 05:42:44 The nanodegree course material is free. But if you actually want the degree you have to submit your projects for evaluation and participate in the discussions Jun 13 05:42:51 So you have to pay for htat Jun 13 05:42:52 that* Jun 13 05:43:01 ok Jun 13 05:43:09 You get half the money that you spend back once you complete the degree. Jun 13 05:43:25 i guess thats motivation to complete :) Jun 13 05:43:37 Yeah. the best motivation haha Jun 13 05:44:12 I'll probably do it when I am back in the united state with good internet Jun 13 05:44:12 drose379: pick up your phone Jun 13 05:44:13 i read my last android book around froyo 2.2; since then i just read whats new - but sometimes, like MNC, its so far out i'm not paying attention. so i miss stuff Jun 13 05:44:15 you missed a call Jun 13 05:46:33 pfn, okay i guess i never heard of an expression evaluator in a debugger Jun 13 05:47:38 NateRiver, use the google Jun 13 05:48:00 http://www.fpaste.org/231710/74458143/ Jun 13 05:48:03 NateRiver: alt-f8 on Android Studio, "Display" view in Eclipse Jun 13 05:48:05 http://www.fpaste.org/231710/74458143/ <---trying to push my android app source code to github but fail :< Jun 13 05:49:00 mr-fool, git pull Jun 13 05:49:12 then push Jun 13 05:50:03 pfn: helloworld]$ git pull https://github.com/mr-fool/Android/tree/master/helloworld Jun 13 05:50:03 fatal: repository 'https://github.com/mr-fool/Android/tree/master/helloworld/' not found Jun 13 05:50:04 :< Jun 13 05:50:49 google on how to use git? Jun 13 05:50:54 yeah... Jun 13 05:50:58 not here Jun 13 05:51:00 pfn heeyyyy thats really cool, its like magic Jun 13 05:51:04 or just read the copy/paste instructions of the github page Jun 13 05:51:25 NateRiver, it's handt Jun 13 05:51:28 also #git channel on freenode Jun 13 05:52:15 1100 people in that channel, i'm sure someone will help Jun 13 05:52:22 liuwenhao: got it Jun 13 05:52:47 My CPC is down 40% on last month with adsense, anyone else the same? Jun 13 05:53:09 So the NavigationView doesn't allow set-checking for things in sub menus, yay. Jun 13 05:56:22 does android studio has build-in function that allows you to upload it on github :P Jun 13 05:57:08 It has git support but I'm not a fan of it, I prefer SourceTree Jun 13 05:57:46 yes, but I always prefer working with git from cli Jun 13 05:59:22 You'll be much more productive with a GUI Jun 13 05:59:37 horny-sama you can download the plugin (file -> settings -> plugins) Jun 13 06:00:06 liuwenhao: okay thx Jun 13 06:00:23 out of curiosity, do you guys develop using window or linux? Jun 13 06:00:31 Windows and Mac Jun 13 06:00:37 Linux Jun 13 06:00:49 windows, because i need to do more than programming Jun 13 06:00:50 Windows. Because I game and am too lazy to dualboot this laptop Jun 13 06:00:56 plus photoshop Jun 13 06:01:08 and adobe premiere Jun 13 06:01:47 I really like xUbuntu though. I wish more software supported Linux so I could use it full time Jun 13 06:02:06 I generally use fedora except when I am doing android dev coz my netbook is too slow for android studio :< Jun 13 06:02:37 yes, photoshop Jun 13 06:02:40 They still make netbooks? i thought that fad died Jun 13 06:03:16 liuwenhao: it is an ancient computer Jun 13 06:03:17 so.. Jun 13 06:03:25 it is like 4-5 yrs old Jun 13 06:03:36 I like the idea of netbook Jun 13 06:03:42 ultrabook is too expensive Jun 13 06:04:32 i figure if i had no future plans of iOS dev i could go back to windows - but even though the apple stuff is expensive, there are some really good Mac Apps which are affordable and replace expensive stuff like Adobe (pixelmator, sketch), etc Jun 13 06:04:57 but i've noticed most hardcore embedded tools are windows only Jun 13 06:05:19 like IAR embedded workbench, etc Jun 13 06:05:20 g00s: but mac adaptor is $$$ Jun 13 06:05:42 especially now they are their air only have one adaptor usb type c if I recall correctly Jun 13 06:05:52 I used to have a Macbook pro but OSX drove me insane. It seems to be getting progressively worse ever since Snow Leopard Jun 13 06:05:56 what kind of moron will include only one port Jun 13 06:05:58 seriously Jun 13 06:06:13 yeah i dont like that 1 adapter thing either, wonder what the future MBPs will do Jun 13 06:06:22 people who buy air's don't actually have to do work on them Jun 13 06:06:33 i keep thinking, if my only port busts, my computer is unusable :( Jun 13 06:06:42 g00s: but generally don't you have to buy adopters for mac stuff Jun 13 06:06:57 liuwenhao: fair point Jun 13 06:07:09 I thought about air over pro coz I think it is cheaper Jun 13 06:08:01 for the same price of a new air you could buy a used/refurbished windows ultrabook with 2x the performance Jun 13 06:08:05 and a better screen Jun 13 06:08:15 i kinda like MacOS itself, but i dont like apple hardware at all Jun 13 06:08:36 liuwenhao: don't you need xcode for ios dev? Jun 13 06:09:11 The only reason I will buy a mac is for ios dev and chick magnet Jun 13 06:09:20 reasons* Jun 13 06:09:42 one of the reasons i dislike PC is it feels like buying a car Jun 13 06:09:52 chick magnet? :D better buy a nice car for this^^ Jun 13 06:10:18 i guess dell is doing better these days, the xps 13 got good reviews Jun 13 06:10:20 ktwo: yes Jun 13 06:10:32 chicks be like how to I do this on mac Jun 13 06:10:33 :P Jun 13 06:10:40 a car costs more than a mac Jun 13 06:10:45 I think Jun 13 06:11:01 If you want to dev for both iOS and Android you should use Xamarin instead of xcode and android studio. much better to have one codebase Jun 13 06:11:23 or you could just run xcode in a virtual machine Jun 13 06:11:47 eh Jun 13 06:11:50 native code ftw Jun 13 06:11:59 xamarin is also quite expensive Jun 13 06:11:59 desmin88: not to companies Jun 13 06:12:12 disagree Jun 13 06:12:20 company is about quick release more cash and runnnn Jun 13 06:12:29 never see this sucker again :P Jun 13 06:12:55 quite pessimistic Jun 13 06:13:06 objective of companies = make money not user Jun 13 06:13:11 desmin88: more like scam Jun 13 06:13:21 give me money to build rocket then run Jun 13 06:13:23 in the long-term this will kill the company Jun 13 06:13:40 thats quote naive Jun 13 06:13:42 quite* Jun 13 06:13:47 unless you are microsoft or apple, they can afford to do anything Jun 13 06:14:09 true Jun 13 06:14:10 desmin88 doesn't xamarin compile to native code? Never used it personally, just looked into it as a curiosity Jun 13 06:14:41 I am hoping to master android dev in 4 months Jun 13 06:14:43 'native' code Jun 13 06:14:43 yea it does Jun 13 06:14:46 then learn window apps Jun 13 06:14:47 :P Jun 13 06:16:21 uh Jun 13 06:16:23 4 months? Jun 13 06:16:32 more like 4 years. even then there is so much to learn Jun 13 06:16:51 It's good to have goals but at least be realistic about it -.- Jun 13 06:16:56 liuwenhao: I am trying to diversity my market Jun 13 06:17:05 like jack of all trades but master at nothing Jun 13 06:17:08 well if you are a programmer already its not that hard to get quite good in 4months Jun 13 06:17:43 the IT scene in my town, canada is depressing Jun 13 06:19:32 I am thinking of porting my old java projects to android so I can quickly build up my portfolio Jun 13 06:19:34 horny-sama: proven to be untrue about quality Jun 13 06:19:40 but i thought the same at one point Jun 13 06:19:43 EA? Jun 13 06:19:48 a lot of misses Jun 13 06:20:20 Agamemnus: is mainly about marketing Jun 13 06:20:44 normal users only care about the gui Jun 13 06:31:57 my release proguard fails, but my debug proguard doesnt. wtf Jun 13 06:40:35 how can i extract fractional value ".5" from 2.5 ? Jun 13 06:41:10 s9iper1: mod Jun 13 06:41:29 or turn it into string and use indexOf and lastIndexof? Jun 13 06:42:14 2.5 % 2 Jun 13 06:42:40 or 1. doesnt matter Jun 13 06:42:45 danijoo: why not use index of? Jun 13 06:43:12 horny-sama, depends on if he wants a number or a string as result Jun 13 06:44:07 i have a value 2.5 and i want 2 and .5 extracted Jun 13 06:44:38 2.5 % 2 vs (2.5).toString().substring((2.5).indexOf(".")) Jun 13 06:45:19 i am using this code already http://paste.ubuntu.com/11706429/ Jun 13 06:45:42 the float decimalpart is returning 0.0 Jun 13 06:45:46 s9iper1, just % and / Jun 13 06:45:53 2.5 % 2 = 0.5 Jun 13 06:45:59 2.5 / 1 = 2 Jun 13 06:46:19 or 2.5 - (2.5 % 2) Jun 13 06:46:27 ok Jun 13 06:46:30 i am trying Jun 13 06:46:46 s9iper1: will the input always be 2.5? Jun 13 06:46:57 no it will change Jun 13 06:47:43 s9iper1: then what will happen in 3.5 case you do 3.5 mod 2 since the length is still 2? Jun 13 06:47:56 then use 3.5 % 1 Jun 13 06:48:06 that will work with every number Jun 13 06:48:22 ok let me try it Jun 13 06:48:58 danijoo: good point Jun 13 06:49:36 the non decimal part would be orginial number - (num%1) Jun 13 06:49:54 http://pastebin.com/Tf7ZhH8H Jun 13 06:50:22 last line should be input - fraction ;) Jun 13 06:50:51 instead of interacting ppl in rl, I am ircing Jun 13 06:50:56 I am autistic as fuck Jun 13 06:51:53 ^^ Jun 13 06:54:33 if you're not limited to primitives there's always this: Jun 13 06:54:34 private static double fraction(final Double val) { Jun 13 06:54:34 return Math.abs(val - val.intValue()); Jun 13 06:54:34 } Jun 13 06:56:33 good point Jun 13 06:56:41 or this: Jun 13 06:56:41 private static double fraction(final double val) { Jun 13 06:56:41 return Math.abs(val - (int) val); Jun 13 06:56:42 } Jun 13 06:56:53 friday night and debating stuff like that instead of in a bar Jun 13 06:56:57 or hooking up Jun 13 06:56:58 much sad Jun 13 06:56:59 :P Jun 13 06:56:59 might not matter but i think those Math. functions might be even faster Jun 13 06:57:16 its 9:00 saturday here :D Jun 13 06:57:34 danhedron: 12:58am Jun 13 06:57:38 technically sat Jun 13 06:57:39 :P Jun 13 06:57:55 counts as both :p Jun 13 06:58:15 at least I know those normies will get herpes Jun 13 06:58:17 :P Jun 13 06:58:44 haha Jun 13 06:59:26 danijoo: my view on the world in a nut shell https://www.youtube.com/watch?v=8rt4nIGXoRw Jun 13 07:03:48 its caturday Jun 13 07:06:31 I am gonna need a female simulator someday so I can displace female that would not date me Jun 13 07:06:32 :P Jun 13 07:06:46 displace all human Jun 13 08:12:58 Is the top card OK? http://i.imgur.com/2qO0PAj.png (ignore the Ubuntu font, roboto font make my browser fail to show Android developers site) Jun 13 08:15:16 what do you mean with "ok" Jun 13 08:15:26 good looking? Jun 13 08:28:36 danijoo: yes Jun 13 08:41:59 yoavst have you tried with Roboto font lately? I used to have that issue in my browser, but it was fixed at some point, though I can't remember if it was something I fixed somehow or something that just happened... Jun 13 08:42:26 Chainfire: Yea, 3 days ago. Jun 13 08:42:33 It make the Android developers site Bolded Jun 13 08:43:43 sorry I can't remember what fixed it :/ Jun 13 08:44:51 Chainfire: For me, removing roboto font ;) Jun 13 09:29:50 hi! I've did my first app, just for learning purposes. can someone look at my code and say what i can improve? Jun 13 09:29:51 https://github.com/tfilip/RedditJokes Jun 13 09:30:53 you want someone to read your WHOLE code? Jun 13 09:31:04 just the mainactivity Jun 13 09:32:09 it's quite small it just parses something from reddit and the puts it on the screen Jun 13 09:34:51 id put all those json parsing stuff from onPostExecute to doInBackground Jun 13 09:35:42 also, your app will crash if someone opens and closes it quickly# Jun 13 09:35:51 why ? Jun 13 09:36:59 if someone opens the app, the async task starts running. when it is closed before the task finishes, showTextOnScreen will be called on an activity where the textvioews are null# Jun 13 09:41:28 the showOnText from the the postexecute, right? Jun 13 09:41:46 Also, you should move most of e stuff from onPostExecute() to doInBackground(), do the processing on the background and return the result to the main thread. Jun 13 09:42:39 FilipOMG, yep Jun 13 09:42:59 its enough to return the list of jokes to onPostExecute Jun 13 09:45:41 what should i leave on onpostexecute? Jun 13 09:45:51 Just the UI related stuff Jun 13 09:46:46 only the last 3 lines Jun 13 09:46:52 166 to 168 Jun 13 09:47:10 also, move the whole async task in its own file or you will leak the activity Jun 13 09:47:17 or make it static Jun 13 09:48:50 and check before you set ;) Jun 13 09:49:52 if i put just the last three lines that include the boolean variable it won't work. sorry if i put kinda dumb questions, i'm a newbie Jun 13 09:55:12 but you can put that whole looping over json arrays into background thread Jun 13 09:57:41 " Only the original thread that created a view hierarchy can touch its views. " that's what i get and it points at the showtextonscreen() from the doInBackground Jun 13 09:58:14 thats true Jun 13 09:58:27 i've put the showtextonscreen in the postexecute. but if i have a slow connection Jun 13 09:58:34 i wouldn't have anything on the screen Jun 13 09:59:21 but line 118 to 164 does not need to be in onPostexecute Jun 13 09:59:53 i've added all of that on the background, and left just showTextOnScreen() in the postExecute Jun 13 09:59:59 and deleted the firsttime thing Jun 13 10:00:02 yoiu can generate a List in background and pass that to postexecute instead of the json Jun 13 10:00:59 also you might want to show an error message when Background thread returns null :) Jun 13 10:01:06 there's also the memory leak thing :| Jun 13 10:01:33 yeah. the async needs to be a static class Jun 13 10:01:44 and you have to check if its finishing before setting text Jun 13 10:02:10 just cancel it in onDestroy or smth Jun 13 10:02:44 and check for isCancelled() while iterating inside doInBackground Jun 13 10:05:12 hi Jun 13 10:05:23 android studio says "Error:(19, 1) error: package android does not exist" Jun 13 10:05:26 what can i do? Jun 13 10:05:54 use the correct SDK Jun 13 10:06:02 show your gradle Jun 13 10:08:33 i think i need to refine my java knowledge. I'm not sure why i have to make the java class static, and what leak are you talking about Jun 13 10:11:33 you should always make class static if can Jun 13 10:12:14 FilipOMG: since the JSONParse class is an inner-class of your MainActivity, whenever you create an instance of it it is bound to an instance MainActivity. Since it can take a long time for that task to finish, and in the mean time the activity might be destroyed (e.g. the user receives a phone call), your JSONParse instance still keeps a strong reference to Jun 13 10:12:14 the MainActivity, preventing it from being garbage-collected. Jun 13 10:12:23 hence the memory leak :| Jun 13 10:12:40 hello! Jun 13 10:12:44 shalom N3sh108 Jun 13 10:13:11 I am trying to syncData between a phone and a wearable (moto360) and it's getting ridiculous Jun 13 10:13:29 dex2goat danijoo android sdk build-tools 22.0.1 and 21.1.2 are installed both Jun 13 10:13:38 I seem to able to send messages and short ByteArrays but nothing else Jun 13 10:13:56 my goal is to be able to send an image I fetched from the internet (Bitmap/Drawable) Jun 13 10:14:27 oh! I understand now about the memory leak Jun 13 10:14:28 are you aware of any limitation for byteArrays? The image is a couple kb large Jun 13 10:14:29 21.1.2 was installed already i installed 22.0.1 just Jun 13 10:15:21 rohanrhu: i created the project with libgdx and open it android studio Jun 13 10:16:22 but if i make the class static, how can i use the showontext method and the reddit_url String ? Jun 13 10:25:58 well you could pass the Activity to the AsyncTask constructor, keep a reference to it and clear it once the task is finished OR when you cancel the task. It's really awful as well, but at least if you use it correctly (call cancel!) it will not be leaked. Jun 13 10:26:39 look into RxJava if you're interested in better ways doing this Jun 13 10:26:40 yep, async tasks suck ^^ Jun 13 10:27:34 but i wont recoment diving into rx before mastering android without it Jun 13 10:27:59 yea it has a learning curve, I just had to point that out Jun 13 10:28:11 it's up to him now :) Jun 13 10:28:30 anyone here who already developed for android wear? Jun 13 10:28:49 N3sh108: Are you doing a survey? Jun 13 10:29:07 nope Jun 13 10:29:15 I think if i get into rxjava I won't understand a thing Jun 13 10:29:19 I asked a question earlier and it got disregarded and I didn't want to repeat it Jun 13 10:29:39 I am having problems with syncingData between the phone and the watch Jun 13 10:30:01 FilipOMG: This one is fantastic IMO: http://blog.danlew.net/2014/09/15/grokking-rxjava-part-1/ Jun 13 10:30:08 can't you just use a WeakRef to prevent leakage? Jun 13 10:31:03 wakelock: you can use a weak reference, but that's kind of like brute forcing in my opinion. If you are using a component which has a certain contract - doInBackground() - onPostExecute() - onCancelled() - if you use it correctly WeakRef won't be needed Jun 13 10:31:32 who ever uses asynctask "correctly" :p Jun 13 10:31:55 carelessly passing around context and relying on weak references will result in a lot of if-not-null checks Jun 13 10:32:50 weakref has additional benefit, if it ever returns null you know the activity is gone so your asynctask is free to just stop whatever it's doing Jun 13 10:33:22 wakelock: you can use isCancelled() inside doInBackground() to check that Jun 13 10:33:28 seems like a nice(ish) way to keep an eye on the activity Jun 13 10:33:33 weak ref is just an ungly hack if you diont want to care about your activity Jun 13 10:33:48 why are we talking about asynctasks :( Jun 13 10:33:53 can't we talk about HIV Jun 13 10:33:54 instead Jun 13 10:33:56 dex2goat, you can use iscancelled only if the caller followed the contract Jun 13 10:34:31 wakelock: the whole point is to assume the caller followed the contract Jun 13 10:34:45 hi, im using android identity toolkit to login my users but i do not understand if I can save locally the idetoken and then on a second login automatically authenticate my user without the login prompt Jun 13 10:34:48 asynctask is way more appropriate for this channel Jun 13 10:34:54 is this possible ? how can I do it? Jun 13 10:35:02 dex2goat, well ok if you want to assume that Jun 13 10:35:13 pycas: check out https://developer.android.com/reference/android/content/SharedPreferences.html Jun 13 10:35:19 its not an assumtion if youi wrote the caller ^^ Jun 13 10:35:26 -i Jun 13 10:35:49 danijoo - the world-famous one-man-band :p Jun 13 10:36:19 dex2goat, yes i could save it to shared preferences Jun 13 10:36:41 dex2goat, but my question is if this is the right way when using identty toolkit ? Jun 13 10:36:45 no profit share here ! Jun 13 10:37:15 danijoo, where did you say you're located again? Jun 13 10:37:29 earth Jun 13 10:37:38 liar Jun 13 10:37:40 dex2goat, i would see if the token is outdated and if not use it on my requests Jun 13 10:37:46 dex2goat, is this the right way? Jun 13 10:37:48 should i follow a guide or something to learn android development or just try to do an app? Jun 13 10:38:01 although i have super human programming skills, im still a terraner Jun 13 10:38:08 FilipOMG, you should just use common sense Jun 13 10:38:57 FilipOMG, that includes not asking such trivial easily googlable and highly subjectible questions in here Jun 13 10:40:00 id say just dive into it Jun 13 10:40:07 learning by doing :) Jun 13 10:40:42 different people learn in different ways, it is entirely up to him to figure out whst works for him Jun 13 10:40:54 no point in even asking such questions Jun 13 10:41:02 what* Jun 13 10:41:38 I know a few people that learn MUCH better by studying the theory before they dive in Jun 13 10:42:32 you know few people? Jun 13 10:43:22 pycas: I've never used it, no idea Jun 13 10:43:41 dex2goat, thanks Jun 13 10:44:21 pycas: np, they have some demo out there: https://github.com/googlesamples/identity-toolkit-android Jun 13 10:44:34 maybe the answer is in there Jun 13 10:45:01 danijoo, surprisingly, yes Jun 13 10:48:04 dex2goat, already seen that and nothing Jun 13 10:48:13 dex2goat, but thanks anyway Jun 13 10:48:19 ¯\_(ツ)_/¯ Jun 13 11:09:09 anyne here that could help me understand google identity toolkit ? Jun 13 11:09:53 more precisely how to save the token id and use it on other requests bypassing the login promt? Jun 13 11:16:46 pycas: https://github.com/googlesamples/identity-toolkit-android/blob/master/tutorial/src/com/google/identitytoolkit/demo/GitkitDemo.java#L64-L67 Jun 13 11:16:54 it seems like it's up to you to maintain the session Jun 13 11:17:01 store the state whatever way you prefer Jun 13 11:17:17 but the client does not maintain sessions as it seems Jun 13 11:22:11 dex2goat, nice thanks Jun 13 11:22:22 np Jun 13 11:24:25 any idea about sending messages to a wearable? Jun 13 11:25:51 N3sh108: can you be more specific Jun 13 11:26:25 I'm using the Teleport library to sync data from a phone to a wearable Jun 13 11:26:48 I can send messages (plain strings) but when I try to send something a bit more complex (byteArray, for instance) it just doesn't send it Jun 13 11:27:03 I want to send a Drawable/Bitmap to the watch and display it Jun 13 11:27:57 should I perhaps send it as an asset, dex2goat? Jun 13 11:28:50 which method are you using to attach the bytearray? Jun 13 11:29:30 there is a function syncByteArray and I add the Bitmap compressed and converted into a byteArray Jun 13 11:29:50 does anything weird show up in the logs? Jun 13 11:30:04 my doubt is that it is not allowed to send data bigger than X bytes Jun 13 11:30:06 or something Jun 13 11:30:25 nothing, I have a log showing every step Jun 13 11:31:24 not familiar with teleport, but if you're transferring an Asset with the standard API: Note: Although the size of data items is limited to 100KB, assets can be as large as desired. However, transferring large assets affects the user experience in many cases, so test your apps to ensure that they perform well if you're transferring large assets. Jun 13 11:31:29 and the problem is that it never goes into onPostExecute Jun 13 11:31:56 seems like you should try using an Asset instead Jun 13 11:32:21 I compressed the bitmap to 5kb and it still failed :/ Jun 13 11:32:39 :| Jun 13 11:36:28 is there a library for using custom fonts ? Jun 13 11:37:07 https://github.com/chrisjenx/Calligraphy Jun 13 11:37:53 i want sublime text :( Jun 13 11:39:13 android studio's system requirements are 80 ghz 20 core and cpu 5 tb ram Jun 13 11:45:07 You can reduce the ram android studio uses in the options however. Jun 13 11:51:11 dex2goat:thanks mate do i need to make font cache or something ? or just use it Jun 13 11:51:17 In fresco image libary: What should be define here: " simpleDraweeView.setImageURI();" Jun 13 12:00:21 im creating project with libgdx creator and opening it with android studio Jun 13 12:00:55 when i import android module it says Error:(9, 20) error: package android.util does not exist Jun 13 12:11:43 hi, i have just built android full-eng and i am trying to start the emulator but am failing to do so: https://bpaste.net/show/e1ddf21d74d7 what is wrong? Jun 13 12:17:43 i got a little further but there are no targets shown: https://bpaste.net/show/3956a54f3e4a Jun 13 12:25:31 why would setting FLAG_TRANSLUCENT_NAVIGATION make the overflow menu hidden in landscape? Jun 13 12:34:09 how can i fix this? $ android "Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM" Jun 13 12:34:58 use a 32-bit JVM? Jun 13 12:35:43 krnlyng: this isn't really the right place for your questions - probably the android-building google group, if that's still active... this is for app development Jun 13 12:49:30 or try #android-root Jun 13 12:59:06 java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.support.v4.widget.DrawerLayout$LayoutParams Jun 13 12:59:06 How should I else be able to style the navigation drawer with a banner picture? Jun 13 13:03:50 it tells you...\ Jun 13 13:04:09 you need DrawerLayout.LayoutParams, not LinearLayout.LayoutParams Jun 13 13:04:17 those are different classes Jun 13 13:06:28 danijoo so I should use DrawerLayout tags in my xml? Jun 13 13:06:48 its xml. I thought you mean code.. Jun 13 13:06:51 show your xml then Jun 13 13:08:03 * surf2b1 wagers $5 it's not XML Jun 13 13:08:36 ^^ Jun 13 13:09:37 danijoo : http://pastebin.com/xNdxW1Pw Jun 13 13:10:17 there is no drawerlayout Jun 13 13:10:48 I put the drawer layout insted of relative. but then it crash before opening the app Jun 13 13:11:00 there is no drawerlayout Jun 13 13:11:30 there is a linearlayout with an imageview and a listview Jun 13 13:11:32 it's like in the matrix Jun 13 13:11:45 maybe i need to read between the lines Jun 13 13:12:28 Datasmurfen: you are calling setLayoutParams() on your DrawerLayout somewhere and using the wrong type of LayoutParams. Jun 13 13:12:53 thats what i said Jun 13 13:12:58 yes Jun 13 13:13:06 ^^ Jun 13 13:13:12 danijoo : Like this? http://pastebin.com/xNdxW1Pw Jun 13 13:13:46 thats not a valid xml Jun 13 13:14:10 missing a closing tag and.. what the hell? a drawer in a drawer? Jun 13 13:14:25 so you can draw the drawer while drawing the drawer. Jun 13 13:15:19 look at your java files. somewhjere you set layout params. the stacktrace gives you the linenumber and filename Jun 13 13:15:20 or use a ConcurrentDrawerLayout Jun 13 13:17:20 I wonder if I should open the door to un-announced visitors Jun 13 13:17:28 meh, fuck these guys. Jun 13 13:17:44 why are exceptions causing ANR? Any raised uncaught Exception does this Jun 13 13:17:53 App just gets stuck Jun 13 13:17:59 they dont Jun 13 13:18:11 uncaught exceptions cause force closes Jun 13 13:18:23 too much work on main thread or infinite loops cause anrs Jun 13 13:19:34 yeah, that should occur, but doesn't on this case Jun 13 13:19:36 danijoo the stacktrace gives me this line: setContentView(R.layout.activity_main); Jun 13 13:20:04 then show that file Jun 13 13:20:12 _the whole file_ Jun 13 13:20:56 on tracing, it gets stuck at ExceptionReporter.uncaughtException() Jun 13 13:21:01 in whatsapp if you go to settings -> profile, there is a button to change the profile pic. Is that a button on top of an imageView? Jun 13 13:21:45 only an imageview i think Jun 13 13:22:11 I see a pencil drawn Jun 13 13:22:25 and if u click on it, you can change the pic or remve it Jun 13 13:22:26 and the Exception raised was IllegalStateException, "Can only use lower 16 bits for requestCode" and I'm passing 123 literal as a request code. Jun 13 13:22:34 ah yeah Jun 13 13:22:39 http://pastebin.com/CVZQ12r6 danijoo Jun 13 13:22:43 might still be just an imageview with anotherone on top Jun 13 13:23:19 Datasmurfen, and activity_main.xml Jun 13 13:23:38 how does 123 translate to be higher than 16 bit? Jun 13 13:23:51 and when you are at it, also the whole stacktrace :) Jun 13 13:24:15 http://pastebin.com/C0Vp5ZxP Jun 13 13:25:19 he sent the D Jun 13 13:25:36 and the activity as posted shoudlnt compile Jun 13 13:25:47 line 52 is a syntax error Jun 13 13:25:51 missing = Jun 13 13:26:11 wat Jun 13 13:26:19 private LinearLayout DrawerLinear; Jun 13 13:26:31 yep. that line. Jun 13 13:26:37 danijoo: are there "default" images for things like edit? or did whatsapp make that image themself? Jun 13 13:26:51 danijoo: look again Jun 13 13:26:52 :| Jun 13 13:26:55 gavit, i think thats part of material design image pack Jun 13 13:27:06 dex2goat, nvm im stupid Jun 13 13:27:07 waht is the best way to make android application that has menu and some pics and text, what is a good place for tutorials? Jun 13 13:27:09 ^^ Jun 13 13:27:24 the multi whitespace distracted me Jun 13 13:27:34 and the capitalized variable name also Jun 13 13:27:42 yeah. maybe a c# guy Jun 13 13:27:54 oh there's: Jun 13 13:27:57 1. DrawerLayout drawerLayout; Jun 13 13:28:02 2. private LinearLayout DrawerLinear; Jun 13 13:28:19 k my eyes hurt Jun 13 13:28:31 Datasmurfen, stack trace? Jun 13 13:28:43 http://pastebin.com/C0Vp5ZxP F5 this link Jun 13 13:29:18 thats not the error you ppostet last time. Jun 13 13:29:24 Hello. How do you make an android app that constantly is communicating with a database on the server like the fb app? Jun 13 13:29:37 In a browser you'd use meteor. Jun 13 13:29:38 that doesn't seem right Jun 13 13:29:46 fix your imports Jun 13 13:29:49 multidex? Jun 13 13:30:03 You can still use meteor to make a phone app, but I am wondering if there are other ways. Jun 13 13:30:11 oh wait no Jun 13 13:30:27 hi, i have develop a particular app. app is in wifi and in LAN. app call server every 5 second.. and when there is an alarm it play sound Jun 13 13:30:43 ahh there it is: Jun 13 13:30:45 Datasmurfen, Jun 13 13:30:55 line 31. DrawerLinear is a RelativeLayout Jun 13 13:31:13 my question is... how implement this... particular architecture Jun 13 13:31:13 and in your java line 92 you are casting it to a Linearlayout Jun 13 13:31:33 danijoo: but that would cause a ClassCastException Jun 13 13:32:02 yeah that will occur once he fixes his current problem ^^ Jun 13 13:32:30 Rashad: you probably want to re-think a bit Jun 13 13:32:40 About? Jun 13 13:32:43 in a relative layout, can i use a relative android:layout_marginTop ? Jun 13 13:33:06 Datasmurfen: have you included the support library? Jun 13 13:33:13 have to go. good luck Jun 13 13:33:24 :) Jun 13 13:33:31 Yes razzledazzle Jun 13 13:34:00 anyone knows of any good android app development tutorials? Jun 13 13:34:13 Rashad: for a start, it doesn't constantly communicate... Jun 13 13:34:28 use this in your xml android.support.v4.widget.DrawerLayout instead of DrawerLayout Jun 13 13:34:32 Datasmurfen Jun 13 13:34:36 I come from a background of web development where you can use stuff like meteor or socket.io to send and receive data asynchronously in a very easy way. Jun 13 13:34:41 Is there something similar for android? Jun 13 13:35:36 this isn't web development Jun 13 13:35:40 I can still use those two options with android, but I wonder if there are other options. Jun 13 13:35:41 Datasmurfen: and also do what danijoo said Jun 13 13:36:27 hey guys, If I want to get a Object which I inflated with my RecyclerView.Adapter, how do I do it ? Jun 13 13:36:28 toothpick: that depends upon your containing layout Jun 13 13:36:54 razzledazzle: it is a linear layout ? Jun 13 13:36:59 razzledazzle: (without "?" Jun 13 13:37:06 jap Jun 13 13:37:12 :D ups Jun 13 13:37:21 yes LinearLayout supports margin Jun 13 13:37:29 toothpick: having any issues? Jun 13 13:38:08 razzledazzle: well i need a relative margin... Jun 13 13:40:02 toothpick: have your set the proper orientation? maybe send in your xml source Jun 13 13:41:01 razzledazzle: the orientation is ok.. i just need to know whether a margin can be relative to the size of the screen or to something else rather than in dp's Jun 13 13:41:43 you can't do that from xml, maybe RelativeLayout might help with what you need to achieve Jun 13 13:42:45 razzledazzle: so you hint that i should implement that using code? Jun 13 13:42:50 in runtime ? Jun 13 13:43:08 toothpick: you can have different dimens.xml files into different resource folders which are used for different screen sizes Jun 13 13:43:52 dex2goat: how do i do that ? Jun 13 13:45:12 JakeWharton, what you suggested yesterday with the animation drawable inside the placeholder worked, but the issue is that the animation list has many pictures and those pictures get blown up to the size of the imageview, so the animation runs but its extremely out of shape Jun 13 13:45:46 toothpick: http://developer.android.com/training/multiscreen/screensizes.html#TaskUseSizeQuali Jun 13 13:46:27 read the section about size qualifiers. in that example it is used to provide different layout files, but can just as well be used for your values folder. also, when you create a new project from blank in android studio it should have a minimal setup that showcases two different screen sizes iirc Jun 13 13:47:31 but there is no such thing as relative margin or size in percentage according to something? Jun 13 13:48:12 you can have relative margins if you create empty "spacer" views use the stuff you already know from relativelayout to dictate their size Jun 13 13:48:57 and by relative I mean relative to other views Jun 13 13:49:36 but what exactly are you trying to do? Jun 13 13:53:09 Can you have multiple images in one single image (like a spritesheet) and use them individually in an Android app? Jun 13 13:53:17 dex2goat: well my app contains 2 different layouts, and when i change the total size of one of the layouts, the pictures of the other layouts are misplaced and i need to set their size and margins manually Jun 13 13:53:34 Hello all, can i have help ? Jun 13 13:54:16 Eclipse IDE say me: Not targeting the latest versions of Android; compatibility modes apply. Jun 13 13:54:18 what kind of layout are you using as the container of the pictures? Jun 13 14:03:06 how do you cancel an asynctask within the tast Jun 13 14:03:08 task Jun 13 14:03:13 is it just cancel(true); Jun 13 14:03:49 apoc52: that should do it Jun 13 14:04:08 apoc52: there is a method isCancelled in AsyncTask which you have to check Jun 13 14:06:13 great Jun 13 14:06:19 i'm also trying to show a toast Jun 13 14:06:21 message Jun 13 14:06:24 from within my async message Jun 13 14:06:55 but its giving me an error Jun 13 14:07:02 i have the right context Jun 13 14:08:33 the error? Jun 13 14:10:00 exit Jun 13 14:12:14 i guess the question is Jun 13 14:12:18 apoc52: Make sure you display the toast on the main thread Jun 13 14:12:19 i have play sound alarm in background after push notification Jun 13 14:12:21 can i show a toast within the doinbackround Jun 13 14:12:26 method Jun 13 14:12:51 I believe I just answered that question Jun 13 14:13:06 ok thank Jun 13 14:13:06 i have 10 diffent mp3 in raw, when server send type alarm app have play alarm1.mp3 etc... Jun 13 14:13:48 i use Soundpool but i don't know how play when app is in background Jun 13 14:24:00 hello Jun 13 14:28:59 hey Jun 13 14:45:12 how do you make launcher icons? (Which program?) id like to create a new one Jun 13 14:45:28 the first i made was ms paint pixel-by-pixel xD Jun 13 14:49:23 Find a picture, and then makeappicon.com - ktwo :) Jun 13 14:51:47 yea but i dont want to just take a random picture want to design myself, but photoshop/Gimp are too complicated Jun 13 14:54:15 Paint.net maybe? Jun 13 14:57:50 Hey, anyone around knows a thing or two about stock options? Jun 13 14:58:12 given to an employee as payment Jun 13 15:14:05 I am working with ogre and every mesh seems to be black Jun 13 15:14:21 is it a problem of the lighting? Jun 13 15:28:11 What if you made a list view of list views? how would you scroll to the next list view? Jun 13 15:28:42 i have a progress dialog defined in my onpreexecute method of async task Jun 13 15:28:46 but it is not showing Jun 13 15:28:46 These are the questions that keep me up at night Jun 13 15:28:54 protected void onPreExecute() { Jun 13 15:28:54 super.onPreExecute(); Jun 13 15:28:54 progress = ProgressDialog.show(mContext, "", Jun 13 15:28:54 "Getting Recipes. Please wait...", true); Jun 13 15:28:54 progress.show(); Jun 13 15:28:54 } Jun 13 15:30:52 apoc52: please don't paste more than a couple of lines into the channel Jun 13 15:37:10 apoc52: Easy to debug things like that: Try the same code in a simpler context (e.g., when a button is clicked). If it doesn't work in the simpler context, something is wrong with the code; if it does, something is wrong with onPreExecute. Jun 13 15:50:11 heya Jun 13 15:50:14 hi android developers Jun 13 15:50:51 you got it Jun 13 15:50:56 congrats! Jun 13 15:51:00 :P Jun 13 15:51:12 yeah Jun 13 15:51:18 and you are still here Jun 13 15:51:20 ohh my god Jun 13 15:51:26 are you android developer Jun 13 15:51:27 haha Jun 13 15:53:00 anybody here ? Jun 13 15:53:08 whats the best way to recreate a fake text message simulator?(not communicating with server, just preprogrammed responses) I was thinking listview, but can that add dymanically and from the bottom up? Jun 13 15:53:35 yeah Jun 13 15:53:57 recreate fake text message need a content resolver and broadcast reciever Jun 13 15:54:14 hey people Jun 13 15:54:18 hi Jun 13 15:54:40 does anybody know where I can download the youtube minimize icon? Jun 13 15:54:54 means youtube icon? Jun 13 15:54:56 is it even possible? Jun 13 15:54:59 in a clipart shape? Jun 13 15:55:01 i mean that arrow Jun 13 15:55:43 which arrow? Jun 13 15:55:48 the minimize arrow Jun 13 15:55:59 when you watch some video Jun 13 15:56:13 ohh Jun 13 15:56:15 wait Jun 13 15:56:15 you can minimize it by clicking the arrow Jun 13 15:56:21 on the left top Jun 13 15:56:58 ohk Jun 13 15:57:20 means where we are in a full screen mode and then we just minize video to it's original shape Jun 13 15:57:22 right Jun 13 15:57:24 that arrow ? Jun 13 15:57:40 ye Jun 13 15:57:53 may be i could find for you Jun 13 15:58:04 amit2912 isnt content resolver and broadcast receiver for a real text messgae simulator? i just want to give the person options and then have bot reply, kinda like a choose your own adventure Jun 13 15:58:20 haha Jun 13 15:58:22 ohk Jun 13 15:58:22 Anyone know why I would not be allowed to put any elements in a card view? http://imgur.com/ODhDFiZ Jun 13 15:58:36 i was thinking that it will like a self message Jun 13 15:58:39 sorry for tht Jun 13 15:58:44 NateRiver: for what it's worth, I (vaguely) know a couple of guys who had an app like that Jun 13 15:58:55 amit2912: would be awesome =] Jun 13 15:59:04 Leeds cool Jun 13 15:59:06 haha Jun 13 15:59:44 hTmlDp sure Jun 13 15:59:47 wait Jun 13 15:59:58 they did a talk at a local meetup on Wednesday showing their workflow for adding new chat partners, then did a live build featuring one of the meetup regulars who is leaving town :) Jun 13 16:00:13 and ding ? may be you have to do something like make layout_height not wrap content Jun 13 16:00:15 ohk Jun 13 16:01:12 amit2912: nope. just set it to 300dp. still does not allow me Jun 13 16:02:18 and you are still here <- no , it's a different channel Jun 13 16:02:33 haha Jun 13 16:02:39 hey please cristian_c / Jun 13 16:04:09 Leeds so it added fake friends? or real people? Jun 13 16:04:42 NateRiver: fake friends - it was all a game, as you said, you walk through a script, they spoke to you, you chose from a selection of answers, maybe they sent you a photo or voice message... Jun 13 16:04:59 couple of chat partners were free, the others were IAP... Jun 13 16:05:31 apparently they got kicked out of the store because someone complained about the fake photos - which they'd paid to license - being too sexy Jun 13 16:05:52 was that PhoneyGirlifriend? Jun 13 16:06:00 yup Jun 13 16:06:17 ohh cool so THEY did the talk? im big fans of their work Jun 13 16:06:44 they did a talk at a small conference last year about how they came to build it - I spoke at the same conference about the future of mobile tech :) Jun 13 16:07:03 nice Jun 13 16:07:16 then they gave a talk this week specifically about the workflow of adding a new partner... which they then did as a live demo, and build and published a special version of the app :) Jun 13 16:40:18 i want to develop a 2d game on android i mean i wanna learn basics no big purpose just small things i just wanna know the right framework for game development i came up with cocos2d but seems like it is not java , is it ? Jun 13 16:46:02 is there a way to request SurfaceView rendering on demand, rather than running a loop Jun 13 16:57:37 Hey! I’m developing some code to send data from my android application to my server. And it turns out that the best way to do that is with ASyncTask but, do I have to create a ASyncTask class for every function. Can’t there be another way to solve this? Jun 13 16:58:13 was reading this on #android :P - well create one asynctask class and reuse this maybe? Jun 13 16:58:22 using different parameters Jun 13 16:58:34 d34th4ck3r: Nothing wrong with creating a new AsyncTask whenever you need one. There are a few issues with AsyncTask, though, but it's a good first step to learn Jun 13 16:59:32 Yeah! but then’ll endup having like 10 ASyncTask for just little varied functions. Jun 13 16:59:43 d34th4ck3r: Don't worry about that Jun 13 17:00:12 do you mean create new class file or instances of it? Jun 13 17:00:21 can cardview be use only with recycler view? Jun 13 17:00:31 ktwo: Both are fine. Jun 13 17:00:32 I need to write new class for different functionality Jun 13 17:00:59 sure both are fine but if they do not vary a lot it would be cumbersome Jun 13 17:01:09 just use the same class with different parameters Jun 13 17:01:14 Exactly! Jun 13 17:01:17 and create new object instances Jun 13 17:01:35 Reusing the same AsyncTask instance is a mistake, don't do that Jun 13 17:01:53 JesKa: you can use CardView anywhere you need to Jun 13 17:01:56 (wonder if it's even possible actually, does execute() work if the previous one is in flight?) Jun 13 17:02:13 so, you mean the parameters I’m passing to doInBackground, just use that to differentiate functionality Jun 13 17:02:19 ohkk Jun 13 17:02:24 protected Object doInBackground(String... arg0) { Jun 13 17:02:53 then you can use multiple string parameters, if you need something else you can change it too Jun 13 17:03:00 yeah! so using arg0 to differentiate functionality Jun 13 17:03:10 CedricBeust: I think an Exception is thrown, not completely sure, but I do remember having to throw away the old one Jun 13 17:03:15 Again, do not reuse AsyncTasks Jun 13 17:03:25 yea sure do not reuse, but you can create new ones Jun 13 17:03:28 actually all of the tutorials i find on card view used recycler view, so I thought it could be used only with recycler view Jun 13 17:03:35 CedricBeust: you can use upto 5 ASyncTask at one time Jun 13 17:03:47 d34th4ck3r: You can create as many as you want Jun 13 17:04:03 how they work depends upon the platform version :P Jun 13 17:04:20 razzledazzle: Yes, that's one of the problems I was alluding to earlier. There are others Jun 13 17:04:30 yeah! but the latest Android version support 5, not sure Jun 13 17:04:48 JesKa: probably because they were introduced together at the same time Jun 13 17:04:54 Personally, I use Retrofit wherever I can so I never need to use AsyncTask to make network calls Jun 13 17:04:55 anyway, even if they are 5 you should not need more usually Jun 13 17:06:02 CedricBeust: same here! First time using in my project and it made network ops painless, pleasant I'd say Jun 13 17:06:54 I like how the service interface looks with that Jun 13 17:07:54 i want to ask another question: I'm using Theme.AppCompat.Light.NoActionBar theme in my app and so i'm getting dark popmenu with it. Any way I can change it to light popup menu? Jun 13 17:07:54 I have an Activity that contains a ListView that is generated dynamically from a JSON String. I now want to reuse this ListView with a different String within a different Activity. What would be a good implementation to do this? Simply put the generating code in a method that returns a ListView and embed that in my Activities? Jun 13 17:08:23 JesKa: popup menu on the Toolbar? Jun 13 17:08:38 I have decided instead of trying to get a normal gf, it is probably easier for me to create or program one :< Jun 13 17:08:50 no hardware menu popup menu Jun 13 17:09:09 i have got toolbar popup menu to light Jun 13 17:09:42 but your theme is light JesKa, weird Jun 13 17:10:08 barq: how you supply the data to the ListView depends on the type of ListAdapter you use Jun 13 17:10:47 razzledazzle yeah! exactly. I have tried to use popupMenuStyle attribute, which is also not working Jun 13 17:11:47 well, you don't supply data to be precise, you feed the data to the Adapter and the Adapter inflates rows and binds data to the parts of the rows, are you using some custom implementation for your ListAdapter Jun 13 17:12:13 barq: The JSON code should be in a different class entirely. Jun 13 17:13:18 barq: Ideally, your Activity, ListView, and adapter would have no clue that JSON is involved. Jun 13 17:13:28 Actually it's a number of ImageViews hat look like a ListView. I thought of having the code generating those ImageViews in one class and have a static method that takes a JSON String and outputs the ImageViews. Jun 13 17:16:35 am I? Yes Jun 13 17:16:40 TacticalJoke: So how does the Activity get its contents then? Calling ImageViewGenerator.getImageViews? Jun 13 17:16:43 siorry wrong chan Jun 13 17:17:31 razzledazzle if i use Theme.AppCompat.Light.DarkActionBar i get light popupmenu. Any idea why? Jun 13 17:18:51 barq: Probably the first question is "Should I be using ListView/RecyclerView here?". Jun 13 17:21:08 TacticalJoke: I don't think I have enough benefits to reimplement the existing solution using RecyclerView. I just need to extract generation of this "List" properly such that it can be reused. So probably the easiest solution is some refactoring. Jun 13 17:21:10 JesKa: no idea :P Jun 13 17:21:43 razzledazzle thanks anyways :-p Jun 13 17:23:31 :D Jun 13 17:24:33 barq: It'd be easy with ListView: ListView is a reusable component, and your adapter would be a reusable component. Jun 13 17:24:44 It sounds like your current code isn't reusable at all. Jun 13 17:24:51 What about a LinearLayout containing these ImageViews? Jun 13 17:25:37 hi Jun 13 17:26:03 where can I get a list of all the android view controls that I can use for textinput? Jun 13 17:26:08 is there more then one? Jun 13 17:26:21 You could subclass LinearLayout (instead of using ListView), and maybe that'd work, but without the adapter pattern things might get hard to reuse quickly. Jun 13 17:26:31 than* one Jun 13 17:26:54 barq: Do you need scrolling? Jun 13 17:27:14 TacticalJoke: nope Jun 13 17:27:45 It's <10 entries. Jun 13 17:28:27 Okay. You might be able to get away with subclassing some ViewGroup (e.g., LinearLayout), though it's hard to say from where I am. Jun 13 17:29:55 TacticalJoke: Do I need to subclass or can I just have a method that returns a LinearLayout? Jun 13 17:30:39 barq: if it's a fixed number of views, why aren't you using an xml layout for that? Jun 13 17:31:03 dex2goat: It's not fixed. It is generated dynamically from a JSON String. Jun 13 17:36:28 I think I'll go with a Custom View Jun 13 17:37:34 hey guys, I was wondering if anyone may have some insight with my problem. I am reverse engineering my bluetooth smart watch, and Ive managed to connect and pair to it, however it awaits confirmation from the phone. I saw this via the btsnoop_hci log file and i see the the official app sense the data as the phone where as my app sense the data as localhost. any idea why ? Jun 13 17:44:16 hey g00s did u get a chance to read my message? Jun 13 17:44:25 wasnt sure if you have experienced that as well Jun 13 17:46:56 If I am refactoring and want to move code from my Activity to another class that is not an Activity, but need to use things like findViewById, do I pass this or getContext() from the Activity to the new class? Jun 13 17:52:47 Hi - I've got the following issue: I'm using a RecyclerView, which doesn't have a default item click system. I'm adding a clicklistener to the individual list element, but it seems to only register a click about 25% of the time. Ideas? Jun 13 17:57:40 barq: Why does it need `findViewById`? Jun 13 17:57:57 The fact that it needs this immediately suggest that the design is wrong. It's way too involved with the activity. Jun 13 17:59:13 TacticalJoke: Probably can be modified not to need findViewById. I need to add the LinearLayout to my Activity in the right place somehow. Jun 13 17:59:50 barq: This is why I suggested a ViewGroup subclass: then your class doesn't care about where or how it's used. It's independent. Jun 13 18:00:21 TacticalJoke: So extend LinearLayout if that is what I am generating? Jun 13 18:00:25 Yeah. Jun 13 18:00:43 I'd probably just use ListView, though, to be honest. Jun 13 18:00:46 Or RecyclerView. Jun 13 18:01:06 Even if you're not scrolling now, what about the future? And maybe tiny screens will need scrolling. Jun 13 18:01:20 And you get the adapter pattern for free. Jun 13 18:01:40 I'm using a RecyclerView, which doesn't have a default item click system. I'm adding a clicklistener to the individual list element, but it seems to only register a click about 25% of the time. Ideas? Jun 13 18:02:04 TacticalJoke: Then how do I add that LinearLayout to my activities? Jun 13 18:02:07 olivervscreeper: You should just post the code. Jun 13 18:02:23 kk, will do, one moment Jun 13 18:03:08 barq: In the XML, instead of ``, you can use ``. Jun 13 18:03:14 It works, but only about 20% of the time: http://hastebin.com/utikosozuf.java Jun 13 18:03:36 TacticalJoke: OK, but then I need to get the dynamic content into it. Jun 13 18:04:33 Then just define a method, `showFoo(Foo foo)` or something. Jun 13 18:05:28 Hey... where can I create variables that all my classes in the same package can access? Not global variable but I would like to say... Create a variable in the MAIN class that can be changed in the different class because I want to use this variables as a Flag for the other Classes/Activities Jun 13 18:10:46 olivervscreeper: Could you post everything relating to the RecyclerView? Jun 13 18:12:26 Sure Tactical, one second Jun 13 18:14:02 And if I need things like getSharedPreferences from my extended LinearLayout I use getContext().getSharedPreferences? Jun 13 18:18:05 And I can't do things like startActivityForResult from the LinearLayout, TacticalJoke. How would you handle these calls? Jun 13 18:19:51 barq: I wouldn't dream of trying to start an activity from a custom View. The simplest solution isn't that hard to imagine. Think about it. Jun 13 18:21:07 TacticalJoke: Well, the JSON String determines what Activites are started by clicking what entry. I could put the whole thing in a Fragment, but that would be a lot of work. Jun 13 18:21:17 Actually, maybe some people would, but IMO it's not good design. It's giving the View too much responsibility. Jun 13 18:21:52 The view is generated dynamically and basically gives the options of configuring the whole thing by changing the JSON. So actually I am not sure how else to do this. Jun 13 18:22:05 getContext().startActivity is what I would do. Jun 13 18:23:44 barq: I'd fire an event which the activity subscribes to. The activity can then start activities as needed. Jun 13 18:24:04 Just like an activity might handle the "click" event of a view. Jun 13 18:25:10 TacticalJoke: But then I am putting logic back into the Activity. I could have the Activity register the event but then use another class to generate the intent, pass that back to the activity and start the new activity. Jun 13 18:30:38 How many different intents are you dealing with? Jun 13 18:31:04 Around 10-15. Jun 13 18:34:34 TacticalJoke: ^ Jun 13 18:45:39 TacticalJoke: It works now with the extended LinearLayout for a start. Thank you very much for your help! Jun 13 18:45:57 Okay, good. No worries. Jun 13 18:50:32 is there any reason the clock app's alarm doesn't support vorbis? Jun 13 18:59:18 anyone with bluetooth sniffing experience? Jun 13 19:31:19 asd Jun 13 19:31:54 wasd Jun 13 19:32:39 TacticalJoke, Why cant I use a simple setText() ? Jun 13 19:32:40 http://pastebin.com/HvB02BJW Jun 13 19:32:59 jareddlc, Lol...yea Ive been DCed a million times tonight so now I have to test to see if I am still online Jun 13 19:33:14 +1 Jun 13 19:33:21 classic asd asd asd asd keys Jun 13 19:33:49 cart_man: You're trying to call `findViewById` before onCreate, which won't work. Jun 13 19:33:58 And you're not doing `setContentView` and so on. Jun 13 19:36:05 cart_man: Why would you expect that code to work? Jun 13 19:37:52 TacticalJoke, Well I was stripping everything that the IDE generates to see what each does.. Ive never bothered with the generated code up until now... obviously I have used it because I have to Jun 13 19:38:18 TacticalJoke, Im also looking for a way to handle variables accross activities Jun 13 19:38:26 generally just messing about Jun 13 19:39:16 Does anyone know what flag I need to set on an EditText to disable auto capitalization on new lines? I've searched but my Google skillz must be lacking today. Jun 13 19:41:36 current InputType flags I'm using: http://pastebin.com/QjLmQ4FK Jun 13 19:44:10 surf2b1: so you want the first line to half capitals, but not any subsequent ones? Jun 13 19:44:20 hey Jun 13 19:44:37 DadFoundMy: No lines to have capitals Jun 13 19:44:40 can anyone tell me why view.getMeasuredHeight() returns 0 for me? Jun 13 19:45:55 hTmlDP: It hasn't been measured yet? Jun 13 19:46:12 TacticalJoke: .getHeight() returns 0 too Jun 13 19:46:20 im just trying random stuff Jun 13 19:46:30 while (true) { print("It hasn't been measured yet?"); } Jun 13 19:46:34 hTmlDP: The view hasn't been drawn yet Jun 13 19:46:41 hmm Jun 13 19:47:04 or the parent is imposing a measurespec that resolves to be 0, but unlikely Jun 13 19:47:16 hTmlDP: view.post(new Runnable() { int height = view.getMeasuredHeight(); }); Jun 13 19:47:21 should work ^^ Jun 13 19:47:30 surf2b1: nice idea mate, thanks =] Jun 13 19:47:39 That's not really a good idea. It's very hacky. Jun 13 19:47:51 I thought it was suggested by Romain Guy Jun 13 19:47:59 not sure which is worse, that or ViewTreeObserver Jun 13 19:48:03 Should tere be any includes if one wants to use toString() ? Jun 13 19:50:04 hTmlDP: also, if you're calling getMeasuredHeight() outside onLayout() you're probably doing something wrong Jun 13 19:50:24 dex2goat: i was calling it in an ontouch listener Jun 13 19:50:27 just moved it to onTouch Jun 13 19:50:33 use getHeight Jun 13 19:50:45 hTmlDP: i think you need to use onTreeObserver() Jun 13 19:50:53 or getTreeObserver() whatever it is Jun 13 19:51:08 getViewTreeObserver().addOnGlobalLayoutListener() Jun 13 19:51:11 that's also a hack :| Jun 13 19:51:25 dex2goat: thats what i always do. it seems to work fine Jun 13 19:51:57 How else can you make the width and height the same? as in a square? Jun 13 19:51:58 What's hacky about using ViewTreeObserver.addOnPreDrawListener? Jun 13 19:52:05 I think that's a pretty simple and obvious solution. Jun 13 19:52:32 TacticalJoke: yeah why else would those methods be there? Jun 13 19:53:17 surf2b1 is right that Romain Guy recommended the View.post thing, but I don't like the subtleness of that, personally. It's one of those WTF/minute things. Jun 13 19:53:32 I'd rather override onSizeChanged() from within the view Jun 13 19:53:36 but also use ViewTreeObserver when I have to Jun 13 19:54:06 better than while (true) :P Jun 13 19:54:50 surf2b1: boolean flag = true; while (flag) flag = false; Jun 13 19:56:27 while (view.getHeight() == 0) { /* do nothing */ } Jun 13 19:56:47 I remember Application.DoEvents in .NET. People used to create the most awful hacks. Jun 13 19:57:02 TacticalJoke: wouldn't that stop the program though? And what if height actually was 0 haha? wait is this just a joke? Jun 13 19:57:03 wouldn't that cause an ANR when running on the main thread? Jun 13 19:57:07 Stuff like `while (view.Height == 0) { Application.DoEvents(); }` (AFAIR). Jun 13 19:57:09 ^^ yap Jun 13 19:57:15 Yeah, it was just a joke. Jun 13 19:57:22 oh Jun 13 19:57:46 oh gosh. Good. haha Jun 13 19:58:02 DadFoundMy: if you want to force a view to be a square there are better ways of doing that, instead of using a ViewTreeObserver. Jun 13 19:58:05 Since it's all one thread, that could never work. :D Jun 13 19:58:28 you could override onMeasure() and call setMeasuredDimensions() with same values for width/height Jun 13 19:58:50 dex2goat: good point Jun 13 19:58:52 setMeasuredDimension()* Jun 13 19:59:01 that was tactical of you Jun 13 19:59:22 I was just amending y'all's jokes. :D Jun 13 20:00:25 is that the correct spelling of yall? Y'all. If so i kind of hate english right now Jun 13 20:00:37 is there even a "correct" spelling of slang? Jun 13 20:00:41 Yeah, I think so: you all = y'all (contraction). Jun 13 20:00:58 TacticalJoke: goddamn you! http://www.merriam-webster.com/dictionary/y'all Jun 13 20:01:22 Some people say "ya'll", but that doesn't make much sense, because there's no "ya". Jun 13 20:01:59 OR YOU CAN JUST SAY YOU ALL LIKE CIVILIZED FOLK Jun 13 20:02:07 Then again, "don't" is weird. There's no "don". Jun 13 20:02:38 theres not wasn in wasn't Jun 13 20:02:46 *there's Jun 13 20:02:49 considering the topic Jun 13 20:02:57 Being English, I'd never say "y'all" IRL. I'd just say "you", I think. Jun 13 20:03:50 y'all nasty. Jun 13 20:04:16 TacticalJoke: https://www.addedbytes.com/blog/if-php-were-british/ Jun 13 20:04:19 ^^ Jun 13 20:05:19 Ooh, 'otherwise' would be an awesome 'else' keyword. Jun 13 20:07:52 TacticalJoke intersting http://www.quora.com/Why-did-Borland-fail/answer/Danny-Thorpe?share=1& Jun 13 20:08:39 I remember him from the Borland newsgroups. :) Jun 13 20:09:14 Yeah, Borland lost focus, big time. Jun 13 20:09:21 They had such talented people; they threw it all away. Jun 13 20:09:57 The VCL made Win32 development kinda fun. Jun 13 20:10:02 how can i get the absolute top of a view? Jun 13 20:10:51 I'm not sure if we should give you an answer for that. Jun 13 20:11:13 Sound like "how do I look into the gun barrel with glasses on?" Jun 13 20:11:16 g00s: Did you ever visit the Borland newsgroups? The drama there was awesome. (They also predicted all this at the time Borland evidently started to lose focus.) Jun 13 20:11:54 TacticalJoke i never did :( Jun 13 20:11:55 Mavrik: ?? =D Jun 13 20:12:03 https://dl.dropboxusercontent.com/u/64175875/Untitled.png can anyone tell me why this textView doesnt get added to layout? Jun 13 20:12:31 hTmlDP, what are you trying to do? Jun 13 20:13:04 TacticalJoke, Have you ever used singleton functions to pass data around from activity to activity? Jun 13 20:13:21 Mavrik: playing with ontouch Jun 13 20:13:33 cart_man, only in lectures on how not to design software Jun 13 20:13:44 abs25: Maybe `message` is null. Jun 13 20:14:30 cart_man: Yes. Jun 13 20:14:32 hTmlDP, getY() gives you view top + translationY Jun 13 20:14:39 hTmlDP, after layout obviously and within the parent Jun 13 20:14:58 Mavrik: ah ok thanks Jun 13 20:15:00 Mavrik, Did not think it will be that bad? You say so because its dangerous or just bad practice? Jun 13 20:15:18 cart_man, depends on what, but tends to be bad practice Jun 13 20:15:21 depends on data really Jun 13 20:15:22 I have bought my app’s in-app purchase from the play store on both my test devices to try and locate a bug, now it keeps giving it to me for free as I’ve purchased it, is there a way to reset this? Jun 13 20:16:22 Mavrik, Well it will be a Activity Flas (In) that just represents a state the app is in... but it has to be accessed really fast as it will be used on almost every gesture the user does Jun 13 20:16:32 TacticalJoke, haha thank you alot Jun 13 20:16:36 I cant believe this ... Jun 13 20:16:36 TacticalJoke, Delphi was actually a shining beacon in the dredges of Visual Basic and MSVC++ windows dev Jun 13 20:16:47 abs25: Remember to reduce complexity if stuff doesn't work. Then it's easy to figure out which part doesn't work. Jun 13 20:16:50 Mavrik: Yeah. Jun 13 20:16:50 soo minimum processing power should be wasted on checking what the state is Jun 13 20:16:57 cart_man, "activity flas"? Jun 13 20:16:58 I loved Delphi. Even more than C++ Builder. Jun 13 20:17:06 Flags` Jun 13 20:17:13 Mavrik, ^^ Jun 13 20:17:14 TacticalJoke, couldnt imagine that string is null, I mean he is geting String extra Jun 13 20:17:17 why doesnt that work Jun 13 20:17:21 cart_man, hmm, what kind of state? Jun 13 20:18:22 abs25: Check the documentation for Intent.getStringExtra. Jun 13 20:18:26 Mavrik, Well... Swiping from left to right for instance... just checking which side he swiped too and what the phones next action will be.. I will check this with an incremented number Jun 13 20:19:06 Hmm, that wouldn't make much sense outside an Activity or as a static state Jun 13 20:19:11 TacticalJoke, I am following android developer tutorials, I dont even see a point of sending that message Jun 13 20:19:48 abs25: Here, it's a way of passing parameters to Activities. Activities are awkward for this kinda thing. Jun 13 20:20:16 Though, having said that, the Intent system is powerful (e.g., we can start Activities from other apps). Jun 13 20:20:16 Still they could have just passed the string and thats it Jun 13 20:20:38 Passed it how? You can't just say "new MyActivity(text)". Jun 13 20:20:47 Activities are instantiated by the framework. Jun 13 20:20:47 I mean I see how it works Jun 13 20:20:51 but for some reason its null Jun 13 20:21:14 yeah I see now we cant pass it just like that Jun 13 20:21:19 Mavrik, So how would you do it though? Jun 13 20:21:41 cart_man, do which part? Jun 13 20:21:57 TacticalJoke, http://stackoverflow.com/questions/15555750/android-intent-getstringextra-returns-null I think I found what I need Jun 13 20:21:59 Storing scroll state outside activity is meaningless because swipe / touch gestures don't propagate Jun 13 20:22:03 thanks for help Jun 13 20:22:22 Worst case you just send a constant "SWIPED_RIGHT" when you start the new activity or something Jun 13 20:22:32 abs25, did you input any text into the edittext you are getting the string from? from default it's empty with just hint text Jun 13 20:25:40 canvs2321, EditText editText = (EditText) findViewById(R.id.edit_message); this line for me doesnt work Jun 13 20:25:43 it returns null Jun 13 20:26:45 when are you calling the sendMessage method, before onCreate? Jun 13 20:39:07 hey people Jun 13 20:39:24 how can i disable layout_weight from layoutparams? Jun 13 20:39:29 yeah i do need it. Jun 13 20:40:48 nvm the default is zero Jun 13 20:46:29 I'm passing a value through intent.putExtra while switching activity but i'm getting value can't be null line #30 so think my value is not being passed http://pastebin.com/EWRmTBfE in the intent Jun 13 20:53:50 hert: what is the type of scopeUUID? Jun 13 21:00:06 hey Jun 13 21:05:31 hTmIDp it's a string Jun 13 21:23:54 IS there an easy way to disable icons from the navigation drawer menu. The problem seems to be it expect two parameters (title, and icon)? Jun 13 21:25:20 Datasmurfen dont you just give it a menu xml file ? Jun 13 21:25:42 i haven't used it :P Jun 13 21:27:01 Yea, but if i remove it from there - I also remove it from the action bar :p So i think i have two find the declarision inside a java file ... Jun 13 21:27:06 But am not sure Jun 13 21:31:58 Is there a way to reset in-app purchases in Google Play? I’m trying to find a bug but now it keeps giving it to me for free as I’ve bought it once Jun 13 21:33:12 The bug happens when I purchase the item - it shows a ‘failed’ popup then a ‘success’ one, I’m trying to see if I’ve fixed this. Jun 13 21:48:35 so even though people use android studio now instead of eclipse, the Android Api itself has stayed pretty similar over last 4 years? Jun 13 21:48:55 so books from like 2012 would still be uesful and not obsolete? Jun 13 21:51:28 mostly, yes Jun 13 22:03:03 I set my layout id to equal ego so now it says inflater.inflate(ego) lolol Jun 13 22:08:48 Exception up = new Exception(); throw up; xD Jun 13 22:12:01 So I've just downloaded my contacts database from /data/data/com.android.providers.contacts/databases/contacts2.db and when I try to open it I get "PHONEBOOK, no such collation sequence" error https://code.google.com/p/android/issues/detail?id=10846 . The stacktrace of the program I'm using says this: https://paste.kde.org/prqxcfuct/cekz46 Jun 13 22:12:05 Could not retrieve columns for table view_contacts: [SQLITE_ERROR] SQL error or missing database (no such collation sequence: PHONEBOOK): [SQLITE_ERROR] SQL error or missing database (no such collation sequence: PHONEBOOK) Jun 13 22:12:18 Any ideas why is the collation missing from the database? Jun 13 22:29:03 is it possible to round corners or a textview Jun 13 22:29:06 help if you can: http://stackoverflow.com/questions/30824094/dynamically-disable-auto-capitalization-of-an-edittext Jun 13 22:40:39 i figured it out, you have to create a shape and then use it as background Jun 13 22:52:46 Hi. I uploaded an Android app and when I log into PlayStore developer I have over 100 downloads (8 current downloads). However, when I view the app at this link (or on my phone) it says just 10 downloads. Why does this happen? https://play.google.com/store/apps/details?id=com.waycreon.SafeChoice Jun 13 22:53:32 Also not sure if related but I had some reviews + five stars removed Jun 13 22:55:12 lol Megan Leard might not want to put that in her review Jun 13 22:55:51 g00s haha yeah I know, but doubt anyone even knows who she is. Either way good SafeChoice is saving lives But hey do you have an answer to my question please? Jun 13 22:56:24 People srsly overshare. Jun 13 22:56:25 it could take a few days for stats to catch up, but other than that, no idea Jun 13 22:56:37 It has been like 5 days :-(. Jun 13 22:56:45 LTCD question about your app, does it calculate opportunity cost ? Jun 13 22:56:56 g00s: What sorry? Jun 13 22:57:25 http://apps.opera.com/en_gb/safechoice.html <--- See opera update it so quickly compared to PlayStore. Jun 13 22:57:44 LTCD for example, lets say you spend $X monthy on Foo. but if you invested that it could turn out to be Y over Z years Jun 13 22:58:36 so the true opportunity cost is missing the best opportunity, whether investing that, or whatever Jun 13 22:58:44 not just saving the money, although that is good too Jun 13 22:58:56 surf2b1: have you tried this: http://stackoverflow.com/questions/20961585/android-keyboard-start-lowercase Jun 13 22:59:04 g00s: smart idea, if this app takes off (as I'm getting 340 downloads in 3 days in total from everywhere I uploaded it is slow) I will. Jun 13 22:59:14 Also someone remind me that if I can't get an answer to this question I'd need to ask some stuff about AdMob. Jun 13 22:59:38 g00s: I mean 340 downloads isn't much right? Jun 13 22:59:46 these days, no Jun 13 23:00:07 g00s: so I might get very popular? :o Jun 13 23:00:15 Let me just have a moment haha. Jun 13 23:00:26 i mean, 340 is probably going to be the size of the Duggar family in a few years Jun 13 23:00:46 g00s: Any other tips though, especially about promoting it? Jun 13 23:01:03 And I'll wait a few more days before checking downloads on PlayStore I guess. Jun 13 23:01:09 LTCD not really, this week i read this (good) http://andrewchen.co/new-data-shows-why-losing-80-of-your-mobile-users-is-normal-and-that-the-best-apps-do-much-better/ Jun 13 23:01:25 make sure you have some analytics to give you bounce rates, etc Jun 13 23:01:51 g00s: Do you know much about AdMob? And yeah out of 100+ on PlayStore only 8 people kept it installed :-( Jun 13 23:01:59 no, i hate adds Jun 13 23:02:45 ericcson posted that 2/3 of all mobile traffic is dominated by 5 apps, so its still winner take all Jun 13 23:03:09 OTOH http://www.fiercedeveloper.com/story/meet-mobile-app-developer-middle-class-hint-you-may-be-part-it/2015-06-02 Jun 13 23:03:36 g00s: fuck. How else do I make a profit from this stuff then? :-( Jun 13 23:03:53 i have no idea Jun 13 23:05:49 LTCD oh i picked up an interesting book, one sec Jun 13 23:06:20 LTCD http://www.amazon.com/How-Build-Billion-Dollar-App/dp/0349401373 Jun 13 23:07:20 Pretend I had a friend with over 500,000 FB friends, and another friend that had a forum with over 3,500,000 monthly readers of their email list. Think I'd make a profit, considering not everyone will download etc... Jun 13 23:08:47 And thanks for the book. Jun 13 23:09:45 g00s: Also I had to be rude but would you mind writing me a review sir? This IS for a good cause. Jun 13 23:09:56 lol Jun 13 23:11:56 TacticalJoke: Considering I'm a broke university student, new to this and trying to do something good for the world can you give it a break? Jun 13 23:12:04 Give what a break? Jun 13 23:12:38 Maybe I misunderstood you. Jun 13 23:12:45 I guess text comes across differently. I'm just laughing at the awkwardness g00s is probably currently experiencing. Jun 13 23:13:06 TacticalJoke knows me well haha Jun 13 23:14:30 Oh right sorry if I'm a little hyper, but I have been up since 6am running errands and just need things done fast. Starting work next month too! Jun 13 23:15:59 Anyway to start over - if I have 4,000,000 traffic (considering not everyone will download it) think I can make this app a success? Jun 13 23:17:18 BRB Jun 13 23:24:05 I need to create a custom Wrapper class, but what is a wrapper class? I'm trying to parcel an ArrayList of ArrayList, and the inner ArrayList needs to implement parcelable Jun 13 23:26:11 "What is a wrapper class?" sounds like one of those soul-searching questions. I can imagine a guy sitting by a lake, throwing a stone in. Jun 13 23:34:44 TacticalJoke - what a dick :P Jun 13 23:43:27 I think that's a little unfair. I tried to find humour in an awkward situation ("I don't know you, and this is crazy, but... can you review my app?") and then in a really vague question ("What is a wrapper?"). Pretty harmless. :D Jun 14 00:10:34 i've been passing a string through intent.putExtra to an activity but i'm getting value null for it line #30 can't make sense of it Jun 14 00:10:36 http://pastebin.com/7XFU39H9 Jun 14 00:11:54 If `scopeUUID` is a String, it doesn't make sense to call Intent.getParcelableExtra there. Jun 14 00:15:42 I have a problem with AutoCompleteTextView, the first time I use it for autocomplete, it works, but then it seems that it does not get updates from the associated arrayadapter Jun 14 00:15:47 any idea? Jun 14 00:20:23 tacticalJoke Ichanged it to getStringExtra but same error value may not be null Jun 14 00:21:58 Maybe `scopeUUID` is null? Debug (perhaps with `Log.d`) and find out. Jun 14 00:22:43 i have it debug in the first activity when it's created and it's not null Jun 14 00:22:44 hello Jun 14 00:24:09 hert: You might have to post all relevant code. Jun 14 00:24:53 put a breakpoint at this line "startActivity(intent);" and see what is scopeUUID hert Jun 14 00:26:25 when an incoming call comes in the the id of the number shows up on the screen if the number is in the contacts. is it possible to have the dialer look up contact information from another application instead of the contacts app ? Jun 14 00:31:26 alexi5: a dialer, probably no (w/o modifying rom) though you can show up whatever information you wish from your app as overlay or toast/notification. Jun 14 00:36:57 the reason why i ask is I have a application which has internal directory for wmy workplace and would like the id of the number to show when a number matches an entry in the database, but not have the numbers listed as contacts in the contact app Jun 14 01:09:02 write an app to display an overlay when the contact info matches Jun 14 01:19:09 guys what do you think about writting unit tests before code Jun 14 01:20:04 It's not a very good idea. Jun 14 01:20:20 Maybe it's useful occasionally. Jun 14 01:20:36 Anyone here used the new Visual Studio Emulator for Android? Jun 14 01:21:12 I'm reading the "Clean Code - A handbook of agile software craftsmanship" Jun 14 01:21:17 I jumped on the TDD bandwagon once upon a time. I liked it until I realised that I was writing so many tests that later had to be thrown away because of behaviour changes. Jun 14 01:21:34 and just wondering if all that work for mobile programming.. heh Jun 14 01:21:42 Anyone heard of the new Visual Studio Emulator? Jun 14 01:22:27 cliffreich: https://www.google.com/search?q=tdd+stackoverflow Jun 14 01:22:31 I see tactical, maybe It's useful for big projects Jun 14 01:22:37 I predict that most of the answers will be "It's not a great idea". Jun 14 01:25:55 Hmm, there is some advocacy there. Jun 14 01:27:23 This reddit comment sounds like my experience: "I pretty much gave up on TDD when I realized I had spent a month writing tests for a prototype that was constantly changing. Most of my time was spent re-writing the tests." Jun 14 01:27:27 http://www.reddit.com/r/programming/comments/23rmdw/tdd_is_dead_long_live_testing_dhh/ Jun 14 01:28:51 well I'll soon be working as "development analyst" (more like wtf?), so i better get serious about code Jun 14 01:37:16 cool http://linux.softpedia.com/blog/Run-Android-5-1-Lollipop-on-Your-Raspberry-Pi-2-with-RaspAnd-477655.shtml Jun 14 01:37:51 would have been nice if google had an official image though Jun 14 01:38:09 the way they used to (or still do kinda) the beagleboard Jun 14 01:38:45 thats what JBQ used to work on i think Jun 14 01:44:09 cliffreich2: Are you knowledgeable about unit testing? Jun 14 01:44:24 Without TDD. Jun 14 01:45:14 Not to the extend of complex projects or TDD. My interview was for dev and ended up as dev analyst Jun 14 01:45:24 didnt ask Jun 14 01:45:27 heh Jun 14 01:45:38 cliffreich2 how do they differentiate ? Jun 14 01:46:30 imho developer is often analyst, although not business analyst. a developer that isn't an analyst is more like a programmer Jun 14 01:46:31 g00s I don't know, they told me that they'll let me know all my functions soon Jun 14 01:47:11 cliffreich2 new job ? Jun 14 01:47:25 yes, got signed yesterday Jun 14 01:47:50 so a new job, but you / they didn't know exactly what they were hiring for ? Jun 14 01:49:27 sorry my net is being shit Jun 14 01:49:54 well the first guy told me the needed a dev Jun 14 01:50:24 and then i mailed my resumee, got the interview and all Jun 14 01:50:26 and surprise Jun 14 01:51:35 I guess I'll find out next week Jun 14 01:51:50 I so badly need inline first-class functions right now. Maybe I should just go crazy and switch to Kotlin finally. Jun 14 01:52:08 My current code jumps through hoops to avoid instantiating a lovely Java 7 closure. lol Jun 14 01:52:31 TacticalJoke yeah they are so useful Jun 14 01:56:58 often try finagling its behaviot somehow, like passing enum functors or whatever Jun 14 02:57:50 TacticalJoke ever use this http://www.informit.com/deals/ Jun 14 02:58:05 was quite hot back in the day Jun 14 02:59:02 Anyone know of an Android app that allows me to control my device from my PC? (Samsung SideSync doesn't work on non-stock ROMs) **** ENDING LOGGING AT Sun Jun 14 02:59:58 2015