Linking button to launch activity
<p>Im trying to link up the array[1] to launch an activity but its showing me an error on this line <br> Intent i1 = new Intent(this, Difficulty.class); If any one sees where im going wrong help me please
<br> <br>the error reads "The constructor Intent(new DialogInterface.OnClickListener(){}, Class) is undefined" </p>

<pre><code>        final CharSequence[] items = {"Red", "Green", "Blue"};

        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("Pick a color");
        builder.setItems(items, new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int item) {

            if ("Green".equals(items[1]))
            {Intent intent = new Intent();
            Intent i1 = new Intent(this, Diff.class);
            startActivity(i1);;}

        }
        }).show();
        AlertDialog alert = builder.create();
</code></pre>
