Android programming: View and Intent classes, androidintent
=== Basic methods of the View class ====
SetBackgroundColor (int color)
Set the attempted background color
SetBackgroundDrawable (Drawable d)
Set the view background image
SetMinimumHeight (int minHeight)
Set the minimum height. The parent class may reset
SetMinimumWidth (int minWidth)
Set the minimum width. The parent class may reset
SetPadding (int left, int right, int top, int bottom)
Set padding Property
SetClickable (boolean c)
Set whether the view responds to the click
SetFocusable (boolean f)
Set the view response focus
SetOnClickListener (OnClickListener l)
Set Click Event listener
SetOnFocusChangeListener (OnFocusChangeListener l)
Set the focus change listener
SetLayoutParams (ViewGroup. LayoutParams l)
Set layout Parameters
=== Intent class description ====
Intents consists of three parts: action, policy, and data
Actions and policies are represented by a String object, and data can be any object.
Actions and policies are defined in the AndroidManifest. xml file, and the data is specific.
The data sent by the Activity class instance to the Instance Object responding to Intents
Action type
Intent. ACTION_VIEW
-- Open the application
-- Map Program (geo: xxx)
-- Web browser (http:/xxx, https: // xxx)
Intent. ACTION_CALL
-- Call Program (tel: xxx, voicemail: xxx)
Intent. ACTION_DIAL
-- Dialing program (tel: xxx, voicemail: xxx)
Intent. ACTION_WEB_SEARCH
-- Open search engine (Text Information)
Broadcast API Interface
SendBroadcast (Intent intent)
Send a broadcast message
SendBroadcast (Intent intent, String receiverPermission)
Send broadcast messages that can be claimed by a specific permission
In particular, broadcast actions
ACTION_TIME_TICK -- send once per minute, which can be used for time monitoring
ACTION_TIME_CHANGED -- time modified by the user
ACTION_TIMEZONE_CHANGED -- the user changed the time zone.
ACTION_BOOT_COMPLETED -- the system is fully started.
ACTION_PACKAGE_ADDED -- Software Installation Complete
ACTION_PACKAGE_REMOVED -- software deleted
ACTION_BATTERY_CHANGED -- battery power change