File tree Expand file tree Collapse file tree
java/github/paroj/dsub2000/fragments Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414*/
1515package github .paroj .dsub2000 .fragments ;
1616
17+ import java .util .Collections ;
1718import java .util .LinkedList ;
1819import java .util .List ;
1920import java .util .concurrent .Executors ;
@@ -115,6 +116,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
115116 private ImageButton repeatButton ;
116117 private View toggleListButton ;
117118 private ImageButton starButton ;
119+ private ImageButton addToPlaylist ;
118120 private ImageButton bookmarkButton ;
119121 private ImageButton rateBadButton ;
120122 private ImageButton rateGoodButton ;
@@ -211,6 +213,15 @@ public void onClick(View v) {
211213 starButton .setVisibility (View .GONE );
212214 }
213215
216+ addToPlaylist = (ImageButton )rootView .findViewById (R .id .download_add_to_playlist );
217+ addToPlaylist .setOnClickListener (new OnClickListener () {
218+ @ Override
219+ public void onClick (View v ) {
220+ Entry song = currentPlaying .getSong ();
221+ addToPlaylist (Collections .singletonList (song ));
222+ }
223+ });
224+
214225 View .OnTouchListener touchListener = new View .OnTouchListener () {
215226 @ Override
216227 public boolean onTouch (View v , MotionEvent me ) {
Original file line number Diff line number Diff line change 5656 android:src=" ?attr/star"
5757 android:tint=" ?attr/element_color" />
5858
59+ <ImageButton
60+ android : id =" @+id/download_add_to_playlist"
61+ style =" @style/DownloadActionImageButton"
62+ android : src =" @drawable/ic_action_add"
63+ android : tint =" ?attr/element_color" />
64+
5965 <ImageButton
6066 android:id=" @+id/download_playback_speed"
6167 style=" @style/DownloadActionImageButton"
Original file line number Diff line number Diff line change 5353 android:src=" ?attr/star"
5454 android:tint=" ?attr/element_color" />
5555
56+ <ImageButton
57+ android : id =" @+id/download_add_to_playlist"
58+ style =" @style/DownloadActionImageButton"
59+ android : src =" @drawable/ic_action_add"
60+ android : tint =" ?attr/element_color" />
61+
5662 <ImageButton
5763 android:id=" @+id/download_playback_speed"
5864 style=" @style/DownloadActionImageButton"
Original file line number Diff line number Diff line change 6161 style=" @style/DownloadActionImageButton"
6262 android:src=" @drawable/ic_toggle_star" />
6363
64+ <ImageButton
65+ android : id =" @+id/download_add_to_playlist"
66+ style =" @style/DownloadActionImageButton"
67+ android : src =" @drawable/ic_action_add"
68+ android : tint =" @android:color/white" />
69+
6470 <ImageButton
6571 android:id=" @+id/download_playback_speed"
6672 style=" @style/DownloadActionImageButton"
Original file line number Diff line number Diff line change 8989 <item name =" android:layout_height" >wrap_content</item >
9090 <item name =" android:paddingTop" >8dip</item >
9191 <item name =" android:paddingBottom" >8dip</item >
92- <item name =" android:paddingRight" >16dip </item >
93- <item name =" android:paddingLeft" >16dip </item >
92+ <item name =" android:paddingRight" >14dip </item >
93+ <item name =" android:paddingLeft" >14dip </item >
9494 </style >
9595</resources >
You can’t perform that action at this time.
0 commit comments