Android Lollipop Lands for the Sony Xperia Z Ultra

The undisputed king of the beasts–at least in Sony’s current stable,is the … more

Android 5.0 Lollipop in 3D–EVO 3D, That Is!

It is that time of the year once again. Flowers bloom (or snow falls, depending on which … more

Gaming Console with Lollipop? Ouya Gets an Android TV Port

Android is a very flexible platform, and it can be used on a large variety of … more

Android App Review: Manage Your Connections Automagically – XDA TV

Material Design is all the buzz in the Android world right now. … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Question Weather dependent bitmaps

OP TheStretchedElf

3rd September 2014, 10:22 PM   |  #1  
OP Junior Member
Thanks Meter: 15
 
21 posts
Join Date:Joined: Sep 2014
I'm new to zooper and have been customising a home screen for a couple of days. One thing I wanted to do was to display a different image for each weather condition (yahoo weather).

I figured out that I can do this by having multiple bitmaps overlaid on each other, one for each weather condition, with the alpha value set to 0 if the relevant weather condition isn't detected.

With not knowing too much about zooper just yet it struck me that this might be a bit of a heavy handed approach, with potentially up to 48 bitmaps in the widget (according to the yahoo weather condition codes XML I found) each with their own advanced parameters being monitored.

So I suppose my question is, am I going about this the right way and will it be a huge drain on resources?
4th September 2014, 09:44 PM   |  #2  
OP Junior Member
Thanks Meter: 15
 
21 posts
Join Date:Joined: Sep 2014
After reading this thread it seems I was right to think it felt heavy handed.

From what I've read, the right way to go about this is to have one bitmap layer with advanced parameters that display each picture only if the specific weather conditions are true.

Example:
Code:
$#WCCOND#=mostly cloudy?(b)/storage/emulated/0/ZooperWidget/Bitmaps/BlueBeacon/cloudy.jpg(/b)$
$#WCCOND#=sunny?(b)/storage/emulated/0/ZooperWidget/Bitmaps/BlueBeacon/sunny.jpg(/b)$
NB: The round brackets in the above code (b) (/b) should actually be square brackets but the forum turns this into bold.
5th September 2014, 12:13 AM   |  #3  
jimlahey's Avatar
Member
Thanks Meter: 62
 
38 posts
Join Date:Joined: Sep 2011
More
You could create an iconset instead, or grab an iconset from here http://forum.xda-developers.com/show....php?t=2084070 and replace the images with yours.
5th September 2014, 01:11 PM   |  #4  
OP Junior Member
Thanks Meter: 15
 
21 posts
Join Date:Joined: Sep 2014
Quote:
Originally Posted by jimlahey

You could create an iconset instead, or grab an iconset from here http://forum.xda-developers.com/show....php?t=2084070 and replace the images with yours.

Thanks for that, I'll look into it. Is there any advantage to going the icon route? And does it matter that my images are jpg photos (eg. a cloudy sky rather than a cloud clip art)?
5th September 2014, 03:58 PM   |  #5  
jimlahey's Avatar
Member
Thanks Meter: 62
 
38 posts
Join Date:Joined: Sep 2011
More
Quote:
Originally Posted by TheStretchedElf

Thanks for that, I'll look into it. Is there any advantage to going the icon route? And does it matter that my images are jpg photos (eg. a cloudy sky rather than a cloud clip art)?

An iconset is a lot easier to manage (use in different widgets, sharing etc) as it's just 1 zip file. And I believe jpg will work as long as you edit the image extensions in the iconset xml file.
5th September 2014, 04:21 PM   |  #6  
OP Junior Member
Thanks Meter: 15
 
21 posts
Join Date:Joined: Sep 2014
Quote:
Originally Posted by jimlahey

An iconset is a lot easier to manage (use in different widgets, sharing etc) as it's just 1 zip file. And I believe jpg will work as long as you edit the image extensions in the iconset xml file.

Thanks. Looks like I'll be creating my first icon set tonight then
The Following User Says Thank You to TheStretchedElf For This Useful Post: [ View ]
6th September 2014, 12:33 AM   |  #7  
Rickav's Avatar
Senior Member
Flag Sco'land
Thanks Meter: 251
 
505 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by TheStretchedElf

Thanks. Looks like I'll be creating my first icon set tonight then

Godspeed.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes