noob Question button functions

by MarQuel Middleton » Sun, 13 Sep 2009 04:59:50 GMT


Sponsored Links
 Hey im a new developer ans im having trouble with button functions i
have a menu created but how do i give them functions so when there
pressed they can actually do something?

--~--~---------~--~----~------------~-------~--~----~



noob Question button functions

by Mark Murphy » Sun, 13 Sep 2009 05:02:37 GMT


 


If you implemented an options menu, override onOptionItemSelected() in
your activity.

If you implemented a context menu, override onContextItemSelected() in
your activity.

If you implemented one or more Button widgets, not a menu, call
setOnClickListener() on the widget and supply a listener object to be
notified when the button is clicked.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Training in Germany, 18-22 January 2010:  http://bignerdranch.com 

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


noob Question button functions

by MarQuel Middleton » Sun, 13 Sep 2009 06:09:39 GMT


 Thank You!!





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Scala with Android 1.5

I am working on getting Scala and Android 1.5 to play together. There
are two approaches that I have tried. The first is to use Eclipse as
documented here: http://www.scala-lang.org/node/160. At first I tried
leaving the Eclipe Scala library as part of the build path. Everything
compiled fine, however when I tried to run the emulator I got an class
verification error. This was caused by a failure to link to the
interface ScalaObject, one of the base interfaces in Scala (every
class in Scala implements this interface.) So it did not look like the
scala-library.jar was being picked up dex. Fine. I removed the Eclipse
Scala library, and manually added scala-library.jar as an external
jar. Doing this, compilation fails and I get this error:

[2009-05-24 13:03:39 - Converter]
trouble writing output: shouldn't happen
[2009-05-24 13:03:39 - Converter] Conversion to Dalvik format failed
with error 2

I searched the group, and this error seemed to be associated with
using annotations and JAXB. Are there issues with using annotations
and Android? That would seem far too restrictive. Any other ideas?

-- Michael
--~--~---------~--~----~------------~-------~--~----~

2. Debug Appwidget using Eclipse/ADT

Hi all,

I have to debug my widget using Eclipse.
I set a breakpoint in my code, but I don't see the message (displayed
normally with a standard Activity) waiting for de{*filter*}...
And the debug mode is never called...

Do you have an idea? A problem with my configuration?

Thanks for your reply.

Regards
--~--~---------~--~----~------------~-------~--~----~

3. Multiple ItemizedOverlay conflicts

4. PhoneStateListener question

5. MediaPlayer Internal Errors when streaming mp3 from ftp site...

6. How to use a CSR Wi-Fi Chip in Android?

7. Visual Voice mail