mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 09:33:33 +00:00
Added appbar in the bottom_sheet player
This commit is contained in:
parent
21b7d4b8bb
commit
5285614171
4 changed files with 62 additions and 15 deletions
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
|
|
@ -16,6 +16,8 @@
|
|||
<entry key="app/src/main/res/drawable/bottom_nav_shape.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/dialog_shape.xml" value="0.27685185185185185" />
|
||||
<entry key="app/src/main/res/drawable/ic_arrow_back.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_bottom_sheet_down.xml" value="0.4425925925925926" />
|
||||
<entry key="app/src/main/res/drawable/ic_check_circle.xml" value="0.4425925925925926" />
|
||||
<entry key="app/src/main/res/drawable/ic_close.xml" value="0.27685185185185185" />
|
||||
<entry key="app/src/main/res/drawable/ic_done.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_download_for_offline.xml" value="0.27685185185185185" />
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ public class PlayerBottomSheetFragment extends Fragment implements MusicServiceE
|
|||
|
||||
playerBottomSheetViewModel = new ViewModelProvider(requireActivity()).get(PlayerBottomSheetViewModel.class);
|
||||
|
||||
init();
|
||||
initQueueSlideView();
|
||||
initQueueRecyclerView();
|
||||
initFavoriteButtonClick();
|
||||
|
|
@ -120,6 +121,15 @@ public class PlayerBottomSheetFragment extends Fragment implements MusicServiceE
|
|||
bind = null;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
bodyBind.playerMoveDownBottomSheet.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
activity.collapseBottomSheet();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initQueueSlideView() {
|
||||
bodyBind.playerSongCoverViewPager.setOrientation(ViewPager2.ORIENTATION_HORIZONTAL);
|
||||
|
||||
|
|
|
|||
9
app/src/main/res/drawable/ic_bottom_sheet_down.xml
Normal file
9
app/src/main/res/drawable/ic_bottom_sheet_down.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/titleTextColor"
|
||||
android:pathData="M15.88,9.29L12,13.17 8.12,9.29c-0.39,-0.39 -1.02,-0.39 -1.41,0 -0.39,0.39 -0.39,1.02 0,1.41l4.59,4.59c0.39,0.39 1.02,0.39 1.41,0l4.59,-4.59c0.39,-0.39 0.39,-1.02 0,-1.41 -0.39,-0.38 -1.03,-0.39 -1.42,0z"/>
|
||||
</vector>
|
||||
|
|
@ -3,23 +3,49 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"
|
||||
app:elevation="0dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/collapse_bottom_sheet_button"
|
||||
style="@style/TitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="-4dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingTop="20dp"
|
||||
android:text="@string/player_bottom_sheet_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:background="@color/colorPrimary"
|
||||
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Light">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/player_move_down_bottom_sheet"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:background="@drawable/ic_bottom_sheet_down" />
|
||||
|
||||
<TextView
|
||||
style="@style/ToolbarTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="@string/player_bottom_sheet_title" />
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/player_song_cover_view_pager"
|
||||
|
|
@ -31,7 +57,7 @@
|
|||
app:layout_constraintDimensionRatio="H,1:1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/collapse_bottom_sheet_button" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/appbar" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/player_big_timer"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue