Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7699999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:36:21+00:00 2026-05-31T22:36:21+00:00

I want to create custom button and I need it to be circle. How

  • 0

I want to create custom button and I need it to be circle. How can I create a circle button?
I do not think that be possible with draw9patch.

Also I do not know how to make custom button!

Do you have any suggestion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:36:22+00:00Added an answer on May 31, 2026 at 10:36 pm

    Use xml drawable like this:

    Save the following contents as round_button.xml in drawable folder

    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_pressed="false">
            <shape android:shape="oval">
                <solid android:color="#fa09ad"/>
            </shape>
        </item>
        <item android:state_pressed="true">
            <shape android:shape="oval">
                <solid android:color="#c20586"/>
            </shape>
        </item>
    </selector>
    

    Android Material Effect: Although FloatingActionButton is a better option, If you want to do it using xml selector, create a folder drawable-v21 in res and save another round_button.xml there with following xml

    <?xml version="1.0" encoding="utf-8"?>
    <ripple xmlns:android="http://schemas.android.com/apk/res/android"
        android:color="#c20586">
        <item>
            <shape android:shape="oval">
                <solid android:color="#fa09ad"/>
            </shape>
        </item>
    </ripple>
    

    And set it as background of Button in xml like this:

    <Button
    android:layout_width="50dp"
    android:layout_height="50dp"
    android:background="@drawable/round_button"
    android:gravity="center_vertical|center_horizontal"
    android:text="hello"
    android:textColor="#fff" />
    

    Important:

    1. If you want it to show all these states (enabled, disabled, highlighted etc), you will use selector as described here.
    2. You’ve to keep both files in order to make the drawable backward-compatible. Otherwise, you’ll face weird exceptions in previous android version.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know if i can create a custom google maps application,on which
I want to create a custom MSBuild task that changes my .cs files before
I want to create a custom set that will automatically convert objects into a
If I want to create a button control like that, is it supposed to
I want to create a custom tab bar for an iphone app that looks
I want to create custom WPF control that has a single child control inside.
Possible Duplicate: How can I create a custom home-screen replacement application for Android? What
I want to create custom ImageButton, but to work like on/ off button. On
How can I create a custom activity that can be chosen by the user
I want to create a custom control in C#. But every time I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.