From b16f86dda1bd34237fabf69866c0e477f11f2fe0 Mon Sep 17 00:00:00 2001 From: aminecmi Date: Tue, 27 Sep 2022 12:02:59 +0200 Subject: [PATCH] All theme issues should be resolved. --- .../android/AddSourceActivity.kt | 24 ----------------- .../android/HomeActivity.kt | 15 ++--------- .../android/LoginActivity.kt | 4 --- .../android/ReaderActivity.kt | 4 --- .../android/SourcesActivity.kt | 8 ++---- .../android/adapters/ItemCardAdapter.kt | 4 +-- .../android/adapters/ItemListAdapter.kt | 5 ++-- .../android/adapters/ItemsAdapter.kt | 2 -- .../android/fragments/ArticleFragment.kt | 14 ++++------ .../android/settings/SettingsActivity.kt | 6 ----- .../android/themes/AppColors.kt | 26 ------------------- .../android/themes/Toppings.kt | 8 ------ .../main/res/layout/activity_add_source.xml | 4 +-- .../src/main/res/layout/activity_home.xml | 2 +- .../src/main/res/layout/activity_login.xml | 2 +- .../src/main/res/layout/activity_reader.xml | 4 ++- .../src/main/res/layout/activity_settings.xml | 3 ++- .../src/main/res/layout/activity_sources.xml | 2 +- .../src/main/res/values-night/styles.xml | 6 ++--- androidApp/src/main/res/values/attrs.xml | 1 + androidApp/src/main/res/values/colors.xml | 1 + androidApp/src/main/res/values/styles.xml | 10 ++++++- 22 files changed, 36 insertions(+), 119 deletions(-) delete mode 100644 androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/themes/AppColors.kt delete mode 100644 androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/themes/Toppings.kt diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/AddSourceActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/AddSourceActivity.kt index f199700..26b1239 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/AddSourceActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/AddSourceActivity.kt @@ -7,8 +7,6 @@ import android.widget.* import androidx.appcompat.app.AppCompatActivity import androidx.constraintlayout.widget.ConstraintLayout import bou.amine.apps.readerforselfossv2.android.databinding.ActivityAddSourceBinding -import bou.amine.apps.readerforselfossv2.android.themes.AppColors -import bou.amine.apps.readerforselfossv2.android.themes.Toppings import bou.amine.apps.readerforselfossv2.android.utils.isBaseUrlInvalid import bou.amine.apps.readerforselfossv2.model.NetworkUnavailableException import bou.amine.apps.readerforselfossv2.repository.Repository @@ -25,7 +23,6 @@ class AddSourceActivity : AppCompatActivity(), DIAware { private var mSpoutsValue: String? = null - private lateinit var appColors: AppColors private lateinit var binding: ActivityAddSourceBinding override val di by closestDI() @@ -33,39 +30,18 @@ class AddSourceActivity : AppCompatActivity(), DIAware { private val appSettingsService : AppSettingsService by instance() override fun onCreate(savedInstanceState: Bundle?) { - appColors = AppColors(this@AddSourceActivity) - super.onCreate(savedInstanceState) binding = ActivityAddSourceBinding.inflate(layoutInflater) val view = binding.root setContentView(view) - val drawable = binding.nameInput.background - drawable.setTint(appColors.colorAccent) - - - // TODO: clean - binding.nameInput.background = drawable - - val drawable1 = binding.sourceUri.background - drawable1.setTint(appColors.colorAccent) - - binding.sourceUri.background = drawable1 - - val drawable2 = binding.tags.background - drawable2.setTint(appColors.colorAccent) - - binding.tags.background = drawable2 - setSupportActionBar(binding.toolbar) supportActionBar?.setDisplayHomeAsUpEnabled(true) supportActionBar?.setDisplayShowHomeEnabled(true) maybeGetDetailsFromIntentSharing(intent, binding.sourceUri, binding.nameInput) - binding.saveBtn.setTextColor(appColors.colorAccent) - binding.saveBtn.setOnClickListener { handleSaveSource( binding.tags, diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt index 6509219..c0f222e 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt @@ -32,8 +32,6 @@ import bou.amine.apps.readerforselfossv2.android.adapters.ItemsAdapter import bou.amine.apps.readerforselfossv2.android.background.LoadingWorker import bou.amine.apps.readerforselfossv2.android.databinding.ActivityHomeBinding import bou.amine.apps.readerforselfossv2.android.settings.SettingsActivity -import bou.amine.apps.readerforselfossv2.android.themes.AppColors -import bou.amine.apps.readerforselfossv2.android.themes.Toppings import bou.amine.apps.readerforselfossv2.android.utils.bottombar.maybeShow import bou.amine.apps.readerforselfossv2.android.utils.bottombar.removeBadge import bou.amine.apps.readerforselfossv2.model.SelfossModel @@ -81,7 +79,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar private lateinit var tabNewBadge: TextBadgeItem private lateinit var tabArchiveBadge: TextBadgeItem private lateinit var tabStarredBadge: TextBadgeItem - private lateinit var appColors: AppColors private var offset: Int = 0 private var firstVisible: Int = 0 private lateinit var recyclerViewScrollListener: RecyclerView.OnScrollListener @@ -105,10 +102,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar data class DrawerData(val tags: List?, val sources: List?) override fun onCreate(savedInstanceState: Bundle?) { - - // Add appcolors to DI - appColors = AppColors(this@HomeActivity) - super.onCreate(savedInstanceState) binding = ActivityHomeBinding.inflate(layoutInflater) val view = binding.root @@ -267,8 +260,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar override fun onResume() { super.onResume() - appColors = AppColors(this@HomeActivity) - handleDrawerItems() reloadLayoutManager() @@ -474,7 +465,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar val gdColor = try { Color.parseColor(it.color) } catch (e: IllegalArgumentException) { - appColors.colorPrimary + resources.getColor(R.color.colorPrimary) } gd.setColor(gdColor) gd.shape = GradientDrawable.RECTANGLE @@ -488,7 +479,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar iconDrawable = gd badgeStyle = BadgeStyle().apply { textColor = ColorHolder.fromColor(Color.WHITE) - color = ColorHolder.fromColor(appColors.colorAccent) + color = ColorHolder.fromColor(resources.getColor(R.color.colorAccent)) } onDrawerItemClickListener = { _, _, _ -> repository.tagFilter = it @@ -711,7 +702,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar ItemCardAdapter( this, items, - appColors, ) { updateItems(it) } @@ -720,7 +710,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar ItemListAdapter( this, items, - appColors, ) { updateItems(it) } diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt index af70159..ef790bf 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt @@ -14,7 +14,6 @@ import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatDelegate import bou.amine.apps.readerforselfossv2.android.databinding.ActivityLoginBinding -import bou.amine.apps.readerforselfossv2.android.themes.AppColors import bou.amine.apps.readerforselfossv2.android.utils.isBaseUrlInvalid import bou.amine.apps.readerforselfossv2.repository.Repository import bou.amine.apps.readerforselfossv2.service.AppSettingsService @@ -31,7 +30,6 @@ class LoginActivity : AppCompatActivity(), DIAware { private var inValidCount: Int = 0 private var isWithLogin = false - private lateinit var appColors: AppColors private lateinit var binding: ActivityLoginBinding override val di by closestDI() @@ -39,8 +37,6 @@ class LoginActivity : AppCompatActivity(), DIAware { private val appSettingsService : AppSettingsService by instance() override fun onCreate(savedInstanceState: Bundle?) { - appColors = AppColors(this@LoginActivity) - super.onCreate(savedInstanceState) AppCompatDelegate.setDefaultNightMode(if (appSettingsService.isDarkThemeEnabled()) AppCompatDelegate.MODE_NIGHT_YES else AppCompatDelegate.MODE_NIGHT_NO) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/ReaderActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/ReaderActivity.kt index 0bb6186..4214ef4 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/ReaderActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/ReaderActivity.kt @@ -12,8 +12,6 @@ import androidx.viewpager2.adapter.FragmentStateAdapter import androidx.viewpager2.widget.ViewPager2 import bou.amine.apps.readerforselfossv2.android.databinding.ActivityReaderBinding import bou.amine.apps.readerforselfossv2.android.fragments.ArticleFragment -import bou.amine.apps.readerforselfossv2.android.themes.AppColors -import bou.amine.apps.readerforselfossv2.android.themes.Toppings import bou.amine.apps.readerforselfossv2.model.SelfossModel import bou.amine.apps.readerforselfossv2.repository.Repository import bou.amine.apps.readerforselfossv2.service.AppSettingsService @@ -27,7 +25,6 @@ import org.kodein.di.instance class ReaderActivity : AppCompatActivity(), DIAware { private var currentItem: Int = 0 - private lateinit var appColors: AppColors private lateinit var toolbarMenu: Menu @@ -55,7 +52,6 @@ class ReaderActivity : AppCompatActivity(), DIAware { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - appColors = AppColors(this) binding = ActivityReaderBinding.inflate(layoutInflater) val view = binding.root diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/SourcesActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/SourcesActivity.kt index 15d93bd..4a99f96 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/SourcesActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/SourcesActivity.kt @@ -8,8 +8,6 @@ import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.LinearLayoutManager import bou.amine.apps.readerforselfossv2.android.adapters.SourcesListAdapter import bou.amine.apps.readerforselfossv2.android.databinding.ActivitySourcesBinding -import bou.amine.apps.readerforselfossv2.android.themes.AppColors -import bou.amine.apps.readerforselfossv2.android.themes.Toppings import bou.amine.apps.readerforselfossv2.model.SelfossModel import bou.amine.apps.readerforselfossv2.repository.Repository import kotlinx.coroutines.CoroutineScope @@ -21,14 +19,12 @@ import org.kodein.di.instance class SourcesActivity : AppCompatActivity(), DIAware { - private lateinit var appColors: AppColors private lateinit var binding: ActivitySourcesBinding override val di by closestDI() private val repository : Repository by instance() override fun onCreate(savedInstanceState: Bundle?) { - appColors = AppColors(this@SourcesActivity) binding = ActivitySourcesBinding.inflate(layoutInflater) val view = binding.root @@ -40,8 +36,8 @@ class SourcesActivity : AppCompatActivity(), DIAware { supportActionBar?.setDisplayHomeAsUpEnabled(true) supportActionBar?.setDisplayShowHomeEnabled(true) - binding.fab.rippleColor = appColors.colorAccentDark - binding.fab.backgroundTintList = ColorStateList.valueOf(appColors.colorAccent) + binding.fab.rippleColor = resources.getColor(R.color.colorAccentDark) + binding.fab.backgroundTintList = ColorStateList.valueOf(resources.getColor(R.color.colorAccent)) } override fun onStop() { diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemCardAdapter.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemCardAdapter.kt index e418b6a..fa26bf4 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemCardAdapter.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemCardAdapter.kt @@ -10,7 +10,6 @@ import androidx.recyclerview.widget.RecyclerView import bou.amine.apps.readerforselfossv2.android.R import bou.amine.apps.readerforselfossv2.android.databinding.CardItemBinding import bou.amine.apps.readerforselfossv2.android.model.toTextDrawableString -import bou.amine.apps.readerforselfossv2.android.themes.AppColors import bou.amine.apps.readerforselfossv2.android.utils.* import bou.amine.apps.readerforselfossv2.android.utils.glide.bitmapCenterCrop import bou.amine.apps.readerforselfossv2.android.utils.glide.circularBitmapDrawable @@ -33,7 +32,6 @@ import org.kodein.di.instance class ItemCardAdapter( override val app: Activity, override var items: ArrayList, - override val appColors: AppColors, override val updateItems: (ArrayList) -> Unit ) : ItemsAdapter() { private val c: Context = app.baseContext @@ -59,7 +57,7 @@ class ItemCardAdapter( binding.title.setOnTouchListener(LinkOnTouchListener()) - binding.title.setLinkTextColor(appColors.colorAccent) + binding.title.setLinkTextColor(c.resources.getColor(R.color.colorAccent)) binding.sourceTitleAndDate.text = itm.sourceAndDateText(repository.dateUtils) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemListAdapter.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemListAdapter.kt index ba6964e..de6e91e 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemListAdapter.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemListAdapter.kt @@ -5,9 +5,9 @@ import android.content.Context import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView +import bou.amine.apps.readerforselfossv2.android.R import bou.amine.apps.readerforselfossv2.android.databinding.ListItemBinding import bou.amine.apps.readerforselfossv2.android.model.toTextDrawableString -import bou.amine.apps.readerforselfossv2.android.themes.AppColors import bou.amine.apps.readerforselfossv2.android.utils.LinkOnTouchListener import bou.amine.apps.readerforselfossv2.android.utils.glide.bitmapCenterCrop import bou.amine.apps.readerforselfossv2.android.utils.glide.circularBitmapDrawable @@ -27,7 +27,6 @@ import org.kodein.di.instance class ItemListAdapter( override val app: Activity, override var items: ArrayList, - override val appColors: AppColors, override val updateItems: (ArrayList) -> Unit ) : ItemsAdapter() { private val generator: ColorGenerator = ColorGenerator.MATERIAL @@ -50,7 +49,7 @@ class ItemListAdapter( binding.title.setOnTouchListener(LinkOnTouchListener()) - binding.title.setLinkTextColor(appColors.colorAccent) + binding.title.setLinkTextColor(c.resources.getColor(R.color.colorAccent)) binding.sourceTitleAndDate.text = itm.sourceAndDateText(repository.dateUtils) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemsAdapter.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemsAdapter.kt index d66be45..b310bd0 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemsAdapter.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/adapters/ItemsAdapter.kt @@ -5,7 +5,6 @@ import android.graphics.Color import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import bou.amine.apps.readerforselfossv2.android.R -import bou.amine.apps.readerforselfossv2.android.themes.AppColors import bou.amine.apps.readerforselfossv2.model.SelfossModel import bou.amine.apps.readerforselfossv2.repository.Repository import bou.amine.apps.readerforselfossv2.service.AppSettingsService @@ -21,7 +20,6 @@ abstract class ItemsAdapter : RecyclerView.Adapte abstract val repository: Repository abstract val appSettingsService: AppSettingsService abstract val app: Activity - abstract val appColors: AppColors abstract val updateItems: (ArrayList) -> Unit fun updateAllItems(items: ArrayList) { diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt index 3e3558b..703974c 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt @@ -26,7 +26,6 @@ import bou.amine.apps.readerforselfossv2.android.databinding.FragmentArticleBind import bou.amine.apps.readerforselfossv2.android.model.ParecelableItem import bou.amine.apps.readerforselfossv2.android.model.toModel import bou.amine.apps.readerforselfossv2.android.model.toParcelable -import bou.amine.apps.readerforselfossv2.android.themes.AppColors import bou.amine.apps.readerforselfossv2.android.utils.glide.getBitmapInputStream import bou.amine.apps.readerforselfossv2.android.utils.openInBrowserAsNewTask import bou.amine.apps.readerforselfossv2.android.utils.shareLink @@ -67,7 +66,6 @@ class ArticleFragment : Fragment(), DIAware { private lateinit var contentTitle: String private lateinit var allImages : ArrayList private lateinit var fab: FloatingActionButton - private lateinit var appColors: AppColors private lateinit var textAlignment: String private var _binding: FragmentArticleBinding? = null private val binding get() = _binding!! @@ -82,8 +80,6 @@ class ArticleFragment : Fragment(), DIAware { private var staticBar = false override fun onCreate(savedInstanceState: Bundle?) { - appColors = AppColors(requireActivity()) - super.onCreate(savedInstanceState) val pi: ParecelableItem = requireArguments().getParcelable(ARG_ITEMS)!! @@ -124,14 +120,14 @@ class ArticleFragment : Fragment(), DIAware { fab = binding.fab - fab.backgroundTintList = ColorStateList.valueOf(appColors.colorAccent) + fab.backgroundTintList = ColorStateList.valueOf(resources.getColor(R.color.colorAccent)) - fab.rippleColor = appColors.colorAccentDark + fab.rippleColor = resources.getColor(R.color.colorAccentDark) val floatingToolbar: FloatingToolbar = binding.floatingToolbar floatingToolbar.attachFab(fab) - floatingToolbar.background = ColorDrawable(appColors.colorAccent) + floatingToolbar.background = ColorDrawable(resources.getColor(R.color.colorAccent)) floatingToolbar.setClickListener( object : FloatingToolbar.ItemClickListener { @@ -337,7 +333,7 @@ class ArticleFragment : Fragment(), DIAware { } private fun htmlToWebview() { - val stringColor = String.format("#%06X", 0xFFFFFF and appColors.colorAccent) + val stringColor = String.format("#%06X", 0xFFFFFF and resources.getColor(R.color.colorAccent)) val attrs: IntArray = intArrayOf(android.R.attr.fontFamily) val a: TypedArray = requireContext().obtainStyledAttributes(resId, attrs) @@ -347,7 +343,7 @@ class ArticleFragment : Fragment(), DIAware { binding.webcontent.visibility = View.VISIBLE // TODO: Set the color strings programmatically - val (stringTextColor, stringBackgroundColor) = if (appColors.isDarkTheme) { + val (stringTextColor, stringBackgroundColor) = if (appSettingsService.isDarkThemeEnabled()) { Pair("#FFFFFF", "#303030") } else { Pair("#212121", "#FAFAFA") diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt index dc0e046..c37f782 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt @@ -7,20 +7,14 @@ import android.text.Editable import android.text.InputFilter import android.text.InputType import android.text.TextWatcher -import android.view.Menu -import android.view.MenuInflater -import android.view.MenuItem import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.core.widget.addTextChangedListener import androidx.preference.EditTextPreference import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat -import androidx.preference.PreferenceManager import bou.amine.apps.readerforselfossv2.android.R import bou.amine.apps.readerforselfossv2.android.databinding.ActivitySettingsBinding -import bou.amine.apps.readerforselfossv2.android.themes.AppColors -import bou.amine.apps.readerforselfossv2.android.themes.Toppings import bou.amine.apps.readerforselfossv2.service.AppSettingsService private const val TITLE_TAG = "settingsActivityTitle" diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/themes/AppColors.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/themes/AppColors.kt deleted file mode 100644 index 59619b1..0000000 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/themes/AppColors.kt +++ /dev/null @@ -1,26 +0,0 @@ -package bou.amine.apps.readerforselfossv2.android.themes - -import android.app.Activity -import androidx.annotation.ColorInt -import bou.amine.apps.readerforselfossv2.android.R -import com.russhwolf.settings.Settings - -class AppColors(a: Activity) { - - @ColorInt val colorPrimary: Int = a.resources.getColor(R.color.colorPrimary) - @ColorInt val colorPrimaryDark: Int = a.resources.getColor(R.color.colorPrimaryDark) - @ColorInt val colorAccent: Int = a.resources.getColor(R.color.colorAccent) - @ColorInt val colorAccentDark: Int = a.resources.getColor(R.color.colorAccentDark) - val isDarkTheme: Boolean - - init { - val settings = Settings() - isDarkTheme = - settings.getBoolean( - "dark_theme", - false - ) - - } - -} diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/themes/Toppings.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/themes/Toppings.kt deleted file mode 100644 index ecda680..0000000 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/themes/Toppings.kt +++ /dev/null @@ -1,8 +0,0 @@ -package bou.amine.apps.readerforselfossv2.android.themes - -enum class Toppings(val value: Int) { - PRIMARY(1), - PRIMARY_DARK(2), - ACCENT(3), - ACCENT_DARK(4) -} \ No newline at end of file diff --git a/androidApp/src/main/res/layout/activity_add_source.xml b/androidApp/src/main/res/layout/activity_add_source.xml index 586c208..7767d7a 100644 --- a/androidApp/src/main/res/layout/activity_add_source.xml +++ b/androidApp/src/main/res/layout/activity_add_source.xml @@ -14,7 +14,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - - - + /> diff --git a/androidApp/src/main/res/layout/activity_settings.xml b/androidApp/src/main/res/layout/activity_settings.xml index 8ed3044..b174329 100644 --- a/androidApp/src/main/res/layout/activity_settings.xml +++ b/androidApp/src/main/res/layout/activity_settings.xml @@ -1,4 +1,5 @@ - - @color/colorAccent @color/colorAccentDark @color/white - @style/Widget.MaterialDrawerHeaderStyle @style/PreferenceStyle - #282828 - #282828 + @color/dark + @color/dark + @style/ThemeOverlay.AppCompat.Dark diff --git a/androidApp/src/main/res/values/attrs.xml b/androidApp/src/main/res/values/attrs.xml index 65f8229..d37d5bb 100644 --- a/androidApp/src/main/res/values/attrs.xml +++ b/androidApp/src/main/res/values/attrs.xml @@ -3,5 +3,6 @@ + \ No newline at end of file diff --git a/androidApp/src/main/res/values/colors.xml b/androidApp/src/main/res/values/colors.xml index 128756a..1e45a00 100644 --- a/androidApp/src/main/res/values/colors.xml +++ b/androidApp/src/main/res/values/colors.xml @@ -11,4 +11,5 @@ @color/colorAccentDark @color/colorAccent @color/pink + #FF282828 diff --git a/androidApp/src/main/res/values/styles.xml b/androidApp/src/main/res/values/styles.xml index 28318cb..cb97140 100644 --- a/androidApp/src/main/res/values/styles.xml +++ b/androidApp/src/main/res/values/styles.xml @@ -10,14 +10,22 @@ @color/colorAccent @color/colorAccentDark @color/white - @style/Widget.MaterialDrawerHeaderStyle @style/PreferenceStyle ?attr/colorPrimary @color/white + @style/ThemeOverlay.AppCompat.Light + +