Android image button open new activity

Detection score: 4.0

<p>ImageButton mainButton = (ImageButton) findViewById(R.id.imageButton);
        mainButton.setOnClickListener(new View.OnClickListener() {</p>

<pre><code>        @Override
        public void onClick(View v) {

            Intent intent = new Intent(context, MainActivity2.class);
            startActivity(intent);

        }
    });
</code></pre>
Posted 13 days ago | reported 13 days ago
Posted by user8603003 (1)

Caught by 4 reasons: