// Path: src/main/java/com/vackosar/searchbasedlauncher/entity/Indentifiable.java
// public interface Indentifiable {
//     public String getId();
// }
// 
// Path: src/main/java/com/vackosar/searchbasedlauncher/entity/SelectAction.java
// public abstract class SelectAction<T extends Enum<T>> extends Action {
// 
//     @Inject private Activity activity;
//     @Inject private SingletonPersister<Action> persister;
// 
//     public SelectAction() {}
// 
//     protected void setActivity(Activity activity) {
//         this.activity = activity;
//         persister = new SingletonPersister<>(activity.getApplicationContext());
//         load();
//     }
// 
//     @SuppressWarnings("unused")
//     public void onCreate(@Observes OnCreateEvent onCreate) {
//         load();
//     }
// 
//     protected void save() {
//         persister.save(this);
//     }
// 
//     protected void load() {
//         persister.load(this);
//     }
// 
//     public void act() {
//         List<String> items = new ArrayList<>();
//         final Enum[] values = getSelected().getClass().getEnumConstants();
//         for (Object o: values) {
//             items.add(o.toString());
//         }
//         AlertDialog.OnClickListener listener = new AlertDialog.OnClickListener() {
// 
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 setSelected(getSelected().getClass().getEnumConstants()[which]);
//             }
//         };
//         new AlertDialog.Builder(activity)
//                 .setTitle(getName() + "\nCurrent: " + getSelected())
//                 .setItems(items.toArray(new String[items.size()]), listener)
//                 .show();
//     }
// 
//     protected abstract Enum<T> getSelected();
// 
//     public abstract void setSelected(Enum<T> selected);
// 
// }


import android.app.Activity;
import android.content.Intent;
import com.google.gson.annotations.Expose;
import com.google.inject.Inject;
import com.vackosar.searchbasedlauncher.R;
import com.vackosar.searchbasedlauncher.entity.Indentifiable;
import com.vackosar.searchbasedlauncher.entity.SelectAction;
import roboguice.context.event.OnCreateEvent;
import roboguice.event.Observes;
import roboguice.inject.ContextSingleton;
package com.vackosar.searchbasedlauncher.boundary;




@ContextSingleton
public class ThemeSelector extends SelectAction<ThemeSelector.Theme> implements Indentifiable {

    @Inject private Activity activity;
    @Expose private ThemeSelector.Theme theme;

    private Theme DEFAULT_THEME = Theme.Wallpaper;

    @SuppressWarnings("unused")
    public ThemeSelector() { theme = DEFAULT_THEME; }

    public ThemeSelector(Activity activity) {
        super();
        theme = DEFAULT_THEME;
        this.activity = activity;
        setActivity(activity);
    }

    @Override
    protected void load() {
// Path: src/main/java/com/vackosar/searchbasedlauncher/entity/Indentifiable.java
// public interface Indentifiable {
//     public String getId();
// }
// 
// Path: src/main/java/com/vackosar/searchbasedlauncher/entity/SelectAction.java
// public abstract class SelectAction<T extends Enum<T>> extends Action {
// 
//     @Inject private Activity activity;
//     @Inject private SingletonPersister<Action> persister;
// 
//     public SelectAction() {}
// 
//     protected void setActivity(Activity activity) {
//         this.activity = activity;
//         persister = new SingletonPersister<>(activity.getApplicationContext());
//         load();
//     }
// 
//     @SuppressWarnings("unused")
//     public void onCreate(@Observes OnCreateEvent onCreate) {
//         load();
//     }
// 
//     protected void save() {
//         persister.save(this);
//     }
// 
//     protected void load() {
//         persister.load(this);
//     }
// 
//     public void act() {
//         List<String> items = new ArrayList<>();
//         final Enum[] values = getSelected().getClass().getEnumConstants();
//         for (Object o: values) {
//             items.add(o.toString());
//         }
//         AlertDialog.OnClickListener listener = new AlertDialog.OnClickListener() {
// 
//             @Override
//             public void onClick(DialogInterface dialog, int which) {
//                 setSelected(getSelected().getClass().getEnumConstants()[which]);
//             }
//         };
//         new AlertDialog.Builder(activity)
//                 .setTitle(getName() + "\nCurrent: " + getSelected())
//                 .setItems(items.toArray(new String[items.size()]), listener)
//                 .show();
//     }
// 
//     protected abstract Enum<T> getSelected();
// 
//     public abstract void setSelected(Enum<T> selected);
// 
// }


// Path: src/main/java/com/vackosar/searchbasedlauncher/boundary/ThemeSelector.java
import android.app.Activity;
import android.content.Intent;
import com.google.gson.annotations.Expose;
import com.google.inject.Inject;
import com.vackosar.searchbasedlauncher.R;
import com.vackosar.searchbasedlauncher.entity.Indentifiable;
import com.vackosar.searchbasedlauncher.entity.SelectAction;
import roboguice.context.event.OnCreateEvent;
import roboguice.event.Observes;
import roboguice.inject.ContextSingleton;

package com.vackosar.searchbasedlauncher.boundary;




@ContextSingleton
public class ThemeSelector extends SelectAction<ThemeSelector.Theme> implements Indentifiable {

    @Inject private Activity activity;
    @Expose private ThemeSelector.Theme theme;

    private Theme DEFAULT_THEME = Theme.Wallpaper;

    @SuppressWarnings("unused")
    public ThemeSelector() { theme = DEFAULT_THEME; }

    public ThemeSelector(Activity activity) {
        super();
        theme = DEFAULT_THEME;
        this.activity = activity;
        setActivity(activity);
    }

    @Override
    protected void load() {
        super.load();