aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-10-17 18:26:26 -0700
committerScott Jackson <daneren2005@gmail.com>2014-10-17 18:26:26 -0700
commit07b90a9663d4becac54efef2463f87d22e8a57c3 (patch)
treeba5c3fe862a63b5fe9a33062e6c3d7bae1eb4cc0 /src/github/daneren2005
parent1059cdbc0d7e65130efbc49f9fb4f3f90fe84efe (diff)
downloaddsub-07b90a9663d4becac54efef2463f87d22e8a57c3.tar.gz
dsub-07b90a9663d4becac54efef2463f87d22e8a57c3.tar.bz2
dsub-07b90a9663d4becac54efef2463f87d22e8a57c3.zip
#386 Fix saving options
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/activity/EditPlayActionActivity.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/github/daneren2005/dsub/activity/EditPlayActionActivity.java b/src/github/daneren2005/dsub/activity/EditPlayActionActivity.java
index 609f1939..64439289 100644
--- a/src/github/daneren2005/dsub/activity/EditPlayActionActivity.java
+++ b/src/github/daneren2005/dsub/activity/EditPlayActionActivity.java
@@ -29,6 +29,7 @@ import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
+import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.Spinner;
@@ -67,7 +68,7 @@ public class EditPlayActionActivity extends SubsonicActivity {
shuffleCheckbox = (CheckBox) findViewById(R.id.edit_shuffle_checkbox);
shuffleCheckbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
- public void onCheckedChange(CompoundView view, boolean isChecked) {
+ public void onCheckedChanged(CompoundButton view, boolean isChecked) {
startYearCheckbox.setEnabled(isChecked);
endYearCheckbox.setEnabled(isChecked);
genreButton.setEnabled(isChecked);
@@ -79,7 +80,7 @@ public class EditPlayActionActivity extends SubsonicActivity {
// Disable/enable number box if checked
startYearCheckbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
- public void onCheckedChange(CompoundView view, boolean isChecked) {
+ public void onCheckedChanged(CompoundButton view, boolean isChecked) {
startYearBox.setEnabled(isChecked);
}
});
@@ -88,7 +89,7 @@ public class EditPlayActionActivity extends SubsonicActivity {
endYearBox = (EditText) findViewById(R.id.edit_end_year);
endYearCheckbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
- public void onCheckedChange(CompoundView view, boolean isChecked) {
+ public void onCheckedChanged(CompoundButton view, boolean isChecked) {
endYearBox.setEnabled(isChecked);
}
});
@@ -169,13 +170,13 @@ public class EditPlayActionActivity extends SubsonicActivity {
}
String genre = extras.getString(Constants.PREFERENCES_KEY_SHUFFLE_GENRE, doNothing);
- if(genre != null)
+ if(genre != null) {
genreButton.setText(genre);
}
- short offline = extras.getShort(Constants.PREFERENCES_KEY_OFFLINE, 0);
+ short offline = extras.getShort(Constants.PREFERENCES_KEY_OFFLINE, (short) 0);
if(offline != 0) {
- offline.setSelection((int) offline);
+ offlineSpinner.setSelection((int) offline);
}
}
@@ -217,12 +218,12 @@ public class EditPlayActionActivity extends SubsonicActivity {
data.putBoolean(Constants.INTENT_EXTRA_NAME_SHUFFLE, shuffle);
if(shuffle) {
if(startYearCheckbox.isChecked()) {
- data.putString(Constants.PREFERENCES_KEY_SHUFFLE_START_YEAR, startYearBox.getText());
+ data.putString(Constants.PREFERENCES_KEY_SHUFFLE_START_YEAR, startYearBox.getText().toString());
}
if(endYearCheckbox.isChecked()) {
- data.putString(Constants.PREFERENCES_KEY_SHUFFLE_END_YEAR, endYearBox.getText());
+ data.putString(Constants.PREFERENCES_KEY_SHUFFLE_END_YEAR, endYearBox.getText().toString());
}
- String genre = genreButton.getText();
+ String genre = genreButton.getText().toString();
if(!genre.equals(doNothing)) {
data.putString(Constants.PREFERENCES_KEY_SHUFFLE_GENRE, genre);
}