**** BEGIN LOGGING AT Fri Jul 10 02:59:57 2009 Jul 10 03:18:14 doubleminus: isFocused()... Jul 10 03:18:34 found hasFocus() Jul 10 03:18:37 ty though Jul 10 03:18:48 hasFocus() is different Jul 10 03:33:16 is there a way for a TextView to get EditText's default context menu without me having to re-implement it? I'd like to have "long-press -> copy" functionality Jul 10 03:56:10 Hi all! Has someone seen available source code or any reference on a project that uses Web requests and allows users to rate and comment retrieved content displayed on a list, such as the one that "Android Market" app or "Funny jokes" app use when you browse or search for specific content. Jul 10 08:16:38 can animations be used in an AppWidget ? Jul 10 08:33:24 can anyone help me with my hello world application? I am getting some errors and I can't seem to add the import lines specified in the tutorial. Jul 10 08:34:16 http://pastebin.com/m30f0f113 Jul 10 08:34:40 when i try to add these it just erases them. import android.os.Bundle; import android.widget.TextView; Jul 10 09:11:51 hi all, could anyone help me to remove a row from the listview (when a user clicks the remove button on the row) Jul 10 09:12:10 I dont know where to look for this Jul 10 09:36:47 Haraken: there is a HelloWorld app as examples in the eclipse plugin (or the sdk, dont know for sure) Jul 10 09:39:12 Hey everyone, is anyone free to just chat about splash screens and activities? Jul 10 09:40:10 Matt__: just ask your question here. Jul 10 09:41:29 Basically I want a splash screen to display while I find GPS location and performing some networking tasks, then after that I want it to change to a view with maps etc, is it best to have the splash screen and the mapView in seperate activities or should I just call setContentView? Jul 10 09:44:12 what about showing the "loading..." popup other apps use? Jul 10 09:45:08 Only reason was because it had some website info etc and thought it just looked nice, basically just a design choice, which I use the ProgressBar animation on the splash screen anyway Jul 10 09:46:47 i would use a seperate activity Jul 10 09:50:47 Ok thats kool, then my next question would be, do you have any suggestion about sharing data across? because basically from the networking thread I create a list of Objects that I would need in the second Activity Jul 10 09:51:23 I know intent has message but that seems a particularly long winded way for performing this soft of task Jul 10 10:15:30 ffs. is there any documentation about the sms table? or content providers? which are there, what their tables loook like Jul 10 10:23:30 anyone: does anyone how to remove a row from the listview ? Jul 10 11:04:38 can anyone help me with - pastebin.com/d6095b88e - lines 15 and 17, I think the contexts are a bit wrong. (still trying to understand, but getting there) - any help would be cool. Jul 10 11:04:53 http://pastebin.com/d6095b88e Jul 10 11:26:37 anyone here Jul 10 11:26:39 ? Jul 10 11:41:16 general java question, is there a benefit to declaring something like private List = new ArrayList(); rather than private ArrayList = new ArrayList();? Jul 10 11:48:41 http://developer.android.com/guide/practices/design/performance.html#prefer_virtual Jul 10 11:48:55 " Jul 10 11:48:57 "Calling through an interface reference can take 2x longer than a virtual method call through a concrete reference." Jul 10 11:51:24 * Ge0rG still wonders why java programmers care about performance Jul 10 11:53:46 on mobile devices it's kind of important don't you think? Jul 10 12:06:58 it's alway important Jul 10 12:08:07 missing his point, like Jul 10 12:11:56 i don't think so. because java is kind of slow you should always think about speeding things up ;) Jul 10 12:14:25 Im on the speed side :-P Jul 10 12:15:47 can i just use a PendingIntent to react to button clicks in a widget? Jul 10 12:30:47 yes Jul 10 12:31:01 but not in a notification Jul 10 12:35:13 notification in a appwidget? Jul 10 12:42:12 when I create a ListInterface and I put a cilck listener on it, but the dialog closes itself when it is clicked and on one item I want to act on the click instead of close it. is that possible? I was trying to change in packages/apps/AlarmClock's RepeatPreference.java to have an "Every Day" option Jul 10 12:44:55 do I need to use DialogPreference instead? Jul 10 12:46:33 There are some examples in platforms/android-1.5/samples/ApiDemos/src/com/example/android/apis/app in the sdk, but I don't know how to run them Jul 10 12:46:42 and there's no README there or anything Jul 10 12:52:18 well i figured out how to run the API demos at least Jul 10 12:52:36 bnovc I used AlertDialogs and when you click on them they dont close themselves Jul 10 12:55:48 it seems like maybe PreferenceActivity is what I want...from these API demos Jul 10 13:03:19 Are the sources for Market and/or gmail available somewhere? Jul 10 13:04:15 i'm pretty android ignorant, but my understand is that the market source is withheld to have companies go through their certification before they can use it Jul 10 13:05:01 ah, sounds reasonable. That only leaves the source for the gmail app then. Jul 10 13:05:53 i dont know about that Jul 10 13:10:32 i think maybe i'm misunderstanding. Are PreferenceActivities and ListPreferences a completely different type of thing? Jul 10 13:11:04 hm I guess PreferenceActivity is a page and ListPreference is a dialog, eh? Jul 10 14:03:18 hello everyone Jul 10 14:03:36 I'm sorry I don't know anyone here but I need a little clarification on the way layouts function if anyone would be kind enough to help please message me thanks in advance this will only take a few minutes I promise. Jul 10 14:04:15 better off asking in here Jul 10 14:04:28 but i dont think anyone knows how to use the android sdk. the android website definitely doesn't and no one here answers Jul 10 14:04:35 lol Jul 10 14:04:45 do you understand it a little Jul 10 14:04:52 very little Jul 10 14:04:58 i've been trying to modify a dialog for like 5 hours Jul 10 14:05:03 ouch Jul 10 14:05:06 just started playing with android Jul 10 14:05:28 i've realized that the only way to learn about it is to read Google's source, since no one else knows about it and the site's documentation is abysmal Jul 10 14:06:26 what i'm trying to figure out is the relationship between lay outs say i wanted to create an app that has an initial selection screen and then opens another layout with the view for the app to do it's thing how do you transition between the two? Jul 10 14:07:29 i don't know, but I recall reading something regarding that in the beginning tutorials. i know that the API Demos do that, so that might be an easy place to look inside the sdk Jul 10 14:07:30 I have the source i compile it every other day I'm also writing a jni module for this app i'm just stuck on the java layouts I'm really not in love with java I learned C first and javas a little weird to me Jul 10 14:08:26 I've been tearing apart the API sample it's put together like they just jam packed every UI sample they could think of together and it's not very clear Jul 10 14:09:00 i agree completely Jul 10 14:09:12 they just stuff things in with no explanation Jul 10 14:09:43 Honestly I think they should have at least broken that specific sample into like 10 diffrent parts would have made things alot eaisier to understand Jul 10 14:09:55 easier Jul 10 14:10:33 api demos is your friend Jul 10 14:10:38 lol Jul 10 14:10:44 blau-mikeDG: read up a few lines Jul 10 14:10:46 documentation for android is spectacular Jul 10 14:10:49 hahah Jul 10 14:11:06 nice joke Jul 10 14:11:30 blau-mikeDG: point me to somewhere in the docs where it explains how I can make a ListPreference not close when an item is clicked and instead take a special action? Jul 10 14:11:32 On some things I would agree with that Jul 10 14:11:36 because i've spent 5 hours on this to no avail Jul 10 14:11:39 on others ouch Jul 10 14:11:50 and I've only had a little progress because I've been reading ListPreference.java and its related classes Jul 10 14:12:06 the api docs for list preference should help Jul 10 14:12:29 there arent any docs for listpreference Jul 10 14:12:38 there is only doxygen comments that give no information Jul 10 14:12:43 i lose Jul 10 14:12:45 no examples, no explanation, no pictures, etc. Jul 10 14:12:54 then you shouldnt be using it Jul 10 14:12:55 ok mike say i want to close one layout when the user selects something and open another in it's place where should i look Jul 10 14:13:08 blau-mikeDG: then what should be used instead Jul 10 14:13:31 i really don't think anyone knows how to do what i'm asking. i've asked in three channels and no one has any idea Jul 10 14:13:39 aanderson: do you want them to be seperate activities? Jul 10 14:13:42 with an ordering to them Jul 10 14:14:13 bnov: dg alert is open source and it might do what i think you want Jul 10 14:14:14 no the same fist screen is to select an rdp selection second opens the jni module and sets up controls and view Jul 10 14:14:26 i have a list of crap to be displayed and one item is custom Jul 10 14:14:38 then if custom is selected magic happens Jul 10 14:15:03 i have to use a third party library to have a custom click handler?! Jul 10 14:15:07 seriously? Jul 10 14:15:34 no, you can see how to do it Jul 10 14:16:21 it doesn't sound like they're doing that? Jul 10 14:17:35 is that what you want? Jul 10 14:18:15 extend listpreference Jul 10 14:18:31 no the same first screen is to select an rdp connection or setup a new one through a dialog second opens the jni shared lib and sets up controls and view Jul 10 14:19:15 which i have setup it's the transition between the two I'm fuzzy on Jul 10 14:19:50 try talkign to romain guy he's the layout and view master Jul 10 14:19:57 do i have to start a new activity? Jul 10 14:20:17 i was trying to avoid that Jul 10 14:22:32 blau-mikeDG: i am extending listpreference, but it automatically closes when an item is clicked. I see something in DialogPreference.java that seems to indicate there is a style for that, but I don't know how to change it Jul 10 14:22:36 without changing DialogPreference.java Jul 10 14:23:22 and i don't know how to get items that are on the list. I would expect to be able to do something like getItem(index)->setChecked(bool) but there seems to be nothing like that Jul 10 14:27:07 bnovc: you still have to be happy with google though no matter how the api is they finally brought Linux into mainstream cells thats a very serious accomplishment and it's an open source os as well Jul 10 14:27:53 unlike the iphone os or web os Jul 10 14:27:57 aanderson144: android seems good from a user perspective and it seems like the SDK could be good but they just did the worst job possible with the sdk Jul 10 14:28:00 docs Jul 10 14:28:24 theres basically no benefit to using the android docs site. reading the code is all you can do Jul 10 14:28:30 bnovc: it's not THAT bad. Jul 10 14:28:36 keep in mind though it's still a serious infant compared to most other os's it will get better with time Jul 10 14:28:55 the UI stuff really needs some TLC Jul 10 14:28:59 and being open source there's really nowhere it can go but up Jul 10 14:29:11 but the docs for framework functionality aren't so bad Jul 10 14:29:45 alot of those are auto generated at build time based off the classes in the framework Jul 10 14:29:48 its probably the worst docs i've ever seen for a high level framework Jul 10 14:29:58 and i can't even search google for my errors because no one is using android yet Jul 10 14:30:11 aanderson144: a lot = all Jul 10 14:30:26 vol_: no one in here knows how to do the incredibly basic things i want to do, so thats a pretty good sign of a bad sdk Jul 10 14:30:48 bnovc: such as? Jul 10 14:31:17 there isn't exactly a huge dev community yet but it grows day by day Jul 10 14:31:43 vol_: in the alarm clock, I'm trying to add an "Every Day" option under repeat. I saw that someone at work wanted it and thought it would be a good task to start with on android Jul 10 14:31:48 but its turned out to be incredibly difficult Jul 10 14:33:01 I was trying to make a DialogPreference and put a layout inside of it and I tried making a PreferenceActivity but that doesn't work with this mysterious undocumented "findPreference" function Jul 10 14:33:13 bnovc: if you hit all of the checkboxes, it does every day in alarm clock Jul 10 14:33:25 you wanted an additional checkbox that would just hit all of them? Jul 10 14:33:47 yeah, UI stuff is mysterious and strange Jul 10 14:34:03 fortunately, if you post on the android groups you'll get a response most of the time Jul 10 14:34:43 bnovc, PreferenceActivity's findPreference finds the preferences with the android:key value of the parameter Jul 10 14:34:51 *finds the preference Jul 10 14:35:15 martin__: ya but when i made my ListPreference into a PreferenceActivity, I got an error Jul 10 14:36:09 hm? ListPreference can be part of a PreferenceActivity Jul 10 14:37:12 I don't understand the relationships between DialogAlert, ListPreference, and PreferenceActivityt Jul 10 14:38:21 martin__: in ListPreference, I can do if(which == 0) but there also isn't a way that I can see to get access to the checkboxes to check them Jul 10 14:41:37 you want to manually check the items in the listpreference? Jul 10 14:41:41 in code? Jul 10 14:51:03 martin__: yes Jul 10 14:51:19 martin__: i was trying to add an "every day" at the top that would check all the rest when its clicked Jul 10 14:51:28 mostly just to learn more than keeping it necessarily, but i can't do it Jul 10 14:53:24 each item in the ListPreference is linked to Preference in your SharedPreferences object afaik Jul 10 14:54:53 can you do PreferenceManager.getSharedPreferences().setString(PreferenceManager.getSharedPreferences().getString(key of your item,"").commit() or something like that? Jul 10 14:55:17 oops, .setString(key of your item, .... Jul 10 14:56:46 not exactly like that, you need a sharedpreferences object, but make sure you do a .commit() once you find the right preference else the change will be lost once the sharedpreference loses scope, and it wont be visible to other things in your application Jul 10 14:57:10 i do not know if the preferencelist will update automatically if you change the preference in code Jul 10 14:57:56 martin__: so ListPreference is directly tied to a value saved on the device? Jul 10 14:58:02 its not just "display some checkboxes"? Jul 10 14:58:15 cause it seemed like the latter Jul 10 14:59:22 as far as I know yes Jul 10 14:59:44 if you set it to the non default value and then close the app and re-open it, is it in the place you set? Jul 10 15:00:32 well i'm changing it for individual alarms, so that doesn't even make sense Jul 10 15:00:37 cause im making a new alarm and clicking "Repeat" Jul 10 15:10:12 i finally found my answer wahoo Jul 10 16:00:30 vol_: i posted on the android discussion and my msg never showed up :( Jul 10 16:00:38 is it (slowly) moderated? Jul 10 16:00:54 I upgraded Eclipse with android 1.5, now my application resources references (in res/layout/xxx) are no longer found (R.foo undefined). WTF ? Jul 10 16:02:07 bnovc, sometimes it takes a bit to appear Jul 10 16:02:27 alright Jul 10 16:22:05 can anyone explain in the itemizedoverlay class, how does the onTap method get the index of the item? and where does it get it from? Jul 10 16:23:02 phreak e-mail me at matt@gauntface.co.uk and I can try and explain as best as possible on saturday if you are stuck Jul 10 16:28:45 hey can someone tell me how to add tabs that are not textviews? Jul 10 16:28:51 I did the http://developer.android.com/guide/tutorials/views/hello-tabwidget.html and got it working Jul 10 16:28:56 but I want to add google maps to a tab Jul 10 16:46:53 jasongornall_: change the textview to a mapview Jul 10 16:47:31 jasongornall_, look at the source code for the Dialer application Jul 10 16:50:43 Greetings all, I am firmiliar with php, C+, bash, and other scripting languages, am I getting in over my head trying to dev for android? Jul 10 16:52:28 http://google-opensource.blogspot.com/2009/06/introducing-android-scripting.html Jul 10 16:52:44 appreciate it Jul 10 16:53:02 http://code.google.com/p/android-scripting/ Jul 10 16:54:06 sry to not speeking much my English suck.. :( Jul 10 16:55:07 if you like c++ than java should come pretty easy OmniCitadel Jul 10 16:55:23 I didn't try ASE on a vm with eclipse but ASE work perfectly on my phone Jul 10 16:55:55 thats what I am hoping... I just preordered the magic from tmo... can't wait to get it Jul 10 16:57:01 you can search a way to code in C+ i think Jul 10 16:57:11 not with ASE Jul 10 17:11:32 Hey guys, I am in Canada and interested in Android Dev Phone 1 but it is expensive because of shipping so thinking of going with HTC Dream with Rogers which is cheaper with contract. I would like to know if HTC dream is good for a developer Jul 10 17:12:10 nullable_type, it's good, yes Jul 10 17:12:43 HTC Dream does it have the flexibility of dev phone, i heard it doesnt allow you to write kernel code but i am more of an app developer anyways Jul 10 17:14:43 KNY do you know Jul 10 17:15:28 I don't think anyone has found a way to get root on a Rogers phone, so what you said is basically correct.. it doesn't have the flexibility of a dev phone Jul 10 17:17:06 so like if i want to update the new Android OS i won't be able to? Sorry for being such a newbie. I want to know if HTC will take the freedom Jul 10 17:18:05 with the stock phone, you can upgrade to any version that Rogers releases.. Jul 10 17:18:48 nullable_type: I take back what I said earlier.. I guess xda-developers forum members found a way to root the Rogers Magic.. Jul 10 17:19:27 oh ya thank you! Jul 10 17:22:56 kRutOn, he's looking at a Rogers Dream Jul 10 17:23:10 but I assume that if they did magic, they did dream too Jul 10 17:23:34 ya they have both Magic and Dream and problem i have with Magic is small touchscreen keyboard Jul 10 17:23:44 yeah Jul 10 17:23:58 I develop on my dream (g1) all the time Jul 10 17:24:15 and having a keyboard really makes testing screen rotation logic easy :) Jul 10 17:24:34 oh ya true Jul 10 17:25:49 I am a newbie to Android, I have Java background so hoping to learn it. Does Android support any of the java framework? Jul 10 17:26:06 err, Android is all Java Jul 10 17:26:17 except if you use the NDK Jul 10 17:26:29 <_Auron|G1_> nyt needs to fix android irc to not d/c when a call ends Jul 10 17:26:32 KNY: er, yeah, the G1 instructions are there, too Jul 10 17:27:12 _Auron|G1_, are you on EDGE? Jul 10 17:27:26 <_Auron|G1_> yeah Jul 10 17:27:27 oh ya thats cool, I am choosing Android Phone over IPhone to learn it Jul 10 17:27:29 <_Auron|G1_> oh. Jul 10 17:27:39 _Auron|G1_, the data gets killed during a call Jul 10 17:27:46 <_Auron|G1_> I see.. Jul 10 17:27:52 _Auron|G1_, so are you suggesting he host a bnc for everyone? :) Jul 10 17:27:59 OnResume gets called when the user returns to the activity, correct? Jul 10 17:28:08 <_Auron|G1_> nm heh Jul 10 17:28:10 I'm choosing openmoko over G1 ;) Jul 10 17:28:19 <_Auron|G1_> happens with 3g too? Jul 10 17:28:21 pieterc, I'm sorry to hear that Jul 10 17:28:29 _Auron|G1_, 3g can remain active during a call Jul 10 17:28:35 KNY: no problem, i'm in therapy Jul 10 17:28:50 pieterc, serious case of masochism? :) Jul 10 17:29:34 nah, megalomania ;) Jul 10 17:31:44 how do you upgrade the G1 to a next android release? Jul 10 17:31:47 I've been wondering Jul 10 17:32:35 pieterc: they get updated automatically. Jul 10 17:32:50 so everyone is on cupcake yet? Jul 10 17:33:19 pieterc: I downloaded the images and installed them myself Jul 10 17:33:20 all G1s yes (except those that just got bought and had old versions, which get updated after a few days) Jul 10 17:34:08 pieterc: ah. you meant G1? I have an ADP1 Jul 10 17:34:10 trhough what? USB? gprs/3g? Jul 10 17:34:20 pieterc: USB Jul 10 17:34:24 I clearly meant the G1 ;) Jul 10 17:35:29 Isn't it possible with a G1 to deny the update? Jul 10 17:35:43 Or do you have to root it first? Jul 10 17:36:36 I'm thinking of buying the ADP1 aswel Jul 10 17:37:09 but for now i'm still happy with the openmoko ;) Jul 10 17:42:11 http://pastebin.com/d17f9f76 Jul 10 17:42:28 the code here runs fine, but it does not populate my spinner Jul 10 17:42:32 anyone can have a look? Jul 10 17:45:50 omfg Jul 10 17:45:52 retarted Jul 10 17:45:53 nevermind Jul 10 17:46:52 yay for running a loop from 0 to 0 Jul 10 17:49:31 heh Jul 10 17:51:27 titefuzz: you could use a loop from 0 to 0 to comment your code;) Jul 10 17:51:46 how do I pass data into a Thread object? Jul 10 17:51:59 synchronised Jul 10 17:54:47 pieterc: so you can't directly pass a variable when you start the thread? Jul 10 17:54:55 I have to make a synchronized getter method? Jul 10 17:55:53 sometimes the good old "void *data" looks so easy Jul 10 17:56:11 haha Jul 10 17:56:12 Ge0rG: that's why I <3 C ;) Jul 10 17:56:30 meanburrito920_: I has been 2 months i had examination about that matter and i forgot Jul 10 17:56:34 meanburrito920_: you can derive Thread and supply constructor arguments Jul 10 17:57:33 ,oO( '<3 C' can be parsed as '< 0x3c' and 0x3c happens to be '<'. weird. ) Jul 10 18:00:31 Ge0rG: how did you find out ;) Jul 10 18:02:35 lol pieterc :) Jul 10 18:03:35 darn :( Jul 10 18:03:43 what? Jul 10 18:04:04 my cursor isnt returning any rows Jul 10 18:06:11 titefuzz: if i'd be a closed source developer microsoft fanboy, i'd put 0 to 0 lloops into my code with init a declaration of strings saying Jul 10 18:06:20 "You fucking bastard, why are you hexdumping me" Jul 10 18:06:27 LOL Jul 10 18:06:32 heheh Jul 10 18:06:41 heh Jul 10 18:08:06 pieterc: now thats boring. the gamecube linux kernel binary image contains "overwrite_this_with_a_hexeditor_to_add_kernel_arguments" (or something similar, thats from memory) Jul 10 18:08:42 great;) Jul 10 18:08:51 oh, time to catch my tram. bbl Jul 10 18:08:58 bye Jul 10 18:10:04 index -1 :( Jul 10 18:10:04 wtf Jul 10 18:10:21 error code perhaps? Jul 10 18:10:23 hm Jul 10 18:10:31 * pieterc takes a look at your pastebin Jul 10 18:10:39 the pastebin has changed a bit Jul 10 18:10:48 instead of items < 0; Jul 10 18:10:54 its items < c.getCount() Jul 10 18:11:22 and at some point Jul 10 18:11:29 items = -&? Jul 10 18:11:30 possibility theres no rows in the table, but i did not get any errors when inserting my data Jul 10 18:11:30 -1? Jul 10 18:11:44 im guessing c.getcount is returning -1 Jul 10 18:11:50 meaning no records returned in the cursor Jul 10 18:13:28 hello Jul 10 18:13:28 return mDb.query("priority", new String[]{"_id","name"}, null, null, null, null, null); Jul 10 18:13:39 can i get current activity from application context? Jul 10 18:13:41 thats what fetchPriority should return Jul 10 18:15:00 titefuzz: I have no clue with current pastebin Jul 10 18:15:29 how can i test to see if theres data in my tables? Jul 10 18:15:34 without doing it in the application? Jul 10 18:15:37 abd? Jul 10 18:17:56 try to sout it and check with adb log Jul 10 18:22:13 hmmmz Jul 10 18:22:17 i have an idea Jul 10 18:22:31 I have a few db.exec() with inserts statements for data Jul 10 18:22:40 but i think i will try mdb.insert() Jul 10 18:34:54 after i do a .insert Jul 10 18:35:25 do i have to reinitialize the contentvalues object? Jul 10 18:41:03 does anyone know how long it generally takes for a post to a handler to execute? Jul 10 18:46:15 meanburrito920_: depends on what is executing on the main thread at the moment Jul 10 18:47:06 herriojr, a loading dialog Jul 10 18:47:41 meanburrito920_: do you have anything in the dialog that pauses/etc or takes a long time? Jul 10 18:48:05 herriojr, its just a spinning wheel Jul 10 18:48:21 I'd have to see the code Jul 10 18:48:34 but when I use them it happens pretty much right away Jul 10 18:48:45 but it depends on how your program is structured Jul 10 18:48:51 as in what is running on the main thread Jul 10 18:48:57 herriojr, for me sometimes it happens quickly, but sometimes it seems to lag pretty bad Jul 10 18:49:16 I'm assuming your handler is attached to the main thread, right? Jul 10 18:49:30 and what you're doing in your post Jul 10 18:49:42 is important...you want it to be light Jul 10 18:50:05 maybe you want to use an AsyncTask? Jul 10 18:50:44 without seeing your code, it will be difficult for me to identify what's going on Jul 10 18:52:42 herriojr, i have a thread that grabs content over http and throws it in the a database. My logs say that the thread all executes fine. then the thread posts a refresh command to the ListView that is holding the data. Sometimes the ListView updates quickly, but other times it takes a long time to update, which leaves me with an unresponsive gui, since the view updates are all in the UI thread Jul 10 18:52:49 but its not that many views Jul 10 18:52:59 only about 30 Jul 10 19:00:37 meanburrito920_: what do you mean by refresh the ListView? do you call ListAdapter.notifyDataSetChanged()? Jul 10 19:00:52 herriojr, yes, exactly Jul 10 19:01:05 I'm assuming the list is over a cursor Jul 10 19:01:10 herriojr, i also use changeCursor, because I query a new cursor in the thread Jul 10 19:01:13 herriojr, yes Jul 10 19:01:40 so you're calling ListAdapter.changeCursor(newCursor)? Jul 10 19:01:50 herriojr, yes Jul 10 19:02:07 is there a need to notify the dataset that it changed, doesn't changeCursor do it for you? Jul 10 19:02:18 also, what is in your bindView method, that is also important as well Jul 10 19:03:02 have you tried putting logging in your bindView to see if they are getting called right away? Jul 10 19:03:35 herriojr, i dont use bindView, i use setViewValue Jul 10 19:04:17 what kind of adapter? Jul 10 19:05:38 ah, a simpleAdapter Jul 10 19:07:46 yeah, as I said, I'm not going to get far in figuring out what it is without code... Jul 10 19:07:48 herriojr, i cast my simpleCursorAdapter to a listAdapter to get it to work with the setListAdapter mehtod Jul 10 19:08:00 herriojr, right, but I can't exactly do that because the code isnt open source Jul 10 19:08:07 kk Jul 10 19:11:29 do you have any services running while this is being done? Jul 10 19:12:01 herriojr, nope, but you figured out what it was :) Jul 10 19:12:22 ok :) Jul 10 19:12:28 herriojr, the images were lagging like crazy on the load. Jul 10 19:12:41 I'm not sure why though... its on wifi Jul 10 19:12:51 and the images are only 60x80 Jul 10 19:12:53 so it was during the network connection Jul 10 19:13:05 herriojr, exactly Jul 10 19:13:22 heh, by how you phrased your question, it sounded like you had already tested that :) Jul 10 19:14:25 well, I'm glad you found it ;) Jul 10 19:18:05 herriojr, would you happen to know if you can load up a list view with empty data and somehow get a reference to each view so that you can update them later? Jul 10 19:18:25 I don't want the user waiting so long for the images to load Jul 10 19:19:03 so, what you should do is lazy loading Jul 10 19:20:48 does each item in the list have a unique identifier (_id)? Jul 10 19:23:55 meanburrito920_: maybe you can look at this: http://www.anddev.org/gallery_with_remote_images-t769.html Jul 10 19:25:14 actually, that's not exactly what you want Jul 10 19:26:43 meanburrito920_: Also, SoftReferences/WeakReferences are your friend when dealing with images in a list Jul 10 19:33:52 herriojr, I've never worked with them, but I've heard they're really useful. I'll read up on it. Jul 10 19:33:54 thanks :) Jul 10 20:05:28 so where are we now since chrome is comming ? http://www.businessweek.com/technology/content/jul2009/tc2009079_065270.htm Jul 10 20:13:07 aunn: we're where we are lol Jul 10 20:13:17 say that 3 times fast ;) Jul 10 20:26:44 lol :) Jul 10 20:32:25 hi everybody... can i ask something about an onTouch issue i have? Jul 10 20:36:00 daliz, /topic Jul 10 20:36:18 got it... ok, then... Jul 10 20:39:09 my question: applying setOnTouchListener() on a FrameLayout object, i can detect "a touch impulse" on the screen. how can I make an event repeat continously until the finger leaves the display? ... in other words, how can I detect that the display is _being pressed_ or _not_? Jul 10 20:54:34 daliz: check the MotionEvent Jul 10 21:00:07 does updating the preference that a (for example) CheckBoxPreference in a PreferenceActivity in code cause the visible CheckBoxPreference to update? I dont see a refresh/redraw method Jul 10 21:00:28 Could someone send a Google Voice invitation to me? I can't wait any longer :( Jul 10 21:02:46 thanks, herriojr. i'll do. Jul 10 21:30:05 hello Jul 10 21:30:08 anyomne here alive... Jul 10 21:31:28 no Jul 10 21:31:34 sorry : ( Jul 10 21:32:07 damm Jul 10 21:32:27 i have char []uat = {0x55, 0x41, 0x30, 0x31 }; Jul 10 21:32:41 and i would ike to store 0x30,0x31 inside short x; Jul 10 21:32:41 ok Jul 10 21:32:50 in C i can do x=*(p+2); Jul 10 21:32:55 what the hell u do in java ! Jul 10 21:33:01 yeah, welcome to java. you have to do bitwise & Jul 10 21:33:22 can u give me example how to get the 0x30,0x31 from the uat inside short x; Jul 10 21:33:34 x = (0xFF & (uat[2]) << 8) + (0xFF & (uat[3])) Jul 10 21:33:38 you'll have to do something like that Jul 10 21:33:40 oh shit Jul 10 21:33:50 thats horrible ! Jul 10 21:33:57 no easier way Jul 10 21:33:58 working with ip octets is kind of a pain :\ Jul 10 21:34:09 are android threads native or green? Jul 10 21:34:21 meanburrito920_: ... what are green threads? Jul 10 21:35:07 yay for having no unsigned types Jul 10 21:35:44 yeah :\ Jul 10 21:35:57 this java is really hell Jul 10 21:35:59 meanburrito920_: native Jul 10 21:36:00 java has little quirks like that. Jul 10 21:36:06 xbxice: what are you trying to do, anyway? Jul 10 21:36:17 parsing packets over the net Jul 10 21:36:21 binary protocol Jul 10 21:36:25 xbxice, you have hexdecimal representations, what do you want to do with it? Jul 10 21:36:36 mm, Jul 10 21:36:46 ok, I can see that being a pain then. Jul 10 21:37:46 would anyone know what the cost of starting a thread is? Jul 10 21:38:11 meanburrito920_: there's minor overhead. Jul 10 21:38:29 it's not that significant, unless you want 1000 threads or something Jul 10 21:38:32 int wp = (0xFF & (_pRcvBuffer[0]) << 8) + (0xFF & (_pRcvBuffer[1])) or int wp = (0xFF & (_pRcvBuffer[1]) << 8) + (0xFF & (_pRcvBuffer[2])) Jul 10 21:38:41 to get the first 2 bytes if _pRcvBuffer Jul 10 21:38:53 xbxice: the first Jul 10 21:38:53 vol_, right, but is it worth it to create a new thread to query a cursor and then post it back? Jul 10 21:38:57 thx Jul 10 21:39:15 meanburrito920_: depends on the size of the query. for anything but the fastest lookups, yes. Jul 10 21:39:16 * ewon works on a platform that only allows 32 bit aligned mem access Jul 10 21:39:20 you want to avoid ANR Jul 10 21:39:40 xbxice: actually Jul 10 21:40:33 http://teneo.wordpress.com/2008/12/23/java-ip-address-to-integer-and-back/ Jul 10 21:40:52 hello IPv6 Jul 10 21:41:22 actually, that's a bad entry Jul 10 21:41:29 hmm, there was a page a while back that details exactly this Jul 10 21:43:18 but yeah, try 0xFFFF instead of 0xFF? Jul 10 21:43:27 sorry, play with this a touch and make sure it works for all bit ranges Jul 10 21:50:06 are u sure it + (0xFF & ((byte)_pRcvBuffer[0]) << 8) + (0xFF & ((byte)_pRcvBuffer[1])); Jul 10 21:50:10 and not << Jul 10 21:51:18 definitely Jul 10 21:51:43 that's big endian though, perhaps you want little endian Jul 10 21:52:29 might want | instead of + Jul 10 21:52:40 doesn't matter Jul 10 21:53:28 yeah, but as long as you're being bitwise Jul 10 21:53:32 | is nicer then + Jul 10 21:54:04 hmm Jul 10 21:54:15 I'm having the worst trouble with GPS Jul 10 21:54:45 I cannot change the location on my emulator, not with ddms, not with telnet Jul 10 21:54:55 I don't know if the Java compile does strength reduction Jul 10 21:55:23 + is just as fast as | on arm Jul 10 21:55:58 and the VM code isn't any different for them :/ Jul 10 22:01:43 can anyone help me with my hello world application? I am getting some errors and I can't seem to add the import lines specified in the tutorial. http://pastebin.com/m30f0f113 when i try to add these it just erases them. import android.os.Bundle; import android.widget.TextView; Jul 10 22:02:58 ah I think I got the import lines to work but I am still getting that error Jul 10 22:03:16 guess I need to figure out how to specify class files Jul 10 22:04:35 here is my code http://pastebin.com/m26fcb54b Jul 10 22:06:17 looks good :) Jul 10 22:06:54 can't be, i still get errors :( Jul 10 22:07:30 eclipse? Jul 10 22:07:33 yheah Jul 10 22:07:37 with adt Jul 10 22:09:45 oh i got it! Jul 10 22:09:56 I had misplaced a semi colon Jul 10 22:10:28 oh that's correct Haraken :) Jul 10 22:11:15 didn't eclipse tell you that? Jul 10 22:11:57 i had to read closer. It was telling me a bunch of things looked wrong because of that. then i saw a line with a greyed out x next to it and I Realized that my semicolon was typoed in the wrong place. Jul 10 22:14:03 where can i find more information on different built in functions? I want to make an application that can forward restricted calls to my voicemail. Jul 10 22:16:09 in the apidemos I guess Jul 10 22:16:25 http://developer.android.com/guide/samples/ApiDemos/index.html Jul 10 22:16:50 oh cool thanks Jul 10 22:19:20 I have a dumb java question Jul 10 22:19:29 is there a way to get the source code for an application if you have tha apk file? Jul 10 22:19:29 BufferedReader bufferedReader = new BufferedReader (new FileReader(input)); Jul 10 22:19:35 keeps bombing any idea why? Jul 10 22:20:01 the input is just the filename in the same folder as the java Jul 10 22:20:06 Haraken: don't think so.. Jul 10 22:20:19 hm ok Jul 10 22:21:59 can any of u guys help me out? Jul 10 22:22:24 jasonchen: on what? Jul 10 22:22:26 what's your problem? Jul 10 22:23:00 * pieterc thinks people should first ask and then wonder if someone could help out :p Jul 10 22:23:27 jasongornall_: BufferedReader bufferedReader = new BufferedReader (new FileReader(input)); Jul 10 22:23:38 I can't figure out where to put the actual file so it works out Jul 10 22:23:47 I tried putting the file in the same directory as the java Jul 10 22:23:52 and just passed the name but it bombed Jul 10 22:24:23 can I not do a relative path? Jul 10 22:26:05 how do u set up eclipse so Jul 10 22:26:10 it doesnt keep tryign to Jul 10 22:26:13 make dalvik conversions Jul 10 22:27:00 jasongornall_: normalle new BufferedReader("your file") should work i think Jul 10 22:27:05 check the API Jul 10 22:27:12 I did Jul 10 22:27:15 and it should work Jul 10 22:27:20 it just says file not found EVERY time Jul 10 22:27:22 jasongornall_: try FileWriter("afile") and check where it goes Jul 10 22:27:42 do I need to pass it the fule file Jul 10 22:27:46 full file* Jul 10 22:27:56 what kind of path do you use? Jul 10 22:28:04 well I have tried everything Jul 10 22:28:09 just the name in the same directory Jul 10 22:28:17 jasongornall_: what kind of file is it? Does it change, or can it be a resource? Jul 10 22:28:19 a /users/me/adsdsadsa Jul 10 22:28:20 what if you try the full name Jul 10 22:28:24 how the hell do I decipeher this Provider: gps status: 2extras: Bundle[mParcelledData.dataSize=52] Jul 10 22:28:30 it is a xml file Jul 10 22:28:40 what's gps status 2? Jul 10 22:28:48 jasongornall_: is it static? does the xml change at all? Jul 10 22:28:52 it will change but right now it is static Jul 10 22:28:59 I am trying to walk before I run Jul 10 22:29:16 ok, so you are including it in your build or dynamically creating a file for it? Jul 10 22:29:26 including in build Jul 10 22:29:46 it is in the same package Jul 10 22:29:48 as my java Jul 10 22:29:56 under my src folder Jul 10 22:30:06 yeah, and that's not a path on the linux file system Jul 10 22:30:34 so I should take it out of there? Jul 10 22:31:20 so, I don't know the proper way to do it, but what I would do is include the file in res/xml then load it and write it to the filesystem the first time you start up Jul 10 22:31:52 or better yet, if you don't see the file on the filesystem, default use the one in res/xml Jul 10 22:32:17 so what would the path look like Jul 10 22:32:53 something like Jul 10 22:32:55 /Users/jasongornall/Documents/workspace/helloXML/AndroidManifest.xml Jul 10 22:33:05 and try reading the AndroidManifest? Jul 10 22:33:13 ok i have char[] pBuffer; and i want to make pointer to buffer from index 5 Jul 10 22:33:37 is C it will be char *p=&pBuffer[5]; Jul 10 22:33:37 jasongornall_: so, what you would do is try to open that file, and if it isn't found, open up the xml file in res/xml via getResources().getXml() Jul 10 22:34:29 jasongornall_: does that help out? Jul 10 22:42:49 is there memcmp in java Jul 10 22:45:12 only for arrays Jul 10 22:45:15 System.arraycopy() Jul 10 22:45:36 oops sorry Jul 10 22:45:38 misread Jul 10 22:45:48 no there's no such thing Jul 10 22:47:22 xbxice: theObject.clone() Jul 10 22:47:28 so how i suppose to check if the content of array char []pBuffer; equal "list" Jul 10 22:48:04 oh sorry i misread. i thought you put memcpy. ignore me. Jul 10 22:48:14 heh, that's two in a row ;) Jul 10 22:48:50 run through and compare them or better yet use String Jul 10 22:49:13 then you can do string1.equals(string2) Jul 10 22:50:08 ugh Jul 10 22:50:10 I am still lost Jul 10 22:51:15 jasongornall_: what is your issue now? Jul 10 22:51:17 http://www.copypastecode.com/7070/ Jul 10 22:51:20 same thing Jul 10 22:51:23 yes but i dont have string object Jul 10 22:51:28 I can't figure out why that would throw a error Jul 10 22:51:28 i have char[] Jul 10 22:51:31 xbxice: create one! Jul 10 22:51:39 xbxice: you can construct a string using char[] Jul 10 22:51:46 how ? Jul 10 22:51:59 http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#String(char[]) Jul 10 22:52:09 file not found every time Jul 10 22:52:11 just do soething like: String x = new String(pBuffer); Jul 10 22:53:16 maybe i should parse the binary protocol from String Jul 10 22:53:18 jasongornall_: because it doesn't exist on the file system Jul 10 22:53:19 and not from char[] Jul 10 22:53:54 oh, you're running it not on a phone Jul 10 22:54:00 so... where can I put this java file so it does exist Jul 10 22:54:04 yeah this is my comp Jul 10 22:54:22 this is a copy paste of 1 of sun's tutorials Jul 10 22:55:25 so, it isn't going to create it for you if it doesn't exist because you're opening it for read Jul 10 22:55:37 so, you should probably construct a File object first Jul 10 22:56:29 why aren't you using Context.openFileInputStream()? Jul 10 22:56:55 or rather Context.openFileInput()? Jul 10 22:57:05 is that a better way to go? Jul 10 22:57:33 well, you only want to store the file locally to your application and not allow other applications to access it, right? Jul 10 22:58:16 so, if you are trying to read the file and it doesn't exist, you need to create it Jul 10 22:58:48 you're not going to find it on the filesystem until you put it on the filesystem, and putting it in your package won't put it on the filesystem Jul 10 22:58:50 is there strlen in java Jul 10 22:58:56 xbxice: yes Jul 10 22:59:11 so i can do char[]x="12"; strlen(x); will give me 2 Jul 10 22:59:13 x.length() Jul 10 22:59:31 but its char[] Jul 10 22:59:34 not .length Jul 10 22:59:51 in the case of arrays as you have there, you can just do x.length Jul 10 22:59:52 .size Jul 10 22:59:59 or .length Jul 10 23:00:26 what the diff between .size of .length of char[]x; Jul 10 23:00:41 i didnt know there was a .size for arrays Jul 10 23:00:49 there's not Jul 10 23:00:54 that'd be why Jul 10 23:00:57 I just couldn't remember what the name of it was Jul 10 23:00:57 :D Jul 10 23:01:21 in java it's always .size or .length for objects/arrays, and I can never remember which Jul 10 23:01:27 or rather .size() Jul 10 23:01:48 for java objects the length is a method. because arrays are simple data structures it's just an array property. so for strings it's str.length() and for arrays its arr.length Jul 10 23:02:09 herriojr: generally .size() is for complex data structures like maps or lists. Jul 10 23:02:36 one more Q i have char pBuffer[0x100]; and i want to do something like char *p=pBuffer[50]; Jul 10 23:02:43 how can i do it in java? Jul 10 23:02:54 char[] p = new char[50]; Jul 10 23:03:12 this will make empty bugger Jul 10 23:03:12 oh wait i misread Jul 10 23:03:13 buffer Jul 10 23:03:33 there is no concept of pointers in java Jul 10 23:03:34 xbxice: http://java.sun.com/docs/books/tutorial/ Jul 10 23:03:51 yes i know that there is no poninters Jul 10 23:03:57 so how one will solve such issue ? Jul 10 23:04:03 what issue? Jul 10 23:04:16 i have char pBuffer[0x100]; and i want to do something like char *p=pBuffer[50]; Jul 10 23:04:27 xbxice: he already said what to do Jul 10 23:04:33 right, but there are no pointers in java so there is nothing that equals that Jul 10 23:04:34 to be able to access bytes from array in any index Jul 10 23:04:49 if you just want to access the bytes then: Jul 10 23:04:54 xbxice: I suggest you read the tutorial on java before you start Jul 10 23:04:58 char p = pBuffer[50]; // will be ok Jul 10 23:05:40 you wrote char* originally, which is a C pointer to a char. Java has no pointers so there is no way of translating char* into java. Jul 10 23:06:29 yep i know this is why i am tring to find a way to do something like this in java i have a buffer of 1024 bytes and i want to read 20 bytes from index 5 Jul 10 23:06:47 xD Jul 10 23:07:33 there's no easy way to do that in java xbxice or at least none that i know of. generally i'd recommend creating a string and then using the string.substring() method Jul 10 23:09:16 xbxice: isn't the most simple way to use a StringBuffer ? Jul 10 23:09:20 check the java 6 api Jul 10 23:09:29 or the android api, what ever;) Jul 10 23:09:30 kaay: actually, I think it is best to say that all non-primitive objects are pointers Jul 10 23:09:50 herriojr: indeed, i wasn't trying to overwhelm him with internal details :P Jul 10 23:10:08 kaay: ok :) Jul 10 23:11:54 i guess the best way will be to use StringBuffer Jul 10 23:18:27 hi ! Jul 10 23:19:56 how would I give a thread a handler, and give the reference to the UI thread? Jul 10 23:21:09 btw if i just do something like this new X(); Jul 10 23:21:16 will the object live forever ? Jul 10 23:21:22 xbxice: no Jul 10 23:21:30 when it will get free Jul 10 23:21:30 garbage collector Jul 10 23:21:35 but whern Jul 10 23:21:38 anyone has problems with Voice Search?? I click on microphone button and I get The application Voice Search (process com.google.android.voicesearch) has stopped unexpectedly. Please try again Jul 10 23:21:51 in what stage of the app it will get free Jul 10 23:22:10 I don't know the specific of the gc sorry Jul 10 23:25:21 im not sure specifically either but i tend to think of it as a random influence on program design. Jul 10 23:27:21 xbxice, it will get freed when it goes out of scope and the gc makes its rounds Jul 10 23:27:50 you cannot determine when the object will be gc'd, you can only determine when it will /not/ be gc'd Jul 10 23:34:02 hi all, can anyone help me with line 15 and 17 with this: http://pastebin.com/d6095b88e - I guess its context, and am still trying to understand Jul 10 23:36:28 what do you not understand? Jul 10 23:40:22 hi pieterc. well I have a delete button on each row of a listview. I dont think I can remove the row from the listview, so have opted to try to refresh display. (line 17) But I am not sure what to put between the () Jul 10 23:41:04 as within a static class. - I think I need a context, but not sure how to get the right context Jul 10 23:41:33 setListAdapter(new EfficientAdapter(**HELP**); Jul 10 23:41:41 hmm Jul 10 23:41:52 what does the API say? Jul 10 23:44:10 you mean the android docs ? Jul 10 23:44:24 yes Jul 10 23:44:41 unless the EfficientAdapter is a class you made yourself Jul 10 23:46:01 yes, the efficentadapter is made by me (well using sample code) Jul 10 23:46:27 cant use "this" within a static class i dont think. Jul 10 23:51:37 btw char x[5]="1234"; is x[0]= 1 Jul 10 23:51:48 or its x[1] Jul 10 23:51:54 who know with this java stuff Jul 10 23:56:35 im confused about what your asking but i think you're asking if java arrays are zero-indexed. in which case, yes they are. Jul 11 00:05:54 can anyone explain to me how the onTap method in the ItemizedOverlay class receives the index that was clicked? Jul 11 02:03:21 I am getting findViewById returning null for this.mView=(myView)this.findViewById(R.id.myview); I get the View working fine on the display but I get null for findViewById. I have another project with the same set up is working fine. I just couldn't figure out what the root cause for this one is. i don't what I am overlooking here. **** ENDING LOGGING AT Sat Jul 11 02:59:57 2009