**** BEGIN LOGGING AT Tue Apr 23 02:59:58 2013 Apr 23 03:19:51 I'm learning how to implement ads in my apps and the developers docs are a bit unclear. I'm reading : https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals Apr 23 03:20:56 based upon this line "You can download an example project containing this code here and may alternately", it sounds like I can either create the banner in XML 'OR' java. Apr 23 03:21:55 does this mean that if I chose the java way I don't need to add any of the XML stuff , and vice versa? Apr 23 03:22:15 In addition... which is the more standardized way, XML or java? Apr 23 03:25:01 NVM... wouldn't you know I just found a relevant APK with some insight. Apr 23 03:26:28 ads sux Apr 23 03:26:38 :) Apr 23 03:27:01 yea... I know. but learning doesnt' Apr 23 03:27:32 and the more I can learn, the better I'll be when I do actually figure out what UX I want for my app. lol Apr 23 03:29:05 hmm… I would have thought that was a known already, or should be if you started dev/implementation Apr 23 03:29:18 * StingRay_ hates the term UX Apr 23 03:29:38 * StingRay_ just like he hates "workflow" and "pipeline" Apr 23 03:29:39 nope. remember... I picked up this idea from a forum and ran with it. Apr 23 03:29:56 * Rescue9 hates any words with the term work in them Apr 23 03:29:57 oh yeah, that thing you told me about ?? Apr 23 03:30:07 yup. Apr 23 03:30:21 the ultimate timewasting app Apr 23 03:30:25 yeah see thats a hard one Apr 23 03:30:26 :-P Apr 23 03:30:50 I would not like a design task with the keywords "useless" "no point" and "waste time" Apr 23 03:30:50 lol Apr 23 03:30:50 yea. essentially no reason for use other than to bug the living crap out of ya. Apr 23 03:30:54 designer nightmare Apr 23 03:31:08 Hmmm... sounds like you're up for the challenge then huh. Apr 23 03:31:15 fk no Apr 23 03:31:29 gee... thanks. lol Apr 23 03:31:34 I was being serious, thats actually hard Apr 23 03:31:52 I know. that's why I've shifted gears to another app. Apr 23 03:32:01 just make it look stock … sameold ...etc Apr 23 03:32:11 figured I'd put some ads in it just to learn. Apr 23 03:32:29 * StingRay_ rejoyces, his 15TB has copied :) Apr 23 03:32:42 well, I do want the interface to be 'fun'. especailly if the user isn't really going to have too much other fun interaction with it Apr 23 03:32:43 rejoices * Apr 23 03:34:58 dam now the waiting game for my new NAS Apr 23 03:35:34 2-3 days…dammit Apr 23 03:42:46 hah... been waiting almost 2 months for one of my items to ship. (non-computer related.... NOT PORN EITHER!) Apr 23 03:43:10 back to ads.... if I add adRequest.addTestDevice to my code, then I don't have to worry about removing it prior to publishing.... Apr 23 03:43:27 but I also don't have to worry about violating TOS on the device I'm testing on. Correct? Apr 23 03:43:32 dunno, never played with ads ? Apr 23 03:43:44 they are the spawn of the devil and the most annoying thing eva Apr 23 03:43:47 eva eva Apr 23 03:43:49 :) Apr 23 03:44:26 You design the UI for my app and I'll put an advertisement for you inside. :-D Apr 23 03:44:29 Tempting yet? Apr 23 03:44:53 very, if it wasnt unseless, pointless and timewasting ;) Apr 23 03:45:12 but your feature/function list…. that just puts me off a bit Apr 23 03:45:13 :) Apr 23 03:46:05 elaborate Apr 23 03:46:08 anyone have a themed rom for the nexus 4 that isn't so dark? more of a light theme similar to MIUI? Apr 23 03:46:29 sualpine: #android-root or #xda-devs Apr 23 03:47:21 Rescue9: I mean I would be tempted if it were a proper app Apr 23 03:47:34 that I thought was gonna be good Apr 23 03:47:55 There's a difference between proper & good. Apr 23 03:48:05 It properly handles the function that it's tasked with Apr 23 03:48:10 Good is subjective. Apr 23 03:48:23 proper, suiting purpose and usefult to user Apr 23 03:48:36 good, implemented and executed in an above par way Apr 23 03:48:56 Good is not subjective to the user given the context of an app Apr 23 03:49:09 it's merly and average mean of opinions ;) Apr 23 03:50:13 if the context of the app is that it is time wasting & annoying, then it's good at it's job. Apr 23 03:53:41 sudo rm -Rf * Apr 23 03:57:57 what's the app? Apr 23 03:59:00 random alarm depending on minimum & maximum settings that launches notification telling user that the android hasn't been used in a while, it's getting lonely. Apr 23 04:00:06 i see Apr 23 04:00:32 gives me something interesting to do while I'm at work. Apr 23 04:01:57 Anybody know if there's an easier way to get a mixed source/assembly view of your kernel other than "objdump -drS vmlinux.o"? That file is huge :( Apr 23 04:02:15 I guess that may be a tad OT, hope ya don't mind :) Apr 23 04:06:56 dansan: well it;s not much to do with app development Apr 23 04:07:02 I think thats more the prob Apr 23 04:07:03 :) Apr 23 04:07:28 sorry :) Apr 23 04:07:42 #android-root maybe better Apr 23 04:07:51 At least I think I figured out what I did wrong (that's requiring me to debug it anyway) :) Apr 23 04:08:01 np, have fun :) Apr 23 04:21:09 ron_frown: you ever used iSCSI in osx ? Apr 23 04:21:21 actually anyone ever ? Apr 23 04:32:04 you're asking in the wrong channel Apr 23 05:09:23 g00sy Apr 23 05:10:32 hey ron_frown Apr 23 05:15:19 Hello Androiders. Apr 23 05:17:24 a cute design cheat-sheet http://petrnohejl.github.io/Android-Cheatsheet-For-Graphic-Designers/ Apr 23 05:18:26 you mean copy sheet Apr 23 05:18:47 is that not just a condensed version of design guide that people take as law ? Apr 23 05:18:49 :) Apr 23 05:20:29 StingRay_: its as irrefutable as f=m x a ! Apr 23 05:24:56 I refute that. Apr 23 05:32:15 can anyone shed some light on why a view in a listView item that is set to match_parent does not show, but if I set dimensions then it does ? Apr 23 05:32:18 is this common ? Apr 23 05:42:26 http://stackoverflow.com/questions/16079992/fragmenmanager-replace-makes-overlay Apr 23 05:42:33 any reason why the overlay would still persist here? Apr 23 06:06:08 you're creating fragments from XML Apr 23 06:06:46 you can't replace fragments created from XML Apr 23 06:07:40 JakeWharton: I'm now adding the fragment manually. Apr 23 06:07:49 and now when I attach to root, I'm getting illegalstateexceptions. Apr 23 06:08:25 without seeing code and stack trace I cannot help you Apr 23 06:09:44 alright, no longer attaching to root. Apr 23 06:09:48 seems to work. Apr 23 06:29:23 is there any reason why a fragment manager would care to use a R.layout instead of just the viewgroup id? Apr 23 06:29:42 using R.layout won't work Apr 23 06:30:04 seems to be the only solution that works. Apr 23 06:30:23 do a clean build, it won't Apr 23 06:40:41 why does the stock app drawer navigation suck so much Apr 23 06:41:59 You mean the SlidingDrawer? Apr 23 06:45:46 Amorgos: those kinds of questions are rhetorical. don't bother Apr 23 06:46:53 Yes. But if he's using SlidingDrawer class, he shouldn't be anyway. It's deprecated! Apr 23 07:00:30 ;-) Apr 23 07:04:27 at least most used apps should appear at the top of the drawer anyways :{ Apr 23 07:08:27 wtf is this http://www.basic4ppc.com/index.html Apr 23 07:28:01 is it possible to programatically call whichever method is called when a swipe is recognized on a viewpager? Apr 23 07:28:42 lite_, you mean to initiate page swipe programmatically? Apr 23 07:28:48 I have two ways of navigation between fragments - One is pressing a button on the bottom of the view and the other is simply swiping between them Apr 23 07:29:13 Hi all. I'm "fighting" a bit to understand how child fragments work (fragments within fragments). When the parent fragment is paused paused (due to navigating away from it for example) the child fragments are destroyed (really?!) and their state is lost. The child fragment managers also looses the child fragment (guh, they were destroyed). Apr 23 07:29:32 Is this how it shoudl world? Am I doing something very very weird? Apr 23 07:29:34 lite_, viewpagerindicator does this Apr 23 07:29:37 lite_, it's all in the docs Apr 23 07:29:37 https://developer.android.com/reference/android/support/v4/view/ViewPager.html#setCurrentItem(int, boolean) Apr 23 07:30:11 fuck Apr 23 07:30:13 awesome Apr 23 07:30:15 thanks Apr 23 08:07:24 I am trying to test a webView in my application and am having the following problem: Whenever the webView is supposed to load a large web page, onPageFinished is never called. If the web page is relatively small tho, it works just fine...what's the problem here? Apr 23 08:08:02 Could it be that the thread spawned by webView.loadUrl just dies or something? Apr 23 08:12:52 hi Apr 23 08:13:07 any droid 2 owners? Apr 23 08:16:27 anyone know the closest equivalent in android to ios uimenucontroller (for copy paste popup buttons)? Apr 23 09:03:47 hey all Apr 23 09:13:35 how woulc I go about converting a c style byte array to a java style byte array? Apr 23 09:13:53 would* Apr 23 09:14:00 Is there a comprehensive list of the hardware options that can be set in an AVD's config.ini file? Apr 23 09:14:26 I wish to disable GPS and location services from the emulator to test a device configuration without these things Apr 23 09:19:13 Charl1e: i think you can do that directly from the emulator's Settings app Apr 23 09:19:23 unless you want to automate it someway Apr 23 09:21:50 hmm, I think we want to test it as if the emulator doesn't have any location providers/adapters to make sure our logic is correct Apr 23 09:33:06 hi, I have a development issue. I have some code that allows the user to select an image from their gallery, astro file manager etc and crop it. when the image is selected from "gallery", the cropping action starts automatically after. When it is selected from the astro file manager, the cropping action does not start. On top of that, the bitmap image from the astro file manager is sideways. Can the auto crop action be made to work Apr 23 09:33:07 the file manager too ? How do I get the bitmap to be rotated properly ? (this doesn't happen when the user selects from gallery) Apr 23 09:37:02 what's the go-to server solution for Android games? Apr 23 09:37:25 (at least until Google releases its own) Apr 23 09:38:00 ok, I found the solution for rotating the bitmap. Now about that auto-crop….. Apr 23 09:38:20 I mean I guess I could make-do with a regular web server if my game is fixed in players and turn-based Apr 23 09:38:39 but that doesn't seem to scale well if I ever have need for a continuous server Apr 23 09:51:50 damn... how does one keep the state of the fragment when using navigation mode list? Apr 23 10:48:01 does anyone know where I can see an example of using list navigation with fragments where the fragments keep their state (somehow)? Apr 23 10:48:17 I can't believe that I can't find anything... I must be growing to old for this... Apr 23 10:52:53 list navigation ? Apr 23 10:53:03 what states ? Apr 23 10:53:18 * StingRay_ now thinks he's too old also Apr 23 10:55:49 StingRay_: sorry... I was googling and reading code... Apr 23 10:56:33 StingRay_: in eclise do a new android project with Navigation Type = Dropdown Apr 23 10:56:51 oh I never do that Apr 23 10:56:58 I like a clean canvas Apr 23 10:56:59 :) Apr 23 10:57:01 :) Apr 23 10:57:21 http://stackoverflow.com/questions/16167575/transitiondrawable-not-changing-the-color-as-expected Apr 23 10:57:21 well.. it was just to explain faster what's my issue with keeping fragments states. Apr 23 10:57:58 StingRay_: with this "not clean canvas" project you have a activity that uses a dropdown in the action bar to navigate between 3 fragments Apr 23 10:58:01 DeviantPeer: well either or does that not depend on what you do when you switch fragments, and how you deal with it in those fragments ? Apr 23 10:58:48 StingRay_: that's the issue. For "changing" between fragments I'm using fragment manager transaction replace Apr 23 10:59:03 and the previous "active" fragment gets destroyed. Apr 23 10:59:13 yes Apr 23 10:59:29 and I can't find any example with how I should actually use... Apr 23 10:59:54 I've got a gut feeling that it should be simple... Apr 23 10:59:57 but it isn't. Apr 23 11:00:12 well same as an activity Apr 23 11:00:26 onSaveInstance, onPause, onResume Apr 23 11:00:27 etc Apr 23 11:00:42 same as you would if the user navigates away from activity Apr 23 11:00:52 and android kills it in the bg Apr 23 11:01:55 StingRay_: but when the adapter is called for the fragment it will create a new one. I tried using the fragment manager to put the fragment and then get it back, but that doesn't work Apr 23 11:02:35 well if the frag/activity is destroyed for whatever reason, how would it still have an adapter ? Apr 23 11:03:08 no, the adapter that is used in the actionbar spinner to select between the active fragments. Apr 23 11:03:53 the adapter supplied to the action bar with actionBar.setListNavigationCallbacks Apr 23 11:05:27 sorry.. it's not the adapter, but the implementation of the ActionBar.OnNavigationListener that instanciated the fragments. Apr 23 11:14:34 http://pastebin.com/b0sJRWrf what is wrong with this method? I want to fade the next square in whenever the user presses the button shown in this picture: https://dl.dropboxusercontent.com/u/11917448/indicator.png . However all that happens is that the last square fades in every time the user presses the button. The remaining squares remain unchanged. Apr 23 12:04:10 i used to be a slave Apr 23 12:04:15 now im a bounty hunter Apr 23 12:04:26 After you took an arrow to the knee? Apr 23 12:05:02 How come there's a setBackgroundDrawable but no getBackgroundDrawable ? Apr 23 12:07:13 cause that would just be getBackground Apr 23 12:07:18 well Apr 23 12:07:48 setBackgroundDrawable is an api 16 thing no ? Apr 23 12:08:16 actually Apr 23 12:08:20 what's the easiest way to integrate ABS 4.3.0? Apr 23 12:08:25 setBackgroundDrawable was deprecated in api16 Apr 23 12:08:43 Maven seems to complain about missing something, and I can't find out what Apr 23 12:08:43 yeah thats what I mean Apr 23 12:08:52 been up since yesterday Apr 23 12:08:54 http://pastebin.com/b0sJRWrf what is wrong with this method? I want to fade the next square in whenever the user presses the button shown in this picture: https://dl.dropboxusercontent.com/u/11917448/indicator.png . However all that happens is that the last square fades in every time the user presses the button. The remaining squares remain unchanged Apr 23 12:09:04 StingRay_, ^-- this is my problem Apr 23 12:10:07 belgianguy, pastebin maven output? Apr 23 12:10:07 For some reason when I use TransitionDrawable transition = (TransitionDrawable)tempView.getBackground().startTransition(duration) instead of setBackgroundColor(white) something goes horribly wrong and the view that changes color is the last square instead of the first one. Apr 23 12:10:40 lite_: how are those views generated ? Apr 23 12:10:48 Zharf: it's huge, somewhere very deep it breaks (and I'm not at all used to Maven) Apr 23 12:11:17 StingRay_, likte this : http://pastebin.com/pk1C0BzK Apr 23 12:11:44 and they sit at the same level in the viewTree ? Apr 23 12:12:06 Zharf: but if it helps, I downloaded the zip, and opened its pom.xml file in IntelliJ through 'Open Project' Apr 23 12:12:07 hi guys, i got an application using fragments. I would like it to trigger some stuff when the appropriate fragment gets selected, seems like onStart() and onResume() triggers when the fragments is next the the one currently beeing viewd. How do i make it run code when visible? Apr 23 12:12:23 belgianguy, I don't know what zip, can you pastebin the pom.xml Apr 23 12:12:27 StingRay_, yup Apr 23 12:12:33 lite_: setId(someRandNumber) to test if it's a veiwTree hierachy prob Apr 23 12:13:14 belgianguy, oh that zip Apr 23 12:13:39 StingRay_, no change Apr 23 12:15:43 belgianguy, I would create a new project with the maven archetypes, http://stand.spree.de/wiki_details_maven_archetypes and then add abs as a dependency in pom.xml :) Apr 23 12:16:41 Zharf: I'll try that, thanks for that link :) Apr 23 12:17:32 lite_: no idea then pal, unless setting and keeping the same instance drawable that is shared for all views and transitioning that instance is cause the prob, but that would mean all squares change together Apr 23 12:18:07 9600mah battery Apr 23 12:18:13 i like big bateries and i can not lie Apr 23 12:18:46 please refuse to buy phones that don't let you replace batts Apr 23 12:18:47 Crap. Apr 23 12:18:55 StingRay_, this channel was my last hope :( Apr 23 12:19:29 good job there is not just me here then (an artist by profession) Apr 23 12:19:31 ;) Apr 23 12:20:03 when a phone slides in with an itty bitty screen and a charged thing in your face you get sprung Apr 23 12:25:43 my Note 2 is now thicker than my macbook pro Apr 23 12:26:09 dmikedg, Looks like you need the Note 3 when it comes out Apr 23 12:26:16 Zharf: I'm looking at the Maven Lifecycle atm, where on 'compile' I get the following error: Internal error in the plugin manager executing goal 'com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:generate-sources': Unable to find the mojo 'generate-sources' (or one of its required components) in the plugin 'com.jayway.maven.plugins.android.generation2:android-maven-plugin' Apr 23 12:26:17 Component descriptor cannot be found in the component repository: org.sonatype.aether.RepositorySystem. Apr 23 12:37:38 dmikedg: I was lucky enough to find a 2500mAh battery for my htc panache (mytouch 4g) same thickness as original , on ebay for $3.75 :) the default battery was 1400mAh Apr 23 12:38:09 sounds like you should have gotten a 5000mah instead :) Apr 23 12:38:11 go big or go home Apr 23 12:38:41 yeah well I could have got bigger but its extended double the thickness with a back cover Apr 23 12:38:48 hi guys Apr 23 12:39:00 is it just me or are the dev console "statistic" tabs all down? Apr 23 12:43:46 <[deXter]> shmooz, You do realise that a lot of those high capacity but same thickness batteries are fake, right? Especially on eBay? Apr 23 12:44:58 <[deXter]> There are only very few brands of after-market batteries are genuine.. such as Momax and Mugen, but even they don't make batteries that are 1000 mAH more than the original one Apr 23 12:46:12 I am happy with the performance of these cheap hong kong shipped batteries, geniune or not Apr 23 12:46:21 this thing is heavy Apr 23 12:46:24 its like holding an ipad Apr 23 12:46:43 too bad I only bought 2 of them, they sold out like hot cakes, now I can't find them anymore Apr 23 12:48:30 http://pastebin.com/b0sJRWrf what is wrong with this method? I want to fade the next square in whenever the user presses the button shown in this picture: https://dl.dropboxusercontent.com/u/11917448/indicator.png . However all that happens is that the last square fades in every time the user presses the button. The remaining squares remain unchanged Apr 23 12:51:36 How do you programatically close a context menu ? Apr 23 13:09:27 Hi, little stupid situalion. I'm working with fragments. In FragmentA there is a clickEvent on a listview. If i click. I add FragmentB to the framelayout. If I click on the screen, it reacts on the onItemClick from the listview from FragmentA. Someone who can help me? Apr 23 14:15:51 Hey there :-) Apr 23 14:16:05 I have a FragmentStatePagerAdapter added to a ViewPager Apr 23 14:16:30 i have overriden setPrimaryItem in the FragmentStatePagerAdapter and expected it to get called, e.g. when I switch between Fragments in my Viewpager Apr 23 14:16:34 but it does not get called at all Apr 23 14:16:58 is this expected behaviour, and if yes, what have I done wrong? Apr 23 14:36:38 mank319: what would you like to do exactly? Apr 23 14:37:15 well FrancescoV thanks for your answer, I just stumbled upon my solution :D Apr 23 14:37:34 I have overriden a depracted method with a View as first param instead of a ViewGroup Apr 23 14:37:41 and due to this it didnt get called Apr 23 14:39:59 why not using that viewgroup instead? a viewgroup extends of view, so isn't that possible to change it? Apr 23 14:40:13 *using that view instead of viewgroup Apr 23 14:45:56 mank319: understand what i would like to explain? Apr 23 14:47:14 yeah, its fine - as i explained Apr 23 14:47:23 the problem was, that i just implemented the wrong method Apr 23 14:47:37 i actually dont even need a View/ViewGroup reference at that point Apr 23 14:47:45 thank you ;-) Apr 23 14:58:41 have anyone tried to do animation on FragmentTransaction.replace() on v4 library? No Animation for me :( Apr 23 15:00:09 has anyone had any success building ActionBarSherlock using Gradle? Keep getting "[AndroidManifest.xml:1] Could not find element /manifest/application" and it returning with no message for a RuntimeException Apr 23 15:00:42 build.gradle: http://pastebin.com/raw.php?i=aV00mAp1 Apr 23 15:02:27 i've like to compile zergrush.c (https://github.com/revolutionary/zergRush/blob/master/zergRush.c); the AGCC doesn't seem to work with current NDK/SDK. Is there nay updated method? Apr 23 15:05:01 Can anyone explain when "notifyDataSetChanged" should be called for a StatePagerAdapter? There is no doc for this function :( Apr 23 15:05:29 mank319: whenever your data source has changed, call it and it will update the adapter Apr 23 15:05:36 eg. new items, etc Apr 23 15:06:38 ahhh great ok :D Apr 23 15:13:02 So I'm using SimonVT's MenuDrawer with a ListActivity, and I can't seem to figure out how to make it set the content view without it resetting to the default layout. Any ideas? Apr 23 15:13:29 I've been messing with the issue for the past hour or so and can't seem to get it Apr 23 15:13:34 use android.R.layout.list_activity ? Apr 23 15:14:00 There's even a sample using a ListActivity Apr 23 15:14:18 Well, I fill the listactivity with dynamic data Apr 23 15:14:32 so just R.layout.list_activity doesn't work Apr 23 15:14:54 Not sure what you mean. ListActivity attaches its own layout, you don't have to do that Apr 23 15:15:07 Set an adapter, and you got a list Apr 23 15:15:41 how do I modify the value of a theme's attribute at runtime? Apr 23 15:15:59 lhunath: you can't. Apr 23 15:17:22 Well, I'm a pretty rubbish Android developer so I Don't quite understand everything yet. Right now I'm creating a new listactivity class with an intent. THe list activity loads a list of files from a directory and puts it in to a new Arrayadapter. I can display that correctly, but when wanting to use the menudrawer I can't quite figure it out :/ Apr 23 15:18:20 Did you look at the sample? Apr 23 15:18:40 let me go back to what I need to do; I have a layout and somewhere in that layout I need to set a left margin to a value that changes at runtime. I was hoping I could just do ?sliderWidth and set that theme attribute whenever the sliderWidth changes. but I can't. Is there another way to specify a dynamic value in my layout XML? Apr 23 15:19:01 You can change the views layoutparams in code Apr 23 15:20:16 yes, but that would involve a lot of layout specific code wherever I need to use this value for something. it would just be way too messy and unmaintainable to set it from code. Apr 23 15:20:42 Well, that's how you do it Apr 23 15:21:04 Why is the margin variable? Apr 23 15:21:58 because it needs to make space for an overlapping view from another layout. Apr 23 15:22:11 but its parent doesn't. Apr 23 15:22:45 (so the parent is visible while the other layout slides in) Apr 23 15:23:13 200 views in a fragment, bad idea? Apr 23 15:23:15 Are you animating a view by changing the margin? Apr 23 15:23:27 a scrolling fragment Apr 23 15:24:10 why dont you push over the container? Apr 23 15:25:01 hello, Apr 23 15:25:40 Can anyone tell me how to create a private in house app market? Apr 23 15:25:48 no, view A is initially visible and covers the screen. inside view A is view A1. view B will be sliding in to obscure part of view A. After view B has slid in, view A1 should end up next to view B, not obscured by it. So view A1 has a left margin set to view B's width. Apr 23 15:25:55 Is there some resources available? Apr 23 15:26:00 What happens if you try to write into the audioTrack (using .write) before the hardware has consumed the buffer? Apr 23 15:26:12 i.e. overflowing the audio buffer? Apr 23 15:27:44 how can i "tell" my viewPager, that it shall "ask" the adapter for data to display? Apr 23 15:28:04 http://developer.android.com/reference/android/media/AudioTrack.html#write%28byte[],%20int,%20int%29 Apr 23 15:31:35 has anyone else had major difficulties importing android projects into eclipse? Apr 23 15:32:01 basically, everything in the project gets screwed up and the build path goes haywire... I don't know how else to do this Apr 23 15:34:14 Oh Apr 23 15:34:28 ...Attach, then fill list, then set menuview Apr 23 15:43:17 over 30 minutes of GPS, 2 hours of screen on and less than 18% battery gobbled up Apr 23 15:43:48 dmikedg: note? Apr 23 15:43:59 note2 with giant vattery Apr 23 15:44:23 ah yes, large tubs of electrons Apr 23 15:46:33 dmikedg, what kind of granularity you going with as far as gps goes? Apr 23 15:46:44 gps navigation or just location awareness Apr 23 15:48:48 whatever ingress does Apr 23 15:53:43 When inflating an XML layout you can cast it to the base layout of the XML file, correct? Apr 23 15:54:10 can someone explain to me how the mirror api works ? Apr 23 15:54:27 someone said its basically a web app, so the phone is the web server and the glasses become the browser? Apr 23 15:54:37 i don't understand Apr 23 15:55:29 jdawes: Depends how you inflate it Apr 23 15:55:45 I am using android emulator and whenever I unfocus then focus the emulator, the screen of the emulator is frozen, showing the graphics of last window which was at that location. I need to wait for couple of seconds in order to get the screen updated again. is it possible to accelerate this process? Apr 23 15:55:52 LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); Apr 23 15:55:52 LinearLayout congratsLayout = (LinearLayout) inflater.inflate(R.layout.congrats_layout, mainLayout, true); Apr 23 15:56:18 Shouldn't that be OK? Apr 23 15:56:59 is there any good tutorial on FragmentPagerAdapters and how to use them in combination with ViewPagers? I would like to deeply understand the concepts of the Classes mentioned above, but cannot find much Information except the docs, which does not tell me, which function is called by whom and when and such... Apr 23 15:57:03 No, that's going to return mainLayout Apr 23 15:57:23 So null in the place of mainLayout, and just mainLayout.addView(congratsLayout)? Apr 23 15:57:36 No, false instead of true Apr 23 15:57:40 Then mainLayout.addView Apr 23 15:57:53 Then https://developer.android.com/reference/android/view/LayoutInflater.html#inflate(int,%20android.view.ViewGroup,%20boolean) Apr 23 15:58:12 It needs mainLayout to inflate the right layoutparams Apr 23 15:58:50 Thanks, I just went to LayoutInflater docs to understand. Much appreciated. Apr 23 16:18:37 Hey guys Apr 23 16:19:07 Quick question: Why is using the YouTube GData API slower than using an HTTP Client to query gdata.youtube.com and parsing the JSON? Apr 23 16:29:55 is there a utility to convert the string "10dp" into a pixel value? Apr 23 16:40:09 lhunath, there's a TypedValue class that can help you convert Apr 23 16:43:10 dare I even ask why you have "10dp" as a string? Apr 23 16:44:22 JakeWharton, :) Apr 23 16:44:24 ah. Apr 23 16:44:29 just saw that he has a string Apr 23 16:44:31 O.o Apr 23 16:47:58 It's hardly that unreasonable Apr 23 16:49:33 JakeWharton: TheJakeWharton, lulz. Apr 23 16:50:17 JakeWharton: Btw, thanks for the work on ViewPagerIndicator and ActionBarSherlock, I'm using them both in my Android application and they are working out quite well (first time ever using either of them and I love it.) Apr 23 16:52:33 viiralvx: you sound like a groupie Apr 23 16:53:35 is there some reason why I cant use setVisibility(image.INVISIBLE); and setVisibility(image.VISIBLE) to hide and show an image repeatedly? Apr 23 16:53:44 dmikedg: Nah, I honestly just found out who he was like 3 weeks ago when I wanted to keep switch to a tabbed fragment layout for my Main Activity and back port my app to Gingerbread devices. Apr 23 16:53:46 it seems once I make it invisible I cant get it visible again.. Apr 23 16:53:53 guys do you know any quick and smart way to generate a few random but different colors? roundabout 20 Apr 23 16:54:07 ray122: put nice colors in an array Apr 23 16:54:18 generate a random number between 0 and length - 1 Apr 23 16:54:34 I did something like Color.rgb(i*255, i*255, i*255) (i being my loop variable) but that didnt work too well Apr 23 16:54:39 well throw it in an arraylist so you can remove picked ones easily Apr 23 16:54:43 yeah random is a problem as they shall be different, chances are that they aint Apr 23 16:55:04 i*255 if i is a loop index will mostly be the same colors Apr 23 16:55:07 going from black to white Apr 23 16:55:10 or too lil difference Apr 23 16:55:18 Math.rand()*255 you mean? Apr 23 16:55:22 yeah exactly :) hence i m asking Apr 23 16:55:30 ray122: that's why I would do the array thing Apr 23 16:55:37 it really depends in how random you want them Apr 23 16:55:59 just so the human eye can see the difference on 10x10 px screen Apr 23 16:56:01 personally I'd grab like 60 nice RGB values that are clearly differentiated from eachother Apr 23 16:56:17 yeah but that way I need to pick em manually Apr 23 16:56:19 so is there any way to simply show and hide an image? I can't seem to get it back after I set it to invisible in on create Apr 23 16:56:36 viiralvx: glad they were helpful to you Apr 23 16:56:41 pick them manually, nobody is going to enjoy looking at poop brown, and puke green Apr 23 16:56:45 or neon pink Apr 23 16:57:15 nah that would be just fine... I just cant come up of a proper calculation, thats why I m asking :) Apr 23 16:58:28 am I missing something? Apr 23 16:58:36 I also tried: i*(255/lstObjects.size()) (I loop through a list).. no proper result either Apr 23 16:58:47 ray122: because thats not random Apr 23 16:59:18 you need ot use a random number in your multiplication, that will give you an evenly distributed but very close set of colors Apr 23 16:59:22 or should at least Apr 23 16:59:53 yeah I expressed myself a bit wrong here... they dont need to be completely "random", just different, without me having to write them down manually :) Apr 23 17:00:18 i read somewhere that I need to post a delayed message to the handler before doing the image visible/invisible requet Apr 23 17:00:24 im not sure how to go about doing that Apr 23 17:01:09 Handler h = new Handler(); Apr 23 17:01:42 h.postDelayed(new Runnable() { run() { view.setVisibility(View.INVISIBLE); } }); Apr 23 17:03:54 what is the canonical nomenclature for organizing resource ids? Apr 23 17:07:11 hmmm still no luck Apr 23 17:07:11 anyone on naming resource ids? Apr 23 17:07:32 oh hmm Apr 23 17:07:36 http://stackoverflow.com/questions/7165582/are-there-conventions-on-how-to-name-resources Apr 23 17:09:28 when moving from fragment to fragment, is there a way to enforce that the keyboardview is dismissed? Apr 23 17:10:50 so heres the code Apr 23 17:10:51 http://ideone.com/8TM0RB Apr 23 17:11:23 I tried JosephPowa 's suggestion but its not doing anything, the image is initially invisible and when i press the button no image is displayed.. so im not sure Apr 23 17:11:50 You're blocking the ui thread Apr 23 17:11:59 And you're posting two messages to be executed at the same time Apr 23 17:12:30 or a better question, why does the fragment not provide an overload to take this into account? Apr 23 17:12:34 or rather fragmentmanager Apr 23 17:13:16 Set the view visible immediately, then post a message in 100ms that sets it invisible Apr 23 17:13:31 thanks SimonVT i got it working Apr 23 17:15:01 the d is silent! Apr 23 17:16:41 Does anybody know why my IntentService will not stop? Apr 23 17:17:07 I'm processing a lot of data from an API in an intent service and then building a playlist based off of that data... Apr 23 17:20:53 did you finish your actions Apr 23 17:20:59 aare you bound to it Apr 23 17:21:10 From an IntentService? Apr 23 17:21:19 It's not bound . . . but yeah, i finished my actions Apr 23 17:21:29 Then it sends off a broadcast finished Apr 23 17:21:35 But hold on, I think I may have just figured out how to solve my problem Apr 23 17:22:26 Well, never mind. Apr 23 17:23:16 But yeah, after the actions finished, I put the objects into a Serializable extra and send a broadcast to the activity that it's done and then I'm calling stopSelf() on the service. Apr 23 17:23:58 IntentService calls stopSelf for you Apr 23 17:24:05 Just return from onHandleIntent Apr 23 17:25:42 I'ma post a snippet Apr 23 17:26:46 http://pastebin.com/gjxxCk23 Apr 23 17:26:50 This is what my handleIntent looks like Apr 23 17:26:52 viiralvx: don't call stopSelf() on an IntentService Apr 23 17:27:09 All the major processing is done in processJSON functions Apr 23 17:27:48 viiralvx: you'll need to include the code that sends out the broadcast, too Apr 23 17:27:52 Okay. Apr 23 17:29:52 evanc: http://pastebin.com/7VvhMFFR Apr 23 17:30:14 Hello! Apr 23 17:30:31 lord4163: Sup Apr 23 17:30:51 Just a little quick question, does the android webview support websql? Apr 23 17:32:22 lord4163: My Google-Fu tells me yes. http://developer.android.com/reference/android/webkit/WebStorage.html Apr 23 17:33:44 Ah cool thank you :) Apr 23 17:38:46 I think I may have fixed it . . . Apr 23 17:39:36 I figured out why my iNtentService wasn'ts topping Apr 23 17:40:12 When the screen was turned off and onPause was called, it was unregistering the receiver and setting it to null . . . -___- Therefore the broadcast would never go through. Apr 23 17:41:54 has anyone here used GraphView? Apr 23 17:42:04 I'm having an eclipse problem with it Apr 23 17:50:48 figured it out. nvm Apr 23 17:58:03 hey folks Apr 23 17:58:10 wow. 440. that's a nice band. Apr 23 17:58:32 anyway, could someone give me a hand? Apr 23 17:58:58 I've got an old G1 that I want to use as a GPS Apr 23 18:15:23 oof, now considering subclassing fragment to dismiss input views Apr 23 18:15:42 something that's baked into iOS, not part of Android's navigation model :-P Apr 23 18:16:14 Probably another easily solved issue that I'm too dumb to see through. My listview that I'm populating, I want a couple buttons at the end of it the listview. I've read somewhere that I've got to have a separate "footer" layout file. I can't seem to get it to work though, I'm just getting runtime errors. Basically get the view by ID of the listview, then inflate the footer, then listview.addView(footer)? Runtime error here. Any Apr 23 18:18:37 http://imgur.com/jacoj Apr 23 18:21:10 Sadly eclipse on Linux doesn't give much information past runtime error :/ Apr 23 18:21:23 Or at least my setup may be wrong Apr 23 18:22:10 If you cant view logcat, you should stop all development until you fix that Apr 23 18:23:07 Sounds painful Apr 23 18:23:24 If ADT doesn't have it setup right away, bleh Apr 23 18:23:58 just run "adb logcat" from a console Apr 23 18:26:51 So.. I have a listview with rows with custom views. The custom views have a checkbox. I can check multiple checkboxes and keep track of the ones checked, but if I click outside the checkbox in one row, all the checkboxes are unchecked. Any ideas? Apr 23 18:29:14 This is in a master-detail view Apr 23 18:30:02 and I need to keep the checked boxes if I select some row Apr 23 18:32:34 With the power of not caring. A button on every row of the listview Apr 23 18:33:44 hey guys, now Ive been using a GridLayout instead of a tablelayout... and I am stuck at getting certain cells to a fix width size Apr 23 18:33:52 I thought I could just add android:width="15dp" for instance and all following columns would just move but unfortunately they overlap Apr 23 18:35:38 dont mind me... I didnt think of it in the first place Apr 23 18:38:14 When I set the "topMargin" of an element in a RelativeLayout, will it's getY() return the same value? Apr 23 18:38:48 it shouldn't, no Apr 23 18:39:23 "dp" isn't the same as pixel - the getY() is the pixel value (as far ias i know) Apr 23 18:39:25 Ok, so if I change both of them, however, I should still SEE the image in the same spot? Apr 23 18:41:10 monsti: What if I used px as the value in topMargin. I'm not saying I ever would but wouldn't that make it a pixel value as well? Apr 23 18:41:13 can anyone tell me the holy way to a very simple form-data using google http client? Just for submitting name/value pairs, not even files Apr 23 18:42:44 jdawes: well in that case there are better alternatives for doing what you want to do Apr 23 18:42:46 Unless it's positioned relative to other views, it'll return the pixel value of whatever you set topMargin to Apr 23 18:43:03 I see UrlEncodedContent but MultipartContent doesn't seem to be the same as what I want Apr 23 18:43:46 Does anyone know how to make the map always center on current location? Apr 23 18:44:13 Afzal: i recomend using a POST instead of a GET verwon Apr 23 18:46:11 @monsti yeah, I have to use post but I need to use form-data instead of form-urlencoded and I can't get that to work with Google http client Apr 23 18:46:53 For form-urlencoded, you just form HttpContent using UrlEncodedContent class, but I don't know what to use for form-data Apr 23 18:48:13 afaik this is a simpley key/value to a form Apr 23 18:48:16 simply Apr 23 18:52:55 is there a nicer API for the Calendar APIs? Apr 23 18:54:40 https://developer.android.com/guide/topics/providers/calendar-provider.html Apr 23 19:04:34 @monsti, unfortunately it doesn't seem that simple with google http client >_< (I know it was much simpler with Apache's but it had its own pitfalls) Apr 23 19:13:35 I've got my activity's theme set to "@android:style/Theme.DeviceDefault.Dialog.MinWidth", now I'm trying to move this into my Activity class so I don't need to define the theme in the application's AndroidManifest.xml. When I do setTheme( android.R.style.Theme_DeviceDefault_Dialog_MinWidth ) in onCreate, the theme is mostly applied, but the window is background is no longer translucent black, just fully Apr 23 19:13:37 opaque. how do I fix that / why is that? Apr 23 19:23:48 Hello all Apr 23 19:28:35 how can I make surface of defined aspect ratio, to contain camera preview? Apr 23 19:29:33 I'm having problems trying to apply a style to a button on a specific android version. In my values/style.xml file I have a style for button with some properties. Then I have a values-v16/style.xml with the same style of the same button. How can I inherit all style properties from values/style.xml in values-v16/style.xml for my button? What I should type on the parent property of the button style on values-v16/style.xml? Apr 23 19:30:57 You have to define a base button theme that the theme in values/ and values-v16/ inherits from Apr 23 19:31:06 s/theme/style/ Apr 23 19:32:07 so, I can't inherit from a single style? Apr 23 19:32:43 No Apr 23 19:32:50 ok Apr 23 19:38:43 SimonVT, have you used google http client? Apr 23 19:44:06 16 emails from microsoft telling me that they are working on fixing a bug so i can have the letters s-h-i-t next to eachother in my url Apr 23 19:46:37 is there a site that is listing android opensource projects? Apr 23 19:58:19 dmikedg, lol Apr 23 19:58:24 what's the name again? Apr 23 19:58:27 and why are you dmikedg Apr 23 19:58:37 the d is silent, stop typing it Apr 23 20:01:21 howdy... got an issue with onConfigurationChanged in an Activity in my app Apr 23 20:01:28 I can't get it to fire any more... not sure what changed to break it Apr 23 20:01:45 and I do have android:configChanges="orientation|keyboardHidden" in the android manifest xml Apr 23 20:04:03 anyone know how to form the HttpContent to submit a form-data form using google http client? Apr 23 20:04:20 It seems like I've tried everything except the correct solution Apr 23 20:07:16 the AnimationListener's onAnimationEnd gets called well before the animation ends. Is this a known bug? Apr 23 20:08:27 LuxuryMode: can you prove that it is actually called well before animation ends? Apr 23 20:10:57 joar, looking into it a little closer Apr 23 20:11:12 looks like it gets called as soon as the start offset passes Apr 23 20:11:16 trying to prove that though Apr 23 20:13:28 hard to really prove Apr 23 20:13:34 i see visually that its the case Apr 23 20:13:44 but measuring with system.currentTimeMillis is not super reliable Apr 23 20:14:24 make a 10 sec animation or something Apr 23 20:14:33 yea Apr 23 20:14:39 i think i know what it might be Apr 23 20:14:47 mistakenly set the duration on the animations added to the set Apr 23 20:14:54 god...the design pattern for having to have threads that must run in order is ah bitch on android Apr 23 20:14:58 instead of doing animationSet.setDuration(duration) Apr 23 20:15:02 since you can't do thread.join Apr 23 20:15:06 makes my code messy as fuck Apr 23 20:15:20 dareign85, what makes code messy as fuck is threads Apr 23 20:15:23 ;) Apr 23 20:15:27 add a thread, add a bug Apr 23 20:15:34 thats not true Apr 23 20:15:42 at all Apr 23 20:15:47 with GUI applications especially Apr 23 20:15:58 i like my apps to not ever freeze Apr 23 20:16:38 dareign85, im not saying you dont need to offload work from the UI thread Apr 23 20:16:50 but you rarely should need to be dealing with joining threads and such Apr 23 20:16:56 theres no abstraction there Apr 23 20:17:01 dareign85: what are you trying to do? Apr 23 20:17:02 and you're never gonna get that stuff right Apr 23 20:17:11 havent met a single person who can do multithreaded code correctly Apr 23 20:17:46 LuxuryMode-stop hanging around idiots Apr 23 20:19:01 dareign85, im talking about pretty intelligent people. and the mature developer knows enough to realize not to try to avoid multithreading, especially when there's like zero abstraction Apr 23 20:19:11 in any event, as evanc asked: what are you trying to do Apr 23 20:21:00 just chain threads togetheer Apr 23 20:21:04 i have it done Apr 23 20:21:06 its just messy Apr 23 20:21:42 dareign85, i dont mind what code are you trying to write Apr 23 20:21:45 i mean whats your goal Apr 23 20:22:09 what are you trying to accomplish with this thread chaining? Apr 23 20:24:35 hello Apr 23 20:24:56 so, no ideas on why onConfigurationChange wouldn't call on an Activity that is set in the android manifest to handle the orientation change? Apr 23 20:25:32 if the device has a navbar you also need to handle screenSize changes Apr 23 20:27:07 a navbar? Apr 23 20:27:29 I'll try on another device Apr 23 20:27:34 back/home/recents software keys Apr 23 20:27:46 that's what I assumed Apr 23 20:27:55 but that would actually block the event from being even handled? Apr 23 20:28:36 it means that the configuration change is not just orientation but also screenSize (as the navbar doesn't count as usable space), so if your activity cannot handle screenSize changes it needs to be recreated completely Apr 23 20:29:38 i dont feel like explaining Apr 23 20:29:41 you guys freelance? Apr 23 20:29:50 elance is great for finding work :) Apr 23 20:32:50 guys I m having issues merging 2 android projects... Apr 23 20:33:41 I copy the xml files, then the java files... always ending up with the error: R cannot be resolved to a variable - and its none of those stackoverflow problems Apr 23 20:34:23 R is being underlined (not that stuff that comes after R. ...) and no cleaning up or such helps... no xml files damaged, no upper cases in res files Apr 23 20:34:49 If R isn't being generated, you have xml errors Apr 23 20:34:50 Fix those Apr 23 20:34:53 kevinb: my issue is that the onConfigurationChange event is not even being called on my nexus 4 Apr 23 20:35:03 does this mean that I have to add that screenSize event? Apr 23 20:35:19 @SimonVT: how would I find out? I just copied them over and they look exactly the same Apr 23 20:35:45 RagEr, if you're even looking at onConfigurationChange, you're probably doing something wrong Apr 23 20:35:53 while in the other project they work just fine Apr 23 20:36:12 canadiancow: I honestly don't want to rebuild this entire app to do things "right" Apr 23 20:36:15 Dunno how you find out in eclipse, but e.g. intellij or ant will tell you where the errors are when you build Apr 23 20:36:26 but would you please explain to me what I should be doing to make this stuff work rather than onConfigurationChange? Apr 23 20:36:33 well wht are you doing? Apr 23 20:36:37 playing a video Apr 23 20:36:52 and trying to make sure that when I rotate it, the video continues playing, just rotated to the proper orientation Apr 23 20:36:59 it used to work... then it stopped Apr 23 20:37:02 but sometimes intermittently works Apr 23 20:37:22 it's pretty variable... I've got an htc incredible on 2.3.4 that works fine with this Apr 23 20:37:58 SimonVT: yeah well so does eclipse, however it only comes up with errors in java files, no errors in xml files tho Apr 23 20:38:02 and the nexus s on 4.0.3 refuses to, as well as a nexus 4 on 4.2.2 Apr 23 20:38:24 so the soft buttons/navbar thing doesn't seem to hold since the nexus s has the buttons on the bottom like the htc incredible, but the nexus 4 does not Apr 23 20:38:41 How would you copy an activity over to another project? Apr 23 20:39:58 ray122: ctrl+c, ctrl+v Apr 23 20:41:13 evanc: which I did, first the xml files, then the java files... and now I m stuck with R not being resolved as a variable... and I dont see any problems in the xml files Apr 23 20:41:28 ray122: is it still importing the old R? Apr 23 20:41:29 did you change the import Apr 23 20:41:30 did you clean? Apr 23 20:41:31 ~_~ Apr 23 20:41:34 ray122: ctrl+shift+o Apr 23 20:41:49 suggests to import android.r Apr 23 20:41:59 yeah... cleaning: same result Apr 23 20:42:12 tried all solutions you find on the first couple of google results Apr 23 20:42:28 ray122: so it sounds like it's not able to generate your R. Look at your XML files again Apr 23 20:43:01 they are the same... really can't figure this one out... its copied and looking at it, its similar Apr 23 20:43:34 in a less concrete sense Apr 23 20:43:54 I'm taking an android app that someone else wrote and other people have since modified and trying to add new functionality without breaking old functionality Apr 23 20:44:07 and also without taking an entire week to refactor the thing to do it the "right" way Apr 23 20:44:52 sadly, something stopped working with the orientation stuff, and I'm not sure what it is Apr 23 20:48:00 What is the Facebook Home Application based off of like is there a default App Launcher you can see and edit? Apr 23 20:49:38 ok.. .got a bit further.. now its not "R" itself anymore, but the objects of R I call Apr 23 20:50:18 I seem to have fixed that by simply writing "R," in one of the class files and let intellisense get the suggestions Apr 23 20:52:03 schuranator: well, yes, but I doubt it's based off that Apr 23 20:52:16 schuranator: https://android.googlesource.com/platform/packages/apps/Launcher2/ Apr 23 20:52:36 evanc: I'm not looking to see how they did it but I wanted to read more about the Launcher2 Apr 23 20:52:38 is there any other file defining which activities there are? or anyhting like that so just copying over the xml's and .java's doesnt work? Apr 23 20:57:29 Or does anyone know where the "package path" for each java file gets defined (if anything like that exists)? Apr 23 20:57:53 I want to display my bitcoin address for donations in my app description, but cannot find anything on this in the terms, if it is allowed or not. Plus: i cannot find a support email address for this kind of question. Could someone give me a hint where I should look ? Apr 23 20:58:46 ray122: ... wat Apr 23 21:00:09 lol thats been the problem... I missed: import .R; evanc Apr 23 21:00:39 ray122: IF ONLY SOMEONE HAD TOLD YOU TO CHECK THAT LIKE FIFTEEN MINUTES AGO Apr 23 21:00:40 :P Apr 23 21:01:38 haha yeah... I misread a thread earlier in which one said, do not import that stuff that gets suggested... Apr 23 21:01:49 however... i should have just listened to you :P Apr 23 21:09:45 huh Apr 23 21:09:56 this uiautomator thing seems to suck Apr 23 21:24:48 hey folks - is there a possibility to place a lock screen widget? Apr 23 21:26:42 ? Apr 23 21:27:53 hirsty: automatically? no Apr 23 21:34:16 what would be the best option to restore the activity state (field values, disabled/enabled elements) on service rebind? To save the state in the service instance? Apr 23 21:45:41 simply Apr 23 21:45:47 sry Apr 23 21:50:01 Anyone here going to Droidcon 2013 in London this year? Apr 23 21:54:32 Jojomofoman: no Apr 23 21:54:53 is there any reason why a listview that is scrolling would prevent the back button from doing something? Apr 23 21:59:41 the fact that it's in the middle of scrolling Apr 23 21:59:48 means that other events can't be processed Apr 23 22:03:38 pfn: so why is the twitter app not affected? Apr 23 22:03:53 because it splits up its scrolling Apr 23 22:04:04 pfn: what does that mean? Apr 23 22:04:28 damned if I know Apr 23 22:04:48 how do you know it "splits up" scrolling? Apr 23 22:04:51 what does that even mean? Apr 23 22:07:24 evanc: idea was to make an In Case of emergency app so that first responders could open it up, tag the qr code and grab medical data Apr 23 22:07:48 hirsty: what's stopping you? Apr 23 22:08:06 (aside from the fact that no first responder is going to check for that) Apr 23 22:08:07 listview flinging does not prevent the back button from working Apr 23 22:08:13 wanting them to be able to open it up on the lock screen Apr 23 22:08:21 much like emergency contacts Apr 23 22:08:23 hirsty: that's possible Apr 23 22:08:30 make a lockscreen widget Apr 23 22:08:42 unless you override onBackPressed in your activity and check listView.isFlingerized() and return false Apr 23 22:08:47 which you aren't doing Apr 23 22:08:49 any good howtos? :P Apr 23 22:09:14 hirsty: d.android.com -> search for "lockscreen widget" Apr 23 22:11:36 I'm trying to listen to onConfigurationChanged on an Activity Apr 23 22:11:39 works fine in 2.3.4 Apr 23 22:11:43 does not work in 4.0.3 and 4.2.2 Apr 23 22:12:17 the 2.3.4 is a verizon droid incredible, the 4.0.3 is a nexus s, the 4.2.2 is a nexus 4 :\ Apr 23 22:12:20 are you declaring that you handle orientation changes in your manifest? Apr 23 22:12:27 because if so then you need to add screenSize for ICS+ Apr 23 22:12:30 the method doesn't even get called on the devices it doesn't work for Apr 23 22:12:36 ahhhhh Apr 23 22:12:38 screenSize Apr 23 22:13:04 quickly before you leave I need to judge you... Apr 23 22:13:13 you should be handling orientation changes yourself unless you REALLY need to Apr 23 22:13:17 er Apr 23 22:13:18 shouldn't Apr 23 22:13:23 so I'd need something liek.... android:configChanges="keyboardHidden|orientation|screenSize" Apr 23 22:13:37 yes Apr 23 22:13:39 so like... I'm trying to get smooth re-orientation for video playback Apr 23 22:13:49 and I'm working on an app someone else wrote pretty poorly Apr 23 22:13:51 that is a valid usecase! Apr 23 22:13:56 and someone else updated, also pretty poorly Apr 23 22:14:09 congrats on being quite literally the only person in the last year that has used that configuration option correctly! Apr 23 22:14:13 heh Apr 23 22:14:29 lol Apr 23 22:14:41 usually it's "my static field gets set to null when I rotate. I know, I'll handle orientation changes!" Apr 23 22:14:43 I'm guessing most people use it to get around the fact that their views are also models and controllers, all in one? Apr 23 22:14:57 also that they're using global state out the rear end? Apr 23 22:15:20 JakeWharton: statics don't, brah (which, I guess, makes it an even more fitting #android-dev question) Apr 23 22:15:27 heh Apr 23 22:15:38 I'd be interesting in properly handling orientation change. Apr 23 22:15:46 the keyword "static" usually means "I don't know how to do things without global state" Apr 23 22:16:06 What I've seen usually is people having their myConnection as a member and complaining. Apr 23 22:16:06 RagEr: it's usually like "my AsyncTask crashes after rotation. I'll just (disable rotation|catch rotation|make everything static)!" Apr 23 22:16:18 kakazza: also common Apr 23 22:16:36 kakazza: though that's usually people asking how to pass their open socket to another activity Apr 23 22:16:42 heh Apr 23 22:16:49 (and deciding to make it static ಠ_ಠ) Apr 23 22:17:13 hooray? Apr 23 22:17:26 who ever heard of worker threads for handling classes of async tasks? Apr 23 22:17:36 I vaguely remember a talk by someone from Square talking about how static members in Android can be a subtle bug in the lifecycle. But I forgot what I was supposed to remember about them >_> Apr 23 22:18:04 I've found very few legitimate use cases for static state Apr 23 22:20:08 but really Apr 23 22:20:12 thanks so much for helping me out of this bind... Apr 23 22:20:15 was kinda driving me crazy Apr 23 22:22:33 I never had any problems so far with orientation change, but just out of curiousity, what is usually at fault when people complain about fields being null on orientation change? Apr 23 22:22:51 What I usually see on SO is the configChanges="orientation" thing. Apr 23 22:23:50 (what Jake was just complaining about, because it's usually not a legitimate usecase) Apr 23 22:23:58 the activity is destroyed and recreated. its a completely new instance of the activity. no fields will be there. you have to save any state to a bundle. Apr 23 22:25:24 right... what was *really* driving me crazy Apr 23 22:25:33 was that I couldn't even get the config change listener method to call off Apr 23 22:25:42 but I also couldn't save stuff to a bundle to pass to the new activity Apr 23 22:26:00 those methods also weren't active Apr 23 22:27:30 heh Apr 23 22:59:13 someone has used colors like "#3fff" across the xml. it works there, but not, for example if I tried to do a Color.parse("#3fff"); How do I understand what this is doing in every case, and expand it to a color I recognize? Apr 23 23:03:12 0x003FFF Apr 23 23:03:38 although you should define colors in your colors.xml Apr 23 23:04:01 how do I detect the touch that "disables" setSystemUiVisibility(false) ? Apr 23 23:04:08 s/false/HIDE_NAVIGATION/ Apr 23 23:05:03 oh, there's an OnSystemUiVisiblityChange listener Apr 23 23:12:44 evanc, are you sure that isn't 0x33ffffff ? Apr 23 23:13:36 maybe someone has an idea what is causing my problem Apr 23 23:13:42 i'm doing studies Apr 23 23:14:46 i have simple app which has textview, edittext and go button on the top, then webview and back, clear history and next buttons on the bottom Apr 23 23:15:04 simple browser app on the other words Apr 23 23:15:23 works well if i browse, click links and so on, also back and next buttons work Apr 23 23:15:30 canadiancow: good point, I don't know if 4 is treated as ARGB or AARRGGBB Apr 23 23:15:37 clear history not done yet Apr 23 23:16:11 but if i try to type url in the edittext the buttons on the bottom disappear Apr 23 23:16:17 why? Apr 23 23:16:28 can'tget them back Apr 23 23:17:01 if i type url in the edittext and click go button it works. the website loads in the webview Apr 23 23:17:10 just those buttons disappear Apr 23 23:18:26 still newbie with android developing i know Apr 23 23:19:28 i'm using emulator, forgot to mention Apr 23 23:20:32 they won't disappear when i click edittext but when i type first letter Apr 23 23:22:10 wat, expandablelistview positions are not zero based? Apr 23 23:22:12 w-t-f Apr 23 23:22:44 hmm. Apr 23 23:23:20 sure it is Apr 23 23:25:54 that freaked me out for a second. Apr 23 23:32:12 hmmm what?: I can show a Toast from handleMessage, but can't textView.setText Apr 23 23:57:20 is there anyway to find out if in ActionBar if Home up is enabled? Apr 24 00:00:06 is it okay to change a static variable in an activity from a service? Apr 24 00:00:27 and make a thread in the activity which checks the value of this variable Apr 24 00:00:59 wow, so it seems actionbar and your fragments are totally disconnected. Apr 24 00:01:05 doctorkira, as long as you don't intend to let that service be started from outside your app yes Apr 24 00:01:12 unlike uinav it has no notion of what is first, who pops and pushes from the stack. Apr 24 00:01:16 doctorkira, just make sure the accesses are thread safe :) Apr 24 00:01:17 you're required to manage state. Apr 24 00:01:49 Mavrik: okay.. because i found the binding stuff hard to understand ;) Apr 24 00:01:59 yeah Apr 24 00:02:11 basically services and activities run on same (UI) thread in same process Apr 24 00:02:29 so you can access variables across them (thread safety rules apply if you use multiple threads) Apr 24 00:02:40 doctorkira: it's not a good idea. what happens if your activity is restarted? Apr 24 00:02:44 it gets complicated when you want to access a service in another app (i.e. process) Apr 24 00:03:22 yeah, codebutler makes a good point Apr 24 00:03:31 usually changing state in the service is a wiser idea :) Apr 24 00:03:52 codebutler won't the static variable inside the class still be accessible even if the Activity no longer is there? Apr 24 00:04:43 you should consider using something like otto Apr 24 00:04:56 will restarting the Activity restart the service as well? Apr 24 00:05:04 I think the service will keep running Apr 24 00:05:16 even if after the activity gets stopped Apr 24 00:05:22 doctorkira, no, it won't. But your process can get killed alltogether., Apr 24 00:06:31 Mavrik because my activity got closed sometimes, I had to write the service, which would check if the activity is running, and if it is not, it would start one instance of it Apr 24 00:06:47 uuuh Apr 24 00:06:55 that looks like a wrong way to do something Apr 24 00:07:00 why did your activity get closed_ Apr 24 00:07:01 ? Apr 24 00:07:08 why don't you back up and explain what you're making Apr 24 00:07:11 if the phone was kept idle for hours Apr 24 00:07:38 idle for hours, the activity got closed and the ServerSocket stopped accepting connections Apr 24 00:07:54 so I had to put the ServerSocket in a Service instead of the Activity Apr 24 00:08:09 hoping that a Service would stay active longer Apr 24 00:08:24 um yeah, first thing Apr 24 00:08:33 Activities are really just meant for a single user-facing screen Apr 24 00:08:46 and you should not run them in background - Services are correct for that :) Apr 24 00:08:58 second of all… watch out for CPU shutdowns :) Apr 24 00:09:01 and android seems to close those activities if kept idle for like 4 hours Apr 24 00:09:25 Android stops the activity as soon as it gets covered Apr 24 00:09:33 and you should not run any code in activity beyond that moment Apr 24 00:10:09 why would you want your activity to always be running, the android lifecycle is specifically such that it should only run as long as it hasn't been Paused Apr 24 00:10:38 hopefully it will not kill my service Apr 24 00:11:17 it will if it runs out of resources Apr 24 00:11:24 :( Apr 24 00:11:47 doctorkira, please go read the documentation on activities vs. services Apr 24 00:11:57 so you'll implement that properly :) Apr 24 00:12:05 also look at "setForeground" and ongoing notifications Apr 24 00:13:24 ty brb Apr 24 00:13:29 let me test for a while Apr 24 00:15:43 anything can be killed if resources are low enough Apr 24 00:15:53 priority will be given to foreground activities and services Apr 24 00:18:58 canadiancow, ty. evanc: good guess. :p Apr 24 00:23:56 I'm trying to understand why the textView in the activity's handler is the textview instance of the previously destroyed activity Apr 24 00:30:50 some people... Apr 24 00:31:20 any one have any recommendations for good libs for combating diff capability's /resolutions Apr 24 00:31:34 combating what? Apr 24 00:33:03 different dpi, api level's , resolution etc etc Apr 24 00:33:28 what do you need to do besides what's built in to the framework? Apr 24 00:33:48 just wondering if there was anything to avoid writing the same boilerplate code each app Apr 24 00:34:27 write your own library to handle it Apr 24 00:34:32 I should *really* refactor my exis....... Apr 24 00:34:38 just about to say that!! Apr 24 00:34:40 :) Apr 24 00:34:43 j #android Apr 24 00:34:43 what boilerplate are you writing? Apr 24 00:34:53 I was just wondering if it already has been done Apr 24 00:35:05 Has anyone run logcat on the Fox News app Apr 24 00:35:17 it fucking prints everything to the console :P Apr 24 00:35:33 IIRC the google io app had a utillity.java that did similar stuf to what i was asking Apr 24 00:35:45 kaendfinger, as in articles? Apr 24 00:35:50 I think Apr 24 00:35:54 It has a ton of stuff Apr 24 00:36:01 like it prints the request urls and all Apr 24 00:36:10 :D Apr 24 00:36:27 For instance Apr 24 00:36:28 http://mercuryapps.foxnews.com/foxnews/tallent.mflow.ws/rest/item.aspx?function=getpublishingcontainersitems&containeridlist=11818261&containerversion=547&userid=0&CompressionMode=gzip Apr 24 00:36:29 That Apr 24 00:36:30 :P Apr 24 00:36:49 (And it's content too) Apr 24 00:36:54 TinkerTailorHC, ActionbarSherlock, support library, NineOldAndroids are the main ones Apr 24 00:37:03 TinkerTailorHC, but none of those will help you with screen sizes… Apr 24 00:37:20 which really shouldnt be an issue if your designs are ok Apr 24 00:38:20 Wow only 1366763886 seconds since the peoch Apr 24 00:38:24 epoch Apr 24 00:38:26 well shit Apr 24 00:38:27 xD Apr 24 00:39:45 kaendfinger, do we care? Apr 24 00:39:51 what does it matter what it logcats Apr 24 00:39:59 oh nothing Apr 24 00:40:03 just a bit odd to do Apr 24 00:40:04 lol Apr 24 00:40:10 app authors are terrible Apr 24 00:40:14 happens all the time Apr 24 00:40:17 xD Agreed Apr 24 00:44:03 um, now a hard question for everyone Apr 24 00:44:06 The google io apps have a certain beaty to them Apr 24 00:44:19 anyone managed to reliably put a GLSurfaceView over a SurfaceView? :) Apr 24 00:44:27 s/beaty/beauty/ Apr 24 00:54:26 apparently my algo that takes a few random words from wikipedia is 'bigoted' :( Apr 24 01:03:11 goodnight Apr 24 01:15:02 what format is this color in: -3312410 Apr 24 01:15:35 O.o Apr 24 01:15:37 :) Apr 24 01:15:42 Getting it from the Calendar provider. Apr 24 01:15:42 integer? Apr 24 01:15:56 according to math it == FFCD74E6 Apr 24 01:16:09 JakeWharton: to math? Apr 24 01:16:15 Is there a way to convert that to a hex color? Apr 24 01:16:26 http://www.binaryhexconverter.com/decimal-to-hex-converter Apr 24 01:17:01 colors can exist as decimal values? Apr 24 01:17:15 of course Apr 24 01:17:27 hexadecimal is just a different number base Apr 24 01:17:28 numbers are numbers regardless of being hex or decimal or binary Apr 24 02:06:04 how many folks just programatically wire up their own drawables instead of letting the os resources do it for them? Apr 24 02:06:42 the os does that for me ? Apr 24 02:07:04 StingRay_: or rather using the conventions defined by the platform. Apr 24 02:07:23 http://kofegeek.files.wordpress.com/2012/01/403319_142372949212972_100003208032044_175841_151378192_n.jpg Apr 24 02:08:40 heh, cute StingRay_ Apr 24 02:09:26 http://crazyhyena.com/imagebank/g/funny-bear-grylls-in-australia-koala-tree-photo.jpg Apr 24 02:10:14 I guess what I'm trying to ask it, what's the virtue of using Android Drawables vs just initializing your own bitmapdrawables? Apr 24 02:10:52 it would be kinda cool if 'android create project' generated the xmls in accordance to the ADTs styles Apr 24 02:11:19 i think i found. but can't understand yet Apr 24 02:11:47 etcetera: still unclear on your question Apr 24 02:12:01 bitmapDrawable Vs drawables ? Apr 24 02:12:17 drawabes = bitmaps, shapes, layers, etc Apr 24 02:13:03 I'm passing a messenger to a service, and eventually, i exit the activity and when starting it again I rebind to the service and try to set the activity state according to the service state Apr 24 02:13:54 but setText in the rebound activity doesn't work Apr 24 02:14:17 StingRay_: Imagine I wanted to define background bitmaps for arbitrary views. Apr 24 02:14:42 Is there any reason I would place these bitmaps in the drawables directory vs just grabbing them from the filesystem and creating a bitmap drawable?> Apr 24 02:14:43 ok Apr 24 02:14:59 etcetera: resource filtering and laziness Apr 24 02:15:14 JakeWharton: resource filtering Apr 24 02:15:28 was that a question? Apr 24 02:15:31 name qualifiers Apr 24 02:15:45 -mdpi etc Apr 24 02:16:20 but the reasons got me on "lazyness" Apr 24 02:16:25 thats me right there Apr 24 02:17:01 putting @drawable/foo_bar in an XML is much easier than writing 20-50 lines of correct bitmap loading code Apr 24 02:17:02 so you're saying that I can use the platform conventions to provide dpi specific bitmap images in specific folders. Apr 24 02:17:13 yes Apr 24 02:17:21 dpi, language, orientation, etc. Apr 24 02:17:31 and because I'll get a standard R.darwable.myImage for all respective dpis it's easier? Apr 24 02:17:54 how many folks use dpi specific images for the range of DPIs.... Apr 24 02:18:01 100% of the smart ones do Apr 24 02:18:02 in lieu of just providing a single high dpi image? Apr 24 02:18:53 the Nexus 10 is 20ridiculousnumber by 10ridiculousnumber in pixels. If I want a full-screen asset for something I'm surely not going to put one large image that size and then try to decode it to 480x320 on a shitty Android 2.1 MDPI phone Apr 24 02:19:34 Google's recent apps have used only xhdpi and hdpi assets Apr 24 02:19:43 I'm speaking in the context of a background image for lets say actionbar Apr 24 02:19:53 depends on the image Apr 24 02:19:54 or background drawables for buttons. Apr 24 02:19:58 depends on the image Apr 24 02:20:11 how about a few cases where it depends on the image? Apr 24 02:20:20 a button with a 1px border Apr 24 02:20:34 I can't provide capped images like I can in iOS? Apr 24 02:20:57 i don't know what 'capped' is Apr 24 02:21:03 but iOS has two densities Apr 24 02:21:30 if you scale an image with a 1px border down to 50% of its native DPI you get a 0.5px border Apr 24 02:21:59 a button in ios for instance, has a left/right cap image, and a center image that's definable. Apr 24 02:22:16 the os for the respective density will stretch the respective image. Apr 24 02:22:22 we have 9-patches which do stretching Apr 24 02:22:28 but stretching is orthogonal to scaling Apr 24 02:22:28 but in reality, providing a high dpi image at the lower res, will work fine. Apr 24 02:22:53 hmm, 9 patch. Apr 24 02:28:31 I have a drawables question, if I created a complex shape/layer/list drawable, thats more expensive to load that a direct bitmap, but are there any tests/figures that show just how much ? Apr 24 02:29:45 hmm, it seems iOS has a library to utilize 9patchd images. Apr 24 02:33:47 hmm, not super keen on using it though Apr 24 02:47:32 has anyone here used GraphView? Apr 24 02:56:34 Hi, anyone know how to get the value in android:value from in ant build script? Apr 24 02:58:38 anyone here? **** ENDING LOGGING AT Wed Apr 24 02:59:58 2013