**** BEGIN LOGGING AT Sat Dec 20 02:59:57 2008 Dec 20 03:03:15 chrispix: I'll take a look at this. Since i asked that question i've been looking at this: http://androidguys.com/?p=3005 Dec 20 03:04:34 I put everything together, just like on the tutorial and I keep getting a *name* has stopped unexpectedly error Dec 20 03:04:56 You are having issues w/ tabs? Dec 20 03:05:06 I have mine working.. One second.. let me pull up some code. Dec 20 03:05:27 Want me to start w/ XML? Dec 20 03:05:34 chrispix: thanks, i'll pastebin the ddms output Dec 20 03:05:42 ok.. Dec 20 03:06:18 These are the errors i'm getting: http://pastebin.com/m5cd17c9d Dec 20 03:06:39 can you make heads or tails of that? Dec 20 03:06:52 looking Dec 20 03:07:23 not sure.. let me send you my code.. what is best way to do that? Dec 20 03:07:41 you can pastebin it or email it to me at itechjunkie@gmail.com Dec 20 03:07:48 whichever you prefer Dec 20 03:07:52 one sec Dec 20 03:08:35 going to pastebin xml & then java Dec 20 03:08:48 thanks again Dec 20 03:11:16 http://pastebin.com/m21f34d11 Dec 20 03:11:24 let me know if you have Qs? Dec 20 03:11:46 definately man, I appreciate the help. Dec 20 03:11:52 np.. Dec 20 03:12:47 The code I am copying and pasting from has a whole lot of imports, I can't remember all necessary, so I figure you can handle importing correct methods. Dec 20 03:13:03 yeah, no prob Dec 20 03:15:32 http://pastebin.com/m2494d843 Dec 20 03:16:13 I can't remember if it is tab activity, I have had to creat a new activity as I am using a tab to display map & camera on tabs Dec 20 03:17:11 Yeah, i'm gonna say that it is tabactivity from everything else i've read tonight, i'll try that first Dec 20 03:17:36 If I recall 'Activity' also worked, so you might try that too if you have issues. Dec 20 03:17:47 does that look similar to what you had? Dec 20 03:18:35 yes Dec 20 03:18:57 although, I can't figure out how to define "spec" Dec 20 03:19:03 oh . Dec 20 03:19:05 one sec. Dec 20 03:19:21 TabHost.TabSpec spec=tabs.newTabSpec("tag1"); Dec 20 03:19:33 that is where spec is defined, just give it a name Dec 20 03:20:45 okay. everything looks good. let me see if the emulator will runit Dec 20 03:21:33 k Dec 20 03:24:12 It's still popping up the same error dialog... The code should run just fine... let me restart the emulator and eclipse... Dec 20 03:24:59 ok.. Dec 20 03:27:46 Yeah, it's giving me the same error, I tried it on my phone also. Says: Sorry! The application *app name* has stopped unexpectedly. Please try again. Dec 20 03:28:16 very strange. let me write one really quick.. Dec 20 03:28:45 Do you want my code and xml to test on your sys? Dec 20 03:28:54 If you want. Dec 20 03:29:29 couldn't hurt, i'm new at this. Maybe you can see somethinge I don't. Dec 20 03:29:43 k Dec 20 03:30:23 http://pastebin.com/m4e5f851d Dec 20 03:32:41 one sec Dec 20 03:34:24 The weird thing is, i've tried the demo's on the API and they work fine, but when I try to replicate the code and then change a couple of variables (like button titles) I can't get it to work. Dec 20 03:34:58 strange.. let me load up new project Dec 20 03:40:24 It pretty much worked for me.. Dec 20 03:40:29 uploading new code Dec 20 03:40:36 okay Dec 20 03:41:11 I am guessing your project name was com.androidguys.IntentTabDemo, I named mine the same Dec 20 03:41:25 http://pastebin.com/m5762811c Dec 20 03:41:46 http://pastebin.com/d6923f359 Dec 20 03:41:47 yeah, i plugged in your code into the tutorial i attempted Dec 20 03:42:35 Does my whole code work in a new app. It sounds like your R.Java might be jacked. Try dumping it into a new project Dec 20 03:43:21 okay Dec 20 03:43:37 That is what I just did and it worked fine w/ those 2 codes. I named project com.androidguys.IntentTabDemo Dec 20 03:46:34 Okay, I did what you suggested. the emulator is booting Dec 20 03:46:38 k Dec 20 03:46:52 * ITechJunkie crosses fingers Dec 20 03:47:36 It worked Dec 20 03:47:41 sweet Dec 20 03:47:57 the only thing i did different is that I extended TabActivity instead of Activity Dec 20 03:48:11 really? Dec 20 03:48:15 yeah Dec 20 03:48:17 so activity worked, tabactivity did not? Dec 20 03:48:20 I am going to try tabactivity Dec 20 03:48:54 yeah, i just confirmed it on my system. Thats what the problem was Dec 20 03:49:09 sure Dec 20 03:49:10 is Dec 20 03:49:17 mine died too. Activity it is! Dec 20 03:49:26 any ideas why? Dec 20 03:49:34 No idea.. let me see Dec 20 03:50:08 i'm still trying to wrap my head around all of this. I've got a limited knowledge of java and I pretty much jumped into android headfirst Dec 20 03:50:38 You sound like me 2-3 weeks ago :P Dec 20 03:50:47 Not sure why. But apparently it works.. Dec 20 03:50:52 then there's hope for me? Dec 20 03:51:06 I guess (if there is hope for me still :) Dec 20 03:51:24 heh lemme know if you run out Dec 20 03:51:31 hahah ok. Dec 20 03:52:03 what kinda resources have you been using to learn with? Dec 20 03:52:24 I bought some books. Two are pretty decent, one is an online PDF (the newest revision is) Dec 20 03:52:50 And a paperback, I got a 3rd, but it is all pre release, and the code is pretty much expired (they have changed methods/naming etc) Dec 20 03:53:04 The paperback is Professional Android Application Development (Wrox press) Dec 20 03:53:07 and the PDF is Dec 20 03:53:27 The Busy Coder's guide to android development Dec 20 03:53:47 did you buy the pdf? Dec 20 03:54:03 yah. It is actually pretty cool b/c you get access to updates etc. Dec 20 03:54:09 nice Dec 20 03:54:09 let me find u website Dec 20 03:54:14 thx Dec 20 03:54:34 actually you buy an annual subscription that allows you access to their book + book in development + source code Dec 20 03:54:46 you can keep the last revision you dnload after the year is up Dec 20 03:54:54 the reason I haven't bought any books is because most are outdated. Nice, how much? Dec 20 03:55:13 http://commonsware.com/Android/ Dec 20 03:55:28 $35 1 year Dec 20 03:55:39 sounds like a deal to me Dec 20 03:56:03 Yeah I have access to Dec 20 03:56:26 The Busy Coders guide to android development version 1.0 (the paper back release) in Kindle & PDF Dec 20 03:56:34 The Busy Coder's Guide to Android Development version 1.9: [Kindle] [PDF] Dec 20 03:56:39 The Busy Coder's Guide to Advanced Android Development version 0.2: [PDF] Dec 20 03:56:50 the 0.2 is not finished, but as they update it you can read it. Dec 20 03:57:00 nice Dec 20 03:57:07 I really like the Professional Android Applciation development book too. Got it on amazon. Dec 20 03:57:27 Android a programmers guide is outdated, I would not recommend it Dec 20 03:58:02 I'll probably have to order that one too then. How current is it? ( PPA Dev book ) Dec 20 03:58:24 I think it is 1.0, they seem to not have as many issues as the other one. Dec 20 03:59:06 either way, 1.0 is a big step up from the beta stuff Dec 20 04:02:46 yeah.. Dec 20 04:02:56 my email is chrispix @ gmail Dec 20 04:03:26 awesome, i'll add you in there Dec 20 04:03:30 k Dec 20 04:05:53 I like GoogleCheckout, first time to use it. It's pretty slick Dec 20 04:06:23 yeah it is pretty nice :) Dec 20 04:46:58 when using XML can you use percentages when specifying layout_width? Dec 20 04:51:45 ITechJunkie: no, but you can use weights Dec 20 04:52:23 ITechJunkie: specifically, use android:layout_width="0px" (the value will be ignored) and android:layout_weight="42" Dec 20 04:53:10 ITechJunkie: the various weights are normalized. So if you have 3 cells across, and their weights are 1, 1, and 2, then that will be equivalent to 25%, 25%, and 50% Dec 20 17:30:44 i just have a question Dec 20 17:30:54 i have a listview with buttons on list items Dec 20 17:31:01 how can i attach an event to these buttons ? Dec 20 17:31:31 programaticaly :> Dec 20 17:31:39 You have to give the buttons an idea Dec 20 17:32:00 an id ? Dec 20 17:32:04 and then just do the Notepad tutorial :) Dec 20 17:32:24 hmm Dec 20 17:32:28 i'll recheck the notepad tutorial Dec 20 17:32:32 something like this Dec 20 17:32:34 android:id="@+id/general" Dec 20 17:33:16 then you do this in onCreate Dec 20 17:33:37 Button general = (Button) findViewById(R.id.general); Dec 20 17:34:02 ok ! Dec 20 17:34:03 thanks ! Dec 20 17:34:30 http://paste.pocoo.org/show/96163/ Dec 20 17:35:04 yes, i already know how to do an event Dec 20 17:35:10 thats the way to go for all your elements that you need to change or you like to set listeners on Dec 20 17:41:56 hmm findViewById always returns null even if the listview entries are there Dec 20 17:42:12 (the button is inside a listview entry) Dec 20 17:42:15 (inside a row) Dec 20 17:43:23 and that's not an issue like "the listview entries are not yet created (in the onCreate)" because i've tried elsewhere and i still have the NullPointerException Dec 20 17:45:24 can you paste the xml and the java file in the paste.pocoo.org ? Dec 20 17:47:09 the xml is here http://paste.pocoo.org/show/96164/ Dec 20 17:47:42 and the java here http://paste.pocoo.org/show/96165/ Dec 20 17:48:01 yes the code can be a little bit ... not so clean. Dec 20 17:49:41 i've put the findViewById for the button on "onCreateOptionsMenu" instead of "onCreate" just to see if it was linked with onCreated Dec 20 17:52:21 but the method findViewById got found ? Dec 20 17:52:37 hmm yes, why not ? Dec 20 17:52:56 i've the null pointer exception on the next line Dec 20 17:55:28 Yeah have you looked at this example? http://code.google.com/intl/de-DE/android/samples/ApiDemos/src/com/example/android/apis/view/List8.html Dec 20 17:55:42 Just to compare it is using a list actitivty as well Dec 20 17:56:19 // Use a custom layout file Dec 20 17:56:19 setContentView(R.layout.list_8); Dec 20 17:56:22 this is missing Dec 20 17:56:59 you're onCreate is lacking the connection to the xml file :) Dec 20 17:57:09 so you cant find the IDs defined in the xml file Dec 20 17:57:11 ok thanks, i'll look that way Dec 20 19:18:32 is there some automatism available to display the current setting in the summary of a preference item? Dec 20 19:37:55 hi guys, got a question, if i stop an application (for example by pressing the home button), am i required to 'stop' the running threads? ifso should i do it in onStop or onDestroy. The new thread connects to a services by sockets... so i guess i need to disconnect it. Dec 20 19:39:02 Falc|Away: you are not required but you really should Dec 20 19:39:14 onDestroy will not be called if you go back Home Dec 20 19:39:23 ah, that explains a lot Dec 20 19:39:24 read the activity javadoc and you will see what methods should be used Dec 20 19:39:34 basically you should use onPause/onStop Dec 20 19:39:40 i tried closing the socket in stop and destroy but i just got exceptions that way... Dec 20 19:39:50 right Dec 20 19:58:13 hmm i enabled logging but pressing the home button doesnt calls onPause or onStop here :( Dec 20 20:02:05 so I'm trying to work on Calendar in Eclipse Dec 20 20:02:18 but it throws an Exception when I open the AndroidManifest.xml Dec 20 20:02:23 any tips to fix it? Dec 20 20:27:10 i'm wondering how i can get my activity from the Context provided to my BroadcastReceiver.onReceive() Dec 20 20:27:17 or how i can get a property of my activity inside the onReceive() Dec 20 21:25:54 Error executing aapt @ ADT. oO but i can run it just fine from a terminal Dec 20 21:26:10 and the suggested path is correct Dec 20 21:27:43 aw as usual, clean&manual rebuild fixes it! Dec 20 22:07:25 romainguy: I'm trying to use the Eclipse plugin (like you demoed for us at the Mentor Summit) to work on Calendar Dec 20 22:07:45 but when I open the AndroidManifest.xml file it fails Dec 20 22:07:50 got any tips for me on that> Dec 20 22:07:51 ? Dec 20 22:09:56 define "it fails" :) Dec 20 22:10:31 something about not implementing IFileEditor or something Dec 20 22:10:36 wait, I'll look it up Dec 20 22:10:41 I have no idea Dec 20 22:10:51 it looks like you haven't installed the editors module for the Android plugin Dec 20 22:11:25 I've got Android Editors in the Installed Software list Dec 20 22:11:54 com.android.ide.eclipse.editors.AndroidEditor.init(Unknown Source) Dec 20 22:12:01 org.eclipse.ui.PartInitException: Invalid Input: Must be IFileEditorInput Dec 20 22:29:45 does anyone want to share their ImageTextButton widget class? :) Dec 20 22:59:27 eldenz: why would you need such a thing? the Button class already lets you put an image + text Dec 20 23:02:07 oh it does? Dec 20 23:02:11 stupid me, thanks Dec 20 23:04:42 it doesn't seem to draw anything though Dec 20 23:05:13