Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.app.Activity;

import android.content.SharedPreferences;

public class Main {
    private static final String SETTINGS_FILE = "project4-settings";

    public static SharedPreferences getSharedPrefs(Activity activity) {
        return activity.getSharedPreferences(SETTINGS_FILE, Activity.MODE_WORLD_READABLE);
    }
}