Initialize settings in MainActivity

This commit is contained in:
Morten Delenk 2022-08-15 09:05:22 +01:00
parent 824c552738
commit fff0f56d14
No known key found for this signature in database
GPG key ID: 5130416C797067B6

View file

@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import androidx.preference.PreferenceManager;
import rs.chir.invtracker.client.databinding.ActivityMainBinding;
@ -37,6 +38,9 @@ public class MainActivity extends AppCompatActivity {
this.appBarConfiguration = new AppBarConfiguration.Builder(R.id.loadFragment, R.id.loginFragment, R.id.nearbyFragment).build();
NavigationUI.setupActionBarWithNavController(this, navController, this.appBarConfiguration);
// Initialize settings
PreferenceManager.setDefaultValues(this, R.xml.root_preferences, false);
}
/**