**** BEGIN LOGGING AT Sun May 17 02:59:58 2015 May 17 03:01:06 what is the best android sdk to use? May 17 03:01:10 i meant the dev. tools? May 17 03:01:21 eclipse? May 17 03:01:29 IDE tools? May 17 03:01:36 anyone? May 17 03:01:48 Hulio, get the SDK bundle May 17 03:01:54 Android Studio + Android SDK May 17 03:02:00 oh May 17 03:02:04 link please? May 17 03:02:08 okay May 17 03:02:11 i try to use xamarin May 17 03:02:15 but it cost May 17 03:02:20 what platform are you on? May 17 03:02:26 xamarin is plugiin for VS studio May 17 03:02:38 WIN at the moment May 17 03:02:55 i can't believe xamarin does cost for VS May 17 03:03:14 razzledazzle, ever heard of this? https://xamarin.com/ May 17 03:03:32 Hulio: There's only one SDK, the official one May 17 03:03:40 Maybe you're asking about IDE's? May 17 03:03:48 Hulio, https://dl.google.com/dl/android/studio/install/1.2.1.1/android-studio-bundle-141.1903250-windows.exe May 17 03:04:01 CedricBeust, yeah, razzledazzle is taken care of me May 17 03:04:02 thanks May 17 03:04:32 As for Xamarin, interesting technology but not relevant here May 17 03:04:51 Hulio, not sure about Xamarin with Android Studio though May 17 03:07:24 xamarin is not bad, but they have a cost for use May 17 03:07:44 it was nice it is use in VS ide May 17 03:07:47 see this http://developer.android.com/sdk/index.html May 17 03:08:39 as for VS, the popular add on ReSharper was made by people who created Android Studio. May 17 03:09:08 =_= May 17 03:10:05 Reshaprer is tools man May 17 03:11:59 Includes let's you compose modules. It essentially makes the included modules part of the same one. May 17 03:12:32 joshkovach: ^^ May 17 03:13:31 so is it similar to subclassing a module? May 17 03:14:37 JakeWharton: like import as in python? May 17 03:15:21 Don't subclass! May 17 03:15:33 Composition not inheritance May 17 03:15:38 ok May 17 03:16:07 I figured out I wasn't doing graphs right, so I'm trying to relearn it all May 17 03:16:23 It's similar to import in python, yes May 17 03:17:05 so if I includes=ApiModule.class in DebugApiModule, and I want to provide say, a spy of the thing provided in ApiModule.class May 17 03:18:16 is that something you'd even do? May 17 03:20:33 does includes let me not need to create @Provides for the dependencies unless I want to provide something different? May 17 03:20:39 razzledazzle, would you like showing me how to use ? May 17 03:20:47 razzledazzle, would be my first time May 17 03:21:08 Hulio, use what? May 17 03:21:17 the whole sdk thing May 17 03:21:31 especially the enviroment to get use to :) May 17 03:21:38 or perhap create somethign simple to show? May 17 03:23:42 well, it takes time I suppose, try installing it first, run your app and see for yourself May 17 03:23:53 https://developer.android.com/training/index.html May 17 03:24:02 so many resources online May 17 04:00:58 razzledazzle, lol man May 17 04:10:59 is it really zombie preparedness month? May 17 04:11:26 i hope you're prepared May 17 04:12:47 bankai_ this looks good http://www.amazon.com/gp/product/B00LD6KH94 May 17 04:13:27 not sure that's good protection, think bigger May 17 04:15:21 heh i just noticed Arnold Schwarzenegger is in a new zombie movie May 17 04:21:14 I heard Betty White is a zombie May 17 04:22:09 hi May 17 04:23:05 activiy has a menu.xml with 1 icon, from activity open a dialog fragment. toolbar of dialog fragment has the activity's icon May 17 04:23:55 exist solution? is it possibile change menu.xml for dialog fragment ? May 17 04:28:01 devuser: DialogFragment subclasses Fragment, which means you can modify its menu in onCreateOptionsMenu. May 17 04:30:38 i know but it doesn't work May 17 04:41:01 treelzebub, ok it workes now May 17 04:41:34 devuser: yay! i'm glad you got it working. sorry, i didn't notice your first response ^_^ May 17 04:47:10 treelzebub, there is problem. I use this code: menu.clear(); inflater.inflate(R.menu.clearmenu, menu); May 17 04:47:55 when i back in Activity there isn't menu activity May 17 04:52:01 that's what menu.clear() does. it removes all items from the menu. i am unsure of what you are trying to accomplish May 17 04:52:18 what does clearmenu.xml contain? May 17 04:53:18 clearmenu is clean May 17 04:53:47 in dialog fragment i don't want icone May 17 04:54:39 is your DialogFragment fullscreen? if you just don't override onCreateOptionsMenu at all in your DF, you should get the behavior you want, I think May 17 04:56:13 yes dg fullscreen. i override onCreateOptionMenu May 17 04:59:29 devuser: may I ask why you are using DialogFragment for this instead of a regular Fragment, or even another Activity? May 17 05:00:25 I'm assuming you just want the stock pos/neutral/neg buttons at the bottom? May 17 07:55:06 hi, is there already a simple wa to connect my computer usb mouse to my android via teh usb cable? May 17 07:55:19 (mouse to computer computer to phone and shared between May 17 08:40:00 I implemented sending an email with an extern image. The URL has to be encodied as "quoted-printable", but it is very strange! How do I insert the html code in the mail? Depending on the specified email provider, "=" is automatically converted to "=3D" or it is NOT converted. So how do I guarantee thast the embedded html code is all right? "=3D" could be converted to "=3D3D"... May 17 08:52:40 https://appetize.io/app/75v0u2hrp6tqza4qgjy5y8m9km May 17 08:52:50 2015 the year of unicode goats in android May 17 09:30:05 I’m trying to find the App Store ID for an app I’m working on for Amazon store to setup ads but I can’t seem to locate it? May 17 09:30:23 Anyone know what ‘App Store ID’ referes to? May 17 09:30:31 *refers May 17 09:31:24 Can nobody help me? May 17 09:32:37 chili4sale, don't ask to ask, just ask May 17 09:56:00 can anyone help with using the Parceler library? May 17 09:56:46 Is Parcels.wrap() mandatory? May 17 10:20:19 Hi. I have an Android Gradle project. Is there a sensible way to have it output an image that I can run the point and click way on an emulator? May 17 10:20:33 How can I check my Googe Play Serices version in my sdk folder? May 17 10:20:58 Like, "download the image of the latest build from my CI and launch it on my workstation to see if somebody has added a Clippy reimplementation"? May 17 10:21:24 samB__, open the sdk manager May 17 10:23:23 danijoo: It says 24, but I’m pretty sure I read that I should see a number like 4030530 somwhere unless I’m mistaken? May 17 10:23:40 It does seem a little strange to be that long now that I think about it May 17 10:24:53 cureent version is 7.3 :p May 17 10:25:26 thats revision 24, so yes May 17 10:25:29 everything correct May 17 10:25:31 lol I’m not sure what I’m looking at then May 17 10:25:33 ah cool LD May 17 10:25:35 :D May 17 10:25:47 be sure to set the correct version in your gradle, too May 17 10:25:59 Will do! Thanks for clearing that up danijoo! May 17 10:39:51 http://hire.jobvite.com/CompanyJobs/Careers.aspx?c=q8Z9VfwV&page=Job%20Description&j=oLYtVfwR May 17 10:39:53 seems ez May 17 10:45:53 I have an app consisting of two activities w/fragments: main activity = gridview, detail activity = imageview. On tablet (layout-sw720dp) I have two-pane layout (both shown at same time). But, when there is no data to be shown, I want the detail fragment (imageview) to go away. May 17 10:46:05 not sure how to do this :) May 17 10:46:55 so, the "left side" (main) loads the data in a cursor. If the cursor is empty, I know the "right side" should be removed. That's one approach, maybe May 17 10:48:00 alternatively, if the right side (detail) is started with an "empty URI", I could have the fragment "remove itself". But that's not straightforward, it seems. It can't be done directly within onLoadFinished(), for example... May 17 10:49:19 Btw, the "skeleton" of my code is here: http://bit.ly/1EtPXVM May 17 10:55:35 I would like to modify k-9 mail from github: https://github.com/k9mail/k-9. How do I set "Content-Transfer-Encoding: quoted-printable" to "Content-Transfer-Encoding: 8bit"? in the mails sent with k-9 mail May 17 10:57:42 chili4sale: you find the place in the source where the header is set, and change it May 17 11:02:15 OK, so I can *hide* the DetailFragment "from the MainFragment" (which knows whether there's data in the cursor or not) by doing getActivity().findViewById(R.id.detail_fragment_id).setVisibility(View.GONE); in onLoadFinished() May 17 11:02:19 Leeds: Sorry, I do not find it. May 17 11:03:38 but! then I still have a two-pane UI. The left side reads, "No Media on Device", and the right side is now blank, but what if I'd want the text to be centered across the entire screen width? I.e. can I somehow *remove* the right fragment, essentially collapsing the UI down to single-pane UI? May 17 11:04:00 chili4sale: look harder... May 17 11:04:55 still, this is a nice improvement over having "No Media on Device", along with an empty detail UI (some text views and a button etc) on the right side! May 17 11:07:26 Leeds: Is it in MessageCompose.java? May 17 11:07:43 chili4sale: I have absolutely no idea - you're the one with the source tree in front of you, not me May 17 11:07:59 replace android.R.id.content with your one fragment, then it will use the entire size May 17 11:08:18 Could anyone help me, please? I have no clue. May 17 11:08:38 what's that got to do with android chili4sale May 17 11:09:17 chili4sale: this is not the place to get help with finding your way around other people's code May 17 11:09:18 right click > view source, chili4sale May 17 11:09:24 but still, totally unrelated May 17 11:10:20 Im working on that marquee sample May 17 11:10:30 it's proving to be really challenge to show scrolling text on Android May 17 11:10:59 challenging* May 17 11:11:49 I mean how on earth am I going to figure out how to write this http://pastie.org/10193070 May 17 11:36:31 do admob returns go to my google merchant account? May 17 11:37:10 I get them wired to my bank acc May 17 11:37:15 monthly May 17 11:37:31 where do you set all of this up? I can't find anywhere that tells me what the nature of the relation between Play and Admob is like May 17 11:38:16 ok Payments maybe May 17 11:38:20 but still! May 17 11:38:36 its part of play service May 17 11:38:42 but beside that, theres no relation May 17 11:38:57 you have an independent account with independent payment settings May 17 11:40:03 what's the payment threshold you set May 17 11:41:02 if the threshold is not met in a month, you dont get a payment and it will get carried over to next month May 17 11:41:02 ah this is like dont send me unless it's at least $x May 17 11:41:08 cause not worth it May 17 11:41:22 ok, and you dont get to tell them where to send the money to until you get at least $10 earnings May 17 11:41:38 this must be new May 17 11:41:52 cause payment method is still None Selected May 17 11:42:00 well they tell you what I told you May 17 11:42:21 so you give them your IBAN? May 17 11:42:31 yup May 17 11:42:43 how much do you make? and where have you placed the ads? May 17 11:43:18 enough and banner + interstitials May 17 11:43:31 interstitials? but they are so annoying.. May 17 11:43:33 but i dont use only admob May 17 11:43:47 im using like 4 adnetworks May 17 11:43:52 for 1 app? May 17 11:43:55 and always serve ads for the one thats paying the best May 17 11:43:56 yes May 17 11:44:10 how many ads are displayed when using the app? May 17 11:44:35 depends on the app May 17 11:44:43 this app you're talking about May 17 11:44:48 if I use it for 5 minutes how many will I see May 17 11:45:00 a banner all the time May 17 11:45:22 interstitial at startup (not always) May 17 11:45:38 what is this app can you link me? May 17 11:46:10 https://play.google.com/store/apps/details?id=com.lolsummoners&hl=de May 17 11:47:18 good app bitch! May 17 11:47:20 :D May 17 11:47:25 looks polished May 17 11:47:33 thanks :) May 17 11:47:57 is there a paid version? May 17 11:48:08 you can remove ads via iab May 17 11:48:35 the owner of league of legends doesnt allow making money with payed verion. only ads May 17 11:48:44 so its a "donate" ;) May 17 11:48:48 I see May 17 11:49:04 so when you see in the AdNetwork XYZ console that you are making more money than you see in the AdMob console May 17 11:49:20 you remove the code for admob and keep AdNetwork XYZ code and push a release? May 17 11:50:04 no. im using mopub. you can include their sdk and add multiple ad networks there. They automatically select the one giving you the best revenue and check that for each single ad showing May 17 11:50:28 I see May 17 11:50:32 let me check May 17 11:51:12 right now im serving about 50% direcly from mopub, 25% admob and 25% chartboost for that particular app May 17 11:52:15 for interstitials its less from admob because they somehow decided im not worth the money one day May 17 11:52:29 my eCPM dropped from 1,3$ to 0,3$ in 2 days May 17 11:52:29 you see all of those numbers from mopub itself? you have not added any admob code? May 17 11:52:34 no idea why May 17 11:53:04 Odaym, you still have to ad admob sdk to your apk, but the rest is handled by mopub May 17 11:53:25 great, but who handles how the banner in XML will look like May 17 11:53:31 you can then add your admob key in mopub terminal and they start serving admob ads May 17 11:53:33 thats mopub May 17 11:53:54 you set a mopub adview like you would do for admob May 17 11:54:01 ok great May 17 11:54:04 and this one then displays a mopub ad or a whatever ad May 17 11:54:10 so the more SDK's you add, the more they use them for different networks May 17 11:54:34 yeah. May 17 11:54:56 its kinda like a middleman cherrypicking the best ads for you May 17 11:56:09 best thing is that you dont depend on one ad hoster. if admob decides to ban you, you wont lose 100% revenue May 17 11:57:38 yes it's certainly tempting, Im signing up to set it up May 17 12:05:11 SO down? May 17 12:05:37 :o May 17 12:05:59 just wanted to ask the same May 17 12:06:41 time to change careers May 17 12:07:41 I wonder how many devs are panicing worldwide right now ^^ May 17 12:11:38 lol I seriously can't continue.. May 17 12:11:42 haha May 17 12:12:16 google cache? May 17 12:12:42 anyone know how to add a dependency that only gets included for a specific flavour? May 17 12:12:59 i tried flavornameCompile "...." but it doesnt work May 17 12:13:14 SO is up again May 17 12:15:38 jesus does listen May 17 12:21:40 http://www.anotherandroidblog.com/2011/05/26/custom-composite-android-component/ is this still current with API >= 16 ? especially using onFinishedInflate() ? May 17 12:24:47 i think so May 17 12:25:17 the value "0dp" on line 3 is marked as suspicious. What am I doing wrong? https://gist.github.com/anonymous/7854c896ccdb54dacb08 May 17 12:25:20 Hey guys. Did someone ever have issues with Logcat not logging inside of a service? May 17 12:26:19 ExeciN, whats the parent of scrollview? May 17 12:26:34 danijoo: LinearLayout May 17 12:26:52 Is the LinearLayout vertical? May 17 12:27:05 Kryil-: Nope May 17 12:27:22 SimonVT: yes May 17 12:27:31 Kryil-, maybe your logcat filters it out May 17 12:27:33 Then there's nothing suspicious about it May 17 12:27:36 (or its not running :p ) May 17 12:27:36 SimonVT: I have a service and I can bind to it, it works. However, even logging in onBind shows nothing May 17 12:28:04 danijoo: Unless I'm stupid unlikely. Even without a filter a Log.d is shown directly in front of my binding call, but a Log.d is not shown in onBind May 17 12:28:28 Kryil-, have you tried adb logcat? May 17 12:29:01 danijoo: no, I've only used it from Android Studi May 17 12:29:02 *o May 17 12:29:04 oops I forgot to set the orientation of the linear layout to vertical May 17 12:29:06 bbl May 17 12:29:36 Kryil-, do it May 17 12:32:20 Make sure you're not filtering, and make sure logcat isn't stuck in AS May 17 12:32:22 That happens sometimes May 17 12:33:33 what methods do I need to write in my custom View class so its instance can be added to a layout calling .addView() ? May 17 12:34:36 All views can be added with addView, you don't have to do anything special May 17 12:35:09 does it require my class extends some View ? May 17 12:35:35 For it to be a view, it needs to extend View, yes May 17 12:35:39 Or any subclass of View May 17 12:36:06 sure, so what's so special about a View that it becomes visible :) May 17 12:36:47 Okay I was stupid, the default application filter removed the logs because the service runs in it's own thread :( thanks May 17 12:38:28 Kryil-, thats what i meant ;) May 17 12:43:47 can somebody tell me why this gives me a Gradle DSL method not found: googleplayCompile() ? http://pastebin.com/Dh1batDe May 17 12:46:37 <_rm> danijoo: amazon works though? May 17 12:46:38 danijoo, don't you need a gradle plugin that provides that method? May 17 12:47:01 _rm, no. It fails on every flavorCompile May 17 12:47:27 saapas, i dont think flavors need an extra plugin, do they? May 17 12:48:12 well, if gradle allows calling flavor-based compiling then I suppose they don't :) May 17 12:48:37 saapas, from the docs, it does and my syntax should be correct May 17 12:48:58 <_rm> danijoo: i have a project with a similar config, and as far as i can tell, yours should work too May 17 12:48:59 I could use that too. May 17 12:51:43 strange :/ May 17 12:51:54 seems like its time to clean my scripts first May 17 12:51:58 they are a mess anyway May 17 13:00:54 hey guys i've been trying to draw rectangle using onTouch motionEvent http://pastebin.com/n3MaMBRU i've been able to do some free drawing but with rectangle i just don't anything on the screen May 17 13:03:31 oh who thats weird May 17 13:03:45 hi, how can i overwrite the existing image and replace it with new camera image May 17 13:04:15 is the gradle build script order depndent? I just changed oder of android{} and dependencies{} and now it compiles May 17 13:04:44 seems like it doesnt "knew" about the flavor in dependencies when dependencies block is before android{} block May 17 13:06:16 hert, it's because startX and startY above your switch May 17 13:06:56 hert, comment them (the ones above your switch) and keep the ones in ACTION_DOWN May 17 13:07:19 when ACTION_MOVE is triggered, because the ones above the switch, your rectangle is flat May 17 13:07:32 instead of taking startX and startY _only_ from ACTION_DOWN May 17 13:07:57 you might also need to clear your canvas or draw a background color before redrawing too May 17 13:08:08 but you will see that later on May 17 13:09:35 another hint, is don't call draw stuff inside ontouchevent, but instead just update some variables (could be attributes/members) which will be used in onDraw instead May 17 13:21:45 adq, i commented the one above switch as you suggested and it worked but i had to keep the draw call inside ACTION_UP otherwise i can only draw left to right and everytime i start a new drawing the other on disappear May 17 13:37:37 danijoo May 17 13:38:32 did you start off with LolSummoner in mopub or did you have just 1 ad network in the beginning? May 17 13:40:55 also this Headlezz Dev thing, is this just you? May 17 13:49:10 hi guys, how to connect to SQL Server database with android? May 17 13:49:27 all the data info reside on SQL server May 17 13:49:38 can someone point me to the correct path here? May 17 13:50:11 https://www.youtube.com/watch?v=XiCm6jUQKCA May 17 13:52:12 does now show shlt May 17 13:52:18 ittia.com? May 17 13:52:25 only do the talking May 17 13:52:39 look for yourself May 17 13:52:45 just showing you how easy it is to google May 17 13:53:35 SimonVT can you help me with this? I'm implementing a LayoutAnimation to the listview that shows up on app startup, the animation is here http://pastie.org/10193218 and I apply the animation to the listview inside onCreate like this http://pastie.org/10193225 May 17 13:54:57 the thing is, upon starting the app the animation appears in its entirety, the items start off small and increase and the whole overshoot effect happens. Now when I go back and leave the app and start it again, the animation appears to have started from the beginning and you dont get the chance to see the items "being born" from way back May 17 13:56:30 oh and this is the content of the list_layout_controller, I don't understand what delay does in this file May 17 13:57:39 Odaym, bad link you give, i rather use web service May 17 13:57:43 with nicer example code May 17 13:58:03 then look for yourself May 17 13:58:03 i hate something guide as do the talk May 17 13:58:13 Odaym, I started with admob and switched when admob eCPM dropped May 17 13:58:34 and yeah. thats just a fancy name for being me :p May 17 13:58:42 and what number app is this? May 17 13:59:02 Headlezz was the captcha when I created my dev account ^^ May 17 13:59:23 the first, and im working on #3 right now May 17 13:59:51 at least published ones May 17 14:00:21 alright May 17 14:00:29 do you know anything about the question above? May 17 14:00:30 I feel spied lol May 17 14:00:43 nah I just like to ask from those who have tried before May 17 14:00:50 first time I try ads May 17 14:01:35 I always copy/pasta animation sorrty :P May 17 14:01:43 well of course May 17 14:01:46 but that isnt the issue May 17 14:01:59 you start it after an onDestroy, it runs fine May 17 14:02:24 you start it after an onPause, it jumps as if you missed the beginning part May 17 14:02:55 onCreate is not called after onPause May 17 14:03:15 sure it is, if onResumed :P May 17 14:03:25 nah man I mean you go back from the app May 17 14:03:27 you're out May 17 14:03:35 enter again, fails May 17 14:03:36 ah ok. so it gets destroyed May 17 14:03:38 mh May 17 14:03:47 no idea sorry May 17 14:03:48 kill the app, start it, you get a fresh animation from start to finish May 17 14:03:54 yup May 17 14:03:58 that should be the case May 17 14:04:14 hm? May 17 14:04:32 I think you're right May 17 14:04:34 things that make you go hmm May 17 14:04:58 otherwise it would feel like everything is being born all over again May 17 14:05:18 I think this is a behavior by accident in this case though May 17 14:08:29 it's that delay field in the layout controller xml May 17 14:09:06 for those just joining the channel, what was your question again? May 17 14:12:07 I can't seem to create a pastie if there's a pastie link inside it May 17 14:12:08 lol May 17 14:12:56 here you go http://pastebin.com/iLfAWQLK May 17 14:15:21 canvs2321, I've a question, too :D May 17 14:16:11 good, axe it May 17 14:17:20 lol May 17 14:17:24 Odaym, what do you mean by leave app and come back, as in back pressed to home and restarted, or killed from recents and started? May 17 14:17:42 killed from recents and restarted produced full animation May 17 14:17:45 or press home or start other app and not killed May 17 14:18:03 back pressed to home and restarted runs the animation too quickly and it appears like it started too early for you to see May 17 14:18:04 Seems like you are getting expected results if starting anew May 17 14:18:09 yes May 17 14:18:15 after a run, after killing it May 17 14:18:28 whatever the animation Ive set is, it plays out as it should May 17 14:18:30 have you tested multiple devices? May 17 14:18:34 not yet May 17 14:18:54 so after first run, animation looks good, but upon killing and restarting it's too fast? May 17 14:19:05 upon going back and restarting it its too fast May 17 14:19:16 ahh, hmm that's a tricky one May 17 14:19:33 what is setting the FPS May 17 14:19:54 dont know what you mean? May 17 14:20:07 animation length = Xms May 17 14:20:50 best guess would be to test other devices to start May 17 14:20:59 and then see what May 17 14:21:07 next would be to log the FPS(frame per second) of the animation May 17 14:21:07 what would I benefit May 17 14:21:26 if too fast, could be loosing frames May 17 14:21:40 why would it? first run it didnt May 17 14:21:45 im pretty sure the answer is in the xml of the animation May 17 14:21:46 canvs2321, I've created a widget joining tiw imageviews and a button. now widget it's created and i can drag into homescreen, but sizes are not correct. i've created a layout .xl file to define it , with margins and paddings in a relative layout, but I've got trouble with dp values May 17 14:22:01 Odaym, then if you have the answer you know it May 17 14:22:12 I have what isn't the answer May 17 14:22:14 lol May 17 14:22:38 Odaym i'm just saying you are being negative towards any advice as if you know something May 17 14:22:44 test test test May 17 14:23:16 test that the process is actually killed, test everything May 17 14:23:43 cristian_c, i'm not sure what you are asking May 17 14:23:58 show a screen shot if layout issues and post xml May 17 14:24:18 canvs2321, I post a screenshot May 17 14:24:39 shhh Cedric is here now, we can't bad mouth him anymore May 17 14:24:57 canvs2321, http://imagebin.ca/v/21upPhp0ew6w May 17 14:25:15 I should adjust geometry May 17 14:25:28 what is wrong with the layout? May 17 14:25:41 but it's difficult calculate May 17 14:25:42 the usb icon looks alittle low May 17 14:25:55 canvs2321, the light indicator is too high May 17 14:25:59 but that could be cause the bottom grey May 17 14:26:03 the button seems too large May 17 14:26:39 widgets are a fixed size no? May 17 14:26:52 canvs2321, yeah, the icon seems shifted compared the know android widgets (wifi, bt, etc...) May 17 14:27:10 or atleast homescreen widgets May 17 14:27:21 canvs2321, no, it's resizable (horizontal|vertical) May 17 14:27:34 (40,40)dp May 17 14:27:43 minheight, minwidth May 17 14:27:54 if anything need to adjust the wifi icon to respect the bottom highligh May 17 14:27:55 t May 17 14:28:37 canvs2321, I should make the widget similar to other android widgets May 17 14:29:10 is this going on the homescreen or in the system drawer dropdown? May 17 14:29:20 canvs2321, I think issue is related to padding and margin parameters, but it's diffult figure out how to fix May 17 14:29:30 i can pastebin layout xl file May 17 14:29:30 post your layout then May 17 14:29:35 someone can help May 17 14:29:39 ok May 17 14:29:40 xMl May 17 14:30:12 canvs2321, I can drag the widget from drawer to homescreen (screenshot is related to homescreen) May 17 14:31:00 k i get that, my question is more related to you wanting it similar to other android widgets. there is fragmentation between releases, what do you mean? May 17 14:31:23 even more fragmentation with different launchers May 17 14:31:30 canvs2321, http://pastebin.com/yPZ85vZ8 May 17 14:31:37 canvs2321, i'm using android 17 May 17 14:31:51 I think i'm using stock launcher May 17 14:32:03 first off, all X.Xdp is weird :) May 17 14:32:15 canvs2321, http://imagebin.ca/v/21uqLmJusDGp May 17 14:32:27 canvs2321, yes, it's the first try :D May 17 14:32:34 ahh that makes more sense, you need a smaller highlight May 17 14:32:40 I know it's weird, so I'd like to fix May 17 14:32:45 make the bottom like 2dp or 1dp May 17 14:32:56 yours is more 4-8dp May 17 14:33:29 canvs2321, now, i've fixed tint from #777777 to #666666 May 17 14:33:38 no, fix size of that bottom grey May 17 14:33:40 it's too big May 17 14:33:45 set to 1-2dp May 17 14:33:47 but fixing geometry is more diffiult May 17 14:33:50 not 4-8dp May 17 14:33:52 *difficult May 17 14:34:08 canvs2321, yes, I''ve said it's too big, you are right May 17 14:34:14 so change it :) May 17 14:34:25 set to 1-2dp <-- ok , thanks for the tip :) May 17 14:34:31 canvs2321, i try May 17 14:34:34 thanks again May 17 14:34:47 your android:id="@+id/widget_bottom" May 17 14:34:53 change that from 10 to 2 May 17 14:35:03 ok May 17 14:35:11 cristian_c, isn't big good? May 17 14:35:13 and remove float point May 17 14:35:21 Hulio, only in Texas May 17 14:35:30 Hulio, it's ugly as widget May 17 14:35:38 haha May 17 14:35:43 i was thinking nasty May 17 14:35:46 but it's my first time ;) May 17 14:35:46 sorry mam May 17 14:35:50 it's just a joke May 17 14:35:56 too big is painful May 17 14:36:17 cristian_c, guys usually have thirty mind May 17 14:36:25 i need forty minds May 17 14:36:35 damn can't spell May 17 14:36:38 fourty May 17 14:37:02 cristian_c set the height to small for the bottom grey and you've got it May 17 14:37:05 i am out da here. going to wash my car May 17 14:37:09 and vocal it May 17 14:37:13 canvs2321, ok May 17 14:37:14 vacuum it May 17 14:37:25 have a dead body in it recently? May 17 14:38:18 and cristian_c why the need for 10.0 8.0 7.0 etc...remove all those X.0s May 17 14:38:35 and fill_parent replace with match_parent May 17 14:38:44 and dip to dp May 17 14:39:30 guess isn't hurting anything with what you have, but should update May 17 14:39:30 canvs2321, ok, i'll remove all the parameters with .0 values May 17 14:39:46 :) May 17 14:39:57 the exact opposite happens on S3 May 17 14:40:12 it bursts into flames? May 17 14:40:23 when first starting, takes time and then rushes it May 17 14:40:30 every other time after that, runs smoothly May 17 14:40:34 animations are tricky May 17 14:40:48 gotta find a way to find a good timing mechanism May 17 14:40:59 canvs2321, hmmm, http://stackoverflow.com/questions/7608251/is-dp-the-same-as-dip May 17 14:41:14 cristian_c, it is the same, but no one uses dip May 17 14:41:16 ' May 17 14:41:16 The compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".' May 17 14:41:18 just use dp May 17 14:41:21 ok May 17 14:41:27 and sp is different than dp May 17 14:41:32 it's more for text May 17 14:42:10 canvs2321, all fill_parent replaced with match_parent? Either only someones? May 17 14:42:33 cristian_c, just seems you are following older, like 2010 tutorials, with those meanings May 17 14:42:46 remove fill_parent and use match_parent May 17 14:42:56 canvs2321, yeah, I've googled very much to get info May 17 14:43:00 fill_parent is like cupcake code May 17 14:43:03 icycles May 17 14:43:10 ah, ok, it's obsolete, I remeber :D May 17 14:43:19 :) May 17 14:43:32 the current possible modes are: 'match parent and wrap content' May 17 14:43:40 yep May 17 14:43:41 *only May 17 14:43:50 or setting a size in dp May 17 14:44:09 match_parent, wrap_content, 200dp May 17 14:44:25 or even weights if linear layout May 17 14:44:45 ok, I understand May 17 14:45:27 hmmm, first I try with relative, if unsuccessful, I change to linear May 17 14:45:27 :) May 17 14:45:37 canvs2321, thanks for all the tips May 17 14:46:43 fo sho :) May 17 14:48:26 you did a good job matching the other widgets though i'll give ya that, just had to set a smaller height for the bottom highlight May 17 14:52:11 ok, thanks May 17 14:52:52 I need some kind of a global variable that I can use between my activities. Should I just make a public static variable on the main activity of my app? May 17 14:53:44 Execin, for what purpose? May 17 14:53:59 there are many methods/ways to do it, just gotta find the one for you May 17 14:54:47 canvs2321: I authenticate with my server and the server issues me a token. I must use that token for every interaction with my server. May 17 14:56:10 I want to be able to use that token from almost every activity that I have May 17 14:56:50 if the token isn't a security issue can use SharedPreferences, or a service. There are many possibilites, what have you tried that you don't like? May 17 14:57:11 can use a single activity with fragments too,and supply the token to your fragments May 17 14:57:20 but many many ways to do what you want May 17 14:58:05 some ppl use Singletons,but i'm not well versed in that, but that maybe an option for ya May 17 15:05:07 Hey May 17 15:05:27 nou May 17 15:05:43 Cool May 17 15:05:57 Test out my new irc May 17 15:06:15 client or server May 17 15:06:39 Client I download May 17 15:06:56 oh you are testing out, or you wanted others to test yours out? May 17 15:07:00 For iPad May 17 15:07:08 So May 17 15:07:12 Sorry May 17 15:07:29 I was thinking of make one for android. May 17 15:07:44 pfn probably has pointers May 17 15:08:39 An IRC client is a pretty fun project. May 17 15:09:24 ping,pong May 17 15:11:32 tick,tock May 17 15:11:40 lies! May 17 15:11:56 Yes it would be. May 17 15:12:19 Yeah May 17 15:12:27 does seem like it would be pretty fun May 17 15:12:49 tick........no tock !kill May 17 15:12:56 Yes not sure how hard would be. May 17 15:13:26 It I made one it have to sail support. May 17 15:13:32 Saul May 17 15:13:49 got lawyers in it, back away.... May 17 15:14:06 What you mean. May 17 15:14:13 gotta call Saul May 17 15:14:40 Methheads know what's up May 17 15:14:46 I mean I need Sasl support in it to work. May 17 15:15:29 Makes sense May 17 15:15:35 "it's all good man" May 17 15:15:49 (the pun in Saul Goodman ) May 17 15:15:55 :) May 17 15:16:34 I didn't know you guys would help test thing out. May 17 15:16:52 it's more like help breaking bad things May 17 15:17:06 I see May 17 15:17:30 i'll stop with the breaking bad references now :) May 17 15:17:49 this place is made for testing cool stuff May 17 15:18:12 As long as you are Breaking your Bad habits, then, go ahead May 17 15:18:26 Only nexus 6 I use for my testing.Got a lot to learn May 17 15:18:44 having a physical device is a great start May 17 15:18:56 Yep May 17 15:19:16 I got iPad 2 over nexus 9 May 17 15:19:23 /quit May 17 15:19:28 :P May 17 15:19:44 hello all! I have a problem with my THL 5000 Android 4.4 KitKat device's Play Store, it is crashing now instantly on its start, here is a logcat (warning and higher loglevel only): http://paste2.org/W1cWJVHH - can someone tell me what to do? May 17 15:20:09 I really like the nexus 6 May 17 15:20:10 Anyone in here have experience building the AOSP? May 17 15:20:23 I'm in #android-root but it is pretty dead May 17 15:20:38 antivirtel, that's like over 9000 lines May 17 15:21:12 JokerDoom, just gotta wait it out there May 17 15:21:22 this place is for App Dev May 17 15:21:31 yes it is canvs2321 - Ctrl+F, and vending will be ok May 17 15:21:57 free vending? May 17 15:22:19 Canvs2321,when I get my project done I let you know. May 17 15:22:23 antivirtel, is your device rooted? May 17 15:22:34 yes it is canvs2321 May 17 15:22:43 perlsyntax, sounds good to me, doesn't even have to be done, just usable :) May 17 15:23:02 antivirtel, is your device a custom ROM? May 17 15:23:19 no, it is just the stock canvs2321 May 17 15:23:26 stock rooted? May 17 15:23:29 sure May 17 15:23:41 sure means, other things may be in play May 17 15:23:44 canvs2321, thanks, I'm going to try on the mailing list too, after I finish reading the rules May 17 15:23:49 Thanks. May 17 15:24:13 What this new tool android coming out with. May 17 15:24:31 antivirtel, main thing this isn't the room for this, and you need to figure out what you did to cause this if rooted May 17 15:24:35 canvs2321 what you mean "in"? I've tried to download a fresh vending apk & install LuckyPatcher's things... but didn't help with or without LP's things May 17 15:24:43 perlsyntax, u tell me what new tool May 17 15:25:08 antivirtel, exactly you are doing experimental stuff, don't come here with that May 17 15:25:14 Then android a/b for Google ISO I been reading about. May 17 15:25:25 I ran Google I/o May 17 15:25:32 not sure, g00s probably knows May 17 15:25:45 I been reading about it. May 17 15:26:08 g00s is a news junky,he'll chime in May 17 15:26:12 no, it is not experimental canvs2321 - the stock Play didn't work well: I couldn't report other user apps' crashes, since the Play crashed instantly when I tapped: "Report" instead of force close May 17 15:26:38 antivirtel, what app are you doing? May 17 15:28:14 just helping in development canvs2321, not my projects: TransDrone, AndroIRC, Kore... etc... May 17 15:35:20 Be back latter cavs2321. May 17 15:48:37 why I can't access the "getTextColor()" here -> https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/TextView.java line is 8235 May 17 15:49:11 oh no wrong! May 17 15:49:20 Hello everyone, I hope that y'all having a great day. I have a question, I set my TextView's color to #99000000 ( black, 60% transparent ) and for some reason, on my real-world device, it shows up as complete black text with white outlining. I even specified in code that the outlining had to be either nill, or #99000000. Did i miss something in the docs? If so, could anybody send me on my way? Kindly appreciated! May 17 15:50:21 I could provide screenshots from my editor && device if needed. May 17 15:50:49 screenshots and code are always welcomed May 17 15:51:05 Sure thing my friend, give me one moment! May 17 15:54:08 This is from the editor itself : http://gyazo.com/8db748106ef33eac408c2a17e66c2185. This on the other hand, is from my device. As you can see, the text appearance doesn't match. If so, it's me being colorblind or some. : http://i.imgur.com/8y6z0Y7.jpg May 17 15:55:13 As for the code, pretty much #99/A4000000. May 17 15:55:22 all i'm working with May 17 15:55:51 "Remember Me", "Forgot your password?", and "Sign up now!" look more or less black to me. I'm not seeing a white outline. However, the image quality is low and it's hard to tell. May 17 15:56:32 The first screenshot is how it's supposed to look, the second one is how it's looking like May 17 15:56:45 let me try to get a bigger screenshot May 17 15:57:03 Oh, I didn't see the second. May 17 15:57:12 oh okay May 17 15:57:58 http://gyazo.com/77c3f848308f5e49cf2c7a977867efe7 , redid the first screenshot. This is mainly about the Remember me and the Forgot your password?/Sign up now text May 17 15:59:51 I think we'll need to see the code. May 17 16:00:23 sure thing, one second May 17 16:01:26 http://gyazo.com/50a0875b54353a4c95734158d4cbca61 , the XML code May 17 16:01:50 hi, could anyone please help me with correct proguard usage here, http://pastebin.com/js64GGYn May 17 16:10:14 canvs2321 seems to be solved with the today's version: http://www.androidapksfree.com/apk/google-play-store-apk-latest-version-download/ - I didn't notice, that there were an upgrade :O May 17 16:10:27 thanks anywas! May 17 16:10:31 *anyway May 17 16:11:12 android-dev159: I have no idea. I've never seen anything like it. I can only advise creating a new project, declaring a simple TextView in XML, and applying this colour to the TextView in order to see whether the issue happens there. May 17 16:11:14 I am looking at this http://developer.android.com/training/basics/data-storage/shared-preferences.html Where is the getActivity() method coming from? Do I have to import something? May 17 16:12:11 ExeciN: "For example, the following code is executed inside a Fragment." May 17 16:12:23 It's arbitrary that they're talking about being in a Fragment. May 17 16:12:56 yeah but it says below "Alternatively, if you need just one shared preference file for your activity, you can use the getPreferences() method:" May 17 16:13:42 ExeciN, and if you click on the blue "getPreferences()" text May 17 16:13:51 it'll take you to documentation telling you where that method is available May 17 16:15:08 thanks dudee May 17 16:15:17 gonna try it ouit May 17 16:21:22 Activity.getPreferences is a bad idea, IMO. May 17 16:21:45 There's just no reason to couple a preferences-file name with the current name of an activity. May 17 16:22:33 Much better is Context.getSharedPreferences. May 17 16:37:55 or PreferenceManager.getDefaultSharedPreferences May 17 16:51:18 How can I debug why take(3) seems to not have any effect in an Observable chain? May 17 16:51:29 6 go in, and 6 come out May 17 16:51:32 it seems May 17 16:54:11 yiati: You can break in the operator May 17 16:58:23 CedricBeust_: None of the chain is actually kicked off until the Observable is subscribed to right? May 17 16:58:38 yiati: Usually, yes May 17 16:59:22 Okay I guess I would need to start putting break points somewhere in the onNext of the subscription then? May 17 16:59:46 Put it before, see what take() receives and what it returns May 17 17:06:55 yiati, remember that operators tend to return new observables May 17 17:07:07 maybe you're reusing one? May 17 17:08:36 is there some issue with Xiaomi Miui devices? Strict permission and behaves differently? May 17 17:09:08 Whatsapp works fine, runs in background and MIUI does nto kill it.. but my app is killed like cheap app May 17 17:11:04 Mavrik: I did check in onNext() to make sure that the 6 items I'm seeing are all in one call to onNext(), is that what you mean? May 17 17:16:11 CedricBeust_: So digging in it looks like lift is where I should be looking for stuff to debug May 17 17:16:29 It's a good starting point, yes May 17 17:16:37 but the operator is really the implementation May 17 17:16:45 you're going to hit lift() a lot May 17 17:21:15 CedricBeust_: Ah found it digging into OperatorTake's onNext call from take(). onNext() takes in an arraylist of size 6, but the if (++count >= limit) check to actually filter is short circuiting because count apparently equals 0 May 17 17:22:16 err I guess count = 0 is right, but limit = 1 May 17 17:22:32 Not sure I follow but I suppose I can't without actually seeing your code May 17 17:24:04 Yeah it's fine, I'm just talking out loud, seems like I'm about to figure it out May 17 17:24:11 Cool May 17 17:26:47 Ah it seems I'm interpreting the input to take wrong, a List of items is 1, so it's taking up to 3 lists, rather than 3 items per list May 17 17:28:25 I was using map with a Func1 returning Func1, > May 17 17:28:32 right before the take May 17 17:28:52 Func1, List> * May 17 17:33:19 I have service which listens for BOOT Complete and POWER conencted.. it works fine after rebooting device (Nexus 7) without even launching app. On Xiaomi MIUI based device, it does not work at all May 17 17:33:48 is there something I should take care of device wise? May 17 17:34:51 apps must be launched at least once after installing in order for manifest receivers to worj May 17 17:35:28 on MIUI device, I did that. I launched, relaunched.. and rebooted multi times. Still not happening May 17 17:36:30 I also noticed Whatsapp icon has a lock on miui/xiomi device.. which prevents it from being killed. What I am trying to achieve same as whatsapp for background job. And thats is working for me in Nexus not MiUi May 17 17:38:32 read miui docs then May 17 17:39:12 yiati, probably should flatMap instead May 17 17:39:19 yiati, of mapping into a list May 17 17:40:33 flatMap thing -> observable.from(list(things)) May 17 17:41:46 CedricBeust_: pfn: Nice, thanks I figured it out. That's what I ended up doing but with concatMap pfn May 17 17:43:05 SwitchPreference sometimes throws NPE on 4.1.2 only - marvellous bug May 17 17:43:35 My problem was that I was doing thing -> observable.from(list(things)).toList May 17 17:43:49 icedp lol, because its marvelous software May 17 17:44:54 now i'm curious about Samsung updates and IncompatibleClassChangeError May 17 17:45:10 moved to CheckBoxPreference. bug fixed. I hope. May 17 17:46:00 icedp i remember nillum saying something like, if you had multiple switch preferences they would all change to same value ? May 17 18:13:19 Has anyone implemented a lazy loading/"load more" feature in a recyclerview? I've been trying SuperRecyclerView and UltimateRecyclerView, but I'm having some problems and am thinking about just trying to a normal RecyclerView instead... May 17 18:15:34 g00s: idk. have(d) only one May 17 18:27:49 t0astt: Any reason you're thinking of using something other than ordinary RecyclerView? Just curiuos. (I haven't done this in RecyclerView but I've done it in Listview.) May 17 18:27:53 curious* May 17 18:31:03 TacticalJoke + g00s + pfn + whoever seemed interested, I can't really remember at the moment: static init "bug" is reported, link for your starring pleasure: https://code.google.com/p/android/issues/detail?id=173804 May 17 18:31:11 Ah, thanks. May 17 18:33:16 Also JesusFreke. :D May 17 18:34:43 ah, true :) May 17 18:34:59 now I've got a thing to clean up so I can stick it up on github too, and then back to KSP :] May 17 18:36:37 ksp? May 17 18:37:20 http://kerbalspaceprogram.com/ May 17 18:38:31 Is that a computer game for nerds? May 17 18:38:52 I used to love online gaming. Haven't played a game in forever. ;o May 17 18:39:20 never seen it? May 17 18:40:08 Watching YouTube videos and trying to place it into a box. May 17 18:40:34 "flight sim in space" + "goat simulator" May 17 18:42:17 e.g. you can do crazy crap like "fly wings up to an asteroid, and land it" https://www.youtube.com/watch?v=WXzMDkKhO5g (brilliant name) May 17 18:42:29 TacticalJoke, incase you were wondering too, http://stackoverflow.com/questions/30289247/android-colors-dont-work-on-my-physical-device?noredirect=1#comment48676351_30289247 May 17 18:42:51 TacticalJoke: bah, missed the time on the link. https://youtu.be/WXzMDkKhO5g?t=3353 May 17 18:43:23 TacticalJoke: The SuperRecyclerView and UltimateRecyclerView have the "load more" functionality built in, I'm just having trouble working with it May 17 18:44:24 android-dev159: wow, that must've been infuriating to track down May 17 18:44:33 android-dev159: Ah, damn. May 17 18:45:05 Looks interesting, groxx. May 17 18:45:58 TacticalJoke: the demo (from the site, NOT steam, steam's is ancient) is pretty representative, though it might be less buggy :) it finally broke out of pre-release lately, so I assume the buggy part will be decreasing over time. May 17 18:46:32 groxx, it drove me nuts, simply turned different options on and off and hoped for the best. The ones that mainly had "something" to do with the way that we see stuff on our device. Higher contrast being one of them May 17 18:47:15 * groxx plots to do this to a few designery-type's phones May 17 18:47:33 LOL May 17 18:50:57 A good thing about this channel is that you encounter some weird edge-case stuff. If someone else has groxx's multithreading issue or android-dev159's text issue, we can be like "Yeah, the cause is " and seem like wizards. May 17 18:51:23 ikr? collaborative wizerd-making at its finest May 17 18:51:30 :D May 17 18:53:08 hahaha May 17 18:53:48 This thread was quite good: . The ratio of Kotlin references to anything-else references was also pleasantly high. May 17 18:54:47 Some guy got destroyed by downvotes merely for saying it'd be cool if they resurrected ADT. May 17 18:59:52 TacticalJoke: that's the thing with social networks. Same thing can be right or wrong depending where you said it. May 17 19:00:17 I find that a big problem with aggregated news. May 17 19:06:32 TacticalJoke, i would ask to consolidate "things" (code, doc, tools, whatever) instead of doing the contrary May 17 19:07:06 it's not necessarily conflicting with adding new features (or changing them) May 17 19:09:13 how about: can haz documentation converted to a wiki? May 17 19:09:45 I'm pretty sure devs would be willing to fix their gaps (that go un-documented for years) _if it weren't such a pain in the ass_ May 17 19:10:48 I like that idea. May 17 19:12:06 can I set some value in gradle (properties) and access inside my project java code? That properties will be build specific? May 17 19:12:37 Otherwize, the option I have in mind is maintaining a Constants.java and change with release building May 17 19:13:31 is it just release/debug? May 17 19:13:55 you meant just two flags? May 17 19:14:00 yes May 17 19:14:11 yes that will work too. I will define changes inside my app based on these flags May 17 19:14:15 if so you just could check BuildConfig.DEBUG May 17 19:14:17 use flavor for that May 17 19:15:15 ok May 17 19:15:25 ra21vi: related: http://stackoverflow.com/questions/21159484/override-resources-with-gradle-depending-on-buildtype May 17 19:15:37 icedp: but in my build.gradle, there is no specified DEBUG or RELEASE May 17 19:16:12 thana: JesusFreke May 17 19:16:41 ra21vi: that boolean will be set automatically depending on your build type in gradle May 17 19:18:27 icedp: oh .. thanks May 17 19:19:38 adq: reading flavor in build (docs)... it seems little complex for me. :) thanks anyway May 17 19:23:56 Is there a intent called on camera enabled disabled? May 17 19:26:32 hi guys May 17 19:28:07 hai May 17 19:29:21 developer.android.com/reference/android/content/Intent.html all system intent are here May 17 19:29:50 yoavst: ^ so seems there is just one camera intent May 17 19:29:57 sorry no intent, I mean is there a broadcast being called on camera open/close? May 17 19:30:27 sendBroadcast(intent) that is May 17 19:30:31 so you need to have an intent May 17 19:31:05 icedp: I mean if android os is broadcasting a broadcast May 17 19:32:15 anyone program app to work with SQL Server , read/write? May 17 19:32:26 i meant select/update/insert? May 17 19:32:33 yoavst: it broadcasts intent and you subscribe to intents May 17 19:33:12 yoavst: to subscribe to something you need to know an intent May 17 19:33:12 icedp: So you didn't understand me. Does Android OS broadcast an intent on each camera.open and camera.close May 17 19:33:30 youngnico: I didn't undestand you May 17 19:33:32 yoavst: ^ May 17 19:33:42 as I said there seems to be only one camera intent May 17 19:33:55 icedp: On camera button pressed May 17 19:33:59 yes May 17 19:34:13 but I ask if when someone do Camera.open() an intent is being called May 17 19:35:13 if it would it would the on the list May 17 19:35:26 there are some hidden intents ;) May 17 19:35:51 like com.android.camera.NEW_PICTURE May 17 19:36:44 maybe camera2.CameraManager.registerAvailabilityCallback May 17 19:37:10 "A new camera has become available to use." May 17 19:37:50 Could someone please help me fix my CheckBoxPreference colors so they aren't ugly on kitkat? https://i.imgur.com/AIjYO2c.png May 17 20:06:58 hey guys May 17 20:07:03 I'm trying to build a log in system May 17 20:07:13 for some reason its only working the first time a user logs in May 17 20:08:05 I am attempting to debug an application directly on my android phone using android studio, i have run the application in debug mode, set breakpoints, attached the process to the debugger, and at that point when i start interacting with the app by touching on the screen it just closes and i get the message: "Disconnected from the target VM, address: 'localhost:8609', transport: 'socket'" in my console, anyone has an idea what's c May 17 20:08:20 http://pastebin.com/pAjgfNCT May 17 20:08:33 line 85-89 is where the problems are May 17 20:08:58 the first time you log in it works fine, but after words it breaks May 17 20:21:34 What do you people use to interact with your REST API? May 17 20:21:44 internet :) May 17 20:23:20 i'm drawing rectangles on a canvas using onTouch motionEvent is there a way to make each drawing a button or something that register a touch? May 17 20:23:28 ExeciN, what do you want to hear? A library? a protocol? the php version of my rest api? May 17 20:24:01 heh, what libraries do different people are using May 17 20:24:13 hert, nope. you have to do it manually by checking if the position of the touch equals your drawn rectange May 17 20:24:27 ExeciN, cant talk for different people, sorry May 17 20:24:37 but im using retrofit. and a lot of others too May 17 20:32:17 Hey May 17 20:33:37 What does everyone use for edit icons like switch 3? May 17 20:33:41 Nice. Thought I had a weird bug in some new code; turns out that reddit is just down. May 17 20:34:06 aah, the magical "not my problem" bug May 17 20:34:32 :D May 17 20:36:01 There. I now have a(nother) thing on my github profile: https://github.com/Groxx/LocalTrace <- anyone mind taking a look and letting me know what you think? Primarily of the readme. The code works, though it's not particularly beautiful :) May 17 20:42:52 son of a gun, got peanut butter in my mouse scrolling wheel May 17 20:43:27 g00s: crunchy or smooth? and I don't think smooth makes smooth-scrolling better :| May 17 20:43:35 crunchy :( May 17 20:48:55 TacticalJoke any tips on how to get unstuck when you can't decide what to work on :P like, so many big chnages need to happen but i'm paralyzed :( May 17 20:49:49 I often have the same issue. May 17 20:50:18 I think the best way is to take the most pressing issue, write really horrible, messy code that more or less implements/fixes it, and maybe tomorrow start refactoring that horrible code. May 17 20:50:50 yes that sounds good May 17 20:51:41 hahaha May 17 20:51:48 peanut butter flavored mouse May 17 20:51:49 lol May 17 20:51:52 This is what I'm doing as we speak. I was totally not in the mood to write anything today, but I was also not in the mood to do anything else. So I just dived in. The code is awful, but to my surprise it worked within about 10 minutes (I thought it'd take me hours). May 17 20:52:08 g00s, a slide deck for you on new android weekly ČP May 17 20:52:16 It did involve copy-pasting an entire file that I'm too lazy to even think about. :D May 17 20:52:26 TacticalJoke, I am only writing my first hello world for android right now :) May 17 20:52:57 master, you definitely don't live up to your nick then May 17 20:53:02 Mavrik the BLE one ? May 17 20:53:05 yp May 17 20:53:15 Mavrik did you do it ? May 17 20:53:23 nope, just saw it May 17 20:53:27 wakelock, what, please, I am the Godzilla to your Japan at what I do. May 17 20:53:41 I will eat your cities. May 17 20:53:43 yes master May 17 20:54:21 Welcome aboard the crazy train, master. What are you thinking of creating? May 17 20:55:39 I wonder whether programmers are overrepresented in insane asylums. May 17 20:57:08 Sup TacticalJoke May 17 20:57:12 Hay, drose379. May 17 20:57:17 How you beem? May 17 20:58:29 been* May 17 20:58:42 g00s: if you're bored, tell me what you think of https://github.com/Groxx/LocalTrace ? May 17 20:59:24 groxx well first, gotta love the avatar :D May 17 20:59:56 glad to see the rites have been observed :) you may proceed. May 17 21:00:19 Not too bad, drose379. May 17 21:01:32 How's the app coming along? May 17 21:07:06 groxx, that seems pretty cool May 17 21:08:10 it's part of how I figured out https://code.google.com/p/android/issues/detail?id=173804 :| weird / insane slow calls that should never be slow. May 17 21:10:26 i have the developer option turned on that flashes the screen ... May 17 21:10:26 amazing how often it flashes with google apps like Drive May 17 21:11:09 yeah, I turned it off :) combination of both "appears too often" and "misses many cases where it should appear" May 17 21:11:12 almost looks like your standard hard-drive LED, right? :p May 17 21:11:45 groxx o really, so false negatives ? May 17 21:12:16 I don't think it false-negatives, just that I saw it so often while randomly using apps / literally doing nothing May 17 21:12:35 it doesn't tell you "this app blocked", it just says "an app blocked" May 17 21:13:36 "some app out there in the world just blocked" May 17 21:16:17 Hi :) I have a problem with the Location Manager....I use requestSingleUpdate() to get the coordinates of the user, GPS is activated, but onLocationChanged is never reached (the other methods implemented in my handler class are not fired either!). Any idea? GPS is activated, the permission is added in the manifest, test-device is my moto g...thanks already :) May 17 21:16:57 DominikST: depends. it may never occur, GPS isn't a guaranteed thing May 17 21:17:32 can i somehow test it? In code I mean May 17 21:17:39 did it get a lock? May 17 21:17:48 location lock that is May 17 21:18:42 in an emulator you may be able to change its location, and see if requestSingleUpdate picks up the change? otherwise not sure. try lowering the precision and raising the power, or don't use GPS (google's fused provider can be quicker, because it can position based on wifi signals). May 17 21:19:06 I can still edit my editTexts and stuff, so the app is not locked...or can the location service be locked? May 17 21:19:32 DominikST, did it get a lock? it is probably best and simplest to test in an emulator though May 17 21:19:40 I didn't get anywhere with that animation issue, on Nexus 5 it's really terrible perf issue May 17 21:19:50 one time behaves this way another time doesn't, so strange May 17 21:20:16 try Google Keep, they do the animation at the first run and never again May 17 21:20:47 never tried it in an emulator...probably should have done that before :/ May 17 21:21:43 oh my god, the bug is in Google Keep too! May 17 21:22:12 it isn't just first run and never again, but it's the same behavior I was experiencing, so much so that you think the animation never ran to begin with! or something stuttered May 17 21:22:21 canvs2321 ^^ May 17 21:22:24 try ti! May 17 21:22:33 well this is a relief May 17 21:22:37 sorry which issue? Odaym May 17 21:23:05 layout animation May 17 21:23:51 like this for example http://android-er.blogspot.co.il/2009/10/listview-and-listactivity-layout.html May 17 21:23:53 try it May 17 21:24:03 wow so much grief about animations? animations are supposed to be just the cherry on top, lol May 17 21:24:17 try Keep May 17 21:24:19 to see what I mean May 17 21:26:03 After mapping out the structure of my dependency injection model, it's really hard to feel like it's worth it. Shit gets complicated, and the learning curve feels painful. May 17 21:26:27 And all I'm injecting is a retrofit service... May 17 21:27:17 Caused by: android.database.CursorIndexOutOfBoundsException: Index -1 requested with a size of 1; query seems to be OK, table filled with data, what can be wrong ? (I get it at cursor.moveToFirst() ) May 17 21:32:02 http://stackoverflow.com/questions/10244222/android-database-cursorindexoutofboundsexception-index-0-requested-with-a-size#answer-10244551 May 17 21:32:44 JakeWharton: if I have a @Module(includes=ApiModule.class) class DebugApiModule {}, then DebugApiModule will provide what ApiModule provides unless I override them in DebugApiModule, right? May 17 21:36:11 Yes May 17 21:39:40 Odaym, isn't it simply related (your animation issue) related to "where" (implicitly linked to "when" based on the activity lifecycle) the animation is started - like if you trigger it yourself manually, it will always behave as expected, whatever you did (pressing home and coming back, kill the app and starting it again, etc)? May 17 21:39:55 s/related// :p May 17 21:40:32 it isn't started anywhere like you are describing May 17 21:40:51 i did not want to bring an exhaustive list :p May 17 21:40:54 the layout animation controller is hooked to the listview at a point where you set the adapter on it May 17 21:41:06 .setLayoutAnimation May 17 21:41:28 because I wanted it to happen as they were appearing May 17 21:41:29 JakeWharton: can I override a provided dependency by modifying the one provided by the included module, e.g. @Provides ApiService(RestAdapter restAdapter) { return Mockito.spy(included.provideApiModule(restAdapter)); } May 17 21:41:43 how you gonna go behind getView of the adapter and tell it "as you are getting the view, show it like this" May 17 21:41:55 so there is no explicit animation.start() or anything here May 17 21:41:59 otherwise of course, ez May 17 21:41:59 yep i see May 17 21:42:18 Google Keep I see has the same issue on N5 May 17 21:42:41 I had thought they ran it only once to avoid this issue, but then I caught the cards from teh bottom for a millisecond then they jumped up suddenly May 17 21:42:47 so it's the same glitch May 17 21:43:08 thx, was just curious about May 17 21:43:18 no im going to talk to you more about it May 17 21:43:21 you just wait right there May 17 21:43:22 haha May 17 21:43:23 :p May 17 21:43:26 ttyl, brb May 17 21:43:32 ok May 17 21:44:38 if you kill the app (assuming nothing survives), you launch it again, do you have the issue? or only when pressing home and coming back? May 17 21:45:01 you kill it you see it running fine May 17 21:45:46 SimonVT can answer this im sure but he doesnt want May 17 21:45:53 shekibobo: no May 17 21:46:59 Odaym, have you tried that http://developer.android.com/reference/android/view/ViewGroup.html#startLayoutAnimation%28%29 when the adapter is already populated (like when pressing home and coming back to the app i guess)? May 17 21:48:21 JakeWharton: thanks. May 17 21:48:42 to call it explicitly? May 17 21:48:45 where would you use this? May 17 21:48:54 or rather, why? May 17 21:49:27 shekibobo: in u2020 we use static factory methods on the module and call those from the override. Only one method will be called so there is no original dependency to inject. May 17 21:49:49 I would guess that first you would have to have hooked that viewgroup to its respective layout animation controller May 17 21:49:57 to force the animation to restart, Odaym. But take that lightly it was just a suggestion May 17 21:50:05 and then call start on that, but since hooking it to the controller triggers the animation, what's start going to do? May 17 21:50:30 unless setting the layout animation controller can be a property in xml May 17 21:50:53 which it is.. May 17 21:51:51 yeah i'm not sure at all, need to have the issue to investigate more on it ;) May 17 21:52:44 JakeWharton: that makes sense, but wouldn't that mean you're subclassing modules? Or would you consider that an appropriate case for subclassing + includes-style composition? May 17 21:53:21 No. They're static methods May 17 21:54:19 Does anyone know why the colors on my preference screen checkboxes are messed up on kitkat? https://i.imgur.com/AIjYO2c.png May 17 22:00:45 see now there is absolutely no problem to do this for a deeper level activity May 17 22:00:54 runs the same way every time, no problem, which I was sure of May 17 22:01:06 Heya, could anyone explain to me what is going on here? http://i.imgur.com/HnxhT9D.png full code: https://gist.github.com/Shywim/127f207e7248fe48400b line 52 May 17 22:01:10 It is a parameterized/generic type, but it is not just defining the type as a pre-existing type, it seems to be defining a new type. May 17 22:01:14 I guess it's too heavy to be considering at startup, I wouldn't want to wait for some shit dancing views just to start the app May 17 22:01:15 A) is that actually what is happening? and B) why not just use the base type? (ViewHolder in this case) May 17 22:01:17 Id hate it May 17 22:02:16 JakeWharton: and, I see it now. That makes sense, thanks. May 17 22:02:35 well thanks adq May 17 22:02:44 shekibobo: Would have linked but mobile! May 17 22:03:37 How does Picasso clear an ImageView's image (when, for example, used with a ListAdapter)? It doesn't seem to use `imageView.setImageDrawable(null);`, `imageView.setImageResource(0);`, or `imageView.setVisibility(View.INVISIBLE);`. Can't figure out from looking at the code. May 17 22:04:03 same, but I knew where to look :) I've been studying all the u2020 variants for a whole now. May 17 22:04:24 TacticalJoke: it does. Look at into() May 17 22:06:11 Can't link, mobile. And lazy. May 17 22:06:26 Is it the `target.onPrepareLoad` thing? May 17 22:06:51 No. That's for targets. Look at the ImageView one. May 17 22:06:52 dont wanna waste your time adq, but for what it's worth, please see this small video I recorded of Google Keep doing much worse than what I was describing https://dl.dropboxusercontent.com/u/19390574/Google-Keep_Animation_bug.mp4 May 17 22:07:30 looking at it May 17 22:08:24 Heya, could anyone explain to me what is going on here? http://i.imgur.com/HnxhT9D.png May 17 22:09:00 looks like a highlighter effect May 17 22:09:16 haha. hi cofo, i just asked that May 17 22:09:18 no response yet May 17 22:09:21 Yea. I'm a good designer. Now forget it May 17 22:12:37 JakeWharton: Ah, okay; it's this: setPlaceholder(target, getPlaceholderDrawable()); May 17 22:12:47 I missed it because of the `if (setPlaceholder)` thing. Thanks. :D May 17 22:13:12 Cool. I couldn't quite remember. May 17 22:13:19 zzxx: What are the symptoms of your problem? I couldn't quite figure out what you were asking. May 17 22:13:57 JakeWharton: if I have a component providing @Singleton scope and another providing at @PerActivity scope, will the narrowest scope available win out? Thinking applicationContext vs. Activity context. Wondering how you might specify the difference... Named dependencies? May 17 22:16:15 zzxx: Are you asking what that Java construct means? May 17 22:16:27 TacticalJoke: It is not a problem actually, i am just trying to understand the code. In the highlighted code you see that there is a class with a generic, but it has to be of type ViewHolder? if so why extend "VH" from the Viewholder? May 17 22:17:08 I have found this which i am reading now May 17 22:17:08 http://onewebsql.com/blog/generics-extends-super May 17 22:17:21 not sure if it answers my question yet May 17 22:17:59 It's this: https://docs.oracle.com/javase/tutorial/java/generics/bounded.html May 17 22:18:10 TacticalJoke: Thanks! ill read that May 17 22:21:02 What is class literal? May 17 22:21:50 They're extending RecyclerView.Adapter and allowing their subclass to also take the 'VH' type parameter May 17 22:22:00 They're just copying the superclass, basically. May 17 22:23:07 cofo: Google knows best. :D May 17 22:23:54 i have an rxjava problem. if a cold observable is unsubscribed from (before work is done) i need to cancel a task; but if it unsubscribes by normal completion i dont want to run that cancellation code. Subscriber.add(Subscriptions.create(action)) will run action for both scenarios :( May 17 22:24:35 class literal, formed by taking a type name and appending ".class"; for example, String.class. This refers to the object (of type Class) that represents the type itself. May 17 22:24:36 i got 99 problems but rxjava aint one May 17 22:24:39 I don't understand it May 17 22:24:59 oh i get it May 17 22:25:03 g00s: does `if (!done) { cancel(); }` not work? May 17 22:25:06 but for what is good? May 17 22:25:23 its good for reflection May 17 22:25:53 groxx yeah i guess i can check some AtomicBoolean meh May 17 22:26:03 What?? May 17 22:26:05 also because you can't pass "TheClass" as parameters, but you can pass "TheClass.class" because it's an Object May 17 22:26:27 g00s: yeah. or for a one-way flag, volatile boolean works fine too May 17 22:26:40 groxx: Hi, sorry, do you know me? May 17 22:26:57 You can do stuff like String.class.newInstance() - this creates a new instance by calling the default constructor of the class May 17 22:27:18 Megaf: ¯\_(ツ)_/¯ don't think so May 17 22:28:09 cofo you can use a class literal to get constructors, annotations, fields, methods, etc, all attributes of a class via reflection May 17 22:28:16 probably beyond your pay grade :P May 17 22:28:25 groxx: nevermind, I have a friend with a very similar nick, May 17 22:28:45 an imposter! D: May 17 22:28:55 the real fizzgig ? May 17 22:30:22 Do you use it? May 17 22:30:29 My code isn't working and I'm too lazy to figure out why. May 17 22:30:53 HAHA May 17 22:33:12 cofo: Android uses it. (e.g., `Intent.init(Context, Class)`.) May 17 22:33:41 Well, uses the Class class. May 17 22:35:00 :( May 17 22:35:13 How much do you learn java? May 17 22:35:33 as much as a woodchuck could chuck would if a would chuck could chuck wood May 17 22:35:39 72.8 units. May 17 22:35:41 not you May 17 22:35:49 units? May 17 22:36:07 TacticalJoke is more towards 84.2 units May 17 22:37:07 Did you learn from docs java? May 17 22:37:20 1.7∛29i units May 17 22:37:25 you learn from trial and error May 17 22:37:57 nobody knows 100% of the docs or android api, you learn what you need May 17 22:38:16 bla bla May 17 22:38:25 says you May 17 22:38:32 You just like to troll me May 17 22:38:49 you'll never know it all, just google what you need May 17 22:39:11 Then which java topics I need for Android development? May 17 22:39:27 the topics that get your app made, what are you making? May 17 22:40:00 Another factor is your programming history (e.g., if you've come from C# there's not a huge amount of language learning to do). May 17 22:40:21 But I don't a guy who know good C# like good OOP May 17 22:40:25 just the basic old school May 17 22:40:46 I'm pulling down some content from a web page (making a news reader app). The content has HTML tags, like

, etc. What is the best way to parse/handle this? WebView? May 17 22:40:50 you need an app idea, and go with that. don't expect to learn all of java/android May 17 22:41:04 t0astt: Isn't there an API you can use? May 17 22:41:18 Please stop repeat it. May 17 22:41:24 TacticalJoke: API for what? Pulling down the content? Or displaying it? May 17 22:41:29 Getting the content. May 17 22:41:40 (HTML-free content.) May 17 22:41:40 TacticalJoke: Yes. But it still returns it with the tags May 17 22:41:51 In reddit they said to know java and xml May 17 22:41:59 TacticalJoke: This is the API (for WordPress) http://wp-api.org/ May 17 22:42:05 cofo, quit trolling May 17 22:43:07 t0astt: It says "Grab your site’s data in simple JSON format". Hmm. May 17 22:43:18 Though I guess "your site's data" could include HTML. May 17 22:43:48 TacticalJoke: Yeah. Tbh I'm not a big fan of the API, but it's one of only a few available and it has the most downloads/ratings May 17 22:44:36 t0astt: What HTML tags are you getting? May 17 22:44:47 Are you getting the whole "" shebang? May 17 22:45:05 TacticalJoke: Nope, no html or body tags. Just

tags like

May 17 22:45:26 and some tags May 17 22:46:27 canvas2321: then you say you can learn without a book? May 17 22:46:42 t0astt: I guess you could try Html.fromHtml. May 17 22:46:53 t0astt: Though I wonder whether there's an API switch to disable the getting of HTML tags. May 17 22:47:16 TacticalJoke: which book did you learn Java/ May 17 22:47:19 Using "HTML" and "parsing" in a sentence is scary. :[ May 17 22:47:34 cofo: I came from C#, so I just googled SO answers. May 17 22:47:47 How much c#? May 17 22:47:52 TacticalJoke: I hope so. I'm likely going to look into another API... Right now the "retrieve posts" call pulls ALL information about posts, so just generating a directory listing of posts is decently expensive... :P May 17 22:47:53 cofo: This looks good: http://docs.oracle.com/javase/tutorial/java/ May 17 22:47:53 I mean which topics included? May 17 22:47:57 I also learned C# from web pages. May 17 22:48:09 I'm doing it but I don't understand how to use class lterals May 17 22:48:31 t0astt: Same here with the reddit API. I'm using JSON stream-parsing for that reason. May 17 22:48:41 TacticalJoke: Holy crap, SCORE on the Html.fromHtml! May 17 22:48:44 It works perfect May 17 22:48:46 cofo: Class literals are an advance topic a Java beginner doesn't have to worry about. May 17 22:48:49 advanced* May 17 22:48:54 200%? May 17 22:49:08 200 units haha? May 17 22:49:44 TacticalJoke: Two things. 1. Is your Reddit app on the Play Store? I'm looking for a new reddit app... :D 2. What library are you using for stream-parsing? I'm using Retrofit currently... May 17 22:50:13 It's not yet on Google Play. I'm using Jackson to parse the JSON. OkHttp to deal with the whole HTTP thing. May 17 22:53:52 I wish the reddit API had flags such as "Don't give me self-posts for this post listing". It's quite wasteful. May 17 22:54:07 TacticalJoke: sorry but can you explain what is instance variable - static field? I don't understand it May 17 22:54:23 cofo: That Java tutorial will explain it. May 17 22:54:26 Or StackOverflow. May 17 22:54:47 I did May 17 22:54:49 I tried May 17 22:54:59 t0astt: fwiw Html.fromHtml only supports some tags, etc. but yeah, if that works, it's great :) May 17 22:55:17 this tells the compiler that there is exactly one copy of this variable in existence, regardless of how many times the class has been instantiated. May 17 22:56:01 There is also static method in C# but no idea about that May 17 22:56:20 cofo: Which programming languages have you used before? May 17 22:57:13 Not used just use simple stuff.. May 17 22:57:25 Please even I used you see it's not help me May 17 22:57:48 It's hard to suggest stuff without knowing what you know. May 17 23:00:12 If Java is gonna be your first serious language, maybe a book wouldn't hurt (I don't know of any, but a lot of people seem to recommend Head First Java). May 17 23:00:51 not really May 17 23:01:07 I did scripts in Python but very easy May 17 23:01:12 using libaries May 17 23:03:26 You could ask in ##java, but to be honest they are not always the nicest people. May 17 23:04:07 It happen to me just now May 17 23:17:27 Hey guys. how are the lists called in for example google launcher or the youtube app on startscreen? do they have any special name? May 17 23:18:14 http://cdn2.ubergizmo.com/wp-content/uploads/2012/11/goog-now.jpg this list style May 17 23:18:48 couldn't find anything close to it in design/building blocks May 17 23:19:43 You mean cards? Those look like lists of cards (CardViews). May 17 23:20:10 I will check that, thank you :) May 17 23:20:27 exactly what i searched, thanks May 17 23:35:12 hello! May 17 23:37:58 Head First books are pretty solid for new programmers May 17 23:40:49 how do i render a specific glyph from a ttf file in a bitmap? May 17 23:45:21 how did u update android studio? May 17 23:48:31 Help -> check for updates May 17 23:56:38 myke: afaik: 1) textView.setTypeface(the ttf file) (or something like that) 2) textView.setText("glyph"); 3) new Canvas(mutable Bitmap); textView.draw(canvas); May 17 23:57:00 myke: there are more precise / not-main-thread-bound / etc methods, but that might be reasonably simple May 17 23:57:21 JakeWharton or anyone else who might know: using dagger 2, would it be more appropriate to use @Singleton or a custom @ApplicationScope? Or would they be functionally the same? May 17 23:57:56 groxx: ty May 17 23:58:21 i can already get them in textviews, i wanted to render a larger one for a minigame May 17 23:58:56 any reason a textview with e.g. font size set to 100dp wouldn't work? May 18 00:01:21 guess i was too stuck on getting a bitmap, thanks May 18 00:01:49 bitmaps would be quicker :) but they're less flexible, generally I'd recommend saving it for if you know you need the performance. May 18 00:02:38 myke: alternatively, canvas.drawText exists, which skips the view part (though you've got to set up the TextPaint, maybe measure it, etc) May 18 00:08:53 It seems that rxjava has helped solve a lot of the issues I've had with Fragments historically May 18 01:20:30 groxx: going with staticlayout and textpaint, thanks again May 18 01:21:08 myke: sounds good :) May 18 01:22:07 myke: fwiw I briefly had a chance in here to ask Romain Guy, and: StaticLayout may not be safe to use off the main thread. but the Paint objects are definitely safe. so if you want to do a bunch of off-main text layout, you essentially have to do it by hand with the Paint objects May 18 01:24:15 so whats the difference between instatiating an instance variable when you define it and in the constructor? May 18 01:24:34 when you call a static method will it still instaniate? May 18 01:27:36 Calling a static method doesn't call the constructor or initialize a non-static field. Not sure what you mean. May 18 01:28:11 The difference between calling private Button b = new Button(); May 18 01:28:24 or in the constructor b = new Button(); May 18 01:29:26 As far as I remember, field initializers run before constructors. But the end result is the same. May 18 01:32:35 Field initializers are good for stuff that's always the same (e.g., `private List list = new ArrayList<>();` for every single instance). May 18 01:34:19 Though, of course, initializers and constructors can't always be used in Android. Sometimes we need to wait until Activity.onCreate or the like is called. May 18 01:34:36 yeah that's what i'm seeing now. My shitty cs teacher strikes again! He taught us the other day to never put stuff in the initallizer May 18 01:35:30 TacticalJoke: do people ever really put a construcor in an activity? i dont really see the point May 18 01:35:35 would you even be able to? May 18 01:36:10 its not very useful. you can't use context until onCreate May 18 01:36:40 Yeah, I think the general rule is this: if `onCreate` is available, it's not worth defining a constructor. May 18 01:36:41 strictly, 'onAttachContext or something like that, but you get the idea May 18 01:38:34 DadFoundMy: IMO, it reduces code readability to use constructor assignments when field assignments would be fine. May 18 01:39:08 (About the teacher thing.) May 18 01:39:37 TacticalJoke: yeah im now realizing how stupid some of my code must now look May 18 01:39:55 on android , if i can initialize a final i do it right away, because we don't use constructor really May 18 01:39:56 like defining a boolean in the field and than assigning it to false in the constructor/ onCreate() May 18 01:40:24 Note that you don't have to initialize boolean fields with `false`. May 18 01:40:32 or assigning it to true becasue default is fasle May 18 01:40:34 All fields are initialized with some 0-value (null, 0, false, etc.). May 18 01:40:39 yeah just realized that May 18 01:40:58 Though it can improve readability to say `private boolean foo = false;`, I guess. May 18 01:41:30 meh the way i use booleans it probably doesn't matter :D. i end up writing shitty code and have to make it shittier with boolean flags May 18 01:41:44 DadFoundMy: as long as it works May 18 01:41:47 Also, on this general topic, a modern language such as Kotlin makes full use of field initializers (though Kotlin has properties and not fields). May 18 01:41:54 Conciseness FTW. May 18 01:42:18 will the field iniatiizer be called even if onCreate() isnt called, like what if only onResume() is called? May 18 01:42:33 It'll be called if the class is instantiated. May 18 01:42:47 onCreate is just a normal method, really. The initializers run way before that. May 18 01:43:20 just to be clear the class isnt intialized onResume() right? May 18 01:43:31 that was a stupid question May 18 01:43:45 Also, I don't think it's possible for Activity.onResume to be called without Activity.onCreate ever being called for an Activity. May 18 01:44:17 well i was being dumb and think a class would posibly be iniailzed when hitting the back button to an activity May 18 01:44:23 *thinking May 18 01:44:38 am i correct that in java when you load a class it creates a class objects and instantiated classes are generated via factory? May 18 01:45:37 which makes nested classes easy to implement May 18 01:48:00 Hello guys! May 18 01:49:43 I am trying to use a Button inside a onCreate() method on a class which extends Fragment. And I am facing some issues concerning the button events. Does anybody have any idea about how to solve it please? May 18 01:50:08 ircfox_: well what exactly are the issues May 18 01:50:28 DadFoundMy: I am not being able to pass the context properly. May 18 01:50:47 ircfox_: pass the context to the button? May 18 01:51:24 can we see a pastebin of the code segment? May 18 01:51:55 DadFoundMy: I did implement OnClickListener to catch the events and I need to read a TextEdit getText() method after a button is clicked. May 18 01:52:42 Hey guys, I heard Material Dialogs come with the SDK now, is that the same for FAB May 18 01:52:57 Or do you still have to use a 3rd party lib to use Floating action? May 18 01:53:02 drose379: i think i saw somewhere that FABs are including in the new sdk May 18 01:53:24 Ok, so I need to update the SDK I currently have? May 18 01:53:32 im not sure if it's out yet May 18 01:53:49 i rememember seeing it because something decompiled the i/o app's source May 18 01:54:02 ircfox_: post a code segment and im sure one of us can help you out May 18 01:54:05 Should be in a future version of AppCompat. May 18 01:54:10 its coming sometime, but not ready for use yet May 18 01:54:14 Ok, but MaterialDIalogs are out? May 18 01:54:18 Yeah. May 18 01:54:20 22.1. May 18 01:54:30 How would I go about updating my AppCompat to use those? May 18 01:54:31 Buttons too. May 18 01:54:32 DadFoundMy: yes, just a sec. Doinig that right now. May 18 01:54:35 In build.gradle. May 18 01:55:07 Change the CompiledSDKVersion? May 18 01:55:19 i wonder what the minimum sdk version google's FABs will be. The library i use has a min sdk of like 9 or something like that May 18 01:55:34 You'll probably have to change that too. AS will tell you after you change the AppCompat line. May 18 01:55:37 drose379: i would think the compiled depenncy May 18 01:55:43 DadFoundMy: 7. May 18 01:55:44 *dependency May 18 01:55:52 Ah ok May 18 01:55:54 TacticalJoke: ooo May 18 01:55:57 Cool, Im just gonna use a Lib for now May 18 01:56:21 TacticalJoke: wait so fabs are in the new sdk im confused? May 18 01:56:30 drose379: compileSdkVersion should be as high as possible, really. May 18 01:56:40 Ok, thanks guys May 18 01:56:42 DadFoundMy: They'll probably be in AppCompat in the future. May 18 01:56:44 going* to be in the new sdk May 18 01:57:52 DadFoundMy: here it is : https://gist.github.com/anonymous/e608ff87fb009a0bb6b3 May 18 01:59:10 anyone here using google analytics within their app? May 18 02:00:04 TacticalJoke: this might be a really stupid question but is everything in AppCompact sdk 7? May 18 02:00:09 ircfox_: You're effectively saying `button.findViewById(R.id.theField)`, which won't work because the EditText isn't the button or a child of the button. So you must be getting a NullPointerException. May 18 02:00:21 DadFoundMy: Yeah. That's what the 'v7' refers to. May 18 02:01:36 TacticalJoke: sorry, but that I know. And this is the reason why I am asking how to access the view context from inside onView method. May 18 02:01:58 ircfox_: to expand on what TacticalJoke joke you should be able to just remove the "v." in the onClick and fix the parentheses May 18 02:02:05 Probably the best way is to assign a field in onCreateView. May 18 02:02:20 DadFoundMy: cool, let me try it. ;) May 18 02:02:54 it's better form imo to make View instance variables and use inner class listeners May 18 02:03:07 and instaniate all the views in onCreate() May 18 02:03:43 and not implement OnClickListener May 18 02:04:12 I was implementing OnClickListener but it has the same problem. May 18 02:05:21 im saying define you View, Button and EditText as instance variables in the field initializers May 18 02:05:27 ie after the first bracket May 18 02:05:34 that's how i asee almost everybody do it May 18 02:06:28 DadFoundMy: do you have any example as a pastebin by any chance please? May 18 02:06:43 yeah ill find soem of my code May 18 02:07:08 DadFoundMy: o/ cool! May 18 02:08:12 I got this weird solution after reading this post : http://stackoverflow.com/questions/7570575/onclick-inside-fragment-called-on-activity May 18 02:11:17 ircfox_: all my code uses exsive help methods so i typed this up real quick http://pastebin.com/REAbuBe8 May 18 02:11:26 oops forgot to set the content vew May 18 02:11:28 *view May 18 02:11:31 youg et the idea though May 18 02:13:09 DadFoundMy: not better to instantiate a global ViewGroup var this way? May 18 02:14:02 do you mean not using xml for layouts? May 18 02:14:23 i prefer using xml but setting listeners shouldnt be any different May 18 02:16:42 I've totally lost track of the discussion. :D May 18 02:17:13 oops May 18 02:18:02 ircfox_: Did you solve the NPE? May 18 02:18:21 TacticalJoke: what is a NPE? May 18 02:18:29 NullPointerException. May 18 02:18:40 TacticalJoke: it wasnt a nullpointer exception i dont think May 18 02:18:42 Should be NRE, really. They're leaking implementation details. May 18 02:19:13 he was calling findViewById on the view when he should just call it on the activitry May 18 02:19:35 or maybe it was both i didnt really check May 18 02:20:54 TacticalJoke: yes, it was a NPE : 05-17 22:28:23.850: E/AndroidRuntime(19418): java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference May 18 02:21:15 TacticalJoke: thank you ;) May 18 02:21:38 ircfox_: The solution is either (a) assign a field in onCreateView and use this in onClick or (b) use `getView().findViewById(...)` in onClick. May 18 02:21:42 ircfox_: just looked back at your code. You need to also call .setOnClickListerner on the test, not save, so yes you would get a NPE May 18 02:21:45 I think (a) is better. May 18 02:21:56 TacticalJoke: agreeded. May 18 02:22:06 also you need to change save to test May 18 02:22:10 in the onCreateVIew May 18 02:25:06 is there a way to get a view weight programmatically? i.e. from the buttons in this LinearLayouT: http://stackoverflow.com/a/4517358/198348 May 18 02:25:14 great crashlytics gave me new bug java.lang.NoSuchMethodError org.apache.commons.lang3.builder.HashCodeBuilder May 18 02:25:19 100% Xiaomi devices ;) May 18 02:25:49 How do I return from a preview Fragment ? May 18 02:25:59 gordon_ :O May 18 02:26:42 what could that be, they bundled an older version w/o that method ? May 18 02:26:59 shoerain: http://stackoverflow.com/questions/20458081/how-to-get-layout-weight-programmatically May 18 02:27:00 Like the addToBackStack method but not from via main API. May 18 02:27:25 g00s: I really have no idea May 18 02:28:22 now I wonder how can I implement new hashCode method :D May 18 02:28:53 DadFoundMy: i'm blind, thanks mucho May 18 02:29:15 gordon_ http://stackoverflow.com/questions/29491443/xiaomi-hm-1sw-java-lang-nosuchmethoderror May 18 02:29:57 DadFoundMy: ah so to cast it to LinearLayout.LayoutParams first? May 18 02:30:50 g00s: thank you, I will try this one May 18 02:31:33 Or in order to switch from a Fragment to a preview one I need to replace it back again? May 18 02:32:28 shoerain: um i dont think you need to. i think you can just call view.getLayoutPamas() May 18 02:33:32 DadFoundMy: but it looks like LinearLayout.LayoutParams is different than ViewGroup.LayoutParams: https://developer.android.com/reference/android/view/View.html#getLayoutParams() May 18 02:34:06 LinearLayout.LayoutParams has a gravity and weight in addition to the defaults, while ViewGroup only has width and height May 18 02:34:21 shoerain: oh do you mean casting what .getLayoutParams to LinearLayout.LayoutParams. Yeah that would make sense then May 18 02:34:30 Yup yup May 18 02:34:35 *casting what .getLayoutParams() returns May 18 02:34:48 shoerain: yeah sorry i thought you meant casting the view or something haha May 18 02:44:24 Could someone help me figure why : getActivity().getFragmentManager().popBackStack(); isn't backing the fragment stack up please? May 18 02:44:59 yes, I did use addToBackStack() before commit(). May 18 02:47:06 lol, the Doof Warrior in Mad max looks awesome :D :D :D May 18 02:47:33 i was never able to find an axe with a flame thrower though, even at the house of guitars :/ May 18 02:50:02 View.setTag is so handy. May 18 02:50:11 I swear, that thing can get you out of almost any situation. May 18 02:50:24 I remember the VCL having a base type (TObject) that had a tag property. May 18 02:50:55 Arbitrary mapping without significant overhead FTW. May 18 02:53:10 (It's often horrible, but there are edge cases where it avoids undesirable instantiations.) **** ENDING LOGGING AT Mon May 18 02:59:59 2015