im taking this kotlin basics in google and im in the "intro to debugging" section.. total noob here and i've managed to plow through the subjects and now im stuck here.. so the expected outcome is for the textview to display a quotient every three seconds but when i run the app, it shows a static value of 60.
private val TAG = "MainActivity"
MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Log.d (TAG, "this is where the app crashed before")
setContentView(R.layout.activity_main)
Log.d (TAG, "this should be logged if the bug is fixed.")
logging()
division()
}
fun division (){
val numerator = 60
var denominator = 4
repeat(4) {
Thread.sleep(3)
findViewById<TextView>(R.id.division_textview).setText("${numerator/denominator}")
Log.v(TAG, "${numerator / denominator}")
denominator --
}
}
been wanting to study programming/developing since i was a kid.. unfortunately, things didn't work out .. now im here and im 100% committed to this.. thanks.