From 2aa89041917bbd47c0c48133a35917de34c70855 Mon Sep 17 00:00:00 2001 From: Gboy9155 <32224410+Gboy9155@users.noreply.github.com> Date: Wed, 25 Oct 2017 00:13:09 +0200 Subject: [PATCH] making small player --- MusicApp/MusicApp.csproj | 13 +- MusicApp/Resources/Fragments/playerControl.cs | 25 -- .../Resources/Portable Class/MusicPlayer.cs | 12 +- MusicApp/Resources/Portable Class/Player.cs | 59 ++-- MusicApp/Resources/Portable Class/Queue.cs | 78 +++-- .../Resources/Portable Class/SleepManager.cs | 18 + MusicApp/Resources/Resource.Designer.cs | 310 +++++++++--------- MusicApp/Resources/layout/Main.axml | 6 +- MusicApp/Resources/layout/SmallPlayer.xml | 57 ++++ MusicApp/Resources/layout/playerControl.xml | 62 ---- 10 files changed, 332 insertions(+), 308 deletions(-) delete mode 100644 MusicApp/Resources/Fragments/playerControl.cs create mode 100644 MusicApp/Resources/Portable Class/SleepManager.cs create mode 100644 MusicApp/Resources/layout/SmallPlayer.xml delete mode 100644 MusicApp/Resources/layout/playerControl.xml diff --git a/MusicApp/MusicApp.csproj b/MusicApp/MusicApp.csproj index 9e8a9a2..12a19e0 100644 --- a/MusicApp/MusicApp.csproj +++ b/MusicApp/MusicApp.csproj @@ -39,6 +39,7 @@ false false Xamarin + True @@ -148,7 +149,6 @@ - @@ -162,6 +162,7 @@ + @@ -298,11 +299,6 @@ Designer - - - Designer - - @@ -350,6 +346,11 @@ + + + Designer + + diff --git a/MusicApp/Resources/Fragments/playerControl.cs b/MusicApp/Resources/Fragments/playerControl.cs deleted file mode 100644 index fca7b94..0000000 --- a/MusicApp/Resources/Fragments/playerControl.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Android.OS; -using Android.Views; -using Android.Support.V4.App; - -namespace MusicApp.Resources.Fragments -{ - public class playerControl : Fragment - { - public override void OnCreate(Bundle savedInstanceState) - { - base.OnCreate(savedInstanceState); - } - - public static Fragment NewInstance() - { - return new playerControl { Arguments = new Bundle() }; - } - - public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) - { - var useless = base.OnCreateView(inflater, container, savedInstanceState); - return inflater.Inflate(Resource.Layout.playerControl, null); - } - } -} \ No newline at end of file diff --git a/MusicApp/Resources/Portable Class/MusicPlayer.cs b/MusicApp/Resources/Portable Class/MusicPlayer.cs index a1ada6c..18e6a89 100644 --- a/MusicApp/Resources/Portable Class/MusicPlayer.cs +++ b/MusicApp/Resources/Portable Class/MusicPlayer.cs @@ -32,7 +32,7 @@ namespace MusicApp.Resources.Portable_Class public static string title; private Notification notification; - private int notificationID = 1000; + private const int notificationID = 1000; public override IBinder OnBind(Intent intent) @@ -84,7 +84,7 @@ namespace MusicApp.Resources.Portable_Class break; case "Stop": if (player.IsPlaying) - Pause(); + Stop(); break; case "YTPlay": string[] song = intent.GetStringArrayListExtra("song").ToArray(); @@ -435,7 +435,10 @@ namespace MusicApp.Resources.Portable_Class player.Pause(); StopForeground(false); - if(Player.instance != null) + RelativeLayout smallPlayer = MainActivity.instance.FindViewById(Resource.Id.smallPlayer); + smallPlayer.FindViewById(Resource.Id.spPlay).SetImageResource(Resource.Drawable.ic_play_arrow_black_24dp); + + if (Player.instance != null) { Player.instance.playerView.FindViewById(Resource.Id.playButton).SetImageResource(Resource.Drawable.ic_play_arrow_black_24dp); } @@ -455,6 +458,9 @@ namespace MusicApp.Resources.Portable_Class player.Start(); StartForeground(notificationID, notification); + RelativeLayout smallPlayer = MainActivity.instance.FindViewById(Resource.Id.smallPlayer); + smallPlayer.FindViewById(Resource.Id.spPlay).SetImageResource(Resource.Drawable.ic_pause_black_24dp); + if (Player.instance != null) { Player.instance.playerView.FindViewById(Resource.Id.playButton).SetImageResource(Resource.Drawable.ic_pause_black_24dp); diff --git a/MusicApp/Resources/Portable Class/Player.cs b/MusicApp/Resources/Portable Class/Player.cs index bbcf381..c40140b 100644 --- a/MusicApp/Resources/Portable Class/Player.cs +++ b/MusicApp/Resources/Portable Class/Player.cs @@ -3,13 +3,15 @@ using Android.OS; using Android.Views; using Android.Widget; using MusicApp.Resources.values; -using Android.Support.V4.App; using System; using Square.Picasso; using Android.Support.Design.Widget; using System.Threading.Tasks; -using System.Threading; -using Android.Support.V7.App; +using Android.Support.V4.App; +using Java.Util; + +using AlarmManager = Android.App.AlarmManager; +using PendingIntent = Android.App.PendingIntent; namespace MusicApp.Resources.Portable_Class { @@ -17,11 +19,11 @@ namespace MusicApp.Resources.Portable_Class { public static Player instance; public View playerView; + public const int notificationID = 1001; private Handler handler = new Handler(); private SeekBar bar; private ImageView imgView; - private CancellationTokenSource cancelToken; private int[] timers = new int[] { 0, 1, 10, 30, 60, 120 }; private string[] items = new string[] { "Off", "1 minute", "10 minutes", "30 minutes", "1 hour", "2 hours" }; private int checkedItem = 0; @@ -123,7 +125,10 @@ namespace MusicApp.Resources.Portable_Class private void UpdateSeekBar() { if (!MusicPlayer.isRunning) + { handler.RemoveCallbacks(UpdateSeekBar); + return; + } bar.Progress = MusicPlayer.CurrentPosition; @@ -158,7 +163,7 @@ namespace MusicApp.Resources.Portable_Class private void SleepButton_Click(object sender, EventArgs e) { - AlertDialog.Builder builder = new AlertDialog.Builder(Activity, Resource.Style.AppCompatAlertDialogStyle); + Android.Support.V7.App.AlertDialog.Builder builder = new Android.Support.V7.App.AlertDialog.Builder(Activity, Resource.Style.AppCompatAlertDialogStyle); builder.SetTitle("Sleep in :"); builder.SetSingleChoiceItems(items, checkedItem, ((senders, eventargs) => { checkedItem = eventargs.Which; })); builder.SetPositiveButton("Ok", ((senders, args) => { Sleep(timers[checkedItem]); })); @@ -166,30 +171,32 @@ namespace MusicApp.Resources.Portable_Class builder.Show(); } - async void Sleep(int time) + #pragma warning disable CS0618 + void Sleep(int time) { - cancelToken?.Cancel(); + Date date = new Date(Java.Lang.JavaSystem.CurrentTimeMillis()); + date.Minutes += time; - if (time == 0) - return; + Context.RegisterReceiver(new SleepManager(), new IntentFilter("SleepManager")); - using (cancelToken = new CancellationTokenSource()) - { - try - { - await Task.Run(() => - { - Thread.Sleep(time * 60 * 1000); - Intent intent = new Intent(Android.App.Application.Context, typeof(MusicPlayer)); - intent.SetAction("Stop"); - Activity.StartService(intent); - }); - } - catch (TaskCanceledException) - { - Console.WriteLine("Sleep Timer Canceled"); - } - } + Intent intent = new Intent("SleepManager"); + PendingIntent pendingIntent = PendingIntent.GetBroadcast(Android.App.Application.Context, 0, intent, Android.App.PendingIntentFlags.CancelCurrent); + + AlarmManager alarms = (AlarmManager)Context.GetSystemService(Context.AlarmService); + alarms.Set(Android.App.AlarmType.RtcWakeup, date.Time, pendingIntent); + + NotificationCompat.Builder builder = new NotificationCompat.Builder(Android.App.Application.Context) + .SetVisibility(NotificationCompat.VisibilityPublic) + .SetSmallIcon(Resource.Drawable.MusicIcon) + .SetContentTitle("Music will stop in:") + .SetContentText(time + " minutes") + .SetOngoing(true); + + Android.App.Notification notification = builder.Build(); + + Android.App.NotificationManager notificationManager = (Android.App.NotificationManager)Context.GetSystemService(Context.NotificationService); + notificationManager.Notify(notificationID, notification); } + #pragma warning restore CS0618 } } \ No newline at end of file diff --git a/MusicApp/Resources/Portable Class/Queue.cs b/MusicApp/Resources/Portable Class/Queue.cs index c73134e..c07b382 100644 --- a/MusicApp/Resources/Portable Class/Queue.cs +++ b/MusicApp/Resources/Portable Class/Queue.cs @@ -4,21 +4,12 @@ using Android.Views; using Android.Widget; using MusicApp.Resources.values; using Android.Support.V4.App; -using System; using Square.Picasso; -using Android.Graphics; -using Android.Support.Design.Widget; -using MusicApp.Resources.Fragments; -using Android.Transitions; -using Android.Animation; -using Android.App.Job; -using System.Threading.Tasks; -using System.Threading; -using Android.Support.V7.App; +using System; namespace MusicApp.Resources.Portable_Class { - public class Queue: ListFragment/*, ViewTreeObserver.IOnPreDrawListener*/ + public class Queue: ListFragment { public static Queue instance; public Adapter adapter; @@ -26,28 +17,6 @@ namespace MusicApp.Resources.Portable_Class private View view; private bool isEmpty = false; - //private float yFraction = 0; - - - //public void SetYFraction(float fraction) - //{ - // yFraction = fraction; - - // float translationY = View.Height * fraction; - // View.TranslationY = translationY; - //} - - //public bool OnPreDraw() - //{ - // if(View.Height == 0) - // SetYFraction(yFraction); - // return true; - //} - - //public float GetYFraction() - //{ - // return yFraction; - //} public override void OnActivityCreated(Bundle savedInstanceState) { @@ -57,10 +26,53 @@ namespace MusicApp.Resources.Portable_Class ListView.EmptyView = emptyView; PopulateView(); + + if (MusicPlayer.isRunning) + { + Song current = MusicPlayer.queue[MusicPlayer.CurrentID()]; + + RelativeLayout smallPlayer = Activity.FindViewById(Resource.Id.smallPlayer); + smallPlayer.Visibility = ViewStates.Visible; + smallPlayer.FindViewById(Resource.Id.spTitle).Text = current.GetName(); + smallPlayer.FindViewById(Resource.Id.spArtist).Text = current.GetArtist(); + ImageView art = smallPlayer.FindViewById(Resource.Id.spArt); + + var songCover = Android.Net.Uri.Parse("content://media/external/audio/albumart"); + var songAlbumArtUri = ContentUris.WithAppendedId(songCover, current.GetAlbumArt()); + + Picasso.With(Android.App.Application.Context).Load(songAlbumArtUri).Placeholder(Resource.Drawable.MusicIcon).Into(art); + + smallPlayer.FindViewById(Resource.Id.spLast).Click += Last_Click; + smallPlayer.FindViewById(Resource.Id.spPlay).Click += Play_Click; + smallPlayer.FindViewById(Resource.Id.spNext).Click += Next_Click; + } + } + + private void Last_Click(object sender, EventArgs e) + { + Intent intent = new Intent(Android.App.Application.Context, typeof(MusicPlayer)); + intent.SetAction("Previus"); + Activity.StartService(intent); + } + + private void Play_Click(object sender, EventArgs e) + { + Intent intent = new Intent(Android.App.Application.Context, typeof(MusicPlayer)); + intent.SetAction("Pause"); + Activity.StartService(intent); + } + + private void Next_Click(object sender, EventArgs e) + { + Intent intent = new Intent(Android.App.Application.Context, typeof(MusicPlayer)); + intent.SetAction("Next"); + Activity.StartService(intent); } public override void OnDestroy() { + RelativeLayout smallPlayer = Activity.FindViewById(Resource.Id.smallPlayer); + smallPlayer.Visibility = ViewStates.Gone; if (isEmpty) { ViewGroup rootView = Activity.FindViewById(Android.Resource.Id.Content); diff --git a/MusicApp/Resources/Portable Class/SleepManager.cs b/MusicApp/Resources/Portable Class/SleepManager.cs new file mode 100644 index 0000000..fa1a5f7 --- /dev/null +++ b/MusicApp/Resources/Portable Class/SleepManager.cs @@ -0,0 +1,18 @@ +using Android.App; +using Android.Content; + +namespace MusicApp.Resources.Portable_Class +{ + public class SleepManager : BroadcastReceiver + { + public override void OnReceive(Context context, Intent intent) + { + Intent musicIntent = new Intent(Application.Context, typeof(MusicPlayer)); + musicIntent.SetAction("Stop"); + MainActivity.instance.StartService(musicIntent); + + NotificationManager notificationManager = (NotificationManager)context.GetSystemService(Context.NotificationService); + notificationManager.Cancel(Player.notificationID); + } + } +} \ No newline at end of file diff --git a/MusicApp/Resources/Resource.Designer.cs b/MusicApp/Resources/Resource.Designer.cs index a447f3d..4a8a97f 100644 --- a/MusicApp/Resources/Resource.Designer.cs +++ b/MusicApp/Resources/Resource.Designer.cs @@ -2401,8 +2401,8 @@ namespace MusicApp public partial class Id { - // aapt resource value: 0x7f070091 - public const int action0 = 2131165329; + // aapt resource value: 0x7f070092 + public const int action0 = 2131165330; // aapt resource value: 0x7f070064 public const int action_bar = 2131165284; @@ -2425,17 +2425,17 @@ namespace MusicApp // aapt resource value: 0x7f070041 public const int action_bar_title = 2131165249; - // aapt resource value: 0x7f07008e - public const int action_container = 2131165326; + // aapt resource value: 0x7f07008f + public const int action_container = 2131165327; // aapt resource value: 0x7f070065 public const int action_context_bar = 2131165285; - // aapt resource value: 0x7f070095 - public const int action_divider = 2131165333; + // aapt resource value: 0x7f070096 + public const int action_divider = 2131165334; - // aapt resource value: 0x7f07008f - public const int action_image = 2131165327; + // aapt resource value: 0x7f070090 + public const int action_image = 2131165328; // aapt resource value: 0x7f070003 public const int action_menu_divider = 2131165187; @@ -2452,11 +2452,11 @@ namespace MusicApp // aapt resource value: 0x7f070043 public const int action_mode_close_button = 2131165251; - // aapt resource value: 0x7f070090 - public const int action_text = 2131165328; + // aapt resource value: 0x7f070091 + public const int action_text = 2131165329; - // aapt resource value: 0x7f07009e - public const int actions = 2131165342; + // aapt resource value: 0x7f07009f + public const int actions = 2131165343; // aapt resource value: 0x7f070044 public const int activity_chooser_view_content = 2131165252; @@ -2464,8 +2464,8 @@ namespace MusicApp // aapt resource value: 0x7f07001e public const int add = 2131165214; - // aapt resource value: 0x7f0700c0 - public const int albumArt = 2131165376; + // aapt resource value: 0x7f0700c2 + public const int albumArt = 2131165378; // aapt resource value: 0x7f070058 public const int alertTitle = 2131165272; @@ -2476,8 +2476,8 @@ namespace MusicApp // aapt resource value: 0x7f070023 public const int always = 2131165219; - // aapt resource value: 0x7f0700c1 - public const int artist = 2131165377; + // aapt resource value: 0x7f0700c3 + public const int artist = 2131165379; // aapt resource value: 0x7f07002f public const int auto = 2131165231; @@ -2488,11 +2488,11 @@ namespace MusicApp // aapt resource value: 0x7f070028 public const int bottom = 2131165224; - // aapt resource value: 0x7f07008c - public const int bottomView = 2131165324; + // aapt resource value: 0x7f07008d + public const int bottomView = 2131165325; - // aapt resource value: 0x7f0700c6 - public const int browseLayout = 2131165382; + // aapt resource value: 0x7f0700c8 + public const int browseLayout = 2131165384; // aapt resource value: 0x7f070073 public const int browseList = 2131165299; @@ -2500,8 +2500,8 @@ namespace MusicApp // aapt resource value: 0x7f07004b public const int buttonPanel = 2131165259; - // aapt resource value: 0x7f070092 - public const int cancel_action = 2131165330; + // aapt resource value: 0x7f070093 + public const int cancel_action = 2131165331; // aapt resource value: 0x7f070030 public const int center = 2131165232; @@ -2515,8 +2515,8 @@ namespace MusicApp // aapt resource value: 0x7f07005b public const int checkbox = 2131165275; - // aapt resource value: 0x7f07009a - public const int chronometer = 2131165338; + // aapt resource value: 0x7f07009b + public const int chronometer = 2131165339; // aapt resource value: 0x7f070039 public const int clip_horizontal = 2131165241; @@ -2533,20 +2533,8 @@ namespace MusicApp // aapt resource value: 0x7f07004e public const int contentPanel = 2131165262; - // aapt resource value: 0x7f07008b - public const int contentView = 2131165323; - - // aapt resource value: 0x7f0700b5 - public const int controllerLast = 2131165365; - - // aapt resource value: 0x7f0700b7 - public const int controllerNext = 2131165367; - - // aapt resource value: 0x7f0700b6 - public const int controllerPlay = 2131165366; - - // aapt resource value: 0x7f0700b8 - public const int controllerTitle = 2131165368; + // aapt resource value: 0x7f07008c + public const int contentView = 2131165324; // aapt resource value: 0x7f070078 public const int coordinator = 2131165304; @@ -2581,11 +2569,11 @@ namespace MusicApp // aapt resource value: 0x7f070012 public const int disableHome = 2131165202; - // aapt resource value: 0x7f0700b3 - public const int downFAB = 2131165363; + // aapt resource value: 0x7f0700b4 + public const int downFAB = 2131165364; - // aapt resource value: 0x7f0700c7 - public const int downloadLayout = 2131165383; + // aapt resource value: 0x7f0700c9 + public const int downloadLayout = 2131165385; // aapt resource value: 0x7f070066 public const int edit_query = 2131165286; @@ -2593,8 +2581,8 @@ namespace MusicApp // aapt resource value: 0x7f070021 public const int end = 2131165217; - // aapt resource value: 0x7f0700a4 - public const int end_padder = 2131165348; + // aapt resource value: 0x7f0700a5 + public const int end_padder = 2131165349; // aapt resource value: 0x7f07002a public const int enterAlways = 2131165226; @@ -2644,11 +2632,11 @@ namespace MusicApp // aapt resource value: 0x7f070049 public const int icon = 2131165257; - // aapt resource value: 0x7f0700b9 - public const int icon_frame = 2131165369; + // aapt resource value: 0x7f0700b5 + public const int icon_frame = 2131165365; - // aapt resource value: 0x7f07009f - public const int icon_group = 2131165343; + // aapt resource value: 0x7f0700a0 + public const int icon_group = 2131165344; // aapt resource value: 0x7f070025 public const int ifRoom = 2131165221; @@ -2656,11 +2644,11 @@ namespace MusicApp // aapt resource value: 0x7f070046 public const int image = 2131165254; - // aapt resource value: 0x7f07009b - public const int info = 2131165339; + // aapt resource value: 0x7f07009c + public const int info = 2131165340; - // aapt resource value: 0x7f0700ab - public const int infoPanel = 2131165355; + // aapt resource value: 0x7f0700ac + public const int infoPanel = 2131165356; // aapt resource value: 0x7f070000 public const int item_touch_helper_previous_elevation = 2131165184; @@ -2668,23 +2656,23 @@ namespace MusicApp // aapt resource value: 0x7f070076 public const int largeLabel = 2131165302; - // aapt resource value: 0x7f0700a6 - public const int lastButton = 2131165350; + // aapt resource value: 0x7f0700a7 + public const int lastButton = 2131165351; // aapt resource value: 0x7f070034 public const int left = 2131165236; - // aapt resource value: 0x7f0700a0 - public const int line1 = 2131165344; + // aapt resource value: 0x7f0700a1 + public const int line1 = 2131165345; - // aapt resource value: 0x7f0700c2 - public const int line2 = 2131165378; + // aapt resource value: 0x7f0700c4 + public const int line2 = 2131165380; - // aapt resource value: 0x7f0700a2 - public const int line3 = 2131165346; + // aapt resource value: 0x7f0700a3 + public const int line3 = 2131165347; - // aapt resource value: 0x7f0700bb - public const int list = 2131165371; + // aapt resource value: 0x7f0700b7 + public const int list = 2131165367; // aapt resource value: 0x7f07000f public const int listMode = 2131165199; @@ -2692,11 +2680,11 @@ namespace MusicApp // aapt resource value: 0x7f070048 public const int list_item = 2131165256; - // aapt resource value: 0x7f0700c4 - public const int masked = 2131165380; + // aapt resource value: 0x7f0700c6 + public const int masked = 2131165382; - // aapt resource value: 0x7f070094 - public const int media_actions = 2131165332; + // aapt resource value: 0x7f070095 + public const int media_actions = 2131165333; // aapt resource value: 0x7f070022 public const int middle = 2131165218; @@ -2707,8 +2695,8 @@ namespace MusicApp // aapt resource value: 0x7f070019 public const int multiply = 2131165209; - // aapt resource value: 0x7f0700c5 - public const int musicLayout = 2131165381; + // aapt resource value: 0x7f0700c7 + public const int musicLayout = 2131165383; // aapt resource value: 0x7f07007d public const int navigation_header_container = 2131165309; @@ -2716,23 +2704,23 @@ namespace MusicApp // aapt resource value: 0x7f070026 public const int never = 2131165222; + // aapt resource value: 0x7f0700b0 + public const int nextArt = 2131165360; + + // aapt resource value: 0x7f0700b2 + public const int nextArtist = 2131165362; + + // aapt resource value: 0x7f0700a9 + public const int nextButton = 2131165353; + // aapt resource value: 0x7f0700af - public const int nextArt = 2131165359; + public const int nextSong = 2131165359; // aapt resource value: 0x7f0700b1 - public const int nextArtist = 2131165361; + public const int nextTitle = 2131165361; - // aapt resource value: 0x7f0700a8 - public const int nextButton = 2131165352; - - // aapt resource value: 0x7f0700ae - public const int nextSong = 2131165358; - - // aapt resource value: 0x7f0700b0 - public const int nextTitle = 2131165360; - - // aapt resource value: 0x7f07008d - public const int noPlaylist = 2131165325; + // aapt resource value: 0x7f07008e + public const int noPlaylist = 2131165326; // aapt resource value: 0x7f070014 public const int none = 2131165204; @@ -2740,17 +2728,17 @@ namespace MusicApp // aapt resource value: 0x7f070010 public const int normal = 2131165200; - // aapt resource value: 0x7f07009d - public const int notification_background = 2131165341; + // aapt resource value: 0x7f07009e + public const int notification_background = 2131165342; + + // aapt resource value: 0x7f070098 + public const int notification_main_column = 2131165336; // aapt resource value: 0x7f070097 - public const int notification_main_column = 2131165335; + public const int notification_main_column_container = 2131165335; - // aapt resource value: 0x7f070096 - public const int notification_main_column_container = 2131165334; - - // aapt resource value: 0x7f07008a - public const int pager = 2131165322; + // aapt resource value: 0x7f07008b + public const int pager = 2131165323; // aapt resource value: 0x7f070037 public const int parallax = 2131165239; @@ -2761,29 +2749,26 @@ namespace MusicApp // aapt resource value: 0x7f070038 public const int pin = 2131165240; - // aapt resource value: 0x7f0700a7 - public const int playButton = 2131165351; + // aapt resource value: 0x7f0700a8 + public const int playButton = 2131165352; - // aapt resource value: 0x7f0700a5 - public const int playerAlbum = 2131165349; + // aapt resource value: 0x7f0700a6 + public const int playerAlbum = 2131165350; - // aapt resource value: 0x7f0700ad - public const int playerArtist = 2131165357; + // aapt resource value: 0x7f0700ae + public const int playerArtist = 2131165358; - // aapt resource value: 0x7f0700b4 - public const int playerControl = 2131165364; + // aapt resource value: 0x7f0700ab + public const int playerPlaylistAdd = 2131165355; // aapt resource value: 0x7f0700aa - public const int playerPlaylistAdd = 2131165354; + public const int playerSleep = 2131165354; - // aapt resource value: 0x7f0700a9 - public const int playerSleep = 2131165353; + // aapt resource value: 0x7f0700ad + public const int playerTitle = 2131165357; - // aapt resource value: 0x7f0700ac - public const int playerTitle = 2131165356; - - // aapt resource value: 0x7f0700c8 - public const int playlistLayout = 2131165384; + // aapt resource value: 0x7f0700ca + public const int playlistLayout = 2131165386; // aapt resource value: 0x7f070074 public const int playlistName = 2131165300; @@ -2800,11 +2785,11 @@ namespace MusicApp // aapt resource value: 0x7f070035 public const int right = 2131165237; - // aapt resource value: 0x7f07009c - public const int right_icon = 2131165340; + // aapt resource value: 0x7f07009d + public const int right_icon = 2131165341; - // aapt resource value: 0x7f070098 - public const int right_side = 2131165336; + // aapt resource value: 0x7f070099 + public const int right_side = 2131165337; // aapt resource value: 0x7f07001a public const int screen = 2131165210; @@ -2824,8 +2809,8 @@ namespace MusicApp // aapt resource value: 0x7f070040 public const int scrollable = 2131165248; - // aapt resource value: 0x7f0700bf - public const int search = 2131165375; + // aapt resource value: 0x7f0700bb + public const int search = 2131165371; // aapt resource value: 0x7f070068 public const int search_badge = 2131165288; @@ -2857,17 +2842,17 @@ namespace MusicApp // aapt resource value: 0x7f070071 public const int search_voice_btn = 2131165297; - // aapt resource value: 0x7f0700bc - public const int seekbar = 2131165372; + // aapt resource value: 0x7f0700b8 + public const int seekbar = 2131165368; - // aapt resource value: 0x7f0700bd - public const int seekbar_value = 2131165373; + // aapt resource value: 0x7f0700b9 + public const int seekbar_value = 2131165369; // aapt resource value: 0x7f070072 public const int select_dialog_listview = 2131165298; - // aapt resource value: 0x7f0700c9 - public const int settings = 2131165385; + // aapt resource value: 0x7f0700cb + public const int settings = 2131165387; // aapt resource value: 0x7f07005c public const int shortcut = 2131165276; @@ -2884,6 +2869,9 @@ namespace MusicApp // aapt resource value: 0x7f070075 public const int smallLabel = 2131165301; + // aapt resource value: 0x7f07008a + public const int smallPlayer = 2131165322; + // aapt resource value: 0x7f07007c public const int snackbar_action = 2131165308; @@ -2893,14 +2881,32 @@ namespace MusicApp // aapt resource value: 0x7f07002e public const int snap = 2131165230; - // aapt resource value: 0x7f0700b2 - public const int songTimer = 2131165362; + // aapt resource value: 0x7f0700b3 + public const int songTimer = 2131165363; + + // aapt resource value: 0x7f0700bc + public const int spArt = 2131165372; + + // aapt resource value: 0x7f0700be + public const int spArtist = 2131165374; + + // aapt resource value: 0x7f0700bf + public const int spLast = 2131165375; + + // aapt resource value: 0x7f0700c1 + public const int spNext = 2131165377; + + // aapt resource value: 0x7f0700c0 + public const int spPlay = 2131165376; + + // aapt resource value: 0x7f0700bd + public const int spTitle = 2131165373; // aapt resource value: 0x7f07004c public const int spacer = 2131165260; - // aapt resource value: 0x7f0700ba - public const int spinner = 2131165370; + // aapt resource value: 0x7f0700b6 + public const int spinner = 2131165366; // aapt resource value: 0x7f070008 public const int split_action_bar = 2131165192; @@ -2917,8 +2923,8 @@ namespace MusicApp // aapt resource value: 0x7f070036 public const int start = 2131165238; - // aapt resource value: 0x7f070093 - public const int status_bar_latest_event_content = 2131165331; + // aapt resource value: 0x7f070094 + public const int status_bar_latest_event_content = 2131165332; // aapt resource value: 0x7f07005e public const int submenuarrow = 2131165278; @@ -2926,8 +2932,8 @@ namespace MusicApp // aapt resource value: 0x7f07006f public const int submit_area = 2131165295; - // aapt resource value: 0x7f0700be - public const int switchWidget = 2131165374; + // aapt resource value: 0x7f0700ba + public const int switchWidget = 2131165370; // aapt resource value: 0x7f070011 public const int tabMode = 2131165201; @@ -2935,14 +2941,14 @@ namespace MusicApp // aapt resource value: 0x7f070089 public const int tabs = 2131165321; - // aapt resource value: 0x7f0700a3 - public const int text = 2131165347; + // aapt resource value: 0x7f0700a4 + public const int text = 2131165348; // aapt resource value: 0x7f070083 public const int text1 = 2131165315; - // aapt resource value: 0x7f0700a1 - public const int text2 = 2131165345; + // aapt resource value: 0x7f0700a2 + public const int text2 = 2131165346; // aapt resource value: 0x7f070052 public const int textSpacerNoButtons = 2131165266; @@ -2959,8 +2965,8 @@ namespace MusicApp // aapt resource value: 0x7f07000d public const int textinput_error = 2131165197; - // aapt resource value: 0x7f070099 - public const int time = 2131165337; + // aapt resource value: 0x7f07009a + public const int time = 2131165338; // aapt resource value: 0x7f07004a public const int title = 2131165258; @@ -2998,8 +3004,8 @@ namespace MusicApp // aapt resource value: 0x7f07000e public const int view_offset_helper = 2131165198; - // aapt resource value: 0x7f0700c3 - public const int visible = 2131165379; + // aapt resource value: 0x7f0700c5 + public const int visible = 2131165381; // aapt resource value: 0x7f070027 public const int withText = 2131165223; @@ -3259,61 +3265,61 @@ namespace MusicApp public const int player = 2130903105; // aapt resource value: 0x7f030042 - public const int playerControl = 2130903106; + public const int playerInfo = 2130903106; // aapt resource value: 0x7f030043 - public const int playerInfo = 2130903107; + public const int PlaylistList = 2130903107; // aapt resource value: 0x7f030044 - public const int PlaylistList = 2130903108; + public const int preference = 2130903108; // aapt resource value: 0x7f030045 - public const int preference = 2130903109; + public const int preference_category = 2130903109; // aapt resource value: 0x7f030046 - public const int preference_category = 2130903110; + public const int preference_dialog_edittext = 2130903110; // aapt resource value: 0x7f030047 - public const int preference_dialog_edittext = 2130903111; + public const int preference_dropdown = 2130903111; // aapt resource value: 0x7f030048 - public const int preference_dropdown = 2130903112; + public const int preference_information = 2130903112; // aapt resource value: 0x7f030049 - public const int preference_information = 2130903113; + public const int preference_list_fragment = 2130903113; // aapt resource value: 0x7f03004a - public const int preference_list_fragment = 2130903114; + public const int preference_recyclerview = 2130903114; // aapt resource value: 0x7f03004b - public const int preference_recyclerview = 2130903115; + public const int preference_widget_checkbox = 2130903115; // aapt resource value: 0x7f03004c - public const int preference_widget_checkbox = 2130903116; + public const int preference_widget_seekbar = 2130903116; // aapt resource value: 0x7f03004d - public const int preference_widget_seekbar = 2130903117; + public const int preference_widget_switch_compat = 2130903117; // aapt resource value: 0x7f03004e - public const int preference_widget_switch_compat = 2130903118; + public const int Preferences = 2130903118; // aapt resource value: 0x7f03004f - public const int Preferences = 2130903119; + public const int PreferenceToolbar = 2130903119; // aapt resource value: 0x7f030050 - public const int PreferenceToolbar = 2130903120; + public const int search_layout = 2130903120; // aapt resource value: 0x7f030051 - public const int search_layout = 2130903121; + public const int select_dialog_item_material = 2130903121; // aapt resource value: 0x7f030052 - public const int select_dialog_item_material = 2130903122; + public const int select_dialog_multichoice_material = 2130903122; // aapt resource value: 0x7f030053 - public const int select_dialog_multichoice_material = 2130903123; + public const int select_dialog_singlechoice_material = 2130903123; // aapt resource value: 0x7f030054 - public const int select_dialog_singlechoice_material = 2130903124; + public const int SmallPlayer = 2130903124; // aapt resource value: 0x7f030055 public const int SongList = 2130903125; diff --git a/MusicApp/Resources/layout/Main.axml b/MusicApp/Resources/layout/Main.axml index f0947d9..99b1cf0 100644 --- a/MusicApp/Resources/layout/Main.axml +++ b/MusicApp/Resources/layout/Main.axml @@ -26,7 +26,11 @@ app:tabGravity="fill" app:tabMode="fixed" /> - + diff --git a/MusicApp/Resources/layout/SmallPlayer.xml b/MusicApp/Resources/layout/SmallPlayer.xml new file mode 100644 index 0000000..335faa4 --- /dev/null +++ b/MusicApp/Resources/layout/SmallPlayer.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/MusicApp/Resources/layout/playerControl.xml b/MusicApp/Resources/layout/playerControl.xml deleted file mode 100644 index b120efd..0000000 --- a/MusicApp/Resources/layout/playerControl.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - \ No newline at end of file