Head First Android --- Intent

How to create the intent
You create an intent that specifies an action using the following syntax:where action is the type of activity action you want to perform.
Android provides you with a number of standard actions you can use. As an example,you can use Intent.ACTION_DIAL to dial a number,

Intent.ACTION_WEB_SEARCH to perform a web search, and Intent.ACTION_SEND to send a message. So, if you want to create an
intent that specifies you want to send a message, you use:

Intent intent = new Intent(Intent.ACTION_SEND);

intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, messageText);

上一篇:Python基础 - 20210515 - 基础8(函数-2)


下一篇:css中单位px和em,rem的区别[转载]