android:text="Display Selections"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spinner"
tools:layout_editor_absoluteX="0dp" />
<TextView
android:id="@+id/resultTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="16dp"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/displayButton"
tools:layout_editor_absoluteX="0dp" />
</[Link]>
[Link]
import [Link]
import [Link].*
import [Link]
class MainActivity : AppCompatActivity() {
@SuppressLint("MissingInflatedId")
override fun onCreate(savedInstanceState: Bundle?) {
[Link](savedInstanceState)
setContentView([Link].activity_main)
val checkBox: CheckBox = findViewById([Link])
val radioGroup: RadioGroup = findViewById([Link])
val spinner: Spinner = findViewById([Link])
val switchToggle: Switch = findViewById([Link].switch1)
val btn: Button = findViewById([Link])
val resultTextView: TextView = findViewById([Link])
val items = arrayOf("item1", "item2", "item3")
val adapter = ArrayAdapter(this, [Link].simple_spinner_item, items)
[Link] = adapter
[Link]{
val c = if([Link]) "Checked" else "Not Checked"
val RR = [Link]
val R = findViewById<RadioButton>(RR).[Link]()
val sp = [Link]()
val sw = if([Link]) "On" else "Off"
[Link] = " C => $c \nR => $R \nsp => $sp \nsw => $sw"
}
}
}