From bb415d2d3d6b5ecb22304f20e6b2f4f531ce5b68 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Mon, 1 Dec 2014 11:57:17 -0500 Subject: [PATCH] Slight change to the format of the Divine Name --- .../service/format/osisparser/VerseContent.kt | 12 +----------- .../format/osisparser/handler/DivineHandler.kt | 2 +- .../service/format/osisparser/handler/TagHandler.kt | 2 -- .../format/osisparser/handler/VerseHandler.kt | 2 +- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/VerseContent.kt b/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/VerseContent.kt index ebaca59..b571e34 100644 --- a/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/VerseContent.kt +++ b/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/VerseContent.kt @@ -3,7 +3,6 @@ */ package org.bspeice.minimalbible.service.format.osisparser -import com.google.gson.Gson import org.crosswire.jsword.passage.Verse import java.util.ArrayList @@ -15,13 +14,4 @@ data class VerseContent(val v: Verse, val verseNum: Int = v.getVerse(), val chapterTitle: String = "", val paraTitle: String = "", - val references: MutableList = ArrayList(), - val content: String = "") { - - // Gson is used mostly for serializing the verses - public val json: String - get() = Gson().toJson(this) - - public fun appendContent(content: String): VerseContent = - this.copy(this.v, content = this.content + content) -} \ No newline at end of file + val references: MutableList = ArrayList()) {} \ No newline at end of file diff --git a/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/DivineHandler.kt b/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/DivineHandler.kt index 835ece3..10eb62a 100644 --- a/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/DivineHandler.kt +++ b/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/DivineHandler.kt @@ -14,6 +14,6 @@ class DivineHandler() : TagHandler { fun buildDivineName(chars: String) = listOf(AppendArgs(chars take 1, null), - AppendArgs(chars drop 1, RelativeSizeSpan(.9f)) + AppendArgs((chars drop 1).toUpperCase(), RelativeSizeSpan(.8f)) ) } \ No newline at end of file diff --git a/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/TagHandler.kt b/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/TagHandler.kt index 09b86eb..08d7f94 100644 --- a/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/TagHandler.kt +++ b/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/TagHandler.kt @@ -10,8 +10,6 @@ import android.text.style.CharacterStyle trait TagHandler { fun render(builder: SpannableStringBuilder, info: VerseContent, chars: String) - - } data class AppendArgs(val text: String, val span: Any?) { diff --git a/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/VerseHandler.kt b/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/VerseHandler.kt index 8460f7e..4e5994b 100644 --- a/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/VerseHandler.kt +++ b/app/src/main/kotlin/org/bspeice/minimalbible/service/format/osisparser/handler/VerseHandler.kt @@ -22,7 +22,7 @@ class VerseHandler() : TagHandler { fun buildVerseHeader(chapter: Int, verseNum: Int, verseStart: Boolean): AppendArgs = when { !verseStart -> AppendArgs("", null) - verseNum == 1 -> AppendArgs("$chapter", StyleSpan(Typeface.BOLD)) + verseNum == 1 -> AppendArgs("$chapter ", StyleSpan(Typeface.BOLD)) else -> AppendArgs("${verseNum}", listOf(SuperscriptSpan(), RelativeSizeSpan(.75f))) } } \ No newline at end of file