Showing preference screen first time app is run and related questions

后端 未结 4 1764
深忆病人
深忆病人 2021-02-06 08:34

I have an app with 2 activities, the preference and the main activity, I need the preference screen to show first time the app is run so the user can do some configuration. I ha

4条回答
  •  灰色年华
    2021-02-06 09:22

    I am doing something like this. And its works for me.

    String path = "//data//data//"+this.getPackageName()+"//shared_prefs//feedbackpref.xml";
    boolean exists = (new File(path)).exists(); 
    if (exists) {
        introWindowNavigate=false;                                  
    }
    

提交回复
热议问题