package com.itant.filetransfer;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {

	private Button btn_sender;
	private Button btn_receiver;
	
	
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        btn_sender = (Button) findViewById(R.id.btn_sender);
        btn_sender.setOnClickListener(this);
        btn_receiver = (Button) findViewById(R.id.btn_receiver);
        btn_receiver.setOnClickListener(this);
    }
    
    
    
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.btn_sender:
			// 点击了“我是发送方”
			startActivity(new Intent(MainActivity.this, SenderActivity.class));
			break;

		case R.id.btn_receiver:
			// 点击了“我是接收方”，
			startActivity(new Intent(MainActivity.this, ReceiverActivity.class));
			break;
		default:
			break;
		}
	}
}
