diff --git a/MusicApp/MainActivity.cs b/MusicApp/MainActivity.cs index ac7f3b4..b7c464e 100644 --- a/MusicApp/MainActivity.cs +++ b/MusicApp/MainActivity.cs @@ -967,7 +967,7 @@ namespace MusicApp public void ShowPlayer() { FindViewById(Resource.Id.playerSheet).SetPadding(0, 0, 0,0); - //SheetBehavior.State = BottomSheetBehavior.StateExpanded; + SheetBehavior.State = BottomSheetBehavior.StateExpanded; } public void GetStoragePermission() diff --git a/MusicApp/Resources/Portable Class/Player.cs b/MusicApp/Resources/Portable Class/Player.cs index 4589c92..233eb41 100644 --- a/MusicApp/Resources/Portable Class/Player.cs +++ b/MusicApp/Resources/Portable Class/Player.cs @@ -602,13 +602,9 @@ namespace MusicApp.Resources.Portable_Class if(movement == SheetMovement.Expanding && 0 <= slideOffset && slideOffset <= 1) { - Console.WriteLine("&Expanding with offset: " + slideOffset); - sheet.Alpha = 1; int defaultPadding = (int)(20 * context.Resources.DisplayMetrics.Density + 0.5f); - //((CoordinatorLayout.LayoutParams)layout.LayoutParameters).BottomMargin = (int)((70 * context.Resources.DisplayMetrics.Density + 0.5f) * (1 - slideOffset)); - //layout.RequestLayout(); sheet.SetPadding((int)(defaultPadding * (1 - slideOffset)), 0, (int)(defaultPadding * (1 - slideOffset)), 0); bottomLayer.TranslationY = (int)((56 * context.Resources.DisplayMetrics.Density + 0.5f) * slideOffset); @@ -622,15 +618,12 @@ namespace MusicApp.Resources.Portable_Class } else if(movement == SheetMovement.Hidding && - 1 <= slideOffset && slideOffset < 0) { - //((CoordinatorLayout.LayoutParams)layout.LayoutParameters).BottomMargin = (int)((70 * context.Resources.DisplayMetrics.Density + 0.5f) * (1 + slideOffset)); - //layout.RequestLayout(); sheet.Alpha = 1 + slideOffset; } } public override void OnStateChanged(View bottomSheet, int newState) { - Console.WriteLine("&State: " + newState); if (newState == BottomSheetBehavior.StateExpanded) movement = SheetMovement.Unknow; else if (newState == BottomSheetBehavior.StateCollapsed) diff --git a/MusicApp/Resources/layout/Main.xml b/MusicApp/Resources/layout/Main.xml index a8f5efb..c0ca46a 100644 --- a/MusicApp/Resources/layout/Main.xml +++ b/MusicApp/Resources/layout/Main.xml @@ -1,5 +1,5 @@  - + app:layout_anchor="@id/bottomLayer" + app:layout_anchorGravity="top" + android:layout_gravity="top" > - \ No newline at end of file + \ No newline at end of file