61 lines
1.8 KiB
Java
61 lines
1.8 KiB
Java
//
|
|
// DO NOT EDIT THIS FILE, IT HAS BEEN GENERATED USING AndroidAnnotations 3.0.1.
|
|
//
|
|
|
|
|
|
package com.bspeice.daggeraaexample.daggeraaexample;
|
|
|
|
import android.content.Context;
|
|
import android.content.SharedPreferences;
|
|
|
|
import org.androidannotations.api.sharedpreferences.BooleanPrefEditorField;
|
|
import org.androidannotations.api.sharedpreferences.BooleanPrefField;
|
|
import org.androidannotations.api.sharedpreferences.EditorHelper;
|
|
import org.androidannotations.api.sharedpreferences.SharedPreferencesHelper;
|
|
|
|
public final class AAPrefsBuild
|
|
extends SharedPreferencesHelper
|
|
{
|
|
|
|
private Context context_;
|
|
|
|
public AAPrefsBuild(Context context) {
|
|
super(context.getSharedPreferences((getLocalClassName(context)+"_AAPrefs"), 0));
|
|
this.context_ = context;
|
|
}
|
|
|
|
public AAPrefsBuild.AAPrefsEditor_ edit() {
|
|
return new AAPrefsBuild.AAPrefsEditor_(getSharedPreferences());
|
|
}
|
|
|
|
private static String getLocalClassName(Context context) {
|
|
String packageName = context.getPackageName();
|
|
String className = context.getClass().getName();
|
|
int packageLen = packageName.length();
|
|
if (((!className.startsWith(packageName))||(className.length()<= packageLen))||(className.charAt(packageLen)!= '.')) {
|
|
return className;
|
|
}
|
|
return className.substring((packageLen + 1));
|
|
}
|
|
|
|
public BooleanPrefField isWorking() {
|
|
return booleanField("isWorking", false);
|
|
}
|
|
|
|
public final static class AAPrefsEditor_
|
|
extends EditorHelper<AAPrefsBuild.AAPrefsEditor_>
|
|
{
|
|
|
|
|
|
AAPrefsEditor_(SharedPreferences sharedPreferences) {
|
|
super(sharedPreferences);
|
|
}
|
|
|
|
public BooleanPrefEditorField<AAPrefsBuild.AAPrefsEditor_> isWorking() {
|
|
return booleanField("isWorking");
|
|
}
|
|
|
|
}
|
|
|
|
}
|