Merge branch 'infoIcons' of s416084/find-my-tutor-android into develop

This commit is contained in:
Adam Domagalski 2018-12-10 23:22:54 +00:00 committed by Gogs
commit 9ffa64e793
42 changed files with 557 additions and 17 deletions

View File

@ -34,6 +34,8 @@ dependencies {
implementation "ch.acra:acra-http:$acraVersion"
implementation "ch.acra:acra-toast:$acraVersion"
implementation "ch.acra:acra-notification:$acraVersion"
implementation "ch.acra:acra-limiter:$acraVersion"
implementation fileTree(include: ['*.jar'], dir: 'libs')

View File

@ -7,6 +7,7 @@ import android.content.res.Configuration;
import static org.acra.ReportField.*;
import org.acra.ACRA;
import org.acra.annotation.AcraLimiter;
import org.acra.annotation.AcraNotification;
import org.acra.config.CoreConfigurationBuilder;
import org.acra.config.HttpSenderConfigurationBuilder;
@ -20,6 +21,7 @@ import java.util.Map;
@AcraNotification(resText = R.string.notification_text,
resTitle = R.string.notification_title,
resChannelName = R.string.notification_channel)
@AcraLimiter(failedReportLimit = 2)
public class FindMyTutor extends Application {
@Override
protected void attachBaseContext(Context base) {

View File

@ -4,6 +4,8 @@ import android.Manifest;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.graphics.drawable.ColorDrawable;
import android.location.Location;
import android.os.Bundle;
import android.os.Handler;
@ -11,11 +13,14 @@ import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;
import android.widget.Toast;
@ -47,6 +52,7 @@ import com.uam.wmi.findmytutor.service.CoordinateService;
import com.uam.wmi.findmytutor.service.PredefinedStatusesService;
import com.uam.wmi.findmytutor.service.UserService;
import com.uam.wmi.findmytutor.utils.ApproximatedLocalization;
import com.uam.wmi.findmytutor.utils.InfoHelperUtils;
import com.uam.wmi.findmytutor.utils.ManualLocationUtils;
import com.uam.wmi.findmytutor.utils.MapMarker;
import com.uam.wmi.findmytutor.utils.MapUtils;
@ -67,6 +73,8 @@ import io.reactivex.schedulers.Schedulers;
import okhttp3.ResponseBody;
import timber.log.Timber;
import static com.mapbox.mapboxsdk.Mapbox.getApplicationContext;
public class MapActivity extends BaseActivity
implements PermissionsListener, OnMapReadyCallback {
@ -123,7 +131,7 @@ public class MapActivity extends BaseActivity
};
findViewById(R.id.mapInfoImageButton).setOnClickListener(v-> InfoHelperUtils.infoPopUp(v, R.layout.info_popup_map));
selectLocationButton = findViewById(R.id.select_location_button);
removeLocationButton = findViewById(R.id.remove_location_button);
mapView = findViewById(R.id.mapView);
@ -134,6 +142,7 @@ public class MapActivity extends BaseActivity
handleBackgroundTaskLifeCycle();
manualLocationUtils = new ManualLocationUtils(MapActivity.this);
approximatedLocalization = new ApproximatedLocalization(MapUtils.loadJsonFromAsset(getApplicationContext(), "building.geojson"));
}
@Override
@ -727,4 +736,5 @@ public class MapActivity extends BaseActivity
public void adjustMapToSearch(Integer zoom) {
MapUtils.setZoom(mapboxMap, zoom);
}
}
}

View File

@ -18,6 +18,7 @@ import com.uam.wmi.findmytutor.model.User;
import com.uam.wmi.findmytutor.network.ApiClient;
import com.uam.wmi.findmytutor.service.TutorTabApi;
import com.uam.wmi.findmytutor.service.UserService;
import com.uam.wmi.findmytutor.utils.InfoHelperUtils;
import com.uam.wmi.findmytutor.utils.PrefUtils;
import com.uam.wmi.findmytutor.utils.RestApiHelper;
@ -60,6 +61,7 @@ public class TutorTab extends AppCompatActivity {
TextView userEmail = findViewById(R.id.userEmail);
TextView department = findViewById(R.id.userDepartment);
Button saveButon = findViewById(R.id.saveButon);
findViewById(R.id.contentTutorTabInfoImageButton).setOnClickListener(v-> InfoHelperUtils.infoPopUp(v,R.layout.info_popup_tutor_tab));
userName.setText(String.format("%s %s", PrefUtils.getUserFirstName(getApplicationContext()), PrefUtils.getUserLastName(getApplicationContext())));
disposable.add(

View File

@ -15,6 +15,7 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.annimon.stream.Stream;
import com.jakewharton.retrofit2.adapter.rxjava2.HttpException;
@ -27,6 +28,7 @@ import com.uam.wmi.findmytutor.model.User;
import com.uam.wmi.findmytutor.network.ApiClient;
import com.uam.wmi.findmytutor.service.TutorTabApi;
import com.uam.wmi.findmytutor.service.UserService;
import com.uam.wmi.findmytutor.utils.InfoHelperUtils;
import com.uam.wmi.findmytutor.utils.MyDividerItemDecoration;
import com.uam.wmi.findmytutor.utils.RecyclerTouchListener;
import com.uam.wmi.findmytutor.utils.RestApiHelper;
@ -76,11 +78,13 @@ public class UsersListFragment extends Fragment {
mAdapter = new TutorsListAdapter(getActivity().getApplicationContext(), tutorsFiltered);
View view = inflater.inflate(R.layout.users_list, container, false);
view.setBackgroundColor(getResources().getColor(android.R.color.white));
return view;
}
public void onViewCreated(View view, Bundle savedInstanceState) {
ButterKnife.bind(this, view);
view.findViewById(R.id.userListInfoImageButton).setOnClickListener(v -> InfoHelperUtils.infoPopUp(v,R.layout.info_popup_userlist));
userService = ApiClient.getClient(getApplicationContext())
.create(UserService.class);
@ -151,11 +155,11 @@ public class UsersListFragment extends Fragment {
List<String> dutyHoursList = Stream.of(tutorTabViewModel.getDutyHours())
.map(DutyHourViewModel::getSummary).toList();
if(dutyHoursList.isEmpty()){
if (dutyHoursList.isEmpty()) {
dutyHoursList.add(getString(R.string.lack_duty_hours));
}
if(tutorTabViewModel.getNote().isEmpty()){
if (tutorTabViewModel.getNote().isEmpty()) {
userNoteText = getString(R.string.lack_note);
}
@ -226,7 +230,7 @@ public class UsersListFragment extends Fragment {
private int sortByUserName(User t1, User t2) {
return plCollator.compare(t1.getLastName(),t2.getLastName());
return plCollator.compare(t1.getLastName(), t2.getLastName());
}
private void showError(Throwable e) {
@ -235,7 +239,7 @@ public class UsersListFragment extends Fragment {
if (e instanceof HttpException) {
ResponseBody responseBody = ((HttpException) e).response().errorBody();
message = RestApiHelper.getErrorMessage(responseBody);
}else{
} else {
message = "Network Error !";
}

View File

@ -0,0 +1,42 @@
package com.uam.wmi.findmytutor.utils;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.support.v7.app.AlertDialog;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.Toast;
import com.uam.wmi.findmytutor.R;
import static com.mapbox.mapboxsdk.Mapbox.getApplicationContext;
public class InfoHelperUtils {
public static void infoPopUp(View anchorView, int layoutId) {
LayoutInflater layoutInflater = (LayoutInflater)getApplicationContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE );
View popupView = layoutInflater.inflate(layoutId, null);
PopupWindow popupWindow = new PopupWindow(popupView,
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
// If the PopupWindow should be focusable
popupWindow.setFocusable(true);
// If you need the PopupWindow to dismiss when when touched outside
popupWindow.setBackgroundDrawable(new ColorDrawable());
int location[] = new int[2];
// Get the View's(the one that was clicked in the Fragment) location
anchorView.getLocationOnScreen(location);
// Using location, the PopupWindow will be displayed right under anchorView
popupWindow.showAtLocation(anchorView, Gravity.NO_GRAVITY,
location[0] + anchorView.getWidth() / 2, location[1] + anchorView.getHeight());
}
}

View File

@ -0,0 +1,44 @@
package com.uam.wmi.findmytutor.utils;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.preference.Preference;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.Toast;
import com.uam.wmi.findmytutor.R;
import static com.mapbox.mapboxsdk.Mapbox.getApplicationContext;
public class SharingInfoPopupButtonPreference extends Preference {
public SharingInfoPopupButtonPreference(Context context, AttributeSet attrs) {
super(context, attrs);
setWidgetLayoutResource(R.layout.preference_popup_info_button_widget);
}
@Override
protected View onCreateView(ViewGroup parent) {
View view = super.onCreateView(parent);
// LayoutInflater li = (LayoutInflater)getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE );
// View temp =li.inflate( R.layout.preference_button_widget, parent, false);
return view;
}
@Override
protected void onBindView(View view)
{
super.onBindView(view);
ImageButton button = view.findViewById(R.id.sharingTabInfoImageButton);
button.setOnClickListener(v-> {
InfoHelperUtils.infoPopUp(v,R.layout.info_popup_sharing_tab);
});
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zm1,15h-2v-6h2v6zm0,-8h-2V7h2v2z" />
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zm1,15h-2v-6h2v6zm0,-8h-2V7h2v2z" />
</vector>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#e9ffffff"/>
<stroke android:width="3dp" android:color="#B1BCBE" />
<corners android:radius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
</shape>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M11,7h2v2h-2zM11,11h2v6h-2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>

View File

@ -2,7 +2,6 @@
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
xmlns:fab="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -21,13 +20,20 @@
</com.mapbox.mapboxsdk.maps.MapView>
<ImageButton
android:id="@+id/mapInfoImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
mapbox:srcCompat="@drawable/outline_info_24"/>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
android:orientation="vertical"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="1dp">
tools:layout_editor_absoluteY="0dp">
<!-- Implementation of find my location button -->

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -9,6 +10,13 @@
android:paddingRight="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin">
<ImageButton
android:id="@+id/contentTutorTabInfoImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
mapbox:srcCompat="@drawable/outline_info_24"/>
<TextView android:id="@+id/userName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:padding="10dp"
android:background="@drawable/layout_bg">
<TextView
android:id="@+id/textViewP1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="@string/map_info_text_p1" />
<TextView
android:id="@+id/textViewP2"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/map_info_text_p2" />
<TextView
android:id="@+id/textViewP3"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/map_info_text_p3" />
<TextView
android:id="@+id/exactMarkerTextView"
android:gravity="center"
android:drawableLeft="@drawable/exact_localization_marker"
android:layout_marginTop="20dp"
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:layout_weight="1"
android:text="@string/map_info_text_marker_exact" />
<TextView
android:id="@+id/approximateTextView"
android:drawableLeft="@drawable/approximate_localization_marker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:layout_marginLeft="5dp"
android:gravity="center"
android:layout_weight="1"
android:text="@string/map_info_text_marker_approximated" />
<TextView
android:id="@+id/manualMarkerTextView"
android:drawableLeft="@drawable/manual_localization_marker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:layout_marginLeft="5dp"
android:gravity="center"
android:layout_weight="1"
android:text="@string/map_info_text_marker_manual" />
</LinearLayout>

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@drawable/layout_bg"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/textViewP1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p1" />
<TextView
android:id="@+id/textViewP2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p2" />
<TextView
android:id="@+id/textViewP3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p3" />
<TextView
android:id="@+id/textViewP3exactlvl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p3_level_exact" />
<TextView
android:id="@+id/textViewP3approximatelvl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p3_level_approximate" />
<TextView
android:id="@+id/textViewP3manuallvl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p3_level_manual" />
<TextView
android:id="@+id/textViewP3presencelvl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p3_level_presence" />
<TextView
android:id="@+id/textViewP4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p4" />
<TextView
android:id="@+id/textViewP5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p5" />
<TextView
android:id="@+id/textViewP6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p6" />
<TextView
android:id="@+id/textViewP7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:text="@string/info_icon_sharing_tab_p7" />
</LinearLayout>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@drawable/layout_bg"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/textViewP1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:text="@string/info_icon_tutor_tab_p1" />
<TextView
android:id="@+id/textViewP2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:text="@string/info_icon_tutor_tab_p2" />
<TextView
android:id="@+id/textViewP3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:text="@string/info_icon_tutor_tab_p3" />
<TextView
android:id="@+id/textViewP4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:layout_weight="1"
android:text="@string/info_icon_tutor_tab_p4" />
</LinearLayout>

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="20dp"
android:background="@drawable/layout_bg">
<TextView
android:id="@+id/userListPopupInfoTextViewP1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/info_icon_userlist_tab_p1" />
<TextView
android:id="@+id/userListPopupInfoTextViewP2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/info_icon_userlist_tab_p2" />
<TextView
android:id="@+id/userListPopupInfoTextViewOnline"
android:gravity="center"
android:drawableLeft="@drawable/online_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:layout_weight="1"
android:text="@string/info_icon_userlist_tab_level_status_online" />
<TextView
android:id="@+id/userListPopupInfoTextVieOffline"
android:gravity="center"
android:drawableLeft="@drawable/user_list_offline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:layout_weight="1"
android:text="@string/info_icon_userlist_tab_level_status_offline" />
<TextView
android:id="@+id/userListPopupInfoTextViewInactive"
android:gravity="center"
android:drawableLeft="@drawable/user_list_off"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:layout_weight="1"
android:text="@string/info_icon_userlist_tab_level_status_inactive" />
<TextView
android:id="@+id/userListPopupInfoTextViewTip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/info_icon_userlist_tab_level_status_inactive_tip" />
</LinearLayout>

View File

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:ignore="MissingDefaultResource"
android:layout_width="match_parent"
android:fontFamily="@font/lato_regular"
android:layout_height="match_parent">
<com.uam.wmi.findmytutor.utils.SharingInfoPopupButtonPreference/>
<PreferenceCategory
android:title="@string/settings_category_location"
android:key="category_sharing">

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="right"
xmlns:mapbox="http://schemas.android.com/apk/res-auto">
<ImageButton
android:id="@+id/sharingTabInfoImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="info"
mapbox:srcCompat="@drawable/outline_info_24"/>
</LinearLayout>

View File

@ -1,15 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="@font/lato_regular"
tools:context=".activity.UsersListFragment">
<include layout="@layout/users_list_main" />
<ImageButton
android:id="@+id/userListInfoImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
mapbox:srcCompat="@drawable/outline_info_24"/>
</android.support.design.widget.CoordinatorLayout>

View File

@ -167,6 +167,52 @@
<string name="description_awaiting">Czekam na studentów</string>
<string name="description_onholidays">Na wakacjach</string>
<string name="title_description">Status</string>
<!--(PL) Map Activity info helper-->
<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_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_approximated">lokalizacja przybliżona</string>
<string name="map_info_text_marker_manual"> lokalizacja manualna (wybrana ręcznie)</string>
<!--(PL) Blacklist info helper-->
<string name="info_icon_blacklist_p1">W tym panelu możesz dodać użytkowników do swojej czarnej listy. Użytkownicy z czarnej listy nie będą widzieć żadnych danych które udostępniasz - lokalizacji, twojego statusu online, czy informacji o obecności.</string>
<string name="info_icon_blacklist_p2">Jedyną informacją która wciąż będzie udostępniana wszystkim jest notka w Twoim profilu.</string>
<string name="info_icon_blacklist_p3">Za pomocą powyższego przycisku możesz włączyć lub wyłączyć używanie czarnej listy. Czarna lista nie może być aktywna jednocześnie z białą listą.</string>
<!--(PL) Whitelist info helper-->
<string name="info_icon_whitelist_p1">W tym panelu możesz dodać użytkowników do swojej białej listy. Użytkownicy SPOZA listy nie będą widzieć żadnych danych które udostępniasz - lokalizacji, twojego statusu online, czy informacji o obecności.</string>
<string name="info_icon_whitelist_p2">Jedyną informacją która wciąż będzie udostępniana wszystkim jest notka w Twoim profilu.</string>
<string name="info_icon_whitelist_p3">Za pomocą powyższego przycisku możesz włączyć lub wyłączyć używanie białej listy. Biała lista nie może być aktywna jednocześnie z czarną listą.</string>
<!--(PL) Tutor tab info helper-->
<string name="info_icon_tutor_tab_p1">W tej zakładce możesz edytować swój profil widoczny dla wszystkich użytkowników.</string>
<string name="info_icon_tutor_tab_p2">Jeśli zakładka jest pusta lub zawiera nieaktualne dane, możesz je ręcznie uaktualnić.</string>
<string name="info_icon_tutor_tab_p3">W każdej chwili możesz przywrócić dane ze strony WMI za pomocą przycisku (jeśli są dostępne na stronie).</string>
<string name="info_icon_tutor_tab_p4">Dodatkowo możesz uzupełnić notkę, aby przekazać jakąś informację widoczną dla wszystkich studentów: np. “dzisiejszy dyżur odwołany” itp.</string>
<!--(PL) Sharing Tab info helper-->
<string name="info_icon_sharing_tab_p1">W tej zakładce możesz włączyć/wyłączyć udostępnianie swojej lokalizacji oraz ją skonfigurować.</string>
<string name="info_icon_sharing_tab_p2">Niektóre zmiany mogą nie być widoczne od razu! Odświeżanie informacji zajmuje do 2 minut.</string>
<string name="info_icon_sharing_tab_p3">Udostępniać możesz na jednym z 4 poziomów:</string>
<string name="info_icon_sharing_tab_p3_level_exact"><b>dokładny </b> - lokalizacja wyświetlana na mapie na podstawie GPS</string>
<string name="info_icon_sharing_tab_p3_level_approximate"><b>przybliżony</b> - przybliżona lokalizacja wyświetlana na podstawie GPS</string>
<string name="info_icon_sharing_tab_p3_level_manual"><b>manualny</b> - udostępnianie z ręcznie wybranego punktu na mapie</string>
<string name="info_icon_sharing_tab_p3_level_presence"><b>tylko obecność</b> - udostępnianie jedynie informacji o pojawieniu się na wydziale (aktywny na liście), bez udostępniania lokalizacji</string>
<string name="info_icon_sharing_tab_p4">Każdy poziom z wyjątkiem manualnie wybranej lokalizacji automatycznie zaczyna udostępniać po wejściu na wydział i przestaje udostępniać po jego opuszczeniu. Wystarczy włączyć udostępnianie, a lokalizacja nie będzie udostępniana tylko przy obecności na wydziale.</string>
<string name="info_icon_sharing_tab_p5">Udostępnianie w dowolnym momencie można wyłączyć za pomocą przełącznika.</string>
<string name="info_icon_sharing_tab_p6">Dodatkowo, do Twojej lokalizacji możesz dodać status opisowy (będzie on widoczny dla użytkowników po kliknięciu w marker).</string>
<string name="info_icon_sharing_tab_p7">Zarówno manualne lokalizacje jak i statusy możesz dodać do listy, które potem możesz wybrać w wygodny sposób.</string>
<!--(PL) Userlist Tab info helper-->
<string name="info_icon_userlist_tab_p1">W tym panelu znajduje się listę profesorów.</string>
<string name="info_icon_userlist_tab_p2">Ich status symbolizowany jest przez kolorowe kropki:</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_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>
</resources>

View File

@ -0,0 +1,8 @@
<resources>
<declare-styleable name="infoButton">
<attr name="exampleString" format="string" />
<attr name="exampleDimension" format="dimension" />
<attr name="exampleColor" format="color" />
<attr name="exampleDrawable" format="color|reference" />
</declare-styleable>
</resources>

View File

@ -246,4 +246,55 @@
<string name="lack_note">No note.</string>
<string name="search">Search</string>
<string name="mockup_location_string" translatable="false">mock location string</string>
<!--ACRA ON/OFF switch-->
<string name="pref_acra_disabled" translatable="false">Allow to send raport to developers is ON</string>
<string name="pref_acra_enabled" translatable="false">Allow to send raport to developers is OFF</string>
<string name="pref_disable_acra" translatable="false">App issues reporting</string>
<!--(ENG) Map Activity info helper-->
<string name="map_info_text_p1">On the map there are markers which represents tutors sharing their location right now.</string>
<string name="map_info_text_p2">After clicking on a marker, you can check who is sharing it and the descriptive status (if the tutor have set one).</string>
<string name="map_info_text_p3">In the app there are 3 possible types of localization, represented by various colors.</string>
<string name="map_info_text_marker_exact">exact localization (from mobile GPS)</string>
<string name="map_info_text_marker_approximated">approximated localization</string>
<string name="map_info_text_marker_manual">manual localization (manually picked)</string>
<!--(ENG) Blacklist info helper-->
<string name="info_icon_blacklist_p1">In this panel you can add users to your blacklist. Users from the blacklist cant see any data that you share - localization, online status, or information about presence.</string>
<string name="info_icon_blacklist_p2">The only thing which remains public is the note in your profile.</string>
<string name="info_icon_blacklist_p3">With the switch you can turn on/off usage of the blacklist. Blacklist and whitelist cannot be active at the same time.</string>
<!--(ENG) Whitelist info helper-->
<string name="info_icon_whitelist_p1">In this panel you can add users to your whitelist. Users OUT OF the whitelist cant see any data that you share - localization, online status, or information about presence.</string>
<string name="info_icon_whitelist_p2">The only thing which remains public is the note in your profile.</string>
<string name="info_icon_whitelist_p3">With the switch you can turn on/off usage of the whitelist. Blacklist and whitelist cannot be active at the same time.</string>
<!--(ENG) Tutor Tab info helper-->
<string name="info_icon_tutor_tab_p1">In this tab you can edit you profile visible for all the users.</string>
<string name="info_icon_tutor_tab_p2">If the tab is empty or contains outdated information, you can update them manually.</string>
<string name="info_icon_tutor_tab_p3">Any time you can restore data from the WMI website with the button (if the data is available).</string>
<string name="info_icon_tutor_tab_p4">Additionally, you can fill your note, to share a message visible for all the users: for example “todays duty hours are cancelled” etc.</string>
<!--(ENG) Sharing Tab info helper-->
<string name="info_icon_sharing_tab_p1">In this tab you can turn on/off sharing your localization and configure it.</string>
<string name="info_icon_sharing_tab_p2">Some of the changes may not happen immediately! Refreshing information takes up to 2 minutes.</string>
<string name="info_icon_sharing_tab_p3">You can share your localization on one of the 4 levels:</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_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_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_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_p7">Both manual localizations and statuses can be added to a list, and then used them in a convenient way. </string>
<!--(ENG) Userlist tab info helper-->
<string name="info_icon_userlist_tab_p1">This panel contains the list of tutors.</string>
<string name="info_icon_userlist_tab_p2">Their status is represented by colorful dots:</string>
<string name="info_icon_userlist_tab_level_status_online">- user is currently online</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_tip">(didnt share any localization data since 7 days)</string>
</resources>