Toolbar title removed TextView

This commit is contained in:
h4h13 2019-05-21 01:08:43 +05:30
parent 762fb4dbbe
commit 46a03aa65d
32 changed files with 147 additions and 224 deletions

View file

@ -88,7 +88,6 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this)) appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this))
toolbar.setBackgroundColor(ThemeStore.primaryColor(this)) toolbar.setBackgroundColor(ThemeStore.primaryColor(this))
setSupportActionBar(toolbar) setSupportActionBar(toolbar)
title = null
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this)) ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this))
} }

View file

@ -15,10 +15,14 @@ import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.appthemehelper.util.TintHelper import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.EqualizerHelper
import code.name.monkey.retromusic.activities.base.AbsMusicServiceActivity import code.name.monkey.retromusic.activities.base.AbsMusicServiceActivity
import code.name.monkey.retromusic.extensions.applyToolbar
import code.name.monkey.retromusic.helper.EqualizerHelper
import code.name.monkey.retromusic.util.ViewUtil import code.name.monkey.retromusic.util.ViewUtil
import kotlinx.android.synthetic.main.activity_equalizer.* import kotlinx.android.synthetic.main.activity_equalizer.*
import kotlinx.android.synthetic.main.activity_equalizer.appBarLayout
import kotlinx.android.synthetic.main.activity_equalizer.toolbar
import kotlinx.android.synthetic.main.activity_playing_queue.*
/** /**
* @author Hemanth S (h4h13). * @author Hemanth S (h4h13).
@ -103,17 +107,9 @@ class EqualizerActivity : AbsMusicServiceActivity(), AdapterView.OnItemSelectedL
} }
private fun setupToolbar() { private fun setupToolbar() {
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
val primaryColor = ThemeStore.primaryColor(this) val primaryColor = ThemeStore.primaryColor(this)
appBarLayout.setBackgroundColor(primaryColor) appBarLayout.setBackgroundColor(primaryColor)
toolbar.apply { applyToolbar(toolbar)
setBackgroundColor(primaryColor)
setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
setNavigationOnClickListener { onBackPressed() }
setSupportActionBar(this)
ToolbarContentTintHelper.colorBackButton(this, ThemeStore.textColorSecondary(context))
}
title = null
} }
private fun addPresets() { private fun addPresets() {

View file

@ -14,6 +14,9 @@ import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
import code.name.monkey.retromusic.adapter.song.SongAdapter
import code.name.monkey.retromusic.extensions.applyToolbar
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.menu.GenreMenuHelper import code.name.monkey.retromusic.helper.menu.GenreMenuHelper
import code.name.monkey.retromusic.interfaces.CabHolder import code.name.monkey.retromusic.interfaces.CabHolder
@ -21,12 +24,15 @@ import code.name.monkey.retromusic.model.Genre
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.mvp.contract.GenreDetailsContract import code.name.monkey.retromusic.mvp.contract.GenreDetailsContract
import code.name.monkey.retromusic.mvp.presenter.GenreDetailsPresenter import code.name.monkey.retromusic.mvp.presenter.GenreDetailsPresenter
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
import code.name.monkey.retromusic.adapter.song.SongAdapter
import code.name.monkey.retromusic.util.RetroColorUtil import code.name.monkey.retromusic.util.RetroColorUtil
import code.name.monkey.retromusic.util.ViewUtil import code.name.monkey.retromusic.util.ViewUtil
import com.afollestad.materialcab.MaterialCab import com.afollestad.materialcab.MaterialCab
import kotlinx.android.synthetic.main.activity_playing_queue.*
import kotlinx.android.synthetic.main.activity_playlist_detail.* import kotlinx.android.synthetic.main.activity_playlist_detail.*
import kotlinx.android.synthetic.main.activity_playlist_detail.appBarLayout
import kotlinx.android.synthetic.main.activity_playlist_detail.empty
import kotlinx.android.synthetic.main.activity_playlist_detail.recyclerView
import kotlinx.android.synthetic.main.activity_playlist_detail.toolbar
import java.util.* import java.util.*
/** /**
@ -65,23 +71,15 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), GenreDetailsContrac
} }
private fun setUpToolBar() { private fun setUpToolBar() {
bannerTitle!!.text = genre!!.name
bannerTitle!!.setTextColor(ThemeStore.textColorPrimary(this))
val primaryColor = ThemeStore.primaryColor(this) val primaryColor = ThemeStore.primaryColor(this)
appBarLayout.setBackgroundColor(primaryColor) appBarLayout.setBackgroundColor(primaryColor)
toolbar.apply { applyToolbar(toolbar)
setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
setBackgroundColor(primaryColor)
setSupportActionBar(this)
ToolbarContentTintHelper.colorBackButton(this, ThemeStore.textColorSecondary(this@GenreDetailsActivity))
}
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this)) actionShuffleAll.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply { ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply {
actionShuffleAll.setTextColor(this) actionShuffleAll.setTextColor(this)
actionShuffleAll.iconTint = this actionShuffleAll.iconTint = this
} }
title = null title = genre!!.name
} }
override fun onResume() { override fun onResume() {

View file

@ -6,7 +6,11 @@ import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsBaseActivity import code.name.monkey.retromusic.activities.base.AbsBaseActivity
import code.name.monkey.retromusic.extensions.applyToolbar
import kotlinx.android.synthetic.main.activity_license.* import kotlinx.android.synthetic.main.activity_license.*
import kotlinx.android.synthetic.main.activity_license.appBarLayout
import kotlinx.android.synthetic.main.activity_license.toolbar
import kotlinx.android.synthetic.main.activity_playing_queue.*
class LicenseActivity : AbsBaseActivity() { class LicenseActivity : AbsBaseActivity() {
@ -30,15 +34,8 @@ class LicenseActivity : AbsBaseActivity() {
setLightNavigationBar(true) setLightNavigationBar(true)
license.loadUrl("file:///android_asset/index.html") license.loadUrl("file:///android_asset/index.html")
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this)) applyToolbar(toolbar)
toolbar!!.apply {
setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
setNavigationOnClickListener { onBackPressed() }
setBackgroundColor(ThemeStore.primaryColor(this@LicenseActivity))
}
appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this)) appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this))
title = null
setSupportActionBar(toolbar) setSupportActionBar(toolbar)
ToolbarContentTintHelper.colorBackButton(toolbar!!, ThemeStore.accentColor(this))
} }
} }

View file

@ -7,11 +7,11 @@ import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.activities.base.AbsMusicServiceActivity import code.name.monkey.retromusic.activities.base.AbsMusicServiceActivity
import code.name.monkey.retromusic.adapter.song.PlayingQueueAdapter import code.name.monkey.retromusic.adapter.song.PlayingQueueAdapter
import code.name.monkey.retromusic.extensions.applyToolbar
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator
import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager
@ -139,18 +139,12 @@ class PlayingQueueActivity : AbsMusicServiceActivity() {
} }
private fun setupToolbar() { private fun setupToolbar() {
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
playerQueueSubHeader.text = upNextAndQueueTime playerQueueSubHeader.text = upNextAndQueueTime
playerQueueSubHeader.setTextColor(ThemeStore.accentColor(this)) playerQueueSubHeader.setTextColor(ThemeStore.accentColor(this))
applyToolbar(toolbar)
appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this)) appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this))
toolbar.setBackgroundColor(ThemeStore.primaryColor(this))
toolbar.setNavigationIcon(R.drawable.ic_close_white_24dp)
setSupportActionBar(toolbar)
title = null
toolbar.setNavigationOnClickListener { onBackPressed() }
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this))
clearQueue.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this)) clearQueue.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply { ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply {
clearQueue.setTextColor(this) clearQueue.setTextColor(this)

View file

@ -11,8 +11,12 @@ import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
import code.name.monkey.retromusic.adapter.song.OrderablePlaylistSongAdapter
import code.name.monkey.retromusic.adapter.song.PlaylistSongAdapter
import code.name.monkey.retromusic.adapter.song.SongAdapter
import code.name.monkey.retromusic.extensions.applyToolbar
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper
import code.name.monkey.retromusic.interfaces.CabHolder import code.name.monkey.retromusic.interfaces.CabHolder
@ -22,10 +26,6 @@ import code.name.monkey.retromusic.model.Playlist
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.mvp.contract.PlaylistSongsContract import code.name.monkey.retromusic.mvp.contract.PlaylistSongsContract
import code.name.monkey.retromusic.mvp.presenter.PlaylistSongsPresenter import code.name.monkey.retromusic.mvp.presenter.PlaylistSongsPresenter
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
import code.name.monkey.retromusic.adapter.song.OrderablePlaylistSongAdapter
import code.name.monkey.retromusic.adapter.song.PlaylistSongAdapter
import code.name.monkey.retromusic.adapter.song.SongAdapter
import code.name.monkey.retromusic.util.PlaylistsUtil import code.name.monkey.retromusic.util.PlaylistsUtil
import code.name.monkey.retromusic.util.RetroColorUtil import code.name.monkey.retromusic.util.RetroColorUtil
import code.name.monkey.retromusic.util.ViewUtil import code.name.monkey.retromusic.util.ViewUtil
@ -123,8 +123,6 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
} }
private fun setUpToolBar() { private fun setUpToolBar() {
bannerTitle.text = playlist!!.name
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this)) actionShuffleAll.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply { ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply {
@ -132,14 +130,8 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
actionShuffleAll.iconTint = this actionShuffleAll.iconTint = this
} }
val primaryColor = ThemeStore.primaryColor(this) applyToolbar(toolbar)
toolbar!!.apply { title = playlist!!.name
setBackgroundColor(primaryColor)
setSupportActionBar(toolbar)
setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
ToolbarContentTintHelper.colorBackButton(this, ThemeStore.textColorSecondary(this@PlaylistDetailActivity))
}
title = null
} }
override fun onCreateOptionsMenu(menu: Menu): Boolean { override fun onCreateOptionsMenu(menu: Menu): Boolean {

View file

@ -8,11 +8,11 @@ import android.view.MenuItem
import android.widget.Toast import android.widget.Toast
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.MaterialUtil import code.name.monkey.appthemehelper.util.MaterialUtil
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.App import code.name.monkey.retromusic.App
import code.name.monkey.retromusic.BuildConfig import code.name.monkey.retromusic.BuildConfig
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsBaseActivity import code.name.monkey.retromusic.activities.base.AbsBaseActivity
import code.name.monkey.retromusic.extensions.applyToolbar
import com.anjlab.android.iab.v3.BillingProcessor import com.anjlab.android.iab.v3.BillingProcessor
import com.anjlab.android.iab.v3.TransactionDetails import com.anjlab.android.iab.v3.TransactionDetails
import kotlinx.android.synthetic.main.activity_pro_version.* import kotlinx.android.synthetic.main.activity_pro_version.*
@ -39,12 +39,7 @@ class PurchaseActivity : AbsBaseActivity(), BillingProcessor.IBillingHandler {
toolbar.setBackgroundColor(primaryColor) toolbar.setBackgroundColor(primaryColor)
appBarLayout.setBackgroundColor(primaryColor) appBarLayout.setBackgroundColor(primaryColor)
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp) applyToolbar(toolbar)
toolbar.setNavigationOnClickListener { onBackPressed() }
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
setSupportActionBar(toolbar)
title = null
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.accentColor(this))
restoreButton.isEnabled = false restoreButton.isEnabled = false
purchaseButton.isEnabled = false purchaseButton.isEnabled = false

View file

@ -5,6 +5,7 @@ import android.os.Bundle
import android.view.MenuItem import android.view.MenuItem
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.transition.TransitionManager
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
@ -37,14 +38,14 @@ class SettingsActivity : AbsBaseActivity(), SharedPreferences.OnSharedPreference
private fun setupToolbar() { private fun setupToolbar() {
setSupportActionBar(toolbar) setSupportActionBar(toolbar)
title = null setTitle(R.string.action_settings)
toolbar.apply { toolbar.apply {
setBackgroundColor(ThemeStore.primaryColor(context)) setBackgroundColor(ThemeStore.primaryColor(context))
setNavigationOnClickListener { onBackPressed() } setNavigationOnClickListener { onBackPressed() }
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(context)) ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(context))
} }
appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this)) appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this))
settingsTitle.setTextColor(ThemeStore.textColorPrimary(this))
} }
fun setupFragment(fragment: Fragment, @StringRes titleName: Int) { fun setupFragment(fragment: Fragment, @StringRes titleName: Int) {
@ -52,8 +53,6 @@ class SettingsActivity : AbsBaseActivity(), SharedPreferences.OnSharedPreference
.beginTransaction() .beginTransaction()
.setCustomAnimations(R.anim.sliding_in_left, R.anim.sliding_out_right, android.R.anim.slide_in_left, android.R.anim.slide_out_right) .setCustomAnimations(R.anim.sliding_in_left, R.anim.sliding_out_right, android.R.anim.slide_in_left, android.R.anim.slide_out_right)
settingsTitle.setText(titleName)
if (detailContentFrame == null) { if (detailContentFrame == null) {
fragmentTransaction.replace(R.id.contentFrame, fragment, fragment.tag) fragmentTransaction.replace(R.id.contentFrame, fragment, fragment.tag)
fragmentTransaction.addToBackStack(null) fragmentTransaction.addToBackStack(null)
@ -62,13 +61,16 @@ class SettingsActivity : AbsBaseActivity(), SharedPreferences.OnSharedPreference
fragmentTransaction.replace(R.id.detailContentFrame, fragment, fragment.tag) fragmentTransaction.replace(R.id.detailContentFrame, fragment, fragment.tag)
fragmentTransaction.commit() fragmentTransaction.commit()
} }
TransitionManager.beginDelayedTransition(appBarLayout)
setTitle(titleName)
} }
override fun onBackPressed() { override fun onBackPressed() {
if (fragmentManager.backStackEntryCount == 0) { if (fragmentManager.backStackEntryCount == 0) {
super.onBackPressed() super.onBackPressed()
} else { } else {
settingsTitle.setText(R.string.action_settings) setTitle(R.string.action_settings)
fragmentManager.popBackStack() fragmentManager.popBackStack()
} }
} }

View file

@ -18,10 +18,10 @@ import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.TintHelper import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.BuildConfig import code.name.monkey.retromusic.BuildConfig
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsBaseActivity import code.name.monkey.retromusic.activities.base.AbsBaseActivity
import code.name.monkey.retromusic.extensions.applyToolbar
import code.name.monkey.retromusic.views.IconImageView import code.name.monkey.retromusic.views.IconImageView
import com.anjlab.android.iab.v3.BillingProcessor import com.anjlab.android.iab.v3.BillingProcessor
import com.anjlab.android.iab.v3.SkuDetails import com.anjlab.android.iab.v3.SkuDetails
@ -32,7 +32,6 @@ import java.util.*
class SupportDevelopmentActivity : AbsBaseActivity(), BillingProcessor.IBillingHandler { class SupportDevelopmentActivity : AbsBaseActivity(), BillingProcessor.IBillingHandler {
companion object { companion object {
val TAG: String = SupportDevelopmentActivity::class.java.simpleName val TAG: String = SupportDevelopmentActivity::class.java.simpleName
const val DONATION_PRODUCT_IDS = R.array.donation_ids const val DONATION_PRODUCT_IDS = R.array.donation_ids
@ -59,8 +58,6 @@ class SupportDevelopmentActivity : AbsBaseActivity(), BillingProcessor.IBillingH
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_donation) setContentView(R.layout.activity_donation)
setStatusbarColorAuto() setStatusbarColorAuto()
setNavigationbarColorAuto() setNavigationbarColorAuto()
setTaskDescriptionColorAuto() setTaskDescriptionColorAuto()
@ -74,17 +71,9 @@ class SupportDevelopmentActivity : AbsBaseActivity(), BillingProcessor.IBillingH
} }
private fun setupToolbar() { private fun setupToolbar() {
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
val primaryColor = ThemeStore.primaryColor(this) val primaryColor = ThemeStore.primaryColor(this)
appBarLayout.setBackgroundColor(primaryColor) appBarLayout.setBackgroundColor(primaryColor)
toolbar.setBackgroundColor(primaryColor) applyToolbar(toolbar)
toolbar.setNavigationOnClickListener { onBackPressed() }
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
setSupportActionBar(toolbar)
title = null
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this))
} }
override fun onBillingInitialized() { override fun onBillingInitialized() {

View file

@ -23,6 +23,7 @@ import code.name.monkey.retromusic.Constants.USER_BANNER
import code.name.monkey.retromusic.Constants.USER_PROFILE import code.name.monkey.retromusic.Constants.USER_PROFILE
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.activities.base.AbsBaseActivity import code.name.monkey.retromusic.activities.base.AbsBaseActivity
import code.name.monkey.retromusic.extensions.applyToolbar
import code.name.monkey.retromusic.util.Compressor import code.name.monkey.retromusic.util.Compressor
import code.name.monkey.retromusic.util.ImageUtil.getResizedBitmap import code.name.monkey.retromusic.util.ImageUtil.getResizedBitmap
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
@ -51,7 +52,6 @@ class UserInfoActivity : AbsBaseActivity() {
setupToolbar() setupToolbar()
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
MaterialUtil.setTint(nameContainer, false) MaterialUtil.setTint(nameContainer, false)
MaterialUtil.setTint(bioContainer, false) MaterialUtil.setTint(bioContainer, false)
name.setText(PreferenceUtil.getInstance().userName) name.setText(PreferenceUtil.getInstance().userName)
@ -110,14 +110,8 @@ class UserInfoActivity : AbsBaseActivity() {
private fun setupToolbar() { private fun setupToolbar() {
val primaryColor = ThemeStore.primaryColor(this) val primaryColor = ThemeStore.primaryColor(this)
toolbar.apply { applyToolbar(toolbar)
setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
setBackgroundColor(primaryColor)
ToolbarContentTintHelper.colorBackButton(this, ThemeStore.textColorSecondary(this@UserInfoActivity))
setSupportActionBar(this)
}
appBarLayout.setBackgroundColor(primaryColor) appBarLayout.setBackgroundColor(primaryColor)
title = null
} }
private fun showBannerOptions() { private fun showBannerOptions() {

View file

@ -63,7 +63,7 @@ public class WhatsNewActivity extends AbsBaseActivity {
toolbar.setBackgroundColor(ThemeStore.Companion.primaryColor(this)); toolbar.setBackgroundColor(ThemeStore.Companion.primaryColor(this));
appBarLayout.setBackgroundColor(ThemeStore.Companion.primaryColor(this)); appBarLayout.setBackgroundColor(ThemeStore.Companion.primaryColor(this));
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
setTitle(null);
toolbar.setNavigationOnClickListener(v -> onBackPressed()); toolbar.setNavigationOnClickListener(v -> onBackPressed());
title.setTextColor(ThemeStore.Companion.textColorPrimary(this)); title.setTextColor(ThemeStore.Companion.textColorPrimary(this));
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.Companion.textColorSecondary(this)); ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.Companion.textColorSecondary(this));

View file

@ -0,0 +1,31 @@
/*
* 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.extensions
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R
fun AppCompatActivity.applyToolbar(toolbar: Toolbar) {
toolbar.apply {
setNavigationOnClickListener { onBackPressed() }
setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this@applyToolbar))
setBackgroundColor(ThemeStore.primaryColor(this@applyToolbar))
}
setSupportActionBar(toolbar)
}

View file

@ -35,15 +35,7 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
app:title="">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/settingsTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/action_settings" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -15,14 +15,9 @@
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"> app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:title="@string/profile" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/profile" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<LinearLayout <LinearLayout

View file

@ -17,14 +17,9 @@
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:title="@null"> app:title="@string/action_about" />
<TextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/action_about" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView

View file

@ -2,15 +2,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="8dp"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/card_credit"/> <include layout="@layout/card_credit" />
<include layout="@layout/card_retro_info"/> <include layout="@layout/card_retro_info" />
<include layout="@layout/card_social"/> <include layout="@layout/card_social" />
<include layout="@layout/card_other"/> <include layout="@layout/card_other" />
</LinearLayout> </LinearLayout>

View file

@ -22,15 +22,9 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:title="" app:title="@string/support_development"
tools:ignore="UnusedAttribute"> tools:ignore="UnusedAttribute" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/support_development" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout> </com.google.android.material.appbar.CollapsingToolbarLayout>
<View <View

View file

@ -14,15 +14,9 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:title="" app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
tools:ignore="UnusedAttribute"> app:title="@string/equalizer" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/equalizer" />
</androidx.appcompat.widget.Toolbar>
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/equalizerSwitch" android:id="@+id/equalizerSwitch"

View file

@ -25,15 +25,8 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:title="" app:title="@string/licenses"
tools:ignore="UnusedAttribute"> tools:ignore="UnusedAttribute" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/licenses" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout> </com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>

View file

@ -25,15 +25,8 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:title="" app:title="@string/queue"
tools:ignore="UnusedAttribute"> tools:ignore="UnusedAttribute" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/queue" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout> </com.google.android.material.appbar.CollapsingToolbarLayout>
<TextView <TextView

View file

@ -45,14 +45,8 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:title="" app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
tools:ignore="UnusedAttribute">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar" />
</androidx.appcompat.widget.Toolbar>
</FrameLayout> </FrameLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout> </com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>

View file

@ -39,14 +39,9 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
tools:ignore="UnusedAttribute"> app:title="@string/buy_retro_music_pro"
tools:ignore="UnusedAttribute" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/buy_retro_music_pro" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout> </com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>

View file

@ -11,7 +11,6 @@
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" /> app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -24,15 +23,7 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />
app:title="">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/settingsTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/action_settings" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -16,14 +16,9 @@
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"> app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:title="@string/profile" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/profile" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<LinearLayout <LinearLayout

View file

@ -18,14 +18,8 @@
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:title=""> app:title="@string/whats_new" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/bannerTitle"
style="@style/BigTitleTextAppearanceToolbar"
android:text="@string/whats_new" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<code.name.monkey.retromusic.views.LollipopFixedWebView <code.name.monkey.retromusic.views.LollipopFixedWebView

View file

@ -4,6 +4,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false" app:cardPreventCornerOverlap="false"
app:cardUseCompatPadding="true"> app:cardUseCompatPadding="true">

View file

@ -5,6 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false" app:cardPreventCornerOverlap="false"
app:cardUseCompatPadding="true"> app:cardUseCompatPadding="true">
@ -36,9 +37,9 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/changelog" /> android:text="@string/changelog"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -66,9 +67,9 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pref_title_open_source_licences" /> android:text="@string/pref_title_open_source_licences"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -95,9 +96,9 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/version" /> android:text="@string/version"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:id="@+id/appVersion" android:id="@+id/appVersion"
@ -107,6 +108,7 @@
android:alpha="0.85" android:alpha="0.85"
android:text="0.0.0" /> android:text="0.0.0" />
</LinearLayout> </LinearLayout>
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/madeText" android:id="@+id/madeText"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -5,6 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false" app:cardPreventCornerOverlap="false"
app:cardUseCompatPadding="true"> app:cardUseCompatPadding="true">
@ -49,10 +50,10 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/circular" android:fontFamily="@font/circular"
android:text="@string/git_hub" /> android:text="@string/git_hub"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -95,9 +96,9 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/translate" /> android:text="@string/translate"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -140,9 +141,9 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/rate_app" /> android:text="@string/rate_app"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -185,9 +186,9 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/donate" /> android:text="@string/donate"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -232,10 +233,10 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/action_share" android:text="@string/action_share"
android:textColor="@color/md_white_1000" /> android:textColor="@color/md_white_1000"
app:fontFamily="@font/circular_std_medium" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -273,10 +274,10 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/faq" android:text="@string/faq"
android:textColor="@color/md_white_1000" /> android:textColor="@color/md_white_1000"
app:fontFamily="@font/circular_std_medium" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View file

@ -5,6 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:cardPreventCornerOverlap="false" app:cardPreventCornerOverlap="false"
app:cardUseCompatPadding="true"> app:cardUseCompatPadding="true">
@ -48,9 +49,9 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pinterest_page" /> android:text="@string/pinterest_page"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -93,8 +94,8 @@
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:fontFamily="@font/circular_std_medium" android:text="@string/instagram_page"
android:text="@string/instagram_page" /> app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -135,9 +136,9 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/twitter_page" /> android:text="@string/twitter_page"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -178,9 +179,9 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
app:fontFamily="@font/circular_std_medium"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/discord_page" /> android:text="@string/discord_page"
app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"
@ -222,8 +223,8 @@
style="@style/TextAppearance.MaterialComponents.Subtitle1" style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:fontFamily="@font/circular_std_medium" android:text="@string/telegram_group"
android:text="@string/telegram_group" /> app:fontFamily="@font/circular_std_medium" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
style="@style/TextAppearance.MaterialComponents.Body2" style="@style/TextAppearance.MaterialComponents.Body2"

View file

@ -1,10 +1,10 @@
package code.name.monkey.appthemehelper.common.views package code.name.monkey.appthemehelper.common.views
import android.content.Context import android.content.Context
import android.content.res.ColorStateList
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import androidx.appcompat.widget.SwitchCompat import androidx.appcompat.widget.SwitchCompat
import code.name.monkey.appthemehelper.ATH
import code.name.monkey.appthemehelper.R import code.name.monkey.appthemehelper.R
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
@ -30,7 +30,12 @@ class ATESwitch : SwitchCompat {
setThumbResource(R.drawable.toggle_switch) setThumbResource(R.drawable.toggle_switch)
setTrackResource(R.drawable.ate_track) setTrackResource(R.drawable.ate_track)
background = null background = null
ATH.setTint(this, ThemeStore.accentColor(context))
val sl = ColorStateList(arrayOf(intArrayOf(-android.R.attr.state_checked), intArrayOf(android.R.attr.state_checked)),
intArrayOf(ThemeStore.textColorSecondary(context), ThemeStore.accentColor(context)))
thumbTintList = sl
trackTintList = sl
} }
override fun isShown(): Boolean { override fun isShown(): Boolean {

View file

@ -15,16 +15,18 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"> <item android:state_checked="true">
<shape android:dither="true" android:shape="rectangle" android:useLevel="false" android:visible="true"> <shape android:dither="true" android:shape="rectangle" android:useLevel="false" android:visible="true">
<solid android:color="@color/md_deep_purple_A700" /> <stroke android:width="2dp" android:color="@color/md_deep_purple_A700" />
<corners android:radius="25dp" /> <corners android:radius="25dp" />
<size android:width="2dp" /> <size android:width="2dp" />
<solid android:color="@android:color/transparent" />
</shape> </shape>
</item> </item>
<item android:state_checked="false"> <item android:state_checked="false">
<shape android:dither="true" android:shape="rectangle" android:useLevel="false" android:visible="true"> <shape android:dither="true" android:shape="rectangle" android:useLevel="false" android:visible="true">
<solid android:color="@color/md_white_1000" /> <stroke android:width="2dp" android:color="@color/md_white_1000" />
<corners android:radius="25dp" /> <corners android:radius="25dp" />
<size android:width="2dp" /> <size android:width="2dp" />
<solid android:color="@android:color/transparent" />
</shape> </shape>
</item> </item>
</selector> </selector>

View file

@ -18,7 +18,7 @@
<solid android:color="@color/md_white_1000" /> <solid android:color="@color/md_white_1000" />
<corners android:radius="10dp" /> <corners android:radius="10dp" />
<size android:width="20dp" android:height="20dp" /> <size android:width="20dp" android:height="20dp" />
<stroke android:width="6dp" android:color="#0000ffff" /> <stroke android:width="8dp" android:color="#0000ffff" />
</shape> </shape>
</item> </item>
</selector> </selector>