1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-17 23:15:10 -05:00
k-9/src/com/fsck/k9/activity/setup/SpinnerOption.java
Jesse Vincent f31b2702a4 Massive rename to K9, step 1.
Conflicts:

	src/com/android/email/Email.java
2009-12-15 02:50:53 +00:00

40 lines
755 B
Java

/**
*
*/
package com.fsck.k9.activity.setup;
import android.widget.Spinner;
public class SpinnerOption
{
public Object value;
public String label;
public static void setSpinnerOptionValue(Spinner spinner, Object value)
{
for (int i = 0, count = spinner.getCount(); i < count; i++)
{
SpinnerOption so = (SpinnerOption)spinner.getItemAtPosition(i);
if (so.value.equals(value))
{
spinner.setSelection(i, true);
return;
}
}
}
public SpinnerOption(Object value, String label)
{
this.value = value;
this.label = label;
}
@Override
public String toString()
{
return label;
}
}