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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:40:21+00:00 2026-06-19T02:40:21+00:00

Android 4.2 do not display RadioButton correctly when android:drawableLeft is used. drawableRight is OK.

  • 0

Android 4.2 do not display RadioButton correctly when android:drawableLeft is used. drawableRight is OK.

The drawable on the left side overlaps the Radio button graphic. And at least Android 2.2-4.1 seem to be OK with drawableLeft.

Do you know about workaround for this? Setting drawableLeft programatically did not work to solve this issue.

4.2 Android issue

4.2 issue

4.1 Android renders this correctly (also at least Android 2.2-4.0 render this correctly too)

4.1 is correct

The Android XML layout Code for this:

<RadioButton
    android:id="@+id/radio_cloud_dropbox"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginBottom="10dp"
    android:drawableLeft="@drawable/dropbox_logo"
    android:checked="true"
    android:text="@string/lbl_cloud_dropbox" />
  • 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-06-19T02:40:23+00:00Added an answer on June 19, 2026 at 2:40 am

    My temporary solution to this bug was to replace parent RadioGroup layout by TableLayout with TableRow(s) containing RadioButton and TextView. Even though there are other solutions as well.

    <TableLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical" >
    
        <TableRow android:onClick="onDropboxClick" >
            <RadioButton
                android:id="@+id/radio_cloud_dropbox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:onClick="onDropboxClick" />
    
            <TextView
                android:drawableLeft="@drawable/cloud_logo_dropbox"
                android:gravity="center_vertical"
                android:text="Dropbox" />
        </TableRow>
    
        <TableRow android:onClick="onGoogleDriveClick" >
            <RadioButton
                android:id="@+id/radio_cloud_google_drive"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:onClick="onGoogleDriveClick" />
    
            <TextView
                android:drawableLeft="@drawable/cloud_logo_google_drive"
                android:gravity="center_vertical"
                android:text="Google Drive" />
        </TableRow>
    
    </TableLayout>
    

    However as RadioGroup could not be used with nested layouts, selecting/deselecting of checked state has to be done manually in the associated activity in event handler methods:

    public void onDropboxClick(View view) {
        checkRadio(R.id.radio_cloud_dropbox);
    }
    
    public void onGoogleDriveClick(View view) {
        checkRadio(R.id.radio_cloud_google_drive);
    }
    
    private void checkRadio(int radioId) {
        if (radioId == R.id.radio_cloud_dropbox) {
            dropboxRadio.setChecked(true);
            googleDriveRadio.setChecked(false);
        } else if (radioId == R.id.radio_cloud_google_drive) {
            dropboxRadio.setChecked(false);
            googleDriveRadio.setChecked(true);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As stated in this post Android WebView does not display web page correctly I
Possible Duplicate: Android : Location.distanceTo not working correctly? I am trying to calculate the
Android layout not display after listview if more item in list view.if i add
I am updating Android SDK currently then after not display xml file in design
I wanted to display my data into android spinner from database. I used two
i have a problem with handler in android, i don't understand not display result,
To start of, i should mention that i'm a newbie in Android (Not that
Is there a way to notify MediaScanner service on Android platform not to scan
It seems the java.net.NetworkInterface implementation of android does not have a byte[] getHardwareAddress() method
How to give alert if the app is already installed in android,if not how

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.