package kr.co.wikibook.mutiple_activity;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Button;
public class FirstActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button fa_next_button = (Button) findViewById(R.id.fa_next_button);
fa_next_button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Log.i("Multi Activity", "Button click is occured..");
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.first, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
setonclicklistener과 onclicklistener view log 에서 빨간줄이 뜨네요 impot 시켜보고나서 별다른 방법을 몰라서 올려봅니다