In the RelativeLayout layout of android, how does one make the screen adaptive and not overlap with each other?
Generally, the interface layout can be divided into two directions according to business requirements.
Horizontal:In the order of
Step One application system configuration file-application version configuration information
Package = "TP. NationalTest"Android: versionCode = "4"Android: versionName = "1.4" type = "codeph" text = "/codeph">
VersionCode: Version Number
VersionName:
Preface:
The built-in CursorAdapter adapter in Android can load data bindings in fixed formats. However, in actual application development, the Item display in ListView varies with the data.
Example:This problem is encountered in our actual
Copy codeThe Code is as follows: import java. text. SimpleDateFormat;
SimpleDateFormat formatter = new SimpleDateFormat ("MM dd, yyyy HH: mm: ss ");Date curDate = new Date (System. currentTimeMillis (); // obtain the current timeString str =
The ListView In the Android contact is unique, but the source code is relatively copied. It is not easy to extract it from the source code when we want to use it, and it is prone to errors, in the past few days, I have extracted it and written it as
Today, when creating an application, you need to use a method similar to pressing the return key of QQ and not destroying the Activity (that is, do not call the Activity. finish (), the system does not call onDestroy), but is similar to pressing the
The startup screen is often used in applications. A background thread is started to prepare resources for running the main program.
Android can enable the screen as follows:
This is the code for the splash. xml layout file.
Code
Code highlighting
1. background selector (IN res/drawable/, usage: android: background = "@ drawable/XXX ")
Copy codeThe Code is as follows:
2. text color selector (IN res/color/, usage: android: textColor = "@ color/XXX ")Copy codeThe Code is as follows:
Note:
Originally, the LCD should be 800*600, but always get the result of 600*600.After several days of hard work, we can solve the problem:
Copy codeThe Code is as follows: "
Package = "myb. x2.app2"
Android: versionCode = "1"
Android: versionName = "1.0"
This article mainly introduces how to use rotate in Android to achieve non-stop image rotation. The Android platform provides two types of animations: Tween animation, that is, animation effects are generated by constantly performing image
Introduction and basic usage of AsyncTaskFor details about the introduction and basic usage of AsyncTask, refer to the official document and Android Development Notes: multi-threaded AsyncTask.
A problem caused by AsyncTaskLast week, I encountered
Copy codeThe Code is as follows: public class DBOpenHelper extends SQLiteOpenHelper {
// The class is not instantiated and cannot be used as a parameter of the parent class constructor. It must be declared as static
Public DBOpenHelper (Context
During development, we often need to set our application to full screen. There are two methods: one is to set in the code, and the other is to change it in the configuration file!
1. Set in the Code:
Copy codeThe Code is as follows: package com.
Android: gravity: sets the content location on the control.
Android: layout_gravity: Set the display position of the control relative to the parent control.
See the following code snippet.
Android: orientation = "vertical"Android: layout_width = "
EditText inheritance relationship: View --> TextView --> EditTextEditText has many attributes. Here we will introduce several attributes:Android: hint = "enter a number! "// Set the prompt information displayed on the spaceAndroid: numeric =
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service