Skip to content

Commit b0b15eb

Browse files
committed
Set default unit
Metric is set as default unit
1 parent 5abe5f8 commit b0b15eb

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

app/release/weather.apk

61 Bytes
Binary file not shown.

app/src/main/java/com/example/weather/Settings.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ public void loadData() {
103103
units_text.setText("Metric °C");
104104
} else if (unit.equals("imperial")) {
105105
units_text.setText("Imperial °F");
106+
} else {
107+
units_text.setText("Metric °C");
106108
}
107109
}
108110

app/src/main/java/com/example/weather/fetch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected Void doInBackground(Void... voids) {
3838
Log.d("target", "doInBackground: "+ location);
3939
Log.d("target", "doInBackground: "+ units);
4040

41-
if(units == null) {
41+
if(units == "") {
4242
units = "metric";
4343
}
4444

0 commit comments

Comments
 (0)