Android Basic Grammar (properties)-

Source: Internet
Author: User

(Transferred from: http://wenku.baidu.com/link?url=j1fn9OSAyd3k6ApSwWBYC53WEsN1Ci_A1eYEuq_ 5LKC1CFMKBL42XJSXPVYNOBQF0DUMA-BDO5KJDAUGEF3KKNBAULKYOLITWXQYT-POZGI)

(adapter) +.notifydatasetchanged ();
Myadapter.notifydatasetchanged ();//When the size of the data changes 2, when the data changes, use

Lattice format:<gridview>
Picture transverse spacing: android:horizontalspacing= "5DP"
Picture longitudinal spacing: android:verticalspaccing= "5DP"


Tabular format:<listview>

<gradient/> in <shape></shape>;: is a progressive color control

Drop-down list:<spinner>
Entry Check Listener: sp.setonitemselected ();


<ImageSwitcher>+<Gallery> (Gallery)
Android:spacing (interval) = "3DP"


Control:
(1) android:visidility= "value has three 1, gone: Description control does not exist 2, invisible: Content disappears the control is still in the"
(2) Auto-complete text box:<autocompletetextview>
Android:completionth
(3) Image interception <clip></clip>
(4) <progress
Style= "@android: style/": Referencing a loaded style
Android:indeterminate= "turn"; style of imprecise scale when loading
Android:indeterminatedrawable= "" Change the background of an inexact scale style
android:max= "100": Up to a percentage of the program can be completed when loading
/&GT: Default wait load Yes small circle with
(5) <seekbar/> Can pull the progress bar, generally used in music player and video player
Add: <uses-permission android:name= "Android.permission.SET_WALLPAPER" phone in the manifest file
Permissions on the background
Private Wallpapermanager WM;
Wm=wallpapermanager.getinstance (this);
try{
Wm.setresource (R.DRAWABLE.F1);
}catch (ioexcepyion) {
E.peintstacktrace ();
}
Custom Artboards:
(1) Canvas.drawcolor (): Create Canvas background color
(2) Paint paint =new paint (); Define pen only
(3) Paint.setantialias (): Define Ruler
(4) Paint.setstyle ():
(5) Canvas.drawcircle (Scale of y-axis, scale of x-axis, radius scale, on what):
(6) Canvas.drawrect ()
(7) Path path=new path (); Define Brush Path
(8) Canvas.drawarc (area, starting angle, sweep angle, whether only arc, brush): Arc
(9) RECTF rectf=new RECTF (left, top, right, bottom): Paint area
(ten) Canvas.drawrect (left, upper, right, bottom, paint);


Create file permissions in the middle of an SD card
<uses-permission android:name= "android.permission.mount_unmount_filesystems/>
Permission to write data to the SD card
<uses-permission android:name= "Android.permission.WRITE_EXTERNAL_STORAGE"/>

Intentions are divided into two types 1, 2, Hidden intentions
Intent: Intended as a bridge associated component and component to be used generally with Intent intent=new Inten (this,activity.class (destination));
Another way of intent: Intent.setclassname (This,activiy,class);

Sqlitesatabase: Implementing a DB instance (write SQL statement)

* No UI controls can be changed in the Androzo thread;
Anr:applicatron no Response (program not responding)
Stack is characterized by advanced, the activity at the top of the stack shows that activity


Methods of activity:
1, Onactivityresult: Rewrite acivity, receive acivity return value

Android Basic Grammar (attributes)-(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.