How to Call a Method
1. In the MainActivity.java, create a new method named myMethod.
2. In the onCreate method, add the below line. This will call the method named myMethod and process the contents, then return to the onCreate method after it is completed.
myMethod();
3. Compile and run!
Resources:
Popular Posts
- Save LogCat to a Text File
- android:ems
- android:alpha - Set the Opacity/Transparency of Text in TextView/EditText
- android:visibility - Hide a TextView, in XML
- android:background - Change the Background Color of an EditText
- How to Reference a Library in your Project
- Capitalize Text in a TextView, using inputType
- android:rotationX - Rotate a TextView/EditText on the x axis
- android:maxHeight - Set Maximum Height of TextView
- Intent setType(String type) - How to Set an Explicit MIME data type