I have set its width percentage as 50% and compared using grey cardview’s Width using
(x/100)*ParentCV.Width
But it shows incorrect again. How solve it?
(x/100)*ParentCV.Width
But it shows incorrect again. How solve it?
must provide your block…
Change Cardview3.WidthPercent To just Width
Use this block to make progress of your progress bar.
Explanation:
get value : It is the value or score of the user out of the total score ( which is 4000 )
4000 : 4000 is the maximum value for the score.
86 : The width ( in percent ) of the container Card View.
This works fine and accurate for me.
Hope it helps you.
Can i use 50 inplace of get value and 100 in place of 4000 and 60 in place of 86?
It is clearly wrong. See your blocks carefully.
: in percent
: in pixels.
Sure. you can do that.
Pixels will not be responsive in some devices
If get value=100 then width percent will be 60 in my case? How is it possible?.
I Want a proper solution by Width percentage.
Percentage value works by considering the total width of the screen that means when you set 50% width it will be considered as half of the screen width.
So, accordingly set your card view width.
Consider your card view default width is 80%.
Now consider, 80% width is 100% progress, like wise you have to convert your 50% width for 80% that means you should set width 40% to show 50% progress.
How convert it by using blocks?
What is your card view width ?
Parent card view width = 60%
Increase width value by 6% when you run your progress.
Set Card view width = get cardview width + 6%
Can you do it with blocks? It will be more understandable
See here…
Is it with pixel?
Percentage