**** BEGIN LOGGING AT Wed May 16 03:00:01 2012 May 16 03:00:03 just cant figure out what it is May 16 03:00:05 i see my activity May 16 03:00:16 i click to load the view hierarchy May 16 03:00:25 it pretends to do some work for a sec and then...nothing May 16 03:00:47 emulator or device? May 16 03:00:56 when I have the onscreen keyboard up for a text box in a dialog on top of my activity, how do I get the background activity to stay put -- not pan, not scan, not resize, just stay exactly as it is? May 16 03:01:07 t0mless, emulator. my device aint rooted unfortunately May 16 03:01:19 aint? Really? May 16 03:01:27 in other words, it's fine to move the dialog so that the text box is visible, but it's causing a reposition/redraw of the -background-, which does not need to move, and is a performance nuisance May 16 03:01:29 let me load an emulator and see what happens May 16 03:02:10 t0mless, ive been able to use hierarchyviewer just fine with other apps…just this one…i dont know what the issue is. im thinking about every possibility…like maybe its because im using ABS or … i dunno May 16 03:02:15 nothing really makes sense May 16 03:02:39 ABS works with heirarchy viewer May 16 03:03:53 yeah no reason why it shouldnt…im just out of any rational explanations so figured id throw it out there LOL May 16 03:04:35 also shouldnt matter that im using an x86 emulator, right? May 16 03:04:40 i mean its worked before im pretty sure... May 16 03:05:10 loading my app in emulator and pulled it up May 16 03:05:17 fragment and all its views loaded fine May 16 03:05:33 never used an x86 emulator tbh May 16 03:05:59 as the intel VT-x thing doesn't work on my AMD chip May 16 03:06:20 hmm May 16 03:06:25 hmm error parsing xml unbound prefix.. May 16 03:06:45 now it doesnt even see the emulator so i killed adb, restarted it, restarted HV and now its just endlessly "connecting device....." May 16 03:07:11 gaz` either you're using a schema you didn't define, or you mispelled android: somewhere May 16 03:07:13 whats an unbound prefix frr May 16 03:07:34 http://pastebin.com/MyJEt82f May 16 03:07:39 i been staring at this for ages May 16 03:07:40 no error May 16 03:07:58 did you define app as a scema? May 16 03:08:00 schema May 16 03:08:03 nope! May 16 03:08:11 whats app? May 16 03:08:13 lol May 16 03:08:14 there ya go May 16 03:08:15 that would be your unbound prefix May 16 03:08:15 thanks May 16 03:08:15 ! May 16 03:08:39 yep May 16 03:08:44 i dont quite get that stuff May 16 03:08:50 why does it go in the first xml element May 16 03:08:55 and nto just at the top or something May 16 03:09:05 just the way xml works May 16 03:09:22 hmm still error May 16 03:09:26 must have got the path wrong May 16 03:10:01 lets see a paste again May 16 03:10:40 http://pastebin.com/MVhSb41z May 16 03:10:53 complains about line 24 May 16 03:11:02 ill try com.viewpagerindicator.CirclePageIndicator May 16 03:11:49 are you using the VPI as a library project? May 16 03:11:53 yeh now it says cant find fillcoloretc May 16 03:11:57 yes May 16 03:13:41 http://groups.google.com/group/android-developers/browse_thread/thread/fc9ac9f168a2ec4f/4a656effce15a0d7 May 16 03:13:49 I think there is a fix for this that has been merged in gerrit May 16 03:14:02 but hasn't been released yet May 16 03:17:31 t0mless, i think the problem with HV actually is that im building against 4.03 May 16 03:17:50 why would that be a problem? May 16 03:17:57 I'm building my app vs 4.0.3 May 16 03:18:07 I think.. May 16 03:19:07 haha shit you're right that's not the issue May 16 03:19:41 what the heck is the issue here then? so frustrating. i need to debug my gridlayout bc something is a bit off and i could really use the help of HV right now May 16 03:20:41 HV has no problem loading up trackingview and the other junk in there... May 16 03:20:42 hmm May 16 03:21:58 Could someone tell me what's wrong with this manifest? http://pastebin.com/SjGBnm3m I keep getting an NPC May 16 03:22:24 kg020: NPC? May 16 03:22:27 you mean NPE? May 16 03:22:33 NPE* May 16 03:22:44 likely has nothing to do with your manifest. May 16 03:22:47 paste the stacktrace May 16 03:23:21 btw, highly unlikely that the minsdkversion should be 15 May 16 03:23:27 target maybe but min prolly not May 16 03:23:32 heh May 16 03:24:17 I cannot for the life of me find the gerrit merge of the namespace thing May 16 03:25:06 shit, I can not math right now. suppose I have a range 10 - 35, how do I compute the percentage of a value between this range, such as 20? May 16 03:25:16 a kindergartener could solve that May 16 03:25:58 where a value of 10 is zero percent and a value of 35 is 100 percent, what percent is 20? May 16 03:26:17 vas ist das formulas? May 16 03:27:00 35 - 10 = 25, 20% of 25 is 25 * .2 May 16 03:27:23 you don't want 20% May 16 03:27:36 oh, as in: what percent is the value 20? May 16 03:27:36 you want 20-10, what % is 10 of 26 May 16 03:27:45 yes, the value 20 May 16 03:27:50 20/25 May 16 03:28:05 readme, http://pastebin.com/tCCcd5aC log... May 16 03:28:13 no, 10/26 May 16 03:28:25 t0mless: why? May 16 03:28:44 20 is the 10th value of your 26 values May 16 03:28:53 though might be 11th value May 16 03:29:05 and I might be bat shit crazy May 16 03:29:08 he has 25 values. 35 - 10 = 25. May 16 03:29:13 +1 May 16 03:29:17 to count 1 May 16 03:29:18 why the +1 May 16 03:29:18 10 May 16 03:29:22 no May 16 03:29:27 because you're not starting at 0 May 16 03:29:32 no May 16 03:29:38 I didn't start at zero May 16 03:29:38 10-35 inclusive is 26 values May 16 03:29:41 I just did elementary school math May 16 03:29:45 oh, right May 16 03:29:52 we never defined whether it was inclusive. May 16 03:29:58 but you say it is, so I guess it is. May 16 03:29:58 Truth May 16 03:30:00 I assumed May 16 03:30:23 but you are right about the 10 May 16 03:30:36 because I didn't subtract his range of 10 as the start value from 20. May 16 03:31:05 looking for a way to convert html to pdf in an application …. any ideas? May 16 03:31:12 math is not something that lends itself to the whim of random conversation May 16 03:31:35 kg020 05-16 03:19:51.663: E/AndroidRuntime(2252): at com.android.ff.FitFrayActivity.(FitFrayActivity.java:23) May 16 03:31:43 what is line 23 of FitFrayActivity.java May 16 03:31:44 has anyone used VPI and themed circles? what do u use for the xmlns:app it doesnt seem to work when i try xmlns:app="http://schemas.android.com/apk/res/com.viewpagerindicator" May 16 03:31:58 t0mless, my last thought with regard to hierarchyviewer is that my activities have a different package than the declared package in the manifest.. May 16 03:32:09 shouldn't be an issue May 16 03:32:37 got your apk up somewhere for me to put on my emulator? May 16 03:32:48 readme, right - forgot to call the packages in the intent. May 16 03:32:52 gaz`: read the source of the VPI and see what is used May 16 03:32:55 gaz` read that link I sent you May 16 03:33:10 I really need to get better at reading the logs.. May 16 03:33:24 you have to use your packages package name May 16 03:33:26 not the library May 16 03:33:40 t0mless, thanks for the offer. unfortunately i cant share the APK..NDAs and all that May 16 03:34:05 .:20:13:44:. ( t0mless ) http://groups.google.com/group/android-developers/browse_thread/thread/fc9ac9f168a2ec4f/4a656effce15a0d7 May 16 03:34:08 hello ! dev question here. anyone knows exactly what amazon does to your apk when you submit it to the amazon app store ? looks like they inject some code in your activities' lifecycle but it breaks stuff too :( May 16 03:34:15 gaz` ^ that link May 16 03:34:19 ohh thanks May 16 03:34:40 the app has to use the package name thats in google play so it can be an update to an existing app but since we are creating a bunch of new stuff, etc we just used our own package name for e/t May 16 03:35:16 readme, t0mless: where the value 10 represents zero percent and the value 35 represents 100 percent... May 16 03:35:58 if I have 10, then it should print 0 percent. If I have 35, it should print 100 percent. If I have 20, what percent should it print? How do I calculate this? May 16 03:36:20 38.4% May 16 03:36:40 ... May 16 03:36:46 just my own package or what? May 16 03:36:48 damn this is annoying May 16 03:36:54 cevy, is the app for kindle fire? May 16 03:37:02 you can either think of it as you have 26 values, so each value is 100/26 % point May 16 03:37:13 oh yes its working i thnk May 16 03:37:19 so 20 would be the 10th value (20-10), so you take that and multiply by 10 May 16 03:37:20 or May 16 03:37:29 luxurymode, yes May 16 03:37:30 yeah May 16 03:37:30 20 is the 10th value of your 26 values May 16 03:37:31 this is why i havent bothered with the libs, 3 hrs its taken me, altho i guess its gonna save much more time in the long run May 16 03:37:35 so do 10/26 * 100 May 16 03:37:39 either way May 16 03:37:42 38.4% May 16 03:38:01 cevy, well you may want to check what features you're using in the app because a lot of stuff available on other devices is not available on the kindle fire, e.g. gps all google services, etc, etc May 16 03:38:03 hmm, custom fonts: loop through all element and apply it OR, subclass every control (TextView, EditText, ...) May 16 03:39:57 yeah just subclass May 16 03:39:59 to compute the percent value of an integer x in the range [m,n], use ((x - m) / (n - m) + 1) * 100 May 16 03:40:11 custom fonts blow on performance May 16 03:40:16 (n - m + 1)* May 16 03:40:17 readme yup May 16 03:40:22 had to use a singleton to get that right without having skia go nuts on me May 16 03:42:48 luxurymode, I see, I'll double check but I think the amazon apk breaks on any device, i am pretty sure it has to do with their drm/injection thing so that you can run the app if you dont have the amazon app store already installed... I am just wondering if anyone had any similar issue with amazon apk May 16 03:43:12 i havent had that issue but havent done a ton of stuff with amazon May 16 03:43:25 luxurymode: I hate subclassing May 16 03:43:30 ok thanks for your help May 16 03:43:38 I sincerely hate Amazon. They are the worse thing that ever happened to Android. May 16 03:43:57 hoangtran, yeah but isnt it so much easier to subclass and then do a global find and replace May 16 03:44:10 i did that once and replaced like 50 occurences with zero errors May 16 03:45:20 lol yes them, and barnes and nobles nook :P sucks to have to support all these different devices/markets May 16 03:46:48 subclassing will catch the eyes of my f*king boss May 16 03:47:21 haha oh god, B&N blows, but at least they arent becoming the de facto distributor of apps May 16 03:47:31 AMZN has the power to do that, which is just …. scary May 16 03:47:43 they are worse than apple in terms of being closed, etc May 16 03:48:36 thats it, its time to root my G2x. anyone have any friggin clue how to do it without a windows machine? May 16 03:51:48 i have a year left on my tmobile contract and i want badly to get out of it and switch over to verizon…what can i do? May 16 03:52:30 crush your enemy, see them driven before you, and hear the lamentation of the women May 16 03:53:27 luxurymode: you could try to catch them breaching it May 16 03:53:38 or pay the cancellation fee. May 16 03:53:54 the fee is probably more economically sensical. May 16 03:55:16 readme, only thing im worried about is i got the phone on a deal from wirefly and i think part of the deal is that you if you end up getting out before the K is up, then that retroactively affects the wirefly deal... May 16 03:56:07 yes, they can send you a bill for the price of the phone I bet. May 16 03:56:15 or their commission May 16 03:56:31 actually their site says "By ordering through Wirefly, you agree to repay this discount if, during the 181 days after your new equipment is activated, if you:" May 16 03:56:40 im over 181 May 16 03:57:01 time to go shopping May 16 03:57:07 not so fast May 16 03:57:20 does it say inside there, cancel the contract? May 16 03:58:11 hey readme May 16 03:58:21 readme, not specifically May 16 03:58:30 but even if it did, im over the 181 days May 16 03:59:38 readme, elsewhere they clarify: By accepting this Instant Savings Discount, you agree to repay $200 of this discount ($400 for smartphones, tablets, and netbooks) and authorize us to charge your credit card in repayment of this amount if, you signed up for a 2 year agreement and during the 181 days after your new equipment is activated, your wireless carrier notifies us that the services you purchased have been suspend May 16 03:59:38 disconnected, or deactivated, or if you return your purchase outside of the return and exchange provisions of our Satisfaction Guarantee. May 16 03:59:43 whoops sorry for the multiline May 16 03:59:53 are there any new phones coming out May 16 03:59:55 lol May 16 04:00:00 http://stackoverflow.com/questions/10611596/my-app-suspended-from-google-play-suggestions May 16 04:00:10 i really would like to avoid non flagship phones going forward May 16 04:01:04 haha they "even retweeted" May 16 04:02:02 welcome to the machine ! May 16 04:02:35 google banned his app for no good reason :( May 16 04:02:39 sony even retweeted his app May 16 04:03:40 readme: if i were him then, i'd contact sony, and say that the fact that google have removed it looks bad on sony or some other bullcrap like that May 16 04:03:48 readme: maybe they did that as a diversionary tactic May 16 04:03:57 :) May 16 04:04:12 yeah, i left a comment of that nature May 16 04:04:35 readme: i know your name now :D muh ha ha May 16 04:04:36 :| May 16 04:04:39 but realistically - sony, suga a huge company - one hand doesn't know what the other is doing May 16 04:04:44 i am not private about my name May 16 04:04:49 i link it here often May 16 04:04:52 ;) May 16 04:04:53 im kidding :P May 16 04:05:09 why is it there is never a default control that does what you want May 16 04:05:19 s/control/widget/view May 16 04:05:20 because you want weird controls May 16 04:05:38 nope, i want a tablelayout were column widths are linked May 16 04:05:43 coming from iOS i thought the android widget set was spartan May 16 04:05:48 oh, that's reasonable. May 16 04:05:53 but since the data set is large, it would be great for it to be an adapter view May 16 04:06:24 can sub-menu items become action items? May 16 04:06:39 im going to have to go down the rabbit hole, and do some weird cross view measuring system May 16 04:15:35 anyone know if VPI supports images for the circle indicators or not? May 16 04:15:37 readme, t0mless: double percentage = ((viewportStart - minX) / (maxX - viewportSize) - minX) * 100; /* ultimately what I needed, thanks for the guidence */ May 16 04:16:04 gaz`: they are drawables set by styles May 16 04:16:18 well i see app:fillColor="#FF888888" May 16 04:16:58 but i dont see how to swap to image May 16 04:17:11 pragma- if your viewportStart is your X in your range of minX, maxX... your dividend is wrong May 16 04:17:18 dividend... is that the right term? May 16 04:17:30 no May 16 04:17:32 remainder ? May 16 04:17:34 no May 16 04:17:44 essentially the denominator May 16 04:17:56 gaz`: because your R isn't being recreated properly? May 16 04:18:34 JakeWharton thanks, actually i fixed that ages ago :-) but now im wondering if i can use pngs for the fill color instead of hex vals - is it posible? May 16 04:18:39 readme: i think ive figured out the perfect solution to my problem rejig TableLayout, so it ignores directly children and rather looks at the children of a single child. so we have May 16 04:18:41 should work May 16 04:18:55 sweet May 16 04:18:58 it is called the dividend May 16 04:19:12 never heard that t0mless only in banking May 16 04:19:15 but it could be May 16 04:19:25 er May 16 04:19:37 readme, t0mless: double percentage = ((viewportStart - minX) / ((maxX - viewportSize) - minX)) * 100; May 16 04:19:40 * pragma- nods. May 16 04:20:08 dividend / divisor May 16 04:20:15 other way around May 16 04:20:28 a dividend is divided by a divisor May 16 04:20:37 oh shit May 16 04:20:40 you're right May 16 04:20:45 so your divisor is wrong May 16 04:20:50 but i was missing the parens on the divisor May 16 04:20:59 should be maxX - minX +1 May 16 04:21:55 man, this was a pain to figure out, for some reason May 16 04:22:07 I drew pictures! May 16 04:22:13 hehe May 16 04:22:16 thats when u know its hard May 16 04:22:30 i was struggling with y=mx+c for ages a while back, even tho i mastered that when i was 12 May 16 04:22:50 and im supposed to be a games coder, my maths sucks :) May 16 04:23:17 luckily all games coders say that apart from the physics guys :) May 16 04:23:32 but my graph view port now has a scrollbar slider (customized seekbar) that can be used to drag it around or show where its been dragged if you drag the view itself instead of the slider May 16 04:23:36 * pragma- dances May 16 04:23:40 so JakeWharton woudl it be easy to use bitmaps for the indicator? May 16 04:23:51 gaz`: I was struggling with functions till I finally got to learn the proper way (that is, derivatives etc.) May 16 04:24:08 gaz`: No, I would just write your own that works along the same lines May 16 04:24:08 i cant even do sums on paper nowadays May 16 04:24:26 JakeWharton aha, ill just use colours and see if they notice May 16 04:24:26 :) May 16 04:24:58 altho if i tweaked urs it wouldnt take logn at all would it May 16 04:26:50 why is craigslist not using machine learning to filter obvious spam :( May 16 04:27:04 well anyway thanks for a great lib, just got used to it, once done ill sned u a message to let u know what app it was used in May 16 04:28:54 I had been using padmapper to browse apartments, but I decided to look at the raw, unfettered craigslist May 16 04:29:07 99% of the apartment listings don't even have a google maps link May 16 04:29:15 WHY would I rent an apartment if I didn't even know where it was, ffs. May 16 04:29:32 real estate agents are some lazy individuals. May 16 04:30:04 yeh May 16 04:30:06 they make a ton too May 16 04:30:07 gits May 16 04:31:20 padmapper is pretty sweet May 16 04:32:01 JakeWharton, I have 6 actionitems in a split action bar. Two items, a collapsed actionview set always display, two more items, and a final item set always display. When set like this, the final item is always overlapped with the menu button on the bottom bar. What causes this and how do I fix it? I have screenshots. May 16 04:32:27 does it happen on ICS? May 16 04:34:19 JakeWharton, yes. There is no soft menu button on froyo emu so I am seeing it in ics only May 16 04:34:32 then it's a platform bug as that's the native action bar May 16 04:34:35 file a bug on http://b.android.com May 16 04:34:41 oic. ok thanks. May 16 04:34:55 probably happens pre-ICS if you were you use the force overflow option May 16 04:35:02 seems just like a measurement thing May 16 04:35:04 t0mless: i don't know what I would do without this. May 16 04:35:15 how do I force overflow? :) May 16 04:35:29 I suppose should test it out on a stock ICS rom since I'm seeing it on cm9 May 16 04:35:31 add .ForceOverflow to your theme May 16 04:35:37 I'd have to call a bunch of idiots and ask them "Where is the apartment? You were too negligent to include that information in your post, but can you tell me?" padmapper automatically filters those out. May 16 04:35:43 or add true to your theme May 16 04:35:51 ok thanks May 16 04:36:23 ctate is my hero May 16 04:36:54 +1 May 16 04:38:13 is there a way to set up eclispe so that if I have a file from a library project open and active, and I hit the play button, it launches the actual app project instead of telling me i can't launch library apps? May 16 04:39:00 make sure you've got the project selected in the project explorer May 16 04:39:07 if you clicked the lib project last, it will try to launch that May 16 04:39:19 if you find a configuration option, then let me know :) May 16 04:39:48 but I predict it's not going to be that simple, because eclipse can't really know which project you want to launch. if there were two projects and one library project both using it May 16 04:39:52 how would it know May 16 04:42:13 your talk go well, JakeWharton? May 16 04:42:18 very well May 16 04:42:22 was a lot of fun May 16 04:42:24 how about a shortcut key for launching a specific 'favorite' project? May 16 04:42:32 add a run configuration for it May 16 04:42:53 run it once and then you should be able to use the run hotkey May 16 04:45:28 readme, Windows->Prefs->Run/Debug->Launching->Launch Operation->Launch selected...if not launchable->Launch previous May 16 04:45:38 nice May 16 04:48:28 the inverse of that, for completeness sake, is: viewportStart = ((percentage / 100.0) * ((maxX - viewportSize) - minX)) + minX; May 16 04:48:37 * pragma- struts proudly. May 16 04:49:11 that being: double percentage = ((viewportStart - minX) / ((maxX - viewportSize) - minX)) * 100; May 16 04:49:40 any reason why ICS thinks i'm doing networking in my main thread when i am in fact using and AsyncTask: http://pastebin.com/PUmcVU7d May 16 04:49:44 * pragma- attacks the channel with math. May 16 04:49:52 It is super effective. May 16 04:50:23 I'm going to point out again that I think your divisor is wrong May 16 04:50:26 the parens around maxX - viewportSize shouldn't be necessary May 16 04:50:50 and should be (maxX - minX +1) May 16 04:50:59 t0mless: i was thinking about this, and our solution of adding 1 for the inclusivity of the range works with integers, but does it work with real numbers? May 16 04:51:20 hrm May 16 04:51:46 here is my log cat output: http://pastebin.com/pVs6d2wd May 16 04:51:54 right, the parens are just verbose May 16 04:51:57 I'll test with 0 and 1 as min/max May 16 04:52:30 I think I was also associating viewportStart = viewportSize May 16 04:52:37 saw them as the same variable May 16 04:53:16 so maxX - viewportSize give your your right boundry May 16 04:53:24 so that makes more sense to me now May 16 04:53:38 we are geniuses! May 16 04:53:50 try it with minX != 0 May 16 04:54:01 I do May 16 04:54:03 because the +1 isn't required when counting from 0 May 16 04:54:13 works beautifully May 16 04:54:13 t0mless: percent = (x - m) / (n - m + 1) fails for [0,1] .5 / 2 == .25 but should be .5 from 0 to 1. May 16 04:54:27 then again, it could possibly be off by 1 microsecond May 16 04:54:31 the range is microseconds May 16 04:55:10 yea I was assuming integers May 16 04:55:20 t0mless: the formula (x - m) / (n - m + 1) seems to only work for integer values. May 16 04:55:35 indeed May 16 04:56:04 because the n-m+1 will only count the integers between m and n, inclusive May 16 04:56:52 I think we have to use a third term, p, where p is the precision May 16 04:57:00 1 is the precision of an integer May 16 04:57:24 dschuett, line 65, you use tun on ui thread May 16 04:57:30 *run May 16 04:58:28 t0mless: actually, when using reals, p is lim->0 May 16 04:58:36 indeed May 16 04:58:52 kinda tweaks the whole concept May 16 04:58:56 * readme needs to get cracking on some math May 16 04:59:09 right now my current thing is SQL though. May 16 04:59:15 I spent an hour today reading SQL for smarties May 16 04:59:18 very heavy book May 16 04:59:22 lots of theory May 16 04:59:45 I queried the ContactsContract.Contacts.CONTENT_URI and am confused because the set of columns returned is very different from those listed at http://developer.android.com/reference/android/provider/ContactsContract.Contacts.html May 16 05:00:17 dschuett yea... you're doing asynctask wrong May 16 05:00:30 but hey, since lim->0 is theoretically small, it can be omitted :) May 16 05:00:31 the whole point of doInBackground() is it runs OFF the UI thread May 16 05:00:49 but then the first thing you do, is wrap your whole method in a call to runOnUiThread() May 16 05:00:54 basically, im trying to get the list of contact names and associated phone numbers May 16 05:01:17 I fucking love Chopped May 16 05:01:20 such a good show May 16 05:01:53 alex_PP, t0mless, yeah i think i had that added when i was trying to use toasts in background which is also a no no. Removed and re-running. May 16 05:02:06 good catch btw alex_PP. May 16 05:02:16 stop using toasts as log messages May 16 05:02:21 mahamoti: a lot of the contacts won't have names or phone numbers, if your gmail account has the "automatically add as contact" setting checked off. May 16 05:02:38 which is the default. May 16 05:02:43 and probably will be for your users, too. May 16 05:03:04 or post just the toast to the UI thread, instead of the whole thing May 16 05:04:19 readme, yeah i dont expect all contacts to have numbers...but i cant seem to figure out how to get any phone numbers at all. the columns returned do not include phone number. there are two example on stack overflow neither seem to be working May 16 05:04:42 mahamoti: 1 sec, I'll do it May 16 05:04:53 * readme has to do this tonight anyway May 16 05:04:58 sweet May 16 05:05:14 mahamoti my client ran my contacts code, and somehow it printed the BODIES of his emails May 16 05:05:23 all it does is get email addresses, though May 16 05:05:27 works fine on all my devices May 16 05:05:36 so I made something to send me back the database, waiting on a response May 16 05:05:44 is it possible to have the views on a PageViewer sort of onscreen at the same time, lets say each "page" was linked by a string so it sort of looked like a notebook, with the main page in the middle and the left and right ones slightly on the edge of the screen attached by the string - im guessing no but its worth asking :) May 16 05:05:48 t0mless alex_PP: ok, so i removed the runonUI and now i am getting: "android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views." May 16 05:05:48 I think he must be using some app that is polluting his google contacts. May 16 05:06:26 dschuett stop trying to edit your UI from the background thread May 16 05:06:38 I thought this god damned macbook was supposed to be able to suspend before it just turns off when battery is low May 16 05:06:42 or alert me or SOMETHING May 16 05:06:42 basic rule: No networking on main thread, no UI editing on background thread May 16 05:08:01 readme, heres what im trying: http://pastebin.com/BCbqQiGC May 16 05:08:34 t0mless: thanks. sorry for such the ignorant mistakes. i sometimes find myself trying to make up my own ways instead of just reading. Definitely still learning May 16 05:09:31 mahamoti: try querying this instead May 16 05:09:34 ContactsContract.Data.CONTENT_URI; May 16 05:09:48 if you don't use the 'raw data' uri you get the specific columns only May 16 05:10:09 say you're using ContactsContract.Contacts.CONTENT_URI May 16 05:10:19 so the cols you're gonna get, are the ones defined in Contacts ONLY May 16 05:10:23 readme, thats what i queried in the second example i pasted May 16 05:10:26 so if you try to find a column from PhoneLookup May 16 05:10:40 it would help if i understood how things are organized haha May 16 05:10:44 try ContactsContract.CommonDataKinds.Phone May 16 05:10:46 the doc isnt very explanatory May 16 05:10:51 use the column defs from CommonDataKinds May 16 05:10:56 because those are aliases back to the Data URI May 16 05:11:10 the columns returned by it, anywho May 16 05:11:32 how is what youre suggesting different from 'methofd 2' in my paste? May 16 05:12:17 oh, it appears that's what you have May 16 05:12:44 well, first thing is first: you don't need to get the index on every iteration May 16 05:12:52 you only need to get it once after the query, so move that out of the loop May 16 05:12:55 JakeWharton I see u can click on the start or end of the indicators in VPI to go left and right but u cant click on one in the middle to go to it, that would be a cool addition May 16 05:12:57 i think the problem may be with whereName and whereNameParams May 16 05:13:02 yeah, I'd agree May 16 05:13:08 but i have no idea what they mean May 16 05:13:16 gaz`: you're already on the middle one? May 16 05:13:22 there's an OnCenterTitleClickedListener too May 16 05:13:27 mahamoti: those are a SQL where clause May 16 05:13:27 yes right about the index, will move that out...just test code. May 16 05:13:38 well lets say i click on the second one JakeWharton May 16 05:13:49 JakeWharton: how did the presentation go ? May 16 05:14:03 JakeWharton id assume it wouldtake me to the second page automatically May 16 05:14:06 g00s: very well. receptive audience May 16 05:14:11 was a lot of fun May 16 05:14:17 http://developer.android.com/reference/android/content/ContentResolver.html#query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String) May 16 05:14:19 I missed Kirill's talk though :( May 16 05:14:21 :) May 16 05:14:27 stupid BART May 16 05:14:42 BART is a lot better than the MBTA from my experience May 16 05:14:49 JakeWharton, you in SF too? May 16 05:14:56 Yes, I live here now May 16 05:15:08 except for this one day I was on the bus, and this lady from hell verbally lambasted a 2-3 year old girl in front of her father. May 16 05:15:18 gaz`: i'm not sure exactly what you're describing May 16 05:15:27 "this girl needs to give up her seat, I am a senior!" May 16 05:15:27 oh you're talking about the circle indicators? May 16 05:15:39 gaz`: the hit targets are far too small to support that properly May 16 05:15:53 JakeWharton yeh i was on about them so u hit corcle 3 and it goes to page 3 May 16 05:16:10 yeh im just trying to mimmick an iphone app unfortunately or i wouldnt care May 16 05:16:16 the smallest a clickable region should be is 1cm square May 16 05:16:19 iPhone supports that? May 16 05:16:23 *iOS May 16 05:16:26 yes May 16 05:16:34 and images too :) May 16 05:16:44 9mm x 9mm :) May 16 05:17:00 oh it's a control or something now? May 16 05:17:20 not sure what it is maybe it was custom made May 16 05:17:30 yours animates between the points better tho May 16 05:17:35 theirs "jumps" May 16 05:17:39 and i like animation May 16 05:18:17 readme, have a look here: http://pastebin.com/f4fsFJr9 May 16 05:18:44 i basically removed all the where clauses and just printed out all the columns that were returned for one row May 16 05:18:52 for the two different query types May 16 05:18:52 and? May 16 05:18:57 what am I supposed to be seeing May 16 05:19:10 ContactsContract.Contacts.CONTENT_URI doesnt return anything containing the number May 16 05:19:15 it does too May 16 05:19:19 data1:(802) 482-3888 May 16 05:19:23 ContactsContract.Data.CONTENT_URI returns the number but the colum name is "data4" May 16 05:19:25 not all your contacts have numbers! May 16 05:19:30 of course!~ May 16 05:19:39 thats the other query May 16 05:19:41 it's a generic table, the CommonDataKinds columns are aliases to them. May 16 05:20:05 ContactsContract.Data.CONTENT_URI returns the number but its under column "data1" (formatted) and data4 (formatted differently) May 16 05:20:09 I don't blame you for being suspicious, i'm not very fond of this API at all. May 16 05:20:14 * t0mless is close to throwing this server out the window May 16 05:20:25 those column names dont look reliable May 16 05:20:36 they look implementation specific May 16 05:20:38 you are supposed to reference them with the CommonDataKinds aliases. May 16 05:20:41 because they are. May 16 05:21:04 also, neither of them contain the number "as entered" May 16 05:21:10 they are weirdly formatted May 16 05:21:20 but how do you reference those columns using the aliases? May 16 05:21:37 you could start by defining a projection using the CommonDataKinds columns May 16 05:22:26 you're doing it here, already getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME) May 16 05:22:49 yeah, that works May 16 05:23:01 String number = nameCur.getString( nameCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER) ); May 16 05:23:01 just make a projection with the CommonDataKinds columns you want May 16 05:23:02 doesnt May 16 05:23:14 it definitely does work. May 16 05:23:26 lots of your contacts don't have certain fields May 16 05:24:07 provide a where clause with some is not nulls and you'll get what you want May 16 05:24:07 i have only 1 contact. i created it myself for test purposes. it has the number 8024823888 which you can see in data1 and data4. but CommonDataLKinds.Phone.NUMBER doesnt get it May 16 05:24:21 mahamoti: do you have a gmail account [y/n] May 16 05:24:33 me personally or my fake contact? May 16 05:24:35 mahamoti: have you ever sent an email with it, or received an email [y/n] May 16 05:24:44 no, the gmail account your device is associated with. May 16 05:24:54 no this is the emulator, i created this 1 contact for test purposes with noting but name and number May 16 05:25:17 something is wrong May 16 05:25:23 indeed :P May 16 05:25:36 gimme a sec to try here, I've just been looking at your stuff. May 16 05:25:41 ok May 16 05:31:38 mahamoti: you've gotta check the MIMETYPE col May 16 05:32:08 Data is a generic table that can hold any kind of contact data. The kind of data stored in a given row is specified by the row's MIMETYPE value, which determines the meaning of the generic columns DATA1 through DATA15. For example, if the data kind is Phone.CONTENT_ITEM_TYPE, then the column DATA1 stores the phone number, but if the data kind is Email.CONTENT_ITEM_TYPE, then DATA1 stores the email address. May 16 05:33:38 http://developer.android.com/reference/android/provider/ContactsContract.DataColumns.html#MIMETYPE May 16 05:35:55 ok, that helps. May 16 05:36:09 still not clear on what to do though. May 16 05:37:29 i think you need to use the CONTACT_ID May 16 05:37:48 to query many associated rows May 16 05:37:52 to build the complete picture May 16 05:37:55 this api is an atrocity :) May 16 05:38:06 android -- always worse than what you expect May 16 05:38:07 KISS should have been applied here. May 16 05:38:24 at least they provide access to this stuff unlike ios May 16 05:38:27 this sqlite thing is terrible for users and implementors alike May 16 05:38:36 what's wrong with SQLite? May 16 05:38:44 use of it as an API is May 16 05:38:48 the problem here isn't SQLite, it's the ContentProvider and their crazy API May 16 05:38:54 I would kill for a simple table :) May 16 05:39:18 they even have a page that says "altough we provide documentation on how to access contact info etc, dont expect it to be there because any phone might have completely different fields, use at your own risk": May 16 05:39:18 hmm... Wait. I thought in this case you have access to the table, eh? May 16 05:39:33 not for contacts May 16 05:39:39 you have to go through the content provider May 16 05:39:47 maybe that was just for inbox/sent box May 16 05:39:49 yes, but the content provider just hands you the sqlite shit May 16 05:39:59 without interpreting it properly first May 16 05:40:00 not quite May 16 05:40:30 in this case you have to blame the messenger May 16 05:40:35 well, I've never really looked into this. I just hate contentproviders in general. May 16 05:40:55 Constants for the raw contacts table, which contains one row of contact information for each person in each synced account. Sync adapters and contact management apps are the primary consumers of this API. May 16 05:40:56 the big part of the problem is the simple insufficiency of sqlite as an abstraction May 16 05:41:12 mahamoti: http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.html May 16 05:44:24 readme, the columsn of that that do not contain either name or numbers May 16 05:44:35 just ids May 16 05:45:21 "I had a problem so I thought to use java. Now I have a ProblemFactory." May 16 05:45:36 cute May 16 05:45:53 ContentProviderOperation.newInsert(blah blah).build() May 16 05:47:42 mahamoti: what sucks about it, is you can't use a JOIN. May 16 05:47:49 you have to pass the ID through java code May 16 05:48:00 instead of tables, it's one FLAT table May 16 05:48:07 and the different entities are defined with mime types. May 16 05:48:10 It's just so quaint to write 'new Insert()' these days. It's almost like the new operator was forbidden. May 16 05:48:53 mahamoti: the ID is used to define relationships between the different kinds of entities May 16 05:49:01 such as StructuredName, Email, Phone, Contact etc. May 16 05:49:15 hmm, content providers. truly ugly shit May 16 05:49:18 in other words, you can't get all your data in one shot. You need to make sub queries May 16 05:49:32 in a SQL database with a sane schema, you could use a JOIN on a couple tables. May 16 05:49:59 the funniest thing is, these contacts are in all likelihood a trivial bit of info, like few people have even 1000 contacts May 16 05:50:03 i wouldnt even mind doing multiople queries if i could see the table scheme May 16 05:50:14 it could be done in any simple way that provides reasonable API to access them, but someone went with this sqlite crap May 16 05:50:16 alankila: yeah, most of my "contacts" are garbage because of gmail's auto-add feature. May 16 05:50:26 the code for the contacts content providers are kinda eye opening May 16 05:50:36 mahamoti: i'll share my code with you when I am done, I pretty much just debunked this. May 16 05:52:01 is the Bundle object created only when the onSaveInstanceState() methon is called, which is when the app has been closed due to system constraints ? May 16 05:52:13 readme, take a look at this: http://pastebin.com/ycjPr2Gv May 16 05:52:16 you can tell it to not add them to My Contacts automatically, and then just not sync the other contacts group May 16 05:52:52 its the second output line that confuses me May 16 05:53:00 you'll see why May 16 05:53:19 is there a way to make say one xml file with 4 buttons in and reuse it in other views without just copy and pasting it? May 16 05:53:39 somehow i think it does have to do wit that mimetype thing May 16 05:53:51 gaz yes you can May 16 05:54:02 what do i search for to see how? May 16 05:54:13 i should have learned this a long time ago May 16 05:54:17 May 16 05:54:18 and pls dont say fragments :x May 16 05:54:22 oh wow May 16 05:54:25 thats awesome May 16 05:54:39 thanks! May 16 05:54:40 trying May 16 05:55:45 gaz`: http://developer.android.com/resources/articles/layout-tricks-reuse.html May 16 05:56:50 works like a charm! thats amazing May 16 05:56:55 gonna use that all the time May 16 05:56:58 thanks very much! May 16 05:57:43 you're going to want fragments eventually May 16 05:57:49 yep May 16 05:57:59 im just not good enough yet May 16 05:58:13 once im more comfy with it all ill def use fragments May 16 05:58:16 might as well learn them now; they're simple and the support library makes it backwards compatable with older devices May 16 05:58:47 im a fan of baby steps :P May 16 05:58:50 yeh i got too much to do really right now May 16 05:58:56 but i will do it in the next fe wmonth May 16 05:58:56 s May 16 05:59:21 i actually attended a google dev lab on fragments May 16 05:59:25 so i should be an expert May 16 05:59:33 however i spent the entire time trying to get eclipse to work May 16 06:01:14 I recently reinstalled eclipse and this time took the more minimal "eclipse for java developers" package only, and then augmented that with the bits from WTP to get the j2ee bits I actually need. May 16 06:01:39 no more mylyn. I'm glad -- this thing pisses me off because it sometimes causes content assist to sleep for quite long time while it's doing something May 16 06:02:59 yeh May 16 06:03:13 eclipse does very weird things with my clipboard too May 16 06:03:17 interfers with copy n paste May 16 06:03:19 also I could get rid of the xml editor which is based on the annoying tree representation May 16 06:03:28 god yeh May 16 06:03:32 this is one of the few ways to edit xml that simply seems worse than just reading text, and it's default May 16 06:03:32 never use that May 16 06:03:39 yep May 16 06:05:12 readme, you still working on that contacts stuff? May 16 06:06:48 is it possible to change the password on a signing key? May 16 06:07:08 i'm gonna be working for a while, but here's what I think is the solution May 16 06:07:17 damccull, yes May 16 06:07:18 you need to include the Data.CONTACT_ID, May 16 06:07:29 and the Data.MIMETYPE in your projection May 16 06:07:39 you do a series of if statements against the mimetype result May 16 06:07:47 that way you know which kind of entity the row you are on is May 16 06:07:49 pfn sweet thanks. What should I search to figure out how? May 16 06:07:58 damccull, keytool -help May 16 06:07:59 you group the results of each entity type using the contact id May 16 06:08:04 you could use a hashmap May 16 06:08:05 oh lol thanks May 16 06:08:06 make it nice and easy May 16 06:08:25 the thing that is real lousy, is that this relies on string comparisons May 16 06:08:30 to perform relation between entities May 16 06:08:40 otherwise you're gonna have to do multiple queries May 16 06:08:49 this way works with one cursor, to grab all the fields you want. May 16 06:09:01 readme, did you see thi paste? http://pastebin.com/ycjPr2Gv May 16 06:09:27 hmm May 16 06:09:28 mahamoti: you need to check the mime type column May 16 06:09:36 include Data.MIMETYPE in your projection May 16 06:09:43 is keytool supposed to exist in my SDK? May 16 06:09:51 and only print if the result of that column is equal to StructuredName.CONTENT_ITEM_TYPE May 16 06:10:05 but theres only 1 row May 16 06:10:14 you don't know that. May 16 06:10:18 or do you May 16 06:10:19 hm May 16 06:10:22 nm stupid me May 16 06:10:27 I don't know. that is my operating theory and it is based on the documentation May 16 06:10:34 I will test it here and let you know. I am fairly certain I am right. May 16 06:10:41 readme, the row i am looking at IS of that type May 16 06:10:51 given that May 16 06:10:52 and it's missing any relevant data? May 16 06:10:56 the question still remains May 16 06:11:01 of where the phone number is May 16 06:11:03 try DISPLAY_NAME May 16 06:11:58 I don't believe there is only one row May 16 06:12:01 print cursor.getCount May 16 06:13:02 readme, it returns 1 May 16 06:13:15 also, look here-- im filtering on mimetype: http://pastebin.com/g15hHDEN May 16 06:14:18 the question is, given that mimetype=CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE, how do i retrieve the column that contains phone number? its not CommonDataKinds.Phone.NUMBER May 16 06:14:24 the phone number IS three May 16 06:14:35 its just not accessed by that way May 16 06:14:41 its all in this 1 row May 16 06:17:39 * Ge0rG 's got a really WTF stacktrace from android, crashing when printing the stacktrace in the app: http://pastebin.com/KfusYrxw May 16 06:17:50 mahamoti: https://gist.github.com/2707992 May 16 06:17:54 here's the beginning of my code May 16 06:17:57 it works to print the names May 16 06:18:14 I'm going to keep my own associations via IDs in a sqlite table May 16 06:18:18 and perform an UPDATE May 16 06:18:26 when I see the ID again May 16 06:18:29 for a different MIMETYPE May 16 06:18:42 but a HashMap would work well, too May 16 06:18:51 let me know when you manage to get phone numbers May 16 06:18:55 i can get names May 16 06:18:57 oh, I can get them now May 16 06:18:59 1 sec. May 16 06:19:34 Ge0rG: I'd wager more that the dev of crapsdroid doesn't know how to properly print a stacktrace. May 16 06:20:36 mahamoti: got em May 16 06:20:45 cool lets see May 16 06:21:00 https://gist.github.com/2707992 May 16 06:21:19 I really hate the use of a string to make these associations. May 16 06:21:23 they should be made with an integer. May 16 06:21:40 now, you want to see numbers for types? throw a hashtable in and make the contact id the key. May 16 06:21:53 numbers for names May 16 06:21:54 that is. May 16 06:22:24 pragma-: except for the case when the exception was generated by the system, in which case you should go back to your troll cave :) May 16 06:23:07 it could have just as easily been thrown by the dev with a whack message. don't call me a troll, thanks. May 16 06:23:34 pragma-: I am the dev of that app, and the stack trace is from google play error reports, kthx? May 16 06:23:53 pragma-: P.S: you are a troll :P May 16 06:24:38 is there a logcat reading app that allows to run logcat as a service for a continuous dump to SD? May 16 06:25:10 there are so many mediocre log readers... :( May 16 06:25:22 make one :D May 16 06:26:15 maybe another time May 16 06:26:23 Yes, but since I'm a troll I'm not going to tell you. May 16 06:27:12 On the other hand, if you say that I'm helpful, I'd be forced to tell you. May 16 06:27:40 mahamoti: do you get it? May 16 06:28:08 pragma-: I decide whether you are helpful depending on what you say... so far it is 2:0 against helpful ;) May 16 06:28:10 Ge0rG: you might find it's sufficent to use a defaultUEH May 16 06:28:52 Ge0rG: I say things depending on what you perceive me as. May 16 06:28:55 http://developer.android.com/reference/java/lang/Thread.html#setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) May 16 06:28:55 readme: I've implemented such a thing in my other app, before market added the bug report feature May 16 06:29:02 ah May 16 06:29:10 you can read logcat you know just by opening a pipe to adb logcat May 16 06:29:15 apps like alogcat do this May 16 06:29:16 * Ge0rG will tell the user to use catlog's recording feature May 16 06:29:49 readme: yeah, the problem is to tell users how to properly record a stacktrace, especially when their phone has like 4KB of back buffer May 16 06:30:12 you don't need logcat to record a stacktrace :) May 16 06:30:26 hell, you don't really need logcat for anything. May 16 06:30:43 it's just a nice to have for development May 16 06:30:44 readme, not sure what you did different but i do get 2 rows now, the first one is vnd.android.cursor.item/name and the second is vnd.android.cursor.item/phone_v2...and does contain number. however, since htey are different rows, how do i know that this number goes with that name? May 16 06:30:54 you check the contact id May 16 06:30:57 that they are the same May 16 06:31:20 it can be done easily with a hashmap where integer is the contact id and contact is a class you define with the fields you are interested in May 16 06:31:37 on each iteration of the loop, pull a contact object for the contact id if it exists in the hashmap May 16 06:31:38 does the column index change since htye are diff row type? May 16 06:31:41 if it doesn't, create it. May 16 06:31:49 column index for CONTACT_ID May 16 06:31:56 i beleive that one is the same May 16 06:32:03 since it is a column in the Data class May 16 06:32:07 a field, rather. May 16 06:32:10 ok May 16 06:32:15 you can count on mimetype and contact id May 16 06:32:17 algorithms are not a problem for me :) May 16 06:33:18 now I have to write some boring SQL code to merge my contacts together and get the actual desired result May 16 06:33:21 then some minor tweaks May 16 06:33:29 and hooray, it will be time to work on fun code again. May 16 06:34:11 SQL blows May 16 06:34:13 but it's so powerful May 16 06:34:43 readme, ok cool...this is working. thanks May 16 06:35:16 readme, so...if the contact has multiple numbers (cell, work, etc) I should just expect that to come up under multiple different rows linked to the same id? May 16 06:36:02 each row is an entity, that has a type, corresponding to the CONTENT_ITEM_TYPE of each of the classes in CommonDataKinds May 16 06:36:38 so if the MIMETYPE matches that class' CONTENT_ITEM_TYPE, then all the columns of that class will be present IF they are set. May 16 06:37:11 JakeWharton: i'm sharpening my SQL axe on the book SQL for smarties May 16 06:37:21 yeah SQL is amazing May 16 06:37:28 I kind of like SQL, it's a hell of a lot better than dealing with a ContentProvider :) May 16 06:37:41 I don't use relational stores anymore thankfully but it's really a perfect language for that data model May 16 06:38:57 JakeWharton: what do you use instead of relational db? NoSQL? May 16 06:39:05 readme, ok...got it. wow. whoever designed this db needs to go back to cs 101 May 16 06:39:17 mahamoti: yes, i find it quite abominable. May 16 06:39:22 document databases and key/value stores most recently May 16 06:39:27 I'm really excited about graph databases though May 16 06:39:33 can't wait to try Neo4J in something practical May 16 06:40:16 i downloaded a source.zip May 16 06:40:39 readme, any reason why you didnt just do: while (nameCur.moveToNext()) {...} ? May 16 06:40:45 i have ADT plugin , IDE java thing , adk May 16 06:41:05 i have ADT plugin , IDE java thing , adk. downloaded a source.zip file with many files inside May 16 06:41:19 how to compile and make .apk file for phone ? May 16 06:41:19 dunno May 16 06:41:27 no particular reason, I guess. May 16 06:41:31 and have jdk 1.7 May 16 06:44:30 npoxyh5: Based on your current situation and that we don't know if you have any prior Java experience, I'd say that you should first try to program and run Hello World from http://developer.android.com and skip the "source.zip" file for now. May 16 06:49:11 readme, so...actually ContactsContract.CommonDataKinds.Phone.NUMBER and ContactsContract.CommonDataKinds.Email.ADDRESS, for example, both map to data1...when you make that a global projection it ends up pulling all those fields for every row type and just putting bogus data in them. the other perhaps cleaner way is to cast the enums to ints and then take the set of unique values, then May 16 06:49:11 use different column indices depending on the mimetype...lol May 16 06:49:32 right May 16 06:49:36 super ridiculous. May 16 06:49:39 sorry to strings not ints May 16 06:49:43 you can't use any of the advantages of SQL May 16 06:49:49 because they flattened it May 16 06:49:57 and your relation is done with a string comparison May 16 06:50:05 I think I seriously hate ContentProvider May 16 06:50:10 1 big table to store all data, and in the darkness bind them into spaghetti. May 16 06:50:22 this is maybe the first time I've actually hated a tool. May 16 06:50:24 other than windows. May 16 06:50:59 the windows api is, imo, one of the best documented and easiest to use apis of all time..seconded only to directx...but thats jut me haha May 16 06:51:09 oh, not the API, the OS itself bothers me. May 16 06:51:12 I never programmed for it. May 16 06:51:17 all OS bother me May 16 06:51:42 most notably the registry May 16 06:51:55 the reason it's like this is because they had to compromise on flexibility in order to make a structured way to share data between apps, but I don't know if it actually had to be this bad :| May 16 06:52:28 they could have made standard tables for standard data though May 16 06:53:20 hey, just look at it as barriers to entry for the competition. May 16 06:54:16 yes, and it gave me material for a blog article that should score some hits later when I write it. May 16 06:55:31 under the hood, there could be multiple tables May 16 06:55:37 but we're not allowed to use them May 16 06:55:42 Sigh. Yet another Android WTF. If my app's service runs for a longer time, it seems to be caching the nameserver from my other LAN, preventing the app from connecting ever again. May 16 06:56:02 readme, that table has 71 columns btw May 16 06:56:12 haha May 16 06:56:49 the first WTF was when I saw: DATA1, DATA2, DATA3... May 16 06:57:30 ok, time to work May 16 07:02:19 programming is mes May 16 07:17:06 readme, http://pastebin.com/rKSUN1bk May 16 07:21:41 hello May 16 07:31:28 hallo everybody! May 16 07:32:45 Good morning May 16 07:33:30 i got a problem clearing an arrayadapter. i'm searching for bluetoothdevices and show the found devices in a listview. pressing the refresh-button should clear the arrayadapter an search again for devices. i'm using the clear-method, but after refreshing the same device is shown twice May 16 07:33:54 i googled around a lot of time, but didn't find a solution May 16 07:34:04 anyone has a suggestion? May 16 07:34:18 I would use my own adapter extending from BaseAdapter and keeping an ArrayList of items yourself May 16 07:34:27 ^ This May 16 07:36:13 i can't do it like i said? May 16 07:36:14 anyway clear followed by addition of new elements should be enough... I imagine arrayadapter notifies its views automatically May 16 07:37:07 i wounder why the devices a shown twice May 16 07:37:15 one momen, i show you the code May 16 07:37:49 http://pastebin.com/ZTVxQWJy May 16 07:37:51 here it is May 16 07:41:38 i debuged it May 16 07:42:24 an the arrayadapter is cleared, thats good. but after discovering there is one more device in my list everytime May 16 07:51:30 chris_cross: eh, maybe you keep on re-registering the receiver May 16 07:52:04 imho you should unregister the receiver on the discovery complete event May 16 07:52:32 ok, i try this, thank you so much! May 16 07:52:54 also I don't subjectively like it how you start discovery *before* you register the receiver for it. I'm pretty sure the discovery doesn't start before that method returns, so it doesn't matter, I just think it's ugly May 16 07:53:30 ok May 16 07:53:42 but it was the example code of android developers :D May 16 07:54:49 oh, no, it wasn't May 16 07:54:50 sry May 16 07:55:15 it might actually be best to create the receiver in the onCreate, then add it there, then remove it in onDestroy May 16 07:55:37 that reduces the bluetooth search function to just clearing the adapter and starting the discovery May 16 07:57:04 ok May 16 07:57:07 i do it May 16 07:57:12 thank you very much! May 16 07:59:08 works fine! May 16 07:59:30 jump jump May 16 07:59:35 Hi, I wanted to know, if I setId to a view dynamicly, how can I findbyId my view from another place in my code? May 16 08:00:16 as I understand it, you use just the same integer you set in setId May 16 08:00:37 setId(MY_ID); ... findById(MY_ID); May 16 08:01:30 yes, but for some reson (I don't know why) the program crash May 16 08:01:41 well read the log to find out why it crashes May 16 08:02:27 I can't. because I connect the tablet for another device.. so I can connect it to the computer... May 16 08:03:00 *can't connect May 16 08:03:38 but you say it spouse to work if I just do : findViewById(My_ID) May 16 08:03:41 ? May 16 08:03:49 run it in an emulator then May 16 08:03:52 That is my understanding May 16 08:03:56 who says it has to be a physical device May 16 08:04:07 My understanding isn't necessarily correct o:D May 16 08:05:12 thanks May 16 08:05:32 If you continue to have errors, post some code, errors May 16 08:11:32 I connect the tablet for another device.. so I can connect it to the computer... <- wut? May 16 08:12:53 even with can't connect to the computer May 16 08:13:00 wtf does that mean? May 16 08:13:11 embed ^ May 16 08:25:17 hi May 16 08:25:35 Napalm|afk are you around? May 16 08:33:24 I don't know what was wrong before, I didn't change my code and now it's work... May 16 08:35:10 Sleepybear: sorry I wasn't here.. I connect my tablet to a board I created, and because in the tablet you have only one exit, i can't connect it to my board and to the comuter at the same time, so I can't see the log.. May 16 08:37:26 has anyone ever used the HorizontalListView from http://www.dev-smart.com/archives/34 ? May 16 08:38:56 embed use adb over wifi May 16 08:39:35 can a child remove itself from a parent? May 16 08:40:19 views. can a child view call itsparent.removeView(it) ? May 16 08:42:44 any reason why setting the visibility to GONE isn't sufficient? May 16 08:42:48 Hello, i have a question. How can i display a text in more than one line? i get errormessages out of an arraylist, and display them in a tablelayout. Because of the different length some of this "errors" are out of the diplay May 16 08:43:32 Strohler use multiLine textviews? May 16 08:44:08 though I thought they automatically word-wrapped stuff May 16 08:44:40 Strohler probably has to do with the tablelayout, look into shrinkColumns and stretchColumns May 16 08:45:50 i tried with shrinkColumns, the problem was the value of this i tried shrinkColumns="*" for all lines May 16 08:48:48 i try now thank you very much May 16 08:55:56 has anyone ever used Paul Soucys HorizontalListView from http://www.dev-smart.com/archives/34 ? May 16 08:56:33 How can I have an activity running in background? May 16 08:57:28 I have been looking into validating imported xml in Android... Is it true that schemas are not supported in Android at this time? As suggested in this SO.com question: http://goo.gl/ecZl9 May 16 08:58:39 Hi! I have 2 activitise: first and second. in first i have public static int value = 13 and in onResume i set 100500 to value. in first Activity i have button wich starts Second activity in [b]diferent process[/b]. in second activity i display my static value on TextView and i see 13 instead of 100500. why i see 13 in second activity instead of 100500? May 16 08:59:15 Tsukaza: You probably want a Service: http://developer.android.com/reference/android/app/Service.html May 16 08:59:47 I have a service :P And inside that service there is an activity... but when I start it the activity pops out and dont want too May 16 08:59:51 Any idea? May 16 09:00:20 Why are you making an Activity in a Service? May 16 09:00:41 Im using bluetooth chat with a few more classes, and they need an activity to run properly May 16 09:00:52 at the same time I need all that stuff to be a service to run in background May 16 09:00:59 Smthg like: May 16 09:01:29 Main Activity -> Service(Start at BOOT) -> Activity -> Multiple classes communicating each other filling a Database with data May 16 09:01:30 You don't want to be making an Activity inside a Service. That is very bizarre. May 16 09:01:41 There must be a better way May 16 09:02:08 Atm I do not know a better way. May 16 09:02:29 Why do you think you need an Activity May 16 09:02:54 Can't you pass through a context from the service to the other classes? May 16 09:03:15 If you require access to resources May 16 09:04:29 Well, withouth the activity there are a few methods that wont work... I dont have much experience in Android so I dont know how to solve them May 16 09:04:52 I am using some code from Android Dev for the Bluetooth Chat, and withouth the activity I cant put it to work properly May 16 09:05:02 The android phone is connecting to a sensor May 16 09:05:08 and exchanging data May 16 09:05:32 There will be a way. Activities are designed to be displayed to the user. May 16 09:05:52 Is there smthg similar to Activities? May 16 09:05:57 If you have a background task of that type, you use a Service. May 16 09:06:23 Which code are you using for the Bluetooth chat May 16 09:06:33 The code provided in Android Dev May 16 09:06:38 The SDK? May 16 09:06:38 let me search for it May 16 09:06:58 http://developer.android.com/resources/samples/BluetoothChat/index.html May 16 09:07:22 it is very different from the original but it came from there May 16 09:08:13 what's the best way to implement a chat? i hear push messages might be required from the server, is this right ? May 16 09:09:03 Knossos, What you say is take the code in the activity and try put it to work on the Service? May 16 09:09:24 on the service class May 16 09:09:30 or a class that the service calls? May 16 09:10:07 What I'm saying is you need to put all bluetooth related stuff in the service, and implement a messaging protocol between your activity (when it is open) and the service. May 16 09:10:35 You could use Broadcasts from your Service to your Activity May 16 09:10:46 As an example May 16 09:11:31 ddreamer0: That all depends on how important battery life is compared with speed of message reception. May 16 09:11:41 Ok im going to search it out, ty May 16 09:11:48 No problem Tsukaza, good luck May 16 09:13:13 ddreamer0: use XMPP May 16 09:13:19 ddreamer0: One solution is to use C2DM. The cloud sends you a short ID to let your client know it needs to update its chat because someone spoke. May 16 09:13:27 a c2dm push notification is a poor tool to implement a chat May 16 09:13:32 it's not even guaranteed to be delivered May 16 09:13:36 XMPP is probably better, though I haven't used it May 16 09:13:46 c2dm is useful for very few things. May 16 09:13:47 imo May 16 09:13:59 it's more of icing on a cake May 16 09:14:05 than a vital part of an infrastructure May 16 09:14:37 it's good to use for notifying someone when it's not critical May 16 09:14:50 How can I have a Service requesting to turn on the Bluetooth for example? With the Activity I send an Intent to REQUEST_ENABLE_BT, but inside a service I cannot do that. May 16 09:15:09 Do to so in the Activity I use the startActivityForResult method May 16 09:15:14 To do so* May 16 09:15:23 hello May 16 09:17:57 Tsukaza: have you tried the enable/disable methods on http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html ? May 16 09:18:28 Tsukaza: you can't turn on bluetooth without user intervention. May 16 09:18:51 at least, you can't pair May 16 09:18:59 maybe you can turn it on and off. if you can it's useless May 16 09:19:01 it is already paired May 16 09:19:08 if it's paired then bluetooth is already on. May 16 09:19:09 It will always be paired May 16 09:19:19 Its the same Sensor and same Phone, ever May 16 09:19:30 even if it stays paired, you will have to repair it because the bluetooth stack is lousy. May 16 09:19:36 it's not perfect. May 16 09:19:46 the user is going to have to occasionally unpair the device manually and repair it. May 16 09:19:51 re-pair, rather. May 16 09:20:11 the re-pair for now will be done by the user May 16 09:20:14 not the program itself May 16 09:20:17 oh, it always will be :) May 16 09:20:23 until like android 12 May 16 09:20:29 Yeah always be :P May 16 09:20:40 but that part is not really "our" concern May 16 09:20:57 I just need to ask the user if he wants to turn Bluetooth On if it is disabled May 16 09:21:01 or simply turn it on withouth asking May 16 09:21:24 Does anyone know why Eclipse is intent on generating a hundred \'s on lines in my project.properties? May 16 09:21:57 android.library.reference.1=..\\\\ (\ * 100) LibraryName May 16 09:23:20 Cus eclipse May 16 09:23:35 :> May 16 09:25:55 isn't project.properties handled by the adt ? May 16 09:26:14 hi May 16 09:26:28 readme: does xmpp support some kind of server -> client notification for new messages? similar to a push ? May 16 09:26:33 yeah, so its probably the adt fucking it up May 16 09:27:07 http://pastebin.com/cTPzEpsp May 16 09:27:08 Example ^ May 16 09:27:26 There was the same issue when I used eclipse.. which is a long time ago May 16 09:27:38 No idea what triggers it, or if it's even reported May 16 09:28:04 It isn't causing any bugs or errors so far, so I'm content to leave it to its' craziness May 16 09:28:07 i've never seen that before May 16 09:32:57 I have one Rect(x1, y1, x2, y2) and i want to create a new rect based on this rect with some modification like like this Rect2(Rect1.x1+10, Rect1.y1+30, Rect1.x2+40, Rect1.y2+10) but I cant find method to get left, right, top, bottom from my rect. How can I do this ? May 16 09:33:48 Rect.left Rect.top etc ... May 16 09:36:45 ddreamer0: it's what google talk uses, so anything google talk does it supports. May 16 09:36:56 jabber, etc. May 16 09:37:13 it's the defacto standard for instant messaging May 16 09:37:19 and has multiuser chat extensions. May 16 09:37:33 if not XMPP and you want multiuser chat, I say use irc. May 16 09:37:47 Hi guys, got a wierd bug on my listview on ICS… somethimes the screen goes almost completly black.. but when something that updates the view like a menu in actionbar, the specific area that is updated is shown but nothing else. please see this screenshots: http://warting.se/temp/bug.png http://warting.se/temp/bug2.png May 16 09:39:25 have someone experience the same problem? May 16 09:39:29 SimonVT: thx May 16 10:04:31 Kannibal: try turning off hardware acceleration May 16 10:05:11 May 16 10:12:37 g00s: I have tried that without success May 16 10:12:53 :( May 16 10:18:24 Hey guys, I want to upload an image file to a server. Is there any easy frameworks you people use instead of writing data to the output stream of an HttpUrlConnection? May 16 10:37:25 hello h00s ! May 16 10:42:02 hi May 16 10:43:55 i have a ListActivity. I open an SQLite database, add some leements to the listview, then i close the database. here's the code: http://pastebin.com/vtmnbMvy May 16 10:44:45 there is lots wrong with that code May 16 10:45:01 it works fine, until i start scrolling up and down, because then a iget this error: Leak found, SQLite database created, but never closed May 16 10:45:02 Donpedro: consider using a CursorLoader May 16 10:45:46 Donpedro: its been a while since i looked at this, but i think its because i finalizer was called before close() was called May 16 10:46:15 this was weird in pre - ics, not sure if its still this way but ... May 16 10:46:19 just leave the db open May 16 10:46:31 if i leave teh db open, i get the same error May 16 10:46:44 make your loader a singleton, so its not finalized May 16 10:47:05 and gc'd May 16 10:47:34 also, you're doing db stuff on the main thread May 16 10:47:46 and you're assuming moveToNext will succeed May 16 10:47:58 i still don't understand the base problem May 16 10:48:02 burn this code, start from scratch May 16 10:51:24 but i still don't understand what causes this, the error says my db was never closed, however i called close(). If i don't call close, it stays the same. If my object gets destroyed before the .close() call, why don't i get an error like a nullpointerexception when i'm trying to call close() ? May 16 10:59:25 Hi all..could anyone tell the opengl texture coordinates for triangle..thanks May 16 11:08:26 what's the equivalent of Settings.Secure.putString in API15? I'm trying to enable gps if it's not enabled May 16 11:11:12 .. May 16 11:11:35 betim: afaik you can't since too many devs abused the ability to enable the gps May 16 11:12:45 hmm, even though the device is rooted? May 16 11:13:13 betim: that's a bit OT for this channel, ask in #android-root perhaps? :) May 16 11:13:27 appel1, cheers :) May 16 11:13:44 betim: it isn't a very active channel though May 16 11:25:42 Could anyone tell me how to view reviews for an app in all languages? It only shows me english reviews, even in dev console :/ May 16 11:26:25 is the filter set to all languages? May 16 11:27:19 Amphoras: where do I change that? May 16 11:27:37 oh, I am blind, yes its set to all languages May 16 11:27:41 in the dev console when you click on comments, its at the top May 16 11:28:01 I don't know why its doing that then, its showing them all in mine May 16 11:28:01 or is it possible to leave a star-rating without leaving a comment? May 16 11:28:07 yes May 16 11:28:13 ok, that explains it, thanks :) May 16 11:28:33 it should be compulsory to leave a comment for less than 5 stars :P May 16 11:28:40 hehe, indeed May 16 11:29:00 Amphoras: then you'd get comments like aohgsegdahug May 16 11:29:16 better to have those then, at least you know the user is an idiot :P May 16 11:29:26 and there is nothing you can do about it May 16 11:29:31 appell theTroy: exactly May 16 11:29:51 I'd also love to know the uninstall reason >.> May 16 11:29:58 but I guess that is wishing for too much May 16 11:32:06 i have a listview, i set its background color to white. If i scroll, the background is temporarily set to black, Why is that? May 16 11:33:13 nvm, fixed it May 16 11:38:46 have anyone seen this one before ? May 16 11:38:47 http://pastebin.com/qMrbwQWy May 16 11:42:02 hey how do I generate R.java files in android while in eclipse? May 16 11:47:29 john_doe_jr: R.java will automagically be generated for you May 16 12:19:15 i want a small game project :( May 16 12:19:26 xxo May 16 12:22:53 so in principle calling finish() after every startActivity() is somewhat equivlane to using the noHistory-flag? May 16 12:25:48 Hi!! ? is not allowing question mark how do i do it ? May 16 12:27:05 "question?" ? May 16 12:29:56 I dont see the point on using a preset string for a question mark May 16 12:32:11 ars_: its just a text on the button. May 16 12:32:47 bsilwal: try ? or #&003F; May 16 12:33:12 Eh F apparently May 16 12:33:43 bsilwal: but question mark is always a question mark. No need for localisation etc, so why don't just hard code it? May 16 12:33:58 Geez May 16 12:34:03 Resuse is good May 16 12:34:03 ars_: its in my string.xml May 16 12:34:06 Reuse May 16 12:34:48 hello :) May 16 12:35:02 Use in many places -> decide to change character -> have fun spending a couple of hours going through code May 16 12:35:25 in spain a question begins with an upside-down question mark May 16 12:35:30 As opposed to Use in many places -> decide to change character -> change in strings.xml -> get important stuff done. May 16 12:35:35 what is escape character that I can use in XML ? May 16 12:35:46 F doesnt seem to work HDroid May 16 12:36:24 HDroid: of course, but _only_ a question mark. Wouldn't want to use _only_ a question mark labeling lots of stuff May 16 12:36:44 I've a best practice question. I've a listview. each item of this listview contains some textview and an imageview. The image to be placed in the ImageView needs to be downloaded by internet. What would you suggest? Creating 1 thread with a queue of "tasks"? Or download them 1 by 1 using 1 asynctask per image? May 16 12:37:02 ars_: who cares, apparently someone does, no need to skimp on the implementation. May 16 12:39:19 HDroid: yup, i know, you got a point.. was just wondering why using it that way. May 16 12:45:05 I've got a GPS coordinate (lat/long), can I send these to google maps (on android) and start navigation? May 16 12:47:05 is it possible to set system locale from within an app? May 16 12:48:00 XeruX: http://developer.android.com/guide/appendix/g-app-intents.html May 16 12:49:02 XeruX: you can open the maps in a certain location, but apparently not start a direction search direrctly May 16 12:49:56 hi May 16 12:50:07 ars_: ok, say that I really want to start a direction-search from where I'm at, to a certain location (lat/long).. Not possible? May 16 12:50:15 That makes me a sad panda May 16 12:50:24 has anyone tried the Gallery class tutorial? it's crashing on me unexpectedly May 16 12:50:38 http://developer.android.com/resources/tutorials/views/hello-gallery.html May 16 12:53:11 XeruX: there is a Direction API you could use, but that's not linked to the maps app May 16 12:53:14 https://developers.google.com/maps/documentation/directions/#DirectionsResponses May 16 12:55:34 XeruX: you can use the MapAcptivity and draw the directions on top of that of course May 16 12:56:30 how do I set button size with respect to screen size? May 16 12:57:01 ars_: what if I create a mapActivity, will I be able to display a route then? May 16 12:57:52 will this do the trick ? android:layout_width="fill_parent" May 16 12:58:18 not route as in the route you've walked, but the route to the place you want to go (directions) May 16 13:01:08 yes, get the directions from Directions API, draw the directions as an overlay to the map May 16 13:02:02 anyone know why i would need to drop and recreate my sqlite tables each time my app startes because it refuses to acknowledge a row exists? May 16 13:17:05 hey guys, does any of you have experience sending h263 video using rtp? I'm having some issues with it. It happens that the same code works perfectly from my galaxy S but it doesn't work from my Asus Transformer Prime http://stackoverflow.com/questions/10444972/h263-broken-packets-over-rtp-stream May 16 13:17:51 I have a problem with ListView and ListActity. I am testing something like this: http://www.vogella.com/articles/AndroidSQLite/article.html#databasetutorial_ui I am building a List from database elements and then pass it to ArrayAdapter. But then it shows the labels of each element of the list, not the contents of the element. May 16 13:27:26 when passing data through an intent, if it possible to do a hash May 16 13:29:02 i have two views, one view performs an animation, now do i make it where its animation is drawn behind the other view? May 16 13:40:17 how do this happen ? Could not find method com.google.ads.AdRequest.addTestDevice, referenced from method the class should be there ? May 16 13:42:21 ars_: ok, so I've decided to use the MapActivity and draw an overlay.. However, the poinst I receive which I need to draw are encoded, but the docs doesn't say how to decode it (or how it's encoded).. :( May 16 13:54:07 how do i pass an object from doInBackground to onPostExecute. I need to pass "product" on line 22 so I can use it onPostExecute: http://pastebin.com/AEKP0PwW May 16 13:56:22 Whatever you return from doInBackground is passed to onPostExecute May 16 14:06:21 how much is too much in a broadcast receiver? :) May 16 14:06:46 never to much! May 16 14:07:25 whats wrong on line 7 ? https://gist.github.com/51167f6e5c61ad7b3635 May 16 14:07:33 Ive got about 100 lines of code, everything straightforward May 16 14:07:51 some if statements, a stream tokenizer May 16 14:08:24 and I occasionally get a FC during broadcasts, and wonder if thats the issue May 16 14:08:41 bsilwal: You're missing an if May 16 14:09:00 ironhalik: Your broadcast receiver runs on the main thread. So as a general rule, as long as you aren't doing any file i/o, networking, or other serious blocking operations, you should be fine May 16 14:09:24 SimonVT: This is still asking for semicolon on line 7 May 16 14:09:24 If statements, stream tokenizer - probably fine. The thing the stream tokenizer is reading off of may not be okay, though. May 16 14:09:25 https://gist.github.com/51167f6e5c61ad7b3635 May 16 14:09:46 billjings: so avoid anything that has to wait for a response/data? May 16 14:09:55 Exactly. May 16 14:10:11 billjings: great, thanks May 16 14:10:30 Or, you know… calculate the millionth digit of pi or something. :) May 16 14:12:10 ;> May 16 14:12:40 you can remove that later and show off how much you optimized battery usage May 16 14:12:47 bsilwal: If you seriously don't know how to make an if else if statement, I strongly recommend you do some java tutorials May 16 14:13:23 SimonVT: I just moved to Java from PHP you are right i need to dig Java Turorials May 16 14:13:27 :( May 16 14:16:24 I am trying to return "post" on line 35 of doInBackground so i can use it in onPostExecute, but apparently my scope is off for post becasue return post is giving an error that post isn't defined. how do i pass post to onPostExecute? http://pastebin.com/BWSPFHgV May 16 14:18:51 declare String post at top function level May 16 14:18:57 dschuett: you have to define it String post = null; outside (before) the try/catch May 16 14:19:17 (or return post from the try / catch block and return null or "" where you return post now) May 16 14:30:31 ive got a very weird problem, i have 3 buttons which each simply call loadurl on a webview, they all use the same method call with different urls, 2 of them work perfectly (ie the page loads in the existing webview) but 1 of them launches a browser, as if ive specified an intent but i havent.. properly clueless here, ideas? May 16 14:31:05 its probably doing a redirect of some kind May 16 14:31:13 and you arent overriding the webview client to catch URLs May 16 14:31:26 ah May 16 14:31:28 could be! May 16 14:31:39 damn ur smart May 16 14:31:41 :) May 16 14:31:45 i know May 16 14:31:49 :P May 16 14:32:02 ugh i have an objective-c quesiton May 16 14:32:09 ouuuch May 16 14:32:09 gtfo May 16 14:32:14 i kno rite May 16 14:32:18 mikedg you around? May 16 14:32:31 or are you too busy spraying babies with water May 16 14:32:49 ah thats the secret to obj-c! May 16 14:33:02 no wonder mac users take to it so easily May 16 14:36:42 absolutely spot on canadiancow, thanks May 16 14:37:09 yea... once you use a webview once, you never make that mistake again :P May 16 14:37:38 never seen it before May 16 14:37:47 love webviews tho May 16 14:37:56 lots of this apps gui is just web sites May 16 14:38:01 and it looks fine May 16 14:38:04 what was your obj-c question o_O May 16 14:38:20 nm i think i got it May 16 14:41:47 how can i set layout_width inorder for the text to appear in the middle of the screen ? May 16 14:41:54 and height May 16 14:43:08 well bsilwal, thats more of a gravity issue May 16 14:43:19 you can set the gravity of the textview to center_horizontal May 16 14:43:31 luxurymode: (y) May 16 14:43:45 the width can just be fill parent May 16 14:43:50 then set gravity to center May 16 14:44:17 actually, useful to know the difference between gravity and layout gravity May 16 14:44:18 http://systemerrorcs.wordpress.com/2011/06/06/android-layout_gravity-vs-gravity-wrap_content-vs-fill_parent/ May 16 14:44:25 that looks like a good enough explanation May 16 14:44:57 luxurymode: you are a real luxury thanks May 16 14:45:09 lol no problem May 16 14:45:15 also relativelayouts are really nice May 16 14:45:18 learn to love them May 16 14:45:33 they let you center children horizontally, vertically, both, very easily May 16 14:45:45 digging it May 16 14:46:17 note that relative layout for one view is overkill though ;D May 16 14:46:40 though you'd still need the gravity of the actual textview to be centered however you want because the centering of the TV within the RelativeLayout is a different idea May 16 14:46:44 zinx, true May 16 14:47:02 just making throwing it out there cuz i see a lot of people avoid relativelayouts when they can be really helpful May 16 14:47:07 theres more than just linearlayout May 16 14:47:27 also, any proof that performance or memory is harmed when using a relative vs linearlayout? May 16 14:47:36 intuitively it makes sense but wondering if theres any proof May 16 14:47:44 i'm sure it is if you use nested relative layouts May 16 14:47:47 i know a framelayout vs a linear/relative is better, bu yeah... May 16 14:47:57 zinx yeah well not talking about nested necessarily May 16 14:48:01 as for nested linear vs one relative, i have no idea May 16 14:48:10 deep nesting with anything is gonna become a problem May 16 14:48:14 but yeah good point May 16 14:48:16 but single level linear vs. single level relative, the linear's going to be smaller May 16 14:50:43 Just because the RelativeLayout construction is more complicated? More frills in there that LL doesn't have? May 16 14:50:48 I think you're probably right... May 16 14:50:50 yes May 16 15:01:45 Coz i am new i am asking all this trivial questions. When my application is closed unexpectedly how do i figure what went worng? May 16 15:02:19 bsilwal: http://developer.android.com/guide/developing/tools/logcat.html May 16 15:02:29 If you're using eclipse, there's a tab for it somewhere as well May 16 15:02:46 Right thanks HDroid May 16 15:09:39 can i make use of System.out.println ? May 16 15:10:15 use android.util.log May 16 15:10:19 or whatever it is May 16 15:10:25 (y) May 16 15:11:27 erm actually i want to see the expection caught in the catch block. May 16 15:11:33 yea May 16 15:11:35 log May 16 15:11:59 use logcat May 16 15:12:07 you can print the error stream to logcat May 16 15:12:12 how about a debugger? May 16 15:12:32 how to make project file May 16 15:13:02 with a project file creator May 16 15:13:09 vague question gets vague answer :P May 16 15:13:14 or you can use e.printstacktrace May 16 15:13:27 . May 16 15:13:28 jluw9o the project file in eclipse is generated when you create a project May 16 15:13:37 general project files May 16 15:13:43 there's no such thing May 16 15:13:55 what is a general project file? May 16 15:14:02 there is no e.printstacktrace? May 16 15:14:06 with Content Index Acknowledgement Undertaking Data-flow-diagram state-diagram sys-req etc May 16 15:14:10 e being the error you catch May 16 15:14:18 and code May 16 15:14:26 trying it now. May 16 15:14:29 and end thank you May 16 15:14:30 try { } catch (Exception e) { e.printstacktrace() }; May 16 15:14:41 dmalice: did that May 16 15:14:49 setContentView(R.layout.main); is erroring, saying it doesn't exist, when main.xml is there and it worked a few min ago May 16 15:15:08 Mrono: clean and build again May 16 15:15:17 i cant unerstand anything from internet or ebooks :( May 16 15:15:30 just want a sample app May 16 15:15:39 it's technically e.printStackTrace() May 16 15:15:41 camel case and what not May 16 15:15:48 jluw9o: what kind of sample app May 16 15:15:55 a flash window with something written on it and uses touchscreen slide to cycle May 16 15:16:08 I installed EclEmma the other day, managed to get coverage working for my Android-project. Was a little bit overzealous cleaning up the run configurations, and now I can't get to work again. Has anybody had similar experiences? May 16 15:16:22 10 drag slide flash windows May 16 15:16:36 how big'd that source b May 16 15:16:38 like May 16 15:16:52 i can write in few hours or needs many days ? May 16 15:17:21 and why isnt there a standard dedicated programming lang/compiler for android May 16 15:17:51 wongk: didn't fix it May 16 15:18:02 its messed trash. need to 1st install java jdk 1.7 then IDE then ADT plugins then ANDROIDADK-SDK then . May 16 15:18:05 it says it has wrote stack trace to '/data/anr/traces.txt' but i cant find the location, where is it May 16 15:18:06 ? May 16 15:18:16 then still looks like incomplete May 16 15:18:37 why would yuou need a dedicated lang/compiler for android May 16 15:18:45 no direct compiler to convert .java file to .apk ? May 16 15:18:54 no May 16 15:18:58 because you can't compile directly into an apk May 16 15:19:13 jluw9o: that's like asking to go from .java to .zip May 16 15:19:15 no matter your choice of language May 16 15:19:22 or compiler May 16 15:19:22 but the OS Android is standard and in billion fones May 16 15:19:30 what's your point? May 16 15:21:30 R.layout.main isn't resolving when the file exists, any idea how to fix it May 16 15:21:37 * mcmlxxix curses at his backgroundDrawable()s randomly disappearing May 16 15:21:39 the fact that android uses java is a ginormous benefit May 16 15:21:54 ive been stuck on this bug for days May 16 15:22:50 Mrono, if cleaning and rebuilding doesn't work then it's likely you're doing something improperly May 16 15:22:57 or your eclipse just isn't resolving it prior to build May 16 15:23:09 and you can actually just run it and it will resolve on compile May 16 15:23:25 "Your project contains errors...." May 16 15:23:32 close and restart eclipse May 16 15:23:36 mind looking at it to see what i'm doing wrong? May 16 15:23:39 post screenshot of directory structure May 16 15:23:44 dmalice: did that May 16 15:23:45 k May 16 15:23:58 Mrono: hehe, click the error and delete it :P May 16 15:24:08 Mrono: it will force eclipse to re-evaluate May 16 15:24:18 make sure you haven't accidentally imported android.R May 16 15:24:33 dmalice: >.> May 16 15:24:55 * Mrono deletes "import android.R;" May 16 15:25:01 :P May 16 15:25:01 lulz May 16 15:25:03 it happens May 16 15:25:08 could anyone tell me what i am doing wrong? its not able to open the new activity screen https://gist.github.com/48a887f739c95d82e443 May 16 15:25:24 eclipse code-complete stuff is a blessing, but can sometimes be a curse May 16 15:26:19 I am trying to open this activity: https://gist.github.com/adfec2e99777e0decf4b May 16 15:26:43 well the key value is different May 16 15:26:53 even if its same its giving problem May 16 15:26:57 the way you launch your intent is strange May 16 15:27:28 dmalice: how come ? May 16 15:27:44 Intent myIntent = new Intent(); May 16 15:27:44 myIntent.setClassName("project.planning.poker", "project.planning.poker.EstimateActivity"); May 16 15:27:54 delete the second line, change the first line to May 16 15:28:06 sfsdfd May 16 15:28:07 Intent myIntent = new Intent(this, EstimateActivity.class); May 16 15:29:07 ah looks like yours is a shortcut. Less code looks cleaner May 16 15:29:09 could someone please explain the difference between using tiwlan0 and rmnet0 as the wifi controller interface.... May 16 15:29:18 (t-mobile g1) May 16 15:29:36 * evancharlton checks his calendar May 16 15:29:41 has anyone else had an issue with backgroundDrawables disappearing? and if so, did you solve it? May 16 15:29:43 whoa, I thought I was in 2008 for a minute May 16 15:29:55 dmalice: due to some reason it is still showing unexpected error occured (puke) May 16 15:29:59 has anybody gotten EclEmma to play with Android? May 16 15:30:11 have you declared EstimateActivity class in your manifest? May 16 15:30:16 nada? May 16 15:30:46 dmalice: https://gist.github.com/e6d752e94c44c63362e1 May 16 15:31:05 take out the intent filter stuff for estimate activity May 16 15:31:14 oh right May 16 15:31:55 at that point if it still doesn't work then something strange is definitely going on May 16 15:33:01 nop not working. May 16 15:33:09 mcmlxxix what do you mean disappearing? As in they show up at first and then disappear? or, they show up sometimes and not other times? May 16 15:33:24 can you post the error message you're getting bsilwal? May 16 15:34:13 i mean they show up (always) on initial load, and 90% of the time they draw as expected May 16 15:34:34 but occasionally the drawable, and the color ive applied to it, will just drop off of the screen May 16 15:35:22 error in console dmalice https://gist.github.com/c6035a25ded22e2ad3c8 May 16 15:35:41 to put it in context, ive extended some imagebuttons with transparent source drawables, and created a GradientDrawable to set as the background May 16 15:36:09 through the course of the app, i am changing the colors of the background drawable (gradient drawable) May 16 15:36:24 and also changing the foreground drawable May 16 15:36:27 @bsilwal, there's no error message in there.. May 16 15:36:40 the foreground always works as expected, the background sometimes disappears May 16 15:36:46 realized.. just trying to copy LogCat now May 16 15:37:29 dmalice: https://gist.github.com/f34bacff9a045ed812b6 May 16 15:37:35 interesting mcmlxxix, i'm not sure what's causing that, but have you tried simply reapplying the background drawable each time you change the forground? May 16 15:37:35 thats logcat May 16 15:38:12 dmalice: yeah, i even tried recreating the GradientDrawable() on every single change and it still happens sometimes May 16 15:38:32 bizarre... May 16 15:38:55 I was previously using a drawable resource, but had further problems in it periodically being cast to a ColorDrawable on getBackground(); May 16 15:39:00 driving me insane May 16 15:39:53 @bsilwal, it seems like it's not finding the method you've declared for onclick in the layout xml, can you post your xml layout for main? May 16 15:40:28 dmhttps://gist.github.com/dcdca2e9a2353a806338 May 16 15:40:35 sorry dmalice https://gist.github.com/dcdca2e9a2353a806338 May 16 15:41:32 It needs to be public May 16 15:41:51 hey guys, is it possible to access/edit APN settings from a third party application ? Do you have some snippets related to this ? May 16 15:42:08 SimonVT: what gist ? May 16 15:42:13 Your onclick May 16 15:44:06 SimonVT: genius May 16 15:44:18 everytime i call Resources.updateConfiguration(Configuration, DisplayMetrics); the application layout get's smaller and smaller ! do anyone know how to prevent this ? i automaticly call this when my app loades to set language. it is my code is based on what i find on http://groups.google.com/group/android-developers/browse_thread/thread/fd918e4c7c3397ec and other locations similar May 16 15:44:40 sorry, had to step out for a sec May 16 15:44:53 oh you've got it solved May 16 15:44:57 cool stuff May 16 15:45:05 yes i did yippy. thanks to SimonVT May 16 15:45:10 hi! can i write software that uses new features of ice cream sandwich and still is backwards compatible with, say, 2.3? May 16 15:45:16 Thanks to dmalice as well :) May 16 15:45:25 yeah, if you don't have an access defined it will be accessible only within classes in the same package May 16 15:47:17 i mean can i test for os version and run 1 version of an activity for 2.3 and, if supported, another version for 4.0? May 16 15:48:36 or do i have to write the whole app for one api version? May 16 15:48:36 5sdg2h. May 16 15:49:33 ultrixx, why would you even want a separate activity May 16 15:49:37 you run one activity on all versions May 16 15:49:42 ok May 16 15:50:40 so i write an activity which uses 4.0 functionality, but users with version 2.3 should also be able to run my app. how is that done in android? May 16 15:50:50 ultrixx: if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { .. } else { .. } May 16 15:50:56 up to you to fill in the details May 16 15:51:04 +1 May 16 15:51:12 that might not work if you want to suppor 1.6 May 16 15:51:15 cool thanks May 16 15:51:23 i wrote a really good article about it that ishould have put on my own blog instead of my company's May 16 15:51:39 well i don't have to support 1.6 but maybe 2.2 and for sure 2.3 May 16 15:51:46 2.1+ that will work May 16 15:51:52 canadiancow|work: yeah, stupid donut May 16 15:52:01 lol May 16 15:52:37 nice, thanks guys. May 16 15:53:46 Feels like my yet another planning poker application is coming into life :) May 16 15:54:26 last question: in your experience, is backwards compatibility causing you a lot of extra work? May 16 15:54:33 bsilwal: haha thanks May 16 15:55:07 bsilwal: no i am writing something very boring for my professor's chemistry lab May 16 15:55:21 ultrixx: what are you saying ? May 16 15:55:52 bsilwal: you thought i was writing yet another poker app,right? or did you mean someone else? May 16 15:56:08 sorry you misunderstood it. May 16 15:56:19 ok, no big deal :-) May 16 15:56:26 np aa May 16 15:57:31 greets May 16 15:59:20 How do I call a method in another class, intents? May 16 16:01:45 4 device deauthorizations a year eh? May 16 16:02:35 wait it says ive deauthorized too many devices May 16 16:02:37 what the fuck May 16 16:04:30 Mrono, there are a number of options to do so May 16 16:05:49 broadcast with intents is one, instantiating an instance and calling the method via that instance is another, making the method static is an option as well depending on your needs, if you're using fragments you can call methods from your activity simply with ((ActivityCast)getActivity()).method, and you can call stuff from your Application class using ((YourApp)getApplication()).method May 16 16:06:57 I'm designing for a Xoom 10.1in tablet...how do I know that sizes that might look nice on this? May 16 16:07:07 text sizes May 16 16:07:17 stop right now May 16 16:07:23 do not design for a specific device May 16 16:07:30 it needlessly locks you in May 16 16:07:46 canadiancow|work: well, I understand but this is just a prototype May 16 16:07:55 dont prototype "for one specific device" May 16 16:07:59 do it properly from the start May 16 16:08:05 so that it isnt a pita to fix in the end May 16 16:08:08 and as a suggestion, buy one and try different text sizes :P May 16 16:08:39 canadiancow is absolutely spot on May 16 16:08:52 designing for a specific device now will make it 10 times harder to adjust for any device in the future May 16 16:09:15 canadiancow|work: alright...generally speaking....what text sizes look right? For example, certain colors contrast better...I'm following the http://developer.android.com/design/index.html website May 16 16:09:29 i dont know May 16 16:09:31 look right for waht? May 16 16:09:37 for holding it up 10 feet away as a sign? May 16 16:09:46 for displaying a shitload of information (like a book)? May 16 16:09:48 for a header? May 16 16:10:42 canadiancow|work: yup May 16 16:11:15 yup what? May 16 16:11:16 fuck May 16 16:13:01 canadiancow|work: for displaying a lot of information on the tablet like a book May 16 16:14:39 buy one and try different text sizes May 16 16:15:25 05-11 21:53:35.602: E/AndroidRuntime(2002): ERROR: thread attach failed ? May 16 16:15:35 anyone knows possible reason ? May 16 16:16:06 [2012-05-16 17:15:49 - PlanningPoker] ActivityManager: Warning: Activity not started, its current task has been brought to the front May 16 16:17:55 bsilwal: stack trace or gtfo May 16 16:18:01 and the second thing you pasted is not an error May 16 16:18:03 or a bad thing May 16 16:18:26 really May 16 16:19:19 ah it says org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed) May 16 16:19:30 so thats an eclipse error May 16 16:19:35 and has nothing to do with android really May 16 16:19:46 that re-assuring May 16 16:19:52 restart eclipse then ? May 16 16:20:37 you know what time to go home. I will be back in 1.5 hours guys c ya then May 16 16:49:35 * Ge0rG scratches head... now the number of app votes for my app is already down by two... is google play killing app votes after a year or so? May 16 16:51:23 You must have a very low number of votes to notice 2 of them. May 16 16:52:25 pragma-: yeah, nobody wants crapsdroid. May 16 16:52:30 * pragma- smiles happily. May 16 16:54:11 anyone use ZNC? May 16 17:01:50 I have a listview that is populated from and AsyncTask (data pulled from mysql). I have a MenuItem that I want to refresh the listview, if i re-run the asynctask it just appends the results to the existing list. how do i get the listview to clear before pulling the new results? : http://pastebin.com/e61YK7t5 May 16 17:02:23 i know i can just rerun the activity, but I don't think that is the best way at all May 16 17:03:24 dschuett: what adapter are you using? May 16 17:03:31 How do I achieve the following effect: a simple textview with text, when clicked it transforms into edit text? May 16 17:04:28 wongk:ArrayAdapter May 16 17:05:23 dschuett: pastebin the code where you set the new SQL records on the adapter May 16 17:06:41 wongk: that should be in the pastebin i just posted May 16 17:07:05 props to me for paying attention :P May 16 17:07:27 greetings May 16 17:08:28 wongk: i gotta run for a few i'll be back May 16 17:08:32 Thanks for helping out! May 16 17:09:43 dschuett May 16 17:09:54 in your asynctask just create a new arraylist May 16 17:10:09 use a callback to assign it to the one your listview adapter gets its data from May 16 17:10:19 dschuett: you're never clearing your ArrayList, you just keep appending to it May 16 17:10:28 the problem is you're just using arraylist.add each time you parse from your json May 16 17:10:33 when you need to be creating a new arraylist May 16 17:11:30 on a side note, anyone know of any open source media players out there that use FFmpeg native libraries? I need to find some jni examples to see what c-methods I should be using for a project i'm working on May 16 17:12:36 so apparently my disappearing background issue applies to every single form of Drawable May 16 17:14:07 yeah I'm not surprised mcmlxxix May 16 17:14:30 I'm not either, im more surprised that there isnt much documentation on this problem May 16 17:14:40 If I had to guess I'd say it was probably something to do with the background caching and clearing that it's doing May 16 17:14:41 which leads me to believe maybe im going about it the wrong way May 16 17:14:43 bleh. copying files from linux to the galaxy nexus over USB is a PITA. falling back to network transfers. May 16 17:15:03 dmalice: is that something I can control? May 16 17:15:15 i don't think so May 16 17:15:41 the weird thing is usually with that issue you run into Bitmap memory errors or something May 16 17:16:26 you could try forcing garbage collecting before you initiate a series of drawable swapping May 16 17:16:40 but i wouldn't count on that solving anything May 16 17:17:09 you might just need to find a better way to do whatever it is you're doing May 16 17:17:40 * mcmlxxix nods May 16 17:17:46 For those of you who use git with their Android apps, do you use submodules for drawables and other binary files or do you just commit them into the repo? May 16 17:18:02 just commit May 16 17:18:07 why would you use a submodule o.O May 16 17:18:10 commit May 16 17:18:11 yea May 16 17:18:14 src/ and res/ are definitely things id want in my repo May 16 17:18:16 kakazza: same repo for drawables, submodules for library projects May 16 17:18:18 To keep repo size to a minimum. May 16 17:18:22 Ge0rG: this May 16 17:18:36 by that logic, do you keep every source file in its own repo? May 16 17:18:51 Source files are not what blow up a repo in size. May 16 17:18:54 Binaries are. May 16 17:19:00 "blow up" May 16 17:19:09 i think our games are pretty bloated May 16 17:19:14 but the repos are like 30MB May 16 17:19:17 and i don't commit compiled binaries May 16 17:19:19 Current repo size is over 100MB. May 16 17:19:31 not of my apps at least May 16 17:19:50 if your res directory is 100MB, you probably have other issues May 16 17:19:51 :) May 16 17:19:52 close to 5000 revisions, 6 releases and many changes in drawables. Also /libs is pretty bad. May 16 17:20:18 The whole repo with all branches and commits is over 100MB May 16 17:20:26 Not the /res folder of master. May 16 17:21:29 ok thats fair May 16 17:21:45 i think scramble with friends is around that May 16 17:21:45 hi! May 16 17:22:01 oh no wait...the .git dir is 52.6MB May 16 17:22:07 how to make a screencast from android virtual device? May 16 17:22:16 but no, res/ is part of the project, keep it in the same repo :) May 16 17:22:31 you wrote scramble with friends? May 16 17:22:41 library projects in submodules, ok. But what about /libs, libraries get updates too. May 16 17:22:42 i play that game all the time =P May 16 17:23:06 I would like to present someone my application. And I would like to recored some typcila usecase May 16 17:24:23 is it possible? May 16 17:24:37 sure May 16 17:24:41 dmalice, on android, yes - or rather, i was on the team May 16 17:25:10 it wasnt a one man job May 16 17:25:19 canadiancow, cool, nice job on it, i shelled out the .99 for ad-free lol May 16 17:25:40 i don't like the latest update where the second power-up isn't triggered automatically if time is running out tho =P May 16 17:26:07 thats a bug May 16 17:26:10 it's been fixed May 16 17:26:12 ah well then May 16 17:26:14 sweet May 16 17:26:14 lol May 16 17:26:16 wait for an update May 16 17:26:19 <3 May 16 17:26:44 i figured it probably was, it was frustrating the first couple of times for sure May 16 17:27:04 yea, another change went in to the timer that broke some callback to trigger that May 16 17:27:49 so does that mean you work for zynga? or do they subcontract that stuff out May 16 17:27:54 Surely, you now have testcases for that ;p May 16 17:28:07 i work for them May 16 17:29:26 how is being an employee there? I've considered applying around to some of the "bigger" companies out there for android work, but right now i'm really enjoying the atmosphere at my company - smallish startup around 20 ppl (only 2 android devs) May 16 17:30:47 its great - i read all these horror stories about zynga, but i havent experienced any of that May 16 17:30:58 now, you get all the baggage that comes with being a big company May 16 17:31:13 but that would happen at every big company :P May 16 17:31:47 yeah for sure, I worked for around a year and a half at IBM May 16 17:31:57 well we're not THAT big May 16 17:32:08 I have problem. Is it possible to make a screencast while Im using virtual device (avd). I would like to record only things which happen od avd screen May 16 17:32:32 yes chocimir, there are some free apps out there that allow you to screencap a certain part of the screen May 16 17:33:31 do a google search for an app called "AviScreen" May 16 17:34:42 dmalice: ok so it is like taking screen cast of a part of whole screen of my laptop, isnt it? May 16 17:35:09 yes, it's a simple little app that let's you select a window to record May 16 17:35:27 and you can set it to take screenshots or video May 16 17:35:59 dmalice: do u know smth which works under Linux? AviScreen seems to work only under windows May 16 17:36:45 oh linux, hmmm not sure May 16 17:37:36 I think i remember one app that I have used in the past, but I can't think of the name off the top of my head May 16 17:38:23 it was a long time ago, let me see if I can find it May 16 17:39:13 http://www.linuxlinks.com/article/20090720142023520/Screencasting.html May 16 17:39:18 I think the one I had used was istanbul May 16 17:40:01 article is pretty dated so you might have to do some more sleuthing on your own May 16 17:44:58 dmalice: thnx May 16 17:45:06 I'll try it out. May 16 17:45:45 http://www.webpronews.com/google-music-now-preventing-device-de-authorization-2012-05 May 16 17:45:58 * pragma- never even heard of google music. May 16 17:47:11 mmmhm... web pron! May 16 17:49:10 lol May 16 17:51:23 Is there a way to make ABS put the vertical ellipses in the ActionBar for folks on pre-ICS devices? May 16 17:52:26 Chronax: that's dependent on whether they have a menu button on their phone or not May 16 17:53:06 wongk: sorry I was out a little longer than i expected, so how do i go about clearing an arraylist within onOptionsItemSelected? May 16 17:53:32 did you check the arraylist docs? May 16 17:55:18 Right. Let's assume they do. May 16 17:55:32 Any way to force that thing to always live up there instead of being tied to the OS menu behavior? May 16 17:57:35 Chronax: http://actionbarsherlock.com/theming.html May 16 17:57:52 Aha! May 16 17:58:01 I somehow missed "ForceOverFlow." Guess I don't read good. May 16 17:58:24 You don't English good either :p May 16 17:58:36 Yep, that was the joke. May 16 17:58:56 The joke: that was it. May 16 17:59:09 Stolen directly from "The Standard Book of Unfunny, Volume 3." May 16 18:01:03 wongk: yeah, but when i do ArrayList.clear(); within onOptionsItemSelected i get "Cannot make a static reference to the non-static method clear() from the type ArrayList" May 16 18:01:22 you call it on your arraylist May 16 18:01:26 dschuett: sounds like you should learn java May 16 18:01:27 don't call ArrayList.clear(); May 16 18:01:30 lol May 16 18:01:39 wongk: that's exactly why i'm here... May 16 18:01:47 dschuett: Use the instance variable, instead of trying to call that method on the ArrayList class directly. May 16 18:01:48 we teach android May 16 18:01:53 say you have ArrayList myArrayList May 16 18:01:53 we assume you know java May 16 18:02:02 you call myArrayList.clear(); not ArrayList.clear(); May 16 18:02:31 dschuett: do you join #nascar to ask them how to change the oil in your car? May 16 18:02:47 I'm having a problem with a PreferenceActivity, where the OnSharedPreferenceChangeListener only seems to be called intermittently. Am I doing it wrong? http://pastebin.com/9DViib0i May 16 18:03:20 dschuett: do you join #ultimate-fighting to ask them how to do a tai-bo exercise routine? May 16 18:03:29 heh May 16 18:03:42 calamari: Keep in mind that the listener will only be registered if someone navigates to your SettingsActivity. May 16 18:03:55 So, you'll only get notified if someone first navigates to that SettingsActivity. May 16 18:04:00 dmalice: ahh... oops. I actually had tried that before but forgot that i had renamed my ArrayList May 16 18:04:34 Chronax: yeah, what I'm seeing is that I make a selection in a combobox, and sometimes it calls GameState.updateSettings(), sometimes not May 16 18:05:26 Chronax: so it should be in focus, since I'm using the preferences dialogs May 16 18:05:45 well, it should only get called if the selection you make in the combobox is different from what was selected previously May 16 18:05:45 hi, the SQLiteDatabase.insert() returns the row id, is this always the value of a column named "id" or just the primary key? May 16 18:06:01 dmalice: yes, it was May 16 18:06:40 and most of the time it is called, but sometimes it isn't May 16 18:11:34 calamari, apparently sharedpreferences stores the listeners in a weakhashmap May 16 18:12:03 this causes your listener to get garbage collected since you're using an anonymous inner type May 16 18:12:20 keep a reference to your listener May 16 18:12:22 wow, thank you! May 16 18:12:28 should fix your problem May 16 18:16:23 dmalice: so far so good, thanks a lot for looking into it and finding that! May 16 18:16:36 learned something new May 16 18:17:13 hello Everyone. May 16 18:17:33 calamari, no problem May 16 18:18:08 ls May 16 18:18:34 no files found May 16 18:23:15 Did someone ever styled the title bar ? May 16 18:23:21 ... of a dialog? May 16 18:31:17 vekexasia I would suggest building your own dialog if you wish to apply some custom styling May 16 18:32:35 hmm i didn't want to make that May 16 18:32:41 but thanks for the advice dmalice :) May 16 18:41:30 ok dmalice May 16 18:42:15 I give up. I need to create a custom dialog. The problem in doing that is that I didnt find how to change the "Title" view of a dialog. May 16 18:43:31 vekexasia, what I mean is create a class that extends Dialog May 16 18:43:37 and have it inflate a layout of your choosing May 16 18:44:48 hmm sounds nice May 16 18:45:17 the problem is I use Alertdialog.builder :P LOL May 16 18:47:24 vekexasia / dmalice i basically did that with a dialogfragment May 16 18:47:34 i made a fully custom view May 16 18:47:39 and i made my own Builder class May 16 18:48:03 took a fair bit of work, but now we can make dialogs very easily that look exactly the way we want May 16 18:48:03 the builder is the "long" thing here i think May 16 18:48:57 dialogfragments are great May 16 18:49:13 canadiancow|work: did you opensource it ? May 16 18:49:29 no... May 16 18:49:42 and that wont happen either May 16 18:49:46 lol May 16 18:49:55 well I wasn't going to ask :P May 16 18:49:56 canadiancow|work is evil May 16 18:50:02 I see. May 16 18:50:05 LOL :P May 16 18:50:22 canadiancow|work is the Thomas Edison of our time. May 16 18:51:14 Anyone here worked with ffmpeg for android? Or know of a good open-source app that uses ffmpeg that I can check out? May 16 18:51:32 vlc? May 16 18:51:57 well, thanks for your time... for now I won't make anything it's just a fucking title background color. :P May 16 18:52:01 I just went for a 45 minute walk in the 90 degree midday sun on a cloudless day. May 16 18:52:06 but it has a terribly complex build May 16 18:52:09 ... up a hill. May 16 18:52:20 * pragma- is hot and wet. May 16 18:52:39 I've got ffmpeg cross-compiled for android, my problem is figuring out which functions to call via JNI to achieve what I want May 16 18:52:47 isn't it supposed to be "uphill both ways, barefoot" May 16 18:53:15 it was on loose gravel May 16 18:53:59 if you were in flordia you could through in raining May 16 18:54:11 throw* May 16 18:54:12 I think you accidentally a word May 16 18:54:52 if I have i AsyncTask my onPostExecute gets a return value that was tasked to my background method. how do i return this value to another class? May 16 18:55:06 use a callback May 16 18:55:52 in whatever class you want to get the value in, make a simple callback interface May 16 18:56:10 instantiate one and then pass that to your asynctask May 16 18:56:33 That works pretty well, or you can use a broadcast receiver and broadcast an intent May 16 18:56:46 i dont know how to do that May 16 18:57:11 ##java for interfaces May 16 18:57:12 broadcast? or creating an interface? May 16 18:58:31 public interface ICallback { public void callback(int returnValue); } --that would be your basic interface May 16 18:59:13 then you instantiate it in your class, overriding the callback method to do whatever it is you want to do, and then pass that instance to your asynctask by making a constructor for your asynctask, or passing it as a parameter when you call .execute May 16 19:05:59 80 lines for a method is that too big ? May 16 19:06:18 maybe, maybe not May 16 19:06:35 hi all, i'm seeing something strange with touch events. Making a very simple app, draw a box on screen and move it by dragging it around May 16 19:06:46 2 kinds of events, ACTION_DOWN AND ACTION_MOVE May 16 19:06:54 g00s: ok May 16 19:07:05 the odd thing is ACTION_MOVE gets fired even when I simply single click the box without moving the mouse May 16 19:07:23 blip-: you need some move slop May 16 19:08:09 pragma-, not sure what slop means. but basically when I simply single clock the box, it shifts position radically to the bottom right May 16 19:08:37 even on double click, (onDoubleTap) this Action_move gets fired... it's ruining everything May 16 19:09:40 It's hard to click without the pointer moving just a little bit May 16 19:09:51 ie I cannot distinguish between a true action_move to move the box - and a double click behaviour thats meant to do something else to the box May 16 19:10:05 So you need to make sure the pointer has moved at least X before making it a drag May 16 19:10:07 that's what i thought SimonVT, but the reported values are the same May 16 19:10:30 aren't long-pressed the preferred ui? May 16 19:10:39 presses May 16 19:10:52 i do check if the pointer has moved at all (oldX!=newX) but i'll try to add a margin in between now May 16 19:11:06 There are constants in the system for this May 16 19:11:10 Can't remember where May 16 19:11:20 ViewPager is a good example of how to properly do this May 16 19:11:54 It'd be practivally impossible to click any buttons if it simply intercepted every move event May 16 19:19:02 Hi everyone. Can someone explain me why I can still see the background of the input here? http://i.imgur.com/log8j.png . I'm using a 9patch drawable for the editText. But still I can see a darkish background which is not mine. I'm pretty sure it's a simple bug. May 16 19:20:03 if I use a wrap_content for the layout_height of the editText it's working, but the editText is far too big in height. So I setted it to 60dp. May 16 19:22:38 pcboy_: you should leave it like that and design the rest of the theme to match May 16 19:23:39 pragma-: That's an idea. =)) But I don't think it's gonna work great. May 16 19:26:16 SimonVT, pragma-: I clarified something in the code, the only problem I have now is that ACTION_MOVE event fires when I double click the box (onDoubleTap). Double tapping moves the box to the center, while action move moves it to the corner of the mouse (depending on whwere you click) May 16 19:26:37 So there is a conflict, I must prevent ACTION_MOVE from firing when I double tap. is there no way ? May 16 19:27:00 since both move the box, it's causing a race condition that leads to box location getting messed up randomly May 16 19:27:01 Just don't do anything in action_move unless the user has actually moved a minimum May 16 19:28:00 oh wait all I do is compare the release location with the current box location May 16 19:28:18 Compare the action_down location with the action_move location May 16 19:28:20 instead I should compare the on-click coordinates (ACTION_DOWN) with the release coordinates from ACTION_MOVE May 16 19:28:24 exactky May 16 19:28:25 They're two different motionevents May 16 19:28:35 Again, look at ViewPager May 16 19:28:41 in onInterceptTouchEvent May 16 19:28:47 I tried a function called getHistoricalX but couldn't call it properly May 16 19:29:56 how can i get the list from my layout in line 38? http://pastie.org/3922007 May 16 19:35:22 you're trying to get the listview from a static method? May 16 19:35:26 that seems like a bad idea May 16 19:35:28 SimonVT, I already override onTouchEvent and check those 2 cases, I found the problem though May 16 19:36:05 perhaps I'm rusty on Java, but basically I had a switch(event.getAction) then case ACTION_DOWN and case ACTION_MOVE. and both cases were triggering in the same call to the onTouchEvent method... May 16 19:36:25 t0mless if i remove the static modifier, i could pass me data to the method in line 121 May 16 19:36:28 so I just made it into 2 if statements with a fresh call to event.getACtion each time May 16 19:36:44 t0mless sorry line 123 May 16 19:37:07 vorwaerts why have that as a static class at all? May 16 19:37:09 why do you need a listbuilder class? May 16 19:37:19 just have a method in your activity that does whatever you want it to do May 16 19:37:57 is that your attempt at a callback interface? May 16 19:37:57 blip-: Did you forget to break your switch? May 16 19:38:07 lol May 16 19:38:08 Hi, i want to create an action bar (more like a navigation menu) in API level 8. The thing is i see the action bar requires api level 11? Can I workaround it somehow? what other solutions are there? May 16 19:38:40 serban - check out actionbarsherlock May 16 19:38:40 serban http://abs.io May 16 19:38:42 thanks SimonVT, around 2 hours gone because of missed break :D May 16 19:38:45 t0mless no, but i think a callback interface is to hard for me May 16 19:39:00 well it's almost the same thing as what you're doing, just not as stupid May 16 19:39:02 ty May 16 19:39:09 lol t0mless, that's harsh =P May 16 19:39:34 dmalice, the update fixing that bug was just released ;) May 16 19:39:45 vorwaerts, i would recommend you read up a bit more on some common java design patterns May 16 19:39:59 canadiancow, sweet =) May 16 19:40:04 t0mless what i want to do is catch some data from a sql database in a sync task and build a listview with it May 16 19:40:17 how do i use same onClick listener for multiple buttons? May 16 19:40:29 btw, you wouldn't happen to know anybody who could hook another somebody up with some unlimited coin supply eh? hahaha May 16 19:40:30 same it in a variable May 16 19:40:35 save* May 16 19:40:43 you know you can get the result of your AsyncTask using .get() May 16 19:40:52 no May 16 19:41:01 though a Loader would be better for this May 16 19:41:35 i have a loader for my sql data May 16 19:43:01 t0mless or what do you mean? May 16 19:43:28 an asynctask is not a loader May 16 19:43:44 but? May 16 19:43:47 similar though May 16 19:45:28 ahh, you're pulling your SQL from a webservice May 16 19:45:30 which is fine May 16 19:45:51 but i think a Loader would work better for you May 16 19:46:36 But I've now been working so much with it now May 16 19:47:32 well then your next best option is to get rid of the static class May 16 19:47:39 make the buildList a normal method May 16 19:47:46 non static May 16 19:48:00 public class ListBuilder { May 16 19:48:02 and call Test.buildList() in your postExecute May 16 19:48:13 get rid of that Listbuilder class May 16 19:48:30 just make buildList a normal method of your Test class May 16 19:48:35 and the buildList class goes to? May 16 19:48:36 ah ok May 16 19:48:41 Test.this.buildList(), sorry May 16 19:48:49 buildList is a method, not a class May 16 19:49:19 i thought May 16 19:49:49 public void buildList(Map> input) { May 16 19:49:51 right? May 16 19:50:02 right May 16 19:50:10 not static? May 16 19:50:14 not static May 16 19:50:33 an interface would be better May 16 19:50:41 public void buildList(Map> input) { May 16 19:51:29 and there is no buildList method in test May 16 19:51:44 when im trying to call it on postexeute May 16 19:52:17 http://screensnapr.com/v/SBdchV.png May 16 19:52:43 you're trying to reference it as a static! May 16 19:52:51 you need an instance if it's not static May 16 19:53:07 Test.this.buildList(); May 16 19:53:42 ah ok! May 16 19:54:10 ok now i have my map in my buildList method May 16 19:54:39 http://pastie.org/3922119 May 16 19:54:50 that's how you'd do a call back interface May 16 19:55:42 lol eclipse quick-fixes May 16 19:57:00 how do i deal with my real device shown more than one time ? in the device browser it show the same device many times but only one is online but even if i select that it tells me it is offline and i cant run it May 16 19:57:22 t0mless this is hard to understand now :) May 16 19:58:15 fanno disconnect the device and restart adb May 16 19:58:19 then use a different usb port May 16 19:59:06 and to put my map stuff in a listview i would need a mapadapter? May 16 19:59:26 Any idea on how can i use same onClick method for multiple buttons? May 16 19:59:55 t0mless Cycle detected: the type Test cannot extend/implement itself or one of its own member types May 16 20:00:32 I heard you can do whatever you want in international waters. May 16 20:00:35 bsilwal: what are you trying to do ? May 16 20:00:41 That's why I filled my jacuzzi with international water. May 16 20:01:21 bah, then you have to move the interface to a seperate class May 16 20:01:28 I have 10 button in one activity and depending on what I click i want to display text in second activity May 16 20:01:57 ok May 16 20:02:00 vorwaerts and yes, you would need a custom adapter May 16 20:02:33 The method onResult(Map>) of type Test must override a superclass method May 16 20:05:04 did you delete the implements MyInterface from the class declaration? May 16 20:05:15 no May 16 20:05:30 where did you put the MyInterface declaration? May 16 20:05:55 in another class - and it was imported May 16 20:06:22 hrm, maybe I typo'd somewhere May 16 20:06:40 http://www.abc.net.au/news/2012-05-16/melbourne-builder-destroys-banksy-art/4014514 May 16 20:06:44 lulz May 16 20:07:04 15 year old street graffiti considered worth over $50,000 May 16 20:07:18 * ctate | ctate is my hero May 16 20:07:23 that's going on the wall :) May 16 20:07:50 ctate, you're my hero too! May 16 20:08:06 yeah but i knew that already May 16 20:08:16 * pragma- regards ctate with passing mild curiosity which he promptly forgets upon seeing a shiney object. May 16 20:08:39 t0mless if i ignore the interface because I've been using my method to get the result. I now have to worry about its own adapter. May 16 20:08:53 pragma-: but it's "art"! May 16 20:09:11 ... not any more it isn't May 16 20:09:16 now it's rubble May 16 20:09:21 now it's rare art May 16 20:09:49 all he needs to do now is superglue the rubble together and wrap it in mylar. instant Guggenheim placement. May 16 20:10:02 giggitywhat? May 16 20:10:19 pragma-: Got it. My 9patch should be in a drawable-hdpi-v4 folder and not the drawable/ one. (just starting android dev. I learn everyday. =)) It works now. May 16 20:10:26 http://en.wikipedia.org/wiki/Guggenheim_Museum_(disambiguation) May 16 20:10:32 * pragma- heartily congratulates pcboy_ May 16 20:10:46 Thanks! May 16 20:10:48 t0mless would i need public class MyMapAdapter implements Map ? May 16 20:13:49 wut? May 16 20:13:53 That makes no sense May 16 20:14:15 i dont know what to do with my map to create a list view May 16 20:14:29 you need an adapter May 16 20:14:41 yes May 16 20:14:42 that extends from BaseAdapter May 16 20:14:50 and overrides the getView method May 16 20:15:02 and the other abstract methods of BaseAdapter... I forget all of them May 16 20:15:35 though you may even want an ExpandableListView May 16 20:15:43 getCount(), getItem(), getItemId(), getView May 16 20:16:05 ok, implement those May 16 20:16:30 you can read about adapters in the docs May 16 20:19:31 * readme just got a ping on stackoverflow careers \o/ May 16 20:19:39 \o/ May 16 20:19:57 by a recruiter though :( hopefully the actual company will be interested as well. May 16 20:20:02 lol May 16 20:20:07 I fucking hate recruiters May 16 20:20:29 they can be ok if they are internal to the company May 16 20:20:48 Yea... but seems like I only get contacted by the recruiting company recruiters May 16 20:21:02 and then spend a few days talking with them and then it leads nowhere May 16 20:21:26 oh, she said "We've".. maybe she is internal. May 16 20:21:27 I hope she is May 16 20:21:33 what's the last company that contacted me... Riviera partners I think May 16 20:21:37 fucking useless May 16 20:21:48 this company is super cool.. security application server in C is the job :) May 16 20:22:34 * readme has to refresh his C all night now May 16 20:22:51 I think I would have that same issue May 16 20:22:59 haven't really done any C in a loooong time May 16 20:23:29 i mostly know it, but dusty corners will get me May 16 20:23:55 good news is it's an incredibly small language. May 16 20:25:38 * readme off to write a server in C with pthread, going to surprise them. May 16 20:25:41 C is not the best language for security. May 16 20:27:50 Do I need to install JRE? May 16 20:28:16 JDK would be preferred May 16 20:28:23 and by preferred I mean required May 16 20:28:37 well, the installer asks if I want to install JRE too. May 16 20:28:53 unless you already have the JRE installed May 16 20:28:56 you probably should May 16 20:29:22 I'm working on a service that will act as a content provider - it fetches content from a server & handles authentication/encryption. Right now I have it setup as a bound service, but I'm not sure if that's the best method because the service seems to start/stop a fair bit and since I want to cache/persist some of the fetched data it seems a bit wasteful. Any thoughts? May 16 20:29:48 t0mless http://pastie.org/3922280 how is this adapter looking so far? May 16 20:30:17 I just love it when the official drivers from the website "Don't contain drivers for any of your hardware" May 16 20:30:23 * t0mless hulk smashes May 16 20:31:23 nplus, don't contentproviders have their own lifecycle? May 16 20:32:20 pfn: I'm creating a service that acts similar to a ContentProvider as I can't quite fit my needs into its model May 16 20:32:44 nplus, as for service starting and stopping, control its lifecycle yourself, rather than allowing it to be destroyed onunbind May 16 20:32:56 i.e. if you call startService, it doesn't stop until you stopService/stopSelf May 16 20:34:09 pfn: Aha that's what I need. Is there a risk of the service being left running if the application that started the service crashes or doesn't call stopSelf? May 16 20:34:23 t0mless: http://1funny.com/wp-content/uploads/2012/02/hulk-toilet.jpg May 16 20:34:28 nplus, well, if the application crashes, the service will exit May 16 20:34:30 by rule May 16 20:34:37 unless you run the service in a separate process May 16 20:34:49 because everything runs in the same process by default May 16 20:34:53 crash -> process exits May 16 20:34:55 pfn: The service will be a separate application May 16 20:35:09 in that case, your service will need to have some of its own logic to stop itself May 16 20:35:15 ok thanks May 16 20:36:25 that's if it's started ratehr than bound May 16 20:36:41 just to repeat May 16 20:37:54 right May 16 20:41:09 How can I center the text in the cells of a gridview May 16 20:43:48 hey, is it reasonable to use URIs with a scheme of "content" for my intent filters for my activities? I want them to be the same as the Uris for the objects in the content provider. May 16 20:44:04 I'm having issues where my intent-filter doesn't match, and I've tried various permutations of it. May 16 20:54:26 can you help me with my adapter? May 16 20:55:11 Zacharias3690 add android:layout_gravity="center" to your textviews May 16 20:56:02 Sawyer: I'm using an arrayadapter to to fill my gridview, how would I access the textviews? May 16 20:56:30 t0mless i do net have Map> anymore - i have ArrayList> no May 16 20:56:48 I don't know, it's your app May 16 20:57:00 would it be easier now, to create an adapter? May 16 20:57:14 or can i use somethink like simpleadapter May 16 20:57:34 Zacharias3690 are you using the built in simple_list_item or whatever it's called in your array adapter? May 16 20:57:44 t0mless: ya May 16 20:57:48 vorwaerts no May 16 20:58:00 vorwaerts you'd still need a custom adapter for an array of hashmaps May 16 20:58:22 a class that extends BaseAdapter? May 16 20:58:25 Zacharias3690 you'll have to either make your own adapter or try adding android:gravity="center" to your gridview May 16 20:58:38 vorwaerts yes May 16 20:59:18 t0mless, should I just extend ArrayAdapter and call super for everything and change the textview? May 16 20:59:49 t0mless so i will create a class that extends baseadapter and add unimplemented methods, right? May 16 21:00:25 Zacharias3690 that would more than likely work May 16 21:01:01 vorwaerts Yes. Read the docs on adapters May 16 21:01:04 like I told you earlier May 16 21:01:18 im reading BaseAdapter atm May 16 21:02:13 Has anyone ever used Lucene in an android app? May 16 21:03:02 t0mless but this isnt helping me - there are still all its methods. how do i pass my ArrayList to this class? May 16 21:03:16 with... a constructor? May 16 21:04:22 ah ok May 16 21:09:53 t0mless do i need super(); for the constructor? May 16 21:12:08 t0mless do i need the data in the adapter at all? May 16 21:13:32 t0mless: thanks, that did it May 16 21:22:59 how do i identify a list_item with my adapter? http://pastie.org/3922532 May 16 21:25:18 hi May 16 21:26:51 i have an activity that has a dialog style May 16 21:27:06 it has a relative layout, some text and a picture May 16 21:27:44 on the emulator it's fine: http://noob.hu/2012/05/16/1_40.jpg ; but on my phone the bottom text gets clipped: http://noob.hu/2012/05/16/2_3.png May 16 21:36:48 t0mless im almost done - are you still there= May 16 21:37:07 I am, but don't have time to write your app for you May 16 21:38:14 http://pastie.org/3922594 this is my adapter - getView is working with my data and i can print it to the system, but it doesnt create a textview - i think its a missing super() in my constructor May 16 21:38:17 "hey guys what's the first line of the first file in an app that could be the next Instagram?" May 16 21:38:25 "okay, what's the next line?" May 16 21:38:51 vorwaerts you need the textview to be in your list_item.xml layout May 16 21:39:07 there is a textview May 16 21:39:28 then you're doing something wrong May 16 21:39:28 with the id listtext May 16 21:40:18 Donpedro noob.hu doesn't work for me May 16 21:40:46 fuck yeeeeeaaah http://shop.oreilly.com/product/9781593274122.do May 16 21:41:07 WORKING replicas?? May 16 21:41:13 t0mless if i type Log.e("test", data.get(position).get("cat").toString(); and in my Test class i type adapter.getView(0, null, null); im getting the first category. May 16 21:41:30 t0mless: pew pew May 16 21:42:04 vorwaerts first, the fact that you're returning 0 for getCount would be why nothing shows up in your list May 16 21:42:12 second, you're also returning null for getItem May 16 21:42:29 but like I said, I don't have time to write your app May 16 21:42:57 thats because t0mless is writing a new graphic component May 16 21:43:03 *graphing May 16 21:43:08 t0mless actually i dont need this methods May 16 21:43:31 What is a good way to store credentials for users May 16 21:43:46 t0mless but extending an BaseAdapter needs this May 16 21:43:57 or to store strings May 16 21:43:58 vorwaerts if you want your listview to work May 16 21:44:01 you need those methods May 16 21:44:05 that's why they're abstract May 16 21:44:21 Mrono use the accountmanager to store credentials May 16 21:44:21 ok May 16 21:44:57 Mrono http://developer.android.com/guide/topics/data/data-storage.html for other storage May 16 21:45:17 t0mless getCount would be the lenght of my ArrayList? May 16 21:45:24 more than likely May 16 21:45:46 "The number of elements in the Adapter" May 16 21:45:55 how you determine that number is up to you May 16 21:46:00 ok May 16 21:46:13 thank you t0mless May 16 21:46:59 (reuploaded the pics, on the emu: http://i972.photobucket.com/albums/ae209/Donpedro901/1.jpg on my phone: http://i972.photobucket.com/albums/ae209/Donpedro901/2.png) May 16 21:47:13 YEAH \o/ May 16 21:47:34 ah i see - with that i could limit my list May 16 21:47:46 i think this is the use of this :D May 16 21:48:01 but i dont see the use of getItem May 16 21:48:07 The use of it is to tell the AdapterView how many items there are May 16 21:48:31 I'm sure you will May 16 21:49:20 maby to return its name in a toast while clickinig it? May 16 21:50:48 canadiancow|work did you know that you can get new words in draw something without using a bomb? Either just close the activity and wait enough time for it to get killed May 16 21:50:50 or force stop it May 16 21:50:56 or have it crash like it sometimes does for me May 16 21:51:21 or go to option menu and close it haha May 16 21:51:30 Recents -> swipe it away! May 16 21:52:04 thanks t0mless May 16 21:52:08 i'll get right on that May 16 21:52:17 May 16 21:53:20 :) May 16 21:53:44 t0mless i dont understend getItem May 16 21:54:06 I could return data.get(position); May 16 21:54:26 no i couldnt ^^ May 16 21:54:51 flip it horizontal. Keyboard shortcut for Mac ? May 16 21:58:24 vorwaerts you SHOULD return data.get(position) May 16 21:58:53 and when do i need/use this? May 16 21:59:19 anytime your AdapterView or anything with access to the adapter needs info about an item? May 16 21:59:36 fuck, I still haven't had lunch May 16 21:59:42 * t0mless goes May 16 21:59:44 haha May 16 22:00:21 t0mless a situation could be clicking on an item? so i would need it in onListItemClick method? May 16 22:06:20 OpenSignalMaps logs 3997 unique Android devices :O May 16 22:06:57 canadiancow|work: actually, this looks pretty cool http://opensignalmaps.com/ May 16 22:07:14 yay Market user: "was working before, now doesn't. Useless". Can't join fucking user for detail and no idea what "before" version was. May 16 22:07:22 I hate that May 16 22:07:55 t0mless how do i call getItem in onListItemClick method? May 16 22:09:10 g00s: no :( May 16 22:09:30 canadiancow|work: it doesn't look cool ? May 16 22:10:48 whats the minimum amount of time you should hold a job May 16 22:11:03 lol? May 16 22:11:06 i feel like I might get this job i've been offered, but I really want to move away from boston, but I should take it if they give it to me May 16 22:11:10 i'm thinking 2 years May 16 22:11:17 O_______O May 16 22:11:17 wow May 16 22:11:21 i was going to say something like 6 months May 16 22:11:26 ok, lets make it 1 year May 16 22:11:27 ;) May 16 22:11:44 most apartments will lease me for a year anyway May 16 22:12:37 most employers will take care of your lease, wont they? May 16 22:12:54 i don't know. i've only worked for impoverished startups and freelanced May 16 22:12:59 ah May 16 22:13:08 this would be the first real company I worked for, other than those that hired me remotely May 16 22:13:10 i talked with a recruiter from square recently, and she said theyd take care of it if they hired me May 16 22:13:13 nice May 16 22:13:19 so i figured mos twould do that? May 16 22:13:25 or theyd just give you some obscene relocation bonus May 16 22:13:26 well, the job is local already May 16 22:13:29 oh May 16 22:13:32 so...no issue? May 16 22:13:33 but my lease here is up in 14 days. May 16 22:13:43 so my plan was to move to austin, very soon, then I got this offer. May 16 22:13:57 but if they give it to me, I'll get an apt in boston, if not, I'll disappear. May 16 22:14:04 heh May 16 22:16:37 When i change the orientation to horizontal stuff fly out of the screen. What property will stop that from happennig? or anything else? May 16 22:16:47 how do I use a user-defined (.java file) for a NumberPicker instead of the one that comes in the framework? May 16 22:17:19 specify the full package name in xml May 16 22:17:26 i.e. com.simonvt.awesome.numberpicker May 16 22:17:31 i suspect you're using his, anyway May 16 22:17:36 if I have ArrayList> array = new ArrayList>(); and this array with a bunch of HashMaps, how do i check, if one of these HashMaps has "cheese" as first string? May 16 22:17:44 i was going to write my own actually, but extend it from his May 16 22:18:17 readme, so instead of it's ? May 16 22:18:22 correct. May 16 22:18:32 ok good. that's very simple May 16 22:27:28 vorwaerts: hashmaps are unordered, so there is no "first" string May 16 22:27:47 if you want to check if the first hashmap in the array has cheese, you can do that May 16 22:29:50 vorwaerts: LinedHashMap has the idea of first, as in insertion order May 16 22:29:57 *LinkedHashMap May 16 22:30:07 NavigableMap is good too May 16 22:30:12 but not available on most api levels May 16 22:31:00 vorwaerts: and if you have some special collection in mind, maybe you will find it in guava May 16 22:42:21 if I have a layout-port and a layout-land...can I just delete the layout folder? May 16 22:43:02 hmm. i would think its always good to have a default May 16 22:44:00 g00s: wouldn't it work anyways though? May 16 22:45:28 why even have layout-port when you can just use layout-land for the landscape options May 16 22:45:35 then have it fallback on layout May 16 22:45:55 android devices vary and can do some weird stuff. the more boring you make your app the more likely it is to work on all of them May 16 22:46:50 * readme is about to take a swim in the very cold atlantic at 7 pm May 16 22:48:33 does anybody have the GoogleTV addon? May 16 22:48:45 is it terribly slow, lagging, shit, and the worst thing to test an app on? May 16 22:49:12 i'm pretty sure I tried it once and that summed it up accurately, but if you have a very fast machine I would wager it can work May 16 22:49:31 quadcore, 16GB ddr3, with a nice little SSD.. May 16 22:49:35 i'd expect that shit to fly... May 16 22:49:47 readme: But when I turn my Xoom to portrait it doesn't scale the landscape though May 16 22:49:53 i mean the normal phone/tablet ones fly like no other, but this thing sucks the live out of kvm. May 16 22:50:01 so i guess phones will start to get DDR4 memory soon May 16 22:50:15 john_doe_jr: scale/ May 16 22:50:16 ? May 16 22:50:23 john_doe_jr: just put your portrait layouts in layout May 16 22:50:25 readme: I mean it doesn't look right May 16 22:50:29 i guess its called LPDDR4 May 16 22:50:41 john_doe_jr: well if your approach works better May 16 22:50:45 then I am interested to try it in the future May 16 22:51:10 readme: what kind of machine do you have? May 16 22:51:14 simple specs please. May 16 22:51:52 hello May 16 22:51:58 good day May 16 22:53:52 I'm working on an application which has 2 versions: a free and a paid version. I've set up a library project and two projects (free and paid) which use the library project. Here goes the question: Is there any way to include only certain resources from the library project in the other projects ? (drawables for example) May 16 22:55:41 I know I can override resources, but I want only a few drawables in the free version and all of them in the paid version May 16 22:56:03 I don't want all the drawable resources from the library project to be included in the free version... May 16 22:56:37 grandma style GoogleTV emulation May 16 22:56:42 fastest known to man. May 16 23:02:43 anybody can tell me what's problem that makes this app crash , that's what i got in logs http://pastebin.com/5Jmus2HX May 16 23:03:41 "java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead" May 16 23:03:46 did you read your exception? May 16 23:07:33 t0mless, when tried the last mentioned above , got >>> The method setOnItemClickListener(AdapterView.OnItemClickListener) in the type AdapterView is not applicable for the arguments (new View.OnClickListener(){}) May 16 23:08:04 stop trying to pass an OnClickListner to setOnItemClickListener May 16 23:08:38 you need to change your new OnClickListner () { ... to new OnItemClickListener() { May 16 23:08:48 and then override the correct method May 16 23:10:27 t0mless, i'm just trying this sample , http://developer.android.com/resources/tutorials/views/hello-gridview.html May 16 23:10:59 t0mless, :) so the sample code is incorrect?!!! May 16 23:12:08 no... that code looks right May 16 23:12:25 you must have messed it up May 16 23:12:53 f00bar80 that code is using an OnItemClickListener May 16 23:13:02 your errors are implying you're using an OnClickListener May 16 23:13:06 which are two different things May 16 23:13:40 f00bar80 how about posting the code you're actually compiling instead of the sample you incorrectly copied May 16 23:17:29 t0mless, i'll re-copy it again from the link above and recompile May 16 23:17:36 why is when I'm in xml and making a lot of changing eclipse craps out and displays werid stuff on the screne May 16 23:17:55 because eclipse's xml editor is terrible? May 16 23:18:07 you using the visual editor or just the raw xml? May 16 23:18:30 t0mless: visual editor May 16 23:18:35 yea, that thing sucks May 16 23:18:44 t0mless: what do you use? May 16 23:18:48 IntelliJ May 16 23:19:03 but I always editted the raw xml when I did use eclipse May 16 23:19:03 t0mless: I need that visual feedback though May 16 23:19:11 IntelliJ has a visual preview May 16 23:19:35 and you can edit the raw xml and then go back to the visual in eclipse to see the result May 16 23:19:39 t0mless: I know but you can't play around w/ it like in eclipse.... May 16 23:20:03 when I make layouts in eclipse I only edit the xml and use the editor to see a preview May 16 23:20:06 I never actually use the gui tools May 16 23:20:11 they are practically unusable, for me anyway May 16 23:20:14 Yea May 16 23:20:21 t0mless, i'm getting >> ( The method setOnItemClickListener(AdapterView.OnItemClickListener) in the type AdapterView is not applicable for the arguments (new OnItemClickListener(){}) ) for thw following code http://pastebin.com/Y2VmESji May 16 23:20:23 that thing like to nest linear layouts from what I recall May 16 23:20:39 holy fuck, i don't want to eat anything ever again http://discovermagazine.com/2012/jun/03-hidden-epidemic-tapeworms-in-the-brain May 16 23:20:50 f00bar80 and what are you importing? May 16 23:21:10 >> a tapeworm that normally inhabits the muscles of pigs. May 16 23:21:13 I don't eat pork, nuff said. May 16 23:21:31 prok is delicious May 16 23:21:46 pork was historically avoided before refridgeration due to how vile it is May 16 23:21:51 :) May 16 23:21:55 I'm aware May 16 23:21:58 but it's delicious May 16 23:22:03 I'm actually ServSafe certified May 16 23:22:12 so I know all about the food born bactiria shit May 16 23:26:55 is there somewhere where i can paste code? May 16 23:27:08 I have this: May 16 23:27:09 BitmapDrawable bmd = (BitmapDrawable) switcherView.getDrawable(); May 16 23:27:09 Bitmap bm= bmd.getBitmap(); May 16 23:27:09 bm.prepareToDraw(); May 16 23:27:14 you don't paste code on IRC, period May 16 23:27:17 use a pastebin. May 16 23:27:40 that's why I asked for a place to paste code, genius May 16 23:27:47 No, you didn't ask for a place to paste code May 16 23:27:52 you said "can I paste code here" May 16 23:27:57 then you pasted without waiting for any response May 16 23:28:01 looks like you can't read english May 16 23:28:07 hahaha May 16 23:28:17 where are you from? May 16 23:28:39 pticochon he's right... you asked and didn't wait at all for a response May 16 23:28:43 13 seconds is not waiting May 16 23:28:49 yeah, that's right May 16 23:28:53 you might want to get checked for adhd May 16 23:28:55 but I did ask for a place to paste code May 16 23:28:58 he thinks I didn't May 16 23:29:07 no, technically you didn't May 16 23:29:07 because he can't understand english grammar May 16 23:29:17 you said "Is this somewhere I can paste code" May 16 23:29:23 haha what a moron May 16 23:29:24 share the sandpit nicely, kids :-P May 16 23:29:25 is THERE somewhere May 16 23:29:34 pticochon> is there somewhere where i can paste code? May 16 23:29:39 http://lmgtfy.com/search?q=pastebin May 16 23:29:40 can i add a new item like this www.ximed.de/list.gif ? May 16 23:29:43 learn to read, genius May 16 23:30:18 looks like today you learned the difference between the words there and this May 16 23:30:20 Well... good luck getting help May 16 23:30:55 I can't get a valid key to generate for Google Maps API May 16 23:31:17 I don't expect someone with readme's IQ to be able to help me anyway, t0mless May 16 23:31:19 t0mless, i'm importing http://pastebin.com/FQjZ9kyU May 16 23:31:32 the debug MD5 works fine on Emulator and phone, but if I want to generate my "own" MD5, it fails on Emulator and on the phone May 16 23:31:52 any idea what I'm doing wrong when generating the key? May 16 23:31:57 so that i click on an item - and all the items underneath animate down and a new item fades in? May 16 23:31:59 f00bar80 you should import android.widget.AdapterView.OnItemClickListner; May 16 23:32:16 or change your code to be new AdapterView.OnItemClickListner() { ... May 16 23:32:39 t0mless, >> The import android.widget.AdapterView.OnItemClickListner cannot be resolved May 16 23:33:27 spell Listener right May 16 23:33:57 f00bar80 you should relax your copy/paste muscles May 16 23:34:11 use the code complition to help you May 16 23:34:13 t0mless, :) May 16 23:36:17 is there any specs for the images i can use for the gridView ?? , i tried to use my images , but i didn't figure out this method http://pastebin.com/4sMsRnbq or what it's doing , i've tried even to change one of them to my images' name , got error invalid token May 16 23:37:13 t0mless: in intellij how do I add android-support-v4.jar to the build path? May 16 23:37:42 john_doe_jr in the module settings you add it as a library May 16 23:38:06 t0mless: in project structure? May 16 23:38:16 t0mless, is there any specs for the images i can use for the gridView ?? , i tried to use my images , but i didn't figure out this method http://pastebin.com/4sMsRnbq or what it's doing , i've tried even to change one of them to my images' name , got error invalid token May 16 23:38:33 john_doe_jr yea May 16 23:39:02 f00bar80 do you know how drawable resources work May 16 23:39:03 ? May 16 23:39:42 t0mless, i'll try to check in google May 16 23:39:59 check in the developer docs would best place May 16 23:40:31 http://developer.android.com/guide/topics/graphics/2d-graphics.html#drawables May 16 23:41:04 WTF May 16 23:41:05 http://phandroid.com/2012/05/16/verizon-will-not-honor-grandfathered-unlimited-data-if-you-upgrade-this-summer-onward/ May 16 23:42:43 I guess I should go get a new phone before that happens May 16 23:47:41 t0mless, k i checked and did that, but still can't understand this method http://pastebin.com/4sMsRnbq or what it's doing May 16 23:47:59 first, that's not a method May 16 23:48:13 t0mless i still dont know how to use getItem() May 16 23:48:32 second, it's an array of drawbale IDs, that the adapter uses to display images May 16 23:48:35 t0mless, sorry i mean array May 16 23:48:45 so if you want your own drawable in there May 16 23:48:54 substitute one of them for R.drawable.my_image May 16 23:49:06 if the image in your res/drawable folder is my_image.png May 16 23:49:21 vorwaerts I can not express how little I care May 16 23:50:08 =) May 16 23:50:10 vorwaerts: getItem() of your adapter? May 16 23:51:01 i got it now - onListItemClick has "long id" - this is the id from getItemId() May 16 23:51:25 how to know that May 16 23:51:54 yes May 16 23:53:15 ok, got my offer from the second place I interviewed at on monday... now to ping the first place and see if there's anything going on yet May 16 23:53:31 if that doesn't work, you could make a sign May 16 23:53:37 and hold it up outside the googleplex May 16 23:53:43 heh May 16 23:53:51 pfn: http://imgbin.org/images/8053.png May 16 23:53:57 just uploaded that screenshot a second ago May 16 23:54:07 pimped out my graph view May 16 23:54:47 togglable series via legend, slider to quick scroll and show current scrolled position, spinners to adjust viewsize and interval May 16 23:55:00 nice May 16 23:55:00 is that on the market? May 16 23:55:04 readme: yes May 16 23:55:11 whats it called? May 16 23:55:11 haven't uploaded new version yet May 16 23:55:14 you drawing the graph widget yourself or using a graph library? May 16 23:55:17 readme: obviously... May 16 23:55:47 t0mless: customized the heck out of a library May 16 23:55:48 nm found it :) May 16 23:55:54 HA May 16 23:56:07 Really need to work on making a non=shitty library May 16 23:56:11 t0mless: http://code.google.com/p/iptableslog/ May 16 23:56:14 pragma- which library did you start with? May 16 23:56:17 feel free to lift source May 16 23:56:26 jjoe64 graphview May 16 23:57:14 readme, if only that would make it happen any faster ;-) May 16 23:57:27 t0mless: planning to add these pulls to it soon too: https://github.com/jjoe64/GraphView/pull/9 May 16 23:58:00 I have the following code http://pastebin.com/MJuhWREB and the button does not work, I get no errors anywhere. Any ideas on what could be wrong would be appreciated May 16 23:58:04 how can i add a item between two listview items? May 16 23:58:17 pfn: i had some luck on stackoverflow careers today. got a phone interview tomorrow at 12 May 16 23:58:29 anyone, I've got this tablelayout that match's parent and then I have a tableRow w/ in that tableLayout with a Radio button in that tableRow...why can't I center the radio button w/ a layout_gravity="center"? May 16 23:58:33 I didn't apply, I just put up a profile because it'd be stupid not to. May 16 23:58:38 heh, nice May 16 23:58:49 i like the fishing approach better than hunting May 16 23:58:54 but out bait, see if they take it May 16 23:59:20 my GF actually got her new job from a person scouting her on linked in May 16 23:59:27 put* May 16 23:59:30 oh nice. May 16 23:59:30 I only seem to be able to find recruiting companies May 16 23:59:46 i deleted linkedin because of that May 17 00:00:13 the only people that bug me on linkedin are recruiters May 17 00:00:17 so I don't really bother looking at it May 17 00:00:20 t0mless, in the following http://pastebin.com/1q0d6W55 why i'm getting >> "web cannot be resolved or is not a field" May 17 00:00:35 I've never even heard of linkedin before May 17 00:01:32 but I really want to go to work at the place I interviewed in the morning on monday May 17 00:02:39 send them a follow-up email or call showing that you're interested May 17 00:02:52 guaranteed to increase your chances by at least 20% May 17 00:03:17 well, I let them know that I got an offer, and in this case, it's somewhat of a larger company, doesn't make that much of a difference May 17 00:03:34 f00bar80 what line? May 17 00:03:45 seems I needed to use "adb install $apkName" May 17 00:04:02 instead of relying on Eclipse May 17 00:04:15 or you need to not launch from an xml file May 17 00:04:21 or you need to setup your run configurations May 17 00:04:46 how'd I do that? May 17 00:05:00 1) don't click run from an xml file May 17 00:05:11 is there a way to merge themes together? May 17 00:05:21 2) click on the arrow next to the run and do Run Configurations... May 17 00:05:25 and set up a proper one May 17 00:05:28 I think it's in there May 17 00:05:30 I usually right click my Project > Run As > Android Application May 17 00:05:38 and that works for Debug May 17 00:05:41 been a while since I used eclipse May 17 00:05:47 but not for signed packages May 17 00:05:56 I'll try and see what the 2nd option does May 17 00:06:10 belgianguy oh, you're trying to install a signed package? May 17 00:06:13 i don't even bother doing release builds in eclipse May 17 00:06:16 yea, can't do that from eclipse May 17 00:06:20 I just do them from the command line May 17 00:06:30 t0mless, line 15 May 17 00:06:34 I build everything on the command line May 17 00:06:52 I chose to interview at the second company too early... is the problem May 17 00:06:54 f00bar80 probably because you don't have an id named web anywhere May 17 00:07:06 darn them for setting expiration on the offer to this monday May 17 00:07:31 k, t0mless, then I at least found out before losing my mind ;) May 17 00:10:51 pragma-: don't forget jjoe64 graphview is lgpl, so i think if you modify it … May 17 00:10:59 dunno if your app is open sourced or not May 17 00:12:22 he already linked the source :p May 17 00:14:58 pragma-, my suggestion would be log-scaling the chart May 17 00:15:17 dunno if it makes sense for that particular chart, though May 17 00:16:35 t0mless: oh yeah, now i see :) May 17 00:18:02 can anyone help me with this problem? I have the following code http://pastebin.com/MJuhWREB and the button does not work, I get no errors anywhere. Any ideas on what could be wrong would be appreciated May 17 00:18:42 what's going wrong? May 17 00:19:29 i'm a fan of having Activity extend OnClickListener and using setOnClickListener( this ) May 17 00:19:45 t0mless: html5 charts : http://humblesoftware.com/flotr2/ May 17 00:19:49 pragma- are you the one that submitted the pull request to jjoe? May 17 00:21:38 I very much would like to be able to have pinch/zoom in a chart May 17 00:22:00 achartengine has that May 17 00:22:53 When you call setError on an EditText, it shows the error of the first EditText that has an error set May 17 00:22:55 although, when i tested it, sometimes it would get confused between your 2 fingers, and swap axes May 17 00:23:03 is there a way to programmatically force a view to show its error? May 17 00:23:08 can i have a scrollview in a scrollview? May 17 00:23:14 vorwaerts: INCEPTION May 17 00:23:24 vorwaerts: if they don't scroll in the same dimension May 17 00:23:39 so i need to set a dimension? May 17 00:23:49 like, if you have a h scrolling one in a v scrolling one, that is ok May 17 00:23:58 because i have a scrollview in a scrollview und when i scroll the inner one, the other scrolls May 17 00:24:03 but you can put a h scrolling one in an h scrolling one May 17 00:24:16 i have an activity that contains a worker thread that retrieves some JSON from a server. based on that JSON, i need to update the view. the problem i'm having is that the worker thread can't update the view (only the initiating thread can 'touch its views'). any suggestions? May 17 00:24:18 yes h in h May 17 00:24:21 *cant May 17 00:24:25 damn ^^ May 17 00:24:33 b1n0ry: use a Handler May 17 00:24:43 i can, but then i can scroll only one of them May 17 00:24:47 create it on the main thread, post runnables to it. Or use the Handler you already have, runOnUiThread() May 17 00:24:58 or, use an AsyncTask, and change the views in onPostExecute. May 17 00:25:15 i have a handler now. will the handler be able to update the view? May 17 00:25:24 yes, as long as you created that handler on the UI thread. May 17 00:26:09 i need to read the runOnUiThread() some more, thanks for the point in direction May 17 00:28:01 not exactly sure what you mean by the statement, I am still fairly new to android programming May 17 00:28:04 isnt there a "onScrollingScrollView() { stopScrollingAnotherScrollView(); } ? May 17 00:28:24 why the hell do you need a scroll view inside a scroll view? May 17 00:28:24 interesting. a TextView will only showError() if it isFocused(). So to get the Button to popup an error, I should just be able to focus it. Lets see. May 17 00:28:56 Vorwaerts: If you want a scroll view inside a scroll view you are gonna have to just disable whatever scrollview needs to be disabled in the first scrollviews onScroll or whatever its called May 17 00:28:57 Kaleva i meant implement: public class Newwall extends Activity implement OnClickListener { May 17 00:29:03 fuuu May 17 00:29:14 afaik May 17 00:29:17 implements <- extra s May 17 00:31:07 readme, that did the trick, you're a genius :) May 17 00:31:52 can you programtically get a list of all your manifest receivers and their declared intent filters? May 17 00:32:11 8-) May 17 00:33:32 ok so i changed to implement OnClickListener, does my code for when the button is clicked go there now instead of where I have it and do I still need the wallcalc.setOnClickListener... May 17 00:34:03 i like the part where you launch your app 3 times and it works great. then you launch your app a 3rd time after inserting a comment into the code and you get stack traces. that part's the best. May 17 00:35:18 canadiancow|work: closest thing i could find file:///Users/ahelder/dev/android-sdk-macosx/docs/reference/android/content/pm/PackageManager.html#queryBroadcastReceivers(android.content.Intent, int) May 17 00:35:29 oops, from my hd :) May 17 00:35:37 lol May 17 00:35:55 anyhow, you can see from the link May 17 00:36:07 you should be able to read your own manifest with XPath May 17 00:37:02 there is some stuff in PackageInfo too May 17 00:37:54 bah... nope... working again. i rebooted the phone. apparently not the comment that caused it ;) May 17 00:38:03 haha! you can use setError() on a button AND get a popup error if you call setFocusableInTouchMode(true) and requestFocus() on it before you call setError()! May 17 00:38:58 hmmm thanks g00s i think that might do what i want May 17 00:39:07 ideally i want to see if i have the C2DM receiver in my manifest May 17 00:39:13 WebView integration with