Only select one checkbox of splash preference checkedboxs

前端 未结 3 2043
北恋
北恋 2021-01-18 23:14

I have app starting depend on user preferance with three different checkedbox :

1- start app without splash and music .

2- start app with splash only .

3条回答
  •  野的像风
    2021-01-18 23:49

    You should just be able to change it to

        boolean without_splash_screen = getPrefs.getBoolean("without_splash_screen", true);
        boolean splash = getPrefs.getBoolean("splash", true);
        boolean splash_music = getPrefs.getBoolean("splash_music", true);
    
        if (without_splash_screen)
        {   
            ...
        }
        else if (splash)
        {
             ...
        }
        else if (splash_music)
        {
            ....
        }
    

提交回复
热议问题