FORUMS

OnePlus Addresses Reservation List Cheating

Jake Cooper figured out how to bump his place up on OnePlus’ reservation list and … more

OnePlus 2 Benchmark Scores Show Its Muscle

This video by FoneArena contains all the popular benchmarks being tested on the OnePlus 2, … more

Sony’s Emergence in The Middle: Is The Price Right?

Sony’s Electronics Division is not in its best days, and its smartphone … more

HTC Delivering Ads Straight to Sense Home

HTC’s 2015 has been a year marked by a desperate search for revenue.The HTC One M9 … more

[Q] How to switch widgets on a conditional?

164 posts
Thanks Meter: 11
 
By silkshadow, Senior Member on 14th April 2014, 07:17 AM
Post Reply Subscribe to Thread Email Thread
I am using Media Ultilties which gives a 0 or 1 conditional if music is playing or not. What I am trying to do is show a zooper music control widget if music is playing and to show a weather widget in the same place if there is no music playing.

I did see the trick to show the pause button or show the play button using this conditional. However, I am not sure how to apply that to an entire widget. Also, the trick I saw only moves the button off the widget screen (changes the X value to 1000), it doesn't actually hide it. So my questions are:

1) Is there a better command to hide elements on a conditional, or is changing the X value (or y value) the only option?

2) How do I apply this conditional to 2 entire widgets, so one shows if music is playing and the other if music is not playing. I have and know how to use tasker, if that is involved anywhere.

3) If I move an entire widget off the space by changing the X coordinates, does it still consume resources? By that I mean, is the widget still loaded and, for example, would the weather data continue to update?

Thanks!
 
 
14th April 2014, 02:28 PM |#2  
scottx .'s Avatar
Senior Member
Flag San Antonio, Texas
Thanks Meter: 815
 
More
Quote:
Originally Posted by silkshadow

I am using Media Ultilties which gives a 0 or 1 conditional if music is playing or not. What I am trying to do is show a zooper music control widget if music is playing and to show a weather widget in the same place if there is no music playing.

I did see the trick to show the pause button or show the play button using this conditional. However, I am not sure how to apply that to an entire widget. Also, the trick I saw only moves the button off the widget screen (changes the X value to 1000), it doesn't actually hide it. So my questions are:

1) Is there a better command to hide elements on a conditional, or is changing the X value (or y value) the only option?

2) How do I apply this conditional to 2 entire widgets, so one shows if music is playing and the other if music is not playing. I have and know how to use tasker, if that is involved anywhere.

3) If I move an entire widget off the space by changing the X coordinates, does it still consume resources? By that I mean, is the widget still loaded and, for example, would the weather data continue to update?

Thanks!

Use that same one that you use to show and hide the play/pause button to hide every element you dont want seen or show the ones you do. I've done it and hidden over half of the widget once the music is playing and show the music controls.
The Following User Says Thank You to scottx . For This Useful Post: [ View ]
14th April 2014, 05:05 PM |#3  
silkshadow's Avatar
OP Senior Member
Thanks Meter: 11
 
More
Totally makes sense, I should've figured on that. Thank you so much for helping me out!
The Following User Says Thank You to silkshadow For This Useful Post: [ View ]
15th April 2014, 04:37 PM |#4  
scottx .'s Avatar
Senior Member
Flag San Antonio, Texas
Thanks Meter: 815
 
More
Quote:
Originally Posted by silkshadow

Totally makes sense, I should've figured on that. Thank you so much for helping me out!

always use opacity to show and hide if you can.
24th April 2014, 01:46 AM |#5  
einrae214's Avatar
Senior Member
Flag Columbus, O.H.
Thanks Meter: 1,278
 
Donate to Me
More
What is the command line to make the widget relocate when music is playing. ?
25th April 2014, 01:48 PM |#6  
scottx .'s Avatar
Senior Member
Flag San Antonio, Texas
Thanks Meter: 815
 
More
Quote:
Originally Posted by einrae214

What is the command line to make the widget relocate when music is playing. ?

Relocate? How so? Explain what you want to do and maybe I can help.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes