スクロール可能なリストを表示する パスウェイに戻る Before running the below code, simpleList should be initialized as a ___ list. println(simpleList) simpleList.add(-5) simpleList.remove(4) println(simpleList) Int scrollable sorted mutable Which of the following statements are valid? 正しいと思われる解答をすべて選択してください。 val list = listOf(1, 2, 5) val oddNumbers = mutableListOf("1", "9", "15") val listValues: MutableList<Boolean> val fruits = list("apple", "banana", "pear") val words: List<String> = listOf("jump", "run", "skip") Why does a RecyclerView need an Adapter? To adapt data to display on a specific device type To create a new ViewGroup To adapt data from a data source into JSON To create new ViewHolders and bind data to them Which of the following are advantages to using RecyclerView? 正しいと思われる解答をすべて選択してください。 RecyclerView comes with built-in layout managers. RecyclerView lets you use packages to organize your code. RecyclerView helps save processing time, which can help scrolling through a list smoother. RecyclerView is designed to be efficient for lists by reusing views that have scrolled off the screen. RecyclerView automatically incorporates Material Design components. Which of the following is true about packages? 正しいと思われる解答をすべて選択してください。 You can use packages to organize your code. In order to use a class from another package, you have to explicitly import it in your code. The package name is usually structured from specific to general. It is good practice to use packages to group classes by functionality. What should you do to ensure that the correct type of resource ID is passed in to a constructor? Use an Adapter to force the type. Only use a stringResourceId or imageResourceId. Use resource annotations. Use a naming convention to pass the ID in the form R.<type>. None of the above 空欄補充問題 1 つ以上の単語を入力して文を完成してください。 In the below code, ___ should be written in the for loop, so that the output returned is the list of numbers 1 through 3, with each number printed on a new line. val numbers = listOf(1, 2, 3) for (_______) { println(num) } 解答を送信 error_outline テストの採点中にエラーが発生しました。もう一度お試しください。