You should change this
popcash = (ImageButton)findViewById(R.id.popcash);
With
popcash = (ImageButton)layout.findViewById(R.id.popcash);
and also change this
popcoin = (ImageButton) findViewById(R.id.popcoin);
with
popcoin = (ImageButton) layout.findViewById(R.id.popcoin);
It's because your both buttons coming from view layout
that you inflated
.