Skip to content

Instantly share code, notes, and snippets.

@vxhviet
Created May 5, 2016 03:23
Show Gist options
  • Save vxhviet/26edc0ce4df4608d85ad46b401c91c3b to your computer and use it in GitHub Desktop.
Save vxhviet/26edc0ce4df4608d85ad46b401c91c3b to your computer and use it in GitHub Desktop.
Draw transparent circle in xml

Source: StackOverflow, StackOverflow

Question: How to draw a transparent cirlcle in xml?

Answer:

Create a cirlce.xml in drawable folder with this:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="oval">
    <solid android:color="#80FFFFFF"/>
    <stroke
        android:width="5dp"
        android:color="#E6ffffff"/>
</shape>

For transparency value look at the 2nd reference link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment