FORUMS
Remove All Ads from XDA

[Q] How to get a progress bar satisfy two conditions?

44 posts
Thanks Meter: 25
 
By paramdinkar, Member on 22nd December 2013, 04:04 PM
Post Reply Email Thread
20th April 2017, 07:26 AM |#21  
zephyr1100's Avatar
Senior Member
Thanks Meter: 242
 
More
Quote:
Originally Posted by wakaranay

Cool! but the image disaappear in reverse. what i mean. when my batt is 10% left the image left is the top instead of the bottom

I tried it with one of my bitmaps. For clarity reasons I made the widget background red.



I have a widget height of 172 px so I typed [oy]#(100-BLEVN#)*172/100[/oy]
I set Screen Anchor on 'Center Top'.

Seems to work...
The Following User Says Thank You to zephyr1100 For This Useful Post: [ View ] Gift zephyr1100 Ad-Free
 
 
20th April 2017, 08:08 AM |#22  
Senior Member
Thanks Meter: 11
 
More
Quote:
Originally Posted by zephyr1100

I tried it with one of my bitmaps. For clarity reasons I made the widget background red.



I have a widget height of 172 px so I typed [oy]#(100-BLEVN#)*172/100[/oy]
I set Screen Anchor on 'Center Top'.

Seems to work...

[oy]#(100-BLEVN#)*yyy/100[/oy] yy is my height pixel

nothing happens. i mean may bitmap is not visible
but when i type
[oy]#BLEVN#*yyy/100[/oy]
my bitmap appears
20th April 2017, 08:22 AM |#23  
zephyr1100's Avatar
Senior Member
Thanks Meter: 242
 
More
Quote:
Originally Posted by wakaranay

[oy]#(100-BLEVN#)*yyy/100[/oy] yy is my height pixel

nothing happens. i mean may bitmap is not visible
but when i type
[oy]#BLEVN#*yyy/100[/oy]
my bitmap appears

Oh damn.. of course it should be [oy](100-#BLEVN#)*yyy/100[/oy]

'#' was in the wrong position...
20th April 2017, 08:31 AM |#24  
Senior Member
Thanks Meter: 11
 
More
Quote:
Originally Posted by zephyr1100

Oh damn.. of course it should be [oy](100-#BLEVN#)*yyy/100[/oy]

'#' was in the wrong position...

[oy](100-#BLEVN#-100)*yyy/100[oy]
perfect!
thanks mate!
20th April 2017, 08:54 AM |#25  
zephyr1100's Avatar
Senior Member
Thanks Meter: 242
 
More
Quote:
Originally Posted by wakaranay

[oy](100-#BLEVN#-100)*yyy/100[oy]
perfect!
thanks mate!

What does the red '-100' mean other than making #BLEVN# negative?

100-100(=0)-#BLEVN# = -#BLEVN#

My widget gets just messed up..
22nd April 2017, 04:58 AM |#26  
Senior Member
Thanks Meter: 11
 
More
Quote:
Originally Posted by zephyr1100

What does the red '-100' mean other than making #BLEVN# negative?

100-100(=0)-#BLEVN# = -#BLEVN#

My widget gets just messed up..

idk. when i tried your code i didnt get what i want on my widget. but when i type those codes i got what i want.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes