Skip to content

Commit c99f0e0

Browse files
Merge pull request #39 from coderamm/feature/betterExport
Improving text formatting when sharing text to other apps
2 parents b4a03a4 + 4b892fc commit c99f0e0

File tree

2 files changed

+16
-27
lines changed

2 files changed

+16
-27
lines changed

.idea/deploymentTargetSelector.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/src/main/java/com/wirelessalien/android/bhagavadgita/activity/VerseDetailActivity.kt

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -640,23 +640,22 @@ class VerseDetailActivity : AppCompatActivity() {
640640

641641
// Combine all the text content into one string
642642
val textToShare = """
643-
Verse Title: $verseTitle
644-
Verse Content: $verseContent
645-
Verse Transliteration: $verseTransliteration
646-
Verse Word Meanings: $verseWordMeanings
647-
648-
Translations:
649-
$translationText
650-
651-
Commentary:
652-
$commentaryText
653-
""".trimIndent()
654-
655-
// Add your desired line of text at the end
656-
val additionalText =
657-
"Shared from - Bhagavad Gita App(https://github.com/WirelessAlien/BhagavadGitaApp)"
658-
659-
return "$textToShare\n$additionalText"
643+
|Verse Title: $verseTitle
644+
645+
|Verse Content:
646+
|$verseContent
647+
|Verse Transliteration:
648+
|$verseTransliteration
649+
|Verse Word Meanings:
650+
|$verseWordMeanings
651+
|Translations:
652+
|$translationText
653+
|Commentary:
654+
|$commentaryText
655+
|Shared from - Bhagavad Gita App (https://github.com/WirelessAlien/BhagavadGitaApp)
656+
""".trimMargin()
657+
658+
return "$textToShare"
660659
}
661660

662661
private fun copyText() {

0 commit comments

Comments
 (0)