I have class, which extends \[code\]LinearLayout\[/code\], in it there are \[code\]Buttons\[/code\] and a \[code\]Spinner\[/code\].This Object gets included via my layout XML file:\[code\]<com.ics.spinn.ComboBox android:id="@+id/myautocombo" android:layout_width="fill_parent"android:layout_height="wrap_content"android:completionThreshold="1"android:entries="@array/suppliers" />/>\[/code\]The array suppliers is defined in strings.xml.If this component now wouldn't be com.ics.spinn.ComboBox, but a \[code\]Spinner\[/code\], Android wouldauto-populate the "\[code\]android:entries\[/code\]" to the Spinner adapter.I'd like my component com.ics.spinn.ComboBox to behave the same way: to be able to access the array defined via the xml file, so I cansupply it to the Spinner inside my component, via:\[code\] ArrayAdapter<String> a = new ArrayAdapter<String>(this.getContext(),android.R.layout.simple_spinner_dropdown_item, ARRAYINSIDEMYXML); s.setAdapter(a);\[/code\]I now I could access the array defined in strings.xml DIRECTLY via \[code\]getResources().getStringArray(R.array.suppliers)\[/code\]but my code shouldn't know of the name "suppliers", since it shall be supplied via android:entries...The official Android way for a spinner is, I guess is,But I've got no idea how to construct my TypedArray...\[code\] public AbsSpinner(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); initAbsSpinner(); TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.AbsSpinner, defStyle, 0); CharSequence[] entries = a.getTextArray(R.styleable.AbsSpinner_entries); if (entries != null) { ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(context, R.layout.simple_spinner_item, entries); adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_item); setAdapter(adapter); } a.recycle(); }\[/code\]