1、功能函数:
public class MainActivity extends Activity implements OnClickListener{
private EditText phone;
private EditText message;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
phone = (EditText) findViewById(R.id.et_phone);
message = (EditText) findViewById(R.id.et_sms_content);
Button sendBtn = (Button) findViewById(R.id.send_btn);
sendBtn.setOnClickListener(this);
}
@Override
public void onClick(View v) {
int id = v.getId();
switch (id) {
case R.id.send_btn: