Activity中的数据传送—案例: 购买装备

本文介绍了一个简单的Android应用程序,该程序允许用户为虚拟角色购买装备来提升其生命值、攻击力和敏捷度。通过两个活动(主界面和商店界面)的交互,用户可以查看装备属性并将其应用于角色。

1.先打开Android Studio
2.创建工程。
(1)设计用户交互页面,如图:
这里写图片描述

程序对应的布局文件(activity_main.xml)如下所示,在布局代码中用到了ProgressBar(进度条),它是用来显示小宝宝的生命值、攻击力、敏捷度的。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
<ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/xiaoboabao"
   android:layout_gravity="center_horizontal"/>
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="主人,快给小宝宝购买装备吧!"
        android:textSize="20dp"
        android:layout_gravity="center_horizontal"/>
    <TableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="25dp">
        <TableRow
            android:layout_marginTop="10dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginRight="20dp"
                android:text="生命值:"
                android:gravity="right"/>
            <ProgressBar
                android:id="@+id/pbsm1"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:layout_weight="3"
                />
            <TextView
                android:id="@+id/tv_life"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginLeft="20dp"
                android:text="0"
                />
        </TableRow>
        <TableRow
            android:layout_marginTop="10dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginRight="20dp"
                android:text="攻击力:"
                android:gravity="right"/>
            <ProgressBar
                android:id="@+id/pbsm2"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:layout_weight="3"
                />
            <TextView
                android:id="@+id/tv_attack"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginLeft="20dp"
                android:text="0"
                />
        </TableRow>
        <TableRow
            android:layout_marginTop="10dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginRight="20dp"
                android:text="敏捷:"
                android:gravity="right"/>
            <ProgressBar
                android:id="@+id/pbsm3"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="0dp"
                android:layout_marginTop="5dp"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                />
            <TextView
                android:id="@+id/tv_speed"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginLeft="20dp"
                android:text="0"
                />
        </TableRow>

    </TableLayout>

    <LinearLayout
        android:layout_marginTop="20dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:gravity="center">
        <Button
            android:id="@+id/b_btn1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:drawableRight="@android:drawable/ic_menu_add"
            android:layout_marginRight="40dp"
            android:drawablePadding="3dp"
            android:onClick="click1"
            android:text="主人购买装备"/>

        <Button
            android:id="@+id/btn2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:drawableRight="@android:drawable/ic_menu_add"
            android:drawablePadding="3dp"
            android:text="小宝宝购买装备"/>
    </LinearLayout>
</LinearLayout>

(2)创建装备界面,该界面用来展示装备的,运行结果图如下所示:
这里写图片描述

购买装备界面(activity_shop.xml)对应的布局文件如下所示:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rl"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <View
        android:id="@+id/view"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:background="@android:drawable/ic_menu_info_details"
        android:layout_marginTop="50dp"
        />
    <TextView
        android:id="@+id/tv_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="55dp"
      android:layout_marginLeft="40dp"
        android:layout_toRightOf="@id/view"
        android:text="商品名称" />
    <LinearLayout

        android:layout_toRightOf="@id/tv_name"
        android:layout_marginTop="40dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="40dp"
        android:orientation="vertical">
        <TextView
            android:id="@+id/life"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="13sp"
            android:text="生命值"/>
        <TextView
            android:id="@+id/attrack"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="13sp"
            android:text="攻击力"/>
        <TextView
            android:id="@+id/speed"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="13sp"
            android:text="速度"/>
    </LinearLayout>
</RelativeLayout>

(3)创建Info类。在程序中创建一个cn.bzu.domain包,在该包中创建一个Info类,用于封装装备信息。需注意的是:Intent除了传递基本类型之外,也能传递Serializable和Parcelable类型的数据,这里让Info实现Serializable接口。代码如下:

package bzu.edu.cn.hj.cn.bzu.domain;
import java.io.Serializable;
/**
 * Created by yn on 2017/3/23.
 */
public class Info implements Serializable{
    private String name;
    private int life;
    private int attack;
    private int quick;

    public Info(String name, int life, int attack, int quick) {
        this.name = name;
        this.life = life;
        this.attack = attack;
        this.quick = quick;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLife() {
        return life;
    }

    public void setLife(int life) {
        this.life = life;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public int getQuick() {
        return quick;
    }

    public void setQuick(int quick) {
        this.quick = quick;
    }
}

(4)创建ShopActivity.用来展示装备信息的,当点击ShopActivity页面时,会调回MainActivity,并将带数据回传给MainActivity。具体代码如下:

package bzu.edu.cn.hj;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import bzu.edu.cn.hj.cn.bzu.domain.Info;
import static bzu.edu.cn.hj.R.id.info;

public class ShopActivity extends AppCompatActivity implements View.OnClickListener{
    private TextView name,life,attack,speed;
    private Info info;
    @Override
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shop);
        //(1)初始化显示到界面上的数据
        info=new Info("金剑",20,100,20);
        //(2)找需要的控件
        findViewById(R.id.rl).setOnClickListener(this);
        name=(TextView)findViewById(R.id.tv_name);
        life=(TextView)findViewById(R.id.life);
        attack=(TextView)findViewById(R.id.attrack);
        speed=(TextView)findViewById(R.id.speed);
        //(3)初始化数据
        name.setText(info.getName()+"");
        life.setText("生命值+"+info.getLife());
        attack.setText("攻击力+"+info.getAttack());
        speed.setText("敏捷度+"+info.getQuick());
    }
    @Override
    public void onClick(View view){
        switch(view.getId()){
            case R.id.rl:
                Intent intent=new Intent();
                intent.putExtra("info",info);
                setResult(10,intent);
                finish();
                break;
            default:
                break;
        }
    }
}

(5)编写界面交互代码(MainActivity),主要用于响应按钮的点击事件。代码如下:

package bzu.edu.cn.hj;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
import bzu.edu.cn.hj.cn.bzu.domain.Info;

public class Main6Activity extends AppCompatActivity {
    private ProgressBar pb1, pb2, pb3;
    private TextView life, speed, attack;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main6);

        //找到我们需要的控件
        pb1 = (ProgressBar) findViewById(R.id.pbsm1);
        pb2 = (ProgressBar) findViewById(R.id.pbsm2);
        pb3 = (ProgressBar) findViewById(R.id.pbsm3);

        life = (TextView) findViewById(R.id.tv_life);
        attack = (TextView) findViewById(R.id.tv_attack);
        speed = (TextView) findViewById(R.id.tv_speed);
        //初始化一下进度条的最大值
        pb1.setMax(1000);
        pb2.setMax(1000);
        pb3.setMax(1000);
    }
    //点击按钮跳转到另一个ShopActivity,进行购买装备
    public void click1(View v) {
        Intent intent = new Intent(this, ShopActivity.class);

        startActivityForResult(intent, 1);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {

        if (resultCode == 10) {
            Info info = (Info) data.getExtras().get("info");
            updateProgressBar(info);

        }
        super.onActivityResult(requestCode, resultCode, data);
    }

    private void updateProgressBar(Info info) {
        int p1 = pb1.getProgress();
        int p2 = pb2.getProgress();
        int p3 = pb3.getProgress();

        pb1.setProgress(p1 + info.getLife());
        pb2.setProgress(p2 + info.getAttack());
        pb3.setProgress(p3 + info.getQuick());

        life.setText(pb1.getProgress() + "");
        attack.setText(pb2.getProgress() + "");
        speed.setText(pb3.getProgress() + "");

    }
}

(6).运行结果图
这里写图片描述
点击“主人购买装备”按钮,会跳转到装备显示界面,装备购买成功后,会看到下图:
这里写图片描述
到这里,案例就完成了。

Activity进阶篇 课程回顾 Activity的创建过程 Activity的生命周期 Activity的启动模式 Intent的两种使用方法 本讲内容 1、Activity数据传递方式 Intent不仅可以用来开启Activity,也可以在Activity之间传递数据。在数据传递时,可以使用putExtra()方 法将数据存储在Intent中。 方法一: 1 2 3 4 String data = "Hello Activity02"; Intent intent = new Intent(this,Activity02.class); intent.putExtra("extra_data",data); startActivity(intent); 将数据Activity02中取出的方法: 1 2 Intent intent = getIntent(); String data = = intent.getStringExtra("extra_data"); 方法二: putExtra()不仅可以传递基本类型数据,还可以传递Bundle对象。 1 2 3 4 5 Bundle bundle = new Bundle(); bundle.putString("name", "Linda"); Intent intent = new Intent(this,Activity02.class); intent.putExtras(bundle); startActivity(intent); 将Bundle对象数据Activity02中取出的方法: 1 2 3 Intent intent = getIntent(); Bundle bundle = intent.getExtras(); String stuName = bundle.getString("name"); 案例分析——用户注册 按照“视图-控制-模型”三个层次进行设计,过程如下: 1 2 3 4 5 创建主Activity(MainActivity)及其布局文件activity_main.xml,以及从 Activity(LoginSuccessActivity)及其布局文件activity_login_success.xml 在MainActivity的“登录”控件的点击事件处理机制中,将用户名和密码保存到新创建的Intent中,然 后将该Intent发送给LoginSuccessActivity public class MainActivity extends AppCompatActivity { EditText nameEditText; EditText passwordEditText; Button loginButton; 在LoginSuccessActivity接收传送过来的Intent,并将其数据显示在布局文件activity_login_success.xml 中。 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); /*为“登录”按钮设置事件监听机制*/ loginButton = findViewById(R.id.login_button); loginButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { /*获取EditText控件中的用户名和密码*/ nameEditText = findViewById(R.id.user_edit_text); passwordEditText = findViewById(R.id.password_edit_text); String name = nameEditText.getText().toString().trim(); String password = passwordEditText.getText().toString().trim(); /*若用户名为“liu”,且密码为“123456”,则提示用户“登录成功”*/ if ((name.equals("liu") && password.equals("123456"))) { passData(name, password); } else { Toast.makeText(MainActivity.this, "用户名或者密码错误!", Toast.LENGTH_SHORT).show(); } } }); } private void passData(String name, String password) { Intent intent = new Intent(MainActivity.this, LoginSuccessActivity.class); /*将MainActivity中的用户名和密码保存到intent当中*/ intent.putExtra("name", name); intent.putExtra("password", password); startActivity(intent); } } 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 public class LoginSuccessActivity extends AppCompatActivity { TextView mUserTextView; TextView mPasswordTextView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login_success); /*获取传送过来的Intent,并取出其中的数据*/ Intent intent = getIntent(); String name = intent.getStringExtra("name"); String password =intent.getStringExtra("password"); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2、Activity数据回传方法 在使用新浪微博APP时,能发现在微博发布页面进入图库选择图片后,会回到微博发布页面并带回了图 片选择页面的图片信息。这个功能的实现利用了Activity回传数据。实现过程分为以下三步: Activity01利用startActivityForResult()方法,将数据传送Activity02。该方法接收两个参数,第一个 参数Intent用于保存所传递的数据,第二个参数requestCode用于判断数据的来源。例如: Activity02利用setResult()方法,将数据回传Activity01。该方法接收两个参数。第一个参数结果码 resultCode用于判定数据处理结果是否成功,一般使用0或1;第二个参数Intent用于携带要回传的数 据。示例如下: Activity01重写onActivityResult()方法,获取Activity02所返回的数据。该方法接收三个参数。第一个 参数请求码requestCode判断数据来源;第二个参数结果码resultCode用于判定数据处理结果是否成 功,一般使用0或1;第三个参数Intent用于携带要回传数据。示例如下: /*获取当前布局文件中的文本控件,并赋值*/ mUserTextView =findViewById(R.id.tv_username); mPasswordTextView = findViewById(R.id.tv_password); mUserTextView.setText("用户名:"+name); mPasswordTextView.setText("密码:"+password); } } 16 17 18 19 20 21 22 Intent intent=new Intent(Activity01.this,Activity02.class); startActivityForResult(intent, 1); 1 2 Intent intent=new Intent(); intent.putExtra(“equipment”, itemInfo); //封装数据,itemInfo为对象数据 setResult(1, intent); //回传数据,resultCode设为1,表示数据处理成功 finish(); //销毁当前Activity 1 2 3 4 案例分析——游戏装备购买 通过案例装备选择来演示Activity回传数据。本案例实现了购买装备增加生命值的功能。 构建MainActivity及其布局activity_main.xml,ShopActivity及其布局activity_shop.xml,详情参见附件 素材。 新知识:ProgressBar控件的使用。对于本案例,需要在activity_main.xml中增加以下ProgressBar控 件代码。 新知识:TableLayout控件和TableRow控件的使用。对于本案例activity_shop.xml的代码如下。 @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if(data!=null&&requestCode==1 &&resultCode==1){ /*从回传过来的Intent中获取数据*/ ItemInfo info=(ItemInfo) data.getSerializableExtra("equipment"); ······ //其他处理 } } 1 2 3 4 5 6 7 8 9 <ProgressBar android:id="@+id/pb_attack" style="@android:style/Widget.ProgressBar.Horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/tv_attack" android:layout_marginTop="10dp" android:max="1000" /> 1 2 3 4 5 6 7 8 在MainActivity中,为“购买装备”按钮设置单击事件监听机制,当用户单击该按钮时,创建一个 Intent,并将请求码requestCode设为1,然后将该Intent传递给ShopActivity。 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="10dp" tools:context=".ShopActivity"> <!--在本界面中创建一个只有一行的表格--> <TableLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="30dp"> <TableRow android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/tv_goods_name" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_weight="1" android:text="屠龙刀" android:textSize="20sp" /> <TextView android:id="@+id/tv_goods_function" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:text="攻击力100+" android:textSize="20sp" /> <Button android:id="@+id/bt_buy" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="20dp" android:layout_toRightOf="@id/tv_goods_function" android:text="购买" /> </TableRow> </TableLayout> </RelativeLayout> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mAttackProgressBar= findViewById(R.id.pb_attack); mAttackProgressBar.setProgress(100); /*为“购买装备”按钮设置单击事件监听机制*/ mBuyButton = findViewById(R.id.bt_buy_weapon); mBuyButton.setOnClickListener(new View.OnClickListener() { 1 2 3 4 5 6 7 8 9 10 在ShopActivity中,为“购买”按钮设置单击事件监听机制,当用户单击该按钮时,创建一个Intent, 将攻击力的数值添加到该Intent中,并将结果码resultCode设为1,然后将该Intent回传给 MainActivity。 说明: 请求码requestCode和结果码resultCode均可以设置为任意整数,只要发生数据传递的两个Activity之 间约定好即可。 在MainActivity中,重写方法onActivityResult(),获取ShopActivity所返回的数据,更新进度条。 @Override public void onClick(View v) { Intent intent = new Intent(MainActivity.this,ShopActivity.class); startActivityForResult(intent,1); } }); } 11 12 13 14 15 16 17 18 public class ShopActivity extends AppCompatActivity { Button mGoodsButton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_shop); mGoodsButton = findViewById(R.id.bt_buy); mGoodsButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent=new Intent(); intent.putExtra("aggressivity", "100"); setResult(1,intent); finish(); } }); } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if(data!=null&&requestCode==1 &&resultCode==1){ /*获取回传Intent中所包含的攻击力数据,据此更新进度条*/ String attackString = data.getStringExtra("aggressivity").toString().trim(); int attackNum = Integer.parseInt(attackString); updateProgress(attackNum); //更新进度条 } } private void updateProgress(int attackNum) { int currentValue = mAttackProgressBar.getProgress(); if(currentValue<1000){ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 按照“视图-控制-模型”三个层次进行设计,新知识点归纳如下: 视图层中添加进度条; 利用属性layout_width和layout_weight,实现TableLayout控件中各个控件在水平方向上的显示比 例。 3、课外作业 1)针对上述案例游戏装备购买”,在实现数据回传过程中,放弃使用startActivityForResult(),而是采用 registerForActivityResult()(具有更好的易用性和接口统一性)来实现对回传数据的监听和处理。 主调Activity中的代码如下: currentValue = currentValue + attackNum; mAttackProgressBar.setProgress(currentValue); }else{ Toast.makeText(MainActivity.this,"您的攻击力已经最 大!",Toast.LENGTH_SHORT).show(); } } 15 16 17 18 19 20 public class MainActivity extends AppCompatActivity { ProgressBar mAttackProgressBar; Button mBuyButton; /* *调用registerForActivityResult()方法来注册一个对Activity结果的监听。 * registerForActivityResult()方法接收两个参数,第一个参数是一种Contract类型, * 由于我们是希望从另外一个Activity中请求数据,因此这里使用了StartActivityForResult这种 Contract。 * 第二个参数是一个Lambda表达式,当有结果返回时则会回调到这里,然后我们在这里获取并处理数据 即可。 * */ private ActivityResultLauncher<Intent> intentActivityResultLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> { if (result.getResultCode()==RESULT_OK) { /*获取回传Intent中所包含的攻击力数据,据此更新进度条*/ String attackString = result.getData().getStringExtra("aggressivity").toString().trim(); int attackNum = Integer.parseInt(attackString); updateProgress(attackNum); //更新进度条 } }); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mAttackProgressBar = findViewById(R.id.pb_attack); mAttackProgressBar.setProgress(100); /*为“购买装备”按钮设置单击事件监听机制*/ mBuyButton = findViewById(R.id.bt_buy_weapon); mBuyButton.setOnClickListener(new View.OnClickListener() { @Override 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 public void onClick(View v) { Intent intent = new Intent(MainActivity.this, ShopActivity.class); intentActivityResultLauncher.launch(intent); } }); } /*更新进度条*/ private void updateProgress(int attackNum) { int currentValue = mAttackProgressBar.getProgress(); if (currentValue < 1000) { currentValue = currentValue + attackNum; mAttackProgressBar.setProgress(currentValue); } else { Toast.makeText(MainActivity.this, "您的攻击力已经最大!", Toast.LENGTH_SHORT).show(); } } } 2)程序调试 以“游戏装备购买案例为样本,–利用以下工具和技巧进行调试,解决项目中存在的问题,使之正常运行 并得到正确结果: 利用Build菜单中的Clean Project命令,重新编译项目。 利用测试框架Junit创建测试类。 利用android.util.log类的静态方法输入日志信息,并在程序运行时通过LogCat控制台查看Log信息。 通过Toast组件显示各种变量值,以观察错误。 设置断点,启动调试器跟踪程序运行过
最新发布
10-23
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值