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

  • SEARCH
  • Home
  • 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 6217813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:29:25+00:00 2026-05-24T07:29:25+00:00

In my app I have set for a button the background to a certain

  • 0

In my app I have set for a button the background to a certain color. I don’t like how it looks like.The button is like a rectangle, with straight edges. I want that the button to have rounded corners. How is it possible?

Here is my button in xml :

<Button android:id="@+id/button" android:text="Participer au concours de photos"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:layout_marginTop="410dip" android:layout_centerHorizontal="true"
         android:background="@drawable/orange1"/>

Thanks…

  • 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-24T07:29:26+00:00Added an answer on May 24, 2026 at 7:29 am

    Use selector

    <selector
    xmlns:android="http://schemas.android.com/apk/res/android">
    
    <item android:state_pressed="true" >
        <shape>
            <gradient
                android:startColor="#24a1dd"
                android:centerColor="#158ee4"
                android:endColor="#37b8ee"
                android:angle="270"
                android:centerY="0.88" />
            <stroke
                android:width="3dp"
                android:color="#00ffffff"
                />
            <corners
                android:radius="3dp" />
            <padding
                android:left="10dp"
                android:top="10dp"
                android:right="10dp"
                android:bottom="10dp" />
        </shape>
    </item>
    
    <item android:state_focused="true" >
        <shape>
            <gradient
                android:endColor="#59bfe6"
                android:centerColor="#36aced"
                android:startColor="#91def7"
                android:angle="270"
                android:centerY="0.88" />
            <stroke
                android:width="3dp"
                android:color="#00ffffff"
                 />
            <corners
                android:radius="3dp" />
            <padding
                android:left="10dp"
                android:top="10dp"
                android:right="10dp"
                android:bottom="10dp" />
        </shape>
    </item>
    
    <item>        
        <shape>
            <gradient
                android:endColor="#e1e1e1"
                android:centerColor="#bdbebd"
                android:startColor="#f6f2f6"
                android:angle="270"
                android:centerY="0.88" />
            <stroke
                android:width="3dp"
                android:color="#00ffffff"
                />
            <corners
                android:radius="3dp" />
            <padding
                android:left="10dp"
                android:top="10dp"
                android:right="10dp"
                android:bottom="10dp" />
        </shape>
    </item>
    </selector>
    

    Something like this should do the work. Just fix the color values. Which is the same as the the answer of this question Standard Android Button with a different color

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF app which snaps to screen edges (I just set the
I have a fairly large CRUD winform app that is set up to display
If i have an ImageView that fills the screen. The ImageView background is set
I am making a quiz app and i have set different background music in
In the iOS app I'm writing, we have an add photo button that's pretty
The way I have my app set up now the initial activity that launches
I'm stress testing a web app and have set up a windows test program
I have set up a UITableView-based app, which has a .plist for holding the
I have terminal.app set to accept utf-8 and in bash I can type unicode
I have a set of existing WCF services hosted in a .NET 3.0 app.

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.