more logging and updated screenshots

fix/get-all-stations-hangout
Mateusz Lubecki 2022-01-06 22:06:53 +01:00
rodzic a08f06618b
commit 4b967b6857
25 zmienionych plików z 233 dodań i 30 usunięć

Wyświetl plik

@ -137,16 +137,16 @@ public class Main extends Application {
favsSummaryUpdater.start(100);
if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
Logger.debug("[Main][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
Locale locale = new Locale(AppConfiguration.locale);
Locale.setDefault(locale);
Resources resources = this.getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
Logger.debug("[Main][onCreate][locale = " + locale.toLanguageTag() + "]");
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
// if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
// Logger.debug("[Main][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
// Locale locale = new Locale(AppConfiguration.locale);
// Locale.setDefault(locale);
// Resources resources = this.getResources();
// Configuration config = resources.getConfiguration();
// config.setLocale(locale);
// Logger.debug("[Main][onCreate][locale = " + locale.toLanguageTag() + "]");
// resources.updateConfiguration(config, resources.getDisplayMetrics());
// }
}
private void recreateListOfFavs() {

Wyświetl plik

@ -74,6 +74,7 @@ public class MainActivity extends AppCompatActivity {
protected void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
Logger.info("[MainActivity][onDestroy]");
}
/**
@ -82,16 +83,31 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
Logger.info("[MainActivity][onResume]");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Logger.info("[MainActivity][onCreate]");
main = (Main) getApplication();
baseContext = getApplicationContext();
if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
Logger.debug("[MainActivity][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
Locale locale = new Locale(AppConfiguration.locale);
Locale.setDefault(locale);
Resources resources = this.getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
Logger.debug("[MainActivity][onCreate][locale = " + locale.toLanguageTag() + "]");
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
// create an event handler fired when a user click 'favourites' button
mainActImageButtonFavouritesClickEvent = new MainActImageButtonFavouritesClickEvent(this);

Wyświetl plik

@ -16,6 +16,8 @@ import android.widget.Spinner;
import android.widget.Switch;
import android.widget.TextView;
import org.tinylog.Logger;
import cc.pogoda.mobile.meteosystem.R;
import cc.pogoda.mobile.meteosystem.config.AppConfiguration;
import cc.pogoda.mobile.meteosystem.file.ConfigurationFile;
@ -35,6 +37,9 @@ public class SettingsActivity extends AppCompatActivity {
AppCompatActivity act;
private static String languageNameFromShort(String shortName) {
Logger.info("[SettingsActivity][languageNameFromShort][shortName = " + shortName +"]");
switch (shortName) {
case "en-rUS": return "English";
case "pl": return "Polski";
@ -65,6 +70,8 @@ public class SettingsActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
Logger.info("[SettingsActivity][onCreate]");
confFile = new ConfigurationFile(getBaseContext());
act = this;
@ -141,6 +148,8 @@ public class SettingsActivity extends AppCompatActivity {
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
String languageSelected = adapterView.getItemAtPosition(i).toString();
Logger.debug("[SettingsActivity][onCreate][AdapterView.OnItemSelectedListener()][languageSelected = " + languageSelected +"]");
switch (languageSelected) {
case "English": AppConfiguration.locale = "en-rUS"; break;
case "Polski": AppConfiguration.locale = "pl"; break;

Wyświetl plik

@ -6,6 +6,8 @@ import androidx.core.text.HtmlCompat;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Handler;
import android.text.Html;
@ -19,6 +21,9 @@ import android.widget.ImageView;
import android.widget.TextView;
import org.greenrobot.eventbus.EventBus;
import org.tinylog.Logger;
import java.util.Locale;
import cc.pogoda.mobile.meteosystem.R;
import cc.pogoda.mobile.meteosystem.activity.handler.StationDetailsActHumidityPlotButtonClickEvent;
@ -29,6 +34,7 @@ import cc.pogoda.mobile.meteosystem.activity.handler.StationDetailsActWindSpeedP
import cc.pogoda.mobile.meteosystem.activity.handler.StationDetailsActSummaryButtonClickEvent;
import cc.pogoda.mobile.meteosystem.activity.handler.StationDetailsActWindRoseButtonClickEvent;
import cc.pogoda.mobile.meteosystem.activity.updater.StationBackgroundImageUpdater;
import cc.pogoda.mobile.meteosystem.config.AppConfiguration;
import cc.pogoda.mobile.meteosystem.type.AvailableParameters;
import cc.pogoda.mobile.meteosystem.type.WeatherStation;
import cc.pogoda.mobile.meteosystem.type.WeatherStationListEvent;
@ -159,11 +165,22 @@ public class StationDetailsActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
act = this;
station = (WeatherStation) getIntent().getSerializableExtra("station");
Logger.info("[StationDetailsActivity][onCreate][station.getSystemName() = " + station.getSystemName() +"]");
if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
Logger.debug("[StationDetailsActivity][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
Locale locale = new Locale(AppConfiguration.locale);
Locale.setDefault(locale);
Resources resources = this.getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
setContentView(R.layout.activity_station_details);
station = (WeatherStation) getIntent().getSerializableExtra("station");
AvailableParameters parameters = station.getAvailableParameters();
stationName = findViewById(R.id.textViewStationName);
@ -312,13 +329,28 @@ public class StationDetailsActivity extends AppCompatActivity {
station_lat = station.getLat();
station_lon = station.getLon();
stationSponsorUrl.setAutoLinkMask(0);
stationSponsorUrl.setMovementMethod(LinkMovementMethod.getInstance());
String anchorText;
if (station.getSponsorUrl().length() > 32) {
anchorText = getString(R.string.www_link);
} else {
anchorText = station.getSponsorUrl();
}
stationSponsorUrl.setMovementMethod(LinkMovementMethod.getInstance());
stationSponsorUrl.setText(
HtmlCompat.fromHtml(
"<a href=\"" + station.getSponsorUrl() + "\">" + anchorText + "</a>\n", HtmlCompat.FROM_HTML_MODE_LEGACY
)
);
// if (station.getSponsorUrl().length() > 32) {
// stationSponsorUrl.setClickable(true);
// stationSponsorUrl.setMovementMethod(LinkMovementMethod.getInstance());
// stationSponsorUrl.setText(Html.fromHtml("<a href=\"" + station.getSponsorUrl() +"\">" + getString(R.string.www_link) + "</a>\n", HtmlCompat.FROM_HTML_MODE_LEGACY));
// }
// else {
stationSponsorUrl.setText(station.getSponsorUrl());
// stationSponsorUrl.setText(station.getSponsorUrl());
// }
stationMoreInfo.setText(station.getMoreInfo());

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.activity;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
@ -21,11 +23,14 @@ import org.threeten.bp.ZoneId;
import org.threeten.bp.ZoneOffset;
import org.threeten.bp.ZonedDateTime;
import org.threeten.bp.format.DateTimeFormatter;
import org.tinylog.Logger;
import java.util.ArrayList;
import java.util.Locale;
import cc.pogoda.mobile.meteosystem.R;
import cc.pogoda.mobile.meteosystem.activity.handler.PlotClickEvent;
import cc.pogoda.mobile.meteosystem.config.AppConfiguration;
import cc.pogoda.mobile.meteosystem.dao.LastStationDataDao;
import cc.pogoda.mobile.meteosystem.dao.StationDataDao;
import cc.pogoda.mobile.meteosystem.type.StationDetailsPlot;
@ -125,10 +130,22 @@ public class StationDetailsPlotsDirection extends AppCompatActivity implements S
// get data length for this plot
dataLn = (int)getIntent().getExtras().get("data_ln");
setContentView(R.layout.activity_station_details_plots);
station = (WeatherStation) getIntent().getSerializableExtra("station");
Logger.info("[StationDetailsPlotsDirection][onCreate][station.getSystemName() = " + station.getSystemName() +"][dataLn = " + dataLn +"]");
if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
Logger.debug("[StationDetailsActivity][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
Locale locale = new Locale(AppConfiguration.locale);
Locale.setDefault(locale);
Resources resources = this.getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
setContentView(R.layout.activity_station_details_plots);
// download data from web service
this.downloadDataFromWebservice();
@ -325,6 +342,8 @@ public class StationDetailsPlotsDirection extends AppCompatActivity implements S
// utc timestamp
long utcTimestamp = utcTime.toEpochSecond();
Logger.debug("[StationDetailsPlotsDirection][downloadDataFromWebservice][station.getSystemName() = " + station.getSystemName() +"]");
if (this.dataLn < 0 || this.dataLn > 2) {
// last 2000 points of data, regardless the timescale
data = lastStationDataDao.getLastStationData(station.getSystemName());
@ -345,6 +364,9 @@ public class StationDetailsPlotsDirection extends AppCompatActivity implements S
valuesWindDirection = new ArrayList<>();
if (data != null) {
Logger.debug("[StationDetailsPlotsDirection][downloadDataFromWebservice][data.list_of_station_data.length = " + data.list_of_station_data.length +"]");
for (StationData d : data.list_of_station_data) {
valuesWindDirection.add(new Entry(d.epoch * 1000, d.winddir));
}

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.activity;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
@ -21,11 +23,14 @@ import org.threeten.bp.ZoneId;
import org.threeten.bp.ZoneOffset;
import org.threeten.bp.ZonedDateTime;
import org.threeten.bp.format.DateTimeFormatter;
import org.tinylog.Logger;
import java.util.ArrayList;
import java.util.Locale;
import cc.pogoda.mobile.meteosystem.R;
import cc.pogoda.mobile.meteosystem.activity.handler.PlotClickEvent;
import cc.pogoda.mobile.meteosystem.config.AppConfiguration;
import cc.pogoda.mobile.meteosystem.dao.LastStationDataDao;
import cc.pogoda.mobile.meteosystem.dao.StationDataDao;
import cc.pogoda.mobile.meteosystem.type.StationDetailsPlot;
@ -147,6 +152,16 @@ public class StationDetailsPlotsHumidity extends AppCompatActivity implements Se
// get data length for this plot
dataLn = (int)getIntent().getExtras().get("data_ln");
if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
Logger.debug("[StationDetailsPlotsHumidity][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
Locale locale = new Locale(AppConfiguration.locale);
Locale.setDefault(locale);
Resources resources = this.getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
setContentView(R.layout.activity_station_details_plots);
station = (WeatherStation) getIntent().getSerializableExtra("station");

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.activity;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
@ -21,11 +23,14 @@ import org.threeten.bp.ZoneId;
import org.threeten.bp.ZoneOffset;
import org.threeten.bp.ZonedDateTime;
import org.threeten.bp.format.DateTimeFormatter;
import org.tinylog.Logger;
import java.util.ArrayList;
import java.util.Locale;
import cc.pogoda.mobile.meteosystem.R;
import cc.pogoda.mobile.meteosystem.activity.handler.PlotClickEvent;
import cc.pogoda.mobile.meteosystem.config.AppConfiguration;
import cc.pogoda.mobile.meteosystem.dao.LastStationDataDao;
import cc.pogoda.mobile.meteosystem.dao.StationDataDao;
import cc.pogoda.mobile.meteosystem.type.StationDetailsPlot;
@ -91,6 +96,8 @@ public class StationDetailsPlotsTemperature extends AppCompatActivity implements
// utc timestamp
long utcTimestamp = utcTime.toEpochSecond();
Logger.debug("[StationDetailsPlotsTemperature][downloadDataFromWebservice][station.getSystemName() = " + station.getSystemName() +"]");
if (this.dataLn < 0 || this.dataLn > 2) {
// last 2000 points of data, regardless the timescale
data = lastStationDataDao.getLastStationData(station.getSystemName());
@ -109,6 +116,9 @@ public class StationDetailsPlotsTemperature extends AppCompatActivity implements
}
if (data instanceof ListOfStationData) {
Logger.debug("[StationDetailsPlotsTemperature][downloadDataFromWebservice][data.list_of_station_data.length = " + data.list_of_station_data.length +"]");
for (StationData d : data.list_of_station_data) {
valuesTemperature.add(new Entry(d.epoch * 1000, d.temperature));
}
@ -241,14 +251,26 @@ public class StationDetailsPlotsTemperature extends AppCompatActivity implements
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// this activity layout is common for all plots
setContentView(R.layout.activity_station_details_plots);
// get data length for this plot
dataLn = (int)getIntent().getExtras().get("data_ln");
station = (WeatherStation) getIntent().getSerializableExtra("station");
Logger.info("[StationDetailsPlotsTemperature][onCreate][station.getSystemName() = " + station.getSystemName() +"][dataLn = " + dataLn +"]");
if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
Logger.debug("[StationDetailsPlotsHumidity][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
Locale locale = new Locale(AppConfiguration.locale);
Locale.setDefault(locale);
Resources resources = this.getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
// this activity layout is common for all plots
setContentView(R.layout.activity_station_details_plots);
// exit from the function if station object hasn't been added to the intent
if (station == null) {
return;

Wyświetl plik

@ -2,6 +2,8 @@ package cc.pogoda.mobile.meteosystem.activity;
import androidx.appcompat.app.AppCompatActivity;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
@ -22,8 +24,10 @@ import org.threeten.bp.ZoneId;
import org.threeten.bp.ZoneOffset;
import org.threeten.bp.ZonedDateTime;
import org.threeten.bp.format.DateTimeFormatter;
import org.tinylog.Logger;
import java.util.ArrayList;
import java.util.Locale;
import cc.pogoda.mobile.meteosystem.R;
import cc.pogoda.mobile.meteosystem.activity.handler.PlotClickEvent;
@ -95,13 +99,26 @@ public class StationDetailsPlotsWind extends AppCompatActivity implements SeekBa
int lastDataIndex = 0;
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_station_details_plots);
// get data length for this plot
dataLn = (int)getIntent().getExtras().get("data_ln");
station = (WeatherStation) getIntent().getSerializableExtra("station");
Logger.info("[StationDetailsPlotsWind][onCreate][station.getSystemName() = " + station.getSystemName() +"][dataLn = " + dataLn +"]");
if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
Logger.debug("[StationDetailsPlotsHumidity][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
Locale locale = new Locale(AppConfiguration.locale);
Locale.setDefault(locale);
Resources resources = this.getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
setContentView(R.layout.activity_station_details_plots);
// download data from web service
this.downloadDataFromWebservice();
@ -201,6 +218,8 @@ public class StationDetailsPlotsWind extends AppCompatActivity implements SeekBa
// utc timestamp
long utcTimestamp = utcTime.toEpochSecond();
Logger.debug("[StationDetailsPlotsWind][downloadDataFromWebservice][station.getSystemName() = " + station.getSystemName() +"]");
if (this.dataLn < 0 || this.dataLn > 2) {
// last 2000 points of data, regardless the timescale
data = lastStationDataDao.getLastStationData(station.getSystemName());
@ -222,6 +241,9 @@ public class StationDetailsPlotsWind extends AppCompatActivity implements SeekBa
valuesWindGusts = new ArrayList<>();
if (data instanceof ListOfStationData) {
Logger.debug("[StationDetailsPlotsWind][downloadDataFromWebservice][data.list_of_station_data.length = " + data.list_of_station_data.length +"]");
for (StationData d : data.list_of_station_data) {
valuesWindSpeed.add(new Entry(d.epoch * 1000, d.windspeed));
valuesWindGusts.add(new Entry(d.epoch * 1000, d.windgusts));

Wyświetl plik

@ -3,15 +3,22 @@ package cc.pogoda.mobile.meteosystem.activity;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.util.TypedValue;
import org.tinylog.Logger;
import java.util.Locale;
import cc.pogoda.mobile.meteosystem.Main;
import cc.pogoda.mobile.meteosystem.R;
import cc.pogoda.mobile.meteosystem.activity.updater.StationDetailsValuesOnActivityFromSummaryUpdater;
import cc.pogoda.mobile.meteosystem.activity.updater.StationDetailsValuesOnActivityUpdater;
import cc.pogoda.mobile.meteosystem.config.AppConfiguration;
import cc.pogoda.mobile.meteosystem.dao.SummaryDao;
import cc.pogoda.mobile.meteosystem.type.StationSummaryActElements;
import cc.pogoda.mobile.meteosystem.type.WeatherStation;
@ -44,10 +51,23 @@ public class StationDetailsSummaryActivity extends AppCompatActivity {
SummaryDao summary_dao = new SummaryDao();
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_station_details_summary);
station = (WeatherStation) getIntent().getSerializableExtra("station");
Logger.info("[StationDetailsSummaryActivity][onCreate][station.getSystemName() = " + station.getSystemName() +"]");
if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
Logger.debug("[StationDetailsPlotsHumidity][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
Locale locale = new Locale(AppConfiguration.locale);
Locale.setDefault(locale);
Resources resources = this.getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
setContentView(R.layout.activity_station_details_summary);
elems.title = findViewById(R.id.textViewStationDetailsSummaryTitle);
elems.title.setText(station.getDisplayedName());

Wyświetl plik

@ -5,6 +5,8 @@ import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.os.Handler;
import org.tinylog.Logger;
import cc.pogoda.mobile.meteosystem.Main;
import cc.pogoda.mobile.meteosystem.R;
import cc.pogoda.mobile.meteosystem.activity.updater.StationDetailsValuesOnActivityFromSummaryUpdater;
@ -41,6 +43,8 @@ public class StationDetailsWindRoseActivity extends AppCompatActivity {
station = (WeatherStation) getIntent().getSerializableExtra("station");
Logger.info("[StationDetailsWindRoseActivity][onCreate][station.getSystemName() = " + station.getSystemName() +"]");
main = (Main)getApplication();
// find all elements in the xml layout file and set the references in a holding object

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.activity;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import com.google.android.material.bottomnavigation.BottomNavigationView;
@ -12,10 +14,15 @@ import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import org.tinylog.Logger;
import java.util.Locale;
import cc.pogoda.mobile.meteosystem.R;
import cc.pogoda.mobile.meteosystem.activity.trend.pressure.PressureTrendFragmentDirections;
import cc.pogoda.mobile.meteosystem.activity.trend.temperature.TemperatureTrendFragmentDirections;
import cc.pogoda.mobile.meteosystem.activity.trend.wind.WindTrendFragmentDirections;
import cc.pogoda.mobile.meteosystem.config.AppConfiguration;
public class TrendActivity extends AppCompatActivity {
@ -30,6 +37,16 @@ public class TrendActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
String stationName = (String)getIntent().getExtras().get("station");
if (AppConfiguration.locale != null && !AppConfiguration.locale.equals("default") ) {
Logger.debug("[StationDetailsPlotsHumidity][onCreate][AppConfiguration.locale = " + AppConfiguration.locale + "]");
Locale locale = new Locale(AppConfiguration.locale);
Locale.setDefault(locale);
Resources resources = this.getResources();
Configuration config = resources.getConfiguration();
config.setLocale(locale);
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
this.station = stationName;
Bundle bundle = new Bundle();
bundle.putString("station", stationName);

Wyświetl plik

@ -101,11 +101,12 @@ public class WeatherStationRecyclerViewAdapter extends RecyclerView.Adapter<AllS
textView.setText(station.getDisplayedName());
button.setText(R.string.select_station);
if (station.getDisplayedName().length() > 24) {
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16.0f);
}
else {
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20.0f);
if (!reason.equals(ParceableFavsCallReason.Reason.FAVOURITES)) {
if (station.getDisplayedName().length() > 22) {
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18.0f);
} else {
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22.0f);
}
}
button.setOnClickListener(new AllStationsActRecyclerViewButtonClickEvent(station, activity, reason));

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.dao;
import org.tinylog.Logger;
import java.util.LinkedList;
import java.util.List;
@ -30,6 +32,7 @@ public class AllStationsDao {
try {
resp = consumer.getAllStations().execute();
} catch (Exception e) {
Logger.error("[AllStationsDao][Worker][Exception][e = " + e.getLocalizedMessage() +"]");
e.printStackTrace();
}
}

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.dao;
import org.tinylog.Logger;
import cc.pogoda.mobile.meteosystem.type.web.AvailableParametersWeb;
import cc.pogoda.mobile.meteosystem.web.AvailableParametersConsumer;
import cc.pogoda.mobile.meteosystem.web.RestClientConfig;
@ -24,6 +26,8 @@ public class AvailableParametersDao {
try {
response = consumer.getParametersForStation(stationName).execute();
} catch (Exception e) {
Logger.error("[AvailableParametersDao][Worker][Exception][e = " + e.getLocalizedMessage() +"]");
e.printStackTrace();
}
}

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.dao;
import org.tinylog.Logger;
import cc.pogoda.mobile.meteosystem.type.web.ListOfStationData;
import cc.pogoda.mobile.meteosystem.web.LastStationDataConsumer;
import cc.pogoda.mobile.meteosystem.web.RestClientConfig;
@ -23,6 +25,8 @@ public class LastStationDataDao {
try {
response = consumer.getLastDataForStation(station, true, true).execute();
} catch (Exception e) {
Logger.error("[LastStationDataDao][Worker][Exception][e = " + e.getLocalizedMessage() +"]");
e.printStackTrace();
}
}

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.dao;
import org.tinylog.Logger;
import cc.pogoda.mobile.meteosystem.type.web.ListOfStationData;
import cc.pogoda.mobile.meteosystem.web.RestClientConfig;
import cc.pogoda.mobile.meteosystem.web.StationDataConsumer;
@ -26,6 +28,8 @@ public class StationDataDao {
try {
response = consumer.getDataForStation(station, from, to).execute();
} catch (Exception e) {
Logger.error("[StationDataDao][Worker][Exception][e = " + e.getLocalizedMessage() +"]");
e.printStackTrace();
}
}

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.dao;
import org.tinylog.Logger;
import java.io.IOException;
import cc.pogoda.mobile.meteosystem.type.web.QualityFactor;
@ -32,6 +34,8 @@ public class SummaryDao {
try {
response = consumer.getSummaryForStation(station).execute();
} catch (IOException e) {
Logger.error("[SummaryDao][Worker][Exception][e = " + e.getLocalizedMessage() +"]");
e.printStackTrace();
}
}

Wyświetl plik

@ -1,5 +1,7 @@
package cc.pogoda.mobile.meteosystem.dao;
import org.tinylog.Logger;
import java.io.IOException;
import cc.pogoda.mobile.meteosystem.type.web.Trend;
@ -28,6 +30,8 @@ public class TrendDao {
trend = trendConsumer.getTrendForStation(station).execute();
}
catch (IOException e) {
Logger.error("[TrendDao][Worker][Exception][e = " + e.getLocalizedMessage() +"]");
e.printStackTrace();
}
}

Wyświetl plik

@ -232,7 +232,7 @@ public class Summary {
public String getWindDirStr() {
String out;
if (direction <= 11 && direction >= 349) {
if (direction <= 11 || direction >= 349) {
out = String.format("%5s", "N");
}
else if (direction <= 34 && direction > 11) {

Wyświetl plik

@ -12,7 +12,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:fontFamily="@font/alegreya_sans_sc_medium"
android:textSize="20sp"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/station_button"
app:layout_constraintStart_toStartOf="parent"
@ -25,7 +25,7 @@
android:layout_marginEnd="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textSize="10sp"
android:textSize="14sp"
app:layout_constraintBaseline_toBaselineOf="@+id/station_name"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/station_name" />

Wyświetl plik

@ -14,7 +14,7 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="24dp"
android:fontFamily="@font/alegreya_sans_sc_medium"
android:textSize="20sp"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="@+id/station_button_fav"
app:layout_constraintEnd_toStartOf="@+id/station_button_fav"
app:layout_constraintStart_toStartOf="parent"
@ -27,7 +27,7 @@
android:layout_marginEnd="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textSize="10sp"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/station_name_fav"

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 188 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 197 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 182 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 204 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 1.5 MiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 1.5 MiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 1.3 MiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 1.3 MiB