Skip to content

Commit

Permalink
Add support project -link to stable notice. Related: #2854
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Sep 15, 2023
1 parent 1eb03c6 commit 8a0a381
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ import android.media.AudioManager
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.text.SpannableString
import android.text.TextUtils
import android.text.method.LinkMovementMethod
import android.text.style.ImageSpan
import android.util.Log
import android.util.TypedValue
import android.view.ContextMenu
Expand Down Expand Up @@ -78,7 +81,6 @@ import net.bible.android.control.event.window.CurrentWindowChangedEvent
import net.bible.android.control.event.window.NumberOfWindowsChangedEvent
import net.bible.android.control.link.LinkControl
import net.bible.android.control.navigation.NavigationControl
import net.bible.android.control.page.DocumentCategory
import net.bible.android.control.page.OrdinalRange
import net.bible.android.control.page.PageControl
import net.bible.android.control.page.window.WindowControl
Expand Down Expand Up @@ -459,10 +461,13 @@ class MainBibleActivity : CustomTitlebarActivityBase() {
val videoMessageLink = "<a href=\"$newFeaturesIntroVideo\"><b>$videoMessage</b></a>"
val appName = getString(R.string.app_name_long)
val par1 = getString(R.string.stable_notice_par1, CommonUtils.mainVersion, appName)

val htmlMessage = "$par1<br><br>$videoMessageLink"

val spanned = htmlToSpan(htmlMessage)
val support = getString(R.string.buy_development2)
val heartIcon = ImageSpan(CommonUtils.getTintedDrawable(R.drawable.baseline_attach_money_24))
val buyMessage = "&nbsp;<a href=\"$buyDevelopmentLink\">$support</a>"
val htmlMessage = "$par1<br><br>$videoMessageLink<br><br>"
val iconStr = SpannableString("*")
iconStr.setSpan(heartIcon, 0, 1, SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE)
val spanned = TextUtils.concat(htmlToSpan(htmlMessage), iconStr, htmlToSpan(buyMessage))

val d = AlertDialog.Builder(this)
.setTitle(getString(R.string.stable_notice_title))
Expand Down

0 comments on commit 8a0a381

Please sign in to comment.