**** BEGIN LOGGING AT Sat Dec 22 02:59:58 2012 Dec 22 03:31:18 ugh, wtf android Dec 22 03:31:37 on some of my test apps, for some reason when a very specific screen appears and renders its initial contents, the process dies with no information other than: Dec 22 03:31:58 I / WindowState ( 589): WIN DEATH: Window{4269d408 u0 com.example.foo/com.example.foo.MyActivity} Dec 22 03:32:11 a bunch of GC events just prior, but thats normal for the work going on Dec 22 03:34:18 jesus, i guess my best option is print debugging to see where it gets to? ugh. Dec 22 03:34:30 also, only some of my sample apps which have this same activity flow do this Dec 22 03:34:33 makes no sense Dec 22 03:35:22 well, print debugging shows it did crash during onCreate, so that's at least narrowing it down a lot Dec 22 03:35:45 wait no, misread my debug :( Dec 22 03:36:47 Can somebody please help me with this question: http://stackoverflow.com/questions/13999836/cursor-doesnt-seem-to-be-working-in-android-app Dec 22 03:37:03 the cursor is not working and I don't have any idea why? :( Dec 22 03:49:26 Can somebody please help me with this question: http://stackoverflow.com/questions/13999836/cursor-doesnt-seem-to-be-working-in-android-app Dec 22 03:49:30 the cursor is not working and I don't have any idea why? :( Dec 22 04:20:43 closer but still no cigar. I'm trying to make an onscreen keyboard that only fills up the bottom-left corner. I've extended keyboardView and overridden onDraw to draw directly to the canvas, but for some reason the keyboard fills the entire horizontal space. http://ompldr.org/vZ3M5dw code: http://pastebin.ca/2295713 Can anyone tell me what's wrong? Dec 22 04:23:52 jstream : can you modify the clip bounds? Dec 22 04:24:11 Here's a shot of hierarchyviewer, how do I affect that FrameLayout? http://ompldr.org/vZ3M5eg Dec 22 04:24:53 Pfhoenix: I can change the height of the black bar and green space by calling setMeasuredDimension in onMeasure Dec 22 04:25:08 but, changing the width only affects the green space Dec 22 04:33:25 Pfhoenix: what do you mean by clip? Dec 22 04:33:43 for the canvas you get passed in onDraw Dec 22 04:36:01 How would I do that? Dec 22 04:36:43 well, i guess i have here my first instance where git bisect may save me :) Dec 22 04:36:50 this bug is unsolveable if not for tools, surely Dec 22 04:43:54 sup guys Dec 22 04:44:08 wow down to only 388 nicks in channel Dec 22 04:45:29 some people have what are called "lives" Dec 22 04:45:32 not me though Dec 22 04:45:45 what are these 'lives' you speak of Dec 22 04:49:36 I thought that *life* thing used to exist before the interwebz Dec 22 04:52:27 i've heard my finance friends talk about it Dec 22 04:58:42 Pfhoenix: The right-hand clip is 200 Dec 22 04:58:54 so, I am modifying it Dec 22 05:09:55 does anyone here know how the onscreen keyboard works? Dec 22 06:00:43 heh, so android was an insurance policy on apple devices; and the moto X is an insurance policy on samsung Dec 22 06:01:10 How can I save some data to a Bundle in onStop so that it can be read back in onCreate, similar to how onSaveInstanceState works, but for times when the user just exits the app normall by pressing Back Dec 22 06:08:54 Guys, would it be a good idea to use the accelerometer after the first gps measurement has been done in order to know the location of the user? Dec 22 06:09:29 g00s: what do you mean insurance policy? If apple fails, android will prevail? Dec 22 06:09:57 wilornel: broadly' no Dec 22 06:10:19 wilornel: google didn't want to be in a position where their fate was in apples' hands Dec 22 06:10:31 g00s : sooo? Dec 22 06:10:44 speedEvil: Alright then would it be preferable to replace SOME gps measurments with accelerometer? Dec 22 06:11:00 the accelerometer is out by on average possibly 1% of g. maybe a little less. this adds up to an error of a few centimeters a second a second or so Dec 22 06:11:12 but now, samsung is the only one making a profit on android as an oem afaik Dec 22 06:11:12 well its less than the gps Dec 22 06:11:17 this however multiplies. Dec 22 06:11:38 g00s: I see Dec 22 06:11:47 but what kind of insurance is taht? Dec 22 06:11:50 after a minute, you're most of a meter a second out, with a positional uncertainty of 39m Dec 22 06:12:12 speedevil: thats with the accelerometer? Dec 22 06:12:13 after 10 minutes 300m Dec 22 06:12:13 so if samsung were to decide, to fork android, or to do away with google services like play (and have their own itunes) it would be pretty bad for google Dec 22 06:12:17 yes Dec 22 06:12:35 speedevil: a mterre a secound out.... which is 60 meters Dec 22 06:12:38 meter Dec 22 06:12:56 g00s : Oh I see, but isnt that kind of stuff copyrighted? Dec 22 06:12:57 and this neglects real life, where accelerometer alone doesn't tell you orientation Dec 22 06:13:42 SpeedEvil: I just need the position, not the orientation Dec 22 06:13:52 wilornel: accelerometer and gyro and magnetometer together aren't useless, used together with a kalman filter, to fill in small gaps in navigation Dec 22 06:13:55 Ark42, It is rough and I am sure someone else could do it better, but you could write it under your onStop call like here --> http://paste.ubuntu.com/1456398/ Dec 22 06:13:56 SpeedEvil: Is a gps check every 5 seconds good? Dec 22 06:14:44 SpeedEvil: so you're recommending to use the different sensors in the device Dec 22 06:14:48 wilornel: to get position from the accelleromeyter, you need to integrate the accellerations, which way you integrate them depends on the orientation of the device Dec 22 06:14:52 withs ome kind of library? Dec 22 06:15:35 what If I do the kalman filter but without the gyrometer Dec 22 06:15:41 it would still work, right? Dec 22 06:15:46 gyroscope* Dec 22 06:16:05 wilornel: basically, without GPS, your position will drift by at best tens of kilometers in the first hour, Dec 22 06:16:22 SpeedEvil: But is a gps check every 5 seconds too much? Dec 22 06:16:54 speedEvil: AAAND GPSes have their own inaccuracy Dec 22 06:16:55 wilornel: GPS check every 5s is unlikely to be more expensive than one every 1s Dec 22 06:17:11 so I should do one every 1 s? Dec 22 06:17:22 sure. but it's - broadly - a constant random error depending on conditions Dec 22 06:17:41 depends on your app. Dec 22 06:17:47 and the device. Dec 22 06:17:50 ehh Dec 22 06:17:54 I think 5 seconds is enough Dec 22 06:18:01 I can change it easily in any way Dec 22 06:18:02 .5 Dec 22 06:18:07 .5 seconds? Dec 22 06:18:10 if you're doing realtime navigation Dec 22 06:18:12 that would drain the batteries Dec 22 06:18:22 Well I need to know the precise location of the user Dec 22 06:18:24 well people should get bigger batteries Dec 22 06:18:27 in many cases, the GPS will be considerably more economical in battery than attempting to integrate the position from all the sensors, Dec 22 06:18:33 really? Dec 22 06:18:37 yes Dec 22 06:18:45 So instaed of doing the kalman filter, I should use the gps? Dec 22 06:18:55 i can't wait until we have android powered guns Dec 22 06:19:02 that would be awesome Dec 22 06:19:05 and libnra Dec 22 06:19:09 you would go like: su Dec 22 06:19:15 in general, GPS, and or cell towers/WiFi positioning Dec 22 06:19:16 ls /gun Dec 22 06:19:28 SpeedEvil: Alright Dec 22 06:19:33 but how about tunnels? Dec 22 06:19:38 Kalman filter, right? Dec 22 06:19:52 accel may be useful for trying to determine when the device is on the table, not moving Dec 22 06:20:00 so no GPS. and yes Dec 22 06:20:14 has anyone here used titanium? Dec 22 06:20:21 speedEvil: and we can get our location using gps from anywhere in the world right? Dec 22 06:20:31 Mechdave - I was hoping for a way to make a new Bundle() and then send that somewhere that Android will recognize so it gets sent back to onCreate later. Can that be done? Dec 22 06:20:31 with my custom View control, why would my horizontal scrollbar not render in the portrait mode but will in the landscape mode? Dec 22 06:20:47 except from underground.. Dec 22 06:21:41 Alright then ill use the gps once each 5 seconds for 30 mins Dec 22 06:21:49 wilornel: pretty much. and in some buildings and cars Dec 22 06:21:53 Alright Dec 22 06:22:02 you cant get gps from your car? Dec 22 06:22:06 you need to turn it in till it's locked Dec 22 06:22:15 What? Dec 22 06:22:21 what is locked? Dec 22 06:22:24 some cars have gps obscuring glass Dec 22 06:22:27 oh Dec 22 06:22:30 .... Dec 22 06:22:39 getting a GPS fix takes some time. Dec 22 06:22:52 so these people wont be able to use the gps fonctionality Dec 22 06:22:56 Ark42, I am not sure, I am just beginning myself. I suppose you could research creating bundles :) Dec 22 06:22:57 heat reflective glass may block gos Dec 22 06:23:00 GPS Dec 22 06:23:01 at all? Dec 22 06:23:42 enough to make a fix I possible Dec 22 06:23:46 impossible Dec 22 06:23:55 ehh Dec 22 06:24:11 and are those glasses a new kind of thing that will pretty much be in every car soon? Dec 22 06:24:19 or is it just like some preference thing? Dec 22 06:24:35 is it an evolutionary glass? Dec 22 06:24:42 a revolutionary glass Dec 22 06:25:10 ANYWAYS Dec 22 06:25:15 THANSK TONS SPEEDEVIL Dec 22 06:26:40 it's on a few high end cars Dec 22 06:28:26 Ark42, You could always start here --> http://stackoverflow.com/questions/4999991/what-is-the-importance-of-bundle-in-a-android-program Dec 22 06:30:19 I already have a Bundle being saved from onSaveInstanceState() and the code to reload it in onCreate() which is why I want to reuse that style for onStop() Dec 22 06:31:40 Ark42, why not just write to the same bundle when onStop is called? Dec 22 06:33:03 onStop() doesn't have a Bundle parameter, so there isn't one to write to Dec 22 06:33:56 anyone Dec 22 06:35:04 Ark42, how about writing a method to handle writing the data to the bundle and then calling that method from onStop() Dec 22 06:35:49 I already have all those methods, but the bundle has to be given to the Android system somewhere, because my app will stop running, I don't know how to do that Dec 22 06:36:06 you can't just create the bundle, write to it, and then do nothing with it. It won't get passed back to onCreate later that way Dec 22 06:36:33 Ark42, I have always just written to a data file somewhere on the SD card. Dec 22 06:36:53 then reloaded the file on start Dec 22 06:37:27 creating files in arbitrary locations doesn't seem like the way to go about it Dec 22 06:39:51 How about onRestart()? Dec 22 06:40:34 doesnt change anything Dec 22 06:41:39 no one here uses titanium at all? Dec 22 06:43:05 Ark42, Have a look here under the heading Stop your Activity --> http://developer.android.com/training/basics/activity-lifecycle/stopping.html Dec 22 06:43:31 Ark42, it tells you how to put the contents of a note into persistant memory Dec 22 06:44:33 so I'm working some some sqlite tables. Right now I have an Sqlite3 database with four tables Dec 22 06:45:06 can I make an SqlOpenHelper with four tables? Or would it be best to make four separate SqlOpenHelpers? Dec 22 06:45:36 all the data in the databases will not be changed. They should only be read Dec 22 06:47:14 1 helper for the whole db Dec 22 07:46:36 oh my god. i think i just hunted down the most out of control annoying bug in Android Dec 22 07:47:15 i need to refine my repro case, but it looks very much like if you draw a point way outside the canvas clip with harware acceleration on, your process will shutdown "normally" (no stack, no signal sent, nothing) Dec 22 07:47:57 this took me 10 freaking hours to find Dec 22 07:48:40 (when somewhere way down inside android itself effectively calls exit() without printing anything, things get a little tough to troubleshoot) Dec 22 07:50:23 ow Dec 22 07:50:55 i am working now toward finding the exact instruction that caused this then creating a test case to demo it to Romain / others. Dec 22 07:51:25 but i know 100% that it's in the draw path of a piece of code that will definitely draw something way the fuck outside the clip (many thousands of pixels outside it) Dec 22 07:51:48 that code, of course, is buggy. but you know, a little "HEY YOU SHOULDN'T DO THIS" debug line would be preferrable :) Dec 22 07:52:07 bbl, *working* Dec 22 07:53:13 :-) Dec 22 07:55:27 i feel like i could just murder the framework guys right now ;) Dec 22 07:56:47 GOT IT! Dec 22 07:57:27 canvas.drawCircle with a radius of infinity does it Dec 22 07:57:33 :-) Dec 22 07:57:41 *EXHAUSTED* Dec 22 07:57:52 hardware dependant? Dec 22 07:57:59 who freaking knows! Dec 22 07:58:09 although it is happening on both my gnex and my n4 Dec 22 07:58:31 im too tired to think through the fallout. i just want my repro case and i'll forward it along to b.android.com and go to bed :) Dec 22 07:59:12 congrats! Dec 22 08:00:14 hey here's a fun fact... Dec 22 08:00:23 i found a comment in my code that basically does Dec 22 08:00:45 if (canvas.quickReject(x - radius, ... y + radius, Canvas.EdgeType.AA)) { ... } Dec 22 08:00:53 err if (!canvas.quickReject Dec 22 08:00:59 before i go ahead and call drawCircle Dec 22 08:01:08 the comment said i did this to avoid these spammy annoying messages: Dec 22 08:01:11 http://code.google.com/p/android/issues/detail?id=24023 Dec 22 08:01:24 so apparently quickreject of x - inf, ... fails to reject/ :) Dec 22 08:02:35 here's the craziest part... it doesn't crash immediately on calling this method Dec 22 08:02:40 i think because of drawing lists in Android Dec 22 08:02:47 it crashes _after_ my draw method completes Dec 22 08:02:54 but if i comment out the drawCircle, it does not crash. Dec 22 08:04:01 (also, unrelated, why the hell does my code compute inf for this radius? :) Dec 22 08:16:19 omg, the root cause in my code goes back to a freaking truncation of a float to an int, resulting in 0, so something else does 0 / x, resulting in INF, ... Dec 22 08:16:33 this data goes through sooo many layers to finally crash the process too Dec 22 08:16:33 wow Dec 22 08:31:30 guys Dec 22 08:31:55 does anyone have any idea why cm10 is lagging so much on my phone? Dec 22 08:32:13 go to #cyanogenmod Dec 22 08:32:19 ask the cm guys :) Dec 22 10:14:43 How to wrap text inside a table row. http://stackoverflow.com/questions/14000755/android-table-layout-alignment Dec 22 10:19:15 hi, how can i make a combo box like the HTML method? in HTML i can get directly the corresponding value of the selected combo box instead of using the selected item index to refer to the value using an array in Java. Dec 22 10:21:02 I've got to import two projects names library in android. Eclipse does not allow this, has anyone faced this before? Dec 22 10:21:04 superlinux-hp: wut? is it too much to do the equivalent of foo[foo.selectedIndex] in javascript in java? Dec 22 10:21:52 alankila, cos there a work that is repetitive Dec 22 10:22:15 so if it's defined once thru xml... it will be awesom Dec 22 10:24:24 ali__, you can import only one project at a time. مش مسموح لك اكثر تفتح اكثر من مشروع واحد بكل مرة Dec 22 10:24:49 well you could subclass spinner to do something custom I guess. Dec 22 10:25:02 superlinux-hp: they both are library projects Dec 22 10:25:10 alankila, i thought so Dec 22 10:25:11 any other way of doing dependency management Dec 22 10:25:13 but I wouldn't recommend deviating from the accepted practice of using a listener and then calling a single method to extract the value Dec 22 10:26:12 ok alankila Dec 22 10:27:01 ali__, do you mean that you have jar files? or you have source codes? Dec 22 10:27:05 in general terms these applications are not request-response systems, they are event-based Dec 22 10:27:15 ali__, you an arab? Dec 22 10:27:17 so there is necessarily some differences to how things must work Dec 22 10:27:37 superlinux-hp: source code I've got projects from github Dec 22 10:27:45 ah ok Dec 22 10:27:50 superlinux-hp: not really but I've lived in Dubai for a while Dec 22 10:29:02 ali__, ok. i am an arab. just tell me how do you usually import a new project? i just want to see if you are doing it right Dec 22 10:29:21 I'm pretty sure I've done it right Dec 22 10:29:30 ah ok Dec 22 10:29:34 I think I'm going to try using maven or ant Dec 22 10:29:47 superlinux-hp: where are you located? Dec 22 10:30:05 ali__, i have n't reached the level of making libraries yet Dec 22 10:30:23 ali__, i am a palestinian living in lebanon Dec 22 10:30:47 superlinux-hp: sweet Dec 22 10:30:56 welcome Dec 22 10:32:02 ali__, look for my free apps on play store . search keyword: "net.superlinux" Dec 22 10:36:15 onclick of an imageView i am changing the src of the imageView using setImageResource but the new image is getting streched..why is this happening? Dec 22 10:37:44 Android03: its because the size of the image is different form the size of the imageview Dec 22 10:38:18 Android03: try keeping the width and height as wrap_content Dec 22 10:41:14 is there any image recognition library available? Dec 22 10:41:21 something simple like ill store few images with a title Dec 22 10:41:36 and if an image looks similar to one of the stored images it will output the title Dec 22 10:42:01 ali_: no but the image view is wrap content only Dec 22 10:42:52 The example on http://developer.android.com/training/monitoring-device-state/battery-monitoring.html is not working for me Dec 22 10:43:08 Android03: fitXY Dec 22 10:43:18 is it possible to dump the incoming intent extras? Dec 22 10:43:29 ali_ ok i try that Dec 22 10:48:46 luyang: nope I think somethings are shown in the log Dec 22 10:50:01 Sure you can Dec 22 10:50:10 Bundle#keySet() Dec 22 10:50:13 Iterate over them Dec 22 11:07:15 yes ok it was null Dec 22 11:07:42 anyway, the example at http://developer.android.com/training/monitoring-device-state/battery-monitoring.html just causes the intent action to be set… not the bundle extras Dec 22 11:07:58 so the variables are always false Dec 22 11:08:49 oh hang on Dec 22 11:09:03 where should I invoke IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); Intent batteryStatus = context.registerReceiver(null, ifilter); Dec 22 11:09:43 so that is a way to get sticky intent state. Dec 22 11:10:25 yeah I guess I could do that in my broadcastreceiver description huh Dec 22 11:11:14 I wanna register for sticky intent but wonder where I should do that Dec 22 11:11:35 alankila: were you into photography? i remember you working on a camera project Dec 22 11:11:38 I don't understand why the batterymanager doesn't have public documented methods. I guess these stuff were written by different folks. Dec 22 11:11:59 it was industrial photography. I'm not personally particularly interested of the field. Dec 22 11:12:10 ah, k Dec 22 11:12:19 I ended up writing java program that interfaces with a canon eos camera over the PTP protocol via usb connection. Dec 22 11:12:33 right, now i remember Dec 22 11:12:49 Is there a method I can override somewhere on application create for example? Dec 22 11:13:17 there's been a lot of problems with the camera. It turns out the usb connection is quite sensitive to battery drain issues on both the host and the camera side Dec 22 11:13:49 :( Dec 22 11:13:59 so if camera is running out of battery, the program started to bug randomly. Similarly, if underpowered chargers were connected to the laptops used to run my software, there were random disconnects again Dec 22 11:15:17 I think the canon eos camera has skipped on properly regulating the USB electronics most likely, or just draings too much power or something. Who knows. Dec 22 11:16:06 i noticed that my canon camera would not charge over usb Dec 22 11:16:24 so yeah, even though it was plugged in the battery would just drain Dec 22 11:16:28 also it doesn't help that the client is god damn el cheapo and buys all sorts of 2nd hand returned random laptops with varying host OS versions and whatnot. It's amazing the software works on pretty much any laptop they use. Dec 22 11:17:02 dunno about nikon, but canon really seems to barely have their shit together Dec 22 11:17:08 yes I believe the camera can't be powered by usb at all. They are using wall chargers for the cameras now too Dec 22 11:18:07 I guess I'd agree. Also I hate working on undocumented protocol like the EOS PTP extensions Dec 22 11:18:19 there might be some kind of SDK but I couldn't find it anywhere. Dec 22 11:18:42 so I used usb snooper with the official EOS utility to work out how to interface with it Dec 22 11:19:03 cool Dec 22 11:19:25 it's total shit. But the number of distinct commands I need is quite small, around 10 or so Dec 22 11:19:53 couldn't work out how to extend the powersave though so I simply reset the camera every 5 minutes or so. Makes a nasty crunch as the mechanics do stuff as I exit remote shooting mode :-p Dec 22 11:20:09 omg Dec 22 11:21:07 this camera is really odd. I set never to powersave in the menu and it still enters power save every 10 minutes. Attempts to send some commands periodically doesn't extend it. There's probably some specific extended eos message -- another irritating thing to deal with -- which might do it, but practically no way to discover what command that might be Dec 22 11:22:38 there would probably be a way to get warning about impending powersave through the extended status messages API, which dumps hexadecimal register ids and values to me every time I use it, but I only worked out enough of that to see how it informs me that a picture has been taken Dec 22 11:22:56 I could not work out how to delete the picture object from memory, though, other than reset the fucker again Dec 22 11:23:20 i bet guys over at the chdk forum would know Dec 22 11:23:32 I think the application is very industrial in style. Anybody dealing with shitty programs knows how they look and behave. Dec 22 11:25:08 and mine definitely fits the bill. But on the other hand, the only difference between mine and properly written one would be that it would tolerate bad settings in the menu -- it would fix the camera up for remote shooting by changing the settings to right ones -- and it wouldn't need to wear the mechanics so much because it wouldn't use reset as crutch to clear memory and to avoid powersave Dec 22 11:44:19 alankila: stupid question; why did they need an eos? this could not have worked using the regular phone camera? Dec 22 11:47:49 how can I add projects on github as ant ivy dependencies Dec 22 11:47:49 ? Dec 22 11:48:10 ali__: i think you need to hit the maven repo Dec 22 11:48:53 g00s: are there any good links on how to do this? Dec 22 11:49:12 the ivy web site served last time i tried it; its been a long time Dec 22 11:51:04 g00s: the customer found those cameras cheaply and wanted around 10 Mpix Dec 22 11:51:38 though I talked them down to about 6 M because of the size of the jpegs generated, and because of other slowdowns on the laptops due to scaling too large images. They simply wanted printed manifest inside the boxes they photograph to be legible Dec 22 11:52:10 and I could show that at 6M they can still comfortably read everything. Dec 22 11:52:46 we tried regular webcams first but they were around 2M and fairly slow because of bandwidth limitation and lack of finder mode in typical webcam hardware Dec 22 11:55:05 OK I get the SMS receive function working but not the sms sending Dec 22 11:56:18 hm I forgot to precede the class name with . in the manifest :P Dec 22 12:04:44 Has any been able to change the Share Action Providers Icon via program ? http://stackoverflow.com/questions/14002657/android-sherlock-action-shareactionprovider-icon Dec 22 13:50:16 is there a way to let a program enable and disable "Unknown Sources"? I am looking at a package manager, and to allow it to install programs, you need to tick that box. it would be better if you could trust that program (the package manager) to install programs, without having to trust *all* non-market apps. Dec 22 13:52:20 alexander__b: at the moment there is no such option afaik, and allowing a program to enable or disable it, is somewhat dangerous, so I guess a solution could be that android will allow you some time to give that permission to specific apps Dec 22 13:56:07 im trying to run app on device(nexus 7) no caompatible AVD found error Dec 22 13:56:16 i found some usb driver but its for windows Dec 22 13:56:31 im running fedora, do i need a driver? Dec 22 13:56:43 brx_: no you only need to change your udev rules Dec 22 13:56:54 http://developer.android.com/tools/device.html Dec 22 13:56:59 thanks timroes Dec 22 13:59:13 /etc/udev/rules.d/51-android.rules. Dec 22 13:59:25 '.' at the end of the file Dec 22 13:59:42 do i need that full stop at the end? Dec 22 14:00:01 ahh Dec 22 14:00:03 got it Dec 22 14:03:18 no that is the end of the sentence :) Dec 22 14:03:41 hehe :) Dec 22 14:04:04 i added the udev rule and chmod'd the file but adb devices doesnt list my device Dec 22 14:04:20 timroes, surely i dont have to restart computer? Dec 22 14:04:29 sure you dont Dec 22 14:04:34 but you have to reload udev Dec 22 14:04:45 /etc/init.d/udev reload Dec 22 14:05:05 eh restart* not reload Dec 22 14:05:47 oh dear, [root@router brx]# /etc/init.d/./udev restart Dec 22 14:05:47 bash: /etc/init.d/./udev: No such file or directory Dec 22 14:05:59 llo, i'm trying to add a gesture listener to a linear layout. i can add it, but it's no use. if i add that same listener to a textarea, it works. how can i add it to the layout? Dec 22 14:06:05 hello* Dec 22 14:06:52 brx_: you name your pc router? or have you perhaps opened some ssh and are on a wrong device :D Dec 22 14:07:01 my PC is called router Dec 22 14:07:41 its cuz im in fedora, looking for the ocmand now Dec 22 14:08:51 brx_: i am not familiar with fedora, so perhaps they don't use the init system, and you have to restart it somehow else Dec 22 14:09:10 so pc restart would also help :) and ofc plugging out and in your device again Dec 22 14:09:27 ok thanks for the help, restarting Dec 22 14:11:44 hi Dec 22 14:11:59 why i cant access the var calcula inside a onClick event? Dec 22 14:11:59 http://codepad.org/rnqxLbOw Dec 22 14:12:34 Suchorski: because in java you can only access outer class variables, if they are final Dec 22 14:12:50 how can i resolve this? Dec 22 14:12:54 crating a global var? Dec 22 14:13:28 what a crap day for worldism's Dec 22 14:13:36 The final local variable calcula cannot be assigned, since it is defined in an enclosing type Dec 22 14:13:47 what is a enclosing type? Dec 22 14:13:59 need to be inside the same block? Dec 22 14:14:16 Suchorski: onClick is a method insice the OnClickListener anonymous inner class Dec 22 14:14:33 it can only access local variables of the method it is declared in, as long as they are final Dec 22 14:15:28 but even final occurs the same error Dec 22 14:15:31 in your case your concept lacks anyway, because showing the dialog wont wait until its finished Dec 22 14:15:38 final boolean calcula = false; Dec 22 14:15:39 ? Dec 22 14:15:44 yeah you could do that Dec 22 14:15:50 but ofc you cannot change a final variable anymore Dec 22 14:16:01 thats what final variables are for Dec 22 14:16:19 anyway showing the dialog won't pause your code Dec 22 14:16:36 and as far as i see, thats what you want to do, wait till dialog finished, and then continue with your method Dec 22 14:16:48 wait the world is not over Dec 22 14:16:53 in that case the secodn part, that should be done when the dialog is closed, has to be exactly there, in the onclick method of the dialog Dec 22 14:17:16 timroes don't understand Dec 22 14:17:18 the world ended yesterday luyang but the government covered it up Dec 22 14:17:26 luyang: it is, ended yesterday, but we came all to hell, that is locking exactly like the real world looked before it got sdestroyed Dec 22 14:18:05 brx_: ah ;) Dec 22 14:18:16 timroes: :D Dec 22 14:18:42 Suchorski: I guess line 26 should be executed after you clicked the button in the dialog? Dec 22 14:19:13 no no timroes Dec 22 14:19:26 i want the confirm if only the number is greather than 100000 Dec 22 14:20:00 yeah and if number is greater than 100000, you want to make the dialog and after the user clicked do the rest of the method (from line 26 on)? Dec 22 14:20:34 yes Dec 22 14:20:44 but it doesnt work like that Dec 22 14:20:54 no? Dec 22 14:20:54 showing the dialog won't pause the method Dec 22 14:21:05 and how can i pause the method? Dec 22 14:21:07 it shows the dialog and continues then immediately with the rest of the method Dec 22 14:21:09 you cannot Dec 22 14:21:24 have a way? Dec 22 14:21:38 create a new method calculate(boolean calcula) that holds the rest of the method Dec 22 14:22:01 and calculate i call inside onclick(yes)? Dec 22 14:22:06 yeah Dec 22 14:22:08 tks Dec 22 14:22:10 or in the else branch Dec 22 14:22:11 will try :D Dec 22 14:22:17 if you don't show the dialog Dec 22 14:30:18 How to avoid out of memory error while doing an image download? Dec 22 14:30:34 I use return Utils.getScaledBitmap(BitmapFactory.decodeStream(new FlushedInputStream(inputStream)), SCALE); Dec 22 14:31:04 where Utils.getScaledBitmap() is a function to scale a bitmap Dec 22 14:43:12 napster: I'm pretty sure you can google that or https://twitter.com/JakeWharton/status/280496101642080256 perhaps Dec 22 14:45:23 luyang: ok Dec 22 14:50:17 what is android terminology for a collapsed list that may be expanded? I mean a graphical list of e.g. textviews, not data type list. Dec 22 14:52:13 is there even something like this? I have a bunch of textviews that I want collapsed with a arrow button or similar to expand them. Dec 22 14:53:50 `expandable listview` ? Dec 22 14:54:32 lol timroes Dec 22 14:54:49 on android 4.2 you gotta go to settings->about phone Dec 22 14:55:07 and then tap on the build number several times to enable developer options on the device Dec 22 14:55:52 http://home.comcast.net/~tomhorsley/hardware/nexus7/hacking.html Dec 22 14:56:14 what a blag that was Dec 22 14:56:28 it's good that they hid the dev options for normal deadly users Dec 22 14:56:52 i guess so luyang Dec 22 14:57:52 damn, the app im working on i hardcoded /sdcard/ but this nexus is using sdcard0 Dec 22 14:57:54 party over Dec 22 15:08:30 Any tip on how to avoid passing around the Context? Dec 22 15:11:55 I want things to be decoupled and still be able to trigger each other Dec 22 15:13:02 luyang: you mean you need the context so you can send intents? Dec 22 15:15:12 A third party class in a jar needs it to ctx.getFilesDir().getAbsolutePath() Dec 22 15:15:21 and I wrap that class Dec 22 15:15:44 luyang: I extend application, save the application context in the onCreate method, and give static access to it Dec 22 15:16:09 um ok Dec 22 15:16:21 what about device rotation? Dec 22 15:16:28 and memory leaks? Dec 22 15:16:34 whats about it? Dec 22 15:16:48 timroes: http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/ Dec 22 15:17:33 "The easiest way to keep it around and not having to reload it on every rotation is to keep in a static field:" … "This code is very fast and also very wrong; it leaks the first activity created upon the first screen orientation change." Dec 22 15:17:44 anyway Dec 22 15:18:31 luyang: yeah because you are holding a reference to an old activity Dec 22 15:18:39 https://github.com/DokuWikiMobile/dokuwikimobile/blob/alpha/src/org/dokuwikimobile/DokuwikiApplication.java Dec 22 15:19:04 either the application gets created again, in that case you just override the old context, or it gets destoryed completely Dec 22 15:19:20 ah coolio Dec 22 15:19:27 cool exception thingie Dec 22 15:19:35 and btw the exception should never occur Dec 22 15:20:06 unless you try to call the method in some static initializations Dec 22 15:20:16 k Dec 22 15:20:29 but if you call it in regular methods, (the ones you would also call after onCreate in your activity) you won't get trouble Dec 22 15:21:25 I don't know if thats the best way to do it, but I like that way to give access to the application context, so i don't need to pass a context through all classes Dec 22 15:26:39 ok I just pass in ActivityClass.this Dec 22 15:27:22 yeah also a solution :) Dec 22 15:44:09 How can I get the header views that I have added to a ListView? Dec 22 15:46:40 a spinner is following me around. any hints for what I can search for in the layouts or whatever? Dec 22 15:47:12 I assume there is some kind of property that means "stay at this position even when scrolling". Dec 22 15:52:31 what does 'root view' mean? Dec 22 16:01:30 a view which has no parent? Dec 22 16:01:42 jstream^ Dec 22 16:02:15 hi Dec 22 16:03:10 I'm working on some app, I use abs, but on of activity looks strange on ics, while on froyo is ok Dec 22 16:03:12 http://img441.imageshack.us/img441/3223/themesherlocklightdialo.jpg Dec 22 16:03:57 I use android:theme="@style/Theme.Sherlock.Light.Dialog" in manifest for this activity Dec 22 16:04:30 afaik, it should look the same for both platforms Dec 22 16:05:01 any ideas? Dec 22 16:41:24 hi, what is the purpose of the G-sensor? Dec 22 16:48:04 <_pusher_> hi iam new to java coding for android and iam wondering if there's any code available for doing something like this: Dec 22 16:48:05 <_pusher_> http://nodebox.net/code/index.php/Graph Dec 22 16:58:41 is it possible to get the current view (the one that has focus) from a service? Dec 22 16:59:40 _pusher_: I've seen java graph examples, check openprocessing.org Dec 22 17:00:29 _pusher_, what about http://jgrapht.org/ ? Dec 22 17:02:04 <_pusher_> i'll check :) Dec 22 17:09:51 i used some code I found in openprocessing to implement a path finding algorithim, so I'm pretty sure you can find it there. Dec 22 17:16:07 wow, theres no skye on bb playboo, i wonder what type of backroom deals have gone on between RIM and skype Dec 22 17:18:20 What does View.setService(Service) do? I can't find any docs from setService Dec 22 17:32:00 Hi, I'm having some trouble dynamically adding static xml layouts into other static xml layouts... I have a LinearLayout which I call otherLayout = inflater.inflate(R.id.otherLayout, layout, false); layout.addView( otherLayout ); this is done in several "layers" and it seems only the first view is added, not the subsequent ones. any apparent errors I could be making? Dec 22 17:32:56 svearike: pastebin the error and your layout and your code Dec 22 17:32:57 this is the code http://pastebin.com/JEkn5qiB Dec 22 17:33:13 funkbox: right, sorry should probably paste the xml aswell Dec 22 17:34:32 good god that's confusing code Dec 22 17:35:05 funkbox: http://pastebin.com/DHcpc5vK Dec 22 17:35:31 funkbox: hehe, yeah well I'm trying to tie all the bits and pieces together so that I can make it nice later on :) Dec 22 17:35:41 svearike: have you confirmed that your addView is called many times ? Dec 22 17:35:49 i don't see anything painfully wrong Dec 22 17:36:28 funkbox: yeah it is called many times, I have a log statement in there that gets run. However, if I do NOT add the inner-most layout for the RoomDevices then all the Rooms are added, otherwise only ONE ROOM with all the devices in it. Dec 22 17:36:40 funkbox: the structure is Floor -> Room (many) -> Devices (many) Dec 22 17:37:34 it would probably have been easier to just build EVERYTHING in java code and not mix in xml-files at all :) but I thought it could be nice to use the xmls ;) Dec 22 17:39:44 funkbox: and the weirdest part is that it worked two hours ago, and I just can't seem to get it back into a working state. Dec 22 17:39:55 do a diff Dec 22 17:41:14 I dont really have the code from back then. I have it running on my mobile though ;) Dec 22 17:42:24 funkbox: if I do if (true) break; on line 168; all the rooms get added as they should, otherwise only the first room gets added Dec 22 17:42:52 sounds like a bug Dec 22 17:44:03 funkbox: yeah :\ Dec 22 17:51:07 is there an alternative to creating a view from a layout instead of LayoutInflater.inflate ? Dec 22 17:52:15 inflating views is super duper expensive Dec 22 17:54:11 funkbox: Oh, so.. should I simply create the views through code instead? Dec 22 17:54:35 well the idae is that you inflate only when you absolutely positively indoubetlueltuy must inflate it Dec 22 17:55:23 Guys any tool for vieving database for android and hopefully generating java objects from that/ Dec 22 17:55:54 funkbox: Well inflate I take it refers to creating views objects from xml? and that seems liks something one would do all the time? or do you mean it should be cached between runs? Dec 22 17:56:56 funkbox: I mean, this setContentView(R.layout.main); must mean an inflate aswell? Dec 22 17:58:04 you gotta inflate someday Dec 22 17:58:20 but adapters Dec 22 18:00:34 ohla Dec 22 18:02:20 brx_: looked up why there wasnt a camera-app, the frontfacing-camera is intended for videochat/etc... Its logical not to show a camera-app as the n7 isn't intended to be usedthat way Dec 22 18:03:04 brx_: its still there, there are many "show camera-app"-aps out on gplay Dec 22 18:03:45 is it possible to browse and view android source online without downloading all of it Dec 22 18:03:49 ? Dec 22 18:04:33 think that there was a try to put it out on code.google.com Dec 22 18:05:24 https://code.google.com/p/android-source-browsing/source/browse/#git Dec 22 18:05:41 change repo to the one you need Dec 22 18:08:42 thanks :) Dec 22 18:09:21 I'm impressed that i remembered Dec 22 18:09:50 hey, any of you guys have non-nexus series android 4.x devices? i'd like to test some sample code out on you Dec 22 18:09:58 confirming an android bug Dec 22 18:10:54 ok rynkan, i got the highest ranking camera app from market Dec 22 18:12:26 https://github.com/jasta/drawcirclehardcrash -- well, if you're interested in participating; please compile and run that. Dec 22 18:12:38 privmsg me results if i'm not around. thanks Dec 22 18:13:08 jasta: how much you paying for me betatesting :) Dec 22 18:13:26 it's not a beta test. i'm trying to confirm if other GPU drivers are affected by an android bug before i submit a report Dec 22 18:13:41 i can confirm with my own personal devices that the gnex and n4 both exhibit this bug Dec 22 18:13:55 only got n-devices Dec 22 18:13:59 ditto Dec 22 18:13:59 :) Dec 22 18:14:19 oh well, i think google will care plenty with just thsoe two devices affected. at least enough to do their own testing i suspect. Dec 22 18:16:38 jasta: what's the bug Dec 22 18:17:09 funkbox: invoking Canvas.drawCircle with a radius of INFINITY crashes an app using hardware acceleration in such a way that is essentially non-debuggable. Dec 22 18:17:17 no messages are printed, the process simply halts. Dec 22 18:17:19 Guys any tool for vieving database for android and hopefully generating java objects from that/ Dec 22 18:17:20 and instantly restarts by android Dec 22 18:17:28 jasta: what does logcat say ? Dec 22 18:17:28 VERY fucking hard to diagnose Dec 22 18:17:35 segfault in libskia.so ? Dec 22 18:17:37 funkbox: nothing but a WIN DEATH message and then dead. Dec 22 18:17:43 no, not even a seg fault. Dec 22 18:17:46 that would be more useful :) Dec 22 18:17:52 fancy Dec 22 18:18:01 ill paste literally the output Dec 22 18:18:09 http://pastebin.com/dAs8Exm4 -- that's it. Dec 22 18:18:18 it took me fucking 10 hours last night to find this Dec 22 18:18:29 changes in unrelated, non drawing code caused the crash because of computation mess-ups Dec 22 18:18:39 so that when it finally got down to the drawing layer it was trying to draw r=infinity Dec 22 18:18:42 jasta: sounds like your process is too awesome to be contained and died by winning too much Dec 22 18:18:43 and then the app would just explode Dec 22 18:19:12 what's the gc/heap status ? Dec 22 18:19:28 status in what way? Dec 22 18:19:38 idk, i'm just guessing wildly Dec 22 18:19:40 that's a weird crash Dec 22 18:19:46 it isn't an issue in the dalvik VM, clearly Dec 22 18:19:49 it's in the GPU driver. Dec 22 18:19:55 yeah Dec 22 18:20:07 if you simply turn off accelerated drawing it won't do it, either. Dec 22 18:20:08 just use infinity - 1 Dec 22 18:20:13 which i believe is 7 Dec 22 18:20:20 bbl, finishing this bug report. Dec 22 18:20:46 making matters worse, btw, it does not crash on that line Dec 22 18:20:59 if you used print debugging, it would seem as though the drawCircle line passed. Dec 22 18:21:09 using hierarchyview, I've noticed that the stock onscreen keyboard behaves noticably different than the sample onscreen keyboard code (provided with 4.2sdk). I want to look at the stock onscreen keyboard code, but I cant seem to find it Dec 22 18:21:29 because, i believe, of drawing lists, an optimization in the framework. it crashes _after_ your draw pass finishes if and only if that draw pass included an instruction to drawCircle(r=infinity) Dec 22 18:21:39 speaking of the n4.. any idea on when i can get them to take my money Dec 22 18:24:10 http://code.google.com/p/android/issues/detail?id=41815 -- if anyone is curious to track it :) Dec 22 18:26:55 jasta: if you were using free software you could debug and fix it Dec 22 18:29:07 i'm almost glad that graphics drivers aren't. because then i would, and i would want to kill myself Dec 22 18:33:59 never thought i would need to reformat a mac Dec 22 18:35:07 Hey guys, need help debugging this error: http://paste.kde.org/629990/ I'm using proguard and I've added a rule to keep classes that extends a View but when accessing this particular ListPreference, i get the following stacktrace. Dec 22 18:41:29 alexfu, with the latest tools, you dont need to explicitly keep anything Dec 22 18:41:50 in your bin directory, there should be a proguard.txt Dec 22 18:41:55 if there is not, you have a problem :P Dec 22 18:42:29 hello Dec 22 18:43:13 what is best way to manage a project, so i can build my app for different app stores Dec 22 18:43:16 canadiancow, I dont have a proguard.txt in my bin/ dir Dec 22 18:43:43 for example, different app stores, need different libs for IAP setc Dec 22 18:43:46 etc* Dec 22 18:45:15 Guys any tool for vieving database for android and hopefully generating java objects from that/ Dec 22 18:46:49 canadiancow, could you elaborate on what you meant when you said... ''in your bin directory, there should be a proguard.txt. if there is not, you have a problem :P" Dec 22 19:15:40 What are your opinions on toasts? I'm starting to feel like they are a bit of an anti-pattern. Dec 22 19:16:30 In that they are a temporary notification of something happening, being used on a distraction prone device. Dec 22 19:17:30 croutons > toasts Dec 22 19:18:01 Then the question is - what is the alternatie? A notification bar maybe, with a permanent "last toast" message (so long as that message is valid). Dec 22 19:18:02 mdkess: in my opinion, they are notifications that you won't care about in next 5s Dec 22 19:18:08 http://www.grokkingandroid.com/useful-android-libraries-crouton/ Dec 22 19:18:21 doogan, haha, I thought you were just joking. Dec 22 19:19:26 p_l, can you think of many examples of this though? Because I feel like, if you don't care about it in the next 5 seconds, and it's okay if you miss it, why even say anything? Dec 22 19:20:16 well they work well for like Dec 22 19:20:20 mdkess: as confirmation for things that aren't instant (i.e. take over 0.7s to actually take effect) Dec 22 19:20:23 "Selection added to favorites" type things Dec 22 19:20:42 ^ Dec 22 19:21:42 Why should that be a temporary message though? I mean, if I look away from my phone during the key 2 seconds that the toast appears, I lose any confirmation. Dec 22 19:22:34 Because I feel like - if it's a really long operation, you want to give a real confirmation to the user (ie. say you're uploading photos and it takes 1 minute,) since you might not have their attention any more. Dec 22 19:23:00 well in that case you prob wanna use a notification then Dec 22 19:23:09 And if it's instant, why confirm anything - act, or show an error in the error case. Dec 22 19:23:21 mdkess: it's for the things in-between Dec 22 19:23:53 or for example, you have a big notification informing you about photos being uploaded, and a toast to confirm to user that the photo was added into upload queue Dec 22 19:24:40 In the case of adding photos though, shouldn't there be some permanent indicator that it's been tagged for upload? Dec 22 19:24:49 Like, an icon over the image or something. Dec 22 19:25:36 it's not necessarily the best example, but let's say you can see it elsewhee, and such mention really, really doesn't fit the screen you're on Dec 22 19:27:34 Is that a design flaw though? I mean, if I look away from my phone for the wrong two seconds, I have no idea that something happened. But if it's interesting, I feel like I should have some way to know that something happened. And if it's not interesting, I don't care. Dec 22 19:28:23 I dont suppose anyone here could help me with a problem i've encountered? Dec 22 19:28:34 So I feel like either an in app notification (ie. the Crouton thing that doogan linked to), or an android notification is in all cases better. Dec 22 19:28:47 pew ? Dec 22 19:28:55 mdkess: what's a crouton Dec 22 19:28:57 link please Dec 22 19:29:04 They go in salads. Dec 22 19:29:11 http://www.grokkingandroid.com/useful-android-libraries-crouton/ Dec 22 19:29:12 :P Dec 22 19:29:50 also: http://android.cyrilmottier.com/?p=773 Dec 22 19:30:05 (And by the way p_l, I'm not saying that you're wrong, I'm being argumentative as I try to form an opinion here). Dec 22 19:30:32 Im currently trying to create a white statusbar, but in doing so have inherently created a notifications problem. Namely notification guidelines have white notification icons, im trying to create a way to make those icons appear black without editing every apk's icon Dec 22 19:31:15 mdkess: unfortunately, right now I lack examples to cite, not because there aren't, but because my phone is a bit dinged and I couldn't really use it much :) Dec 22 19:31:49 I dont suppose anyone has any ideas? Dec 22 19:32:17 I thought about trying a mask, that just inverts the color of the icon before it is displayed. Although i do not know how easy/difficult that would be to implement. Dec 22 19:32:41 nv1dia, do you have a screenshot? Dec 22 19:33:06 p_l, can you think of any apps off the top of your head? I can check them out. Dec 22 19:33:07 yea sure. Dec 22 19:33:25 Your talking about of the statusbar that ive changed correct? Dec 22 19:34:09 mdkess: not right now - I really had to cut off using my phone heavily now that it dies really, really fast on battery Dec 22 19:35:18 check out SeriesGuide mdkess Dec 22 19:35:23 uses Toasts pretty well Dec 22 19:35:35 plus the source is on github Dec 22 19:35:50 http://forum.xda-developers.com/showthread.php?t=1794715&page=52 Dec 22 19:36:00 its the first post on that page mdkess Dec 22 19:36:17 thats my phone, and the modified statusbar. sorry for the small picture Dec 22 19:36:31 Im sure you can see the problem that i have created for myself. Dec 22 19:38:49 You can see the icons that i have changed to be black or darker in color, but most do not appear and every update to an application forces me to edit the icon.png all over again. Dec 22 19:45:27 Any thoughts? Dec 22 19:52:37 mdkess are you still there? Dec 22 19:52:46 Would you be able to help me out? Dec 22 19:59:32 Well, I was still there. Dec 22 20:08:41 Hi all Dec 22 20:09:36 I'm using a thread to update a count variable stored in my activity as a member variable Dec 22 20:10:37 I'm incrementing it one every second but when I check the logs it appears to increment more than once per second Dec 22 20:11:23 is there something I cant do to stop this? or is this expected from a thread? Dec 22 20:15:05 how to Add Fade In Animation to a Splash Screen inspite of having a finish(); http://stackoverflow.com/questions/14005919/android-activity-splash-screen Dec 22 20:19:48 any one there Dec 22 20:19:49 ? Dec 22 20:23:11 how to Add Fade In Animation to a Splash Screen inspite of having a finish(); http://stackoverflow.com/questions/14005919/android-activity-splash-screen Dec 22 20:42:53 Is anyone here? maybe someone that could help me out? Dec 22 21:07:30 Hello? Dec 22 21:07:40 Could use some help. Dec 22 21:08:01 ask and see who responds Dec 22 21:08:39 I have a uscellular S3 i have it rooted but i want to try cm7/10 or whatever on it. Dec 22 21:09:05 I cannot find any roms for my version of the s3 Dec 22 21:12:16 #android-root; this channel is for app dev Dec 22 21:12:25 or #cyanogen or whatever their channel is Dec 22 21:15:02 Thank you Dec 22 21:38:56 What would be a good way of getting a background on a LinearLayout and then apply a margin on the content of the LinearLayout? speaking css/html it would be
Any pointers? Dec 22 21:40:31 Do just that Dec 22 21:40:36 Or, set a padding on the linearlayout Dec 22 21:41:53 SimonVT: A, padding seems like a good choice. Dec 22 21:43:05 SimonVT: do you know if setPadding(left,top,right,bottom) is raw pixels? Dec 22 21:43:13 it is Dec 22 21:43:21 cheers :) Dec 22 21:49:46 svearike be weary about the fact it's raw pixels, and possibly not the same relational dimension across devices Dec 22 21:50:38 hi SimonVT Dec 22 21:51:04 hi canadiancow Dec 22 21:51:41 there seems to be lots of people here, but always very little chat ? is that down to my UK local ? Dec 22 21:51:46 wtf is wrong with this channel, sidebar says you're not here Dec 22 21:52:03 StingRay_: It's fairly quiet on the weekend Dec 22 21:52:05 + canadiancow at top of list for me Dec 22 21:52:08 SimonVT: ergo something wrong with your client :P Dec 22 21:52:10 SimonVT, i should be at the top :P Dec 22 21:52:11 StingRay_: picks up during the week during the day for north america anyhow Dec 22 21:52:18 It says there's 53 people here >.< Dec 22 21:52:23 yeah StingRay_, it's holiday season Dec 22 21:52:26 Damnit irccloud, pos Dec 22 21:52:29 SimonVT: 390 for me; something is f'd for you Dec 22 21:52:32 im only on because my flight's delayed and i have nothing better to do Dec 22 21:52:35 dragorn hmmm, guess i need android-dev-uk then :) Dec 22 21:54:35 kind of annoying that the v2 poly API doesn't support circles Dec 22 21:54:40 (maps v2) Dec 22 21:54:43 Now the cow is here Dec 22 21:55:02 lol Dec 22 21:55:04 dragorn, what? Dec 22 21:55:09 circle is g+, not maps Dec 22 21:55:17 canadiancow: No, I mean, the polygon api Dec 22 21:55:19 oh Dec 22 21:55:21 yeah Dec 22 21:55:22 missed that :P Dec 22 21:55:26 canadiancow: There is no 'circle' primitive Dec 22 21:55:53 I suppose i can work a way to do it, but drawing w/ coordinates and the base API would sure have been nice Dec 22 21:58:37 i'm getting no authentication challenges found when trying to read a webpage Dec 22 21:58:47 what's wrong? Dec 22 21:59:27 dragorn ArcShape ? Dec 22 21:59:40 trying to use http://www.vogella.com/articles/AndroidNetworking/article.html to read a webpage Dec 22 22:02:03 Would anyone like free web hosting for their apps? I need some bets testers. Dec 22 22:03:38 StingRay_: I don't think that's in v2 Dec 22 22:04:16 API level 1 Dec 22 22:04:46 StingRay_: I'm talking about the maps api Dec 22 22:04:58 ah, never played with maps Dec 22 22:05:06 StingRay_: and yes, i probably could make a drawable transparent on top of the map fragment Dec 22 22:05:08 or some such nonsense Dec 22 22:05:23 which i imagine is what i'll have to do Dec 22 22:05:42 should think it easy to add shapeDrawable and mod radius to what you want Dec 22 22:06:14 Hm, anyone knows if DefaultHttpClient reads the charset-header and translates the chars, or do I have to do that myself? Dec 22 22:06:20 I kinda understand why circle would not be in a poly api Dec 22 22:06:23 StingRay_: the maps api has it's own poly/drawing functions Dec 22 22:06:36 StingRay_: i don't really want to make a transparent drawable and do all the coordinate matching and conversion and such Dec 22 22:06:43 since it's spline based and not polygonal Dec 22 22:06:45 when I could do drawing by coords in maps Dec 22 22:06:48 I'm loading a json from a webpage that sets charset: iso-8859-1 but it gets garbled in the client. Dec 22 22:07:20 dragorn there no spline stuff ? Dec 22 22:07:24 StingRay_: no Dec 22 22:07:56 dragorn sux :) Dec 22 22:08:03 he does ;d Dec 22 22:08:43 ha Dec 22 22:21:30 I'm doing a TextView.setBackgroundResource(..) and the image looks "same size" on my emulated device and on my Galaxy S3, however, the text size is insanely out of proportion, it's big on the emulated device and microscopic on the S3. I have TextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 16); on the S3 the bg-image is bigger than the text, alot bigger. Also it's one of those fancy Dec 22 22:21:30 expandable bg-images Dec 22 22:22:35 anyone knows what's going on here? did I set the textsize wrong? is the bg-image upscaled on the s3? Dec 22 22:23:07 desinities Dec 22 22:23:31 You want TypedValue.COMPLEX_UNIT_SP Dec 22 22:23:48 funkbox: yeah well, I'm using Raw pixels as measurements and I only have ONE version of the bg-image Dec 22 22:24:23 SimonVT: But that's the scaled pixel, right? I actually wanted the text to be "as big as something else" so I put in raw pixels there Dec 22 22:24:47 16 px is physically bigger on a low density screen compared to a high density screen Dec 22 22:24:53 You do not want px for text Dec 22 22:25:12 yes ofcourse it is, but the TextView's background is also measured in pixels :) I want it to fit Dec 22 22:25:20 you want what's called a "dp" Dec 22 22:25:25 but as it is now, the bg-image is ginormous Dec 22 22:25:31 which (among other things) stands for device pixel Dec 22 22:25:37 and then you also want to create a nine patch Dec 22 22:25:49 Then you need to re-read how to handle different screen sizes Dec 22 22:26:22 I'm just trying to understand how this could be? is the image upscaled or not? if the text size is indeed 16px as I defined, then the image must have been automatically upscaled Dec 22 22:26:32 it might be Dec 22 22:26:43 If it's in another density bucket than the device you're running it on Dec 22 22:26:59 I put the image in drawable/ plain and simple Dec 22 22:27:09 That's equivelant to drawable-mdpi Dec 22 22:27:16 Ah, I see Dec 22 22:27:23 is there a way to actually leave it untouched? Dec 22 22:27:31 drawable-nodpi Dec 22 22:27:43 But I doubt that's what you want Dec 22 22:27:53 excellent, I will try that and see if that was the culprit. Dec 22 22:28:21 SimonVT you might be right about that, but right now I just want to figure out how this all works, I might be using a better unit type for the text labels later on Dec 22 22:30:07 Ah, that seems to have been the error. It looks fine now that I moved the image to drawable-nodpi, thanks for the tip SimonVT Dec 22 22:35:44 hi Dec 22 22:36:02 why my app crash on this line? Dec 22 22:36:02 new AlertDialog.Builder(null) Dec 22 22:36:07 i cannot use null? Dec 22 22:36:11 timroes :D Dec 22 22:36:15 almost done Dec 22 22:36:50 No, it needs a context Dec 22 22:38:24 and a context is? Dec 22 22:38:42 a main dialog to receive the confirm? Dec 22 22:39:25 http://codepad.org/Vmm07q5V Dec 22 22:39:27 A context is a class that extends Context Dec 22 22:39:29 Like Activity Dec 22 22:39:38 it says right there in the documentation what a context is Dec 22 22:39:51 if you're not reading the documentation, you're just wasting your time and everyone elses Dec 22 22:40:30 Pretty much, yeah Dec 22 22:41:59 I'm guessing a lot of people are regretting the things they did yesterday now that the world hasn't ended Dec 22 22:43:38 pragma-: http://media.tumblr.com/tumblr_ls9dlqzXX81qklj8n.gif Dec 22 22:48:27 done :D Dec 22 22:48:29 tks people Dec 22 22:54:09 hello everyone. I am a javafx developer and since we use similar apis I thought I would as a question here. Is this ok? Dec 22 22:54:17 ask* Dec 22 22:54:49 ? the JavaFX apis have nothing to do with Android Dec 22 22:54:51 If it's about android app development it's ok Dec 22 22:55:32 I have a webview object where I am using CSS to render some html elements. I want to render the image element with nearest neighbor algorithm. Any way of doing that? Dec 22 22:55:36 Suchorski: why did you make the calcular method (a) static and (b) public? Dec 22 22:56:20 i don't understand java yet :D Dec 22 22:56:28 will start to learn this year on college Dec 22 22:56:31 Suchorski: one does not understand java Dec 22 22:56:40 you should really get known to java before android development Dec 22 22:56:41 it's like understanding the evil of sauron Dec 22 22:56:46 just learning the syntax Dec 22 22:56:50 one attempts to deal with it Dec 22 22:56:59 i guess there are some fine books out there to learn it :) Dec 22 22:57:34 lodenrogue: going to guess no, but i haven't checked Dec 22 22:57:45 zinx: do you ever use webview? Dec 22 22:57:50 funkbox: so its easy to understand? sauron wants world domination (who doesn't) some ppl doesn't want him to. he kills them, and voila now he is evil in everyone's eyes Dec 22 22:58:41 I want to store the names of the columns of my database as some sort of constant Dec 22 22:58:50 I'm not really sure where to do it Dec 22 22:59:21 I think it might be best to store them in a variable that I can reference, rather than typing them each time Dec 22 22:59:47 RustyShacklefor1: yeah always do that Dec 22 23:00:16 so you do recommend it? I was kinda worried that it might be wasted effort Dec 22 23:00:43 I don't anticipate that the column names will change, but it would be much easier to change it later Dec 22 23:00:50 lodenrogue: no, but i've browsed the API before, and it doesn't really like you diddling with the document internals Dec 22 23:01:05 lodenrogue: the closest you get i think is the ability to intercept requests and return your own data for them, which is not really what you want Dec 22 23:01:42 Well, I am able to edit the CSS and html manually in a WebView. I was just wondering if the image-render attribute in CSS worked with webview Dec 22 23:02:10 timroes on my confirm dialog... have a way to close the dialog first and then start the function calcular? Dec 22 23:02:29 RustyShacklefor1: if you use some clean code checks and stuff like that, it will even claim if you don't put your constants into variables Dec 22 23:02:29 p_l: shit; looking at clojure 1.5 seems like it works on java 5 but minus some functionality; java6 + fork/join or java7. Dec 22 23:02:33 because the function is running with the confirm box open Dec 22 23:02:34 but use string literals everywhere Dec 22 23:03:22 anyway I have four tables. I'd like to put them in their own "namespace" ie. BusStop.STATION_NAME, TrainLine.DIRECTION, etc Dec 22 23:03:25 lodenrogue: https://bugs.webkit.org/show_bug.cgi?id=56627 Dec 22 23:03:44 Suchorski: I guess the OnDismissListener is called after the dialog has dimissed, but not 100% sure about that Dec 22 23:04:05 zinx: wow good find. No idea how to read that data but good find. Dec 22 23:04:06 will look Dec 22 23:04:15 whats the appropriate way to set up? Make them static varialbes in a class with no methods/constructors? An interface? Dec 22 23:04:22 static final Dec 22 23:04:42 right Dec 22 23:04:44 if they are celarly related to one class, you would put them in there as private static final variables Dec 22 23:05:01 if you need to use them among classes, create an own class for the constants and put them as public static final variables in there Dec 22 23:05:12 (or package viewable not public, if thats enough for yout) Dec 22 23:05:46 timroes but how i will know if i clicked on "yes" or "no"? Dec 22 23:06:16 zinx: I tried image-rendering: optimize-contrast; but I dont see any change. Dec 22 23:06:45 lodenrogue: try with -webkit-optimize-contrast ? Dec 22 23:06:46 Suchorski: save it in the onclick listener in a variable Dec 22 23:06:50 ok Dec 22 23:07:06 lodenrogue: if that doesn't work, i'm afraid it's not going to :( Dec 22 23:07:07 if you really want to do it, since I don't see why onClick of the button wouldn't be okay to use? Dec 22 23:07:36 zinx: no it didnt work. But I thank you deeply for your assistance. Dec 22 23:07:51 timroes will try Dec 22 23:10:27 You guys know there is like zero support for javafx but I am happy I found you guys. Even if we are using a different API a lot of things translate Dec 22 23:11:52 is it realy wrong to use System.out.println in android? should i always use log instead Dec 22 23:12:22 where is System.out.println going to go to? Dec 22 23:12:46 well i can see it in the logcat in eclipse Dec 22 23:19:41 timroes the onDismiss event works like a charm Dec 22 23:20:15 but how i can use a variable on ondismiss event and the alertbox? Dec 22 23:20:30 if i use a final boolean Dec 22 23:20:33 there is a way to make a key value spinner? Dec 22 23:20:35 i can't change his value Dec 22 23:20:37 like html Dec 22 23:20:57 ant if i remove the final, the variavle isn't accessed by all events Dec 22 23:21:50 i have found getSelectedItemId but i dont know is good for me Dec 22 23:23:22 ?? Dec 22 23:24:15 made Dec 22 23:24:17 tks :D Dec 22 23:30:33 is it possible to make some code that gets a website that works on both java and android? Dec 22 23:31:16 http://www.vogella.com/articles/AndroidNetworking/article.html this example doesn't work on android Dec 22 23:31:35 i mean it doesn't work on java >.< Dec 22 23:32:13 i'm trying to make a library to use an API which i'd prefer to work on both java and android Dec 22 23:33:53 Chilley maybe look at the shared libs then Dec 22 23:34:00 like all the apache java libs Dec 22 23:34:07 rather than android ones Dec 22 23:36:10 use the apache commons stuff and you'll probably be fine, except for all the wrapping around it you have to do for running on it's own thread in android, etc Dec 22 23:42:42 nice got the apache networking to work Dec 22 23:43:19 i initially used the apache fluent library, but that didn't work with the android apache httpclient Dec 22 23:44:14 what are your opinions on HttpURLConnection vs apache? the prior is googles recommendation but anything else better about it? Dec 22 23:50:38 how do I set the background image of a webview? Dec 23 00:19:40 hey guys do AnchorPanes have transparent backgrounds by default? Dec 23 00:21:37 Does anyone else use checkstyle on their Android code? I'm trying to get past "Unable to get class information for JSONException" when JSONException appears in a throws clause. Dec 23 00:21:50 It happens for any exception in a throws clause which is not IOException. Dec 23 00:22:38 I'm thinking that adding android.jar from the SDK will provide the class files it needs, just trying to figure out how to get Checkstyle to actually use it. Dec 23 00:29:07 how do I make an AnchorPane transparent? Dec 23 01:01:17 Anyone know how to create a popupwindow from an IME? Dec 23 01:03:27 i need to populate a listview with items i request from a server, i'm requesting the items on a seperate thread, but how would i update the list once the request is done? Dec 23 01:12:42 sorry if this is the wrong channel...can anyone direct me to a channel where I might find a dev to help me with my HTC DNA? got stuck in a recovery/TWRP bootloop :( Dec 23 01:13:30 i think #android Dec 23 01:15:52 I tried #android-root, dead in there Dec 23 01:17:13 yeah it's saturday night. and Christmas almost here, the channels tend to be dead during holidays Dec 23 01:17:36 hagar_: why not try ##c++ Dec 23 01:18:36 Chilley: What adapter are you using? Dec 23 01:18:51 because is is not asking a developer question, Dec 23 01:19:04 more of an OS issue Dec 23 01:19:15 sounds like to me Dec 23 01:19:49 Chilley: Depending on the adapter there is a built in way to give it the items you downloaded or you have to do it yourself. Dec 23 01:21:21 well i started experimenting with async task, it will probably give me what i want eventually Dec 23 01:23:00 Chilley: You need async task or a new thread because downloads on the UI thread cause an exception. Dec 23 01:23:32 Chilley: But to display items in a ListView you need to wire up an adapter. Dec 23 01:24:23 Chilley: ArrayAdapter for instance has clear(), add(MyObject obj), addItems(Collection list). Dec 23 01:24:39 addItems was introduced in a later API-level so make sure it jives with what you're doing. Dec 23 01:24:50 But if you extended BaseAdapter you have to create your own method. Dec 23 01:25:13 err not addItems addAll :p Dec 23 01:25:43 Added in api-13. Dec 23 01:42:33 exit Dec 23 01:44:05 woot got it working Dec 23 02:05:14 trying to make a fragment derived from the new map fragment. The problem is when using actionbarsherlock and the options menu. The mapview is not ABS-aware obviously, and it wants a android.view.Menu passed to super.onCreateOptionsMenu. Dec 23 02:05:26 any idea how i can get this fragment to put something in ABS actionar? Dec 23 02:05:47 its because of those inevitable things i decided never to use abs Dec 23 02:09:45 osxorgate: I didn't run into that problem but all of our ABS/menu code lives in the activity. Dec 23 02:10:28 yeh that's the workaround i guess Dec 23 02:10:40 would just be nice to have the mapfrag have its own menu option to change map type Dec 23 02:10:41 It does make the migration harder. Dec 23 02:12:19 Aside from having to use LatLng instead of GeoPoint lol Dec 23 02:16:36 I've got a json response that I need to parse Dec 23 02:16:37 http://pastebin.com/RnVSmrhu Dec 23 02:17:10 I need to be able to parse the nested attachments array Dec 23 02:17:32 I'm using gson to parse Dec 23 02:18:14 I've created a java class structure that mirrors the json data structure, however I'm unable to access any of the items within the attachments List Dec 23 02:20:13 This is the class structure I've put together : http://pastebin.com/Up5hKhdz Dec 23 02:20:21 can anyone help me with this? Dec 23 02:20:28 lexton: not sure about gson but are you getting a JSONArray of some sorts for "attachments" ? Dec 23 02:20:45 not sure what you mean osxorgate Dec 23 02:21:06 whats the code to read the attachments fromn the json? Dec 23 02:22:02 I'm trying to dump out the displayName item within the attachments list with this code -> Logger.i("dobackground-google", "------------------------------- google google attachment --------- -> " + item.object.attachments.displayName ); Dec 23 02:22:32 but it says the field can not be resolved or is not a field Dec 23 02:29:01 but attachments is a list? Dec 23 02:29:26 so how should I access items within the List? Dec 23 02:30:25 idunno how gson works .. what i do is use JSONObject and getString() **** ENDING LOGGING AT Sun Dec 23 02:59:59 2012