Android development is still a lot different from the Java console, and Android needs to do too much work on the interface. The first day mainly said some common objects, and objects of events, such as: Textview,editview,button,checkbox,toast.
Then the main use of the object's OnClick event to achieve some simple operation
Final Button btn=(button) Findviewbyid (r.id.button_event); // anonymous inner class implements event monitoring and processing Btn.setonclicklistener (new Onclicklistener () { @Override publicvoid OnClick (view v) { Btn.settext ("You really dare, see I give you Color"); Btn.settextcolor (Getresources (). GetColor (color.red)); Btn.setbackgroundcolor (Getresources (). GetColor (Color.green));
To implement an object's event, first listen to it Btn.setonclicklistener (new Onclicklistener)
Then the public void OnClick () {} method implements the function to be implemented when the Click event occurs
Android first day