This is a sample of progress bar I use in my project. It only use B4A Core library and native view. Yes, what you need is only 2 panels to create the progress bar. The reason I create this view is because I don't like the square corner of default progress bar and I want to customize the colour.
1. Create a panel "pnlBar" with height = 10 and corner radius = 5. Set the colour to Gray (#808080)
2. Create another panel "pnlValue" with same height and corner radius as pnlBar (you can copy and paste from pnlBar). The width doesn't matter, it can be value smaller than pnlBar. Make sure the Left value is same as pnlBar. Set the colour to any colour you like. Example: SpringGreen (#00FF7F)
3. Then set the width of the progress bar value in code.
That's it!
A demo source code is attached.
1. Create a panel "pnlBar" with height = 10 and corner radius = 5. Set the colour to Gray (#808080)
2. Create another panel "pnlValue" with same height and corner radius as pnlBar (you can copy and paste from pnlBar). The width doesn't matter, it can be value smaller than pnlBar. Make sure the Left value is same as pnlBar. Set the colour to any colour you like. Example: SpringGreen (#00FF7F)
3. Then set the width of the progress bar value in code.
B4X:
pnlValue.Width = (Value / 100) * pnlBar.Width
That's it!
A demo source code is attached.