mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-17 23:15:10 -05:00
f31b2702a4
Conflicts: src/com/android/email/Email.java
40 lines
755 B
Java
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;
|
|
}
|
|
}
|