Added skeleton Searching functionality to the Album and Artist tabbed views in addition to the Song view. Added contributors and the License to the About settings # 53 #44
This commit is contained in:
@@ -42,13 +42,10 @@ namespace Mear.Droid
|
||||
{
|
||||
if (Popup.SendBackPressed(base.OnBackPressed))
|
||||
{
|
||||
var demo = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var demo = 0;
|
||||
}
|
||||
base.OnBackPressed();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,8 +81,7 @@ namespace Mear.Playback
|
||||
switch (control)
|
||||
{
|
||||
case PlayControls.PLAYOFFLINE:
|
||||
var songPath = song.SongPath;
|
||||
await PlaySong(songPath);
|
||||
await PlaySong(song);
|
||||
var plyCountRepo = new DBPlayCountRepository();
|
||||
plyCountRepo.AffectPlayCount(song);
|
||||
InitializeRepeatMode();
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace Mear.Repositories.Database
|
||||
}
|
||||
else
|
||||
{
|
||||
plyCount.PlayCounter++;
|
||||
_Db.Update(plyCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace Mear.ViewModels
|
||||
#region Fields
|
||||
private ObservableCollection<Album> _albumItems;
|
||||
private Command _refreshAlbums;
|
||||
private Command _searchAlbumCommand;
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -30,6 +31,11 @@ namespace Mear.ViewModels
|
||||
{
|
||||
get => _refreshAlbums;
|
||||
}
|
||||
public Command SearchAlbumCommand
|
||||
{
|
||||
get => _searchAlbumCommand;
|
||||
set => _searchAlbumCommand = value;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -38,6 +44,7 @@ namespace Mear.ViewModels
|
||||
{
|
||||
_albumItems = new ObservableCollection<Album>();
|
||||
_refreshAlbums = new Command(async () => await PopulateAlbumsAsync());
|
||||
_searchAlbumCommand = new Command(async () => await SearchAlbum());
|
||||
|
||||
PopulateAlbumsAsync();
|
||||
}
|
||||
@@ -66,6 +73,9 @@ namespace Mear.ViewModels
|
||||
|
||||
IsRefreshing = false;
|
||||
}
|
||||
private async Task SearchAlbum()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace Mear.ViewModels
|
||||
#region Fields
|
||||
private ObservableCollection<Artist> _artistItems;
|
||||
private Command _refreshArtists;
|
||||
private Command _searchArtistCommand;
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -30,6 +31,11 @@ namespace Mear.ViewModels
|
||||
{
|
||||
get => _refreshArtists;
|
||||
}
|
||||
public Command SearchArtistCommand
|
||||
{
|
||||
get => _searchArtistCommand;
|
||||
set => _searchArtistCommand = value;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -38,6 +44,7 @@ namespace Mear.ViewModels
|
||||
{
|
||||
_artistItems = new ObservableCollection<Artist>();
|
||||
_refreshArtists = new Command(async () => await PopulateArtistsAsync());
|
||||
_searchArtistCommand = new Command(async () => await SearchArtists());
|
||||
|
||||
PopulateArtistsAsync();
|
||||
}
|
||||
@@ -66,6 +73,9 @@ namespace Mear.ViewModels
|
||||
|
||||
IsRefreshing = false;
|
||||
}
|
||||
private async Task SearchArtists()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Mear.ViewModels
|
||||
#region INotifyPropertyChanged
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
#endregion
|
||||
protected string _searchedText;
|
||||
private bool _isRefreshing;
|
||||
#endregion
|
||||
|
||||
@@ -27,6 +28,17 @@ namespace Mear.ViewModels
|
||||
NotifyPropertyChanged("IsRefreshing");
|
||||
}
|
||||
}
|
||||
|
||||
public string SearchedText
|
||||
{
|
||||
get => _searchedText;
|
||||
set
|
||||
{
|
||||
_searchedText = value;
|
||||
NotifyPropertyChanged("SearchSong");
|
||||
//SearchSongText(_searchedText);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace Mear.ViewModels
|
||||
private ObservableCollection<Song> _songItems;
|
||||
private Command _refreshSongs;
|
||||
private Command _searchSongsCommand;
|
||||
private string _searchedText;
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -41,16 +40,6 @@ namespace Mear.ViewModels
|
||||
set => _searchSongsCommand = value;
|
||||
}
|
||||
|
||||
public string SearchedText
|
||||
{
|
||||
get => _searchedText;
|
||||
set
|
||||
{
|
||||
_searchedText = value;
|
||||
NotifyPropertyChanged("SearchSong");
|
||||
//SearchSongText(_searchedText);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,12 @@
|
||||
<vm:AlbumViewModel />
|
||||
</ContentPage.BindingContext>
|
||||
<StackLayout>
|
||||
<ListView x:Name="AlbumListView"
|
||||
<SearchBar x:Name="SearchAlbum"
|
||||
Placeholder="Album"
|
||||
SearchCommand="{Binding SearchAlbumCommand}"
|
||||
SearchCommandParameter="{Binding SearchedText, Source=x:Reference Search}"
|
||||
Text="{Binding SearchedText, Mode=TwoWay}" />
|
||||
<ListView x:Name="AlbumListView"
|
||||
ItemsSource="{Binding AlbumItems}"
|
||||
VerticalOptions="FillAndExpand"
|
||||
HasUnevenRows="False"
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Mear.Views
|
||||
#region Events
|
||||
private void AlbumListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
|
||||
{
|
||||
|
||||
var albumItem = (sender as ListView).SelectedItem = null;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
@@ -13,7 +13,12 @@
|
||||
</ContentPage.BindingContext>
|
||||
|
||||
<StackLayout>
|
||||
<ListView x:Name="ArtistListView"
|
||||
<SearchBar x:Name="SearchArtist"
|
||||
Placeholder="Artist"
|
||||
SearchCommand="{Binding SearchArtistCommand}"
|
||||
SearchCommandParameter="{Binding SearchedText, Source=x:Reference Search}"
|
||||
Text="{Binding SearchedText, Mode=TwoWay}" />
|
||||
<ListView x:Name="ArtistListView"
|
||||
ItemsSource="{Binding ArtistItems}"
|
||||
VerticalOptions="FillAndExpand"
|
||||
HasUnevenRows="False"
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Mear.Views
|
||||
#region Events
|
||||
private void ArtistListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
|
||||
{
|
||||
|
||||
var artistItem = (sender as ListView).SelectedItem = null;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace Mear.Views.Popups
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Methods
|
||||
#region PopUpInit
|
||||
protected override void OnAppearing()
|
||||
@@ -87,7 +88,7 @@ namespace Mear.Views.Popups
|
||||
|
||||
protected override bool OnBackgroundClicked()
|
||||
{
|
||||
return base.OnBackgroundClicked();
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
@@ -23,24 +23,25 @@
|
||||
HorizontalOptions="Center"
|
||||
Padding="40, 40, 40, 40">
|
||||
<Label
|
||||
Text="Mear"/>
|
||||
Text="Mear"
|
||||
FontSize="Large"/>
|
||||
<Label
|
||||
Text="Pre-developement release version" />
|
||||
<ListView x:Name="ContributorsView"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
ItemsSource="{Binding ContributorItems}"
|
||||
HasUnevenRows="True" >
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="{Binding Contributor}" />
|
||||
<Label Text="{Binding Role}" />
|
||||
</StackLayout>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
Text="Pre-developement release version"
|
||||
FontSize="Medium"/>
|
||||
<StackLayout>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="Kun Deng"
|
||||
FontSize="Small" />
|
||||
<Label Text="- Author"
|
||||
FontSize="Small" />
|
||||
</StackLayout>
|
||||
<StackLayout Orientation="Horizontal">
|
||||
<Label Text="zularizal"
|
||||
FontSize="Small" />
|
||||
<Label Text="- Graphic Designer"
|
||||
FontSize="Small" />
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
<Label Text="M.I.T. Open Source License" />
|
||||
</StackLayout>
|
||||
</pages:PopupPage>
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace Mear.Views
|
||||
{
|
||||
var msg = ex.Message;
|
||||
}
|
||||
|
||||
(sender as ListView).SelectedItem = null;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user