안드로이드 개발 질문/답변
(글 수 45,052)
이미지를 버튼에 씌워 그 버튼이 누르면 액티비티가 변하는 메인을 만들었는데
매니페스트에 액티비티 등록도 다해놓고 인텐트도 오류없는데 버튼 누르면 오류가 나네요
앱솔루트 레이아웃에
<Button
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/onbtn"
android:background="@drawable/list"
android:layout_y="90dip"
android:layout_x="170dip"></Button>
이런식으로 버튼을 만들어서 배치를 했는데 뭐가문제인지 잘모르겠습니다.
버튼부분쪽 소스는
View OnButton = findViewById(R.id.onbtn);
OnButton.setOnClickListener(this);
.
.
.
public void onClick(View v) {
switch (v.getId()) {
case R.id.onbtn:
Intent i = new Intent(this, OnOffActivity.class);
startActivity(i);
break;
이런식입니다 어떤부분이 잘못된것일까요 ㅜ



