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 6719101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:03:10+00:00 2026-05-26T09:03:10+00:00

I want to create custom button with rounded bottom right and top right corners.

  • 0

I want to create custom button with rounded bottom right and top right corners.

However, I get bottom left and top right rounded instead, although my implementation seems to be ok.

What am I doing wrong?

I use following shape definition stored in drawable folder:

button_shape.xml

<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle">

  <solid android:color="#F66622"/>
  <padding 
    android:left="5dip"
    android:top="5dip"
    android:right="5dip"
    android:bottom="5dip"
  />
  <corners
    android:radius="20dip"
    android:bottomLeftRadius="0dip"
    android:topLeftRadius="0dip"
  />
</shape>

and the layout file is this:

main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/bg"
    >
    <Button 
        android:id="@+id/btnFoo"
        android:text="@string/btn_foo_title"
        android:background="@drawable/button_shape"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dip"
        android:layout_centerInParent="true"
        android:textSize="26sp"
    />
</RelativeLayout>

This is the result:

messed corners

I also tried to define each corner radius separately in the button_shape file

...
<corners
    android:bottomLeftRadius="0dip"
    android:topLeftRadius="0dip"
    android:bottomRightRadius="20dip"
    android:topRightRadius="20dip"
/>
...

… with the same result.

Is it possible that this functionality is somehow messed up in Android SDK?

  • 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-26T09:03:10+00:00Added an answer on May 26, 2026 at 9:03 am

    Silly question, but did you try rounding bottomLeft and see if it rounds the bottom-right corner? I know it’s not a true solution, but work-arounds are nice too. If it looks the way you want, it doesn’t matter how you achieve it.

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

Sidebar

Related Questions

I want to create a custom border with rounded corners. Code - import java.awt.BasicStroke;
I want to create a custom ribbon button within Outlook 2007 using Visual Studio
I want to create my custom pin Start Button to win phone 7. For
I want to create a custom button in ActionScript. This is my code: import
I want to create a custom drawable for RadioButton's button drawable. I have created
I want to create Custom UISwitch button, what will i do?
i want to create a custom view class. But I get an error by
I would like to create a custom Button component with three labels: left-, center-,
I want to create custom ImageButton, but to work like on/ off button. On
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.