Search code examples
javaandroidbadge

How can a badge like on GitHub libraries be made?


How can I make a badge like how we ofter see it on GitHub libraries. Like this: . I can use a web view but it is not efficient as it will take time to load and it will also cache it.


Solution

  • For this, I have made a library Badge Generator. It is easy to implement. The steps are given below. I will be editing the answer as I post updates.

    Sample

    This is the sample video

    Tutorial

    This is the youtube tutorial

    Note: This is not updated to the features supported in the latest version.

    Features

    1. You can set a custom label(title)
    2. You can set a custom message
    3. You can set a custom image using base64 or the two links provided in the README.md.
    4. You can set a custom logo color
    5. You can set a custom label background color
    6. You can set a custom message background color
    7. And a lot lot more.

    Downsides


    1. The quality decreases with images but remains good without them