tabris-js icon indicating copy to clipboard operation
tabris-js copied to clipboard

ProgressBar height and Background not working anymore

Open ishigo1987 opened this issue 5 years ago • 16 comments

Problem description

ProgressBar height and Background not working anymore It not possible to set the height value, and set the background to transparent as was the case in the old versions

Environment

  • Tabris.js version: 3.6.0-dev.20200720
  • Device: Huawei P10
  • OS: Android 8

Code snippet

const{ProgressBar, contentView} = require("tabris");
new ProgressBar({centerY:0, left: 0, right: 0, height:1, background: "transparent", selection: 0}).appendTo(contentView);

ishigo1987 avatar Jul 20 '20 12:07 ishigo1987

We can confirm this behavior change. With the migration to material components ProgressIndicator, this behavior is not available by default. We will attempt to reinstate it.

mpost avatar Jul 20 '20 13:07 mpost

Ok thank you If it's possible please add the possibility to have rounded progressbar as you can see on some applications.

ishigo1987 avatar Jul 20 '20 13:07 ishigo1987

We would need to check cross platform. Would good to be achievable with cornerRadius which is currently not the case.

mpost avatar Jul 20 '20 13:07 mpost

In general since the ProgressBar is a pretty simple widget two nested composites could be used. In that case the cornerRadius could be used as well.

mpost avatar Jul 20 '20 13:07 mpost

I have opened an issue on the material components library to reinstate the ability to control the height with layout data. See https://github.com/material-components/material-components-android/issues/1491

mpost avatar Jul 20 '20 13:07 mpost

In general since the ProgressBar is a pretty simple widget two nested composites could be used. In that case the cornerRadius could be used as well.

Please explain it to me.

ishigo1987 avatar Jul 20 '20 13:07 ishigo1987

I have opened an issue on the material components library to reinstate the ability to control the height with layout data. See material-components/material-components-android#1491

Ok thank you

ishigo1987 avatar Jul 20 '20 13:07 ishigo1987

In general since the ProgressBar is a pretty simple widget two nested composites could be used. In that case the cornerRadius could be used as well.

Please explain it to me.

A ProgressBar just looks like:

<Composite background='blue'>
 <Composite stretchY left={0} right='50%' background='red'/> 
</Composite

mpost avatar Jul 20 '20 13:07 mpost

Ok nice thank you i will create my own progressbar and i will play with the width property for the progression

ishigo1987 avatar Jul 20 '20 13:07 ishigo1987

This will also allow you to use the cornerRadius btw.

mpost avatar Jul 20 '20 14:07 mpost

Yep thank you

ishigo1987 avatar Jul 20 '20 14:07 ishigo1987

@mpost ActivityIndicator has the same problem, setting a width or height on it doesn't change its appearance at all.

ishigo1987 avatar Jul 21 '20 11:07 ishigo1987

That is very likely. It is the same widget in the material components library.

mpost avatar Jul 21 '20 12:07 mpost

Okay, right now I'm using a lottie loader.

ishigo1987 avatar Jul 21 '20 13:07 ishigo1987

As stated by the material components library team, they want to revisit the sizing topic of the ProgressIndicator. See https://github.com/material-components/material-components-android/issues/1491#issuecomment-661147066

mpost avatar Jul 22 '20 08:07 mpost

Ok thank you

ishigo1987 avatar Jul 24 '20 07:07 ishigo1987