My app crashes when I click on listview

      @Override public void onItemClick(AdapterView parent, View view, int position, long id) {

       if(position==0){ 
            Intent intent = new Intent(MainActivity.this,login.class);
            startActivity(intent);
       } 

       selectedItem(position); 
      }

The parameter to start activity is wrong. But still with that code, compiler shouldn’t allow you.
Is it crash or compiler error?

Browse More Popular Posts

Leave a Comment