Android Tutorial : Get Text Value from EditText from Code
Posted May 11, 2012
on:Button mButton;
EditText mEdit;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mButton = (Button)findViewById(R.id.button);
mEdit = (EditText)findViewById(R.id.edittext);
mButton.setOnClickListener(
new View.OnClickListener()
{
public void onClick(View view)
{
Log.v("EditText", mEdit.getText().toString());
}
});
Advertisements
February 5, 2014 at 03:26
We are a group of volunteers and opening a new scheme in our community.
Your web site offered us with valuable info to work on.
You’ve done a formidable job and our whole community will be thankful to you.