Add new infoboxes

This commit is contained in:
Mieszko Wrzeszczyński 2018-12-16 22:14:55 +01:00
parent 9f0ef0590d
commit e7a2ecf86a
6 changed files with 19 additions and 16 deletions

View File

@ -29,7 +29,7 @@
</value> </value>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8 (1)" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

View File

@ -1,20 +1,10 @@
package com.uam.wmi.findmytutor.utils; package com.uam.wmi.findmytutor.utils;
import android.content.Context;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build;
import android.support.v4.os.ConfigurationCompat; import android.support.v4.os.ConfigurationCompat;
import java.util.Locale;
public class LocaleUtils { public class LocaleUtils {
public static String getCurrentLocale(Context context){ public static String getCurrentLocale(){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
return String.valueOf(ConfigurationCompat.getLocales(Resources.getSystem().getConfiguration())); return String.valueOf(ConfigurationCompat.getLocales(Resources.getSystem().getConfiguration()));
} else{
//noinspection deprecation
return String.valueOf(context.getResources().getConfiguration().locale);
}
} }
} }

View File

@ -144,7 +144,7 @@ public class PrefUtils {
} }
public static String getLocale(Context context) { 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) { public static Boolean isBackgroundLocationServiceRunning(Context context) {

View File

@ -63,4 +63,13 @@
android:text="@string/info_icon_userlist_tab_level_status_inactive_tip" android:text="@string/info_icon_userlist_tab_level_status_inactive_tip"
android:textColor="@color/half_black"/> android:textColor="@color/half_black"/>
<TextView
android:id="@+id/userListPopupInfoTextViewSummary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginTop="10dp"
android:text="@string/info_icon_userlist_summary"
android:textColor="@color/half_black"/>
</LinearLayout> </LinearLayout>

View File

@ -172,7 +172,7 @@
<string name="map_info_text_p1">Na mapie wyświetlane są markery reprezentujące profesorów udostępniających w tej chwili swoją lokalizację.</string> <string name="map_info_text_p1">Na mapie wyświetlane są markery reprezentujące profesorów udostępniających w tej chwili swoją lokalizację.</string>
<string name="map_info_text_p2">Po kliknięciu w marker możemy sprawdzić kto udostępnia lokalizację, oraz status opisowy (jeśli profesor go ustawił).</string> <string name="map_info_text_p2">Po kliknięciu w marker możemy sprawdzić kto udostępnia lokalizację, oraz status opisowy (jeśli profesor go ustawił).</string>
<string name="map_info_text_p3">W aplikacji dostępne są 3 rodzaje lokalizacji, które reprezentowane są przez markery różnego koloru.</string> <string name="map_info_text_p3">W aplikacji dostępne są 3 rodzaje lokalizacji, które reprezentowane są przez markery różnego koloru.</string>
<string name="map_info_text_marker_exact">- lokalizacja dokładna (udostępniana z GPS telefonu)</string> <string name="map_info_text_marker_exact">- lokalizacja dokładna\n(udostępniana z GPS telefonu)</string>
<string name="map_info_text_marker_approximated">- lokalizacja przybliżona</string> <string name="map_info_text_marker_approximated">- lokalizacja przybliżona</string>
<string name="map_info_text_marker_manual">- lokalizacja manualna (wybrana ręcznie)</string> <string name="map_info_text_marker_manual">- lokalizacja manualna (wybrana ręcznie)</string>
@ -211,7 +211,10 @@
<string name="info_icon_userlist_tab_level_status_online">- użytkownik jest obecnie online</string> <string name="info_icon_userlist_tab_level_status_online">- użytkownik jest obecnie online</string>
<string name="info_icon_userlist_tab_level_status_offline">- użytkownik jest obecnie offline</string> <string name="info_icon_userlist_tab_level_status_offline">- użytkownik jest obecnie offline</string>
<string name="info_icon_userlist_tab_level_status_inactive">- użytkownik jest nieaktywny</string> <string name="info_icon_userlist_tab_level_status_inactive">- użytkownik jest nieaktywny</string>
<string name="info_icon_userlist_tab_level_status_inactive_tip">(nie udostępnił żadnych danych o lokalizacji od conajmniej tygodnia)</string> <string name="info_icon_userlist_tab_level_status_inactive_tip">(nie udostępnił żadnych danych o lokalizacji od co najmniej tygodnia)</string>
<string name="info_icon_userlist_summary">Po kliknięciu w imię i nazwisko, wyświetli się karta zawierająca dokładne informacje o profesorze.</string>
<string name="lack_of_status">Użytkownik nie zdefiniował statusu.</string> <string name="lack_of_status">Użytkownik nie zdefiniował statusu.</string>

View File

@ -280,7 +280,7 @@
<string name="info_icon_sharing_tab_p3_level_exact"><b>exact</b> - localization displayed on a map, based on GPS</string> <string name="info_icon_sharing_tab_p3_level_exact"><b>exact</b> - localization displayed on a map, based on GPS</string>
<string name="info_icon_sharing_tab_p3_level_approximate"><b>approximated</b> - approximated localization based on GPS</string> <string name="info_icon_sharing_tab_p3_level_approximate"><b>approximated</b> - approximated localization based on GPS</string>
<string name="info_icon_sharing_tab_p3_level_manual"><b>manual</b> - sharing from manually picked point</string> <string name="info_icon_sharing_tab_p3_level_manual"><b>manual</b> - sharing from manually picked point</string>
<string name="info_icon_sharing_tab_p3_level_presence"><b>presence only</b> - sharing only information whether you are present on the faculty or not, without sharing your localization</string> <string name="info_icon_sharing_tab_p3_level_presence"><b>presence only</ b> - sharing only information whether you are present on the faculty or not, without sharing your localization</string>
<string name="info_icon_sharing_tab_p4">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.</string> <string name="info_icon_sharing_tab_p4">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.</string>
<string name="info_icon_sharing_tab_p5">Sharing can be turned off at any time with the switch.</string> <string name="info_icon_sharing_tab_p5">Sharing can be turned off at any time with the switch.</string>
<string name="info_icon_sharing_tab_p6">Additionally, you can add descriptive status to your localization (visible for users after clicking on a marker).</string> <string name="info_icon_sharing_tab_p6">Additionally, you can add descriptive status to your localization (visible for users after clicking on a marker).</string>
@ -293,6 +293,7 @@
<string name="info_icon_userlist_tab_level_status_offline">- user is currently offline</string> <string name="info_icon_userlist_tab_level_status_offline">- user is currently offline</string>
<string name="info_icon_userlist_tab_level_status_inactive">- user is inactive </string> <string name="info_icon_userlist_tab_level_status_inactive">- user is inactive </string>
<string name="info_icon_userlist_tab_level_status_inactive_tip">(didnt share any localization data since 7 days)</string> <string name="info_icon_userlist_tab_level_status_inactive_tip">(didnt share any localization data since 7 days)</string>
<string name="info_icon_userlist_summary">After clicking on a name, the tutor tab will pop up, containing details about selected tutor.</string>
<string name="possitive_dialog_button">yes</string> <string name="possitive_dialog_button">yes</string>
<string name="negative_dialog_button">No</string> <string name="negative_dialog_button">No</string>