Person and its subclass

Package CN. Exp; // is a common and standard method. Pay attention to the use of eclipse tools. Class ageexception extends runtimeexception {public ageexception (string message) {super (Message) ;}} class person {string name; string gender; int age;

Small applications of interfaces

Package CN. exp; // compile to the left, execute to the right // so: testinterface demo = new testinterface (); if it is written as // interfacedemo demo = new testinterface (); In demo. out () will report an error // when compiling, check whether

CRM permission control notes

This CRM includes three aspects Customer Management System: Birthday reminder of customer information reservation Invoicing system: warehouse receiving and receiving sales OA Management System: such as calendar *******************************

Get File Name

Package COM. example. tttt; import android. app. activity; import android.net. uri; import android. OS. bundle; public class mainactivity extends activity {@ override public void oncreate (bundle savedinstancestate) {super. oncreate

Internal category (III)

Package cn.com; // In the internal class (1) and internal class (2, internal classes appear as global variables, that is, they are defined in the class. // In this award, internal classes are defined as local variables, that is, they are defined in

Address Book notes

1. Address Book permission statement 2. Table Structure Analysis of the address bookThe raw_contacts table only stores the contact ID.The data table stores contact data, such as mobile phone numbers, names, and email addresses.Raw_contacts has a

Memory and SD card tools

  Package COM. example. testandroid; import Java. io. file; import android. OS. environment; import android. OS. statfs; public class storageutil {Private Static final int error =-1; public static int save_dir = 1; // determine whether the SD card

System Service getSystemService

Description of objects returned by input NAME WINDOW_SERVICE WindowManager Window Management Service LAYOUT_INFLATER_SERVICE LayoutInflater fill layout Service ACTIVITY_SERVICE ActivityManager Application Status Service POWER_SERVICE PowerManger

Http sending XML

Note:1. xml data is sent to the server, not in the form of request parameters, but in the form of object data, the type is a byte array2. Since object data is sent, the POST method must be used, that is, conn. setRequestMethod ("POST ");3. You must

Windowfeature (window style) Notes

A few small examples of window Styles 1. display icons and prompt text on the form (that is, the custom title of the window) // mainactivity is as follows: Package cn.ifeng.com; import android. app. activity; import android. OS. bundle; import

Two Data Binding Methods for ListView

1. ListView LayoutThis ListView uses a horizontal linear layout with three textviews in itCreate this item. xml separately under the layout folder to indicate the layout of the ListView.Method: layout-> new-> Android XML File Android:

A small example of ImageButton

The ImageButton example is very simple. You do not need to modify the Activity code. 1. Prepare two images in res/drawable-hdpi, create a selector in res/drawable-mdpi. xml file, as shown below /> android: drawable = "@ drawable/ok2"/> note: in

Use of array Resources

Step: 1. Create the arrays. xml file under res/values. The content is as follows: hello1 hello2 hello3 hello4 1 2 3 4 2. Call resources in MainActivity and traverse the array, the content is as follows: package cn.com.

Address book code

Package cn. test; import java. util. arrayList; import android. content. contentProviderOperation; import android. content. contentResolver; import android. content. contentUris; import android. content. contentValues; import android. database.

Subclass constructor and super ()

Package cn. exp; // when inheriting, you must first execute the non-argument constructor of the parent class before executing the constructor of the subclass. Class TestExtend {public TestExtend () {System. out. println ("constructor without

Upload a video using a form

To upload a video to the WEB server through a form, you must set the enctype attribute for the form and set the value to multipart/form-data, that is, Use HttpWatch to view the Http protocol generated by the browser. Pay attention to the

Basic DOM knowledge

Note: Due to gastric hemorrhage, DOM examples (or very important, there are a total of five) are not knocked. The core basic knowledge is summarized here. DOM: DOM is the abbreviation of Document Object Model. What is a node: If Java is

Implementation of TabHost-like custom View (2)

Activity_1.xml is as follows: Activity_2.xml is as follows:   Activity_3.xml is as follows: Activity_4.xml is as follows: Bottommenu. xml is as follows: Manifest. xml

Retrieve the returned Parameters Using Uri

Sometimes you need to obtain some important parameters from the URL.We recommend that you do not use the String processing method to conveniently use the URI for the purpose.The procedure is as follows:1. convert a String-type URL to a URI2. Get

Communication between applications and local services (2)

Summary using local services:The core of mainactivity is to get the binder object returned by the service, and then use this object to call related methods in the service. Note that both bind and unbind are from the conn object, and its class

Total Pages: 64722 1 .... 56142 56143 56144 56145 56146 .... 64722 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.