**** BEGIN LOGGING AT Wed Mar 27 02:59:58 2013 Mar 27 03:00:22 agy2154: I asked the same and got the answer yes Mar 27 03:00:26 a bit back Mar 27 03:00:36 but I have another addition to that Mar 27 03:00:38 this is a little off-topic, but... is anyone else unable to reply to reviews still? Mar 27 03:00:47 what if you have to fix a bug with the old version Mar 27 03:00:49 :) Mar 27 03:01:13 StingRay_: I think you can have different versions of your app for different API levels Mar 27 03:01:27 oh really ? Mar 27 03:01:55 so I can have v.0.2 a few times for diff targets ? Mar 27 03:02:02 thats interesting Mar 27 03:02:16 well I don't think the actual version number integer can be the same Mar 27 03:02:34 but you can have multiple versions for different API levels in the same app (package name) Mar 27 03:02:56 CURRENT VERSION: Varies with device Mar 27 03:03:01 a lot of Google apps say that Mar 27 03:03:01 ok that makes sense Mar 27 03:03:27 StingRay_: are you able to reply to reviews? Mar 27 03:03:52 i don't have any published apps, so….. that would be a definite no atm :) Mar 27 03:03:55 haha Mar 27 03:03:59 the multi - apk docs seem to discourage using it for that; but i still think it might be easier than trying to do all versions of android with one apk in some cases. when android 5 comes out i'll revisit this Mar 27 03:04:34 g00s: were you not wanting to reply to reviews ? Mar 27 03:06:02 no, i meant multi-apk support Mar 27 03:06:11 yeah, i still can't respond to reviews Mar 27 03:06:31 g00s: that's odd. it was supposed to go to everyone Mar 27 03:06:37 but it's the same for me too Mar 27 03:06:54 there any publishing requirements for that ? Mar 27 03:07:00 like x number downloads Mar 27 03:07:00 andkore: well, the news said so like a week ago … but a few people on various forums said it was not correct Mar 27 03:07:16 i just got the ability to response in the past few days (just saw it today, but not sure the last time i was at the dev console was) Mar 27 03:07:25 the premium publishers had it enabled a long time ago Mar 27 03:07:28 i think it's just rolling out slowly Mar 27 03:08:55 kevinb: they'll probably roll it out before the next i/o so they dont have to answer the question "why u no ..." Mar 27 03:09:20 i think it was a heavily requested feature ;) Mar 27 03:10:03 yeah. i kind of have mixed feelings about it (i haven't used it yet). reviews are not a good medium for support. emails from phones can be hard enough to read Mar 27 03:10:33 i dont want users to expect responses to reviews, or feel that posting reviews about questions is the best way to communicate with me Mar 27 03:11:18 oh god, I just want to be able to respond to this idiot who left me a one star review because he's apparently illiterate Mar 27 03:11:29 "this app does nothing" Mar 27 03:11:51 playstore link ? Mar 27 03:12:03 https://play.google.com/store/apps/details?id=com.andarite.usbtetherpopupfree Mar 27 03:12:03 i think a while ago reto had guidelines for using it; to boil it down i think: step back and decide whether its even worth it, and if so, be professional Mar 27 03:12:17 oh yeah, I'll be professional Mar 27 03:12:35 StingRay_: really really simple app. I'm working on some more interesting stuff now Mar 27 03:13:27 andkore: try it on an S3? maybe it didn't pop up Mar 27 03:13:39 g00s: This will only work on devices that support UMS (USB Mass Storage). If your devices does not support UMS (for instance, if it uses MTP instead), use the Non-UMS compatibility version of this app. Mar 27 03:13:40 S3.1 Mar 27 03:13:44 hence, illiteracy Mar 27 03:13:57 I have a non-UMS version too Mar 27 03:14:10 andkore: your first problem: assuming users read Mar 27 03:14:14 yeah, I know Mar 27 03:14:31 andkore: but is that not possible to restrict either as a feature requirement or version ? Mar 27 03:14:33 I'd exclude certain devices from seeing it, but I don't know which devices don't have UMS Mar 27 03:14:38 usbms Vs MTP i mean Mar 27 03:14:43 you could have an app called 'Literally Nothing' and users would complain "omg this app does literally nothing" 1 star Mar 27 03:15:12 I don't know. I didn't think about looking at features. I'll do that Mar 27 03:15:44 "omg this app is supposed to do literally nothing but drains all my batteriez. also please add ability to do something and keep it free and fix bugs" Mar 27 03:16:14 never underestimate stupidity ;) Mar 27 03:16:23 https://play.google.com/store/apps/details?id=biz.lakin.kenneth.internal.tests.donothing.free&feature=search_result#?t=W251bGwsMSwxLDEsImJpei5sYWtpbi5rZW5uZXRoLmludGVybmFsLnRlc3RzLmRvbm90aGluZy5mcmVlIl0. Mar 27 03:16:47 haha Mar 27 03:16:53 read comments :) Mar 27 03:17:24 Ron White: "You can't fix stupid" Mar 27 03:17:50 I think people are just trying to be funny Mar 27 03:19:07 StingRay_: Should I just use a checkbox instead of a switch. The switch makes it easier for the user thoguh. Mar 27 03:19:22 "Do nothing box": http://www.youtube.com/watch?v=aiTDIhVmHoQ Mar 27 03:19:52 https://play.google.com/store/apps/details?id=com.google.android.gms read the comments Mar 27 03:20:34 kevinb: why all the hate? Mar 27 03:20:54 cause they are intelligent people out there ? Mar 27 03:20:58 oh wait... Mar 27 03:21:12 agy2154: also thats a design decision Mar 27 03:21:25 you can't really ask some1 to desired that for you Mar 27 03:21:40 capella: here's another kind of do nothing app https://play.google.com/store/apps/details?id=com.concentriclivers.donate Mar 27 03:21:52 they would (if they had any design sense) say that it's and out of design context question Mar 27 03:22:12 What's that supid app that tells you if its febuary or something? Mar 27 03:22:45 g00s: yeah but the dev has made other apps. Mar 27 03:23:16 Ughh... this wouldn't have happened on the App Store Mar 27 03:24:46 or Narnia Mar 27 03:26:01 * agy2154 remembers his app after looking at these useless apps Mar 27 03:27:10 agy2154: whats the check/switch for ? Mar 27 03:27:13 as in function ? Mar 27 03:27:57 is it a choice ? a yes no ? on off? Mar 27 03:28:18 StingRay_: So I have an additional setting in the preference screen that allows the users to enable that feature which enables the edittext under it so they can enter their value. Mar 27 03:28:25 yes on and off Mar 27 03:28:39 well thats an enable/disable then Mar 27 03:28:57 I found a backport but Idk... for some reason I can't use the holo light theme which it has because I can't like override it in the xml Mar 27 03:29:12 so do you call it "on/off" or "enable" ? Mar 27 03:29:33 the two string are on/off Mar 27 03:29:38 cause really if it call it on off I would personally want a switch Mar 27 03:30:01 StingRay_: Yeah. It would help the user better understand it. Mar 27 03:30:06 if you called it enable, personally I would want either a switch or a checkbox Mar 27 03:30:26 so it all depends on the context of what it sits in Mar 27 03:30:30 imho Mar 27 03:30:50 StingRay_: I tried two backports. One of them worked but I couldn't get it's light theme to work. Then I was looking into Holo everything and wanted to extract just the switch but that would be a pain in the but Mar 27 03:30:55 why not have a "swipe to enable" :) Mar 27 03:31:05 make things complicated Mar 27 03:31:22 StingRay_: Haha i would but its a preference. Mar 27 03:32:02 yeah see I'm not one to ask about that really, cause I go way off the track with that and create work for myself Mar 27 03:32:17 * StingRay_ is still more of an artists than a dev Mar 27 03:32:45 StingRay_: Its not a problem. I'm just making this overkill. Mar 27 03:33:19 then you have joined my world Mar 27 03:33:24 where everything is overkill Mar 27 03:33:46 * agy2154 high fives StingRay_ Mar 27 03:33:55 i guess thats better than everything being roadkill ;) Mar 27 03:35:39 Is it true that if i use setDrawingCacheEnabled to clear the cache it might not work on generic devices? Mar 27 03:49:57 anyone find that after about 5-8 hours use eclipse starts getting out of sync with src/debug references ? Mar 27 03:50:22 like my breakpoints pull up src references that are previous versions Mar 27 03:58:05 maybe you still had the debugger running or something Mar 27 03:58:14 no, i haven't had that problem Mar 27 03:58:40 g00s: thought you were going to intellij ? Mar 27 03:58:52 i check it casually, still using eclipse tho Mar 27 03:59:12 don't you think it has a kinda Xcode feel to ui ? Mar 27 03:59:35 intellij? Mar 27 03:59:39 yeah Mar 27 04:00:01 slidey floaty smotthy Mar 27 04:00:10 all the words ending in "y" Mar 27 04:01:05 i just need syntax highlighting, auto import, and basic refactoring. i use very little of ecipse / adt functionality. the functionality i wish adt did have, it doesn't though :/ Mar 27 04:02:15 so unless it started crashing bad or started gobbling up ram, i dont care too much Mar 27 04:02:32 StingRay_: wat Mar 27 04:02:33 seems like intellij uses a little lass ram Mar 27 04:02:56 Xcode looks like iTunes... and nothing like IJ Mar 27 04:03:18 cause I said "looks" Mar 27 04:03:49 :) Mar 27 04:03:52 well they both feel the same to me Mar 27 04:04:02 flat and cold, but maybe that's just the LCD on my laptop Mar 27 04:04:20 hi peoples Mar 27 04:04:50 Hello Mar 27 04:10:55 I'm in the middle of creating an app that can send and receive messages to and from the server. On my client app I create a thread that handles the DataOutputStream and DataInputStream. I have a TextView in my client app that displays the message the server gave to it...Thing is I can't setText to the TextView because that is a change in the UI and obviously can not be done...How can I do Mar 27 04:10:55 this? also I am not using an AsyncTask, just a regular thread. Mar 27 04:15:40 final Handler mainThread = new Handler(Looper.getMainLooper()); Mar 27 04:15:56 mainThread.post(new Runnable() { void run() { do UI stuff }}); Mar 27 04:16:05 put the mainThread as a class field Mar 27 04:17:04 thank you Mar 27 04:30:45 i think it would be cool if my irc client had a little country flag next to every nick Mar 27 04:33:15 anyone got the S4 yet ? Mar 27 04:34:22 shmooz: I would have told you I got it if it was the first day next month Mar 27 04:34:35 :) Mar 27 04:35:00 I heard it scrolls as it knows your eyeballs have reached the bottom of the screen thats a bit scary Mar 27 04:35:09 as a geek, i'd wait for the moto x-thingy-phone or i/o before buying an S4 Mar 27 04:35:39 and then I look and blink at everything and double blink and long blink, I can see the future Mar 27 04:35:45 as a geek, I bought an xperia z because it was available far earlier Mar 27 04:35:45 shmooz: Anyone complaining about batterylife yet? Mar 27 04:35:48 then again, its my natural inclination to wait until the last minute to decide and then weigh all the options Mar 27 04:36:01 and I was really sick of samsung Mar 27 04:36:15 wabz: when was the z out ? Mar 27 04:36:26 i heard the z and zl were pretty good Mar 27 04:36:31 I got it early in the month from HK Mar 27 04:36:41 well at least the S4 still lets you replace battery Mar 27 04:36:53 oh yeah, thats important for me Mar 27 04:37:01 the battery on the z isn't that great Mar 27 04:37:13 but if I'm travelling nothing would be, and I carry around those power bank things Mar 27 04:37:24 which have like 6000mAh and can charge a couple of devices at once Mar 27 04:37:36 it should be replacable, they shouldn't make phones disposable like apple and nexus 4 and so on Mar 27 04:37:37 if I'm not travelling then I plug it in to something at my desk anyway :p Mar 27 04:37:38 the lilliputian fuel cell (nectar) should be out pretty soon Mar 27 04:37:54 i think you can take the fuel cells on the plane too Mar 27 04:38:43 the only thing I don't like about the Z is that it only has a couple of quick options in the notification bar Mar 27 04:39:00 and auto rotation isn't there :p Mar 27 04:39:20 can you replace battery on Z ? Mar 27 04:39:27 So do you think batteries are going to end up being disposible? Mar 27 04:39:36 shmooz: nope :( Mar 27 04:39:41 doh! Mar 27 04:40:05 the s4 has 8 cores but touchwiz needs it Mar 27 04:40:12 omg Mar 27 04:40:13 I like that its waterproof and nice screen and playstation and walkman Mar 27 04:40:18 touchwiz is crap Mar 27 04:40:57 wabz: the s4 has variants that are not all 8 cores Mar 27 04:41:03 heh Mar 27 04:41:15 My friend gave me a galaxy s 3 for $200 with a slightly cracked glass. I tried replacing the glass but the digitizer came off too. lost $130 Mar 27 04:41:24 the UI on the Z is really nice too, even an improvement on stock android I reckon Mar 27 04:41:36 very nice gallery app/music player etc Mar 27 04:41:41 what i worry about - is that touchwiz keeps getting heavier and heavier, and other oems think - they are sucessful, so we need to make our skins bigger too to differentiate Mar 27 04:42:02 but its nice the z is almost stock though, minimal skin - right wabz ? Mar 27 04:42:07 yeah Mar 27 04:42:51 I wonder if google will release aosp images for it Mar 27 04:43:12 ..for the one device that doesn't really need it :p Mar 27 04:43:44 yeah corporate overlays are dime a dozen but there are some nice innovations in them that android can eventually include in stock, whatever they like Mar 27 04:43:51 * agy2154 has to go sleep.... Mar 27 04:44:37 If I like the way edit text looks in Theme.Light.Wallpaper but I'm not using that theme, how can I refer to that directly (or indirectly) by setting the style of a particular edittext? I can't seem to get a syntax that works and the syntax seems a little strange Mar 27 05:10:40 Hi there, after some remote updates (with mercurial) on my repo, my project show errors about R not being defined, so I need to import the own R it on each java file... you know why this can happen and on the other computers not¿? Mar 27 05:10:58 I mean... I not think the others developers are uploading source that doesn't even compile... Mar 27 05:11:08 and only because it lacks that import Mar 27 05:11:29 should R be included in VC ? Mar 27 05:12:14 I don't include generated things in my repo Mar 27 05:14:23 no Mar 27 05:14:49 the R class used to be generated in your normal src/ tree Mar 27 05:14:53 fun fact Mar 27 05:15:22 when ? Mar 27 05:15:32 that a long long time ago ? Mar 27 05:15:33 2008ish Mar 27 05:17:25 I dont know, but I ahve imported it now in all my java classes that are showing the error Mar 27 05:17:52 and all is OK now... like before the update of 14 patches :S... Mar 27 05:17:55 maybe you imported android.R Mar 27 05:18:16 there was no android.R or com.my.project.R on them Mar 27 05:21:37 jake whats the best option for a quick reply like you find in lets say an sms/chat app, where you get a popup (system wide) that is styled like a reply box Mar 27 05:21:51 is that just an activity with dialog theming ? Mar 27 05:21:54 yes Mar 27 05:22:12 android has no mechanism for these kinds of things like it does for notifications ? Mar 27 05:22:25 correct, you have to do it yourself Mar 27 05:22:30 fair enough Mar 27 05:22:36 cheers Mar 27 05:31:12 if i have an arbitrary edittext in an acitivity and i want it to use the edittext style that is in Theme.Light.WallpaperSettings how do I get the name/syntax of that style to paste into the activity editext style in the xml? please it's killing me Mar 27 05:31:53 look at editTextStyle in that theme? Mar 27 05:32:15 https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml#L550 Mar 27 05:32:25 it doesn't declare anything, so you go up to Theme.Light and look for it... Mar 27 05:33:31 there's an editTextColor declared: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml#L436 Mar 27 05:34:00 but other than that, the background comes from the normal Theme: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml#L100 Mar 27 06:01:44 if i want most of my app to have the holo theme but use a few edit texts in the old ver 2.2 orange box style how can i refer to that style from the edittext? Mar 27 06:02:45 make a style that extends from Widget.EditText and override the things you want to change Mar 27 06:03:00 then in XML just add style="@style/NotHoloEditText Mar 27 06:03:15 https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/styles.xml#L488 Mar 27 06:14:32 JakeWharton, my app released :) Mar 27 06:16:13 congrats! Mar 27 06:17:00 link? Mar 27 06:17:23 hello i connected my htc note 2 to my wifi network but the ping is slow 110~ms Mar 27 06:17:26 any ideas why is that? Mar 27 06:19:56 JakeWharton, 'latvenergo' . You can see 4 scaled-vertically buttons on main screen with text aligned to right of them, and also your tweaked actionbar Mar 27 06:20:17 dmonjo: #android Mar 27 06:20:40 whre can i download the android 2.2 source? I see it on grepcode but cant download the whole thing? Where can i get the whole thing Mar 27 06:20:50 s.android.com has instructions Mar 27 06:22:53 im specifically wanting the edittext 9patches from version 2.2 Mar 27 06:23:18 well you can clone the frameworks/base.git repo and checkout the 2.2 tag Mar 27 06:25:41 hi guys, what do you think about this https://github.com/yanchenko/droidparts ? Mar 27 06:27:41 it's a very large framework that your app will be forever tied to should you choose to use it Mar 27 06:28:53 JakeWharton, can you take a look and tell which parts to work on? Mar 27 06:29:21 the library also has many heads and lacks focus which is never a good thing Mar 27 06:29:27 http://developer.android.com/guide/topics/ui/actionbar.html Mar 27 06:29:50 also, the functionality it provides will likely be better served by other, smaller, specific libraries Mar 27 06:29:54 following this to add items to my action bar but it doesnt seem to be showing up, im able to add things to the settings menu Mar 27 06:29:59 anyone know why? :p Mar 27 06:30:05 riccoski: pastebin code Mar 27 06:30:27 http://pastebin.com/uFNbES4G Mar 27 06:30:48 and what's the problem? Mar 27 06:31:15 thank you :JakeWharton Mar 27 06:31:21 i want to be able to add icons to action bar Mar 27 06:31:23 like http://developer.android.com/images/ui/actionbar-item-withtext.png Mar 27 06:31:25 but its not showing up Mar 27 06:31:36 rotate your phone to landscape Mar 27 06:31:43 or try a tablet Mar 27 06:31:55 romainguy_, can you help with one small issue in my app ? :-) Mar 27 06:31:56 icons + text do not show up on phones in portrait Mar 27 06:32:08 squ: depends on the issue Mar 27 06:32:35 ohhh ok thanks Mar 27 06:33:11 :) Mar 27 06:34:06 romainguy_, in first button (top) if you click (i), I absolutely do not know how to position black thing center relative to (i): https://play.google.com/store/apps/details?id=lv.dot44.latvenergo Mar 27 06:34:25 JakeWharton: how do i show just an icon and on portait? :p thanks Mar 27 06:34:30 so that it can work on multiple resolutions Mar 27 06:34:49 although I'm using dp for offsets Mar 27 06:34:59 riccoski: if you specify an icon that will be the only thing that is shown Mar 27 06:35:23 not showing :((( Mar 27 06:36:10 squ: what first button? what's (i) and what's the black thing? Mar 27 06:36:30 romainguy_, you have app? Mar 27 06:36:40 no and I'm not going to install it :) Mar 27 06:36:50 then it is hard to explain Mar 27 06:38:06 Oh I think i need a hdpi icon Mar 27 06:38:11 thanks JakeWharton :) Mar 27 06:38:19 xhdpi* Mar 27 06:40:17 is it really necessary to copy images in ldpi, mdpi? Mar 27 06:40:35 because there shouldn't be much devices for that Mar 27 06:46:38 hey, my app is stuck on portrait, it does not switch into landscape when the phone is rotated. any idea could cause that? my activity is not set to force portrait Mar 27 06:51:29 how to make pinterest style listview? Mar 27 06:51:40 or not must have been another reason the first icon i tried didnt show hmm Mar 27 06:57:40 kamoljan: StaggeredGridView will probably be in the next support library Mar 27 06:58:07 a few people have already made standalone versions from what they found in AOSP's git repos or whatever they could come up with themselves Mar 27 06:58:51 JakeWharton: let me try, tq! Mar 27 07:42:15 Chainfire: "“We definitely plan to continue developing and evolving the software. This is our first release and by bringing this under the Google brand, we hope to show our commitment not only to Nik users, but to the photography community at large.” Mar 27 07:42:25 \o/ Mar 27 07:42:44 (from http://connect.dpreview.com/post/4452357456/google-nik-software-plugins ) Mar 27 07:55:32 hey guys, this isnt particularly related to android development, but i assume this would be bthe best channel to ask Mar 27 07:56:22 my device wasnt recognized by windows, or at least not as it should have been, so being the idiot i am, i disabled the device, and now i cant figure out how to re-enable it, any ideas? Mar 27 07:57:08 #windows ? Mar 27 07:57:31 i doubt windows would be able to help with this, they dont seem to be of much help when i do ask there Mar 27 07:57:54 zack6849: toss it out of device manager? Mar 27 07:57:58 well thats not a dev question, tis more of a device manager windows thingy Mar 27 07:58:20 It's been a while since I entered a Winders system Mar 27 07:58:44 i say maybe a better question here becaue even if i did have the drivers they arent working on windows 8 Mar 27 07:58:52 inb4 windows 8 sucks etc Mar 27 07:59:07 'inb4' disqualified you from any help here Mar 27 07:59:20 k Mar 27 07:59:57 because im sure that you speak for every single one of the 325 users here when you say that Mar 27 08:00:19 zack6849: no, but anyhow - check out the topic Mar 27 08:00:29 if its not dev related, find help elsewhere Mar 27 08:00:43 now where exactky does it say that? Mar 27 08:00:49 *exactly? Mar 27 08:01:12 "Android application development" Mar 27 08:01:12 /topic I think Mar 27 08:01:12 im not advertising. Mar 27 08:01:39 yes, it says this channel is for android application development, i see nowhere that speaking of anything else is prohibited Mar 27 08:01:49 not #areaguy-windoze-android-support Mar 27 08:03:45 g00s, i clearly said i know this isnt the exact channel to ask this, but seeing as how out of everyone in the android communtity im sure the devs know the most about drivers, i asked here. Mar 27 08:04:01 zack6849: http://bit.ly/14uDF1y Mar 27 08:04:19 kwell isnt that funny. Mar 27 08:04:24 well no Mar 27 08:04:32 i thought it was a list of answers for you Mar 27 08:04:39 you seem to be implying i havent googled it Mar 27 08:04:41 take humour from it if you want Mar 27 08:06:02 well anyway, I think the answer you seek will be on the 1st search results page Mar 27 08:06:14 also, if you look a great deal of these are people having issues with audio devices, however this is not an audio device and the same doesnt apply Mar 27 08:06:22 i cant right click it and re-enable the device Mar 27 08:06:56 well A) if it;s a device and B) if it's managed by device manager Mar 27 08:07:04 then yeah, you should be able to Mar 27 08:07:10 oh really? Mar 27 08:07:22 http://puu.sh/2oO4S Mar 27 08:07:39 oh Mar 27 08:07:43 so your question is Mar 27 08:07:53 how do I install relevant drivers for my phone? Mar 27 08:08:17 with the pretext of "I disabled AND uninstalled the drivers " Mar 27 08:08:19 i had the relevant drivers. Mar 27 08:08:25 "had" Mar 27 08:08:54 i clearly stated what i had done was stupid, i would appreciate it if you didnt talk down to me. Mar 27 08:09:10 windows 8? Mar 27 08:09:17 appreciate whatever you want, not talking up or down Mar 27 08:09:18 i also said this Mar 27 08:09:22 not even talking Mar 27 08:09:26 :) Mar 27 08:09:45 it seems as if everyone here is too busy yellling about how this is the wrong channel to even read my messages Mar 27 08:10:03 in Windows 7 it usually sufficed to toss it out of the Device Manager Mar 27 08:10:15 and if that doesn't fix it, go to the site of the manufacturer Mar 27 08:10:26 how does one toss it out of the device manager Mar 27 08:10:31 One opens it Mar 27 08:10:35 find said device Mar 27 08:10:38 right click Mar 27 08:10:42 and Uninstall Mar 27 08:11:07 well that worked for about half a second Mar 27 08:11:20 it was recognized as an android phone, then went back to unknown device Mar 27 08:11:46 unplug, uninstall device; reinstall driver, plug back in Mar 27 08:11:52 perhaps reboot or something Mar 27 08:12:00 why not google "android phone unknown device" Mar 27 08:12:03 that's all I got Mar 27 08:12:11 and read the results that tell you how Mar 27 08:12:35 what does android:attr/editTextBackground Mar 27 08:12:36 refer? the current style? The default style? Mar 27 08:12:55 how could I change that to refer to a particular theme like Theme.Light.??? what would I use? Mar 27 08:13:11 Dorky: would that not be a state list ? Mar 27 08:13:25 focus/touched/notFoucused etc Mar 27 08:13:25 isn't the theme set in the manifest? Mar 27 08:14:07 and why would you not just setStyle Mar 27 08:14:28 as long as the style has that attrib, it should work Mar 27 08:14:33 StingRay_: probably it is but I still want to refer to one in a different theme...either way is it referring to the current theme ror hwat? Mar 27 08:14:59 im setting that in the propery in the xml StingRay_ Mar 27 08:15:06 where I can find Swipe View in API demo? Mar 27 08:15:20 brb, rebbot Mar 27 08:15:29 reboot* Mar 27 08:17:00 kamoljan: probably in the support library demos Mar 27 08:17:11 if you mean ViewPager Mar 27 08:19:35 I have this weird problem when trying to play a video that was recorded on an iphone device, it seems like both of the audio and the video encoders are fine but it still doesn't play the video on my android device Mar 27 08:20:11 g00s: I mean this Swipe View http://developer.android.com/design/patterns/swipe-views.html Mar 27 08:21:45 yeah, i think thats a ViewPager right ? Mar 27 08:22:09 g00s: you are right it is VIewPager, I can find it in API Demo? Mar 27 08:22:21 yeah, at least there Mar 27 08:22:22 there'll be something in docs/ Mar 27 08:23:28 uh oh, chrome 26 is stable Mar 27 08:24:14 g00s: tq! that's the one I wanted! Mar 27 08:26:16 here's the deal: i'm on a 4.0 unit (holo) but I want the edittexts to look like the old 2.2 Theme.Light with the white background and orange borders etc so how can I do that via xml properties or whatever StingRay_? Mar 27 08:26:53 new background Mar 27 08:27:03 as a state list Mar 27 08:27:10 so 4 drawables Mar 27 08:27:12 if I just set the theme to theme.light in my manifest which is what stackoverflow always says it doesnt work beucase there is no Theme for SwitchView so that blows up... StingRay_ Mar 27 08:27:14 iirc Mar 27 08:27:56 StingRay_: why cant i reference it directly somehow? and if not where can I rip those files from I grabbed the soruces but the 9.png arent there or i coudlnt find them..seems like a royal pita to not be able to just reference it when its in there already? Mar 27 08:30:21 why would 4.2 have drawables from 2.x ? Mar 27 08:31:04 StingRay_: ok so where can I snag the drawables from ? I couldn't find it in the source tree Mar 27 08:32:04 you asking the wrong person, cause I wanted a hybrid kinda look, the 4.2 underscore top and bottom in a shadowed container similar to 2.x Mar 27 08:32:09 so just made one Mar 27 08:32:17 take like…well…minutes Mar 27 08:32:32 10's of minutes if you don't use any graphics software Mar 27 08:32:38 I would think Mar 27 08:32:42 sure if you know what you're doing which i don't i just want to use the existing one... I'm really confused about all this shit Mar 27 08:33:17 so if you do a 9patch or whatever for a button or edittext, is the background COLOR welded into it or can you cahnge the backgournd COLOR by itself? ditto for border color... Mar 27 08:33:40 but i'll take a look at your 9patch and xml maybe teh modern look will work for me as long as the bg color is white or very close to it and not just a thin line like holo Mar 27 08:33:45 well for something that indicates visual status you don't do just a background Mar 27 08:34:00 as in you probably want 4 states Mar 27 08:34:46 ok so if you have that i'll take a look and if you can tell me where to grab the existing one so much the better Mar 27 08:34:52 as in focused, normal, selected Mar 27 08:34:59 as a minimum Mar 27 08:35:02 I don't get why you'd want to regress to 2.x styles in the first place, it'll stick out like a sore thumb Mar 27 08:35:42 right i get the states but is the backround color welded into it or can i change the background color without having to generate a million 9states StingRay_? Mar 27 08:35:59 well it's an image Mar 27 08:36:01 so yeah Mar 27 08:36:13 you could do a drawable set Mar 27 08:36:24 as in shapeDrawable Mar 27 08:37:16 and different instances could have different colors? how would you do that and why is this so damn hard in android you'd think you could change the colors of buttons without too much difficulty but if ou set button background to red the bordres and eveything else disappears Mar 27 08:37:58 well the idea is you would define drawables rather than set colors Mar 27 08:38:11 myButton_blue_square Mar 27 08:38:17 myButton_blue_rounded Mar 27 08:38:20 etc Mar 27 08:38:27 and what if I wanted it to be red or some othe color later? Mar 27 08:38:40 then in the STYLE Mar 27 08:38:48 that has the single ref to what you want Mar 27 08:38:58 you change to myButton_red_rounded Mar 27 08:39:02 or you can do it Mar 27 08:39:07 myButton_rounded Mar 27 08:39:14 and have the colours Mar 27 08:39:19 myButton_color Mar 27 08:39:29 with no descriptive ref Mar 27 08:39:53 so you can just change a colour that is controlling the button drawable Mar 27 08:39:57 or that the drawable uses Mar 27 08:40:21 ok well it doesnt make any sense to me do you have a concrete example or some good tutorials? i've searched a lot and most are half baked or they say browse the .xml source code and it makes no sense and the syntax of a lot of the references are byzantine...where isa good tutorial or book or source code demo? you keep saying I can do this and I can do that and not giing me a HOW to do it Mar 27 08:41:10 do you know about styles ? Mar 27 08:41:17 and how to use them ? Mar 27 08:41:36 do you know about shapes and layers (drawables) ? Mar 27 08:41:42 very little and what I've seen has been pretty damn confusing and as I said havnet found good tutorials or books Mar 27 08:41:44 do you know about 9patch Mar 27 08:41:53 somewhat about shapes Mar 27 08:42:05 cause thats all you need really Mar 27 08:42:15 StingRay_: ive heard about 9patch but i dont fully undersand it and nothing is tying it togethr for me Mar 27 08:42:16 I have not seen any tutorials Mar 27 08:42:25 if i have a 9patch is the color welded in, yes or no!?!? Mar 27 08:42:35 yes Mar 27 08:42:40 ok well that is stupid Mar 27 08:42:44 it's a bitmap Mar 27 08:42:55 but a shape hasn't Mar 27 08:43:06 yes well its a bitmap but it could have a special color or transparency which could be overwritten Mar 27 08:43:07 e.g. most of my buttons are shapes Mar 27 08:43:24 ok so post your code and let me see it then and why no tutorials about somethign so basic and important? Mar 27 08:46:41 StingRay_ would be very appreciated plz :)_ Mar 27 08:46:58 ah, until that point I thought you a bit rude :) Mar 27 08:47:06 code for what ? Mar 27 08:47:28 your shape stuff or that modern edit text or anything taht demonstrates what you're talking about :) Mar 27 08:48:12 well that would be 8 layers lists, 4 drawables and 1 state list with my colours.xml and probably lots of other things Mar 27 08:48:30 and thats just my textBox thingy Mar 27 08:48:53 right I know it's complicated that's why i'd like to see the whole thing or a tutorial that really covers it so do me a favor and zip that puppy up eheh :) Mar 27 08:50:44 ok so…i found some things that are not ™ me :) and a bit easier to understand Mar 27 08:51:05 http://pastebin.com/bMQjyN6Y Mar 27 08:51:07 ok so that Mar 27 08:51:20 is a selector that indicates different drawables for diff states Mar 27 08:51:37 that much i understand Mar 27 08:51:41 but try and not take into consideration "blue" Mar 27 08:51:47 imagine that not there Mar 27 08:51:50 i dont even really care about the states at this point Mar 27 08:51:51 the blue word Mar 27 08:52:24 i just care about a style it could be a static style whatever that's colorable it doesn't have to be dynamic and have touch and all taht Mar 27 08:52:33 just keep it simple to start and worry about state selectors later :) Mar 27 08:52:43 http://pastebin.com/xcEvY9ji Mar 27 08:52:52 now that is a drawable for one of the states Mar 27 08:52:57 that combines 2 drawables Mar 27 08:52:59 :) Mar 27 08:53:18 I have a recessed look Mar 27 08:54:09 ok Mar 27 08:54:10 http://pastebin.com/pPVGbh7P Mar 27 08:54:24 that is the actual shapes Mar 27 08:54:52 in a layer list for one of the layers on one of those drawables that is in one of those button states Mar 27 08:54:53 :) Mar 27 08:55:13 ok and is there a tool for visualizing the gradients and laying that out like Expression Blend for WPF or just everything by hand? Mar 27 08:55:44 well I'm a vfx/gc artist so I have loads of tools to do colours Mar 27 08:56:04 but normally you just need it drawn in the editor Mar 27 08:56:07 while working on it Mar 27 08:56:14 well just in terms of eclipse or whatever...anyway a complete zip with everything would be nice Mar 27 08:56:15 cause it refreshes quick enough Mar 27 08:56:35 right but is there a way of doing the gradients with sliders at all or just by hand? Mar 27 08:57:01 well I pull up a colour swatch in my gfx tools Mar 27 08:57:06 and I decide in that Mar 27 08:57:26 well a lot of gradients i tried to do i android look like ass especially if i used a center color Mar 27 08:57:39 but those are old things from when I was just playing Mar 27 08:58:02 playing / learning (not that I've learned anything) Mar 27 08:58:06 ok well thanks but not to be rude but this is just another incomplete set of stuff about styling which i alreayd have seen a lot of Mar 27 08:58:10 what i need is a complete example Mar 27 08:58:32 well all you were missing from what I showed you is a style def Mar 27 08:58:46 that would just reference them to a bg attrib Mar 27 08:58:50 sure and whatever the references are Mar 27 08:58:53 what the heck is @dimen Mar 27 08:58:59 anyway i'm already frustrated but tahnks Mar 27 08:59:02 a dimension Mar 27 08:59:09 like 16dp Mar 27 08:59:10 yeah defined where? oh that's not in there Mar 27 08:59:11 can it be changed Mar 27 08:59:19 StingRay_: morning, having fun today? Mar 27 08:59:24 no Mar 27 08:59:26 not now Mar 27 08:59:33 Mar 27 08:59:33 anyuway thanks but i need a complete working example and i'm surprised it's so hard to find but thanks for the tips Mar 27 09:11:13 Hi, is there a simple way to completely trigger a "reset of a phone" / "reset of its data" upon change of e.g. sim card? Mar 27 09:11:43 including user settings, email accounts and so forth Mar 27 09:12:57 (i imagine an "app" that could do this rather than manual steps in the menus) Mar 27 09:13:24 rooted app I would imagine Mar 27 09:14:35 StingRay_: I'd (or someone) would manually have to root it then Mar 27 09:15:11 well I (have not looked but) can't imagine that being a permission allowed to an app Mar 27 09:15:15 wipe phone Mar 27 09:15:17 :) Mar 27 09:15:24 StingRay_: it would be a nice feature in my mind :) Mar 27 09:15:31 not in mine Mar 27 09:15:41 cause for a user point I would want to know Mar 27 09:15:49 and have at least 2 chances to stop it Mar 27 09:16:08 i understand that, i'm looking from another perspective and exploring some scenairos Mar 27 09:16:09 but it's only 2 clicks away if I wanted to Mar 27 09:16:23 well if it's a system app Mar 27 09:16:30 like most sammy phones have that Mar 27 09:16:45 ok ok.. Mar 27 09:16:48 i can got to website and wipe my data on any sammy device i have Mar 27 09:16:52 lock it etc Mar 27 09:16:54 do whatever Mar 27 09:17:07 that sounds interesting Mar 27 09:17:16 I have only got other phones Mar 27 09:17:27 http://www.samsungdive.com/DiveMain.do Mar 27 09:17:47 there is a factory reset option in there too Mar 27 09:17:53 although not shown on main page Mar 27 09:17:55 why would you buyy a samsungggg Mar 27 09:18:07 StingRay_: now we are talking Mar 27 09:18:14 cause they fixed my microwave Mar 27 09:18:14 I want to play a sound with soundpool as soon as an activity starts. When I dump it in oncreate soundpool doesn't play it (it plays when in an onClick and I click a button). Any ideas? Mar 27 09:18:28 storkme: that conversation is not something i care about Mar 27 09:18:36 :) Mar 27 09:18:37 storkme: what other options are there ? Mar 27 09:18:45 I use nexus stuff Mar 27 09:18:53 but I have sammy devices too Mar 27 09:19:19 oh yeah i remember the microwave conversation haha Mar 27 09:19:20 fair enough Mar 27 09:19:23 StingRay_: is that site for private persons, or companies too owning multiple phones? Mar 27 09:19:35 both Mar 27 09:19:39 gr8 Mar 27 09:19:48 I have like 10 isn sammy devices Mar 27 09:19:53 ish* Mar 27 09:20:54 StingRay_: my better halve has one samsung and she's happy. But myself only some old zte's that are going strong, and nexus tabs Mar 27 09:22:13 StingRay_: thanks for that hint. it fuels my mind even further. Mar 27 09:23:13 np Mar 27 09:23:15 StingRay_: does the service require purchase of a new phone to connect it to the service? or can one connect a resasonably "onld one"? Mar 27 09:23:29 as long as it has sammy rom Mar 27 09:23:40 and ability to ADD samsung account in Accnt manager Mar 27 09:23:43 tis all good Mar 27 09:23:52 so, say i cyanogen it it would work Mar 27 09:23:57 wouldnt Mar 27 09:23:58 no Mar 27 09:24:01 correct Mar 27 09:24:05 typo Mar 27 09:24:05 would not work Mar 27 09:24:22 the sammy thing is not just a skin Mar 27 09:24:29 it has lots of system stuff and extras Mar 27 09:24:32 i udnerstand, it's in the design Mar 27 09:24:48 in by design Mar 27 09:25:00 english is not my native language Mar 27 09:25:31 so that is two steps forward and one step backward Mar 27 09:28:24 Good Morning Mar 27 09:30:22 StingRay_: do you know if the device identifier is reset if i mod it? Mar 27 09:30:27 morning Ankhwatcher Mar 27 09:30:43 well i have a samsung galaxy nexus so i can't talk really Mar 27 09:30:52 BUT TODAY IS ITS LAST DAY for my nexus 4 should arrive soon Mar 27 09:30:58 peroht: mod it how ? Mar 27 09:31:10 StingRay_: i meant if i root it Mar 27 09:31:17 oh naaa Mar 27 09:31:21 shouldn't do Mar 27 09:31:24 StingRay_: no .. "factory reset" however that is done Mar 27 09:31:27 so, wassup? Mar 27 09:31:40 all stuff in efs is not touched me thinks Mar 27 09:31:48 efs? Mar 27 09:31:55 nv.bin etc Mar 27 09:32:13 the partition that holds all the funky stuff Mar 27 09:32:48 ah Mar 27 09:32:56 i havent digged that deep yet Mar 27 09:33:08 the bit most ppl forget to backup when they start fkin with their phone Mar 27 09:33:12 :) Mar 27 09:33:16 hehe Mar 27 09:33:57 where is the "backup-recover for dummies" app.. Mar 27 09:34:07 one push of a button Mar 27 09:34:23 there are some that do that Mar 27 09:34:37 Its annoying. i have a GCMIntentService which starts an activity. The Activity startsActivityForResult another activity. As soon as i use finish after i received the result it launches the MainActivity. I tried NoHistroy, NEW_TASK, CLEAR_SINGLE_TOP, etc.. any idea? Mar 27 09:35:25 does the GCMIntent carry the root class of your app ? Mar 27 09:35:29 StingRay_: I'll investigate that later Mar 27 09:36:59 does it really matter? Yes, it starts the Activity with the Context of the MainActivity. But shouldnt adding the Intent Flag FLAG_ACTIVITY_NEW_TASK, CLEAR_TOP and SINGLE_TOP and NO_HISTORY flush the context? Mar 27 09:38:07 well no, i was thinking like a notification intent has the root class as a back option Mar 27 09:39:46 StingRay_: do you know any similar services/apps today like the one you mentioned earlier for custom roms / or user install? Mar 27 09:40:15 well yeah, there are loads Mar 27 09:40:22 do it from websites Mar 27 09:40:23 StingRay_: ok i'll check myself Mar 27 09:40:26 sms Mar 27 09:40:32 gcm Mar 27 09:49:03 question, it it only views in the main view hierarchy that cannot be touched from a of ui thread process ? I could still in theory assemble (do stuff) to views if they are not in that hierarchy in a thread ? Mar 27 10:07:07 StingRay_ if i wanted to do something simple like just draw an inset border around a linearLayout how would I do that? Mar 27 10:07:26 inset ? Mar 27 10:07:35 depends how you want it to look Mar 27 10:07:37 yeah one that's recessed Mar 27 10:07:44 oh ok Mar 27 10:07:45 just a few pixells of recessed nothing big Mar 27 10:08:00 9patch or make a shaopedrawable Mar 27 10:08:13 rem I would probably do a layer list Mar 27 10:08:23 xorgate yes yes I know that already ok i want a specific example/code Mar 27 10:08:24 with 2/3 items Mar 27 10:10:52 (outer highlight with a stroke) (inner shadow area, solid fill transparent) (inner stroke, same col as outer) Mar 27 10:11:07 but if I had no need to make it adaptive Mar 27 10:11:10 9patch Mar 27 10:11:12 :) Mar 27 10:11:54 great thats so helpful Mar 27 10:12:05 i thouht that could be something you could pastebin easier than my other one ;) Mar 27 10:12:29 i still dont get why android needs to make somethign that simple so complicated....i dont see the efficiency or advantage but maybe im missing something..is it that hard to do bordres and stuff on iOS? Mar 27 10:12:56 does iOS let you have your own buttons ? Mar 27 10:12:58 :) Mar 27 10:13:28 and those buttons are just bitmaps anyways Mar 27 10:13:56 android is far in advance in that sense Mar 27 10:14:15 lets you do anything in 20 different ways for 100's of screen while making it quite easy Mar 27 10:14:21 just my opinion Mar 27 10:14:23 :) Mar 27 10:14:31 ciggy time Mar 27 10:17:54 ciggy ? Mar 27 10:17:56 :-) Mar 27 10:18:07 does that mean smoke? Mar 27 10:18:14 funny Mar 27 10:18:46 indeed Mar 27 10:20:00 if i start a fragmentActivity with no setContent that just fires a fragmentDialog is that better for some kind of app wide popup or will the activity with no content be black screen ? Mar 27 10:20:05 android developers do not smoke Mar 27 10:20:22 I'm not even sure if it legal on channel Mar 27 10:20:32 <-- not a dev remember Mar 27 10:20:48 ok, visitors Mar 27 10:21:02 and we vfx guys smoke like a fire at a toxic waste dump Mar 27 10:21:16 :) Mar 27 10:21:45 we also take great care to passively pass on the joy of nicotine to anyone else too Mar 27 10:21:47 :) Mar 27 10:22:18 i will stop when i get my app out Mar 27 10:22:35 cause I've got unhealthy and fat while I been sat here Mar 27 10:23:05 g00s good find. I'm not going to take their word for it though (even though I did buy the collection). And it still annoys me that Google has to control all teh things in the software sector. They going after Adobe next? pff. Mar 27 10:23:20 StingRay_, sure :) Mar 27 10:23:44 no really, like 1.5 stone Mar 27 10:23:48 :) Mar 27 10:30:30 are there any advanced tools to change audio routing in android? I would like to record from FM radio in my app Mar 27 10:41:02 hi Mar 27 10:41:28 how can i put a notification acitivity like a dialog without afecting the main activity Mar 27 10:42:05 using a view ? Mar 27 10:42:34 but in a separate thread? Mar 27 10:43:17 well that view needs to be touched from main ui thread Mar 27 10:43:32 does a dialog halt the hosting activity ? Mar 27 10:43:39 didn't think it did Mar 27 10:44:17 is necesary to be touched? is llike a notification with a time live Mar 27 10:44:39 time live ? Mar 27 10:44:58 like be visible for 5 seconds Mar 27 10:45:30 but you would have to maybe "attach it" "show it/animat it" "hide it" Mar 27 10:45:52 why not use a dialog ? Mar 27 10:46:11 because i need to customize with a xml Mar 27 10:46:26 and i read about activities applying the android dialog theme Mar 27 10:46:31 using fragments ? Mar 27 10:47:31 but in a dialog you have setContent neways Mar 27 10:47:32 no. this: http://www.zunisoft.com/2009/07/android-dialog-theme-and-window.html Mar 27 10:47:39 so you can add your own xml Mar 27 10:48:01 http://www.mkyong.com/android/android-custom-dialog-example/ Mar 27 10:48:15 but with fragmentDialog tis even easier Mar 27 10:48:20 and the dialog stops my main activity ? Mar 27 10:48:42 it's like a gps notification, but i don't want to stop the background Mar 27 10:48:57 why would it stop an activity Mar 27 10:49:02 it's running inside it Mar 27 10:49:11 if activity stopped so would it ? Mar 27 10:49:55 and i want to pass a message to show in the dialog Mar 27 10:50:03 that always is distinct Mar 27 10:50:52 can do what you want Mar 27 10:51:17 but with a activity or dialog? Mar 27 10:51:25 either or Mar 27 10:51:45 when you say message Mar 27 10:51:50 you mean a string ? Mar 27 10:51:59 yes Mar 27 10:51:59 or an Message object ? Mar 27 10:52:03 no no, a text Mar 27 10:52:11 to show in the notification Mar 27 10:52:41 the user have no inetract in this notification Mar 27 10:52:45 no buttons Mar 27 10:57:08 StingRay_ i need an AsyncTask? Mar 27 10:57:31 for what ? Mar 27 10:58:21 Any JuiceSSH (ssh client) users in here interested in helping beta test a new version? Mar 27 10:58:44 for close it after 5 seconds Mar 27 10:59:16 I think your confusing what asyncTask is Mar 27 11:00:02 and would it not be closed as a result of "something" ? rather than just after 5 seconds ? Mar 27 11:02:00 is onlly a notification while you are driving averstisng of the next out Mar 27 11:03:33 well you could just do postDelayRunnable to close it Mar 27 11:03:49 btw, disclaimer, your talking to a CG Artists, not a programmer Mar 27 11:17:25 when i hae a postDelay the activity which launches the notification waits or continue? Mar 27 11:24:38 onPrepareSubMenu is never called even when hasSubMenu() returns true, any suggestion? Mar 27 11:38:45 hi Mar 27 11:40:30 * StingRay_ is getting tired Mar 27 11:42:03 hello everyone Mar 27 11:42:58 I have a small question about ViewPager... I tried google and stackoverflow but didnt get a straight answer.. maybe someone can help me here? Mar 27 11:44:30 not if you don't ask the question, no Mar 27 11:46:19 :) Mar 27 11:46:54 I understand I can't register a OnClickListener to a ViewPager Mar 27 11:47:01 so what is the work around? Mar 27 11:47:17 what if I want to click on an image that is in the ViewPager and not a button Mar 27 11:47:28 Then you set a click listener on that image Mar 27 11:47:59 I use a FragmentPagerAdapter Mar 27 11:48:05 do you mean add it there? Mar 27 11:48:27 Then you must have some fragments that handles the image Mar 27 11:48:37 That should include any click listeners Mar 27 11:48:43 yes there's a fragment class Mar 27 11:48:53 ohh so inside that class I add the listener? Mar 27 11:49:33 interesting... Ill try that right now. brb Mar 27 11:50:55 SimonVT: you opinion on using a viewless fragment as a local thread manager ? Mar 27 11:51:27 your* Mar 27 11:51:52 * StingRay_ just realised about 99% of the time I type you instead or your... Mar 27 11:54:48 No idea.. Do you need the activity context and the lifecycle? Mar 27 11:55:39 well what i need at the moment is a way to assemble views off the main ui thread Mar 27 11:56:05 but then thought wouldn't it be nice to use fragment to do misc stuff Mar 27 11:56:23 Assemble views off the main thread? Mar 27 11:56:44 that not poss ? Mar 27 11:56:56 I thought they are ok if not in view hierarchy Mar 27 11:57:10 i pass parameters like: Bundle b = new Bundle(); b.putFloat("price", priceCounter); b.putString("exitNumber", "1"); notificationIntent.putExtras(b); it's OK? Mar 27 11:57:13 Not sure, I'd imagine it could break in unexpected ways Mar 27 11:57:27 And besides, it's just unnecessary Mar 27 11:57:31 really ? Mar 27 11:57:37 Calling new View(..) a few times isn't very expensive Mar 27 11:58:02 I spend 0.23 seconds doing it and thats not a worst case Mar 27 11:58:15 inflating, setting initial info Mar 27 11:58:30 How much work are you doing oO Mar 27 11:58:55 well it's not a fixed view set Mar 27 11:59:11 so I may have lots of fields that are inflated and attached Mar 27 11:59:33 fields = multiple views Mar 27 11:59:41 You can't use one of the adapter backed classes? Mar 27 12:00:15 not really thought of that, but i would think it less manageable Mar 27 12:00:32 for me neways Mar 27 12:00:54 some of these fields have adapter backed views Mar 27 12:00:55 :) Mar 27 12:01:12 dam this is sounding a bit ridiculous saying it out loud Mar 27 12:01:13 Well, it sounds like it's quite a large view hierarchy Mar 27 12:01:28 I don't think the initial inflating would be the largest issue Mar 27 12:02:01 what would be / is ? Mar 27 12:02:16 cause everything is quite fast and nice Mar 27 12:02:25 just the initial bit of generation Mar 27 12:02:37 0.23 - 0.4 (heavy case) Mar 27 12:02:54 attaching takes like 0.18 Mar 27 12:03:20 so I was just thinking do it off ui thread and post back progressive like Mar 27 12:03:32 I would have imagined it would cause performance issues Mar 27 12:03:36 maybe with a little fade anim Mar 27 12:03:46 hmmm, not noticed anything yet Mar 27 12:04:03 and my test case had 20+ different configs of these fields Mar 27 12:04:12 Might work, I don't know Mar 27 12:04:44 actually works really quick on a 1st gen galaxy s Mar 27 12:07:40 Hi. I have a tabbed and swipeable Activity. Is it okay (and easy) to make different action bar menu items appear, depending on which tab you are on? Mar 27 12:08:25 Yes Mar 27 12:08:58 how can I open a TCP socket with specified remote ip, remote port and local port? "Socket s = new Socket(ip, port, InetAddress.getLocalHost(), localPort)" throws ConnectionExceptions (EINVAL) Mar 27 12:09:26 new Socket(ip, port) works just fine but it chooses the local port Mar 27 12:10:39 SimonTV, I think I misunderstood what you meant. I added an OnClickListener in the Fragment class... Mar 27 12:11:05 maybe I did it wrong... (im quite new to this) but it still not doing anything when I click on the image in the ViewPager Mar 27 12:11:40 vangi__: whatever class controls the view hierarchy that the imageView is on, thats where you set it Mar 27 12:12:18 ohh... Mar 27 12:12:24 ok gonna try. brb Mar 27 12:12:51 myImageView < mylayout.xml < myfunkyFragment (here) < myActivity etc Mar 27 12:15:01 actually in your case, myActivity > myFragViewPager > myPage1fragment (here) > my layout.xml > myImage Mar 27 12:19:52 hmm so to clearify ... I have MainActivity that extends FragmentActivity. Inside MainActivity there's a static class MyAdapter that extends FragmentPagerAdapter. This class calls for getItem() that returns a Fragment class. The Fragment class handles the ImagView. So I add it in the Fragment class? Mar 27 12:20:19 indeedi Mar 27 12:20:21 NumberPicker and DatePicker have huge margins/padding (?), but I cannot seem to change that with just android:paddingTop and so on. Is there a trick? Mar 27 12:21:00 s/cannot seem to/seem to be unable to/ Mar 27 12:21:46 and by adding does that mean, I need to add: implements OnClickListener and then implement the onclick method? Mar 27 12:22:25 well you can do that if you want that class to extend onclick Mar 27 12:22:37 or you can just create an new onClickListener object Mar 27 12:23:09 and register it to the image view? Mar 27 12:23:12 Hello! When i must use service instead of just a jav thread? Mar 27 12:23:17 *java thread Mar 27 12:23:25 service doesn't replace threads Mar 27 12:23:31 You still have to use threads in services Mar 27 12:24:46 Ok. I'll try to implement OnClickListener first... and use a switch Mar 27 12:24:52 brb Mar 27 12:25:11 why do I get EADDRINUSE with my client socket even though I closed it before opening again? Mar 27 12:25:21 j pznoordoost Mar 27 12:28:35 Still not working :( Mar 27 12:28:44 it should be working.... Mar 27 12:28:57 SimonVT: i understand. But if i don't need IPC why it is can be useful for me user service when i can use just thread? Mar 27 12:29:13 *use service Mar 27 12:29:24 an operation not tied to app life Mar 27 12:29:37 like sync db online Mar 27 12:30:21 google states using it for things that do not have to have a UI Mar 27 12:30:32 but you may need to finish or that you want to continue Mar 27 12:30:37 like playing audo Mar 27 12:30:39 audio* Mar 27 12:30:40 If you see no advantage to using a service, then don't use it Mar 27 12:32:25 I've got a WebView and I load data via myWebView.loadData(myHTMLContent_String, "text/html", "UTF-8"), but still web there are non-ascii characters (i.e. ♥ (ALT+3 on Windows)), strange characters appear. How can I avoid this? Mar 27 12:32:57 Html.escapeHtml is not an option as it requires an API too high Mar 27 12:33:10 maybe you're missing fonts... Mar 27 12:33:22 I'm using system's Droid Mar 27 12:33:32 g'day Mar 27 12:33:41 there are also other examples, let me track them down Mar 27 12:34:14 Quick question - I am getting an extremely weird error and google doesn't have anything on it, perhaps someone here experienced something similar Mar 27 12:34:38 I set a bitmap to an imageview in a fragment, but from time to time, despite there being nothing wrong in the logcat, the bitmap just wouldn't show Mar 27 12:34:55 the logcat was clean... until the moment I swipe off that fragment (viewpager) Mar 27 12:35:04 then I get a single line in the logcat saying Unable to decode stream: java.lang.NullPointerException Mar 27 12:35:10 "Lately I've been getting ..." -> "Lately i’ve been getting ..." Mar 27 12:36:02 Tee_Pee: what is "extremely weird error" ? Mar 27 12:36:15 Well, that. Mar 27 12:36:25 what a nullPointer to a steam ? Mar 27 12:36:45 Tee_Pee: Null pointer exception, you should see in the code where this error is and analyze the variables history to detect possible null pointers Mar 27 12:36:49 There is no stream, and the error doesn't have any specific origin, bitmapfactory throws it. Mar 27 12:37:00 I have nullchecks for every possible variable Mar 27 12:37:03 none of them trigger Mar 27 12:37:12 Hi, I was wondering, what would be the best practice for doing runtime layout replacements, for example, I want to change one part of my layout to a different one based on user input, I've implemented the layouts in seperate xml files, but i'm not sure what would be the best way to include them, any suggestions ? :) Mar 27 12:37:12 hold on, here's the code for setting the bitmap Mar 27 12:37:38 StingRay, I implemented the onClick method using a switch but it still isnt doing anything when I click on the images... any ideas what Im doing wrong? Mar 27 12:37:46 Tee_Pee: one-line error? are you sure you're not try - catching and showing only the exception title? Mar 27 12:37:48 I have this AppWidgetProvider that creates multiple instances of my widget and I set different values for the widget button. Each instance of the widget is different when created, but if I reboot the device they all get the same value as the last one made. http://pastebin.com/xT4UH1NS Mar 27 12:37:50 http://pastebin.com/ZFxuxz1c Mar 27 12:37:51 Any ideas? :) Mar 27 12:37:54 Yes elegos, sure. Mar 27 12:38:14 There's the code, it all goes through smoothly, up to the "Don with setting the bitmap" log. Mar 27 12:38:27 The NPE line only shows when I swipe away from that fragment Mar 27 12:39:11 Tee_Pee: setBitmap... I suppose you load contents separately, right? From my experience, sometimes Android just misses the instructions. I resolved in a similar case using a timed method (using the Timer class), delaying the action by 500 ms Mar 27 12:39:33 I just realized Mar 27 12:40:10 that just above the Done with setting the bitmap line there's code to hide the loader Mar 27 12:40:17 and the loader isn't hidden... Mar 27 12:40:21 so something DOES go wrong before that Mar 27 12:41:50 here is the widget configure activity if that helps: http://pastebin.com/45tcPJSM Mar 27 12:44:20 Can someone point me in the right direction on how to implement an onClickListener in a ViewPager ? All I want is to click on the image itself so it makes a sound... :) Mar 27 12:48:24 vangi__: have you been though the tutorials on d.android.com ? Mar 27 12:48:57 if yes, paste bin the fragment code Mar 27 12:49:08 if no, then you should :) Mar 27 12:50:42 heh i just now started to read http://developer.android.com/guide/components/fragments.html#EventCallbacks Mar 27 12:50:55 how can i put dinamically textViews in a raw? Mar 27 12:52:11 I hope they got some info there. Ill also pastebin my code... maybe Im totally off :) Mar 27 12:52:12 http://pastebin.com/YjDda0CV Mar 27 12:52:37 that is the code for the Fragment class Mar 27 12:53:07 and where do you set your listener ? Mar 27 12:53:10 maybe you can see something that is totally off.. meanwhile I'll try the d.android.com Mar 27 12:53:35 I think in MainActivity Mar 27 12:53:59 ohh im not sure actually Mar 27 12:53:59 yeah you need to go though the tutorials Mar 27 12:54:37 v.getId() gets the generated R reference int Mar 27 12:54:48 not a 0,1,2,3 etc Mar 27 12:55:15 so A) you don't set a listener Mar 27 12:55:35 b ) the onlclick switch case is wrong Mar 27 12:55:54 :-/ Mar 27 12:56:08 I would go though the tutorials a bit Mar 27 12:56:28 yeah... i understand... Mar 27 12:56:37 alright ill try the tutorials first... Mar 27 12:57:05 myView.setOnclickListener(this) is what you need Mar 27 12:57:15 this being the class as it extends onClick Mar 27 12:57:32 the method on click with v.getId() will return something like 2587692 Mar 27 12:57:47 you do a case with the resource name ref Mar 27 12:57:52 R.id.mybutton Mar 27 12:58:03 that also points to the 2587692 Mar 27 12:58:17 but go though the tuts, they will help Mar 27 13:00:32 yeah Ill fix the code and read that tutorial.. thank you.. you got me on the right track!! :) Mar 27 13:00:38 brb... got some reading to do Mar 27 13:33:49 hello,what is the best approach to draw a rounded layout, cliping it's children? Mar 27 13:35:05 seems to me that the best solution is extend the layout, disable hardware acceleration and clip the canvas on dispatchDraw. But i'm looking for a more efficient solution Mar 27 13:36:54 so what I got from this tutorial is that you just get a bunch of automatically generated code? which is not what i wanted but also they don't explain how you'd connect an existing project? :S http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-android/#header-3 Mar 27 13:42:54 paulovap: Clipping the children makes this tricky, that's for sure. I'm not sure offhand. Mar 27 13:44:51 How can I set an ActionView to be expanded by default when using AcitonBarSherlock Mar 27 13:44:54 ? Mar 27 13:45:27 I have this AppWidgetProvider that creates multiple instances of my widget (which is really just a button) and I set different values for the widget button. Each instance of the widget is different when created, but if I reboot the device they all get the same value as the last one made. Any ideas? http://pastebin.com/xT4UH1NS Here is the widget configure activity if that helps: http://pastebin.com/45tcPJSM Mar 27 13:47:19 Where are you saving the configuration Mar 27 13:47:51 there is setActivated and callOnClick, but both of them complain that they are not in the minSDK Mar 27 13:49:27 morning Mar 27 13:49:55 I think I found it: menu.findItem(R.id.action_search).expandActionView(); Mar 27 13:49:59 SimonVT: save how? Mar 27 13:49:59 hey kaneda^ Mar 27 13:50:03 sup Ankhwatcher Mar 27 13:50:30 kaneda^: was completely useless all morning because I was tired Mar 27 13:50:33 SimonVT: I store sharedPreferences at line 53 Mar 27 13:50:38 * kaneda^ is drinking coffee now Mar 27 13:50:48 kaneda^: brain has started working and forward motion is being achieved. Mar 27 13:51:03 :D Mar 27 13:53:21 my project now has a menudrawer thanks to SimonVT, although I think I've balls'd it up somewhat Mar 27 13:54:34 Quacked: You get a string from preferences on line 53, you don't save any Mar 27 13:55:17 so what I got from this tutorial is that you just get a bunch of automatically generated code? which is not what i wanted but also they don't explain how you'd connect an existing project? :S http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-android/#header-3 Mar 27 13:55:31 is it possible to use sp values in a WebView's CSS? Mar 27 13:56:37 SimonVT: so sorry, I have another Activity that picks values from a NumberPicker: http://pastebin.com/g3c1kdBq Method at Line 64 here stores the values Mar 27 13:58:19 coco89: you know your just putting question marks at the end of statements right ? lol Mar 27 13:58:27 lol :P Mar 27 13:58:33 coco89: which i think is a bit odd ? Mar 27 13:58:37 hehehe Mar 27 13:58:38 I think you need to check what you're actually saving in your preferences Mar 27 13:59:33 StingRay_: I'm questioning as in 'Really?' This is what you guys recommended to me yesterday? :D Mar 27 13:59:44 SimonVT: I store Strings like appWidgetId+"30m" Mar 27 14:00:14 StingRay_: I want to do a login page, can I do it with a local database? Mar 27 14:00:18 lov: i'm very disappointed that such simple task is so hard to acomplish on android.. Mar 27 14:00:23 SimonVT: but good tip maybe, I must think a bit Mar 27 14:00:32 coco89: local ? Mar 27 14:00:50 StingRay_: Yeah, as in not on a server Mar 27 14:00:52 device local ? pan local ? local shop local ? Mar 27 14:01:00 local pub local Mar 27 14:01:01 coco89, are you asking if you can store all your users' usernames/passwords in one database on every device? Mar 27 14:01:02 pan = lan* Mar 27 14:01:04 You set all kinds of buttons in your configuration activity, but only one in your appwidgetprovider Mar 27 14:01:14 Might also want to look into that Mar 27 14:01:22 canadiancow: yeah I guess Mar 27 14:01:29 sqlite then Mar 27 14:01:30 SimonVT: yeah, I know, its because I initially had (and will have) another widget layout with 4 buttons Mar 27 14:01:40 but thats a bit odd Mar 27 14:01:54 sqlite? And the database would be on the device? Mar 27 14:02:02 yeah Mar 27 14:02:31 coco89: have a read http://developer.android.com/guide/topics/data/data-storage.html Mar 27 14:03:27 StingRay_: nope, not yet Mar 27 14:03:45 StingRay_: Ideally, I wanted a remote database but Mar 27 14:03:52 apparently that's hard? Mar 27 14:04:47 Alright. I made some progress. Now the onClick does work, but still there's a problem. It keeps going to the default switch case. Doesnt matter which image I click on... the v.getID() always returns the same number which doesnt corolate to any resource in the switch case.... Mar 27 14:05:26 any idea why? Mar 27 14:05:40 coco89: not really Mar 27 14:05:48 I'm not a programmer and I have that Mar 27 14:06:21 i know 0% php and I wrote a web link to mysql Mar 27 14:06:52 StingRay_: Really? I know PHP and mySQL Mar 27 14:07:10 StingRay_: I know nothing about web services and that though Mar 27 14:07:22 huh ? Mar 27 14:07:40 StingRay_: huh? Mar 27 14:07:42 PHP + mySQL are the web service Mar 27 14:08:01 Oh, I meant JSON Mar 27 14:08:05 And REST sorry Mar 27 14:08:19 well learn then Mar 27 14:08:20 :) Mar 27 14:08:25 StingRay_: Is this doable in a week do you think? Mar 27 14:08:32 in a few hours Mar 27 14:08:32 StingRay_: Are there any good guides for beginners? Mar 27 14:08:42 StingRay_: Challenge accepted./ Mar 27 14:08:53 (prepare to be bombarded with questions though) :P Mar 27 14:08:55 jk Mar 27 14:09:15 paulovap: whenever someone says that, I'm usually inclined to think that they're trying as hard as they can to ignore relevant styles and trends, and just make an iOS clone, or write Android apps as if they were for iOS. Mar 27 14:09:22 usually, because it's true. Mar 27 14:10:14 paulovap: you can probably have your custom viewgroup pass a custom canvas onto which its children can draw, which you can apply a mask to, and then you can draw that to the actual canvas. Mar 27 14:10:25 SimonVT: the values stored looks ok actually Mar 27 14:10:49 that said, you're probably going to not at all look like the rest of the device, or even android in general, and this is typically going to make your app stick out like a sore thumb instead of feeling like a natural experience. Mar 27 14:10:50 Then the issue is probably your provider Mar 27 14:11:02 StingRay_: where do I start? Mar 27 14:11:10 the begining Mar 27 14:11:20 SimonVT: also, if I build the app through eclipse, all the previous widgets get the same value as the latest one created Mar 27 14:11:25 in particular, you should note that the holo theme explicitly expects square corners from dialogs, etc. Mar 27 14:11:25 any good library for http connections? Mar 27 14:11:28 or rather … I would... Mar 27 14:11:36 kamol: HttpURLConnection. Mar 27 14:11:54 :lov Mar 27 14:12:02 SimonVT: so running the app from eclipse does the same to the existing widgets as rebooting the device Mar 27 14:12:04 "learn about async" "learn about loading a webpage, just data" , " learn about json" Mar 27 14:12:07 StingRay_: Sure but what guides do I look at. Atm, I've only got guides for Sqlite local database Mar 27 14:12:25 StingRay_: Okay, that's 3 days :d Mar 27 14:12:27 haha Mar 27 14:12:33 :lov tried it, but a bit complicated for me, want some samples if possible? Mar 27 14:12:37 async about 30 minutes Mar 27 14:12:47 http object in android about 15 min Mar 27 14:12:55 json about 5 Mar 27 14:13:01 testing about 10 Mar 27 14:13:15 toilet breaks about 15 Mar 27 14:13:20 haha Mar 27 14:13:22 doing nothing about 5 Mar 27 14:13:23 haha Mar 27 14:13:25 how can I determine which local socket port my HttpURLConnection uses? Mar 27 14:13:46 so few hours and your good Mar 27 14:13:58 StingRay_: Okay, challenge accepted. Now just to find some good guides Mar 27 14:14:11 Hi , my emulator is using 100% cpu, I am running it under ubuntu linux.help? Mar 27 14:14:27 Sweet thanks StingRay_ for believing in me heh. I'm giong to attempt this after lunch Mar 27 14:14:36 See you in a bit! Mar 27 14:14:52 i neither believe or disbelieve you, so no pressure Mar 27 14:14:56 :) Mar 27 14:15:13 IIRC there's full JSON tutorials online Mar 27 14:15:13 vogella had it I believe Mar 27 14:15:14 and just take it easy, one step at a time Mar 27 14:15:15 poee: installed the KVM qemu optimalisation? Mar 27 14:15:16 for sure lol Mar 27 14:15:28 belgianguy: thanks Mar 27 14:15:33 no belgianguy . Mar 27 14:15:34 cause if your wanting secure stuff, then thats different Mar 27 14:15:44 does that solve the issue? Mar 27 14:15:50 belgianguy: i didn't know about vogella looks good! Mar 27 14:16:03 poee: do you have an Intel processor? Mar 27 14:16:10 yes belgianguy Mar 27 14:16:16 poee: http://software.intel.com/en-us/blogs/2012/03/12/how-to-start-intel-hardware-assisted-virtualization-hypervisor-on-linux-to-speed-up-intel-android-x86-gingerbread-emulator Mar 27 14:16:34 it works for all android versions afaik Mar 27 14:17:42 okay thanks belgianguy , I ll install it and try Mar 27 14:18:03 poee: I don't know if that solves the issue, but it's worth a try Mar 27 14:18:22 hmmm okay Mar 27 14:19:10 lov: it's a simple custom rounded view, it has nothing to do with iphone or something, since IOS does not invented rounded things..i just think that should not be that hard to acomplish. Of course android have some style guidelines, but it's not mandatory..i think that kind of tought cripples creativity. Just my thinking Mar 27 14:20:44 is it possible to change a ViewStub layout after it was inflated ? Mar 27 14:21:44 ntcase2: i don't think so, the ViewStub should be replaced after inflation Mar 27 14:22:08 ntcase2: unless you mean change its contents? Mar 27 14:22:55 paulovap: You are, of course, welcome to do whatever your want, and it's possible that users will like it. Mar 27 14:22:58 jjnye yeha, I want to load a different layout inside it Mar 27 14:23:01 oh he's left Mar 27 14:23:09 eh, there's the clip methods for canvas but w/e screw him ^_^ Mar 27 14:23:22 lol Mar 27 14:24:09 I don't think the clip methods allow rounded corners tho Mar 27 14:24:11 jjnye, my problem is that I want to change position of many items in the layout when the user starts typing, so I seperated the different options into different seperate layouts and I want to load each on runtime (each of them have the same elements inside them with the same id's) Mar 27 14:24:28 Probably gotta play around with some drawing to bitmaps, applying some masks, etc Mar 27 14:24:30 All that shit Mar 27 14:24:36 I though viewstub would be the way to go, but it seems like I cant 'reinflate' it Mar 27 14:24:48 I thought* Mar 27 14:24:58 ntcase2: yeah, viewstubs are a one-shot thing. Mar 27 14:25:07 any suggestions ? :) Mar 27 14:26:42 Once a viewstub is inflated it's removed from the view hierarchy Mar 27 14:27:14 thanks :) Mar 27 14:27:17 ntcase2: i'm sort of having trouble wrapping my head around what it is that's happening with the UI, but the naive solution would just to remove the ViewGroup you want to change and inflate a new one with the desired configuration Mar 27 14:28:17 lets say I have a layout, visually speaking it is seperated into two parts (upper/lower) user types in lower part fields, and I want to change the upper layout according to its text Mar 27 14:28:56 there are 5 options, that can constantly switch between them, and one default Mar 27 14:29:09 SimonVT: Possibly. I'd assume that you can just set it by path, or create some sort of custom "rounded corners" Region class. Mar 27 14:29:26 I was looking for appropriate 'mask' methods but didn't see anything too easy/useful. Mar 27 14:29:35 ntcase2: you mean 5 possible configurations for the upper view? Mar 27 14:30:03 yes Mar 27 14:31:20 ntcase2: how different are the configurations? could you accomplish what you need by showing/hiding elements? Mar 27 14:31:21 lov: Ah, a Path could probably do it Mar 27 14:31:43 jjnye, they all have same elements, with different positions Mar 27 14:32:19 I thought of changing using code, but it seems like bad practice Mar 27 14:32:43 SimonVT: in onUpdate() in the provider and under "for (int appWidgetId : appWidgetIds) {" I have "remoteViews.setTextViewText(R.id.widgetButton1, sharedPrefs.getString(appWidgetId +"widgetButton1", "1m"));". Could that be a problem? That the appWidgetId of all the widget instances becomes the same for a second when the text is set perhaps? Mar 27 14:33:03 ntcase2: it might be more efficient… Mar 27 14:33:47 Quacked: Nope Mar 27 14:33:52 ntcase2: you could also inflate each configuration at the start and swap them out as necessary, which helps address the cost of inflating on the fly Mar 27 14:34:03 jjnye well.. maybe but it also sounds like a lot of code and like a messy solution Mar 27 14:34:21 That you use the same RemoteViews instance for all your appwidgets might be an issue Mar 27 14:34:28 jjnye so you suggest 5 different viewstubs each holding the right template and switching between them using visibility ? Mar 27 14:34:52 jjnye but wouldnt there be conflicts with the identical id's of the elements ? Mar 27 14:36:07 ntcase2: you don't want viewstubs at all for this solution. their use case is when you *might* need to inject something into a layout and, when you do, you won't be changing it too much Mar 27 14:36:20 oh Mar 27 14:36:46 jjnye I see... so what would be the appropriate solution to use as a container for each layout ? Mar 27 14:38:20 SimonVT: I moved the "remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget_small);" into the for each loop, but it didnt help Mar 27 14:39:24 hi :) Mar 27 14:39:27 ntcase2: i would either modify the position of each view (no swapping, but tricky) or use a container and swap layouts (easier, but you would need to update view references) Mar 27 14:39:52 jjnye what would you use as a container ? :) Mar 27 14:40:13 a plain LinearLayout or something similar ? Mar 27 14:40:16 ntcase2: FrameLayout is pretty lightweight Mar 27 14:40:28 hi Mar 27 14:40:56 ntcase2: but yeah, if you just have the one child (the viewgroup you're swapping) you can't really go wrong Mar 27 14:43:01 does anyone have any good resource / guide on how to properly initialize video recording on 2.3? Mar 27 14:43:30 I can't seem to find any APIs to get supported video recording parameters Mar 27 14:44:13 SimonVT: found out that on reboot/rebuild of app sets all appWidgetIds to the same value (the highest appWidgetId) Mar 27 14:44:52 I kind of doubt that Mar 27 14:44:58 That would cause a lot of breaking Mar 27 14:45:43 let me double check Mar 27 14:47:11 I can confidently say that your app is unique in that regard Mar 27 14:47:30 yeah, I meant that I had done something awful that would have made it so :P Mar 27 14:48:47 but it wasnt, it was the appWidgetId getAction that was the same Mar 27 14:49:02 active.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId); PendingIntent actionPendingIntent = PendingIntent.getBroadcast(context, appWidgetId, active, 0); Mar 27 14:50:09 when I get that extra after a reboot/rebuild, it always returns the appWidgetId with the highest number Mar 27 14:50:26 PendingIntent missing a flag or something? Mar 27 14:50:55 thanks jjnye, i'll give it a shot with the framelayout :) Mar 27 14:50:58 much appreciated ! Mar 27 14:51:10 ntcase2: happy hacking! :) Mar 27 14:51:16 :) Mar 27 14:52:24 how can i force eclipse adt to re-index? Mar 27 14:52:33 it's an option per-project in regular eclipse Mar 27 14:53:17 i guess i can add a lib and taht will ask if i want to re-index :/ Mar 27 14:53:46 jjnye : seems like a nice solution, just need to reconfigure all references, but it works like a charm :) Mar 27 14:53:47 thanks ! Mar 27 14:54:24 i can make it index everything by changing the workspace idnex settings, but making project specific settings doesnt force a re-index Mar 27 14:54:33 i think i'm gonna submit something under the wishlist for that Mar 27 14:55:36 SimonVT: any thoughts on that? Mar 27 14:56:30 ntcase2: nice, glad it's working! Mar 27 14:56:53 like a charm I must say :) Mar 27 14:56:56 thank you x 100 :) Mar 27 14:57:21 yolo Mar 27 14:57:52 that was my co-worker… he does iOS Mar 27 14:58:17 jjnye, pathetic on two counts then ;) Mar 27 14:59:13 hmm, do you think it's considered a bug or a feature request to have project-specific indexing? Mar 27 14:59:31 kaneda^: haha he's actually my best buddy but, yeah, we have "ideological exchanges" sometimes Mar 27 14:59:55 yolo is something ghetto 13 year olds say, i would find it hard to have proper discourse with such a person Mar 27 15:00:27 Hi Mar 27 15:00:49 kaneda^: just tell them hindus dont agree with them Mar 27 15:01:03 kaneda^: i'm pretty sure he was being ironic Mar 27 15:01:14 Quacked, true taht Mar 27 15:01:26 jjnye, i'm pretty sure you dont know what ironic means Mar 27 15:02:04 I'm developing an application which has a similar function to Google Plus where it will download a json list view of data, one of which is images. Mar 27 15:02:17 Is it better to add this data to a local database, or just access the json feed? Mar 27 15:02:53 kaneda^: rephrase? uh… "he was joking" Mar 27 15:03:12 it's ironic that it's not at all funny, but i doubt he was shooting for that Mar 27 15:03:59 no accounting for taste, i s'pose Mar 27 15:04:29 indeed Mar 27 15:10:46 SimonVT: think I found out that the problem is that I set actionPendingIntent on R.id.widgetButton1, and that id is the same for all instances of the widget Mar 27 15:10:53 remoteViews.setOnClickPendingIntent(R.id.widgetButton1, actionPendingIntent); Mar 27 15:11:53 Doubtful, but if it works :) Mar 27 15:12:37 I did a System.out.println(R.id.widgetButton1); in the loop, and R.id.widgetButton1 is the same Mar 27 15:12:46 Well of course it is Mar 27 15:12:48 It's static final Mar 27 15:13:06 yeah Mar 27 15:13:31 But that's not what's causing your issues Mar 27 15:13:39 Or if it is, you really fucked up somewhere Mar 27 15:14:37 crap Mar 27 15:14:42 I really thought that was it Mar 27 15:16:14 Hi, the plain old library topic again: Is there any way I can use a library which uses parts of the sun.* classes in my project without bloating it by 10MB? (Apart from proguard) Do I have to copy each class by hand, and copy all referenced class by hand (I tried, this get really big)? Mar 27 15:17:18 er.... what? Mar 27 15:17:58 A) you PROBABLY don't want to reference sun.* classes. B) You can copy each class (or at least the general class API), yes. Mar 27 15:18:18 C) You PROBABLY don't want to reference sun.* classes. Mar 27 15:18:35 how can i finish my application with a menu item? Mar 27 15:18:49 i put finish() but i have some tasks in other threads Mar 27 15:19:00 Android apps don't have quit buttons Mar 27 15:19:00 lov, the problem is that the library uses sun classes. Mar 27 15:19:16 Sorry, good android apps don't have quit buttons Mar 27 15:20:07 SimonVT: I've had to implement them on some which use background services heavily, but those are usually in moderately esoteric data logging functions Mar 27 15:20:21 joker_89: How about setting the other threads to daemon threads? (Apart from the fact I agree with SimonVT) Mar 27 15:20:25 SimonVT: when you need to let them explicitly kill the background function Mar 27 15:21:15 joker_89: And you can also always call System.exit(0); Mar 27 15:21:27 That might be a bad way, but it works Mar 27 15:21:28 this stops all threads? Mar 27 15:21:33 I love the "hold back to kill process" on custom roms Mar 27 15:21:34 is a async thread Mar 27 15:21:44 Depending on the app, sounds like a "stop" button would suffice :p Mar 27 15:21:47 when stupid apps dont respond Mar 27 15:22:08 SimonVT: yeah basically; for me I implement it as 'quit' because there's no point in having the frontend w/out the data collection backend Mar 27 15:22:32 SimonVT: I could probably respin the frontend to never quit and control the backend that way, but honestly my user counts are pretty minimal Mar 27 15:22:40 well i want to finish my asynctask Mar 27 15:22:50 SimonVT: 90% of my shit requires custom hardware anyhow Mar 27 15:23:20 Exception to the rule, etc Mar 27 15:23:41 In 99.99% of the cases, the answer is just "don't" Mar 27 15:23:46 SimonVT: agreed Mar 27 15:25:23 joker_89: if you insist on hving a finish() exit function, you need to collect all your threads then finish when they've all returned Mar 27 15:26:16 i read about the isCancelled() Mar 27 15:26:16 Ahh solved it... it works now. Thanks for the help StingRay Mar 27 15:26:22 for AsyncTasks Mar 27 15:26:24 joker_89: there isn't a magic "clean up my mess cleanly then go away". As others have said, in general, you're not meant to explicitly exit under the android model at all; you might reconsider if you really need that function. Mar 27 15:27:23 in general android will kill you off if it needs your resources Mar 27 15:27:27 i want to run a service if no especify quit Mar 27 15:29:21 SimonVT: haha.. I found the issue.. "appWidgetManager.updateAppWidget(appWidgetIds, remoteViews);" appWidgetIds was in plural instead of appWidgetId Mar 27 15:29:40 That'll do it Mar 27 15:29:56 thanks for telling me what was NOT wrong Mar 27 15:30:04 so I didnt spend hours trying to fix unbroken things :) Mar 27 15:30:14 lov: What should I do instead, when I may not reference sun classes? Mar 27 15:32:52 i have a AsynTask wiich calls a class that do a loop. i want to use the isCancelled but i want to use this function in the other class wich have the loop Mar 27 15:32:56 how can i do this? Mar 27 15:40:29 ello im trying add an icon to the action bar via a list fragment class which is part of a fragment activity class, but it fails me :( Mar 27 15:40:31 http://pastebin.com/6ccC4Mew Mar 27 15:46:39 or are you failing action bar and list fragment ? Mar 27 15:46:48 ap Mar 27 15:46:55 ... sorry Mar 27 15:47:01 hi everyone Mar 27 15:47:06 yo Mar 27 15:47:52 do Services exist in the same thread/proccess of activities and their tasks? Mar 27 15:48:01 To play a short sound of 3-5 seconds, is it prefarble to use a SoundPool or a MediaPlayer? Mar 27 15:48:26 I mean, a force close on a service (or activity) would kill both of them if are part of the same app? Mar 27 15:50:42 Zuarko: yes Mar 27 15:50:45 well Mar 27 15:51:06 I think that settings will allow you to stop services for an application w/o killing it Mar 27 15:51:21 but yes they're in the same process, so force killing the process kills all, unless the users architected it otherwise Mar 27 15:56:03 and the android:process attribute may spawn the service in a different process avoiding the force kill everything in the app running? Mar 27 15:58:58 "probably" Mar 27 15:59:05 try it and see. Mar 27 16:00:05 thanks :) Mar 27 16:04:57 StingRay_: im failing being to add an icon to the action bar from a ListFragment Mar 27 16:05:22 im basically trying to switch to another menu xml Mar 27 16:06:30 well i don't use either Mar 27 16:06:37 listFragment or actionbar Mar 27 16:10:10 but how are you failing Mar 27 16:10:21 cause if you don't say, no1 can really help Mar 27 16:10:28 riccoski: Mar 27 16:12:00 no errors or crashes, it's just not changing the menu Mar 27 16:18:10 hm i Think i may need to do it on tab click Mar 27 16:18:36 anyone know how to add icons to menuitems on an actionbar's soverflow menu, or if youre supposed to or not? Mar 27 16:20:11 pretty sure you're not supposed to Mar 27 16:20:13 You're not supposed to Mar 27 16:20:23 thanks for that Mar 27 16:20:28 It's possible in a horribly broken way, but you're not supposed to Mar 27 16:20:31 as usual cloning os Mar 27 16:20:34 ios ;/ Mar 27 16:20:36 interesting Mar 27 16:20:50 altho this design sorta looks quite androidy, clients are slowing swaying over but theyre still stuck between them Mar 27 16:21:39 hmm, i find most clients think in terms of iPhone unfortunately Mar 27 16:22:43 how can I reduce the time when ConnectException is thrown after unsuccessful TCP socket connection? Mar 27 16:23:06 SimonVT: What about using SubMenu? Mar 27 16:23:15 mystiiq, urlConnection.setConnectTimeout(1000); Mar 27 16:23:23 that's 1 second = 1000 ms Mar 27 16:23:44 kaneda^: I am using Socket instance Mar 27 16:24:04 because I need to specify local port Mar 27 16:24:31 Gaz`: http://stackoverflow.com/questions/9344160/how-to-add-submenu-items-to-actionbar-action-in-code Mot the overflow, but at least something. Mar 27 16:25:08 mystiiq, do you have HttpParams or something? Mar 27 16:25:16 thanks kakazza, that might be good enough! if the client enforce it that is.. Mar 27 16:25:40 mystiiq, oh, it's in the connect line Mar 27 16:25:45 Socket s = new Socket(); s.connect(new InetSocketAddress(my_hostName, my_port), 90000); Mar 27 16:25:59 where 90000 = 90 seconds Mar 27 16:27:36 kaneda^: aah thanks, missed that one in the docs Mar 27 16:27:46 np Mar 27 16:39:51 for destroy a thread, i need to use th.destroy() in my onDestroy() ? Mar 27 16:40:22 destroy() has been deprecated for a long time Mar 27 16:40:23 so, no Mar 27 16:40:32 erm, are you doing pure threading in android?? Mar 27 16:40:42 shouldnt you use an asynctask or another executor? Mar 27 16:40:55 actually, it looks like destroy() was never implemented, so feel free to use it :) Mar 27 16:41:03 evanc, ^^ Mar 27 16:41:06 kakazza hey that worked beautifully, thanks :-) Mar 27 16:41:15 mm is a thread that read always a file and simulate a GPS Mar 27 16:41:27 and when i exit the app i like to destroy this thread Mar 27 16:41:29 or finish Mar 27 16:41:50 joker_89: like 479 here: https://android.googlesource.com/platform/libcore/+/master/luni/src/main/java/java/lang/Thread.java Mar 27 16:41:53 i see Mar 27 16:42:04 perhaps i need a Service? Mar 27 16:42:33 joker_89: just have the thread terminate normally (while (!mIsCancelled) { readFile(); }) Mar 27 16:43:03 Hi, How can i read all the SMS messages from the inbox one by one and delete it programically? Mar 27 16:43:33 isCancelled is for AsyncTasks not? Mar 27 16:43:41 isn't it Mar 27 16:44:31 joker_89: where did I say to use isCancelled() ? Mar 27 16:44:53 mIsCancelled Mar 27 16:45:13 how is that isCancelled()? Mar 27 16:45:59 mIsCancelled exist? Mar 27 16:48:05 it is once you make it Mar 27 16:48:16 Hey guys. Have a question on facebook login. It works ok on other device but not on my JB device. The setting on facebook app dashboard seems correct. Any other cause for this? Mar 27 16:48:33 fairuz: are you talking about the facebook SDK? You might want to ask facebook. Mar 27 16:49:39 lov: Yes, just wondering if there is someone here face the same problem. Mar 27 16:51:29 fairuz, my advise would be, don't use facebook Mar 27 16:51:36 i'm sure i'm ahead of my time in saying this, but it's only a matter of time ;p Mar 27 16:55:30 heh Mar 27 17:00:49 hi I am getting 100% cpu usage on android emulator. Can anyone please help me fix it? Mar 27 17:01:28 poee, how can anyone answer that Mar 27 17:01:29 the process emulator-arm is using 100% cpu Mar 27 17:02:14 Xabster, I googled for it and tried a few fixes but nothing works Mar 27 17:02:23 emu will always suck Mar 27 17:02:28 best use a real device Mar 27 17:02:49 it was alright a couple of days ago Mar 27 17:05:04 i tried removing all apps i installed recently Mar 27 17:05:07 but no luck Mar 27 17:06:35 how do I check which app is using the memory? Mar 27 17:06:38 I mean cpu Mar 27 17:07:19 when you say "cpu" do you mean your actual hardware's CPU, or do you mean what the emulator is reporting? Mar 27 17:07:39 "removing apps" probably won't solve the problem. It's likely that you just have anemic hardware :( Mar 27 17:07:58 my actual hardware cpu Mar 27 17:08:18 and well, it was working with low cpu usage a couple of days ago Mar 27 17:08:25 working splendidly Mar 27 17:09:10 * lov shrugs Mar 27 17:09:17 use logcat, see if something is screaming. Alternately, adb shell top. Mar 27 17:10:23 lov : 38 96% R 1 856K 364K fg root /system/bin/qemud Mar 27 17:11:28 what is /system/bin/qemud? Mar 27 17:13:27 looks like it's your problem :> Mar 27 17:14:08 This is a bit of a newbie java question but oh well. How do I get the ids array accessible to line 10 and down here? http://pastebin.com/jEBfbQuJ Mar 27 17:14:29 i need a persisted queue. do i need to roll my own is there one already available ? Mar 27 17:14:41 Quacked: declare it before the if/else Mar 27 17:15:03 int[] ids; if (isMedium) { ids = ...; } else { ids = ...; } Mar 27 17:15:05 lov, my problem? Mar 27 17:15:31 evanc, thats what I tried, but I get "Array constants can only be used in initializers" Mar 27 17:15:48 uh... Mar 27 17:16:08 Quacked: er, what? Mar 27 17:16:09 wait. Array constants? Mar 27 17:16:17 Quacked: pastebin exactly what you tried Mar 27 17:17:03 poee: http://gitorious.org/0xdroid/external_qemu/blobs/3a0c4d9eed9ba76e2744258af212b8c1269a24a5/docs/ANDROID-QEMUD.TXT Mar 27 17:17:09 evanc: http://pastebin.com/biqu41Wq Mar 27 17:17:26 poee: I haven't a clue why that's causing you grief. Try restarting the emu, I guess. Mar 27 17:17:49 red lines under the right parts of "ids = {R.id..." and both say Array constants can only be used in initializers Mar 27 17:17:56 lov, tried restarting many times. No luck, thanks anyway Mar 27 17:18:54 poee: create a new AVD. iunno. Mar 27 17:19:19 Quacked: do ids = new int[] { ... } Mar 27 17:19:28 instead of the shorthand { .. } format Mar 27 17:19:41 ^^ Mar 27 17:21:16 thanks evanc, no errors at least :) Mar 27 17:23:07 worked :) Mar 27 17:25:30 is it safe to assume /mnt/sdcard exists or should I always use getExternalStorageDirectory()? Mar 27 17:27:17 always use Environment.getExternalStorageDirectory() Mar 27 17:27:19 it is not safe to assume /mnt/sdcard exists. Mar 27 17:27:24 Always use the Environment method calls. Mar 27 17:30:58 lov, when I go to settings display auto rotate off, the 100% cpu usage stops but the emulator hangs up Mar 27 17:35:25 Anyone in here use PocketCasts? I can't seem to get continous play working. Is there some trick to it? Mar 27 17:36:43 how can i stop a thread if in the run i execute a method of a class that have a loop inside? Mar 27 17:37:38 essentially, you don't. Mar 27 17:38:06 joker_89: you could change a value and .update the runnable Mar 27 17:38:51 update the runnable? Mar 27 17:38:56 i don't know how Mar 27 17:39:28 joker_89: http://pastebin.com/X9apf7Sn Mar 27 17:43:12 only do a wait() Mar 27 17:43:50 but in drawPlaces() i have a call to my other class that do a loop Mar 27 17:43:52 actually the notify is necissary because of the wait Mar 27 17:43:53 My widgets show up nicely on my device with 4.2.2 but nothing is shown on another device with 2.3.3. What could be wrong? Mar 27 17:44:55 joker_89: well it's a synchronized variable, so if you make the loop depend on it being true, the loop should end when you make it false Mar 27 17:45:07 here is the widget part of my manifest: http://pastebin.com/unzC7ugS Mar 27 17:45:53 but if my loop is in another class? Mar 27 17:46:13 drawPlaces() calls a method that loops forever Mar 27 17:47:25 Quacked: do you mean there's nothing in the widget picker or that they don't render? Mar 27 17:47:32 Nothing in the widget picker Mar 27 17:47:39 It shows up in my emulator for 2.3.3 though Mar 27 17:48:29 Quacked: what are your {small,medium}_dark_widget_provider.xml files looking like? Mar 27 17:48:50 joker_89: create a function you can call to kill the loop? Mar 27 17:49:00 Quacked: did you try rebooting the 2.3.3 device? Mar 27 17:49:33 yes ok Mar 27 17:49:35 joker_89: record a thread id in your main app and call some sort of kill thread against it? Mar 27 17:49:55 http://pastebin.com/4xTXMat0 Mar 27 17:50:25 I will try reboot when it gets home from the grocery store :D Mar 27 17:51:40 evanc: small is just with android:minWidth="40dp" and @layout/widget_small Mar 27 17:53:45 Hi. I can use the google-voice-recognition to write emails in my android phone. but when I don't have gprs or wifi, it does not work. is there any library/app/anything that could be used to recognize voice without network? Mar 27 17:53:58 Quacked: it looks like it should work; try the reboot and go from there :/ Mar 27 17:54:06 okidoke. thanks Mar 27 17:54:10 Ankhwatcher a thread method? Mar 27 17:54:40 pzn: the google one does offline recognition as of some later version, but aside from that, this isn't really the right channel to ask :) Mar 27 17:54:47 joker_89: I haven't tried it, but there probably is a way to kill a thread from java Mar 27 17:55:29 evanc, I just "gave an example" for writing mail... the real need is to "integrate" this in my app Mar 27 17:55:41 methods are depecrated Mar 27 17:58:01 joker_89: I think you really need to go do a bunch of reading on how to do threading Mar 27 17:58:22 you can't (well, shouldn't) just kill -9 a thread Mar 27 17:59:51 but how can stop the loop of the thread runs only a method of a class that have a loop inside? Mar 27 17:59:58 so the loop code is not inside the run() Mar 27 18:00:56 or i need to have the loop inside the run()? Mar 27 18:01:22 evanc: thanks for your help yesterday with the dialogfragment positive button issue i was having, finally implemented it today and it works great. Mar 27 18:01:30 Eppo: nice! :D Mar 27 18:03:39 is it not allowed to write to subdirectories in a data directory? Mar 27 18:03:59 I get a permission denied when writing anything but files in the data root Mar 27 18:04:05 if (pid == uid) { btnAction.setText("Edit profile"); } Mar 27 18:04:07 is that what the /files/ directory is for? Mar 27 18:04:31 this isn't changing the text of my button, anyone know why? log says pid and uid are both equal to 1 Mar 27 18:07:32 Overv: uh, what? Mar 27 18:07:42 Overv: you should only have permissions to your own app private subdirectory Mar 27 18:07:54 use the methods in Context to get references to the File objects for directories you should have access to. Mar 27 18:08:02 DO NOT HARDCODE PATHS IN YOUR CODE Mar 27 18:08:58 Hardcode paths, you say. Ok! Mar 27 18:09:06 :E Mar 27 18:09:53 i use interrup() but when i exit appears a notification Mar 27 18:13:32 np ive dopne it Mar 27 18:16:27 Hello, everyone. How do you disable a button but not have it change the way it looks. Normally when you disable a button it will change it's alpha or something and I want to stop that alpha change. Mar 27 18:16:48 The reason is that I'm actually going to be animating the buttons off screen but I don't want them to be clickable as they move. Mar 27 18:16:58 But I also don't want them to look any different. Mar 27 18:17:11 is it possible to load a drawable out of drawables-tvdpi when im on a non-tvdpi devices? Mar 27 18:18:00 jdawes: maybe you should try draw it manually and set the selector. Mar 27 18:19:43 I see that android has taglib, how can i access it directly? Mar 27 18:19:47 xviv: Thanks for the suggestion, I'm sorry I asked as I just found the answer. Button.setClickable(false) does the trick. Mar 27 18:20:54 okay :D Mar 27 18:21:01 evanc: widgets showed up after a reboot :) Mar 27 18:25:12 Guys, i'm working with HashMap and listView. What should i use to store the HashMap data? sqlite or xml file? Mar 27 18:25:26 Hi guys. If I have an apk. Can I know the hash key used to sign that app? I need to confirm if the key used to sign a particular app is the correct key. Mar 27 18:26:43 Hey guys Mar 27 18:26:49 What's the pros and cons of using a service for media playback? Mar 27 18:27:14 What are* Mar 27 18:27:25 hey guys, how about using JSON instead of defining arrays in xml is that possible? Mar 27 18:32:21 hi Mar 27 18:32:22 http://developer.android.com/tools/device.html#setting-up Mar 27 18:32:44 Here I have two times the same file named 51-android.rules and 51-android.rules. (with dot) Mar 27 18:32:50 Should it be with don or not ? Mar 27 18:33:14 bluesm: no Mar 27 18:33:24 There's a dot because it's the end of a sentence Mar 27 18:33:25 bluesm: without dot at the end. Mar 27 18:33:29 xviv: This is an error ? Mar 27 18:33:45 * xviv agree with SimonVT Mar 27 18:33:50 SimonVT: Oh. I see. But it's kinda misleading... :) Mar 27 18:33:58 SimonVT: Thank you very much :)) Mar 27 18:34:28 Should I report it or I'm just so silly ? Mar 27 18:35:07 You're just silly Mar 27 18:35:20 Or well, I guess it shouldn't be there Mar 27 18:39:48 I'm using ActionBarSherlock and I'd like to implement the Support Library version of Loader/LoaderManager. getLoaderManager() is API 11, and there is no getSupportLoaderManager() for SherlockActivity. How can I initLoader() in this case so I still have support of older hardware using the Support Library? Mar 27 18:40:34 SherlockActivity extends Activity, not FragmentActivity Mar 27 18:40:40 You want SherlockFragmentActivity Mar 27 18:41:44 So I'm going to have to rewrite it to make this a fragment then Mar 27 18:41:56 And write the wrapper Activity to load the fragment, etc Mar 27 18:41:57 No, FragmentActivity is still an Activity Mar 27 18:42:00 It's in the name Mar 27 18:44:52 Now I've got "The method initLoader(int, Bundle, LoaderManager.LoaderCallbacks) in the type LoaderManager is not applicable for the arguments (int, null, ExampleActivity)" Mar 27 18:45:06 And it implements LoaderManager.LoaderCallbacks Mar 27 18:45:36 Make sure you're using the support classes Mar 27 18:46:02 Ahhh it is indeed pointing to the wrong one Mar 27 18:46:08 lov: I was writing to my private data directory, but apparently the 'lib' subdirectory is reserved there Mar 27 18:52:23 Can I in easy way create "text" space that I could write in it ? Mar 27 18:52:29 Something like console. Mar 27 18:52:56 Afternoon all! Mar 27 18:54:34 Ugh, android is not making it easy to deal with trying to use UUIDs as ID columns Mar 27 18:55:25 Jouva: just do it as a second column Mar 27 18:55:38 Yeah I'm about to do that Mar 27 18:56:59 hi Mar 27 18:57:15 how do i get second item from array in xml Mar 27 18:57:16 R.array.radioNames Mar 27 18:57:28 R.array.radioNames[1] possible? Mar 27 18:57:31 getStringArray() Mar 27 18:57:49 R.array.radioNames is merely an int Mar 27 18:58:07 int[] array = Resources.getSystem().getIntArray(R.array.Array); Mar 27 18:58:20 why int? Mar 27 18:58:30 That was an example assuming they're all integers Mar 27 18:58:31 it's an id Mar 27 18:58:32 what ever your array is type of Mar 27 18:58:40 do i need to declare as string array? Mar 27 18:58:42 look at R.java Mar 27 18:58:43 (in xml) Mar 27 18:58:59 If it's Strings, declare it as Strings Mar 27 18:59:07 howto? Mar 27 18:59:13 Ummm again Mar 27 18:59:33 String[] stringArray = Resources.getSystem().getStringArray(R.array.radioNames); Mar 27 18:59:36 Something like that Mar 27 19:00:09 ugh Mar 27 19:00:27 Er, not getSystem.. Unless you want system resources Mar 27 19:00:38 Yeah sorry Mar 27 19:00:42 http://developer.android.com/guide/topics/resources/string-resource.html#StringArray Mar 27 19:00:44 http://developer.android.com/guide/topics/resources/string-resource.html Mar 27 19:00:48 lol Mar 27 19:01:14 BulleTime: Don't look at a single line as-is and think it's always what you might need. Adapt it to your needs. Generally if there's a "getTypeX" function (such as getInt), there's a "getTypeY" of another type (getLong, getString, etc) Mar 27 19:04:48 BulleTime: But yeah check out the StringArray link xorgate linked to and that will show some code Mar 27 19:05:05 yeah i need array-string Mar 27 19:05:38 i mean string-array :P Mar 27 19:05:51 Right Mar 27 19:06:40 So you getResources(); and you getStringArray() from the resources that you got and pass it R.array.radioNames Mar 27 19:06:54 And it'll return a String array Mar 27 19:07:31 Everything in R is just a number that refers to a specific resource, but isn't the resource itself Mar 27 19:16:30 BulleTime think of the Resources object as the thing that holds all your strings/ints/bitmaps and you ask it for a specific one, using an id (R.id.blah, R.string.something) Mar 27 19:17:06 yeah it works now Mar 27 19:17:09 thanks:) Mar 27 19:17:12 :) Mar 27 19:17:34 bbl Mar 27 19:17:58 i had a question in eclipse i get make class abstract as fix, what is abstract? Mar 27 19:18:10 is this a working fix? Mar 27 19:18:27 does the android kernel support cgroups ? Mar 27 19:18:40 BulleTime that you cannot instantiate it, but only subclasses of it.. look up on java abstract classes Mar 27 19:19:57 Anyone know how I can reset my in app purchase on my testing account so its as if i'm buying it for the first time? Mar 27 19:24:36 if I define a style, "MyTextStyle", and then want to be able to override that with different themes, what's the syntax to refer to that style in the theme for overriding? Mar 27 19:36:04 if I need to free resources is onPause my best bet? onDestroy would technically be more suitable, but it's apparently not guaranteed to be called. Mar 27 19:36:28 yes, onpause Mar 27 19:44:09 hihow can i put a layout with border? Mar 27 19:46:46 how can ni put a raw of textViews dinamically ? Mar 27 19:46:55 good positioned Mar 27 19:49:07 can I set a SearchView to not allow spaces to be input? Mar 27 19:53:38 ah I can set an inputtype Mar 27 19:53:54 now is there an input type that doesn't allow spaces Mar 27 20:06:55 if I have a data base with one table that has 10 columns, is it faster to drop the database and recreate it, OR change 6 columns in every row to their initial values???? Mar 27 20:07:38 that would be rather easy to test Mar 27 20:07:44 How do I time it? Mar 27 20:08:00 Just with a watch or is there a more precise way/ Mar 27 20:08:01 ? Mar 27 20:08:45 log.d("derp", thetime): Mar 27 20:08:52 dostuff(): Mar 27 20:08:55 log.d("derp", thetime); Mar 27 20:08:57 ? Mar 27 20:09:32 Wow, derp is right, sorry. Mar 27 20:11:14 how can scroll horitzontally a linear layout? Mar 27 20:12:40 joker_89: View#scrollTo(int,int) Mar 27 20:12:51 jdawes: if you say DELETE FROM table that is fine enough Mar 27 20:13:07 sqlite uses a truncate optimization. without that, it would be quicker to drop the table Mar 27 20:14:37 Well, I don't NEED to delete anything, I just want to have it reinitialized to default values (all zeroes last 6 columns, keep values for first 4 columns). Note that on initial creation of the database the first 4 column of each row never change throughout the lifecycle of the database Mar 27 20:15:13 how many rows are we talking about? tens? hundreds? thousands? Mar 27 20:15:18 208 Mar 27 20:16:15 Hi. What kind of "list" like structure can I use to store an int and 2 classes? Mar 27 20:16:23 so each entry in the list consists of these 3 objects? Mar 27 20:16:48 How about a List of a custom class that includes an int and those 2 classes? Mar 27 20:17:14 * g00s wishes Java had tuples Mar 27 20:17:25 ^yeah Mar 27 20:17:35 lol, i've been spoiled with Python Mar 27 20:17:39 evanc: 208, is that too many? Mar 27 20:18:05 Anyone know how I can reset my in app purchase on my testing account so its as if i'm buying it for the first time? Mar 27 20:18:19 jdawes: no, I was just curious if you were worried about optimizing your query that will run on e.g. 5 rows Mar 27 20:18:32 evanc: Lol, fair enough. Mar 27 20:18:41 jdawes: I would say an UPDATE table SET foo6 = '0', foo7 = '0', .... ; would be fine Mar 27 20:18:54 but I'm no expert in sqlite optimization Mar 27 20:19:23 evanc: I'm not expert in SQLite, I didn't know about the SET call, so that updates the entire column for each row? Mar 27 20:19:47 jdawes: yeah, just do it without a WHERE clause Mar 27 20:20:02 (and it'll operate on every row) Mar 27 20:20:36 evanc: Very cool, thanks. Let's see if I can break the 8.5 second barrier on my Galaxy Nexus. Mar 27 20:20:41 I'll report back. Mar 27 20:21:59 jdawes: that was taking you 8.5 seconds? were you individually updating every row? Mar 27 20:22:48 evanc: Like I said, not an expert, that's why I came here. I knew it wasn't a good idea I just don't know SQLite. Mar 27 20:22:57 Ok, now for my next more complicated question :D The GpsSatellite class, I want to return all of them that are present at my location. To do this I use the GpsStatus.getSatellites() function right? Mar 27 20:28:18 evanc: Should I be using database.exexSQL(sqlString) or database.update(TABLE_NAME, values, null, null)? Mar 27 20:28:32 evanc: Or are they basically the same? Mar 27 20:30:14 jdawes: the latter Mar 27 20:30:36 they're basically the same but you might as well not reinvent the wheel that the platform already gave you Mar 27 20:30:37 Yeah just looking over what update does. Mar 27 20:32:11 update is quicker! Mar 27 20:32:30 evanc: It's down to 85 milliseconds, that's laughable in comparison. Thanks a lot! Mar 27 20:32:42 jdawes: \o/ Mar 27 20:32:56 I think 8500ms -> 85ms is a pretty good improvement Mar 27 20:33:27 Has anybody made experience with python and kivy for android Mar 27 20:34:15 freshbone123: yeah Mar 27 20:34:31 http://de.droidcon.com/2013/sessnio/developing-apps-android-and-other-platforms-kivy-and-python these guys Mar 27 20:35:22 Thank you, but it will take some time, until they will held this talk Mar 27 20:36:48 just 2 weeks more :) Mar 27 20:36:50 ypipiii Mar 27 20:36:58 looking forward to droidcon Mar 27 20:44:56 if you scroll down to this answer on overriding styles http://stackoverflow.com/questions/10295430/android-apply-a-theme-on-a-custom-item the last answer is what I want but the code doesn work any ideas? Mar 27 20:48:52 and why doesnt' "style" need an android: in front of it? Mar 27 20:49:30 What is the easiest way for me to write a csv file onto the android system? Mar 27 20:50:43 Hi, is EditTextPreference the only build in control for numeric entry in preferences.xml? It's rather naff... Mar 27 20:51:16 Was looking for a spinner or something Mar 27 20:56:54 if I define my own style X, how do I refer to it in the themes etc so theme A and B bother have there own versions of style X? Mar 27 21:06:22 is there a way to set maximum zoom level on google maps? Mar 27 21:08:14 hello I got a question which might be very foolish but I am not be able to google this so I am sorry if this question is that foolish but I have a program in python which I for windows platform if I want to port that to android then any specific way by which I may do that a little easily. Mar 27 21:11:17 Anyone know how I can reset my in app purchase on my testing account so its as if i'm buying it for the first time? Mar 27 21:16:04 What is Build.VERSION_CODES before 4.2? Mar 27 21:16:24 ICE_CREAM_SANDWICH_MR1? Mar 27 21:16:39 no, JELLY_BEAN Mar 27 21:16:42 thanks :p Mar 27 21:24:07 anyone know if its possible and if so how to set max zoom level on a google map? Mar 27 21:24:32 can do it in javascript sdk and it was possible with the old mapview style iirc, can't find a way to do it with the play services google map Mar 27 21:26:43 anyone ever dealt with SLL and broken pipes? it looks like https://code.google.com/p/android/issues/detail?id=8625 had to do with connection reuse, but that bug claims it was fixed as of GB and i'm seeing this all the way up to JB Mar 27 21:26:48 *SSL Mar 27 21:27:52 anyone know how to return an object or array from a JavascriptInterface? I can return primitives, but I get a token syntax error with objects. Mar 27 21:28:53 speakingcode-wor: cameraupdatefactory, zoomTo Mar 27 21:29:08 speakingcode-wor: 2.0 to 21.0 float zoom value Mar 27 21:29:23 speakingcode-wor: movement/zoom is all programatically controlled by cameraupdate now Mar 27 21:30:38 dragorn: thanks Mar 27 21:31:32 wait Mar 27 21:31:50 dragorn this causes the camera to zoom yeah? i'm tryin t set the max/min a user can zoom to Mar 27 21:32:01 speakingcode-wor: oh Mar 27 21:32:06 speakingcode-wor: I misinterpreted Mar 27 21:32:10 no problem Mar 27 21:32:19 speakingcode-wor: I'm less sure about that. Mar 27 21:34:11 this is a minor thing but what do you guys use for logging in your apps (if anything) ? Mar 27 21:34:50 Log.* :) Mar 27 21:37:34 storkme: Log.{d,e,v,w,wtf} Mar 27 21:39:40 fair enough. Mar 27 21:42:17 * do0ob wonders why eclipse doesn't have a tabbed layout template :( Mar 27 21:42:51 butterknife isn't working D: Mar 27 21:43:06 butterknife for butter not for phone Mar 27 21:43:15 not called phoneknife Mar 27 21:43:24 english, do you speak it? Mar 27 21:43:36 have you never heard of project butter r u dum or something :s Mar 27 21:44:09 This is strange, I added a Uri.encode() to stop spaces in my query from breaking search and now I'm getting " Target host must not be null, or set in parameters." Mar 27 21:44:23 speakingcode-wor: http://stackoverflow.com/questions/14977078/limit-scrolling-and-zooming-google-maps-android-api-v2 ? Mar 27 21:44:40 how can i turn on jni tracing? Mar 27 21:44:53 speakingcode-wor: "no great answer" seems to be the answer Mar 27 21:45:12 yeah Mar 27 21:45:17 kinda ridiculous they would take that out Mar 27 21:48:15 Anyone know what I've done to cause this error message? http://pastebin.com/0kz75SNZ Mar 27 21:49:21 storkme: you can use proguard to strip out calls to Log for production use; but i think only dexguard remove expressions in the log() bc regular proguard may not know whether they do or do not cause side effects Mar 27 21:50:11 aye, it does, it'll remove the Log call but leave in the stringbuilder part. That said, I've never managed to get that working properly :/ Mar 27 21:50:12 ah Mar 27 21:50:24 found it, you shouldn't already have http if you are encoding Mar 27 21:50:26 in the past I just wrote a wrapper for Log that'd only log if BuildConfig.DEBUG was on Mar 27 21:51:10 the slf4j approach works far better; the android logging system is totally braindead :) Mar 27 21:51:25 might look into that then, thanks. Mar 27 21:51:40 i think there is slf4j-android Mar 27 21:52:02 i didn't have any logs in tight loops so stripping w proguard was fine enough for me Mar 27 21:52:45 How do i stop eclipse adding values-sw600, values-sw720p-land? Mar 27 21:53:03 I want it to not even show up as i introduce a new activity Mar 27 21:58:33 Anyone know how I can reset my in app purchase on my testing account so its as if i'm buying it for the first time? Mar 27 22:02:55 apple741: why do you want to do that? Mar 27 22:03:48 so I have a listview that's a table of contents, anda button ("Next") that will play the next video in the table of contents.. is there a straightforward way to get the ListView to scroll the next video item up so that it is fully visible on the bottom of the screen? Mar 27 22:04:08 I know setSelection(pos) will warp it to the top of the parent container but I just want it to come up just enough to be fully visible Mar 27 22:05:56 do0ob: I want to make sure my 'restore' code does not accidentally give the item away for free to people who have yet to purchase the item. Mar 27 22:11:32 so I'm getting some really weird errors. I'm following google's android dev guide and I accidentially wrote android:layout-width instead of andorid:layout_width. Now my R.java doesn't get generated and I get this error: "[2013-03-27 14:58:04 - MyFirstApp] W/ResourceType( 836): Bad XML block: header size 92 or total size 0 is larger than data size 0" Mar 27 22:12:10 bjqrn0: project->clean and then project->build all Mar 27 22:12:29 I have done that multiple times Mar 27 22:12:35 but wait, think I might be missing something Mar 27 22:13:07 obviously, the solution is to make data size > 0 :) Mar 27 22:13:27 what data size? Mar 27 22:13:42 just joking, thats a very poor error message Mar 27 22:14:10 yup. Mar 27 22:14:22 the whole SDK seems very unstable :S Mar 27 22:15:30 and now it magically started working... Mar 27 22:16:46 where magic goes, superstitions follow Mar 27 22:20:13 Should I refund the money to myself for my test in app purchase? Mar 27 22:20:18 I used a test account Mar 27 22:20:36 It appeared as an order in my checkout acccount Mar 27 22:21:04 congrat, you bought your app! Mar 27 22:21:41 isnt the 30% anyway taken waway from that, no matter if you refund or not? Mar 27 22:21:52 no Mar 27 22:22:03 if you refund, the entire amount is refunded Mar 27 22:22:30 So google allow me to refund it? Mar 27 22:22:37 sure, why not? Mar 27 22:23:16 Good point , was just confused why they charge me if I use my test account? Mar 27 22:23:32 or you could cancel your order in the dev console if it has not been charged Mar 27 22:25:09 Its been charged so I don't think I could do that, they do have an offer to cancel the order in the checkout Mar 27 22:26:44 this app isn't yet on the market, but if it were..is this the way to get at it? "market://details?id=" + getPackageName() Mar 27 22:27:41 huh? Mar 27 22:27:47 like to access it directly? Mar 27 22:27:55 yea, like in a Rate App button Mar 27 22:28:07 yes Mar 27 22:28:21 ah, searching Play by package name works? :P Mar 27 22:28:22 never tried Mar 27 22:28:31 http://www.androidsnippets.com/prompt-engaged-users-to-rate-your-app-in-the-android-market-appirater Mar 27 22:28:42 no, I don't want to prompt, I've checked that out before Mar 27 22:28:47 it's just a button Mar 27 22:28:53 but thank you Mar 27 22:28:54 oh yeah prompting for rates.. Mar 27 22:28:59 that always will result in good rates Mar 27 22:29:02 custom font on actionbar tabs, any ideas? Mar 27 22:29:04 Sicp prompt isn't the point Mar 27 22:29:10 the point is how the prompt access the market Mar 27 22:29:13 sometimes i even take the time to rate it one star before deinstalling it Mar 27 22:29:13 ah yes, the code must be the same, yes Mar 27 22:29:17 I'll look at it Mar 27 22:29:29 that's actually where I got it from Mar 27 22:29:46 but since the app isn't on the market, I have no idea what "no item found would mean" cause either way it isn't going to find it Mar 27 22:30:13 well u do it based on package Mar 27 22:30:22 so if its not found u can assume its not there lol Mar 27 22:30:27 (not really sure what ur looking for) Mar 27 22:30:48 testing that button inside my own app-to-be Mar 27 22:31:18 Test it with another package name or something Mar 27 22:31:24 Just remember to change it back Mar 27 22:32:24 always remember... Mar 27 22:32:27 never forget Mar 27 22:32:28 Does this mean google still charged me for refunding a test purchase - http://screencast.com/t/QfmwIDUx Mar 27 22:32:56 if u refund there is no charge at all Mar 27 22:33:06 ^ Mar 27 22:33:55 Thanks guys, I think its sorted now :) Mar 27 22:36:11 timroes: think people give poor ratings if you use a prompt like that? Mar 27 22:37:05 Popups are annoying Mar 27 22:37:11 Quacked all in the delivery, key is to not actually prompt it lol. Mar 27 22:37:44 Putting in a menu as an option they can select at there leisure is not bad. Mar 27 22:37:50 throwing it at there face is Mar 27 22:37:54 * jug6ernaut_ is guilty of this Mar 27 22:40:09 Quacked: I do Mar 27 22:40:40 a user who really likes your app will rate it anyway, and a user who really has to complain about it, will also find a way Mar 27 22:40:41 if i see a "rate this app" i always immediately dismiss it Mar 27 22:40:41 Are there storage limits on android's databases? Mar 27 22:40:56 but most apps that need to beg for ratings are naturally bad Mar 27 22:41:09 Quacked: apps using dialogs in general are in the most cases not good designed, and if that dialog wants me to rate the app, its an instant deinstall Mar 27 22:41:15 and one star ranking, if i am in the mood Mar 27 22:41:17 i hate those rate dialogues, very annoying Mar 27 22:41:21 if your app is good, it will be rated good, no begging needed. i would imagine prompts like that do more harm than good Mar 27 22:42:09 Quacked: also famous android ui designers (like juhani) will tell you exaclty that Mar 27 22:42:52 https://plus.google.com/102272971619910906878/posts/GNhBs6PR7MB Mar 27 22:43:06 * p_l imagines a nag screen to be used *only* on "trial" versions Mar 27 22:44:34 i love the last comment on that page... "Will this work with Live wallpapers?" Mar 27 22:44:49 cause all we need is live wallpapers spamming rate me dialogs everywhere Mar 27 22:45:02 lol Mar 27 22:45:30 no we neeed windows like wallpapers Mar 27 22:45:40 if you don;t rate it the 3rd time the dialog popped up it will just turn black Mar 27 22:45:42 until you rate it Mar 27 22:46:12 i wonder what it would be life if google had some sort of Play certification, where you could , if you wanted, apply to have your app certified for some level of quality Mar 27 22:46:23 "Your phone will self destruct unless u 5 star this app in , 5….4…..3…..2..." Mar 27 22:46:27 and it does this by using command line curl to download the rating pages from play.google.com and grep for the user name Mar 27 22:46:41 g00s that way to much to ask for out of google Mar 27 22:46:49 g00s: I would say this kind of happens automatically Mar 27 22:46:57 timroes: bad url btw Mar 27 22:47:02 good apps will get good rankings Mar 27 22:47:10 Quacked: log into google+ :) Mar 27 22:47:11 so will bad apps Mar 27 22:47:21 there is stuff like the top developers Mar 27 22:47:23 timroes: good ratings come from who has the most money to buy them Mar 27 22:47:27 several blogs featuring apps Mar 27 22:48:00 i haven't rated a single app since google required g+ Mar 27 22:48:13 anyone know how I can set a custom font on my actionbar tabs? I've tried creating a custom view and just setting the custom view on my ActionBar.Tab, but I can't for the life of me get the text to center vertically -- it just isn't respecting the gravity values I'm setting :/ Mar 27 22:48:18 * jug6ernaut_ doesn't want a g+ account on the account he buys shit on Mar 27 22:48:27 i have reated several since them, and be sure none of them asked me to rate it :) Mar 27 22:48:39 one had just a genious design, and one of it had just such a bad design Mar 27 22:48:49 lol Mar 27 22:48:55 i think it could won any worse design award Mar 27 22:48:56 users only rate if they love or hate something Mar 27 22:49:09 keeps things at least balanced :D Mar 27 22:49:09 90% of my reviews are 5 or 1 stars lol Mar 27 22:49:25 you wonn't have much ratings in between, but as long as ppl love and hate will rate, thigns are fine :) Mar 27 22:49:35 because you still havbe in average if the app is more liked or hated :D Mar 27 22:49:52 lol Mar 27 22:50:16 i will say one thing about 1 star ratings Mar 27 22:50:19 they are very funny to read Mar 27 22:50:22 in order, my users rate 5, 4, 3, 1, 2 Mar 27 22:50:33 no one ever does a 2 Mar 27 22:51:02 lol yea Mar 27 22:51:32 mine are 5,1,3,2,4 Mar 27 22:51:46 people are very confused Mar 27 22:52:11 5,4,1,3,2 Mar 27 22:52:13 http://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE Mar 27 22:52:19 why is it deprecated :| Mar 27 22:52:33 obviously it's bad for the things you'd use a content provider for. Mar 27 22:52:40 but sometimes you just want a readable file. Mar 27 22:52:42 oh to share the teoo rated apps with you Mar 27 22:52:49 worst design ever: https://play.google.com/store/apps/details?id=com.ikmultimediaus.android.irigrecorder Mar 27 22:52:56 tdignan: a readable file could be on sd card Mar 27 22:53:08 if by chance the creator is listening now: please dig a whole somwhere in the dessert and sit there for the rest of yoru life Mar 27 22:53:47 a whole what? Mar 27 22:53:47 birbeck: oh. Perhaps I shouldn't use context to open my file. Mar 27 22:53:49 but better to feature the good ones: https://play.google.com/store/apps/details?id=at.markushi.expensemanager - though it have some quirks, this is an excellent example in my opinion how a good designed android app can look Mar 27 22:53:51 hol* Mar 27 22:53:52 birbeck: thanks. Mar 27 22:53:53 hole* Mar 27 22:53:54 gosh :D Mar 27 22:53:59 anyone here use GSON Mar 27 22:54:27 jug6ernaut_: taking a survey or do you have a question? :) Mar 27 22:54:43 & more specifically GraphAdapterBuilder Mar 27 22:54:47 evanc I'm getting there :P Mar 27 22:55:16 I'm having trouble(aka can't) serializing interfaces using GraphAdapterBuilder Mar 27 22:55:32 i "think" its a bug in the class Mar 27 22:56:03 ive used gson, but never graphadapterbuilder Mar 27 22:56:30 GraphAdapterBuilder is used for serializing objects with cyclic references Mar 27 22:56:35 works great Mar 27 22:56:40 until u throw an interface at it Mar 27 22:56:57 an object which implements an interface that is Mar 27 22:57:07 timroes: I am logged into g+, still no workie :p Mar 27 22:57:23 ah right sorry... he only shares to ppl he added Mar 27 22:57:33 to quote him "Apps that ask me to rate them with a popup will now on all receive an instant 1 star review. For apps that are in fact good I'll try to remember modify the rating after a week to what they really deserve (although a rating request begging popop will lower the score by one star). I really want this user bugging to end." Mar 27 22:57:58 :D Mar 27 22:57:59 also backed by comments from e.g. Nick Butcher Mar 27 22:58:03 Hi all, I have a probably stupid question. I am trying to make a custom logging class that logs to a sqlite database. I would like to make it a singleton but I don't want to have a getInstance() method - I only want to expose a d(), e(), i() etc. that then deal with the internal object themselves. Is this possible? Mar 27 22:58:13 so that should be enough of design gods to listen to ) Mar 27 22:58:17 Is there a way to intercept any touch on the screen? Mar 27 22:58:21 carbohydrate: yes Mar 27 22:58:45 timroes: I agree, but at the same time I miss something that makes users rate apps more Mar 27 22:58:56 there is one thing: Mar 27 22:58:59 build a great app Mar 27 22:59:06 :) Mar 27 22:59:18 carbohydrate: you can have a static private INSTANCE Mar 27 22:59:36 to quote nick butcher from the comment " I'm ok with incentivizing ratings as long as the only incentive you use is building an awesome app :)" Mar 27 22:59:37 then all of your static methods just use the private INSTANCE member Mar 27 22:59:57 if I assign the private static instance to null, can i reassign it even if it is already set to null? Mar 27 23:00:08 yes Mar 27 23:00:14 carbohydrate: ... what? Mar 27 23:00:23 lol Mar 27 23:00:27 i thought static prevented reassignment - oh wait, is that final? Mar 27 23:00:28 carbohydrate: just have your d(), e(), i(), etc methods call your private getInstance() method Mar 27 23:00:30 oh god Mar 27 23:00:48 i am sorry i am not a java expert Mar 27 23:00:50 carbohydrate: from the meaning of the words which one would you assume it means you cannot change it :) Mar 27 23:00:57 public static void d(String msg) { Logger.getInstance().write(DEBUG, msg); } Mar 27 23:01:10 might it be (a) private (b) static or even (very unlikely) (c) final Mar 27 23:01:16 is there a way to sort apps in play by publish date? :) Mar 27 23:01:49 my other concern is i have read in some places that singletons can be troublesome, but my whole purpose here is so the singleton can hold open the sqlite database Mar 27 23:02:14 singletons are not troublesome if you don't abuse them Mar 27 23:03:15 evanc so basically they work if u do them right :P Mar 27 23:03:15 well one concern i have is the "context" that it uses to open the database. should i use getApplicationContext() to make sure it will work from anywhere in the app? Mar 27 23:03:40 Is there a way to react to a touch anywhere on the screen of an activity and decide whether normal action should be taken or not? Mar 27 23:03:52 for my custom logging class i initialize it in my Application object Mar 27 23:04:06 which should be created b4 anything else(/me assumes) Mar 27 23:04:10 carbohydrate: use getAppContext() Mar 27 23:04:10 i'm adding custom compound controls to a GridView programatically. my compound control is ChannelView which when instantiated, it will inflate its layout from an xml file. i'm wondering, if i instantiate a number of ChannelViews with 'new ChannelView(context)' will the layout from the xml it is inflated form be preserved? Mar 27 23:04:49 evanc: thanks. one last question. if my logging class is just a "regular" class - how do I use getApplicationContext? Mar 27 23:04:52 because right now, when i add them to the GridView, they're all squished up, not using the layout parameters from its xml layout file Mar 27 23:05:57 I think I have to pass it in from the Activity/whatever that calls it Mar 27 23:06:56 * jug6ernaut_ says initialize in Application object Mar 27 23:07:00 carbohydrate: initialize it in Application#onCreate Mar 27 23:07:11 ^^ Mar 27 23:07:47 But I thought by doing the singleton the constructor would be private? So how exactly do I initialize it? Mar 27 23:08:23 make it public :P Mar 27 23:09:00 Maybe I can just make a public initalize(context) method and pass in the appContext() in Application() Mar 27 23:09:02 I will try it Mar 27 23:09:58 what i did is i have two classes, one that is used for writing the logs, and the other is the root that controls the logger context. If u try to use the loggers without initializing it throws complaints everywhere. But since its initialized in the Application that should never happen. Mar 27 23:11:04 * jug6ernaut_ designed his as a stand in replacement for the Logger class, should open source it one of these days Mar 27 23:11:17 carbohydrate: yes, do that last thing you said Mar 27 23:11:31 carbohydrate: except when you're in Application#onCreate(), just pass in "this" Mar 27 23:11:54 lol Mar 27 23:13:49 so no1 had any thoughts on GraphAdapterBuilder? Mar 27 23:13:58 time to dig through the source Mar 27 23:14:11 Attach a custom serializer? ;d Mar 27 23:15:24 SimonVT i am, & thats the problem lol, the custom serializer gets passed the map id instead of the JsonElement Mar 27 23:15:44 info/context http://stackoverflow.com/questions/15627574/gson-graphadapterbuilder-fails-with-interfaces Mar 27 23:16:31 * jug6ernaut_ hasnt looked into GraphAdapterBuilder yet Mar 27 23:17:10 but it appears that the custom serializer is being put ahead of the graph mapper/demapper or replacing it all together Mar 27 23:24:24 man, I never thought writing a simple file would be so difficult. Somehow in the course of my development, I created a directory where I wanted to put my file. Now, I don't need to handle this case, because it will not happen in a real use-case. I do need to remove the directory that is in the way though. So, I bust out my trusty shell, but wait, I can't, because the directory is in the emulated storage: /storage/emulated/0/* -- how Mar 27 23:24:24 can I get at this thing without writing code? Mar 27 23:24:30 I suppose I could clear my app's storage. Mar 27 23:25:30 su Mar 27 23:25:33 nope, that didn't work either Mar 27 23:25:47 as root I will see the "emulated" storage dirs? Mar 27 23:25:48 :| Mar 27 23:25:54 they don't even show up when you ls Mar 27 23:26:02 I don't think you can get at them from the shell but I could be mistaken Mar 27 23:26:14 well emulated just means they are being mapped, they still exist somewhere Mar 27 23:26:22 ah, I see. Mar 27 23:26:23 & u should be able to see them Mar 27 23:26:32 in terminal even if its /emulated/ Mar 27 23:26:51 clearing the data of my app didn't help. Mar 27 23:26:56 lets try a new directory name. Mar 27 23:28:35 jug6ernaut_: appears the "emulated" dir just maps directly to sdcard and it's only used intermittently Mar 27 23:28:38 so removing from the sdcard works. Mar 27 23:28:40 tdignan: /storage/emulated/0/ is just the SD card Mar 27 23:28:41 no need for root Mar 27 23:28:51 evanc: thanks. Mar 27 23:29:05 (well, it's a bit more than that, but that'll do for now) Mar 27 23:29:11 lol Mar 27 23:29:19 I read it's emulated in order to prevent concurrent sdcard access. Mar 27 23:29:28 that each app gets its own dir Mar 27 23:29:31 then later it must sync? Mar 27 23:30:01 tdignan: it's "emulated" because it's all on the same ext4 filesystem, but presents itself as MTP/VFAT to hosts, I believe Mar 27 23:30:14 ah Mar 27 23:30:32 also, the /0/ represents that it's for the first user. The next user on the device will get /1/ and so on Mar 27 23:30:53 i deleted the map exaple from /extras/samples/ Mar 27 23:31:01 i want it back :( Mar 27 23:31:17 and in this case, are users applications? Mar 27 23:31:24 I don't usually have multiple users on my phone :) Mar 27 23:31:32 brx_: deinstall samples in SDK manager and reinstall them again Mar 27 23:31:39 (perhaps there is an simpler way) Mar 27 23:31:46 evanc i never knew that, good to know, i imagine switching between /0/ or /1/ is automatically handled if ur getting the path the correct way? Mar 27 23:31:49 ok ill do that thnks timroes Mar 27 23:37:45 i deleted all sdk saples in the list and then reinstalled, the maps one is not coming back though Mar 27 23:38:20 could someone please zip it and send it to me Mar 27 23:38:35 :| Mar 27 23:42:02 im begging you mister oh mister, tell me what was i supposed to do? Mar 27 23:46:40 hello Mar 27 23:47:31 i have a samsung s2x running cm-10. it appears as though cm doesn't support mhl adapters (proprietary and undocumented). what other projects or roms might support it? stock roms do support it Mar 27 23:48:09 ashes ask #android-root probably Mar 27 23:48:49 ok Mar 27 23:53:12 So, I want to know what the best alternative is for clipPath with hardware acceleration Mar 27 23:53:25 I'm trying to clip my canvas path in a circular manner Mar 27 23:55:01 Is clip region a thing? Mar 28 00:09:11 Can depreciated classes ever be dropped? Mar 28 00:09:53 ofc Mar 28 00:10:28 thats why there are marked depreciated, there functionality and availability are no longer something u should rely on Mar 28 00:11:04 damn... I need them though for support on previous versions Mar 28 00:11:11 jug6ernaut_: like addPreferencesFromResource Mar 28 00:11:41 idk Mar 28 00:11:44 use conditional ways to load them Mar 28 00:11:49 possibly reflection, even Mar 28 00:11:57 reflection would work Mar 28 00:19:40 How long do you guys think it would take before you see the big chunk of people with gingerbread move on to higher API level devices? Months? Years? Mar 28 00:21:38 eternity Mar 28 00:22:26 jug6ernaut_: lmao .... do you think the people with gingerbread are heavy users? How many % of people on your paid app are on Gingerbread? Mar 28 00:23:59 let me see... Mar 28 00:25:18 30% for me Mar 28 00:25:55 jug6ernaut_: damn.... That's a lot! Thanks for taking the time to look. Mar 28 00:26:08 toke like 30 seconds :P Mar 28 00:27:04 jug6ernaut_: still you time is more valuable then mine. lol Mar 28 00:27:08 *your Mar 28 00:29:02 if you say so lol Mar 28 00:40:48 if i start some Threads inside onCreate() should i write thread.join() explicitly? Mar 28 00:41:02 after creating the Thread? Mar 28 00:42:28 anyone here? Mar 28 00:42:51 * kaneda^ crickets Mar 28 00:43:07 >_< Mar 28 00:45:13 testt, http://developer.android.com/guide/components/processes-and-threads.html Mar 28 02:27:30 what folder do I put resources that have the nexus 4 screen as its baseline Mar 28 02:32:09 xastey`: What do you mean? Mar 28 02:32:41 say my designer designed for a nexus 4 screen size 768x1280 Mar 28 02:33:52 which folder do I place my assets in so that they are not resized for the nexus 4? but others they are resized up or down as needed if I dont have a different image for that screen size (ldpi,hdpi etc) Mar 28 02:35:14 xastey`: well you can set the layout based on the model number. You can run a conditional statement using Build.MODEL == "Nexus 4" Mar 28 02:35:43 But you can make a layout that would look great on all devices without doing that. Mar 28 02:36:33 but what about my drawables Mar 28 02:37:16 umm think I found it.. xhdpi ? Mar 28 02:39:08 xastey`: Alright if you insist on making a separate screen you can use any folder under res... you can even make your own since your using them for that one device. However if you want to suppot diffrent screen sizes, your going to have to adapt them for each one. I found a nice tool that does that for you so all you have to do is drop them. Its pretty neat, it finds the DPI and all that and scales for everything from the ldpi Mar 28 02:39:52 can you point me to that tool Mar 28 02:39:59 xastey`: http://sourceforge.net/projects/androidresizert/ Mar 28 02:40:07 I understood I needed to do that, but wanted to know what the baseline was Mar 28 02:40:17 thanks man Mar 28 02:40:22 xastey`: Its really helpful especially if you don't want to waste time figuring out all that manually. Mar 28 02:40:28 xastey`: anytime. Mar 28 02:42:06 cool I'll do this at the last stage.. since I have a gnexus targeting at xhdpi is perfect Mar 28 02:42:09 nice little tool Mar 28 02:42:53 wish this android developer toolbox had a pix to dp converter.. right now I'm using http://labs.rampinteractive.co.uk/android_dp_px_calculator/ Mar 28 02:43:21 xastey`: yeah. I don't give my headache converting and all that. I just do it. Mar 28 02:56:52 i usually just work in xhdpi and then convert to dp is easy, divide by two Mar 28 02:57:17 what would "." be as a double? 0.0? Mar 28 02:59:28 Nvm it will mess your double up if "." is a string **** ENDING LOGGING AT Thu Mar 28 02:59:58 2013