Subscription preference

Notification emails are sent to your Samsung account email address.

* Email : anonymous@samsung.com

  

Close

How to make loop option in Battery or Steps %

Forums View
Started by Developer mihwar**** , 1570 Seed May 17, 2019 19:18 Replies : 2 View : 378 Likes : 0
Hi

I want to create a looping option to show the battery %. from 0% to 100%. once I set it should travel.  I hope this fucntion will be reducte creating more images for every % indication. kindly find the image and help.

thank you.
File Attachments
Post Reply
Board View
Developer JohnHarris , 5080 Seed May 18, 2019 18:40 Post #1 0


This content has been quoted from mihwar****’s thought.

Hi

I want to create a looping option to show the battery %. from 0% to 100%. once I set it should travel.  I hope this fucntion will be reducte creating more images for every % indication. kindly find the image and help.

thank you.


Hello mihwar, 

I think I understand what you are trying to do. I have done what you want with some of my watch faces for Battery% and Step%. Here is how I did it for JH17 (you can see it in the Galaxy Store at https://galaxy.store/jh17) First of all I created two circular png images (On JH17 they are 80 degrees half circles) one for the actual Battery that is displayed on the watch faces as an image and one for a Battery Cover (The Battery Cover is the exact same shape and size as the Batter image I just set it to be black with 75% transparent to show the battery under it as it moves)  I have Battery Cover set as Watch Hand and is place it above the Battery image.  In Rotation Properties I have it Sync with Battery % I put the outer pivot x and  outer pivot y for where the center of the circle would be (if it was a full circle) then I have it Rotate 0 to 80 (so it moves exactly 80 degrees) then I set the Direction for CW Start Value for 0 End Value for 100. I do the exact same thing for the steps  but the only difference is I have it sync with Steps % rotate CCW (you can rotate it any way you want) for the Direction then I set the following tag for the opacity 100*(([st] >=0)*([st]<=100)) (that way I only display the cover when the steps % is between 0 and 100%. You can set the Degree for any other angle you want.... for example in my JH18 I have that set for 51 degrees... and for JH16 I have it set for 55 degrees.... They all use the same basic logic for it 1 image that is static and always placed down and 1 set as a watch hand and placed right above the static image.

Hope this helps,
John Harris

Post Reply
Board View
Developer mihwar**** , 1570 Seed May 29, 2019 09:58 Post #2 0


This content has been quoted from JohnHarris’s thought.

 



This content has been quoted from mihwar****’s thought.

Hi

I want to create a looping option to show the battery %. from 0% to 100%. once I set it should travel.  I hope this fucntion will be reducte creating more images for every % indication. kindly find the image and help.

thank you.


Hello mihwar, 

I think I understand what you are trying to do. I have done what you want with some of my watch faces for Battery% and Step%. Here is how I did it for JH17 (you can see it in the Galaxy Store at https://galaxy.store/jh17) First of all I created two circular png images (On JH17 they are 80 degrees half circles) one for the actual Battery that is displayed on the watch faces as an image and one for a Battery Cover (The Battery Cover is the exact same shape and size as the Batter image I just set it to be black with 75% transparent to show the battery under it as it moves)  I have Battery Cover set as Watch Hand and is place it above the Battery image.  In Rotation Properties I have it Sync with Battery % I put the outer pivot x and  outer pivot y for where the center of the circle would be (if it was a full circle) then I have it Rotate 0 to 80 (so it moves exactly 80 degrees) then I set the Direction for CW Start Value for 0 End Value for 100. I do the exact same thing for the steps  but the only difference is I have it sync with Steps % rotate CCW (you can rotate it any way you want) for the Direction then I set the following tag for the opacity 100*(([st] >=0)*([st]<=100)) (that way I only display the cover when the steps % is between 0 and 100%. You can set the Degree for any other angle you want.... for example in my JH18 I have that set for 51 degrees... and for JH16 I have it set for 55 degrees.... They all use the same basic logic for it 1 image that is static and always placed down and 1 set as a watch hand and placed right above the static image.

Hope this helps,
John Harris

 

Thank you for the reply. As you said i tried little bit, but dont find how to set the pivot values as you mentioned. If you can please explain me graphincally or video would be appreciated. Thank you
Post Reply