android之Intent的七大属性

2015年04月03日 ⁄ Android ⁄ 共 14866字 ⁄ 字号 小 中 大 ⁄ 1条评论

Intent用于封装程序的“调用意图”。两个Activity之间,可以把需要交换的数据,封装成Bundle对象,然后使用Intent对象,携带数据到另一个Activity中。实现两个Activity的数据交换。

Intent还是各种应用程序组件之间通信的重要媒介。启动Activity、Service、BroadcastReceiver,都需要使用Intent。

Intent还有一个好处,如果应用程序只是想启动具有某种特征的组件,并不想和某个具体的组件耦合,则可以通过在int ent - filt er 中配置相应的属性进行处理,与s t uc t s 2 中的MVC框架思路类似

Intent对象大致包括7大属性:1、Component Name,2、Action,3、Catory,4、data,5、Type,6、Extra,7、Flag。

·Ac t ion作为标识符,代表一个Intent ,当一个Activity 需要外部协助处理时,就              会发出一个I nt ent ,如果一个程序能完成相应功能,只要在int ent - filt er 加上这个               这个intent 就可以了。

·Dat a保存需要传递的数据格式,比如:tel://

·Extras保存需要传递的额外数据。

·Category 表示Intent的种类,从android上启动Activity 有多种方式,比如 程序列表、桌              面图标、点击Home激活的桌面等等,Category则用来标识这些Activity的图标会出现在哪些              启动的上下文环境里。

(一)  ComponentName:明确指定Intent将要启动哪个组件,因此这种Intent被称为显示Intent,没有指定ComponentName属性的Intent被称为隐式Intent。隐式Intent没有明确要启动哪个组件,应用汇根据Intent指定的规则去启动符合条件的组件。ComponentName不仅可以启动本程序中的activity,还可以启动其它程序的activity。

启动方式:

Intent intent =new Intent();

ComponentNamecomponent= new ComponentName(this, TwoActivity.class);

intent.setComponent(component);

等价于:

Intent intent =new Intent(this, TwoActivity.class);

startActivity(intent);

等价于:

Intent intent =new Intent();

intent.setClass(this,TwoActivity.class);

startActivity(intent);

等价于:

Intent intent =new Intent();

intent.setClassName(this,"com.zzh.day06_intent.TwoActivity");

startActivity(intent);

本程序中启动其它程序:

(二) Action、Cat egory 属性与intent-filter配置:

通常,Action, Category属性结合使用。定义这两个属性都是在主配置文件的<intent-filter>节点中。Intent通过定义Action属性(其实就是定义一段自定义的字符串),这样就可以把Intent与具体的某个Activity分离,实现了解耦。否则,每次跳转都有写成,

(三) data:

1、 用于添加数据。通常是启动某个系统程序或其他程序,带给此程序的信息。Data属性通常用于向Action属性提供操作的数据。Data属性的值是个Uri对象。

Uri的格式如下:scheme://host:port /path

2、 系统内置的属性常量

tel:是固定写法,是系统内置的属性常量。

系统内置的几个Dat a属性常量:

·tel: //:号码数据格式,后跟电话号码。

·mailto: //:邮件数据格式,后跟邮件收件人地址。

·smsto: //:短息数据格式,后跟短信接收号码。

·content : //:内容数据格式,后跟需要读取的内容。

·file://:文件数据格式,后跟文件路径。

·market://search?q=pname:pkgname:市场数据格式,在Google Market里搜索包名为pkgname的应用。

·geo: //latitude, longitude:经纬数据格式,在地图上显示经纬度所指定的位置。

四、Intent利用Action属性和Dat a属性启动Android系统内置组件的代码

(一)、拨打电话:

Intent intent=new  Intent();

intent.setAction(Intent.ACTION_CALL);

//intent.setAction("android.intent.action.CALL");  //以下各项皆如此,都有两种写法。

intent.setData(Uri.parse("tel:1320010001"));

startActivity(intent);

//调用拨号面板:

Intent intent=new Intent();

intent.setAction(Intent.ACTION_DIAL);

intent.setData(Uri.parse("tel:1320010001"));

startActivity(intent);

//调用拨号面板:

Intent intent=new  Intent();

intent.setAction(I ntent.ACTION_VIEW);

intent.setData(Uri.parse("tel:1320010001"));

startActivity(intent);

(二)、利用U ri打开浏览器、打开地图等:

Uri uri = Uri.parse("https://www.baidu.com");//浏览器

Uriuri=Uri.parse("geo:39.899533,116.036476"); //打开地图定位

Intent intent = new Intent();

intent.setAction(I ntent.ACTION_VIEW);

intent.setData(uri);

startActivity(intent);

(五)Type属性

1、Type属性用于指定Data所指定的Uri对应的MIME类型。MIME只要符合“abc /xyz”这样的字符串格式即可。

2、Intent利用Action、Data和Type属性启动Android系统内置组件的代码:

播放视频:

Intent intent = new Intent();

Uri uri =Uri.parse("file:///sdcard/media.mp4");

intent.setAction(Intent.ACTION_VIEW);

intent.setDataAndType(uri,"video/*");

startActivity(intent);

(六)Extra属性

1、通过intent.putExtra(键, 值)的形式在多个Activity之间进行数据交换。

2、系统内置的几个Extra常量

EXTRA_BCC:存放邮件密送人地址的字符串数组。

EXTRA_CC:存放邮件抄送人地址的字符串数组。

EXTRA_EMAIL :存放邮件地址的字符串数组。

EXTRA_SUBJECT:存放邮件主题字符串。

EXTRA_TEXT:存放邮件内容。

EXTRA_KEY_EVENT:以KeyEvent对象方式存放触发Intent 的按键。

EXTRA_PHONE_ NUMBER :存放调用ACTION_CALL 时的电话号码。

3 、Intent 利用Action、Data和Type、Extra属性启动Android系统内置组件的代码:

调用发送短信的程序

Intent intent  = new Intent();

intent.setAction(I ntent.ACTI ON _VI EW);

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

intent.putEx tra("sms_body","信息内容...");

startActivity(intent);

//发送短信息

Uri uri =Uri.parse("smsto:13200100001");

Intent intent = new Intent();

intent.setAction(Intent. ACTION _SENDTO);

intent.setData(uri);

intent.putEx tra("sms_body","信息内容...");

startActivity( intent );

//发送彩信,设备会提示选择合适的程序发送

Uri uri = Uri.parse("content://media/external/images/media/23"); //设备中的资源(图像或其他资源)

Intent intent = new Intent();

intent.setAction(Intent. ACTION_SEND );

intent.setType("image/png");

intent.putExtra("sms_body","内容");

intent.putEx tra(I ntent.EX TRA_STREAM,uri);

startActivity(it);

发送Email:

Intent intent=new Intent();

intent.setAction(I ntent.  ACTI ON _SEN D );

String[]tos={"android1@163.com"}

String[]ccs={"you@yahoo.com"};

intent.putExtra(Intent.EXTRA_EMAI L, tos);

intent.putExtra(Intent.EXTRA_CC, ccs);

intent.putExtra(I ntent.EXTRA_TEX T,"The email body text");

intent.putExtra(I ntent.EXTRA_SU BJ ECT,"The email subject text");

intent.setType("message/rfc822");

startActivity(Intent.createChooser(intent,"Choose Email Client"));

Intent intent = newIntent(Intent.ACTION_SEND);

String[] tos = {"mobileservice@ablesky.com"};

intent.putExtra(I ntent.EXTRA_EMAIL, tos);

intent.putExtra(I ntent.EXTRA_TEXT,getPhoneParameter());

intent.putExtra(Intent.EXTRA_SUBJECT,"Android日志");

intent.putEx tra(Intent.EXTRA_STREAM, Uri.fromFile(cacheDir));

intent.setType("message/rfc882");

intent.setType("plain/text");

Intent.createChooser(intent, "请选择邮件发送软件");

startActivity(intent);

intent.setAction(android.provider.Settings.ACTION_SETTINGS)

4 、Intent利用Action属性中的ACTION_GET_CONTENT获取返回值

//选择图片requestCode返回的标识

I ntent intent = new  I ntent();

intent.setAction(I ntent. ACTI ON_GET_CON TEN T );

intent.setType( "image/* " );

I ntent w rapperI ntent = Intent.createChooser(intent, null);

startActivityForResult(w rapperI ntent,requestCode);

//添加音频

I ntent intent = new  I ntent();

intent.setAction(I ntent. ACTI ON_GET_CON TEN T );

intent.setType( "video/* " );

I ntent w rapperI ntent = Intent.createChooser(intent, null);

startActivityForResult(w rapperI ntent,requestCode);

//视频

I ntent intent = new  I ntent();

intent.setAction(I ntent. ACTI ON_GET_CON TEN T );

intent.setType( "video/* " );

I ntent w rapperI ntent = Intent.createChooser(intent, null);

startActivityForResult(w rapperI ntent,requestCode);

//录音

I ntent intent = new  I ntent();

intent.setAction(I ntent. ACTI ON_GET_CON TEN T );

intent.setType( "audio/amr" );

intent.setClassName("com.android.soundrecorder","com.android.soundrecorder.SoundRecorder");

startActivityForResult(intent, requestCode);

(七)、Flags 属性:Intent 可调用addFlags()方法来为Intent 添加控制标记。【重要】

1 、FLAG_ ACTIVITY_CLEAR_TOP:(效果同Activity LaunchMode的singleTask)

如果在栈中已经有该Activity的实例,就重用该实例。重用时,会让该实例回到栈顶,因此在它上面的实例将会被移除栈。如果栈中不存在该实例,将会创建新的实例放入栈中。

2 、FLAG_ACTIVITY_SINGLE_TOP:(效果同Activity L aunchMode的singleTop)

如果在任务的栈顶正好存在该Activity的实例, 就重用该实例,而不会创建新的Activity 对象。

3 、FLAG_ ACTIVITY_NEW_TASK:

【备注:】以下几个为了解。

4 、FLAG_ACTIVITY_MULTIPLE_TASK:

5 、FLAG_ACTIVITY_BROUGHT_TO_FRONT:

6 、F L AG _AC T IV I T Y _ R ES ET _ TAS K_ I F _ N EEDED:

示例代码:

Intent intent = new Intent(this,MainActivity.class);

//将Activity栈中处于MainActivity主页面之上的Activity都弹出。

intent.setFlags(Intent.FLAG_ACTI VI TY_CLEAR_TOP);

startActivity(intent);

例如:

如果依次启动了四个Activity :A、B、C 、D。

在D Activity 里,跳到B Activity,同时希望D和C 都finish掉,可以在startActivity (intent )里的intent 里添加flags标记,如下所示:

Intent  intent  =   new   Intent(t his ,   B. c las s );

intent .setFlags (Intent .FLAG_ACTIVITY_CLEAR_TOP);

s t ar t Activity(intent );

这样启动B  Activity的同时,就会把D、C 都finis hed掉。

如果B  Activity的launchMode是默认的“st andar d”,则B  Activity会首先finis hed掉旧的B页面,再启动一个新的Activity   B。   如果不

想重新再创建一个新的B  Activity,而是重用之前的B  Activity,可以将B  Activity的launchMode设置为“singleTask”。【特别需要注

意的是:在部分手机中,如三星手机。即便是singleTask也会产生新的页面,而不是重用之前的页面。】

四、Activity 的launchMode

1 、standard:  (备注:standard是系统默认的启动模式。)

标准启动模式,每次激活Activity 时都会创建Activity,并放入任务栈中。

如果启动此Activity 的Intent中没有设置FLAG_ACTIVITY_NEW_TASK标志,  则这个Activity 与启动他的Activity在同一个T as k中, 如果设

置了Activity 请参考上面FLAG_ACTIVITY_NEW_TASK的详细说明, “launchMode”设置为"s t andar d"的Activity 可以被实例化多次,  可以在

T as k中的任何位置,  对于一个新的Intent 请求就会实例化一次.

2 、s ingleTop:

如果在任务的栈顶正好存在该Activity 的实例, 就重用该实例,而不会创建新的Activity 对象,不过它会调用onN ew Intent ()方法。

如果栈顶部不存在就会创建新的实例并放入栈顶(即使栈中已经存在该Activity 实例,只要不在栈顶,都会创建实例)。

如果启动此Activity 的Intent中没有设置FLAG_ACTIVITY_NEW_TASK标志,  则这个Activity 与启动他的Activity在同一个T as k中, 如果设

置了Activity 请参考上面FLAG_ACTIVITY_NEW_TASK的详细说明, “launchMode”设置为"s ingleTop"的Activity 可以被实例化多次,    可以

在T as k中的任何位置,  对于一个新的Intent请求如果在T as k栈顶,  则会用栈顶的Activity响影Intent 请求, 而不会重新实例化对象接收请求,  如

果没有在栈顶,  则会实例化一个新的对象接收Intent 请求.

3 、singleTask:

如果在栈中已经有该Activity 的实例,就重用该实例(会调用实例的onN ew Intent ())。重用时,会让该实例回到栈顶,因此在它上面

的实例将会被移除栈。如果栈中不存在该实例,将会创建新的实例放入栈中。

和s ingleTop在名字上即可看出区别,即s ingleTop每次只检测当前栈顶的Activity 是否是我们需要请求创建的,而singleTask则会检

测栈中全部的Activity 对象,从上向下,如果检测到是我们所请求的则会消灭此Activity 对象上面的对象,直接把检测到的我们需要的

Activity 置为栈顶。

“launchMode”设置为" singleTask"的Activity 总是在栈底,  只能被实例化一次,  它允许其它Activity 压入"singleTask"的Activity 所在

的T as k栈, 如果有新的Intent 请求有此标志的Activity ,  则系统会清除有此标志的T as k栈中的全部Activity, 并把此Activity 显示出来.

4 、singleInstance:

在一个新栈中创建该Activity 实例,并让多个应用共享该Activity 实例。一旦这种模式的Activity 实例存在于某个栈中,任何应用再激

活这个Activity 时都会重用该栈中的实例,其效果相当于多个应用程序共享一个应用,不管谁激活该Activity 都会进入同一个应用中。此启

动模式和我们使用的浏览器工作原理类似,在多个程序中访问浏览器时,如果当前浏览器没有打开,则打开浏览器,否则会在当前打开的

浏览器中访问。此模式会节省大量的系统资源,因为他能保证要请求的Activity 对象在当前的栈中只存在一个。

“launchMode”设置为”singleInstance”的Activity总是在栈底,  只能被实例化一次,  不允许其它的Activity 压入”singleInstance”的

Activity 所在T as k栈,    即整个T ask栈中只能有这么一个Activity .

五、利用Intent 属性调用系统app的示例代码:

1、布局核心代码:

<ScrollView
      android:id="@+id/ScrollView1"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" >
      <LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical" >           <Button
              android:id="@+id/Button_main_call "
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 直接拨号" />           <Button
              android:id="@+id/Button_main_dial"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 启动拨号面板" />           <Button
              android:id="@+id/Button_main_dialer"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text="显示拨号面板" />           <Button
              android:id="@+id/Button_main_sms"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton "
              android:text="发送短信" />           <Button
              android:id="@+id/Button_main_setting"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton "
              android:text="系统设置" />           <Button
              android:id="@+id/Button_main_datesetting"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 日期设置" />           <Button
              android:id="@+id/Button_main_soundsetting"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 声音设置" />           <Button
              android:id="@+id/Button_main_wifisetting"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" W I F I 设置" />           <Button
              android:id="@+id/Button_main_web"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 浏览网页" />           <Button
              android:id="@+id/Button_main_contacts"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 查看联系人" />           <Button
              android:id="@+id/Button_main_showimage"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 查看图片" />           <Button
              android:id="@+id/Button_main_showtext"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 查看文本" />           <Button
              android:id="@+id/Button_main_playvideo"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 播放视频" />           <Button
              android:id="@+id/Button_main_playaudio"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" 播放音频" />           <Button
              android:id="@+id/Button_main_home"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:onClick="clickButton"
              android:text=" H O M E " />
      </LinearLayout>
  </ScrollView>

2 、java核心代码:

public class MainActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.a);
} public void clickButton(View view)
{
Intent intent = new Intent();
// android.content.intent.ACTION_VIEW
intent.setAction(android.content.Intent.ACTION_VIEW);
switch (view.getId())
{
case R.id.Button_main_call:
intent.setAction(android.content.Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:10086"));
break;
case R.id.Button_main_dial:
intent.setAction(android.content.Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:10086"));
break;
case R.id.Button_main_dialer:
intent.setAction("com.android.phone.action.TOUCH_DIALER");
break;
case R.id.Button_main_sms:
intent.setAction(android.content.Intent.ACTION_SENDTO);
intent.setData(Uri.parse("smsto:10086"));
intent.putExtra("sms_body", "该吃饭了,下课吧!");
break;
case R.id.Button_main_setting:
intent.setAction("android.settings.settings");
break;
case R.id.Button_main_datesetting:
intent.setAction("android.settings.DATE_settingS");
break;
case R.id.Button_main_soundsetting:
intent.setAction("android.settings.SOUND_settingS");
break;
case R.id.Button_main_wifisetting:
intent.setAction("android.settings.WIFI_settings");
break;
case R.id.Button_main_contacts:
intent.setAction("com.android.contacts.action.LIST_contacts");
break;
case R.id.Button_main_web:
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setData(Uri
.parse("http://www.baidu.com"));
break;
case R.id.Button_main_showimage:
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(
Uri.fromFile(new File(
"mnt/sdcard/Download/landscape.jpg")),
"image/*");
break;
case R.id.Button_main_showtext:
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(
Uri.fromFile(new File(
"mnt/sdcard/Download/info.txt")),
"text/*");
break;
case R.id.Button_main_playaudio:
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(
Uri.fromFile(new File(
"mnt/sdcard/Download/heavencity.mp3")),
"audio/*");
break;
case R.id.Button_main_playvideo:
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(
Uri.fromFile(new File(
"mnt/sdcard/Download/girl.3gp")),
"video/*");
break;
case R.id.Button_main_home:
intent.setAction("android.intent.action.main");
intent.addCategory("android.intent.category.HOME");
break;
default:
break;
}
startActivity(intent);
}
}

Android中的intent属性的更多相关文章

  1. Android中的windowSoftInputMode属性详解

    这篇文章主要介绍了Android中的windowSoftInputMode属性详解,本文对windowSoftInputMode的9个属性做了详细总结,需要的朋友可以参考下     在前面的一篇文章中 ...

  2. Android中的Intent详解

    前言: 每个应用程序都有若干个Activity组成,每一个Activity都是一个应用程序与用户进行交互的窗口,呈现不同的交互界面.因为每一个Acticity的任务不一样,所以经常互在各个Activi ...

  3. android中使用Intent在activity之间传递数据

    android中intent传递数据的简单使用: 1.使用intent传递数据: 首先将需要传递的数据放入到intent中 Intent intent = new Intent(MainActivit ...

  4. Android中目的地Intent的使用

    一.什么是Intent? Intent的中文意思是目的.在Android中也是“目的”的意思.就是我们要去哪里,从这个activity要前往另一个Activity就需要用到Intent. 示例代码一: ...

  5. Android中Edittext的属性

    //此为转载别人的,挺不错的 1.EditText输入的文字为密码形式的设置 (1)通过.xml里设置: 把该EditText设为:android:password="true"  ...

  6. android中xml tools属性详解

    第一部分 安卓开发中,在写布局代码的时候,ide可以看到布局的预览效果. 但是有些效果则必须在运行之后才能看见,比如这种情况:TextView在xml中没有设置任何字符,而是在activity中设置了 ...

  7. android中xmlns:tools属性详解

    今天读到一篇总结的非常棒的文章,写的逻辑很清晰也很实用,很少见到如此棒的文章了.就原文转发过来,我把格式给整理了一下,分享给园子里的各位朋友!好久没写博客了,就为2015年的11月留份纪念吧.希望对你 ...

  8. Android中的Intent Filter匹配规则介绍

    本文主要介绍了隐式Intent匹配目标组件的规则,若有叙述不清晰或是不准确的地方希望大家指出,谢谢大家: ) 1. Intent简介 Intent用于在一个组件(Component,如Activity ...

  9. Android中的sharedUserId属性详解

    在Android里面每个app都有一个唯一的linux user ID,则这样权限就被设置成该应用程序的文件只对该用户可见,只对该应用程序自身可见,而我们可以使他们对其他的应用程序可见,这会使我们用到 ...

随机推荐

  1. 国际化:Java平台下的Locale类

    Locale类有如下几个构造器: Locale(String language) Locale(String language, String country) Locale(String langu ...

  2. Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/***]]

    问题描述:Tomcat容器和Eclipse启动运行时候报错 Failed to start component [StandardEngine[Catalina].StandardHost[local ...

  3. Log Reservation

    本文是在阅读<SQL Server Transaction Log Management>的Chapter 2: Log Internals时发现以往对Log Grows的理解比较片面,大 ...

  4. maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    maven 导入项目中经常出现这个问题 严重: Error configuring application listener of class org.springframework.web.cont ...

  5. java基本类型与Hadoop常见基本类型的对照

    Long LongWritable Integer IntWritable Boolean BooleanWritable String Text 1.java类型转化为hadoop基本类型 调用ha ...

  6. Eclipse dynamic web project 插件

    下载了Eclipse Oxygen   发现没有Dynamic web  Project 首先我们先了解下Dynamic  Web Project  If you want to create a c ...

  7. 关于ios::sync_with_stdio(false)

    作用就是取消同步,这样的话使用cin就和使用scanf效率相似. 但是今天在做题的时候碰到一点小问题,就是在关闭同步的时候使用scanf是交了一发代码,然后RE了(经检查scanf没有写错),而把关同 ...

  8. 国外支付PayPal

    PayPal官网https://www.paypal.com/ PayPal沙箱https://www.sandbox.paypal.com/signin?country.x=US&local ...

  9. java集合系列——List集合之LinkedList介绍(三)

    1. LinkedList的简介 JDK 1.7 LinkedList是基于链表实现的,从源码可以看出是一个双向链表.除了当做链表使用外,它也可以被当作堆栈.队列或双端队列进行操作.不是线程安全的,继 ...

  10. matplotlib学习之绘图基础

    matplotlib:http://www.cnblogs.com/jasonhaven/p/7609059.html 1.基本图形 散点图:显示两组数据的值,每个点的坐标位置由变量的值决定,头一组不 ...