1. Add and run the control, but there is a main. Out. xml always reports an error, saying there is no content
Cause: Unlike vs, eclipse is closely related to the files currently opened, so there is a problem. Switch to the Java file and run it. Reference
2. How to add an activity
Activity is a form. Open androidmanifest. xml. In the application view, you can see
Before adding a class, you must create a corresponding class.
After adding the content:
Call the new window:
Intent I = new intent ();
I. setclass (add2.this, newact. Class );
Startactivity (I );
Add2.this. Finish ();
If newact. java is a copy of add2.java, so the two forms will share a set of interfaces. to separate them, we need to create a new interface in layout (you can Ctrl-C, Ctrl-V and then modify it)
ModifyCodeSetcontentview (R. layout. main2.
3. If you get the reference of the added Control
The added control contains the property description ID in the XML file of layout, Android: Id = "@ + ID/TTT ". At the same time, there will be corresponding properties in R. Java, which can be used to reference the control.
4. Create a class
The new class is located in the same space under the gen directory and can be called directly.
5. You can use the scroll bar to view how to display a long text.
In Main. XML, scrollview is used instead of linearlayout.
6. Meaning of class name. This
When this is used in the internal class, it refers to the internal class object. To access the outer class object, you can use the outer class name. This to access it. See
7. For applicationsProgramSet background
1) create a PNG Image
2) stored in the drawable-hdpi folder
3) refresh the project and you should be able to see the file. At the same time, the project should exist in R. java.
4) Right-click the main. XML design interface, select Properties -- background, and select BK resource.