Q
Q
qqweer2020-07-18 15:21:48
Android
qqweer, 2020-07-18 15:21:48

How to make the text in the spinner be from 1 to the value specified in PlainText?

How to make the text in the spinner be from 1 to the value specified in PlainText? There is this code:
var data = MutableList(1, {x -> "${x+1}"})
val adapter = ArrayAdapter([email protected] , android.R.layout.simple_spinner_item, data)
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
spinner.adapter = adapter

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2020-07-18
@hawkkiller

Obviously, specify this value instead of unity

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question