reymesson1 / septimoejercicio-android

0 stars 0 forks source link

Autocomplete #11

Closed reymesson1 closed 5 years ago

reymesson1 commented 5 years ago

val stringList = ArrayList() stringList.add("Black") stringList.add("White") stringList.add("Yellow") stringList.add("Green") stringList.add("Blue") stringList.add("Brown") stringList.add("Orange") stringList.add("Pink") stringList.add("Violet") stringList.add("Cyan") stringList.add("LightBlue")

    val adapter = ArrayAdapter<String>(
        this,
        android.R.layout.simple_dropdown_item_1line, stringList
    )

    autoCompleteTextView.setAdapter(adapter)
reymesson1 commented 5 years ago

override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main)

    val stringList = ArrayList<String>()
    stringList.add("Black")
    stringList.add("White")
    stringList.add("Yellow")
    stringList.add("Green")
    stringList.add("Blue")
    stringList.add("Brown")
    stringList.add("Orange")
    stringList.add("Pink")
    stringList.add("Violet")
    stringList.add("Cyan")
    stringList.add("LightBlue")

    val adapter = ArrayAdapter<String>(
        this,
        android.R.layout.simple_dropdown_item_1line, stringList
    )

    autoCompleteTextView.setAdapter(adapter)

}
reymesson1 commented 5 years ago

LP | SP HT| UA