package com.casic.detector.extensions

import android.app.Activity
import android.widget.ArrayAdapter
import android.widget.Spinner

fun Spinner.show(activity: Activity, items: Array<String>, default: Int) {
    this.adapter = ArrayAdapter(activity, android.R.layout.simple_spinner_dropdown_item, items)
    this.setSelection(default)
}