Android can customize controls. Two custom controls have been recently exposed and can be reused later.
Public class AutoCompleteEmailEdit extends AutoCompleteTextView {Private ArrayList candidateString = null;Private ArrayAdapter adapter =
Find two encryption algorithms, one MD5 encryption, which is applicable to password encryption, because this algorithm is irreversible; the other is RSA encryption, Which is reversible: 1. MD5 Encryption Import java. security. MessageDigest; Public
First, understand the api provided by android for traffic statistics.
For Android traffic statistics, you can easily obtain the TrafficStats class added to Version 2.2. In fact, the TrafficStats class also reads the text of the file object system
There are two types of Android dialogs: PopupWindow and AlertDialog. Their differences are:The position of AlertDialog is fixed, while the position of PopupWindow can be random.AlertDialog is a non-blocking thread, while PopupWindow is a blocking
L Permission inmanifest:
L Save web Page tosdcard:
// Get file name
String fileName = webView1.copyBackForwardList (). getCurrentItem ()
. GetTitle ();
// Save file to sdcard
WebView1.saveWebArchive ("/sdcard /"
+ Environment. DIRECTORY_DOWNLOADS +
I. Environment Construction1. Download the android SDK and ADT2. Open Eclipse, click Install New Software under Help, click add, and Install ADT through the pop-up interface. You can set the Name to the path where the Location is ADT (note: the path
The jump between androidactivities is not only for startActivity (Intent I), but also for startActivityForResult (Intent intent, int requestCode.
The onActivityResult (int requestCode, int resultCode, Intent data) method can be used to obtain the
Step 1:First, build the dialing interface in the main. xml file under layout (we recommend that you use a tool to drag the interface because it is faster and you do not need to define something in other files)Main. xmlAndroid: layout_width =
A problem occurs when you use Gallery to display images. That is, the sliding speed is too fast. A few images are swiped each time. How can this problem be solved?1. Directly inherit Grallery, override the onFling method, and return the value false.[
By default, an activity occupies the entire screen. However, you can set a "dialog box" topic for an activity so that it can be displayed as a floating dialog box. For example, you may want to define your activity as a pop-up "dialog box" to notify
In addition to the "dialog box" progress bar, you can also create a dialog box that displays the "Operation progress", for example, displaying the download status.1. Create a project: Dialog. 2. Code in main. xml. Android: layout_width =
We already know that is used to define how your Activity is enabled by another Activity. This is the so-called "filter ". However, if two activities have the same , what will happen?The code in AndroidManifest. xml. Package = "net. horsttnann.
Color theme is the beautification package of emacs.: Http://www.nongnu.org/color-theme/Linux configuration method: copy the color-theme.el and themes folder in the compressed package to a folder, my is ~ /. Emacs. dAnd then open the configuration
A simple Android paging data loading instance automatically loads the next page of data by sliding to the bottom of the instance. Now, you can click and drag a custom control.The following is a major Activity code:01 public class MainActivity
The custom style of the Image Browsing gallery control is added with a gray border:
1. The main. xml file is as follows:
[Java]Android: id = "@ + id/widget0"Android: layout_width = "fill_parent"Android: layout_height = "fill_parent">Android: id = "@
Package gongzibai. co. cc;
Import android. app. Activity;Import android. app. Dialog;Import android. OS. Bundle;
Public class ProgressBarActivity extendsActivity {/** Called when the activity is first created .*/@ OverridePublic void onCreate
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