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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:19:44+00:00 2026-05-29T22:19:44+00:00

Can anybody tell me how to use setError function appropirately for CheckBoxes and RadioButtons.

  • 0

Can anybody tell me how to use setError function appropirately for CheckBoxes and RadioButtons. I am able to raise the error icon symbol (!) after my textView but cannot see the error message . As per Android’s documentation :

sets the right-hand compound drawable of the TextView to the "error" icon and sets an error message that will be displayed in a popup when the TextView has focus. The icon and error message will be reset to null when any key events cause changes to the TextView's text. If the error is null, the error message and icon will be cleared.
Can you someone provide an example of the proper implementation of setError in case of checkbox aand radioButton?

Here is my code –

CheckBox box=(CheckBox)findViewById(R.id.propertyStatus1);
box.setError("Error");
  • 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-29T22:19:45+00:00Added an answer on May 29, 2026 at 10:19 pm

    To display the seterror for checkbox and radiobutton its working. Your code also right for displaying set error.

        CheckBox cb=(CheckBox)findViewById(R.id.checkBox1);
        cb.setError("error");
    

    At first only the error icon will be displayed. When focus went the error message will be displayed.

    To receive focus on these types of elements add android:focusableInTouchMode="true"

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

Sidebar

Related Questions

Can anybody tell me what is the use of c_str() function in C/C++?. In
Can anybody tell exactly use of Response.seeOther(...) in jersey i am trying to use
Can anybody please tell me what is the use of %NOTFOUND operator? We can
can anybody tell me what's the point if any for a javascript function like
Can anybody tell me when to use categories and when to use subclassing in
Can anybody tell me a regular expression to use within some PHP to find
Can anybody tell me how I use a forward slash escape character in Java.
Can anybody tell me why a lot of Ruby boolean methods use this double
Hi friends can anybody tell what is the use of intent filter and what
Can anybody tell me how to use a custom dash sequence in a dictionary.

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.