Compatible for Larger tablet
This commit is contained in:
parent
a7ce34a60e
commit
579a8d06eb
51 changed files with 309 additions and 151 deletions
File diff suppressed because one or more lines are too long
|
@ -113,7 +113,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView {
|
|||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
simpleSongAdapter = SimpleSongAdapter(this, ArrayList(), R.layout.item_song, false)
|
||||
simpleSongAdapter = SimpleSongAdapter(this, ArrayList(), R.layout.item_song)
|
||||
recyclerView.apply {
|
||||
layoutManager = LinearLayoutManager(this@AlbumDetailsActivity)
|
||||
itemAnimator = DefaultItemAnimator()
|
||||
|
|
|
@ -172,7 +172,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView {
|
|||
layoutManager = GridLayoutManager(this.context, 1, GridLayoutManager.HORIZONTAL, false)
|
||||
adapter = albumAdapter
|
||||
}
|
||||
songAdapter = SimpleSongAdapter(this, ArrayList(), R.layout.item_song, false)
|
||||
songAdapter = SimpleSongAdapter(this, ArrayList(), R.layout.item_song)
|
||||
recyclerView.apply {
|
||||
itemAnimator = DefaultItemAnimator()
|
||||
layoutManager = LinearLayoutManager(this.context)
|
||||
|
|
|
@ -4,8 +4,6 @@ import android.view.LayoutInflater
|
|||
import android.view.ViewGroup
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.TintHelper
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.util.MusicUtil
|
||||
import java.util.*
|
||||
|
@ -13,14 +11,8 @@ import java.util.*
|
|||
|
||||
class SimpleSongAdapter(context: AppCompatActivity,
|
||||
songs: ArrayList<Song>,
|
||||
@LayoutRes i: Int,
|
||||
val useNumbers: Boolean) : SongAdapter(context, songs, i, false, null) {
|
||||
@LayoutRes i: Int) : SongAdapter(context, songs, i, false, null) {
|
||||
|
||||
private var textColor: Int = 0
|
||||
|
||||
init {
|
||||
textColor = ThemeStore.textColorPrimary(context)
|
||||
}
|
||||
|
||||
override fun swapDataSet(dataSet: ArrayList<Song>) {
|
||||
this.dataSet.clear()
|
||||
|
@ -36,33 +28,11 @@ class SimpleSongAdapter(context: AppCompatActivity,
|
|||
super.onBindViewHolder(holder, position)
|
||||
val fixedTrackNumber = MusicUtil.getFixedTrackNumber(dataSet[position].trackNumber)
|
||||
|
||||
if (holder.imageText != null) {
|
||||
if (useNumbers) {
|
||||
holder.imageText!!.text = (position + 1).toString()
|
||||
} else {
|
||||
holder.imageText!!.text = if (fixedTrackNumber > 0) fixedTrackNumber.toString() else "-"
|
||||
}
|
||||
holder.imageText!!.setTextColor(textColor)
|
||||
}
|
||||
|
||||
if (holder.time != null) {
|
||||
holder.time!!.text = MusicUtil.getReadableDurationString(dataSet[position].duration)
|
||||
holder.time!!.setTextColor(textColor)
|
||||
}
|
||||
if (holder.title != null) {
|
||||
holder.title!!.setTextColor(textColor)
|
||||
}
|
||||
if (holder.menu != null) {
|
||||
TintHelper.setTintAuto(holder.menu!!, textColor, false)
|
||||
}
|
||||
holder.imageText?.text = if (fixedTrackNumber > 0) fixedTrackNumber.toString() else "-"
|
||||
holder.time?.text = MusicUtil.getReadableDurationString(dataSet[position].duration)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return dataSet.size
|
||||
}
|
||||
|
||||
fun setTextColor(textColor: Int) {
|
||||
this.textColor = textColor
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
android:transitionName="@string/transition_album_art"
|
||||
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar" />
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0" >
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_height="48dp"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_close_white_24dp"
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_gravity="bottom"
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="parallax" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin" />
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
app:layout_collapseMode="pin"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
</LinearLayout>
|
||||
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_height="48dp"
|
||||
|
|
|
@ -15,22 +15,46 @@
|
|||
<include layout="@layout/shadow_statusbar_toolbar" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/statusBarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/statusBarContainer"
|
||||
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
android:id="@+id/albumCoverContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playerToolbar">
|
||||
|
||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/playerAlbumCoverFragment"
|
||||
|
@ -40,25 +64,27 @@
|
|||
tools:layout="@layout/fragment_album_cover" />
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/playbackControlsFragment"
|
||||
android:name="code.name.monkey.retromusic.fragments.player.normal.PlayerPlaybackControlsFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:layout="@layout/fragment_player_playback_controls" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/playbackControlsFragment"
|
||||
android:name="code.name.monkey.retromusic.fragments.player.normal.PlayerPlaybackControlsFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/albumCoverContainer"
|
||||
tools:layout="@layout/fragment_player_playback_controls" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</RelativeLayout>
|
196
app/src/main/res/layout-xlarge-land/fragment_player_playback_controls.xml
Executable file
196
app/src/main/res/layout-xlarge-land/fragment_player_playback_controls.xml
Executable file
|
@ -0,0 +1,196 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/playback_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MissingPrefix">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:freezesText="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewHeadline3"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:textAppearance="@style/TextViewHeadline5"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playPauseButton"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/previousButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="24dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="16dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playPauseButton"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playPauseButton"
|
||||
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/playPauseButton"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/color_circle_gradient"
|
||||
android:elevation="4dp"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
|
||||
app:layout_constraintStart_toEndOf="@id/previousButton"
|
||||
app:layout_constraintTop_toBottomOf="@+id/text"
|
||||
app:srcCompat="@drawable/ic_play_arrow_white_32dp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/nextButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="16dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playPauseButton"
|
||||
app:layout_constraintStart_toEndOf="@id/playPauseButton"
|
||||
app:layout_constraintTop_toTopOf="@+id/playPauseButton"
|
||||
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/progressContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="28dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playPauseButton"
|
||||
app:layout_constraintEnd_toStartOf="@+id/repeatButton"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/nextButton"
|
||||
app:layout_constraintTop_toTopOf="@+id/playPauseButton">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSeekBar
|
||||
android:id="@+id/progressSlider"
|
||||
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/songTotalTime"
|
||||
android:layout_toRightOf="@id/songCurrentProgress"
|
||||
android:maxHeight="3dp"
|
||||
android:progressDrawable="@drawable/color_progress_seek"
|
||||
android:splitTrack="false"
|
||||
android:thumb="@drawable/switch_thumb_material"
|
||||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||
tools:progress="20" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|right|end"
|
||||
android:paddingRight="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songCurrentProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical|left|end"
|
||||
android:paddingLeft="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextViewHeadline6"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/repeatButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="16dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/progressContainer"
|
||||
app:layout_constraintEnd_toStartOf="@+id/shuffleButton"
|
||||
app:layout_constraintStart_toEndOf="@+id/progressContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/progressContainer"
|
||||
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/shuffleButton"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="16dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/repeatButton"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/repeatButton"
|
||||
app:layout_constraintTop_toTopOf="@+id/repeatButton"
|
||||
app:srcCompat="@drawable/ic_shuffle_white_24dp"
|
||||
tools:ignore="MissingPrefix"
|
||||
tools:tint="@color/md_black_1000" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/volumeFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:backgroundTint="@color/md_red_400"
|
||||
tools:layout_height="52dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -33,7 +33,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="parallax" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin" />
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_height="48dp"
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin" />
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,7 @@
|
|||
android:background="?colorPrimary"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
app:titleEnabled="false">
|
||||
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
@ -47,7 +47,7 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/searchView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="@string/action_search"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
app:layout_collapseMode="pin"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_height="48dp"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_close_white_24dp"
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
android:layout_weight="0">
|
||||
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_gravity="bottom"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<include layout="@layout/status_bar" />
|
||||
</FrameLayout>
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
@ -61,7 +61,7 @@
|
|||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<TextView
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/nextSongLabel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -77,7 +77,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/nextSong"
|
||||
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||
android:layout_width="0dp"
|
||||
|
@ -110,7 +110,7 @@
|
|||
app:srcCompat="@drawable/default_artist_art" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</code.name.monkey.appthemehelper.common.views.ATEToolbar>
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/player_lyrics"
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_gravity="bottom"
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:layout_gravity="bottom"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||
tools:progress="20" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -47,7 +47,7 @@
|
|||
android:textSize="12sp"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songCurrentProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -73,7 +73,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/progressContainer">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -92,7 +92,7 @@
|
|||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="Title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.views.ATEToolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playerToolbar"
|
||||
style="@style/Toolbar"
|
||||
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:minHeight="40dp"
|
||||
android:textColor="?colorOnSecondary"
|
||||
android:textAppearance="@style/TextViewNormal" />
|
||||
</FrameLayout>
|
||||
|
||||
|
@ -59,6 +60,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:textColor="?colorOnSecondary"
|
||||
android:fontFeatureSettings="onum"
|
||||
android:padding="4dp"
|
||||
tools:text="22:00" />
|
||||
|
@ -71,6 +73,6 @@
|
|||
android:layout_margin="0dp"
|
||||
android:layout_weight="0"
|
||||
android:rotation="90"
|
||||
app:tint="?colorOnBackground"
|
||||
app:tint="?colorOnSecondary"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
|
@ -49,6 +49,7 @@
|
|||
<item name="colorPrimary">@color/darkColorPrimary</item>
|
||||
<item name="colorPrimaryVariant">@color/darkColorPrimary</item>
|
||||
<item name="colorOnPrimary">@color/mi_text_color_primary_dark</item>
|
||||
<item name="colorOnSecondary">@color/mi_text_color_secondary_dark</item>
|
||||
|
||||
<item name="colorAccent">@color/md_deep_purple_A200</item>
|
||||
|
||||
|
@ -85,7 +86,7 @@
|
|||
<item name="colorAccent">@color/md_deep_purple_A200</item>
|
||||
|
||||
<item name="colorSecondary">@color/md_green_500</item>
|
||||
<item name="colorOnSecondary">@color/mi_text_color_secondary_light</item>
|
||||
<item name="colorOnSecondary">@color/mi_text_color_secondary_dark</item>
|
||||
<item name="colorSecondaryVariant">@color/md_green_A700</item>
|
||||
|
||||
<item name="android:colorBackground">@color/blackColorBackground</item>
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Hemanth Savarala.
|
||||
*
|
||||
* Licensed under the GNU General Public License v3
|
||||
*
|
||||
* This is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
package code.name.monkey.appthemehelper.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import com.google.android.material.appbar.MaterialToolbar;
|
||||
|
||||
/**
|
||||
* Created by hemanths on 2019-09-02.
|
||||
*/
|
||||
public class ATEToolbar extends MaterialToolbar {
|
||||
public ATEToolbar(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public ATEToolbar(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public ATEToolbar(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue