vikshep singh

Greenhorn
+ Follow
since Jun 21, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vikshep singh

Not sure what you are trying to do here. Just remove the line finish(); under the OnClickListener and the code should run.
You are forcing the activity to close by calling finish();.

Button sB;
EditText ET;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.writestory);

ET = (EditText)findViewById(R.id.story);

sB = (Button)findViewById(R.id.sb);

sB.setOnClickListener(
new View.OnClickListener()
{
public void onClick(View view)
{
Log.v("EditText", ET.getText().toString());
//finish(); Remove this line
}
});
12 years ago