Togglebutton in appwidget?

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Togglebutton in appwidget?

Postby wrecks » Thu Nov 04, 2010 4:53 am

How do you create the usefulness of a togglebutton in an appwidget? Like for instance in an appwidget that turns on bluetooth antenna. I am using a custom imagebutton in the appwidget and I have different states for on and off but I can only get the button to momentarily click on before returning to off and I need it to show the "on" graphic until the button is clicked again (like a togglebutton)? It seems silly to me that appwidget only supports a few widget classes and togglebutton is not one of them.
wrecks
Freshman
Freshman
 
Posts: 3
Joined: Mon Sep 20, 2010 8:48 pm

Top

Re: Togglebutton in appwidget?

Postby Emilm » Wed Nov 10, 2010 3:23 pm

Have you found any solutions for a "toggle" button on a widget?

I have made a widget with a button. The button have a resource image that changes every time i press the button, but i want to use a resource from a .xml file.

ps. Widgets dont support normal toggle buttons, just Buttons and imageButtons.
Emilm
Junior Developer
Junior Developer
 
Posts: 10
Joined: Sun Nov 07, 2010 3:42 pm
Location: Trondheim, Norway

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests