
private void stick_controller() {
LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LinearLayout stick_Layout = (LinearLayout)vi.inflate(R.layout.stick_controller, null);
show_api();
new AlertDialog.Builder(this)
.setTitle("스틱 컨트롤러")
.setView(stick_Layout)
.setNeutralButton("닫기", null)
.show();
}
private void show_api() {
Button go_btn = (Button)findViewById(R.id.go_btn);
go_btn.setOnClickListener(this);
Button back_btn = (Button)findViewById(R.id.back_btn);
back_btn.setOnClickListener(this);
Button stop_btn = (Button)findViewById(R.id.stop_btn);
stop_btn.setOnClickListener(this);
Button left_btn = (Button)findViewById(R.id.left_btn);
left_btn.setOnClickListener(this);
Button right_btn = (Button)findViewById(R.id.right_btn);
right_btn.setOnClickListener(this);
}
----------------------------
이런 식으로 대화상자 안에 버튼으로 컨트롤러를 만드려고 하는데
setOnClickListener 에서 오류가 나더군요...
다른 방법 있을까요?