Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by adasd ( 6 years ago )
package com.example.myapplication
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.Button
import android.widget.ProgressBar
import android.widget.TextView
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
var x = 1
val something : TextView
val textTop = findViewById<TextView>(R.id.text)
val buttonText = findViewById<Button>(R.id.button_text)
val progressBar = findViewById<ProgressBar>(R.id.progressBar)
val buttonPlus = findViewById<Button>(R.id.button_plus)
val buttonMinus = findViewById<Button>(R.id.button_minus)
buttonText.setOnClickListener(View.OnClickListener {
textTop.text = "Has Changed ${x} times."
x += 1
})
}
}
Revise this Paste