Android 2.2 R1 API Chinese Document Series (11) -- radiobutton

Source: Internet
Author: User

Preface

This chapter translates Android. widget. radiobutton into a single-choice button, which is usually used with radiogroup. For example, see here. More friends are welcome to join the Chinese translation operation of Android Api! My mailbox over140@gmail.com.

 

Statement

You are welcome to repost, but please keep the original source of the article :)

Blog: http://www.cnblogs.com

Farmer's uncle: http://www.cnblogs.com/over140/

 

Body

I. Structure

Public class radiobutton extends compoundbutton

Java. Lang. Object
Android. View. View
Android. widget. textview
Android. widget. Button
Android. widget. compoundbutton
Android. widget. radiobutton

Ii. Overview

    

A single-choice button is a double-state button that can be selected or not selected. When a single-choice button is not selected, you can press or click it to select it. However, in contrast to the check box, the user cannot unselect the check box once selected. (Note: You can use the code to control the check box. The effect of clicking on the interface is that the check box cannot be unselected once selected ).

Multiple radio buttons are usually used together with radiogroup. When a single-choice group contains multiple single-choice buttons, selecting one of them will cancel other selected single-choice buttons. (For example, see here)

 

Iii. Public Methods

Public void toggle ()

Change the single-choice button to the opposite of the selected one.

If this single-choice button is selected, this method will not switch the single-choice button. (Translator's note: Please refer to the source code:

 

 

4. Download

Download: http://download.csdn.net/source/2735947

  

V. Series

Android2.2 API Chinese Document Series (1) -- textview

Android2.2 API Chinese Document Series (2) -- edittext

Android2.2 API Chinese Document Series (3) -- accessibilityservice

Android2.2 API Chinese Document Series (4) -- manifest

Android2.2 API Chinese Document Series (5) -- View

Android2.2 API Chinese Document Series (6) -- imageview

Android2.2 API Chinese Document Series (7) -- imagebutton

Android2.2 API Chinese Document Series (8) -- quickcontactbadge

Android2.2 API Chinese Document Series (9) -- zoombutton

Android2.2 R1 API Chinese Document Series (10) -- checkbox

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.