vendredi 14 septembre 2018

What should I use in if statement when the condition is true and I don't want to implement anything?

I don't want to call any function user click on default option. Now my question is should I leave it blank or use return or anything else ?

if (myPref.getString("font_style_key", "default").equals("default")){

        //return;

    }else {
        if (myPref.getString("font_style_key", "default").equals("font_1")){

            textView.setTypeface(...);

        }else if (myPref.getString("font_style_key", "default").equals("font_2")){

            textView.setTypeface(...);

        }

Aucun commentaire:

Enregistrer un commentaire