@@ -297,32 +297,41 @@ public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int
297297 expandRow . AddView ( infoBtn ) ;
298298 expandRow . AddView ( LyricsBtn ) ;
299299
300- // Add queue-specific buttons only in queue mode
301- MaterialButton ? insertBeforeBtn = null ;
302- MaterialButton ? insertAfterBtn = null ;
303- if ( _mode == "queue" )
304- {
305- insertAfterBtn = CreateActionButton ( string . Empty , Resource . Drawable . media3_icon_queue_next ) ;
306- insertAfterBtn . TooltipText = "Insert Song After This" ;
300+ //if (_mode == "queue")
301+ //{
302+
303+ var insertAfterBtn = new ImageView ( ctx , null , Resource . Attribute . materialButtonOutlinedStyle ) ;
304+ insertAfterBtn . SetImageResource ( Resource . Drawable . media3_icon_queue_next ) ;
305+ insertAfterBtn . ImageTintList = Android . Content . Res . ColorStateList . ValueOf ( UiBuilder . IsDark ( this . ParentFragement . Resources . Configuration ) ? Color . Gray : Color . ParseColor ( "#294159" ) ) ;
306+
307+ insertAfterBtn . SetPadding ( 30 , 0 , 30 , 0 ) ;
308+ var insertAfterBtnlp = new LinearLayout . LayoutParams ( - 2 , - 2 ) ;
309+ insertAfterBtnlp . RightMargin = 10 ;
310+ insertAfterBtn . LayoutParameters = insertAfterBtnlp ;
311+ insertAfterBtn . Clickable = true ;
312+
313+
314+ insertAfterBtn . TooltipText = $ "Insert this song after { MyViewModel . CurrentPlayingSongView . Title } ";
307315 //expandRow.AddView(insertBeforeBtn);
308316 expandRow . AddView ( insertAfterBtn ) ;
309- }
317+
310318
311319 // Assemble
312320 mainContainer . AddView ( topRow ) ;
313321 mainContainer . AddView ( expandRow ) ;
314322
315323 card . AddView ( mainContainer ) ;
316324
317- return new SongViewHolder ( MyViewModel , ParentFragement , card , imgView , title , artist , moreBtn , durationView , expandRow , ( Button ) playBtn , ( Button ) favBtn , ( Button ) infoBtn ,
318- LyricsBtn , insertBeforeBtn , insertAfterBtn ) ;
325+ return new SongViewHolder ( MyViewModel , ParentFragement , card , imgView , title , artist , moreBtn , durationView , expandRow , ( Button ) favBtn , ( Button ) infoBtn ,
326+ LyricsBtn , insertAfterBtn ) ;
319327 }
320328
321329
322330 private MaterialButton CreateActionButton ( string text , int iconId )
323331 {
324332 var btn = new MaterialButton ( ctx , null , Resource . Attribute . materialButtonOutlinedStyle ) ;
325333 btn . Text = text ;
334+
326335 btn . SetTextColor ( UiBuilder . IsDark ( this . ParentFragement . Resources . Configuration ) ? Color . Gray : Color . ParseColor ( "#294159" ) ) ;
327336 btn . SetIconResource ( iconId ) ;
328337
@@ -351,17 +360,15 @@ class SongViewHolder : AndroidX.RecyclerView.Widget.RecyclerView.ViewHolder
351360 private readonly MaterialCardView _container ;
352361 public View ContainerView => base . ItemView ;
353362
354- private readonly Button _playNextBtn ;
355363 private readonly Button _favBtn ;
356364 private readonly Button _infoBtn ;
357365 private readonly Button lyricsBtn ;
358- private readonly Button ? _insertBeforeBtn ;
359- private readonly Button ? _insertAfterBtn ;
366+ private readonly ImageView ? _insertAfterBtn ;
360367 private SongModelView ? _currentSongContext ;
361368 private Action < int > ? _expandAction ;
362369
363370 public SongViewHolder ( BaseViewModelAnd vm , Fragment parentFrag , MaterialCardView container , ImageView img , TextView title , TextView artist , MaterialButton moreBtn , TextView durationView ,
364- View expandRow , Button playBtn , Button favBtn , Button infoBtn , Button lyrBtn , Button ? insertBeforeBtn = null , Button ? insertAfterBtn = null )
371+ View expandRow , Button favBtn , Button infoBtn , Button lyrBtn , ImageView ? insertAfterBtn = null )
365372 : base ( container )
366373 {
367374 _viewModel = vm ;
@@ -373,11 +380,9 @@ public SongViewHolder(BaseViewModelAnd vm, Fragment parentFrag, MaterialCardView
373380 _moreBtn = moreBtn ;
374381 _durationView = durationView ;
375382 _expandRow = expandRow ;
376- _playNextBtn = playBtn ;
377383 _favBtn = favBtn ;
378384 _infoBtn = infoBtn ;
379385 lyricsBtn = lyrBtn ;
380- _insertBeforeBtn = insertBeforeBtn ;
381386 _insertAfterBtn = insertAfterBtn ;
382387
383388 _moreBtn . Click += ( s , e ) =>
@@ -405,7 +410,7 @@ public SongViewHolder(BaseViewModelAnd vm, Fragment parentFrag, MaterialCardView
405410
406411 var param = new List < SongModelView > ( ) { _currentSongContext } ;
407412 _viewModel . InsertSongsAfterInQueueCommand . Execute ( param ) ;
408- Toast . MakeText ( _parentFrag . Context , $ "Inserted { _currentSongContext . Title } after", ToastLength . Short ) ? . Show ( ) ;
413+ Toast . MakeText ( _parentFrag . Context , $ "Inserted { _currentSongContext . Title } after { _viewModel . CurrentPlayingSongView . Title } ", ToastLength . Short ) ? . Show ( ) ;
409414
410415 }
411416 } ;
@@ -437,17 +442,7 @@ public SongViewHolder(BaseViewModelAnd vm, Fragment parentFrag, MaterialCardView
437442 } ;
438443
439444
440- // 3. Play Button
441- _playNextBtn . Click += async ( s , e ) =>
442- {
443- if ( _currentSongContext != null )
444- {
445- _viewModel . SetAsNextToPlayInQueue ( _currentSongContext ) ;
446-
447- }
448-
449- } ;
450-
445+
451446 lyrBtn . Click += async ( s , e ) =>
452447 {
453448 if ( _currentSongContext != null )
0 commit comments