Android Programming: View class and Intent class

Source: Internet
Author: User

Basic methods of ====view class = = = =
SetBackgroundColor (int color)
Set the background color of the attempt

Setbackgrounddrawable (drawable D)
Set the background picture of a view

Setminimumheight (int minheight)
Setting the minimum height, the parent class may be reset

Setminimumwidth (int minWidth)
Set the minimum width, the parent class may be reset

setpadding (int left, int. right, int top, int bottom)
Set padding margin properties

Setclickable (Boolean C)
Set whether the view responds to clicks

Setfocusable (Boolean f)
Set whether the view responds to focus

Setonclicklistener (Onclicklistener L)
Set Click event Listener

Setonfocuschangelistener (Onfocuschangelistener L)
Set Focus Change Listener

Setlayoutparams (viewgroup.layoutparams L)
Setting Layout parameters

====intent class Description = = = =
Intents consists of three parts: action, strategy, data
Actions and policies are representations of a string class object, and the data can be any object
Actions and policies are defined in the Androidmanifest.xml file, and the data is specific
The activity class instance sends the data to the instance object that responds to intents

Action type
Intent.action_view
--Open application
--Map Program (GEO:XXX)
--Web browser (http:/xxx, https://xxx)

Intent.action_call
--Call Program (TEL:XXX,VOICEMAIL:XXX)

Intent.action_dial
--Dialer (TEL:XXX,VOICEMAIL:XXX)

Intent.action_web_search
--Open search engine (text message)

Broadcast API interface
Sendbroadcast (Intent Intent)
Send a broadcast message

Sendbroadcast (Intent Intent, String receiverpermission)
Broadcast messages that send specific permissions to take over

Especially the radio action.
Action_time_tick-sent once per minute for time monitoring
Action_time_changed--User changed the time
Action_timezone_changed--The user changed the time zone
action_boot_completed--System fully activated
action_package_added--Installation software complete
action_package_removed--Software removal complete
Action_battery_changed--Battery charge change

Android Programming: View class and Intent class

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.