<string-array>
держать <integer-array>
<string-array name="arr">
<item >Str1</item>
<item >Str2</item>
<item >Str3</item>
</string-array>
<integer-array name="arrInd">
<item >1</item>
<item >2</item>
<item >3</item>
</integer-array>
public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
{
int globalInd = getResources().getIntArray(R.array.arrInd)[position];
switch (globalInd)
{
...
}
}
android:layout_width="match_parent"
android:layout_height="match_parent"
at com.example.lookatme.BlockerActivity.onCreate(BlockerActivity.java:67)
public TouchView(Context context, AttributeSet attrs) {
super(context, attrs);
}
Drawable[] d = new Drawable[] { new ColorDrawable(periods.get(position).getColor()), context.getResources().getDrawable(R.drawable.period_row_style)};
convrtView.setBackground(new LayerDrawable(d));
onCreate(...)
{
if (dark)
{
setTheme(R.style.dark);
}
else
{
setTheme(R.style.light);
}
...
}
<style name="dark" parent="android:Theme.Holo">
...
</style>
<style name="light" parent="android:Theme.Holo.Light">
...
</style>