Hi All,
I've got a button with StateListDrawable enabled. On EnabledDrawable i've got an image file set with gravity set to fill. On PressedDrawable I've got the same image file with gravity set to center.
I want to change image associated with both this state with another one with same gravity.
My code is
Dim sd As StateListDrawable
sd.Initialize
sd.AddState(sd.State_Enabled, bdFiltro)
sd.AddState(sd.State_Pressed, bdFiltro)
cmdCerca.Background=sd
When I click on button first time I see my bitmap gettin small, then change to other bitmap, but when I click again on that butto my bitmap doesn't get small and continues with filling entire button space.
Does someone has a hint to help me solve this problem?
Kind regards to everyone.
I've got a button with StateListDrawable enabled. On EnabledDrawable i've got an image file set with gravity set to fill. On PressedDrawable I've got the same image file with gravity set to center.
I want to change image associated with both this state with another one with same gravity.
My code is
Dim sd As StateListDrawable
sd.Initialize
sd.AddState(sd.State_Enabled, bdFiltro)
sd.AddState(sd.State_Pressed, bdFiltro)
cmdCerca.Background=sd
When I click on button first time I see my bitmap gettin small, then change to other bitmap, but when I click again on that butto my bitmap doesn't get small and continues with filling entire button space.
Does someone has a hint to help me solve this problem?
Kind regards to everyone.