Slight change to the format of the Divine Name

This commit is contained in:
Bradlee Speice 2014-12-01 11:57:17 -05:00
parent caf2227555
commit bb415d2d3d
4 changed files with 3 additions and 15 deletions

View File

@ -3,7 +3,6 @@
*/ */
package org.bspeice.minimalbible.service.format.osisparser package org.bspeice.minimalbible.service.format.osisparser
import com.google.gson.Gson
import org.crosswire.jsword.passage.Verse import org.crosswire.jsword.passage.Verse
import java.util.ArrayList import java.util.ArrayList
@ -15,13 +14,4 @@ data class VerseContent(val v: Verse,
val verseNum: Int = v.getVerse(), val verseNum: Int = v.getVerse(),
val chapterTitle: String = "", val chapterTitle: String = "",
val paraTitle: String = "", val paraTitle: String = "",
val references: MutableList<VerseReference> = ArrayList(), val references: MutableList<VerseReference> = 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)
}

View File

@ -14,6 +14,6 @@ class DivineHandler() : TagHandler {
fun buildDivineName(chars: String) = fun buildDivineName(chars: String) =
listOf(AppendArgs(chars take 1, null), listOf(AppendArgs(chars take 1, null),
AppendArgs(chars drop 1, RelativeSizeSpan(.9f)) AppendArgs((chars drop 1).toUpperCase(), RelativeSizeSpan(.8f))
) )
} }

View File

@ -10,8 +10,6 @@ import android.text.style.CharacterStyle
trait TagHandler { trait TagHandler {
fun render(builder: SpannableStringBuilder, info: VerseContent, chars: String) fun render(builder: SpannableStringBuilder, info: VerseContent, chars: String)
} }
data class AppendArgs(val text: String, val span: Any?) { data class AppendArgs(val text: String, val span: Any?) {