Bug report for time widget

I am using 2 android devices. A tablet with Android 9 with ODK Collect v1.27.2
I also have a phone with Android 6.0.1 with ODK Collect v1.27.1

When using ODK collect v1.27.2 and inputting time using this widget,

if I long press the minute part, I get a numeric keyboard that allows me to type in the minute. After I press ok, the minute part remains unchanged.

In ODK collect 1.27.1, this thing works as intended. In fact after you finish typing the hour part, the minute part gets focus.

In the latest version, after finishing the hour part, focus still remains on the hour part.

I also tested if things work differently if I used a different form. So I opened the demo form All widgets version 2019121101. I got the same results.

Interestingly, the time widget on my tablet contains a selector for AM/PM and the hour spinner maxes out at 12. Is it because the tablet is wider therefore it can afford the space needed to display the AM/PM part? On my phone, the AM/PM part is missing and you get a 24 hour spinner.

I hope this helps

1 Like

Hi @RaffyM
Thanks for this detailed report but I'm not able to reproduce anything wrong. I'm also pretty sure that there is no difference between v1.27.1 and v1.27.2 when it comes to the TimeWidget.
Are you sure you click ok on the keyboard first and then on the dialog?

I know it might be confusing because on some devices that keyboard button might not look like ok/accept:


but still you have to do that first.

Interestingly, the time widget on my tablet contains a selector for AM/PM and the hour spinner maxes out at 12. Is it because the tablet is wider therefore it can afford the space needed to display the AM/PM part? On my phone, the AM/PM part is missing and you get a 24 hour spinner.

It depends on your device settings if you use 24h format those AM?PM selectors won't be displayed.

@Grzesiek2010 I got it working for version 1.27.2

Open the time widget
Long press on hour or minute
Type in the value using the keypad
Press the Done/Next button on the keypad
Press on Ok button on the time widget

If I don't press the Done/Next button, the edited value will not be accepted. But in the previous version, the extra step by pressing Done/Next button is not required.

Is this unique to my device? It's a samsung tab 8 with android 9.

Please see video with link below. The time widget shows 5:23 PM. I wanted to change it to 5:35. You will see that the minute part is unchanged after I pressed the ok button.

And pardon the video, I'm holding my phone in one hand and using the tablet with the other.

https://drive.google.com/open?id=1ILzbHECKvIfcpQcQNyuRubcorT-X4_01

1 Like

@Grzesiek2010 The ok button on the time widget should be disabled when the value is edited using the keypad and enabled after pressing the Done/Next button. This was the cause of my confusion.

I see what you mean. It is a bit confusing and the behavior might differ between different android versions but it's not a regression in v1.27.2. I'll report the issue and we will try to improve this functionality.

1 Like

Hi again,
there is a ready pull reuqest https://github.com/getodk/collect/pull/3950. It will be added to v1.28 which should be released in August so then you can expect a new version with the fix.

1 Like

Thanks @Grzesiek2010! will look forward to this.