**** BEGIN LOGGING AT Fri Apr 11 02:59:57 2008 Apr 11 03:01:59 can anyone tell me what widget is used when you create new contact, you can click on the phone type and a menu appears, very similar to how submenu works Apr 11 03:11:47 i have three types of data I am trying to load in a list view... its not coming from the db so I am not using the Cursor..... whats the best Adapter to use? Apr 11 03:18:32 jtoy: hmm? Apr 11 03:19:22 michaelnovakjr: SimpleAdaptor for ArrayAdaptor Apr 11 03:19:25 of Apr 11 03:19:26 or Apr 11 03:20:03 i was going for the simple adapter.... but it was throwing a null exception because I don't fill it when the view first generates Apr 11 03:20:59 jtoy: oh, that's a dialog with a listview in it Apr 11 03:21:54 oh, I thought that had a specific class associated with it Apr 11 03:22:24 well, it might. check out the dialog demo in apidemos Apr 11 03:26:06 I have one more question, I have an aidl inteface, my code compiles fine, the adl interface is: List getAlarms(); but when I run calll the method and try to use the data, I get an error saying its an object: List alarms = mService.getAlarms(); for(Long id : alarms ) <--- dies here saying: found : java.lang.Object required: java.lang.Long for(Long id : alarms ){ Apr 11 03:26:15 can someone explain to me what I am doing wrong there? Apr 11 03:26:32 i told you about this already but apparently you ignored me Apr 11 03:26:49 I remember, you said I have to cast everything Apr 11 03:26:54 you've lost type safety, so that approach won't work. you would need for (Object o: alarms) { Long id = (Long)o; } Apr 11 03:27:25 ah, like that, I didnt know how to do the casting, I was trying to cast alarms Apr 11 03:27:42 again, I recommend you take a step back to learn Java correctly :) Apr 11 03:28:13 jasta: I am learning and coding! Apr 11 03:28:26 right, which is not smart. Apr 11 03:28:44 your designs will be crippled by your ignorance, and you will invariably need to return to your code and rewrite most of it at some point Apr 11 03:29:16 jasta: rewritting is not a problem, after I've learnt this , it will take a lot less time Apr 11 03:29:57 plus I do kind of enjoy learning like this, becsuse then I can reread my code and see how crappy it was Apr 11 03:31:30 besides, I cant let not knowing java be an excuse to not join the android competition Apr 11 03:33:06 you cant Apr 11 03:33:07 but we can Apr 11 03:33:12 * Kraln boots jtoy in the face Apr 11 03:48:24 if i invalidate a root view, does the child views invalidate as well? Apr 11 03:55:11 i am so annoyed that i haven't gotten a single View to redraw itself Apr 11 04:09:46 romainguy__: how composable are shapes? would it be possible for me to make a rectangle shape that has a top-half gradient, with a bottom half gradient of different colors? Apr 11 04:10:33 or is that what a sweep gradient is for? Apr 11 04:10:42 no, nm that's not it :) Apr 11 04:12:11 if i load data into the listview and the data changes.... invalidating the view should update the data correct? Apr 11 04:12:23 the data updates but i can't get it on the screen Apr 11 04:12:45 romainguy__: i am getting the sense from reading the docs that multiple colored gradients are supported, though I am unsure how to specify this. seems to have only startColor and endColor? Apr 11 04:18:46 a layer-list, perhaps? Apr 11 04:25:02 i have had it with this stupid invalidate crap Apr 11 04:25:24 use requestLayout Apr 11 04:25:28 did Apr 11 04:25:30 invalidate is only for drawing ;) Apr 11 04:25:50 i used requestLayout on the view itself and the ViewParent Apr 11 04:26:09 is this a list? use invalidateViews Apr 11 04:26:22 its a listview Apr 11 04:26:28 then use that ;) Apr 11 04:29:38 load the list again Apr 11 04:29:42 hack it Apr 11 04:29:49 no, just use invalidateViews Apr 11 04:29:58 its still not showing up Apr 11 04:30:08 if invalidate does not work, then reload Apr 11 04:30:10 then you have an unrelated error. Apr 11 04:33:06 woke up late today to find out i'm so tired Apr 11 04:33:35 <_avatar> michaelnovakjr: call the notifyDataSetChanged/notifyDataSetInvalidated method of your Adapter Apr 11 04:34:01 ahh yes that will also work (much like invalidateViews) Apr 11 04:38:57 my application is coming together VERY quickly. Apr 11 04:39:06 what's it do? Apr 11 04:39:08 I can only hope it is quick enough! Apr 11 04:39:24 B0jangles: in a nutshell, location-aware irc client + network Apr 11 04:39:37 Kraln: i know the feeling. in the last five days my app has gone from barely functional to feature rich and beautiful Apr 11 04:39:54 i spent so much time perfecting the background service code that now working with it is a breeze :) Apr 11 04:40:00 nice Apr 11 04:40:02 cool. Why would an IRC client want to be location aware? Apr 11 04:40:16 B0jangles: I gave channels the concept of a location as well Apr 11 04:40:19 i think that the dataset method might have worked.... just have to adjust something... Apr 11 04:40:21 so you can join channels with people who are near you Apr 11 04:40:44 ah, cool Apr 11 04:40:52 channels are either the geographical average of all the people in them, or a fixed location set by the channel op Apr 11 04:41:59 i am nervous that lots of the wrong people will be managing the security of this new wave of location-aware software. Apr 11 04:42:25 there is an option in the client to disable sending location updates to the network Apr 11 04:42:32 that's not what i mean Apr 11 04:42:39 what do you mean? =) Apr 11 04:43:10 i mean, application frameworks will be built very rapidly and i am nervous that the folks building them are ill-equipped to deal with all the privacy and security concerns. Apr 11 04:43:23 such as? Apr 11 04:43:35 so a great deal of these new services might be vulnerable to various data harvesting attacks. Apr 11 04:44:05 hmm, I see. Apr 11 04:44:08 <_avatar> michaelnovakjr: yeah, invalidating the adapter is the only reliable way to force all the items to be requeried (in my experience) Apr 11 04:44:30 jasta: what steps do you think should be taken to prevent that? Apr 11 04:44:30 nothing particular about your application. i am merely suggesting that a lot of people moving their thinking into LBS are not doing so with an appropriate level of caution. Apr 11 04:45:11 Kraln: The same steps that any system must take to protect its data. Apr 11 04:45:52 That is, don't trust anything that comes from the network, carefully consider how one might defeat the security of your design, etc. Apr 11 04:46:03 oh, yes. definitely Apr 11 04:46:11 I guess what I'm saying is, I have a lot of the retard Java developers that will be flocking to Android :) Apr 11 04:46:28 how about the retards that don't even know java? Apr 11 04:46:41 it's like all the retard PHP developers out there building applications in droves that are vulnerable to the silliest attacks. Apr 11 04:46:55 like, injection attacks. come on. :) Apr 11 04:46:55 zomg &MYSQL_QUERY= Apr 11 04:47:43 In this sense, anyone doing location-based services should have a strong understanding of security in a networking context. Apr 11 04:48:26 Doesn't matter. Some dumbass will lose their laptop at the library with a few million records stored in an unencrypted file anyway Apr 11 04:48:33 that's why my solution is so uniquely brilliant Apr 11 04:48:39 I'm not creating my own network protocol or anything Apr 11 04:48:46 I'm building on the proven platform of 1459 =) Apr 11 04:48:50 That doesn't defend you. Apr 11 04:49:06 no, but it makes it a LOT easier to not fuck up Apr 11 04:49:40 The only defense against the design of insecure software is careful consideration of security throughout the design process. Apr 11 04:50:04 agreed Apr 11 04:50:30 And if you think you're not going to miss something, you're deluding yourself Apr 11 04:50:58 Of course, but there's a very big, important difference between inherently insecure designs and an accidentally insecure implementation :) Apr 11 04:51:29 Notably that one is a bug fix which otehrwise can be deployed rapidly. The other is to throw the software away :) Apr 11 04:52:27 * Kraln tossed windows a long time ago Apr 11 04:52:33 ditto ;P Apr 11 04:53:37 jasta: agree LBS needs to be more secure Apr 11 04:53:49 Anyway, "there is no patch for stupidity". Apr 11 04:53:52 security/privacy needs to be built in from ground up Apr 11 04:56:09 it doesn't need to be so explicit though. Apr 11 04:56:09 stupid question can you define a List with nothing in it? Apr 11 04:56:14 michaelnovakjr: Yes. Apr 11 04:56:47 i figured that much as it was working before.... whats the 'proper' syntax Apr 11 04:57:10 its 1 am here and when i am tired i miss the stupid stuff Apr 11 04:57:55 <_avatar> just have your adapter return a size of 0 Apr 11 04:58:47 <_avatar> oh, sorry. i thought you were talking about a ListView like before ;) Apr 11 04:58:59 List inteface Apr 11 04:59:13 new ArrayList(); Apr 11 04:59:17 it keeps throwing a nullpointer exception again Apr 11 04:59:54 that will give you an empty List ;) Apr 11 04:59:58 that is, isEmpty will yield true Apr 11 05:01:10 uhm, but isnt that obvious? :) Apr 11 05:01:29 haha, that is exactly what i had before Apr 11 05:01:38 and you think there's an element in it? Apr 11 05:01:38 i need a beer break Apr 11 05:02:19 its obvious that a List interface is not going to return something other than null unless i set it to Apr 11 05:03:01 what the hell are you talking about? Apr 11 05:03:09 an interface doesn't "return" anything. Apr 11 05:03:19 that is the point i am trying to make Apr 11 05:03:44 hence why i had an ArrayList before Apr 11 05:04:01 that can't be the point you're _trying_ to make, since it's complete gibberish Apr 11 05:04:13 try again :) Apr 11 05:04:30 or better yet, get some rest :) Apr 11 05:04:46 i might try that... too many late nights Apr 11 05:04:51 i hear you at least ;) Apr 11 05:04:56 been exhausted all week Apr 11 05:05:01 and this weekend isn't gonna be any more relaxing Apr 11 05:05:11 yea... going to bed at 3 and getting up for work at 6! Apr 11 05:05:12 although i am glad i finally wrote up my README and stuff. now it's just coding :) Apr 11 05:05:19 that is good Apr 11 05:07:25 Does anyone know how to force an ImageView to position the image in the top left corner regardless of its size? It seems to always want to center it on layout. Apr 11 05:07:44 i have an image that i wanted to have width=fill and height=fill, which it does that, covering the entire parent Apr 11 05:08:16 but since it tries to keep aspect ratio, only the width stretches all the way, the height leaves a margin. but it draws the image in the center of that view, rather than at the top Apr 11 05:08:23 so it looks like it has center_vertical gravity Apr 11 05:09:56 screw it, i'll just extend ImageView and fuck with onLayout hehe. I'm so sick of hassling with layouts ;) Apr 11 05:10:53 oh i guess that won't work though Apr 11 05:11:28 jasta: you'll be happy to know user ip information is masked (01:08 Server: AndroidChat2 (AndroidChat@AFCBE3.726DAA.B314EB.A5669B) has joined the room) Apr 11 05:13:26 whopps. hit the wrong button Apr 11 05:17:02 yay, android:scaleType="fitStart" did the trick Apr 11 05:24:09 what's that do? Apr 11 05:24:13 can someone tell me what I am doing wrong with aidl services, I created an aidl interface, then I created a service that implements the stub for the interface, but then I cant call the service, I have tried calling it from an IntentReceiver and directly form an activity, but it never runs and/or crashes my application Apr 11 05:24:29 I am trying to use an service with intentreceiver because I want to run my service that does some processing, then based on the status that is returned display a toast or notification Apr 11 05:32:34 can I not call an aidl service from an Intent Receiver? that is how I call other services that dont return statuses Apr 11 05:41:43 I get this exception: android.content.ReceiverCallNotAllowedException Apr 11 05:42:07 _avatar i needed to implement an ArrayList of HashMaps to get it to work Apr 11 05:42:19 realized it in 10 seconds once i stepped away Apr 11 05:47:25 it seems like in all the online examples, to call a aidl interface, you need to call from an activity, is currently possible to call an aidl interface from a service/background process? Apr 11 05:48:42 uhm, of course. Apr 11 05:49:46 jasta: do you know what I am doing wrong? Apr 11 05:50:01 no, but i really can't look now :\ Apr 11 05:50:17 ok Apr 11 05:50:34 sorry Apr 11 05:50:38 pastebin it Apr 11 05:50:45 i just did that stuff yesterday Apr 11 05:50:54 ok, sure, it is a bit of code i think Apr 11 05:51:02 ok Apr 11 05:55:41 I think I pasted the relevant code here: http://pastebin.org/28935 I jsut want have one method in my aidl interface where I want to get a list of Long back, its very simple code Apr 11 05:56:48 all the code is supposed to do is run every few hours and check for alarms, if they exist, then display a toast/notification Apr 11 05:56:48 jtoy: lol, dude :) Apr 11 05:57:14 jasta: which part is funny? Apr 11 05:57:20 well, it's really obvious why this doesn't work. Apr 11 05:57:31 you aren't even binding to the service. Apr 11 05:57:38 mSerivce, thus, is null. Apr 11 05:57:44 yea Apr 11 05:57:45 of course it won't work Apr 11 05:57:58 you have mConnection, but you never do anything with it; so why would you expect this to work? Apr 11 05:58:10 jasta, I commented out this line: context.bindService(contactAlarmIntent,mConnection,Context.BIND_AUTO_CREATE); Apr 11 05:58:22 4 more days Apr 11 05:58:23 pressures on Apr 11 05:58:40 jtoy: So uncomment it, and move your code into onServiceConnected (and update accordingly) Apr 11 05:58:42 becuase I was getting this excception: android.content.ReceiverCallNotAllowedException Apr 11 05:59:08 jtoy: the reason ServiceConnection exists is because the service connects and interacts in a separate thread. you have to synchronize your communication with the service based on when that connection is available. Apr 11 05:59:30 so even uncommenting that line would not help you; mService would still be null at the time you use it here. Apr 11 05:59:36 though you do need to uncomment that line :) Apr 11 06:00:04 hmm, I was following the documentation online I thought Apr 11 06:00:15 read the service examples in ApiDemos. you totally missed all of this :) Apr 11 06:00:25 jtoy: You aren't even approximately following the documentation :) Apr 11 06:03:18 the only thing I see different in the example for onServiceConencted is that I dont do mservice.registerCallback, but I thought that is for using async calls, which I am not using Apr 11 06:03:51 jtoy: Trust me, there is no such example like your usage. Apr 11 06:04:05 you must move your code to onServiceConnected Apr 11 06:04:06 this is what I am following: http://code.google.com/android/samples/ApiDemos/src/com/google/android/samples/app/RemoteServiceBinding.html Apr 11 06:04:30 ah, I think I understand Apr 11 06:04:32 no, you're not. Apr 11 06:04:42 they bind to it, then wait for it to become connected before using the service. Apr 11 06:04:56 you (if you uncomment that line) bind to it, then immediately use it before its been connected. Apr 11 06:05:33 right, I see Apr 11 06:08:53 I did move that code,but now I get Unable to instantiate service com.sanbit.android.mystats.ContactAlarmService: java.lang.IllegalAccessException: access to constructor not allowed, is this related ? Apr 11 06:17:49 probably, paste your new code and indicate which line that is happening on Apr 11 06:18:42 ok, although I'm having a hard time telling which line its happenning on Apr 11 06:18:52 then look at adb logcat which will tell you precisely Apr 11 06:19:08 I am lookin at adb logcat Apr 11 06:19:14 then look harder. Apr 11 06:19:29 ok, jasta, thanks for the help btw! Apr 11 06:19:35 I do appreciate it Apr 11 06:19:46 Sorry, my patience is thinner than usual with the deadline so close :) Apr 11 06:19:53 My own project is still being developed Apr 11 06:20:12 totally understandable, this aidl stuff is the last part, its driving me crazy Apr 11 06:20:26 it's actually very simple and well designed Apr 11 06:20:37 you're just moving too fast; take some time, slow down and think about hwo this all works. Apr 11 06:20:59 if you paste the code again i can tell you where the problem is Apr 11 06:21:25 right, but tis still driving me crazy, my brain isnt working too well, i havent selpt in couple of weeks, regular insomnia + android pressure Apr 11 06:23:00 I'm not sure if this is everything you need, this is the only file I changed: http://pastebin.org/28940 Apr 11 06:23:29 you still aren't using bindService? Apr 11 06:23:48 I thought you said uncommentinf it doesnt help? Apr 11 06:23:57 you must use bindService to communicate with a service in this way. Apr 11 06:24:12 What I said was that it wouldn't make yoru code work because you still had other problems. Apr 11 06:24:15 But you still must uncomment it. Apr 11 06:25:12 wait, i'm very confused here. Apr 11 06:25:12 is there a way to select the hour spinner in a TimePicker ? Apr 11 06:25:29 less chat more coding :D Apr 11 06:25:29 what's confusing? Apr 11 06:25:35 I get the same error if I uncomment it: android.content.ReceiverCallNotAllowedException Apr 11 06:25:51 jtoy: This code makes no sense, why are you implementing ContactAlarmService in this intent receiver? Apr 11 06:26:42 oh nevermind, that's commented out Apr 11 06:27:03 I made ContactAlarmReceiver which implements the stub interface from aidl, then I try to call that code from my IntenteReceiver, is that the correct process? Apr 11 06:27:32 sorry, I said that wrong Apr 11 06:27:39 jtoy: Find where that exception is being thrown. I suspect you may have an AndroidManifest problem. Apr 11 06:27:53 or ContactAlarmService isn't implemented correctly either Apr 11 06:28:06 i would start with the manifest Apr 11 06:28:10 the intentreceiver doesn't look like the problem (but you still need bindService, ugh) Apr 11 06:29:11 ill try to find where the error is thrown, the contactalarmservice is here at the end, it is very simple: http://pastebin.org/28935 Apr 11 06:31:24 the manifesto seems ok: Apr 11 06:32:00 sorry, i just can't look at this closer right now Apr 11 06:32:23 look closely at adb logcat, i'm sure useful information is there Apr 11 06:32:33 ok, thanks, ill continue looking Apr 11 06:34:53 I added android:process=":remote" but that doesnt seem to help Apr 11 06:35:47 are you using eclipse? Apr 11 06:36:27 not normally, but I do have it all setup Apr 11 06:36:30 Anyone see anything wrong with my Adapter? http://rafb.net/p/qbbmQe32.html Apr 11 06:37:04 I wrote that simple adapter to use in a GridView, but everytime I try to set it as the GridView adapter, it gives me the null pointer exeception etc Apr 11 06:37:31 michaelnovakjr: can I fix this using ecplipse? Apr 11 06:37:44 you can use the debugger jtoy :) Apr 11 06:37:58 you can have it set a breakpoint for the exception you are getting Apr 11 06:38:18 its helped me find a few annoying bugs Apr 11 06:39:46 do you know how to do that in eclipse jtoy? Apr 11 06:40:20 i do not know how to set the breakpoint for certain exceptions Apr 11 06:41:10 click the run menu, and choose the add Java Exception Breakpoint.... make sure it is set for caught and uncaught exceptions .... choose from that list Apr 11 06:41:59 ok, let me test if out real quick Apr 11 06:46:10 poffy: something is null :-D Apr 11 06:46:21 * Kraln just fixed poffy's problem hehe Apr 11 06:46:47 * poffy has no higher level brain functions Apr 11 06:46:48 poffy, debugger!!!! set the breakpoint for nullpointer exception Apr 11 06:47:09 its okay I just fixed him =P Apr 11 06:47:15 haha Apr 11 06:47:16 almost done, i am git pulling the changes to my other machine michaelnovakjr Apr 11 06:47:24 ok Apr 11 06:48:05 its okay I just fixed him =P Apr 11 06:50:08 romainguy__: you around? Apr 11 06:53:36 yes Apr 11 06:54:09 I am trying to implement a similar effect to what is shown here: Apr 11 06:54:13 http://www.pmptoday.com/wp-content/uploads/2007/06/appl-iphone-upgraded.jpg Apr 11 06:54:37 what effect? Apr 11 06:54:42 Specifically, how would I efficiently flip the image and use it as the background for the bottom control bar? Apr 11 06:54:53 ah the reflection? Apr 11 06:55:15 there are several ways to do this Apr 11 06:55:19 Yes. I have been considering various ways to do it, but none seem especially efficient. The image may have been scaled by the ImageView, and I want to use that work without having to do any of the scaling again. Apr 11 06:55:35 my favorite way would be to write a ReflectionLayout Apr 11 06:55:38 containing one child Apr 11 06:55:41 hmm, my app didnt get caught Apr 11 06:55:57 and in the draw method the layout would use scale + the porterduff dst_out + gradient to draw the reflection Apr 11 06:56:41 and to get a copy of the component you can simply use the caching mechanism in View (getDrawingCache() etc.) Apr 11 06:57:10 My first though was to use the drawing cache, but I wasn't sure if that would be wise given that the ImageView is so large. In this case, it's a static image, would enabling the drawing cache really make sense? Apr 11 06:57:17 thought* Apr 11 06:57:34 if the image is scaled, why not Apr 11 06:57:42 you have to do this work only once though Apr 11 06:58:09 right, but the drawing cache would persist indefinitely. that's my concern: i process once, but store forever? Apr 11 06:58:15 er no Apr 11 06:58:20 you kill it when you're done with it Apr 11 06:58:40 the drawing cache? set enabled=false? Apr 11 06:58:42 michaelnovakjr: the exception doesnt get caught, as soon as the app loads, the exception appears in the emulator Apr 11 06:58:45 yes Apr 11 06:58:50 Ah ok, that's what I needed then. Apr 11 06:58:53 (next SDKs will have a specific method for that) Apr 11 06:59:08 note that there's another way to do it Apr 11 06:59:16 it's a bit slower at runtime but costs no memory Apr 11 06:59:36 you can simply create a paint with a -1 scale on Y, a vertical gradient shader and a dst_out xfermode Apr 11 06:59:40 and you draw the image twice Apr 11 06:59:46 once normally, the second time with this paint Apr 11 06:59:52 and voilą, you have a reflection Apr 11 06:59:56 romainguy: do you know what the id for the hour spinner in the TimePicker is? i'd like to focus it automatically. Apr 11 07:00:08 lemme check Apr 11 07:01:35 android.R.id.hour Apr 11 07:02:09 romainguy__: Weird. cover.setImageResource(R.drawable.test); cover.setDrawingCacheEnabled(true); Bitmap foo = cover.getDrawingCache(); // foo is null. Apr 11 07:02:33 ah Apr 11 07:02:46 that's because you are using ImageView in the only mode where it will refuse drawing cache Apr 11 07:02:52 that is, your image is not scaled Apr 11 07:03:14 the imageview has scaleType="fitCenter" Apr 11 07:04:30 definitely should be scaling. Apr 11 07:04:52 romainguy: thanks, i suppose hourGroup is what i need Apr 11 07:05:32 <_avatar> so I have a ListView with items that have a solid color background. the items are defined as an xml layout. i want to change the appearance of the items slightly when they recieve focus. can i do this with just an xml layout (i.e. without subclassing View)? Apr 11 07:05:43 romainguy__: any thoughts? Apr 11 07:05:51 jasta: so you have the version before that, where ImageView refuses bitmap caching Apr 11 07:06:11 you mean M5 doesn't support this? Apr 11 07:06:16 you can force it with setWillNotCacheDrawing(false) Apr 11 07:06:19 no Apr 11 07:06:31 I mean M5 explicitly tells ImageView to never cache itself Apr 11 07:06:54 (there's little point in caching a Bitmap into a Bitmap, which was later corrected to "in caching an *unscaled* Bitmap into a Bitmap) Apr 11 07:07:02 ImageView has no setWillNotCacheDrawing method. Apr 11 07:07:16 then you're screwed :) Apr 11 07:07:20 fuck Apr 11 07:07:31 but you have the image Apr 11 07:07:38 so that's okay Apr 11 07:07:44 yeah, i guess it just won't be very efficient. Apr 11 07:08:04 why worry until you actually measure it? Apr 11 07:08:08 should I just get the Bitmap, flip it with a matrix and set that as the background of the controls? Apr 11 07:08:17 unless you plan on updating the screen 30 times per second, it will be fast enough Apr 11 07:08:29 well, the important thing about this layout is that the reflection image should not affect measuring. It should just clip. Apr 11 07:08:40 as I said, you should use a custom layout for that Apr 11 07:08:48 ok ok :) Apr 11 07:08:49 -layout+drawing Apr 11 07:09:19 the custom layout would just have magic in onMeasure that would ignore the reflection image when measuring, right? Apr 11 07:10:34 depends on what you're trying to achieve Apr 11 07:10:38 I usually do the contrary Apr 11 07:10:45 the layout expands itself to make room for the reflection Apr 11 07:11:19 it would make more sense to let the cover image take up as much vertical room as it wants without distortion Apr 11 07:11:31 then use the remaining space for the controls bar (with reflection image) Apr 11 07:11:49 in that way, the size of the reflection is just clipped to whatever size the controls bar would need to be to fill in the gap. Apr 11 07:11:52 right? Apr 11 07:12:05 I would scale the image to the width of the screen Apr 11 07:12:11 and keep the aspect ratio of the height Apr 11 07:12:20 and use whatever's left to draw the reflection Apr 11 07:12:31 using a fixed length for the reflection's gradient Apr 11 07:12:34 and put the controls on top Apr 11 07:14:13 right, but wouldn't that just be an existing layout of ? Apr 11 07:14:21 why would there be any need to create a custom layout? Apr 11 07:14:33 for the drawing... Apr 11 07:14:57 i guess i'm having a hard time understand how logically you envision the view hierarchy Apr 11 07:15:02 can you demonstrate? Apr 11 07:15:14 sure, go buy my book, it's explained inside :)) Apr 11 07:15:33 lol, deal Apr 11 07:15:48 I have a Swing source code that does exactly that if you can parse it Apr 11 07:16:26 just one sec Apr 11 07:16:55 With a GridView, how do I see what view was poked? Apr 11 07:17:02 I tried using onClickItem Apr 11 07:17:03 what do you mean poked? Apr 11 07:17:09 selected, I guess Apr 11 07:17:15 the different objects in GridView Apr 11 07:17:35 * duey buys the book and sells it second hand Apr 11 07:18:20 poff: you are using a setOnItemClickListener? Apr 11 07:18:33 time to finsih this project Apr 11 07:18:46 how many pages you guys writing for the readme? Apr 11 07:19:31 duey: mine's pretty short, 100 lines Apr 11 07:19:35 in a text file Apr 11 07:19:37 ah Apr 11 07:19:42 think i might write ~page Apr 11 07:19:44 i don't want the judges to have to read a novel Apr 11 07:19:49 yeah Apr 11 07:19:51 (and i dont think they would) Apr 11 07:19:53 figure i would write short Apr 11 07:20:01 a short part and have an additional reading part Apr 11 07:20:15 you know if they really like it or something Apr 11 07:20:18 romainguy_, it would probably help if I did set the listener, wouldn't... Apr 11 07:20:29 poff: indeed :) Apr 11 07:20:30 I am wondering about the technicity and knowledge of the judges Apr 11 07:20:37 http://android-developers.blogspot.com/2008/04/android-developer-challenge-judges.html Apr 11 07:20:47 That's what I get for coding brain dead :) Apr 11 07:21:46 romainguy_: were you getting something for me? you said just one sec? Apr 11 07:21:58 ah no, sorry, wrong window :) Apr 11 07:21:59 so there is no real point giving specific technical details i presume Apr 11 07:22:04 romainguy_: ok :) Apr 11 07:22:38 <_avatar> i hate "re-ask," but does anyone know the answer to my question a few minutes ago about focusing ListView items? Apr 11 07:22:40 i am currently displaying foreign chracters from translation in a WebView - this is tacky as but they don't seem to be displaying in TextViews ? (say French!) Apr 11 07:22:47 _avatar: what question? Apr 11 07:23:07 <_avatar> romainguy_: so I have a ListView with items that have a solid color background. the items are defined as an xml layout. i want to change the appearance of the items slightly when they recieve focus. can i do this with just an xml layout (i.e. without subclassing View)? Apr 11 07:23:17 yes Apr 11 07:23:24 either change their textColor or their background Apr 11 07:23:35 and handle the state state_selected Apr 11 07:24:18 <_avatar> awesome, thanks :) Apr 11 07:28:17 so how do i fix textview to display foreign characters? Apr 11 07:30:10 are the characters your put in the textview in the correct encoding? Apr 11 07:30:34 I *think* they are utf8 Apr 11 07:31:01 are they supposed to be utf8? Apr 11 07:31:17 I would not be surprised Apr 11 07:33:00 romainguy_: I'm trying it your way with a ReflectionLayout. What one child did you imagine for the layout? I had thought to do , are you saying just skip the ImageView entirely and have it set as an attribute? Apr 11 07:33:20 jasta: yeah, that'd be the easiest Apr 11 07:40:59 do you know if there is any issue with onLongClick on a ExpandableListActivity Apr 11 07:41:11 no idea Apr 11 07:41:12 how can I close an activity from within the activity? Apr 11 07:41:17 romainguy_: Thanks, I think this is gonna work nicely :) Apr 11 07:41:38 I have a onLongClick and onClick, the onclick works but the not the onlongclick and it is basically the same code.... Apr 11 07:41:57 jasta: cool, are you using a Paint to draw the reflection? Apr 11 07:42:29 I'm not quite as efficient as you at navigating this stuff. I am still working on trying to flip the image ;) Apr 11 07:42:46 ^^ Apr 11 07:43:01 well I'm sure you know more about the rest of our APIs than I do :)) Apr 11 07:43:12 (all those weird binders, services, IPCs, and other mysteries :) Apr 11 07:43:17 i love the IPC :) Apr 11 07:44:01 what's the best way to stop an activity from within the activity? Apr 11 07:44:03 romainguy_: So are you saying I could just flip the image and draw the image using a particular paint to accomplish the entire reflected effect? Apr 11 07:44:07 Kraln: finish() Apr 11 07:44:10 hmm Apr 11 07:44:11 finish Apr 11 07:44:17 jasta: yes Apr 11 07:44:22 thanks Apr 11 07:44:44 you need to scale(1.0, -1.0) on the Canvas Apr 11 07:44:44 * duey moves to m5 Apr 11 07:45:04 and the Paint must have: setXfermode with a PorterDuff.DST_OUT Apr 11 07:45:05 lets see. last stupid question of the night Apr 11 07:45:20 Is there a way to show the menu without requiring the user to hit the 'menu' button? Apr 11 07:45:35 romainguy_: Oh yes, I do know how to do this. I'd set a gradient shader and a colorfilter right? Apr 11 07:45:43 no color filter Apr 11 07:45:46 just a gradient shader Apr 11 07:45:54 then why'd you mention porterduff dst_out? Apr 11 07:45:55 with varying alphas Apr 11 07:46:11 because it's the porter duff composite that will create the fade effect Apr 11 07:46:38 where would that be specified though? LinearGradient doesn't mention it? Apr 11 07:46:46 Paint.setXfermode Apr 11 07:46:48 I just told you :) Apr 11 07:47:08 oh, sorry, i missed that. Apr 11 07:47:31 lord I can't even begin to understand what Xfermode does. I'll do some reading ;) Apr 11 07:47:48 yes, the porter duff composites can be mind twisting Apr 11 07:48:11 dst_out (or dst_in) will basically apply the alpha of the gradient onto your image Apr 11 07:48:22 so if the alpha varies in the gradient... Apr 11 07:49:18 I'll experiment... Apr 11 07:49:29 thanks for getting me started at least Apr 11 07:50:01 you'll be happy to know that i think i made my UI much less ugly. i spent some time at the apple store :) Apr 11 07:50:17 got a mac? Apr 11 07:50:41 jasta: does it look like iphone? Apr 11 07:50:54 to the degree that i wanted, yes ;) Apr 11 07:50:56 lol Apr 11 07:51:00 hehe Apr 11 07:51:12 jasta: is hell bend on making android the iphone clone ;) Apr 11 07:51:30 there are quite a few differences in the basic UI though. most notably because the iPhone avoids playlist management and I tackle it head on. Apr 11 07:51:47 cool Apr 11 07:51:52 my supervisor for honours asked that i not use android Apr 11 07:51:54 because managing a playlist on a phone is annoying :) Apr 11 07:51:56 i was like......no Apr 11 07:52:02 duey: how come? Apr 11 07:52:04 muthu: Well, I actually wanted to create my own player primarily because I like lots of things about iPods in general, but there are some "small" things that just drive me bonkers. Apr 11 07:52:21 no devices available Apr 11 07:52:34 romainguy_: Only if the playlist management is poorly implemented. You'll see, I think you'll be impressed how I manage this ;) Apr 11 07:52:55 I rely a lot on online services to help manage the playlist for you :) Apr 11 07:52:55 I doubt it Apr 11 07:53:02 jasta: i like a lot of things about your approach Apr 11 07:53:18 Every time I saw playlist management on a device, it was making navigation and or playing more difficult Apr 11 07:54:12 context playlist are cool, I like the one in exaile which connects to last.fm in order to find similar songs on your device Apr 11 07:54:30 romainguy_: My approach can degrade into one simple difference between the iPod: default behaviour is to enqueue, not to play immediately. Apr 11 07:55:33 jasta: ok, this is exactly what I hate :) Apr 11 07:55:34 The assumption is that users often contextually explore their music. Listening to one song reminds them of another, which they'd like to also hear. Which might take them in an entirely new direction as their tastes whimsically move about the collection. Apr 11 07:56:10 My approach is to capture that usage pattern, and design a UI that supports it well. Apr 11 07:56:35 I believe the pattern is that if you are looking for a song, you want to listen to it, not enqueue it somewhere to be played sometimes in the future Apr 11 07:56:43 but that's my personal take on it :) Apr 11 07:56:49 I agree with romainguy Apr 11 07:56:51 romainguy_: If you tap a song twice, it plays now. Apr 11 07:56:59 I'd rather have the contrary ^^ Apr 11 07:56:59 disrupting the currently playing track Apr 11 07:57:12 I tend to know exactly what I want and listen to entire albums rather then jump from one song to the other Apr 11 07:57:14 especially considering how double-tapping is counter intuitive and sucks Apr 11 07:57:31 especially on Android where it's basically used nowhere Apr 11 07:57:37 we do clicks and long clicks Apr 11 07:57:45 (doesn't mean I like long clicks btw :) Apr 11 07:57:53 i think long clicks are much worse myself Apr 11 07:58:19 sure Apr 11 07:58:22 but that's how android works Apr 11 07:58:24 romainguy_: Well, regardless, my UI still has a lot of room to evolve. Apr 11 07:58:31 you just made your app behave differently than everything else :p Apr 11 07:59:19 I am not intending to make my application more complex to interact with, I still respect that this is a constrained device that is awkward to interact with Apr 11 07:59:29 sure Apr 11 07:59:44 I'm just saying you're making it use gestures that are not used in the standard apps and widgets Apr 11 08:00:00 I just believe that I am more closely modeling the way the brain explores music. Apr 11 08:00:28 jasta: that's very hard to figure out Apr 11 08:00:35 especially without user studies Apr 11 08:00:47 I would say your are modeling *a* way the brain etc. Apr 11 08:01:06 romainguy_: We'll call it an experiment then. Apr 11 08:01:14 i know what the title is: jasta brainy player :-D Apr 11 08:01:22 lol Apr 11 08:01:51 muthu: Not really. It's easy to find a way that more closely models this than the iPhone, which avoids the topic entirely. Apr 11 08:01:54 anyway Apr 11 08:02:04 time to add features to my views visualization tool Apr 11 08:02:18 if IntentReceiver components are not allowed to bind to services, how do you get feedback from a background process? Apr 11 08:03:00 romainguy_: Well, perhaps you are too stubborn to sell. Maybe I will have better luck with the OHA judges ;) Apr 11 08:03:12 Though I suspect they will be much more stubborn. Apr 11 08:03:24 I'm just saying your app is behaving differently Apr 11 08:03:25 its just going to be random() Apr 11 08:03:27 that's your choice Apr 11 08:03:47 just don't expect double-tap to be an easy discovery if it's the only place where it happens ^^ Apr 11 08:03:51 romainguy_: Part of the reason it does so is because we as users have no way of predicting how the Android platform will change from now until release. Apr 11 08:04:22 I don't see your point Apr 11 08:04:41 Please appreciate that you have a position much unlike ours. M3 to M5 was a significant leap that we could not anticipate. Will this happen again, for example? Apr 11 08:04:49 the judges will be lazy Apr 11 08:04:49 and act as the lay man Apr 11 08:04:49 like the end users Apr 11 08:04:49 i don't think they would be thinking much Apr 11 08:04:49 no offence Apr 11 08:04:50 you never know, because some of the innovative apps needs sound technical judges Apr 11 08:05:20 muthu: I'm not asking for technical judges, I'm asking for less stubborn ones who are not simply looking for the same old recycled crap interfaces ;) Apr 11 08:05:45 jasta: I understand this position but how does that justify using a gesture that does not exist when you *know* that you are building the app for M5 at the moment? Apr 11 08:06:05 wow, some guy on android-challenge is trying to figure out why his 80 MB apk file won't submit Apr 11 08:06:11 I'm not saying double-tap is wrong Apr 11 08:06:19 romainguy_: Because I'm not building the app for M5, I'm building it for Android at release. Apr 11 08:06:36 well and so far, Androd will be released without double taps Apr 11 08:06:42 I'm saying you should not consider it as a good choice for discoverability Apr 11 08:06:51 80MB?? for a moment i thought 80KB.. Apr 11 08:07:00 That said, you do whatever you want Apr 11 08:07:01 romainguy_: It's self-evident, my UI tells the user that if they click again it will play. Apr 11 08:07:28 it adds a sort of button that says "click to play now" Apr 11 08:07:30 jasta: android will not embrace iphone design Apr 11 08:07:31 * romainguy_ hates UIs that have to tell him what to do to be understood :) Apr 11 08:08:31 Dan Morill seems to like many of the submissions so far Apr 11 08:08:48 I should poke Dan to take a look at the submissions Apr 11 08:08:57 I'm sure there are very interesting apps in the bunch Apr 11 08:09:02 oh yes Apr 11 08:09:04 romainguy_: and I hate UIs that assume it is acceptable to degrade my usage simply to satisfy the developer or designer's laziness. Apr 11 08:09:16 which is the iPod :) Apr 11 08:09:47 anybody had issues gettting the width/height for a relative layout? Apr 11 08:09:48 There's nothing lazy about the iPod's design Apr 11 08:09:50 <_avatar> romainguy_: thanks a bunch, got my selector working in my listview :) Apr 11 08:09:55 My girlfriend and I used to drive 6 hours to Pullman every other weekend for a couple of months and I nearly threw her iPod out the window several times. Apr 11 08:09:57 _avatar: sure Apr 11 08:10:42 If she was driving, and heard a song that reminded her of something else she wanted to play next, I'd have to wait for the song to get just close to ending and then quickly tap to play the song she wanted to hear. Apr 11 08:10:53 then wait for that one to finish playing and quickly tap back onto our playlist in the same position as it was previously. Apr 11 08:11:07 jasta: why didn't you just build a on-the-go playlist? Apr 11 08:11:11 I felt like destroying the miserable device every time I had to do that, screaming "why the fuck can't I enqueue!?" Apr 11 08:11:12 jasta: the ipod is the best selling single piece of technology ever sold... Apr 11 08:11:26 you can enqueue complete playlists Apr 11 08:11:32 it might have been beaten by the wii actually Apr 11 08:12:03 acsia: No it isn't, you could easily argue that a mobile phone is much more popular. Also, there are probably numerous other less novel things that you could find to be more popular. Apr 11 08:12:08 * davidw did a bike race in Pullman once Apr 11 08:12:08 For example, a dishwasher. Apr 11 08:12:18 Or a TV. Don't be ridiculous :) Apr 11 08:12:18 hey dan Apr 11 08:12:33 just secretly shout the submission in this channel ;) Apr 11 08:12:42 the number of submissions that is Apr 11 08:13:00 jasta: well.. if you compare TVs to iPods, then you actually need to compare TVs to every model of MP3 player out there, not just one :p Apr 11 08:13:26 jasta: if you compute over time the ipod beats the dishwasher or mobile phone by miles Apr 11 08:14:31 anyway you can not deny how the ipod has impacted the portable media Apr 11 08:14:59 all others are trying to copy it Apr 11 08:15:06 I can't, and I think it's a great device. But, they have ignored one important feature. Apr 11 08:15:46 I am attempting not to ignore it. Perhaps I fail, perhaps I succeed. Apr 11 08:16:15 I use rockbox Apr 11 08:16:24 i am very peticular with my music Apr 11 08:16:29 This is why I will be opening my application after the first round submission. I want a lot more user input. Apr 11 08:16:50 cool Apr 11 08:17:34 anybody seen issues with computed width and high with relative layout? Apr 11 08:17:54 always gives 0 but I can ensure you that I see it on the screen :) Apr 11 08:18:15 is there a complete list of file formats bitmapfactory supports? Apr 11 08:18:17 then you are querying the width/height too early Apr 11 08:18:26 duey: jpg, png and bmp Apr 11 08:18:28 you guys bummed me out now Apr 11 08:18:33 ah crap Apr 11 08:18:34 i think i'm gonna go to bed Apr 11 08:18:46 duey: it also supports ico Apr 11 08:18:55 been using tiff.. Apr 11 08:19:03 tiff might work Apr 11 08:19:04 give it a try Apr 11 08:19:07 will do Apr 11 08:19:24 is there a isRendered type of function on a view? Apr 11 08:19:56 you can listen for the onSizechanged Apr 11 08:20:04 or override onDraw Apr 11 08:20:07 or just post a Runnable Apr 11 08:20:25 hum ok Apr 11 08:20:29 thx Apr 11 08:21:49 "It is a cruel torture to me that I can't reveal the actual numbers. You all would probably find them enlightening, but alas..." Apr 11 08:21:56 what is he implying ? :) Apr 11 08:22:07 what is this quote? Apr 11 08:22:23 from dan morrill Apr 11 08:22:28 http://groups.google.com/group/android-challenge/browse_thread/thread/b8cd6c9d61663b4a/9dd2092b518506ea Apr 11 08:22:39 regarding submission totals Apr 11 08:23:02 my take is that there are fewer submissions than folks are speculating Apr 11 08:23:12 well duh Apr 11 08:23:14 4 days left Apr 11 08:23:23 thats a lifetime Apr 11 08:23:32 well..a short one but still! Apr 11 08:24:05 I am GMT+12 so it wll be the 15th for me Apr 11 08:24:57 :) Apr 11 08:25:45 me too.. 15th Apr 11 08:30:54 ZoomSlider is not customizable yet i presume? Apr 11 08:31:07 I receive constructor errors if I try to change the theme etc... Apr 11 08:32:50 * davidw is excited: Paris Roubaix this weekend Apr 11 08:35:05 can someone explain to me how I bind to a service from inside a intentreceiver? I see that its illegal to run bindService from an intentreceiver, but then how does an intentreceiver interact with a service? all examples that I see call aidl services from an activity Apr 11 08:43:02 jtoy: it doesnt Apr 11 08:43:11 the serviceconnection must be established already Apr 11 08:43:36 one way is to setup your intentreceiver in the onServiceConnected callback Apr 11 08:43:43 but i wouldnt recommend it Apr 11 08:43:59 or Apr 11 08:44:09 dont do anything in your intentreceiver unless you are sure the serviceconnection is up Apr 11 08:44:32 that's actually a good point. Apr 11 08:44:37 Android doesn't let you use the java File class does it? Apr 11 08:44:39 i don't think this behaviour is appropriate for an intentreceiver Apr 11 08:44:44 raidfive: Yes it does Apr 11 08:44:47 raidfive: yes it does Apr 11 08:45:26 I thought you had to use specific android code when messing with files on the phone but if you were working on the sdcard you could use standard java Apr 11 08:45:52 you're confusing must with should ;) Apr 11 08:45:53 so what is the correct behaviour then for having some method run periodically via the AlarmManager? I was using an IntentReceiver becuase I was using non aidl services which cant be called directly from the AlarmManager Apr 11 08:46:21 lol ... so it isn't a requirement? damn! :) Apr 11 08:46:26 jtoy: why not make the service do the work that the intentreceiver was going to? Apr 11 08:48:26 raidfive: also, you use android functions to get the File object Apr 11 08:48:56 hmm, if I have a horizontal linear layout inside of a vertical one Apr 11 08:49:04 jasta: so that means the class that has the aidl stub interface implemented would call itself where would code like: private ServiceConnection mConnection = new ServiceConnection() belong? Im not sure how that would work Apr 11 08:49:05 how do I horizontally center the objects inside of the horizontal one? Apr 11 08:49:40 on the horizontal LinearLayout android:layout_gravity="center" Apr 11 08:50:18 no dice. Apr 11 08:50:25 it was already set that way =) Apr 11 08:51:37 I got what I wanted. thanks though Apr 11 08:54:10 I need to be able to return a list form the service to something like an intentreceiver that can display toasts, so that is why I am having the intentreceiver establish a connection to the service, im not sure how else to do it Apr 11 08:54:17 how do you add padding to a linear layout? Apr 11 08:55:05 I usually don't ask such obvious/easy to find questions Apr 11 08:55:12 but its 5am and I only have so much time left to work with Apr 11 08:56:38 layout_padding(Left|Right|Top|Bottom) Apr 11 08:57:11 is the way I'm trying to do this wrong? Apr 11 09:04:00 can toast be called from a service? Apr 11 09:04:50 yes Apr 11 09:04:52 I would think so Apr 11 09:05:13 i was mistaken that it could be called from a non-UI thread, however. you must be sure to use a handler in the service to post the Toast. Apr 11 09:06:34 ok, so I must have a handler? if I can just use toast/alert directly form the service, then I can avoid this aidl/intentreceiver issue Apr 11 09:07:14 you must use a handler if you are displaying the Toast from anything other than the main thread. This includes any binder threaders. Apr 11 09:08:46 if i understand that correctly, that means I wont be able to display a toast inside a service it the service is called from a intentreceiver because the intentreceiver is not the main thread, is that correct? Apr 11 09:09:05 jtoy: You will always be able to display the toast, you just must use a handler in certain scenarios. Apr 11 09:10:14 The one you just mentioned isn't one of those scenarios though Apr 11 09:11:40 hmm, i did do some testing before, I was able to display toast from an intentreceiver but not from inside a service, I thought I read that you coudlnt do it in the groups. ... I'll try it again though Apr 11 09:12:10 There are examples in the ApiDemos that use Toast in services Apr 11 09:12:18 But it won't help you determine when a handler is necessary and when it is not. Apr 11 09:12:32 For that, you will simply need to sit back and think carefully about how the framework is managing your service. Apr 11 09:12:47 Or just plow wrecklessly through like you've been doing Apr 11 09:12:49 Whichever :) Apr 11 09:13:11 recklessly* Apr 11 09:13:13 jasta: haha, besides this part, the app does seem pretty decent :) Apr 11 09:13:33 I'll be using it myself at least! hehe Apr 11 09:13:40 jtoy: what's it do? Apr 11 09:14:35 jtoy doing LBS Apr 11 09:14:39 its a contacts/calls statistics analyzer Apr 11 09:14:51 ZInfo? Apr 11 09:15:06 or in web 2.0 speak, "social networking in your pocket!!!! ftw" Apr 11 09:15:11 what is LBS and Zinfo? Apr 11 09:15:19 flapdoor? Apr 11 09:15:21 PocketJourney? Apr 11 09:15:27 lol Apr 11 09:15:34 those are the submissions jtoy Apr 11 09:15:43 LBS - location based services Apr 11 09:15:50 oh, no its not LBS Apr 11 09:16:14 I think I saw the video for that stats app Apr 11 09:16:28 ZInfo is the stats app Apr 11 09:16:45 hmm, I have not seen any videos nor taken anyone's idea, its original to me, but im sure there is similiar stuff outthere Apr 11 09:16:58 oh yes Apr 11 09:17:20 ideas doesn't matter Apr 11 09:17:26 its only in the execution Apr 11 09:17:27 jtoy: http://www.youtube.com/watch?v=-EJZHxMCZy0 Apr 11 09:19:06 muthu: Zinfo is some kind of LBS sharing app Apr 11 09:19:57 oh ok Apr 11 09:20:00 my bad Apr 11 09:20:18 I watched the video...didn't really get it Apr 11 09:20:18 completely out of sync today Apr 11 09:20:21 loading.....im in china currently, so that youtube video will take aobut 30 mins to load Apr 11 09:20:35 jtoy: doh Apr 11 09:20:36 they let you irc from china?! Apr 11 09:20:47 you must not be in a hotel Apr 11 09:20:50 wow, what i see so far, that app is nice Apr 11 09:21:23 shit,mine is like that, except not as cool looking :( Apr 11 09:22:00 hahahaha Apr 11 09:22:01 rofl Apr 11 09:22:27 only an executive from a mobile operator would install this app Apr 11 09:22:46 i don't see a use for this kind of stats app Apr 11 09:22:55 mine isnt just for the apps though Apr 11 09:22:56 very limited, even in terms of shits and giggles-use Apr 11 09:23:23 im building as a tool to help people manage their communications Apr 11 09:23:34 jtoy: using what android features? Apr 11 09:23:45 good idea Apr 11 09:24:03 contact management is useful Apr 11 09:24:03 for example, there are a bunch of people that i like to keep in touch with, but i dont have time to remeber when the last time i talked to them was Apr 11 09:25:15 f00f-: currently most of the features except for xmpp/gtalk/lbs Apr 11 09:25:41 hm ok Apr 11 09:25:57 you have a solid concept, but it's missing something Apr 11 09:26:07 maybe LBS+GTalk Apr 11 09:27:37 i do have a 'contrversial feature' , you can sync all this data online too Apr 11 09:27:48 but thats optional Apr 11 09:27:49 oh and access from your pc Apr 11 09:27:55 or web in general Apr 11 09:27:57 good Apr 11 09:28:12 yes, exactly! Apr 11 09:28:16 i hate when i have to duplicate work i do on my computer with my phone Apr 11 09:28:34 in terms of syncing notes, ideas, etc. Apr 11 09:28:39 ujst content in general Apr 11 09:28:57 yes, all the work you do on app/web gets syned the other way Apr 11 09:29:27 but its really ugly! :( that statisticians app is way nicer looking then mine Apr 11 09:30:05 submit & relax. Apr 11 09:30:33 i'm fixing my O(n!) algorithm :) Apr 11 09:30:50 yikes ;) Apr 11 09:31:30 however n < 5 in any realistic scenario Apr 11 09:31:33 I have an O(n) problem in my artist and album lists currently :) Apr 11 09:31:44 and i will probably get stoned for saying this: i am doing array permutations! Apr 11 09:32:46 hmm Apr 11 09:32:58 in android, it seems that threads can't throw an interrupted exception when blocking on socket io Apr 11 09:33:06 how should I terminate the thread and clear the socket properly? Apr 11 09:33:47 what seems to be true to you is not. Apr 11 09:34:01 well, I try to catch an InterruptedException and it says it's not thrown. Apr 11 09:34:09 ...but it is. Apr 11 09:34:12 ;) Apr 11 09:34:17 but what the heck Apr 11 09:34:22 exactly. Apr 11 09:34:54 you're not doing what you think you're doing, because java.io will interrupt. Apr 11 09:35:13 or rather, is interruptable Apr 11 09:35:36 http://rafb.net/p/caW1B899.html Apr 11 09:36:00 it says that that "interruptedexception" is not valid Apr 11 09:36:07 and won't let me compile Apr 11 09:36:10 what says it's not valid? Apr 11 09:36:17 eclipse Apr 11 09:36:33 Unreachable catch block for InterruptedException. This exception is never thrown from the try statement body androidChat/src/net/androidchat/client ThreadConnThread.java line 139 1207906505673 2023 Apr 11 09:37:08 reader is a bufferedreader Apr 11 09:37:57 interrupts don't happen that way. Apr 11 09:38:46 interrupts can be caught on wait(), sleep(), etc. Apr 11 09:39:21 jasta: i think i find why everything was not working, but I already changed all my code around Apr 11 09:39:35 man i am so tired. it's like 3am or something Apr 11 09:39:40 time for bed folks ;) Apr 11 09:39:45 good night Apr 11 09:39:46 okay. how should I interrupt that read? Apr 11 09:39:54 or rather, how can I shutdown that thread and the socket =p Apr 11 09:41:38 romainguy: any ideas? Apr 11 09:48:46 hmm Apr 11 09:48:49 let me try to close the reader. Apr 11 09:49:00 any ideas what form the notes should be in? Apr 11 09:50:57 hmm Apr 11 09:50:59 that just locks it Apr 11 09:51:07 romainguy: what should I do? Apr 11 09:53:50 wait, this worked, kind of Apr 11 09:56:32 have you ever seen noSuchMethodException when inflating a custom view? Apr 11 09:56:38 the method is there Apr 11 10:00:34 have you ever seen noSuchMethodException when inflating a custom view? Apr 11 10:02:16 did you implement the appropriate constructors? Apr 11 10:02:24 yep Apr 11 10:02:28 it s a very simple class Apr 11 10:02:51 what's the full exception? Apr 11 10:02:54 I am using the exemple in XFermode Apr 11 10:02:57 http://code.google.com/android/samples/ApiDemos/src/com/google/android/samples/graphics/Xfermodes.html Apr 11 10:03:14 that's what I just said then Apr 11 10:03:20 this class doesn't implement the necessary constructors Apr 11 10:03:48 aha Apr 11 10:03:59 http://code.google.com/android/reference/android/view/View.html#View(android.content.Context,%20android.util.AttributeSet,%20java.util.Map) Apr 11 10:03:59 that's the constructor you need Apr 11 10:04:07 the MyClassView(Context) one is for programmatic access Apr 11 10:04:18 the Context, AttributeSet, Map versions are for XML inflation Apr 11 10:04:33 Anyone know how to rename a file? File.renameTo() doesn't seem to do jack Apr 11 10:04:36 thx I ll take a look at this Apr 11 10:07:49 romainguy_ cheers it worked like a charm Apr 11 10:12:30 the method returns false Apr 11 10:20:01 romainguy, IIRC, the progress bar constructor has the normal context method, the xml method, and then an xml method + a style Apr 11 10:20:10 it would be nice if it were possible to have a context + style constructor Apr 11 10:20:13 if that makes sense? Apr 11 10:20:41 you could right? Apr 11 10:21:38 err... if I had the source code I could, maybe Apr 11 10:22:47 Oh, I was thinking you were extending ProgressBar... Apr 11 10:23:02 I want to set a style parameter Apr 11 10:23:06 programmatically Apr 11 10:23:16 setTheme() right? Apr 11 10:23:56 maybe not :) Apr 11 10:24:20 not available for progressbar Apr 11 10:24:37 Ahh, I'm thinking about ProgressDialog..it'll take a context,theme in the constructor Apr 11 10:36:49 how can I get the opposite of a color? Apr 11 10:37:32 romainguy_: why allow themes :(? Apr 11 10:37:56 what do you mean? Apr 11 10:39:53 well I am using Xfermode to get a transparent layer but I can get it transparent, it is always a shadow of a color Apr 11 10:40:03 is there a border we can set on views? Apr 11 10:40:07 so maybe if I set the 'opposite' color, it would work Apr 11 10:40:37 muthu: could use 9-patch Apr 11 10:42:50 ok Apr 11 10:43:03 may be easier way? Apr 11 10:44:34 sippy tea.. hmm perks for working at home ;) Apr 11 10:50:26 can an Alert Dialog be called from a service? Apr 11 10:52:07 jtoy: use the handler to post Apr 11 10:52:56 well, only have to use a handler if you spawn another thread Apr 11 10:53:10 ok, so I have figured out how to do that for a Toast, wasnt sure if I could do that for an AlertDialog/AlerDialog.Builder also Apr 11 10:53:18 night folks Apr 11 10:53:23 g'night Apr 11 10:53:26 I tried doing it in the same thread and it didnt wor, i had to spawn a new thread Apr 11 11:02:30 hmm, I have created theAlertDialog in a new thread, but I get this error: Unable to add window -- token null is not for an application Apr 11 11:03:29 from a service, you need call an handler Apr 11 11:03:34 the handler must do UI stuff Apr 11 11:04:19 muthu: do you have an example of this, I thoguht my code does that, but I guess its not done properly, but it does work for a toast Apr 11 11:04:51 let me check Apr 11 11:05:43 here is how I am tryin to do it: http://pastebin.org/28988 Apr 11 11:06:22 jtoy: here's an example of thread/handler I wrote: http://www.helloandroid.com/node/243 Apr 11 11:07:52 ok, Ithx Apr 11 11:08:16 I think you're actually starting 2 threads there Apr 11 11:08:44 your run() function spawns another thread t right? Apr 11 11:09:09 zhobbs: I dont actually understand how the code I have works, Apr 11 11:09:23 so im not surprised if its wrong, that was the only way I could figure out how to make the toast appear Apr 11 11:10:21 replace t.run(); with mHandler.post(mUpdate); Apr 11 11:10:34 and you can get rid of t Apr 11 11:11:51 how can I create a transparent region on my canvas? Apr 11 11:11:54 ok, i did that, still have the error, do I need to implement the handler like you did, withthe message passing still? Apr 11 11:12:36 jtoy: no, don't have to Apr 11 11:12:52 you can post the Runnable Apr 11 11:13:20 what do you mean by post the Runnable? Apr 11 11:13:33 that's what you're doing in your code there Apr 11 11:15:40 I am not sure what I need to change to make the AlertDialog appear, I have implemented Runnable you mean? Apr 11 11:16:21 you're posting mUpdate to the handler Apr 11 11:16:30 not sure about alertdialog though Apr 11 11:16:34 ahh! Apr 11 11:17:15 ok, I thought I knew what that meant, nm Apr 11 11:17:34 isnt by calling this in run: mHandler.post(mUpdate); posting the Runnable? Apr 11 11:18:17 yeah, which means that mUpdate.run() is called by the UI thread Apr 11 11:18:31 can you specify a different layout for different screen sizes? Apr 11 11:19:39 Kraln: I see that the built in apps have folders like drawable-finger,drawable-land-finger,drawable-port-finger Apr 11 11:20:07 maybe you can do layout-land-finger,layout-port-finger...but have no idea really Apr 11 11:20:12 hmm Apr 11 11:20:23 its qvga vs hvga that I need to mess with Apr 11 11:20:31 * Kraln does some diggin Apr 11 11:20:38 oh, they have layout-port and layout-land in there also Apr 11 11:20:42 zhobbs: ok, so that probably means the error is somewhere else? weird that it works for a toast though Apr 11 11:21:06 jtoy: might just not be able to use alertdialogs from a service Apr 11 11:21:54 zhobbs: I dont need to do the handleMessage override like you have in your example? Apr 11 11:22:11 nope Apr 11 11:23:39 zhobbs: do you normally use a scrollview? Apr 11 11:23:53 i have a list, should i put inside a scroll view? Apr 11 11:24:08 no, ListView's don't need ScrollViews Apr 11 11:24:36 how do i force the scrollbars to be visible Apr 11 11:25:32 don't think you can -- I couldn't figure it out at least Apr 11 11:25:36 ok Apr 11 11:46:16 Hi, I'm here for some urgent help - a nasty Android crash bug that's holding up my submission. Apr 11 11:46:52 Has anyone experienced serious problems and/or crashing with TextView ? Apr 11 11:47:18 I havne't...you getting exception or segfault? Apr 11 11:48:01 Neither really, either corruption of the display (with the application continuing to run) or occasionally lock-ups Apr 11 11:48:30 It's usually triggered by typing too much text into a TextView and forcing it to scroll. Apr 11 11:48:40 tomgibara: I've had similar issues with textview shitting bricks Apr 11 11:48:56 tomgibara: it is somewhat mitigated by wrapping it in a scrollview, but it's still crap. Apr 11 11:49:04 But it can happen just by scrolling the Linear layout it's in Apr 11 11:49:10 yep Apr 11 11:49:37 Everything I've tried does nothing :( Apr 11 11:50:03 I've tried: all combinations of maxLines lines singleLine attributes Apr 11 11:50:55 Making textview large enough to not require internal scrolling, makes its ScrollView ancestor scroll which also triggers the bug Apr 11 11:53:15 kraln: I guess I can try wrapping it like that, but I'm not hopeful. Apr 11 11:53:41 yeah, the lines attributes did jackall for me Apr 11 11:53:55 watch what mine did: http://www.kraln.com/issue4.swf Apr 11 11:56:04 Yes mine is actually an EditText that's blowing up, but they are both the same class underneath Apr 11 11:56:28 I submitted a bug. Apr 11 11:56:28 I've been trying to produce my own by extending TextView, but the bug's still there. Apr 11 11:56:39 let me guess, it worked fine in a previous release? Apr 11 11:56:54 Yeah, I just hadn't noticed it until now. Apr 11 11:57:29 This is my big problem: the textedit is for one of the settings that you need to run my application Apr 11 11:57:49 yep. Apr 11 11:57:51 * Kraln shrugs Apr 11 11:59:32 my bug is here: http://code.google.com/p/android/issues/detail?id=628 Apr 11 11:59:36 feel free to add a comment Apr 11 14:41:44 cool...my hecl application can edit itself Apr 11 14:42:16 uh oh...self aware android Apr 11 14:43:35 haven't you seen the movies where androids can improve themselves? Apr 11 14:43:38 It's never good Apr 11 14:43:48 They always end up going on a killing spree Apr 11 14:44:00 lol Apr 11 14:44:06 now hecl is going to go crazy Apr 11 14:44:09 I just hope you installed the kill switch in a better place then "on top of head" Apr 11 14:44:22 bottom of the foot Apr 11 14:44:27 lol Apr 11 14:44:35 step... Apr 11 14:44:38 Apr 11 14:44:42 step... Apr 11 14:44:49 hah Apr 11 14:45:23 haha Apr 11 14:45:45 that would be a brilliant robot to build Apr 11 14:46:02 I am gonna write the manifesto of the uselessness Apr 11 14:46:08 It would have to hop around Apr 11 14:46:18 Or maybe it could have special shoes Apr 11 14:46:23 like old people Apr 11 14:46:29 :) Apr 11 14:46:46 has anybody been able to create drawable via XML for backgrounds? Apr 11 14:46:50 or a button set into the shoe Apr 11 14:46:57 acsia: yes Apr 11 14:46:59 yes Apr 11 14:47:10 where can I get the XML attributes? Apr 11 14:47:23 how are you doing it now acsia? Apr 11 14:47:23 I wrote a tutorial Apr 11 14:47:29 ...finding link Apr 11 14:47:31 like color etc.. and it is non failing so I am not sure where it goes wrong Apr 11 14:47:34 cherrs Apr 11 14:48:21 Something like this: Apr 11 14:48:21 http://www.teleologic.net/android/index.php/Custom_Buttons Apr 11 14:48:28 http://www.teleologic.net/android/index.php/Custom_Spinners Apr 11 14:49:19 not really but that will be of great help Apr 11 14:49:27 I am talking about the shape xml Apr 11 14:49:41 do you have code you can pastebin? Apr 11 14:50:02 give me a sex Apr 11 14:50:04 sec Apr 11 14:50:07 lol Apr 11 14:50:09 haha sure Apr 11 14:50:14 lol Apr 11 14:51:26 something along the lines of: http://code.google.com/android/samples/ApiDemos/res/drawable/shape_1.html Apr 11 14:51:45 oh yeah, I've done that too Apr 11 14:51:47 I am not sure where the xml specification for the shape element is Apr 11 14:52:15 ahhahhaah Apr 11 14:52:18 standby.. Apr 11 14:52:34 Like this works for a rectangle: Apr 11 14:52:35 http://pastebin.com/d7494ade7 Apr 11 14:53:23 well, rounded rectangle Apr 11 14:53:30 excellent Apr 11 14:53:42 I am gonna give it a try Apr 11 14:54:01 davidw: did you just read the lines above? Apr 11 14:54:17 yeah Apr 11 14:54:19 to continue along the same line: Apr 11 14:54:20 http://www.youtube.com/watch?v=byDiILrNbM4 Apr 11 14:54:32 lol Apr 11 14:54:34 awesome song Apr 11 14:54:44 :) Apr 11 14:54:58 acsia you are trying to put a drawable though right? Apr 11 14:55:07 I remember listening to it 8 years ago or so, just kicked back in my head Apr 11 14:55:21 well I am more looking for the drawable specification Apr 11 14:55:26 ah Apr 11 14:55:35 but I think I have enought now, I ll give a bit of a try Apr 11 14:55:56 what are you trying to do with the shape.... ? Apr 11 14:56:12 background drawable Apr 11 14:56:26 I was trying to set the background but did not know which tag to use Apr 11 14:56:34 or color to be exact Apr 11 14:56:48 android:background Apr 11 14:56:58 as a shape attribute Apr 11 14:57:29 and yes Apr 11 14:57:41 this Apr 11 14:57:42 Apr 11 14:58:00 you want to set a drawable to that? Apr 11 14:58:19 I was putting Apr 11 14:58:24 ah Apr 11 14:58:34 I got my answer but I was wondering if there is any doc? Apr 11 14:58:48 probably buried somewhere Apr 11 14:58:51 spec that I can go throught because it does not fail Apr 11 14:58:52 hehe Apr 11 14:58:54 yes Apr 11 14:59:06 what do you mean by failed? Apr 11 14:59:50 let me rephrase, there is no compilation nor runtime error Apr 11 15:00:01 so it s hard to know where the problem comes from Apr 11 15:00:10 ah Apr 11 15:00:14 makes sense Apr 11 15:00:22 do you use eclipse Apr 11 15:04:25 yep Apr 11 15:07:38 I tried to use that a bit for debugging, but... ouch Apr 11 15:07:42 I dislike UI design... Apr 11 15:12:41 UI design is important Apr 11 15:12:50 if your UI sucks people won't use your app Apr 11 15:13:25 what's the ADB command to uninstall an app? Apr 11 15:13:35 yeah, that's why I dislike ui design too Apr 11 15:13:47 B0jangles, I think you have to go in with the shell and rm it Apr 11 15:14:08 I remember romaine saying there was an adb command Apr 11 15:14:19 can we show hint for a spinner? Apr 11 15:14:28 a hint? Apr 11 15:14:59 davidw: it would be nice if it were possible to have a context + style constructor << that wouldn't work since the style matters only when the view is loaded from XML Apr 11 15:15:56 romainguy, ah... hrm. ok, looking at it another way: how to make a progress bar that's a progress bar programmatically Apr 11 15:16:37 romainguy: what's the ADB command to uninstall an app? Apr 11 15:16:45 I know I can do it via DDMS Apr 11 15:16:48 B0jangles: adb shell rm /data/Blah.apk Apr 11 15:16:52 thanks Apr 11 15:17:12 trying to set up some batch files to send my boss for a demo Apr 11 15:18:43 shouldn't it be rm /data/app/Blah.apk? Apr 11 15:20:08 sure Apr 11 15:20:15 it's whatever path where your application lives :) Apr 11 15:20:27 okay, thanks Apr 11 15:20:28 I usually remove stuff in /system/app so... :p Apr 11 15:33:47 * Kraln eats poffy Apr 11 15:35:18 still Apr 11 15:56:39 exciting weekend :) Apr 11 15:58:28 I'm almost ready to submit Apr 11 15:58:47 B0jangles: what is your project? Apr 11 15:59:07 romainguy: I'd love to talk about it, but I've been told not to by my employer ;-( Apr 11 15:59:11 ok Apr 11 15:59:16 at least until after the deadline Apr 11 15:59:18 I'll find out :p Apr 11 15:59:21 yeah Apr 11 15:59:57 It'll be submitted by "Teleologic Learning Company" Apr 11 16:01:13 I'm impressed at how fast the turnaround will be for the results to come out Apr 11 16:01:18 like, 2 weeks Apr 11 16:01:20 that's nuts Apr 11 16:01:24 ;-) Apr 11 16:19:42 I'm almost ready to submit too Apr 11 16:19:54 I just need to write the documentation =) Apr 11 16:20:02 I just finished my docs last night ;-) Apr 11 16:20:16 last night my program transformed from a developer application to an end user product Apr 11 16:20:16 hehe Apr 11 16:20:32 yeah, I'm having some colleagues test things out right now Apr 11 16:20:37 * Kraln has not slept yet Apr 11 16:20:41 heh ;-) Apr 11 16:20:51 * Kraln will not sleep until android deadline Apr 11 16:21:23 Actually, writing the docs were pretty easy because I'd written a lot more than I normally would in my code comments... Apr 11 16:21:28 ...and then realized we don't have to submit the code Apr 11 16:21:29 ;-) Apr 11 16:21:46 we don't? Apr 11 16:21:51 just the .apk Apr 11 16:21:53 and the docs Apr 11 16:21:55 mine is open sourced anyway. Apr 11 16:22:29 presumably they won't be judging the code, though Apr 11 16:22:55 I hope not Apr 11 16:23:04 ;-) Apr 11 16:23:08 messy code? Apr 11 16:23:23 bad use of the sdk to get what I want Apr 11 16:23:34 how so Apr 11 16:23:58 well, the latest sdk broke some stuff Apr 11 16:24:04 yeah Apr 11 16:24:08 so I sort of "brute-forced" the behavior I wanted Apr 11 16:24:09 that's an understatement ;-) Apr 11 16:24:12 ah Apr 11 16:24:33 the last SDK for me was basically an "oh, okay, I guess I'll just start over" Apr 11 16:24:46 same here Apr 11 16:24:54 except i kept my application logic separate from the android logic Apr 11 16:24:59 so the bulk of the rewriting was UI Apr 11 16:25:10 I hadn't gotten much past the UI at that point... Apr 11 16:25:29 =.= Apr 11 16:27:30 I was pretty sure they were going to massively change the UI, so I didn't spend to much time on that until last night =p Apr 11 16:29:34 i was doing backend work before the latest sdk came out Apr 11 16:30:38 i think they have done a good with it Apr 11 16:47:42 romainguy__: Are you able to access submissions? Apr 11 16:47:56 Not that I know of Apr 11 16:48:04 Maybe if I ask morrild :) Apr 11 16:48:11 Oh, you just said "I'll find out", I thought that's what you meant :) Apr 11 16:48:33 think we'll know how many submissions were sent in next week? Apr 11 16:55:45 probably not actually Apr 11 17:04:00 you don't think so? sounds like good promo material Apr 11 17:04:12 "we were amazed at the quality of the more than 23232838238 submissions ..." Apr 11 17:04:43 well maybe Apr 11 17:06:54 " and then we ran davidw's... wow, what a disaster!" Apr 11 17:28:03 hello Apr 11 17:29:01 when I set a notification in the status bar, and the later click on intent, and pop up window tries to scroll down, but there is nothing in, what is this this scroll down window? Apr 11 17:29:19 how can I avoid it to pop up? Apr 11 17:29:39 you can't relaly, it's the notification system that they have currently Apr 11 17:29:44 i think it will change at some point, because it sort of sucks Apr 11 17:32:15 'sort of' ?:-) Apr 11 17:32:43 no, it definitely sucks ;) Apr 11 17:33:04 according to the docs it should show the expandedText set in the notification Apr 11 17:33:11 but got nothing, never mind... Apr 11 17:33:32 I just want the notification manager to show some icons actually Apr 11 17:36:15 yeah, i think that's what a lot of oflks want, but it doesn't do that currently Apr 11 17:36:28 i believe it will change, though Apr 11 17:36:37 actually this notifications drawer works very well on actual hardware Apr 11 17:37:34 i just think the idea as it is implemented currently is too inflexible to cover the range of applications that android will support. Apr 11 17:38:32 for example, my music player. presumably, when playing, it should indicate that with a status bar icon. but what would the notification itself be? Apr 11 17:44:55 jasta: the artist - song name? Apr 11 17:45:10 zhobbs: Which would require a throw up a new notification each time the playlist moves. Apr 11 17:45:20 yeah, that's what I'm doing Apr 11 17:45:36 I think the presumption is that notifications are designed to harrass the user, so this would not work wel. Apr 11 17:45:43 well* Apr 11 17:45:47 :) Apr 11 17:53:34 What would the best way to store a user's preferences (options) for an app? Apr 11 17:58:35 Just saving a file? Apr 11 17:58:49 or could does Android have a better way? Apr 11 17:58:58 poff: database Apr 11 17:59:22 http://code.google.com/android/devel/data/databases.html Apr 11 17:59:34 http://code.google.com/android/devel/data/preferences.html Apr 11 17:59:36 :) Apr 11 17:59:41 Found something already Apr 11 17:59:50 that'd work too Apr 11 18:11:49 has anybody managed the onLongClickHandler over an Item of a gallery?? Apr 11 18:26:04 sqlite is pretty good Apr 11 18:27:11 sqlite used widely Apr 11 18:28:01 I've used sqlite in Windows apps Apr 11 18:28:05 It is pretty nice Apr 11 18:28:16 I wish you could do fulltext searches Apr 11 18:28:24 but what can you do... Apr 11 18:31:45 i use sqlite in the server component of my project Apr 11 18:32:28 i use it as well for storage... its pleasantly easy Apr 11 18:32:35 interesting. Why not use something a bit more robust on the server? Apr 11 18:32:47 i.e. MySQL or PostgreSQL Apr 11 18:34:28 B0jangles: Because the server doesn't need anything more robust. Apr 11 18:34:45 not expecting many users? ;-) Apr 11 18:34:48 No reason deploying a more robust package when you know it will not be necessary. Apr 11 18:34:57 I expect quite a large volume of users, but the server is not centrally hosted. Apr 11 18:35:19 My framework is designed to run the server on the user's home PC. This is the only way to avoid copyright issues. Apr 11 18:35:25 ah Apr 11 18:35:28 that makes sense Apr 11 18:35:37 And even then I suspect my project will eventually need to have DRM in it to be acceptable to the music industry. Apr 11 18:36:11 sqlite - lightweight embedded database Apr 11 18:36:27 But I will not personally cater to them. If my app takes off and carriers or whatever want to package it, they will have to worry about adding the DRM layer themselves. I will not. Apr 11 18:36:45 jasta: legally, there would be no need for DRM Apr 11 18:36:57 it's fair use to format-shift Apr 11 18:37:25 B0jangles: I believe that there would, since you could share your entire music collection by simply giving your friend your username and password and server address. Apr 11 18:37:50 That would be illegal from the user's perspective Apr 11 18:37:55 Doesn't necessitate DRM Apr 11 18:38:01 But like I said, I will refuse to implement this part of my app. I'll be happy to accept the work, but I won't do it :) Apr 11 18:38:02 jasta: iTunes lets you share your MP3 music library with or without passords Apr 11 18:38:13 and without DRMs, at least not for the songs you didn't buy on iTunes Apr 11 18:38:27 er, at least for the songs you didn't buy on iTunes Apr 11 18:38:54 romainguy__: Right, but that's only because iTunes doesn't facilitate the sharing of the music. Apr 11 18:39:01 iTunes merely doesn't prevent it. Apr 11 18:39:28 My system, conversely, actively promotes the distribution of media over a public network. Apr 11 18:39:28 you'd be providing a server that streams music. It's password protected. That covers any liability on your part Apr 11 18:39:51 Unless, I suppose, you "actively promote distribution..." Apr 11 18:39:58 B0jangles: I wouldn't be so quick to presume that. The RIAA in particular operates on questionably legal ground. Apr 11 18:40:09 So go to court Apr 11 18:40:12 That's what laws are for Apr 11 18:40:16 There is no need for me to go to court :) Apr 11 18:40:24 I mean if they sue you Apr 11 18:40:41 The current precedent in the US is that software developers work is protected under the 1st ammendment freedom of speech. Apr 11 18:40:59 amendment* Apr 11 18:41:11 So, I am blameless under the assumption that I do not use my own app ;) Apr 11 18:41:12 I saw a news story the other day that Bush violated copyright law because he said he has Beatles albums on his iPod Apr 11 18:41:26 And since the Beatles aren't distributed on iTunes, he must have copied the CD Apr 11 18:41:31 Which the RIAA claims is illegal Apr 11 18:41:35 But it's not Apr 11 18:41:37 But like I said, in order for the app to become mainstream, I suspect the RIAA will cry about it. Apr 11 18:41:43 It doesn't matter if the RIAA says it's illegal Apr 11 18:41:47 Because they don't make the laws Apr 11 18:41:53 ...don't they? Apr 11 18:41:59 They might write them Apr 11 18:42:01 ..... Apr 11 18:42:03 But they don't make them Apr 11 18:42:06 Or enforce them Apr 11 18:42:18 i am building the site eliminatedrm.org Apr 11 18:42:26 i think its garbage Apr 11 18:42:31 The law making process in the US does not hide the fact that companies are permitted to persuade law makers through heavy lobbying. Apr 11 18:42:49 i used to copy tapes all the time..... they couldn't stop me, so why can they mess with my computer? Apr 11 18:42:55 Doesn't change the existing copyright law that includes fair use Apr 11 18:43:14 because companies like Apple agreed to use DRM Apr 11 18:43:20 the RIAA, for example, heavily lobbied for the DMCA and it was ultimately passed. One could argue that if they had not been so noisy, no such law would have been necessary or carry sufficient weight to pass. Apr 11 18:43:23 in order to be able to sell music Apr 11 18:43:31 jasta: absolutely Apr 11 18:43:41 The DMCA bans the removal of DRM Apr 11 18:43:46 But it doesn't require it to be added Apr 11 18:43:47 So, don't be so quick to presume this industry is powerless to make legal change. Apr 11 18:44:06 I never said they were powerless, but I'm talking about current law Apr 11 18:44:07 jasta: And don't be so quick to assume they will care about your app :) Apr 11 18:44:18 B0jangles: I was merely using an example to disprove your assumption that lawmakers and companies are well separated :) Apr 11 18:44:27 I never made that assumption Apr 11 18:44:29 romainguy__: I said that if it was to become mainstream... Apr 11 18:44:46 jasta: dont worry about it now Apr 11 18:44:55 Like I said, I won't worry about it now or ever. Apr 11 18:44:58 do whatever makes the user happy Apr 11 18:45:07 I, as the developer, am not required to care :) Apr 11 18:45:12 right Apr 11 18:45:22 that's what I'm saying Apr 11 18:45:31 All I said that sparked this debate was that I wouldn't necessarily resist such a feature being introduced to my application. Apr 11 18:45:36 But that I personally will not do it :) Apr 11 18:45:50 do it Apr 11 18:45:58 introduce controversial features Apr 11 18:46:04 will make your app popular Apr 11 18:46:11 The only reason you'd need to add DRM, or allow it to be added, is if you want them to do something, and enter into a contract that says you'll add DRM Apr 11 18:46:22 Like if you want to sell music Apr 11 18:46:35 If you're relying on the consumer to supply their own music, you don't need to worry about it Apr 11 18:46:44 I'm already planning to scrape lyris in the server hehe. That is sooooo illegal ;) Apr 11 18:47:00 that's the spirit ;) Apr 11 18:47:50 That the distribution of lyrics are enforced using copyright law is the most absurd thing that this industry does. Apr 11 18:47:56 More absurd than these insane lawsuits Apr 11 18:48:08 yeah, supplying lyrics is illegal Apr 11 18:48:18 The lyrics are not a stream of revenue for anyone, ever! Why protect their distribution!? Apr 11 18:48:46 Not true. Publishers sell the sheet music Apr 11 18:49:00 They don't want you to be able to download the chords/lyrics from the internet Apr 11 18:49:11 I understand that they are covered under copyright, and I appreciate the power that grants the author. I just don't see the point in enforcing that power on lyrics databases and sites just trying to value add the music. Apr 11 18:49:14 It is absurd, of course, any halfway decent musician can figure it out themselves Apr 11 18:49:44 The point of enforcing it is to make money from selling the lyrics in music stores Apr 11 18:49:52 B0jangles: Even protecting the chords would make more sense than the lyrics. Plus, they don't do a good job enforcing the lyrics themselves, only the robust digital distribution of them. Apr 11 18:50:18 Not really. Many songs use the same chords. But yes, they do try to protect the chords. At least he lyrics are usually unique Apr 11 18:50:19 It's so stupid. I could find lyrics for just about any song I want with a quick Google search. But try to design a commercial application that builds a respectable web service to provide them and you're gonna get shot down. Apr 11 18:50:32 They try to shut down the free sites too Apr 11 18:50:54 It's really absurd. I have no idea what they think they're accomplishing. Apr 11 18:51:18 keeping control, that's all Apr 11 18:51:23 I literally can not imagine a single rgument that would support their behaviour. Apr 11 18:51:27 argument* Apr 11 18:51:39 jasta: they're making millions of dollars a year selling sheet music Apr 11 18:51:44 I'm not saying I agree with it Apr 11 18:51:49 But it seems clear what their motive is Apr 11 18:51:58 B0jangles: But what does that have to do with the distribution of the lyrics? Apr 11 18:52:13 The sheet music is more than the words to the song. Much more. Apr 11 18:52:22 It's one part of it, though Apr 11 18:52:26 a big part Apr 11 18:52:35 How is it a big part? It seems actually like it is the smallest part. Apr 11 18:52:40 how so? Apr 11 18:52:48 I mean, you have the chords Apr 11 18:52:49 you have the lyrics Apr 11 18:52:55 and you have a shitty transcription Apr 11 18:52:57 in most sheet music Apr 11 18:53:11 The two most important parts are the chords and the lyrics Apr 11 18:53:11 Because the sheet music is purchased for the marrying the lyrics and chords together. Apr 11 18:53:15 And often the chords are wrong Apr 11 18:53:23 So the lyrics are the best part Apr 11 18:53:29 No, the marriage is the best part. Apr 11 18:53:40 It's already married in the recording Apr 11 18:54:07 there's nothing the sheet music that isn't in the recording Apr 11 18:54:13 No it isn't. Only a trained ear would know to detect how the lyrics fit with the music. Apr 11 18:54:47 I'm not sure where you got that idea from Apr 11 18:54:57 I do, by the way, have a masters degree in music Apr 11 18:55:39 B0jangles: Well then humor me. Why would a musician buy sheet music? Apr 11 18:55:44 What benefit does that provide? Apr 11 18:55:51 two reasons: Apr 11 18:55:57 if they suck, because they can't do any better Apr 11 18:56:03 if they know what they're doing: to save time Apr 11 18:56:18 To save time doing *what*, though. What information are they hoping to reveal? Apr 11 18:56:29 Transcribing a song can take a lot of time Apr 11 18:56:32 First you write the lyrics Apr 11 18:56:35 Then you figure out the chords Apr 11 18:56:39 Then you write out the melody or whatever Apr 11 18:56:50 Sheet music is often a cheat-sheet Apr 11 18:57:09 Right, but what I'm trying to get you to admit is that they are hoping to save time fitting the chords, melody, and lyrics together meaningfully. Apr 11 18:57:14 am I strange in the fact that I have an easier time listening to the recording to figure out how the chords and lyrics go together than reading any type of notation? Apr 11 18:57:18 Because fitting them together takes time, not knowing what they are. Apr 11 18:57:27 jasta: "Why would a musician buy sheet music?" is that sarcastic? Apr 11 18:57:33 Anyone can hear the words being spoken, or listen to the chords being played. But it's time consuming to marry all that together. Apr 11 18:57:40 acsia: No, it was an exploratory question Apr 11 18:57:52 jasta: You're wrong at about that Apr 11 18:58:05 Once you have the lyrics written down Apr 11 18:58:07 B0jangles: I, for example, could not determine how the lyrics fit the music. I simply do not know how. Apr 11 18:58:07 And the chords Apr 11 18:58:13 It's easy to put them together Apr 11 18:58:23 But I can easily determine the lyrics to a song, assuming the vocalist is talente d;) Apr 11 18:58:31 And so can anyone. Apr 11 18:58:37 It takes no special talent to hear the words being spoken. Apr 11 18:58:48 Yeah, but you're not the target audience Apr 11 18:58:58 That's my point: there are two "markets" here. Apr 11 18:59:08 What, people who do and who don't buy sheet music? Apr 11 18:59:12 I think I would focus on the former Apr 11 18:59:13 One which will never buy music, but wants to know if the vocalist is saying "feet" or "meet" :) Apr 11 18:59:27 The other, which is hoping to reproduce or explore the music more deeply. Apr 11 18:59:39 err never buy the sheet music, :) Apr 11 18:59:58 Most people who buy sheet music are the untalented, musicians learning to play a few songs Apr 11 19:00:06 Pros tend to buy fake books Apr 11 19:00:09 many of which are illegal Apr 11 19:00:16 the sheet music has value Apr 11 19:00:16 and distributed under the counter at music shops Apr 11 19:00:19 There is no motivation to enforce the copyright on the former group. Apr 11 19:00:21 just like a screenplay does Apr 11 19:00:32 None at all. Apr 11 19:00:44 And the argument is irrelevant to the sheet music, which contains far more information. Apr 11 19:00:51 And is used for an entirely different purpose. Apr 11 19:01:16 people in creative business value those things Apr 11 19:01:16 That's like saying you should be able to copy the extras from a DVD because the DVD contains more information Apr 11 19:01:31 And the primary purpose of the DVD is the movie Apr 11 19:01:33 not the extras Apr 11 19:01:43 So, hey, I should be able to sell extras right? Apr 11 19:02:42 B0jangles: That is an unfair argument since you selected only a part of my argument to attack. The lyrics information is not a source of revenue. Apr 11 19:02:54 The lyrics are part of a source of revenue Apr 11 19:03:18 Not in the way that your DVD analogy would suppose. Apr 11 19:03:46 Surely, you'd admit that the lyrics are at least as important to sheet music as a blooper reel is to a movie? Apr 11 19:03:55 lyrics are important. Apr 11 19:04:36 brb Apr 11 19:04:47 Sigh. Apr 11 19:04:58 This is an evil industry. Apr 11 19:05:11 evil, yes. Apr 11 19:06:44 B0jangles: I cannot refute that, but I can still reassert my argument: releasing simply the lyrics unmarried to the music would not damage their current business model in any way. Apr 11 19:07:57 So the only argument in favor of their decision would be the impact it might have on future business models should they convince some poor sap to pay for the right to distribute lyrics. Apr 11 19:08:43 I agree that the record companies are evil Apr 11 19:08:51 But somebody wrote those lyrics Apr 11 19:08:59 And it's not always the recording artist Apr 11 19:09:19 The person who wrote the lyrics deserves to be paid when his/her lyrics are distributed Apr 11 19:09:29 The artist wouldn't own the copyright anyway. Apr 11 19:09:39 They frequently get royalties though Apr 11 19:09:43 So that argument is just backward. Apr 11 19:09:48 Not true Apr 11 19:09:53 Some artists own their copyrights Apr 11 19:10:00 And the rest get royalties Apr 11 19:10:00 Not most under the umbrella of the RIAA. Apr 11 19:10:21 which is the majority of music distributed in the world, so :) Apr 11 19:10:46 At any rate, the RIAA will be dead before someone pays them for this right :) Apr 11 19:14:09 how to change the blue border in autocompletetextview? Apr 11 19:14:38 You mean the background graphics Apr 11 19:14:39 ? Apr 11 19:15:24 the blue border.. Apr 11 19:15:40 the drop down is also blue Apr 11 19:15:58 I think it's a png in the jar, isn't it? Apr 11 19:16:13 i'm looking for an attribute that you can set Apr 11 19:16:50 I haven't tried it specifically with autocompletetextview, but my guess is that you have to supply your own images using a different color Apr 11 19:17:35 ok Apr 11 19:18:14 That's the way other controls work Apr 11 19:18:27 muthu: the autocompletetextview has the correct style in the next sdk Apr 11 19:22:10 ok.. now everything is blue Apr 11 19:22:17 and it looks odd Apr 11 19:23:15 romain: thx, i'll fix it for phase2 ;) Apr 11 19:24:14 muthu: if you just copied the images out of the jar, you have to re-add the border Apr 11 19:25:07 BO: i'm trying to use the one from sdk Apr 11 19:25:57 The image from the SDK? Apr 11 19:26:04 i.e. from Android.jar? Apr 11 19:30:09 BO: i'm not copying anything Apr 11 19:30:29 oh Apr 11 19:30:34 Apr 11 19:30:45 you can just give the autocompletetextview the same background as edit text Apr 11 19:30:49 that's the style it has now Apr 11 19:32:16 ok Apr 11 19:32:44 gello Apr 11 19:32:48 h Apr 11 19:33:16 gello to you Apr 11 19:33:42 zello Apr 11 19:34:10 will this channel be dead after apr 14? Apr 11 19:36:34 as a subjective question, what the advantages of developing for android over iphone? I know some java, but have been trying to learn obj-c (with slow progress). just trying to figure out which is better fit for me, and am curious. Apr 11 19:37:12 android is better for you. Apr 11 19:37:16 :) Apr 11 19:37:27 really :) Apr 11 19:37:31 android will be open source Apr 11 19:37:39 android is way better than the iphone Apr 11 19:37:44 the iphone is overrated Apr 11 19:37:56 I believe that iphone takes 80% of your revenue Apr 11 19:38:10 with their quick install type of thing Apr 11 19:38:20 they do not ;-) Apr 11 19:38:20 and doesn't let you touch half of the phone's abilities Apr 11 19:39:30 you have to pay to have your app listed on iTunes Apr 11 19:39:44 but they don't take 80% Apr 11 19:40:12 and it can only be listed on iTunes Apr 11 19:40:23 you can't have a download link on your website Apr 11 19:40:25 that's true Apr 11 19:40:50 well you can put an iTunes link on tor site Apr 11 19:40:58 how is the sdk for it? Apr 11 19:40:58 your Apr 11 19:41:16 no idea Apr 11 19:41:19 haven't bothered with it since its a waste of time Apr 11 19:52:18 any one familiar with the Not supported in System Context exception? Apr 11 19:57:36 no idea Apr 11 19:58:14 I am looking for something to rotate/flip a Bitmap, but found nothing Apr 11 19:58:41 I found a method in Canvas class to rotate a canvas, which should rotate the bitmaps painted on it Apr 11 19:58:59 but I want to rotate/flip the bitmap before drawing it Apr 11 19:59:10 dunno if it is possible though Apr 11 20:00:41 you'll have to paint it flipped in another bitmap to do this Apr 11 20:01:44 I see... Apr 11 20:02:08 thank you romainguy Apr 11 20:02:14 when binding a service to an Activity you have to use the RemoteService if it runs in another thread? Apr 11 20:03:41 I wonder if there's a way to share or pool service connections through a process (so multiple activities can efficiently connect to it) Apr 11 20:17:28 how is using eclispe for the developement? Apr 11 20:17:39 good Apr 11 20:18:30 eclipse pissed me off Apr 11 20:20:45 I don't mind it ... seems like any other fairly complex IDE Apr 11 20:28:35 yeah, except the copy and paste is intermittent and the code completion crashes the app if it's been up for a few days Apr 11 20:29:26 and everytime it imports an interface it does: Package.Package.Foo$Bar Apr 11 20:31:48 I always wonder when people write "fubar" as "foobar" if they realize that fubar is an acronym Apr 11 20:32:22 Foo and Bar separately are pretty common the coding world Apr 11 20:32:33 I know they are Apr 11 20:32:37 Still makes me wonder Apr 11 20:32:48 Like is it one huge misconception? Apr 11 20:32:56 That nobody knows that it actually stands for something... Apr 11 20:33:07 unless you like full metal jacket Apr 11 20:33:54 "Holy dog shit. Texas? Only steers and queers come from Texas, Private Cowboy. And you don't look much like a steer to me so that kinda narrows it down." Apr 11 20:35:28 eclipse pisses me off too Apr 11 20:38:20 fubar is a perfect description of eclipse Apr 11 20:40:08 Huh, Wikipedia makes the argument that "foobar" and "fubar" are actually unrelated, and that "foobar" may even predate "fubar" Apr 11 20:40:12 http://en.wikipedia.org/wiki/Foobar Apr 11 20:40:18 http://en.wikipedia.org/wiki/FUBAR Apr 11 20:40:21 live and learn, I guess Apr 11 20:40:28 I always just assumed it was a mispelling Apr 11 20:47:14 i use wikipedia for everything Apr 11 20:47:31 that is my one stop reference Apr 11 20:51:10 wikipedia is great Apr 11 20:53:27 wikipedia's only as good as your critical thinking skills ;) Apr 11 20:54:05 true. if something seems shady, you can just check out the discussion section, history, references, etc.. Apr 11 20:54:35 for example, look at the entry on Android. Apr 11 20:55:04 the development section especially is very bad ;) Apr 11 20:55:46 fix it then Apr 11 20:55:54 I don't care to :) Apr 11 20:55:56 wikipedia is awesome Apr 11 20:56:34 learning to not accept everything 100% is arguably even better than blindly believing it "because it's in an encyclopedia" Apr 11 20:56:41 and most of the stuff is pretty good Apr 11 20:57:15 I agree Apr 11 20:58:48 Yeah, I like it too :) Apr 11 21:00:01 if you need a quick read up on early anything wikipedia is the way to go Apr 11 21:00:46 and regarding its accuracy, BBC compared the oxford encyclopedia and wikipedia and on science subjects, wikipedia was more accurate with less errors Apr 11 21:01:14 that's kind of scary Apr 11 21:01:16 no i think you're thinking about the study in nature magazine Apr 11 21:01:25 which is to be expected. the internet unfairly represents the scope of human interest, being that it is populated disproportionately by nerds ;) Apr 11 21:01:27 issues are more on contemporary political issues Apr 11 21:01:34 it claimed that wikipedia and eb have relativly the same quality when it comes to science articles Apr 11 21:02:08 and then eb got pissed off and called the study bogus Apr 11 21:02:30 it begs the question thought if we commonly accept the meaning of a word because of the medium, should the word be redefined Apr 11 21:02:32 but then nature posted a point by point rebuttal to all of eb's points Apr 11 21:03:35 there is been a lot of studies, I just remember vaguely reading it on BBC; it could be that bbc did its own look up about it Apr 11 21:16:40 romainguy__: is findViewById O(n)? Apr 11 21:17:32 jasta, probably depends on dax Apr 11 21:17:37 dax? Apr 11 21:17:47 since it's an integer lookup in the virtual machine, isn't it? Apr 11 21:18:24 Well, I'm specifically asking if it's a search or a lookup. It would be possible to build up a binary tree or something of all the children ids so that searching is faster. Apr 11 21:18:41 I am copying an array of pixels, exactly in the same order, but my Bitmap changes after that, it is not the same, as I expected Apr 11 21:19:01 there is a thread about this Apr 11 21:19:02 http://groups.google.com/group/android-developers/browse_thread/thread/aed2d4c5bfafe978/7a96f2002946f6d5?lnk=gst&q=setPixels#7a96f2002946f6d5 Apr 11 21:19:30 I dont what I should consider more, did somebody experienced something similar? Apr 11 21:19:34 jasta: it is O(n) Apr 11 21:20:14 hmm, ok. i may break this down then Apr 11 21:20:28 why? Apr 11 21:20:30 controls = findView(...); prev = controls.findView(...); etc. Apr 11 21:20:43 unless you can this in critical code paths, that's fast enough Apr 11 21:20:53 romainguy__: Why not? It's an extra line of code Apr 11 21:21:01 it's just not worth it Apr 11 21:21:24 I don't see any reason to be wasteful when it is simple to avoid. Apr 11 21:23:04 romainguy__: why should I get a different Bitmap if I make a raw copy of it? could you give me a clue? Apr 11 21:23:37 dpino: because the bitmap is probably immutable Apr 11 21:33:45 romainguy: do you know if there is any issues with onItemLongClickListener against items in a gallery? Apr 11 21:37:50 aloha Apr 11 21:39:30 E/AndroidRuntime( 733): java.lang.NoSuchMethodError: w Apr 11 21:39:30 E/AndroidRuntime( 733): at com.google.android.browser.BrowserProvider$DatabaseHelper.onUpgrade(BrowserProvider.java:75) Apr 11 21:39:33 E/AndroidRuntime( 733): at android.database.sqlite.SQLiteOpenHelper.openDatabase(SQLiteOpenHelper.java:59) Apr 11 21:39:40 romainguy__: any idea if this is a known issue? Apr 11 21:39:48 this happens when I try to open a browser Apr 11 21:39:59 it is not happening on my machine, but on that of a friend Apr 11 21:40:28 perhaps he nees to do a full clean of the emulator image? Apr 11 21:45:18 romainguy__: regarding to the bitmap, I made a mutable copy of the bitmap first, then copy again the pixels from the original source, and then chaging the reference of my Bitmap property to the new Bitmap Apr 11 21:45:23 got the same result Apr 11 21:45:31 the bitmaps are not the same Apr 11 21:45:40 how do you copy the pixels? Apr 11 21:46:18 http://pastebin.com/d3fa0a6b9 Apr 11 21:46:27 I use setPixel Apr 11 21:47:47 argh Apr 11 21:47:49 that's very very slow Apr 11 21:48:25 well, performance is not an issue now xD Apr 11 21:48:40 the point is that I dont get the same bitmap :) Apr 11 21:48:55 there's a bug with getpixels in m5 Apr 11 21:48:59 just create a canvas Apr 11 21:49:31 and then? Apr 11 21:49:36 romainguy__: How does onMeasure behave when the view has height=0, weight=1 and is a child of a linearlayout? will i get 1 onMeasure pass with heighSpec set to MeasureSpec.EXACTLY some size? Apr 11 21:49:39 then you draw the original bitmaps on it Apr 11 21:49:54 jasta: it depends Apr 11 21:50:01 but yes, that's what you should expect Apr 11 21:50:03 but I want to flip the pixels of the bitmap Apr 11 21:50:06 romainguy__: ok, thanks. Apr 11 21:50:15 dpino: then set the scale(1, -1) on your Canvas Apr 11 21:50:23 ah OK Apr 11 21:50:26 thank you Apr 11 22:00:57 romainguy__: you're absolutely right, writing my own ReflectionLayout was the right way to go :) Apr 11 22:01:04 :) Apr 11 22:01:15 the code is much more sensible this way ;) Apr 11 22:01:34 usually, and especially on a mobile platform, writing a custom layout can simplify a lot of things Apr 11 22:02:03 Yeah, I'm considering going back through my project when optimization is a little bit more appropriate and redoing a few of my layouts using custom layouts Apr 11 22:03:01 For efficiency and reusability Apr 11 22:03:43 it depends on where you use these layouts Apr 11 22:03:47 in a scrolling list, that's a great idea Apr 11 22:03:50 otherwise, don't both Apr 11 22:03:51 I also would like to explore styles more, I don't use them at all right now :( Apr 11 22:03:52 bother Apr 11 22:04:10 yeah, actually my scrolling lists use some of the more complex layouts in my entire program hehe Apr 11 22:04:46 that said we cache the list items in bitmaps for you Apr 11 22:04:51 so the gain would not be that big Apr 11 22:05:13 well, actually it would in M5 under my usage, but i believe you have improved that in a later release Apr 11 22:05:28 yes Apr 11 22:05:32 Remember, I use multiple view types, and so frequently am unable to recycle views. Apr 11 22:05:44 that's fixed Apr 11 22:09:49 yeah Apr 11 23:04:13 romainguy__: Hey, I just want to say thanks a bunch for all the help you've given so far. You've been a valuable resource for a lot folks here and on the groups. Apr 11 23:04:25 You're very welcome Apr 11 23:04:42 I'm disappointed you won't be at Google I/O, I was looking forward to meeting you :) Apr 11 23:07:18 I'm disappointed I cannot go Apr 11 23:07:31 but it could be worse than vacation in France Apr 11 23:07:31 I agree with jasta, thank you romain ;-) Apr 11 23:44:53 have you ever seen an error from map view "can't zoom to 6" Apr 11 23:44:56 ? Apr 11 23:50:32 Does anyone know if there is a way to rename a file in android? File.renameTo() doesn't seem to be supported Apr 11 23:51:06 I had a similar issue with File.delete() and discovered you had to use the special android deleteFile() method Apr 11 23:56:14 you probably have to copy to rename Apr 11 23:59:39 whats a good 3g phone out there with all the bells and whistles Apr 11 23:59:40 raidfive: are you doing so within a ContentProvider? Apr 12 00:00:08 romainguy__: there seems to be a difference between the way an ImageView would scale this image and canvas.drawBitmap does. Apr 12 00:00:09 romainguy__: Does that make sense to you? Apr 12 00:00:24 depends on what scale type you use Apr 12 00:01:43 i mean, in quality Apr 12 00:02:26 ah, depends on the size of the image and the scaling hints Apr 12 00:02:32 ImageView seems to smooth, canvas.drawBitmap doesn't Apr 12 00:02:46 acsia, no I'm not dealing with a ContentProvider Apr 12 00:03:33 raidfive are you in your app dir? Apr 12 00:03:55 jasta: that would be the scaling method? Apr 12 00:03:56 yea Apr 12 00:06:19 I experienced some problem but within the content provider methods Apr 12 00:07:15 it seems like some methods for files just aren't supported and android makes you use their methods (i.e. deleteFile()) Apr 12 00:08:56 http://code.google.com/android/reference/org/w3c/dom/Document.html#getElementsByTagName(java.lang.String) says that The name of the tag to match on. The special value "*" matches all tags. but for some reason its not on android and the same code worked in a java application does anyone know what shall i do :/ Apr 12 00:15:26 I am so brain dead that the last 2 days, I have been writing if (!(cursor==null)) Apr 12 00:15:39 looking at it and thinking, hum that looks strange Apr 12 00:15:39 hahaha Apr 12 00:15:57 just realizing it now going through my code Apr 12 00:16:09 Ix-Xitan, i gave up with getelementsbytagname, just used getelmentbyid Apr 12 00:18:41 ok Apr 12 00:19:36 (this assumes you have id="foo" on all your tags.. Apr 12 00:19:47 or have the ability to change it Apr 12 00:20:00 but #getElementsByTagName does actually work Apr 12 00:20:07 just didn't do what i wanted Apr 12 00:20:30 you need to do #getElementsByTagName().item(i) Apr 12 00:20:35 to get the Element Apr 12 00:20:58 if you want to get the text of the element you need to do something like Element.getFirstChild().getNodeValue() Apr 12 00:21:24 all i wanted is to count all tags :/ Apr 12 00:21:37 o Apr 12 00:21:41 thats easy.. Apr 12 00:21:45 tell me Apr 12 00:22:24 this works on a normal java application NodeList list = doc.getElementsByTagName("*"); but not on android :/ Apr 12 00:22:43 doc.getElementsByTagName("foo").getLength(); Apr 12 00:23:19 i see i didn't use wildcards Apr 12 00:23:38 anf foo is the outer tag ? Apr 12 00:23:46 and* Apr 12 00:23:49 http://code.google.com/android/reference/org/w3c/dom/Document.html#getElementsByTagName(java.lang.String) Apr 12 00:23:54 says it can do it Apr 12 00:24:04 i know but doesnt work Apr 12 00:24:08 Ix-Xitan, no that will match any tag called foo in any position Apr 12 00:24:34 the problem is that i dont know the tags it should generic Apr 12 00:24:45 funny this android iis full of bugs Apr 12 00:25:21 should it not be Apr 12 00:25:41 acsia hardware is expected to be bug free so is software ;P Apr 12 00:25:41 funny this android; IIS full of bugs Apr 12 00:25:43 Ix-Xitan, this is just w3c dom Apr 12 00:26:02 I'm still a bit confused why canvas.drawBitmap looks so pixelated by contrast. Apr 12 00:26:22 jasta, its probably using a fast resizing algorithm Apr 12 00:26:34 well, that sucks :\ Apr 12 00:26:34 Ix-Xitan: :) Apr 12 00:26:56 have you try to set the anti alias or dither? Apr 12 00:27:06 perhaps I should draw with a Drawable then :\ Apr 12 00:27:13 maybe Apr 12 00:27:31 why not an imageview? Apr 12 00:28:18 Romain made me think it would be simpler to do the drawing myself :) Apr 12 00:28:49 jasta: what are you trying to do? I played with canvas all morning Apr 12 00:28:50 since i have to muck around with the image (flipping and painting it) Apr 12 00:30:00 acsia: Basically, I have used a custom layout to takeover drawing and want to have an image "reflected" Apr 12 00:30:14 the layout both draws the original, and flips/reflects it. Apr 12 00:30:20 android.graphics.drawable.shapes.PathShape ? Apr 12 00:30:34 hmm Apr 12 00:30:40 I would use a gradiant and XOR it against your original, have you tryed that? Apr 12 00:30:43 guess a bitmap isnt a shape Apr 12 00:30:56 acsia: Well, the reflection works fine Apr 12 00:31:07 but now that I've taken over drawing using canvas.drawBitmap, it looks like crap :) Apr 12 00:31:11 the scaling looks very bad Apr 12 00:31:26 aha ok, Apr 12 00:31:28 i mean, it looked bad before, but now it looks terrible ;) Apr 12 00:31:30 jasta: what paint are you using? Apr 12 00:31:46 right now i'm using a null paint, but will eventually be using something fancier to accomplisht he reflection Apr 12 00:31:57 i guess i didn't think it might be the paint :) Apr 12 00:32:05 using Paint(2) helps a lot with drawBitmap Apr 12 00:32:15 have you tried something like Paint.DITHER_FLAG or Paint.ANTI_ALIAS Apr 12 00:32:24 that should help a lot Apr 12 00:32:27 thanks ;) Apr 12 00:32:30 that sounds right hehe Apr 12 00:32:42 lol Apr 12 00:32:46 :) Apr 12 00:33:02 Yeah, I'm using "new Paint(2)" for when I drawBitmap...can't remember what that is :) Apr 12 00:33:10 FILTER_BITMAP_FLAG Apr 12 00:33:37 probably should have used the constant...just was messing around with the different settings one day and never got back to it Apr 12 00:33:37 I would just try with different flags and see which one is best Apr 12 00:34:02 yeah thanks, i didnt even think the paint would do this :) Apr 12 00:34:11 the Paint does everything Apr 12 00:34:36 acsia: I would use a gradiant and XOR it against your original, have you tryed that? << no XOR, PorterDuff.DST_OUT Apr 12 00:35:24 thx for correcting ;) Apr 12 00:35:40 jasta: you reflecting some album art? Apr 12 00:35:52 yes Apr 12 00:36:11 yeah, I was doing that last week Apr 12 00:36:21 did you get it working nicely? Apr 12 00:36:34 yeah, wasn't bad Apr 12 00:36:52 reflect and then used a LinearGradient shader to fad Apr 12 00:37:48 ok...gotta go..family in town and wants to party Apr 12 00:38:19 yay, it works ;) Apr 12 00:40:45 hmm, my shader isn't working, what the hell Apr 12 00:45:43 romainguy__: I'm sorry, I'm stumped here. Why would the shader seem to affect nothing? Apr 12 00:46:22 what's your code? Apr 12 00:47:00 mReflect.setShader(new LinearGradient(0, 0, 0, vh, 0x66cccccc, 0x99000000, TileMode.CLAMP)); Apr 12 00:47:16 then: Apr 12 00:47:31 canvas.drawBitmap(mBitmap, mClip, mDim, mReflect); Apr 12 00:47:34 the color doesn't matter, only the alpha will be used Apr 12 00:47:43 and you are not setting the xfermode Apr 12 00:47:52 i am not using an Xfermode (thought maybe that was the problem) Apr 12 00:47:59 and your coordinates might just be wrong Apr 12 00:48:20 vh is the height of the controls view. i tried hardcoding like 50. Apr 12 00:48:41 well, would it matter that the canvas is translated when that bitmap is drawn? Apr 12 00:48:45 the code before canvas.drawBitmap is: Apr 12 00:48:50 canvas.save(); Apr 12 00:48:50 canvas.translate(0, mImageDim.height() + mReflectionDim.height()); Apr 12 00:48:51 canvas.scale(1.0f, -1.0f); Apr 12 00:49:24 now that i think about it, canvas.translate(r.bottom) would make sense, where r is the result of getDrawingRect() Apr 12 00:49:29 you would have to change the Y position of the shader Apr 12 00:49:34 oh ok Apr 12 00:51:49 is setXfermode necessary for this to work at all? Apr 12 00:53:40 if you want the real effect, yes Apr 12 00:53:50 but if you have a solid background you can fake it Apr 12 00:53:51 it seems when i use mReflect.setXfermode(new PorterDuff(PorterDuff.Mode.CLAMP)), the image draws black. Apr 12 00:53:58 er Apr 12 00:54:06 err, DST_OUT :) Apr 12 00:54:09 :) Apr 12 00:54:10 sorry was reading something else ;) Apr 12 00:54:22 well it definitely works, that's how fades are drawn in lists :) Apr 12 00:54:52 when i uncomment that setXfermode line, it draws correctly, but then the shader seems to have no effect. Apr 12 00:55:10 because you need the xfermode ^^ Apr 12 00:55:24 in order for the shader to do anything? Apr 12 00:55:32 it's probably just the Y coordinates that are wrong Apr 12 00:56:00 well, i tried hardcoding new LinearGradient(0, 0, 0, 1000, ... and it still doesnt work Apr 12 00:56:04 it draws pure black Apr 12 00:57:25 you can try with 0,0,0,10 and the TileMode.MIRROR Apr 12 00:57:30 you should see the shader Apr 12 00:58:02 well i don't ;) Apr 12 00:58:06 how can i make a round 'box' like is in the balloon of the Maps app? Apr 12 00:59:03 jasta: then comment out the xfermode, and use solid colors, like red and green Apr 12 00:59:09 and tweak your coordinates until you see it :) Apr 12 00:59:28 k Apr 12 01:00:17 still no shader effect. it draws the bitmap correctly (flipped and clipped), but nothing fancy with it. Apr 12 01:00:29 LinearGradient shader = Apr 12 01:00:29 new LinearGradient(0, 0, 0, 10, 0xffff0000, 0xff00ff00, Apr 12 01:00:29 TileMode.MIRROR); Apr 12 01:00:31 mReflect.setShader(shader); Apr 12 01:00:33 that's the code Apr 12 01:01:00 what's your drawBitmap call? Apr 12 01:01:03 that code is definitely being called. that paint is being used as: Apr 12 01:01:08 canvas.save(); Apr 12 01:01:08 canvas.translate(0, mImageDim.height() + mReflectionDim.height()); Apr 12 01:01:08 canvas.scale(1.0f, -1.0f); Apr 12 01:01:08 canvas.drawBitmap(mBitmap, mReflectionClip, mReflectionDim, Apr 12 01:01:08 mReflect); Apr 12 01:01:11 canvas.restore(); Apr 12 01:02:15 the whole layout is only 200 lines if you can stomach the rest of my sloppy misuse of the UI framework :) Apr 12 01:03:26 does it matter that setXfermode is being called int he constructor, but setShader is called from onLayout()? Apr 12 01:03:56 it shouldn't matter Apr 12 01:04:40 would you be willing to look if i send it to a pastebin? Apr 12 01:04:49 sure Apr 12 01:06:28 http://java.pastebin.ca/981794 Apr 12 01:06:43 it's really sloppy because i'm learning more than coding :) Apr 12 01:08:40 booo Apr 12 01:08:45 object allocation in the drawing code Apr 12 01:08:55 oh yeah, that i only did for debug :) Apr 12 01:08:58 :p Apr 12 01:09:22 that was when the images were drawing in the wrong place, i figured it might be because i wasnt honoring getDrawingRect Apr 12 01:09:25 but that turned out not to be true :) Apr 12 01:09:32 hell, there's logging in dispatchDraw too ;P Apr 12 01:10:53 all I can possibly see is a wrong Y coordinate for the shader Apr 12 01:11:03 but it's even using MIRROR now? Apr 12 01:12:08 i tried simplifying this code as well, using mReflect for the main bitmap drawable. Apr 12 01:12:12 which covers most of the screne Apr 12 01:12:15 it also draws black. Apr 12 01:15:59 this is so frustrating :( Apr 12 01:20:25 uhm Apr 12 01:22:35 dude, canvas.drawBitmap does not use the paint's shader. the documentation for shader says so. Apr 12 01:22:45 are you freaking kidding me? Apr 12 01:23:25 well that solves that mystery. fuck. Apr 12 01:24:00 i'll just apply the paint to the background of the child :\ Apr 12 01:26:00 ah well Apr 12 01:26:01 oops :) Apr 12 01:26:20 hehe, yeah thanks :) Apr 12 01:26:23 i'm going home now ;) Apr 12 01:26:29 well you could probably do that with a savelayer then Apr 12 01:26:42 if only I could find that code where I do the reflection on a bitmap Apr 12 01:27:43 if you find it pm me. i'm leaving now Apr 12 01:41:12 ooh I remembered how it's done Apr 12 01:48:42 hey, i'm having problems with my R.java in eclipse Apr 12 01:48:44 any tips? Apr 12 01:48:49 i changed my main.xml Apr 12 01:49:02 it has a little x by it Apr 12 01:49:29 what's the error say rhett Apr 12 01:51:45 oh i tried to put a "-" in my graphics names Apr 12 01:51:49 thanks Apr 12 02:09:42 anybody know of a good tutorial on binding services? Apr 12 02:16:30 there is one on helloandroid Apr 12 02:17:32 anybody know of a good tutorial on binding services? Apr 12 02:17:56 thanks Apr 12 02:18:00 michaelnovakjr http://www.helloandroid.com/node/140 Apr 12 02:18:11 i am getting an error and i want to compare my code Apr 12 02:18:18 sorry my copy/past fails sometime with ff Apr 12 02:18:28 what error do you get? Apr 12 02:19:04 Not supported in system context exception Apr 12 02:20:34 are you trying to pass some kind of context dependent value like R.*? Apr 12 02:20:50 i am not using the aidl Apr 12 02:20:55 I am not very familiar with service thought Apr 12 02:20:59 which i think i am going to now Apr 12 02:21:16 the tutorial looks easier than my approach Apr 12 02:24:31 do you put the aidl folder in the package or just the src folder? Apr 12 02:28:12 hmm, i am having trouble wrapping a TextView into 2 lines Apr 12 02:28:19 shouldn't android:lines = 2 Apr 12 02:28:20 do it? Apr 12 02:28:37 or does layout_width need to be changed? Apr 12 02:28:44 what is it set to now? Apr 12 02:28:50 wrap_content Apr 12 02:28:58 that should be ok Apr 12 02:29:15 android:singleLine="false" Apr 12 02:29:15 android:lines="2" Apr 12 02:29:16 android:minLines="2" Apr 12 02:29:18 also have those Apr 12 02:29:20 what do you have for height Apr 12 02:29:50 wrap_content Apr 12 02:30:07 hmm, and it doesn't wrap to a second line? Apr 12 02:30:13 nope Apr 12 02:30:20 i would get rid of the android:lines Apr 12 02:30:32 k let me try Apr 12 02:30:33 i have a TextView that wraps content..... this is what i have. .... Apr 12 02:31:07 style="@style/HeadlineText" Apr 12 02:31:08 android:layout_width="wrap_content" Apr 12 02:31:08 android:padding="5px" Apr 12 02:31:08 android:layout_below="@id/detailTitle" Apr 12 02:31:09 android:layout_height="wrap_content"/> Apr 12 02:33:35 hmm, not working Apr 12 02:33:48 i am specifying a texdtSize and textAlign and textSTyle Apr 12 02:33:50 is there a parent? Apr 12 02:35:47 are you using a LinearLayout or something of the sort as the parent? Apr 12 02:35:56 the parent is a custom TransparentPanel Apr 12 02:36:06 which extends a LinearLayout Apr 12 02:36:12 any attributes set for it? Apr 12 02:36:24 android:layout_width="fill_parent" Apr 12 02:36:24 android:layout_height="wrap_content" Apr 12 02:36:26 and some padding Apr 12 02:37:42 i got 2 buttons onthe left and right of it Apr 12 02:37:46 and the right one is being squished Apr 12 02:37:52 i geuss i should constrain their sizes Apr 12 02:38:01 min/max height/widths Apr 12 02:38:16 and your TextView is below all of that? Apr 12 02:38:30 [button] [text view] [button] Apr 12 02:38:32 it's in the middle Apr 12 02:38:34 ah Apr 12 02:38:39 the buttons are big so that 2 lines of text can fit Apr 12 02:38:46 i am not sure if that works? Apr 12 02:38:49 i could be wrong Apr 12 02:39:33 i would try and set the width to something fixed Apr 12 02:41:45 LOL Apr 12 02:41:51 it doesn't obey minWidth Apr 12 02:42:15 does it work now? Apr 12 02:42:21 nope :( Apr 12 02:42:27 going to try setting width for text view Apr 12 02:42:31 try setting android:width Apr 12 02:42:41 or whatever the proper syntax is Apr 12 02:42:45 did that, they dont work Apr 12 02:42:58 err Apr 12 02:43:02 layout_width is what i should have tried Apr 12 02:43:04 romainguy__ is a ui dude! Apr 12 02:43:57 should android display chinese, russian etc correctly? Apr 12 02:44:28 it does display chinese correctly Apr 12 02:44:42 hmmmm Apr 12 02:44:48 bugger. Apr 12 02:46:11 * duey stabs php utf8 support Apr 12 02:49:07 and to center vertically i would use android:gravity="center_vertical" ? Apr 12 02:52:46 how do I make sure one text view is over another view? Apr 12 02:53:04 f00f- yes Apr 12 02:53:05 is there some sort of z-axis attribute? I don't see it Apr 12 02:58:05 trying to install the android plugin but I can't figure out that full like for the "org.eclipse.wst.sse.ui" part that needs to be installed too **** ENDING LOGGING AT Sat Apr 12 02:59:56 2008