**** BEGIN LOGGING AT Fri Jul 25 03:00:01 2014 Jul 25 03:03:36 you guys hear about buck? Jul 25 03:08:29 hm? Jul 25 03:08:34 http://facebook.github.io/buck/article/exopackage.html Jul 25 03:08:54 oh, yeah. jasta has worked on that Jul 25 03:10:11 wondering if i should move from gradle to it Jul 25 03:12:08 if you run into trouble, your on your own :) Jul 25 03:12:36 i'd dtick with google's tools; but i tend to be conservative that way Jul 25 03:15:11 i dont understand why the moto 360 is circular. that makes sense if you have mechanical hands going around in ... circles Jul 25 03:15:50 why would anyone use buck Jul 25 03:15:58 there's really no value add Jul 25 03:16:06 i'd go with a format like my old garmin forerunner , that was about 1 - 1.5 " high by 2 - 2.4" wide Jul 25 03:16:36 facebook's apps are very big, the gradle build time is probably intolerable ;) Jul 25 03:19:59 hey guys, I built a gradle plugin in Java to pre-package a sqlite db, it works on command line but AS doesn't like it -- gradle sync fails Jul 25 03:26:37 g00s: whats up player Jul 25 03:26:46 you should hear this new opportunity that just dropped into my la Jul 25 03:26:47 lap Jul 25 03:27:07 hey ron_frown_ :) Jul 25 03:27:12 dirty ... Jul 25 03:27:26 ron_frown_ what happened ? Jul 25 03:27:38 basically this lady that owns a company monitoring lots and lots of wells around here Jul 25 03:27:45 was bitching about what it takes to monitor them Jul 25 03:27:54 some of them are agricultural and out in the boonies Jul 25 03:28:12 sounds like we may be able to get the contract to build remote monitoring stations Jul 25 03:28:20 I just think its funny Jul 25 03:28:52 she does it to make sure water isnt being consumed out of control etc Jul 25 03:29:40 she won't have to worry about it for too long; soon they will be dry and everyone will have migratated to wet parts of canada :) Jul 25 03:30:00 http://www.amazon.com/American-Exodus-Climate-Change-Survival/dp/0865717494 Jul 25 03:30:05 hehe Jul 25 03:30:45 ron_frown_ see this from today? http://www.nytimes.com/interactive/2014/upshot/mapping-the-spread-of-drought-across-the-us.html?hp&action=click&pgtype=Homepage&version=HpSumMediumMediaFloated&module=second-column-region®ion=top-news&WT.nav=top-news Jul 25 03:30:46 oops Jul 25 03:30:56 ron_frown_ see this from today? http://www.nytimes.com/interactive/2014/upshot/mapping-the-spread-of-drought-across-the-us.html Jul 25 03:31:04 yeah Jul 25 03:31:16 btw, is that visualization towards the very bottom d3 ? Jul 25 03:31:47 if I had to guess, I'd say most are Jul 25 03:31:57 I am pretty sure mike bostock does gfx for new your times Jul 25 03:32:03 the dude who built d3 Jul 25 03:32:16 name sounds familiar Jul 25 03:32:18 yeah he does Jul 25 03:32:32 he very likely built those visualizations Jul 25 03:33:39 hm, got him confused with nathan yau Jul 25 03:34:13 I can build shit people want me to if they give me specific details Jul 25 03:34:27 but some of the things ppl build with d3 are fucking incredible Jul 25 03:47:31 Is there a difference between 'this.id = someId;' and 'id = someId;' in constructor> Jul 25 03:52:11 detachYo i thought you were using perl ? Jul 25 03:52:23 actually maybe that is valid perl :) Jul 25 03:52:28 everything is valid perl :/ Jul 25 03:54:12 g00s haha, I told you I am using Java. Jul 25 03:54:24 sif use java Jul 25 03:54:29 o hai milky doing android :) Jul 25 03:56:26 detachYo the only time i say this.foo = foo is when there is member 'foo' and the method signature also has 'foo' Jul 25 03:56:45 actually i do that all the time in ctors Jul 25 03:56:57 instead of foo = aFoo or something dumb Jul 25 03:57:23 oh yeah, well android guys would say mFoo = foo Jul 25 03:57:27 but fuck that :) Jul 25 03:57:58 g00s thx Jul 25 04:10:56 how would i simulate a feather fall in android? Jul 25 04:12:54 the same as anywhere else? Jul 25 04:13:49 i was wondering if there might be a good lib for it Jul 25 04:13:55 and if not, how you do it in general :) Jul 25 04:14:40 physics Jul 25 04:14:50 is a feather fall like a normal fall, but instead of leaves, it's feathers? Jul 25 04:14:50 is how you do it in general Jul 25 04:15:05 canvs2321-, sure Jul 25 04:15:12 anything with low density, high surface area Jul 25 04:16:18 make like a tree and feather Jul 25 04:22:11 if I have an ArrayList to send to second activity, is it worth implementing Jul 25 04:22:44 Parcelable Jul 25 04:24:30 no Jul 25 04:25:53 pfn, why is it so fucking difficult to pass ArrayList to another activity, there is literally everything available except Long Jul 25 04:27:47 because they wanted you to use arrays back then Jul 25 04:29:46 that makes sense Jul 25 04:29:49 not really Jul 25 04:29:56 solved it, anyways Jul 25 04:31:04 I think I will try out macroid, it looks top nice not to Jul 25 04:31:09 too Jul 25 05:40:20 Anyone ever break one of their company's dev phones? Jul 25 05:42:08 like over a knee? Jul 25 05:42:15 they don't have enough length Jul 25 05:42:34 lasserix_, lol 3 @ blackberry Jul 25 05:46:47 nah just got into a bike accident and the phone flew out of my pack and hit the pavement, lower left corner of the screen is kinda cracked) Jul 25 05:52:59 toast.makeText Jul 25 05:55:08 heh Jul 25 05:55:17 ^_^ Jul 25 05:58:17 I get this message when running my app : "The application may be doing too much work on its main thread." Jul 25 05:58:30 how can I find which part of the app is actually doing too much work? Jul 25 05:58:50 Is there some sort of tool that I can use to find which part of the code takes too much to execute Jul 25 05:59:04 ddms should cover that. Jul 25 05:59:15 I'm on android studio Jul 25 05:59:21 ok let me check ddms Jul 25 05:59:38 i.e., do the usual profiling dance. Jul 25 05:59:59 I'm not familiar with that kind of stuff Nilium Jul 25 06:00:16 a bit of elaboration is always appreciated :) Jul 25 06:00:21 Then consult d.android.com Jul 25 06:00:30 are you doing any file i/o, network i/o, graphics work etc? Jul 25 06:00:53 ok Jul 25 06:00:53 Network IO should be an exception, so that's probably not it Jul 25 06:01:06 depending on SDK target Jul 25 06:01:12 Unless the target SDK is low enough, anyway Jul 25 06:01:20 Screw your faster typing. ಠ_ಠ Jul 25 06:01:24 :) Jul 25 06:01:38 well, I do network (which is in a bg thread anyway), GPS, some graphics (displaying photos) Jul 25 06:01:47 mapfragment Jul 25 06:01:49 how much on main thread? Jul 25 06:02:00 Profiling should probably tell you, either way. Jul 25 06:02:04 pretty much everything except the network Jul 25 06:02:10 using a listview or anyother data based list/loading? Jul 25 06:02:20 no, no list views. Jul 25 06:02:43 maybe post some code of where it's happening, or do some profiling as Nilium says Jul 25 06:02:59 canvs2321-ok Jul 25 06:03:04 Even just the method profiling in DDMS should be sufficient. Jul 25 06:03:19 Though it might take a bit to get used to reading the output. Jul 25 06:03:37 °_° Jul 25 06:03:44 I don't think it's even called DDMS anymore, technically it's monitor when run from the shell. Jul 25 06:03:56 napster: you displaying photos that are loaded on main thread? Jul 25 06:04:04 no lazy loading? Jul 25 06:04:19 http://paste.ubuntu.com/7852845/ Jul 25 06:04:42 photos yes: but they are scaled to just 100px and generally 4-5 of them at most Jul 25 06:04:56 the error message is shown even when no images are loaded Jul 25 06:05:22 well, you know its not an error message, but I think its not a good message. Jul 25 06:05:28 onNewLatLong() what does that do? Jul 25 06:05:49 specifically getMap().animateCamera Jul 25 06:06:07 It will add a marker to the map + calls the address calculator function Jul 25 06:06:12 just below it Jul 25 06:06:41 but i'm saying it seems to get called alot, on change/on drag end etc...what is the animate Jul 25 06:06:45 Animate camera zooms to the (lat, long) using some animation Jul 25 06:06:55 it is a system provided function Jul 25 06:07:05 meaning, does it have it's own threads to draw, or on main thread Jul 25 06:07:53 I think the animateCamera is on the UI thread; but I'm not sure, its a function http://developer.android.com/reference/com/google/android/gms/maps/GoogleMap.html#animateCamera(com.google.android.gms.maps.CameraUpdate, int, com.google.android.gms.maps.GoogleMap.CancelableCallback) Jul 25 06:08:02 from the GoogleMap class. Jul 25 06:09:25 I'm just saying there are a few method calls, that just by looks seems like they'd take some work. PAssing them off to another thread then calling back would seem better Jul 25 06:09:38 hmm Jul 25 06:10:28 napster, have u used android ide app? Jul 25 06:10:51 ide app? Jul 25 06:11:56 its on play store Jul 25 06:11:59 * napster thinks of a joke. Some people say, "I know, I'll use threads.” Now they have two problems. :) Jul 25 06:12:37 karan200000 That looks good, what does it do? Jul 25 06:12:45 oh gawd, i just loled at that :/ Jul 25 06:13:35 we can use it to make apps directly from device Jul 25 06:13:39 :/ Jul 25 06:14:24 karan200000 Does that help me in this problem? Jul 25 06:14:32 i dont know Jul 25 06:19:25 i wanted to know how to add .jar libraries in it Jul 25 06:19:52 karan200000 I'm sorry I'm not familiar with that app Jul 25 06:20:13 canvs2321- Nilium I think the issue with the GeoCoder Jul 25 06:20:27 ┐( ̄ー ̄)┌ Jul 25 06:20:28 From the GeoCoder docs "The returned values may be obtained by means of a network lookup. The results are a best guess and are not guaranteed to be meaningful or correct. It may be useful to call this method from a thread separate from your primary UI thread." Jul 25 06:20:53 Sounds like a good idea. Jul 25 06:24:12 your getAddress() method is one that looked time consuming, just look over it all, unless your methods are settings known primitives/values, then use another thread if stuff has to be looked up Jul 25 06:24:40 i was looking more at the for() loop, but anything can slow/slug u down Jul 25 06:25:53 napster: to repeat** your getAddress() method is one that looked time consuming, just look over it all, unless your methods are settings known primitives/values, then use another thread if stuff has to be looked up Jul 25 06:25:55 i was looking more at the for() loop, but anything can slow/slug u down Jul 25 06:31:41 canvs2321-ok Jul 25 06:32:32 Hi Jul 25 06:32:41 you familiar with handlers? Jul 25 06:33:18 niru: how hi are you? Jul 25 06:33:30 I have a string field in an activity. I want to compare this String field with the one present in some other activity Jul 25 06:33:33 Hi canvs2321- Jul 25 06:34:21 my log is full of messages like "java.lang.SecurityException: WifiService: Neither user 10101 nor current process has android.permission.CHANGE_WIFI_STATE.". this app 10101 is not the only one. there a several more that also seem to change the wifi-state Jul 25 06:34:28 but the thing is i dont believe they really do -- one of the apps from the log is my own app: i KNOW it doesnt try to change the wifi state. any idea what going wrong there? Jul 25 06:34:47 niru: when comparing strings don't use ==, use .equal() Jul 25 06:34:50 Will getters and setters be used here? Jul 25 06:35:22 thana: what app has UI 10101? Jul 25 06:35:26 UID Jul 25 06:35:49 thanks everyone, getAddress was the trouble maker Jul 25 06:35:51 niru: no you just have your strings and compare Jul 25 06:36:03 napster: good you got it! :) Jul 25 06:36:11 :) Jul 25 06:36:38 canvs2321-: i dont think this is relevant. as i said there a several apps -- including my own -- that arnt supposed to juggle with the wifi state :. Jul 25 06:37:53 canvs2321-: in this special case this appen even has the wifi permission (its https://play.google.com/store/apps/details?id=com.rauscha.apps.timesheet) Jul 25 06:37:56 then why if your app can't do it are you doing it? Jul 25 06:37:59 canvs2321-: so if(MainActivity.field1==this.field1) ? Jul 25 06:38:14 niru: no if field1 is a string Jul 25 06:38:29 canvs2321-: im not doing it. it doesnt access the wifi state anywhere Jul 25 06:38:42 it's (if(MainActivity.field1.equal(this.field1)) blah blah blah Jul 25 06:38:54 thana: what's the problem? Jul 25 06:38:58 canvs2321-: ah ok... Jul 25 06:39:09 canvs2321-: ? Jul 25 06:39:21 Hello everyone, I'm searching for a way to create an encrypted password file which gradle build system can read and sign a release apk for me. Is there anything like this? I couldn't find anything on google Jul 25 06:39:45 thana: you are just blabbing about a logcat event, but if it isn't causing a problem then what? Jul 25 06:39:50 if it isn't your app then what? Jul 25 06:40:10 canvs2321-: i wonder whats happening there. apps that arnt supposed to throw this exception do it Jul 25 06:40:28 canvs2321-: but see. I have String field1 and when trying to access in the other activity using the activity name it is unable to recognize it Jul 25 06:40:28 how do you know they aren't supposed to? Jul 25 06:40:33 did you write them? Jul 25 06:40:35 canvs2321-: as i said: even my own app throws this exception although it doesnt access the wifi state anywhere Jul 25 06:41:08 It is saying create a field in MainActivity,create a constant bla bla bla Jul 25 06:41:25 niru: you can't compare strings with string1==string2, they are objects, you have to do string1.equals(string2) or string1.compareTo(string2) or string1.startsWith(string2) etc.... Jul 25 06:41:39 canvs2321-: sorry canvas thanks Jul 25 06:41:46 canvs2321-: thanks:) Jul 25 06:41:52 niru: you got it? Jul 25 06:42:01 canvs2321-: yes Jul 25 06:42:05 cool Jul 25 06:42:44 niru: you can do X==Y if primitive, like an int or long etc, but once you start comparing objects you can't as it just references the objects Jul 25 06:43:03 canvs2321-: yes forgot the concepts ;( Jul 25 07:01:55 hey guys, i'm wondering it is possible to get http://pastebin.com/rcv9CV0L that info from a html file so I can use the size & uploaded dates for my app Jul 25 07:04:54 Should we initialize view fields of Activity in onCreate when savedInstanceState is all...or irrespective of its all...i.e. everytime Jul 25 07:05:11 *savedInstanceState is null Jul 25 07:06:26 Anyone have experience importing an existing mass of code into eclipse? I'm trying it as a replacement to notepad, but can't get my project imported. With existing android project, I just get invalid project description, and general/existing project won't work because it's not an eclipse project to begin with. Jul 25 07:08:05 create project structure with similar package name and copy the files (java and resources) in respective folders Jul 25 07:08:33 I did it few months back...not much prob Jul 25 07:08:33 I already have it in an hg repository. Can I somehow just import the files? Jul 25 07:08:41 ohh Jul 25 07:08:53 I dont knw anything abt Hg Jul 25 07:09:00 I'll probably end up going back to notepad, but I need this to extract my strings Jul 25 07:09:30 btw y u used notepad? Jul 25 07:12:07 I'm used to it for python, so I just used it for java Jul 25 07:12:49 tsp_: there's a happy medium, you know - using a proper programmer's editor, rather than something barely better than just writing bytes to a file... Jul 25 07:12:58 That and screen readers with ides sometimes don't mix too well. Android studio is completely unusable Jul 25 07:15:31 tsp you can import git-> remote repo Jul 25 07:15:46 problem is you need project properties, which many people add to ignore Jul 25 07:16:10 so what you have to do in this case, if you can open up the project in eclipse, or have someone who has it in eclipse, Jul 25 07:16:17 right click android tools-> generate build.xml file Jul 25 07:16:29 On linux I just use ed, that's better or worse than notepad depending on who you ask. Editing your file one line at a time turns most people away Jul 25 07:16:37 make sure that goes into the repo, then clone the repo locally, and use import from the build file Jul 25 07:16:54 What can I use instead of Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) on older API versions? I need a folder to drop a file that gets shared by an email intent. Jul 25 07:17:23 lasserix_: So I have to convert from hg to git, then try importing that? Hmm Jul 25 07:17:28 oh Jul 25 07:17:29 no Jul 25 07:17:36 so just clone it from cmd line Jul 25 07:17:55 I already have my directory with the cloned repo in it Jul 25 07:18:00 umm do you still have access to the original project? ie the one that will open in eclipse? Jul 25 07:18:33 from eclipse you can do Android Tools -> generate build.xml file Jul 25 07:18:45 you can use that to import the project without the eclipse project metadata Jul 25 07:18:55 There was no original project. I created it entirely with the commandline tools and Jul 25 07:19:02 s/ and$// Jul 25 07:19:35 oh Jul 25 07:19:35 http://blog.bugsense.com/post/8095276730/creating-build-xml-using-android-command-line Jul 25 07:20:16 so just generate the build.xml file, and then from eclipse import menu options, you can pick import from build.xml (don't remember which subcategory it is) and voila, you dont have to copy and paste Jul 25 07:20:29 Oh, path overlaps the location of another project: MainActivity. I'll check that post Jul 25 07:20:38 although it is fairly easy to drag and drop all your files once you create an empty project Jul 25 07:36:24 I have one activity with two memory-large fragments (two graphs) and when I launch another activity the loading animation for this new activity is frozen for ~1 sec, I guess this is while the other activity unloads. Is there any way to make the loading animation not freeze Jul 25 07:41:17 yep, just stop doing work on main thread Jul 25 07:44:45 canvs2321-: Scenario: I launch first activity, everything is fine. I launch second activity with only one animation, which stutters. First activity has no code in onPause/destroy etc. Where's my work on the main thread? Jul 25 08:02:18 Hi guys. Weird problem here: Eclipse is complaining "Using 1.7 requires using Android Build Tools version 19 or later; currently using 18.0.1" Unfortunately I have ADT 23.0.2, so cannot upgrade further. Why that non-sense error? Jul 25 08:02:57 http://i.stack.imgur.com/POC42.jpg how do I make something similar to that help-popup? The pic is from the stone age but I've seen popups like that in many apps Jul 25 08:03:36 Whoa! it's a button Jul 25 08:09:58 mpajor: buttons were the shit in 1264 Jul 25 08:10:01 as you can see Jul 25 08:27:42 diego_r: maybe its not that the adt tools themselves are outdated, but the eclipse plugin currently installed -- had the same issue ;) Jul 25 08:27:55 Hey, I have made a custom layout for items in my ListView and all items get marked if i click one of them... Like this pic, blue means selected http://imgur.com/dX4vzth Jul 25 08:28:16 thana: nope. I mean Eclipse tools are @ 23.0.2 Jul 25 08:28:28 How do I separate the clicks? Jul 25 08:30:40 I want to share a file via a share intent- on Android 4.x I have to put the file in a public location, but DIRECTORY_DOCUMENTS doesn't exist in Android 2.x. How can I do this on Android 2.x? Jul 25 08:32:08 thana: ok, found out that for some strage reason "Android SDK Manager" does not update "Android SDK Build-tools" automatically Jul 25 08:32:54 which is not "Android SDK Build-tools" and neither "Android SDK Tools", and not even "Eclipse ADT plugin" Jul 25 08:33:06 it's starting to get really complex... Jul 25 08:33:59 ekx, did you see this: https://developer.android.com/training/secure-file-sharing/share-file.html Jul 25 08:34:22 not quite Jul 25 08:35:08 Mavrik: specifically, I'm trying to email the attachment Jul 25 08:35:42 https://developer.android.com/guide/components/intents-common.html#Email Jul 25 08:35:54 Hi Jul 25 08:37:27 I have a question regarding DNS. I have a network application that change the DNS using setprop net.dns1 Jul 25 08:38:36 the problem I have is that when I change from wifi to 3g or 3g to wifi, dhcp overwrite the DNS I configured Jul 25 08:39:20 is any way to avoid dhcp overwrites dns? Jul 25 08:53:03 Yes, DHCP usually supplies a DNS server Jul 25 09:02:33 alopez: https://www.google.hu/search?q=dhcp+disable+dns+update+linux Jul 25 09:06:22 I have a service file. I am calling that in the Mainactivity file. How can i call the service file in all the activities. Is there a common place for keeping the service file so that all can call Jul 25 09:13:36 erm... "a service file"? Jul 25 09:14:04 I guess he means the java file Jul 25 09:15:43 is there any way I can relatively organize icons in terms of rotational degrees? Example: My current app has a menu with icons circling a bigger icon in the center. If I anchor one icon to the bottom of *big* icon, how can I tell the others "same distance, 30 degrees counterclockwise" Jul 25 09:16:14 hmm Jul 25 09:16:19 you'll probably have to do a custom viewgroup Jul 25 09:16:24 there's not rotational layout :) Jul 25 09:16:28 :(( Jul 25 09:16:42 any good starters on custom viewgroups Jul 25 09:16:49 thats new territory for me Jul 25 09:17:23 reading d.android.com Jul 25 09:17:41 Jesperhead, basically you need to implement onLayout and onMeasure Jul 25 09:18:01 can't find any really good guides tho... remember though, if you're going to use that viewgroup only on one location with one set of icons Jul 25 09:18:11 you can cut ALOT of corners and lay stuff out as you want Jul 25 09:18:24 (e.g. no point evaluating paddings if you don't use them right? :) ) Jul 25 09:18:44 yeah only for this single activity. thanks for pointing me in the right direction Jul 25 09:19:04 jush: I guess he doesn't want to explain Jul 25 09:19:35 Jesperhead, so basically you'll just have to use some maths to tell each subview their left, right, width and height in onLayout Jul 25 09:19:47 and call-through to their measure() in onMeasure Jul 25 09:20:00 and setMeasureDimension for ViewGroup itself... looking at FrameLayout source also helps :) Jul 25 09:20:18 * Jesperhead writes notes furiously Jul 25 09:38:58 And you'll be tested on that tomorrow Jul 25 09:47:36 i have a stack containing a main activity, then a sub activity, the main activity is launched with singleTop, and i'm able to navigate nicely, however if i start the main activity from within the sub activity, a new instance is created, is there a way i can finish my sub activity, go back to the main activity, but give it a new intent, i saw there was an onNewIntent method for this purpose, but when i try it, i end up with 2 copies of my ma Jul 25 09:47:36 in activity Jul 25 10:01:13 lasserix_: are you there? Jul 25 10:06:14 actually my question doesn't matter, and i suspect i need to learn about the difference in behaviour between things that are on top of the stack and those that are not Jul 25 10:07:05 <_3mpty> guys is there any recommended method for passing data to fragment? Till now I was using app/activity (using activity is not always good idea :P). Jul 25 10:08:08 why using activity is not a good idea? I've used that pattern Jul 25 10:09:25 <_3mpty> sometimes I had problem with lifecycle and asynctask - if you are more careful than me, it's not a problem :P Jul 25 10:09:45 ok, our old friend asynctask :) Jul 25 10:09:57 jush: can you answer me if you can? I have a service class. In the MainActivity I am calling it using ServiceConnection,Onstart and Onstop Jul 25 10:10:18 niru: what's stoping you from doing the same code in other activities? Jul 25 10:10:22 How can I call the service class in some other activity Jul 25 10:10:24 <_3mpty> jush: I'm just thinking about other possibilities :) Jul 25 10:10:36 Do I need to go on writing same set for all activities? Jul 25 10:10:59 <_3mpty> jush: asyncs are anoying especialy when it comes to using volley Jul 25 10:11:02 maybe you can create a super class from where other activities inherit Jul 25 10:11:04 or Do i have to write the onstart and stop in service class itself and call using an intent in other activites? Jul 25 10:11:26 hold on, niru you're calling the service onStart method directly? Jul 25 10:12:01 yes Jul 25 10:12:03 <_3mpty> :O Jul 25 10:12:54 jush: right now the serviceconnection and disconnect and onstart etc are in mainactivity Jul 25 10:13:19 niru: you don't start a service by calling the onStart method directly. It sounds strange that you would do that Jul 25 10:13:49 iw vim on windows any good? Jul 25 10:14:17 _3mpty: I've been manually cancelling the async tasks depending on the activity lifecycle but it's a PITA. I guess you can also cancel the volley requets, but that's even more PITA. Jul 25 10:15:22 vim anywhere is good Jul 25 10:15:29 <_3mpty> jush: true Jul 25 10:15:31 except possibly somewhere without a keyboard... Jul 25 10:16:09 jush: I mean binding to a service Jul 25 10:19:21 I don't know any other way than binding to the service in every single activity where you wanna use it Jul 25 10:19:36 <_3mpty> just random thought: anyone knows open source apps that is (in your opinion) example of beautiful code ? Jul 25 10:19:49 jush: ah ok..so I need to bind it everytime I need it in a new activity Jul 25 10:19:59 <_3mpty> I'm trying to improve my coding style ;) Jul 25 10:21:33 _3mpty: https://github.com/JakeWharton/u2020 from JakeWharton it's simple yet elegant and it provides examples of various libraries. It's a pity that the parleys talk linked in that project is not free to watch Jul 25 10:22:58 <_3mpty> jush: thanks, I will take a look Jul 25 10:29:50 how do I zip one file w/ gradle? Jul 25 10:30:11 task myZip(type: Zip) { from myDir } Jul 25 10:42:22 I have a trouble, if I switch from my application while asynctask was active, then switch back, the result comes faster (it seems), then the fragment takes to re-initialise Jul 25 10:42:27 what should I do here? Jul 25 10:43:16 dont couple data with GUI Jul 25 10:49:49 Hey guys, I get a dynamic property deprecation warning for project.ANDROID_BUILD_SDK_VERSION <-- what is it being replaced by? Jul 25 10:50:45 i.e. what variable/namespace am I allowed to use to set a project wide build version, tool version, min and target SDK without getting the deprecation warning from the gradle plugin? Jul 25 11:13:21 is there a way to make android studio have a transparent? Jul 25 11:13:31 transparent background* Jul 25 11:22:27 Is it possible I use same layout accross multiple activities. Jul 25 11:23:25 But depending on some criteria the components of the layout should vary. Example if layout have 5 textboxes. Some activity may show 3 and some may show all 5 Jul 25 11:23:29 Is it possible? Jul 25 11:23:36 how to achieve that? Jul 25 11:24:04 <_3mpty> niru: I think that there is few ways to achieve it Jul 25 11:24:22 <_3mpty> for example you can change views with fragments Jul 25 11:24:33 <_3mpty> or just hide unused Jul 25 11:25:10 _3mpty: so I need to use fragments? Jul 25 11:25:16 <_3mpty> no Jul 25 11:25:23 <_3mpty> you can just insert views from code Jul 25 11:25:27 <_3mpty> when you need them Jul 25 11:25:34 <_3mpty> it's depends from you Jul 25 11:25:39 <_3mpty> it* Jul 25 11:25:42 ah is it how to do that Jul 25 11:25:51 any links u can point to? Jul 25 11:26:22 <_3mpty> example: http://stackoverflow.com/questions/2395769/how-to-programmatically-add-views-to-views Jul 25 11:26:42 <_3mpty> fragments are more complex but also more flexible in my opinion Jul 25 11:28:49 _3mpty: thanks checking Jul 25 11:30:15 any idea how I can create something similar to google nows "ok google"? Jul 25 11:30:53 some simple way I can trigger high quality speech recognition. Jul 25 11:31:07 or is the ok google part just the same thing in offline mode? Jul 25 12:01:59 I'm currently exploring custom viewgroups (and feeling overwhelmed). Anyone know of another way one could organize icons in relation to one another in degrees? ie: button1 is x from center. button2 is 30 degrees from button1 button3 is 30 degrees from button2 etc etc Jul 25 12:02:37 i need circular symmetry and android is laughing at me :( Jul 25 12:17:33 hey guys, got any design tips for my "music player" activity? :) http://i.imgur.com/qE1UgWb.png it looks cheap atm Jul 25 12:18:21 iffa yep Jul 25 12:18:36 find someone on www.dribbble.com Jul 25 12:18:39 :P Jul 25 12:19:22 haha :D i figured people here know a lot about making android apps pretty, so i decided to ask (and ive gotten good advice before) Jul 25 12:21:19 iffa Ok, I have got a serious suggestion. Jul 25 12:21:27 there is a tool called Sketch3 Jul 25 12:21:38 Here we go : http://bohemiancoding.com/sketch/ Jul 25 12:21:55 this tool is very good if you are planning to design UI on your own Jul 25 12:22:18 its pretty simple and produces very good output once you are familiar with it. Jul 25 12:23:02 There is another website maintained by Roman Nuric http://romannurik.github.io/AndroidAssetStudio/ Jul 25 12:23:19 helps you develop 9-patch images and icons Jul 25 12:24:04 iffa, my experience of getting an app pretty is that I do what the designers specified Jul 25 12:24:21 sketch looked great until i saw it is mac only, pfft Jul 25 12:24:27 other link looks good though Jul 25 12:26:24 Morning Jul 25 12:29:09 If I have an application with multiple activites, how can I make sure that a service is started? Jul 25 12:30:10 mihalybak: it’s in the documentation for services on what happens if you start service again Jul 25 12:30:41 one of the classes functions are called again (I don’t remember which off the top of my head), but you won’t lose the state of the service Jul 25 12:30:59 well I am not worried about starting it too many times, more about it not being started Jul 25 12:32:38 under what circumstances a service is not started? Jul 25 12:34:14 If I am not all wrong about this... the activity will call Activit.startService(myServiceIntent), but I would not like to paste this code into all my activities, since I do have several that the application can start from Jul 25 12:34:35 Or perhaps that is the only way? Jul 25 12:35:07 I'm looking for a way to implement speech recognition similarly to google now, basically I want to be able to say a keyword ("ok google") to start actuall voice recognition Jul 25 12:35:19 any idea how I could do that? Jul 25 12:35:36 http://developer.android.com/reference/android/speech/SpeechRecognizer.html Jul 25 12:35:57 As such this API is not intended to be used for continuous recognition, which would consume a significant amount of battery and bandwidth. Jul 25 12:36:43 Yeah, that’s what you’re going to need to do basically Jul 25 12:36:51 if you do it on the device, you will eat the battery Jul 25 12:36:54 jonc-1, so pretty sure they're using something else, at least for the "ok google" keyword ... maybe they do that part offline? Jul 25 12:37:14 and you’d need to have a trained system already on the device Jul 25 12:38:19 isn't there? Jul 25 12:38:48 I thought that maybe there's a way to put the recognizer in offline mode for simple keyword recognition Jul 25 12:40:03 Syzygy, yes, they use something else Jul 25 12:40:18 but API is not publicly available, you'll have to write a pattern matcher yourself Jul 25 12:40:23 crap. Jul 25 12:41:26 https://android.googlesource.com/platform/frameworks/base/+/d9f4e0cf2c2466d9e05f8562e55d342934f7ed0d/core/java/android/speech/hotword/HotwordRecognitionService.java Jul 25 12:43:49 thanks for that Jul 25 12:44:46 and yes, you're right - SpeechRecogniser relies on online service, so it's terrible for this use-case .... after all you don't need a full online speech recognition database to find a pattern in audio signal Jul 25 12:45:19 No but you’d need a trained system to find the pattern Jul 25 12:46:54 can somebody help with packaging a wear app with the mobile app? Jul 25 12:47:02 CMU released a library for speech recognition: http://cmusphinx.sourceforge.net/wiki/tutorialandroid Jul 25 12:47:11 I have done everything possible Jul 25 12:47:32 It's been a few weeks since I got this release thing to work and now I can't seem to be able to get it again Jul 25 12:48:00 the micro apk is packaged inside and WearablePkgInstaller seems to be sending the update to the watch but it doesn't show up >_< Jul 25 12:48:52 jonc-1, I just need the hotword recognition, so I'll look into that first, after that I can just use the regular service Jul 25 12:49:10 aye aye Jul 25 12:50:18 implementing a full speech recognizer would be overkill considering android already provides one Jul 25 12:57:37 how do i get the state of a display with an api level <20? Jul 25 12:59:47 by display i mean a display received from the DisplayManager Jul 25 13:03:15 Is it possible to use a Drawable object in a XML file? Jul 25 13:03:26 As in I implement a class which extends Drawable Jul 25 13:05:01 Mavrik, I guess I can't really register my own listening service since their own service is active on every screen by now :( Jul 25 13:24:44 Can I not access private field variables from an inner class? I thought i could... Jul 25 13:27:28 Should be able to Jul 25 13:27:36 OuterClass.this.privateName? Jul 25 13:28:03 Unless it is a public static inner class Jul 25 13:28:06 then you cannot Jul 25 13:28:45 I thought you could just access it by name D: Jul 25 13:28:53 but thanks, that worked Jul 25 13:29:36 you may have something that is the same name inside your inner class Jul 25 13:37:07 gradle noob here: I'm using greendao orm ( https://github.com/greenrobot/greenDAO ). I'd like to use instead one of its fork ( https://github.com/DocuSignDev/greenDAO ) . Should I download, compile it and import the jar (?) in my project? Jul 25 13:41:37 hello guys. Im experiencing a "Unable to create external files directory" only on 4.2.2 devices. Android Manifest requests the correct stuff: http://pastebin.com/Hfbdtfkg Jul 25 13:41:53 It would be so great if someone with more ideas than me could have a look at this Jul 25 13:44:49 <_3mpty> gdrc: or add it as subproject Jul 25 13:45:04 <_3mpty> (module) Jul 25 13:46:52 dewp, that looks like a bug in cordova. Jul 25 13:48:02 oh! why? :-) do you have an idea what i could do for a workaround? device ready isn't even fired... Jul 25 13:49:04 I'm asking this again, but you guys have any suggestions what to change in this activity (design tips in general): http://i.imgur.com/qE1UgWb.png - and also what to do with all the empty space it has Jul 25 13:53:23 can he blurry bg is very bad ;-) Jul 25 13:53:30 never put text on other text Jul 25 13:53:54 -can he Jul 25 13:53:57 lol Jul 25 13:54:13 i'll take that background off then :D Jul 25 13:54:54 yeah. if you're really just working wit text you could take a nicer font. but that differs from person to person what's nice Jul 25 13:55:02 when android terminated an application automatically is that the same as if you go into setting -> apps -> [an app] -> force stop? Jul 25 13:55:31 if you're really into it you could load the covers from cddb and display them there Jul 25 13:55:35 with automatically I mean like if other application need the memory or what ever Jul 25 13:56:14 dwep: well, that is an idea, but I've only got the file title and url to work with :D Jul 25 13:56:37 but the app seems finished, just put some effort in it :) Jul 25 13:56:46 great idea btw Jul 25 13:56:50 and with filenames like "shady_music_site.ru artist__songname.mp3" Jul 25 13:57:07 of course then you should display... cats! Jul 25 13:57:20 some random imgur Jul 25 13:57:20 :D Jul 25 13:57:27 i was thinking of adding something random there yeah Jul 25 13:57:31 but im not sure if it would fit the app :P Jul 25 13:57:57 or fun facts or the "did you knew" section of wikipedia Jul 25 13:58:07 but you know what could fill that space up quick? Jul 25 13:58:09 ads Jul 25 13:58:16 get the authentic zippyshare experience Jul 25 13:58:20 hahaha Jul 25 13:58:49 is there an easy way to customize MediaControllers? Jul 25 13:58:57 not digging that default look too much Jul 25 14:00:33 me neither, I don't know anything about this topic Jul 25 14:02:56 http://pastebin.com/pKzDdxBk any idea why this listener does not trigger? http://pastebin.com/pKzDdxBk Jul 25 14:02:58 thanks for telling me about the font dewp, i just changed the font: so nice Jul 25 14:03:07 :) Jul 25 14:03:24 i now need to combine the awesomeness of many design geniuses to make my activity sexy as fuck Jul 25 14:04:20 haha... that's what you might think, but one straight forward style is it... not the combination of different styles Jul 25 14:04:45 https://github.com/markushi/android-circlebutton this looks pretty nice Jul 25 14:05:38 :) Jul 25 14:05:58 you could just use typo and put a cover in background when found, similar to this http://netdna.webdesignerdepot.com/uploads6/whatsnew-oct12/diamonds.jpg Jul 25 14:06:30 but that's not working well when the cover has typography as well Jul 25 14:06:31 hmm Jul 25 14:18:45 How do I post a touch event to a view? Jul 25 14:19:53 view.dispatchTouchEvent(event) probably Jul 25 14:22:08 a friend made my app a new logo because my current one is "stupid": http://i.imgur.com/Qpwdx1y.png Jul 25 14:22:16 i don't know what he is thinking Jul 25 14:22:49 hmm... i'm wondering about his definition of friend Jul 25 14:22:49 :) Jul 25 14:26:06 iffa: this looks painfuk Jul 25 14:26:08 painful Jul 25 14:26:12 * platzhirsch scratches out his eyes Jul 25 14:26:55 well, no offending, every designer's first step looks like this. but one has to be aware of that fact that that are their first steps Jul 25 14:27:16 encourage him/her to continue but do yourself and the rest of the app store a favor not to use it Jul 25 14:28:00 yeah :P i told him it is a nice logo but it is probably not exactly fitting to my app, and that perhaps a better logo would be more minimal and maybe more colorful Jul 25 14:28:33 less colours are better : nice low impact with lots of shade and a proper hi res ping with transparenc. That log is a real eye sore. Jul 25 14:28:43 s/ping/png Jul 25 14:29:14 but it's also funny. reminds me of my first corel draw steps centuries ago Jul 25 14:29:22 *melancholic* Jul 25 14:29:58 the typo, the patterns, gradients, strokes, ... <3 Jul 25 14:30:50 i meant more colorful as in turn those blacks and grays to a different color Jul 25 14:30:52 that isnt so depressing Jul 25 14:31:15 yeah Jul 25 14:31:25 i found my first "concept" of my app: http://i.imgur.com/qgkH9MD.png Jul 25 14:32:12 :D Jul 25 14:32:26 you could also call it hippyshare and do long shadows and stuff Jul 25 14:32:31 llolo Jul 25 14:32:46 dewp: what do you think of this action bar thing i had going for a while: http://i.imgur.com/pLpzDMn.png Jul 25 14:33:08 It's like i went back in time to 2000 and just opened psdtuts in Opera 4 and started messing with random filters in Photoshop 6 Jul 25 14:33:32 god damn it Jul 25 14:34:00 what is it Syzygy ? Jul 25 14:34:03 speech recognition recognized "blood sugar" as tupac shakur... Jul 25 14:34:12 :D Jul 25 14:34:13 platzhirsch: "painfuk" looks like it's missing 'c' :D Jul 25 14:34:24 Syzygy: oh god Jul 25 14:34:25 p_l: yeah, Freudian typo Jul 25 14:34:37 lol Jul 25 14:34:56 tupac lives Jul 25 14:35:02 iffa, well, if it's disappearing when not needed its a good thing Jul 25 14:35:46 Syzygy, so weird, 18 years now... Jul 25 14:36:11 guess I was 7 when he died. Jul 25 14:36:21 yeah it was just a different looking action bar.. and now that i look at my app icon in full res, it is sort of horrible: low res, basically stolen from zippyshare etc Jul 25 14:36:23 :) Jul 25 14:36:29 how do i make a new fancy logo Jul 25 14:36:33 or 6 :> Jul 25 14:36:48 iffa, lot of practice Jul 25 14:36:59 How can I set up an on touch listener and inside it delegate the request to the 'previous' on touch listener? Jul 25 14:37:03 This is not possible.. I hate this Jul 25 14:37:15 is there a list somewhere with the sexiest app icons on earth? :D i need inspiration Jul 25 14:37:20 platzhirsch, it is if you can have a list of listeners Jul 25 14:37:41 iffa, simple is best. Jul 25 14:37:48 iffa: do some search of icon design in general Jul 25 14:38:28 It wouldnt hurt to also look at the new material design guidelines also Jul 25 14:38:29 Syzygy: The View implementation uses a list of listeners internally, but this one is of course protected Jul 25 14:40:30 SpeechHelper.say("I ate Ghoughpteighbteau and Ghoti"); let's see if this works :> Jul 25 14:40:41 Syzygy: I am also told you are supposed to return false then Jul 25 14:41:31 platzhirsch, true if the event has been consumed and higher hierarchy views shouldn't even be bothered with it, false if they should bother with it. Jul 25 14:41:39 so you can "click through" things Jul 25 14:42:03 Syzygy: I think if I return false then the list view item default behavior should be picked up right? Not sure about that one though Jul 25 14:42:03 like a color overlay or something like that, but in your case that's not going to help much. Jul 25 14:43:39 yeah, that works, ok Jul 25 14:44:23 hopefully I will nail that mf down now Jul 25 14:45:10 i've got the bestest idea for my app icon Jul 25 14:46:02 a zipper and a play button somewhere in there (zippyplayer) Jul 25 14:46:26 so compressed playback Jul 25 14:47:06 iffa: cool Jul 25 14:48:31 Syzygy: the only problem is that with return false, of course I am missing the follow up events, as well : ( Jul 25 14:48:33 ive got no gfx design knowledge though so i can't actually make my icon, sucks :/ Jul 25 14:49:12 well I am sure you can paint something together Jul 25 14:49:43 platzhirsch, I know, in your case it doesn't help much unfortunately. Jul 25 14:49:49 this is madness Jul 25 14:50:04 but maybe you can put the previous onClickListener into your new one so that both actions are performed? Jul 25 14:50:09 I cannot hack this problem apparently Jul 25 14:50:20 yeah, not really retrievable Jul 25 14:51:27 new OnClickListener(...onClick { listener1.onClick(); listener2.onClick(); } doesn't work? Jul 25 14:51:58 ah right, well it's actually touch listener and I need the default touch listener for list view / list item Jul 25 14:52:05 which is Android std library specific Jul 25 14:52:42 I assume you can't even set something to that default listener Jul 25 14:53:56 no.. I guess I have to solve it properly anyway :D Jul 25 14:54:14 I have a circle view inside my list view item layout, it needs to be colored white if a list item is selected Jul 25 14:54:31 I actually managed to copy classes from grepcode and get them to work Jul 25 14:54:35 something like scrolllayout Jul 25 14:54:40 normally I would use android:duplicateParentState to get the touch event down to the circle view and set the change in their, but the event never comes down to it Jul 25 14:54:40 so maybe you can do it as well Jul 25 15:05:28 com.svox.pico is a bad tts engine :( Jul 25 15:05:30 bad voice Jul 25 15:13:30 is there some best practice for actually interpreting strings the voice recognizer returns? Jul 25 15:18:50 does android look at the density qualified folder or the sw qualified folder first? Jul 25 15:31:49 My app crashes at an activity when the screen is rotated with "... Wrong state class, expecting View State but received class android.widget.AbsSpinner$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/0x2. Make sure other views do not use the same id.". Here is the code: http://pastebin.com/ZAz6j22P, Here is the errormsg in detail: http://pastebin.com/xkbEG Jul 25 15:31:49 qMf . I do set some id's of views in the onCreate method. Could this be the problem? Any input appreciated. Jul 25 15:32:18 This paste has been removed! Jul 25 15:32:34 Hey everyone, I'm hoping there is someone in here that would be willing to provide some help on... We're really interested in wifiApStates and the methods used to invoke the hotspot for phones Jul 25 15:34:23 oh. compac: sorry. http://pastebin.com/xkbEGqMf . I think it got messed up when the line was broken into two Jul 25 15:36:39 any idea why this doesn't work? Toast.makeText(context, toast, Toast.LENGTH_LONG).show(); Jul 25 15:39:48 jesperj, so check for two views with the same id Jul 25 15:40:56 my app crashes on launch only on 4.2.2... before it crashes the warning comes up "unable to create external files directory", of course this is requested in android manifest.xml Jul 25 15:41:04 compac: Right. I'll just make the app output the ids of all views in that activity to logcat. will do Jul 25 15:41:16 what could be the solution? :-( Jul 25 15:46:10 hey guys :) Jul 25 15:46:52 dewp, mkdirs() Jul 25 15:47:11 compac: found it :) Jul 25 15:47:18 pfn, the weird thing is: i don't write files, i just read them Jul 25 15:47:21 indeed two ids were the same Jul 25 15:47:25 ;) Jul 25 15:47:37 and it's occurring even before deviceready is fired Jul 25 15:47:40 dewp, then be more specific in the messages you encounter, and where Jul 25 15:48:24 the app is not even launching... http://pastebin.com/Hfbdtfkg Jul 25 15:49:11 dewp, ApplicationContext sounds like your class Jul 25 15:49:21 oh, it's something with cordova Jul 25 15:49:26 yeah :-/ Jul 25 15:50:10 you're also running on an emulator Jul 25 15:50:15 maybe you don't have /sdcard mounted Jul 25 15:50:20 can someone explain the difference between LANGUAGE_MODEL_FREE_FORM and LANGUAGE_MODEL_WEB_SEARCH? Jul 25 15:50:39 i have... and i tried on galaxy tab 10 yesterday with 4.2.2 and there happened the same Jul 25 15:50:46 (not having an sdcard slot) Jul 25 15:51:06 trying on nexus 7 2012 (also without sd) it's working perfectly, also on 4.0.4 Jul 25 15:51:48 is the web search model maybe a bit less context retarded ("sensitive") compared to web search? Jul 25 15:55:05 In a fragment, I'm inflating a layout, and using the view that it gives me to view.findViewById(R.id.the_id), but it's giving me an error: No view found for id (id/the_id) for fragment TheFragment. There is definitely a view with that id in the layout. Why is this happening? Jul 25 15:55:06 So...anyone here that can help with wifiApStates and the methods used to invoke the hotspot Jul 25 16:06:20 vozz can you post the xml and the code in a pastebin? Jul 25 16:07:23 mattblang: code: https://github.com/rockerhieu/emojicon/blob/master/library/src/main/java/com/rockerhieu/emojicon/EmojiconsFragment.java#L44 Jul 25 16:07:38 layout: https://github.com/rockerhieu/emojicon/blob/master/library/src/main/res/layout/emojicons.xml Jul 25 16:08:02 It's complaining about emoji_pager Jul 25 16:10:57 Anyone have experience with wifiApStates? Jul 25 16:11:45 vozz weird Jul 25 16:13:02 vozz the third parameter is false, so it shouldnt be attaching to the onCreateView ViewGroup... Jul 25 16:20:04 vozz maybe try a clean and rebuild? Jul 25 16:20:20 i'll give it a go Jul 25 16:20:47 vozz it looks correct to me Jul 25 16:21:51 hm. does asking if anyone is interested in helping out a FOSS project count as advertising? (totally unpaid apart from your personal level of fulfillment) Jul 25 16:22:28 staying vague and meta to avoid triggering any "advertising" ☺ Jul 25 16:23:20 What the latest targetSdkVersion should I use Jul 25 16:23:27 20 Jul 25 16:23:30 in Android Studio... Jul 25 16:23:31 if you want kitkat Jul 25 16:23:32 ok Jul 25 16:23:44 thanks Jul 25 16:23:50 RabidApp I thought 19 was kit kat? Jul 25 16:23:53 4.4W s 20? Jul 25 16:23:58 arg Jul 25 16:24:02 4.4W is 20? Jul 25 16:24:11 nemo wouldn't bother me Jul 25 16:24:39 Sorry about that Jul 25 16:24:49 4.4w is 20... 4.2 is 19 Jul 25 16:24:56 grr Jul 25 16:24:57 ok Jul 25 16:24:58 4.4.2 Jul 25 16:25:02 is 19 Jul 25 16:25:11 Sorry wow.... a little stuck in my own train of thought.... Jul 25 16:25:14 hahaha Jul 25 16:25:16 I knew what you meant Jul 25 16:25:25 We're looking for someone who's used wifiApStates before.. anyone? Jul 25 16:25:26 emotionull I am still using 19 personally Jul 25 16:27:01 mattblang: I am using 20 but still my app is supported on 4.4.4 Jul 25 16:27:58 emotionull i figured id just stay at 19 until L is finalized. any reasons to increase to 20? Jul 25 16:28:10 hmmm Jul 25 16:28:37 Depends on what you're doing Jul 25 16:28:49 20...4.4.4w .. adds compatibility and changes for Wear... :) Jul 25 16:28:52 Android Studio keeps bugging me to use 20 Jul 25 16:29:14 Which happens to be why I am here, looking for someone to give our team a hand.... :D We're hitting a bit of a snag Jul 25 16:29:29 hm, well. I will take mattblang's authorisation as a general interpretation of channel rules. Jul 25 16:30:00 Hehe.... Jul 25 16:30:02 nemo you can always just ask forgiveness, i dbout anyone will ban you unless you start spamming anyway, lol Jul 25 16:30:03 So, our game, Hedgewars, had a fair amount of work put into an Android port by the author of Gang Garrison, which I haven't played, but is supposedly pretty good, as part of a GSoC project Jul 25 16:30:08 I am unsure as to the answer - personally Jul 25 16:30:19 he got netplay in, and made the in-game stuff more touch UI friendly Jul 25 16:30:26 the problem is... well, it was never quite finished :-/ Jul 25 16:30:32 and has bitrotted some Jul 25 16:30:46 and none of the other devs have any android familiarity or much time to speak of these days Jul 25 16:31:10 nemo you might make a post on the /r/androiddev subreddit, might get more exposure that way Jul 25 16:31:13 We have a totally ancient alpha on Google Play that predates even his work. So far, I think the only apk of his work is on his website Jul 25 16:31:37 mattblang: hm. that would require getting a reddit account, which I've so far avoided doing, but maybe I can ask one of the other devs Jul 25 16:32:02 anyway. wasn't asking for too much development time, more like, untangling the toolchain, updating libs, merging w/ latest code Jul 25 16:32:16 is there something like a speechrecognition "synonym" dictionary? Jul 25 16:32:19 and hopefully we could get something online-playable against desktop, which would be pretty cool Jul 25 16:45:02 vozz did you ever get it worked out? Jul 25 16:45:29 nope, still trying :( Jul 25 16:46:44 exact error is java.lang.IllegalArgumentException: No view found for id 0x7f090069 (im.tox.antox:id/emojis_pager) for fragment EmojiconGridFragment{42df7970 #5 id=0x7f090069} Jul 25 16:47:11 any problem with replacing a log with a toast? Jul 25 16:48:11 anyone who's familiar with both Android Studio *and* IntelliJ IDEA.. were the AS key bindings based on a particular IntelliJ keymap set? i'm used to cmd-O being Quick Open File and cmd-N being "generate code menu", but in IntelliJ cmd-O brings up the Generate Override dialog and cmd-N is Quick Open. cmd-w highlights progressively larger portions of the document instead of closing the window, etc.. screwin me up Jul 25 16:54:06 Is it possible to share instance of a class across multiple activities? I was hoping to do this with fragments but as far as i can tell you can only share the class, not the instance Jul 25 16:55:46 android-dev168: if you get fragments working the way you want (or any way) let me know Jul 25 16:56:31 android-dev168 you can share instances of classes across activities just fine - you'll need a singleton in order to do it, since one activity can't get an actual object reference to another Jul 25 16:57:02 android-dev168: You can solve it in a roundabout way by putting the instance in a service and brokering access to it. You can also mess with singletons in the application class, but they don't REALLY act like youd' hope on android and can lead to problems. Jul 25 16:57:05 however your question gives me pause - having one fragment instance get used in two activities probably won't work very well. what are you trying to accomplish? Jul 25 16:57:46 generally anything you want to survive cross-activity you also need to survive activity destruction and pausing, so it probably wants to live in a service Jul 25 16:58:15 any problem with replacing a log with a toast? Jul 25 16:58:16 +1 what dragorn said Jul 25 16:58:33 intrinsically, that is. I realize there may be specific bad cases Jul 25 16:59:10 jamesson code wise, certainly not.. toasts are a lot slower, so if you're pumping out hundreds of messages you'll make your device crap its pants Jul 25 16:59:54 dragorn: I am not terribly familiar with services, can they have a UI component? I thought that they were more for backroundy type tasks and inter application comms Jul 25 17:00:04 sarbs: well, I was planning on time-limitng the sampler, now I will just do it faster Jul 25 17:00:50 and UX-wise i've always thought they were a bad idea. fine for development, and maybe fine for a "please fill in X field" reminder on validation, but if something really needs to be communicated to the user it should be done in a non-time-dependent way, like altering the activity's view (highlight invalid field in red, for ex) or showing a dialog that requires the user to dismiss it Jul 25 17:00:51 android-dev168: they can not have a ui component (other than notifications). You'd do your long-running stuff in the service and bind to it with your activities and do the UI there Jul 25 17:01:13 if something doesn't reeeeally need to be communicated to the user, then, just don't communicate it Jul 25 17:01:41 dragorn: Okay I will try that, many thanks! Jul 25 17:01:46 sarbs: thanks as well! Jul 25 17:01:51 sarbs: naa, its just dev-time logging. I dont expect to leave anything but 2-3 after I'm done Jul 25 17:02:02 android-dev168 generally services don't have a ui component *on their own*, they can absolutely start activities and such tho, but the idea is that you take whatever actual work the UI component would do, and separate that out into the service Jul 25 17:02:19 jamesson oh yeah, i use toasts like they're going out of style for development logging Jul 25 17:02:34 android-dev168: for example, anything doing async state, i throw in a service, and then give myself some functions to pull that data up into whatever fragment/activity. Good examples would include long-term network sockets, bluetooth operations, background scanning and downloading operations Jul 25 17:02:43 sarbs: yeah i think if i moved the bulk work into a service, and then had a fragment get whatever it needed from the service it would work okay Jul 25 17:02:49 sarbs: if only the debugger didnt suck so hard, but thats another discussion Jul 25 17:03:07 thanks dudes Jul 25 17:03:10 android-dev168: basically anything you can't serialize into a frozen state and throw in the intent to launch the next activity Jul 25 17:03:13 or dudettes :) Jul 25 17:03:37 Does anyone have any experience with wifiApStates? Jul 25 17:03:39 android-dev168: not knowing exactly what you're trying to do, you may be able to just serialize your data into the extras in the intent and throw it at your new activity to preserve state across them Jul 25 17:04:23 RabidApp: wht are you trying to do? Jul 25 17:05:10 Dragorn, don't suppose we could take it to a non public dicussion? Jul 25 17:05:25 dragorn: I probably can't reveal too much but it is a library so the fragment lives outside of the real app .. I was hoping to ultimately be able to just use blocks in the layout files of whatever activities wanted to use the lib Jul 25 17:06:26 dragorn: i didn't want consumers have to add the instance to the intent themselves, the xml approach seemed a little bit more elegant Jul 25 17:09:22 Dragorn: Still there? Jul 25 17:17:27 mattblang: This is the bit of code that launches the other code... anything wrong here? https://gist.github.com/anonymous/ab056810ef97090bac56 Jul 25 17:21:37 what version of sqlite does android use? Jul 25 17:21:51 I have a dilema. I need two activities that have need access to the same object instance. Basically in ActivityA I create an object called MyManager... but now I need access to MyManager in my ActivityB. How would I go about that? Jul 25 17:21:56 anyway i can do testing on my pc that will exactly mimick the sqlite version used on android? Jul 25 17:25:53 eghdk: I just came here with a similar problem, if you can serialize your object then you can pass it via intents Jul 25 17:26:10 eghdk: or you can make a service to contain the instance Jul 25 17:27:26 jaspertheghost: it can vary depending on vendor Jul 25 17:28:00 jaspertheghost: all you care about is the database file, so you can just create a database using like sqlite browser or whatever, and if you are testing query/rawQuery etc etc it should work Jul 25 17:28:03 android-dev168: Ugh. Never used serializeable before... Jul 25 17:28:04 thats some real Bullshit Jul 25 17:28:25 jaspertheghost: it doesn't really matter unless you are trying to write code that interacts with the database in native code Jul 25 17:28:58 well on 1 version of android working with datetimes in sqlite lin the format mm/dd/yyyy was working for subtraction and greater than = comparison Jul 25 17:29:00 now its not Jul 25 17:30:04 Anyone have any experience using wifiApStates and methods ? Jul 25 17:40:17 jaspertheghost: SQLite does not have a storage class set aside for storing dates and/or times. Instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL, or INTEGER values: Jul 25 17:40:22 http://www.sqlite.org/datatype3.html Jul 25 17:41:33 or if you are using the data format utils: http://stackoverflow.com/questions/7363112/best-way-to-work-with-dates-in-android-sqlite Jul 25 17:42:10 looks like you always want to use int type, (ie time since epoch) and then convert with those format tools Jul 25 17:42:37 is the gps-notification-icon activated automatically or do I have to set something up? I'm using gps but no icon appears :) Jul 25 17:43:18 lasserix im well aware of that except if u do datetime('07/10/2014 15:00:00') u get a blank lol Jul 25 17:43:56 dewp: you mean the red pin that shows where you are? you need to place it yourself Jul 25 17:44:15 its wlasy best to use yyyy-mm-dd but the people who were working on teh backend of thecode i am using were rtarted Jul 25 17:44:30 no: in android notification bar Jul 25 17:45:13 jaspertheghost: can't you just make a reformater? Jul 25 17:45:29 not inside of sqlite itself Jul 25 17:46:02 oh you dont have access to the insert code? Jul 25 17:46:15 i do.. im about to change that now... Jul 25 17:46:37 hey lasserix can i bug you for a second? Jul 25 17:46:42 sure Jul 25 17:46:48 how are ya with trig? Jul 25 17:46:54 xD Jul 25 17:47:02 got an a back in the day ;p Jul 25 17:47:20 whata re you doing with trig? Jul 25 17:47:27 trying to calculate how to fling a pig? Jul 25 17:47:32 or throw a cat? Jul 25 17:47:38 so my layout uses icons that "orbit" the center of the screen. I want each icon to use the same radius and be ~30 degrees from each other Jul 25 17:47:57 good luck doing that in a relative layout right? Jul 25 17:48:14 so I have to position these icons programmatically in a function that gets called in onCreate Jul 25 17:48:39 ummright Jul 25 17:48:41 well either that or write my own viewgroup (nothankyou) Jul 25 17:48:51 so there's this Jul 25 17:48:55 https://github.com/dmitry-zaitsev/CircleLayout Jul 25 17:49:02 but all you have to do is use polar coordinates Jul 25 17:49:11 are the number of icons fixed? Jul 25 17:49:12 huh Jul 25 17:49:18 yes Jul 25 17:49:26 why are you making your life complicated? O.o Jul 25 17:49:34 polar coordinates make it easy Jul 25 17:49:41 x = cos phi Jul 25 17:49:43 y = sin phi Jul 25 17:49:44 LOL Mavrik custom viewgroups.. i stared at code for a few hours Jul 25 17:49:54 phi = angle Jul 25 17:50:02 double newX =sCenterX+radius*Math.cos(spacing); Jul 25 17:50:02 so pick a starting angle, add 30 Jul 25 17:50:09 right? Jul 25 17:50:13 each time calculate x / y (and offset) Jul 25 17:50:17 and you should be good Jul 25 17:50:24 double newY =sCenterY+radius*Math.sin(spacing); Jul 25 17:50:48 yeah just make sure spacing is in either radians or degrees whichever Math uses (i can't recall, i think radians) Jul 25 17:50:52 radians Jul 25 17:50:58 i have a function fixing that Jul 25 17:51:23 so is it not working or what? Jul 25 17:51:25 vozz are you nesting fragments? Jul 25 17:51:49 mattblang: Yeah Jul 25 17:51:50 it is not.. i suspect its because im missing something from the bigger picture Jul 25 17:51:54 for example Jul 25 17:52:01 what does the picture look like? Jul 25 17:52:07 vozz I think I have read that if you nest fragments you need to inject to a FrameLayout rather than declare in XML Jul 25 17:52:11 double baseY = contact_icon.getY(); Jul 25 17:52:12 Log.v("BaseX= ", Double.toString(baseX)); Jul 25 17:52:15 = 0 Jul 25 17:52:25 someone here might could comment on whether that is true or not. just a tought Jul 25 17:52:25 oh Jul 25 17:52:32 you are doing these probably before the layout works correctly Jul 25 17:52:38 contact icon is the center point? Jul 25 17:53:01 no, the "first" icon Jul 25 17:53:14 that sets the stage for the rest Jul 25 17:53:16 what is your sCenterY? Jul 25 17:53:37 "sets the stage for the rest" Jul 25 17:53:42 well can you post your code snippet? Jul 25 17:53:51 yep Jul 25 17:56:10 http://pastebin.com/i0PJrqu3 Jul 25 17:56:38 im calling arrange_buttons() after setContentView Jul 25 17:56:53 yeah Jul 25 17:57:00 that's because the values will be 0, hasn't finished inflating Jul 25 17:57:32 one sec Jul 25 17:57:36 rgr Jul 25 17:57:50 im not handling the change in degrees per iteration of my for loop either Jul 25 17:59:08 it's much easier to do in a fragment Jul 25 17:59:12 but you can't call this from oncreate Jul 25 17:59:29 you either have to make a subclass, override onmeasure then set some values or a callback Jul 25 17:59:31 or Jul 25 17:59:36 use a different lifecycle callback Jul 25 17:59:38 one second Jul 25 17:59:51 subclass = custom viewgroup right? Jul 25 17:59:58 k take your time Jul 25 17:59:59 kind of Jul 25 18:00:03 you can subclass it Jul 25 18:00:09 and only override onMeasure Jul 25 18:00:12 and just call super Jul 25 18:00:16 onLayout too I thought? Jul 25 18:00:25 if you want to make it custom Jul 25 18:00:32 but i was trying to keep it simple, just propogate the values Jul 25 18:00:35 not important in this instance Jul 25 18:00:47 another way i did this, but it might be a bit hacky, Jul 25 18:01:01 is to use a handler to with postdelayed / recall if width/height 0 Jul 25 18:01:08 if not 0, then do you arrangeicon code Jul 25 18:01:27 ie in oncreate start a runnable, the runnable checks if the layout is returning real values (ie not zero) Jul 25 18:01:36 if so, then do arrangeIcons otherwise postdelayed again Jul 25 18:01:45 (if so, also remove the callback) Jul 25 18:01:49 might be my best bet for onthefly Jul 25 18:02:41 thank you as always Jul 25 18:03:09 ahh Jul 25 18:03:17 so subclass whatever your root view is Jul 25 18:03:26 relativeview? Jul 25 18:03:29 err Jul 25 18:03:30 layout Jul 25 18:04:34 err Jul 25 18:04:42 relativelayout Jul 25 18:04:42 in your activity, looks like you can ovveride onWindowFocusChanged Jul 25 18:04:55 then check your values of that relative layout, see if they are equal to zero, if so ignore Jul 25 18:05:00 if not then call arrange icons Jul 25 18:05:00 mattblang: This is giving me an error it can't find the id emojicons: https://gist.github.com/anonymous/393205403b583bfaff22 Jul 25 18:05:15 that is supposed to work: http://stackoverflow.com/questions/3591784/android-get-width-returns-0 Jul 25 18:05:52 cool! Jul 25 18:06:02 might have my golden ticket here Jul 25 18:07:06 vozz going back to the original problem, can you put a break point in and see if it inflates anything with the layoutInflater? Jul 25 18:08:37 * autrilla will start coding 4 hours a day tomorrow. I promess. Jul 25 18:08:58 Promesses, promesses Jul 25 18:09:32 mattblang: How can I tell? The popup window hasn't appeared Jul 25 18:09:46 vozz the View should be insantiated though Jul 25 18:09:52 vozz the View object Jul 25 18:10:02 vozz then you coudl see if it is actually inflating something or not, and what it is inflating Jul 25 18:10:29 lasserix, ugh Jul 25 18:10:41 onWindowFocusChanged is an awful way to do that Jul 25 18:10:56 use ViewTreeObserver on the view and implement onGlobalLayoutListener Jul 25 18:11:01 that's why it's there for Jul 25 18:11:12 (if you REALLY must write all that garbage :) ) Jul 25 18:11:55 Mavrik: If i could wrap my head around custom viewgroups I would pursue that option. I was going through the dev stuff and its all quite meta. Jul 25 18:12:09 Jesperhead, I don't understand what's unclear Jul 25 18:12:15 all that complication you have here Jul 25 18:12:19 you just write in onLayout Jul 25 18:12:23 which TELLS you the width Jul 25 18:12:25 and the HEIGHT Jul 25 18:12:28 Iterator it = data.entrySet().iterator(); how can i get the value at a specified key ? Jul 25 18:12:37 and then you just TELL every view by calling layout() wher eit should be Jul 25 18:12:39 that's it :) Jul 25 18:12:45 mattblang: How do I do it? put a breakpoint on the View popupView line and keep stepping into it? It stops at a certain point Jul 25 18:12:52 you're now essentially writing 3x as much code to do the same Jul 25 18:13:00 * Jesperhead fidgits uncomfortably Jul 25 18:13:12 and trashing the layouting performance because you're doing the same thing out of band calling methods not meant to be used for that :) Jul 25 18:13:16 but ok Jul 25 18:13:20 ok. are you going to be around Mavrik? Im going to take another look at it Jul 25 18:13:28 as I said, use getViewTreeObserver on the RelativeLayout to get an observer Jul 25 18:13:35 and then implement onGlobalLayoutListener Jul 25 18:13:48 inside that listener you have guarantee that layout was done and getWidth(), getHeight will have valid values Jul 25 18:13:57 put it at the ViewPager line, where you were getting the "can't find id emojis_pager" error. See what the View from the line above it was instantiated as maybe? Jul 25 18:14:00 see Chet Haases talks about how to properly do those tricks Jul 25 18:14:28 nvm to my question Jul 25 18:14:41 thanks again Mavrik Jul 25 18:15:41 Mavrik-- i saw that globaltree was deprecated or not recomended, was just going by upvotes for that response, custom view group IS the way to go, but sometimes it can be daunting if you haven't before... Jul 25 18:15:46 mattblang: The view seems to be inflated Jul 25 18:16:26 Jesperhead: --> http://blog.denevell.org/android-custom-views-onlayout-onmeasure.html Jul 25 18:16:59 in the constructor you can add all the icons Jul 25 18:17:10 (views) os you have the children in onLayout Jul 25 18:17:14 i dont need to use onMeasure right? That's just for identifying the size of the views? Jul 25 18:17:20 mattblang: Maybe I should try and convert the fragments to custom views? Jul 25 18:17:29 yeah Jul 25 18:17:45 that's only if you want to force the dimensions to some specific size Jul 25 18:23:08 vozz so maybe try debugging it again, and when you stop at the ViewPager line, inspect the View object and see what its mChildren are. Jul 25 18:24:27 mattblang: It has 3, a viewpager, a view, and a linearlayout Jul 25 18:26:37 hey dudes Jul 25 18:27:00 today one month of android app project development Jul 25 18:27:32 that means you aged 2 months :) Jul 25 18:27:36 vozz ok, so expand the viewpager in mchildren, and find its mID. should be a decimal Jul 25 18:28:31 mattblang: It's 2131296360 Jul 25 18:28:34 How many lines must a programmer debug, before you can call him a coder? Jul 25 18:29:02 Ahh shit forgot the rest Jul 25 18:29:22 vozz okay, so now go to /build/generated/source/r/debug/package.name and see if 7F090068 is in the R file (7F090068 is 2131296360 in hex) Jul 25 18:30:47 mattblang: It is, as emojis_pager Jul 25 18:32:28 vozz hmmmm Jul 25 18:32:34 vozz i noticed that your error earlier said 0x7f090069 Jul 25 18:32:43 vozz is that still the error, or did something change between now and then Jul 25 18:32:57 AS 0.8.4 in canary Jul 25 18:33:05 lasserix: debugging doesnt make you a coder Jul 25 18:33:11 g00s: it's very nice, I changed several times libraries, I think it's very optimized. The last thing I think I can do better is the multithreading, for each network call I have an asynctask class :S Jul 25 18:33:23 birbeck yeah i know i wrote a parody of blowin' in the wind about coding, can't remember all the correct lines right now Jul 25 18:33:41 If I have an activity that replaces the fragment from a navigation menu, and I launch another activity when a certain fragment is selected, how do I come back to the activity with the fragment it was last on selected? Jul 25 18:34:03 gdrc thats not nice, gotta fix that ... just use IntentService Jul 25 18:35:06 and no networking allowed in activities / fragments ;) Jul 25 18:35:24 mattblang: The error is now 68 Jul 25 18:35:28 An operation running on an IntentService can't be interrupted. <- mh Jul 25 18:35:38 gdrc: http://www.therealjoshua.com/2012/09/android-architecture-structuring-network-calls/ Jul 25 18:35:42 also you can use volley Jul 25 18:35:53 I'm ok with retrofit Jul 25 18:36:12 the only problem with volley is you can't do post operatings on the same thread since it bounces back to the ui thread Jul 25 18:36:17 (afaik) Jul 25 18:36:28 lasserix: RequestFuture Jul 25 18:36:48 oh nice, this AS has that merged project view Jul 25 18:36:55 * g00s becomes canary Jul 25 18:36:55 but yeah, if you don't want to do blocking requests, then all callbacks come back on the UI thread Jul 25 18:37:23 g00s: android project view rocks Jul 25 18:37:42 vozz one thing I noticed is that you are calling getFragmentManager in your Fragment, shouldn't it be getChildFragmentManager? Jul 25 18:37:53 vozz don't think that is causing this issue, but would cause an issue in the future I think Jul 25 18:38:33 g00s: I don't like IntentService Jul 25 18:40:50 don't make IntentService sad :( Jul 25 18:41:23 mattblang: I got rid of that and put the tag back in the XML Jul 25 18:41:42 IntentService is pretty handy for some situations Jul 25 18:41:43 mattblang: as it gave a different error Jul 25 18:42:00 would be nice something with callback in the ui thread and activity/fragment Jul 25 18:42:10 vozz can you commit it so I can see the change Jul 25 18:42:52 I do about 10 different calls to web service, I don't want to create 10 IntentService classes Jul 25 18:43:28 gdrc take a look at AsyncQueryService Jul 25 18:43:34 mattblang: Wait where are you seeing the getFragmentManager? Everything in that emoji repo is someone elses repo, I'm using it as a library Jul 25 18:43:56 you can make all your requests commands on a queue, and have it rip through them. actually i think it extends IntentService also Jul 25 18:43:59 mattblang: I did some googling and found this, does this make sense to you? : I've read the source code of the FragmentManager and finally got the true reason: This exception happens when the fragments want to be attached to the viewpager before the viewpager is attached to its parent. In other words, before the getView() method returns, the fragments are inflated. Then the findViewById() method of the container of the ViewPager Jul 25 18:44:29 vozz you read through the source of FragmentManager and lived to tell the tale ?!? Jul 25 18:44:49 g00s: no, luckily someone else seems to have done it for me :) Jul 25 18:44:57 evening people! Jul 25 18:45:09 iffa this, iffa that Jul 25 18:45:14 iFFT Jul 25 18:45:25 haha what Jul 25 18:45:27 hey Jul 25 18:45:54 oh, it was IFTTT Jul 25 18:45:55 gdrc: uh.. you don't need 10 instances :) Jul 25 18:46:24 * g00s needs to check that out, looks pretty neat Jul 25 18:48:15 in sqlite in android this is not working seemed to be working in another implimentation-> SELECT * from ts_events where datetime('now') > datetime(event_dt, '+10 minutes') Jul 25 18:51:00 I tried a Hello World app in Eclipse, ran it in an emulator, it crashed "unfortunately [app] has stopped". I cannot view the logcat details though. The window disappears quickly. Is it in a file anywhere? Jul 25 18:51:03 g00s: its not possible to start multiple threads from intent service? Jul 25 18:53:27 JesusFreke: no? I'm compiling android sample Jul 25 18:53:28 lasserix IntentService has its own HandlerThread Jul 25 18:53:47 vozz: are you trying to find things in yoru view in oncreate or in onCreateView? Jul 25 18:53:57 hey dragorn Jul 25 18:54:04 vozz: The former will definitely give you broken behavior in fragments, the latter should be safe Jul 25 18:54:08 g00s: cheers Jul 25 18:54:18 g00s so if I do like for (int i = 0; i < 10; ++i) { Thread t = new Thread().start() } will it crash out or? Jul 25 18:54:24 (inside the intentservice) Jul 25 18:54:28 garyserj: 'adb logcat' from a terminal should give the full dump Jul 25 18:54:29 gdrc: You can send multiple types of intents to a single IntentService, which will then process them in the order they were received. You can use some piece of information in the intent to distinguish them Jul 25 18:54:38 dragorn: in onCreateView Jul 25 18:55:00 The fragment by itself seems to work in the example in that library Jul 25 18:55:08 JesusFreke: you are right Jul 25 18:55:15 vozz maybe try instantiating the view pager in onViewCreated then? Jul 25 18:55:15 so I don't think it's a problem with the library itself, but how I'm using it Jul 25 18:55:51 lasserix crash? no unless it would crash outside intentService :) for example, you could have your handleIntent bloack & do an RxJava thing, like fork / join Jul 25 18:56:03 I'm not sure if it's the right tool for your use though. Do you actually need a separate service to handle these callbacks? Or is the processing already "protected" by another active component? Jul 25 18:56:19 lasserix but in that case, you probably dont need IntentService Jul 25 18:56:30 g00s so you can start multiple threads from an intent service, its just that the message queue backing the intent service processes sequentially Jul 25 18:56:34 vozz ah, did you ever link me to the code you are using. didn't realize earlier that was a library you sent me Jul 25 18:56:36 yeah, i was just curious if it were possible Jul 25 18:56:49 lasserix look at the code its like 30 lines Jul 25 18:56:57 heh Jul 25 18:57:01 touche' Jul 25 18:58:12 mattblang: I will commit and upload it, hang on Jul 25 19:00:47 mattblang: https://github.com/ollieh/Antox/blob/master/app/src/main/java/im/tox/antox/fragments/ChatFragment.java#L329 Jul 25 19:01:43 and here is the layout that has the fragment that causes the problems https://github.com/ollieh/Antox/blob/master/app/src/main/res/layout/emoji_popup.xml Jul 25 19:01:51 the fragment being part of the library Jul 25 19:02:49 I think the issue is trying to put the fragment in a popupWindow that is inside another fragment Jul 25 19:03:01 and that the fragment getting put in the popupwindow has a viewpager Jul 25 19:03:42 i'm a newb. my hello world app isn't working! I have a logcat log but i've no clue what is the problem. I see the application doing too much work message but I understand that when it's a small number of frames like < 300 then it's just slowness of emulator and not a concern. But the app said "unfortunately [appname] has stopped" So i'm looking at the logcat log. http://pastebin.com/ZxfnafX Jul 25 19:03:42 E Jul 25 19:04:45 vozz so a fragment is spawning a PopupWindow that has a fragment that has a viewpager? Jul 25 19:05:42 mattblang: yes Jul 25 19:06:07 vozz yeah, no telling what is happening then. I can't be of much help on that. I am only just now going to try and nest a fragment Jul 25 19:06:32 anyone else have an idea about vozz's problem? Jul 25 19:06:41 thanks a lot for the help anyway Jul 25 19:06:50 vozz yeah man, sorry we couldn't figure it out Jul 25 19:08:47 vozz just noticed, one more thing to try. can you put the createEmoji stuff in onViewCreated instead? Jul 25 19:08:51 vozz gotta be careful with PopupWindow, its kinda weird Jul 25 19:08:51 JesusFreke: was your question for me? Jul 25 19:09:32 hey mattblang Jul 25 19:09:34 g00s Jul 25 19:09:38 hows everything Jul 25 19:09:38 hey Napalm Jul 25 19:09:39 Napalm hey man! Jul 25 19:09:51 Napalm going to try out the new AS here in a sec Jul 25 19:09:55 gdrc: well, it was really more a comment, in the form of a question. :) Jul 25 19:10:02 g00s: what what? Jul 25 19:10:12 0.8.4 has that new android view Jul 25 19:10:18 ah Jul 25 19:10:18 nice Jul 25 19:10:34 hey Napalm, can vozz use a fragment to spawn a PopupWindow that has a fragment which in turn has a viewpager? theoretically is that possible? Jul 25 19:10:36 i'm just switching our project finally over to gradle completely Jul 25 19:10:41 cant wait to be AS only Jul 25 19:11:13 Napalm man I bet. so glad to be done with Eclipse Jul 25 19:11:20 mattblang: you mean a Fragment that is also a PopupWindow which contains a ViewPager? Jul 25 19:11:44 Napalm yeah. vozz is having trouble with it. been trying to look at it but I haven't done a lot of nesting fragments Jul 25 19:11:50 i never had that many issues with eclipse ... just that the ant build stuff sucks Jul 25 19:11:59 who says thats nested? Jul 25 19:12:05 but yes, its possible, ive done it Jul 25 19:12:20 got an offer from facebook also Jul 25 19:12:29 Napalm oh cool! Jul 25 19:12:29 not sure, if I should bother though Jul 25 19:12:51 Napalm well, I did here on the radio that their revenue was really high last quarter Jul 25 19:13:21 I'm just imagining the interview, "so how do you find the Facebook Android App?" reply, "no idea, never had a facebook account" Jul 25 19:13:22 lol Jul 25 19:13:27 haha Jul 25 19:13:50 at least you know they are committed to native. Zuckerberg is quoted as saying they made a huge mistake with HTML5 on mobile right? Jul 25 19:13:59 even I was to do some work for them... i still wouldn't get an account Jul 25 19:14:16 mattblang: Which createEmoji stuff exactly? Is this in the library or ChatFragment.java? Jul 25 19:14:17 mattblang: we'll see Jul 25 19:14:33 vozz: still looking for a decent Fragment thats also a PopupWindow? Jul 25 19:14:36 g00s: whats the new android view you are refering too? Jul 25 19:14:57 Napalm: The issue is a fragment from a library that contains a view pager Jul 25 19:15:00 lasserix: its a "project view" panel in AS Jul 25 19:15:02 vozz in your CHatFragment. it looks like the Emoji fragment is being created in onCreateView in ChatFragment. WOndered if moving it to onViewCreated would make a difference, after that comment you reference earlier Jul 25 19:15:03 I'm trying to stick it in a popup window Jul 25 19:15:08 lasserix http://tools.android.com/recent/androidstudio084released Jul 25 19:15:29 vozz: your problem is actually something different Jul 25 19:15:43 vozz: the actual project is getting ANY fragment to also be a PopupWindow Jul 25 19:15:44 lol Jul 25 19:15:52 i might be able to dig out some code for you Jul 25 19:15:53 one moment Jul 25 19:16:31 Napalm you been watching any Commonwealth games Jul 25 19:16:43 no Jul 25 19:16:58 just because I live in part of the Commonwealth doesn't mean I care Jul 25 19:16:59 :D Jul 25 19:17:13 haha, I only know about them because John Oliver did a bit about it Jul 25 19:17:29 Napalm: Oh right. That would be really cool if you could Jul 25 19:17:57 my PopupInfo view got pulled into CM11 Jul 25 19:17:59 thats nice Jul 25 19:18:26 mattblang: Which bit specifically? None of it is actually related to creating the fragment. The emojiconfragment gets created the first time you press the emoji button in the ChatFragment. Jul 25 19:20:35 vozz oh yeah, sorry. was misreading something Jul 25 19:21:28 JesusFreke: I don't know, I just don't like IntentService, not easy to implement for easy task Jul 25 19:22:02 gdrc: yeah, it's useful for specific situations Jul 25 19:22:23 what about inner thread+runnable+eventbus? Jul 25 19:23:11 I would tend to use a LooperThread/Handler myself Jul 25 19:24:32 try to use the framework as much as you can :) Jul 25 19:26:25 Does anyone know why my GCM collapse_key would not be delivered to some devices (but it does work on others)? Jul 25 19:26:55 Although, I still think there should be an eventbus library named catbus. Jul 25 19:27:42 vozz: hey, just found my code. It's not ready for production in anyway. It works for me, but thats all that can be said about it. What exactly are you trying to achieve? Jul 25 19:27:57 which android emulator are you using on linux? Jul 25 19:28:10 for app developing Jul 25 19:28:35 Napalm: There's this fragment for picking emoji from this library: https://github.com/rockerhieu/emojicon Jul 25 19:29:01 I'm trying to stick it in a popupwindow so it can sit above the keyboard Jul 25 19:29:01 yea, but why a PopupWindow? Jul 25 19:29:18 huh? Jul 25 19:29:24 JesusFreke and you broadcast an event like bus.meow() right ? Jul 25 19:29:32 vozz: you mean ontop of? or above? Jul 25 19:29:44 on top of, as in the z axis Jul 25 19:29:52 you can do that with a dialog Jul 25 19:29:56 g00s: WFM. and you automatically get an awesome mascot Jul 25 19:30:12 ah. Maybe I should do that. Jul 25 19:30:20 poll for navigation drawer navigation: (A) one activity that swaps fragments, or (B) a BaseActivity implements the drawer, all other screens are activities inheriting BaseActivity Jul 25 19:30:59 hahaha, there's a catbus.com, for "clemson area transit" Jul 25 19:31:15 shekibobo: probably A? No need to rebuild the drawer every time the you change the fragment "under" it. Jul 25 19:31:15 Napalm: Why might you use a PopupWindow rather than a dialog? Jul 25 19:31:56 vozz: think of it as a raw Dialog Jul 25 19:32:06 vozz: its also a Context Jul 25 19:32:29 g00s: now the image of the catbus is stuck in my head. Thanks. Jul 25 19:32:30 Groxx: that's what I'm doing now. If I want to launch other activities, any idea how to get back to the last fragment when returning from the child activity? Jul 25 19:32:35 i think Jul 25 19:32:37 meh Jul 25 19:32:57 probaly look somethinglike : http://en.wikipedia.org/wiki/Cat_organ Jul 25 19:33:01 shekibobo: .addToBackStack() on the fragment transaction Jul 25 19:33:03 dragorn: your welcome :) Jul 25 19:33:11 you're* Jul 25 19:33:14 Napalm: How do I insert a fragment into the dialog? Jul 25 19:33:18 JesusFreke: catbus.com is not as advertised. I demand a refund. Jul 25 19:33:26 shekibobo: if you want more control, you can .detach the fragments and .attach them when you want to move between things Jul 25 19:34:06 Groxx: right now I'm just using .replace() Jul 25 19:34:07 vozz: one moment, want to try it out Jul 25 19:34:39 for some reason, I have one activity that returns to whatever fragment was originally selected, and a new activity that always returns to the "dashboard" fragment Jul 25 19:34:47 dragorn: yeah, they should totally do a catbus paint job for their busses Jul 25 19:34:53 vozz: see PM Jul 25 19:37:36 shekibobo: are you adding to the back stack in both? and check any superclasses (if you have any), they may be overriding onBackPressed to do something else. Jul 25 19:39:30 Groxx: interesting... it actually returns to the fragment I want on BACK, but on UP, it goes back to the activity like it's new. Jul 25 19:41:49 shekibobo: that *kinda* makes sense, given how up is supposed to act. I haven't used the up button much / any though, not sure if that's abnormal for default-ish setup Jul 25 19:42:30 yeah, I'm gonna try something out, see if it works Jul 25 19:42:40 so the last time I read the google docs on it, and they might have changed, up should always be used to return to a parent activity Jul 25 19:42:43 so it's acting as designed Jul 25 19:43:32 JesusFreke / g00s : I was talking about something like this: http://pastebin.com/9T55VT2T fast and elegant Jul 25 19:45:17 gdrc: you have to spin up a new thread just for the one task though Jul 25 19:46:40 Hello, what 's the typical ratio between current and total installs for a free app, anyone knows? Jul 25 19:47:55 lasserix: mines about 10:1. no idea how typical that is Jul 25 19:48:11 but the app in question is fairly old and hasn't been updated in a year or two. Jul 25 19:48:23 ahh okay Jul 25 19:52:20 JesusFreke: yes, is this bad? Jul 25 19:53:02 gdrc: should be ok for occassional tasks. Bad if you need to do it a lot Jul 25 19:53:38 I'm trying to use SurfaceView to show a camera preview, but with camera control buttons right on top of the preview. I'm a bit confused about how to implement this Jul 25 19:53:53 I'm assuming I'll have to add these controls as children to the SurfaceView in my xml file Jul 25 19:54:17 Then for me is ok but I dont like all the "new Runnable() { public void run ()" stuff Jul 25 19:54:23 but all the examples I've seen, the SurfaceView xml tag has no children Jul 25 19:59:09 gavri: would putting the surface in another layout work, and positioning the buttons over it? FrameLayout -> [surface, button(gravity="center|bottom")] maybe? RelativeLayout should work too. Jul 25 20:06:50 <_CalLightman_> Hi ... i am having problems implementing a custom expandable list .. can someone guide me Jul 25 20:08:07 Groxx: launchMode="singleTop" for the main activity seems to have solved the problem Jul 25 20:24:37 i'm trying to create a view that'll show up over the keyboard, here's how i'm doing it: https://gist.github.com/anonymous/bf6bf39ed07efcceed20 however, i'm getting an error: "Window type can not be changed after the window is added." any ideas? Jul 25 20:27:12 i don't have any onAttachedToWindow calls, so i'm not sure Jul 25 20:29:54 any ideas? g00s? Jul 25 20:32:06 is there a way to set a custom font for the whole app (all text)? Jul 25 20:34:19 no Jul 25 20:34:34 you must subclass and apply the font to every widget Jul 25 20:34:49 sounds like a lot of work Jul 25 20:34:55 it is Jul 25 20:35:10 dumb question - is it possible to handle sensors in a way completely independent of activities? Jul 25 20:35:21 yes Jul 25 20:36:27 robitx: dumb answer: -12 Jul 25 20:38:11 iffa, try subclassing all of the view classes which use the font Jul 25 20:38:28 or, creating a convenience method to recursively set the font for all views in a view group Jul 25 20:41:21 JesusFreke: not sure if I should ask for elaboration... Jul 25 20:41:39 robitx: just being facetious :) Jul 25 20:42:00 self-proclaimed dumb question -> nonsensical answer. Jul 25 20:43:42 heck yeah, just did my first fragment nesting and it worked great. was trying to do a detail in a master-detail with a fragmenttabhost, which of course the detail is a fragment in order to be part of a master-detail in landsdcape Jul 25 20:44:02 robitx: since nobody else is tackling it: use a service. Jul 25 20:44:41 Groxx: thanks. I'll try the layout approach you suggested Jul 25 20:44:54 I just saw your message. don't know how I missed it earlier Jul 25 20:45:09 gavri: no problem. good luck :) Jul 25 20:48:50 can someone explain what the purpose of a context is? Jul 25 20:49:31 context is highlest level android state wrapper Jul 25 20:49:45 i have no idea what you're talking about Jul 25 20:50:08 http://www.doubleencore.com/2013/06/context/ Jul 25 20:50:37 or http://stackoverflow.com/questions/3572463/what-is-context-in-android Jul 25 20:51:09 aight so it's just a way to pass around shared info Jul 25 20:52:14 and stuff like activities are derived from it Jul 25 20:55:11 whomp: yeah, basically. there are some details like themed contexts (which affect which resource you get when you e.g. context.getString() ), but basically it's just a handle for "your app data" because it needs to be determined at runtime, and not statically. Jul 25 20:55:59 Groxx: yep, looks like I have to take a bath in android api details, I prefer to use framework layer over it, but for current purpose I have to do it my self first Jul 25 20:57:43 robitx: services are, thankfully, one of the simpler parts of Android. but tl;dr they're a process-lifecycle object. Running a service implies your app is higher priority than one with nothing running, and if it's foreground it's approximately as important as whatever app is currently in the foreground. Jul 25 21:03:18 Groxx, why not singletons? Jul 25 21:03:23 or just a singleton Jul 25 21:06:11 Groxx: thx, I look into it Jul 25 21:07:18 whomp: there kinda is one - getApplicationContext() is always the same (IIRC. I don't think it's themed.). Activities and Services and BroadcastReceivers extend Context (indirectly) to add things like theming and simplify calls like getString. Otherwise you'd be writing a lot of Context.getInstance().getString(). Jul 25 21:08:06 robitx: Groxx: here's a good article on c Jul 25 21:08:08 Context http://www.doubleencore.com/2013/06/context/ Jul 25 21:08:18 heh Jul 25 21:08:20 whomp: also because singletons have crappy threading behavior in general. say your application's theme changes, and you have a single themed context - suddenly your "for ( attr : context.getAttrs())" in the background is no longer consistent, because it could change in between calls. Jul 25 21:08:25 he didn't read it the first time! ;p Jul 25 21:09:02 lasserix, i did but still wondering Jul 25 21:09:11 ok next thing.. what's a keyguard Jul 25 21:09:11 ? Jul 25 21:09:21 lock screen, I think Jul 25 21:09:22 whomp: its the lock-screen Jul 25 21:09:25 ah Jul 25 21:09:34 Groxx: its also worth noting you get a an Application Context per Process Jul 25 21:09:53 makes sense, but a useful detail :) Jul 25 21:09:56 in other words, when your app has multiple processes, you get multiple application context's Jul 25 21:14:05 Anyone know why a GCM collapse_key wouldn't be delivered on some devices? It is for others, and the broadcast itself always arrives... Jul 25 21:19:30 or maybe someone knows someone I should try asking? It seems like it _could_ be related to not having a Google account, but the docs don't mention anything like that (maybe a docs error?) Jul 25 21:22:44 I was trying to run a cross-compiled binary an x86 emulator image, and it just complains that sh is not found when I try to launch it. Is that implying that binary is invalid for that OS instance? Is there a sanity check I can do? Jul 25 21:27:17 you can put a GoogleMapFragment inside of a DialogFragment right? Jul 25 21:27:27 yes Jul 25 21:27:33 use the getChildFragmentManager() Jul 25 21:27:44 it has to be the support google map fragment Jul 25 21:47:10 how can I use adb to reboot my geniemotion android virtual machine? Jul 25 21:47:35 adb -s DEVICE_ID reboot Jul 25 21:51:58 I have a device in virtualbox and geniemotion, but when I do adb devices, it lists nothing Jul 25 21:52:11 so I guess I can't reboot it with adb at present Jul 25 21:52:16 what can I do to get adb to recognize it? Jul 25 21:55:02 im doing a dialogFragment , but to add a negative close button I am overriding onCreateDIalog instead of using onCreateView. how should I inject a fragment that is in the view I set for the dialog, or rather when should I Jul 25 22:00:42 how is possibile that forma show a stupid dialog I have to create a DialogFragment class? Jul 25 22:02:05 garyserj: then in virtualbox you need to install adb, then run a terminal in it and use the adb command Jul 25 22:02:30 gdrc: huh? Jul 25 22:02:53 mattblang: huh? Jul 25 22:03:11 try to show a Dialog and rotate the screen Jul 25 22:03:29 rotate the screen after showing a dialog? Jul 25 22:04:28 yes Jul 25 22:04:46 why? Jul 25 22:05:08 why not let android do the rotating based on orientation Jul 25 22:18:19 gdrc: what happens when you rotate the screen? Jul 25 22:19:28 just disappers Jul 25 22:27:12 Yes, that a dialog is visible is state that needs to be saved. DialogFragment does that for you Jul 25 22:50:02 Does anyone know why I might have to restart ADB/Android Studio/my phone every so often (ranging from a few minutes to a few hours) in order to get debugging to work? When the problem strikes, the app will either hang waiting for the debugger, or it'll just run without debugging. Jul 25 22:56:48 PeteS: dunno. some possibilities? 1) bad USB cable, connection is flaky. 2) anything else on your system trying to steal ADB? I think Android Studio still fails unless it's on a specific port. 3) have you tried turning it off an on again? Jul 25 22:57:04 I / people I work with have had 1 happen multiple times, fwiw Jul 25 22:58:19 anybody here ever use the genymotion google group? Jul 25 22:58:23 I cannot see how to post a new topic on the google group for genymotion https://groups.google.com/forum/#!forum/genymotion-users See in this screenshot http://i.imgur.com/ulvHrZJ.png , I see no new topic option Jul 25 22:59:21 basically, I've had this problem with ADB since 2009 across many computers, platforms, and USB cables. I've just kind of accepted that ADB is flaky, but I wanted to see if anyone else might have any secret tips :-/ when it happens, sometimes resetting ADB works, sometimes not. Sometimes I have to restart my phone, sometimes Android Studio. It's just frustrating that Google has obviously not exposed the full state of ADB/the ADB dameon, or Jul 25 22:59:22 resetting it would work every time. And also that the Android Studio connection will just "reset" without any indication of why it reset. Jul 25 23:01:25 PeteS: I used to have more problems, but it has generally improved for me. Even Eclipse doesn't take as many whacks to play nicely. maybe silly question: same device, or multiple? I've had some devices with weird adb behaviors (one takes > a minute to register, one doesn't print all logs, etc) Jul 25 23:02:08 probably half-a-dozen different devices :-( Jul 25 23:02:36 bleh. that sucks :( emulators too? Jul 25 23:03:37 heh. maybe the tcp/ip mode will work better? Jul 25 23:03:47 that I can't recall... usually it would be an issue of losing a connection to the emulator port itself, which I assume is a separate issue Jul 25 23:04:09 oh, that's a good point... I suppose I can look into how to get that set up with Android Studio Jul 25 23:04:49 I don't remember if I've tried with AS, but for Eclipse it was just `adb tcpip` and `adb connect ` in the terminal, and everything worked normally. Jul 25 23:06:15 sweet, thanks! Jul 25 23:12:58 Is there any good tutorial out there on how to sign my newly built APK using keytool and zipalign on Ubuntu 14.04?? All I can find is tutorials saying "keytool -genkey blah blah" aaaand my keytool does NOT have the option -genkey.. or -keystore, etc... Jul 25 23:13:27 I thought that this signing and uploading the APK to the google play store would be a simple last issue :( Jul 25 23:13:46 Heloooooo Jul 25 23:13:56 Anybody help me? Jul 25 23:15:37 This is coding with Android sometimes... http://brainrants.files.wordpress.com/2013/09/writer.gif Jul 25 23:16:06 Insane Jul 25 23:17:06 Dracula help me Jul 25 23:20:20 Messiii: wazzup? Jul 25 23:20:30 I need fix a code Jul 25 23:21:01 new Random().nextCode() ? Jul 25 23:21:08 Ok Jul 25 23:21:11 One moment Jul 25 23:21:16 Are you expert? Jul 25 23:21:16 Lol Jul 25 23:24:07 Groxx::: Jul 25 23:27:14 Messiii: what code is broken? Jul 25 23:29:52 Ok cheeck my code guys Jul 25 23:29:55 And help my pls Jul 25 23:29:56 Http://pastebin.com/HvSFcj5k Jul 25 23:30:03 The string not sent Jul 25 23:30:33 String emosio = ":)"; Jul 25 23:30:35 No work Jul 25 23:32:55 111 views, 0 answers, whats app Jul 25 23:36:12 Groxx::: Jul 25 23:38:25 Messiii: not sure, it looks like REQUEST_CODE_SMILES should work, if it's launched from REQUEST_CODE_EMOTICON. are you starting the EmoticonActivity from any other places? Jul 25 23:39:39 Yes, from a button Jul 25 23:40:21 Someone invent the damn time accelerator app Jul 25 23:40:38 make the last hour of every friday go by in an instant, Jul 25 23:40:41 you'll make millions! Jul 25 23:41:13 lasserix_: nooo! that's my most productive time! Jul 25 23:41:55 Case R.id.emoticonmenu: Jul 25 23:41:55 StartActivity(new Intent(this, EmoticonActivity.class)); Jul 25 23:41:55 Break; Jul 25 23:42:05 im interested in getting into android development, but I'm not familiar with java, what's a good java book? Jul 25 23:42:27 Groxx you can use it for monday morning then ;p Jul 25 23:42:31 Messiii: you probably want to startActivityForResult(new Intent(this, EmoticonActivity.class), REQUEST_CODE_SMILES) there Jul 25 23:43:08 jeaton: done other programming? Jul 25 23:44:09 a little c and c++ Jul 25 23:44:14 mostly c++ Jul 25 23:44:29 Perfect Groxx youre the best man!!! Jul 25 23:44:57 Thank you Jul 25 23:48:26 jeaton: unfortunately I don't think I've found a java book I actually like :( they're always unnecessarily huge (ironic….) Jul 25 23:48:57 tbh I usually turn to some kind of crash-course + a more detailed reference like http://docs.oracle.com/javase/tutorial/java/index.html Jul 25 23:52:56 (the reference is not the greatest, but it does cover some of the harder concepts in more detail than most tutorials, especially generics) Jul 25 23:53:55 whoever aksed what book to get: none Jul 25 23:53:58 just start coding Jul 25 23:54:04 don't stop till your eyes bleed Jul 25 23:54:10 then take a day to recover Jul 25 23:54:19 rince and repeat till you feel you are proficient enough Jul 25 23:54:20 ^ the above will take one day + 5 minutes Jul 25 23:54:25 + repeats Jul 25 23:54:31 seriosuily though, the only way to learn to code is to code Jul 25 23:54:49 read all you want but it won't mean shit until you actually have to encounter problems that the book won't cover which happen all the time Jul 25 23:55:07 lasserix_: I dunno, I despair at how many people totally fail at java's memory model, despite it being one of the few languages where it _exists_ and is relatively simple. Jul 25 23:55:23 well there's java memory and there's dalvik/android memory model Jul 25 23:55:49 memory model being the memory behavior + compiler reordering + thread safety. that's the same in dalvik. Jul 25 23:55:49 those two are very different, and i guess android does take some getting used to, but even then i have not seen a book that covers the android GC very well Jul 25 23:55:58 ahh Jul 25 23:56:40 yeah but that's not really going to help you code apps, might help you structure the architecture when you are doing complicated stuff enough to warrant reading a book, but for a beginner of java? you might as well pour clorox down their brain stem Jul 25 23:56:48 jeaton: actually, you'd probably do fine with an Android programming book. lots of them include some java / more than enough to get started. Jul 25 23:57:02 haha Jul 25 23:57:17 yeah, I just get tired of finding threading bugs in libraries. Jul 25 23:57:55 yeah i guess that's why they say human beings aren't meant to do multithreading since we're aren't built (really) to multitask (which i think is bs, but... libraries prove it to be true ;p Jul 25 23:58:29 if the human mind is capable of hosting multiple personalities, definatly capable of comprehending concurrency Jul 25 23:58:59 Holy shit Jul 25 23:59:09 I am talking through windows cmd Jul 26 00:04:39 lasserix_, one of my personalities has a lock on the concurrency knowledge :( Jul 26 00:14:14 there's an imageview with some stuff set on it, like the width, height, etc. Jul 26 00:14:15 i want to recreate it programmatically, but i don't want to have to specify all of its params in code Jul 26 00:14:15 how can i do this? Jul 26 00:14:15 i want to recreate it an arbitrary number of times Jul 26 00:17:36 whomp: always the same stuff? might be easier to create a style. I forget how to apply those in code though. Jul 26 00:20:33 whomp you can just subclass imageview and set those parameters in the constructor Jul 26 00:20:43 thx for the ideas Jul 26 00:20:51 gonna go with the style idea, that seems easiest Jul 26 00:20:55 technically you can't set width / height in constructor, you have to do that in onMeasure Jul 26 01:01:05 http://www.google.com/url?q=http%3A%2F%2Fwww.parleys.com%2Fplay%2F53a7d2cfe4b0543940d9e564&sa=D&sntz=1&usg=AFQjCNFL2yIxF-G7vE5KhtsZBGuR264olw Jul 26 01:01:12 after watching this, I do want to try out macroid Jul 26 01:12:30 hi guys Jul 26 01:13:25 I'm usin a for loop to launch some IntentService requests. I'm showing a progressDialog with a "Cancel" button. How can I clear the intentService's queue when user taps on "Cancel" button? Jul 26 01:13:31 is this even possible? Jul 26 01:15:53 look at the apis available to you in intentservice, that will tell you if it's possible Jul 26 01:55:25 Mavrik: Starting to make a little more sense. SOMETHING is happening when my layout is inflated, though still not the results im looking for Jul 26 02:23:10 Hi all. Got a question regarding the back stack. For my current project's main lay out, I'm using 1 permanent fragment, one that should always be attached. Other "sub" fragments get attached and removed, being added and popped to the backstack succesfully. The main fragment is not put on the backstack. Upon going back from the main fragment to android's os, and then opening the app again, Jul 26 02:23:10 the fragment is detached. Jul 26 02:23:47 I have no methods detaching the fragment, and I only add it at the first run through of onCreate Jul 26 02:24:12 Also, when I open a URL in my app, and go Back from the browser to my app, it works perfectly Jul 26 02:24:27 Jesperhead: post code? Jul 26 02:24:32 anybody any idea what I'm doing wrong? Jul 26 02:24:54 ThomQ pressing back calls onDestroy Jul 26 02:25:02 lasserix: sure thing. Im working on a jpg atm to better illustrate where I stand Jul 26 02:25:05 thus it has to be reinstiated Jul 26 02:25:25 pressing home only calls onPause, not onDestroy, hence going to the url and coming back works okay Jul 26 02:26:12 Ahh k, yeah that explains that Jul 26 02:27:51 lasserix: just a little clarification: http://imgur.com/zTtRwJI code incoming Jul 26 02:28:58 My main issue is that my viewgroup is not happily accepting the layout parameters, how can I code those into my viewgroup? Jul 26 02:29:00 Ahhh k. I do a check on a Fragment var which ref's the main fragment for null in onCreate. So destroying the activity detaches all fragments, but doesn't null all var's right? Jul 26 02:29:16 center_horizontal/vertical and alignBottom Jul 26 02:29:18 Jesperhead: need the code Jul 26 02:29:24 you use layout params when you add the viewgroup Jul 26 02:29:32 or you can inflate it from xml, just set the properties there Jul 26 02:29:45 but then the second or third constructor (context, attributes, something else) gets called Jul 26 02:29:53 post your code tho it'll make it a lot easier Jul 26 02:30:31 post it quick, i gota run an errand wont be back for an hour or two ;p Jul 26 02:31:20 http://pastebin.com/j5S7NVkM Jul 26 02:31:24 sorry Jul 26 02:32:14 are you inflating from xml or in code? Jul 26 02:32:26 xml Jul 26 02:33:00 what are the width height args of the xml properties? Jul 26 02:33:22 http://pastebin.com/YuhNQuwJ Jul 26 02:33:37 wrapping for the viewgroup Jul 26 02:33:56 oh ok Jul 26 02:34:02 so you're going to have to override on measure Jul 26 02:34:06 since your wrapping the view Jul 26 02:34:15 piss Jul 26 02:34:17 (im pretty sure on this Jul 26 02:34:18 it's easy Jul 26 02:34:21 k Jul 26 02:34:42 if you need to go i can explore that. I hope to get more of your advice when you return Jul 26 02:34:52 http://stackoverflow.com/questions/12266899/onmeasure-custom-view-explanation Jul 26 02:35:06 basically you need to calculate desired height Jul 26 02:35:08 tyty Jul 26 02:35:46 i believe the AT_MOST else if will return true Jul 26 02:35:50 since you're using wrap_content Jul 26 02:36:05 a good way to calc desired height (before you do all that jazz in on measure Jul 26 02:36:32 is to make the viewgroup like 5 or 10 times the width of a single icon Jul 26 02:36:45 oh i have 20 more minutes Jul 26 02:36:55 k Jul 26 02:37:04 remember to also Jul 26 02:37:10 once you calc the stuff for the parent view Jul 26 02:37:16 to do call onmeasure on your child views Jul 26 02:37:17 a la http://blog.denevell.org/android-custom-views-onlayout-onmeasure.html Jul 26 02:38:03 ok Jul 26 02:42:23 LOL Jul 26 02:42:30 well its centered but super tiny now Jul 26 02:43:14 good you are on right track Jul 26 02:43:22 set the background color to red or something so you can see how it is bounded Jul 26 02:43:31 also radius can be calculated by taking height / 2 - some padding Jul 26 02:43:59 lets see your code now? Jul 26 02:45:13 central icon is centered in viewgroup as well. colored background fills the size of the icon Jul 26 02:45:18 new code incoming Jul 26 02:46:15 ah i see Jul 26 02:46:30 because i did a copy/paste job from the link, it appears the viewgroup is exactly 100x100 pixels Jul 26 02:47:07 http://pastebin.com/njHtUu5w Jul 26 02:52:20 lasserix: but I want the viewgroup to be the size of the background icon. how can I directly pull that info from the view/drawable Jul 26 02:52:30 instead of hardcoding it Jul 26 02:55:36 Hi! I'm trying to run adb start-server, but adb.exe is only listed in Task Manager for around half a second Jul 26 02:56:00 oh, windows :( Jul 26 02:56:09 how are you trying to do it Jul 26 02:56:28 running "adb start-server" from a command line Jul 26 02:56:42 specifically, the one that comes up when putting "cmd" into the Run... dialog Jul 26 02:57:41 why are you trying to run adb start-server Jul 26 02:58:03 desmin88: Every time I run adb devices, it complains "error: protocol fault (no status)" Jul 26 02:58:46 is your device plugged in, does it have USB debugging enabled, and have you installed the appropriate driver(s)? Jul 26 02:59:00 yes, yes, and I believe so Jul 26 02:59:09 also try killing an open adb processes Jul 26 02:59:27 desmin88: the adb process kills itself Jul 26 02:59:32 desmin88: that's my issue Jul 26 02:59:33 are any open Jul 26 02:59:37 desmin88: no Jul 26 02:59:57 do you use android studio Jul 26 02:59:58 the only thing open that says "Android" is Android Studio **** ENDING LOGGING AT Sat Jul 26 03:00:00 2014