package com.gclue.myapplication;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity implements View.OnClickListener {
/** Button. */
private Button mButton01;
/** TextView. */
private TextView mTextView01;
/** EditText. */
private EditText mEditText01;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mButton01 = (Button) findViewById(R.id.button01);
mButton01.setOnClickListener(this);
mTextView01 = (TextView) findViewById(R.id.textView01);
mEditText01 = (EditText) findViewById(R.id.editText01);
}
@Override
public void onClick(View v) {
if (v.equals(mButton01)) {
mTextView01.setText(mEditText01.getText());
}
}
}