Simple-Clock icon indicating copy to clipboard operation
Simple-Clock copied to clipboard

[Feature request] timers widget

Open chr15m opened this issue 1 year ago • 11 comments

All in the subject. Would be great to be able to put timers on the home screen for fast access to start a countdown. Use case: 3 minute timer for brewing tea.

Thank you for your amazing work on this suite of apps!

chr15m avatar Dec 06 '22 01:12 chr15m

Hello, I am currently studying computer science at university and i like mobile app development. First of all congratulations for this very good project.

I want to contribute to this Timer Widget feature.

I did some test but the widget has a problem when I want to put an editTextNumber inside, here are some screenshots:

Screenshot_20230201_224748

Screenshot_20230201_225158

I know how to make a timer with 3 minutes in a widget with a button to activate and reset it, but I can't make a timer where the user chooses the time.

Can you tell me the procedure to follow to code a timer in a widget with which the user can choose the time he wants?

ZineeEddine avatar Feb 02 '23 00:02 ZineeEddine

Thank you for progressing this issue. It's possible to create the timers in Simple Clock already:

image

It would make sense to put a button or menu option to add one of these existing timers as a widget to the home screen. The other option would be when creating the widget to read Simple Clock's database of existing timers and allow the user to select one. That way you don't have to build a new UI to do it.

chr15m avatar Feb 02 '23 00:02 chr15m

thank you for your answer.

That's what I had considered but for user experience, I thought it would be better to configure the widget directly and not in the application.

It's ok I'll try, to do it from the application or with the database.

ZineeEddine avatar Feb 02 '23 07:02 ZineeEddine

I forked the project, I was working on an option when choosing in the EditTimerDialog :

I added a BUTTON_NEUTRAL, which is called "Add Widget" (to be translated into other languages), so that the user can choose whether to save the timer in the list of timers by pressing OK or in the widget by pressing ADD WIDGET.

I haven't committed to my new branch yet but I think this may be a good start for a new Timer Widget feature.

Here is a screens video to illustrate the example :

This is an example on a Samsung A70, the widget size will be smaller https://user-images.githubusercontent.com/92603736/216413163-2f679b24-e739-45ad-8799-588fcb72d852.mp4

add_wdgt

I reproduced the same design, it's better than two buttons with text that I had done. add_wdgt1

add_wdgt2

ZineeEddine avatar Feb 02 '23 18:02 ZineeEddine

@ZineeEddine :100: love it, hopefully your PR will get merged once you're ready.

chr15m avatar Feb 03 '23 03:02 chr15m

widgets should be added the casual way people are used to, such buttons shouldnt be at dialogs.

tibbi avatar Feb 03 '23 08:02 tibbi

@tibbi do you mean via e.g. home screen and then choose timers from the Clock db?

chr15m avatar Feb 03 '23 09:02 chr15m

sure, thats how it should be done

tibbi avatar Feb 03 '23 09:02 tibbi

@tibbi

can you give me more details please

do I have to include in the widget, a LISTVIEW with all the timers in the database?

does the user have to scroll the widget if he wants to choose a timer?

ZineeEddine avatar Feb 06 '23 10:02 ZineeEddine

no, lets show just 1 timer per widget, maybe show a timer picker at the config screen, where you are picking colors. Check Simple Notes, there is a note picker at the widget config screen, if you have multiple notes created. I imagine it could work the same way.

tibbi avatar Feb 06 '23 15:02 tibbi

Thanks for the details, I know the Simple Notes app.

I see, it’s best to work from the widget configuration and then have the result in the widget on the home screen.

I’ll see what I can do.I’ll try that option

ZineeEddine avatar Feb 13 '23 16:02 ZineeEddine