开发学院手机开发Android 开发 Android Intent 使用方法 阅读

Android Intent 使用方法

 2010-09-10 00:33:00 来源:WEB开发网   
核心提示:9,发邮件returnIt = new Intent (Intent . ACTION_SEND );String[] tos = { "shenrenkui@gmail.com" };String[] ccs = { "shenrenkui@gmail.com" };retur

9,发邮件

returnIt = new Intent (Intent . ACTION_SEND );

String[] tos = { "shenrenkui@gmail.com" };

String[] ccs = { "shenrenkui@gmail.com" };

returnIt .putExtra(Intent . EXTRA_EMAIL , tos);

returnIt .putExtra(Intent . EXTRA_CC , ccs);

returnIt .putExtra(Intent . EXTRA_TEXT , "body" );

returnIt .putExtra(Intent . EXTRA_SUBJECT , "subject" );

returnIt .setType( "message/rfc882" );

Intent . createChooser ( returnIt , "Choose Email Client" );

10,发短信

Uri smsUri = Uri. parse ( "tel:100861" );

returnIt = new Intent (Intent . ACTION_VIEW , smsUri);

returnIt.putExtra( "sms_body" , "shenrenkui" );

returnIt.setType( "vnd.android -dir/mms-sms" );

11,直接发邮件

Uri smsToUri = Uri. parse ( "smsto://100861" );

returnIt = new Intent (Intent . ACTION_SENDTO , smsToUri);

returnIt.putExtra( "sms_body" , "shenrenkui" );

12,发彩信

Ur i mmsUri = Uri. parse ( "content://media/external/images/media/23" );

returnIt = new Intent (Intent . ACTION_SEND );

returnIt.putExtra( "sms_body" , "shenrenkui" );

returnIt.putExtra(Intent . EXTRA_STREAM , mmsUri);

returnIt.setType( "image/png" );

4. Intent的动画

void, overridePendingTransition (int enterAnim, int exitAnim).

在startActivity(Intent) or finish()的时候调用。

参考ApiDemo中Animation.java

上一页  1 2 3 

Tags:Android Intent 使用方法

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接