Example usage for com.badlogic.gdx.backends.android AndroidPreferences AndroidPreferences

List of usage examples for com.badlogic.gdx.backends.android AndroidPreferences AndroidPreferences

Introduction

In this page you can find the example usage for com.badlogic.gdx.backends.android AndroidPreferences AndroidPreferences.

Prototype

public AndroidPreferences(SharedPreferences preferences) 

Source Link

Usage

From source file:es.danirod.rectball.android.AndroidPlatform.java

License:Open Source License

protected AndroidPlatform(AndroidApplication app) {
    this.app = app;

    sharing = new AndroidSharing(app);
    score = new LegacyScores() {
        @Override//from  www  .  j  ava 2 s .com
        protected FileHandle getScoresFile() {
            return Gdx.files.local("scores");
        }
    };
    statistics = new LegacyStatistics() {
        @Override
        protected FileHandle getStatistics() {
            return Gdx.files.local("stats");
        }
    };
    preferences = new AndroidPreferences(app.getSharedPreferences("rectball", Context.MODE_PRIVATE));
}

From source file:org.gearvrf.plugins.widget.GVRWidgetPluginActivity.java

License:Apache License

@Override
public Preferences getPreferences(String name) {
    return new AndroidPreferences(getSharedPreferences(name, Context.MODE_PRIVATE));
}