Hello
Hello
Hello World
我是黑体字
我是微软雅黑
我是华文彩云
package com.example.kimberjin.reviewpro;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
/**
* Created by KimberJin on 2018/7/25.
*/
public class SecondActivity extends AppCompatActivity implements View.OnClickListener{
private String returnString = null;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
Button retBtn = (Button)findViewById(R.id.myBtn1);
retBtn.setOnClickListener(this);
}
@Override
public void onClick(View view) {
Intent intent = new Intent("android.intent.action.MAIN");
EditText editText = (EditText)findViewById(R.id.myEditText1);
returnString = editText.getText().toString();
Bundle bundle = new Bundle();
bundle.putInt("id", 456);
bundle.putString("name", "Tommy");
bundle.putDouble("score", 98.5);
intent.putExtras(bundle);
intent.putExtra("myContent", returnString);
setResult(RESULT_OK, intent);
finish();
}
}