How to call an activity from a BaseExpandableListAdapter?


I would like to call an activity from the click of a button, but it does not work because the source class is not an activity, but a BaseExpandableListAdapter, is there a way to do this?


holder.btnDetalhes.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {
            Intent i = new Intent(ExpandableAdapterMenuCompleto.this, DetalhesItemContaCliente.class);  
asked by anonymous 31.01.2015 / 13:43

1 answer


You need to pass the Context to your Adapter class and pass it as Intent parameter.

31.01.2015 / 13:59