Android Open Source - avol Volume Model






From Project

Back to project page avol.

License

The source code is released under:

GNU General Public License

If you think the Android project avol listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.keidan.avol.settings;
//from   w  w w.  j  a v  a 2  s. co m
import org.keidan.avol.Config;

import android.app.Activity;

public class VolumeModel {
  private boolean enable   = false;
  private String  label    = null;
  private int     resource = 0;
  private Config  cfg      = null;
  private String  cfg_name = null;

  public VolumeModel(final Activity a, final Config cfg, final int label_id,
      final int resource, final String cfg_name) {
    this.label = a.getString(label_id);
    this.resource = resource;
    this.enable = cfg.get(cfg_name, true);
    this.cfg = cfg;
    this.cfg_name = cfg_name;
  }

  public void update() {
    enable = !enable;
    cfg.add(cfg_name, enable);
  }

  public boolean isEnable() {
    return enable;
  }

  public void setEnable(final boolean enable) {
    this.enable = enable;
  }

  public String getLabel() {
    return label;
  }

  public void setLabel(final String label) {
    this.label = label;
  }

  public int getResource() {
    return resource;
  }

  public void setResource(final int resource) {
    this.resource = resource;
  }

}




Java Source Code List

org.keidan.avol.ActivityPopup.java
org.keidan.avol.Config.java
org.keidan.avol.SettingsActivity.java
org.keidan.avol.VolActivity.java
org.keidan.avol.main.ComponentsListener.java
org.keidan.avol.main.Components.java
org.keidan.avol.settings.MyArrayAdapter.java
org.keidan.avol.settings.VolumeModel.java
org.keidan.avol.settings.VolumesArrayAdapter.java