Add per-widget list selector with chevron dropdown#15
Merged
Conversation
- Add chevron icon to widget header; tapping it opens a dialog picker showing all available lists - Selection is persisted per widget instance in SharedPreferences (key: "selected_list_<widgetId>" in "widget_prefs") - Falls back to the latest list when no selection is saved or the saved list has been deleted; clears stale prefs automatically - Cleans up prefs when a widget instance is removed (onDeleted) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SharedPreferences(widget_prefsfile, keyselected_list_<widgetId>) — survives rebootsonDeleted)New files
WidgetPrefs.kt— SharedPreferences helperWidgetListSelectActivity.kt— dialog Activity for the list pickerwidget_chevron_down.xml— Lucide-style chevron drawableModified files
WidgetDbHelper.kt— addedgetAllLists(),getListById(),resolveList()NoteListWidget.kt— usesresolveList, wires chevron PendingIntent, handlesonDeletedNoteListWidgetService.kt/NoteListRemoteViewsFactory.kt— passwidgetIdinstead oflistIdto factorywidget_note_list.xml— header row now has title + chevron ImageViewAndroidManifest.xml+styles.xml— register new Activity with dialog theme🤖 Generated with Claude Code