Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.widget.Spinner;

public class Main {
    static int indexOf(Spinner _Spinner, String _String) {
        for (int i = 0; i < _Spinner.getCount(); ++i) {
            if (_Spinner.getItemAtPosition(i).toString().equalsIgnoreCase(_String))
                return i;
        }
        return -1;
    }
}