Null pointer exception in getView() of custom Adapter
问题 I am using this Custom Adapter for my ListView: public class SideMenuAdapter extends BaseAdapter { private static final int TYPE_MAX_COUNT = 2; private static LayoutInflater inflater = null; private Activity activity; public static String[] values; ListView myList; public SideMenuAdapter(Activity a, String[] sa, ListView lv) { values = sa; activity = a; inflater = (LayoutInflater) activity .getSystemService(Context.LAYOUT_INFLATER_SERVICE); myList = lv; } public int getCount() { return values