From d78618c064085a852a3ebba0064eeb22c83dfc97 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 16 Oct 2014 19:26:29 -0700 Subject: #386 Add shuffle year to Tasker options --- res/layout/edit_play_action.xml | 57 +++++++++++++++++++++- res/values/strings.xml | 2 + .../dsub/activity/EditPlayActionActivity.java | 10 ++++ 3 files changed, 68 insertions(+), 1 deletion(-) diff --git a/res/layout/edit_play_action.xml b/res/layout/edit_play_action.xml index ef5408ee..346f34c3 100644 --- a/res/layout/edit_play_action.xml +++ b/res/layout/edit_play_action.xml @@ -23,6 +23,60 @@ /> + + + + + + + + + + + + + + + + + + + android:layout_height="wrap_content" + style="?android:attr/spinnerStyle"/> Start playing in Shuffle Mode Tasker -> Start DSub Start in shuffle mode: + Shuffle start year: + Shuffle end year: Shuffle from genre: Toggle offline: Do Nothing diff --git a/src/github/daneren2005/dsub/activity/EditPlayActionActivity.java b/src/github/daneren2005/dsub/activity/EditPlayActionActivity.java index ef960822..2ec0b6e8 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.EditText; import android.widget.Spinner; import java.util.ArrayList; @@ -46,6 +47,10 @@ import github.daneren2005.dsub.util.Util; public class EditPlayActionActivity extends SubsonicActivity { private CheckBox shuffleCheckbox; + private CheckBox startYearCheckbox; + private EditText startYearBox; + private CheckBox endYearCheckbox; + private EditText endYearBox; private Button genreButton; private Spinner offlineSpinner; @@ -61,6 +66,11 @@ public class EditPlayActionActivity extends SubsonicActivity { shuffleCheckbox.setChecked(true); } + startYearCheckbox = (CheckBox) findViewById(R.id.edit_start_year_checkbox); + startYearBox = (EditText) findViewById(R.id.edit_start_year); + endYearCheckbox = (CheckBox) findViewById(R.id.edit_end_year_checkbox); + endYearBox = (EditText) findViewById(R.id.edit_end_year); + genreButton = (Button) findViewById(R.id.edit_genre_spinner); genreButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { -- cgit v1.2.3