"Markers" is the unified system for bookmarks, notes, and highlights. All three share the same Marker database table, distinguished by a kind column. Markers can be organized with labels (categories) and synced across devices.
Alkitab/src/main/java/yuku/alkitab/base/ac/MarkerListActivity.kt— Filtered list of markers with search and sortingAlkitab/src/main/java/yuku/alkitab/base/ac/MarkersActivity.java— Label management (create, rename, delete, reorder viaItemTouchHelperdrag)Alkitab/src/main/java/yuku/alkitab/base/ac/NoteActivity.java— Note editor with verse link detectionAlkitab/src/main/java/yuku/alkitab/base/util/Highlights.kt— JSON-based highlight encodingAlkitab/src/main/java/yuku/alkitab/base/widget/AttributeView.java— Icon drawing for bookmark/note/highlight indicatorsAlkitab/src/main/java/yuku/alkitab/base/verses/VersesAttributes.kt— Per-verse attribute mapsAlkitab/src/main/java/yuku/alkitab/base/verses/VerseAttributeLoader.kt— Loads attributes from DB and content providersAlkitab/src/main/java/yuku/alkitab/base/storage/MarkerDao.kt/LabelDao.kt/Marker_LabelDao.kt— Facade DAOs that route through RoomAlkitab/src/main/java/yuku/alkitab/base/storage/room/MarkerEntity.kt/LabelEntity.kt/MarkerLabelEntity.kt(+ matching*RoomDao.kt) — Room entities/DAOs
Marker {
_id: long — local database ID
gid: String — globally unique ID for sync
ari: int — verse reference (ARI encoding)
kind: int — 0=bookmark, 1=note, 2=highlight
caption: String — display text (bookmark title / note content / highlight color info)
verseCount: int — number of verses covered
createTime: Date
modifyTime: Date
}
Storage: the marker, label, and marker_label tables live in the Room database AlkitabRoomDb (AppDatabase at @Database(version = 2)). The MarkerDao / LabelDao / Marker_LabelDao facades expose a Marker / Label / Marker_Label model surface for callers and map to/from Room entities internally.
Labels are user-created categories for organizing bookmarks. Each label has a title, ordering, and backgroundColor. The marker_label junction table creates many-to-many relationships. Labels also have GIDs for sync.
Highlights use a JSON encoding in the caption field supporting:
- Full-verse highlights (solid color)
- Partial highlights (character range within a verse)
- Hash-based verification to detect when verse text has changed
The Highlights utility handles encoding/decoding and color management. Highlights.alphaMix() masks the input to 24-bit RGB before OR-ing the fixed alpha, so callers may pass either RGB or pre-tinted ARGB ints and the output alpha is always 0xA0.
Color selection in TypeHighlightDialog and the label color editor uses the iOS-style Compose color picker at yuku.alkitab.base.compose.colorpicker.IosColorPicker / ColorPickerDialog, hosted inside a ModalBottomSheet.
VerseAttributeLoader aggregates bookmark count, note count, highlight color, progress mark presence, and map availability for each verse in a chapter. These are displayed as small icons in AttributeView next to each verse.
MarkerListActivity supports sorting by:
createTime— when the marker was first createdmodifyTime— when last editedari— Bible order (by verse reference)caption— alphabetical by content
NoteActivity uses DesktopVerseFinder from the ImportedDesktopVerseUtil module to detect verse references in note text and convert them to clickable links that navigate to the referenced verse.