For my Android project, I prepare a dedicated class that listens to `onClick()`, `onTouch()` and `onItemSelected()` events (it's Controller of MVC) and the screen has several `Spinner` objects. In this case, when an event is fired, the algorithm must know 1) which `Spinner` is selected and 2) which `Item` is selected. Thus, it results in having nested switch like below.

```
@Override
public void onItemSelected(AdapterView<?> parent, View v, int position, long id) {
    switch(parent.getId()) {
    case R.id.spn1:
        switch (position) {
        case 0:
            // code
            break;
        case 1:
            // code
            break;
        case 2:
            // code
            break;
        }
    break;
    case R.id.spn2:
        switch (position) {
        case 0:
            // code
            break;
        case 1:
            // code
            break;
        case 2:
            // code
            break;
        }
    break;
    case R.id.spn3:
        switch (position) {
        case 0:
            // code
            break;
        case 1:
            // code
            break;
        case 2:
            // code
            break;
        }
    break;
    default:
    }
}

```

The sample posted below already gave me a headache. I'll definitely love to know if there is some ways (using OOP, maybe) to avoid this big mess.