Answers for "android switch tutorial"

3

switch material android tutorial

// To check a switch
switchMaterial.isChecked = true

// To listen for a switch's checked/unchecked state changes
switchMaterial.setOnCheckedChangeListener { buttonView, isChecked
    // Responds to switch being checked/unchecked
}
Posted by: Guest on December-01-2020
0

switch case in android

switch(position) {
    case 0:
        setContentView(R.layout.xml0);
        break;
    case 1:
        setContentView(R.layout.xml1);
        break;
    default:
        setContentView(R.layout.default);
        break;
}
Posted by: Guest on February-11-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language