Mar 25, 2025 Replies: 5 This custom view is cross-platform, works for B4A, B4J and should work also for B4I. UPDATE: V. 2.00 09/15/2025 Added: ActAsCountDown. As the property name suggests, you can now use it as both a countdown timer and an elapsed time counter. It is a time counter or "elapsed time" (v. 2 - also countdown timer). You can: decide whether to display the milliseconds / hours numbers or not; change the colors; border and corners; pause and resume. UPDATE: V. 1.10 Added two properties and two methods to start counting with an initial value (methods) or to set the initial value (properties). You should thank @Sagenut for these new features. PROPERTIES: ActOnClick (*) BGColor - Background color BorderColor BorderWidth ElapsedTime ElapsedTimeString CounterByString V. 1.10 CounterByLong V. 1.10 CornerRadius FontSize LabelFont Paused ShowMilliseconds ShowHours METHODS: StartCounter StartCounterFromString V. 1.10 CounterFromLong V. 1.10 StopCounter PauseCounter ResumeCounter EVENTS: Click ElapsedTimeChanged StateChanged BTW, used for a (famous) little game created for testing (to test ChatGPT capabilities). Attachments lmElapsedTime_200.zip lmElapsedTime_200.zip 3.9 KB · Views: 322 Last edited: Sep 16, 2025 Click to expand...
This custom view is cross-platform, works for B4A, B4J and should work also for B4I. UPDATE: V. 2.00 09/15/2025 Added: ActAsCountDown. As the property name suggests, you can now use it as both a countdown timer and an elapsed time counter. It is a time counter or "elapsed time" (v. 2 - also countdown timer). You can: decide whether to display the milliseconds / hours numbers or not; change the colors; border and corners; pause and resume. UPDATE: V. 1.10 Added two properties and two methods to start counting with an initial value (methods) or to set the initial value (properties). You should thank @Sagenut for these new features. PROPERTIES: ActOnClick (*) BGColor - Background color BorderColor BorderWidth ElapsedTime ElapsedTimeString CounterByString V. 1.10 CounterByLong V. 1.10 CornerRadius FontSize LabelFont Paused ShowMilliseconds ShowHours METHODS: StartCounter StartCounterFromString V. 1.10 CounterFromLong V. 1.10 StopCounter PauseCounter ResumeCounter EVENTS: Click ElapsedTimeChanged StateChanged BTW, used for a (famous) little game created for testing (to test ChatGPT capabilities).
LucaMs Expert Licensed User Longtime User Apr 1, 2025 #3 Updated to version 1.10. A member wanted to save the time elapsed and restart from it: https://www.b4x.com/android/forum/threads/restart-the-stopwatch.166391/post-1020330 See the first post. Last edited: Apr 2, 2025
Updated to version 1.10. A member wanted to save the time elapsed and restart from it: https://www.b4x.com/android/forum/threads/restart-the-stopwatch.166391/post-1020330 See the first post.
LucaMs Expert Licensed User Longtime User Sep 15, 2025 #4 What do you think, it would be helpful if it also acted as a countdown timer, right? I added the property: ActAsCountdown (and the functionality, of course), but I haven't posted this version yet, I'm waiting for at least 3 "Like"(s) Last edited: Sep 15, 2025
What do you think, it would be helpful if it also acted as a countdown timer, right? I added the property: ActAsCountdown (and the functionality, of course), but I haven't posted this version yet, I'm waiting for at least 3 "Like"(s)
LucaMs Expert Licensed User Longtime User Sep 15, 2025 #5 LucaMs said: I added the property: ActAsCountdown (and the functionality, of course), but I haven't posted this version yet, I'm waiting for at least 3 "Like"(s) Click to expand... I was about to write: "The third "Like" didn't arrive, after @Erel and @micro's, so... catch the new version of the library, anyway" but then @Claudio Oliveira's "Like" arrived, so... get it anyway! Updated: v. 2.0.0 (Please, see the first post)
LucaMs said: I added the property: ActAsCountdown (and the functionality, of course), but I haven't posted this version yet, I'm waiting for at least 3 "Like"(s) Click to expand... I was about to write: "The third "Like" didn't arrive, after @Erel and @micro's, so... catch the new version of the library, anyway" but then @Claudio Oliveira's "Like" arrived, so... get it anyway! Updated: v. 2.0.0 (Please, see the first post)