Skip to content

Commit

Permalink
Removed yr.no icons from the app
Browse files Browse the repository at this point in the history
  • Loading branch information
evilbunny2008 committed Dec 20, 2018
1 parent 75f568a commit 61835be
Show file tree
Hide file tree
Showing 85 changed files with 105 additions and 29 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "com.odiousapps.weewxweather"
minSdkVersion 19
targetSdkVersion 28
versionCode 8001
versionName "0.8.1"
versionCode 8002
versionName "0.8.2"
}
buildTypes {
release {
Expand Down
112 changes: 89 additions & 23 deletions app/src/main/assets/weathericons.css
Original file line number Diff line number Diff line change
Expand Up @@ -1835,33 +1835,57 @@
.wi-wu-unknown:before {
content: "\f00d";
}
.wi-yrno-1:before {
.wi-yrno-01d:before {
content: "\f00d";
}
.wi-yrno-2:before {
.wi-yrno-01n:before {
content: "\f02e";
}
.wi-yrno-02d:before {
content: "\f00c";
}
.wi-yrno-3:before {
.wi-yrno-02n:before {
content: "\f083";
}
.wi-yrno-03d:before {
content: "\f002";
}
.wi-yrno-4:before {
.wi-yrno-03n:before {
content: "\f031";
}
.wi-yrno-04:before {
content: "\f013";
}
.wi-yrno-5:before {
.wi-yrno-05d:before {
content: "\f009";
}
.wi-yrno-6:before {
.wi-yrno-05n:before {
content: "\f037";
}
.wi-yrno-06d:before {
content: "\f00e";
}
.wi-yrno-7:before {
.wi-yrno-06n:before {
content: "\f03a";
}
.wi-yrno-07d:before {
content: "\f017";
}
.wi-yrno-07n:before {
content: "\f017";
}
.wi-yrno-8:before {
.wi-yrno-08d:before {
content: "\f0b2";
}
.wi-yrno-9:before {
.wi-yrno-08d:before {
content: "\f0b3";
}
.wi-yrno-09d:before {
content: "\f01a";
}
.wi-yrno-09n:before {
content: "\f037";
}
.wi-yrno-10:before {
content: "\f015";
}
Expand All @@ -1880,36 +1904,60 @@
.wi-yrno-15:before {
content: "\f014";
}
.wi-yrno-20:before {
.wi-yrno-20d:before {
content: "\f068";
}
.wi-yrno-21:before {
.wi-yrno-20n:before {
content: "\f069";
}
.wi-yrno-21d:before {
content: "\f06b";
}
.wi-yrno-21n:before {
content: "\f06c";
}
.wi-yrno-22:before {
content: "\f00e";
}
.wi-yrno-23:before {
content: "\f068";
}
.wi-yrno-24:before {
.wi-yrno-24d:before {
content: "\f00e";
}
.wi-yrno-25:before {
.wi-yrno-24n:before {
content: "\f03a";
}
.wi-yrno-25d:before {
content: "\f010";
}
.wi-yrno-26:before {
.wi-yrno-25d:before {
content: "\f03b";
}
.wi-yrno-26d:before {
content: "\f068";
}
.wi-yrno-27:before {
.wi-yrno-26n:before {
content: "\f069";
}
.wi-yrno-27d:before {
content: "\f068";
}
.wi-yrno-28:before {
.wi-yrno-27n:before {
content: "\f069";
}
.wi-yrno-28d:before {
content: "\f06b";
}
.wi-yrno-29:before {
.wi-yrno-28n:before {
content: "\f06c";
}
.wi-yrno-29d:before {
content: "\f06b";
}
.wi-yrno-29n:before {
content: "\f06c";
}
.wi-yrno-30:before {
content: "\f01d";
}
Expand All @@ -1925,24 +1973,42 @@
.wi-yrno-34:before {
content: "\f06b";
}
.wi-yrno-40:before {
.wi-yrno-40d:before {
content: "\f009";
}
.wi-yrno-41:before {
.wi-yrno-40n:before {
content: "\f037";
}
.wi-yrno-41d:before {
content: "\f008";
}
.wi-yrno-42:before {
.wi-yrno-41n:before {
content: "\f036";
}
.wi-yrno-42d:before {
content: "\f0b2";
}
.wi-yrno-43:before {
.wi-yrno-42n:before {
content: "\f0b3";
}
.wi-yrno-43d:before {
content: "\f0b2";
}
.wi-yrno-44:before {
.wi-yrno-43n:before {
content: "\f0b3";
}
.wi-yrno-44d:before {
content: "\f00a";
}
.wi-yrno-45:before {
.wi-yrno-44n:before {
content: "\f038";
}
.wi-yrno-45d:before {
content: "\f065";
}
.wi-yrno-45n:before {
content: "\f066";
}
.wi-yrno-46:before {
content: "\f01c";
}
Expand Down
18 changes: 14 additions & 4 deletions app/src/main/java/com/odiousapps/weewxweather/Common.java
Original file line number Diff line number Diff line change
Expand Up @@ -2223,6 +2223,7 @@ String[] processYR(String data, boolean showHeader)
if(data == null || data.equals(""))
return null;

boolean use_icons = GetBoolPref("use_icons", false);
StringBuilder out = new StringBuilder();
String desc;

Expand Down Expand Up @@ -2286,8 +2287,8 @@ String[] processYR(String data, boolean showHeader)

tmp = "<tr><th colspan='5' style='text-align:left;'><strong>" + date + "</strong></th></tr>\n";
out.append(tmp);
tmp = "<tr><th>Time</th><th>FCast</th><th>Temp</th><th>Rain</th><th>Wind</th></tr>\n";
out.append(tmp);
//tmp = "<tr><th>Time</th><th>FCast</th><th>Temp</th><th>Rain</th><th>Wind</th></tr>\n";
//out.append(tmp);
}

tmp = "<tr>" +
Expand All @@ -2296,7 +2297,15 @@ String[] processYR(String data, boolean showHeader)

String code = symbol.getString("var");

tmp = "<td><img width='40px' src='file:///android_res/drawable/yrno" + code + ".png'></td>";
if(!use_icons)
{
tmp = "<td><i style='font-size:30px;' class='wi wi-yrno-" + code + "'></i></td>";
//tmp = "<tr><td style='width:10%;' rowspan='2'><i style='font-size:30px;' class='flaticon-thermometer'></i></td>";
} else {
String fileName = checkImage("yrno" + code + ".png", null);
tmp = "<td><img width='40px' src='file://" + fileName + "'></td>";
}

out.append(tmp);

tmp = "<td>" + temperature.getString("value") + "&deg;C</td>";
Expand Down Expand Up @@ -2801,9 +2810,10 @@ private String checkImage(String fileName, String icon)
//if(icon != null)
//downloadImage(fileName, icon);

return fileName;
return icon;
}

@SuppressWarnings("unused")
private void downloadImage(final String fileName, final String imageURL)
{
Thread t = new Thread(new Runnable()
Expand Down
Binary file removed app/src/main/res/drawable/yrno01d.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno01m.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno01n.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno02d.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno02m.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno02n.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno03d.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno03m.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno03n.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno04.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno05d.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno05m.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno05n.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno06d.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno06m.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno06n.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno07d.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno07m.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno07n.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno08d.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno08m.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno08n.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno09.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno10.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno11.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/yrno12.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno13.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno14.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno15.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno20d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno20m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno20n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno21d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno21m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno21n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno22.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno23.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno24d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno24m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno24n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno25d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno25m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno25n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno26d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno26m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno26n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno27d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno27m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno27n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno28d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno28m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno28n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno29m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno29n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno30.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno31.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno32.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno33.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno34.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno40d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno40m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno40n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno41d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno41m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno41n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno42d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno42m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno42n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno43d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno43m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno43n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno44d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno44m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno44n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno45d.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno45m.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno45n.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno46.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno47.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno48.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno49.png
Diff not rendered.
Binary file removed app/src/main/res/drawable/yrno50.png
Diff not rendered.

0 comments on commit 61835be

Please sign in to comment.