Skip to content

Commit

Permalink
Fix font issues
Browse files Browse the repository at this point in the history
  • Loading branch information
h4h13 committed Apr 9, 2019
1 parent 614d687 commit 6eb59f6
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 55 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ android {
vectorDrawables.useSupportLibrary = true

applicationId "code.name.monkey.retromusic"
versionCode 315
versionCode 319
versionName '3.1.400'

multiDexEnabled true
Expand Down Expand Up @@ -155,7 +155,7 @@ dependencies {
implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
implementation 'com.r0adkll:slidableactivity:2.0.6'
/*Backend all*/
implementation 'com.github.kabouzeid:AndroidSlidingUpPanel:3.3.3-kmod'
implementation 'com.github.kabouzeid:AndroidSlidingUpPanel:3.3.0-kmod3'
implementation 'com.github.AdrienPoupa:jaudiotagger:2.2.3'
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/retro-changelog.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<html><head> <style type="text/css"> * { word-wrap: break-word; } {style-placeholder} a { color: #{link-color}; } a:active { color: #{link-color-active}; } ul { list-style-position: outside; padding-left: 0; padding-right: 0; margin-left: 1em; } li { padding-top: 8px; } </style></head><body><h4>v3.1.400</h4><ul> <li>Added keyboard to popup on search</li> <li>Improved lock-screen behavior and UI</li> <li>Improved text appearance</li> <li>Fix bio text not showing in settings</li> <li>Fix not showing slider(blur, filter song) amount in settings</li> <li>Fix setting ringtone</li> <li>Fix file sharing crash</li> <li>Fix some crashes</li> <li>Fix playlist icon on small devices</li> <li>Fix empty lyrics text color</li> <li>Fix album cover background purple color in color theme</li></ul><h4>v3.1.300</h4><ul> <li>Fix rename playlist text color</li> <li>Fix same album showing in details page</li> <li>Fix lyrics text alignment on sync and lyrics reading improved</li> <li>Improved home sections loading</li> <li>Removed library options which are duplicated (it's available from profile menu)</li> <li>Replaced collapsing Fab with Android Floating Extended Fab</li> <li>Replaced home with for you</li> <li>Fixed profile image not loading in about</li> <li>Improved selecting user profile image</li> <li>Added bio to enter custom message</li> <li>Improved some UI screens</li></ul><h4>v3.1.240</h4><ul> <li>Fix Search not showing from home screen</li> <li>Fix Volume controls color issue</li> <li>Fix Seek bar alignment</li> <li>Added tiny theme</li> <li>Improved full theme appearances</li> <li>Now playing theme preview updated</li> <li>Fix composer error</li> <li>Bottom Options improved(internal)</li></ul><h4>v3.1.200</h4><ul> <li>Added composer sort and editing</li> <li>Fix Crash in Album tag editor while selecting options</li> <li>Added Filter song length</li> <li>Added Favourites playlist icon will be accent color</li> <li>Added Colorful settings icons</li> <li>Added Corners for dialog</li></ul><h4>v3.0.570</h4><ul> <li>Fix Album/Artist square image</li> <li>Fix Delete dialog text format</li> <li>Fix Profile picture not showing after coming back from folders</li> <li>Fix Play button color i Simple and Plain themes</li> <li>Fix Sleep timer dialog crashing</li> <li>Fix Share song dialog title and text</li></ul><p>If you see entire app white or dark or black select same theme in settings to fix </p><p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a></p><p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again. </p></body>
<html><head> <style type="text/css"> * { word-wrap: break-word; } {style-placeholder} a { color: #{link-color}; } a:active { color: #{link-color-active}; } ul { list-style-position: outside; padding-left: 0; padding-right: 0; margin-left: 1em; } li { padding-top: 8px; } </style></head><body><h4>v3.1.400</h4><ul> <li>Removed sync lyrics for Android 5</li> <li>Fix Seek-bar color in settings</li> <li>Added keyboard to popup on search</li> <li>Added keyboard to popup on search</li> <li>Improved lock-screen behavior and UI</li> <li>Improved text appearance</li> <li>Fix bio text not showing in settings</li> <li>Fix not showing slider(blur, filter song) amount in settings</li> <li>Fix setting ringtone</li> <li>Fix file sharing crash</li> <li>Fix some crashes</li> <li>Fix playlist icon on small devices</li> <li>Fix empty lyrics text color</li> <li>Fix album cover background purple color in color theme</li></ul><h4>v3.1.300</h4><ul> <li>Fix rename playlist text color</li> <li>Fix same album showing in details page</li> <li>Fix lyrics text alignment on sync and lyrics reading improved</li> <li>Improved home sections loading</li> <li>Removed library options which are duplicated (it's available from profile menu)</li> <li>Replaced collapsing Fab with Android Floating Extended Fab</li> <li>Replaced home with for you</li> <li>Fixed profile image not loading in about</li> <li>Improved selecting user profile image</li> <li>Added bio to enter custom message</li> <li>Improved some UI screens</li></ul><h4>v3.1.240</h4><ul> <li>Fix Search not showing from home screen</li> <li>Fix Volume controls color issue</li> <li>Fix Seek bar alignment</li> <li>Added tiny theme</li> <li>Improved full theme appearances</li> <li>Now playing theme preview updated</li> <li>Fix composer error</li> <li>Bottom Options improved(internal)</li></ul><h4>v3.1.200</h4><ul> <li>Added composer sort and editing</li> <li>Fix Crash in Album tag editor while selecting options</li> <li>Added Filter song length</li> <li>Added Favourites playlist icon will be accent color</li> <li>Added Colorful settings icons</li> <li>Added Corners for dialog</li></ul><h4>v3.0.570</h4><ul> <li>Fix Album/Artist square image</li> <li>Fix Delete dialog text format</li> <li>Fix Profile picture not showing after coming back from folders</li> <li>Fix Play button color i Simple and Plain themes</li> <li>Fix Sleep timer dialog crashing</li> <li>Fix Share song dialog title and text</li></ul><p>If you see entire app white or dark or black select same theme in settings to fix </p><p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a></p><p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again. </p></body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import com.afollestad.materialdialogs.list.listItemsSingleChoice


class MaterialListPreference : ListPreference {
private val mLayoutRes = code.name.monkey.retromusic.R.layout.ate_preference_list
private val mLayoutRes = R.layout.ate_preference_list

constructor(context: Context) : super(context)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ package code.name.monkey.retromusic.ui.activities
import android.annotation.SuppressLint
import android.content.res.ColorStateList
import android.os.AsyncTask
import android.os.Build
import android.os.Bundle
import android.text.InputType
import android.text.TextUtils
import android.view.*
import androidx.annotation.StringRes
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
Expand Down Expand Up @@ -39,6 +41,7 @@ import kotlinx.android.synthetic.main.fragment_synced.*
import org.jaudiotagger.tag.FieldKey
import java.io.File
import java.util.*
import kotlin.collections.ArrayList

class LyricsActivity : AbsMusicServiceActivity(), View.OnClickListener, ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) {
Expand Down Expand Up @@ -209,26 +212,28 @@ class LyricsActivity : AbsMusicServiceActivity(), View.OnClickListener, ViewPage
}

class PagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) {
override fun getItem(position: Int): Fragment {
return when (position) {
0 -> SyncedLyricsFragment()
1 -> OfflineLyricsFragment()
else -> SyncedLyricsFragment()
class Tabs(@StringRes val title: Int,
val fragment: Fragment)

private var tabs = ArrayList<Tabs>()

init {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
tabs.add(Tabs(R.string.synced_lyrics, SyncedLyricsFragment()))
}
tabs.add(Tabs(R.string.normal_lyrics, OfflineLyricsFragment()))
}

override fun getItem(position: Int): Fragment {
return tabs[position].fragment
}

override fun getPageTitle(position: Int): CharSequence? {
return when (position) {
0 -> App.context.getString(R.string.synced_lyrics)
1 -> App.context.getString(R.string.normal_lyrics)
else -> {
App.context.getString(R.string.synced_lyrics)
}
}
return App.context.getString(tabs[position].title)
}

override fun getCount(): Int {
return 2
return tabs.size
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import android.content.*
import android.content.pm.PackageManager
import android.os.Bundle
import android.preference.PreferenceManager
import android.provider.MediaStore
import android.util.Log
import android.view.MenuItem
Expand All @@ -25,8 +24,6 @@ import code.name.monkey.retromusic.ui.fragments.mainactivity.LibraryFragment
import code.name.monkey.retromusic.ui.fragments.mainactivity.home.BannerHomeFragment
import code.name.monkey.retromusic.util.NavigationUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.callbacks.onDismiss
import io.reactivex.disposables.CompositeDisposable
import java.util.*

Expand Down Expand Up @@ -282,6 +279,9 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
R.id.action_playlist,
R.id.action_song -> setCurrentFragment(LibraryFragment.newInstance(itemId), false)
R.id.action_home -> setCurrentFragment(BannerHomeFragment.newInstance(), false)
else -> {
setCurrentFragment(BannerHomeFragment.newInstance(), false)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ class ThemeSettingsFragment : AbsSettingsFragment() {

accentColorPref.setOnPreferenceClickListener {
MaterialDialog(activity!!).show {
title(code.name.monkey.retromusic.R.string.accent_color)
title(R.string.accent_color)
positiveButton(R.string.set)
colorChooser(colors = ACCENT_COLORS, allowCustomArgb = true, subColors = ACCENT_COLORS_SUB) { _, color ->
var colorFinal = Color.BLACK;
/*var colorFinal = Color.BLACK;
if (!ColorUtil.isColorSaturated(color)) {
colorFinal = color;
}
ThemeStore.editTheme(context).accentColor(colorFinal).commit()
colorFinal = color
}*/
ThemeStore.editTheme(context).accentColor(color).commit()
if (VersionUtils.hasNougatMR())
DynamicShortcutManager(context).updateDynamicShortcuts()
activity!!.recreate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public final int getDefaultStartPage() {


public final int getLastPage() {
return mPreferences.getInt(LAST_PAGE, R.id.action_song);
return mPreferences.getInt(LAST_PAGE, R.id.action_home);
}

public void setLastPage(final int value) {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout-land/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">

Expand All @@ -47,6 +48,7 @@
android:layout_marginEnd="16dp"
app:civ_border="false" />
</androidx.appcompat.widget.Toolbar>

</com.google.android.material.appbar.AppBarLayout>

<androidx.core.widget.NestedScrollView
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
android:id="@+id/action_grid_size"
android:icon="@drawable/ic_grid_size_white_24dp"
android:title="@string/action_grid_size"
app:showAsAction="ifRoom|withText">
app:showAsAction="ifRoom">
<menu>
<group
android:id="@+id/group_grid_size"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles_parents.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</style>

<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>

<item name="md_corner_radius">12dp</item>
<item name="md_font_title">@font/circular</item>
<item name="md_font_body">@font/circular</item>
Expand Down
29 changes: 16 additions & 13 deletions app/src/main/res/xml/pref_advanced.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,37 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="Advanced">


<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="keep_screen_on"
android:summary="@string/pref_keep_screen_on_summary"
android:title="@string/pref_keep_screen_on_title"
app:iconSpaceReserved="false" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESeekBarPreference
android:defaultValue="30"
android:key="filter_song"
android:max="60"
android:title="@string/pref_filter_song_title"
app:enableCopying="true"
app:iconSpaceReserved="false"
app:showSeekBarValue="true" />


<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="pause_on_zero_volume"
android:summary="@string/pref_keep_pause_on_zero_volume_summary"
android:title="@string/pref_keep_pause_on_zero_volume_title"
app:enableCopying="true"
app:iconSpaceReserved="false" />

<SeekBarPreference
android:defaultValue="30"
android:key="filter_song"
android:max="60"
app:showSeekBarValue="true"
android:title="@string/pref_filter_song_title"
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="keep_screen_on"
android:summary="@string/pref_keep_screen_on_summary"
android:title="@string/pref_keep_screen_on_title"
app:enableCopying="true"
app:iconSpaceReserved="false" />

<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="snow_fall_effect"
android:title="@string/pref_snow_fall_title"
app:enableCopying="true"
app:iconSpaceReserved="false" />

</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/xml/pref_audio.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
android:key="audio_ducking"
app:enableCopying="true"
app:iconSpaceReserved="false"
android:summary="@string/pref_summary_audio_ducking"
android:title="@string/pref_title_audio_ducking" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/pref_now_playing_screen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:title="@string/pref_title_toggle_carousel_effect"
app:iconSpaceReserved="false" />

<SeekBarPreference
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESeekBarPreference
android:defaultValue="12"
android:key="new_blur_amount"
android:max="25"
Expand Down
2 changes: 1 addition & 1 deletion appthemehelper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-alpha03'
implementation 'com.google.android.material:material:1.1.0-alpha04'
implementation 'com.google.android.material:material:1.1.0-alpha05'
implementation 'androidx.preference:preference:1.1.0-alpha04'
implementation 'androidx.cardview:cardview:1.0.0'
// Used for the list preference classes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package code.name.monkey.appthemehelper.common.prefs.supportv7

import android.content.Context
import android.content.res.ColorStateList
import android.util.AttributeSet
import android.widget.SeekBar
import android.widget.TextView
import androidx.preference.PreferenceViewHolder
import androidx.preference.SeekBarPreference
import code.name.monkey.appthemehelper.R
Expand Down Expand Up @@ -33,6 +35,6 @@ class ATESeekBarPreference : SeekBarPreference {
override fun onBindViewHolder(view: PreferenceViewHolder) {
super.onBindViewHolder(view)
val seekBar = view.findViewById(R.id.seekbar) as SeekBar
TintHelper.setTintAuto(seekBar, ThemeStore.accentColor(context), true)
TintHelper.setTintAuto(seekBar, ThemeStore.accentColor(context), false)
}
}
3 changes: 2 additions & 1 deletion appthemehelper/src/main/res/layout/ate_preference_custom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:baselineAligned="false"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeight"
Expand Down Expand Up @@ -40,8 +41,8 @@
android:layout_alignParentLeft="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
tools:text="Title" />

<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?android:attr/selectableItemBackground"
android:baselineAligned="false"
android:gravity="center_vertical"
Expand Down Expand Up @@ -40,9 +41,9 @@
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:ellipsize="marquee"
style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:fadingEdge="horizontal"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
tools:text="Title" />

<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
Expand Down
Loading

0 comments on commit 6eb59f6

Please sign in to comment.