<VariableBinders>
<! - MIUI Weather ->
<ContentProviderBinder
name = "weather_provider"
uri = "content: // weather / weather"
columns = "city_name, description, city_id, weather_type, temperature, temperature_range, tmphighs, tmplows, water, wind, pressure, humidity, sunrise, sunset, locale" countName = "hasweathermi"><! - Add this line separated by commas word city_id ->
<Variable name = "cidd" type = "string" column = "city_id" row = "0" /><! - Add this line to your list of variables ->
</ ContentProviderBinder>
<! - Weather BZ MI8-->
<ContentProviderBinder
name = "weather_provider"
uri = "content: // weatherm8 / weather"
columns = "city_name, description, weather_type, city_id, temperature, temperature_range, tmphighs, tmplows, water, wind, pressure, humidity, sunrise, sunset, forecast_type, locale, sunrise_m" countName = "hasweatherbz8"><! - Add this line separated by commas word city_id ->
<Variable name = "cidd" type = "string" column = "city_id" row = "0" /><! - Add this line to your list of variables ->
</ ContentProviderBinder>
<! - Add this an array before the closing VariableBinders ->
<ContentProviderBinder name = "feels" uri = "content: // weather / raw" columns = "city_id, data1, insert_time" order = "insert_time DESC" countName = "hasw">
<Variable name = "fl0" type = "string" column = "data1" row = "0" />
<Variable name = "fl1" type = "string" column = "data1" row = "1" />
<Variable name = "fl2" type = "string" column = "data1" row = "2" />
<Variable name = "fl3" type = "string" column = "data1" row = "3" />
<Variable name = "fl4" type = "string" column = "data1" row = "4" />
<Variable name = "fl5" type = "string" column = "data1" row = "5" />
<Variable name = "fl6" type = "string" column = "data1" row = "6" />
<Variable name = "fl7" type = "string" column = "data1" row = "7" />
<Variable name = "fl8" type = "string" column = "data1" row = "8" />
<Variable name = "fl9" type = "string" column = "data1" row = "9" />
<Variable name = "row0" type = "string" column = "city_id" row = "0" />
<Variable name = "row1" type = "string" column = "city_id" row = "1" />
<Variable name = "row2" type = "string" column = "city_id" row = "2" />
<Variable name = "row3" type = "string" column = "city_id" row = "3" />
<Variable name = "row4" type = "string" column = "city_id" row = "4" />
<Variable name = "row5" type = "string" column = "city_id" row = "5" />
<Variable name = "row6" type = "string" column = "city_id" row = "6" />
<Variable name = "row7" type = "string" column = "city_id" row = "7" />
<Variable name = "row8" type = "string" column = "city_id" row = "8" />
<Variable name = "row9" type = "string" column = "city_id" row = "9" />
<Variable name = "updated" type = "long" column = "insert_time" row = "0" />
</ ContentProviderBinder>
<ContentProviderBinder name = "feels8" uri = "content: // weatherm8 / raw" columns = "city_id, data1, insert_time" order = "insert_time DESC" countName = "hasw8">
<Variable name = "fl0" type = "string" column = "data1" row = "0" />
<Variable name = "fl1" type = "string" column = "data1" row = "1" />
<Variable name = "fl2" type = "string" column = "data1" row = "2" />
<Variable name = "fl3" type = "string" column = "data1" row = "3" />
<Variable name = "fl4" type = "string" column = "data1" row = "4" />
<Variable name = "fl5" type = "string" column = "data1" row = "5" />
<Variable name = "fl6" type = "string" column = "data1" row = "6" />
<Variable name = "fl7" type = "string" column = "data1" row = "7" />
<Variable name = "fl8" type = "string" column = "data1" row = "8" />
<Variable name = "fl9" type = "string" column = "data1" row = "9" />
<Variable name = "row0" type = "string" column = "city_id" row = "0" />
<Variable name = "row1" type = "string" column = "city_id" row = "1" />
<Variable name = "row2" type = "string" column = "city_id" row = "2" />
<Variable name = "row3" type = "string" column = "city_id" row = "3" />
<Variable name = "row4" type = "string" column = "city_id" row = "4" />
<Variable name = "row5" type = "string" column = "city_id" row = "5" />
<Variable name = "row6" type = "string" column = "city_id" row = "6" />
<Variable name = "row7" type = "string" column = "city_id" row = "7" />
<Variable name = "row8" type = "string" column = "city_id" row = "8" />
<Variable name = "row9" type = "string" column = "city_id" row = "9" />
<Variable name = "updated" type = "long" column = "insert_time" row = "0" />
</ ContentProviderBinder>
</ VariableBinders><! - here in front of this VariableBinders ->
<Var name = "fl" type = "string" expression = "ifelse (eqs (@ cidd, @ row0), @ fl0, eqs (@ cidd, @ row1), @ fl1, eqs (@ cidd, @ row2), @ fl2, eqs (@ cidd, @ row3), @ fl3, eqs (@ cidd, @ row4), @ fl4, eqs (@ cidd, @ row5), @ fl5, eqs (@ cidd, @ row6), @ fl6, eqs (@ cidd, @ row7), @ fl7, eqs (@ cidd, @ row8), @ fl8, eqs (@ cidd, @ row9), @ fl9,10) "/>
<! - VivС–d descent / sunset ->
<Var name = "srnew" expression = "strIndexOf (@ fl, 'sunRiseSet')" />
<Var name = "srnew1" type = "string" expression = "substr (@ fl, # srnew, 100) '/>
<Var name = "srnew2" expression = "strIndexOf (@ srnew1, 'from')" />
<Var name = "srnew3" expression = "strIndexOf (@ srnew1, 'to')" />
<Var name = "srh2" expression = "substr (@ srnew1, # srnew2 + 18,2)" />
<Var name = "srm2" expression = "substr (@ srnew1, # srnew2 + 21,2)" />
<Var name = "ssh1" expression = "substr (@ srnew1, # srnew3 + 16,2)" />
<Var name = "srm" expression = "ifelse (# hasweatherbz8, # srm2, # sunrise_mi / 1000% 3600/60)" />
<Var name = "ssm" expression = "int (ifelse (# hasweatherbz8, # sunset_bz8, # sunset_mi) / 1000% 3600/60)" />
<Var name = "srise_min_mi" type = "string" expression = "ifelse ((# srm {9.5), '0' + # srm, # srm)" />
<Var name = "sset_min_mi" type = "string" expression = "ifelse ((# ssm {9.5), '0' + # ssm, # ssm)" />
<Var name = "sunrise_time" type = "string" expression = "ifelse (# hasweatherbz, @ weather_sunrize_bz, # srh2 + ':' + @srise_min_mi)" />
<Var name = "sunset_time" type = "string" expression = "ifelse (# hasweatherbz, @ weather_sunset_bz, # ssh1 + ':' + @sset_min_mi)" />
<Var name = "hour" expression = "# hour24" />
<Var name = "is_night" expression = "gt (# hour24, # ssh1) + gt (# srh2, # hour24) + (eq (# hour24, # srh2) * gt (# srm, # minute)) + (eq ( # hour24, # ssh1) * gt (# minute, # ssm)) "/>
<Var name = "has_night_icon" expression = "ge (# weather_id, 0) * le (# weather_id, 25)" />
<Var name = "icon_suffix" expression = "ifelse (#has_night_icon, '_' + # is_night, '')" type = "string" />
<! - Text vС–dobrazhennya descent / sunset ->
<Text x = "282" y = "15" size = "33" align = "left" color = "# 272727" format = "% s" paras = "@ sunrise_time" />
<Text x = "382" y = "15" size = "33" align = "left" color = "# 272727" format = "% s" paras = "@ sunset_time" />
<! - Syntax to display day / night icon (here it is said that the image must be in the root of the widget (not in a folder) and have weather_0_0.jpg type name, weather_1_0.jpg, weather_0_1.jpg and so on) ->
<Image x = "0" y = "0" srcExp = " 'weather_' + #weather_id + @icon_suffix + '.jpg'" />