package com.example.test;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.*;
public class TestActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final TextView txtHint = (TextView)findViewById(R.id.main);
final TextView txtResult =
(TextView)findViewById(R.id.result);
final EditText edtOp1 = (EditText)findViewById(R.id.op1);
final EditText edtOp2 = (EditText)findViewById(R.id.op2);
final Button btnAdd = (Button)findViewById(R.id.submitButton);
btnAdd.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
int a,b;
a = Integer.parseInt(edtOp1.getText()); //How
can i get
edtOp1(EditText) valu in variable a
}
});
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en