Goal
My goal is to edit a Button so that it's shape is a little triangle with the shape of < and >.
Shape 1 Shape 2
/| |\
/ | | \
/ | | \
/ | | \
/ | | \
\ | | /
\ | | /
\ | | /
\ | | /
\| |/
What I know
I never edited the painting process of a Button
, so I am kind of lost. I have used Canvas
and done some games by overwriting painting functions in Java, however, it's not clear for me how to proceed to achieve this in Android. I know I wil have to do the following things:
- Create a class that extends
Button
- Edit the painting/drawing of it so that it has the shape I want
- Create an instace of it and add it to my layout on runtime
Question
- What functions do I have to overwrite to do this?
- Will the highligting when clicked work well or do I have to fix that too?
- Can the click highlight be turned off?