<> One , Effect display
<> Two , Main controls used
* CheckBox
* RadioGroup/RadioButton
* ToggleButton
* SeekBar
* ImageView
* EditText
<> Three , Main code
1. Food
2.MainActivity Logical code
<> global variable :
<> Main methods :
1. Initialize control
2. Initialization data
be careful : Give food drawable Picture resources (int Type value ), use (R.drawable. Picture name ) that will do
3. Implement the corresponding events of the control
<> Four , harvest
* Reviewed CheckBox,RadioButton,ToggleButton,SeekBar and ImageView Use of
* ImageView Can be called setImageResource(R.drawable. Picture name ) To set the picture display
* Give food drawable Picture resources (int Type value ), use (R.drawable. Picture name ) that will do
* As long as it is …changed The listener calls back the listener only when the state of the control changes
* I realized java Object oriented in android Use in
* The core algorithm of search function is : Put the option of boolean Type conversion to int code , use switch case To filter the attributes of the food class
* Program debugging process log It's also very useful !!! Not necessarily only debug!!!
Technology