commit 2c8a80696f211e8c5bee192c3cb1f6523eaa05a2 equwal <13551856+equwal@users.noreply.github.com> 2026-09-26 14:03:46 -0700 Add a More apps section with links to the other apps The end of the settings screen shows the other sites and apps of the author. A tap on an entry opens its page in the browser. The Google Play build (-PplayStore=true) does not show the section. It does not show the Ko-fi link either. Add a More projects section to the README.
README.md | 23 +++++++++++++++ .../main/kotlin/space/subread/anki/MainActivity.kt | 21 +++++++++++++ app/src/main/kotlin/space/subread/anki/MoreApps.kt | 34 ++++++++++++++++++++++ app/src/main/res/values/strings.xml | 30 +++++++++++++++++++ 4 files changed, 108 insertions(+)
diff --git a/README.md b/README.md index dafa6b4..d6831be 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,29 @@ The card goes to AnkiDroid on the same device. The app has no network permission The release build signs with the key in `SUBREAD_KEYSTORE_FILE` and `SUBREAD_KEYSTORE_PASSWORD`. `-PplayStore=true` leaves the Ko-fi link out. +## More projects + +- [SubRead](https://subread.space/): read along with an audiobook, in the browser. + Also [for Android](https://github.com/equwal/subread-android/releases/latest), + [for YouTube](https://github.com/equwal/subread-extension/releases/latest) + and [for KOReader](https://github.com/equwal/subread.koplugin). +- [SubRead Overlay](https://github.com/equwal/subread-overlay/releases/latest): subtitle lines over any Android media player. +- [SubRead Dictionary](https://github.com/equwal/subread-dictionary/releases/latest): a pop-up dictionary for Android that reads Yomitan dictionaries. +- [Subrep](https://github.com/equwal/subrep-android/releases/latest): live captions of the sound of your phone. +- [Book Simulator](https://booksimulator.com/): a reading room for Aozora Bunko and Project Gutenberg books. +- [honjimaku.com](https://honjimaku.com/): subtitles for Japanese audiobooks. +- [sbm Sync](https://sbmsync.com/): your bookmarks, the same on every device, + with [sbm](https://github.com/equwal/sbm) for dmenu, + [sbm for Android](https://github.com/equwal/sbm-android/releases/latest) + and the [sbm add-on](https://github.com/equwal/sbm-extension/releases/latest) for Firefox and Chrome. +- [Rebind](https://github.com/equwal/rebind/releases): remap the hardware buttons of e-ink readers and Android, + with [Ink Recents](https://github.com/equwal/ink-recents/releases/latest), + [Ink Dim](https://github.com/equwal/ink-dim/releases/latest) + and [Ink Update](https://github.com/equwal/ink-update/releases/latest). +- [dickt.store](https://dickt.store/): language-learning tools, flashcards and web toys. +- [hentaibun.online](https://hentaibun.online/): learn kanbun and kobun. +- [Recently Written](https://recentlywritten.com/): the blog, and a list of [all projects](https://recentlywritten.com/projects.html). + ## License AGPL-3.0-only. The AnkiDroid content provider contract (the authority, the paths and the diff --git a/app/src/main/kotlin/space/subread/anki/MainActivity.kt b/app/src/main/kotlin/space/subread/anki/MainActivity.kt index edd55b8..6c649d7 100644 --- a/app/src/main/kotlin/space/subread/anki/MainActivity.kt +++ b/app/src/main/kotlin/space/subread/anki/MainActivity.kt @@ -10,6 +10,9 @@ import android.graphics.Typeface import android.os.Bundle import android.provider.Settings import android.text.InputType +import android.text.SpannableString +import android.text.Spanned +import android.text.style.UnderlineSpan import android.view.Gravity import android.view.View import android.widget.AdapterView @@ -154,6 +157,24 @@ class MainActivity : Activity() { content.addView(button(getString(R.string.install_dictionary)) { open(Dictionary.INSTALL) }, wide()) } if (BuildConfig.DONATE_LINK) content.addView(button(getString(R.string.donate)) { open(KOFI) }, wide()) + // The Google Play build (-PplayStore=true) has no Ko-fi link, and no More apps either. + if (BuildConfig.DONATE_LINK) moreApps() + } + + /** The other sites and apps of the same author. A tap on an entry opens its page in the browser. */ + private fun moreApps() { + step(R.string.more_apps, "", null) {} + for (app in MORE_APPS) { + val name = getString(app.name) + content.addView(TextView(this).apply { + text = SpannableString("$name\n${getString(app.line)}").apply { + setSpan(UnderlineSpan(), 0, name.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) + } + textSize = 15f + setTextColor(Color.BLACK) + setOnClickListener { open(app.url) } + }, wide(top = 12)) + } } /** One row per field of the note type: the name, and what goes into it. */ diff --git a/app/src/main/kotlin/space/subread/anki/MoreApps.kt b/app/src/main/kotlin/space/subread/anki/MoreApps.kt new file mode 100644 index 0000000..3a33fd8 --- /dev/null +++ b/app/src/main/kotlin/space/subread/anki/MoreApps.kt @@ -0,0 +1,34 @@ +package space.subread.anki + +import androidx.annotation.StringRes + +/** One link of the "More apps" section: a name, one line about it, and the page that a tap opens. */ +class MoreApp(@param:StringRes val name: Int, @param:StringRes val line: Int, val url: String) + +/** + * The other sites and apps of the same author, in the order of the catalog: the sites, + * then the Android apps, then the list of all projects. SubRead Anki is not in it. + */ +val MORE_APPS = listOf( + MoreApp(R.string.more_subread, R.string.more_subread_line, "https://subread.space/"), + MoreApp(R.string.more_book_simulator, R.string.more_book_simulator_line, "https://booksimulator.com/"), + MoreApp(R.string.more_honjimaku, R.string.more_honjimaku_line, "https://honjimaku.com/"), + MoreApp(R.string.more_sbm_sync, R.string.more_sbm_sync_line, "https://sbmsync.com/"), + MoreApp(R.string.more_subread_android, R.string.more_subread_android_line, + "https://github.com/equwal/subread-android/releases/latest"), + MoreApp(R.string.more_subread_overlay, R.string.more_subread_overlay_line, + "https://github.com/equwal/subread-overlay/releases/latest"), + MoreApp(R.string.more_subread_dictionary, R.string.more_subread_dictionary_line, + "https://github.com/equwal/subread-dictionary/releases/latest"), + MoreApp(R.string.more_subrep, R.string.more_subrep_line, + "https://github.com/equwal/subrep-android/releases/latest"), + MoreApp(R.string.more_sbm_android, R.string.more_sbm_android_line, + "https://github.com/equwal/sbm-android/releases/latest"), + MoreApp(R.string.more_rebind, R.string.more_rebind_line, "https://github.com/equwal/rebind/releases"), + MoreApp(R.string.more_ink_recents, R.string.more_ink_recents_line, + "https://github.com/equwal/ink-recents/releases/latest"), + MoreApp(R.string.more_ink_dim, R.string.more_ink_dim_line, "https://github.com/equwal/ink-dim/releases/latest"), + MoreApp(R.string.more_ink_update, R.string.more_ink_update_line, + "https://github.com/equwal/ink-update/releases/latest"), + MoreApp(R.string.more_all_projects, R.string.more_all_projects_line, "https://recentlywritten.com/projects.html"), +) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index da66f7e..d7ecaa5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -92,4 +92,34 @@ <string name="error_empty">Every field of the note is empty. Check the fields in the settings.</string> <string name="error_note">AnkiDroid did not take the note.</string> <string name="error_media">AnkiDroid did not take the file %1$s.</string> + + <string name="more_apps">More apps</string> + <string name="more_subread">SubRead</string> + <string name="more_subread_line">Read along with an audiobook.</string> + <string name="more_book_simulator">Book Simulator</string> + <string name="more_book_simulator_line">A reading room for Aozora Bunko and Project Gutenberg books.</string> + <string name="more_honjimaku">honjimaku.com</string> + <string name="more_honjimaku_line">Subtitles for Japanese audiobooks.</string> + <string name="more_sbm_sync">sbm Sync</string> + <string name="more_sbm_sync_line">Your bookmarks, the same on every device.</string> + <string name="more_subread_android">SubRead for Android</string> + <string name="more_subread_android_line">Times an audiobook against its ebook on the device.</string> + <string name="more_subread_overlay">SubRead Overlay</string> + <string name="more_subread_overlay_line">Subtitle lines over any Android media player.</string> + <string name="more_subread_dictionary">SubRead Dictionary</string> + <string name="more_subread_dictionary_line">Pop-up dictionary that reads Yomitan dictionaries.</string> + <string name="more_subrep">Subrep</string> + <string name="more_subrep_line">Live captions of the sound of your phone.</string> + <string name="more_sbm_android">sbm for Android</string> + <string name="more_sbm_android_line">Fuzzy search for your bookmarks.</string> + <string name="more_rebind">Rebind</string> + <string name="more_rebind_line">Remap the hardware buttons of e-ink readers and Android.</string> + <string name="more_ink_recents">Ink Recents</string> + <string name="more_ink_recents_line">A recent-apps switcher for e-ink.</string> + <string name="more_ink_dim">Ink Dim</string> + <string name="more_ink_dim_line">Frontlight below the lowest system level.</string> + <string name="more_ink_update">Ink Update</string> + <string name="more_ink_update_line">Tells you when Rebind and its extensions update.</string> + <string name="more_all_projects">All projects</string> + <string name="more_all_projects_line">Everything, with source code.</string> </resources>