From 9ba6feef0b41a9723c3970111feee3968c45806f Mon Sep 17 00:00:00 2001 From: Amine Date: Tue, 27 Nov 2018 21:44:34 +0100 Subject: [PATCH] Removed density calculation to solve #248. --- .../bou/readerforselfoss/fragments/ArticleFragment.kt | 7 +++---- app/src/main/res/xml/pref_viewer.xml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/fragments/ArticleFragment.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/fragments/ArticleFragment.kt index 43f2ed1..24e1574 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/fragments/ArticleFragment.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/fragments/ArticleFragment.kt @@ -41,7 +41,6 @@ import apps.amine.bou.readerforselfoss.utils.openItemUrl import apps.amine.bou.readerforselfoss.utils.shareLink import apps.amine.bou.readerforselfoss.utils.sourceAndDateText import apps.amine.bou.readerforselfoss.utils.succeeded -import apps.amine.bou.readerforselfoss.utils.toPx import com.bumptech.glide.Glide import com.bumptech.glide.request.RequestOptions import com.github.rubensousa.floatingtoolbar.FloatingToolbar @@ -56,7 +55,7 @@ import kotlin.concurrent.thread class ArticleFragment : Fragment() { private lateinit var pageNumber: Number - private var fontSize: Int = 14 + private var fontSize: Int = 16 private lateinit var allItems: ArrayList private var mCustomTabActivityHelper: CustomTabActivityHelper? = null; private lateinit var url: String @@ -110,7 +109,7 @@ class ArticleFragment : Fragment() { val prefs = PreferenceManager.getDefaultSharedPreferences(activity) editor = prefs.edit() - fontSize = prefs.getString("reader_font_size", "14").toInt() + fontSize = prefs.getString("reader_font_size", "16").toInt() val settings = activity!!.getSharedPreferences(Config.settingsName, Context.MODE_PRIVATE) val debugReadingItems = prefs.getBoolean("read_debug", false) @@ -427,7 +426,7 @@ class ArticleFragment : Fragment() { | color: $stringTextColor; | } | * { - | font-size: ${fontSize.toPx}px; + | font-size: ${fontSize}px; | text-align: justify; | word-break: break-word; | overflow:hidden; diff --git a/app/src/main/res/xml/pref_viewer.xml b/app/src/main/res/xml/pref_viewer.xml index 0f78516..8fdc6c0 100644 --- a/app/src/main/res/xml/pref_viewer.xml +++ b/app/src/main/res/xml/pref_viewer.xml @@ -7,7 +7,7 @@ android:title="@string/pref_switch_actions_pager_scroll" />