**** BEGIN LOGGING AT Tue Aug 12 02:59:58 2014 Aug 12 03:09:57 ODD Aug 12 03:10:29 I am trying to have "Settings" appear in my app, but its not showing Aug 12 03:10:53 I created a class and an .xml Aug 12 03:11:19 inside my main source I implemented public boolean onOptionsItemSelected(MenuItem item) { Aug 12 03:11:53 I dont see any errors, the app debugs fine, but settings wont show when I press the right bottom corner pad of my phone Aug 12 03:27:36 what about oncreateoptionsmenu Aug 12 03:33:19 -_- Aug 12 03:33:20 lol Aug 12 03:33:21 ok Aug 12 03:33:33 that explains my issue Aug 12 03:33:34 thank you Aug 12 03:41:16 anyone have ideas on how to trim AS memory usage; the ide at startup only uses ~195 MB; opening project goes to 328MB (ok so far) ... but seems like after I edit layout xmls goes up to 800MB. Thats OK I supposed, but then a chile java process (gradle) starts off at 250MB and grows in size with every build Aug 12 03:41:52 eventually everything gets close to ~2G and i have to shut down, and restart the ide Aug 12 03:42:24 i guess its worth it ... just wondering if anyone else with modest machine has tips ;) Aug 12 03:42:42 dude Aug 12 03:42:43 http://www.downloadmoreram.com/ Aug 12 03:43:47 yeah, going from 4G to 8G would be a world of difference Aug 12 03:44:04 whats holding you back? Aug 12 03:44:09 maybe when my android app starts making some money :D Aug 12 03:44:28 whats your system Aug 12 03:44:50 i mean did you build it yourself or Aug 12 03:45:11 which will be any day, of course ... just a temporarily embarrassed millionare Aug 12 03:45:19 desmin88 2009 MBP Aug 12 03:45:25 oh Aug 12 03:50:16 i've got a little mac mini and it seems to run IJ, the iOS simulator and two terminals, absolutely nothing more lol how much RAM do you have ? Aug 12 03:50:42 4G Aug 12 03:51:16 seems like realistically after boot, only 2G is really available Aug 12 03:51:24 after silly stuff like vpn starts Aug 12 03:51:51 f.lux, dnscrypt Aug 12 03:52:16 bankai_au how much memory does your mac mini have ? Aug 12 03:52:21 4g Aug 12 03:52:49 it wasnt until 0.8 that i noticed this separate child java process Aug 12 03:52:58 it grows substantially Aug 12 03:53:13 strange even that i have in process builds selected, so i'm not really sure what it is Aug 12 03:53:24 although i suspect gradle Aug 12 03:53:35 but that wouldn't be in process :P Aug 12 03:55:21 whats new bankai_au Aug 12 03:55:36 oh that rhymes :) Aug 12 03:56:41 [2014-08-11 23:56:38 - LEDFlashLighter] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.byte0x00.ledflashlighter/.LEDFlash } Aug 12 03:57:21 Works muthafuckin' perfect Aug 12 03:57:53 aw yiss Aug 12 03:57:57 mutha fuckin breadcrumbs Aug 12 03:59:27 breadcrumbs, really Aug 12 04:02:10 http://i.imgur.com/PTdf7oC.jpg Aug 12 04:22:42 g00s_, connect to it with jconsole and see what it is Aug 12 04:22:53 hm, good idea Aug 12 04:24:49 gradle launcher deamon Aug 12 04:25:08 consistent with the observation that it takes 100% cpu during build ;) Aug 12 04:31:02 when the user physically rotates the device, my views jump instantly to their new positions. Can I add an animation for this instead? Aug 12 04:46:22 they should not jump of handled correct Aug 12 04:46:40 you should get the fakey 10 frame transition fade thing while rotation occurs Aug 12 04:56:27 Yep Aug 12 05:06:18 Goodnight Aug 12 05:06:34 going to sleep, then wake up smoke some weed until my lungs hurt> Aug 12 05:06:43 and work on my project =) Aug 12 05:08:10 if it makes your lungs hurt, maybe thats your body saying stop this crap :) Aug 12 05:09:57 but it hurts so good Aug 12 05:10:55 get a vaporizer fool Aug 12 05:44:13 shmooz: you still there? Aug 12 05:44:29 yes Aug 12 05:45:24 watching crackheads fight outside my building Aug 12 05:46:39 here's a protip. put a glass pint glass in your freezer. while you wait for it to chill, roll something. once it is thoroughly chilled, remove it from the freezer. take rolled something, and light it like you normally would EXCEPT this time, with the chilled pint glass in one hand, put the lit end in your mouth and gently exhale through the rolled something into the chilled glass. since the glass is chilled, the smoke will condense Aug 12 05:46:39 and pool in the bottom of the glass. you can fill an entire rolled something in one pint glass this way, but when you are ready to Aug 12 05:47:16 that sounds more complicated than getting gradle to work Aug 12 05:47:18 "drink the milkshake" simply sip from it, since the condensed smoke is heavier than air, it will roll down your throat nice and chilll like. no burned lungs and cool party trick :) Aug 12 05:47:23 hehehe Aug 12 05:48:02 no it is very, very easy. gradly is like assembling a vacuum percolation water pipe Aug 12 05:48:22 besides gradle makes life easy Aug 12 05:49:07 gradle, like weed, probably damages your brains dopamine's receptors so you cant enjoy life any more Aug 12 05:49:18 Hi all Aug 12 05:49:23 unless your constantly using gradle, err weed Aug 12 05:49:53 uhh not to burst your bubble but you been watching too much mcgruff the crime dog propaganda ;p Aug 12 05:50:50 I have the following code http://pastebin.com/UPy8PiFj to get the JSONObject data from a file. But the output is coming like this {"3":{ïd":"1003","label":Form3"},...... Aug 12 05:50:53 lasserix_ no, i just read this in amusement a few days ago http://www.pnas.org/content/early/2014/07/10/1411228111 Aug 12 05:51:21 but then again, i never met anyone who smoked actually being objective about it ;) Aug 12 05:51:33 I want to see the output as Form3 Form4 etc instead of all the details like id lable... Aug 12 05:51:55 in a listview Aug 12 05:52:40 Where am I doing mistake. Do I need to give getJSONObject(i) instead of getString(i); Aug 12 05:52:40 well i completly agree there is more than a handful of generation of morons who smoked themselves stupid, but there are just as many cases of people who do just the opposite... carl sagan to name one of them. Aug 12 05:52:58 but to keep this android discussion! look they have an app! ;p Aug 12 05:54:04 g00s they are also talking about Aug 12 05:54:04 best cheech and chong line ... 'Am I driving ok man?' , 'UUhhhhmm, I think we're parked man!' Aug 12 05:54:33 driving down the freeway in the shroom lane.. ahh that was a ride i'd rather forget ;p Aug 12 05:54:59 hehe Aug 12 05:55:12 niru what does getForms() return? Aug 12 05:55:49 oh shit that reminds me i better clean up the syrup before the army of the ants returns Aug 12 05:56:35 lasserix_: getForms is a method in SyncService file which returns a JSONObject of forms Aug 12 05:57:01 can you print out tostring on that line and post it? Aug 12 05:57:07 i am guessing its a jsonarray of jsonobjects Aug 12 05:57:21 http://pastebin.com/DpddkSDP Aug 12 05:57:45 yeah you have not formed that correctly Aug 12 05:57:51 you should use a json array Aug 12 05:57:52 actually its a jsonobject and I am converting it to jsonarray to get the String Aug 12 05:58:17 well in anycase it does look formed properly Aug 12 05:58:29 why not just pass it as a json array of json objects to begin with? Aug 12 05:58:55 http://jsonlint.com/ --> does not pass validation test Aug 12 05:59:08 also you don't need to escape the " " Aug 12 05:59:16 when they are used as a key value pair declaration ie Aug 12 05:59:26 { "key1":"value1" } Aug 12 06:00:11 if you have a " inside then yes, { "key1":"this is a \"quote\" \"unquote\" value", "key2":"value2" } Aug 12 06:02:27 what should be minimum hardware requirements for app development on android studio? Ram and Processor(s) ? Aug 12 06:03:32 4 terabytes of superluminal uberram and perpetual overclocked cpu Aug 12 06:03:32 i'd say a machine with 8G; i have a 4G machine and its painful Aug 12 06:03:51 of course, not all 4G is free Aug 12 06:04:09 it needs a minimum of 2G free Aug 12 06:06:08 i have dual core with 2G laptop. android studio hangs in it. looking for a new one. Aug 12 06:06:56 lasserix_: what should be given in that jsonlint? the entire key:value pair in the jsonobject? Aug 12 06:08:22 my app is heavily dependent on webviews pulling content from a server that can be a little shaky at times. Is it possible/reasonable to begin precaching these sites during my intro animation? Aug 12 06:10:52 the entier json string Aug 12 06:11:06 its validating if its properly formed, so everything { ... } Aug 12 06:11:09 or [ ] Aug 12 06:11:13 if its a json array Aug 12 06:18:03 lasserix_: ok Aug 12 06:18:29 Jesperhead: intro anim ? Aug 12 06:18:31 lasserix_: so you mean to say for name:value I need not give escape Aug 12 06:19:09 Jesperhead: oh and my theme system library is a local cache of a server resource … so yeah, but … intro anim ? Aug 12 06:21:35 StingRay_: thanks for the response. yeah i have just like a short 7 second blip of animation in the beginning. figured i should pull some resources while im at it Aug 12 06:22:32 cache the webviews i mean Aug 12 06:24:53 ah, dont know about webviews, I always think native is a better option, I have mySql stored data that I pull and cache local Aug 12 06:30:17 niru: yeah Aug 12 06:32:29 niru: I also never had success forming the JSONObject/JSONArray via their string literal represetations, instead I found it more reliable to do JSONObject o = new JSONObject(); try { o.put(KEY_FORM_!, FORM_1_LITERAL;} } catch (JSONException oops} where KEY_FORM_1 and FORM_!_LITERAL are Strings defined somewhere Aug 12 06:33:37 lasserix_: yes I am also seeing the same while googling. They say first declare and then use o.put(value) Aug 12 06:34:02 lasserix_: so that should solve the problem what I am looking for? Aug 12 06:34:22 maybe, make sure the object you put is serialize as a json entry Aug 12 06:34:46 ok lasserix_ Aug 12 06:40:15 ok is this the onetab plugin or the new firefox? I try quickly going back by clicking back 2 or 3 times and after the first click the forward button aligns under my mouse, super annoying! Aug 12 06:41:39 you can't JOIN a content provider to SQLite db right ? Aug 12 06:48:22 when I rotate the device, does my ListView get destroyed and then recreated? Aug 12 06:48:38 I currently do, for example: mListPageFragment = new ListPageFragment(); Aug 12 06:49:08 and does it run that code again ? Aug 12 06:49:40 StingRay_: it does in: public Fragment getItem(int position) Aug 12 06:50:02 StingRay_: in my extension of FragmentStatePagerAdapter Aug 12 06:50:04 if it does then "new" is probably the clue there Aug 12 06:50:29 when you rotate the screen, android deletes all the widgets and makes new ones? Aug 12 06:50:34 views get detroyed, up to you to deal with the data Aug 12 06:50:48 if I have: Aug 12 06:50:49 mListPageFragment = new ListPageFragment(); Aug 12 06:50:52 and then the screen is rotated Aug 12 06:51:01 what happens to the value of mListPageFragment? Aug 12 06:51:08 does it get magically set to null? Aug 12 06:51:14 or is it now some invalid pointer.. Aug 12 06:51:23 thats a fragment not a view Aug 12 06:51:26 sorry, I come from a c++ background Aug 12 06:51:30 StingRay_: hmm, sorry Aug 12 06:51:34 and it depends where Aug 12 06:52:16 many complex views and all fragments have instance bundles Aug 12 06:52:30 some with rather advanced info for quick restore Aug 12 06:53:21 so onSaveInstanceState can be very handy Aug 12 06:53:23 :) Aug 12 06:54:19 johnflux, when you rotate your device, your _activity_ gets destroyed and recreated (which includes all views) Aug 12 06:54:28 but fragments will (by default) be persited in fragment manager Aug 12 06:54:55 note that the Activity object itself will be recreated, so if you do mListPageFragment = something and you don't store the value, it will be lost Aug 12 06:54:59 Mavrik: hmm. the mListPageFragment is a variable in the activity Aug 12 06:55:14 Mavrik: so that's why it's being reset back to null Aug 12 06:55:24 Mavrik: How should I fix this? Aug 12 06:55:45 johnflux, do getFragmentByTag in onCreate to try and retrieve the fragment if it still exists Aug 12 06:55:47 At the moment, my FragmentStatePagerAdapter sets the mListPageFragment variable in the Activity Aug 12 06:58:09 Mavrik: where is the getFragmentByTag function? I don't see in the activity class Aug 12 06:58:26 in the fragment manager Aug 12 06:58:47 the other option is to recreate all fragments as well Aug 12 06:58:53 ah fm.findFragmentByTag ? Aug 12 06:59:15 FragmentManager fm = getSupportFragmentManager(); fm.findFragmentByTag("blah"); ? Aug 12 07:01:20 Mavrik: in my OnCreate, I currently do: Aug 12 07:01:22 mPagerAdapter = new CardPagerAdapter(getSupportFragmentManager()); Aug 12 07:01:32 should I instead be trying to reuse an existing adapter? Aug 12 07:01:52 does it make sense to reuse it? Aug 12 07:02:17 is it slow to instantiate? is the data large enough to slow down parceling? Aug 12 07:04:26 Mavrik: when I create a new adapter, will it recreate the fragments? Aug 12 07:04:46 Mavrik: recreating the fragments could be slow Aug 12 07:04:53 why are you asking me that? It's your adapter implementation Aug 12 07:05:01 DOES YOUR code create fragments when adapter is instantiated? Aug 12 07:05:12 Mavrik: no, it creates them in the getItem() function Aug 12 07:06:03 getItem will of course be called when viewpager is recreated :) Aug 12 07:06:35 Mavrik: hmm, that doesn't seem to happen Aug 12 07:06:54 Mavrik: I added print calls in getItem, and it's not called when I rotate the screen Aug 12 07:07:05 hmm, interesting Aug 12 07:07:16 johnflux: is it attached to the view/screen visible ? Aug 12 07:07:38 and instance reference wont do anything, needs to be attached to wm in some way Aug 12 07:08:45 StingRay_: The activity and fragments are visible.. Aug 12 07:08:56 StingRay_: Is that what you're asking? Aug 12 07:09:40 I'm saying that if the view that is powered by said adapter is not on screen and active Aug 12 07:09:52 getView/getItem/onBind etc none of that will be called Aug 12 07:10:33 StingRay_: it is on screen and active Aug 12 07:11:13 then is simply has no data Aug 12 07:11:23 so no items to get Aug 12 07:11:41 or that would be my guess :) Aug 12 07:12:02 what are you doing in getCount() ? Aug 12 07:12:06 in the adapter Aug 12 07:13:07 StingRay_: return 2; Aug 12 07:14:09 pastebin your adapter Aug 12 07:15:32 and the line of code where you attach mPagerAdapter to a fragment or view and where you set that view in the fragmentManager to an active view that will contain it Aug 12 07:15:44 cause I think you could be missing something really simple here Aug 12 07:15:58 one sec.. Aug 12 07:17:06 sorry didn't mean simple, what I was meaning was fundimental :) Aug 12 07:17:37 Does anyone know when it changed such that getVisibility == View.VISIBLE it became valid to do getVisibility == VISIBLE? Aug 12 07:17:48 StingRay_: http://pastebin.com/eRe4qD9P Aug 12 07:17:52 StingRay_: understood :-) Aug 12 07:17:54 lasserix_, never Aug 12 07:18:04 it is working in my android studio Aug 12 07:18:05 lasserix_, you just probably imported View with * ;) Aug 12 07:18:19 doh yeah Aug 12 07:18:39 or import android.view.View; Aug 12 07:19:32 StingRay_: I just added the: mPagerAdapter = (CardPagerAdapter) mPager.getAdapter(); Aug 12 07:19:47 StingRay_: but it doesn't work. It always returns null when I rotate the screen Aug 12 07:20:06 StingRay_: I don't get why though, if it's reusing the views Aug 12 07:20:42 on rotation it is not Aug 12 07:21:52 create the adapter and set it Aug 12 07:23:12 if there was a fragment that you had in the frag manager, you can get this again by what you were told, and if the input to onCreate , the savedInstanceState is not null then it's a recreation, if it's null then it creation Aug 12 07:23:17 What's the best way to use canvas to draw numerical primitives? Aug 12 07:23:26 (draw them frequently) Aug 12 07:24:28 lasserix_: what's a numerical primitive? Aug 12 07:25:24 float, int double etc Aug 12 07:26:55 lasserix_: how would you draw an int? Aug 12 07:27:04 lasserix_: you mean write it as text? Aug 12 07:28:26 yeah Aug 12 07:28:58 lasserix_: how many different numbers would you be drawing? And would they change every frame? Aug 12 07:29:06 just one for now and yes Aug 12 07:29:12 right now just using a string builder Aug 12 07:30:34 johnflux: int+"" ? Aug 12 07:30:54 that's a bad idea Aug 12 07:31:08 you are creating a string every time Aug 12 07:31:16 ok then Integer.toString(int) Aug 12 07:31:27 yeah same problem Aug 12 07:31:31 you have to avoid string creation Aug 12 07:31:38 hence the stirng builder as a char sequence (buffer) Aug 12 07:32:33 hmm, I don't agree Aug 12 07:33:12 Integer.toString(int) is find. Do you have any idea how complex and cpu intensive it is to turn a string into a pixies? Aug 12 07:33:18 er, pixels Aug 12 07:33:23 pixies would be good too Aug 12 07:33:49 an extra Integer.toString is going to take no time at all Aug 12 07:34:09 heh Aug 12 07:34:14 not cpu intensive Aug 12 07:34:22 garbage collection expensive Aug 12 07:34:40 lasserix_: hmm, good point. Aug 12 07:35:30 StingRay_: doing: mListPageFragment = (ListPageFragment) fm.findFragmentById(R.id.fragment_list_page); doesn't seem to work - it just always returns null Aug 12 07:36:01 cause your not using the fragmentmanger to attach it "with" a tag Aug 12 07:36:11 look at the getting started with fragment guides Aug 12 07:45:27 is there a way to add "search words" for an app to make it show in google play? Aug 12 07:46:35 my app is for example called "toadking". It shows if searching for that as one word but not if i search for "toad king" Aug 12 07:49:02 can't you add keywords to the description? Aug 12 07:49:10 TOADKING Save the toad king! Aug 12 07:55:40 jesperj: every word in the description is considered as a keywoard Aug 12 07:56:07 the short or long description? Aug 12 07:56:09 both? Aug 12 07:56:46 im not sure about the short one but I think both Aug 12 07:56:53 for sure the long one Aug 12 07:57:26 ok... I guess it for some reason just scored so low that i can't find it then Aug 12 07:58:20 would be interesting to see some stats on the playstore Aug 12 07:58:38 or... I don't user the words "Toad" and "king" anywhere. Only "toadking". I don' know how I could do that for just making it appear in searches without it looking like ive only added the words for the search engine Aug 12 07:58:43 but thanks for the information Aug 12 07:58:53 like how many apps are under 1000 downloads or have not been updated in 6 months, bet it will be quite a few :) Aug 12 07:59:10 the apps with a given keyword are sorted by keyword occurance, number of downloads and rating. So it might not appear when you type toad for the first few weeks :) Aug 12 07:59:46 danijoo: you not think last_updated should play a part too Aug 12 08:00:17 maybe. I think they have some sort of 1337ish algorythm for that ;) Aug 12 08:01:42 http://www.apptamin.com/blog/optimize-play-store-app/ Aug 12 08:01:58 g00s_: need some advice - i have three observables that return an arraylist each, what's the easiest way to smash them together without duplicates? flatmap->filter ? Aug 12 08:02:31 depending on this they even take links to the play store page from google search results into account *holy.. * Aug 12 08:09:30 bankai_au: hashset? Aug 12 08:15:33 'merge' was what i was after Aug 12 08:20:15 StingRay_: Remember I was saying that FragmentStatePagerAdapter getItem() wasn't being called after a rotation? I found other people with the same problem Aug 12 08:20:23 FragmentStatePagerAdapter has caching.. Aug 12 08:20:26 http://stackoverflow.com/questions/13557153/viewpager-doesnt-always-refresh-when-setadapter-is-called-fragmentstatepagerad Aug 12 08:20:44 oh cool Aug 12 08:23:06 StingRay_: http://stackoverflow.com/questions/13910826/viewpager-fragmentstatepageradapter-orientation-change this answer is interesting Aug 12 08:23:51 well, yeah, just like with all restore bundle methods Aug 12 08:24:14 but if you are going to change the way it works that much, look to something more fitting Aug 12 08:24:18 like viewPager Aug 12 08:24:20 :) Aug 12 08:27:01 and some simple adapter Aug 12 08:27:06 StingRay_: how can I reuse the fragmentstatepageradapter instead? Aug 12 08:27:34 why do you want to ? Aug 12 08:27:47 StingRay_: I'm just trying to find a solution Aug 12 08:27:52 to what problem though Aug 12 08:27:53 ? Aug 12 08:30:29 StingRay_: I want to keep a pointer to the two Fragments that I have in my PageView Aug 12 08:30:59 StingRay_: that's pretty much all I'm after. so that I can call functions in them from my activity Aug 12 08:31:19 well how is that going to work ? Aug 12 08:31:28 any adapter has a dynmic reference Aug 12 08:31:31 iirc Aug 12 08:31:34 johnflux: getFragmentManager()findFragmentByTag() to get fragments by their tag Aug 12 08:31:42 it would be a big hack not to be that way Aug 12 08:31:51 danijoo: can I set the tag from the xml file? Aug 12 08:31:58 danijoo: or it is done in code? Aug 12 08:32:00 no, and wont work in an adapter Aug 12 08:32:14 adapter in a pager rather Aug 12 08:32:25 like I said, the references are weak Aug 12 08:32:33 StingRay_: it works in adapter. adapters set tags.. give me a second I have this in one of my projects.. Aug 12 08:32:48 it does it of viewID Aug 12 08:32:55 but they are not constant Aug 12 08:33:02 cause I think I did it Aug 12 08:33:07 somewhere Aug 12 08:33:44 but anyways, sounds like you should not be using an adapter at all johnflux Aug 12 08:33:47 okay the fragment tags are "android:scwitcher:ViewpagerId:fragmentPosition" Aug 12 08:34:03 ViewPagerId is what you get vrom viewPager.getId() Aug 12 08:34:10 Hi! I use a camera intent to record video. I don't want the videos to appear in the gallery but only want to use them in my app. How to do that? Aug 12 08:34:19 and position is the fragment position in the pager counting from 0 Aug 12 08:34:45 StingRay_: a view pager requires an adapter though, right? Aug 12 08:35:01 hello to everyone. Is it a good solution to setcontentview according to the getintent data in onCreate? Aug 12 08:35:03 no, it requires something to populate it Aug 12 08:35:25 you do that in getView, but you can add paging between 2 elements witout and adapter I think Aug 12 08:35:36 addItem ? cant remeber Aug 12 08:36:06 but you can still use adapter, just feed it a list of fragments that you have in the activity Aug 12 08:36:13 rathe than creating them inside the adapter Aug 12 08:36:16 rather* Aug 12 08:36:21 https://gist.github.com/danijoo/e16fbaed16bc4dc42dfa Aug 12 08:36:29 thats how you can do it Aug 12 08:37:38 always check if its null because of fragment recycling though. And I think you shouldnt keep a reference on them for long because that might work against the pagers recycling Aug 12 08:38:13 danijoo: "android:scwitcher:" presumably that should be "switcher" ? Aug 12 08:38:30 johnflux: yes. See the link :) Aug 12 08:39:19 danijoo: "0" is the logically first page? rather than the first one loaded or something Aug 12 08:39:23 hi all, is there a way to write a suite setup/teardown in junit3? (since neither junit4 and testng are supported) Aug 12 08:39:37 johnflux: yeah. the first page. Aug 12 08:40:14 its the same number thats passed to getItem(int position) to get the page Aug 12 08:40:14 danijoo: do I need to do something like getSupportFragmentManager().executePendingTransactions() first? Aug 12 08:40:20 danijoo: cool Aug 12 08:40:20 no Aug 12 08:41:10 meital: you can export unity projects as android projects and then modify any code how you want Aug 12 08:41:35 in intellij,eclipse or whatever Aug 12 08:41:41 I am doing something wrong with retforit http://pastie.org/9464163 anyone can at it? Aug 12 08:41:53 *retrofit Aug 12 08:43:05 kamol: don't att query parameters like that Aug 12 08:43:26 should only be @GET("/classes/Ad) Aug 12 08:43:33 danijoo: I have no idea what is unity...any chance that you have a link that explains how to do it? Aug 12 08:43:35 kamol: isnt retrofit only for RESTful apis? Aug 12 08:43:48 and then @Query("where") Aug 12 08:44:04 meital: sorry. I misread your question and though we you were talking about unity. my bad.. Aug 12 08:44:07 heinrisch: yeah, RESTful API Aug 12 08:44:30 what? I just answered your question :P Aug 12 08:45:32 danijoo: I'm putting this in my activity onCreate: mListPageFragment = (ListPageFragment) getSupportFragmentManager().findFragmentByTag("android:switcher:" + mPager.getId() + ":" + 0); Aug 12 08:45:38 heinrisch: do you mean like this http://pastie.org/9464173? Sorry can you elovorate your question? Aug 12 08:45:39 danijoo: but it always returns null Aug 12 08:46:17 kamol: and the anonotation with GET should be @GET("/classes/Ad") Aug 12 08:46:22 johnflux: it only returns a valid fragment if the fragment is already created and attached to the screen Aug 12 08:46:35 which likely wont be the case in onCreate Aug 12 08:46:52 kamol: the query paramters are added automagically Aug 12 08:46:56 danijoo: hmm. is there a nice place to put this? Aug 12 08:47:11 johnflux: somewhere after the view is already visible Aug 12 08:47:12 danijoo: or just every time I want to get access to that variable? Aug 12 08:47:23 its nothing to put in startup Aug 12 08:47:38 heinrisch: ic Aug 12 08:47:46 heinrisch: how about now http://pastie.org/9464177 ? Aug 12 08:47:48 johnflux: how many fragments do you have? Aug 12 08:48:50 hi, I'm trying to create timestamp of 1st current month, current year: calendar.set(year, month, 1, 12, 0, 0); Aug 12 08:49:01 kamol: looks good.. but I don't know if it can handle the CategoryRequest.. I would just have @Query("where") int category Aug 12 08:49:25 before that I have int month = calendar.get(Calendar.MONTH); Aug 12 08:49:31 danijoo: 2 Aug 12 08:49:54 danijoo: hmm, I added it to onTouch, but it just always returns null Aug 12 08:50:19 but I'm getting problem with month, it should be one of calendar.JANUARY, calendar.FEBRUARY... an so on Aug 12 08:50:21 well if its only two I'd just hold a reference to it and create them on my own.. like this: Aug 12 08:50:34 http://pastie.org/9464182 Aug 12 08:51:25 danijoo: okay, and then create the fragments where? Aug 12 08:51:29 danijoo: I don't see how that solves anything Aug 12 08:51:35 in your onCreate Aug 12 08:51:46 danijoo: which means you're leaking the old fragments Aug 12 08:51:47 you create those fragments, put them in a list and make an adapter with them Aug 12 08:51:47 heinrisch: yes, but looks like the API requires `where={"category”:”5”}` as url Aug 12 08:51:47 danijoo: Aug 12 08:51:56 danijoo: johnflux basically the last thing I said Aug 12 08:52:01 :) Aug 12 08:52:14 kamol: that sounds like a terrible api :) Aug 12 08:52:28 hi i have cygwin64 eclipse64 if i download asdk andk both 64bit can i compile 32bit android apps Aug 12 08:52:38 you'd be leaking the old fragments though, no? Aug 12 08:52:43 not sure what you mean with leaking old fragments though.. Aug 12 08:52:43 heinrisch: I don’t know it is parse.com RESTful API :( Aug 12 08:52:57 danijoo: there's nothing deleting the old fragments Aug 12 08:53:03 danijoo: from before the rotation Aug 12 08:53:07 kamol: you could do @Query("where") String data, and then send in the data in json format Aug 12 08:53:25 johnflux: if you dont have a reference to them, they will be garbrage collected.. Aug 12 08:53:30 heinrisch: how? Aug 12 08:53:48 danijoo: FragmentPagerAdapter will keep a reference to them Aug 12 08:53:51 so if they are not in the list, not used by your activity, they are destroyed if your app needs memory Aug 12 08:53:54 danijoo: it keeps its own cache of getItem() Aug 12 08:54:03 johnflux: only for the offset Aug 12 08:54:15 danijoo: what do you mean for the offset? Aug 12 08:54:15 if you have 5 pages, it will keep a reference for 3 of them Aug 12 08:54:20 heinrisch: btw, here the API doc https://parse.com/docs/rest#queries-constraints  Aug 12 08:54:21 danijoo: okay right Aug 12 08:54:25 the one shown, and the ones left and right Aug 12 08:54:25 hi i have cygwin64 eclipse64 if i download asdk andk both 64bit can i compile 32bit android apps Aug 12 08:54:33 hi i have cygwin64 eclipse64 if i download asdk andk both 64bit can i compile 32bit android apps Aug 12 08:54:37 w00ps Aug 12 08:54:39 change it to @Query("where") String data, and then do listGallery(jsonObject.toString()) or something similar, where jsonObject is an object with like the one you wanted Aug 12 08:54:40 danijoo: right. so it will leak both of my fragments Aug 12 08:54:44 you can change that behaviour and tell it how many it should cache Aug 12 08:55:06 what do you mean with leak? that what you want it to do.. if it wouldnt, swiping would get laggy Aug 12 08:55:25 danijoo: FragmentPagerAdapter will keep a cache of the pages, agreed? Aug 12 08:55:34 danijoo: now when you rotate, it saves and loads that cache Aug 12 08:55:39 danijoo: it does not call getItems() again Aug 12 08:56:04 johnflux: it holds a reference yeah. Aug 12 08:56:11 and wont call getItems again, yeah Aug 12 08:56:11 danijoo: if you create new fragments in your onCreate on rotation Aug 12 08:56:18 danijoo: those new fragments will never be used Aug 12 08:56:29 kamol: are you sure that it where should not be in the put data? Aug 12 08:56:29 danijoo: because getItems() will never be called Aug 12 08:56:30 johnflux: how should the pager rotate onCreate? Aug 12 08:56:35 there is no user swiping in onCreate.. Aug 12 08:56:48 guys do you know Aug 12 08:56:53 heinrisch: only GET Aug 12 08:57:03 danijoo: what is "user swiping" sorry? Aug 12 08:57:13 Hi, i have an application with a list/search activity and a details activity. i want to store the location to an entry in the details activity. but if i call requestLocationUpdates() in the details activity it takes around 15 seconds till i got a location. how can i cut down the time? Aug 12 08:57:15 a user that "rotates" the viewpager Aug 12 08:57:27 danijoo, can you help Aug 12 08:57:30 danijoo: the user rotates the physical device.. Aug 12 08:58:01 johnflux: in this case the activity is recreated Aug 12 08:58:19 with a new viewpager, new adapter and new fragments Aug 12 08:58:23 heinrisch: I can not figure out where I can put jsonObject.toString() ? Aug 12 08:58:49 no cache unless you tell the fragments that they should persist over a rotation Aug 12 08:58:50 danijoo: right, but the adapter wil use the OLD fragments Aug 12 08:58:57 only if you tell it to.. Aug 12 08:59:03 danijoo: well it's the default.. Aug 12 08:59:11 kamol: when you call the listGallery method Aug 12 08:59:23 so not in the interface Aug 12 08:59:34 johnflux: do you have setRetainInstance(true) in your fragments? Aug 12 08:59:34 heinrisch: ic, 1 second Aug 12 08:59:56 danijoo: even with that as false, it reuses the old fragments Aug 12 09:00:15 mh thats weired. Aug 12 09:00:22 danijoo: the adapter does not call getItems() after a rotation to get the new fragments Aug 12 09:00:32 johnflux: but onCreate is called? Aug 12 09:00:40 danijoo: on the activity? Aug 12 09:00:43 yes Aug 12 09:00:46 danijoo: yes Aug 12 09:00:55 mh weired Aug 12 09:01:11 heinrisch: something like this http://pastie.org/9464208 ? Aug 12 09:01:15 conclusion, dont use fragment"state"pager :) Aug 12 09:01:25 StingRay_: OHH Aug 12 09:01:32 we are talking about state pagers? Aug 12 09:01:39 what's a state pager ? :-D Aug 12 09:01:47 nasty stuff Aug 12 09:01:48 wondering if anybody could help me with this code. I'm trying to extract audio via ffmpeg from a video. I couldn't find a Java solution otherwise I would have done that. but any help would be appreciated. The output file can't be played by any player I can find. I think it may have to be the encoding part of the process but I'm not sure. This isn't my original code but something I found on SO, I've tweaked it to fit my si Aug 12 09:01:58 i thought its a normal fragmentpageradapter. Aug 12 09:02:06 it should be Aug 12 09:02:08 :) Aug 12 09:02:15 that explains a lot.. Aug 12 09:02:21 kamol: yes, but CategoryRequest.toString() will probably not return anything that you want Aug 12 09:02:22 johnflux: dont use statepagers for that. Aug 12 09:02:26 ^^' Aug 12 09:02:29 actually it should be ArrayList and simple adapter and viewPager Aug 12 09:02:36 simple is best here :) Aug 12 09:02:42 yes Aug 12 09:02:49 StingRay_: "simple adapter" meaning which class? Aug 12 09:02:53 statepagers have a totally different usecase.. Aug 12 09:03:06 johnflux: FragmentPagerAdapter != FragmentStatePagerAdapter Aug 12 09:03:15 hi i have cygwin64 eclipse64 if i download asdk andk both 64bit can i compile 32bit android apps Aug 12 09:03:17 for everything, use the first one Aug 12 09:03:20 heinrisch: let me hard code it, first, just to make sure it works. Btw, I tought retrofit can help in that? Aug 12 09:03:24 the last one only if you know what it does. Aug 12 09:03:42 and then not even then ;) Aug 12 09:04:06 why is there noone answering my question Aug 12 09:04:09 kamol: you need some kind of json serializer or deserializer, I have not done that with retrofit, but it might work Aug 12 09:04:19 kamol: may I ask why are you not using the Android library that parse provides? Aug 12 09:04:23 thank you for the patience. I've only started on android development last week :) Aug 12 09:04:28 linuxuz3r: there is no answer. You cant choose between 32bit and 64 bit for apps Aug 12 09:04:54 johnflux: you should go though simple fragment gettings started and the adapter examples Aug 12 09:05:00 android apps ar independent of that Aug 12 09:05:03 then everything is much much clear :) Aug 12 09:05:04 are* Aug 12 09:05:22 heinrisch: I think the bottom line Android library is using that RESTful API Aug 12 09:05:26 StingRay_: I did copy a fragment example. it was working fine until I tried to rotate :-) Aug 12 09:05:31 danijoo, so if i download asdk 64bit then compile the apk is 32bit? Aug 12 09:05:37 or it doesnt matter Aug 12 09:05:48 the look at how to deal with simple activity rotate and lifecycles Aug 12 09:05:55 then* johnflux Aug 12 09:05:55 linuxuz3r: I don't think there are any 64bit android devices at all Aug 12 09:06:14 StingRay_: thanks - i'll google around Aug 12 09:06:26 johnflux: android L will bring some 64 bits compatibility Aug 12 09:06:30 danijoo: ah, cool Aug 12 09:06:42 johnflux ok thanks Aug 12 09:07:03 danijoo: what is linuxuz3r seeing then, with the 64bit asdk ? support for future devices? Aug 12 09:07:16 or it 32bit arm libraries, with 64bit host binaries? Aug 12 09:07:28 linuxuz3r: this is the development environment Aug 12 09:07:44 you can download android studio for 32bit and 64 bit like other programms too Aug 12 09:07:46 linuxuz3r: okay it's what I said then. 32 bit arm libraries, with 64bit host binaries Aug 12 09:07:57 linuxuz3r: host being your intel laptop etc Aug 12 09:07:57 heinrisch: you are right, if I hardcode String s = "{\"category\": 2}"; it works Aug 12 09:07:58 yeah I guess so. Aug 12 09:08:24 kamol: perfect :) Aug 12 09:09:15 at the moment all android devices will be in 32 bit, so the apk will be for 32bit Aug 12 09:09:27 heinrisch: thank you! I will try to dig into json serialization. Aug 12 09:11:56 wat. Aug 12 09:12:00 APKs are platform agnostic Aug 12 09:12:06 kamol: no problems, good luck! Aug 12 09:12:12 just like rest of java code - they're not "32bit" or "64bit" Aug 12 09:12:34 "bitness" in that context only comes into effect when using native libraries where you have "x86", "armeabi", "armeabi-v7a" and "mips " platforms. Aug 12 09:13:40 danijoo, i have eclipse 64 cygwin64 and ndk 64 can i make 32bit apps for it Aug 12 09:14:25 linuxuz3r: im not much into that.. just write the apps. If your environment work and give you an apk, it will work everywhere Aug 12 09:14:43 ok Aug 12 09:14:51 also what the hell has cygwin to do with that Aug 12 09:15:10 i use eclipse and it uses gcc g++ 64bit Aug 12 09:15:49 so what. cygwin is a linux terminal/bash whatever emulator Aug 12 09:16:16 it has nothing to go with android development, the android-sdk or eclipse Aug 12 09:16:41 for ndk you need gcc g++ Aug 12 09:17:10 and... ? Aug 12 09:17:26 i still dont see where cygwin kicks in.. Aug 12 09:17:30 cygwin lets you setup a userland for ndk gcc g++ Aug 12 09:18:05 oh i paniced Aug 12 09:18:25 i saw 64bit userland for ndk and 32 bit app deployment Aug 12 09:18:28 ndk Aug 12 09:18:30 you know that there is also a g++ for windows,dont you? Aug 12 09:18:34 whew Aug 12 09:18:39 no Aug 12 09:18:48 not? Aug 12 09:18:51 is it supported Aug 12 09:19:01 oh well. its been ages since i used this... :) Aug 12 09:19:54 what is it called Aug 12 09:20:14 nvm it seems there isnt. I though there was Aug 12 09:20:28 ok Aug 12 09:20:41 im so full of energy Aug 12 09:20:43 lol Aug 12 09:20:53 i dont know if i should program Aug 12 09:30:56 I am trying to programmatically add between 1 & 5 images to a fragment – so I want to avoid specifying the ImageView details in XML. This is the code so far (there are other files, but I suspect that these should sufficient to understand how I'm trying to do things) Aug 12 09:30:57 PageFragment.java http://fpaste.org/124859/14078342 Aug 12 09:30:59 page_fragment_layout.xml http://fpaste.org/124861/40783435 Aug 12 09:31:00 But I'm stuck on how to implement actually adding the images... Aug 12 09:32:04 Hi! I use ViewPager to create something like a wizard or introduction in my app. I have the activity and I can swipe through fragments -> all good. How can I put something (like a single button) that doesn't swipe with the fragments? A constant, that is always there and doesn't move with slides. I have hard time googling for it because I don't even know how to call it. Aug 12 09:33:19 Nivag: in your fragments onCreateView you create a view. if you store that in a variable, you can cast it to LinearLayout and add views to that linealayout Aug 12 09:33:33 MapMan: couldn't you just have it outside of the viewpager? Aug 12 09:34:04 ((LinearLayout) view).addView(mImageView) Aug 12 09:34:31 johnflux: im unsure(i'm a newbie), could you elaborate a little? Aug 12 09:35:02 you shouldnt use line 109 though as you want to have the view of the fragment, not of your activity Aug 12 09:35:21 johnflux: you mean to add it to the activity layout? im unsure Aug 12 09:35:37 better just use the view you create in OnCreateView and pass it to addSymbolImages Aug 12 09:36:07 MapMan: right, add it to the activity layout Aug 12 09:36:26 MapMan: so that in your activity layout, you have viewpager and your button underneath it Aug 12 09:36:39 johnflux: ok ill try Aug 12 09:38:29 danijoo: Thanks! I KNEW it must be trivially obvious, but I just couldn't see it... Aug 12 09:38:35 yw Aug 12 09:40:22 how to implement buttons like this - http://getbootstrap.com/components/#btn-dropdowns-split ? any direction or online guide will be helpful. Aug 12 09:41:14 danijoo: For centering them both horizontally & vertical, would a RelativeLayout be best? Aug 12 09:42:13 Nivag: can be done in both Aug 12 09:42:16 doesnt really matter Aug 12 09:50:58 With Retrofit I am able to cancel my AsyncTask, onPostExecute() is not invoked, but the transmission is still successful in the end, do I have to catcht this separately? Aug 12 09:51:29 johnflux: thanks, I worked it out. Initially I had ONLY the viewpager as the root element in my activity layout. Now I put relative layout, viewpager and a button. It works as I wanted it to. Isn't this against some best practices to put widgets in an activity layout? Shouldn't that reside only in fragments? I'm just making sure, sorry ;) Aug 12 09:52:48 MapMan: dunno, I only started on android development last week :) Aug 12 09:53:00 MapMan: but it sounds like a strange best practices Aug 12 09:56:20 hi, google play services actually send the score to the leaderboard and diaplys it in testing mode right? Aug 12 09:56:38 becuase this code prints "Successfully" for sending the score but the score is not updated Aug 12 09:56:44 http://hastebin.com/jusajizifu.avrasm Aug 12 09:57:24 did I do everything right in the developer console? Aug 12 09:59:20 is it possible to use EventBus inside View of Fragment? Aug 12 10:00:33 Hi all Aug 12 10:00:47 Any idea from where JSONValue is coming? Aug 12 10:00:54 I dont know what to import to get that Aug 12 10:03:45 kamol: depends on the spec of it Aug 12 10:04:03 most are yes, but some like otto need same thread etc Aug 12 10:04:19 and depends on what you mean "use" Aug 12 10:05:23 StingRay_: I have a widget in xml layout, which populate itself with data by sending http request Aug 12 10:06:09 niru: not from Android's standard libraries, I think... Aug 12 10:06:36 StingRay_: hold on a second i will share the code Aug 12 10:06:50 Hello! I have a problem. I know, this is stupid :) I have 2 sub static interfaces, and function with Thread Aug 12 10:07:14 kamol: why ? did I not answer you ? :) Aug 12 10:07:36 I try call like myFunc( new MySUP.interfaceClass(){ public int myparap = 1 } ) Aug 12 10:07:42 Leeds: actually I have a jsonobject which has some ids and names. I want to display the names in listview format. For that I need to first order the names as the jsonobject output is not in order and then present them in a list view Aug 12 10:07:55 Hmm... I have a class that extends BaseAdapter, but apperenlty that class doesn't have notifyDatasetChanged() ... Aug 12 10:08:21 Leeds: for ordering the names I googled and it shows JSONValue Aug 12 10:08:40 in function i write: new Thread( new Runnable(){ public void run(){ MySUP.interfaceClass aaa = myFinalParam Aug 12 10:08:48 and aaa is null ^( Aug 12 10:08:49 Syzygy_: what adapter does ? Aug 12 10:09:09 actually nevermind, I have barely woken up yet... found my error. Aug 12 10:09:33 StingRay_: sorry, I just want to confirm it http://pastie.org/9464403 Aug 12 10:09:42 gonna say they all do/should and all come from base I think Aug 12 10:09:44 might be I do use it wrongly Aug 12 10:09:48 danijoo: I used android:gravity="center" thanks Aug 12 10:09:54 niru: a JSON Object is unordered - if you want to order it, you probably want to copy the data into an ordered structure... Aug 12 10:10:10 StingRay_, ListAdapter doesn't have it Aug 12 10:10:34 and I was autoboxing from my adapter to a listadapter Aug 12 10:10:50 ah Aug 12 10:11:16 StingRay_: thank you, I got it Aug 12 10:11:35 Nivag: no idea about any of that, no idea what that view/adapter is, or what event bus your using… Aug 12 10:11:37 sorry Aug 12 10:12:40 Leeds: so it should be a JSONArray Aug 12 10:12:48 which is ordered Aug 12 10:12:56 if that's what you want, yes Aug 12 10:13:27 Please check my code Aug 12 10:13:28 http://pastie.org/9464444 Aug 12 10:14:00 Bug in like 21. Why variable is NULL ??? Aug 12 10:14:08 pfn: I caught your advice late last night re mapping dpi value in metrics to a a string name. Yeah : very good. Ive done it that way (use a values-{ldpi.mdpi, xhdpi} string). Nice one. Aug 12 10:14:42 Leeds: for that can i use JSONArray obj=(JSONArray)jsonobject.getString(); Aug 12 10:14:54 I mean converting a jsonobject to jsonarray Aug 12 10:14:56 ' Aug 12 10:14:58 ? Aug 12 10:15:11 um, they're different things Aug 12 10:16:39 strangely, it looks like getString() returns a String, not a JSONArray Aug 12 10:17:18 Leeds: may be you can look to my code? :) http://pastie.org/9464444 Aug 12 10:17:33 Jov: nope Aug 12 10:18:34 * Nivag chuckles Aug 12 10:18:47 StingRay_: no worries! Aug 12 10:18:58 niru: https://code.google.com/p/google-gson/ Aug 12 10:19:09 what I use Aug 12 10:19:35 :( Aug 12 10:23:13 Guys :) Aug 12 10:23:30 niru: unless you're planning on outputting the data to JSON, why not convert it to a more native format Aug 12 10:24:36 How to place variable to Thread (final modificator or making class with interface not helps :( ) Aug 12 10:25:20 You mean ThreadLocal? Aug 12 10:25:39 http://pastie.org/9464444 Aug 12 10:25:51 Now. More simply Aug 12 10:25:56 Leeds: native format like string? Aug 12 10:26:03 sure, strings, why not Aug 12 10:26:11 I don't know why it don't work now Aug 12 10:26:37 Leeds: String output=frms.getString("1001"); Aug 12 10:26:57 System.out.println(output); Aug 12 10:28:09 if that's what your ultimate goal is, yay Aug 12 10:29:02 niru : json is a string for all intents and purposes.... ;) Aug 12 10:29:35 Hey guys, just wanted to ask, if this possible. To zoom image and draw dots on it ? you know like a minimap. Aug 12 10:29:57 manipulating a bitmap in android? Draw on it. Impossible. Aug 12 10:30:11 (I was joking) Aug 12 10:30:53 You need to be a lot more specific Leftas but of course you can scale images and of course you can draw to a bitmap. Aug 12 10:31:26 rgr: yes :( Aug 12 10:31:33 why :( Aug 12 10:31:43 Oh okay :D Because I am just first time working with graphics. I am reading book now, about android graphics. Also I need to use canvas ? rgr, Sorry, I am not at writing :/ Aug 12 10:31:45 JSon is so incredibly easy and also convenient. Aug 12 10:31:55 a* book. Aug 12 10:32:25 Leftas: then you would know from the book that its possible. Its also covered in detail in the official API docs and guides. A google of "android canvas bitmap" will help you further.... Aug 12 10:32:48 rgr, thanks! Aug 12 10:33:06 Its nothing. I'm a google expert...... ;) Aug 12 10:35:12 btw image should be bitmap? about the book, I didn't reach that section I think(it's about openGL). Aug 12 10:37:03 google is over there. Your Qs are so vague and lacking any real definition its impossible to say. Read the docs and then ask specific Qs. I told you what to google. Pay particular attention to answers in stackoverflow. Aug 12 10:37:40 OK, sorry :/ Aug 12 10:37:49 (ignoring 90% of the answers added five years later by noobs getting things wrong : always check for most ticks and accepted answer) Aug 12 10:38:54 But here's another google that took me 2 seconds and incorporates your Q : https://duckduckgo.com/?q=drawing+to+a+bitmap+in+android&t=debian Aug 12 10:39:43 Thanks, sometimes I forgot to "google it". Aug 12 10:41:45 Is there a way to prevent animations while switching activity? Aug 12 10:46:07 override pending transition stuff Aug 12 10:46:09 I think Aug 12 10:46:28 on the intent Aug 12 10:47:02 since you're switching activity why do you need to? (query as I'd like to know) Aug 12 10:49:47 rgr: different feel Aug 12 10:50:15 I do that if someone sets the ios7 theme, I use swipe transitions Aug 12 10:51:20 rgr, Activity B has Activity A as a blurred background, and the transition isn't that great in this case Aug 12 10:52:36 ah. Aug 12 10:52:45 these are standard view animations? Aug 12 10:53:22 or do I misunderstand? Are you talking about the change animation rather than items on Activity A animating? Aug 12 10:53:33 the change animation Aug 12 10:53:39 Aha yeah. Aug 12 10:54:43 (Today's task is to get to grips with androids "newish" properties animation api) Aug 12 10:55:14 StingRay_, apperently there's a FLAG_ACTIVITY_NO_ANIMATION for that exact purpose. Aug 12 10:55:44 yeah I know,well I have used, just could not remember the details, just the concept/name :) Aug 12 10:55:58 rgr, I wish I could get started with Material :( Aug 12 10:56:23 Material ? Aug 12 10:56:40 oh you mean the activity transition objects ? Aug 12 10:56:45 I picked a "learning project" which would incorporate most of the major android paradigms over a period of three weeks. Its going well atm. Aug 12 10:56:52 new GUI thingy for android L Aug 12 10:57:01 Material is not a new UI thingy Aug 12 10:57:03 off to get my new PC .. woot! Spaeter.... Aug 12 10:57:13 tis a fluffy metaphor that actually is nothing at all :) Aug 12 10:57:13 I thought it was a new UI thingy D: Aug 12 10:57:36 pastel colors + dropshadows != something new Aug 12 10:57:56 but yeah the activity object/entity transition stuff, that is new Aug 12 10:57:59 if he uses german he could at least use the right characters ... # Aug 12 10:58:01 ä Aug 12 11:02:21 Syzygy_: im german and dont have an ä on my keyboard, too.. Aug 12 11:02:33 because german keyboards are a pain for programming.. Aug 12 11:02:43 I know D: Aug 12 11:02:53 never bothered to get an english keyboard though. Aug 12 11:03:17 I forced myself to switch. After some time its programming heaven compared to german layout. Aug 12 11:04:01 but stupid to make special cases.. for ä the combination is "right alt" + u + a Aug 12 11:04:42 was a pain to write my bachelor thesis with that :D Aug 12 11:04:56 hello. I change the language of my app programmatically, but when an activity is being recreated due to orietation change or back pressed the language is being restored to the default. how can i prevent this? Aug 12 11:05:37 onSaveInstanceState() Aug 12 11:05:50 just like any data you would want to persist Aug 12 11:05:59 danijoo, I'll probably write mine in english anyway Aug 12 11:06:13 this will also work for back button Aug 12 11:06:22 ? Aug 12 11:06:31 Syzygy_: Computer science? Aug 12 11:06:37 yeah Aug 12 11:07:00 well i guess english thesis are common there. In chemistry they aren,t (luckily) Aug 12 11:07:09 resu01: it works for the activity being paused so erm, not if it's destroyed Aug 12 11:07:09 "Medieninformatik und Visual Computing" Aug 12 11:07:32 that's my problem Aug 12 11:07:34 Trust me I'm a chemist :o Aug 12 11:07:34 resu01: go have a read about android lifecycle Aug 12 11:07:44 danijoo, isn't that bad for international information exchange? Aug 12 11:07:48 rotate = re-created Aug 12 11:07:56 press back = destroyed Aug 12 11:08:25 if you wanted to store something long term look at sharedPreferences Aug 12 11:08:28 Syzygy_: yes it is. but german is one of the "big chemistry nations" so german thesis are often fine.. Aug 12 11:08:31 all in the docs about storage Aug 12 11:08:39 at least post-doctor Aug 12 11:08:56 StringRay_ i know about activity lifecycle and sharedPreferences. Aug 12 11:09:06 meh, I would still prefer an "international" language Aug 12 11:09:14 Hey all… When using a Handler with a Callback, that has a reference to an Activity. Doesn't that lead to memory leaks? Aug 12 11:09:21 nobody will read a bachelor thesis again anyways :S Aug 12 11:09:30 guess that's true Aug 12 11:10:02 Although my title sounded quite professional :D One of those nobody understands that isnt into it Aug 12 11:10:23 Is there a way to 'destroy' a Handler when the Activity is destroyed? Aug 12 11:10:38 Lachezar, override onDestroy() Aug 12 11:10:50 danijoo, now i'm interested, what was the title? Aug 12 11:10:54 OnDestroy is not always called though Aug 12 11:11:41 Syzygy_: Yes, but how do I destroy the Handler? There is no close() or release() or destroy() method. Aug 12 11:12:22 danijoo: Unless the process is killed is there any other way the onDestroy() to *not* be called? Aug 12 11:12:23 set it to null, the garbage collector should take care of the rest Aug 12 11:12:26 in english: "Cross-conjugation of peptides by site-specific azo coupling" Aug 12 11:13:02 Lachezar: no. but killed processes are common in android Aug 12 11:13:03 Syzygy_: Nah. The Handler is referenced by the Thread Looper… Nulling the reference will not help. Aug 12 11:13:38 danijoo: Killed process means the process memory is reclaimed. I do not have to care for memory leaks then, do I :) Aug 12 11:14:04 Not If your leak is in the same process :) Aug 12 11:14:49 danijoo: Well. The Activity, The Main Thread, The Main Thread Looper, The Handler and the Handler.Callback are all in the same process. Aug 12 11:15:26 I know some of those words danijoo... almost interested if i would fare better in german. Aug 12 11:16:01 "Kreuzkonjugation von Peptiden durch seitenspezifische Azokupplung"? :p Aug 12 11:16:07 danijoo: My concern is that the process main thread holds a reference to the looper, and the looper has references to handlers and handlers have references to the callbacks and the callbacks have references to the Activities… Aug 12 11:16:21 Lachezar: sounds like a mess.. :D Aug 12 11:16:26 not much better Aug 12 11:16:30 indeed Aug 12 11:16:46 it didnt work anyway. :D result was "not possible at all" Aug 12 11:17:08 danijoo: So? What can I do about that? How can I destroy the handlers? Aug 12 11:17:23 Lachezar: sorry no experience with handlers Aug 12 11:17:36 I could just throw hin that OnDestroy is a dangerous field :p Aug 12 11:17:37 in* Aug 12 11:24:06 ah crap, the thesis that i wanted to do for my bac isn't offered anymore D: Aug 12 11:24:36 what semester are you? Aug 12 11:24:47 8th Aug 12 11:26:03 how do I set the weight on an ImageView programmatically? Aug 12 11:26:59 been going round in circles trying to figure it out... :-) Aug 12 11:27:26 Nivag: LayoutParams params = new LinearLayout.LayoutParams(...); Aug 12 11:27:35 params.weight = int Aug 12 11:27:44 view.setLayoutParams(params) Aug 12 11:29:40 hi, I have this code that runs "adb devices" - http://pastebin.com/N7PFKZ8W Aug 12 11:29:59 If I run it from the cmd, I get the devices, but if I run the code - the devices list is empty Aug 12 11:30:03 how is it possible? Aug 12 11:37:08 meital: Security? Aug 12 11:37:25 meital: Do YOU run the script, or is it another user? Aug 12 11:37:35 I'm running it Aug 12 11:40:41 Hi! My Settings Activity is exiting the App upon navigating "back" per Back-Button or "up" per ActionBar (although I've set a parent in the manifest). No idea why it does this and I've been searching for hours now :( Aug 12 11:41:23 I'm starting it per startActivity(intent) but running startActivityForResult doesn't work either. Aug 12 11:42:30 meital: Works for me. Aug 12 11:42:54 =\ Aug 12 11:43:54 it's the same problem if I'm using "Process pc = runtime.exec(new String[] {"adb", "devices"});" instead Aug 12 11:44:46 how can I make sure that eclipse runs it with my user? Aug 12 11:46:12 MuffinFreeze: Check whether you are not erroneously finish()-ing your activity when starting the settings activity. Aug 12 11:47:33 meital: You'll have to check deeper. Probably debug your code. The code in the pastebin works (I renamed the method to main and changed arguments to String[]) Aug 12 11:47:36 Lachezar: <3 that fixed it! I was running finish() after starting the Activity Aug 12 11:48:07 Lachezar: ok, thanks Aug 12 11:48:08 MuffinFreeze: You should not do that. Only do that if you want to REPLACE the current activity with another. Aug 12 11:48:45 It was supposed to only work with the other Top-Level Navigation Hubs Aug 12 11:51:43 danijoo: I used: Aug 12 11:51:44 LinearLayout.LayoutParams layoutParams = Aug 12 11:51:46 new LinearLayout.LayoutParams(widthBitmap, heightBitmap, 1); Aug 12 11:51:47 imageView.setLayoutParams(layoutParams); Aug 12 11:51:49 Is there a better way, than the above? Aug 12 11:52:17 not if it works Aug 12 11:53:01 it works, but I'm trying to improve my understanding, so if the situation changes, I can better adapt Aug 12 11:53:31 its fine. althoguh I prefer defining weights in xml Aug 12 11:56:49 Nivag: layout should be in XML. You can use the LayoutInflater to access these layouts in code, although it is rarely needed. Aug 12 11:57:01 Possibly better then if I use fragments with a FrameLayout containg a ViewImage, so that I can use an XML descriptor, then create multiple instances? Aug 12 11:57:13 Lachezar: He wants to add a dynamic number of views. Aug 12 11:57:30 Nivag: It will save you trouble when you have to change the layout between device configurations. Aug 12 11:58:30 I learnt programming before XML became a standard! :-) Aug 12 11:59:46 I think I'll try & use XML as much as possible, even though that does not come naturally to me! Aug 12 12:00:17 Nivag: sign of the times. And if you get accustomed to it it does provide benefits. Aug 12 12:01:46 However, I think the following can't be done in XML: Aug 12 12:01:48 float weightSum = numberOfImages + 2; Aug 12 12:01:49 linearLayout.setWeightSum(weightSum); Aug 12 12:02:55 first came across XML when learning Java Enterprise stuff years ago... Aug 12 12:02:57 Nivag: I'm marginally interested in why would you need that. If you explain what you want to achieve. Maybe there is a better solution? Aug 12 12:05:49 Hi there, I’m looking for a solution to pick a contact from Google Glass, I have read that is not possible yet, someone has found some other way to retrieve user’s contacts ? I want to send an email to a user’s contact from Google Glass Aug 12 12:05:51 Lachezar I am designing/implementing a screen to display symbols that match a vision test page for children. There are several tests with different characteristics. The one I'm starting with has 5 images per page. Aug 12 12:07:25 Nivag: GridView not working for you? Aug 12 12:11:04 Gridview for 5 items? And I think a vision test shouldnt be scrollable. Aug 12 12:13:13 danijoo: The number of items is rarely relevant, although one can probably do a better lay-out manually *IF* the number of items is fixed upfront. But Nivag shows code that suggests that the number of items is not known. Aug 12 12:13:17 I think (I may be wrong!) that my way is simpler. How would GridLayout (which I assume you meant) cope with a variable number of images spaced nicely? Aug 12 12:13:49 Lachezar: If I remember right he told me yeseterday that it wont be more then 5 images ever Aug 12 12:14:33 Nivag: A gridlayout works with an adapter like a viewpager or listview Aug 12 12:14:36 Nivag: I meant GridView, not GridLayout. It's a component that lays out sub-components in a grid from an adapter. Much like a ListView but arranges items in a grid, not stacked vertically (or horizontally). Aug 12 12:15:03 Lachezar: I will RTFM Aug 12 12:16:35 eyo Aug 12 12:17:58 I think a GridView is way too complicated for this page, but could be useful in other situations I can see - but just not for the current prototype Aug 12 12:19:03 Nivag: I understand. Now again. Why would wou want to do weights in code? You 'could' add blank elements to add whitespace if you need... Aug 12 12:22:24 So when I rotate the screen, my activitiy is killed and restarted Aug 12 12:22:36 how do I save and restore variables? Aug 12 12:22:57 I'm really just after the keywords to google for this :) Aug 12 12:22:58 onSaveInstanceState johnflux Aug 12 12:25:11 any idea what might cause my device to go offline? at least my logcat and other tools say "device offline" when it's most definitely still connected to the cable and the screen is active Aug 12 12:25:15 danijoo: thank you :) Aug 12 12:25:37 Syzygy_: I just had that problem, and simply replaced the usb lead Aug 12 12:25:39 Lachezar: I think I can put the individual weights into XML by defining a fragment & then programmatically creating instances & adding them to the page, but I think I still need to set the weightSum for the LinearLayout programmatically. Aug 12 12:25:41 Syzygy_: and that fixed it Aug 12 12:25:52 Hello guys Aug 12 12:25:58 Please help http://pastie.org/9464444 Aug 12 12:26:31 Line 21. Why aaa is null? Aug 12 12:26:38 danijoo: it will be called after onCreate right? Aug 12 12:26:48 the docs.. Aug 12 12:27:17 johnflux, uuhm.... what is a lead? Aug 12 12:27:26 I've got a "music player", how do I keep the app from closing when that thing is swiped off the recents list? Aug 12 12:28:00 Syzygy_: the physical usb cable Aug 12 12:28:13 ah ok. Aug 12 12:28:35 so basically I should just get a new one... even though I just bought this one :( Aug 12 12:28:48 Syzygy_: well it's what worked for me Aug 12 12:28:56 Syzygy_: maybe you have a different problem :) Aug 12 12:29:14 Syzygy_: but you can never have too many usb cables. if this is really your only one, then yes, get another one Aug 12 12:29:45 I'll try with my quality one for a bit and see if it disconnects Aug 12 12:30:19 danijoo: hmm, I'm reading the docs, but I think onSaveInstanceState is an overkill.. basically I want to save the current filter that the user has entered Aug 12 12:30:37 danijoo: but it's not that important - not important enough to save fully etc Aug 12 12:30:47 O.o Aug 12 12:30:56 saveInstanceState is exactly meant for your usecase. Aug 12 12:30:59 no its not overkill. its one 5 line of code.. Aug 12 12:31:08 I have a device connected to my computer, and I want to copy a file from the device to my computer - but I want to do it from the test apk, so I can't use adb...any idea how to do it? Aug 12 12:31:10 iffa: service Aug 12 12:31:12 okay :) Aug 12 12:31:14 johnflux, are there any reasons for not using it though? I doubt it's much of a performance impact Aug 12 12:31:35 Syzygy_: well, it might be confusing if they close the app, come back a few days later, and it still has the same filter? Aug 12 12:31:35 Lachezar: I know that, but I don't know how it would work Aug 12 12:31:45 I've got a sticky service already, and ive got an ongoing notification and stuff Aug 12 12:31:45 Syzygy_: just thinking along those lines Aug 12 12:31:58 iffa: A service that plays music and activity that controls the service. Aug 12 12:31:58 johnflux, only if they don't close the app Aug 12 12:31:58 oops Aug 12 12:32:10 Lachezar: that is my setup AT Aug 12 12:32:10 M Aug 12 12:32:27 Lachezar & others: Thanks, it is about 12;30am here, time for me to go to sleep. Aug 12 12:32:30 bye Aug 12 12:32:39 Nivag: night. Aug 12 12:32:56 iffa, then it shouldn't stop playing music unless you stopped it manually or something else requested the sound service Aug 12 12:33:03 iffa: The service probably belongs to a different process. Aug 12 12:33:48 Lachezar: what do you mean? Aug 12 12:33:56 iffa: And I am not sure why the playback would stop in the first place. Does the activity have any 'stop-playback' functionality in the life-cycle methods? Aug 12 12:34:52 iffa: http://developer.android.com/guide/topics/manifest/service-element.html check the 'process' attribute. It basically means that the service will be in a different process than the UI. Aug 12 12:35:15 iffa: I might have been bad, but I've used that to keep my service running even if the UI crashes. Aug 12 12:36:00 iffa: But honestly I am not sure the service would be stopped if you swipe the app off the recents. Aug 12 12:41:15 danijoo: awesome works perfectly, thank you Aug 12 12:41:45 StingRay_: I now have a nicely working FragmentPagerAdapter, thank you Aug 12 12:42:20 StingRay_: In the end, I switched to FragmentPagerAdapter, and in onCreate() used: mListPageFragment = (ListPageFragment) getSupportFragmentManager().findFragmentByTag("android:switcher:" + mPager.getId() + ":" + 0); Aug 12 12:43:02 danijoo: btw, using the getSupportFragment.. works now that I switched to FragmentPagerAdapter Aug 12 12:43:18 danijoo: it no longer just returns null, like it did with FragmentStatePagerAdapter Aug 12 12:43:23 yep Aug 12 12:59:17 hi, google glass has a emulator? Aug 12 12:59:27 can i develop withou a device google glass? Aug 12 13:00:35 wasnt it harder to log into irc then googling "google glass emulator"? Aug 12 13:06:28 LOL Aug 12 13:07:44 thanks men Aug 12 13:08:04 why have a irc channel?? Aug 12 13:08:14 all is on google LOL Aug 12 13:09:58 t0th_-: for interesting and non trivial questions Aug 12 13:10:18 bla bla bla Aug 12 13:10:54 this discussion is funny Aug 12 13:23:41 can I set an onInput or something along those lines on an edit text? if so, how? Aug 12 13:23:46 Hello guys! Help me please with problem Aug 12 13:23:51 http://pastie.org/9464444 Aug 12 13:24:28 I try place variable to Thread(Runnable)run function Aug 12 13:24:36 but my variable is null Aug 12 13:24:51 Is it legit to retrieve field instances from Android Library classes via reflection? Aug 12 13:25:27 platzhirsch: it for me? Aug 12 13:25:59 Jov: I mean, does it implicate things like required app permissions or similar or isn't it possible at all because the library runs a harsh Security Manager Aug 12 13:26:29 Syzygy_: yeah, sorta, TextWatchers I think Aug 12 13:26:48 you get onEdit postEdit etc, again… I forget specifics :) Aug 12 13:27:14 platzhirsch: Hm. I make something equal in another projects and all works alright. Why not it not work? Aug 12 13:27:25 Jov: good :) Aug 12 13:28:02 StingRay_, thanks, found it. Aug 12 13:28:17 platzhirsch: may be I not fully understand you? My english is very bad :) Aug 12 13:28:28 Jov: no worries, should be alright Aug 12 13:28:28 Annoying that it's addTextChangedListener instead of setListener like always... who came up with that -.- Aug 12 13:30:49 platzhirsch: And. May be you know, how solve this problem? :-[ Aug 12 13:30:57 Jov: I do Aug 12 13:31:19 guess it's add instead of set because you can have several TextChangedListeners... Aug 12 13:31:20 platzhirsch: Oh! Thanks! Aug 12 13:31:36 Syzygy_: simple, yeah...many Aug 12 13:32:07 not a fan of the TextView -> EditText stuff in android Aug 12 13:32:53 I'm actually trying to be able to type into a textview right now... but I guess I'll just have to define a new layout file for that case -.- Aug 12 13:33:33 since apperently you can't focus an EditText that hasn't been added to anything yet Aug 12 13:33:57 focus is a UI term Aug 12 13:34:17 so yeah, that would be odd to …. focus an instance/variable/handle :) Aug 12 13:35:15 Does anyone know where the unlock icon is stored in android 4.4.4? Not the unlock shortcuts, but the unlock slider itself... Aug 12 13:35:36 my plan was to open the keyboard, type into that special edittext and on changed add it to the view. Aug 12 13:35:48 but I guess that's stupid Aug 12 13:38:00 well depends Aug 12 13:38:06 whats the reason/purpose ? Aug 12 13:38:51 you can very well focus a view that is attached, but not visible, either hidden or offscreen or clipped I guess Aug 12 13:39:58 I'm trying to dynamically add a textview (by now I settled for edit text) and let the user set some text in that Aug 12 13:40:46 dynamically add ? you mean someView.addView(new TextView(this)) ? Aug 12 13:41:12 yeah Aug 12 13:41:30 so whats the problem? Aug 12 13:42:38 can't give the edittext focus apperently. (focusing an edit text opens the keyboard, right?) Aug 12 13:42:53 not if you tell it not to Aug 12 13:43:05 there are window flags to say dont Aug 12 13:43:12 bah, soft buttons make edge swipes so much more troublesome :( Aug 12 13:43:40 getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) Aug 12 13:43:57 that would allow and inital edittext to have focus, blinking cursor but no keyboard Aug 12 13:44:13 a second tap opens KB Aug 12 13:44:16 yeah, I want the keyboard to be visible though. Aug 12 13:44:37 let me paste my code real quick Aug 12 13:45:15 InputMethodManager may let you do it Aug 12 13:45:25 you can force show based on a valid view I think Aug 12 13:45:38 http://pastebin.com/jSfuWcDQ Aug 12 13:45:44 Hello. I have a textView in a Fragment. How can I access it so that I can call setText(...) on it? getActivity().findViewByID(...) gives me null Aug 12 13:45:45 InputMethodManager.SHOW_IMPLICIT Aug 12 13:46:03 no keyboard opens when I do that, no blinking cursor in the edit text Aug 12 13:46:21 vedu: if the textview is in a fragment, you should access it within the fragment Aug 12 13:46:38 Estel: how? Aug 12 13:46:45 In onCreateView() you'd do rootView.findViewById(...) to get it Aug 12 13:47:04 Estel: right. Thanks :) Aug 12 13:47:20 brb Aug 12 13:47:32 Syzygy_: http://pastebin.com/VWc0L6NL Aug 12 13:50:02 Syzygy_: actually http://pastebin.com/X431zm9T Aug 12 13:52:25 what's the difference between the two? first one worked btw Aug 12 14:02:33 hello anybody have experince in MMS forwarding without using an INTENT Aug 12 14:02:35 ? Aug 12 14:05:05 platzhirsch: You are still here? Aug 12 14:06:19 any good alternatives to a SearchView? Aug 12 14:08:49 Depends what you want it to do? Aug 12 14:10:09 neat android does ship with an SQLite.JDBCDriver Aug 12 14:12:06 https://android.googlesource.com/platform/libcore/+/gingerbread/sqlite-jdbc/src/main/java/SQLite/JDBCDriver.java Aug 12 14:12:13 old, though Aug 12 14:21:41 hello. when I try to call replace(fragmentId1, fragment2) fragment2 just gets added to my activity and fragment1 is not removed. What am I doing wrong? Aug 12 14:29:57 I'm playing with adding LayoutTransition to a ViewGroup. I want views to fall down from top of the ViewGroup to their intended position when calling addView... anyone done something like this? Aug 12 14:38:26 Guys! Help me with reflections http://pastie.org/9464444 Aug 12 14:38:47 Line 21. var aaa is NULL Aug 12 14:43:57 Hi guys. A quick question why should my class implement let's say a OnClickListener when i can just use new OnClickListener(..) ? Is it a good practice to implement or are there any other benefits? Aug 12 14:45:57 skulltower: depends on how much code there is in the listener and what kind a logic it uses Aug 12 14:46:03 skulltower, using an existing object is generally always preferrable over creating new ones Aug 12 14:47:09 if you care a lot about memory usage, but in most cases understandable and clean code is the most important Aug 12 14:47:23 skulltower: read http://stackoverflow.com/a/10968689for an in-depth discussion on it Aug 12 14:47:55 Well if I set the listener only once i fail to see how new OnClickListener would be bad. Furthermore multiple implements would look bad imo as you would need to search through the methods instead of having the code where you want it to be Aug 12 14:48:18 snowpong: dead link Aug 12 14:48:41 heinrisch, remove "for" Aug 12 14:48:42 trying again http://stackoverflow.com/a/10968689 Aug 12 14:50:09 skulltower, or you could be ultimately perverse - create a new listener and then simply use it to forward the call to the outer method :p Aug 12 14:51:27 hi everyone Aug 12 14:51:30 I don't understand the link snowpong provided. How does it have anything to do with implementing interfaces Aug 12 14:52:02 i have a grid layout and it looks like this http://postimg.org/image/uqfn7crnd/ but i want it to look more like this http://postimg.org/image/dr6os3gft/ can anyone help me Aug 12 14:52:36 im not talking about the colours or anything, just the orientation of the layout Aug 12 14:52:51 skulltower: you were essentially asking why you shouldn't use anonymous inner classes Aug 12 14:53:42 skulltower: when you do new OnClickListener you are creating an anonymous class with no name, and it's inside the parent class (typically the activity for android) - the problem is among other things, it might create memory leaks Aug 12 14:54:10 skulltower: an anonymous inner class has an implicit reference to it's containing parent instance Aug 12 14:54:49 But when the parent instance is destroyed it's eligible for GB as well as the anonymous class are they not? Aug 12 14:54:52 hm, must be why android lint always complains when I extends Thread or Handler as an anonymous class Aug 12 14:55:09 skulltower, not necessarily - it's a slippery slope Aug 12 14:55:39 im having a really weird issue where expanding the searchView makes stuff in the action bar disappear, only on our tablet, and only when in master-detail (http://stackoverflow.com/q/25267555/1747491) Aug 12 14:56:40 ravilov, snowpong let's just say I am too lazy to get deeper into this, if this doesn't hurt readability and cleanness of the code, is it preferred to implement interfaces ? Aug 12 14:57:04 Do whatever is easiest to maintain Aug 12 14:57:37 There's no issue with using anonymous inner class listeners on views Aug 12 14:58:06 hello Aug 12 14:58:53 also here is the code for the XML Layout Aug 12 14:58:55 http://pastebin.com/96PXfVXQ Aug 12 14:59:15 hey new to this chat Aug 12 15:00:30 Can someone tell me, why, when making ViewGroup, my "newRow" doesn't get selected if I used newRow.setSelected(true)? http://pastebin.com/eGZ24g62 Aug 12 15:00:52 (row 80 states that) Aug 12 15:02:14 skulltower: I've run into several edge cases where the anonymous inner class (implementing for example onclick) was a problem - both wrong behavior and memory leaks, I usually stay away Aug 12 15:04:22 does anyone have any comments regarding my issue Aug 12 15:06:36 is there any kind of sanity check test tools you can build alongside android, to test the fundamentals of a build work? Aug 12 15:08:18 snowpong, what edge cases? Aug 12 15:08:34 I can't see any case where something that lives longer than the Activity would need a reference to a click listener Aug 12 15:10:45 Also I don't understand how can implementing an interfacing and creating a new "anonymous class" be any different and lead to different results >.> Aug 12 15:10:58 Is java really that "abstract" ? Aug 12 15:12:22 no Aug 12 15:12:31 java is quite straightforward without hidden magic Aug 12 15:12:42 try ruby, its pure agic Aug 12 15:12:43 *magic Aug 12 15:13:04 ruby's open classes are pure bullshit Aug 12 15:13:19 pfn: Lambdas in Java 8 are more magic than previously, but yeah... Aug 12 15:13:48 flan3002, the rules behind the lambdas are pretty straightforward Aug 12 15:14:01 whats the easiest thing to start coding from scratch ..i used to add skins to doom 3 with the aid of softwar Aug 12 15:14:18 _without Aug 12 15:14:21 dopeybull: learn a programming language? Aug 12 15:14:24 php is pretty easy from scratch Aug 12 15:14:49 Hi everyone Aug 12 15:14:53 i have a grid layout and it looks like this http://postimg.org/image/uqfn7crnd/ but i want it to look more like thishttp://postimg.org/image/dr6os3gft/ can anyone help me? im not talking about the colours or anything, just the orientation of the layout. also here is the code for the XML Layout : http://pastebin.com/96PXfVXQ Aug 12 15:15:12 pictures to an input code is easy but the rest i need to learn Aug 12 15:16:13 making something stable is harder Aug 12 15:17:09 HelplessJub, so make the outer container match_parent, and you're basically done? Aug 12 15:17:28 pfn: I didn't argue that, but the implementation (LambdaMetaFactory and stuff) is deeper than those of other language features. Aug 12 15:17:48 sure, but it's not so much magic Aug 12 15:18:21 SimonVT: one example: the owner of the listener stores it as a non-weak reference and lives longer than the activity (for example a sensor like gps or accelerometer) now if you implement the listener as an anonymous inner class of the activity the activity is not garbage collected when it's finished since there is an implicit reference to it Aug 12 15:18:26 I want to help my sister build a website with her cake business and somehow put a 3d moveable cake on site so people can make the own design with size perimeters Aug 12 15:18:41 snowpong, that's programmer fault Aug 12 15:18:44 what's your point? Aug 12 15:18:44 snowpong: That's not an edge case Aug 12 15:18:51 That's just how anonymous inner classes work Aug 12 15:18:51 and yeah, not an edge case Aug 12 15:19:07 anonymous classes strongly reference their containing class Aug 12 15:19:08 That's hardly a reason to never use them Aug 12 15:19:26 maybe his point is, it's too error-prone for the inexperienced Aug 12 15:19:35 ravilov: thanks Aug 12 15:19:40 everything is error prone for the inexperienced Aug 12 15:19:49 * ravilov agrees there are times when inner classes come in really handy Aug 12 15:19:54 I've used them here and there Aug 12 15:20:07 pfn: That would get rid of my initial TextView and also i just want the buttons to evenly distribute themselves over the remaining space Aug 12 15:20:16 I generally pick whatever I feel would work best Aug 12 15:20:27 HelplessJub, then set the layout parameters properly to do what you want Aug 12 15:20:43 use various combinations of weight, height and width to make it do what you need Aug 12 15:20:52 if there's a bunch of buttons in the main layout for an activity, then it makes sense for the activity to implement the listener and I just pass "this" Aug 12 15:20:53 pfn: how can i do this Aug 12 15:21:01 HelplessJub, by setting the parameters properly Aug 12 15:21:12 and using your brain and reading the documentation of the layouts you're using Aug 12 15:21:55 pfn: thanks your condescending comments really helped me out. Aug 12 15:22:11 I gave you an answer earlier Aug 12 15:22:14 you didn't accept it Aug 12 15:22:17 you don't elaborate Aug 12 15:22:22 the only thing left is condescesion Aug 12 15:22:28 condescension Aug 12 15:28:39 There's another thing I don't understand. Inside of DialogFragment's onCreateView, I am checking the width of a List it returns 0. But if I put it in a handler.postRunnable it returns the correct value. Does that mean that onCreateView isn't running in the UI thread? Aug 12 15:29:28 No, it means that views are measured and laid out later Aug 12 15:30:40 The ListView I am measuring is inflated at onCreateDialog where I use setContentView. After onCreateDialog, onCreateView is called. Shouldn't it be measured by then? Aug 12 15:31:18 Nope Aug 12 15:31:27 Later, when it needs to show it Aug 12 15:31:50 I need different margin values for tablets, how do I approach this? Aug 12 15:32:59 platzhirsch, by setting values in values-qualifier Aug 12 15:33:12 SimonVT, why does a runnable show the correct value then? Aug 12 15:33:28 skulltower, because it's delaying execution until later Aug 12 15:33:30 pfn: is this still the right approach? I thought -large, -xlarge suffix is deprecated Aug 12 15:33:30 skulltower, because it runs *after* they've been measured and stuff? Aug 12 15:33:33 assuming you're posting Aug 12 15:33:43 platzhirsch, there are more qualifiers than just -large and -xlarge Aug 12 15:33:52 skulltower, you do know what posting runnables means, right? Aug 12 15:34:40 pfn, I delayed it by 1ms, does that mean the all the measuring has done in that time?? Aug 12 15:34:50 lol Aug 12 15:34:59 xD Aug 12 15:35:00 one thing you can't rely in *any* VM Aug 12 15:35:02 is timing Aug 12 15:35:07 skulltower, just because you specify 1ms as the delay doesn't mean the delay was 1ms realtime Aug 12 15:35:26 More like "wait at least 1ms before running this" Aug 12 15:35:48 So how do I know when the measuring has been done and I can get the correct width? Is there some callback? Aug 12 15:35:50 rely on* Aug 12 15:36:00 skulltower, seems to me you need to do a lot more theoretical reading on all this ;) Aug 12 15:36:01 It's a message queue.. The message that measures is just executed before yours Aug 12 15:36:08 skulltower, there's always onMeasure... Aug 12 15:36:17 there's onMeasure, there's ViewTreeObserver, etc. Aug 12 15:36:28 pfn: although it says for Android 3.2+ it's deprecated I am aiming for Android 2.3 anyway, do you know if this makes a difference then? Aug 12 15:36:43 View.OnLayoutChangeListener can probably also be used Aug 12 15:36:44 platzhirsch, 2.3 don't have any tablets worth caring about Aug 12 15:36:58 platzhirsch: use the smallets width qualifier for tablet stuff http://developer.android.com/training/multiscreen/screensizes.html#TaskUseSWQuali Aug 12 15:37:00 "deprecated" doesn't mean "you are not allowed to use it under any circumstances" ;) Aug 12 15:37:07 :) Aug 12 15:37:28 Nah, deprecated means that you should feel bad for using it. Aug 12 15:38:10 so -sw320dp, -sw480dp, -sw600dp, -sw720dp Aug 12 15:38:16 * ravilov feels bad now Aug 12 15:38:17 happy? Aug 12 15:38:36 A little. ^^ Aug 12 15:39:17 lol Aug 12 15:42:29 I just realized I have no idea why I felt bad Aug 12 15:42:39 I didn't actually use any deprecated stuff recently Aug 12 15:43:31 I do.. On api levels where it's not deprecated Aug 12 15:44:02 I do too, when needed Aug 12 15:44:05 just haven't recently ;) Aug 12 15:49:09 pfn, So is using a ViewTreeObserver like this: http://pastebin.com/u0D7hNVv something that should be always done when you want to get the measurements of something? I mean is that a good practice? Aug 12 15:51:11 seems kinda overdone tbh Aug 12 15:51:24 I mean it works, but you're only interested in one specific view, correct? Aug 12 15:52:12 ravilov, in the width of the listview Aug 12 15:52:25 well that's one specific view then Aug 12 15:53:25 surely there's a better/more efficient way, but I can't research right now Aug 12 15:54:23 ravilov, Okay it's np. Thanks, i'll try to research it myself Aug 12 15:55:11 anyway, I think your problem is that you're trying to get the measurement too soon, so look into what other callbacks are available Aug 12 15:56:39 Pointless API level check, one just calls through to the other on api levels where it exists Aug 12 15:57:57 SimonVT, so can use whichever method? Aug 12 15:58:46 No, one wasn't added until API level something Aug 12 15:58:51 The other always exists Aug 12 15:59:19 Ah so using the deprecated one will re-direct to the new one on API 16+? Aug 12 15:59:50 yes Aug 12 16:00:02 It was only deprecated because of naming Aug 12 16:01:22 Neither of them make much sense to me xD. Thanks for your remark. Aug 12 16:05:13 that's why it's not so horrible to use deprecated stuff - while they say "don't" they also have to maintain 100% backward compatibility, so things won't ever go away :) Aug 12 16:07:05 Mmm this looks cleaner: http://pastebin.com/W4TMxuPZ I guess i'll stick with it. Aug 12 16:10:41 mmmm sure Aug 12 16:11:40 to me it looks like an ugly kludge and a race condition just waiting to happen Aug 12 16:14:07 There's no guarantee that a posted runnable will be executed after the layout phase.. You get that with ViewTreeObserver or View.OnLayoutChangeListener Aug 12 16:15:21 yeah but then your observer gets called for *any* layout change anywhere, right? Aug 12 16:15:58 observer/listener* Aug 12 16:18:07 why are android docs so ridiculously mobile unfriendly?? Aug 12 16:21:12 You're notified of things happening to the view tree, that includes the View you care about. If you only care about the first instance of an event, it makes no difference Aug 12 16:26:57 is there any way to change the left magnifying glass drawable in a search view when it is empty? Aug 12 16:31:19 the best part about work is the icecream break i just took. Aug 12 16:42:33 do drawable backgrounds for views not work in android L? Aug 12 16:43:28 Syzygy_ O.o Aug 12 16:44:19 things that should have a rounded off rectangle as a background don't seem to have a background at all here Aug 12 16:49:13 If anyone has a second to look at this (http://stackoverflow.com/q/25267555/1747491) I would be so appreciative. Spent most of my morning trying to figure this out. I think it has something to do with the fact that in master-detail I am loading in different fragments that themselves have options. Aug 12 16:49:14 hi there Aug 12 16:49:32 I have a class AppContext like this http://bpaste.net/show/umLBxpLQc3Eueb5BS5kd/ Aug 12 16:50:14 whenever I call getAppContext() I always got a null value Aug 12 16:50:40 am I doing wrong with singleton class ? Aug 12 16:51:12 zoraj let me try it in mine, one sec Aug 12 16:51:42 mattblang, thank you very much Aug 12 16:52:10 Probably didn't set it in your manifest Aug 12 16:52:30 that URL is not working Aug 12 16:53:24 oops Aug 12 16:53:28 was just my setup, sorry Aug 12 16:55:42 SimonVT, hm probably, let me check that out Aug 12 16:55:46 zoraj, there's not enough info about your app/project to say if this is a good idea or not, for now I can just say - return AppContext.context <- "AppContext." is unnecessary Aug 12 16:56:44 ravilov, my goal is to get the current app context whenever I am in my classes, Aug 12 16:57:14 the method already knows what class it's in, so the prefix is unneeded Aug 12 16:58:30 ravilov, I'm not sure if I understand what you re trying to tell me Aug 12 16:59:02 zoraj, I don't see any problems with that approach as of yet Aug 12 16:59:20 zoraj, Aug 12 16:59:20 Aug 12 16:59:21 public static Context getAppContext() { return context; Aug 12 16:59:21 } Aug 12 16:59:22 Aug 12 16:59:25 is sufficient Aug 12 17:00:27 well, ok, let me try that, but I'm not convinced that would be the problem Aug 12 17:02:30 zoraj I can tell you this. I set up my Application class just like that, and it seems to work fine Aug 12 17:02:36 zoraj lunch time, ill be back in an hour Aug 12 17:02:50 mattblang, Aug 12 17:03:32 damn lunchtime :D Aug 12 17:03:35 ok, thanks for trying it anyway Aug 12 17:03:48 ravilov, I was right :) it's still null Aug 12 17:03:56 There's nothing wrong with the code you showed. Your issue is elsewhere Aug 12 17:04:28 SimonVT, I know my code seems ok, but it always return null :( damn it Aug 12 17:04:44 I'm taking a screenshot of my app and I pass it to another activity where it is set as a background. This works fine on phones, but on large resolutions the screenshot exceeds 1 MB resulting in a binder error, so I can't parcel it, any idea what I could do to prevent that? Aug 12 17:05:06 So we've eliminated the only information you provided.. Provide more info Aug 12 17:05:19 Just installed android studio and tried run an app. Need some help with this error: Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1 Aug 12 17:06:03 Syzygy_: Just don't put bitmaps in bundles Aug 12 17:06:11 Guys. I want app with special image packages, like stickers in Viber. How store images and protect his? Aug 12 17:06:29 luist, your support library defines the min sdk as L (20 +), your app can't allow anything lower than that Aug 12 17:07:10 SimonVT, how else would I pass that image over? Put it in another class? Aug 12 17:07:18 Syzygy_: and how do i fix that :T Aug 12 17:07:19 Store it somewhere Aug 12 17:07:22 Tell the activity where Aug 12 17:07:27 ok Aug 12 17:07:49 SimonVT: it for me? Aug 12 17:07:59 Oh. Sorry Aug 12 17:08:04 Now see Aug 12 17:09:46 Hello! I'm writing an application in perl using SL4A and I have problems with Intents. I understand that I probably wont get much help with SL4A on this channel, but please help me understand certain things. So, what I am exactly trying to do is this: http://stackoverflow.com/a/14336227/2698019 . I've tried running this code in native java application and it works, so now I'm trying to replicate this code in perl. The problem is that I Aug 12 17:09:47 don't know how to construct Extras part of the Intent. It seems like SL4A accepts key-value pairs, but how can I turn KeyEvent into key-value pairs? If I cannot, then could you please point me to some tool to debug and see all broadcasted intents on my phone? And if I cannot even do that, then where can I get the source code of KeyEvent class? Aug 12 17:10:12 Syzygy_: can i just replace minSdkVersion 8 with minSdkVersion 21 for example? Aug 12 17:11:30 replace it with L Aug 12 17:11:46 Sysaxed, the debugging tool you need is logcat Aug 12 17:13:33 Sysaxed, http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/view/KeyEvent.java mind the version number. Aug 12 17:16:04 "native" (java/dex) android supports putting just about any object into intent extras, no idea how that works in SL4A though Aug 12 17:16:35 Syzygy_: thanks! Aug 12 17:16:47 ravilov: alright, thanks :) Aug 12 17:17:19 Sysaxed, do you actually need the KeyEvents as key/Value pairs or do you just need that for extras? In case of extras, they work like hashmaps where you can put an arbitrary key (e.g. "X button pressed") with a value (e.g. true) Aug 12 17:17:24 I want app with special image packages, like stickers in Viber. How store images and protect his? Aug 12 17:17:59 Jov, http://developer.android.com/guide/topics/data/data-storage.html Aug 12 17:18:00 Syzygy_: in extras I put { 'android.intent.extra.KEY_EVENT' => ...something?... } Aug 12 17:18:03 Sorry. I develop app. But don't know hou store images Aug 12 17:18:12 Getting this error: Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1 need some help with this, because I cant set minSDK to lower than 17 (thats the device i’m using to test) Aug 12 17:18:20 Syzygy_: so yeah, the question is what should I put into this "something?" Aug 12 17:19:24 Syzygy_: Thanks. But I know how to store simple files. I ask about protect files Aug 12 17:19:31 Sysaxed, putExtra("some identifying string", actualValue") Aug 12 17:19:59 May be need use zip packages? Or something equal Aug 12 17:20:18 Syzygy_: well, KeyEvent source just does several writeInts and writeLongs into parcel Aug 12 17:20:26 Jov, the site mentions stuff like MODE_PRIVATE, you might want to take a look at that Aug 12 17:20:45 Just installed android studio and tried run an app. Need some help with this error: Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1 Aug 12 17:20:56 Syzygy_: so I don't know, maybe I should just pass array of numbers? Hmm Aug 12 17:21:01 <_Tommy> Hello, does anybody know why I get no output from hostapd on my Galaxy S4? Aug 12 17:21:06 Syzygy_: How about rooted devices? Aug 12 17:21:33 Sysaxed, I assume keyevent is a parcelable, so it probably converts it uses putExtra(String, parcel); Aug 12 17:21:42 Jov, should be the same, no idea. Aug 12 17:22:20 May be write "bug bytes" to images and remove before draw in ImageView? Aug 12 17:22:39 Ok. I think, I have an idea Aug 12 17:22:58 Jov, or just use some normal method of encryption if you feel that it's necessary Aug 12 17:23:28 Syzygy_: normal? Like base64 or equal? Aug 12 17:23:46 how do i change the version L declared in library com.android.support?? anyone???? Aug 12 17:23:58 Syzygy_: What about performance? Aug 12 17:24:59 as far as I'm aware base64 is just respnsible to remove encoding errors. I was thinking AES or something along those line Aug 12 17:25:31 Look up some performant encryption standard, can't really help you there though Aug 12 17:26:15 luist in your build.gradle find minSdkVersion 8 and write minSdkVersion L instead Aug 12 17:27:14 luist: change it to 20.0.0 Aug 12 17:27:30 SimonVT, ravilov, mattblang, I did fix the issue by adding this on manifest file android:name="com.xxx.xxx.util.AppContext" Aug 12 17:27:40 Syzygy_: you sure? it gave me a: could not find property ‘L’ Aug 12 17:27:53 JakeWharton: i think i cannot do that, because i need min to be at least 17 Aug 12 17:28:32 luist, in that case do what JakeWharton said, but since you need sdk 17, then drop the support library you're using and use an older version Aug 12 17:29:00 Syzygy_: i don’t think theres an option for this using the SDK manager… do i have to do it manually? Aug 12 17:30:05 make sure you have a lower version support library installed and find where you include it in your build.gradle Aug 12 17:32:46 <_Tommy> How can I get hostapd on my Galaxy S4 to write debug and error messages on the terminal? The only thing it does output is the help and version menus... Aug 12 17:33:31 Syzygy_: you mean i could have both installed Aug 12 17:33:49 installed, but not included in your project, yes Aug 12 17:33:59 luist: just change the dependency on the support library to use version 20.0.0 instead of 21.0.0-rc1 Aug 12 17:34:00 and you're done Aug 12 17:34:20 JakeWharton: where do i do that :T Aug 12 17:34:26 build.gradle Aug 12 17:37:15 Sysaxed, basically, all you want to do is to use the same key where you set and retreive it to retreive your KeyEvent as a whole Aug 12 17:39:20 How can you set up multiple touch delegates? Aug 12 17:39:41 With TouchDelegate I can expand the click area of one interface element, but I want to expand it of multiple ones in the same layout Aug 12 17:42:49 Syzygy_: hmm, what do you mean? Aug 12 17:43:14 I want store images to External storage. But, my app should has "startup" images (~10mb) and I want also store it in external storage. How place file to external storage on first install app from marketplace? Aug 12 17:43:46 In first I thinks about additional files ("cache"). How implement that? Aug 12 17:46:45 there's no "first install" trigger, there's only first run Aug 12 17:48:18 ravilov: some games download additional files on install from play market Aug 12 17:48:46 As I understand, it something standard for SDK Aug 12 17:48:49 zoraj sweet Aug 12 17:49:59 pretty sure there's nothing standard about that Aug 12 17:51:41 Hm. Ok. Best way, download files on first start app? Aug 12 17:52:06 ravilov: so, yeah, the tool is logcat. But it is a little verbose, how can I only print stuff associated with intents? Aug 12 17:54:04 Sysaxed, | grep -i intent Aug 12 17:54:05 :p Aug 12 17:54:09 seriously, that's what I do Aug 12 17:54:36 ravilov: that's what I tried... Aug 12 17:55:00 is that not working for you? I usually find tons of intents in there Aug 12 17:57:25 ravilov: http://files.progarm.org/2014-08-12-205621_972x136_scrot.png Aug 12 17:57:52 hm Aug 12 17:58:02 ravilov: that's what I get when I send this ACTION_MEDIA_BUTTON thingy Aug 12 17:58:14 to be honest Aug 12 17:58:21 I don't know if it logs broadcast intents Aug 12 17:58:36 if it doesn't though, I don't know what would Aug 12 17:58:42 logcat is *the* place for it Aug 12 18:00:10 it's a long shot... but maybe you can make a PROPER (ie. java) app that registers itself as a broadcast receiver for everything (don't know if that's possible) and then just logs what it got Aug 12 18:08:02 which classes do i need to look into to add a flip animation to a compound drawable of an edit text? Aug 12 18:08:33 how many achievments can I make in google play services? what's the highest score that I can post to the leaderboards (is it a long number...)? Aug 12 18:08:49 I would prefer to not use a AnimationDrawable. Aug 12 18:13:42 ? Aug 12 18:26:00 Hi! Aug 12 18:29:05 Anyone here? Aug 12 18:29:20 i have a strange problem with ExpandableListView and WebViews.. and i need some help :S Aug 12 18:31:18 what's the difference between doAnswer and doReturn? Aug 12 18:31:24 in mockito Aug 12 18:32:00 no idea :S Aug 12 18:36:49 whomp: i believe doAnswer is used when stubbing a void method Aug 12 18:37:05 vs doReturn is for a method that has a return value Aug 12 18:37:10 someone using eclipse 4.4 + ADT? is the code formatter broken? Aug 12 18:38:13 whomp: can't say i've needed doAnswer, and off the top of my head cannot think of where I would need it Aug 12 18:46:39 I have a problem in an ExpandedListView Aug 12 18:46:41 with the last item Aug 12 18:47:07 child items are webviews.. all works but the last one is not expanding and i dont know what to do :S Aug 12 18:48:24 Does Android Studio support javadoc when pulling from maven central repo yet? Aug 12 18:49:05 woot. got my rsync over to the new pc ssd/sata done. New PC now powering intellij. Boot time from power on to desktop 7s.... intellij open in 4. Wowa. What a difference. (debian) Aug 12 18:50:09 ssd OP Aug 12 18:50:21 I <3 getting >500MB/s reads off my ssd Aug 12 18:50:25 everything is stupid fast Aug 12 18:52:50 hey, do the new KitKat SD card restrictions apply to your app's external cache directory? Aug 12 18:54:11 * ravilov has 2 SSD drives in his laptop Aug 12 18:54:27 not the 500MB/s range but still very impressive Aug 12 18:54:52 why so slow, just about any laptop that has ssd is gonna have sata3 and should easily saturate it Aug 12 19:00:35 can you do voice search with the v7 searchview? Aug 12 19:00:39 Anyone know if Android Studio supports getting javadoc from maven central repository when adding aar dependency from the maven central repo? Aug 12 19:02:42 lasserix: It doesn't Aug 12 19:02:55 is there any work around at this time? Aug 12 19:03:29 Not that I know of Aug 12 19:03:37 arghh Aug 12 19:06:43 pfn: I have an ssd in my slightly less powered x121e thinkpad : and I thought that was stupid fast. Id managed to paste a UUID wrong so was papping my keks a while there ... nothing sysrescue and nano didnt put right. Wow. Now I need some "fast things to do"..... rebuilding my android project is already boring me ;))) Aug 12 19:09:36 ravilov: I didnt even know you could put 2 drives in a laptop! Aug 12 19:10:24 SimonVT: so there's no way to add javadoc sources with an aar file? Aug 12 19:11:01 rgr, why not, if you have an hdd bay + msata slot on your laptop, more storage more win Aug 12 19:11:13 * pfn gets javadoc added when he uses aar in intellij... Aug 12 19:11:26 yeah intellij Aug 12 19:11:39 hmm, wait, maybe not Aug 12 19:11:40 but does intellij support using aar from maven central repo? Aug 12 19:11:52 thought that was androud studio specific Aug 12 19:12:05 are actionbar overflow menu items supposed to not be in the view hierarchy or am I missing something? They don't seem to show up in the ADM hierarchy viewer and they don't draw out of the activity window decor view Aug 12 19:12:45 lasserix, in a manner of speaking, yes Aug 12 19:14:49 There's probably ways to do it.. But AS+gradle doesn't do it by default Aug 12 19:14:50 pfn: well, I must admit I didnt know about mSata. Something new to lust over. Aug 12 19:15:13 rgr, nothing special, just a different interface for attaching drives to laptops Aug 12 19:15:21 I have 3 ssd drives in my pc ;-) Aug 12 19:15:22 hmm Aug 12 19:15:34 2x500GB and 1x128gb (msata for the last) Aug 12 19:17:36 http://us.msi.com/media/product/bmU0RytxdndmNkNmamxGRUg1TUZEZz09/600.png Aug 12 19:17:44 ^^ my mobo has an msata slot smack dab in the middle of the mobo right there Aug 12 19:18:04 ugh, need more ram, 16gb not enough Aug 12 19:18:36 oh please... just because you know thats what I just got... ;) Aug 12 19:18:51 Hello buddy Aug 12 19:19:01 I am Japanese Aug 12 19:19:05 yikes Aug 12 19:19:11 I live in Japanese Aug 12 19:19:50 does anybody know what would cause this message? F/libc ( 4041): Unable to open connection to debuggerd: Connection refused Aug 12 19:20:04 well, it's coming from here: https://android.googlesource.com/platform/bionic/+/android-4.2_r1/linker/debugger.c Aug 12 19:20:22 rgr, http://ezscreens.appspot.com/view/fc6d/perfmon+/res Aug 12 19:20:25 so better; how do I "fix" that message, i.e. how do I allow my process to connect to debuggerd (or vice versa?) to get crash log info? Aug 12 19:20:32 rgr, and that's without an emulator even running... Aug 12 19:21:05 chrome really needs to increase its shareable footprint Aug 12 19:21:12 Unused ram is wasted ram! Aug 12 19:21:23 Is this where a act like one of the twats in #linux and start dissing windows and snorting crap about my threads in Linux are 50% faster? lol... God I hate those dweebs.... Aug 12 19:23:45 How many DL does ur apps?>Everyone Aug 12 19:24:44 *+ have ? Aug 12 19:26:04 Does entry ur apps in the Amazon,too? Aug 12 19:26:35 you know, you'd be better understood if you used google translate to chat Aug 12 19:26:42 or maybe you are... Aug 12 19:27:52 If Google outputs 'ur' for 'your', something went very wrong... Aug 12 19:28:55 I don't use Google translate Aug 12 19:30:21 Who owns the view that contains action bar overflow items? Aug 12 19:30:22 Japanese my hole. Nice try. You'd never have got the "don't" with an apostrophe when you "live in Japanese"...... Aug 12 19:31:22 pfn: thats a point. I might even try and get a session working on an emulator with my new monster machine.... (it is a monster machine....it is....) Aug 12 19:32:28 my apps coment Star there r but comment is no comment has many Aug 12 19:32:44 android-dev343: I believe that the popup is created every time it is displayed i.e. every time you click on the menu item Aug 12 19:34:26 jdex: Do you know if you can get access to that view? It doesn't seem to live under the actionbar Aug 12 19:34:57 Anyone here tried filtering accelerometer data? Aug 12 19:35:41 Hello, I am having a problem with a TextureVideoView (TextureView with MediaPlayer) rendering on the display. My display is black whenever the mediaplyer is supposed to be playing. Aug 12 19:37:02 I have created a maze game where you steer a ball through a maze by tilting the phone. it works but the control is far from as good as some of the "pro" games of this type. 2 problems. 1. Sometimes there seems to be noise in the data. Should I use a lowpass or highpass filter to filter that away? 2. When I try to move in a circle it is more of a 8 corner polygon. How do I achieve a smoother roll? Aug 12 19:39:45 android-dev343: the popup is added to the activity's window, so you should be able to somehow retrieve the popup's content view Aug 12 19:40:27 android-dev343: it should not be inside the actionbar's container Aug 12 19:45:02 yo does anyone have experience using the from field in GCM? Aug 12 19:47:51 The overflow popup is a PopupWindow, its content is not added to the Activity's Window Aug 12 19:49:02 pfn, exactly - normal drive bay + msata Aug 12 19:50:18 how to remove element from String[] ? Aug 12 19:50:41 carefully ;-) Aug 12 19:50:52 Jov: Arrays are fixed-size in Java. Aug 12 19:51:01 :( Aug 12 19:51:04 you could null-out the index you don't like Aug 12 19:51:12 I forget, sorry Aug 12 19:51:13 then "slide down" the on-null elements Aug 12 19:51:18 but that's not resizing the array Aug 12 19:51:19 Jov: Do you want an ArrayList? Aug 12 19:51:20 use ArrayList Aug 12 19:51:22 Jov, with very sharp scissors Aug 12 19:51:30 :) Aug 12 19:51:37 Ok ok. Thnks Aug 12 19:55:15 think low pass filter Aug 12 19:55:58 Is noise low freq or high freq? Aug 12 19:56:08 I dont want to filter out user input. Aug 12 19:57:48 SimonVT: but it does not create new Window, uses the Activity's WindowManager and just adds it's content view to it. am i missing something? Aug 12 19:58:20 jdex: Window != WindowManager Aug 12 19:58:39 jdex, the content of the popup is never added to the main view hierarchy Aug 12 19:58:41 The Activity's Window adds its content view to the WindowManager Aug 12 19:58:51 Just like a PopupWindow adds its content view to the WindowManager Aug 12 19:59:31 Calling findViewById looks on an Activity attempts to find the View in the Activity's Window's content view, not the WindowManager Aug 12 20:01:21 Without a reference to the PopupWindow, which you can't get in the case of the overflow menu, you can't manipulate its views Aug 12 20:01:25 in the android studio Android DDMS view, is there a way to change the column width of the things in logcat? Aug 12 20:02:05 SimonVT: Do you have any literature on that? I have been googling around for some time Aug 12 20:02:36 Only literature on this is probably https://android.googlesource.com/ Aug 12 20:03:46 Seemed that way .. currently downloading source Aug 12 20:04:43 SimonVT: thanks for clearing this up for me! Aug 12 20:04:51 SimonVT: When you say "The Activity's Window adds its content view to the WindowManager" .. the overflow popup is its own activity? Aug 12 20:05:11 No, it's its own "Window" Aug 12 20:05:32 So are Dialogs Aug 12 20:07:14 I presume you are not allowed to iterate through the windows attached to the window manageR? Aug 12 20:07:50 That would probably be bad Aug 12 20:08:35 anyway to get the source code to show up in android studio with aar dependencies? Aug 12 20:09:43 IIRC no Aug 12 20:09:47 snooplsm: IIRC you can attach sources Aug 12 20:10:01 android studio wil prompt you to do this if you step into the aar code Aug 12 20:10:24 Ahh you can, what android-dev343 said Aug 12 20:17:27 Hi. What is general idea for securing the server to prevent request from unknown sources? Specifically, I have an application which connects to a server with websockets. Obviously, I want to accept requests only from my application. Also, I don't want to introduce any kind of user / password system. Is it doable? Aug 12 20:19:14 is there a way to make the gui builder not freak out when using a support search view? Aug 12 20:19:43 Not using the GUI builder? :P Aug 12 20:20:20 swistak35: Generally, no, anything you can put in your app can be replicated by someone else. You can add an "API-key"-header and perhaps communicate over SSL though, which will at least protect you from anyone not decompiling your app. Aug 12 20:21:28 aaand I apparently overlooked the websocket part, which probably means my suggestions don't apply, but the principles do :) Aug 12 20:23:53 Well, SSL still applies. This security is not that crucial thing of my application. I was also thinking, isn't google providing some resources for that? For example, for seamless authenticating via Google Account, because probably most of the android users have at least one google account added in their phones? Aug 12 20:27:55 It is certainly possible to authenticate with a google account, although I still think this doesn't mean that the process can't be replicated in another app, if that is what you wished to protect from. Aug 12 20:28:17 flan3002 well, sorry. not necesarilly the gui builder, but the pre-render it does in android studio Aug 12 20:28:53 Thorbear: yeah, thank you : ) Aug 12 20:30:11 Can a Java function have memory or then I have to make a class? I mean like a static variable in a C function so its value is preserved between calls Aug 12 20:31:27 onat: you can have static variables in java too, and the value is preserved as long as the class definition is loaded, it still needs to be a part of a class though, like everything else in java. Aug 12 20:31:31 don’t rely on static fields when doing android development if you can avoid it Aug 12 20:31:35 I'm not sure how you'd make a naked function in the first place Aug 12 20:33:01 Java does not have freestanding functions. Aug 12 20:33:23 If that's what you mean by 'naked'. Aug 12 20:34:32 Does it matter speedwise if you nest several function calls in java or does the compiler solve this for you? Aug 12 20:35:05 The JIT/ART can inline them, but normal functions calls are not free. Aug 12 20:35:14 what's the proper way to include *.so files using the latest android gradle plugin? I put them under the jniLibs folder, but I'm still getting errors Aug 12 20:40:13 does someone know how to implement the android annotations framework with the updated android studio gradle version? ...i cant seem to find a solution and im confused on the implementations that are found on web Aug 12 20:42:50 defuex: just include the jar Aug 12 20:43:29 okay, and then preprocessor settings as usual? ^^ Aug 12 20:44:02 because ive seen so many complicated explanations of how to do this automated by gradle...are there any improvements doing this with gradle or is it just complicated and unnecessary? Aug 12 20:49:46 how can i set the content centralized inside of a LinearLayout? I tried using a fixed height space but it looks bad on different resolutions Aug 12 20:51:12 luist: how many views are in your layout? maybe pastebin some code Aug 12 20:52:39 canvs2321: it’s just a basic login form: http://paste.ofcode.org/hzSZfwHyL4WidFcpT7CvYQ Aug 12 20:52:58 canvs2321: check the Aug 12 20:53:09 canvs2321: “space” Aug 12 20:55:42 why cant you use statics in android development? Sounds a bit of a fishy claim to me. Aug 12 20:55:44 gonna be a minute til i can check it out, my connection is spotty right now Aug 12 20:55:53 how do you test that an event occurred with Otto Aug 12 20:55:54 ? Aug 12 20:56:03 subscribe to it Aug 12 20:56:15 push the event to a list Aug 12 20:56:17 post Aug 12 20:56:19 query the list Aug 12 20:57:20 rgr: There's nothing really wrong with it, except that you risk running into strange bugs if you don't know what you're doing, partly because of how easily some things are preformed in background threads. Aug 12 20:58:00 in other words its nonsense. Statics are statics threads or not. invariably used for a class look up or soemthing, generally constants through the lifetime of a program after an init process. Aug 12 20:58:30 thats like saying dont use threads either in case you have a thread bug. Or dont use inheritance or interfaces if you dont understand them. Aug 12 20:59:18 Like I said, no problem if you know what you're doing. Although I do know of one strange bug with statics on android that I haven't seen on any other platform. Aug 12 20:59:44 JakeWharton, in an automated test? i don't understand. when i subscribe, that forces me to create a new method outside of the test method that it would call, correct? Aug 12 20:59:49 the problem with static variables are 2-fold, 1, memory leaks, 2, global state and lots of side-effecty code Aug 12 21:00:02 whomp: define a class inside the test method Aug 12 21:00:05 no problem with any language construct if you know what you're doing. Its silly advice. Aug 12 21:00:23 Thorbear: though I would be interested to see this Android only static bug just to learn something. Aug 12 21:00:44 Thorbear, I'm sure the same problem exists on other platforms Aug 12 21:01:01 So am I. Or for people who dont know how to use a static.... Aug 12 21:01:17 But open minded, I'd like to see this bug. Aug 12 21:02:03 whomp: actually, just define an object that @Subscribe's to Object events Aug 12 21:02:07 Aug 12 21:02:11 rgr, pfn: http://commonsware.com/blog/2012/01/24/be-careful-asynctask.html Aug 12 21:02:24 whomp: and use that everywhere Aug 12 21:02:37 asynctask is dumb Aug 12 21:02:47 JakeWharton, ah i see, so it just keeps a list of all events posted Aug 12 21:02:51 yep Aug 12 21:02:54 ty Aug 12 21:02:56 Thorbear, and that has nothing to do with android specifically, the same issue exists anywhere Aug 12 21:03:09 so he messed up. Move on.... nothing to see here :) Aug 12 21:03:27 that could happen to anyone in a multithreaded env usign statics where he shouldnt. Aug 12 21:03:27 Thorbear, and yeah, dude messed up Aug 12 21:03:40 has nothing to do with static specifically Aug 12 21:04:02 same thing can happen when using it as an instance variable Aug 12 21:04:06 I like asynctask, quite useful in many situations :) And that issue is specific to android in the sense that the AsyncTask implementation generally only exist on android Aug 12 21:04:08 more of a problem with AsyncTask it seems reading betweent he lined. Aug 12 21:04:17 lines Aug 12 21:04:44 but I think you would agree dcow90's sage advice "not to use statics in android" is, well, rubbish. Aug 12 21:05:07 Yup Aug 12 21:05:44 :) Anyway yer man had built upon AsyncTask so it was entirely his own doing. Aug 12 21:06:19 I just came to think of that bug when statics were mentioned :) And why the hate towards AsyncTask? Aug 12 21:06:38 asynctask is a pretty shitty api Aug 12 21:06:39 that's why Aug 12 21:07:00 How so? Aug 12 21:08:50 canvs2321: any news? Aug 12 21:09:43 What hate? Aug 12 21:10:03 hello, is anyone there? Aug 12 21:10:18 can't be cancelled, can't be composed, swallows exceptions, leads to leaking references to outer class Aug 12 21:10:36 can't be re-used Aug 12 21:11:18 But re the bug : I could find stackoverflow Qs where people forget to invoke super and then complaining that inheritance doesnt work.. I wouldnt then tell someone here it doesnt work in Android :) Aug 12 21:12:10 rgr: "asynctask is dumb", "he had built upon asynctask so it was his own fault", "asynctask is a pretty shitty api" Aug 12 21:12:49 He had built on AsyncTask so it was his own fault. I cant comment on the shitty API jibe though. Aug 12 21:13:05 It certainly wasnt a shortcoming of usign static in Android. Aug 12 21:14:18 what do i have to import?? error: cannot find symbol class EditText Aug 12 21:15:36 I wasn't trying to make that case either :) I was just pointing to a mostly non-obvious bug that can happen on android if you use statics without understanding how android works :) Aug 12 21:16:39 Sure, but Ditto with threads and surface locks etc. Nothing to do with static being more susceptible than anything else in Android. Aug 12 21:17:17 I agree, and I never said it was. Aug 12 21:18:25 yeah, damnit, I need more ram, 16gb not enough Aug 12 21:19:14 I was referring to dcow90.... and the need to confirm statics are troublesome. They're not more so than anything else in this wild and crazy Android ecosystem imo. But I think we're in agreement. Aug 12 21:20:45 pfn: i found the other day 32gb wasnt enough ⊙_ʘ Aug 12 21:20:55 rgr what’s up? Aug 12 21:22:13 Napalm, yeah Aug 12 21:22:13 I’m not hating on static, persay. But people often use it thinking their data will stick around Aug 12 21:22:43 and android is very agressive about killing your proc Aug 12 21:30:11 rgr, just caught up. I’ll revise my assertion, don’t use statics for global state on android—sorry bof being overly broad. (And don’t use static references because it creates hidden dependencies that are hard to mock for testing (but that’s just general java advice, not specific to android)). Yes they’re language constructs to be used as appropriate. The issue is more with people who come in with the wrong mental model thinking that thei Aug 12 21:30:12 will always be around as it would on normally when writing a bare *nix “app”. Lots of bugs where people set a static field in one place, but don’t properly guard its access. Aug 12 21:33:39 how do you people fill up so much RAM?! Aug 12 21:34:07 I have 8 GB and I barely use half of that at most, no matter what I do Aug 12 21:34:23 pfn, Napalm, ^ Aug 12 21:34:35 Sometimes, when compiling and multitasking heavily I hit my 8GB in my two-year old laptop... I wouldn't know how to fill 32GB though... Aug 12 21:34:49 easy? open up a few projects Aug 12 21:34:55 open up a couple dozen tabs in chrome Aug 12 21:34:58 a browser with 30+ tabs, an IDE, an emulator or two... Aug 12 21:34:58 run a few vms Aug 12 21:35:01 run a few emulators Aug 12 21:35:03 pfn, I don't use chrome Aug 12 21:35:05 and all your ram is gone Aug 12 21:35:10 yeah, chrome is really bad about memory usage Aug 12 21:35:16 my firefox never goes over some 800MB Aug 12 21:35:27 yep, chrome is very bad about memory usage Aug 12 21:35:49 firefox is also much better for organizing that many tabs :) Aug 12 21:36:16 Better: Compile Chrome. ^^ Aug 12 21:36:27 I guess that should be my assumption from now on - people who can't ever have enough RAM, no matter how ridiculously much they have, are clearly people that use chrome Aug 12 21:36:52 I have a guy in another channel who always cries about having too little RAM Aug 12 21:36:55 he also has 16GB Aug 12 21:36:59 and yes... he uses chrome Aug 12 21:37:39 flan3002, how about compile chrome while also using chrome? Aug 12 21:38:16 I moved to chrome yonks ago and went back to firefox. Syncing with the android app was better and it seemed faster. Aug 12 21:38:17 I tossed up a screenshot of perfmon, and not counting chrome, it's already something like 8gb memory used Aug 12 21:38:38 plus it had got its act together with keyboard nav. Aug 12 21:39:05 by far the biggest anchor this and the old system is a cold boot with dropbox. It brings the machine to a halt for ages. Aug 12 21:39:10 rgr ff has native keyboard nav now? Aug 12 21:39:13 hmm Aug 12 21:39:17 http://ezscreens.appspot.com/view/fc6d/perfmon+/res Aug 12 21:39:21 native ? Aug 12 21:39:28 I use pentadactyle Aug 12 21:39:31 pentadactyl Aug 12 21:39:35 slows firefox to a fucking halt Aug 12 21:39:35 like it supports keyboard nav without an extention? Aug 12 21:39:48 if so, that’s compelling. Aug 12 21:40:15 Im not sure what you mean. I use the keyboard to jump to nav bar, search , change tabs etc. its been there for ages afaik. Aug 12 21:40:32 rgr, see pentadactyl + vimium Aug 12 21:40:38 I think he refers to vim-like keyboard commands for doing "anything" Aug 12 21:40:53 I'm also getting a little anti google in my old age..... lol... developing on android.... hypocrite that I am. Aug 12 21:41:01 rgr said: “plus it had got its act together with keyboard nav.” I was referring to that. Aug 12 21:41:18 can you elaborate, then. Aug 12 21:41:19 I used to use a browser from the suckless crowd because it had emacs bindings but it was another webkit hog. Aug 12 21:41:46 You've lost me. The use of FF is far better with keyboard than it was : nothing sinister or 1337 intended. Aug 12 21:41:49 dcow: yup, and rgr was referring to keyboard shortcuts, not actual "commands for anything and everything" Aug 12 21:42:24 Thorbear: Aug 12 21:42:28 oh I see Aug 12 21:42:52 sorry rgr I thought you meant FF now made pages entirely navigable via the keyboard Aug 12 21:42:57 have anyone ever used LDAP authentication on android? Aug 12 21:42:58 nvm Aug 12 21:43:07 dcow, just use pentadactyl... Aug 12 21:43:35 oh no. Even I use a mouse for that. Theres too many links. But I do remember a plugin that numbered the links and you could meta-key # select them but I soon got bored of that. Think it was the suckless browser. Aug 12 21:44:04 dcow, firefox is not exactly lynx ;) Aug 12 21:44:06 rgr, everyone's ripped off of pentadactyl for that type of navigation Aug 12 21:44:11 rgr yeah that’s what I was thinking of. I know a few people who won’t touch a mouse. Aug 12 21:44:38 I rarely use a mouse when I'm working with a browser Aug 12 21:44:49 and rightly so but for web browsing with a gui etc its a must really. Sit back and yawn and click. I used to use w3m in emacs while thinking myself really 1337. I soon got bored of that. Aug 12 21:45:45 (heh, but then I also allowed myself to believe using gtags in emacs was as good as the likes of IntelliJ ... lol... ) Aug 12 21:46:08 pfn: Im going to try that plugin just to see! Aug 12 21:46:22 oh no Im not. its uses vim bindings. Aug 12 21:46:31 What is the build.gradle file called at the project root? Aug 12 21:46:55 If i were writting documentation, how do i refer to this build.gradle file and not the build.grade under app/ folder? Aug 12 21:48:06 build.gradle and settings.gradle ... Aug 12 21:48:46 its the root build. Settings should reference the sub projects from what I know and use. But Im no real expert since I set up my first hierarchy which is very basic. Aug 12 21:51:31 can you guys help me understand how do i import an extra SDK to use it (LDAP UmboundID SDK for example)? It comes with a .jar and a folder with many binaries Aug 12 21:52:51 kmarlow hello Aug 12 21:53:04 hello dcow Aug 12 21:53:46 ravilov: regarding your previous talk on RAM, just to mention I dont use chrome Aug 12 21:54:12 wow Aug 12 21:54:23 well I guess every rule has exceptions :) Aug 12 21:55:18 goddmam you lot. I'm going to have to price up an extra 16 Gigs now.... Aug 12 21:56:02 If i want to get more memory I am going to have to get a server board that supports 64/128gb Aug 12 21:56:03 lol Aug 12 21:56:09 totally maxed mine out Aug 12 21:56:46 OMG i need some help importing UmboundID LDAP SDK into my project!!!!!!!!!! i have no idea how to do that in the android studio -_- Aug 12 21:57:32 quick. get a fire hose! Aug 12 21:57:41 Napalm, you people are very strange - that guy I mentioned earlier? now he's crying about his laptop not being able to have more than 16GB Aug 12 21:57:44 I'm just like Aug 12 21:57:48 that's just so ridiculous Aug 12 21:58:30 Java and the whole gc mentality has a lot to answer for burgeoning hw needs and resource hungry apps.... I'll get my cape. Aug 12 21:58:37 instead of optimizing resource usage with properly written software, people just throw more hardware at it Aug 12 21:59:07 ravilov: There's worse though... No, I'm totally not looking at Node... Aug 12 21:59:29 rgr on the android dev page they refer to the outer one as the 'top level' Aug 12 21:59:44 flan3002, there's always worse... we should look up to the better instead though Aug 12 22:00:08 ravilov: http://i.imgur.com/t7IRwqg.png Aug 12 22:00:15 just closed everything major Aug 12 22:00:26 i'm idling at 6GB usage Aug 12 22:00:40 ....windows Aug 12 22:00:42 of course :p Aug 12 22:00:45 lol Aug 12 22:01:28 i think it might be because the Intel HAMX driver reserves ram Aug 12 22:03:01 Napalm, http://i.imgur.com/EwP9S1H.png Aug 12 22:04:22 hmm. upgrading ddr 3 isnt as cheap as I thought. Aug 12 22:05:23 lasserix: yes of course its the top level. Or "root" is better imo. That and the settings.gradle then define the rest of the project children. Aug 12 22:06:29 Napalm: that probably includes existing caches though right? No way even windows idles at 6gb usage of ram surely. Aug 12 22:06:42 such a simple problem and nobody can help me.. been asking for hours Aug 12 22:06:56 thats great Aug 12 22:07:00 luist: what have you tried? Aug 12 22:07:17 rgr: importing as a module, as a library and as a project Aug 12 22:07:25 how? Aug 12 22:07:39 rgr: by using the android studio menu import panels :P Aug 12 22:07:53 did you place the jar where gradle expects to find libraries? Aug 12 22:08:07 rgr: only the jar? Aug 12 22:08:24 thats what a library usually is. Aug 12 22:08:34 what else? Aug 12 22:09:11 rgr: dunno… im new to this.. btw is the place supposed to contain libraries defined in my project? Aug 12 22:10:05 what place? You need to google "gradle android libraries". Aug 12 22:10:16 (Im assuming you're using gradle) Aug 12 22:10:37 rgr: according to you, “where gradle expects to find libraries” Aug 12 22:10:53 rgr: yes i’m using gradle in my project.. Aug 12 22:11:38 rgr: so do i add the jar as a dependency in my gradle? Aug 12 22:11:49 you can tell gradle where to find libraries too. Most of my requirements are from maven using build dependencies so its all done for me. Aug 12 22:13:12 yes I think so. you reference your :library:mylib project e.g I have in my settings.gradle a refernce to include "'androidbit', ':libraries:purejavalib'" and the purejavalib does a local publish to my local maven repo. Aug 12 22:13:53 that was a lot of learning. But I suspect you can simply reference a build dependency to a library in your project hierarchy too in the same place you put other dependencies. Aug 12 22:14:54 like it says here after a brief 3s google : http://answers.ros.org/question/47312/do-i-need-to-add-jar-path-in-buildgradle/ Aug 12 22:17:32 if i uninstall apk and reinstall, then call gcm.register(PROJET_ID) again, sometimes it gets a diff regid back Aug 12 22:18:50 sometimes it doesnt, hmm Aug 12 22:22:17 why is my Android Studio copying my source and building in another place? this is so annoying Aug 12 22:26:33 are there any differences between using JCentral() or MavenCentral(), MavenLocal() does it depend on the dependencies i want? Aug 12 22:28:32 rgr: not working Aug 12 22:29:56 well, it works for people since thousands are using it daily. Keep at it and use google. My knowledge is limited but that link I gave pretty much sums up all you have to do in conjunction with referencing your sub projects in your build hierarchy. Aug 12 22:35:17 rgr: maybe this could help :( http://s29.postimg.org/7833ljvxy/Screen_Shot_2014_08_12_at_7_34_16_PM.jpg Aug 12 22:35:46 It sure does. Aug 12 22:38:24 I'm looking to get start with android developement, and play around with the OS, whats the best device to go with it? Nexus 4/5/7? Aug 12 22:39:46 rgr: in higher resolution: http://s29.postimg.org/kp024f69h/Screen_Shot_2014_08_12_at_7_34_16_PM.png Aug 12 22:40:14 Even clearer. Aug 12 22:41:05 http://i.imgur.com/8kO7KJ6.jpg Aug 12 22:43:04 I really suggest you take the time to read that link and then Google similar. You need to understand gradle. Stackoverflow will be full of the same issue too. I've already said my exposure to it is limited. Gradle can frustrate because its new. But damning it or the Intellij/AS developers because you dont understand it wont win you many friends or much support;) Aug 12 22:44:05 are both images 404 for you? ¬¬ Aug 12 22:45:12 I’m not unsatisfied with gradle… im unsatisfied with not having any kind of documentation from umboundID or anywhere else about how to use this thing Aug 12 22:45:12 tried declaring android-apt with apt {arguments { ... } } from this tutorial with the new android studio version http://www.jayway.com/2014/02/21/androidannotations-setup-in-android-studio/ Warning:The following options were not recognized by any processor: '[androidManifestFile, resourcePackageName]' ...can someone please help me to get android annotations work with gradle please? Aug 12 22:45:25 rgr: and it’s just a library, shouldn’t be that hard Aug 12 22:46:30 rgr: i did not detect your irony when i sent the image… i was totally expecting some kind of help… both links work fine for me. try this one: http://postimg.org/image/umb2xhdv7/full/ Aug 12 22:46:37 it isnt. Im sure. But you're in a new system. Take a deep breath and reason its different for a reason and maybe the benefits might become clearer later. Maybe not. I dont know. I'm learning it too. Aug 12 22:47:03 Irony? Let me get this straight. I look them up an they are 404 and I'm to blame? Good luck with that. Aug 12 22:47:29 that one is completely empty. Maybe my browser is broken. Aug 12 22:48:07 http://i.imgur.com/rhBVLc4.jpg Aug 12 22:48:15 rgr: you did not say it was 404.. you said “It sure does.” Aug 12 22:48:59 Yes it did make thinks clearer. Just not for your problem :) Maybe my system is borked but that last one is broken too : nothing there. Aug 12 22:49:19 pastebin your build.gradle Aug 12 22:50:29 rgr: http://paste.ofcode.org/N5VhTBM722wg6Pq7nAu7Bn Aug 12 22:50:39 what about that last image? What happened there? Aug 12 22:51:10 rgr: its just an image upload service… it always works fine Aug 12 22:51:32 did you click on it? http://postimg.org/image/umb2xhdv7/full/ ? I see nothing. Aug 12 22:52:07 run gradle from the command line too. did you read that link? I dont know as I said. But what you have doesnt mention how they say to do it there. Aug 12 22:52:50 rgr: yes i click on it.. it works perfectly in 3 machines here Aug 12 22:53:08 strange indeed. I just get that screen I posted on imgurl. Aug 12 22:53:46 rgr: try this https://mega.co.nz/#!BgUXVZbD!Ym8wJlVAOKLVchGfKZ4sfS24r3uwgg8bOqTiBRtsvq8 Aug 12 22:53:54 rgr: i uploaded the SS to mega Aug 12 22:54:12 http://stackoverflow.com/questions/16608135/android-studio-add-jar-as-library Aug 12 22:54:15 rgr: btw… did my paste help? Aug 12 22:54:49 yes. I said you didnt do what they said in the link I gave you. Theres another above. Im no expert but I know a little about what gradle expects. Good luck. Night. Aug 12 23:09:37 I need to filter my accelerometer data but user input can be both high freq and low freq I guess, how would I filter out noise? is user input in a specific range? Aug 12 23:39:26 onat: you can probably get an idea of the noise background for the accelerometer by grabbing some amount of samples while a device is at rest Aug 12 23:39:40 and the you can use that to reduce the noise during actual user input Aug 12 23:44:44 or rather, to get an idea of what noise you need to filter Aug 12 23:45:22 although, if you want to keep it simple, I suspect a simple running average might be sufficient Aug 12 23:54:51 god help us all http://www.bbc.com/news/magazine-28708526 Aug 12 23:55:31 the first time i heard this, was listening to googlers at I/O Aug 13 00:01:37 Has anyone used Robolectric to test Fragments? I am getting an android.content.res.Resources$NotFoundException http://pastie.org/9468508 (I am using Android Annotations too) Aug 13 00:02:28 Using robolectric 2.3 Aug 13 00:39:28 Hi, I'm new to Android Application developing and to Java programming ... I'd like to know what (AudioManager) stands for in this expression: (AudioManager)context.getSystemService(Activity).AUDIO_SERVICE); Aug 13 00:41:03 it's a cast Aug 13 00:41:03 it's class cast Aug 13 00:43:14 Thank You Aug 13 00:43:21 That what I was looking for Aug 13 00:43:40 I'm going to learn more about it Aug 13 00:45:03 not much to it but you should learn a lot more about the language first Aug 13 00:45:40 nah, i never learned java and i'm doing just fine Aug 13 00:45:50 Yeah, I Know Aug 13 00:46:44 In fact I'm studying it, but in the meanwhile I'm trying to learn Android Development, at least the basic of it Aug 13 00:48:09 So that when I'm gona get used to ObjectProgramming's way of thinking and Java's Syntax, I'll have already the bases of Android Application Aug 13 00:48:22 That's my project, what do you think about it ? Aug 13 00:49:13 are you french, Tuly-? Aug 13 00:50:37 hi guys Aug 13 00:50:41 a question Aug 13 00:51:14 I am trying to connect Android Device v.2.3.7 and make a backup with adb Aug 13 00:51:22 but I can't seem to make it connect Aug 13 00:51:27 anu suggestions? Aug 13 00:51:31 any* Aug 13 00:51:51 just FYI I am running all on Ubuntu 14.04 Aug 13 00:52:01 ANY Suggestions? Aug 13 00:52:22 anyone? Aug 13 00:53:19 is nobody available? Aug 13 00:53:31 Please I need some closure on this? Aug 13 00:53:44 patience, my friend Aug 13 00:57:17 :) Aug 13 01:02:05 it helps to describe what you tried and how it failed... what errors you encountered etc... then wait for someone to notice Aug 13 01:02:26 OK - here Aug 13 01:02:46 1. I have installed android-tools-adb Aug 13 01:03:04 2. I have connected my phone to the USB Aug 13 01:03:29 3. I have executed the $ adb devices Aug 13 01:03:34 and it lists nothing Aug 13 01:04:03 and when I try the same with my HTC One 8M - it works - it lists the device Aug 13 01:04:13 and this may not be the best channel... we're concerned here with software development... not tech support ;) Aug 13 01:04:13 but with android v. 2.3.7 it wont Aug 13 01:05:02 :) how can I start develop with not being able to backup with adb?! Aug 13 01:05:26 only think that I can tell you is to check if you ensure adb to have root acces Aug 13 01:05:47 connection with the adb falls under "development options" on the android menu and you have to have the USB Debugging ON Aug 13 01:05:59 adb backup is only available on ics and newer Aug 13 01:06:18 thank you pfn, that is the answer I was looking for ! Aug 13 01:06:19 :) Aug 13 01:06:34 and backing up with adb is pretty useless Aug 13 01:06:40 pfn, can you please tell me how to backup the texts and pics from the old phone? Aug 13 01:06:48 I don't think anyone actually bothers Aug 13 01:07:04 use a tool to transfer them Aug 13 01:07:11 pics are easy Aug 13 01:07:22 and there are tons of sms transfer apps Aug 13 01:08:32 and google is your friend Aug 13 01:13:41 Has anyone used Robolectric to test Fragments? I am getting an android.content.res.Resources$NotFoundException http://pastie.org/9468508 I have tried several things. e.g. after calling startFragment(f, InitialActivity_.class) calling f.getActivity().setVisible(true); Aug 13 01:17:19 oscarvarto: me Aug 13 01:17:49 gordon_: Thanks. Do you have any idea what’s going on? Aug 13 01:17:51 I should make a post about it Aug 13 01:18:01 you need to craate activity first Aug 13 01:18:03 and start it Aug 13 01:18:21 then use fragment manager and commit fragment to that actiity Aug 13 01:18:24 *activity Aug 13 01:18:49 But, isn’t FragmentTestUtil.startFragment(f, InitialActivity_.class) supposed to start the activity too? Aug 13 01:19:06 no idea ;) Aug 13 01:19:19 I asked a question before, didn't get a response, so let me try again Aug 13 01:19:34 I'm looking to get started with android app development, and play around with the OS, whats the best device to go with it? Nexus 4/5/7? Aug 13 01:19:50 gordon_: http://blog.nikhaldimann.com/2013/10/10/robolectric-2-2-some-pages-from-the-missing-manual/ I saw that, tried the approach, but still getting the same error Aug 13 01:19:54 h4dj1: nexus 7 is not a tablet Aug 13 01:20:04 whoa Aug 13 01:20:10 nexus 7 *is* a tablet Aug 13 01:20:30 oscarvarto: wait a sec Aug 13 01:20:46 gordon_: whats wrong if its a tablet? Aug 13 01:21:37 h4dj1: nothing Aug 13 01:21:38 gordon_: Do you think it may be because AndroidAnnotations doesn’t play good with the Robolectric? Aug 13 01:21:42 if you want a phone then get a phon Aug 13 01:21:43 e Aug 13 01:21:47 oscarvarto: what is the good pastie Aug 13 01:21:48 ? Aug 13 01:22:07 http://pastie.org/9468508 Aug 13 01:22:17 !pastie Aug 13 01:22:21 ah nothing Aug 13 01:22:27 let's use pastie then Aug 13 01:22:56 gordon_: I'm not particular if its a phone or a table - are there differences in application dev in tablet vs phone (other than screen size/resolution)? Aug 13 01:23:21 oscarvarto: http://pastie.org/private/vk9ncso6gq0yynuptphga Aug 13 01:23:34 h4dj1: well Aug 13 01:23:57 you can try tablet design on nexus 7 in landscape position Aug 13 01:24:22 oscarvarto: I havent used android annotations Aug 13 01:25:07 but I use butterknife Aug 13 01:25:45 oscarvarto: also watchout for appcompat Aug 13 01:25:49 http://nullpointerbay.com/2014/06/android-unit-testing-with-robolectric-appcompat-and-intellij/ Aug 13 01:26:42 gordon_: Thanks for the links and the pastie Aug 13 01:26:48 let me try Aug 13 01:26:50 k Aug 13 01:27:22 HikaruBG: http://developer.android.com/tools/device.html Aug 13 01:34:24 gordon_: The test passes if I test something like assertNotNull(myButton); but I fails if I try myButton.performClick(); Aug 13 01:43:52 can't wait for official lambda support. I see IJ shortcuts so many of my methods to look like lambdas Aug 13 01:47:15 Okay, I am in android studio, and I have everything set up pretty much, and it should be working fine, but my project will not compile because it cannot resolve symbol "Theme" in my styles.xml Aug 13 01:47:35 But it can resolve everything else--I do not get why it cannot find this, since I have the support libraries and everything installed. Aug 13 01:50:04 winsoff isn't it supposed to be lowercase t? Aug 13 01:50:42 Theme.AppCompat.Light.ActionBar Aug 13 01:50:51 Android Studio set it all up for me from there. Aug 13 01:50:55 From the start* Aug 13 01:51:09 So not sure why it would not compile right off the bat. Maybe I should just remake it and see if it fixes. Aug 13 01:51:38 is it proceeded with "android:"? Aug 13 01:51:54 That's weird, though. Maybe try doing a gradle sync and rebuilting it Aug 13 01:51:55