How to call an Activity from a Baseexpandablelistadapter?

Asked

Viewed 282 times

0

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, there is a way to do this?

Code:

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

        @Override
        public void onClick(View v) {
            Intent i = new Intent(ExpandableAdapterMenuCompleto.this, DetalhesItemContaCliente.class);  
            StartActivity(i);           
        }
    });

1 answer

0


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

  • 2

    Raphael, it would be interesting and would make your answer more complete, if it showed how it is done.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.