Fix lockscreen controls alignment
This commit is contained in:
parent
1016971118
commit
ddedd6dfb7
3 changed files with 68 additions and 22 deletions
|
@ -32,8 +32,8 @@ android {
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
applicationId "code.name.monkey.retromusic"
|
applicationId "code.name.monkey.retromusic"
|
||||||
versionCode 319
|
versionCode 320
|
||||||
versionName '3.1.400'
|
versionName '3.1.600'
|
||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
|
/*
|
||||||
|
* 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.retromusic.fragments.player.lockscreen
|
package code.name.monkey.retromusic.fragments.player.lockscreen
|
||||||
|
|
||||||
import android.animation.ObjectAnimator
|
import android.animation.ObjectAnimator
|
||||||
|
@ -26,7 +40,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
import kotlinx.android.synthetic.main.fragment_lock_screen_playback_controls.*
|
import kotlinx.android.synthetic.main.fragment_lock_screen_playback_controls.*
|
||||||
import kotlinx.android.synthetic.main.media_button.*
|
import kotlinx.android.synthetic.main.media_button.*
|
||||||
import kotlinx.android.synthetic.main.player_time.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Hemanth S (h4h13).
|
* @author Hemanth S (h4h13).
|
||||||
|
@ -123,13 +136,6 @@ class LockScreenPlayerControlsFragment : AbsPlayerControlsFragment() {
|
||||||
TintHelper.setTintAuto(playPauseButton, color, true)
|
TintHelper.setTintAuto(playPauseButton, color, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setProgressBarColor(progressBar: SeekBar?, newColor: Int) {
|
|
||||||
TintHelper.setTintAuto(progressBar!!, newColor, false)
|
|
||||||
//LayerDrawable ld = (LayerDrawable) progressBar.getProgressDrawable();
|
|
||||||
//ClipDrawable clipDrawable = (ClipDrawable) ld.findDrawableByLayerId(android.R.id.progress);
|
|
||||||
//clipDrawable.setColorFilter(newColor, PorterDuff.Mode.SRC_IN);
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setUpPlayPauseFab() {
|
private fun setUpPlayPauseFab() {
|
||||||
playPauseButton.setOnClickListener(PlayPauseButtonOnClickHandler())
|
playPauseButton.setOnClickListener(PlayPauseButtonOnClickHandler())
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
tools:text="Title" />
|
tools:text="Title" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
|
||||||
android:id="@+id/text"
|
android:id="@+id/text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -48,19 +48,59 @@
|
||||||
android:textColor="?android:attr/textColorSecondary" />
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/progress_slider_height"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:paddingStart="12dp"
|
||||||
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
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/TextAppearance.AppCompat.Title"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
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/TextAppearance.AppCompat.Title"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
<SeekBar
|
<SeekBar
|
||||||
android:id="@+id/progressSlider"
|
android:id="@+id/progressSlider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toLeftOf="@id/songTotalTime"
|
||||||
|
android:layout_toRightOf="@id/songCurrentProgress"
|
||||||
android:maxHeight="3dp"
|
android:maxHeight="3dp"
|
||||||
android:paddingStart="24dp"
|
|
||||||
android:paddingEnd="24dp"
|
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
|
android:splitTrack="false"
|
||||||
|
tools:ignore="RtlHardcoded,UnusedAttribute"
|
||||||
tools:progress="20" />
|
tools:progress="20" />
|
||||||
|
</RelativeLayout>
|
||||||
<include layout="@layout/player_time" />
|
|
||||||
|
|
||||||
<include layout="@layout/media_button" />
|
<include layout="@layout/media_button" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/volumeFragmentContainer"
|
android:id="@+id/volumeFragmentContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue