Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <Clock version="1" frameRate="0" type="awesome" useVariableUpdater="DateTime.Minute" resDensity="480" extraResources="sw1440-den640::1.222" extraScaleByDensity="640:1.222">
- <VariableBinders>
- <ContentProviderBinder
- uri="content://weather/weather" columns="city_name,temperature,temperature_range,description,weather_type" countName="hasweather">
- <Variable name="weather_id" type="int" column="weather_type"/>
- <Variable name="weather_location" type="string" column="city_name"/>
- <Variable name="weather_temperature" column="temperature" type="string"/>
- <Variable name="weather_description" type="string" column="description"/>
- </ContentProviderBinder>
- <SensorBinder type="gravity">
- <Variable name="_gravity_x" index="0" />
- <Variable name="_gravity_y" index="1" />
- <Variable name="_gravity_z" index="2" />
- </SensorBinder>
- </VariableBinders>
- <Var name="is_rain" expression="ge(#weather_id,4)*le(#weather_id,11)" />
- <Var name="is_snow" expression="ge(#weather_id,12)*le(#weather_id,17)" />
- <Var name="is_dust" expression="ge(#weather_id,18)*le(#weather_id,21)+ge(#weather_id,23)*le(#weather_id,24)" />
- <Var name="icon_suffix" expression="ifelse(isnull(#weather_id),1,gt(#weather_id,24),1,#weather_id)" />
- <Var name="icon_index" expression="ifelse(#is_rain,4,#is_snow,12,#is_dust,18,#icon_suffix)" />
- <Image x="#view_width/2" y="#view_height*0.55" align="center" alignV="center" src="bg.png" ></Image>
- <Group>
- <Time x="#view_width*0.91" y="#view_height*0.73" src="l.png" alignV="bottom" align="right" space="0" />
- <Text x="#view_width*0.12" y="#view_height*0.72" size="42" color="#ffffff" textExp="@weather_description+' '+@weather_temperature" />
- <Text x="#view_width*0.86" y="#view_height*0.72" size="42" color="#ffffff" textExp="@weather_location" align="right" />
- </Group>
- <Group >
- <Image src="weather_0_0.png" scale="0.8" x="#view_width*0.22*#_gravity_x" y="#view_height*0.5" align="center" alignV="center" visibility="ifelse(isnull(#weather_id),1,0)" />
- <Image src="weather_0.png" scale="0.8" x="#view_width*0.22*#_gravity_x" y="#view_height*0.5" align="center" alignV="center" srcid="not(ge(#hour24,6)*le(#hour24,17))" visibility="#hasweather*eq(#weather_id,0)" />
- <Image src="weather_1.png" scale="0.8" x="#view_width*0.22*#_gravity_x" y="#view_height*0.5" align="center" alignV="center" srcid="not(ge(#hour24,6)*le(#hour24,17))" visibility="#hasweather*eq(#weather_id,1)" />
- <Image x="#view_width*0.22*#_gravity_x" scale="0.8" y="#view_height*0.5" align="center" alignV="center" srcExp="'weather_'+ #icon_index + '.png'" />
- </Group>
- </Clock>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement