[Solved] calling a method from an onClick listener [duplicate]


Use this code:

    @Override
    public void onClick(View view) {
        // TODO Auto-generated method stub
        //public void work (View view){
        Intent intent = new Intent(PDFtester.this, copyAsset.class);
        startActivity(intent);}         
    }

Note :- Interfaces like OnClickListener,OnTouchListener etc don’t use this for getting Context try to use YourActivity.this or getApplicationContext()

2

solved calling a method from an onClick listener [duplicate]