From ed675f0233616f964a9e59aceda51e66a8a6271b Mon Sep 17 00:00:00 2001 From: Mateusz Lubecki Date: Fri, 7 Jan 2022 09:20:48 +0100 Subject: [PATCH] changes to ux according to google play review --- .idea/deploymentTargetDropDown.xml | 17 ----------------- .../meteosystem/activity/MainActivity.java | 4 ++-- .../WeatherStationRecyclerViewAdapter.java | 9 ++++++++- .../web/StationBackgroundDownloader.java | 12 +++++++++++- .../main/res/layout/activity_export_data.xml | 19 +++++++++++-------- ...activity_favourites_linear_layout_data.xml | 8 ++++---- app/src/main/res/layout/activity_settings.xml | 10 +++++----- .../main/res/layout/fragment_temperature.xml | 8 ++++++-- app/src/main/res/layout/fragment_wind.xml | 8 ++++++-- app/src/main/res/values/themes.xml | 2 +- 10 files changed, 54 insertions(+), 43 deletions(-) delete mode 100644 .idea/deploymentTargetDropDown.xml diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml deleted file mode 100644 index 6bec355..0000000 --- a/.idea/deploymentTargetDropDown.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/java/cc/pogoda/mobile/meteosystem/activity/MainActivity.java b/app/src/main/java/cc/pogoda/mobile/meteosystem/activity/MainActivity.java index 2c28f9f..17471b9 100644 --- a/app/src/main/java/cc/pogoda/mobile/meteosystem/activity/MainActivity.java +++ b/app/src/main/java/cc/pogoda/mobile/meteosystem/activity/MainActivity.java @@ -182,7 +182,7 @@ public class MainActivity extends AppCompatActivity { builder.setMessage("ENG: Mateusz Lubecki\r\n" + "CZE: Sylwiusz Pachel\r\n" + "GER: Jakub Fiałek\r\n" + - "LAT: Andris Stikáns\r\n" + + "LAT: Andris Stikāns\r\n" + "UKR, RUS: Влад Поливач \r\n(Wład Polywacz)\r\n\r\nProgram Icon: Bartosz Kaszubowski"); builder.setPositiveButton(R.string.ok, (DialogInterface var1, int var2) -> { var1.dismiss(); @@ -197,7 +197,7 @@ public class MainActivity extends AppCompatActivity { Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("text/plain"); - intent.putExtra(Intent.EXTRA_TITLE, LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE) + ".log"); + intent.putExtra(Intent.EXTRA_TITLE, "meteosystem_" +LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE) + ".log"); startActivityForResult(intent, 123); diff --git a/app/src/main/java/cc/pogoda/mobile/meteosystem/adapter/WeatherStationRecyclerViewAdapter.java b/app/src/main/java/cc/pogoda/mobile/meteosystem/adapter/WeatherStationRecyclerViewAdapter.java index b4c0b8b..bc989fb 100644 --- a/app/src/main/java/cc/pogoda/mobile/meteosystem/adapter/WeatherStationRecyclerViewAdapter.java +++ b/app/src/main/java/cc/pogoda/mobile/meteosystem/adapter/WeatherStationRecyclerViewAdapter.java @@ -103,7 +103,14 @@ public class WeatherStationRecyclerViewAdapter extends RecyclerView.Adapter 22) { - textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18.0f); + textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20.0f); + } else { + textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22.0f); + } + } + else { + if (station.getDisplayedName().length() > 22) { + textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20.0f); } else { textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22.0f); } diff --git a/app/src/main/java/cc/pogoda/mobile/meteosystem/web/StationBackgroundDownloader.java b/app/src/main/java/cc/pogoda/mobile/meteosystem/web/StationBackgroundDownloader.java index a1f4a59..99ef123 100644 --- a/app/src/main/java/cc/pogoda/mobile/meteosystem/web/StationBackgroundDownloader.java +++ b/app/src/main/java/cc/pogoda/mobile/meteosystem/web/StationBackgroundDownloader.java @@ -3,8 +3,11 @@ package cc.pogoda.mobile.meteosystem.web; import android.graphics.Bitmap; import android.graphics.BitmapFactory; +import org.tinylog.Logger; + import java.io.IOException; import java.io.InputStream; +import java.net.URL; import cc.pogoda.mobile.meteosystem.type.WeatherStation; @@ -28,10 +31,17 @@ public class StationBackgroundDownloader implements Runnable { public void run() { InputStream in = null; try { - in = new java.net.URL(station.getImageUrl()).openStream(); + URL url = new java.net.URL(station.getImageUrl()); + + Logger.debug("[StationBackgroundDownloader][run][url = " + url.toString() +"]"); + + in = url.openStream(); bitmap = BitmapFactory.decodeStream(in); + in.close(); + } catch (IOException e) { + Logger.error("[StationBackgroundDownloader][run][IOException][e = " + e.getLocalizedMessage() +"]"); e.printStackTrace(); bitmap = null; } diff --git a/app/src/main/res/layout/activity_export_data.xml b/app/src/main/res/layout/activity_export_data.xml index 1619ed5..39c1c87 100644 --- a/app/src/main/res/layout/activity_export_data.xml +++ b/app/src/main/res/layout/activity_export_data.xml @@ -23,9 +23,10 @@