I'm writing a CustomSwitch. It is extended from Switch. Under some circumstances in the onDraw()
method, I want to draw the CustomSwitch as a Button.
I tried several approaches, but neither did work. I can't call ((Button)this).draw(canvas);
in the onDraw()
cause thats going to result in a stack overflow.
I tried to clone the CustomSwitch or inflate it and cast it to Button, but nether of those two approaches did work, too.
Does any body have another idea how I can draw a CustomSwitch as Button?