Spinner.setadapter(adapter) keeps failing
<p>The goal is to getting working in the extended view &amp; not in the onCreate
Im pretty sure the problem starts when I declare: </p>

<pre><code>ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource( context,...);
</code></pre>

<p>I have tried to use <code>.createFromResource( this,...)</code> but that wont even compile.
but the program runs fine until I use the <code>setadapter</code> function. I have been struggling hard to make this work outside of the <code>onCreate</code>.</p>

<pre><code>public class main extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(new Piano(this));
    }

    private class Piano extends View {
        //keyboard array
        private ShapeDrawable []  keyboard;
        private int indx=0;
        Spinner spinner = (Spinner) findViewById(R.id.dbox);
        SurfaceView sandbx = (SurfaceView)findViewById(R.id.sandbox);



        public Piano(Context context){
            super(context);
            context.getSystemService(DROPBOX_SERVICE);

            ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(
                    context, R.array.chord_list, android.R.layout.simple_spinner_item);
            adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

            spinner.setAdapter(adapter);
            spinner.setOnItemSelectedListener(new Listen()); 
}
</code></pre>
