[Solved] Intent throwing error in click listener in Android Studio

Problem is you are setting wrong layout in your UserLogin Activity. You are setting activity_main.xml instead you need to set your UserLogin Activity layout XML file . You are doing like this setContentView(R.layout.activity_main); Instead you need to do like setContentView(R.layout.YOUR_USER_LOGIN_ACTIVITY_LAYOUT); 8 solved Intent throwing error in click listener in Android Studio

[Solved] Integer cannot be cast to java.util.HashMap

this is previous code on my custom adapter: @Override public Object getItem(int position) { // TODO Auto-generated method stub return (position); } and this is solved code in my custom adapter: @Override public Object getItem(int position) { // TODO Auto-generated method stub return data.get(position); } in which datais defined as ArrayList<HashMap<String, String>> data; solved Integer … Read more