How to use the checkbox control in Android
Check@R_ 536_ 2419 @ check box control usage, the details are as follows
1、 Introduction
1、
2. Class structure diagram
II Check@R_ 536_ 2419 @ check box control usage
Here is to use java code to add controls in LinearLayout
1. New LinearLayout layout
2. Establish Check@R_ 536_ 2419 @ XML layout file
3. Created by the view. Inflate() method Check@R_ 536_ 2419@
Check@R_ 536_ 2419@ check@R_ 536_ 2419@=( Check@R_536_2419 @) View.inflate(this,R.layout. check@R_536_2419 @,null);
4. Add through the addview method of LinearLayout Check@R_ 536_ 2419@
ll_ check@R_ 536_ 2419@List.addView ( check@R_536_2419 @);
5. Via list< Check@R_ 536_ 2419 @ > complete output function
for( Check@R_536_2419 @ check@R_536_2419 @: check@R_536_2419 @List)
3、 Code example
1. Renderings:
2. Code
fry.Activity01
/ Check@R_ 536_ 2419@Demo1 /res/layout/activity01.xml
/ Check@R_ 536_ 2419@Demo1 /res/layout/ check@R_ 536_ 2419@.xml
4、 Harvest
1. In the view. Inflate (this, null) method check@R_ 536_ 2419 @ XML
2. Add in LinearLayout with code Check@R_ 536_ 2419 @ method
1) Created by the view. Inflate() method Check@R_ 536_ 2419@
Check@R_ 536_ 2419@ check@R_ 536_ 2419@=( Check@R_536_2419 @) View.inflate(this,null);
2) Add through the addview method of LinearLayout Check@R_ 536_ 2419@
ll_ check@R_ 536_ 2419@List.addView ( check@R_536_2419 @);
3、List< Check@R_ 536_ 2419 @ >
private List< Check@R_ 536_ 2419@> check@R_ 536_ 2419@List =new ArrayList< Check@R_ 536_ 2419@>();
4、for( Check@R_536_2419 @ check@R_536_2419 @: check@R_536_2419 @List)
ergodic
5. List class structure diagram
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.