medyo / Fancybuttons

Icons, Borders, Radius ... for Android buttons
1.77k stars 397 forks source link

how to use onClic for open à new activity on francybuttons? #44

Closed xpatient closed 8 years ago

xpatient commented 8 years ago

Pleased help me!! I sant To use francybutton for To open many activitiés

medyo commented 8 years ago

Hi @xpatient,

Like any other view, the click event works by implementing the onClickListener. Here is an example :

FancyButton myFancyButton = (FancyButton) findViewById(R.id.my_fancy_button);
myFancyButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                // Open activity <NextActivity.class>
                Intent myIntent = new Intent(CurrentActivity.this, NextActivity.class);
                startActivity(myIntent);
            }
        });