Spinner ArrayAdapter crashing with custom layout
I am trying to experiment with a custom Spinner / ArrayAdapter. Following is my code: myspinner=(Spinner)findViewById(R.id.myspinner); myadapter=new ArrayAdapter<String>(this,R.layout.mytextview,R.id.mytv,sample_data); myadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); myspinner.setOnItemSelectedListener(this); myspinner.setAdapter(myadapter); Following is the custom layout mytextview that contains mytv: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:id="@+id