1

findViewById returns null on second call

view story
linux-howto

http://stackoverflow.com – I've created a ListView with a list of items, each with their own delete button. I've overridden the getView method in the ArrayAdapter and attached a handler to the delete button. The problem is, the getView method is being called twice. On the second time, the v.findViewById(DeleteButton) call returns null. I've inspected the view and the ImageButton is there in the hierarchy, but the Id is 0. Can anyone explain why this is happening please? ManualFragment.java public class ManualFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup (HowTos)