mirror of
https://github.com/zoriya/Opus.git
synced 2025-12-06 06:26:15 +00:00
more button
This commit is contained in:
@@ -734,5 +734,10 @@ namespace MusicApp
|
||||
Browse.instance?.PopulateList();
|
||||
Playlist.instance?.PopulateView();
|
||||
}
|
||||
|
||||
public void Transition(int Resource, Android.Support.V4.App.Fragment fragment, bool backStack)
|
||||
{
|
||||
SupportFragmentManager.BeginTransaction().Replace(Resource, fragment).AddToBackStack(null).Commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -412,6 +412,9 @@
|
||||
<SubType>Designer</SubType>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable\ic_more_vert_black_24dp.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<Import Project="..\packages\NETStandard.Library.2.0.1\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\packages\NETStandard.Library.2.0.1\build\netstandard2.0\NETStandard.Library.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
@@ -55,7 +55,19 @@ namespace MusicApp.Resources.Portable_Class
|
||||
|
||||
if (!songList[position].isParsed)
|
||||
{
|
||||
}
|
||||
|
||||
if (!holder.more.HasOnClickListeners)
|
||||
{
|
||||
holder.more.Click += (sender, e) =>
|
||||
{
|
||||
Queue.instance?.More(songList[position]);
|
||||
Browse.instance?.More(songList[position]);
|
||||
YoutubeEngine.instance?.More(songList[position]);
|
||||
YtPlaylist.instance?.More(position);
|
||||
PlaylistTracks.instance?.More(songList[position], position);
|
||||
FolderTracks.instance?.More(songList[position]);
|
||||
};
|
||||
}
|
||||
|
||||
return convertView;
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
using Android.OS;
|
||||
using System.Collections.Generic;
|
||||
using Android.Widget;
|
||||
using Android.Content;
|
||||
using Android.Database;
|
||||
using Android.OS;
|
||||
using Android.Provider;
|
||||
using MusicApp.Resources.values;
|
||||
using Android.Content;
|
||||
using Android;
|
||||
using Android.Support.Design.Widget;
|
||||
using Android.Views;
|
||||
using Android.Content.PM;
|
||||
using Android.Support.V4.App;
|
||||
using Android.Support.V7.App;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using MusicApp.Resources.values;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MusicApp.Resources.Portable_Class
|
||||
{
|
||||
@@ -145,15 +142,20 @@ namespace MusicApp.Resources.Portable_Class
|
||||
Play(item);
|
||||
}
|
||||
|
||||
public void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
{
|
||||
Song item = musicList[e.Position];
|
||||
if (result != null)
|
||||
item = result[e.Position];
|
||||
|
||||
More(item);
|
||||
}
|
||||
|
||||
public void More(Song item)
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Activity, Resource.Style.AppCompatAlertDialogStyle);
|
||||
builder.SetTitle("Pick an action");
|
||||
builder.SetItems(actions, (senderAlert, args) =>
|
||||
builder.SetItems(actions, (senderAlert, args) =>
|
||||
{
|
||||
switch (args.Which)
|
||||
{
|
||||
@@ -174,7 +176,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
}
|
||||
});
|
||||
builder.Show();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Play(Song item)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
using Android.OS;
|
||||
using System.Collections.Generic;
|
||||
using Android.Widget;
|
||||
using Android.Net;
|
||||
using Android.Database;
|
||||
using Android.Provider;
|
||||
using MusicApp.Resources.values;
|
||||
using Android;
|
||||
using Android.Content;
|
||||
using Android;
|
||||
using Android.Support.Design.Widget;
|
||||
using Android.Views;
|
||||
using Android.Content.PM;
|
||||
using Android.Database;
|
||||
using Android.Net;
|
||||
using Android.OS;
|
||||
using Android.Provider;
|
||||
using Android.Support.V4.App;
|
||||
using Android.Support.V7.App;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MusicApp.Resources.Portable_Class
|
||||
{
|
||||
@@ -123,8 +121,13 @@ namespace MusicApp.Resources.Portable_Class
|
||||
|
||||
private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
{
|
||||
string path = paths[e.Position];
|
||||
string displayPath = pathDisplay[e.Position];
|
||||
More(e.Position);
|
||||
}
|
||||
|
||||
public void More(int position)
|
||||
{
|
||||
string path = paths[position];
|
||||
string displayPath = pathDisplay[position];
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Activity, Resource.Style.AppCompatAlertDialogStyle);
|
||||
builder.SetTitle("Pick an action");
|
||||
@@ -156,10 +159,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
act.SupportActionBar.Title = displayPath;
|
||||
|
||||
MainActivity.instance.HideTabs();
|
||||
FragmentTransaction transaction = FragmentManager.BeginTransaction();
|
||||
transaction.Replace(Resource.Id.contentView, FolderTracks.NewInstance(path));
|
||||
transaction.AddToBackStack(null);
|
||||
transaction.Commit();
|
||||
MainActivity.instance.Transition(Resource.Id.contentView, FolderTracks.NewInstance(path), true);
|
||||
}
|
||||
|
||||
public void GetPlaylist(string item)
|
||||
|
||||
@@ -138,12 +138,18 @@ namespace MusicApp.Resources.Portable_Class
|
||||
|
||||
private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
{
|
||||
Browse.act = Activity;
|
||||
Browse.inflater = LayoutInflater;
|
||||
Song item = tracks[e.Position];
|
||||
if (result != null)
|
||||
item = result[e.Position];
|
||||
|
||||
More(item);
|
||||
}
|
||||
|
||||
public void More(Song item)
|
||||
{
|
||||
Browse.act = Activity;
|
||||
Browse.inflater = LayoutInflater;
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Activity, Resource.Style.AppCompatAlertDialogStyle);
|
||||
builder.SetTitle("Pick an action");
|
||||
builder.SetItems(actions, (senderAlert, args) =>
|
||||
|
||||
@@ -127,10 +127,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
act.SupportActionBar.Title = playList[e.Position];
|
||||
|
||||
MainActivity.instance.HideTabs();
|
||||
FragmentTransaction transaction = FragmentManager.BeginTransaction();
|
||||
transaction.Replace(Resource.Id.contentView, PlaylistTracks.NewInstance(playlistId[e.Position]));
|
||||
transaction.AddToBackStack(null);
|
||||
transaction.Commit();
|
||||
MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(playlistId[e.Position]), true);
|
||||
}
|
||||
|
||||
private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
|
||||
@@ -203,12 +203,17 @@ namespace MusicApp.Resources.Portable_Class
|
||||
|
||||
private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
{
|
||||
List<string> action = actions.ToList();
|
||||
|
||||
Song item = tracks[e.Position];
|
||||
if (result != null)
|
||||
item = result[e.Position];
|
||||
|
||||
More(item, e.Position);
|
||||
}
|
||||
|
||||
public void More(Song item, int position)
|
||||
{
|
||||
List<string> action = actions.ToList();
|
||||
|
||||
if (!item.IsYt)
|
||||
{
|
||||
Browse.act = Activity;
|
||||
@@ -251,9 +256,9 @@ namespace MusicApp.Resources.Portable_Class
|
||||
RemoveFromPlaylist(item);
|
||||
else
|
||||
{
|
||||
string ytTrackID = ytTracksIDs[e.Position];
|
||||
string ytTrackID = ytTracksIDs[position];
|
||||
if (ytTracksIdsResult != null)
|
||||
ytTrackID = ytTracksIdsResult[e.Position];
|
||||
ytTrackID = ytTracksIdsResult[position];
|
||||
|
||||
YoutubeEngine.RemoveFromPlaylist(ytTrackID);
|
||||
RemoveFromYtPlaylist(item, ytTrackID);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.OS;
|
||||
using Android.Support.V4.App;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
@@ -58,6 +57,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
ListAdapter = adapter;
|
||||
ListView.TextFilterEnabled = true;
|
||||
ListView.ItemClick += ListView_ItemClick;
|
||||
ListView.ItemLongClick += ListView_ItemLongClick;
|
||||
|
||||
|
||||
if (adapter == null || adapter.Count == 0)
|
||||
@@ -78,5 +78,15 @@ namespace MusicApp.Resources.Portable_Class
|
||||
|
||||
MusicPlayer.instance.SwitchQueue(item);
|
||||
}
|
||||
|
||||
private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
{
|
||||
More(MusicPlayer.queue[e.Position]);
|
||||
}
|
||||
|
||||
public void More(Song item)
|
||||
{
|
||||
Toast.MakeText(Android.App.Application.Context, "Comming Soon", ToastLength.Short).Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,11 @@ namespace MusicApp.Resources.Portable_Class
|
||||
private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
{
|
||||
Song item = result[e.Position];
|
||||
More(item);
|
||||
}
|
||||
|
||||
public void More(Song item)
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Activity, Resource.Style.AppCompatAlertDialogStyle);
|
||||
builder.SetTitle("Pick an action");
|
||||
builder.SetItems(actions, (senderAlert, args) =>
|
||||
@@ -149,7 +153,6 @@ namespace MusicApp.Resources.Portable_Class
|
||||
}
|
||||
});
|
||||
builder.Show();
|
||||
|
||||
}
|
||||
|
||||
public static async void Play(string videoID)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using Android.Net;
|
||||
using Android.OS;
|
||||
using Android.OS;
|
||||
using Android.Support.V4.App;
|
||||
using Android.Support.V4.View;
|
||||
using Android.Support.V7.App;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
@@ -9,9 +7,7 @@ using Google.Apis.YouTube.v3;
|
||||
using Google.Apis.YouTube.v3.Data;
|
||||
using Java.Util;
|
||||
using MusicApp.Resources.values;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MusicApp.Resources.Portable_Class
|
||||
{
|
||||
@@ -146,13 +142,15 @@ namespace MusicApp.Resources.Portable_Class
|
||||
act.SupportActionBar.Title = playlists[e.Position].GetName();
|
||||
|
||||
MainActivity.instance.HideTabs();
|
||||
FragmentTransaction transaction = FragmentManager.BeginTransaction();
|
||||
transaction.Replace(Resource.Id.contentView, PlaylistTracks.NewInstance(playlists[e.Position].GetPath()));
|
||||
transaction.AddToBackStack(null);
|
||||
transaction.Commit();
|
||||
MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(playlists[e.Position].GetPath()), true);
|
||||
}
|
||||
|
||||
private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
|
||||
{
|
||||
More(e.Position);
|
||||
}
|
||||
|
||||
public void More(int position)
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Activity, Resource.Style.AppCompatAlertDialogStyle);
|
||||
builder.SetTitle("Pick an action");
|
||||
@@ -161,16 +159,16 @@ namespace MusicApp.Resources.Portable_Class
|
||||
switch (args.Which)
|
||||
{
|
||||
case 0:
|
||||
RandomPlay(playlists[e.Position].GetPath());
|
||||
RandomPlay(playlists[position].GetPath());
|
||||
break;
|
||||
case 1:
|
||||
Rename(e.Position, playlists[e.Position].GetPath());
|
||||
Rename(position, playlists[position].GetPath());
|
||||
break;
|
||||
case 2:
|
||||
RemovePlaylist(e.Position, playlists[e.Position].GetPath());
|
||||
RemovePlaylist(position, playlists[position].GetPath());
|
||||
break;
|
||||
case 3:
|
||||
DownloadPlaylist(playlists[e.Position].GetPath());
|
||||
DownloadPlaylist(playlists[position].GetPath());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
98
MusicApp/Resources/Resource.Designer.cs
generated
98
MusicApp/Resources/Resource.Designer.cs
generated
@@ -2427,82 +2427,85 @@ namespace MusicApp
|
||||
public const int ic_expand_more_black_24dp = 2130837609;
|
||||
|
||||
// aapt resource value: 0x7f02006a
|
||||
public const int ic_pause_black_24dp = 2130837610;
|
||||
public const int ic_more_vert_black_24dp = 2130837610;
|
||||
|
||||
// aapt resource value: 0x7f02006b
|
||||
public const int ic_play_arrow_black_24dp = 2130837611;
|
||||
public const int ic_pause_black_24dp = 2130837611;
|
||||
|
||||
// aapt resource value: 0x7f02006c
|
||||
public const int ic_playlist_add_white_24dp = 2130837612;
|
||||
public const int ic_play_arrow_black_24dp = 2130837612;
|
||||
|
||||
// aapt resource value: 0x7f02006d
|
||||
public const int ic_query_builder_black_24dp = 2130837613;
|
||||
public const int ic_playlist_add_white_24dp = 2130837613;
|
||||
|
||||
// aapt resource value: 0x7f02006e
|
||||
public const int ic_skip_next_black_24dp = 2130837614;
|
||||
public const int ic_query_builder_black_24dp = 2130837614;
|
||||
|
||||
// aapt resource value: 0x7f02006f
|
||||
public const int ic_skip_previous_black_24dp = 2130837615;
|
||||
public const int ic_skip_next_black_24dp = 2130837615;
|
||||
|
||||
// aapt resource value: 0x7f020070
|
||||
public const int ic_timer_white_24dp = 2130837616;
|
||||
public const int ic_skip_previous_black_24dp = 2130837616;
|
||||
|
||||
// aapt resource value: 0x7f020071
|
||||
public const int MusicIcon = 2130837617;
|
||||
public const int ic_timer_white_24dp = 2130837617;
|
||||
|
||||
// aapt resource value: 0x7f020072
|
||||
public const int navigation_empty_icon = 2130837618;
|
||||
public const int MusicIcon = 2130837618;
|
||||
|
||||
// aapt resource value: 0x7f020073
|
||||
public const int noAlbum = 2130837619;
|
||||
public const int navigation_empty_icon = 2130837619;
|
||||
|
||||
// aapt resource value: 0x7f020074
|
||||
public const int notification_action_background = 2130837620;
|
||||
public const int noAlbum = 2130837620;
|
||||
|
||||
// aapt resource value: 0x7f020075
|
||||
public const int notification_bg = 2130837621;
|
||||
public const int notification_action_background = 2130837621;
|
||||
|
||||
// aapt resource value: 0x7f020076
|
||||
public const int notification_bg_low = 2130837622;
|
||||
public const int notification_bg = 2130837622;
|
||||
|
||||
// aapt resource value: 0x7f020077
|
||||
public const int notification_bg_low_normal = 2130837623;
|
||||
public const int notification_bg_low = 2130837623;
|
||||
|
||||
// aapt resource value: 0x7f020078
|
||||
public const int notification_bg_low_pressed = 2130837624;
|
||||
public const int notification_bg_low_normal = 2130837624;
|
||||
|
||||
// aapt resource value: 0x7f020079
|
||||
public const int notification_bg_normal = 2130837625;
|
||||
public const int notification_bg_low_pressed = 2130837625;
|
||||
|
||||
// aapt resource value: 0x7f02007a
|
||||
public const int notification_bg_normal_pressed = 2130837626;
|
||||
public const int notification_bg_normal = 2130837626;
|
||||
|
||||
// aapt resource value: 0x7f02007b
|
||||
public const int notification_icon_background = 2130837627;
|
||||
|
||||
// aapt resource value: 0x7f020082
|
||||
public const int notification_template_icon_bg = 2130837634;
|
||||
|
||||
// aapt resource value: 0x7f020083
|
||||
public const int notification_template_icon_low_bg = 2130837635;
|
||||
public const int notification_bg_normal_pressed = 2130837627;
|
||||
|
||||
// aapt resource value: 0x7f02007c
|
||||
public const int notification_tile_bg = 2130837628;
|
||||
public const int notification_icon_background = 2130837628;
|
||||
|
||||
// aapt resource value: 0x7f020083
|
||||
public const int notification_template_icon_bg = 2130837635;
|
||||
|
||||
// aapt resource value: 0x7f020084
|
||||
public const int notification_template_icon_low_bg = 2130837636;
|
||||
|
||||
// aapt resource value: 0x7f02007d
|
||||
public const int notify_panel_notification_icon_bg = 2130837629;
|
||||
public const int notification_tile_bg = 2130837629;
|
||||
|
||||
// aapt resource value: 0x7f02007e
|
||||
public const int PlaylistPlay = 2130837630;
|
||||
public const int notify_panel_notification_icon_bg = 2130837630;
|
||||
|
||||
// aapt resource value: 0x7f02007f
|
||||
public const int PlaylistPlayIcon = 2130837631;
|
||||
public const int PlaylistPlay = 2130837631;
|
||||
|
||||
// aapt resource value: 0x7f020080
|
||||
public const int search = 2130837632;
|
||||
public const int PlaylistPlayIcon = 2130837632;
|
||||
|
||||
// aapt resource value: 0x7f020081
|
||||
public const int settings = 2130837633;
|
||||
public const int search = 2130837633;
|
||||
|
||||
// aapt resource value: 0x7f020082
|
||||
public const int settings = 2130837634;
|
||||
|
||||
static Drawable()
|
||||
{
|
||||
@@ -2607,8 +2610,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f0800a5
|
||||
public const int bottomView = 2131230885;
|
||||
|
||||
// aapt resource value: 0x7f0800e3
|
||||
public const int browseLayout = 2131230947;
|
||||
// aapt resource value: 0x7f0800e4
|
||||
public const int browseLayout = 2131230948;
|
||||
|
||||
// aapt resource value: 0x7f08008b
|
||||
public const int browseList = 2131230859;
|
||||
@@ -2688,8 +2691,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f0800cd
|
||||
public const int downFAB = 2131230925;
|
||||
|
||||
// aapt resource value: 0x7f0800e4
|
||||
public const int downloadLayout = 2131230948;
|
||||
// aapt resource value: 0x7f0800e5
|
||||
public const int downloadLayout = 2131230949;
|
||||
|
||||
// aapt resource value: 0x7f08007d
|
||||
public const int edit_query = 2131230845;
|
||||
@@ -2841,8 +2844,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f0800ba
|
||||
public const int line1 = 2131230906;
|
||||
|
||||
// aapt resource value: 0x7f0800df
|
||||
public const int line2 = 2131230943;
|
||||
// aapt resource value: 0x7f0800e0
|
||||
public const int line2 = 2131230944;
|
||||
|
||||
// aapt resource value: 0x7f0800bc
|
||||
public const int line3 = 2131230908;
|
||||
@@ -2856,8 +2859,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f08005f
|
||||
public const int list_item = 2131230815;
|
||||
|
||||
// aapt resource value: 0x7f0800e1
|
||||
public const int masked = 2131230945;
|
||||
// aapt resource value: 0x7f0800e2
|
||||
public const int masked = 2131230946;
|
||||
|
||||
// aapt resource value: 0x7f0800ae
|
||||
public const int media_actions = 2131230894;
|
||||
@@ -2868,11 +2871,14 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f08004f
|
||||
public const int mini = 2131230799;
|
||||
|
||||
// aapt resource value: 0x7f0800df
|
||||
public const int moreButton = 2131230943;
|
||||
|
||||
// aapt resource value: 0x7f08002a
|
||||
public const int multiply = 2131230762;
|
||||
|
||||
// aapt resource value: 0x7f0800e2
|
||||
public const int musicLayout = 2131230946;
|
||||
// aapt resource value: 0x7f0800e3
|
||||
public const int musicLayout = 2131230947;
|
||||
|
||||
// aapt resource value: 0x7f080095
|
||||
public const int navigation_header_container = 2131230869;
|
||||
@@ -2946,8 +2952,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f0800c6
|
||||
public const int playerTitle = 2131230918;
|
||||
|
||||
// aapt resource value: 0x7f0800e5
|
||||
public const int playlistLayout = 2131230949;
|
||||
// aapt resource value: 0x7f0800e6
|
||||
public const int playlistLayout = 2131230950;
|
||||
|
||||
// aapt resource value: 0x7f08008c
|
||||
public const int playlistName = 2131230860;
|
||||
@@ -3030,8 +3036,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f080089
|
||||
public const int select_dialog_listview = 2131230857;
|
||||
|
||||
// aapt resource value: 0x7f0800e6
|
||||
public const int settings = 2131230950;
|
||||
// aapt resource value: 0x7f0800e7
|
||||
public const int settings = 2131230951;
|
||||
|
||||
// aapt resource value: 0x7f080073
|
||||
public const int shortcut = 2131230835;
|
||||
@@ -3195,8 +3201,8 @@ namespace MusicApp
|
||||
// aapt resource value: 0x7f08000e
|
||||
public const int view_offset_helper = 2131230734;
|
||||
|
||||
// aapt resource value: 0x7f0800e0
|
||||
public const int visible = 2131230944;
|
||||
// aapt resource value: 0x7f0800e1
|
||||
public const int visible = 2131230945;
|
||||
|
||||
// aapt resource value: 0x7f08008a
|
||||
public const int webview = 2131230858;
|
||||
|
||||
BIN
MusicApp/Resources/drawable/ic_more_vert_black_24dp.png
Normal file
BIN
MusicApp/Resources/drawable/ic_more_vert_black_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 132 B |
@@ -1,74 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="com.journaldev.tablayoutviewpager.MainActivity">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" >
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabTextColor="@android:color/white"
|
||||
app:tabSelectedTextColor="@android:color/white"
|
||||
app:tabIndicatorColor="@android:color/white"
|
||||
app:tabGravity="fill"
|
||||
app:tabMode="fixed" />
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
<ProgressBar
|
||||
android:layout_height="4dp"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/ytProgress"
|
||||
android:indeterminate="true"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="com.journaldev.tablayoutviewpager.MainActivity">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content" />
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<FrameLayout
|
||||
android:id="@+id/contentView"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" >
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabTextColor="@android:color/white"
|
||||
app:tabSelectedTextColor="@android:color/white"
|
||||
app:tabIndicatorColor="@android:color/white"
|
||||
app:tabGravity="fill"
|
||||
app:tabMode="fixed" />
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
<ProgressBar
|
||||
android:layout_height="4dp"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/ytProgress"
|
||||
android:indeterminate="true"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_width="match_parent" />
|
||||
<RelativeLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:elevation="12dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
android:id="@+id/bottomView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<FrameLayout
|
||||
android:id="@+id/contentView"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent" />
|
||||
<RelativeLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:elevation="12dp"
|
||||
android:layout_alignParentBottom="true">
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
android:id="@+id/bottomView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
app:menu="@menu/bottom_items" />
|
||||
<FrameLayout
|
||||
android:layout_height="70dp"
|
||||
android:visibility="gone"
|
||||
android:layout_below="@id/bottomView"
|
||||
android:layout_width="match_parent">
|
||||
<include
|
||||
layout="@layout/SmallPlayer"
|
||||
android:id="@+id/smallPlayer" />
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
android:layout_height="56dp"
|
||||
app:menu="@menu/bottom_items" />
|
||||
<FrameLayout
|
||||
android:layout_height="70dp"
|
||||
android:visibility="gone"
|
||||
android:layout_below="@id/bottomView"
|
||||
android:layout_width="match_parent">
|
||||
<include
|
||||
layout="@layout/SmallPlayer"
|
||||
android:id="@+id/smallPlayer" />
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -1,32 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:padding="8dp">
|
||||
<ImageView
|
||||
android:id="@+id/albumArt"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/MusicIcon"
|
||||
android:layout_alignParentLeft="true" />
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="100dp">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="16dip"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/artist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#000" />
|
||||
</LinearLayout>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:padding="8dp">
|
||||
<ImageView
|
||||
android:id="@+id/albumArt"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/MusicIcon"
|
||||
android:layout_alignParentLeft="true" />
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="100dp">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000"
|
||||
android:textSize="16dip"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/artist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14dip"
|
||||
android:textColor="#000" />
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/moreButton"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:padding="5dp"
|
||||
android:clickable="true"
|
||||
android:background="@null"
|
||||
android:src="@drawable/ic_more_vert_black_24dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true" />
|
||||
</RelativeLayout >
|
||||
@@ -9,12 +9,14 @@ namespace MusicApp.Resources.values
|
||||
public TextView Title;
|
||||
public TextView Artist;
|
||||
public ImageView AlbumArt;
|
||||
public ImageView more;
|
||||
|
||||
public Holder(View v)
|
||||
{
|
||||
Title = v.FindViewById<TextView>(Resource.Id.title);
|
||||
Artist = v.FindViewById<TextView>(Resource.Id.artist);
|
||||
AlbumArt = v.FindViewById<ImageView>(Resource.Id.albumArt);
|
||||
more = v.FindViewById<ImageView>(Resource.Id.moreButton);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user