Added Track Highlights in all Views. 49/267649/3 accepted/tizen/unified/20211214.124845 submit/tizen/20211213.121257
authorshivamv <shivam.v2@samsung.com>
Wed, 8 Dec 2021 07:17:03 +0000 (12:47 +0530)
committershivamv <shivam.v2@samsung.com>
Mon, 13 Dec 2021 11:54:52 +0000 (17:24 +0530)
Change-Id: I859e09d9631000c8fe13529545409cc75155830e
Signed-off-by: shivamv <shivam.v2@samsung.com>
15 files changed:
music-player/Core/CurrentPlayingTrack.cs [new file with mode: 0755]
music-player/ViewModels/AlbumDetailViewModel.cs
music-player/ViewModels/ArtistDetailViewModel.cs
music-player/ViewModels/PlayerViewModel.cs
music-player/ViewModels/PlaylistDetailViewModel.cs
music-player/ViewModels/TrackViewModel.cs
music-player/Views/AlbumDetailLayout.cs
music-player/Views/AlbumDetailView.cs
music-player/Views/ArtistDetailItemLayout.cs
music-player/Views/ArtistDetailView.cs
music-player/Views/PlayingListView.cs
music-player/Views/PlaylistDetailView.cs
music-player/Views/TrackView.cs
music-player/music-player.csproj
packaging/org.tizen.MusicPlayer-1.0.0.tpk

diff --git a/music-player/Core/CurrentPlayingTrack.cs b/music-player/Core/CurrentPlayingTrack.cs
new file mode 100755 (executable)
index 0000000..41dd087
--- /dev/null
@@ -0,0 +1,45 @@
+using System;
+using MusicPlayer.Views;
+using MusicPlayer.ViewModels;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using MusicPlayer.Models;
+using MusicPlayer.Common;
+
+namespace MusicPlayer.Core
+{
+    class PlayingTrackEventHandlerArgs : EventArgs
+    {
+        public PlayingTrackEventHandlerArgs(string mediaId)
+        {
+            CurrentTrackId = mediaId;
+        }
+
+        public string CurrentTrackId { get; private set; }
+    }
+    class CurrentPlayingTrack
+    {
+        private static readonly CurrentPlayingTrack instance = new CurrentPlayingTrack();
+
+        public event EventHandler<PlayingTrackEventHandlerArgs> PlayingTrackChanged;
+
+        public CurrentPlayingTrack()
+        {
+            MediaId = null;
+        }
+
+        public static CurrentPlayingTrack Instance
+        {
+            get => instance;
+        }
+
+        public string MediaId { get; private set; }
+
+        public void SetMediaId(string id)
+        {
+            MediaId = id;
+            Tizen.Log.Info(AppConstants.LogTag, "Updating Current track");
+            PlayingTrackChanged?.Invoke(this, new PlayingTrackEventHandlerArgs(id));
+        }
+    }
+}
index e0ad562145c995a37979610ca5c1a37847205103..22ebc19724a40d81730d0d50378e601df4561c6c 100755 (executable)
@@ -22,8 +22,17 @@ namespace MusicPlayer.ViewModels
             UpdateAlbumDetailData();\r
             TotalTracks = listViewModel.Count.ToString();\r
             listViewModel.CollectionChanged += OnCollectionChanged;\r
+            CurrentPlayingTrack.Instance.PlayingTrackChanged += OnPlayingTrackChanged;\r
         }\r
 \r
+        private void OnPlayingTrackChanged(object sender, PlayingTrackEventHandlerArgs e)\r
+        {\r
+            Tizen.Log.Info(AppConstants.LogTag, "On Current track Changed");\r
+            UpdatePlayingTrack();\r
+        }\r
+\r
+        public Track PlayingTrack { get; set; }\r
+\r
         private int id;\r
 \r
         public int Id\r
@@ -88,7 +97,7 @@ namespace MusicPlayer.ViewModels
         {\r
             AlbumDataProvider.AlbumDataChanged -= OnAlbumDetailChanged;\r
             ListViewModel.CollectionChanged -= OnCollectionChanged;\r
-            ListViewModel.Clear();\r
+            //ListViewModel.Clear();\r
         }\r
 \r
         public void PlayAll()\r
@@ -116,6 +125,29 @@ namespace MusicPlayer.ViewModels
             listViewModel.Clear();\r
             List<AudioInfo> trackList = AlbumDataProvider.GetAlbumTrackList(Id);\r
             listViewModel.CreateData(trackList);\r
+            UpdatePlayingTrack();\r
+        }\r
+\r
+        private void UpdatePlayingTrack()\r
+        {\r
+            if (PlayingTrack != null)\r
+            {\r
+                PlayingTrack.IsPlaying = false;\r
+            }\r
+            PlayingTrack = null;\r
+            string currentTrackId = CurrentPlayingTrack.Instance.MediaId;\r
+            if (currentTrackId != null)\r
+            {\r
+                foreach (Track item in listViewModel)\r
+                {\r
+                    if (currentTrackId == item.Id)\r
+                    {\r
+                        item.IsPlaying = true;\r
+                        PlayingTrack = item;\r
+                        break;\r
+                    }\r
+                }\r
+            }\r
         }\r
 \r
         private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r
index d0e8921167cd8d01cd440fa82fbddf79807769ac..f0e73a435687fd6ba5180d77a7df7fe19982be81 100755 (executable)
@@ -22,8 +22,17 @@ namespace MusicPlayer.ViewModels
             groupListViewModel = new ListViewModel<ArtistDetailAlbum>();
 
             UpdateArtistDetailView();
+            CurrentPlayingTrack.Instance.PlayingTrackChanged += OnPlayingTrackChanged;
         }
 
+        private void OnPlayingTrackChanged(object sender, PlayingTrackEventHandlerArgs e)
+        {
+            Tizen.Log.Info(AppConstants.LogTag, "On Current track Changed");
+            UpdatePlayingTrack();
+        }
+
+        public Track PlayingTrack { get; set; }
+
         private string artistName;
 
         public string ArtistName
@@ -44,9 +53,9 @@ namespace MusicPlayer.ViewModels
         public void OnViewDeleted()
         {
             ArtistDataProvider.ArtistDataChanged -= OnArtistDetailChanged;
-            trackListViewModel.Clear();
-            albumListViewModel.Clear();
-            groupListViewModel.Clear();
+            //trackListViewModel.Clear();
+            //albumListViewModel.Clear();
+            //groupListViewModel.Clear();
         }
 
         public void PlayAll()
@@ -103,6 +112,29 @@ namespace MusicPlayer.ViewModels
                 }
                 groupListViewModel.Add(artistAlbum);
             }
+            UpdatePlayingTrack();
+        }
+
+        private void UpdatePlayingTrack()
+        {
+            if (PlayingTrack != null)
+            {
+                PlayingTrack.IsPlaying = false;
+            }
+            PlayingTrack = null;
+            string currentTrackId = CurrentPlayingTrack.Instance.MediaId;
+            if (currentTrackId != null)
+            {
+                foreach (Track item in TrackListViewModel)
+                {
+                    if (currentTrackId == item.Id)
+                    {
+                        item.IsPlaying = true;
+                        PlayingTrack = item;
+                        break;
+                    }
+                }
+            }
         }
     }
 }
index 9bbdd478bad93644ec9d92329d7cfec7b235f134..b86cbf670f35c1cff0cfe2d862151fc63b7ec276 100755 (executable)
@@ -132,8 +132,6 @@ namespace MusicPlayer.ViewModels
         {
             Tizen.Log.Info(AppConstants.LogTag, "Setting Current track");
             UpdateCurrentPlayingTrack(track);
-            playerModel.CurrentTrack = track;
-            lyricsViewModel.CurrentTrack = track;
             //TO DO need to set index properly
             Track current = playingListViewModel.Current();
             if (current == null)
@@ -322,15 +320,9 @@ namespace MusicPlayer.ViewModels
 
         private void UpdateCurrentPlayingTrack(Track newTrack)
         {
-            Track oldTrack = playerModel.CurrentTrack;
-            if(oldTrack != null)
-            {
-                oldTrack.IsPlaying = false;
-            }
-            if (newTrack != null)
-            {
-                newTrack.IsPlaying = true;
-            }
+            playerModel.CurrentTrack = newTrack;
+            lyricsViewModel.CurrentTrack = newTrack;
+            CurrentPlayingTrack.Instance.SetMediaId(newTrack.Id);
         }
 
         private void UpdatePlayingStatus(PlayingStatus status)
index dbb9b96538753fd1cb6170e79fba4fb8ccf1a667..7f198a8ddb584ed12246dfef3618ce9a41c63081 100755 (executable)
@@ -26,6 +26,13 @@ namespace MusicPlayer.ViewModels
             UpdatePlaylistDetails();
             PlaylistTrackCount = listViewModel.Count.ToString();
             ListViewModel.CollectionChanged += OnCollectionChanged;
+            CurrentPlayingTrack.Instance.PlayingTrackChanged += OnPlayingTrackChanged;
+        }
+
+        private void OnPlayingTrackChanged(object sender, PlayingTrackEventHandlerArgs e)
+        {
+            Tizen.Log.Info(AppConstants.LogTag, "On Current track Changed");
+            UpdatePlayingTrack();
         }
 
         public string PlaylistName { get; set; }
@@ -59,12 +66,14 @@ namespace MusicPlayer.ViewModels
             set => isNotDefaultPlaylist = value;
         }
 
+        public Track PlayingTrack { get; set; }
+
         // TODO do we really need this ?
         public void OnViewDeleted()
         {
             PlaylistManager.Instance.PlaylistDataChanged -= OnPlaylistDetailChanged;
             ListViewModel.CollectionChanged -= OnCollectionChanged;
-            ListViewModel.Clear();
+            //ListViewModel.Clear();
         }
 
         public void PlayAll()
@@ -112,6 +121,33 @@ namespace MusicPlayer.ViewModels
             }
             listViewModel.Clear();
             listViewModel.CreateData(CreatePlaylistAudioData(playlist.Id));
+            UpdatePlayingTrack();
+        }
+
+        private void UpdatePlayingTrack()
+        {
+            string currentTrackId = CurrentPlayingTrack.Instance.MediaId;
+            string oldTrackId = null;
+            if (PlayingTrack != null)
+            {
+                oldTrackId = PlayingTrack.Id;
+            }
+            if (currentTrackId != oldTrackId)
+            {
+                PlayingTrack = null;
+                foreach (Track item in listViewModel)
+                {
+                    if (oldTrackId == item.Id)
+                    {
+                        item.IsPlaying = false;
+                    }
+                    if (currentTrackId == item.Id)
+                    {
+                        item.IsPlaying = true;
+                        PlayingTrack = item;
+                    }
+                }
+            }
         }
 
         private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
index cc82ffdaac2799ccd1f105ddbfe128c34586b911..88d013c35a4f4f34e1cee1b5f7d4064a253c4aa7 100755 (executable)
@@ -16,6 +16,13 @@ namespace MusicPlayer.ViewModels
             CreateTrackData();\r
             listViewModel.CollectionChanged += OnCollectionChanged;\r
             TrackCount = listViewModel.Count.ToString();\r
+            CurrentPlayingTrack.Instance.PlayingTrackChanged += OnPlayingTrackChanged;\r
+        }\r
+\r
+        private void OnPlayingTrackChanged(object sender, PlayingTrackEventHandlerArgs e)\r
+        {\r
+            Tizen.Log.Info(AppConstants.LogTag, "On Current track Changed");\r
+            UpdatePlayingTrack();\r
         }\r
 \r
         private readonly ListViewModel<Track> listViewModel;\r
@@ -37,6 +44,8 @@ namespace MusicPlayer.ViewModels
             }\r
         }\r
 \r
+        public Track PlayingTrack { get; set; }\r
+\r
         public void OnTrackSelected(object selectedItem)\r
         {\r
             PlaybackHelper.Instance.PlayCurrent(ListViewModel, (Track)selectedItem);\r
@@ -62,6 +71,29 @@ namespace MusicPlayer.ViewModels
             List<AudioInfo> trackList = TrackDataProvider.CurrentTrackList();\r
             listViewModel.Clear();\r
             listViewModel.CreateData(trackList);\r
+            UpdatePlayingTrack();\r
+        }\r
+\r
+        private void UpdatePlayingTrack()\r
+        {\r
+            if (PlayingTrack != null)\r
+            {\r
+                PlayingTrack.IsPlaying = false;\r
+            }\r
+            PlayingTrack = null;\r
+            string currentTrackId = CurrentPlayingTrack.Instance.MediaId;\r
+            if (currentTrackId != null)\r
+            {\r
+                foreach (Track item in listViewModel)\r
+                {\r
+                    if (currentTrackId == item.Id)\r
+                    {\r
+                        item.IsPlaying = true;\r
+                        PlayingTrack = item;\r
+                        break;\r
+                    }\r
+                }\r
+            }\r
         }\r
 \r
         private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r
index d569eedc3696a1fea94d4fb0975c7d8ae3b244f8..48fb0270175f50bfddfda6083c680c7e86774ab7 100755 (executable)
@@ -1,6 +1,7 @@
 using Tizen.NUI.Components;\r
 using Tizen.NUI.BaseComponents;\r
 using Tizen.NUI;\r
+using Tizen.NUI.Binding;\r
 using MusicPlayer.Common;\r
 \r
 namespace MusicPlayer.Views\r
@@ -18,6 +19,21 @@ namespace MusicPlayer.Views
         private const int LeftPadding = 64;\r
         private const int X = 0;\r
 \r
+        public static readonly BindableProperty IsPlayingProperty = BindableProperty.Create(nameof(IsPlaying), typeof(bool), typeof(AlbumDetailLayout), false, propertyChanged: (bindable, oldValue, newValue) =>\r
+        {\r
+            var instance = (AlbumDetailLayout)bindable;\r
+            if (newValue != null)\r
+            {\r
+                bool newPlaying = (bool)newValue;\r
+                bool oldPlaying = (bool)oldValue;\r
+                if (oldPlaying != newPlaying)\r
+                {\r
+                    instance.UpdateItem(newPlaying);\r
+                }\r
+            }\r
+        },\r
+        defaultValueCreator: (bindable) => ((AlbumDetailLayout)bindable).isPlaying);\r
+\r
         public AlbumDetailLayout(int width = 832, int height = 108) : base()\r
         {\r
             base.OnInitialize();\r
@@ -32,15 +48,14 @@ namespace MusicPlayer.Views
             subtitleLabel = CreateSubTitleLabel();\r
             additionalLabel = CreateAdditionalLabel(width);\r
             itemSeperator = CreateItemSeparator(width, height);\r
-            IsCreateByXaml = true;\r
+            UpdateLabelColors();\r
+            ThemeManager.ThemeChanged += OnThemeUpdated;\r
         }\r
 \r
         private TextLabel CreateTitleLabel()\r
         {\r
             TextLabel titleLabel = new TextLabel()\r
             {\r
-                StyleName = "ItemLabel",\r
-                ThemeChangeSensitive = true,\r
                 Size2D = new Size2D(596, 40),\r
                 PixelSize = 32,\r
                 FontFamily = "BreezeSans",\r
@@ -58,8 +73,6 @@ namespace MusicPlayer.Views
         {\r
             TextLabel subtitleLabel = new TextLabel()\r
             {\r
-                StyleName = "ItemLabel",\r
-                ThemeChangeSensitive = true,\r
                 Size2D= new Size2D(596,36),\r
                 PixelSize = 28,\r
                 FontFamily = "BreezeSans",\r
@@ -77,8 +90,6 @@ namespace MusicPlayer.Views
         {\r
             TextLabel additionalLabel = new TextLabel()\r
             {\r
-                StyleName = "ItemLabel",\r
-                ThemeChangeSensitive = true,\r
                 Size2D= new Size2D(108,36),\r
                 PixelSize = 28,\r
                 FontFamily = "BreezeSans",\r
@@ -117,6 +128,83 @@ namespace MusicPlayer.Views
             get => additionalLabel;\r
         }\r
 \r
+        private bool isPlaying = false;\r
+\r
+        public bool IsPlaying\r
+        {\r
+            get => (bool)GetValue(IsPlayingProperty);\r
+            set => SetValue(IsPlayingProperty, value);\r
+        }\r
+\r
+        private void UpdateItem(bool currentValue)\r
+        {\r
+            if (currentValue)\r
+            {\r
+                Tizen.Log.Info(AppConstants.LogTag, "setting highlight color");\r
+                if (titleLabel != null)\r
+                {\r
+                    titleLabel.TextColor = UIColors.HEX1473E6;\r
+                }\r
+                if (subtitleLabel != null)\r
+                {\r
+                    subtitleLabel.TextColor = UIColors.HEX1473E6;\r
+                }\r
+                if (additionalLabel != null)\r
+                {\r
+                    additionalLabel.TextColor = UIColors.HEX1473E6;\r
+                }\r
+            }\r
+            else\r
+            {\r
+                Tizen.Log.Info(AppConstants.LogTag, "setting normal color");\r
+                UpdateLabelColors();\r
+            }\r
+            isPlaying = currentValue;\r
+        }\r
+\r
+        private void OnThemeUpdated(object sender, ThemeChangedEventArgs e)\r
+        {\r
+            if (e.IsPlatformThemeChanged && IsPlaying == false)\r
+            {\r
+                UpdateLabelColors();\r
+            }\r
+        }\r
+\r
+        private void UpdateLabelColors()\r
+        {\r
+            string currentPlatformThemeId = ThemeManager.PlatformThemeId;\r
+            if (currentPlatformThemeId.Equals(AppConstants.LightPlatformThemeId))\r
+            {\r
+                if (titleLabel != null)\r
+                {\r
+                    titleLabel.TextColor = UIColors.HEX001447;\r
+                }\r
+                if (subtitleLabel != null)\r
+                {\r
+                    subtitleLabel.TextColor = UIColors.HEX001447;\r
+                }\r
+                if (additionalLabel != null)\r
+                {\r
+                    additionalLabel.TextColor = UIColors.HEX001447;\r
+                }\r
+            }\r
+            else if (currentPlatformThemeId.Equals(AppConstants.DarkPlatformThemeId))\r
+            {\r
+                if (titleLabel != null)\r
+                {\r
+                    titleLabel.TextColor = Color.White;\r
+                }\r
+                if (subtitleLabel != null)\r
+                {\r
+                    subtitleLabel.TextColor = Color.White;\r
+                }\r
+                if (additionalLabel != null)\r
+                {\r
+                    additionalLabel.TextColor = Color.White;\r
+                }\r
+            }\r
+        }\r
+\r
         protected override void Dispose(DisposeTypes type)\r
         {\r
             if (Disposed)\r
index c0c4bcaa3293a3d2e1a163725c85827ae6bce31f..188094479f21353135312bd73ea56e51a1a9f4a7 100755 (executable)
@@ -32,6 +32,7 @@ namespace MusicPlayer.Views
             UpdateCollectionView();\r
             AddAlbumArt();\r
             AddAlbumInfo();\r
+            TouchEvent += (object source, TouchEventArgs e) => false;\r
         }\r
 \r
         public override string GetTitleText()\r
@@ -209,6 +210,7 @@ namespace MusicPlayer.Views
                 layout.TitleLabel.SetBinding(TextLabel.TextProperty, "TrackTitle");\r
                 layout.SubtitleLabel.SetBinding(TextLabel.TextProperty, "ArtistName");\r
                 layout.AdditionalLabel.SetBinding(TextLabel.TextProperty, "Duration");\r
+                layout.SetBinding(AlbumDetailLayout.IsPlayingProperty, "IsPlaying");\r
                 return layout;\r
             });\r
             collectionView.ItemsSource = viewModel.ListViewModel;\r
index 0eb0c509a68f436fd4256fac9fcb8e007a8961c2..884dc45c0975e7cb15c0bd4f8f6efc82f5aae198 100755 (executable)
@@ -1,6 +1,7 @@
 using Tizen.NUI.Components;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI;
+using Tizen.NUI.Binding;
 using MusicPlayer.Common;
 
 namespace MusicPlayer.Views
@@ -19,10 +20,24 @@ namespace MusicPlayer.Views
         private TextLabel titleLabel;
         private TextLabel extraLabel;
 
+        public static readonly BindableProperty IsPlayingProperty = BindableProperty.Create(nameof(IsPlaying), typeof(bool), typeof(ArtistDetailItemLayout), false, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var instance = (ArtistDetailItemLayout)bindable;
+            if (newValue != null)
+            {
+                bool newPlaying = (bool)newValue;
+                bool oldPlaying = (bool)oldValue;
+                if (oldPlaying != newPlaying)
+                {
+                    instance.UpdateItem(newPlaying);
+                }
+            }
+        },
+        defaultValueCreator: (bindable) => ((ArtistDetailItemLayout)bindable).isPlaying);
+
         public ArtistDetailItemLayout(int width = 1792, int height = 108) : base()
         {
             base.OnInitialize();
-            base.IsCreateByXaml = true;
             Width = width;
             Height = height;
             WidthSpecification = Width;
@@ -34,7 +49,8 @@ namespace MusicPlayer.Views
             titleLabel = CreateTitleLabel();
             extraLabel = CreateExtraLabel();
             itemSeperator = CreateItemSeparator();
-            IsCreateByXaml = true;
+            UpdateLabelColors();
+            ThemeManager.ThemeChanged += OnThemeUpdated;
         }
 
         private View CreateItemSeparator()
@@ -54,8 +70,6 @@ namespace MusicPlayer.Views
         {
             TextLabel titleLabel = new TextLabel()
             {
-                StyleName = "ItemLabel",
-                ThemeChangeSensitive = true,
                 Size2D = new Size2D(1272, 40),
                 PixelSize = 32,
                 FontFamily = "BreezeSans",
@@ -72,8 +86,6 @@ namespace MusicPlayer.Views
         {
             TextLabel extraLabel = new TextLabel()
             {
-                StyleName = "ItemLabel",
-                ThemeChangeSensitive = true,
                 Size2D = new Size2D(360, 36),
                 PixelSize = 28,
                 FontFamily = "BreezeSans",
@@ -96,6 +108,71 @@ namespace MusicPlayer.Views
             get => extraLabel;
         }
 
+        private bool isPlaying = false;
+
+        public bool IsPlaying
+        {
+            get => (bool)GetValue(IsPlayingProperty);
+            set => SetValue(IsPlayingProperty, value);
+        }
+
+        private void UpdateItem(bool currentValue)
+        {
+            if (currentValue)
+            {
+                Tizen.Log.Info(AppConstants.LogTag, "setting highlight color");
+                if (titleLabel != null)
+                {
+                    titleLabel.TextColor = UIColors.HEX1473E6;
+                }
+                if (extraLabel != null)
+                {
+                    extraLabel.TextColor = UIColors.HEX1473E6;
+                }
+            }
+            else
+            {
+                Tizen.Log.Info(AppConstants.LogTag, "setting normal color");
+                UpdateLabelColors();
+            }
+            isPlaying = currentValue;
+        }
+
+        private void OnThemeUpdated(object sender, ThemeChangedEventArgs e)
+        {
+            if (e.IsPlatformThemeChanged && IsPlaying == false)
+            {
+                UpdateLabelColors();
+            }
+        }
+
+        private void UpdateLabelColors()
+        {
+            string currentPlatformThemeId = ThemeManager.PlatformThemeId;
+            if (currentPlatformThemeId.Equals(AppConstants.LightPlatformThemeId))
+            {
+                if (titleLabel != null)
+                {
+                    titleLabel.TextColor = UIColors.HEX001447;
+                }
+                if (extraLabel != null)
+                {
+                    extraLabel.TextColor = UIColors.HEX001447;
+                }
+            }
+            else if (currentPlatformThemeId.Equals(AppConstants.DarkPlatformThemeId))
+            {
+                if (titleLabel != null)
+                {
+                    titleLabel.TextColor = Color.White;
+                }
+                if(extraLabel != null)
+                {
+                    extraLabel.TextColor = Color.White;
+                }
+            }
+        }
+
         protected override void Dispose(DisposeTypes type)
         {
             if (Disposed)
index 16f25c3f8294997891c2f13982ef9a388d3bf48a..7190cbab9687ecf47c4f3fdfc17e0b1d28441b2f 100755 (executable)
@@ -19,6 +19,7 @@ namespace MusicPlayer.Views
             countLabel.SetBinding(TextLabel.TextProperty, "TotalCount");
             UpdateCollectionView();
             Add(listContainer);
+            TouchEvent += (object source, TouchEventArgs e) => false;
         }
 
         public override string GetTitleText()
@@ -79,6 +80,7 @@ namespace MusicPlayer.Views
                 ArtistDetailItemLayout layout = new ArtistDetailItemLayout();
                 layout.TitleLabel.SetBinding(TextLabel.TextProperty, "TrackTitle");
                 layout.ExtraLabel.SetBinding(TextLabel.TextProperty, "Duration");
+                layout.SetBinding(ArtistDetailItemLayout.IsPlayingProperty, "IsPlaying");
                 return layout;
             });
             collectionView.GroupHeaderTemplate = new DataTemplate(() =>
index a9a62c53dcc2bc4caeb1393d9c35f6cf128f0862..6d43bfe2d014363af036344cdebc19040fbd106f 100755 (executable)
@@ -53,7 +53,12 @@ namespace MusicPlayer.Views
 
         private void OnItemSelected(object sender, SelectionChangedEventArgs e)
         {
+            if (collectionView.SelectedItem == null)
+            {
+                return;
+            }
             viewModel.OnItemSelected(collectionView.SelectedItem);
+            collectionView.SelectedItem = null;
         }
 
         private void ItemSourceChanged(object sender, EventArgs e)
index 0b2881c8720bf65a3bbea0bd0f732c82dab5d7ba..8eaced6dccd3d51f5c3df453b5650c5c480f6043 100755 (executable)
@@ -23,7 +23,7 @@ namespace MusicPlayer.Views
                 layout.Icon.SetBinding(ImageView.ResourceUrlProperty, "ThumbnailPath");
                 layout.TitleLabel.SetBinding(TextLabel.TextProperty, "TrackTitle");
                 layout.SubtitleLabel.SetBinding(TextLabel.TextProperty, "ArtistName");
-                //layout.SetBinding(ListItemLayout.IsPlayingProperty, "IsPlaying");  //Need to Modify
+                layout.SetBinding(ListItemLayout.IsPlayingProperty, "IsPlaying");
                 return layout;
             });
             collectionView.SelectionChanged += OnTrackSelection;
index f756ccb1e315c36746ac7649393dc4d665c11b90..b621e80f3e65e49293e10b23dbed02577c604f2f 100755 (executable)
@@ -26,7 +26,7 @@ namespace MusicPlayer.Views
                 layout.Icon.SetBinding(ImageView.ResourceUrlProperty, "ThumbnailPath");\r
                 layout.TitleLabel.SetBinding(TextLabel.TextProperty, "TrackTitle");\r
                 layout.SubtitleLabel.SetBinding(TextLabel.TextProperty, "ArtistName");\r
-                //layout.SetBinding(ListItemLayout.IsPlayingProperty, "IsPlaying");  //Need to Modify\r
+                layout.SetBinding(ListItemLayout.IsPlayingProperty, "IsPlaying");\r
                 return layout;\r
             });\r
             collectionView.ScrollingDirection = ScrollableBase.Direction.Vertical;\r
index be15aa6adb5b5aabb78efdde520367123bd893b4..400a82793caa62a1f5c6c28af7500f54418ebf6a 100755 (executable)
@@ -19,7 +19,7 @@
   </ItemGroup>\r
 \r
   <ItemGroup>\r
-    <PackageReference Include="Tizen.NET" Version="10.0.0.16834">\r
+    <PackageReference Include="Tizen.NET" Version="10.0.0.16872">\r
       <ExcludeAssets>Runtime</ExcludeAssets>\r
     </PackageReference>\r
     <PackageReference Include="Tizen.NET.Sdk" Version="1.1.6" />\r
index 39280c993cfd5e9c0fdf843fa2c639fc4caea177..f705adc478b4702a0c18e5582d3a48bb835f154d 100755 (executable)
Binary files a/packaging/org.tizen.MusicPlayer-1.0.0.tpk and b/packaging/org.tizen.MusicPlayer-1.0.0.tpk differ