Android Question Clear a canvas ?

Discussion in 'Android Questions' started by MitchBu, Jun 30, 2019.

  1. MitchBu

    MitchBu Active Member Licensed User

    I have created a small red badge displayed in the corner of a button (see picture below).

    I do that with a canvas associated with the button.

    My problem is that I also need under certain conditions to remove that badge.

    How can I proceed ?


    [​IMG]
     
  2. Brandsum

    Brandsum Active Member Licensed User

    Code:
    Canvas.DrawColor(Colors.Transparent)
     
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. MitchBu

    MitchBu Active Member Licensed User

    Thank you, but it simply erases the whole button ;)
     
  5. MitchBu

    MitchBu Active Member Licensed User

    I was reinventing the wheel again.

    The Badger class is much simpler.

    Thank you Erel :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice