0
0
mirror of https://github.com/MuntashirAkon/Metro.git synced 2024-09-20 12:02:20 +02:00

Fix lockscreen controls alignment

This commit is contained in:
h4h13 2019-05-08 23:18:32 +05:30
parent 1016971118
commit ddedd6dfb7
3 changed files with 68 additions and 22 deletions

View File

@ -32,8 +32,8 @@ android {
vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic"
versionCode 319
versionName '3.1.400'
versionCode 320
versionName '3.1.600'
multiDexEnabled true

View File

@ -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
import android.animation.ObjectAnimator
@ -26,7 +40,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.ViewUtil
import kotlinx.android.synthetic.main.fragment_lock_screen_playback_controls.*
import kotlinx.android.synthetic.main.media_button.*
import kotlinx.android.synthetic.main.player_time.*
/**
* @author Hemanth S (h4h13).
@ -123,13 +136,6 @@ class LockScreenPlayerControlsFragment : AbsPlayerControlsFragment() {
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() {
playPauseButton.setOnClickListener(PlayPauseButtonOnClickHandler())
}

View File

@ -11,11 +11,11 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -34,7 +34,7 @@
android:textColor="?android:attr/textColorPrimary"
tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -48,19 +48,59 @@
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>
<SeekBar
android:id="@+id/progressSlider"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="3dp"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:progressDrawable="@drawable/color_progress_seek"
tools:progress="20" />
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">
<include layout="@layout/player_time" />
<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
android:id="@+id/progressSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/songTotalTime"
android:layout_toRightOf="@id/songCurrentProgress"
android:maxHeight="3dp"
android:progressDrawable="@drawable/color_progress_seek"
android:splitTrack="false"
tools:ignore="RtlHardcoded,UnusedAttribute"
tools:progress="20" />
</RelativeLayout>
<include layout="@layout/media_button" />
<FrameLayout
android:id="@+id/volumeFragmentContainer"
android:layout_width="match_parent"