title: Kotlin random integer
body: <p>Im trying to display random image whenever the app goes on. First I made a list with image ids and tried to make a random integer so that I can get random image each time by using the integer as an index of the list. Below is the code I tried.</p>
  <pre><code>val background_image = findViewById&lt;ImageView&gt;(R.id.background_image)
  
  val drawableList = mutableListOf&lt;Int&gt;(R.drawable.picture_0001,R.drawable.picture_0002,R.drawable.picture_0003)
  val index = Random.nextInt(drawableList.size)
  val test = (1..5).random()
  
  Toast.makeText(this,test.toString(),Toast.LENGTH_SHORT).show()
  
  background_image.setImageResource(drawableList[index])
  </code></pre>
  <p><code>test</code> and the <code>Toast</code> part is just for checking if other random method works.
  but both two ways doesn't work and shows the same random integer every time. Why isn't it working?
  (minSDK 21).</p>