From e7a2ecf86ac40f6dfaff3c96c3abd18e201f82b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mieszko=20Wrzeszczy=C5=84ski?= Date: Sun, 16 Dec 2018 22:14:55 +0100 Subject: [PATCH] Add new infoboxes --- .idea/misc.xml | 2 +- .../com/uam/wmi/findmytutor/utils/LocaleUtils.java | 12 +----------- .../com/uam/wmi/findmytutor/utils/PrefUtils.java | 2 +- app/src/main/res/layout/info_popup_userlist.xml | 9 +++++++++ app/src/main/res/values-pl/strings.xml | 7 +++++-- app/src/main/res/values/strings.xml | 3 ++- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index dc44dda..b0c7b20 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -29,7 +29,7 @@ - + diff --git a/app/src/main/java/com/uam/wmi/findmytutor/utils/LocaleUtils.java b/app/src/main/java/com/uam/wmi/findmytutor/utils/LocaleUtils.java index 9e9f0da..7046b83 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/utils/LocaleUtils.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/utils/LocaleUtils.java @@ -1,20 +1,10 @@ package com.uam.wmi.findmytutor.utils; -import android.content.Context; import android.content.res.Resources; -import android.os.Build; import android.support.v4.os.ConfigurationCompat; -import java.util.Locale; - public class LocaleUtils { - public static String getCurrentLocale(Context context){ - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){ + public static String getCurrentLocale(){ return String.valueOf(ConfigurationCompat.getLocales(Resources.getSystem().getConfiguration())); - } else{ - //noinspection deprecation - return String.valueOf(context.getResources().getConfiguration().locale); - - } } } diff --git a/app/src/main/java/com/uam/wmi/findmytutor/utils/PrefUtils.java b/app/src/main/java/com/uam/wmi/findmytutor/utils/PrefUtils.java index 27367f4..5d45d85 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/utils/PrefUtils.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/utils/PrefUtils.java @@ -144,7 +144,7 @@ public class PrefUtils { } public static String getLocale(Context context) { - return getSharedPreferences(context).getString("LOCALE", LocaleUtils.getCurrentLocale(context)); + return getSharedPreferences(context).getString("LOCALE", LocaleUtils.getCurrentLocale()); } public static Boolean isBackgroundLocationServiceRunning(Context context) { diff --git a/app/src/main/res/layout/info_popup_userlist.xml b/app/src/main/res/layout/info_popup_userlist.xml index 74e06df..afd1c17 100644 --- a/app/src/main/res/layout/info_popup_userlist.xml +++ b/app/src/main/res/layout/info_popup_userlist.xml @@ -63,4 +63,13 @@ android:text="@string/info_icon_userlist_tab_level_status_inactive_tip" android:textColor="@color/half_black"/> + + \ No newline at end of file diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 28e278d..1dad4d7 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -172,7 +172,7 @@ Na mapie wyświetlane są markery reprezentujące profesorów udostępniających w tej chwili swoją lokalizację. Po kliknięciu w marker możemy sprawdzić kto udostępnia lokalizację, oraz status opisowy (jeśli profesor go ustawił). W aplikacji dostępne są 3 rodzaje lokalizacji, które reprezentowane są przez markery różnego koloru. - - lokalizacja dokładna (udostępniana z GPS telefonu) + - lokalizacja dokładna\n(udostępniana z GPS telefonu) - lokalizacja przybliżona - lokalizacja manualna (wybrana ręcznie) @@ -211,7 +211,10 @@ - użytkownik jest obecnie online - użytkownik jest obecnie offline - użytkownik jest nieaktywny - (nie udostępnił żadnych danych o lokalizacji od conajmniej tygodnia) + (nie udostępnił żadnych danych o lokalizacji od co najmniej tygodnia) + Po kliknięciu w imię i nazwisko, wyświetli się karta zawierająca dokładne informacje o profesorze. + + Użytkownik nie zdefiniował statusu. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ca5da17..ec50538 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -280,7 +280,7 @@ exact - localization displayed on a map, based on GPS approximated - approximated localization based on GPS manual - sharing from manually picked point - presence only - sharing only information whether you are present on the faculty or not, without sharing your localization + presence only - sharing only information whether you are present on the faculty or not, without sharing your localization Each level, except from manual, will be automatically turned on when entering, and turn off when leaving the faculty. You only need to make sure that sharing is on, and the localization will be shared only when on the faculty. Sharing can be turned off at any time with the switch. Additionally, you can add descriptive status to your localization (visible for users after clicking on a marker). @@ -293,6 +293,7 @@ - user is currently offline - user is inactive (didn’t share any localization data since 7 days) + After clicking on a name, the tutor tab will pop up, containing details about selected tutor. yes No