added themes

This commit is contained in:
h4h13 2018-12-05 18:01:56 +05:30
parent d8dbf26fa0
commit dbb9c9828b
6 changed files with 159 additions and 68 deletions

View file

@ -32,12 +32,11 @@
android:orientation="horizontal">
<code.name.monkey.retromusic.views.HeightFitSquareLayout
android:id="@+id/album_cover_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/player_album_cover_fragment"
android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -55,7 +54,7 @@
android:layout_weight="1">
<fragment
android:id="@+id/playback_controls_fragment"
android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.ui.fragments.player.material.MaterialControlsFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -63,13 +62,12 @@
</FrameLayout>
<FrameLayout
android:id="@+id/toolbar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<androidx.appcompat.widget.Toolbar
android:id="@+id/player_toolbar"
android:id="@+id/playerToolbar"
style="@style/Toolbar"
android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_close_white_24dp"

View file

@ -14,7 +14,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -28,12 +27,11 @@
</FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/album_cover_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<fragment
android:id="@+id/player_album_cover_fragment"
android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -46,7 +44,7 @@
android:layout_weight="1">
<fragment
android:id="@+id/playback_controls_fragment"
android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.ui.fragments.player.material.MaterialControlsFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -54,13 +52,12 @@
</FrameLayout>
<FrameLayout
android:id="@+id/toolbar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<androidx.appcompat.widget.Toolbar
android:id="@+id/player_toolbar"
android:id="@+id/playerToolbar"
style="@style/Toolbar"
android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_close_white_24dp"

View file

@ -10,48 +10,15 @@
tools:ignore="MissingPrefix">
<SeekBar
android:id="@+id/player_progress_slider"
android:id="@+id/progressSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="3dp"
android:paddingEnd="24dp"
android:paddingStart="24dp"
android:paddingEnd="24dp"
tools:progress="20" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingEnd="16dp"
android:paddingStart="16dp">
<TextView
android:id="@+id/player_song_current_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingEnd="8dp"
android:paddingStart="8dp"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
android:textStyle="bold"
tools:text="22.00" />
<TextView
android:id="@+id/player_song_total_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingEnd="8dp"
android:paddingStart="8dp"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
android:textStyle="bold"
tools:text="22.00" />
</LinearLayout>
<include layout="@layout/player_time" />
<LinearLayout
android:layout_width="match_parent"
@ -72,8 +39,8 @@
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingEnd="12dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
@ -89,8 +56,8 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingEnd="12dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>
@ -102,7 +69,7 @@
tools:ignore="ContentDescription,UnusedAttribute">
<ImageButton
android:id="@+id/player_prev_button"
android:id="@+id/previousButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
@ -116,7 +83,7 @@
tools:tint="@color/md_black_1000" />
<ImageButton
android:id="@+id/player_next_button"
android:id="@+id/nextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
@ -130,7 +97,7 @@
tools:tint="@color/md_black_1000" />
<ImageButton
android:id="@+id/player_repeat_button"
android:id="@+id/repeatButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
@ -143,7 +110,7 @@
tools:tint="@color/md_black_1000" />
<ImageButton
android:id="@+id/player_shuffle_button"
android:id="@+id/shuffleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
@ -162,7 +129,7 @@
android:layout_centerInParent="true" />
<ImageButton
android:id="@+id/player_play_pause_button"
android:id="@+id/playPauseButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/title_container"
@ -173,18 +140,5 @@
</RelativeLayout>
<FrameLayout
android:id="@+id/volume_fragment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<fragment
android:id="@+id/volume_fragment"
android:name="code.name.monkey.retromusic.ui.fragments.VolumeFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
tools:layout="@layout/fragment_volume" />
</FrameLayout>
<include layout="@layout/volume_controls" />
</LinearLayout>

View file

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/playerMediaControllerContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layoutDirection="ltr"
android:paddingStart="4dp"
android:paddingEnd="4dp"
tools:ignore="ContentDescription,UnusedAttribute"
tools:showIn="@layout/fragment_player_playback_controls">
<ImageButton
android:id="@+id/previousButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:layout_toStartOf="@+id/dummy_fab"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000" />
<ImageButton
android:id="@+id/nextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="8dp"
android:layout_toEndOf="@+id/dummy_fab"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_skip_next_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000" />
<ImageButton
android:id="@+id/repeatButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_repeat_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000" />
<ImageButton
android:id="@+id/shuffleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_shuffle_white_24dp"
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000" />
<Space
android:id="@+id/dummy_fab"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_centerInParent="true" />
<ImageButton
android:id="@+id/playPauseButton"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_above="@id/title_container"
android:layout_centerInParent="true"
android:background="@drawable/color_circle_gradient"
android:elevation="4dp"
android:padding="16dp"
app:srcCompat="@drawable/ic_play_arrow_white_24dp" />
</RelativeLayout>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp"
tools:showIn="@layout/fragment_player_playback_controls">
<TextView
android:id="@+id/songCurrentProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
android:textStyle="bold"
tools:text="22.00" />
<TextView
android:id="@+id/songTotalTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
android:textStyle="bold"
tools:text="22.00" />
</LinearLayout>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/volumeFragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="8dp"
android:paddingEnd="8dp"
tools:showIn="@layout/fragment_player_playback_controls">
<fragment
android:id="@+id/volumeFragment"
android:name="code.name.monkey.retromusic.ui.fragments.VolumeFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
tools:layout="@layout/fragment_volume" />
</FrameLayout>