diff options
-rw-r--r-- | res/layout/edit_play_action.xml | 57 | ||||
-rw-r--r-- | res/values/strings.xml | 2 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/activity/EditPlayActionActivity.java | 10 |
3 files changed, 68 insertions, 1 deletions
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 @@ -33,12 +33,67 @@ android:layout_height="wrap_content" android:layout_marginLeft="4dp" android:textSize="20dp" + android:text="@string/tasker.edit_shuffle_start_year" /> + + <CheckBox + android:id="@+id/edit_start_year_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:longClickable="true"/> + + <EditText + android:id="@+id/edit_start_year" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="number" + android:hint="@string/shuffle.startYear" + android:enabled="false"/> + </LinearLayout> + + <LinearLayout + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="4dp" + android:textSize="20dp" + android:text="@string/tasker.edit_shuffle_end_year" /> + + <CheckBox + android:id="@+id/edit_end_year_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:longClickable="true"/> + + <EditText + android:id="@+id/edit_end_year" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="number" + android:hint="@string/shuffle.endYear" + android:enabled="false"/> + </LinearLayout> + + <LinearLayout + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="4dp" + android:textSize="20dp" android:text="@string/tasker.edit_shuffle_genre"/> <Button android:id="@+id/edit_genre_spinner" android:layout_width="wrap_content" - android:layout_height="wrap_content"/> + android:layout_height="wrap_content" + style="?android:attr/spinnerStyle"/> </LinearLayout> <LinearLayout diff --git a/res/values/strings.xml b/res/values/strings.xml index 8d7cc873..33a40981 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -559,6 +559,8 @@ <string name="tasker.start_playing_shuffled">Start playing in Shuffle Mode</string>
<string name="tasker.start_playing_title">Tasker -> Start DSub</string>
<string name="tasker.edit_shuffle_mode">Start in shuffle mode: </string>
+ <string name="tasker.edit_shuffle_start_year">Shuffle start year:</string>
+ <string name="tasker.edit_shuffle_end_year">Shuffle end year:</string>
<string name="tasker.edit_shuffle_genre">Shuffle from genre:</string>
<string name="tasker.edit_server_offline">Toggle offline: </string>
<string name="tasker.edit_do_nothing">Do Nothing</string>
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) { |