inform.java  

 

       ImageButton a = (ImageButton)findViewById(R.id.a);
        a.setOnClickListener(new OnClickListener() {
         public void onClick(View v) {
         AlertDialog.Builder b1=new AlertDialog.Builder(inform.this);
       b1.setTitle("Notice");
       b1.setMessage("Start!!");
       b1.setNegativeButton("아니요", null);
       b1.setPositiveButton("예", new DialogInterface.OnClickListener() {
    
    @Override
    public void onClick(DialogInterface dialog, int which) {
     // TODO Auto-generated method stub
     Intent intentItem1=new Intent(inform.this, map.class);
        startActivity(intentItem1);
    }
   });
       b1.show();
         }
        });

 

map.java

public class map extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.map);
    } 
}

 

alertdialog에서 intent이용해서 map레이아웃으로 화면 전환하려고 합니다.

그래서 예 버튼을 누르면 화면 전환이 되어야 하는데 에러가 떠요.

먼가 잘못 된거죠?

파일 첨부는 '예'버튼을 눌렀을때 나오는 에러창이예요.