ID

2 replies [Last post]
stienoo
User offline. Last seen 2 years 36 weeks ago. Offline
Joined: 05/27/2009

I want to make UI Events but Eclipse underlines something in red:

Button button = (Button)findViewById(R.id.corky);

He underline "R.id".

I have a button whit the name "Ok"
what am I doing wrong?

My full class:

package stijn.test; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class Test extends Activity implements OnClickListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button)findViewById(R.id.corky); button.setOnClickListener(this); } public void onClick(View v) { // do something when the button is clicked } }

1xuntong
User offline. Last seen 5 weeks 2 days ago. Offline
Joined: 12/25/2011
miu miu

prada bags discount gently move, who place constantly. Make the eyes of tentacles, birds, plants must be leaves, branches of the image is clear, these figures are remarkably true. Wear it on the head, no doubt, will increase a JiaoTai beautiful appearance.

pandorauk
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 12/07/2010
Way back in Pandora I was

Way back in Pandora I was approached by Sid’s mother to do a book about Sid Vicious, obviously. With Pandora Bracelets crystal ball in one hand