-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a widget for all Notes #15
Comments
Thank you :) What do you expect from a widget? |
I'm currently using this app (https://play.google.com/store/apps/details?id=org.dmfs.tasks) as a Notes widget that syncs with the Tasks app through CalDav/CARDav. It's nice, but too much information inside the app beacuse it's a tasks app, and Notes isn't Tasks. So what I'm looking for is very simple, and maybe a combination of @jancborchardt suggestion and the tasks widget I'm using right now. Something like this: Swipe right to delete (or show a trashcan icon) |
I would say both widgets have their place, although I think widgets which just replicate apps are rarely useful. I’d definitely say the single note widget to be able to very quickly note down stuff inline (without needing to jump into the app!) is essential. Try and install JOT as I mentioned in #5. |
If you could make it as simple and efficient as the Twidere "Write" widget it would be perfect... |
sounds good, but this would be a third widget:
|
Displaying a list of all notes and creating a new note could be the same widget. The list would just have a first list item which says "+ Create new note" :) |
3 widgets would be perfect !
|
I have hacked together a widget for number 3 and I'm currently working on number 2. Shall I make a pull request for the create note widget? |
@dan0xii awesome! Yes please submit pull requests for all the widgets. :) "Create new note" could actually be part of the all notes widget, in the header as + button. A widget for a single note would still be most awesome. |
Yes, a Pull Request would be awesome! :) Thanks a lot! |
Addition of "Create Note" widget as referenced in nextcloud#15.
Addition of "Create Note" widget as referenced in #15.
I'm working on the single note widget and I'm after a bit of advice. I can't get the RxMarkdown view to display within a widget and I think it's because you can't use custom views as per: https://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout I thought it would work as RxMarkdown extends TextView. Does anyone have any experience before I move on to a standard widget with TextView(s)? |
Well, in general it should work as you described. but it would ne a nice first step to display the markdown (without actual manipulating the font size etc.) |
I've made a PR for the work I've done so far on the single note widget. It's worked well on my phone over the past couple of days but could do with some thorough testing. It still has some TODOs:
|
Great work. I will review as soon as possible. I already had a look at your scree shot, and maybe we should remove the blue border and give the background an opacity of 0.9? |
Sure, I'll upload another screenshot when I get a chance. I'm working on making it scrollable as well. |
Much better! We can increase the margin slightly, but for now its good enough to merge it. Its a good first step :) |
Do I close the current PR and open a new one with the changes? I've also added tap to edit so will incorporate that. |
Feel free to organize the PRs as you need it and ping me again when i can review the changes (and @korelstar though i know he is not much interessted in widgets) |
Hello @stefan-niedermann, I think PR #239 is now ready for review (cc @korelstar). I've bumped up the margin, updated the widget configuration screen theme slightly for devices running >= API 23 and tapping the widget now goes to edit the note. The problem I'm having with the last one is similar to the issue outlined in #161. When I have a note on the home screen and I edit it in the webapp (or anywhere else) there is an interval before onUpdate() is called where I can edit an old version of the note. I tried two ways to solve it:
Input appreciated. @jancborchardt, I'm happy to create a dark version but will need time to update the widget configuration screen. If there is an overall consensus that a dark version would look better I'll set it by default for now. I prefer the light version of my devices. (So that's 1-1 :)). |
Addition of "Create Note" widget as referenced in nextcloud#15.
|
Could we not make a standard BaseNoteListView activity and extend that to SelectSingleNote and NoteListView. The latter having the addition of Navigation Drawer, swipe actions, favourites etc.
The INIT preference is there because when the widget is dropped onto the homescreen and the configuration activity is shown the appwidget onUpdate() is fired before the user has finished. I don't know why but I found the following link which describes the problem: https://issuetracker.google.com/issues/36924475#c0 |
Sounds not bad. Another option might be to seperate the list into an own fragment that could be used in NoteListView (which would then be an activity containing the fragment and a drawer) and SelectSingleNote (basically an empty actuvity containing only the fragment)? |
TL;DR composition instead of inheritance |
I vote for (re-)using fragments for the list (as suggested by @stefan-niedermann), too.
I understand the issue. However, I still don't understand why we need the INIT preference, since at the same time, the noteId is assigned to the widgetKey preference. So why not test if this one is set (i.e. larger than 1). Currently, you test this twice: firstly |
I see what you're saying and yes, I think it's pointless. I've updated my master branch and it works fine. Do you want me to PR? |
Yes, a PR would be nice :-)
|
What are everyone's thoughts on this layout for an all notes/note list widget? It's pretty raw at the moment so I'm after feedback before I put a load of work into it. I'm intending to:
|
@dan0xii nice, sounds good! Only design enhancement I'd do is put a little notes icon left of the "Notes" heading, and then also put the favorite stars left of the note titles. (This is also where we will move it on the web interface.) |
I like that too, but I won't show the favorite star at all in this widget. I don't see any use case for this, here. Keep it simple ;-)
|
Nice!
|
This widget looks great! Agree to all points of @jancborchardt here. The icon looks fine without a border. If you switch apps in android, then the preview is displaying the icon in the activity the same way :) |
Nice! Just 3 details again:
|
So this is in? Awesome @dan0xii! :) |
In the next version (will be released in the next view days) Minor improvements can get suggested in seperate issues :) |
I don't think this should be closed because the "all notes" widget isn't done yet. I'm testing it here: widget_note_list but it's still not finished. |
whoops, thought this issue was the single note widget |
I think I have a working version of the note list widget, see PR #273. I tend to agree with korelstar having used it for the past few weeks, that it may not be worth showing the star or, at least, to align the notes that aren't starred with the left hand side of the widget. When you have a list of notes that aren't starred you just have a white gap on the left with the current implementation. |
Hey @stefan-niedermann, cool app.
Would be awesome if you could enhance this app with a widget. Then I would start using it as my new standard app for Notes. :)
The text was updated successfully, but these errors were encountered: