1. Last ProgramDuring packaging, files in the res folder are packaged only when used, and files in the assets folder must be packaged whether or not used. 2. Android mainly relies on XML files for layout. Otherwise, the layout will be messy when
Sharedpreferences is the most understandable data storage technology in Android. In fact, sharedpreferences process a key-value pair ). Sharedpreferences is often used to store lightweight data. CopyCode The Code is as follows: // instantiate the
This article only summarizes several methods of optimizing the view in getView, just like several methods of writing the word "" written by Kong Yiji. Do not spray it or laugh, just share it with others, if you have any mistakes, please correct them.
First, clarify the differences between several concepts: Padding margin is the meaning of margins. The key issue is to understand what the margins are. Padding is the margin of the control content relative to the control edge. Margin is the margin
This issue is explained in a specific section in the Android development documentation. In simple terms, Activity is the most important mechanism for interaction with users. Any Configuration changes may affect the Activity interface, at this time,
Objective: 1. Learn how to use the TextView control in Android2. Master important attributes of the TextView Control Function: TextView is similar to the Label and TextBlock controls in the general UI, just to display one or more lines of text.
Objective: 1. Master how to create EditText in Android2. Master common attributes of EditText3. Master EditText focus events and button events (listener) Introduction: EditText is the most important control for receiving user input information.
Objective: 1. Learn how to create a CheckBox in Android 2. Master common attributes of CheckBox 3. Understand the events (listener) for changing the selected status of the CheckBox) CheckBox introduction: Like a Button, CheckBox is also an old
Toast is the English meaning of Toast. In Android, it is like the Toast made in the baking machine, and gradually disappears after a short period of time. Toast is also a container that contains various views and carries them for display. Use Cases:
Objective: 1. Master how to build Gallery in Android2. A preliminary understanding of the principles of Android adapters3. implement simple control scaling Animation Introduction: 1. Gallery is a built-in control of Android. It can inherit images
When developing Android, you may encounter one of the following scenarios: You want to download the application to the root directory of the current application, not the SD card. Then, the file can be accessed by the application or other
In Android, you sometimes need to measure the widget. The width and height of the widget can be calculated. This kind of computing is especially important when adaptive screens are needed. In addition, we hope that the width and height of the
Objective: 1. Learn how to insert images in Android Image addition allows you to add less color to your program. We use an androidrobot (picture.jpg) as an example. You can use any of your own images for testing. It is generally recommended
Android does not have its own color editor. In order to allow users to select colors intuitively, this control is made as follows: The color bar above is the main color bar. You can select the desired color. below is the balance adjustment of the
Objective: 1. Learn how to create a Button in Android2. Master common attributes of a Button3. Master the Button click event (listener) A Button is one of the most commonly used controls in various UIS. It is also one of the most popular controls
Objective: 1. Master how to establish RadioGroup and RadioButton in Android2. Master common RadioGroup attributes3. Understand the differences between RadioButton and CheckBox4. Master the events (listener) of RadioGroup selected status
Create a MainActivity. java main class Copy codeThe Code is as follows: Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: orientation = "vertical"> Android: id = "@ + id/radiobutton_textview" Android:
Android's Touch event processing mechanism is complicated, especially after considering multi-point Touch and event interception. Android Touch event processing has three layers: Activity layer, ViewGroup layer, and View layer. First, let's talk
Objective: 1. Learn how to set and call XML resources in Android 2. Master how to use XML and JAVA code for collaborative development interface 3. Understand the role of R files When developing Android, you can always see an R. java file
1. Set the font color directly in the configuration xml file under the layout file, and change the color by adding android: textcolor = "# FFFFFF" However, this effect only allows the font to display one color. 2. in the activity, use TextView