[F/OS] 🍫 LinearProgressbar - Animated Linear Bar!

:computer: Introduction

A non-visible extension that indicates the progress of an operation using an animated linear bar.

:date: Release date: 2022-04-19T04:30:00Z

:clock12: Version: 2

:package: Package name: com.gordonlu.linearprogressbar

:hammer_and_wrench: Built with: Niotron IDE

Some things to note:

  • the Theme of Screen1 must not be Classic.

  • you cannot use a linear progress bar ID that you have previously used in the same screen.

:open_book: Documentation

Event blocks

ProgressChanged

image

This event is fired when the progress of a linear progress bar has changed. The progress parameter returns the current progress value. If you have enabled Inderterminate for this progress bar, 'progress' will be 0.

Parameters: container = component, id = number (int), progress = number (int)

Method blocks

CreateLinearProgressbar

image

Creates a linear progress bar in the given container. If indeterminate is true, an infinite loading animation will be shown on the progress bar.

Parameters: container = component, id = number (int), color = color, indeterminate = boolean

CreateUsableId

image

Creates a usable ID that you can use to create a new progress bar. Each progress bars in every screen should have a unique ID. You should save this in a global variable for later use and to avoid conflicts.

Returns: number (int)

Parameters: container = component

GetMaximum

image

Returns the upper range of the progress bar.

Returns: number (int)

Parameters: container = component, id = number (int)

GetMinimum

image

Returns the lower range of the progress bar. Only works in devices with Android >= 8.

Returns: number (int)

Parameters: container = component, id = number (int)

GetProgress

image

Get the progress bar's current level of progress. Return 0 when the progress bar is in indeterminate mode.

Returns: number (int)

Parameters: container = component, id = number (int)

IncrementProgressBy

image

Increases the progress bar's progress by the specified amount.

Parameters: container = component, id = number (int), value = number (int)

IsIndeterminate

image

Checks whether the progress bar is indeterminate or not.

Returns: boolean

Parameters: container = component, id = number (int)

SetIndeterminate

image

Change the indeterminate mode for this progress bar. In indeterminate mode, the progress is ignored and the progress bar shows an infinite animation instead.

Parameters: container = component, id = number (int), indeterminate = boolean

SetIndeterminateColor

image

Changes the indeterminate color of the progress bar.

Parameters: container = component, id = number (int), color = color

SetMaximum

image

Sets the upper range of the progress bar.

Parameters: container = component, id = number (int), max = number (int)

SetMinimum

image

Sets the lower range of the progress bar. Only works in devices with Android >= 8.

Parameters: container = component, id = number (int), min = number (int)

SetPadding

image

Sets the padding for the progress bar.

Parameters: container = component, id = number (int), left = number (int), top = number (int), right = number (int), bottom = number (int)

SetProgress

image

Sets the current progress to the specified value. Does not do anything if the progress bar is in indeterminate mode.

Parameters: container = component, id = number (int), progress = number (int)

SetProgressColor

image

Changes the progress color of the progress bar.

Parameters: container = component, id = number (int), color = color

:books: FAQ

Q1: What is the difference between progress color and indeterminate color?

A1: You set the color of the progress bar with SetIndeterminateColor if your progress bar is indeterminate. Else use SetProgressColor.


Q2: What is a container?

A2: A container is used to contain your progress bar. The height and the width of the progress bar will be adjusted to the dimensions of the container. The container should only contain the progress bar, as if you put other components in the container, the progress bar will overlap them.

The container can be a horizontal or vertical arrangement, but not a scroll arrangement.


Q3: Sample blocks?

A3: Sure, here.

blocks (2)


:inbox_tray: Downloads

AIX: com.gordonlu.linearprogressbar.aix (10.7 KB)

:scroll: History

Version 1, April 19 2022

AIX:
com.gordonlu.linearprogressbar.aix (9.7 KB)


Made with Niotron IDE.

Kindly :email: PM me if you have any questions! Also, if you like my extension, please :heart: like it! It takes some effort for me to make it...

Likes tell me the general user feedback of my extension. If you read this extension, please take 20 seconds to drop by and give a like!

If you have any features that you want to add and you know the code, PM me or directly reply below using the image button.

If you find any :beetle: bugs, please reply below.


Gordon Lu

:speech_balloon: Message :earth_africa: Website

8 Likes

Version 2!

  • More blocks:

CreateUsableId

image

Creates a usable ID that you can use to create a new progress bar. Each progress bars in every screen should have a unique ID. You should save this in a global variable for later use and to avoid conflicts.

Returns: number (int)

Parameters: container = component

IsIndeterminate

image

Checks whether the progress bar is indeterminate or not.

Returns: boolean

Parameters: container = component, id = number (int)

SetPadding

image

Sets the padding for the progress bar.

Parameters: container = component, id = number (int), left = number (int), top = number (int), right = number (int), bottom = number (int)

1 Like

Good extension 100/100 for you and yor extension @Gordon_Lu i have always got inspiration from you

Now open source at GitHub.

I try to use LinearProgress bar without success. Where's my mistake?


Are you using "Classic" theme ?

2 Likes

Did you read this?

1 Like