Re: [android-beginners] Clicking in an AppWidget

2010-07-02 Thread Kostya Vasilyev

Jake,

You can set an on-click PendingIntent on some other View (such as a Layout).

Whether or not it's a good idea - I guess it depends on how pretty you 
can make it look :)


-- Kostya

02.07.2010 23:19, Jake Colman пишет:

Is there a way to launch an activity simply
by clicking anywhere in the appwidget?



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Clicking in an AppWidget

2010-07-02 Thread Mark Murphy
On Fri, Jul 2, 2010 at 3:19 PM, Jake Colman col...@ppllc.com wrote:
 I know how to write code that would launch an activity when a button is
 pressed on my appwidget.  I would prefer, however, to not dedicate
 real-estate for a button.  Is there a way to launch an activity simply
 by clicking anywhere in the appwidget?

Sure. You can call setOnClickPendingIntent() on anything you'd like --
LinearLayout, ImageView, etc.

 If so, is that a violation of Android standards?

Since there are few standards, I feel fairly comfortable it will be
considered acceptable.

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

Android Training...At Your Office: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en