views:

473

answers:

0

Hi,

I created a custom View Round button which consists of an image and some text. I tried to bind a method to it but it doesn't work and don't know what could be the reason.

In the main.xml (layout file) i set the parameter clickable to true and in the onCreate method in the main activity i added the following lines:

rbActionButton = (RoundButton)findViewById(R.id.actionButton);

 rbActionButton.setOnClickListener(new OnClickListener(){
  public void onClick(View view){
   onActionButton();
  }
 });

Does anyone know whether there's anything missing or the reason it doesn't work?

Thanks!