[almost OT] ToggleButton without the ugly green line?

Hi,

I've added a toggle button in ODK Collect for selecting/unselecting all
instances for both deleting instances and forms.

I want a toggle button, not a regular button, because I want different
"on" and "off" messages (i.e. "select all" vs "select none"). I noticed
there were already these buttons in the layout xml's but they were
commented. I uncommented them, changed the text attributes, and I added
the code for making them work.

Everything work fine, but the toggle button has a horrible
almost-invisible raw just behind the text that becomes green when the
button is in the "on" state. This is as if it was meant to underline or
highlight the text, but it is a lot shorter than the text.

Is there a way to completely get rid of that green line without
replacing the toggle button with a regular button?

Thanks
m.

on android, those are the choices. a toggle button with the color, a
regular button without, and custom button you build. you can try
asking on http://stackoverflow.com/android to see if there are other
alternatives.

··· On Fri, Oct 28, 2011 at 12:44, Matteo Sisti Sette wrote: > Hi, > > I've added a toggle button in ODK Collect for selecting/unselecting all > instances for both deleting instances and forms. > > I want a toggle button, not a regular button, because I want different "on" > and "off" messages (i.e. "select all" vs "select none"). I noticed there > were already these buttons in the layout xml's but they were commented. I > uncommented them, changed the text attributes, and I added the code for > making them work. > > Everything work fine, but the toggle button has a horrible almost-invisible > raw just behind the text that becomes green when the button is in the "on" > state. This is as if it was meant to underline or highlight the text, but it > is a lot shorter than the text. > > Is there a way to completely get rid of that green line without replacing > the toggle button with a regular button? > > Thanks > m. >

Thank you very much. I resorted to using a regular button and changing
its text dynamically.

However I'm intrigued by how ugly the green mark for the toggle button
is. There must be something wrong with it, it can't be the way a
toggle button is supposed to be displayed. The green row is much shorter
than the text, and it's too thin to work as highlight but it's too close
to the text to work as an underline....

Maybe some style is being applied to these buttons assuming they are
button, so if I just change them to ToggleButton I get a broken toggle
button? Just trying to guess...

··· On 10/28/2011 09:51 PM, Yaw Anokwa wrote: > on android, those are the choices. a toggle button with the color, a > regular button without, and custom button you build. you can try > asking on http://stackoverflow.com/android to see if there are other > alternatives.

many of the default widgets in android do not have the polish one
would expect. the problem is even worse on some manufacturer specific
devices. it's generally a pain to build your own, but at least you
can...

··· On Fri, Oct 28, 2011 at 14:18, Matteo Sisti Sette wrote: > On 10/28/2011 09:51 PM, Yaw Anokwa wrote: >> >> on android, those are the choices. a toggle button with the color, a >> regular button without, and custom button you build. you can try >> asking on http://stackoverflow.com/android to see if there are other >> alternatives. > > Thank you very much. I resorted to using a regular button and changing its > text dynamically. > > However I'm intrigued by how ugly the green mark for the toggle button is. > There _must_ be something wrong with it, it can't be the way a toggle button > is supposed to be displayed. The green row is much shorter than the text, > and it's too thin to work as highlight but it's too close to the text to > work as an underline.... > > Maybe some style is being applied to these buttons assuming they are button, > so if I just change them to ToggleButton I get a broken toggle button? Just > trying to guess... > >